feat(adapters): add a first-class cursor compile target - #13
Conversation
The standalone cursor artifact carries the .cursor-plugin/plugin.json manifest with explicit document pointers, Cursor's auto-discovered typeless mcp.json, and shared skills, scripts, and assets, validated against the already-pinned Cursor schemas. The Cursor lowering that lived inline in the unified plugin bundle moves to the new adapter module so both targets share one contract, and the target MCP runtime gains a shape-discriminated server reader because Cursor's document format has no type field. Hooks stay Claude/Codex-only until Cursor's hook stdin contract is pinned, so the adapter declares no hook capability and the pinned hooks schema only validates hand-authored documents.
🦋 Changeset detectedLatest commit: e5960ed The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
commit: |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 386375af06
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| value: { | ||
| ...(args === undefined ? {} : { args }), | ||
| command: expandCursorToken(server.command), | ||
| ...(env === undefined ? {} : { env }), | ||
| }, |
There was a problem hiding this comment.
Reject Cursor stdio working directories instead of dropping them
When a Cursor-scoped command server specifies cwd, this branch emits only args, command, and env, silently discarding the validated working directory. Such a server will run from Cursor's default directory, so relative arguments or files that depended on the configured cwd can fail or reference the wrong location. Because the pinned Cursor document shape cannot represent cwd, the adapter should diagnose unsupported non-entry cwd values rather than compiling a behaviorally different server.
Useful? React with 👍 / 👎.
Summary
cursortarget alongsideclaude,codex, andportable. The artifact carries.cursor-plugin/plugin.jsonwith explicit document pointers, Cursor's auto-discoveredmcp.json, and sharedskills/,scripts/,mcp/,mcp-apps/, andassets/, all validated against the already-pinned Cursor schemas.pluginbundle intoadapters/cursor.tsso both targets share one contract (manifest builder, MCP server planner, token expansion, validators, empty-hooks document).readServerTyperesolver: Cursor's document format is shape-discriminated (commandvsurl, notypefield), which the previous typed reader could not parse. Typed targets keep the exact previous semantics.hooks/hooks.jsondocuments.cursor:config key.cursor-2026-08-28.json(pinned by sha256 in adapter metadata), a dedicated adapter test suite, and docs/changeset.Test plan
pnpm test:unit— 1664 passed, 0 failed (includes newcursor-adapter.test.tsand updated registry/metadata pins)pnpm typecheck— clean (root + workbench)pnpm lint— clean