Files
openrig-studio/package.json
T
mvschwarzandClaude Opus 5 9b322f6ae2 Advertise focus and drive, so feature detection stops lying
An independent cold build of v0.7.0 — fresh clone, documentation only, no contact
with me — found three things. The first is the one that matters and it is the
worst class this repository deals in.

FOCUS AND DRIVE ANSWERED WITHOUT BEING ADVERTISED. Both verbs worked, both were
documented, and neither namespace appeared in /api/contract's capabilities. But
contract-meta.md tells every consumer that each namespace it uses must appear
there and to CHECK BEFORE USE — so an agent doing exactly what the contract
instructs concluded the features were absent. A verb that answers without
advertising is worse than a missing verb: the documented path leads to the wrong
answer, and the consumer has no reason to doubt it.

This was mine, and it was pattern-matching rather than reasoning. When drive
shipped I checked whether focus had declared a capability, found none, and made
drive match it for consistency. Consistency with an omission.

Read and write are separate entries because they are separately true, which is
what files.read has always meant, and it lets a runtime offer read-only focus
honestly instead of claiming a namespace it half-implements.

TWO GUARDS HAD TO BE LOOSENED, AND THAT IS THE INTERESTING PART. Both asserted
the capability set was EXACTLY equal to a baseline. True when written, wrong as a
rule: capabilities is the feature-detection list, so it must grow when a namespace
ships or it can never advertise anything. Equality there would have blocked this
very fix — a guard that reads as strictness and is actually a rule that no feature
may ever be declared. Both now assert the additive property that was meant:
capabilities MAY GAIN, NEVER LOSE, since a consumer gates on them. Verified by
planting a removal and watching both fail.

One of those loops was written backwards first — iterating the current runtime and
requiring the baseline to contain each, which reads identically and asserts the
opposite. Caught because the suite failed, not because it looked wrong.

A guard now compares the documented capability list against the served one, and a
second asserts every namespace with a served route is advertised. Neither existed:
measured first, the parity suite passed at 4/4 with a capability deleted from the
documented example, because the comparator descends objects and capabilities is an
array. Capabilities are shape, not data — the rest of the arrays in that response
are counts and errors and differ by design — so they get a named check rather than
a general array descent.

Also: POST /api/focus's response shape is now documented rather than inferred from
a readback, and the generated project's run snippet no longer omits --surfaces,
without which the new surface never reaches the rail and looks like a broken row.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
2026-08-04 20:47:26 -07:00

16 lines
446 B
JSON

{
"name": "@openrig/studio",
"version": "0.7.1",
"description": "SDK for building agent-driven mini-apps: thin surfaces paired with agents, running in a shared shell.",
"type": "module",
"scripts": {
"start": "node app/serve-studio.mjs",
"create": "node create-studio/index.mjs",
"test": "node --test 'create-studio/test/*.test.mjs' 'test/*.test.mjs'"
},
"engines": {
"node": ">=18"
},
"license": "Apache-2.0"
}