Skip to content

Refresh Cursor plugin contract coverage against current public docs #189

Closed

Description

@ScriptedAlchemy

Summary

The Cursor adapter is pinned to the full Cursor Plugin contract from PR #131, but Cursor's public plugin reference now documents additional surfaces and exposes at least one incorrect capability claim in the current table. Track those deltas as one host umbrella under #100/#107.

Observed 2026-09-01:

Confirmed mismatch

adapters/capabilities/cursor-2026-08-28.json and cursor.ts mark marketplace support unavailable, while the public reference defines .cursor-plugin/marketplace.json for multi-plugin repositories, its fields, component overrides, and merge/resolution behavior.

workspaceOpen is marked supported as a canonical route, but its native contract is distinct: it fires outside an agent session, omits conversation fields, and returns pluginPaths. The current shared Cursor wrapper/result vocabulary does not model that output. Do not retain a supported claim without a fixture proving the actual envelope.

The running SubagentStart/SubagentStop correction lane remains authoritative for those two events.

Checklist

Every item must become implemented, credited to an active lane, or explicitly unavailable/deferred in the capability table with a reason.

Plugin formats and components

  • Record both formats explicitly: portable Agent Plugin (plugin.json, skills/MCP) and full Cursor Plugin (.cursor-plugin/plugin.json)
  • Full Cursor Plugin metadata, minClientVersions, logo/assets, category/tags/publisher where schema-supported
  • Rules, agents, and commands discovery/path lowering (already in Compile capability-aware host component bundles #100 stage 3; Cursor rules first)
  • Complete variables schema and secret-value separation; every ${VAR} used by MCP config declared
  • Default discovery versus manifest replacement for skills/rules/agents/commands/hooks/MCP/root SKILL.md
  • .cursor-plugin/marketplace.json schema, max entries, entry component overrides, manifest merge precedence, and resolution
  • Marketplace install modes (Default Off, Default On, Required), scope/access, local-import admin control, Git auto-refresh, and manual review/publish flow
  • Local physical install under ~/.cursor/plugins/local, while preserving PR fix(cursor): conform local plugin artifacts to real host #131's realpath/symlink safety finding

Hooks

  • Pin all documented Agent events: sessionStart, sessionEnd, preToolUse, postToolUse, postToolUseFailure, subagentStart, subagentStop, beforeShellExecution, afterShellExecution, beforeMCPExecution, afterMCPExecution, beforeReadFile, afterFileEdit, beforeSubmitPrompt, preCompact, stop, afterAgentResponse, afterAgentThought
  • Pin Tab events beforeTabFileRead/afterTabFileEdit and app event workspaceOpen
  • Model cloud-agent event/handler availability separately from desktop/CLI availability
  • Support or explicitly reject prompt hooks, failClosed, loop_limit, timeout, and matcher semantics by event
  • Correct workspaceOpen input/output (pluginPaths) and prove it independently of agent-session wrappers
  • Treat shell/MCP/read/edit specialty hooks as selector-rich native variants of canonical tool routes where semantics align; otherwise record why a dedicated route family is required
  • Keep response/thought and Tab events deferred unless a canonical consumer need is accepted; capability rows must still name them

Acceptance

  • The marketplace capability claim matches the public reference.
  • Every documented Cursor component and hook event has a supported/degraded/unavailable/prohibited state with dated evidence.
  • workspaceOpen, subagent lifecycle, and tool lifecycle each have native fixture replay using their actual distinct payloads and output channels.
  • No Agent Plugin and Cursor Plugin paths/tokens are mixed.

Related: #107 #100 #97 #101 #108 #131 #133 #181

Activity

  1. added
    bug
    enhancement
    meta-framework
    host-integration
    on Sep 1, 2026
  2. ScriptedAlchemy commented on Sep 1, 2026

    @ScriptedAlchemy
    OwnerAuthor

    The public Plugins overview also advertises prebuilt plugin canvases, but the Cursor Plugin manifest/reference read on 2026-09-01 does not define a canvas component field or file contract. Add an explicit unavailable/deferred capability row for plugin canvases until Cursor publishes a schema-backed authoring contract; do not infer one from marketplace examples.

    Source: https://cursor.com/docs/plugins (read 2026-09-01).

  3. ScriptedAlchemy commented on Sep 1, 2026

    @ScriptedAlchemy
    OwnerAuthor

    Two of the confirmed mismatches are corrected on main by #221 (merged as 49281f1):

    Marketplace — corrected to supported with pinned evidence. .cursor-plugin/marketplace.json is real: schemas/marketplace.schema.json exists in cursor/plugins at the exact commit #131 pinned for the plugin schema (070189284e702e8a4d2e3cc8913994b204c5337a). The official schema is now vendored (sha256 1aae96a24c2796419933bc8bfe3a1255394e7199c35740b36325e0ce6dbc253d, recorded in schemas/cursor/PROVENANCE.json), the cursor target and the unified bundle emit a schema-validated marketplace document when marketplace: true, and the capability row is supported. This checks off the marketplace acceptance criterion; the broader marketplace items (max entries, component overrides, merge precedence, install modes, Git auto-refresh) remain open for the umbrella.

    workspaceOpen — supported claim removed. Per this issue's requirement not to retain a supported claim without a fixture proving the actual envelope: the native contract is sessionless (no session/conversation fields) and its response must return pluginPaths; both generated Cursor wrappers hard-require session_id/conversation_id on stdin and have no pluginPaths output channel. workspace/open is now unavailable on Cursor with that exact reason in cursor-2026-08-28.json, a plain workspaceOpen hook now produces a cursor.hook.event.workspace-open diagnostic instead of silently lowering a broken wrapper, and the event-family matrix in the example README is corrected. A future native fixture replay of the real sessionless envelope can re-admit it honestly.

    Also fixed in the same PR (from the #173 review thread): the unified plugin adapter's composite capabilities now intersect Cursor alongside Claude and Codex — event families fail closed on table divergence, and the composite metadata fingerprint covers all three host pins.

    Checklist impact: “.cursor-plugin/marketplace.json schema” is now schema-pinned and emitted; “Correct workspaceOpen input/output (pluginPaths)” is resolved as explicit unavailable with the documented reason (native fixture replay still outstanding before any supported claim).

  4. ScriptedAlchemy commented on Sep 2, 2026

    @ScriptedAlchemy
    OwnerAuthor

    Decision (2026-09-01): systematic parity pass adopted — every stable documented surface gets implemented, host by host, Claude (#187) first. Recorded gate deferrals (e.g. G5 agents via #220) stand unless explicitly lifted. Slice 1 of #187 is in flight. Queued after #187 slices.

  5. ScriptedAlchemy commented on Sep 2, 2026

    @ScriptedAlchemy
    OwnerAuthor

    workspaceOpen re-verification (2026-09-02) — #221 ruling corrected, observation support landed in #298

    A user challenge ("pretty sure cursor composer or agents window has the open workspace thing") prompted a re-verification of the #221 workspace/open: unavailable ruling. The recollection is correct about the hook existing: Cursor ships a native workspaceOpen app-lifecycle hook that fires when a workspace opens (and on every workspace folder change) in the desktop app and CLI — it is not a Composer/agents-window session event, it fires outside any agent session, and it does not apply to cloud agents.

    Ground truth (three agreeing sources)

    1. Official reference (https://cursor.com/docs/hooks#workspaceopen, plus the user-supplied copy of the same reference): input is { hook_event_name, cursor_version, workspace_roots, user_email }, with conversation_id, generation_id, model, session_id, transcript_path explicitly omitted for app lifecycle hooks. Output pluginPaths is documented as string[] (optional).
    2. Pinned schema (schemas/cursor/hooks.schema.json): admits workspaceOpen as a first-class hook array — unchanged.
    3. Live binary capture (cursor-agent 2026.08.31-4057e58, trusted project hooks, non-interactive run): workspaceOpen fired with exactly the documented sessionless envelope; the same run's sessionStart carried session_id/conversation_id; the capture hook exited 0 with no stdout and the workspace open + agent session proceeded normally.

    Adjudication

    #221's reason was half right, half stale:

    • "fires outside an agent session with no session or conversation fields" — still true, but that was a limitation of our generated wrappers' own session_id validation, not of the native contract.
    • "its response must return pluginPaths" — wrong per the current reference: pluginPaths is optional, so an empty/no-op response is legal (confirmed on the real binary above).

    Since the canonical workspace/open family is observation-shaped (its projection emits no native output), the native contract round-trips honestly as fire-and-forget observation: the wrapper validates the sessionless envelope, the route renders, nothing is emitted. The native pluginPaths return channel is deliberately not modeled and can never be emitted by any code path — the wrapper vocabulary must not fabricate plugin loads.

    What landed (#298, squash-merged as 69a413b)

    • event:workspace/open supported on the cursor target; sessionless envelope validation (workspace_roots nonempty string array, cursor_version, user_email string|null); projection rejects deny/updatedInput/context with typed errors and returns no output otherwise.
    • Lifecycle starter uses the real sessionless envelope; feat(dev): semantic lifecycle replay (#105 stage 3) #279 fixture replay asserts nativeResponse undefined; a generated-wrapper execution test proves exit 0 with empty stdout.
    • Capability table carries the dated doc citation plus the live CLI capture as evidence; table sha repinned.
    • Unchanged, honestly: plain hooks.events.workspaceOpen handler hooks stay unavailable (session-scoped handler vocabulary cannot express the envelope; diagnostic preserved), and the composite plugin target stays unavailable (Claude and Codex define no such event — their reasons now carry the merged wording without the stale pluginPaths claim).

    This closes the checklist row "Correct workspaceOpen input/output (pluginPaths) and prove it independently of agent-session wrappers" — the live capture is exactly that independent proof. The event-support matrices in the README and the walkthrough canvas were updated to match.

  6. ScriptedAlchemy commented on Sep 2, 2026

    @ScriptedAlchemy
    OwnerAuthor

    Cursor parity data point from the Agent Plugins adoption work: the portable target's emitted Agent Plugin was dogfooded through the real Cursor IDE plugin loader (3.18.25 stable, isolated instance). Discovery is fully at parity — the plugin lists with a Local badge, skills surface with their SKILL.md descriptions, and mcp.json is discovered and launched. However Cursor 3.18.25 does not implement the standard's placeholder expansion: ${PLUGIN_ROOT} is left literal in cwd and args, and an omitted cwd defaults to $HOME instead of the plugin root (spec 7.2.1/9.2 MUSTs), so spec-conformant stdio servers fail to launch while ${CURSOR_PLUGIN_ROOT} works. Full audit with screenshots and per-server IDE logs: docs/audits/2026-09-02-agent-plugins-cursor-ide-proof.md.

  7. ScriptedAlchemy commented on Sep 3, 2026

    @ScriptedAlchemy
    OwnerAuthor

    Contract-matrix close-out (2026-09-02) — PR #375, merge 60445ec

    Source of truth: https://cursor.com/docs/plugins, https://cursor.com/docs/reference/plugins, https://cursor.com/docs/hooks, all retrieved 2026-09-02 (PROVENANCE publicDocsObservation). Pinned schemas unchanged: cursor/plugins@0701892 plugin/marketplace, documentation-derived hooks/mcp (#131, #327). Every row below is a dated entry in packages/agent-bundle/src/adapters/capabilities/cursor-2026-08-28.json, exposed as a cursor adapter capability and mirrored through the unified plugin adapter; adapter-capability-states.test.ts pins the states, the 21-event inventory against hooks.schema.json, and the composite mirroring.

    Plugin formats and components

    Item State Evidence
    Both formats recorded explicitly done plugin.formats.cursorPlugin supported (.cursor-plugin/plugin.json); plugin.formats.agentPlugin unavailable on this target (root plugin.json is the portable target's format; cursor.mcp.token rejects ${PLUGIN_ROOT}/${PLUGIN_DATA} so no artifact mixes them)
    Full manifest metadata, minClientVersions, logo/assets, category/tags/publisher implemented new cursor.* config extension emits author{name,email}, homepage, repository, license, keywords, publisher, category, tags, minClientVersions after schema-shape validation (cursor.manifest.* errors; author.url and unknown keys rejected; no partial emission) on cursor and the Cursor half of plugin; logo already landed in #267. Row plugin.manifestMetadata records that the reference lists category/tags only as marketplace-entry fields and omits displayName/publisher/minClientVersions, which the pinned schema admits (schemaOnlyFields). Tests: cursor-adapter.test.ts (valid emission on both manifests; six rejection codes)
    Rules, agents, commands discovery/path lowering rules + commands supported (unchanged); agents unavailable plugin.agents.component cites the documented agents/ format and the #100 stage-2 G5 gate (PR #220, #107 rev 3); no agents/ emission
    Complete variables schema and secret-value separation supported plugin.variables: every ${VAR} in emitted mcp.json becomes a { type: "string" } property under { type: "object" }, no values emitted, block omitted when unused; documented keyword subset recorded
    Default discovery vs manifest replacement supported plugin.componentDiscovery: documented defaults table; generated manifest points every emitted component at its default location so replacement and discovery resolve identically; plugin.rootSkill unavailable (compiler always emits skills/<name>/SKILL.md + pointer)
    .cursor-plugin/marketplace.json schema, max entries, entry overrides, merge precedence, resolution supported plugin.marketplaceManifest: 500-entry cap, documented entry fields, <source>/.cursor-plugin/plugin.json resolution, manifest-over-entry precedence; generated single-entry document emits no overrides because the per-plugin manifest is authoritative
    Install modes, scope/access, local-import admin control, Git auto-refresh, review/publish flow unavailable (dashboard/team-side, not plugin-authored) plugin.distributionPolicy.{installModes,marketplaceAccess,localPluginImports,autoRefresh,marketplaceReview,teamMarketplaces} with dated citations
    Local physical install under ~/.cursor/plugins/local preserving #131/#127 symlink safety supported (copy); symlink unavailable install.evidence + distributionPolicy.localSymlinkInstall: docs now show ln -s, the loader observed 2026-08-31 (build 9746bf0) rejected symlinks escaping the root, Cursor IDE 3.18.25 loaded three physical directories on 2026-09-03 UTC; installer copies and doctor keeps the containment check
    Plugin canvases unavailable plugin.canvases: advertised on the overview, no component field/schema anywhere; nothing inferred

    Hooks

    Item State Evidence
    Pin all 18 documented Agent events done hooks.nativeEvents has every event with category, cloud availability, matcher subject, output fields, and owning row; test asserts the 21 documented names == hooks.schema.json enumeration == inventory keys
    Pin Tab events + workspaceOpen done same inventory (tab: beforeTabFileRead, afterTabFileEdit; app: workspaceOpen)
    Cloud vs desktop availability modeled separately done every supported route carries availability.{desktop,cloud} from the docs' cloud table; stale beforeSubmitPrompt-cloud deferral removed (docs list it as cloud-supported); hooks.cloud records the configuration sources and that plugin hooks/hooks.json is not a documented cloud source
    Prompt hooks, failClosed, loop_limit, timeout, matcher semantics by event supported: command, timeout, matcher; unavailable: failClosed, loop_limit, prompt hooks hooks.options; the failClosed row spells out that a wrapper exiting 1 on a malformed envelope is fail-open on Cursor by default
    Correct workspaceOpen input/output (pluginPaths) proven independently of agent-session wrappers done in #298 (69a413b) wave/cursor-workspace-open has no surviving delta: its 13-file/318-line diff is byte-present on main
    Shell/MCP/read/edit specialty hooks as selector-rich variants of canonical tool routes recorded each deferredNativeEvents row now states the concrete delta versus the generic route (permission: ask, sandbox, raw output, content/attachments, per-edit edits[]) and that a dedicated family needs a canonical-vocabulary decision (#97/#258), not an inference
    Response/thought and Tab events deferred but named done deferredNativeEvents.{afterAgentResponse,afterAgentThought,beforeTabFileRead,afterTabFileEdit} with input/output/matcher/cloud facts

    Acceptance

    • Marketplace claim matches the reference — marketplace supported, marketplaceManifest row documents the format and limits.
    • Every documented component and hook event has a dated state — 21/21 events, all components including canvases and agents.
    • Native fixture replay with distinct payloads/output channels:
      • workspaceOpen: feat(cursor): support workspace/open event routes as fire-and-forget observation #298 (sessionless envelope, empty response, live CLI capture).
      • subagent lifecycle: this PR — subagentStart/subagentStop previously had no fixture at all (the config-hook wrapper failed every real payload on its loop_count check and the projection emitted an undocumented additional_context). Now the documented subagent_* envelopes are validated in the route validator and the wrapper, projected to { permission: "deny", user_message } / { followup_message } only, Agent.Context fails closed on both, and tests/fixtures/events/cursor-subagent-{start,stop}.json run through compiled wrappers (hooks.test.ts), the route projection (route-unit/event-project.test.ts), the envelope validator (event-project.test.ts), and the lifecycle starters.
      • tool lifecycle: preToolUse/postToolUse/postToolUseFailure fixtures and projections unchanged (Compile semantic event route v2 families into native host hooks #258/feat(dev): semantic lifecycle replay (#105 stage 3) #279).
    • No Agent Plugin and Cursor Plugin paths/tokens mixed — plugin.formats.agentPlugin + cursor.mcp.token (tested).

    Review-thread inventory (PR #375)

    Codex (chatgpt-codex-connector) reviewed every pushed head (6e3bc97, 429c6bd, e982d50, 2b338a2, d1ec84f, 0de3c4a, 29ba9d6, fe257d2, 4bb55e9, 5cd1f89, 4255928 — final verdict "Didn't find any major issues"); 8 threads found, 8 fixed (7 with tests, 1 changeset wording), 8 replied and resolved, 0 open:

    Thread Fix
    denied agent/stop on Cursor emitted followup_message for status: error/aborted, which Cursor consumes only for completed projectEventDocument takes the validated native envelope (all production callers pass it) and throws for a continuation on a non-completed subagent; the generated wrapper's encodeOutput applies the same check (route-unit/event-project.test.ts, hooks.test.ts)
    route path swallowed reason without outcome: deny on Cursor agent/stop while the wrapper rejected it Cursor agent/stop route branch rejects reason-without-deny like agent/start and the wrapper (route-unit/event-project.test.ts)
    wrapper accepted parent_conversation_id in place of the common conversation_id on subagentStart exception and sessionId fallback removed; wrapper and route validator agree (hooks.test.ts)
    wrapper validated subagent_model but never decoded it, so event.model was undefined and the simulation round trip was lossy decodeCursorNative maps subagent_model → model on subagentStart (hooks.test.ts)
    changeset summary carried contract-matrix bookkeeping and adapterRevision numbers (AGENTS.md: summaries are user-facing, not implementation notes) rewritten around the cursor.* config, emitted manifest fields, cursor.manifest.* diagnostics, and observable subagent hook behaviour
    homepage/repository accepted values new URL() normalizes but the schema's format: "uri" rejects, so the generic cursor.schema.plugin error fired and the invalid block was kept isAbsoluteUrl now runs the exact emitted string through the schema's own format: "uri" checker before the http/https protocol check; fails closed as cursor.manifest.<field>.invalid, nothing emitted (cursor-adapter.test.ts)
    author.email used a hand regex looser than the schema's format: "email" ([email protected] leaked to the generic error) isEmail delegates to the pinned format: "email" checker; cursor.manifest.author.email.invalid + no author emitted (cursor-adapter.test.ts)
    subagentStart validators treated parent_conversation_id, tool_call_id, subagent_model, is_parallel_worker as optional although only git_branch is documented optional both the route envelope validator and the generated wrapper require every documented field (start and stop; agent_transcript_path is string | null); simulation encoders carry neutral values for the fields canonical input lacks; field-by-field omission tests in event-project.test.ts and hooks.test.ts

    Not verifiable against a live binary

    cursor-agent 2026.08.31-4057e58 -p --trust --force with project subagentStart/subagentStop capture hooks exited 1 with Authentication required before any hook (including workspaceOpen) fired; the pinned reference plus fixture replay is the evidence source (recorded in provenance.evidence).

    Gates on the merged head (4255928 → squash 60445ece5): PR CI green — Verify (Node 24), Release gates, Examples check, Host install proofs, RSC runtime micro-eval, Dependency review, Changeset present, pkg.pr.new preview (Release gates passed on rerun after a transient npm audit signatures registry failure that also hit unrelated runs). Local after the final rebase: typecheck, lint (0 errors/0 warnings), route-unit 39/39, projection 74/74, unit 2821/2828 with the remaining failures being the known load-flaky event-ipc/native-claude-contract (pass in isolation) and the rsc-runtime dispatcher 150 ms timing test at load average 48–94 (this PR touches no rsc-runtime or Claude file; CI Verify passed).

  8. ScriptedAlchemy commented on Sep 3, 2026

    @ScriptedAlchemy
    OwnerAuthor

    2026-09-03 — the user_email string|null validation recorded in this issue's acceptance list was removed: by maintainer decision (see #391, closed as not planned) the framework does not read, validate, or surface operator identity; Cursor's workspaceOpen envelope is still validated for workspace_roots/cursor_version and user_email passes through inside native untouched. Landed in #444 (merged as 284141958).

  9. ScriptedAlchemy commented on Sep 3, 2026

    @ScriptedAlchemy
    OwnerAuthor

    Follow-up PR for the user_email validator removal: #444.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugenhancementhost-integrationmeta-framework

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions