Commit Graph

1498 Commits

Author SHA1 Message Date
gsxdsm
e37ebd5af9 chore(release): v0.77.0-beta.8
Version bump via changesets.
2026-08-23 14:49:26 -07:00
gsxdsm
012d42008f chore(release): v0.77.0-beta.7
Version bump via changesets.
2026-08-22 19:27:22 -07:00
Fusion Agent
8b681775ae FN-122: fix local workspace integration across repositories
Make multi-repository workspace merges resolve and land against the correct local integration targets.

- Add local integration-target resolution and durable merge-dispatch leasing.
- Harden workspace merge fencing, failure handling, audit logging, and CLI/dashboard controls.
- Document the workflow and add regression coverage for workspace integration and task-log deduplication.
- Complete the CLI engine mock for the new public lease export.

Files changed:
 .changeset/fn-122-local-workspace-integration.md   |   7 +
 docs/architecture.md                               |   1 +
 docs/dashboard-guide.md                            |   4 +
 docs/settings-reference.md                         |   4 +-
 docs/testing.md                                    |  10 ++
 .../task-command-github-import-tracking.test.ts    |   2 +
 packages/cli/src/commands/__tests__/task.test.ts   |   1 +
 packages/cli/src/commands/dashboard.ts             |  15 +-
 packages/cli/src/commands/task.ts                  |  14 +-
 .../__tests__/postgres/task-log-dedupe.pg.test.ts  |  30 ++++
 packages/core/src/index.ts                         |   2 +-
 packages/core/src/store.ts                         |   5 +-
 packages/core/src/task-store/audit-ops.ts          |  38 ++++
 packages/core/src/types.ts                         |   2 +
 packages/core/src/types/task/task-core.ts          |  16 +-
 packages/core/src/types/task/task-log.ts           |   2 +
 .../app/components/WorkspaceWorktreesSummary.tsx   |  15 +-
 .../settings/sections/WorktreesSection.tsx         |   3 +-
 .../engine/src/__tests__/workspace-e2e.test.ts     | 198 ++++++++++++++++-----
 .../__tests__/workspace-integration-target.test.ts |  75 ++++++++
 .../src/__tests__/workspace-merger-lease.test.ts   |  42 ++++-
 packages/engine/src/index.ts                       |   6 +
 packages/engine/src/merge/merger-ai.ts             | 152 +++++++++++-----
 packages/engine/src/merge/workspace-fence-ref.ts   |  17 +-
 .../src/merge/workspace-integration-target.ts      |  87 +++++++++
 .../engine/src/merge/workspace-land-failure.ts     |   6 +-
 .../src/merge/workspace-merge-dispatch-lease.ts    |  54 ++++++
 packages/engine/src/project-engine.ts              |  25 +++
 28 files changed, 715 insertions(+), 118 deletions(-)

Fusion-Task-Id: FN-122
Fusion-Task-Lineage: 9364bba4-cebc-44e7-b2ae-60967fbc025c
Co-authored-by: Fusion <noreply@runfusion.ai>
2026-08-23 01:36:12 +00:00
Fusion Agent
0b4dbd219b FN-125: prevent workflow agents from creating tasks
Stop workflow executor agents from creating ordinary tasks while preserving explicit self-spawned dependency handling.

- Gate task creation by session identity and execution context.
- Add self-spawned dependency support, validation, and persistence coverage.
- Update agent prompts, tools, documentation, and CLI integration.
- Add a published-package changeset.

Files changed:
 .changeset/fn-125-removal.md                       |  7 +++
 docs/agents.md                                     |  2 +-
 docs/dashboard-guide.md                            |  2 +-
 docs/settings-reference.md                         |  6 +-
 .../cli/skill/fusion/references/engine-tools.md    | 10 ++--
 .../extension-task-execution-task-creation.test.ts | 70 ++++++++++++++++++++++
 packages/cli/src/extension.ts                      | 49 +++++++++++++--
 .../postgres/store-self-spawned-dep.pg.test.ts     | 56 +++++++++++++++++
 .../src/__tests__/self-spawned-dependency.test.ts  | 18 ++++++
 .../__tests__/session-identity-registry.test.ts    | 14 ++++-
 packages/core/src/agents/agent-prompts.ts          | 27 ++++-----
 .../src/agents/task-execution-task-creation.ts     | 19 ++++++
 packages/core/src/index.ts                         |  7 +++
 packages/core/src/session-identity-registry.ts     |  7 +++
 packages/core/src/store.ts                         |  2 +
 packages/core/src/task-store/errors.ts             | 21 +++++++
 packages/core/src/task-store/task-update.ts        | 10 +++-
 packages/core/src/task-store/update-task-deps.ts   | 12 +++-
 .../__tests__/ephemeral-task-create-gate.test.ts   | 18 +++---
 .../src/__tests__/executor-review-verdicts.test.ts |  3 +-
 packages/engine/src/agent-tools.ts                 |  4 ++
 packages/engine/src/agents/agent-runtime.ts        |  2 +
 .../engine/src/execution/step-session-executor.ts  | 15 ++---
 .../executor/attempt-executor-verification-fix.ts  |  1 +
 .../engine/src/executor/create-spawn-agent-tool.ts |  1 +
 .../engine/src/executor/create-task-done-tool.ts   | 18 +++++-
 .../engine/src/executor/create-task-update-tool.ts | 12 +++-
 .../engine/src/executor/execute-workflow-step.ts   |  1 +
 packages/engine/src/executor/run-implementation.ts | 18 +++---
 packages/engine/src/executor/system-prompt.ts      | 21 +++----
 packages/engine/src/executor/task-add-dep-tool.ts  | 14 ++++-
 packages/engine/src/pi.ts                          | 15 ++++-
 32 files changed, 401 insertions(+), 81 deletions(-)

Fusion-Task-Id: FN-125

