gsxdsm
5e5b0dbb8f
FN-9098: bridge scoped Fusion tools into Cursor
...
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 >
2026-08-15 16:51:54 -07:00
gsxdsm
b6efd89ae5
FN-9097: add Cursor CLI execution runtime
...
Add a supervised Cursor CLI runtime for routed Cursor model sessions.
- Stream Cursor prompt output into Fusion session callbacks with resume support.
- Support Windows Cursor shims, inactivity-based supervision, and cursor-agent to cursor fallback execution.
- Route Cursor CLI models through the bundled plugin and document the runtime contract.
Files changed:
.changeset/fn-9097-cursor-cli-runtime.md | 7 ++
docs/cursor-cli-contract.md | 21 ++++
docs/settings-reference.md | 4 +-
.../cli-runtime-routing-conformance.test.ts | 11 +-
.../engine/src/agents/agent-session-helpers.ts | 6 +-
packages/engine/src/agents/cli-provider-routing.ts | 27 ++---
plugins/fusion-plugin-cursor-runtime/README.md | 21 ++++
plugins/fusion-plugin-cursor-runtime/package.json | 1 +
.../src/__tests__/cli-spawn.test.ts | 25 ++++-
.../src/__tests__/prompt-transport.test.ts | 58 ++++++++++
.../src/__tests__/runtime-adapter.test.ts | 44 +++++---
.../src/__tests__/stream-parser.test.ts | 12 +++
.../fusion-plugin-cursor-runtime/src/cli-spawn.ts | 57 +++++++++-
plugins/fusion-plugin-cursor-runtime/src/index.ts | 4 +-
.../src/prompt-transport.ts | 120 +++++++++++++++++++++
.../src/runtime-adapter.ts | 59 ++++++----
.../src/stream-parser.ts | 43 ++++++++
plugins/fusion-plugin-cursor-runtime/src/types.ts | 18 ++--
pnpm-lock.yaml | 3 +
19 files changed, 458 insertions(+), 83 deletions(-)
Fusion-Task-Id: FN-9097
Fusion-Task-Lineage: a4eed861-6059-4528-9f80-3426f5ccad58
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai >
2026-08-15 08:51:35 -07:00
gsxdsm
3e7e4a865b
FN-7700: enrich Cursor model picker with reasoning/contextWindow metadata
...
Threads optional reasoning and context-window metadata from Cursor CLI model discovery through to the dashboard's Cursor model picker, replacing hardcoded false/0 defaults with pass-through values when the CLI reports them.
- Extend cursorDiscoveryToModels/discoverCursorProviderModels to carry reasoning/contextWindow from structured JSON model entries
- Update runtime-provider-probes.ts to surface the new metadata fields
- Update cursor-agent process-manager and provider to parse and propagate reasoning/contextWindow from CLI output
- Add/extend tests covering the new metadata plumbing in cursor-model-cache, process-manager, and provider
- Add changeset documenting the patch-level dashboard feature
Files changed:
.changeset/fn-7700-cursor-picker-reasoning-context-window.md | 7 ++++
packages/dashboard/src/__tests__/cursor-model-cache.test.ts | 26 ++++++++++++
packages/dashboard/src/cursor-model-cache.ts | 24 +++++++----
packages/dashboard/src/runtime-provider-probes.ts | 11 ++++-
plugins/fusion-plugin-cursor-runtime/src/__tests__/process-manager.test.ts | 33 +++++++++++++++
plugins/fusion-plugin-cursor-runtime/src/__tests__/provider.test.ts | 23 +++++++++++
plugins/fusion-plugin-cursor-runtime/src/process-manager.ts | 48 +++++++++++++++++++---
plugins/fusion-plugin-cursor-runtime/src/provider.ts | 19 ++++++++-
8 files changed, 176 insertions(+), 15 deletions(-)
Fusion-Task-Id: FN-7700
Fusion-Task-Lineage: 6b371a92-204a-4201-8c7d-df65e9210a1b
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai >
2026-07-08 23:39:34 -07:00
gsxdsm
bccb552211
FN-7697: fix Cursor CLI auth-status and model-list discovery
...
Corrects the Cursor plugin's CLI integration to match cursor-agent's real command contract instead of best-effort heuristics.
- Derive authentication from `cursor-agent status --format json` (`isAuthenticated` field), failing closed with an actionable reason on non-zero exit or malformed JSON, instead of treating `--version` success as auth-ready.
- Switch model discovery to `cursor-agent models` plain-text output (`id - Label` lines), filtering header/tip/empty-state lines, since `--json`/`model list` are not supported.
- Update README to document the corrected CLI usage.
- Add regression tests covering probe.ts auth-status parsing and process-manager.ts model discovery.
- Add changeset (patch) documenting the fix.
Files changed:
.changeset/fn-7697-cursor-cli.md | 7 ++
plugins/fusion-plugin-cursor-runtime/README.md | 3 +-
.../src/__tests__/probe.test.ts | 94 +++++++++++++++++++---
.../src/__tests__/process-manager.test.ts | 89 +++++++++++++-------
plugins/fusion-plugin-cursor-runtime/src/probe.ts | 39 +++++++--
.../src/process-manager.ts | 84 ++++++++++++-------
6 files changed, 239 insertions(+), 77 deletions(-)
Fusion-Task-Id: FN-7697
Fusion-Task-Lineage: 6dd56a7f-da8f-4a73-82ff-5e9baab697c5
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai >
2026-07-08 23:39:33 -07:00
gsxdsm
abb1917999
FN-7419: add Cursor CLI binary path override
...
Add a global Cursor CLI binary path override that is validated before enabling or probing Cursor routing.
- Add global settings schema/types and API support for storing a trimmed Cursor CLI binary path override.
- Surface a Settings Authentication control to save, clear, and test the Cursor CLI binary path.
- Probe configured Cursor binaries before PATH fallbacks and expose diagnostics for status/routes.
- Cover settings, route, dashboard, and cursor runtime behavior with focused tests and documentation.
Files changed:
.changeset/fn-7419-cursor-cli-binary-path.md | 7 ++
docs/cursor-cli-contract.md | 33 ++++--
docs/settings-reference.md | 2 +
.../core/src/__tests__/cursor-cli-settings.test.ts | 34 ++++++
packages/core/src/settings-schema.ts | 6 +
packages/core/src/types.ts | 8 ++
packages/dashboard/app/api/legacy.ts | 17 ++-
.../app/components/CursorCliProviderCard.css | 37 +++++-
.../app/components/CursorCliProviderCard.tsx | 78 ++++++++++++-
.../__tests__/ModelOnboardingModal.test.tsx | 4 +
.../__tests__/SettingsModal.general.test.tsx | 2 +
.../__tests__/SettingsModal.models-auth.test.tsx | 75 ++++++++++++
.../SettingsModal.remote-notifications.test.tsx | 2 +
.../SettingsModal.scheduling-merge.test.tsx | 2 +
.../__tests__/SettingsModal.test-harness.tsx | 3 +
.../dashboard/src/__tests__/routes-auth.test.ts | 130 ++++++++++++++++++++-
.../dashboard/src/routes/register-auth-routes.ts | 69 +++++++++--
.../src/__tests__/probe.test.ts | 61 +++++++++-
.../src/__tests__/process-manager.test.ts | 10 ++
.../src/__tests__/provider.test.ts | 57 +++++++++
plugins/fusion-plugin-cursor-runtime/src/probe.ts | 39 +++++--
.../fusion-plugin-cursor-runtime/src/provider.ts | 15 ++-
plugins/fusion-plugin-cursor-runtime/src/types.ts | 3 +
23 files changed, 655 insertions(+), 39 deletions(-)
Fusion-Task-Id: FN-7419
Fusion-Task-Lineage: 2c192a37-a1db-41a9-99f5-a480ed311d9c
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai >
2026-07-02 11:38:33 -07:00
gsxdsm
777f64750c
FN-7418: fix Cursor CLI Windows shim spawning
...
Fix Cursor runtime probes to execute Windows cmd and bat shims reliably while preserving diagnostics.
- Run shared Cursor CLI probe and discovery spawns through the shell only on Windows.
- Surface bounded spawn error details in unavailable Cursor probe reasons.
- Cover Windows shell spawning, failure diagnostics, probe, and process-manager behavior with tests.
- Document the Windows PATH shim invocation contract and add a patch changeset.
Files changed:
.changeset/fn-7418-cursor-cli-windows-cmd.md | 7 ++
docs/cursor-cli-contract.md | 17 ++++
.../src/__tests__/cli-spawn.test.ts | 103 +++++++++++++++++++++
.../src/__tests__/probe.test.ts | 44 ++++++++-
.../src/__tests__/process-manager.test.ts | 24 ++++-
.../fusion-plugin-cursor-runtime/src/cli-spawn.ts | 41 ++++++--
plugins/fusion-plugin-cursor-runtime/src/probe.ts | 14 ++-
7 files changed, 236 insertions(+), 14 deletions(-)
Fusion-Task-Id: FN-7418
Fusion-Task-Lineage: d689bea7-4676-4190-a60a-f85efab90aba
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai >
2026-07-02 11:38:31 -07:00
Fusion
3735e0565a
feat(FN-3396): bundle Cursor CLI as a plugin provider with dashboard auth w
...
Merges FN-3396's full Cursor CLI provider integration (Steps 1–4): defines a CLI-backed provider contract, adds the `fusion-plugin-cursor-runtime` plugin package with process management and runtime probes, wires dashboard auth flows and UI (ProviderCard, onboarding modal, settings), and bundles the
Fusion-Task-Id: FN-3396
2026-05-07 04:17:52 -07:00