Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -65,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.**

Expand Down
30 changes: 30 additions & 0 deletions antigravity/tests/test_antigravity.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import importlib
import json
import sys
import tempfile
import unittest
import urllib.error
import urllib.request
Expand All @@ -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(
{
Expand Down
13 changes: 13 additions & 0 deletions claude-code/tests/test_claude_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
29 changes: 29 additions & 0 deletions codex/tests/test_codex.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 [
Expand Down
3 changes: 2 additions & 1 deletion opencode-go-provider/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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."
}
}
},
Expand Down
15 changes: 13 additions & 2 deletions personal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
27 changes: 27 additions & 0 deletions personal/TROUBLESHOOTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions pi-coding-agent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions pi-coding-agent/TROUBLESHOOTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
32 changes: 31 additions & 1 deletion pi-coding-agent/files/home/pi-coding-agent-render-models.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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"])

Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
Loading
Loading