Commit Graph

1166 Commits

Author SHA1 Message Date
gsxdsm
ca8447304f FN-7619: guard fn_task_attach against worktree boundary bypass
Add a path-containment check to fn_task_attach so it can no longer read files outside the task's worktree via traversal or absolute paths.

- Resolve the requested path and confine it to ctx.cwd (the task worktree) before any readFile call, rejecting "../" traversal, absolute paths, and other boundary-escaping inputs
- Add regression tests in extension.test.ts covering traversal/absolute-path attack vectors
- Add changeset (patch, category: security) documenting the fix

Files changed:
 .changeset/fn-7619-attach-boundary.md        |   7 ++
 packages/cli/src/__tests__/extension.test.ts | 133 ++++++++++++++++++++++++++-
 packages/cli/src/extension.ts                |  23 ++++-
 3 files changed, 161 insertions(+), 2 deletions(-)

Fusion-Task-Id: FN-7619
Fusion-Task-Lineage: d35d9218-d678-4989-945d-6c1e1a322c5c
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-06 19:03:07 -07:00
gsxdsm
203f879c8f FN-7611: respect workflow intake column on task creation
Task creation surfaces stopped hardcoding column:"triage", so new tasks now land in the selected-or-default workflow's resolved intake column instead of always jumping to Planning/triage.

- Removed hardcoded column:"triage" override in engine's createTaskCreateTool (fn_task_create), letting TaskStore.createTask resolve the landing column from the workflow's intake-trait column.
- Removed the equivalent hardcoded override in the pi extension's fn_task_create, and updated its response text to echo the actual landing column instead of a fixed "Column: triage" string.
- Fixed signal-route, GitHub-import, and planning-subtask-route task creation to stop forcing column when no workflowId is given (or, for planning subtask routes, even when one is provided).
- Custom workflows with a non-triage intake column (e.g. Inbox) now correctly capture new cards inert until released, while the default builtin:coding workflow still resolves to "triage" byte-identically.
- Added regression coverage (agent-tools-intake-column.test.ts, extension-workflow-tools.test.ts) and a patch changeset documenting the fix.

Files changed:
 .changeset/fn-7611-intake-column.md                |   7 ++
 .../src/__tests__/extension-workflow-tools.test.ts |  70 +++++++++++
 packages/cli/src/extension.ts                      |  10 +-
 .../src/__tests__/register-signal-routes.test.ts   |   8 +-
 .../dashboard/src/__tests__/routes-github.test.ts  |   2 -
 .../dashboard/src/routes/register-git-github.ts    |  16 ++-
 .../src/routes/register-planning-subtask-routes.ts |  24 +++-
 .../dashboard/src/routes/register-signal-routes.ts |   8 +-
 .../__tests__/agent-tools-intake-column.test.ts    | 138 +++++++++++++++++++++
 packages/engine/src/__tests__/agent-tools.test.ts  |   1 -
 packages/engine/src/agent-tools.ts                 |  21 +++-
 11 files changed, 288 insertions(+), 17 deletions(-)

Fusion-Task-Id: FN-7611

Fusion-Task-Lineage: daf7f755-b1c7-4859-b74f-f15593d5e79e

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-06 19:03:07 -07:00
gsxdsm
60081fb1f4 FN-7610: route workspace-mode tasks around PR-merge auto-merge strategy
Fixes workspace-mode (workspaceWorktrees) tasks failing auto-merge under mergeStrategy=pull-request, where processPullRequestMergeTask threw "could not determine repository" because the workspace root is a container of independent git sub-repos, not itself a git repo.

- Hoist an isWorkspaceTask check in ProjectEngine's merge dispatch (project-engine.ts) before the mergeStrategy branch, so workspace tasks always fall through to the existing direct/landWorkspaceTask path regardless of configured mergeStrategy.
- Add processPullRequestMergeTask and syncGroupPrCallback defense-in-depth guards (task-lifecycle.ts) that throw the new named WorkspaceTaskMergeError if a workspace task ever reaches the PR-merge path.
- Add engine tests covering multi-repo, single-repo, and zero-commit no-op workspace tasks under mergeStrategy=pull-request, plus a non-regression test for the legacy single-worktree PR path.
- Add CLI tests asserting the new guards throw WorkspaceTaskMergeError.
- Add a patch changeset describing the fix.

Files changed:
 .changeset/fn-7610-workspace-pr-merge-routing.md   |   7 ++
 .../src/commands/__tests__/task-lifecycle.test.ts  |  56 +++++++++
 packages/cli/src/commands/task-lifecycle.ts        |  33 ++++-
 .../engine/src/__tests__/project-engine.test.ts    | 140 +++++++++++++++++++++
 packages/engine/src/project-engine.ts              |  18 ++-
 5 files changed, 252 insertions(+), 2 deletions(-)

Fusion-Task-Id: FN-7610
Fusion-Task-Lineage: 31768b77-d9a9-4a79-a055-bbc6b228a1c4
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-06 19:03:06 -07:00
gsxdsm
eb86555797 chore(release): v0.56.1
Version bump via changesets.
2026-07-05 19:57:09 -07:00
gsxdsm
2025f9d56d chore(release): v0.56.0
Version bump via changesets.
2026-07-05 17:13:36 -07:00
gsxdsm
196abb5af9 FN-7576: delegate anthropic-subscription getApiKey to engine authStorage
Reads for the anthropic-subscription provider now delegate to the real engine authStorage so expired OAuth tokens are refreshed instead of silently failing.

- mergeAuthStorageReads getApiKey("anthropic-subscription") now calls target.getApiKey(providerId) directly, triggering the engine's refresh-token HTTP round trip, instead of a local static Date.now() >= credential.expires check
- Falls back to the read-only fallback storages' local resolution only when the primary engine call yields no key
- Added regression tests exercising the wrapper directly against the engine delegation and fallback behavior
- Added a patch changeset documenting the fix for @runfusion/fusion

Files changed:
 .changeset/fn-7576-cli-wrapper-subscription-getapikey-delegation.md               |   7 +
 packages/cli/src/commands/__tests__/provider-auth.test.ts                         | 148 +++++++++++++++++++++
 packages/cli/src/commands/provider-auth.ts                                        |  12 +-
 3 files changed, 166 insertions(+), 1 deletion(-)

Fusion-Task-Id: FN-7576

Fusion-Task-Lineage: 31e495ec-8487-468b-9b80-36e8d0f53806

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-05 11:31:46 -07:00
gsxdsm
71dfd3aeca FN-7568: rename CLI release binary assets to fn-cli-<platform>
Renames the downloadable GitHub Release CLI binaries so they don't collide with other well-known fn-named tools on a user's PATH; the local dev binary name is unchanged.

- Update binaryNameForTarget in packages/cli/build.ts to emit fn-cli-<suffix> instead of fn-<suffix> (local dev binary stays fn/fn.exe)
- Update release.yml and test-release.yml build matrices to use fn-cli-linux-x64, fn-cli-linux-arm64, fn-cli-darwin-arm64, fn-cli-windows-x64.exe
- Update build-exe-cross, ci-workflow, and package-config tests to assert the new fn-cli-<platform> asset names
- Add changeset documenting the release-asset rename

Files changed:
 .changeset/fn-7568-fn-cli-release-asset.md         |  7 +++++++
 .github/workflows/release.yml                      |  8 ++++----
 .github/workflows/test-release.yml                 |  8 ++++----
 packages/cli/build.ts                              | 10 ++++++++--
 packages/cli/src/__tests__/build-exe-cross.test.ts | 14 +++++++-------
 packages/cli/src/__tests__/ci-workflow.test.ts     |  8 ++++----
 packages/cli/src/__tests__/package-config.test.ts  | 10 +++++-----
 7 files changed, 39 insertions(+), 26 deletions(-)

