Skip to content

feat(adapters): add a first-class cursor compile target - #13

Merged
ScriptedAlchemy merged 2 commits into
mainfrom
feat/cursor-host-adapter
Aug 28, 2026
Merged

feat(adapters): add a first-class cursor compile target#13
ScriptedAlchemy merged 2 commits into
mainfrom
feat/cursor-host-adapter

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Owner

Summary

  • Adds the missing named host from the project goal ("Claude and Cursor"): a standalone cursor target alongside claude, codex, and portable. The artifact carries .cursor-plugin/plugin.json with explicit document pointers, Cursor's auto-discovered mcp.json, and shared skills/, scripts/, mcp/, mcp-apps/, and assets/, all validated against the already-pinned Cursor schemas.
  • Extracts the Cursor lowering that lived inline in the unified plugin bundle into adapters/cursor.ts so both targets share one contract (manifest builder, MCP server planner, token expansion, validators, empty-hooks document).
  • Extends the target MCP runtime with an optional readServerType resolver: Cursor's document format is shape-discriminated (command vs url, no type field), which the previous typed reader could not parse. Typed targets keep the exact previous semantics.
  • Hooks remain Claude/Codex-only until Cursor's hook stdin contract is pinned: the adapter declares no hook capability, and the pinned hooks schema only validates hand-authored hooks/hooks.json documents.
  • No config extension is registered yet — Cursor has no host-specific config surface, so the strict normalizer keeps rejecting a cursor: config key.
  • Adds capability table 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 new cursor-adapter.test.ts and updated registry/metadata pins)
  • pnpm typecheck — clean (root + workbench)
  • pnpm lint — clean
  • PR CI: integration matrix + release gates

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-bot

changeset-bot Bot commented Aug 28, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: e5960ed

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
agent-bundle Minor

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

@pkg-pr-new

pkg-pr-new Bot commented Aug 28, 2026

Copy link
Copy Markdown
npm i https://pkg.pr.new/ScriptedAlchemy/agent-bundle@13
npm i https://pkg.pr.new/ScriptedAlchemy/agent-bundle/@agent-bundle/rsc-runtime@13

commit: e5960ed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +120 to +124
value: {
...(args === undefined ? {} : { args }),
command: expandCursorToken(server.command),
...(env === undefined ? {} : { env }),
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@ScriptedAlchemy
ScriptedAlchemy merged commit df0afec into main Aug 28, 2026
22 of 23 checks passed
@ScriptedAlchemy
ScriptedAlchemy deleted the feat/cursor-host-adapter branch September 3, 2026 05:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant