Repository navigation
Closed
Labels
enhancementNew feature or requesthost-integrationAgent host capabilities, projection, discovery, and lifecycle
Description
Why
Real-host usage exposed Cursor conformance defects (#126, #127) that build-time validation should have caught. Research across Cursor's official surface, the validator ecosystem, and TraceDecay's working implementation (the layered build/install/doctor pattern) yields a concrete adoption plan. This feeds #100 (capability evidence), #101 (read-only Doctor), and #108 (target-aware Skills).
Build-time validation to integrate (structure)
- Vendor pinned schemas by commit and validate every EMITTED (rendered, not source) manifest/config against them with ajv + ajv-formats in adapter fixture tests, each with malformed negative-case fixtures so a permissive schema cannot pass vacuously:
- Cursor Plugin manifest: https://raw.githubusercontent.com/cursor/plugins/main/schemas/plugin.schema.json (strict,
additionalProperties: false; watch documented schema/doc drift —create-plugin-scaffolddocuments unsupportedmarketplace.jsonmetadata fields cursor/plugins#281) and marketplace.schema.json. - Portable Agent Plugin manifest: https://agent-plugins.org/schemas/1.0.0/plugin.schema.json (closed schema; skills+MCP only). Never emit a hybrid of the two Cursor contracts.
- Claude Code plugin.json / hooks.json: SchemaStore schemas + parity with
claude plugin validate --strictwhere the CLI is available. - Codex
agents/openai.yaml+ hooks: SchemaStore schemas;codex app-server generate-json-schemapiped to ajv where the CLI is available.
- Cursor Plugin manifest: https://raw.githubusercontent.com/cursor/plugins/main/schemas/plugin.schema.json (strict,
- Agent Skills frontmatter:
@skill-tools/core(npm) for spec lint; note the spec pins the Pythonskills-refreference validator and has no official frontmatter JSON schema — treat spec text as authoritative. (npm naming traps:skills-refandskill-validatoron npm are squatted, unrelated packages.) - Layout resolution like the host: stage the final deploy tree and verify every manifest-declared path resolves with no absolute paths or
..; containment after symlink resolution; flat plugin-skill scan (Cursor does not recurse); folder-name == frontmatter-name; unique deploy paths; UTF-8; deterministic ordering; no unresolved placeholders; every${VAR}in mcp.json declared in the manifestvariablesschema. - Root tokens per contract:
${CURSOR_PLUGIN_ROOT}(Cursor Plugin hooks),${PLUGIN_ROOT}/${PLUGIN_DATA}(portable, args/env/cwd only) — never cross-contract.
Behavior validation (CI, opt-in lane)
- MCP:
@modelcontextprotocol/conformanceofficial suite,--spec-version 2025-11-25, against generated servers. - Host-native fixture replay stays the pattern for hooks (checked-in real event fixtures, typed unavailable for missing evidence — TraceDecay's model).
Install-time / doctor (feeds #101 stage 1)
- TraceDecay's layered pattern is the reference: emitted artifact manifest with per-file digests at build; read-only doctor checks discovery path, manifest parse/schema, component pointers, inventory + digests, MCP command/args existence, exact hook wiring, host activation state, version drift (a loading plugin can still be stale), and recent host logs for spawn/placeholder failures. Typed findings (current/stale/drifted/missing/corrupt/unsupported/activation-required), never repairs.
- Cursor specifics: local plugins load only from a real directory under
~/.cursor/plugins/local(staff-confirmed: symlinks resolving outside are rejected; docs saying otherwise are wrong) oragent --plugin-dir; loader failures can be SILENT (skipped plugins report failures=0), so doctor must not rely on host error surfaces.
Sequencing
- Cursor pinned-schema fixture validation rides the Cursor target artifacts don't match how Cursor actually loads local plugins (manifest location, hooks doc collision, root tokens) #126/Cursor install instruction 'clone (or symlink)' fails: Cursor rejects local-plugin symlinks resolving outside ~/.cursor/plugins/local #127 fix (in flight).
- Claude/Codex schema vendoring + Agent Skills lint: with Compile target-aware Skills with host frontmatter and interpolation #108's Skill IR work.
- MCP conformance CI lane: with Build a real RSC Agent Document renderer with streaming semantics #96/Compile filesystem routes into the Agent Bundle meta-framework #93 generated-server landings.
- Doctor integration: Add safe managed lifecycle for generated host bundles #101 stage 1.
Research provenance: three-agent web/local research pass, 2026-08-31; TraceDecay checkout at /fast/projects/tracedecay (descriptor contracts, schema self-tests, transactional install verification, read-only doctor) and its known-loading Cursor plugin as ground truth.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requesthost-integrationAgent host capabilities, projection, discovery, and lifecycle
Activity
ScriptedAlchemy commentedon Sep 1, 2026
Implemented the Claude real-host validation slice in #193: bounded
claude plugin validate <dir> --strict, typed AB warning/error/unavailable diagnostics, CLI strict policy, capability evidence, and a real packed--plugin-dirregistration proof on Claude Code 2.1.251.claude plugin detailsinventory/token projection remains intentionally deferred to #187 because token costing is host-owned and should not be partially reimplemented.ScriptedAlchemy commentedon Sep 1, 2026
#218 adds the missing runtime half of conformance: emitted manifest schemas alone would not catch MCP result-schema drift, older/newer server-client skew, stale installed/running versions, or live progress hidden until terminal settlement. Please treat its serialized round-trip and installed-host lifecycle cases as acceptance criteria for this issue's build/doctor layers.
ScriptedAlchemy commentedon Sep 2, 2026
Scope boundary with #218, now that its stage 1 is starting: this issue keeps every check that can pass on bytes at rest — pinned ecosystem schemas over rendered manifests/configs with malformed negative fixtures, skills frontmatter lint, layout resolution/containment and root-token rules, the
@modelcontextprotocol/conformanceCI lane, and doctor's static findings (#236/#243, #193 already landed against this issue).#218 takes every check that requires a live exchange or a spawned process: serialized results round-tripped through the exact runtime
resultSchemavalidators, the additive-field/version-skew matrix, stateful lifecycle replay (live progress before terminal, restart durability), and the source/artifact/installed/running version quadruple.Doctor remains the shared reporting surface: this issue feeds it static findings; #218 adds the runtime/running-process lane. Per the earlier comment here, #218's serialized round-trip and installed-host lifecycle cases stay acceptance criteria for this issue's build/doctor layers — neither issue's suite may claim the other's evidence.
ScriptedAlchemy commentedon Sep 2, 2026
Evaluated Effect v4 Schema (with
Schema.toType/Schema.toEncodedprojections, per the v4 projections docs) as a candidate for the wire-contract seams — declined for the rc.112 cycle; recorded indocs/effect-conventions.mdvia #286 (merged as d6b5386), mirroring the@effect/platform-nodeprecedent (#271).Short version, relevant to this issue's pinned-schemas scope:
packages/agent-bundle/src/contracts/*is JSON-plain (string timestamps, no transformations), so the encoded and type sides are structurally identical andtoType/toEncodedare near-identity. The actual dual maintenance (contract types + hand-written Workbench decoders) is a single-source-of-truth problem the pinned zod already solves withz.infer.onExcessProperty: "error", default"ignore"), not schema-carried likez.strictObject— the wrong shape after the feat(identity): derive package name/version into project identity (stages 1-2) #121 exact-key regression.Seam inventory from the eval, for whoever picks up schema single-sourcing here: zod strict decoders in 9 Workbench client modules plus server-side
events/ipc.ts(#209) andevents/projection.ts(#279 envelope); hand-rolled exact-key guards inruntime-client,artifact-client,comparison-client, and the threemcp/*clients; hand-rolled diagnostics inconfig/validate.ts;node:utilparseArgsfor CLI args. Revisit Schema at Effect GA or on the first contract that genuinely diverges between encoded and decoded sides.Merge pull request #326 from ScriptedAlchemy/wave/133-codex-validator
Merge pull request #327 from ScriptedAlchemy/wave/133-cursor-validator
ScriptedAlchemy commentedon Sep 2, 2026
Stage 1 landed — Codex + Cursor ecosystem validators (#326 merged as 6370e7d, #327 merged as f5721e6), completing the per-ecosystem host-validator roster this issue started with the Claude slice (#193).
Honesty posture, with dated real-binary evidence (2026-09-02):
validateCodexPlugin, AB6030–AB6033): codex-cli 0.147.0 publishes install/marketplace verbs but no plugin-validate command — recorded in capability evidence; the validator says so on every report and validates.codex-plugin/plugin.json,hooks/hooks.json,.mcp.json, and the marketplace manifest against the vendored pinned schemas with malformed negative fixtures.codex app-server generate-json-schemawas exercised for the pinned drift lane: observed 0.147.0 emits 285 app-server protocol schemas and none of the pinned hook command schemas, so that case reports as evidence-backed unassessable info (strict-independent), never a fake drift warning; genuine hash drift on comparable files stays warning / strict-error. Live and pinned hashes are recorded incapabilities/codex-0.147.0.json.validateCursorPlugin, AB6026–AB6029): cursor-agent 2026.08.31-4057e58 exposes no plugin-validate verb (--help+plugin --helpcaptured); every report carries the transparency info naming the vendored pin (cursor/plugins@0701892). Local bytes-at-rest checks: strict pinned-schema validation (plugin/mcp/hooks/marketplace, each with unknown-key negative fixtures), manifest-candidate precedence, symlink realpath containment (mirroring the pinned loader's realpath rejection), and${CURSOR_PLUGIN_ROOT}restricted to the loader-substituted fields pinned inmcp.pathTokens+ hook commands (incl. streamable-httpurl/headers). CLI absence never gates the local checks.Both are wired into
validate({ hostValidation })alongside the Claude validator (union report type), exported from the public and test APIs, registered indocs/diagnostics.md, and shipped with minor changesets. Gates ran locally on the final rebases: build/typecheck green, lint 0 errors 0 warnings, unit pools 2583 and 2607 passed with 0 failures.Remaining scope, staged next: Agent Skills spec lint + the
@modelcontextprotocol/conformanceCI lane, then doctor static-findings integration.Merge pull request #334 from ScriptedAlchemy/wave/133-skills-lint
Merge pull request #338 from ScriptedAlchemy/wave/133-mcp-conformance
ScriptedAlchemy commentedon Sep 2, 2026
Stage 2 landed — skills spec lint + the official MCP conformance CI lane (#334 merged as fb25f47, #338 merged as 3c3daba).
@skill-tools/[email protected]was evaluated for real on 2026-09-02 — it is genuine (github.com/skill-tools/skill-tools, not one of the npm squats this issue warns about) but lower fidelity than the pinned contract: no pinned spec revision, an internally inconsistent description-length warning, open frontmatter where the pinned schema is closed, and name/directory mismatch downgraded to a warning. Verdictnot-integrated-lower-fidelity, recorded in full (npm metadata, tarball sha1/integrity, 17 observed rule ids, six limitations) inschemas/agent-skills/PROVENANCE.jsonand pinned by test. The one mandatory spec rule the evaluation surfaced as missing — a nonempty Markdown instruction body after frontmatter — is now enforced natively at artifact validation asAB6034with a negative fixture.@modelcontextprotocol/[email protected]active suite at--spec-version 2025-11-25runs against a server built by the real pipeline — the generated stdio artifact stays untouched behind a loopback streamable-HTTP bridge that owns only transport and lifecycle. Recorded run (2026-09-02, repeated on the landing rebase): 30 scenarios, 7 passed, 23 expected failures (each a dated baseline entry: 3 genuinely unsupported optional operation families — completion/complete, logging/setLevel, resource subscribe/unsubscribe — plus canonicaltest_*fixtures the reused harness doesn't provide), 0 skipped, 0 unexpected; the runner rejects stale baseline entries. Strictly opt-in: manually dispatched workflow + env-gated script, excluded from all default pools, per the Generate an Agent Bundle framework test harness on top of Rstest #103 cost rule and the native-host-smoke posture.Both landed with local gates on their final rebases: lint 0/0, unit pools 2615 passed / 0 failed, and one real conformance-lane pass. Remaining scope: doctor static-findings integration (in flight).
Merge pull request #340 from ScriptedAlchemy/wave/133-doctor-static
ScriptedAlchemy commentedon Sep 2, 2026
Closing: the bytes-at-rest scope this issue retained under the #218 scope split is delivered. Evidence roster (all gates run locally on each landing rebase — build, typecheck,
rslint0/0, full unit pools 0 failures):Landed this wave (wave/133- lanes):*
validateCodexPluginmirrors feat(claude): validate artifacts with host devtools #193: bounded probes, vendored pinned-schema validation of all four Codex documents with malformed negative fixtures, AB6030–AB6033. Dated evidence (2026-09-02, codex-cli 0.147.0): no plugin-validate verb exists;app-server generate-json-schemaemits the app-server protocol surface (285 files, hashes recorded), none of the pinned hook schemas — reported as evidence-backed unassessable info, never a fake drift signal.validateCursorPlugin: dated proof (2026-09-02, cursor-agent 2026.08.31-4057e58) that no plugin-validate verb exists; every report names the vendored pin (cursor/plugins@0701892); strict pinned-schema checks with unknown-key negative fixtures; loader rules each backed by a pinned evidence line (manifest precedence, symlink realpath containment,${CURSOR_PLUGIN_ROOT}limited to the pinned substitution fields incl. streamable-http url/headers). AB6026–AB6029.@skill-tools/[email protected]evaluated for real (genuine package, tarball hashed, 17 rule ids enumerated) and honestly NOT integrated — verdictnot-integrated-lower-fidelitywith six recorded limitations, pinned inschemas/agent-skills/PROVENANCE.json. The one missing mandatory spec rule (nonempty instruction body) enforced natively as AB6034 with a negative fixture.@modelcontextprotocol/[email protected],--suite active --spec-version 2025-11-25, against a generated route server behind a loopback streamable-HTTP bridge that leaves the stdio artifact untouched. Recorded runs (2026-09-02, twice incl. the landing rebase): 30 scenarios — 7 passed, 23 dated expected-failure baseline entries (3 genuinely unsupported optional operation families + canonical fixture gaps), 0 skipped, 0 unexpected; the runner rejects stale baseline entries. Strictly opt-in (manual dispatch + env gate) per the cost rule.--fromhost trees validated against pinned document schemas (AB7319,corrupton error), installed Cursor plugins validated flavor-honestly (full pinned lane for.cursor-pluginmanifests; loader-accepted.claude-plugin/plugin.jsonflavors — incl. the portable: adopt Agent Plugins 1.0.0 as the pinned portable contract #306 portable proof — stayinstalledwith an honest info; symlink containment enforced against~/.cursor/plugins/localexactly as the loader pins it) — AB7320. No CLI spawns, no repairs, no wire-contract change.Previously landed against this issue's scope: #193 (Claude devtools validation), the pinned-schema fixture validation and layout/containment/root-token rules in
validate-artifact*(AB6011/AB6012/AB6014 et al.), per-host vendored schemas with PROVENANCE hashes, #306 (portable pinned to Agent Plugins 1.0.0), and the #236/#243 read-only doctor this wave extends.Acceptance criteria from the scope split (posted here earlier): #218's serialized round-trip and installed-host lifecycle cases are landed and green on main — contract matrix stage 1 (#272), stateful lifecycle replay (#309), and the installed-host contract matrix (#311). Neither issue's suite claims the other's evidence: this issue's validators are bytes-at-rest only; every live-exchange check lives in the #218 lanes.
Stage comments above carry the per-stage detail. Follow-up opportunity recorded on #338: add canonical-shaped conformance routes to shrink the fixture-gap portion of the expected-failures baseline.