Fusion-Task-Id: FN-7568

Fusion-Task-Lineage: 1c04d763-5e2f-43e3-84b7-df8dcff8467f

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-05 11:31:45 -07:00
gsxdsm
36bd74e337 FN-7532: stamp branch group merge attribution
Ensure shared branch group members record merge attribution so completion checklists reflect real landed state.

- Route AI merges through branch-group merge routing before selecting the integration target.
- Stamp mergeDetails merge target fields for both landed and no-op finalize paths.
- Record shared-group member landing state and best-effort managed PR checklist sync after AI merges.
- Cover dashboard, CLI lifecycle, and merger scenarios for accurate branch-group completion counts.

Files changed:
 .changeset/fn-7532-branch-group-completion.md      |  7 ++
 docs/dashboard-guide.md                            |  2 +
 .../src/commands/__tests__/task-lifecycle.test.ts  | 29 +++++++
 .../src/__tests__/routes-branch-groups.test.ts     | 45 +++++++++++
 packages/engine/src/__tests__/merger-ai.test.ts    | 68 +++++++++++++++-
 packages/engine/src/merger-ai.ts                   | 90 +++++++++++++++++++++-
 6 files changed, 235 insertions(+), 6 deletions(-)

Fusion-Task-Id: FN-7532

Fusion-Task-Lineage: cd65c18a-f1ad-4f8b-99b2-2e61e233f042

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-04 21:28:15 -07:00
gsxdsm
b545083249 FN-7530: isolate flaky dist-barrel extension test
Restore the stable extension suite by quarantining only the dist-barrel recompilation case.

- Move the built @fusion/core dist-barrel extension test into its own file.
- Re-admit extension.test.ts while keeping the isolated dist-barrel file quarantined.
- Update the quarantine ledger and velocity baseline to reflect the narrowed quarantine.

Files changed:
 docs/test-velocity-baseline.md                     |  10 +-
 .../src/__tests__/extension-dist-barrel.test.ts    | 230 +++++++++++++++++++++
 packages/cli/src/__tests__/extension.test.ts       | 103 +--------
 packages/cli/vitest.config.ts                      |   5 +-
 scripts/lib/test-quarantine.json                   |   4 +-
 5 files changed, 247 insertions(+), 105 deletions(-)

Fusion-Task-Id: FN-7530

Fusion-Task-Lineage: 7b07540f-689b-4133-b590-a39427095397

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-04 14:04:29 -07:00
gsxdsm
7ecf5e2b9c fix: resolve main-branch CI test failures
Two failures surfaced in the full-suite run on main (28697507894):

1. dashboard session-reconnect.test.ts — real bug. The planning
   "replays buffered events" test hung at the 15s timeout because
   FN-7444 (planning summary deepening checkpoint) now holds the
   completed summary behind a mandatory checkpoint question instead
   of finalizing on the agent's "complete" payload. The stream route
   never observed session.summary and subscribed forever. Fix: respond
   to the deepening checkpoint with the reserved proceed option so
   finalizePendingSummary runs, session.summary is set, and the
   summary/complete events are buffered for SSE replay. Reproduced
   locally (15s hang) and verified green (4/4).

2. cli extension.test.ts — loaded-lane CI flake. The built-dist-barrel
   fn_task_list test timed out at 5000ms under 4-shard contention while
   passing locally (~1.2s body) and in 3 of the 4 surrounding runs.
   Root cause is in-test dist-barrel recompilation inside the default
   5s timeout (vi.resetModules + vi.importActual of the full core dist
   + fresh dynamic import), the same signature rescued in
   FN-6483/FN-6705/FN-6795/FN-6839. Quarantined on sight per the
   flaky-test rule (ledger + matching vitest exclude) rather than
   widening the timeout or loosening assertions; the sibling
   source-@fusion/core test covers the identical truncation invariant.
2026-07-04 00:26:49 -07:00
gsxdsm
1a5f7e3b52 fix: add missing vitest aliases and mock export for CI test failures
Three root causes behind CI run 28695362549 failures:

1. droid-cli: 8 tests fail with 'Failed to resolve entry for
   @fusion-plugin-examples/droid-runtime'. The droid-cli vitest config
   had no source alias for the droid-runtime plugin, so Vite tried to
   resolve non-existent dist/ exports.

2. CLI: multiple tests fail with 'Failed to resolve entry for
   @fusion-plugin-examples/roadmap'. The CLI vitest config was missing
   source aliases for the roadmap plugin (., /server, /roadmap-suggestions).

3. CLI: 73 bin.test.ts tests fail with 'No runTaskImportFromGitLab export
   is defined on the ../commands/task.js mock'. The GitLab import command
   was added to bin.ts and task.ts but the bin.test.ts mock was not
   updated to include the new export.
2026-07-03 22:40:36 -07:00
gsxdsm
c39d1ea281 fix: add @fusion-plugin-examples/cursor-runtime vitest aliases
runtime-provider-probes.ts imports probeCursorBinary from
@fusion-plugin-examples/cursor-runtime, but neither the dashboard nor CLI
vitest configs had source aliases for this package. Without the aliases,
Vite tried to resolve the package's dist/ exports which don't exist in a
source checkout, causing every dashboard test that transitively imports
the runtime provider to fail with 'Failed to resolve entry for package'.

This broke 48 dashboard test files in CI run 28561416741 after the cursor
runtime plugin was added without updating the vitest configs.
2026-07-03 13:23:37 -07:00
gsxdsm
843f365452 chore(release): v0.55.0
Version bump via changesets.
2026-07-03 13:10:20 -07:00
gsxdsm
d97e66a657 fix(desktop): sync lockfile, gate Windows GPU flags, document desktop hardening
- Regenerate pnpm-lock.yaml for the new electron@^33.4.11 CLI dependency so
  --frozen-lockfile stops failing every PR-check job.
- Gate the GPU/sandbox-disabling Electron flags (--no-sandbox, --disable-gpu,
  etc.) to Windows only via os.platform(); applying them on macOS/Linux was a
  security and rendering regression. This also resolves the unused os import
  that failed lint.
- Add FNXC comments for the Windows GPU flags, desktop user-data isolation, and
  CLI dashboard-server reuse per project comment convention.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-03 08:13:06 -07:00
gsxdsm
6d7715fe9e Merge branch 'main' into desktop-release-issues-report 2026-07-03 07:48:51 -07:00
ddonaldson130
4bad0920e2 docs(desktop): field report for Windows desktop release issues
Add reports/desktop-release-issues-2026-07-03.md documenting the
regressions observed in the Fusion 0.52.0 Windows desktop release,
including:

- fusion desktop fails to launch because electron is a devDependency
- native launcher walks ancestor dirs and fails on unrelated workspace JSON
- Manage Projects opens Settings instead of overview
- Windows Terminal Help version dialogs on dashboard load
- packaged preload.cjs missing in unpacked release layout
- port collisions and dashboard/gateway drift on Windows
- GPU/sandbox rendering instability on Windows Electron
- isolated user-data path needed
- CLI desktop command not reusing an already-running dashboard server

Also include the two experimental mitigations we applied locally:
- disable GPU/sandbox Electron flags in desktop.ts
- skip embedded local runtime when FUSION_SERVER_PORT is already set

