Skip to content

ollama_artifact_diff

Diff artifacts. ARTIFACT. Structured diff of two same-pack artifacts. Input: {a: {pack, slug}, b: {pack, slug}} — must share pack; cross-pack diffs refused loudly. Returns {pack, a, b, weak, diff} with weak flip surfaced at top level (strong→weak or weak→strong). Lists diff as {added, removed, unchanged} matched on primary key per item kind; narrative fields as {before, after}; release_note_draft also carries a compact LCS line_diff. Evidence is SUMMARIZED (counts + referenced_paths + path_delta), never exploded chunk-by-chunk. Deterministic ordering on every list.

Parameter Type Required Default Description
a object yes First artifact identity.
b object yes Second artifact identity. Must share a.pack — cross-pack diffs are refused.
extra_artifact_dirs string[] no Extra read-only search dirs (same as artifact_list / artifact_read). Canonical identity is still (pack, slug).

The JSON Schema below is generated from the same zod schema the server validates against at the wire — it cannot drift from runtime behavior.

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"a": {
"type": "object",
"properties": {
"pack": {
"type": "string",
"enum": [
"incident_pack",
"repo_pack",
"change_pack"
],
"description": "Pack identity."
},
"slug": {
"type": "string",
"minLength": 1,
"description": "Artifact slug (filename stem)."
}
},
"required": [
"pack",
"slug"
],
"description": "First artifact identity."
},
"b": {
"type": "object",
"properties": {
"pack": {
"type": "string",
"enum": [
"incident_pack",
"repo_pack",
"change_pack"
],
"description": "Pack identity."
},
"slug": {
"type": "string",
"minLength": 1,
"description": "Artifact slug (filename stem)."
}
},
"required": [
"pack",
"slug"
],
"description": "Second artifact identity. Must share a.pack — cross-pack diffs are refused."
},
"extra_artifact_dirs": {
"description": "Extra read-only search dirs (same as artifact_list / artifact_read). Canonical identity is still (pack, slug).",
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
}
},
"required": [
"a",
"b"
]
}

Every tool returns the standard envelope — tier_used, model, tokens_in/tokens_out, elapsed_ms, backend provenance, warnings. See Envelope & tiers.

Schema + handler: src/tools/artifactDiff.ts · registration: src/index.ts


Back to the Tool Reference.