Publish engine-owned Fusion tools to Cursor through a crash-safe, worktree-scoped MCP bridge. - preserve operator MCP configuration with locking, journaling, quarantine, and lease reconciliation - enforce identity-scoped fn_* provenance so injected custom and MCP tools are never exposed - secure loopback dispatch with per-session tokens, heartbeats, cleanup, and normalized tool events - document the Cursor contract and cover bridge lifecycle, config hygiene, and failure handling Files changed: .changeset/fn-9098-cursor-mcp-bridge.md | 7 + docs/cursor-cli-contract.md | 140 ++------------- docs/mcp.md | 4 + .../src/__tests__/agent-session-helpers.test.ts | 24 +++ .../src/__tests__/step-session-executor.test.ts | 16 ++ .../src/__tests__/web-fetch-universal.test.ts | 4 +- packages/engine/src/agent-heartbeat.ts | 3 +- packages/engine/src/agents/agent-runtime.ts | 9 + .../engine/src/agents/agent-session-helpers.ts | 26 +-- packages/engine/src/execution/reviewer.ts | 1 + .../engine/src/execution/step-session-executor.ts | 31 ++-- .../engine/src/executor/execute-workflow-step.ts | 4 +- packages/engine/src/merger.ts | 4 +- plugins/fusion-plugin-cursor-runtime/README.md | 18 +- plugins/fusion-plugin-cursor-runtime/package.json | 2 +- .../src/__tests__/cursor-mcp-config.test.ts | 100 +++++++++++ .../cursor-mcp-server-failure.stream.jsonl | 3 + .../fixtures/cursor-mcp-tool-call.stream.jsonl | 4 + .../src/__tests__/runtime-adapter.test.ts | 57 +++++- .../src/__tests__/worktree-hygiene.test.ts | 52 ++++++ .../src/cursor-mcp-config.ts | 196 +++++++++++++++++++++ .../src/mcp-schema-server.cjs | 155 ++++++++++++++++ .../src/prompt-transport.ts | 4 +- .../src/runtime-adapter.ts | 67 +++++-- .../src/tool-bridge.ts | 48 +++++ .../src/tool-mapping.ts | 11 ++ plugins/fusion-plugin-cursor-runtime/src/types.ts | 6 +- .../src/worktree-hygiene.ts | 117 ++++++++++++ 28 files changed, 934 insertions(+), 179 deletions(-) Fusion-Task-Id: FN-9098 Fusion-Task-Lineage: 11b6cb10-ce0e-4f33-9007-c83f2bbf82ea Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
42 lines
1.0 KiB
JSON
42 lines
1.0 KiB
JSON
{
|
|
"name": "@fusion-plugin-examples/cursor-runtime",
|
|
"version": "0.1.54",
|
|
"type": "module",
|
|
"description": "Cursor CLI runtime plugin for Fusion",
|
|
"keywords": [
|
|
"fusion-plugin",
|
|
"cursor",
|
|
"runtime"
|
|
],
|
|
"exports": {
|
|
".": {
|
|
"types": "./src/index.ts",
|
|
"source": "./src/index.ts",
|
|
"import": "./dist/index.js"
|
|
},
|
|
"./probe": {
|
|
"types": "./src/probe.ts",
|
|
"source": "./src/probe.ts",
|
|
"import": "./dist/probe.js"
|
|
}
|
|
},
|
|
"private": true,
|
|
"scripts": {
|
|
"build": "tsc && node -e \"require('node:fs').copyFileSync('src/mcp-schema-server.cjs','dist/mcp-schema-server.cjs')\"",
|
|
"test": "vitest run --silent=passed-only --reporter=dot"
|
|
},
|
|
"dependencies": {
|
|
"@fusion/core": "workspace:*",
|
|
"@fusion/plugin-sdk": "workspace:*"
|
|
},
|
|
"peerDependencies": {
|
|
"@earendil-works/pi-ai": "*",
|
|
"@earendil-works/pi-coding-agent": "*"
|
|
},
|
|
"devDependencies": {
|
|
"@types/node": "^25.5.2",
|
|
"typescript": "^5.7.0",
|
|
"vitest": "^4.1.10"
|
|
}
|
|
}
|