These changes are intended as supporting evidence and starting points
for the Fusion team, not as a final fix.
2026-07-03 03:36:10 -04:00
gsxdsm
96b2df115e fix(desktop): heal launch-mode/shell split-brain hanging Windows local runtime + fix Windows root build (#1878)
## Windows: local runtime hung at "Starting local Fusion runtime…"

### Root cause
Desktop startup had two independent persisted sources of truth that
could disagree:
- `desktop-launch-mode.json` — decides whether **main** *starts* the
embedded local runtime
- `shell-connections.json` (`desktopMode`) — decides whether the
renderer **launch gate** *waits* for it

`shell:setDesktopMode` persists shell settings **before** the fallible
`startLocalRuntimeOnce()` / `saveDesktopLaunchMode()`. So a first
"local" selection whose runtime start threw or was interrupted left
`shell=local` / `launch-mode=choose` **permanently**. Every later launch
then sat at "Starting local Fusion runtime…" polling a runtime nobody
started → 30s timeout.

### Fix (defense in depth) — `78f0bc31`
- `initializeApp` reconciles: a completed shell `local` selection is
authoritative → heals the launch-mode file and starts the runtime.
- `onDesktopModeChange` / `onDesktopLaunchModeChange` persist
launch-mode **before** the fallible start so it can't re-desync.
- `DesktopLaunchGate` no longer assumes main started the runtime — if
it's not running/starting it actively `setDesktopMode("local")` before
polling.
- Env-gated startup trace (`FUSION_STARTUP_TRACE`) so packaged builds
(which log nothing) are diagnosable.
- Regression tests: split-brain → runtime starts + file heals;
agreement-on-choose → no start.

**Verified end-to-end under real Electron 35 / Node 22.16**: from the
exact split-brain state the runtime now reaches `RUNNING` and the
launch-mode file heals.

### Also: Windows root-build breakages — `bd24bd4c8`
- `scripts/build-workspace.mjs` "run as main" guard compared
`import.meta.url` to `` `file://${process.argv[1]}` ``, which never
matches on Windows → root `pnpm build` silently no-opped (exit 0, no
dist). Now uses `pathToFileURL(process.argv[1]).href`.
- `spawn('pnpm', …)` without `shell:true` (ENOENT on Windows) in
`build-workspace.mjs` and `packages/cli/tsup.config.ts` → pass `shell`
on win32.

### Notes
- `@fusion/desktop` and `@fusion/dashboard` are private → no changeset.
- Build the Windows installer via the `desktop-windows` workflow
(`electron-builder --projectDir deploy`); local `pnpm deploy` staging
hits an unrelated directory-rename race on managed-workspace
filesystems.

🤖 Generated with [Claude Code](https://claude.com/claude-code)


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

* **New Features**
* Added optional desktop runtime startup tracing (enabled via
environment variable).
* **Bug Fixes**
* Improved local desktop handoff to prevent reload loops and navigate
directly to the embedded local runtime.
* Added “split-brain” healing between persisted launch mode and shell
settings.
* Prevented auto-registration of runtime root/CWD during
desktop/dashboard startup.
* Improved Windows compatibility for CLI/workspace command spawning and
npm install process handling.
* **Tests**
* Expanded local/Electron integration, navigation, and onboarding
regression coverage; improved async flushing for more reliable
initialization.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-07-03 00:17:58 -07:00
gsxdsm
b331f26f3d fix(desktop,cli): never auto-create a project in home/cwd; onboard instead
The desktop embedded runtime auto-registered its runtime root (the user's HOME directory) as a
project on first launch, and bare `fusion` / `fn` / `fn dashboard` / `fusion dashboard`
auto-registered the CWD as a project. Both silently created a "cwd-mode" project the operator
never chose and dropped them onto a board for it.

- Desktop: replace ensureDesktopRuntimeProject (which registered home) with
  resolveDesktopRuntimePrimaryProject, which only PICKS an already-registered project as the
  primary engine target and registers nothing. With no projects the server starts engine-less
  (createServer's engine is optional) and the dashboard shows its onboarding empty state.
  Applied to both the primary (local-runtime) and legacy (local-server) desktop server paths.
- CLI dashboard command: ensureCwdProjectRegistered now runs with autoRegister:false, so it uses
  the CWD project only if already registered, else starts with none and the dashboard onboards.
  (serve/daemon keep their existing --no-auto-register flag; the CLI `desktop` launcher unchanged.)

Verified: with zero projects the embedded server starts, /api/health -> 200, /api/projects -> [],
/ serves the client. Unit test asserts resolveDesktopRuntimePrimaryProject registers nothing.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 20:16:42 -07:00
ddonaldson130
c7641f9d5e fix(cli): add electron as runtime dependency for fusion desktop
The published @runfusion/fusion package ships the desktop runtime assets
in dist/desktop/, but the [title-id-drift] db.ts migration normalized 0 active titles
[done-paused-backfill] db.ts migration repaired 0 done task rows
[title-id-drift] archive-db normalized 0 archived titles
[desktop] Auto-registered project "Fusion" at C:\Users\drewd\Tools\fusion-latest
[server:terminal] WebSocket server mounted { path: '/api/terminal/ws' }
[ai-session-store] Cleanup removed stale sessions {
  terminalDeleted: 0,
  orphanedDeleted: 0,
  totalDeleted: 0,
  maxAgeMs: 604800000,
  operation: 'cleanup-stale-sessions',
  _emittedAt: '2026-07-03T03:03:31.683Z',
  _diagnosticsId: 'bc57bc09-d320-46b1-8717-a139f95bb9b7'
}
[server] AI session cleanup summary {
  message: 'Removed stale AI sessions',
  source: 'initial',
  ttlMs: 604800000,
  terminalDeleted: 0,
  orphanedDeleted: 0,
  totalDeleted: 0
} command calls require('electron')
to find the Electron binary. Electron was only declared as a built
dependency in pnpm-workspace.yaml, which makes it available during source
builds but does not include it in the published npm package. As a result,
[title-id-drift] archive-db normalized 0 archived titles
[server:terminal] WebSocket server mounted { path: '/api/terminal/ws' }
[ai-session-store] Cleanup removed stale sessions {
  terminalDeleted: 0,
  orphanedDeleted: 0,
  totalDeleted: 0,
  maxAgeMs: 604800000,
  operation: 'cleanup-stale-sessions',
  _emittedAt: '2026-07-03T03:03:37.491Z',
  _diagnosticsId: 'a0c428a8-133d-4673-ab93-82a092646b13'
}
[server] AI session cleanup summary {
  message: 'Removed stale AI sessions',
  source: 'initial',
  ttlMs: 604800000,
  terminalDeleted: 0,
  orphanedDeleted: 0,
  totalDeleted: 0
} fails or hangs for npm consumers.

Fix: move electron to the dependencies of @runfusion/fusion so it is
installed alongside the CLI, and remove it from onlyBuiltDependencies.

Fixes: the desktop launcher regression where [title-id-drift] archive-db normalized 0 archived titles
[server:terminal] WebSocket server mounted { path: '/api/terminal/ws' }
[ai-session-store] Cleanup removed stale sessions {
  terminalDeleted: 0,
  orphanedDeleted: 0,
  totalDeleted: 0,
  maxAgeMs: 604800000,
  operation: 'cleanup-stale-sessions',
  _emittedAt: '2026-07-03T03:03:43.460Z',
  _diagnosticsId: '325b9f28-e5d3-4937-855e-c5d1b95420b8'
}
[server] AI session cleanup summary {
  message: 'Removed stale AI sessions',
  source: 'initial',
  ttlMs: 604800000,
  terminalDeleted: 0,
  orphanedDeleted: 0,
  totalDeleted: 0
} cannot
resolve the Electron binary from a normal npm install.
2026-07-02 23:03:43 -04:00
gsxdsm
bd24bd4c82 fix(build): make root workspace build run on Windows
Two Windows-only breakages in the build path:

- scripts/build-workspace.mjs: the "run as main" guard compared import.meta.url
  to `file://${process.argv[1]}`, which never matches on Windows (import.meta.url
  is file:///C:/… with forward slashes and a triple slash; argv[1] is C:\… with
  backslashes and no scheme). So `pnpm build` at the repo root silently no-opped
  (exit 0, no output, no dist) and packaging shipped empty/stale dist. Compare
  against pathToFileURL(process.argv[1]).href instead.

- scripts/build-workspace.mjs runPlannedBuilds and packages/cli/tsup.config.ts
  runWorkspaceCommand spawned `pnpm` without shell:true; on Windows pnpm is a
  .cmd shim Node refuses to spawn without a shell (ENOENT/EINVAL, CVE-2024-27980),
  failing with `spawn pnpm ENOENT`. Pass shell on win32 (args are fixed repo build
  invocations with no shell metacharacters).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 15:20:17 -07:00
gsxdsm
dfb6e5270d FN-7443: add bundled Linear import plugin
Add a plugin-owned Linear importer that creates Fusion tasks from Linear issues.

- Add the fusion-plugin-linear-import package with settings, Linear GraphQL client, import routes, tools, and dashboard UI.
- Bundle and register the Linear import plugin in the CLI and dashboard plugin view registry.
- Document bundled plugin authoring details and cover duplicate detection, routes, tools, UI, and packaging with tests.

Files changed:
 .changeset/fn-7443-linear-import-plugin.md         |   7 +
 docs/PLUGIN_AUTHORING.md                           |   7 +
 docs/task-management.md                            |   2 +
 packages/cli/src/__tests__/bundle-output.test.ts   |  22 ++
 .../__tests__/bundled-plugin-install.test.ts       |  29 +++
 packages/cli/src/plugins/bundled-plugin-install.ts |   1 +
 .../cli/src/plugins/staged-bundled-plugin-ids.ts   |   1 +
 packages/cli/tsup.config.ts                        |   8 +
 .../__tests__/registerBundledPluginViews.test.tsx  |   9 +-
 .../app/plugins/registerBundledPluginViews.ts      |  18 ++
 .../app/types/plugin-dashboard-views.d.ts          |   9 +
 .../src/__tests__/routes-plugin-registry.test.ts   |   5 +
 .../runtime-plugin-alias-regression.test.ts        |  12 +
 packages/dashboard/src/registry-manifest.json      |  10 +
 packages/dashboard/vite.config.ts                  |   8 +
 packages/dashboard/vitest.config.ts                |   8 +
 plugins/fusion-plugin-linear-import/README.md      |  75 ++++++
 plugins/fusion-plugin-linear-import/manifest.json  |  48 ++++
 plugins/fusion-plugin-linear-import/package.json   |  38 +++
 .../scripts/copy-css.mjs                           |  11 +
 .../src/LinearImportView.css                       | 167 +++++++++++++
 .../src/LinearImportView.tsx                       | 263 +++++++++++++++++++++
 .../src/__tests__/LinearImportView.test.tsx        | 124 ++++++++++
 .../src/__tests__/import-linear.test.ts            |  78 ++++++
 .../src/__tests__/linear-client.test.ts            |  81 +++++++
 .../src/__tests__/routes.test.ts                   |  90 +++++++
 .../src/__tests__/tools.test.ts                    |  79 +++++++
 .../src/dashboard-interop.d.ts                     |  13 +
 .../src/dashboard-view.tsx                         |  10 +
 .../src/import-linear.ts                           | 154 ++++++++++++
 plugins/fusion-plugin-linear-import/src/index.ts   |  45 ++++
 .../src/linear-client.ts                           | 247 +++++++++++++++++++
 plugins/fusion-plugin-linear-import/src/routes.ts  | 149 ++++++++++++
 .../fusion-plugin-linear-import/src/settings.ts    |  68 ++++++
 plugins/fusion-plugin-linear-import/src/tools.ts   | 138 +++++++++++
 plugins/fusion-plugin-linear-import/tsconfig.json  |  14 ++
 .../fusion-plugin-linear-import/vitest.config.ts   |  40 ++++
 pnpm-lock.yaml                                     |  40 ++++
 pnpm-workspace.yaml                                |   1 +
 39 files changed, 2128 insertions(+), 1 deletion(-)

Fusion-Task-Id: FN-7443
Fusion-Task-Lineage: a016a9d4-84a4-4a0b-b9b6-b9a2886da49a
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-02 14:31:16 -07:00
gsxdsm
91fb53f3c7 FN-7440: add agent update tool
Add a Fusion extension tool for updating existing agent configuration in place.

- Register fn_agent_update with editable agent fields, validation, and non-ephemeral guards.
- Enforce org-scoped authorization for agent callers and privileged manager-clearing semantics for operators.
- Cover update success, hierarchy denial, cycle prevention, and runtime/instruction edits in extension tests.
- Document the new tool in agent and Fusion skill references and add a published package changeset.

Files changed:
 .changeset/fn-7440-agent-update-tool.md            |   7 +
 docs/agents.md                                     |  21 +-
 package.json                                       |   1 +
 packages/cli/skill/fusion/SKILL.md                 |   2 +-
 .../cli/skill/fusion/references/extension-tools.md |  21 ++
 .../skill/fusion/references/fusion-capabilities.md |   1 +
 .../src/__tests__/extension-agent-update.test.ts   | 351 +++++++++++++++++++++
 packages/cli/src/extension.ts                      | 230 ++++++++++++++
 pnpm-lock.yaml                                     |   1 +
 9 files changed, 628 insertions(+), 7 deletions(-)

Fusion-Task-Id: FN-7440

Fusion-Task-Lineage: a6f4c928-5a63-4cf1-aa0b-4e38b536e965

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-02 13:16:07 -07:00
gsxdsm
c49a933fb0 FN-7428: add GitLab tracking coverage and reconciliation support
Add GitLab tracking persistence, analytics, and reconciliation coverage across core, dashboard, and CLI paths.

- Store GitLab tracking and closed-at metadata when importing issues and merge requests from CLI, extension tools, and dashboard routes.
- Add GitLab source-issue analytics, Command Center GitLab signal surfaces, CSV export fields, and a closed-at backfill route.
- Cover GitLab tracking storage, reconciliation, CLI imports, dashboard import UI, route behavior, and Command Center signals with focused tests.

Files changed:
 .changeset/fn-7428-gitlab-import-tracking.md       |   7 +
 .../__tests__/extension-gitlab-tracking.test.ts    | 140 ++++++++++++
 .../__tests__/task-command-gitlab-import.test.ts   |  18 +-
 packages/cli/src/commands/task.ts                  |   1 +
 packages/cli/src/extension.ts                      |   2 +-
 .../src/__tests__/gitlab-issue-analytics.test.ts   | 243 +++++++++++++++++++++
 .../__tests__/gitlab-source-issue-storage.test.ts  | 128 +++++++++++
 .../store-gitlab-tracking-reconcile.test.ts        | 125 +++++++++++
 packages/core/src/gitlab-issue-analytics.ts        | 227 +++++++++++++++++++
 packages/core/src/index.ts                         |   8 +
 packages/core/src/store.ts                         |  21 +-
 .../__tests__/GitHubImportModal.test.tsx           |  46 ++++
 .../components/__tests__/gitlabTracking.test.tsx   |  43 ++++
 .../components/command-center/CommandCenter.tsx    |   5 +
 .../components/command-center/areas/GitlabArea.tsx | 126 +++++++++++
 .../areas/__tests__/areas.gitlab-signals.test.tsx  |  83 +++++++
 .../gitlab-source-issue-reconciler.test.ts         | 187 ++++++++++++++++
 .../register-command-center-routes.test.ts         |  52 +++++
 .../__tests__/register-git-gitlab.backfill.test.ts | 116 ++++++++++
 .../dashboard/src/__tests__/routes-gitlab.test.ts  |  59 +++--
 packages/dashboard/src/command-center-csv.ts       |  21 ++
 .../src/gitlab-source-issue-reconciler.ts          | 104 +++++++++
 packages/dashboard/src/gitlab.ts                   |  16 +-
 .../src/routes/register-command-center-routes.ts   |  25 +++
 packages/dashboard/src/routes/register-gitlab.ts   |  29 +++
 25 files changed, 1800 insertions(+), 32 deletions(-)

Fusion-Task-Id: FN-7428

Fusion-Task-Lineage: 7b0ebb5c-c6e7-42a9-a339-b2dd1d4e263a

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-02 12:34:35 -07:00
gsxdsm
865dec235b FN-7424: add GitLab task imports
Adds GitLab-backed task import flows across the CLI, extension, API, and dashboard.

- Add GitLab client normalization, provenance, duplicate detection, and import routes for project issues, group issues, and merge requests.
- Extend the dashboard import modal with a GitLab provider, resource tabs, previews, imported-state detection, and import actions.
- Add CLI and extension task import commands plus usage event/gating classifications and operator documentation.
- Cover GitLab fetch/import behavior with dashboard, CLI, and gating tests.

Files changed:
 .changeset/fn-7424-gitlab-imports.md               |   7 +
 docs/cli-reference.md                              |  11 +-
 docs/gitlab-parity-inventory.md                    |  10 +-
 docs/task-management.md                            |   6 +-
 packages/cli/skill/fusion/SKILL.md                 |   2 +-
 .../cli/skill/fusion/references/extension-tools.md |  60 ++++
 .../skill/fusion/references/fusion-capabilities.md |   6 +
 packages/cli/src/__tests__/extension.test.ts       |   6 +
 .../__tests__/task-command-gitlab-import.test.ts   |  97 ++++++
 packages/cli/src/bin.ts                            |  25 +-
 packages/cli/src/commands/task.ts                  |  58 ++++
 packages/cli/src/extension.ts                      | 106 +++++++
 packages/core/src/__tests__/usage-events.test.ts   |   2 +
 packages/core/src/types.ts                         |   7 +
 packages/core/src/usage-events.ts                  |   3 +
 packages/dashboard/app/api/legacy.ts               |  52 ++++
 .../dashboard/app/components/GitHubImportModal.css |  41 +++
 .../dashboard/app/components/GitHubImportModal.tsx | 143 ++++++++-
 .../__tests__/GitHubImportModal.test.tsx           |  33 ++
 packages/dashboard/src/__tests__/gitlab.test.ts    |  56 ++++
 .../dashboard/src/__tests__/routes-gitlab.test.ts  |  99 ++++++
 packages/dashboard/src/gitlab.ts                   | 334 +++++++++++++++++++++
 packages/dashboard/src/index.ts                    |  15 +
 packages/dashboard/src/routes.ts                   |   2 +
 packages/dashboard/src/routes/register-gitlab.ts   | 192 ++++++++++++
 .../engine/src/__tests__/agent-action-gate.test.ts |   4 +
 .../gating-classifications-provisioning.test.ts    |  13 +-
 .../src/__tests__/gating-classifications.test.ts   |   6 +
 packages/engine/src/gating-classifications.ts      |   9 +
 29 files changed, 1388 insertions(+), 17 deletions(-)

Fusion-Task-Id: FN-7424
Fusion-Task-Lineage: 8012425c-21d5-4b20-adb7-07d2e5aa1cef
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-02 11:38:34 -07:00
gsxdsm
855061db5f fix: harden workflow graph cutover paths and migrate cutover-era tests
Production fixes:
- executor.ts: add safeLogEntry() wrapper so synchronous throws from
  store.logEntry don't abort pause/abort/finalize control flow.
- workflow-authoritative-driver.ts: pass built-in auxiliary custom nodes
  (task-summary nodes, bypassable optional-groups) through as success
  instead of throwing.

Test migrations for graph-native runtime (cherry-picked from closed PR #1869):
- executor-prompt: two-party barrier for global-pause disposal test.
- executor-task-done-invariant: assert merge-node boundary moveTask.
- workflow-graph-merge-region-collapse: updated for merge-region node shapes.
- executor-worktree/worktree-liveness/implicit-task-done-budget: graph-aware.
- CLI extension tests: shared engine-workflow-authoring-mock helper.
- Dashboard/desktop/reliability tests: cutover-aware assertion updates.
2026-07-02 07:32:47 -07:00
gsxdsm
84a40dd82e chore(release): v0.54.0
Version bump via changesets.
2026-07-02 00:22:58 -07:00
gsxdsm
22261b683f FN-7411: prevent task-bound self deletion
Prevent task-bound callers from soft-deleting the task they are currently executing.

- Add a TaskSelfDeleteError guard in TaskStore.deleteTask before mutation or audit emission.
- Pass the current task id through the fn_task_delete audit context so CLI tool calls inherit the store invariant.
- Cover self-delete rejection and cross-task deletion allowance in core and CLI tests.
- Add a patch changeset for the published CLI package.

Files changed:
 .changeset/fn-7411-self-delete-guard.md            |  7 +++
 .../task-delete-allow-resurrection.test.ts         | 48 ++++++++++++++++-
 packages/cli/src/extension.ts                      |  2 +
 .../src/__tests__/store-self-delete-guard.test.ts  | 60 ++++++++++++++++++++++
 packages/core/src/store.ts                         | 22 +++++++-
 5 files changed, 136 insertions(+), 3 deletions(-)

Fusion-Task-Id: FN-7411

Fusion-Task-Lineage: 50028769-5396-4435-84fb-2ae182315e81

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-01 23:53:10 -07:00
gsxdsm
40b44e40b9 fix: enforce ephemeralAgentsEnabled across the workflow engine
Add TaskExecutor.blockOuterDispatchWhenEphemeralDisabled, gating all three
workflow dispatch paths (graph / authoritative / work-engine) on
ephemeralAgentsEnabled at the top of execute(). Previously the toggle was
enforced only on the legacy scheduler/EphemeralWorkerManager path — whose
onTaskStart spawn refusal is a fire-and-forget callback that runs after
execution begins — so unassigned tasks reaching execute() off a non-scheduler
path still ran. Unassigned tasks are now re-queued for permanent-agent
assignment; permanent-agent-bound tasks still run. Adds regression coverage
across all three entry points.

Also includes the ephemeralAgentsCanCreateTasks project setting (default on)
gating fn_task_create for ephemeral callers in both the pi extension and the
executor task-worker tool.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-01 21:31:34 -07:00
gsxdsm
7488e0971f chore(release): v0.53.1
Version bump via changesets.
2026-07-01 19:38:51 -07:00
gsxdsm
8bb18d9d61 chore(release): v0.53.0
Version bump via changesets.
2026-07-01 18:31:44 -07:00
Phil Larson
c46d11f0a3 test(cli): keep extension engine mocks current 2026-07-01 16:34:02 -07:00
gsxdsm
e85d25e383 FN-7395: fix packaged desktop launch assets
Fix installed desktop launches so they use packaged runtime assets without parsing caller workspaces.

- Resolve normal desktop launches from packaged CLI desktop assets, with explicit override and dev paths.
- Stage desktop runtime assets into the published CLI package and include them in npm files.
- Route desktop --no-auth into the embedded dashboard server and document installed/dev launch behavior.
- Cover invalid JSON caller directories, missing packaged assets, package contents, and CLI routing in tests.

Files changed:
 .changeset/fn-7395-desktop-launcher.md             |   7 ++
 docs/cli-reference.md                              |  12 +-
 packages/cli/package.json                          |   1 +
 packages/cli/src/__tests__/bin.test.ts             |  19 +++
 packages/cli/src/__tests__/package-config.test.ts  |  11 ++
 packages/cli/src/bin.ts                            |  10 +-
 .../cli/src/commands/__tests__/desktop.test.ts     | 132 ++++++++++++++++++---
 packages/cli/src/commands/desktop.ts               |  85 ++++++++-----
 packages/cli/tsup.config.ts                        |  60 ++++++++++
 9 files changed, 285 insertions(+), 52 deletions(-)

Fusion-Task-Id: FN-7395

Fusion-Task-Lineage: e7a8d065-0d41-4fa3-9cea-1cfb5b466d16

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-01 15:39:34 -07:00
gsxdsm
37027632e0 FN-7378: upgrade pi SDK dependencies
Upgrade the bundled pi SDK packages and compatibility imports for the 0.80.3 release.

- Bump @earendil-works/pi-ai and @earendil-works/pi-coding-agent consumers to ^0.80.3.
- Update pi SDK import paths for the new compatibility and API export map layout.
- Refresh dependency contract tests and add a patch changeset for the published CLI package.

Files changed:
 .changeset/fn-7378-pi-sdk-upgrade.md               |   7 ++
 packages/cli/package.json                          |   4 +-
 packages/cli/src/__tests__/package-config.test.ts  |   8 +-
 packages/dashboard/package.json                    |   2 +-
 packages/engine/package.json                       |   4 +-
 .../custom-providers-openai-completions.test.ts    |   8 +-
 pnpm-lock.yaml                                     | 108 ++++++++++-----------
 7 files changed, 72 insertions(+), 69 deletions(-)

Fusion-Task-Id: FN-7378

Fusion-Task-Lineage: ed8847dc-2adf-4ede-aa75-045f2e2436a0

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-01 10:37:44 -07:00
gsxdsm
a9e2baa9f8 FN-7367: link imported GitHub issues to tracking
Imported GitHub issues can now adopt their source issue as the tracking issue without changing ordinary task defaults.

- Add the project-scoped githubLinkImportedIssuesToTracking setting with docs, Settings UI, and defaults.
- Honor the import-only setting across dashboard, CLI, and extension GitHub issue import paths.
- Cover saved settings and import tracking behavior with CLI, dashboard, and parity tests.
- Add a minor changeset for the published CLI package.

Files changed:
 .changeset/fn-7367-github-import-tracking.md       |  7 +++
 docs/settings-reference.md                         |  3 +-
 packages/cli/src/__tests__/extension.test.ts       | 73 ++++++++++++++++++++++
 .../task-command-github-import-tracking.test.ts    | 16 +++++
 packages/cli/src/commands/__tests__/task.test.ts   | 28 +++++++++
 packages/cli/src/commands/task.ts                  | 45 +++++++------
 packages/cli/src/extension.ts                      | 45 +++++++------
 .../core/src/__tests__/settings-parity.test.ts     |  4 ++
 packages/core/src/settings-schema.ts               |  1 +
 packages/core/src/types.ts                         |  6 ++
 .../app/__tests__/settings-save-split.test.ts      | 19 ++++++
 .../dashboard/app/components/SettingsModal.tsx     |  6 ++
 .../__tests__/SettingsModal.general.test.tsx       | 59 +++++++++++++++++
 .../__tests__/SettingsModal.test-harness.tsx       |  1 +
 .../settings/sections/GeneralSection.tsx           |  9 +++
 .../dashboard/src/__tests__/routes-github.test.ts  | 45 +++++++++++++
 .../dashboard/src/routes/register-git-github.ts    |  7 +++
 17 files changed, 325 insertions(+), 49 deletions(-)

Fusion-Task-Id: FN-7367
Fusion-Task-Lineage: 43671cdf-7e0d-4b7a-9ba2-54c9a367dfec
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-01 09:50:57 -07:00
gsxdsm
c93f2d4da0 FN-7346: fix TUI settings arrow editing
Fix Settings keyboard handling so arrow keys edit selected enum values in the terminal dashboard.

- Keep Tab as the Settings pane switcher so arrow keys remain scoped to the active pane.
- Route detail-pane left/right arrows and h/l keys through enum setting cycling and remote provider activation.
- Add terminal dashboard coverage for list navigation and enum cycling, plus CLI docs and release note coverage.

Files changed:
 .changeset/fn-7346-tui-settings-arrows.md          |   7 ++
 docs/cli-reference.md                              |   5 +
 .../commands/dashboard-tui/__tests__/app.test.tsx  | 121 ++++++++++++++++++++-
 packages/cli/src/commands/dashboard-tui/app.tsx    | 119 ++++++++++----------
 4 files changed, 186 insertions(+), 66 deletions(-)

Fusion-Task-Id: FN-7346

Fusion-Task-Lineage: c67861a7-7bb3-408d-926c-e85a44fe2dec

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-01 07:33:56 -07:00
gsxdsm
2eb6edb2fc fix: keep dashboard available after planning failures (#1846)
## Summary
- keep malformed planning-session responses persisted as retryable error
state instead of deleting the session
- add `fn dashboard --supervise` to restart unexpected dashboard exits
with bounded exponential backoff
- document the supervised-dashboard run mode and add a patch changeset

## Test Plan
- `corepack pnpm --filter @runfusion/fusion exec vitest run
src/commands/__tests__/dashboard.test.ts --silent=passed-only
--reporter=dot`
- `corepack pnpm --filter @fusion/dashboard exec vitest run
src/__tests__/session-error-recovery.test.ts --silent=passed-only
--reporter=dot`
- `corepack pnpm --filter @fusion/dashboard exec vitest run
src/__tests__/server.test.ts -t "returns health OK independently"
--silent=passed-only --reporter=dot`
- `corepack pnpm lint`
- `corepack pnpm typecheck`
- `corepack pnpm build`
- `corepack pnpm test:gate`

Note: a full `server.test.ts` run also exposes four existing
routine-runner expectation failures unrelated to this change; the added
health check passes when run by name.

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

* **New Features**
* Added dashboard supervised mode via a new `--supervise` option, with
automatic restarts using a bounded restart budget and exponential
backoff.
* **Bug Fixes**
* Planning sessions now persist as retryable error states when AI output
can’t be parsed, preventing session loss.
* Improved reliability so `GET /api/health` remains available during
these planning error states.
* **Documentation**
* Documented “Dashboard Availability &amp;amp; Supervised Mode”,
including health-check guidance and operational guardrails.
* **Tests**
* Added test coverage for supervised restart behavior, health during
planning errors, and ensuring no unhandled rejections on parse failures.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-07-01 07:26:24 -07:00
gsxdsm
d4ce6f9319 chore(release): v0.52.0
Version bump via changesets.
2026-07-01 00:47:09 -07:00
Phil Larson
9432339363 fix: keep dashboard available after planning failures 2026-06-30 23:35:27 -07:00
gsxdsm
5f67c85fea FN-7285: add workflow icons and trim built-in labels
Adds workflow icon metadata while preserving readable workflow names without built-in suffixes.

- Store and validate compact plain-text workflow icons across core APIs, imports, exports, tools, and analytics.
- Render Fusion marks for built-in workflows and custom text icons beside existing workflow labels on board, switcher, detail, and editor surfaces.
- Update workflow editor creation/copy flows, docs, release notes, and tests for icon metadata and shorter built-in names.

Files changed:
 .changeset/fn-7285-workflow-icons.md               |   7 ++
 docs/dashboard-guide.md                            |  12 +--
 .../cli/skill/fusion/references/extension-tools.md |   2 +
 .../core/src/__tests__/builtin-workflows.test.ts   |   8 +-
 packages/core/src/__tests__/db-migrate.test.ts     |   7 +-
 .../core/src/__tests__/workflow-analytics.test.ts  |  15 +--
 .../__tests__/workflow-definition-store.test.ts    |  31 ++++++
 packages/core/src/builtin-workflows.ts             |  20 ++--
 packages/core/src/db.ts                            |  11 +-
 packages/core/src/index.ts                         |   4 +
 packages/core/src/store.ts                         |  24 ++++-
 packages/core/src/workflow-analytics.ts            |   7 +-
 packages/core/src/workflow-definition-types.ts     |  31 ++++++
 packages/dashboard/app/api/legacy.ts               |   2 +
 packages/dashboard/app/components/Board.tsx        |  18 ++--
 packages/dashboard/app/components/Column.tsx       |   2 +-
 packages/dashboard/app/components/TaskCard.tsx     |   7 +-
 .../dashboard/app/components/TaskDetailModal.tsx   |  20 ++--
 packages/dashboard/app/components/WorkflowIcon.css |  42 ++++++++
 packages/dashboard/app/components/WorkflowIcon.tsx |  49 +++++++++
 .../app/components/WorkflowNodeEditor.css          |  32 ++++++
 .../app/components/WorkflowNodeEditor.tsx          | 113 ++++++++++++++++-----
 .../dashboard/app/components/WorkflowSwitcher.css  |   9 ++
 .../dashboard/app/components/WorkflowSwitcher.tsx  |  15 ++-
 .../dashboard/app/components/WorktreeGroup.tsx     |   2 +-
 .../app/components/__tests__/Board.test.tsx        |  12 +--
 .../app/components/__tests__/Lane.test.tsx         |   6 +-
 .../__tests__/WorkflowNodeEditor.test.tsx          |  57 +++++++++--
 .../components/__tests__/WorkflowSwitcher.test.tsx |  68 ++++++++-----
 .../__tests__/board-mobile-initial-render.test.tsx |   2 +-
 .../__tests__/CommandCenter.test.tsx               |   4 +-
 .../command-center/areas/WorkflowArea.tsx          |   2 +
 .../areas/__tests__/WorkflowArea.test.tsx          |   6 +-
 .../settings/sections/GeneralSection.tsx           |   6 +-
 .../register-command-center-routes.test.ts         |   2 +-
 .../__tests__/workflow-import-export.test.ts       |  32 +++++-
 packages/dashboard/src/routes/board-workflows.ts   |   6 +-
 .../src/routes/register-workflow-routes.ts         |  32 +++++-
 packages/engine/src/__tests__/agent-tools.test.ts  |   4 +-
 packages/engine/src/agent-tools.ts                 |   6 +-
 40 files changed, 590 insertions(+), 145 deletions(-)

Fusion-Task-Id: FN-7285
Fusion-Task-Lineage: 0fa689a2-f19d-4d1b-9a40-cc0b2181200a
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-30 12:21:25 -07:00
gsxdsm
94ddfe1064 FN-7274: document workflow tools in Fusion skill
Document the workflow-authoring tool surface in the packaged Fusion skill references.

- Add workflow tools to the generated Fusion skill category and capability tables.
- Teach the skill sync script to read workflow tool specs from extension and engine agent tool sources.
- Cover workflow tool documentation and cache inputs with sync tests.
- Add a changeset for the published CLI skill update.

Files changed:
 .changeset/fn-7274-workflow-skill-tools.md         |   7 +
 packages/cli/skill/fusion/SKILL.md                 |   1 +
 .../cli/skill/fusion/references/engine-tools.md    |   4 +-
 .../cli/skill/fusion/references/extension-tools.md |  83 +++++++++-
 .../skill/fusion/references/fusion-capabilities.md |   8 +
 packages/cli/src/__tests__/skill-sync.test.ts      |  60 ++++++-
 scripts/__tests__/skill-sync-cache.test.mjs        |   5 +
 scripts/sync-fusion-skill-tools.mjs                | 172 ++++++++++++++++++---
 8 files changed, 312 insertions(+), 28 deletions(-)

Fusion-Task-Id: FN-7274

Fusion-Task-Lineage: e1cd6bd8-aecc-49ca-96ed-a937a15a18a4

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-30 08:04:12 -07:00
gsxdsm
b5da5d310a FN-7263: refresh custom provider model lists
Refresh persisted custom-provider model lists from saved endpoints and expose manual refresh controls.

- Add dashboard API helpers and routes to refresh one or all custom-provider model lists while preserving concurrent settings edits.
- Start background model refresh from serve, dashboard, and daemon startup paths after the server begins listening.
- Add Settings UI refresh actions, row-level status messaging, styles, docs, and regression coverage for refresh behavior.

Files changed:
 .changeset/fn-7263-custom-provider-model-refresh.md       |   7 +
 docs/dashboard-guide.md                            |   6 +-
 docs/settings-reference.md                         |   2 +-
 packages/cli/src/commands/__tests__/daemon.test.ts |  59 +++++
 .../cli/src/commands/__tests__/dashboard.test.ts   |  51 ++++
 packages/cli/src/commands/__tests__/serve.test.ts  |  59 ++++-
 packages/cli/src/commands/daemon.ts                |  39 +++-
 packages/cli/src/commands/dashboard.ts             |  10 +
 packages/cli/src/commands/serve.ts                 |  11 +-
 .../app/__tests__/api-custom-providers.test.ts     |  43 ++++
 packages/dashboard/app/api/legacy.ts               |  11 +
 .../app/components/CustomProvidersSection.css      |  41 +++-
 .../app/components/CustomProvidersSection.tsx      |  68 +++++-
 .../__tests__/CustomProvidersSection.test.tsx      | 227 ++++++++++++++++++
 packages/dashboard/src/index.ts                    |   6 +
 .../__tests__/custom-provider-routes.test.ts       | 255 ++++++++++++++++++++
 .../src/routes/__tests__/custom-providers.test.ts  |  12 +
 .../src/routes/register-custom-provider-routes.ts  | 259 ++++++++++++++++-----
 18 files changed, 1101 insertions(+), 65 deletions(-)

Fusion-Task-Id: FN-7263

Fusion-Task-Lineage: 60ee0637-ac85-409f-a376-c01f4bc8e8c5

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-30 01:23:09 -07:00
gsxdsm
f01e5c9651 FN-7247: document current workflow behavior
Refresh workflow documentation to match the latest runtime, dashboard, and agent tool behavior.

- Add a current workflow behavior inventory covering built-ins, fail-closed runtime semantics, optional gates, settings, tools, routing, and create forwarding.
- Clarify dashboard All workflows aggregation, workflow badges, and workflow-aware task creation behavior.
- Expand editor, agent, CLI, and settings docs for governed workflow authoring, values, trait inspection, and selection boundaries.
- Add docs drift tests requiring workflow docs index coverage and current behavior markers.

Files changed:
 docs/agents.md                                     |  5 +-
 docs/cli-reference.md                              | 11 ++-
 docs/dashboard-guide.md                            | 10 ++-
 docs/settings-reference.md                         |  5 ++
 docs/workflow-editor.md                            | 15 +++-
 docs/workflow-steps.md                             | 48 ++++++++---
 .../cli/src/__tests__/docs-readme-index.test.ts    |  4 +
 .../src/__tests__/workflow-docs-current.test.ts    | 95 ++++++++++++++++++++++
 8 files changed, 172 insertions(+), 21 deletions(-)

Fusion-Task-Id: FN-7247
Fusion-Task-Lineage: 72bf0c89-80a3-440c-b6aa-1aea315279f5
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-29 19:46:23 -07:00
gsxdsm
03d4f95e8a FN-7224: separate Anthropic subscription and API-key auth
Separate Claude subscription OAuth from raw Anthropic API-key authentication surfaces.

- Add synthetic Anthropic Subscription and Anthropic API Key provider IDs while preserving upstream credential storage compatibility.\n- Map dashboard auth routes, CLI auth storage, Settings, and onboarding flows so OAuth login/logout and API-key save/clear no longer share one user-facing card.\n- Extend auth tests, docs, icons, and the release changeset for the split Anthropic authentication behavior.\n\nFiles changed:\n .changeset/fn-7224-separate-anthropic-api-key.md   |   7 +\n docs/dashboard-guide.md                            |   2 +-\n docs/settings-reference.md                         |   2 +-\n .../src/commands/__tests__/provider-auth.test.ts   | 233 +++++++++++++++++++--\n packages/cli/src/commands/provider-auth.ts         | 202 +++++++++++++++---\n packages/dashboard/app/api/legacy.ts               |   2 -\n .../app/components/ModelOnboardingModal.tsx        | 146 ++++---------\n packages/dashboard/app/components/ProviderIcon.tsx |   7 +\n .../__tests__/AuthenticationSection.test.tsx       |  89 ++++----\n .../__tests__/SettingsModal.models-auth.test.tsx   |  77 ++++---\n .../components/__tests__/onboarding-flow.test.tsx  |  29 ++-\n .../components/__tests__/settings-mobile.test.tsx  |  17 +-\n .../settings/sections/AuthenticationSection.tsx    |  20 +-\n .../dashboard/src/__tests__/routes-auth.test.ts    | 111 ++++++----\n .../dashboard/src/routes/register-auth-routes.ts   |  93 +++++---\n 15 files changed, 713 insertions(+), 324 deletions(-)

Fusion-Task-Id: FN-7224

Fusion-Task-Lineage: a2db2cf6-3452-4516-81e5-41dcdf47e1d2

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-29 18:32:36 -07:00
gsxdsm
72e50ac8c6 fix(artifacts): support task image artifact previews (#1821)
## Summary
Task image artifacts can now complete the full loop: agents and chat
flows can register base64 image bytes, and task details can display
those artifacts with an expandable preview instead of leaving them as
undiscoverable metadata.

This keeps binary payloads on the existing managed artifact storage
path, validates that base64 payloads are real non-empty image data, and
documents the new `dataBase64` field for engine-tool callers. The task
details artifacts gallery now treats image cards as expandable while
leaving document, audio, video, and generic artifact cards on their
existing behavior.

## Validation
- `pnpm --filter @fusion/dashboard exec vitest run
app/components/__tests__/TaskDocumentsTab.test.tsx
src/routes/__tests__/artifacts-route-integration.test.ts
--silent=passed-only --reporter=dot`
- `pnpm --filter @fusion/engine exec vitest run
src/__tests__/agent-artifact-tools.test.ts --silent=passed-only
--reporter=dot`

---

[![Compound
Engineering](https://img.shields.io/badge/Built_with-Compound_Engineering-6366f1)](https://github.com/EveryInc/compound-engineering-plugin)
![AI_Assistant](https://img.shields.io/badge/AI_Assistant-000000)


<!-- stage-review-badge-begin -->

---

<a href="https://stagereview.app/Runfusion/Fusion/pull/1821">
  <picture>
<source media="(prefers-color-scheme: dark)"
srcset="https://stagereview.app/assets/gh-open-in-stage-dark.svg">
<img src="https://stagereview.app/assets/gh-open-in-stage-light.svg"
alt="Open in Stage">
  </picture>
</a>

<!-- stage-review-badge-end -->

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

* **New Features**
* Added inline base64 (`dataBase64`) support for registering image
artifacts from agent tools, including task-scoped chat registration.
* Task details now allow expanding image media artifacts in a preview
lightbox with accessible keyboard interaction.
* **Bug Fixes**
* Improved verification for media streaming by validating raw binary
responses; added HTTP 200/404 coverage for image endpoints.
* **Documentation**
* Updated `fn_artifact_register` tool documentation to include the
optional `dataBase64` parameter.
* **Tests**
* Added coverage for base64 validation/error handling and lightbox
expand/close behavior (including Escape and Tab focus trapping).
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-06-29 17:33:50 -07:00
Phil Larson
4c31441f58 fix: reset PR fixture git remote mock consistently 2026-06-29 17:18:59 -07:00
Phil Larson
6763584f64 fix: align dashboard PR fixture cwd mock 2026-06-29 17:17:35 -07:00
Phil Larson
bdd0a1cc2c test(cli): stabilize dashboard pr repository fixtures 2026-06-29 17:17:35 -07:00
copilot-swe-agent[bot]
1bf8d83bc1 Merge remote-tracking branch 'origin/main' into fusion/fn-7143 2026-06-30 00:14:37 +00:00
gsxdsm
42226edde1 FN-7245: expose workflow authoring tools to agents
Expose workflow authoring and selection tools through agent-visible extension surfaces.

- Register workflow list/get/create/update/delete/settings/select and trait-list tools in the published pi extension.
- Export shared workflow tool schemas/factories and include workflow settings in centralized authoring tool sets.
- Update action-gate classifications, permission examples, docs, tests, and the changeset for the new agent workflow surface.

Files changed:
 .changeset/FN-7245-workflow-tools.md               |   7 +
 docs/agents.md                                     |   4 +-
 docs/cli-reference.md                              |  17 ++
 docs/workflow-steps.md                             |   9 +-
 .../src/__tests__/extension-workflow-tools.test.ts | 244 +++++++++++++++++++++
 packages/cli/src/__tests__/extension.test.ts       |   8 +
 packages/cli/src/extension.ts                      | 142 ++++++++++++
 packages/core/src/types.ts                         |   6 +-
 .../dashboard/src/__tests__/chat-manager.test.ts   |   9 +-
 .../planning-document-tools-exposure.test.ts       |  19 +-
 .../engine/src/__tests__/agent-action-gate.test.ts |   8 +
 .../agent-workflow-tools-exposure.test.ts          |  30 ++-
 .../src/__tests__/gating-classifications.test.ts   |  13 +-
 .../src/__tests__/permanent-agent-gating.test.ts   |   4 +-
 packages/engine/src/agent-tools.ts                 |  13 +-
 packages/engine/src/gating-classifications.ts      |   6 +-
 packages/engine/src/index.ts                       |   7 +
 17 files changed, 506 insertions(+), 40 deletions(-)

Fusion-Task-Id: FN-7245

Fusion-Task-Lineage: 82501602-7177-4ee8-a67b-32de35aa73de

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-29 16:35:51 -07:00
gsxdsm
353aaf3b4a fix(FN-7143): support task image artifacts
Fusion-Task-Id: FN-7143
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-29 09:47:59 -07:00