mirror of
https://github.com/callstack/agent-device.git
synced 2026-09-14 20:06:34 +08:00
2ec4e91b11
* refactor(core): move the command descriptor registry into its own package `src/core/command-descriptor/`, `src/command-catalog.ts`, `src/core/wait-positionals.ts` and `src/core/parse-timeout.ts` move as git renames into a new private package `@agent-device/command-registry` (deps: contracts, selectors). One subpath per module points straight at the moved file; no `index.ts`, no re-export at the old path. Every consumer switches to the owning specifier. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Jqfa11D8QsCMuL17SsLvDz * test(host-kit): pin the command-registry package inside the daemon code graph The daemon reaches the registry and its catalog only by workspace specifier. A walk that stopped at the package boundary would report an unchanged signature after a descriptor edit, and the client would keep reusing a daemon running the superseded policy. The manifest is asserted beside the sources because its `exports` map is what chose them. The cache doc comment quoting the old ~800-module graph is corrected. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Jqfa11D8QsCMuL17SsLvDz * chore(gates): point the descriptor-registry gates at the package path R66's `COMMAND_DESCRIPTOR_MODULE`, R16's record-runtime join subject and the Fallow `AssertTrue` totality-guard key follow the registry to its package. The two descriptor hubs leave `HUB_ENTRY_FILES` because the package manifest now publishes them, so the eager-closure gate discovers them as facades and one entry gets one rule; this also flips `denyPlatformImplementations` from false (hub) to true (package entry) for both, which is intentional and stricter. `command-registry` joins the ranked spine at rank 1. No `APPROVED_OVER_CEILING` row: rename detection carries every moved entry's merge-base baseline, so all twelve fall under the no-growth rule rather than a ceiling. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Jqfa11D8QsCMuL17SsLvDz --------- Co-authored-by: Claude <noreply@anthropic.com>
Output-economy contract
This suite measures agent-facing output through existing formatters, response views, and a representative MCP tool result containing optimized text plus structured content.
- The committed baseline is the fast deterministic CI tripwire for raw bytes, line counts, actionable refs, hints, and response shape. Its byte/line budgets are compared with the merge-base baseline (or the first baseline introduced on the branch), so a PR cannot raise the ceiling it is measured against.
- The actionability floors keep refs, generation pins, warnings, retry signals, and recovery guidance from being optimized away.
- The help-conformance benchmark remains the non-gating small-model outcome oracle: byte reductions are not successful when the model needs an extra observation or chooses the wrong recovery command.
- The routine-workflow oracle (
routine-workflow.ts,routine-workflow.test.ts) is the gating workflow-level companion: one recorded checkout session (snapshot -i+ unchanged-snapshot suppression, two--settlemutations including the unchanged-interactive tail,get text, and an actionable settle timeout plus its in-session retry) reports total fixture bytes, command count, fallback-observation count, retry count, and whether the failure preserves the session. Its refs chain across steps and the counts derive from the real formatters, so dropping a settled diff's added refs, the unchanged-interactive tail, or a recovery handle (stable code, session,refsGeneration,retriable, hint) forces a fallback observation or drops a recovery field and fails the suite. The per-step response bytes are also tracked asworkflow.*surfaces in the committed baseline. Live device measurements stay informational. scripts/perf/remains the non-gating live signal for latency and failure rate across real devices. Its failure counts and error identities complement this deterministic contract.
Regenerate the reviewed baseline after an intentional reduction or new measured surface:
UPDATE_OUTPUT_ECONOMY_BASELINE=1 pnpm test:output-economy
An intentional semantic addition that raises bytes or lines needs an exact reviewed entry in
output-economy.waivers.json, including the resulting metric and a non-empty reason. The update
still fails if the measured result differs from that explicit waiver.