Fusion-Task-Lineage: da3d69f6-c9cb-45fd-8691-3dfaf7007514
Co-authored-by: Fusion <noreply@runfusion.ai>
2026-08-23 01:36:12 +00:00
XiaoHuo888-hue
41c23adf15 feat: add OrcaRouter as a named model provider (#3502)
## Summary

Adds [OrcaRouter](https://www.orcarouter.ai) as a first-class named
model provider, mirroring the existing OpenRouter integration.
OrcaRouter is an OpenAI-compatible gateway —
`https://api.orcarouter.ai/v1` — that routes to models from many
providers (Anthropic, OpenAI, DeepSeek, Google, Grok, Qwen, Zhipu, and
more) through a single API key. It also runs gateway-level, zero-trust
security for AI agents on the same endpoint — screening every
prompt/response and governing every tool call on a default-deny basis,
with no application code changes.

What this PR does:

- **Catalog sync**: `syncStartupModels` now fetches the OrcaRouter
`/v1/models` catalog at startup (gated by a new `orcarouterModelSync`
global setting, default enabled) and registers an `openai-completions`
provider at `https://api.orcarouter.ai/v1`. The key resolves from the
`ORCAROUTER_API_KEY` environment variable.
- **Auth + onboarding**: OrcaRouter appears in the API-key auth catalog,
onboarding setup copy + key hints, and quick-start provider list (key
format `sk-orca-...`, dashboard link to `https://www.orcarouter.ai`).
- **Icons**: New OrcaRouter brand mark (`OrcaRouterIcon`) with a
dedicated color token, wired into `ProviderIcon` and
`inferProviderIconKey` so `orcarouter/...` model ids render the brand
mark everywhere.
- **Settings**: Startup-sync toggle under **Settings → Global Models**,
settings search entry, and save-split allowlists.
- **Docs + i18n**: `docs/settings-reference.md` / `docs/storage.md` rows
and `en` + secondary-locale catalog keys.
- **Changeset**: `.changeset/add-orcarouter-provider.md` (minor).

Disclosure: I'm an engineer on the OrcaRouter team.

## Test plan

- `pnpm --filter @runfusion/fusion exec vitest run
src/commands/__tests__/startup-model-sync.test.ts` — 18 passed
- `pnpm --filter @fusion/core exec vitest run
src/__tests__/settings-parity.test.ts` — 80 passed
- `pnpm --filter @fusion/dashboard exec vitest run
app/components/__tests__/ProviderIcon.test.tsx` — 115 passed
- `pnpm --filter @fusion/dashboard exec vitest run
app/components/__tests__/AuthenticationSection.test.tsx
app/components/__tests__/ModelOnboardingModal.test.tsx` — 222 passed
- `tsc --noEmit` in `@fusion/cli`, `@fusion/core`, `@fusion/dashboard`,
`@fusion/engine` — all clean
- `pnpm lint` on changed files — clean
- `pnpm check:changesets` — clean
- **L3 live test**: exercised the production `syncStartupModels` path
against the live OrcaRouter API — catalog sync registered 209 models and
a real chat completion returned **HTTP 200** (`finish_reason: "stop"`).

Note: `pnpm i18n:status` reports pre-existing Jira key-parity gaps in
the `app.json` catalogs on a clean checkout (unrelated to this change);
the `common.json` catalogs touched here are in parity.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
  - Added OrcaRouter as a built-in OpenAI-compatible provider.
- Added API-key setup, validation, authentication, onboarding guidance,
provider branding, and model catalog visibility.
- Added automatic startup synchronization of OrcaRouter models, enabled
by default.
  - Added a global setting to enable or disable model synchronization.
- **Documentation**
  - Documented the new synchronization setting and its configuration.
- **Localization**
  - Added OrcaRouter setup and usage text across supported languages.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: XiaoHuo888-hue <jinhao.song@myflashcloud.com>
Co-authored-by: XiaoHuo888-hue <jinhao.song@myflashcloud.com>
Co-authored-by: Claude <noreply@anthropic.com>
2026-08-21 19:30:08 -07:00
gsxdsm
47de350fca FN-9189: expand dashboard concurrency callback coverage
Expand post-landing QA coverage for dashboard concurrency settings callbacks.

- Exercise unset, configured, and worktree-bound settings across all TUI callback paths.
- Verify pause callbacks use project defaults while the task store is still initializing.
- Extend the dashboard harness with live settings events and a startup barrier.

Files changed:
 .../dashboard-concurrency-settings.test.ts         | 104 ++++++++++++++++++---
 1 file changed, 92 insertions(+), 12 deletions(-)

Fusion-Task-Id: FN-9189

Fusion-Task-Lineage: c373954a-7316-47d2-9821-75e0d34b22d4

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-21 17:15:20 -07:00
gsxdsm
a010dc42bf FN-9185: enforce effective task concurrency limits
Unify task concurrency around authoritative project settings and expose the effective admission ceiling.

- Resolve maxConcurrent and maxWorktrees through a shared core capacity model with consistent defaults.
- Apply the effective limit across scheduler, engine, runtime, CLI, API, and project-manager admission paths.
- Surface configured and binding concurrency values in dashboard controls, status views, diagnostics, and documentation.
- Add regression coverage for settings persistence, routing, scheduling, UI surfaces, and worktree-bound capacity.

Files changed:
 .../fn-9185-max-concurrent-effective-limit.md      |   7 +
 docs/architecture.md                               |   8 +-
 docs/cli-reference.md                              |   1 +
 docs/dashboard-guide.md                            |   4 +
 docs/settings-reference.md                         |   4 +-
 .../dashboard-concurrency-settings.test.ts         | 166 +++++++++++++++++++++
 packages/cli/src/commands/dashboard.ts             |  28 ++--
 packages/cli/src/commands/onboard.ts               |   4 +-
 packages/cli/src/project-resolver.ts               |  27 +++-
 .../concurrency-capacity-resolver.test.ts          |  46 ++++++
 .../src/__tests__/worktree-capacity-limit.test.ts  |  51 +++++--
 packages/core/src/index.gate.ts                    |   2 +-
 packages/core/src/index.ts                         |   2 +-
 packages/core/src/workflows/workflow-capacity.ts   |  61 ++++++--
 packages/dashboard/app/App.tsx                     |   2 +
 .../app/__tests__/concurrency-ui-surfaces.test.tsx | 155 +++++++++++++++++++
 .../scheduling-effective-concurrency.test.tsx      |  48 ++++++
 packages/dashboard/app/api/projects/projects.ts    |  10 +-
 packages/dashboard/app/api/settings/settings.ts    |  14 +-
 packages/dashboard/app/components/Board.tsx        |   7 +-
 packages/dashboard/app/components/Column.tsx       |  13 +-
 .../dashboard/app/components/EngineControlMenu.tsx |  17 ++-
 .../command-center/CommandCenterControls.tsx       |  17 ++-
 .../components/command-center/areas/TeamArea.tsx   |  10 +-
 .../app/components/dashboard/MainContent.tsx       |   3 +
 .../dashboard/app/components/dashboard/types.ts    |   2 +
 .../settings/sections/SchedulingSection.tsx        |  12 +-
 packages/dashboard/app/hooks/useAppSettings.ts     |   9 +-
 packages/dashboard/app/hooks/useExecutorStats.ts   |  10 +-
 .../app/utils/__tests__/worktreeGrouping.test.ts   |  12 +-
 packages/dashboard/app/utils/worktreeGrouping.ts   |   8 +-
 packages/dashboard/src/routes.ts                   |   6 +-
 ...concurrency-authoritative-source-routes.test.ts |  90 +++++++++++
 .../register-config-mcp-pi-settings-routes.test.ts |  29 +++-
 .../register-config-mcp-pi-settings-routes.ts      |  17 ++-
 .../src/routes/register-project-routes.ts          |  14 +-
 .../concurrency-effective-limit-surfaces.test.ts   |  34 +++++
 .../src/__tests__/project-engine-manager.test.ts   |  19 +++
 .../__tests__/scheduler-workflow-cutover.test.ts   |   6 +-
 packages/engine/src/concurrency/concurrency.ts     |  23 ++-
 packages/engine/src/concurrency/hybrid-executor.ts |  35 ++++-
 .../engine/src/executor/create-spawn-agent-tool.ts |   8 +-
 packages/engine/src/project-engine-manager.ts      |  50 +++++--
 packages/engine/src/project-engine.ts              |  12 +-
 packages/engine/src/project/project-manager.ts     |  26 +++-
 packages/engine/src/runtimes/in-process-runtime.ts |  12 +-
 packages/engine/src/scheduler.ts                   |  31 ++--
 packages/engine/src/triage.ts                      |  15 +-
 48 files changed, 1028 insertions(+), 159 deletions(-)

Fusion-Task-Id: FN-9185
Fusion-Task-Lineage: 6294456c-d417-40a5-a5fa-2035c6b964a6
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-21 10:57:44 -07:00
gsxdsm
74dacd0758 FN-9188: respect externally managed updates
Managed deployments can now suppress self-update offers while unsupported installs receive actionable guidance.

- Add an install-level environment policy for externally managed updates across CLI, server, and dashboard surfaces.
- Detect missing npm shell failures and replace raw stderr with deployment-aware remediation.
- Document managed-update behavior and add regression coverage for checks, installs, automation, and UI actions.

Files changed:
 .changeset/fn-9188-managed-updates.md              |  7 +++
 docs/architecture.md                               |  6 +--
 docs/cli-reference.md                              |  2 +-
 docs/dashboard-guide.md                            |  2 +-
 docs/settings-reference.md                         |  4 +-
 packages/cli/src/__tests__/update-cache.test.ts    | 11 ++++-
 .../update-command-externally-managed.test.ts      | 39 +++++++++++++++
 packages/cli/src/commands/update.ts                | 42 +++++++++++-----
 packages/cli/src/update-cache.ts                   |  3 +-
 .../core/src/__tests__/update-management.test.ts   | 15 ++++++
 packages/core/src/config/update-management.ts      | 21 ++++++++
 packages/core/src/index.gate.ts                    |  5 ++
 packages/core/src/index.ts                         |  5 ++
 packages/dashboard/app/api/client/health.ts        |  3 ++
 .../dashboard/app/components/SettingsModal.tsx     |  4 ++
 .../__tests__/SettingsModal.general.test.tsx       | 20 ++++++++
 .../__tests__/UpdateAvailableBanner.test.tsx       | 26 ++++++++++
 .../components/__tests__/settings-mobile.test.tsx  | 24 +++++++++-
 .../__tests__/SystemControlsArea.test.tsx          | 20 ++++++++
 .../command-center/areas/SystemControlsArea.tsx    |  6 +++
 .../app/hooks/__tests__/useUpdateCheck.test.ts     |  1 +
 packages/dashboard/app/hooks/useUpdateCheck.ts     |  3 +-
 .../dashboard/src/__tests__/auto-update.test.ts    | 10 ++++
 .../dashboard/src/__tests__/update-check.test.ts   | 56 ++++++++++++++++++++++
 packages/dashboard/src/auto-update.ts              |  9 +++-
 .../__tests__/register-update-check-routes.test.ts | 24 +++++++++-
 .../src/routes/register-update-check-routes.ts     | 47 +++++++++++++++++-
 packages/dashboard/src/update-check.ts             | 50 ++++++++++++++++---
 28 files changed, 433 insertions(+), 32 deletions(-)

Fusion-Task-Id: FN-9188

Fusion-Task-Lineage: 60b114b9-8bf7-434f-9d26-0c954aea45ba

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-21 10:18:45 -07:00
gsxdsm
704d74c9ba chore(release): v0.77.0-beta.6
Version bump via changesets.
2026-08-21 07:44:32 -07:00
Fusion Agent
c91e5ce42d FN-106: prevent workspace finalization livelock
Repair workspace merge-boundary finalization so empty repository sets cannot loop indefinitely.

- Track workspace merge readiness and durable per-repository obligations.
- Gate landing and recovery on scope, blockers, leases, and checkout ownership.
- Preserve remediation state, add recovery paths, documentation, and regression coverage.

Files changed:
 .../fn-106-workspace-finalization-livelock.md      |  7 ++
 docs/architecture.md                               |  6 ++
 ...e-empty-merge-boundary-finalization-livelock.md | 40 ++++++++++
 docs/workflow-steps.md                             |  4 +
 packages/cli/src/commands/__tests__/task.test.ts   |  2 +
 ...workspace-worktrees-concurrent-merge.pg.test.ts | 23 ++++++
 packages/core/src/store.ts                         |  9 ++-
 packages/core/src/task-store/task-mutation-ops.ts  | 49 +++++++++++-
 packages/core/src/task-store/task-update.ts        |  6 +-
 packages/core/src/types/task/task-core.ts          |  7 ++
 .../engine/src/__tests__/executor-test-helpers.ts  |  6 ++
 .../executor-workspace-main-checkout-guard.test.ts |  8 +-
 .../executor-workspace-session-cwd.test.ts         | 37 +++++++++
 .../engine/src/__tests__/project-engine.test.ts    | 14 +++-
 .../src/__tests__/reviewer-workspace.test.ts       | 72 ++++++++++++++++-
 .../__tests__/workspace-merge-readiness.test.ts    | 46 +++++++++++
 .../workspace-merger-idempotency.slow.test.ts      | 15 ++--
 .../src/__tests__/workspace-merger-lease.test.ts   |  4 +-
 .../workspace-root-worktree-routing.test.ts        | 47 +++++++++++
 .../create-authoritative-workflow-seams.ts         |  2 +
 .../engine/src/executor/create-task-done-tool.ts   | 15 ++++
 .../executor/ensure-graph-custom-node-worktree.ts  |  8 ++
 .../request-pre-merge-optional-step-fix.ts         | 49 +++++++++++-
 .../engine/src/executor/run-graph-custom-node.ts   | 24 ++++--
 packages/engine/src/executor/run-implementation.ts |  9 +++
 packages/engine/src/executor/send-task-back-for-fix.ts  |  4 +-
 .../src/executor/workspace-main-checkout-guard.ts  | 26 +++++-
 .../src/executor/workspace-review-remediation.ts   | 54 +++++++++++++
 .../src/executor/worktree-verify-invariants.ts     |  2 +-
 packages/engine/src/merge/merger-ai.ts             | 93 +++++++++++++++++-----
 .../engine/src/merge/workspace-merge-readiness.ts  | 64 +++++++++++++++
 packages/engine/src/project-engine.ts              | 37 +++++++--
 packages/engine/src/self-healing.ts                | 54 ++++++++++---
 .../engine/src/worktree/worktree-acquisition.ts   | 20 ++++-
 34 files changed, 787 insertions(+), 76 deletions(-)

Fusion-Task-Id: FN-106

Fusion-Task-Lineage: 70b5c13d-9e17-419d-90ac-7258697657ef

Co-authored-by: Fusion <noreply@runfusion.ai>
2026-08-21 14:41:37 +00:00
gsxdsm
9e0f64af9a chore(release): v0.77.0-beta.5
Version bump via changesets.
2026-08-20 22:40:47 -07:00
Fusion Agent
a2856ba629 FN-075: allow explicit dependency reference removal on task delete
Expose the safe, explicit dependency-cleanup retry through the task deletion tool.

- Add removeDependencyReferences plumbing to fn_task_delete.
- Verify refusal without the explicit option and replanning after cleanup.
- Document the operator-facing deletion behavior and publish the fix changeset.

Files changed:
 .changeset/fn-075-dependency-delete-option.md      |  7 ++
 docs/storage.md                                    |  3 +-
 .../cli/skill/fusion/references/extension-tools.md |  3 +-
 .../cli/skill/fusion/references/fusion-capabilities.md |  2 +-
 .../cli/src/__tests__/task-lineage-unlink.test.ts  | 81 +++++++++++++++++++++-
 packages/cli/src/extension.ts                      | 10 ++-
 6 files changed, 99 insertions(+), 7 deletions(-)

Fusion-Task-Id: FN-075
Fusion-Task-Lineage: 952c3563-079c-45a8-8b52-46a551ab6779
Co-authored-by: Fusion <noreply@runfusion.ai>
2026-08-21 04:32:53 +00:00
Fusion Agent
eb3eeb887a FN-074: remove task splitting and parent deletion
Remove complex-task splitting and parent-deletion behavior across core, dashboard, and engine.

- Remove subtask splitting, breakdown UI, and related API routes and lifecycle handling.
- Add the migration and prompt/documentation updates that enforce the simplified task model.
- Update affected tests and integrations for the removed behavior.

Files changed:
 .changeset/fn-074-removal.md                       |    7 +
 docs/dashboard-guide.md                            |   17 +-
 docs/gitlab-parity-inventory.md                    |    7 +-
 docs/mcp.md                                        |    6 +-
 docs/settings-reference.md                         |   16 +-
 docs/task-management.md                            |   31 +-
 docs/workflow-steps.md                             |   10 +-
 .../cli/skill/fusion/references/task-structure.md  |    2 +-
 .../cli/skill/fusion/workflows/specifications.md   |    4 +-
 packages/core/src/__tests__/agent-prompts.test.ts  |   19 +-
 .../builtin-workflow-settings-triage.test.ts       |   32 +-
 .../src/__tests__/postgres/schema-applier.test.ts  |    2 +-
 .../core/src/__tests__/prompt-overrides.test.ts    |    3 +-
 ...-deleted-observed-dispatch-side-effects.test.ts |    3 -
 .../task-deleted-outbox-consumer-backoff.test.ts   |    1 -
 packages/core/src/agents/agent-prompts.ts          |   56 +-
 packages/core/src/index.ts                         |    2 +-
 .../0062_remove_task_subtask_splitting.sql         |    2 +
 packages/core/src/postgres/schema-applier.ts       |   14 +-
 packages/core/src/postgres/schema/project.ts       |    1 -
 packages/core/src/store.ts                         |   12 +-
 packages/core/src/task-delete-attribution.ts       |   20 +-
 packages/core/src/task-delete-notice.ts            |    7 +-
 .../__tests__/lifecycle-outbox-writer.test.ts      |    4 +-
 .../core/src/task-store/archive-lifecycle-2.ts     |   13 +-
 packages/core/src/task-store/archive-lifecycle.ts  |    6 +-
 packages/core/src/task-store/lifecycle-outbox.ts   |    2 -
 packages/core/src/task-store/persistence.ts        |    2 -
 packages/core/src/task-store/serialization.ts      |    2 -
 packages/core/src/task-store/task-creation.ts      |    2 -
 .../src/task-store/task-deleted-outbox-consumer.ts |    4 -
 packages/core/src/task-store/task-mutation-ops.ts  |    2 +-
 packages/core/src/task-store/task-row-mappers.ts   |    2 +-
 packages/core/src/tasks/prompt-overrides.ts        |   35 -
 packages/core/src/types.ts                         |   12 -
 packages/core/src/types/mesh/archive-planning.ts   |    1 -
 packages/core/src/types/task/task-core.ts          |    3 -
 .../src/workflows/builtin-workflow-settings.ts     |   86 --
 packages/dashboard/app/App.tsx                     |   15 -
 .../mission-planning-modals-mobile.test.ts         |   15 -
 packages/dashboard/app/api/legacy.ts               |   18 +-
 packages/dashboard/app/api/planning/ai-text.ts     |  171 +---
 packages/dashboard/app/api/planning/planning.ts    |   46 -
 packages/dashboard/app/api/tasks/tasks.ts          |    4 +-
 packages/dashboard/app/components/AppModals.tsx    |   39 +-
 packages/dashboard/app/components/Board.tsx        |   10 +-
 packages/dashboard/app/components/Column.tsx       |    9 +-
 .../dashboard/app/components/InlineCreateCard.tsx  |   63 +-
 packages/dashboard/app/components/Lane.tsx         |    3 +-
 packages/dashboard/app/components/ListView.tsx     |   10 +-
 packages/dashboard/app/components/NewTaskModal.tsx |    8 +-
 .../dashboard/app/components/PlanningModeModal.css |  128 ---
 .../dashboard/app/components/PlanningModeModal.tsx |  566 +----------
 .../dashboard/app/components/QuickEntryBox.tsx     |   43 +-
 .../dashboard/app/components/SettingsModal.tsx     |    2 -
 .../app/components/SubtaskBreakdownModal.tsx       |  932 -----------------
 packages/dashboard/app/components/TaskCard.tsx     |    1 -
 packages/dashboard/app/components/TaskForm.tsx     |   23 +-
 .../__tests__/AgentPromptsManager.test.tsx         |    1 -
 .../app/components/__tests__/AppModals.test.tsx    |   92 +-
 .../app/components/__tests__/Board.test.tsx        |   69 +-
 .../components/__tests__/InlineCreateCard.test.tsx |  170 ----
 .../app/components/__tests__/ListView.test.tsx     |   38 -
 .../app/components/__tests__/NewTaskModal.test.tsx |   48 -
 .../components/__tests__/QuickEntryBox.test.tsx    |  293 +-----
 .../__tests__/SubtaskBreakdownModal.test.tsx       |  933 -----------------
 ...skDetail.mobile-transition.board-panel.test.tsx |    1 -
 .../__tests__/TaskDetail.swipe-back.test.tsx       |    1 -
 .../app/components/__tests__/TaskForm.test.tsx     |   67 --
 .../__tests__/WorkflowSettingsPanel.test.tsx       |   51 -
 .../app/components/__tests__/board-mobile.test.tsx |   20 -
 .../composer-settings-read-isolation.test.tsx      |   30 -
 .../components/__tests__/migratedModalFixtures.tsx |    2 -
 .../app/components/dashboard/MainContent.tsx       |    5 -
 .../dashboard/__tests__/DashboardBanners.test.tsx  |    1 -
 .../__tests__/MainContent.graph-popout.test.tsx    |    1 -
 .../dashboard/app/components/dashboard/types.ts    |    2 -
 .../app/components/workflow-setting-display.ts     |   10 -
 ...ckgroundSessions.resume-instrumentation.test.ts |    1 -
 .../hooks/__tests__/useBackgroundSessions.test.ts  |   25 +-
 .../app/hooks/__tests__/useModalManager.test.ts    |    3 -
 packages/dashboard/app/hooks/modalPersistence.ts   |   14 -
 .../dashboard/app/hooks/useBackgroundSessions.ts   |    9 +-
 packages/dashboard/app/hooks/useModalManager.ts    |   58 +-
 packages/dashboard/app/hooks/useProjectActions.ts  |    2 +-
 packages/dashboard/app/hooks/useTaskHandlers.ts    |    9 -
 packages/dashboard/app/utils/builtinPrompts.ts     |    7 -
 packages/dashboard/app/utils/projectStorage.ts     |    1 -
 .../src/__tests__/ai-session-diagnostics.test.ts   |    5 +-
 .../src/__tests__/github-tracking-state.test.ts    |   97 --
 .../src/__tests__/gitlab-delete-close.test.ts      |    6 +-
 .../gitlab-parity-inventory-documentation.test.ts  |    1 -
 .../src/__tests__/gitlab-split-close.test.ts       |  125 ---
 .../planning-flow-diagnostics-guardrail.test.ts    |    1 -
 .../src/__tests__/process-lifecycle.test.ts        |    1 -
 .../dashboard/src/__tests__/routes-auth.test.ts    |    2 -
 .../src/__tests__/routes-automation.test.ts        |    2 -
 .../dashboard/src/__tests__/routes-git.test.ts     |    2 -
 .../dashboard/src/__tests__/routes-github.test.ts  |   92 --
 .../src/__tests__/routes-planning-tracking.test.ts |  130 ---
 .../src/__tests__/routes-planning.test.ts          | 1062 +-------------------
 .../dashboard/src/__tests__/routes-system.test.ts  |    2 -
 .../dashboard/src/__tests__/routes-tasks.test.ts   |  902 -----------------
 .../shared-branch-group-entry-points.test.ts       |   93 --
 packages/dashboard/src/ai-session-diagnostics.ts   |    3 +-
 packages/dashboard/src/ai-session-store.ts         |    6 +-
 packages/dashboard/src/ai-session-timeout.ts       |    3 +-
 packages/dashboard/src/github-tracking-state.ts    |   43 +-
 packages/dashboard/src/gitlab-delete-close.ts      |    7 +-
 packages/dashboard/src/gitlab-lifecycle.ts         |    4 +-
 packages/dashboard/src/gitlab-split-close.ts       |  103 --
 packages/dashboard/src/gitlab-tracking-state.ts    |    2 +-
 packages/dashboard/src/index.ts                    |    1 -
 packages/dashboard/src/planning.ts                 |  171 ----
 packages/dashboard/src/routes.ts                   |    6 -
 ...er-planning-subtask-routes.parent-close.test.ts |  120 ---
 .../dashboard/src/routes/register-git-github.ts    |    6 -
 .../src/routes/register-planning-subtask-routes.ts |  773 +-------------
 .../src/routes/register-task-workflow-routes.ts    |    6 +-
 packages/dashboard/src/server.ts                   |    8 -
 packages/dashboard/src/subtask-breakdown.ts        |  833 ---------------
 packages/dashboard/src/triage-trait.ts             |   93 +-
 .../src/__tests__/agent-task-read-tools.test.ts    |    1 -
 .../triage-duplicate-search-regression.test.ts     |    3 -
 .../triage-split-into-subtasks-delete.test.ts      |  222 ----
 packages/engine/src/__tests__/triage.test.ts       |  519 +---------
 packages/engine/src/triage.ts                      |  239 +----
 127 files changed, 214 insertions(+), 10001 deletions(-)

Fusion-Task-Id: FN-074

Fusion-Task-Lineage: 23207799-4ec4-4ec7-bcd7-83cba4d98f53

Co-authored-by: Fusion <noreply@runfusion.ai>
2026-08-21 04:32:53 +00:00
gsxdsm
e40bcebc27 FN-9161: support operator workspace branches
Allow workspace tasks to use one operator-selected branch consistently across every sub-repository while preserving ownership during recovery.

- validate and persist operator branch provenance at task creation and update boundaries
- reuse custom branches across workspace worktrees, PR flows, cleanup, and self-healing without deleting operator-owned refs
- expose branch validation in task forms and document the workspace behavior
- add coverage and a release changeset for shared custom branch handling

Files changed:
 .changeset/fn-9161-workspace-custom-branch.md      |  7 ++
 docs/workspaces.md                                 |  6 ++
 packages/cli/src/commands/pr.ts                    | 10 ++-
 packages/cli/src/commands/task-lifecycle.ts        | 10 +--
 packages/cli/src/commands/task.ts                  |  4 +-
 packages/cli/src/extension.ts                      |  2 +-
 .../core/src/__tests__/branch-assignment.test.ts   | 37 ++++++++++
 .../task-update-awaiting-approval-reason.test.ts   |  8 +++
 .../core/src/async-stores/async-mission-store.ts   |  1 +
 packages/core/src/branch/branch-assignment.ts      | 64 +++++++++++++++++
 packages/core/src/index.gate.ts                    |  7 ++
 packages/core/src/index.ts                         |  7 ++
 packages/core/src/missions/mission-store.ts        |  1 +
 packages/core/src/store.ts                         |  2 +-
 packages/core/src/task-store/branch-context.ts     | 35 +++++++--
 packages/core/src/task-store/merge-queue-ops.ts    | 31 ++++----
 packages/core/src/task-store/task-creation.ts      | 30 ++++++++
 packages/core/src/task-store/task-mutation-ops.ts  | 18 ++++-
 packages/core/src/task-store/task-update.ts        | 60 ++++++++++++++--
 packages/core/src/types.ts                         |  5 ++
 packages/core/src/types/task/task-core.ts          | 20 +++++-
 packages/dashboard/app/components/NewTaskModal.tsx | 25 +++++--
 packages/dashboard/app/components/TaskForm.tsx     | 18 ++++-
 .../app/components/__tests__/NewTaskModal.test.tsx | 12 ++++
 packages/dashboard/src/pr-conflict-resolver.ts     | 14 ++--
 packages/dashboard/src/routes/branch-selection.ts  |  7 ++
 .../dashboard/src/routes/register-git-github.ts    | 18 +++--
 .../src/routes/register-task-workflow-routes.ts    | 17 ++++-
 .../engine/src/__tests__/worktree-hooks.test.ts    |  6 ++
 .../engine/src/__tests__/worktree-pool.test.ts     |  8 +++
 .../src/auto-recovery-handlers/branch-worktree.ts  | 20 +++---
 .../engine/src/execution/step-session-executor.ts  |  6 +-
 .../src/executor/build-foreach-worktree-deps.ts    |  5 +-
 .../engine/src/executor/create-task-done-tool.ts   |  8 +--
 packages/engine/src/executor/dep-abort-cleanup.ts  |  4 +-
 packages/engine/src/executor/mark-stuck-aborted.ts |  2 +-
 .../src/executor/release-pre-execution-worktree.ts |  2 +-
 packages/engine/src/executor/run-implementation.ts | 14 ++--
 .../src/executor/task-done-refusal-handler.ts      |  4 +-
 .../executor/worktree-branch-conflict-handle.ts    | 10 +--
 .../src/executor/worktree-cleanup-conflicting.ts   | 39 +++++-----
 .../src/executor/worktree-create-conflict.ts       |  1 +
 .../engine/src/executor/worktree-stale-branch.ts   |  9 +++
 .../src/healing/restart-recovery-coordinator.ts    |  2 +-
 packages/engine/src/merger.ts                      | 33 +++++----
 .../src/recovery/foreign-only-contamination.ts     |  8 ++-
 packages/engine/src/self-healing.ts                | 82 +++++++++++++++-------
 .../engine/src/worktree/worktree-acquisition.ts    | 52 ++++++++++----
 packages/engine/src/worktree/worktree-backend.ts   | 42 ++++++++---
 packages/engine/src/worktree/worktree-hooks.ts     | 24 +++++--
 packages/engine/src/worktree/worktree-names.ts     | 13 ++++
 packages/engine/src/worktree/worktree-pool.ts      | 17 ++++-
 52 files changed, 708 insertions(+), 179 deletions(-)

Fusion-Task-Id: FN-9161

Fusion-Task-Lineage: 5b0b9ecc-bead-471f-96f7-bec6698b69fc

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-19 21:42:29 -07:00
gsxdsm
53b57735f5 chore(release): v0.77.0-beta.4
Version bump via changesets.
2026-08-19 21:19:08 -07:00
gsxdsm
338dc173ff feat: pnpm dev --isolated runs against its own database and project
Working on Fusion from inside a machine that already runs one, a plain
`pnpm dev` shares that instance's LIVE database. Everything durable hangs off
$HOME/.fusion — settings, credentials, central DB, the embedded Postgres data
dir — and a process pointed at a data dir whose postmaster is already running
attaches to it instead of starting its own.

--isolated spawns the dev child with HOME pointed at a sandbox, so it gets its
own settings, credentials and Postgres cluster on its own port. It also moves
the child's cwd, which is the half that is easy to miss: `fn dashboard`
derives its project from the working directory and has no project flag, so
isolating HOME alone leaves both instances on `<repo>/.fusion` — including
`.fusion/tasks/<id>/`, which the orphaned-task-dir sweep re-imports, so a
fresh dev database would adopt the real instance's tasks.

The sandbox defaults to ~/.fusion-dev/<checkout-name>/{home,project}: outside
the work tree so it neither shows up in git status nor dies on a clean
checkout, and keyed by checkout so two clones cannot collide. The project dir
is git init-ed on first use because Fusion projects are git work trees.
Changing cwd is safe because PRELOAD/LOADER/ENTRY are already absolute.

Verified in a container beside a running Fusion: the isolated instance
reported zero projects while the real one reported two, on separate Postgres
clusters (ports 42617 and 38311).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-19 21:14:31 -07:00
ischindl
3d355465c7 feat(missions): done-credit via reverse lineage, feature re-point/unlink tools, and live unlink SSE (#3491)
## What this PR does

Closes three lifecycle gaps in the Mission → Milestone → Slice →
**Feature** model, where a feature links to exactly one delivery task
(single-valued `feature.taskId`, one-feature-one-task):

1. **Reverse-lineage done-credit** — a terminal, non-failed task
carrying a feature's reverse `missionLineage`
(featureId/sliceId/missionId) now credits the feature as satisfying its
acceptance criteria, independent of where the forward `feature.taskId`
points (e.g. a newer follow-up task). Credit is only applied when
**none** of the feature's lineage candidates is live, so a live
follow-up keeps the feature active. Fixes features that otherwise sit
"in-progress" forever after their delivering task completes.
2. **Re-point / unlink surface** — new `fn_feature_repoint_task` /
`fn_feature_unlink_task` agent tools (engine + CLI) backed by an atomic
`repointFeatureToTask` store primitive, so a mis-linked feature can be
re-attached to the correct delivery task or unlinked — without a manual
DB edit. Single-valued `feature.taskId` and one-feature-one-task
invariants are preserved; unlinking an already-unlinked feature errors
clearly. Classified as mutation tools, same class as the existing
`fn_feature_link_task`.
3. **Live SSE update** — the `feature:unlinked` store event is now
emitted over SSE (`event: feature:unlinked`) so the dashboard refreshes
immediately after a re-point/unlink instead of waiting for the next
poll.

## Why

The forward-only `feature.taskId` link made three real failure modes
unrecoverable from the product surface: stale done-features after task
replacement, permanently mis-linked features, and a stale dashboard
after a repair. This closes the feature lifecycle end-to-end.

## Invariants

- `feature.taskId` stays single-valued; one feature is linked to at most
one task at any time (atomic store primitive).
- Done-credit requires: terminal column, non-failed, and no live lineage
candidate.
- No new run-audit prose; store events carry ids/counts/outcomes only.

## Tests

- `mission-state-reconcile.test.ts` — reverse-lineage credit matrix
(live vs. terminal vs. failed candidates)
- `mission-store.pg.test.ts` — `repointFeatureToTask` atomicity +
invariants (PG; gate-safe auto-skip without Postgres)
- `agent-mission-tools.test.ts` — tool delegation (unlink / re-point
exactly once)
- `heartbeat-executor.test.ts`, `extension.test.ts` — tool exposure and
heartbeat interaction
- Changeset: `@runfusion/fusion: minor`

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Added tools to reassign a feature to another live task or remove its
task link.
- Unlinking resets the feature to a defined state and provides clear
errors when applicable.
  - Added live updates for feature unlink events.
- Improved reconciliation to recognize completed reverse-lineage work
while respecting active follow-up tasks and failures.
- Improved relationship consistency when concurrent task-link operations
occur.

- **Documentation**
- Documented feature linking, unlinking, reassignment, lifecycle events,
and reconciliation behavior.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Fusion <noreply@runfusion.ai>
2026-08-19 21:01:56 -07:00
Fusion Agent
29f4de39c4 FN-038: prepare projects for Git during onboarding
Make project initialization and registration produce Git-ready projects consistently.\n\n- Centralize repository readiness and initialization behavior.\n- Update CLI onboarding and dashboard registration flows to use the Git-ready setup.\n- Add regression coverage and document the new project preparation behavior.\n\nFiles changed:\n .changeset/fn-038-git-ready-projects.md            |   7 +\n docs/cli-reference.md                              |  11 +-\n docs/getting-started.md                            |  17 +-\n docs/workspaces.md                                 |   4 +-\n packages/cli/src/commands/__tests__/init.test.ts   |  39 ++--\n packages/cli/src/commands/init.ts                  | 115 ++--------\n packages/core/src/__tests__/git-repository.test.ts | 125 +++++++++-\n packages/core/src/central/central-core.ts          |  57 +++--\n packages/core/src/git/git-repository.ts             | 254 +++++++++++++++++----\n packages/dashboard/app/api/projects/projects.ts    |   2 -\n packages/dashboard/app/components/SetupWizardModal.tsx |  46 +---\n packages/dashboard/app/components/__tests__/SetupWizardModal.git-missing.test.tsx |  74 +++---\n packages/dashboard/src/routes/__tests__/register-project-git-readiness.test.ts | 165 +++++++++++++\n packages/dashboard/src/routes/register-project-routes.ts |  11 -\n 14 files changed, 647 insertions(+), 280 deletions(-)

Fusion-Task-Id: FN-038

Fusion-Task-Lineage: 83634184-569b-4190-a88f-4a09eb832e9d

Co-authored-by: Fusion <noreply@runfusion.ai>
2026-08-20 03:57:23 +00:00
Fusion Agent
c3ff663c1c FN-030: route refinement tasks directly to planning
Route refinement and duplicate-task handling through the planning path while preserving task metadata and API behavior.\n\n- Route CLI refinement commands directly into planning.\n- Harden dependency updates and duplicate-task refinement persistence.\n- Expand PostgreSQL, CLI, and dashboard authorization coverage.\n- Document the refined task lifecycle and add the published-package changeset.\n\nFiles changed:\n .changeset/fn-030-refinement-planning-route.md     |   7 ++\n docs/architecture.md                               |  20 ++--\n docs/task-management.md                            |  11 +-\n packages/cli/src/commands/__tests__/task.test.ts   |   9 +-\n packages/cli/src/commands/task.ts                  |   2 +-\n .../postgres/refine-duplicate-task.pg.test.ts      | 130 +++++++++++++++++++++\n .../__tests__/postgres/store-comments.pg.test.ts   |  32 +++++\n packages/core/src/task-store/update-task-deps.ts   |  17 +--\n packages/dashboard/app/__tests__/api-auth.test.ts  |   5 +-\n 9 files changed, 207 insertions(+), 26 deletions(-)

Fusion-Task-Id: FN-030

Fusion-Task-Lineage: 885c0a9f-d8bf-4abf-9ec9-dca5a01648e8

Co-authored-by: Fusion <noreply@runfusion.ai>
2026-08-20 03:55:39 +00:00
gsxdsm
7ded57e550 FN-9167: clear interrupted manual merge status
Prevent interrupted manual merges from leaving tasks stranded in a transient merging state.

- track locally owned merge stamps and clear them through fenced abort cleanup
- handle SIGINT, SIGTERM, and SIGHUP for foreground task merges with documented exit behavior
- reconcile only age-proven orphan stamps before manual CLI and UI-only dashboard merges
- cover merge stamp authorization, signal cleanup, and mock completeness with regression tests
- add a patch changeset and operator documentation

Files changed:
 .../fn-9167-interrupted-manual-merge-stamp.md      |   7 +
 docs/cli-reference.md                              |   1 +
 docs/task-management.md                            |   2 +-
 .../task-command-github-import-tracking.test.ts    |   3 +
 packages/cli/src/commands/__tests__/task.test.ts   | 179 +++++-
 packages/cli/src/commands/dashboard.ts             |   3 +
 packages/cli/src/commands/task.ts                  | 138 +++--
 .../merge-orphan-durable-write-inventory.json      | 608 +++++++++++----------
 .../src/__tests__/merge-active-status.test.ts      |  49 ++
 packages/engine/src/index.ts                       |   2 +
 .../engine/src/merge/clear-orphaned-merge-stamp.ts |  80 +++
 packages/engine/src/merge/merger-ai.ts             |  12 +
 packages/engine/src/project-engine.ts              |  20 +-
 13 files changed, 735 insertions(+), 369 deletions(-)

Fusion-Task-Id: FN-9167

Fusion-Task-Lineage: 554380e2-ce55-4e7a-89fd-f5c24341937b

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-19 20:17:42 -07:00
gsxdsm
3b0a6b795f FN-9162: Group workspace worktrees under configurable roots
Configure collision-safe workspace and repository subfolders beneath custom worktree roots.

- add shared workspace layout helpers and export them through runtime and gate barrels
- route acquisition, pinning, cleanup, archive, and extension discovery through grouped paths
- allow absolute worktree roots in settings and document the workspace layout
- protect shared-root containers from destructive sweeps and cover multi-repository behavior

Files changed:
 .changeset/fn-9162-workspace-worktree-root.md      |   7 ++
 docs/settings-reference.md                         |   2 +-
 docs/workspaces.md                                 |   6 ++
 .../extension-workspace-worktree-root.test.ts      |  81 +++++++++++++++++
 packages/cli/src/extension.ts                      |  53 ++++++++++-
 packages/core/src/__tests__/pi-extensions.test.ts  |  46 +++++++++-
 .../core/src/__tests__/worktree-layout.test.ts     |  49 ++++++++++
 packages/core/src/index.gate.ts                    |  13 +++
 packages/core/src/index.ts                         |   9 ++
 packages/core/src/plugins/pi-extensions.ts         |  12 ++-
 packages/core/src/task-store/archive-lifecycle.ts  |  11 +--
 packages/core/src/tasks/worktree-layout.ts         |  77 ++++++++++++++++
 .../dashboard/app/components/SettingsModal.tsx     |   4 +-
 .../settings/sections/WorktreesSection.tsx         |   2 +-
 .../worktree-acquisition-workspace.test.ts         |  55 ++++++++++-
 .../engine/src/__tests__/worktree-paths.test.ts    |  19 +++-
 .../engine/src/__tests__/worktree-pinning.test.ts  |  17 ++++
 .../engine/src/__tests__/worktree-pool.test.ts     |  19 +++-
 .../src/executor/workspace-main-checkout-guard.ts  |   2 +-
 packages/engine/src/self-healing.ts                |  20 +++-
 .../engine/src/worktree/worktree-acquisition.ts    | 101 +++++++++++++++------
 packages/engine/src/worktree/worktree-names.ts     |  14 +--
 packages/engine/src/worktree/worktree-paths.ts     |  75 ++++++++++++---
 packages/engine/src/worktree/worktree-pinning.ts   |  10 +-
 packages/engine/src/worktree/worktree-pool.ts      |  44 ++++++---
 25 files changed, 656 insertions(+), 92 deletions(-)

Fusion-Task-Id: FN-9162

Fusion-Task-Lineage: b5f5e247-577c-4357-9ffe-97e2447b4fd4

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-19 19:46:35 -07:00
gsxdsm
f57661a013 chore(release): v0.77.0-beta.3
Version bump via changesets.
2026-08-18 22:16:44 -07:00
gsxdsm
ad24d9a0eb fix: TUI Enter crash, and show any running tunnel in the System panel
Enter on the System panel killed the TUI. It opens the dashboard URL with a
detached spawn, and a MISSING opener — xdg-open on any slim Linux container,
exactly where Fusion runs headless — is reported asynchronously as an 'error'
event rather than a synchronous throw. The try/catch around spawn never saw
it, so Node re-threw an 'error' with no listener and took the dashboard down.

The tunnel row now covers any tunnel, not just `pnpm dev --tunnel`:
SystemInfo.devTunnelUrl becomes tunnelUrl, fed by the dev wrapper's IPC
hand-off AND by the engine's TunnelProcessManager status subscription. An
operator's remote tunnel URL previously lived only in the Settings UI and
/remote/status, so a headless terminal could not read the address its own
Fusion was reachable at. A dev tunnel wins when both exist, and a stopped
tunnel clears the row rather than stranding a dead URL.

And the panel measures the row it draws. estimateSystemContentRows accounted
for URL and Token but not Tunnel, so a wrapping trycloudflare hostname was
squeezed out of the panel it had just been added to.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-18 21:57:57 -07:00
gsxdsm
5422063fb9 test: pin the dev tunnel row in the TUI system panel
Covers the render both ways: the Tunnel row appears with its URL when a
tunnel is published, and is absent for an ordinary `fn dashboard` run.
Verified by mutation — deleting the row from app.tsx fails the first test.

Driving this through a real TTY proved impractical from a non-interactive
shell (isTTYAvailable needs stdin AND stdout to be TTYs, which neither
`docker exec -t` nor a detached `script` provides), so the render is pinned
here instead of by observation.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-18 21:30:47 -07:00
gsxdsm
204772bcc3 fix: show the dev tunnel URL in the TUI instead of painting over it
`pnpm dev --tunnel` printed its banner to stdout, and a TTY run then handed
the screen to DashboardTUI, which repainted over it. The public URL — the
entire output of the flag — was unreadable.

The wrapper forwards the URL to the dev child over the IPC channel it already
uses for the listening report, and the dashboard renders a Tunnel row in the
system panel beside URL and Token.

Capture is order-independent. cloudflared can publish before or after the TUI
is constructed, and an IPC message that arrives with no listener attached is
lost, so the URL is stored at run scope on arrival and applied by whichever
half completes second.

Watch-mode restarts reuse the tunnel (a fresh quick tunnel would hand out a
new hostname on every reload), but the new child knows nothing about it, so
the wrapper re-announces on each listening report.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-18 21:20:34 -07:00
gsxdsm
16e63462cc fix: audit fallout — tunnel port, orphaned dev processes, scrollback clear
Auditing for repeats of the `pnpm dev --tunnel` bugs turned up the same
mistakes elsewhere.

Remote tunnels assumed 4040. ProjectEngine's Cloudflare quick tunnel
hardcoded http://localhost:4040, so a dashboard on an explicit --port, a PORT
override, or runDashboard's EADDRINUSE rebind published a PUBLIC tunnel to
whatever else held 4040. The dashboard now records its bound port
(setLocalDashboardPort, from both runDashboard and headless serve) and the
tunnel reads it, keeping 4040 only as the pre-report default.
register-discovery-routes already derived its port from req.socket.localPort
and is untouched.

Stopping the dev wrapper orphaned everything it started. It installed no
signal handlers, so teardown only ran from the child's close handler:
signalling the wrapper left the dev server AND its cloudflared alive —
observed twice, four surviving processes each time, including a public
trycloudflare URL still serving a dev server believed to be down. Ctrl-C hid
it by signalling the whole process group.

SessionTerminal appended scrollback instead of clearing first, though the
server sends it as a separate frame precisely so the client can clear. Latent
today because every reattach builds a fresh xterm; a duplicated-history bug
the moment an in-place reconnect appears.

And BackupManager's centralDbPath is gone: written, never read, and a
leftover of the removed SQLite backup — the same class of stale artifact that
onboarding was using as evidence about a Postgres install.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-18 21:09:03 -07:00
gsxdsm
b67e3aa8bc fix: stop onboarding ambushing a working install with questions
Two defects, both visible as "why is it asking me about AI provider setup
when I just started a dev server?".

The auto-launch gate probed ~/.fusion/fusion-central.db to decide whether the
install was initialized. SQLite central was removed, so a Postgres install
never creates that file and the probe was permanently false: onboarding
auto-launched on every interactive start of a completely working Fusion,
until something happened to stamp the completion marker. The probe now also
accepts the embedded Postgres data directory.

And auto-launched onboarding ran the full interactive flow. It fires while
the operator is starting something else, so its questions interrupt work
nobody asked to interrupt — and a dev server stopped on a prompt never
listens, which is why `pnpm dev --tunnel` produced no dev server and so no
tunnel link. Auto-launch is now non-interactive: create the central database,
stamp the marker, point at the dashboard, ask nothing. `fn onboard` still
runs every step.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-18 20:55:18 -07:00
gsxdsm
ce69558c7a fix: always create the central DB during onboarding, never ask
The step was a skippable prompt, but declining left an install Fusion cannot
run on — reported by a line that described the breakage without fixing it.
There is no useful negative answer.

It also blocked non-interactive startup: `pnpm dev --tunnel` sat on "Run
central db now? (Y/n)", never reached listening, and so served nothing at all
while the tunnel had no dev server to point at.

The database is now created unconditionally when absent; the already-exists
path is untouched. Scripted onboarding tests lose their leading central-DB
answer, and the skip-every-step case now asserts the database is still
created.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-18 20:40:34 -07:00
gsxdsm
6f461a4744 fix: take the dev tunnel's token from the dev server, not a guessed file
The banner re-derived the token from ~/.fusion/settings.json. That is simply
the wrong source: on a real run the file contained no daemonToken while the
dashboard's own banner, two lines above, printed a working one — so the
tunnel claimed no token existed next to a token that plainly did.

The dashboard already holds the resolved token at the point where it reports
its bound port, so it now reports both over the same IPC message and the
wrapper prefers that over anything it could derive. The env/settings lookup
survives only for targets that report nothing, such as an explicit
--tunnel=PORT aimed at a server the dev child knows nothing about. The token
crosses the existing parent/child channel only; it is never logged or sent
onward.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-18 20:16:44 -07:00
gsxdsm
0289d26b13 fix: tunnel the dev server's real port, not whatever holds 4040
The tunnel target was resolved from PORT/4040 before anything bound, but an
occupied port makes the dashboard silently rebind to an ephemeral one
(server.listen(0) on EADDRINUSE). With a normal Fusion already running on
4040, `pnpm dev --tunnel` therefore published THAT instance under a
dev-looking URL while the dev server sat unreachable on a random port.

The dashboard now reports the port it actually bound to the dev supervisor
over IPC, and the wrapper tunnels that:

- IPC is enabled whenever --tunnel is set, not only in watch mode; a plain
  tunnel run previously had no channel at all.
- The tunnel waits for the report (60s cap, then falls back to the configured
  port with a warning), so it also cannot come up against a port nothing is
  serving yet.
- A mismatch is logged instead of silent.
- A reported port is treated as the dashboard whatever its number, so the
  banner keeps printing the bearer token; without that, the ephemeral case
  would classify the dev dashboard as a foreign port and drop it.
- An explicit --tunnel=PORT names a target the dev child knows nothing about,
  so it never waits and is still compared against the configured port.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-18 18:49:42 -07:00
gsxdsm
ee57f8a3b9 fix: print the dashboard token with the dev tunnel URL
`pnpm dev --tunnel` published a bare URL under a "public, unauthenticated"
header. That label was wrong for the flag's own default target: --tunnel with
no port aims at the dashboard, which is bearer-token gated, so the recipient
of a shared link got a 401 with no token to supply.

resolveDevTunnelAuth() now classifies the target and the banner says what is
actually true of it:

  token         dashboard with auth on — prints the token and a ?token= link,
                resolved from FUSION_DASHBOARD_TOKEN, FUSION_DAEMON_TOKEN,
                then ~/.fusion/settings.json
  token-pending first run, token not minted yet — defers to the dashboard's
                own startup banner
  no-auth       --no-auth is on; the dashboard really is open
  foreign       a non-dashboard port; Fusion has no auth to lend it, the only
                genuinely ungated case

Auth resolves at banner time rather than flag-parse time so a token the dev
child mints on a first authenticated run is already readable.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-18 18:21:50 -07:00
gsxdsm
7423555c46 feat(dev): pnpm dev --tunnel publishes the dev server over a quick tunnel
Operator case: someone works inside a remote Fusion (a container, a shared box),
starts a dev server there, and needs to view it from their own browser. The dev
server binds inside that machine, so without a tunnel the only options are port
publishing or a VPN — both needing cooperation from whoever owns the host.

  pnpm dev --tunnel            # tunnels the dashboard port (PORT, default 4040)
  pnpm dev --tunnel=5173       # tunnels a Vite dev server instead
  pnpm dev --tunnel dashboard  # tunnel the default port AND run the dashboard
  FUSION_DEV_TUNNEL=1 pnpm dev

Cloudflare QUICK tunnels are usable here precisely because a dev server is HTTP:
no account, no domain, no card. The TCP endpoints that SSH would have needed
require a card (ngrok) or a domain plus Zero Trust (Cloudflare) — that asymmetry
is why this exists for HTTP only, and it is recorded in the module header so the
next person does not retry the SSH variant.

Design decisions:
- Tunnel failure is NON-FATAL. A missing cloudflared or a tunnel that never
  publishes a URL logs and is skipped; losing a preview URL must never cost the
  operator their dev loop.
- Watch-mode restarts reuse the existing tunnel. A fresh quick tunnel hands out a
  different hostname each time, which would invalidate an already-shared link.
- `--tunnel` consumes a following token only when it is numeric, so
  `--tunnel dashboard` forwards `dashboard` to the dev command rather than
  tunnelling port NaN. That is the bug this flag shape invites, so it is tested.

Verified end to end in a container: a dev server bound to 127.0.0.1 inside it was
fetched from the public internet through the tunnel (200, correct body). Also
confirmed that tunnelling the DASHBOARD port does not weaken auth — unauthenticated
requests through the tunnel return 401 for /api/tasks, /api/settings and
/api/artifacts, with only /api/health open by design.

Adding two fields to parseDevWrapperArgs' return broke two existing strict toEqual
assertions; those were updated rather than loosened to toMatchObject. 27 tests pass.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-18 17:18:56 -07:00
gsxdsm
86950400c9 chore(release): v0.77.0-beta.2
Version bump via changesets.
2026-08-18 00:22:21 -07:00
Timoteo
725b0a3330 feat: expose Fusion custom tools to ACP agents via loopback MCP bridge (#3476)
## Summary

- ACP runtimes can expose Fusion custom tools (`fn_*`) to external
agents such as Hermes ACP and Prime.
- When the engine passes `customTools`, `AcpRuntimeAdapter` starts a
per-session loopback tool bridge and registers it as a stdio MCP server
in `session/new.mcpServers`.
- The bridge uses a per-session bearer token, binds only to loopback,
preserves the MCP request ID as `toolCallId`, propagates tool `isError`
results, and exposes only runnable non-built-in tools.
- The MCP shim supports `initialize`, `ping`, `tools/list`, and
`tools/call`, reporting transport, authentication, malformed-request,
and unknown-tool failures correctly.
- Bridge startup failures degrade gracefully: the ACP session remains
usable without custom tools and exposes a fixed `fusionToolBridgeError`
reason code for engine auditing.
- Startup, request, and teardown paths clean temporary schemas and
listeners; disposal aborts cooperative tools, bounds non-cooperative
drains, prevents post-dispose execution, and preserves the existing
synchronous session contract through an awaitable `disposePromise`.
- The packaged CLI stages `mcp-schema-server.cjs` beside the ACP runtime
distribution.

## Verification

Validated at source commit `2fa6fd2e26923ac6241d1b9379b3819f1832c079`:

- `pnpm --filter @fusion-plugin-examples/acp-runtime test` — 21 files /
251 tests passed
- `pnpm --filter @fusion-plugin-examples/acp-runtime typecheck` — passed
- Plugin build with `.cjs` asset copy — passed
- `pnpm check:changesets` — passed
- `git diff --check` — passed
- MCP shim smoke test — passed
- Greptile Review — passed
- CodeRabbit — passed
- Devin review — 0 bugs, 6 analyses, `errored_tasks=[]`, quality `4/10`

## Scope

ACP runtime plugin only. The Hermes CLI runtime remains untouched;
Hermes ACP is enabled by selecting the generic ACP runtime with
`acpBinaryPath: hermes` and `acpArgs: ["acp"]`.

---------

Co-authored-by: gsxdsm <gsxdsm@users.noreply.github.com>
2026-08-18 00:11:06 -07:00
gsxdsm
7380be699c chore(release): v0.77.0-beta.1
Version bump via changesets.
2026-08-16 08:39:57 -07:00
gsxdsm
dd1e0f22e1 chore(release): v0.77.0-beta.0
Version bump via changesets.
2026-08-16 00:32:50 -07:00
Phil Larson
aedcb681b9 test(cli): refresh task command store fixtures (#3459)
## Summary
- keep CLI task command store mocks aligned with required settings and
retry-budget capabilities
- preserve resolved-store identity while filling production-shaped test
capabilities
- update task-create assertions for synchronous post-create tracking
ownership

## Test plan
- `corepack pnpm --filter @runfusion/fusion exec vitest run
src/commands/__tests__/task.test.ts --silent=passed-only --reporter=dot`
- `corepack pnpm --filter @runfusion/fusion typecheck`
- `corepack pnpm lint`

## CI note
- Build, Gate, Typecheck, Desktop packaging, CodeRabbit, and Greptile
pass on head `6632fd7e4`.
- Lint reaches the lifecycle-column ratchet, then hits current-main
mailbox census drift already fixed by green PR #3440.

Co-authored-by: gsxdsm <gsxdsm@users.noreply.github.com>
2026-08-15 21:43:53 -07:00
gsxdsm
0ec3c76faf fix(FN-9093): eagerly install bundled Cursor runtime plugin at host boot
The Cursor provider card's Enable action only flips useCursorCli in
settings and never registers fusion-plugin-cursor-runtime, so
getRuntimeById("cursor") missed and every cursor-cli selection hit the
runtime-routed fail-fast error even with an authenticated cursor-agent.
Mirror the FN-7761 Grok eager bootstrap in serve, dashboard, and daemon,
guarded by the same source-scan regression test.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-15 21:07:02 -07:00
Phil Larson
81b1860f95 fix(ci): correct future FNXC stamps (#3440)
## Summary
- replaces newly added future-dated FNXC metadata with the actual UTC
change time
- tightens the FNXC future-date baseline to zero known exceptions

## Test plan
- `pnpm check:fnxc-future-dates`
- `pnpm check:lifecycle-columns`
- `pnpm check:changesets`
- `pnpm --filter @runfusion/fusion exec vitest run
src/__tests__/staged-plugin-core-imports.test.ts --silent=passed-only
--reporter=dot`
- `pnpm --filter @fusion/engine typecheck`
- `pnpm lint`
2026-08-15 17:16:05 -07:00
gsxdsm
c0e568bf78 FN-9100: fix staged Cursor core imports in CLI builds
Ensure staged plugin core runtime imports resolve reliably in packaged CLI builds.

- Export Cursor runtime core helpers from the CLI runtime shim.
- Guard staged plugin imports against undeclared or unavailable core exports.
- Add Cursor bundle coverage and document the focused packaging test.
- Add a patch changeset for the published CLI package.

Files changed:
 .changeset/fn-9100-staged-plugin-core-shim.md      |   7 +
 docs/testing.md                                    |   1 +
 .../__tests__/plugin-sdk-core-runtime-shim.test.ts |  40 +++-
 .../__tests__/staged-plugin-core-imports.test.ts   | 221 +++++++++++++++++++++
 packages/cli/src/plugin-sdk-core-runtime-shim.mjs  |  10 +-
 5 files changed, 272 insertions(+), 7 deletions(-)

Fusion-Task-Id: FN-9100

Fusion-Task-Lineage: 4c25ef74-065d-4e5a-86f2-e6f9a22500b3

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-15 12:04:30 -07:00
gsxdsm
c7779e44ac FN-9055: guard archive disposal of live workspace worktrees
Prevent archive cleanup from removing worktrees that still belong to live tasks.

- Add shared archive liveness evaluation and transactional refusal guards.
- Require CLI and extension archive operations to refuse live tasks unless a human uses --force.
- Protect baseline archive worktree disposal and cover CLI, core, and engine paths with tests.

Files changed:
 .changeset/fn-9055-archive-live-worktree-guard.md  |  7 ++
 docs/cli-reference.md                              |  4 +-
 docs/task-management.md                            |  4 +-
 .../extension-task-archive-live-guard.test.ts      | 82 +++++++++++++++++++
 packages/cli/src/bin.ts                            |  6 +-
 packages/cli/src/commands/__tests__/task.test.ts   | 66 ++++++++++++++-
 packages/cli/src/commands/task.ts                  | 49 +++++++++---
 packages/cli/src/extension.ts                      | 25 ++++--
 .../src/__tests__/archive-live-task-guard.test.ts  | 70 ++++++++++++++++
 .../postgres/archive-live-task-fence.pg.test.ts    | 69 ++++++++++++++++
 .../src/__tests__/task-archive-liveness.test.ts    | 19 +++++
 packages/core/src/index.ts                         | 10 +++
 packages/core/src/store.ts                         |  4 +-
 .../core/src/task-store/archive-lifecycle-2.ts     | 27 +++++--
 packages/core/src/task-store/archive-lifecycle.ts  | 20 ++---
 .../src/task-store/async/async-archive-lineage.ts  | 17 +++-
 packages/core/src/tasks/task-archive-liveness.ts   | 56 +++++++++++++
 ...chive-baseline-disposer-live-task-guard.test.ts | 93 ++++++++++++++++++++++
 .../healing/archive-worktree-disposer-install.ts   | 15 +++-
 19 files changed, 592 insertions(+), 51 deletions(-)

Fusion-Task-Id: FN-9055

Fusion-Task-Lineage: 08644626-cc61-4854-abb9-5b415ddc9491

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-15 00:35:12 -07:00
gsxdsm
9ba6a67695 fix: create CLI GitHub tracking issues synchronously before process exit
The task-created hook (GitHub tracking issue creation) was deferred behind
the fire-and-forget auto-title-summarize chain whenever autoSummarizeTitles
is on and the task has a long description and no title — i.e. for every
'fn task create'. The short-lived CLI process closed the store and exited
before the deferred chain ran, so tasks ended up with
githubTracking.enabled=true but no issue (observed on FN-9045..FN-9061).

fn task create now suppresses the deferred hook and calls
createTrackingIssueForTask directly after create, printing the linked
issue; exports that helper from @fusion/dashboard.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-14 21:55:49 -07:00
gsxdsm
41d415fe70 FN-9051: report blocked workspace finalization
Prevent workspace merge entry points from treating an unfinalized task as a successful merge.

- Add a typed blocked-finalization result and engine handling that avoids retries, failure parking, and branch promotion.
- Return blocked outcomes through dashboard and CLI merge surfaces.
- Cover blocked finalization behavior and publish a patch changeset.

Files changed:
 .changeset/fn-9051-workspace-blocked-finalize.md   |   7 ++
 packages/cli/src/commands/__tests__/task.test.ts   |  38 ++++++++
 packages/cli/src/commands/dashboard.ts             |  22 +++--
 packages/cli/src/commands/task.ts                  |  19 ++--
 .../engine/src/__tests__/project-engine.test.ts    | 105 ++++++++++++++++++++-
 .../engine/src/__tests__/workspace-merger.test.ts  |   1 +
 packages/engine/src/index.ts                       |   1 +
 packages/engine/src/merge/merger-ai.ts             |  28 +++++-
 packages/engine/src/project-engine.ts              |  42 ++++++++-
 9 files changed, 240 insertions(+), 23 deletions(-)

Fusion-Task-Id: FN-9051

Fusion-Task-Lineage: 89d5fcbb-1a00-4429-87ea-fc3e34db2706

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-14 21:51:45 -07:00
gsxdsm
52a28d39ff feat: add per-task GitHub tracking overrides to task create (fn_task_create + CLI)
fn_task_create gains github_tracking/github_repo params and fn task create
gains --github/--no-github/--github-repo flags, resolved through
resolveTaskGithubTracking (task > project > global). CLI create now also
honors the project/global tracking-enabled default it previously ignored;
explicit disables persist enabled:false so later default flips cannot
re-enable a task.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-14 21:12:15 -07:00
gsxdsm
66b1c046c5 test: assert Memory Keeper in fresh-project built-in agent listings
Fusion-Task-Id: automation

FN-8932 seeds the durable Memory Keeper alongside the four routed workflow principals, so fn_list_agents and fn_agent_org_chart now enumerate five built-in agents on a fresh project. Update the two extension.test.ts assertions from count 4 to 5 and assert Memory Keeper is present.
2026-08-14 17:04:07 -07:00
gsxdsm
9d31396f7a FN-9031: strengthen computer snapshot action fencing
Serialize computer snapshots and actions through a durable app-scoped fence.

- Hold the fence from snapshot acquisition or element resolution through OS action consumption.
- Report snapshot consumption only when the expected latest pointer was invalidated.
- Heartbeat and token-check directory locks for safe crash recovery and add command-fence coverage.

Files changed:
 .../commands/__tests__/computer-commands.test.ts   | 26 +++++++++-
 .../__tests__/computer-snapshot-index.test.ts      |  2 +-
 packages/cli/src/commands/computer.ts              | 37 ++++++++-----
 .../cli/src/commands/computer/snapshot-store.ts    | 60 ++++++++++++++++------
 4 files changed, 93 insertions(+), 32 deletions(-)

Fusion-Task-Id: FN-9031

Fusion-Task-Lineage: f196b7ca-ce3f-4a50-98d2-d6ac8bf184ac

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-13 17:44:02 -07:00
gsxdsm
2dcead4c8f FN-9035: prevent static computer commands in shipped skills
Keep bundled computer-use guidance limited to runtime discovery so command syntax cannot drift.

- Scan all shipped skill markdown files, including plugin skills
- Reject static `fn computer` commands outside the computer-use discovery stub
- Assert the discovery stub exposes only its supported JSON probes

Files changed:
 packages/cli/src/commands/__tests__/computer-use-skill.test.ts | 50 ++++++++++++++++++++--
 1 file changed, 47 insertions(+), 3 deletions(-)

Fusion-Task-Id: FN-9035

Fusion-Task-Lineage: 5049fd29-1b3b-4968-b09e-1bb7be9d52ff

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-13 17:01:39 -07:00
gsxdsm
1788dc0506 FN-9033: harden macOS computer-use permission handling
Treat missing osascript as an explicit automation denial while preserving replay failures.

- Track missing osascript separately from indeterminate permission probes.
- Block all macOS automation paths before execution when osascript is unavailable.
- Preserve replay permission and timeout errors, mapping only stale locators to element errors.
- Add coverage for replay failures and missing-binary enforcement.

Files changed:
 .../__tests__/computer-adapter-registry.test.ts    | 87 +++++++++++++++++++++-
 .../commands/__tests__/computer-commands.test.ts   | 29 +++++++-
 .../cli/src/commands/computer/adapter-macos.ts     | 52 +++++++------
 3 files changed, 142 insertions(+), 26 deletions(-)

Fusion-Task-Id: FN-9033
Fusion-Task-Lineage: 48e77cc5-cd71-49f1-a163-13d68a81d1d4
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-13 16:55:23 -07:00
gsxdsm
7673f2e839 FN-9031: enforce snapshot consumption after computer actions
Computer-use actions now consume the captured app snapshot and require a fresh state capture before another element-targeted action.

- Add app-scoped, serialized snapshot-pointer consumption with stale-state diagnostics.
- Mark successful action results as consuming their snapshot and cover action/replay behavior.
- Document the enforced snapshot → act → snapshot loop and add a CLI changeset.

Files changed:
 .../fn-9031-computer-use-snapshot-consumption.md   |  7 ++
 docs/cli-reference.md                              |  2 +-
 docs/computer-use.md                               | 11 +--
 .../commands/__tests__/computer-commands.test.ts   | 88 ++++++++++++++++++++--
 .../commands/__tests__/computer-contract.test.ts   |  7 +-
 .../__tests__/computer-snapshot-index.test.ts      | 52 ++++++++++++-
 .../commands/__tests__/computer-use-guide.test.ts  |  4 +
 packages/cli/src/commands/computer.ts              | 37 ++++++---
 .../cli/src/commands/computer/adapter-macos.ts     |  4 +-
 packages/cli/src/commands/computer/contract.ts     | 17 ++++-
 packages/cli/src/commands/computer/guide.ts        |  4 +-
 .../cli/src/commands/computer/snapshot-store.ts    | 79 +++++++++++++++++--
 12 files changed, 272 insertions(+), 40 deletions(-)

Fusion-Task-Id: FN-9031

Fusion-Task-Lineage: f196b7ca-ce3f-4a50-98d2-d6ac8bf184ac

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-13 16:31:44 -07:00
gsxdsm
d3e51f566e FN-9030: resolve computer state at project root
Resolve computer-use state once per invocation at the containing Fusion project root.

- Add a state-root resolver shared by computer command adapters and snapshot storage.
- Preserve capture and replay snapshots across working directories while isolating projects.
- Cover root resolution and cross-directory state behavior, and document the storage contract.
- Add a patch changeset for the CLI fix.

Files changed:
 .../fn-9030-computer-use-project-local-state.md    |  7 ++
 docs/computer-use.md                               |  2 +-
 .../commands/__tests__/computer-commands.test.ts   | 76 ++++++++++++++++++++++
 .../__tests__/computer-snapshot-index.test.ts      | 14 ++++
 .../commands/__tests__/computer-state-root.test.ts | 49 ++++++++++++++
 packages/cli/src/commands/computer.ts              |  9 ++-
 packages/cli/src/commands/computer/state-root.ts   | 18 +++++
 7 files changed, 171 insertions(+), 4 deletions(-)

Fusion-Task-Id: FN-9030

Fusion-Task-Lineage: a0cb48ee-fd7f-4966-9930-cde273027eca

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-13 16:08:52 -07:00