gsxdsm
2a9ae0aca3
FN-9109: add resilient cross-runtime Cursor fallback
...
Route eligible CLI fallback failures into one bounded, auditable Cursor runtime handoff.
- defer cursor-cli fallback selection until a retryable primary prompt failure
- serialize concurrent swaps, retry the primary after failed handoffs, and dispose replacements safely
- transfer text-only conversation context within strict turn and total character limits
- document routing behavior and cover provider, runtime, concurrency, and failure cases
Files changed:
.../fn-9109-cross-runtime-cursor-fallback.md | 7 +
AGENTS.md | 2 +
docs/cursor-cli-contract.md | 8 +
.../src/__tests__/cli-provider-routing.test.ts | 18 +-
.../cli-runtime-routing-conformance.test.ts | 64 ++++-
.../src/__tests__/cross-runtime-fallback.test.ts | 146 +++++++++++
.../engine/src/agents/agent-session-helpers.ts | 211 ++++++----------
packages/engine/src/agents/cli-provider-routing.ts | 4 +-
.../engine/src/agents/cross-runtime-fallback.ts | 277 +++++++++++++++++++++
packages/engine/src/util/run-audit.ts | 8 +
10 files changed, 602 insertions(+), 143 deletions(-)
Fusion-Task-Id: FN-9109
Fusion-Task-Lineage: 30664371-8410-4d6f-a263-cc86c8e0dc72
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai >
2026-08-15 19:10:55 -07:00
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
c9a2b201be
FN-7698: update cursor-cli-contract.md with verified model/auth commands
...
Corrects the FN-3396 preflight's assumed Cursor CLI commands with the real, verified contract captured and implemented in FN-7697.
- Documents model discovery as plain-text `cursor-agent models` (no --json flag), including output shape, empty-account state, and the unreliable --list-models alternative
- Documents the parsing strategy: extract id before first ' - ' per line, filtering header/tip/empty-state lines
- Documents authentication as derived from `cursor-agent status --format json` via `isAuthenticated`, distinct from the --version availability probe
- Updates the Windows shell-backed probe list to include the auth-status probe and the corrected model-discovery command
- Marks the FN-3396 contract-freeze section as superseded by the verified contract, retaining accurate parts (binary candidates, expected failure states, dynamic-first principle)
- Adds an update-history note and FNXC:CursorCli comment documenting the correction
Files changed:
docs/cursor-cli-contract.md | 43 +++++++++++++++++++++++++++++--------------
1 file changed, 29 insertions(+), 14 deletions(-)
Fusion-Task-Id: FN-7698
Fusion-Task-Lineage: ae30b81c-f750-4011-85ae-883b1c5eb48b
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai >
2026-07-08 23:39:34 -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