From cc6fcf970a53713d1f54ddedffc4918569224eaf Mon Sep 17 00:00:00 2001 From: Bret Mogilefsky Date: Thu, 12 Nov 2026 19:54:31 +0000 Subject: [PATCH 1/2] fix(pi-coding-agent): accept optional reasoning and inputModalities model fields The pi renderer failed closed on `inputModalities`, so a real `usai` snapshot never rendered ~/.pi/agent/models.json and `pi --list-models` was empty. The upstream neutral catalog schema gained optional `reasoning` and `inputModalities` model fields. - pi: validate both fields; map inputModalities to pi `input` (text/image only, others dropped); validate reasoning but do not emit it - refresh the vendored neutral catalog schema (pi, opencode-go-provider) - add regression tests for pi, plus claude-code, codex and antigravity, whose loaders already tolerate the fields - docs: README mapping table, ADR 0002, TROUBLESHOOTING, root README Co-authored-by: OpenCode Agent --- README.md | 3 +- antigravity/tests/test_antigravity.py | 30 ++++++ claude-code/tests/test_claude_code.py | 13 +++ codex/tests/test_codex.py | 29 ++++++ opencode-go-provider/README.md | 3 +- .../acq-neutral-model-catalog.schema.json | 14 +++ pi-coding-agent/README.md | 2 + pi-coding-agent/TROUBLESHOOTING.md | 1 + ...tral-provider-input-into-pi-models-json.md | 11 +++ .../home/pi-coding-agent-render-models.mjs | 32 +++++- pi-coding-agent/tests/render-models.test.mjs | 99 ++++++++++++++++++- .../acq-neutral-model-catalog.schema.json | 14 +++ 12 files changed, 247 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 70d7f93..23974c4 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,8 @@ A provider kit is a self-contained `hybrid/v1` mixin with three layers: the facts, the host-side normalizer, the vendored snapshot, and the host-materialized provider path, plus the declared credential variable names. 3. **Neutral model catalog** (`acq-neutral-model-catalog/v1`) — model ids, - display names, context windows, output limits, and per-million-token costs. + display names, context windows, output limits, per-million-token costs, and + optional capability hints (`reasoning`, `inputModalities`). Metadata only: no routing or credential fields. A provider kit also ships a `spec.yaml` (network allow-list and any guest file diff --git a/antigravity/tests/test_antigravity.py b/antigravity/tests/test_antigravity.py index d9e0c44..b67b639 100644 --- a/antigravity/tests/test_antigravity.py +++ b/antigravity/tests/test_antigravity.py @@ -1,6 +1,7 @@ import importlib import json import sys +import tempfile import unittest import urllib.error import urllib.request @@ -22,6 +23,35 @@ def test_json_rejects_duplicates_and_constants(self): with self.assertRaises(ValueError): provider.strict_json(raw) + def test_provider_accepts_optional_capability_fields(self): + with tempfile.TemporaryDirectory() as directory: + root = Path(directory) + path = root / "models/providers/test" + path.mkdir(parents=True) + facts = { + "schemaVersion": "acq-provider-facts/v1", + "providerId": "test", + "apiProtocol": "openai-compatible", + "host": "example.invalid", + "baseUrl": "https://example.invalid/v1", + "keyEnv": "TEST_MODEL_KEY", + } + snapshot = { + "schemaVersion": "acq-neutral-model-catalog/v1", + "providerId": "test", + "models": [ + {"id": "a", "inputModalities": ["text", "image"], "reasoning": True}, + {"id": "b", "inputModalities": ["text", "audio", "pdf"], "reasoning": False}, + ], + "recommendations": {"primary": "a"}, + } + (path / "facts.json").write_text(json.dumps(facts)) + (path / "snapshot.json").write_text(json.dumps(snapshot)) + env = {"ACQ_PROVIDER_INPUT_ROOT": str(root), "TEST_MODEL_KEY": "test-only"} + _, models, primary, _, _ = provider.load(env) + self.assertEqual([m["id"] for m in models], ["a", "b"]) + self.assertEqual(primary, "a") + def test_function_translation(self): messages, tools = bridge.translate( { diff --git a/claude-code/tests/test_claude_code.py b/claude-code/tests/test_claude_code.py index b88cbee..c2d5228 100644 --- a/claude-code/tests/test_claude_code.py +++ b/claude-code/tests/test_claude_code.py @@ -56,6 +56,19 @@ def test_provider_recommendations_and_overrides(inputs): assert load_provider(env)[2]["primary"] == "model-b" +def test_provider_accepts_optional_capability_fields(inputs): + root, directory, _, catalog = inputs + catalog["models"] = [ + {"id": "model-a", "inputModalities": ["text", "image"], "reasoning": True}, + {"id": "model-b", "inputModalities": ["text", "audio", "pdf"], "reasoning": False}, + ] + (directory / "snapshot.json").write_text(json.dumps(catalog)) + env = {"ACQ_PROVIDER_INPUT_ROOT": str(root), "EXAMPLE_MODEL_KEY": "synthetic"} + _, ids, roles = load_provider(env) + assert ids == ["model-a", "model-b"] + assert roles["primary"] == "model-a" + + @pytest.mark.parametrize("change", ["missing-key", "unknown-model", "symlink", "http", "identity", "duplicate"]) def test_provider_rejects_invalid_input(inputs, change): root, directory, facts, catalog = inputs diff --git a/codex/tests/test_codex.py b/codex/tests/test_codex.py index 6222fa6..5f8c2aa 100644 --- a/codex/tests/test_codex.py +++ b/codex/tests/test_codex.py @@ -83,6 +83,35 @@ def test_provider_validation(self): with self.assertRaises(ValueError): provider.load("CODEX", {"ACQ_PROVIDER_INPUT_ROOT": str(root)}) + def test_provider_accepts_optional_capability_fields(self): + with tempfile.TemporaryDirectory() as directory: + root = Path(directory) + path = root / "models/providers/test" + path.mkdir(parents=True) + facts = { + "schemaVersion": "acq-provider-facts/v1", + "providerId": "test", + "apiProtocol": "openai-compatible", + "host": "example.invalid", + "baseUrl": "https://example.invalid/v1", + "keyEnv": "TEST_MODEL_KEY", + } + snapshot = { + "schemaVersion": "acq-neutral-model-catalog/v1", + "providerId": "test", + "models": [ + {"id": "a", "inputModalities": ["text", "image"], "reasoning": True}, + {"id": "b", "inputModalities": ["text", "audio", "pdf"], "reasoning": False}, + ], + "recommendations": {"primary": "a"}, + } + (path / "facts.json").write_text(json.dumps(facts)) + (path / "snapshot.json").write_text(json.dumps(snapshot)) + env = {"ACQ_PROVIDER_INPUT_ROOT": str(root), "TEST_MODEL_KEY": "test-only"} + result = provider.load("CODEX", env) + self.assertEqual([m["id"] for m in result[1]], ["a", "b"]) + self.assertEqual(result[2], "a") + def test_argument_boundary_and_routing(self): launch.check_args(["exec", "--", "--config=secret", "--model", "unknown"], ["exact"]) for args in [ diff --git a/opencode-go-provider/README.md b/opencode-go-provider/README.md index eeac51f..5a103a9 100644 --- a/opencode-go-provider/README.md +++ b/opencode-go-provider/README.md @@ -285,7 +285,8 @@ catalog checks, so use a patched bindings file to exercise those). CI in this repository runs both the tests and the patched-bindings validation. `tests/schemas/acq-neutral-model-catalog.schema.json` is a verbatim copy of the -pinned Patterns schema, vendored so `npm test` can check catalog conformance +Patterns schema (currently ahead of the pinned release: it adds the optional +`reasoning` and `inputModalities` model fields), vendored so `npm test` can check catalog conformance offline. The authoritative check remains the validator run against the pinned Patterns release, which CI performs. diff --git a/opencode-go-provider/tests/schemas/acq-neutral-model-catalog.schema.json b/opencode-go-provider/tests/schemas/acq-neutral-model-catalog.schema.json index 5b84b89..76bce9d 100644 --- a/opencode-go-provider/tests/schemas/acq-neutral-model-catalog.schema.json +++ b/opencode-go-provider/tests/schemas/acq-neutral-model-catalog.schema.json @@ -114,6 +114,20 @@ "costAbove200kContext": { "$ref": "#/$defs/cost", "description": "Optional tiered pricing that applies when the input context window exceeds 200 000 tokens. Same per-million-token fields as cost. Consumers that do not support tiered pricing MUST fall back to cost." + }, + "reasoning": { + "type": "boolean", + "description": "Optional capability flag: whether the PROVIDER's gateway supports reasoning for this model. Absent means UNKNOWN (consumers MUST NOT assume either value); false means known-unsupported; true means known-supported. Producers MUST NOT infer it from the model id or name, and MUST NOT populate it from upstream-vendor data unless the gateway's behavior has been verified. The one sanctioned exception is a producer tool that copies upstream data only behind an explicit opt-in flag and labels the output's provenance as unverified; such output MUST NOT be committed or shipped until verified. It is a capability statement only: producers and the renderer emit no reasoning effort, budget, or other request setting, although a consuming harness may derive selectable options (for example OpenCode 1.x derives reasoning-effort variants from reasoning:true for openai-compatible models)." + }, + "inputModalities": { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string", + "enum": ["text", "image", "audio", "video", "pdf"] + }, + "description": "Optional capability list: input modalities the PROVIDER's gateway accepts for this model. Absent means UNKNOWN (consumers MUST NOT assume text-only or image-capable); [\"text\"] means known text-only. Producers MUST NOT infer it from the model id or name, and MUST NOT populate it from upstream-vendor data unless the gateway's behavior has been verified. The one sanctioned exception is a producer tool that copies upstream data only behind an explicit opt-in flag and labels the output's provenance as unverified; such output MUST NOT be committed or shipped until verified. The enum is a closed allowlist; a new modality requires a schema change." } } }, diff --git a/pi-coding-agent/README.md b/pi-coding-agent/README.md index dd73a34..4d77916 100644 --- a/pi-coding-agent/README.md +++ b/pi-coding-agent/README.md @@ -63,6 +63,8 @@ opt-in `--kit` mixin, not an acq-built-in agent. | `models[].maxOutputTokens` | output tokens | `models[].maxTokens` | | `models[].cost.{input,output,cacheRead,cacheWrite}` | USD/1M | same four fields; missing fields become `0` because pi's `ModelCost` requires all four | | `models[].costAbove200kContext` | USD/1M above 200k | `models[].cost.tiers = [{ inputTokensAbove: 200000, … }]` | +| `models[].inputModalities` | `text`, `image`, `audio`, `video`, `pdf` | `models[].input`, limited to `text` and `image` (in that order); other modalities are validated and dropped. A list with neither is omitted, so pi uses its text-only default | +| `models[].reasoning` | boolean capability flag | validated, **not emitted**: `reasoning: true` makes pi send thinking parameters, and the neutral flag only says the gateway supports reasoning, not that pi's request shape is accepted | The neutral field is named for context-window pricing and pi's tier is keyed to total request input; both are long-input thresholds at 200,000 tokens, and pi's diff --git a/pi-coding-agent/TROUBLESHOOTING.md b/pi-coding-agent/TROUBLESHOOTING.md index cce6f31..64a9fbc 100644 --- a/pi-coding-agent/TROUBLESHOOTING.md +++ b/pi-coding-agent/TROUBLESHOOTING.md @@ -142,6 +142,7 @@ it cannot trust. Read the exact message; each maps to one validation: | `baseUrl host does not match` / `modelsUrl host does not match` | URL host differs from `facts.host` (SSRF containment) | | `unsupported apiProtocol` | provider declares something other than `openai-compatible` | | `duplicate model` | catalog repeats a model id | +| `must be a boolean` / `must be a non-empty array` / `unsupported modality` / `duplicate modality` | a model's optional `reasoning` or `inputModalities` is malformed (see the neutral schema) | | `contains unsupported field` | input carries a field outside the neutral schemas | Do not work around these by editing `models.json` by hand; fix the provider diff --git a/pi-coding-agent/docs/decisions/0002-render-neutral-provider-input-into-pi-models-json.md b/pi-coding-agent/docs/decisions/0002-render-neutral-provider-input-into-pi-models-json.md index fc31ff7..ac43f11 100644 --- a/pi-coding-agent/docs/decisions/0002-render-neutral-provider-input-into-pi-models-json.md +++ b/pi-coding-agent/docs/decisions/0002-render-neutral-provider-input-into-pi-models-json.md @@ -74,10 +74,21 @@ providers and models from `~/.pi/agent/models.json` (or | `models[].contextWindow` | `models[].contextWindow` | | `models[].maxOutputTokens` | `models[].maxTokens` | | `cost.{input,output,cacheRead,cacheWrite}` | same fields, missing → `0` | + | `models[].inputModalities` | `models[].input` (`text`, `image` only) | + | `models[].reasoning` | validated, not emitted (see below) | pi's `ModelCost` requires all four cost fields. The neutral schema makes them optional, so absent values become `0` rather than failing the provider. + **Optional capability fields.** The neutral catalog also carries optional + `inputModalities` and `reasoning` (absent means unknown). The renderer + accepts both and still rejects malformed values. `inputModalities` maps to + pi's `input` for the two modalities pi can express (`text`, `image`); the rest + are dropped. `reasoning` is validated but not emitted: pi would start sending + thinking parameters on a flag that only states gateway support. Rejecting + these fields outright, as earlier revisions did, made the whole render fail + for any provider (such as `usai`) that publishes them. + The credential is a `$NAME` environment reference. acq injects the value at runtime; the renderer never sees or writes it. diff --git a/pi-coding-agent/files/home/pi-coding-agent-render-models.mjs b/pi-coding-agent/files/home/pi-coding-agent-render-models.mjs index 18dfe92..aaa4166 100755 --- a/pi-coding-agent/files/home/pi-coding-agent-render-models.mjs +++ b/pi-coding-agent/files/home/pi-coding-agent-render-models.mjs @@ -19,6 +19,9 @@ // models[].contextWindow -> models[].contextWindow // models[].maxOutputTokens -> models[].maxTokens // models[].cost -> models[].cost (all four fields required by pi) +// models[].reasoning -> validated (boolean), NOT emitted: pi would start sending +// thinking parameters the gateway is not verified to accept +// models[].inputModalities -> models[].input (text/image only; others dropped) // // A missing provider root is NOT an empty provider set: it means the acq // generation is not ready yet, so the existing models.json is left untouched. @@ -60,7 +63,11 @@ const API_PROTOCOLS = Object.freeze(Object.assign(Object.create(null), { export const COST_FIELDS = Object.freeze(["input", "output", "cacheRead", "cacheWrite"]) export const FACTS_FIELDS = new Set(["schemaVersion", "providerId", "apiProtocol", "host", "baseUrl", "modelsUrl", "keyEnv"]) export const CATALOG_FIELDS = new Set(["schemaVersion", "providerId", "models", "recommendations"]) -export const MODEL_FIELDS = new Set(["id", "name", "contextWindow", "maxOutputTokens", "cost", "costAbove200kContext"]) +export const MODEL_FIELDS = new Set(["id", "name", "contextWindow", "maxOutputTokens", "cost", "costAbove200kContext", "reasoning", "inputModalities"]) +// Closed neutral modality allowlist (mirrors the vendored catalog schema), and +// the subset pi's models.json can express. The rest are validated, then dropped. +export const NEUTRAL_MODALITIES = new Set(["text", "image", "audio", "video", "pdf"]) +const PI_INPUT_MODALITIES = ["text", "image"] const COST_FIELD_SET = new Set(COST_FIELDS) const RECOMMENDATION_ROLES = new Set(["primary", "small", "compaction", "summary", "title"]) @@ -121,6 +128,21 @@ function httpsUrl(value, label) { return url } +function piInputFor(value, label) { + if (!Array.isArray(value) || value.length === 0) throw new Error(`${label} must be a non-empty array`) + const seen = new Set() + for (const modality of value) { + if (typeof modality !== "string" || !NEUTRAL_MODALITIES.has(modality)) { + throw new Error(`${label} contains an unsupported modality`) + } + if (seen.has(modality)) throw new Error(`${label} contains a duplicate modality`) + seen.add(modality) + } + // Absent means unknown, and pi defaults it to text-only, so emit only what pi + // can express; a list with nothing pi understands is left to pi's default. + return PI_INPUT_MODALITIES.filter((modality) => seen.has(modality)) +} + function cost(value, label) { const source = object(value, label) rejectUnknownFields(source, COST_FIELD_SET, label) @@ -150,6 +172,14 @@ function renderModel(model, providerId) { if (source.maxOutputTokens !== undefined) { rendered.maxTokens = positiveInteger(source.maxOutputTokens, `output limit for '${reference}'`) } + // reasoning is validated but deliberately not rendered: see the header comment and ADR 0002. + if (source.reasoning !== undefined && typeof source.reasoning !== "boolean") { + throw new Error(`reasoning for '${reference}' must be a boolean`) + } + if (source.inputModalities !== undefined) { + const input = piInputFor(source.inputModalities, `input modalities for '${reference}'`) + if (input.length > 0) rendered.input = input + } if (source.cost !== undefined) rendered.cost = cost(source.cost, `cost for '${reference}'`) if (source.costAbove200kContext !== undefined) { // The neutral tier is "input above 200k tokens". pi's only tiered-pricing diff --git a/pi-coding-agent/tests/render-models.test.mjs b/pi-coding-agent/tests/render-models.test.mjs index 6e32b60..54b639f 100644 --- a/pi-coding-agent/tests/render-models.test.mjs +++ b/pi-coding-agent/tests/render-models.test.mjs @@ -10,7 +10,7 @@ import { fileURLToPath } from "node:url" import Ajv2020 from "ajv/dist/2020.js" import { parse as parseYaml } from "yaml" -import { applyModelsProjection, CATALOG_FIELDS, COST_FIELDS, FACTS_FIELDS, loadProviderInputs, MODEL_FIELDS, renderModels } from "../files/home/pi-coding-agent-render-models.mjs" +import { applyModelsProjection, CATALOG_FIELDS, COST_FIELDS, FACTS_FIELDS, loadProviderInputs, MODEL_FIELDS, NEUTRAL_MODALITIES, renderModels } from "../files/home/pi-coding-agent-render-models.mjs" const execFileAsync = promisify(execFile) const KIT_ROOT = fileURLToPath(new URL("..", import.meta.url)) @@ -399,6 +399,102 @@ test("defaults: name falls back to id, missing cost fields become 0, and unknown } }) +test("capability fields: inputModalities maps to pi input, reasoning is validated but not emitted", async () => { + const directory = await tempDir() + try { + const catalog = { + schemaVersion: "acq-neutral-model-catalog/v1", + providerId: "opencode-go", + models: [ + { id: "vision", inputModalities: ["text", "image"], reasoning: true }, + { id: "text-only", inputModalities: ["text"], reasoning: false }, + { id: "image-only", inputModalities: ["image"] }, + { id: "extra-modalities", inputModalities: ["pdf", "image", "audio", "video", "text"] }, + { id: "unrepresentable", inputModalities: ["audio", "pdf"] }, + { id: "unknown" }, + ], + } + const document = await renderedFor(directory, { catalog }) + const byId = Object.fromEntries(document.providers["opencode-go"].models.map((model) => [model.id, model])) + assert.deepEqual(byId.vision, { id: "vision", name: "vision", input: ["text", "image"] }) + assert.deepEqual(byId["text-only"], { id: "text-only", name: "text-only", input: ["text"] }) + assert.deepEqual(byId["image-only"].input, ["image"]) + assert.deepEqual(byId["extra-modalities"].input, ["text", "image"]) + assert.equal("input" in byId.unrepresentable, false) + assert.equal("input" in byId.unknown, false) + for (const model of Object.values(byId)) assert.equal("reasoning" in model, false) + await assertPiSchemaValid(document, "capability fields") + } finally { + await rm(directory, { recursive: true, force: true }) + } +}) + +test("capability fields fail closed on malformed values", async () => { + const directory = await tempDir() + try { + const bad = (model) => ({ schemaVersion: "acq-neutral-model-catalog/v1", providerId: "opencode-go", models: [model] }) + const cases = [ + [{ id: "m", reasoning: "yes" }, /reasoning for 'opencode-go\/m' must be a boolean/], + [{ id: "m", inputModalities: [] }, /must be a non-empty array/], + [{ id: "m", inputModalities: "text" }, /must be a non-empty array/], + [{ id: "m", inputModalities: ["text", "hologram"] }, /unsupported modality/], + [{ id: "m", inputModalities: [1] }, /unsupported modality/], + [{ id: "m", inputModalities: ["text", "text"] }, /duplicate modality/], + ] + for (const [index, [model, pattern]] of cases.entries()) { + await assert.rejects(renderedFor(path.join(directory, String(index)), { catalog: bad(model) }), pattern) + } + } finally { + await rm(directory, { recursive: true, force: true }) + } +}) + +test("a usai-shaped catalog with capability fields renders end to end", async () => { + const directory = await tempDir() + try { + const facts = { + schemaVersion: "acq-provider-facts/v1", + providerId: "usai", + apiProtocol: "openai-compatible", + host: "api.gsa.usai.gov", + baseUrl: "https://api.gsa.usai.gov/api/v1", + modelsUrl: "https://api.gsa.usai.gov/api/v1/models", + keyEnv: "USAI_API_KEY", + } + const catalog = { + schemaVersion: "acq-neutral-model-catalog/v1", + providerId: "usai", + models: [ + { + id: "claude-sonnet-5.5", + name: "Claude Sonnet 5.5", + contextWindow: 1000000, + maxOutputTokens: 128000, + cost: { input: 2, output: 10, cacheRead: 0.1, cacheWrite: 2.5 }, + inputModalities: ["text", "image"], + }, + { id: "claude-opus-5", contextWindow: 1000000 }, + ], + recommendations: { primary: "claude-sonnet-5.5" }, + } + const catalogSchema = await readJson(KIT_ROOT, "tests", "schemas", "acq-neutral-model-catalog.schema.json") + const ajv = new Ajv2020({ allErrors: true, strict: false }) + const validateCatalog = ajv.compile(catalogSchema) + assert.equal(validateCatalog(catalog), true, ajv.errorsText(validateCatalog.errors)) + + const root = await makeRoot(directory, { providerId: "usai", facts, catalog }) + const modelsFile = path.join(directory, "models.json") + await execFileAsync(process.execPath, [RENDERER, "--provider-root", root, "--models-file", modelsFile]) + const document = JSON.parse(await readFile(modelsFile, "utf8")) + assert.equal(document.providers.usai.apiKey, "$USAI_API_KEY") + assert.equal(document.providers.usai.models.length, 2) + assert.deepEqual(document.providers.usai.models[0].input, ["text", "image"]) + await assertPiSchemaValid(document, "usai") + } finally { + await rm(directory, { recursive: true, force: true }) + } +}) + test("neutral tiered pricing maps to a valid pi cost tier, with or without base cost", async () => { const directory = await tempDir() try { @@ -659,6 +755,7 @@ test("renderer field allowlists match the vendored neutral schemas", async () => assert.deepEqual([...CATALOG_FIELDS].sort(), Object.keys(catalogSchema.properties).sort()) assert.deepEqual([...MODEL_FIELDS].sort(), Object.keys(catalogSchema.$defs.model.properties).sort()) assert.deepEqual([...COST_FIELDS].sort(), Object.keys(catalogSchema.$defs.cost.properties).sort()) + assert.deepEqual([...NEUTRAL_MODALITIES].sort(), [...catalogSchema.$defs.model.properties.inputModalities.items.enum].sort()) }) test("CLI writes models.json, and a malformed generation exits non-zero", async () => { diff --git a/pi-coding-agent/tests/schemas/acq-neutral-model-catalog.schema.json b/pi-coding-agent/tests/schemas/acq-neutral-model-catalog.schema.json index 5b84b89..76bce9d 100644 --- a/pi-coding-agent/tests/schemas/acq-neutral-model-catalog.schema.json +++ b/pi-coding-agent/tests/schemas/acq-neutral-model-catalog.schema.json @@ -114,6 +114,20 @@ "costAbove200kContext": { "$ref": "#/$defs/cost", "description": "Optional tiered pricing that applies when the input context window exceeds 200 000 tokens. Same per-million-token fields as cost. Consumers that do not support tiered pricing MUST fall back to cost." + }, + "reasoning": { + "type": "boolean", + "description": "Optional capability flag: whether the PROVIDER's gateway supports reasoning for this model. Absent means UNKNOWN (consumers MUST NOT assume either value); false means known-unsupported; true means known-supported. Producers MUST NOT infer it from the model id or name, and MUST NOT populate it from upstream-vendor data unless the gateway's behavior has been verified. The one sanctioned exception is a producer tool that copies upstream data only behind an explicit opt-in flag and labels the output's provenance as unverified; such output MUST NOT be committed or shipped until verified. It is a capability statement only: producers and the renderer emit no reasoning effort, budget, or other request setting, although a consuming harness may derive selectable options (for example OpenCode 1.x derives reasoning-effort variants from reasoning:true for openai-compatible models)." + }, + "inputModalities": { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string", + "enum": ["text", "image", "audio", "video", "pdf"] + }, + "description": "Optional capability list: input modalities the PROVIDER's gateway accepts for this model. Absent means UNKNOWN (consumers MUST NOT assume text-only or image-capable); [\"text\"] means known text-only. Producers MUST NOT infer it from the model id or name, and MUST NOT populate it from upstream-vendor data unless the gateway's behavior has been verified. The one sanctioned exception is a producer tool that copies upstream data only behind an explicit opt-in flag and labels the output's provenance as unverified; such output MUST NOT be committed or shipped until verified. The enum is a closed allowlist; a new modality requires a schema change." } } }, From acc6e9f04e390b9de783c149257591d64425f8ed Mon Sep 17 00:00:00 2001 From: Bret Mogilefsky Date: Thu, 12 Nov 2026 20:44:20 +0000 Subject: [PATCH 2/2] docs(personal): record live plugin results and the Agent Office Paseo requirement On Paseo 0.15.0 five of six plugins installed; agent-office was refused with "requires Paseo >=0.15.2". Upgrading the CLI to 0.15.4 and re-running the installer installed it. Add a TROUBLESHOOTING entry and update the status text. Co-authored-by: OpenCode Agent --- README.md | 2 +- personal/README.md | 15 +++++++++++++-- personal/TROUBLESHOOTING.md | 27 +++++++++++++++++++++++++++ 3 files changed, 41 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 23974c4..cdf8e69 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ An agent kit is a `hybrid/v1` mixin that: | [`antigravity/`](antigravity/) | Agent | Pinned Google agy + private Gemini-to-Chat-Completions bridge | **Experimental** — real ARM64 CLI and isolated Paseo verified against synthetic provider; live gateway and x64 pending | | [`opencode-go-provider/`](opencode-go-provider/) | Provider | OpenCode Go (`openai-compatible`) facts and a 19-model neutral catalog | **Preview** — blocked on the acq credential-binding addition | | [`pi-coding-agent/`](pi-coding-agent/) | Agent | Pinned pi CLI + `~/.pi/agent/models.json` renderer | **Preview** — live verification pending acq PR 611 | -| [`personal/`](personal/) | Skill + startup step | The author's personal layer: `paseo-first-mate`, 27 pinned skills by [Matt Pocock](https://github.com/mattpocock/skills), and adapted offline [Diagram Design](personal/README.md#diagram-design). See [`personal/NOTICE`](personal/NOTICE) for credits. Installs six [pinned Paseo plugins](personal/README.md#paseo-plugins), including Emoji and Agent Office (one background command; `github.com` and `registry.npmjs.org` egress; needs the paseo kit; full list requires daemon/client 0.15.2+) | Offline-verified; earlier four-plugin installer live-tested on 0.12.0; Emoji/Agent Office not live-verified; Diagram Design browser export blocked pending provisioned runtime; no live `acq` run | +| [`personal/`](personal/) | Skill + startup step | The author's personal layer: `paseo-first-mate`, 27 pinned skills by [Matt Pocock](https://github.com/mattpocock/skills), and adapted offline [Diagram Design](personal/README.md#diagram-design). See [`personal/NOTICE`](personal/NOTICE) for credits. Installs six [pinned Paseo plugins](personal/README.md#paseo-plugins), including Emoji and Agent Office (one background command; `github.com` and `registry.npmjs.org` egress; needs the paseo kit; full list requires daemon/client 0.15.2+) | Offline-verified; live-run in an `acq` sandbox: five of six plugins install on Paseo 0.15.0, Agent Office needs 0.15.2+ (installed after upgrading to 0.15.4); Emoji/Agent Office UI not verified; Diagram Design browser export blocked pending provisioned runtime | **Preview status.** diff --git a/personal/README.md b/personal/README.md index 47c280c..6087c89 100644 --- a/personal/README.md +++ b/personal/README.md @@ -72,8 +72,19 @@ each new sandbox installs them again. **Compatibility and verification:** the full list now requires Paseo **0.15.2 or later** on both daemon and client for Agent Office. This kit does not upgrade -either runtime. Emoji and Agent Office were source-reviewed at these exact pins; -their installation and UI have not yet been live-verified. The earlier four-plugin +either runtime. Emoji and Agent Office were source-reviewed at these exact pins. +Live results from a real sandbox: + +- On Paseo **0.15.0** (what the paseo kit installed at the time), `quote-notes`, + `skills`, `mermaid`, `beautiful-chat` and `emoji` all installed and reported + `running`. `agent-office` was refused by the daemon with + `requires Paseo >=0.15.2. Your daemon is 0.15.0` and installed nothing; the other + five were unaffected. +- After upgrading the CLI to 0.15.4 and re-running `~/paseo-plugins-install.sh`, + `agent-office` installed. + +See [Agent Office needs a newer Paseo](TROUBLESHOOTING.md#agent-office-needs-a-newer-paseo). +Emoji and Agent Office UI behavior is still not verified. The earlier four-plugin installer run on Paseo 0.12.0 does not establish compatibility for these additions. **Mermaid and Beautiful Chat: switch one setting off, once per browser.** Beautiful Chat's diff --git a/personal/TROUBLESHOOTING.md b/personal/TROUBLESHOOTING.md index 608ff6d..51aacd9 100644 --- a/personal/TROUBLESHOOTING.md +++ b/personal/TROUBLESHOOTING.md @@ -13,6 +13,33 @@ full SHA, and `&dir=personal` is present. - **Start a new session.** Agents usually discover skills at startup. +## Agent Office needs a newer Paseo + +**Symptom:** `paseo plugin ls` shows five plugins but not `agent-office`, and +`~/.local/state/paseo/paseo-plugins.log` ends with: + +```text +Error: Request failed: Plugin "agent-office" requires Paseo >=0.15.2. Your daemon is 0.15.0. ... +paseo-plugins: agent-office FAILED to install from git:gyuha/agent-office after 3 attempts +``` + +**Cause:** the daemon is older than the plugin allows. This kit never upgrades +Paseo; the paseo kit's pinned CLI version decides what the sandbox gets. The other +plugins are unaffected, and the installer still exits 0. + +**Fix, in the running sandbox** (the paseo kit may put its own pin back on the next +sandbox start, so also raise the pin there): + +```bash +npm install -g --prefix "$HOME/.npm-global" --cache "$HOME/.npm" --ignore-scripts @getpaseo/cli@0.15.4 +paseo --version # 0.15.2 or later +paseo daemon restart +sh ~/paseo-plugins-install.sh +paseo plugin ls | grep agent-office +``` + +The client (desktop or web app) must also be 0.15.2 or later. + ## `first-mate-wait.sh: Permission denied` The scripts are declared `0755`. On sbx, every `files/` payload is first