Files
callstack__agent-device/server.json
T

22 lines
574 B
JSON
Raw Normal View History

2026-05-11 17:28:04 +02:00
{
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
fix: update MCP registry namespace (#1618) * fix: update MCP registry namespace * feat: inherit MCP descriptions from CLI help * refactor: project command guidance per surface * refactor: make command guidance a single canonical description The guidance type carried seven fields, but only three were ever set, and all twenty call sites used it the same way: to hold a second, hand-written MCP string next to a near-identical CLI one. That is the drift the abstraction was meant to remove, so the type no longer offers a per-surface description at all. A command now has one canonical description plus an optional tail per surface: guidance: { description: 'Shared body.', cliDetail: 'Flags, positional syntax, terminal examples.', mcpDetail: 'When-to-use and sequencing hints.', } Because a surface can only append, CLI help and MCP tool text cannot diverge — the guard against CLI syntax in MCP descriptions becomes structural rather than a review tripwire, since flag vocabulary only lives in cliDetail. All twenty commands that previously carried two descriptions now share one body. Also: - Drop `summary` from the description fallback chain. It is the short list-view line, so falling back to it replaced the full description with a fragment on both surfaces: artifacts, boot, and shutdown each lost their real description. - Stop writing the MCP variant back over `metadata.description`. That field feeds CLI help, `explain`, and docs; `explain` was printing MCP-only text. MCP now reads a separate `mcpDescription`. - Drop `mcp.parameters`. It restated inputSchema property descriptions inside the tool description — 1232 characters duplicated verbatim across six tools, and three of sixteen declared hints silently rendered nothing because the property had no description. Those properties are documented in the schema instead, which serves MCP, --help, and docs at once. - Drop `cli.flags`. Its one use appended "Relevant flags: --surface, --launch-console." to help text that already named both flags inline. Tests assert the structural property (both surfaces share a canonical prefix) and the summary-fallback regression, alongside the existing CLI-syntax guard. CLI help wording assertions follow the new copy. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Dp3J8UUgYxtw5vzJzvjkSf * test: gate undocumented MCP tool inputs Guidance no longer restates input fields in prose, so a tool's inputSchema is the only place its inputs are documented — for the model, for --help, and for the docs site. An undescribed property is a silent gap rather than a cosmetic one, which is exactly the failure mode the removed `mcp.parameters` selection had: it dropped hints for properties that carried no description and reported nothing. Describe the two trigger-app-event inputs that mechanism used to name, and add a ratcheting gate over every MCP tool input. A property key that is not already in the budget fails immediately; the total may never grow, and lowering it is required once properties gain descriptions, so the 132 remaining stay visible instead of settling in as permanent debt. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Dp3J8UUgYxtw5vzJzvjkSf * fix: project the canonical description to every surface Storing only the MCP variant left the shared body unpropagated: `metadata.description` and the executable definition kept their pre-guidance text, so `explain click` reported "Click or tap a semantic UI target..." while CLI help and the MCP tool both used the canonical "Activate a UI target...". 53 commands were affected — the CLI schema base, `explain`, and docs all read `metadata.description`. `projectCommandGuidance` now returns the canonical body plus the MCP-only tail, and `defineCommandFacet` writes the body to both metadata and the definition. Only the tail is stored apart, as `mcpDetail`, so the body has exactly one home instead of a second full copy that could drift; `composeMcpDescription` joins them for the tool surface. The surface gate pins the invariant: definition, metadata, and `explain` must report the identical body, and neither CLI help nor the MCP description may do anything but extend it. Both arms verified by breaking them. Also replace the undocumented-input ratchet's bare-key allowlist plus aggregate budget with exact `tool.property` identities. The old shape stayed green while a gap migrated: describing `foo.text` and adding an undescribed `bar.text` left both the allowed-name set and the total of 132 unchanged, and stale names kept authorizing later gaps. Verified with that exact scenario — `app` was already an allowed name via push/reinstall/settings and the total held at 132, yet a newly undescribed `open.app` now fails. Recording a fix requires deleting its baseline entry. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Dp3J8UUgYxtw5vzJzvjkSf * refactor: drop guidance.description in favour of the command's own `guidance.description` restated what `metadata.description` already is. Setting it shadowed the metadata literal rather than replacing it, so every command that used it shipped two bodies: the canonical one and a terse original that no surface could observe — 768 bytes of unreachable strings across 20 commands. Move each canonical body to the metadata literal where it belongs and delete the field. Guidance is now tails only, `cliDetail` and `mcpDetail`, which also removes the question of where a body is written: there is one place, and no chain to consult. Three guidance blocks held nothing else and are gone entirely. registry.js drops 1117 bytes. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Dp3J8UUgYxtw5vzJzvjkSf * refactor: give every command one text block with a mandatory summary The CLI carried four prose fields with a fallback chain between them, and one of them — `helpDescription` — was authored on 45 commands and generated on the rest. That ambiguity is why surfaces drifted: whichever field a reader looked at, some other field might be the one actually rendered. Prose now lives in a single `CommandText`, and `CommandSchema` keeps only grammar: summary what is this command, in a list of ninety? (mandatory) description what does it do, and when do I reach for it? (mandatory) cliDetail flags, argument shapes, terminal examples mcpDetail sequencing and cross-tool hints `--help`, the command list, the MCP tool description and `explain` are projections computed where they render, so nothing derived is stored and no field can be both input and output. The four-field model was validated against the whole surface before the migration: all 67 commands reproduce their MCP text exactly and derive their help body from `description`, so none needed a fifth field. Making `summary` mandatory fixes a regression this branch introduced. 23 commands had none, so the command list fell back to the full detail paragraph; lengthening those descriptions earlier turned `click`'s list entry from 61 characters into 267, `fill`'s into 214, `devices`' into 159. Every command now states its own line, and a gate holds them under 72 characters, non-empty, period-free, and distinct from the description. Two duplications go with it: the per-command help printed its synopsis twice, once as a header and again under `Usage:`, and `press` said "use longpress" in both its body and its tail. * refactor: tighten the command text plumbing Self-review follow-ups on the text model, all quality-only: `command-text.ts` moves from `cli-schema/` to `commands/`. It is a command concept that MCP reads as much as the CLI does; living under `cli-schema` made the MCP surface import a CLI module to render its own tool descriptions. `defineCommandFacet` no longer casts. It took a facet and returned it with the schema completed, but claimed to return the input type, which needed `as unknown as` — a double cast is the type system reporting that the signature was wrong. Splitting `CommandFacetInput` from `CommandFacet` states the completion in the return type, so both that cast and the registry's `as CommandSchema` go. `push`'s summary duplicated its description apart from a trailing period, which the gate missed by comparing exact strings; it now compares normalised text, and the summary says something the description does not. `install-from-source`'s summary loses a clause it did not need. --------- Co-authored-by: Claude <noreply@anthropic.com>
2026-08-05 18:51:21 +02:00
"name": "io.github.callstack/agent-device",
2026-05-11 17:28:04 +02:00
"title": "agent-device",
2026-05-18 15:56:36 +02:00
"description": "Let AI agents inspect, control, and debug real iOS, Android, desktop, and TV apps",
2026-05-11 17:28:04 +02:00
"repository": {
"url": "https://github.com/callstack/agent-device",
2026-05-11 17:28:04 +02:00
"source": "github"
},
2026-08-11 11:57:42 +02:00
"version": "0.20.8",
2026-05-11 17:28:04 +02:00
"packages": [
{
"registryType": "npm",
"identifier": "agent-device",
2026-08-11 11:57:42 +02:00
"version": "0.20.8",
2026-05-11 17:28:04 +02:00
"transport": {
"type": "stdio"
}
}
]
}