Commit Graph

559 Commits

Author SHA1 Message Date
Aron Prins
a9f2fb65ef test(FN-000): resolve dashboard test noise 2026-05-07 17:27:15 +02:00
Aron Prins
46072542cf test(FN-000): harden local test suite 2026-05-07 17:26:51 +02:00
Fusion
dca07892ff feat(FN-3396): bundle Cursor CLI as a plugin provider with dashboard auth w
Merges FN-3396's full Cursor CLI provider integration (Steps 1–4): defines a CLI-backed provider contract, adds the `fusion-plugin-cursor-runtime` plugin package with process management and runtime probes, wires dashboard auth flows and UI (ProviderCard, onboarding modal, settings), and bundles the

Fusion-Task-Id: FN-3396
2026-05-07 04:17:52 -07:00
Fusion
5299745fc4 feat(FN-3077): enforce plugin AI security scan gate across install flows
- Add core plugin AI security scan module and schema support for scan toggle/state metadata
- Enforce scan checks during CLI and dashboard plugin install flows, with preserved API error status on scan failures
- Expose plugin scan toggle and rescan actions in dashboard/plugin manager with route and UI coverage
- Update plugin authoring and CLI/dashboard docs, plus add changeset for published CLI package

Fusion-Task-Id: FN-3077
2026-05-07 02:15:14 -07:00
Fusion
95002edf21 feat(FN-3624): fix modal scrolling and add mobile modal tests
The merge adds task creation replication across mesh nodes (FN-3631) alongside UI fixes for modal scrolling in the dashboard, particularly the ScriptsModal and GitManagerModal, with corresponding mobile tests. It also hardens the bundle-output test runner's npm execpath fallback logic (FN-3624).

Fusion-Task-Id: FN-3624
2026-05-07 01:18:34 -07:00
Fusion
d1490d2972 feat(FN-3450): add mesh task create replication across nodes
Implements distributed mesh task creation by adding replicated create primitives to the core store, wiring new API routes (`register-mesh-routes.ts`) that replicate task creation across clustered nodes while preserving remote-targeting metadata, and updating the dashboard's task creation flow accord

Fusion-Task-Id: FN-3450
2026-05-07 00:05:34 -07:00
Fusion
1de4844369 feat(FN-3575): rebuild plugin system with catalog, settings, and CLI comman
Restores plugin management features across the CLI and dashboard, including a new `plugin available/settings` commands and a refactored PluginManager component that groups built-in plugins (agent-browser, fusion) separately from custom ones, with updated documentation on the plugin authoring guide.

Fusion-Task-Id: FN-3575
2026-05-06 22:17:35 -07:00
Fusion
b507e78402 feat(FN-3599): align documentation with delivery process
Documentation delivery alignment completing Step 5 of FN-3369, updating the CLI reference, research docs, and research hardening preflight guide with consistent documentation delivery guidance across all three files.

Fusion-Task-Id: FN-3599
2026-05-06 18:40:52 -07:00
gsxdsm
921c588fdd fix(tui): ← returns to main pane from focused log split
Previously ← in the narrow log strip cycled the section (matching n/p),
which was disorienting once the user had drilled into the strip — they
expected ← to back out, not flip them to a different panel. Now ← from
a focused log strip clears the narrow-split sub-focus and returns to
the main pane (System / Stats / Utilities / Settings) where the user
can drag-select tokens or interact with the panel as usual. p/P still
cycle sections in all states; ↑ at the top of the strip and Esc
continue to work as before.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-06 18:31:19 -07:00
gsxdsm
20d1f8076b fix(tui): re-enable narrow log-split on System without losing UI
Bring back the bottom log strip on the System panel and make sure
nothing that lives in System is dropped when the strip steals rows:

- Render the [Enter] / [c] / drag-to-select hint unconditionally so
  shortcuts stay discoverable when the strip has sub-focus and System
  isn't the keyboard target. The split-aware focus border still tracks
  which pane the keyboard is wired to.
- Move URL and Token to their own full-width rows under the status-chip
  wrap row. Long token values now wrap onto multiple lines instead of
  being truncated or pushed off-panel — the auth token is always
  visible (and selectable) in full.
- Keep mouse reporting OFF whenever System is the active section, even
  when the log strip below has sub-focus, so click-drag selection of
  the token text continues to work.
- Update estimateSystemContentRows to mirror the new layout: greedy
  pack of small status chips, full-width URL / Token rows that wrap by
  ceil(width / inner), and an always-counted hint row. The dynamic
  split sizer now reserves enough rows for the panel in every state.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-06 18:27:18 -07:00
gsxdsm
9a281eaa5f fix(tui): skip narrow log-split on System panel
System has interactive UI — Enter to open URL, [c] to copy auth token,
and click-drag for token selection — whose [Enter]/[c] hint row only
renders when the panel has focus. Auto-shifting focus into a bottom log
strip on ↓ hid that hint and removed a clear visual path back to the
panel for token operations. Restrict the auto-split to inert sections
(Stats / Utilities / Settings); System keeps the full single-pane view
it had before.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-06 18:16:58 -07:00
gsxdsm
6e8689ae3d feat(tui): split narrow main view to surface live logs
When the dashboard TUI collapses to single-pane mode (narrow width or
short terminal), show a horizontal log strip at the bottom of the screen
while the active section renders on top. The split is content-driven:
the top pane gets exactly the rows it needs to render its section
without truncating (computed from SystemPanel's chip wrap at the current
width, or each panel's known row count for Stats/Utilities/Settings),
and the log strip absorbs every remaining row to maximize log
visibility. Down-arrow shifts sub-focus into the log strip with the
same key bindings as the dedicated Logs section (j/k, Home/G, Enter to
expand, w to wrap, c to copy, f to filter, mouse wheel). Up-arrow at
the top of the strip or Esc returns focus to the main pane.
Right/Left/Tab continue to cycle sections, so the dedicated full-screen
Logs view is unchanged. The split auto-disables if the log strip would
get fewer than 6 rows.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-06 18:11:49 -07:00
Fusion
d8fd83a921 test(FN-3607): harden test workflow verification and isolation checks
- Expand test-changed coverage and shard selection assertions for CI workflows
- Improve vitest worker temp-directory utilities and related core/CLI tests
- Refine test isolation guardrails and runtime ignore handling for live .fusion noise
- Update contributing guidance and root test script usage for the verified workflow

Fusion-Task-Id: FN-3607
2026-05-06 11:51:48 -07:00
Fusion
a8bfb32c70 feat(FN-3590): prioritize workspace source entry for bundled plugins and ad
This merge introduces eval score categorization with a new `eval-scoring.ts` module (FN-3601, FN-3390), hardened bundled plugin entry resolution to prioritize workspace source over installed copies (FN-3590), and documented reply-link threading behavior in the mailbox (FN-3598). It also adds mobile

Fusion-Task-Id: FN-3590
2026-05-06 11:47:41 -07:00
Fusion
a31c4323a8 feat(FN-3580): restore canonical agent lifecycle and remove terminated agen
This merge restores the canonical agent lifecycle with termination scoped at the run level (FN-3580, 4 steps), adds sender-side wake recipient override for messages, and introduces test isolation CI enforcement with a stuck-requeue race fix. UI changes remove terminated-agent indicators from AgentDe

Fusion-Task-Id: FN-3580
2026-05-06 10:18:27 -07:00
Fusion
4556df5954 feat(FN-3593): add test isolation CI enforcement, fix stuck-requeue race, a
This merge lands five FN-3593 commits establishing a test isolation contract with a new `scripts/check-test-isolation.mjs` guard that scans for accidental `beforeEach`/`afterEach`/`beforeAll`/`afterAll` in setup helpers, plus per-package `setup-test-isolation.ts` bootstraps that canonicalize the pat

Fusion-Task-Id: FN-3593
2026-05-06 09:43:51 -07:00
Fusion
9dd8445c96 feat(FN-3583): prevent worktree collisions on manual moves and make heartbe
The merge lands five commits: a fix (FN-3583) that preserves non-tool message boundaries when tools are hidden in CLI bundles, plus hardened test coverage for that regression and bundle asset bootstrapping; worktree collision prevention on manual task moves via a new `worktree-names.ts` module and s

Fusion-Task-Id: FN-3583
2026-05-06 07:38:09 -07:00
Fusion
8f812e2f89 feat(FN-3565): add plugin management CLI, loader, runner, and dashboard rou
This merge adds a complete plugin management system to Fusion: a new `fn plugin` CLI command for installing/removing plugins, a plugin loader in core, a plugin runner in engine, and dashboard routes for plugin management UI, along with a plugin management guide in docs. It also documents task evalua

Fusion-Task-Id: FN-3565
2026-05-06 04:32:29 -07:00
Fusion
12b4a4a007 feat(FN-3534): surface task provenance in extension outputs
- Add task provenance fields to extension task list/show outputs for better source visibility
- Expand CLI extension tests to cover provenance rendering in task list and task detail responses
- Add a changeset for @runfusion/fusion documenting the provenance output update
- Harden ensure-test-artifacts script and tests to cover incomplete runtime dist tree scenarios

Fusion-Task-Id: FN-3534
2026-05-06 00:05:55 -07:00
gsxdsm
bdc8ecca77 Merge pull request #47 from timothyjlaurent/timothyjlaurent/fix-anthropic-logout
fix(auth): prevent credential resurrection after Anthropic logout
2026-05-06 00:02:40 -07:00
Timothy Laurent
0a588b701f fix(auth): update tombstones after storage writes to prevent state drift
Reorder logout/set/remove traps so in-memory loggedOutProviders is only
updated after the underlying storage write succeeds. If target.logout()
or target.set() throws, the tombstone set now stays consistent with the
actual storage state.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-05 21:42:13 -07:00
Timothy Laurent
b4948a4ee0 fix(auth): harden logout proxy traps from review feedback
- get() now returns undefined for logged-out providers instead of
  delegating to target.get() which could bypass the guard
- getCredential() in provider-auth returns undefined for logged-out
  providers instead of falling through to authStorage.get()
- getAll() skips logged-out providers at top of loop
- list() filters modelsJsonApiKeys against loggedOutProviders
- Added remove() trap in provider-auth for clearApiKey flow

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-05 21:21:33 -07:00
Timothy Laurent
dfb255249f fix(auth): prevent credential resurrection after Anthropic logout
The logout flow had two bugs causing credentials to reappear immediately:

1. The codebase has two separate auth storage Proxy chains:
   - createFusionAuthStorage (engine, for agents)
   - mergeAuthStorageReads (CLI, for dashboard UI)
   Neither had a logout trap, so supplemental credentials from
   ~/.claude/.credentials.json were never excluded after logout.

2. The upstream AuthStorage.hasAuth() checks environment variables
   (ANTHROPIC_API_KEY), which always returns true regardless of logout.

Fix: Add loggedOutProviders tracking to both Proxy chains. All query
traps (has, hasAuth, get, getAll, list, getApiKey) return false/undefined
for logged-out providers instead of delegating to the underlying storage.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-05 20:51:44 -07:00
gsxdsm
12193d265c feat(FN-3299): auto-install bundled runtime plugins on first save
Hermes / OpenClaw / Paperclip runtime cards in Settings now lazily
register themselves on first Save instead of failing with `Plugin
"fusion-plugin-...-runtime" not found`. The CLI also bundles each
runtime plugin (with @fusion/plugin-sdk inlined via esbuild) into
dist/plugins/<id>/bundled.js so npm/npx-installed Fusion can load them
without the workspace SDK dependency.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 20:47:38 -07:00
gsxdsm
d47e48fa78 fix(dashboard): drop terminated-state leftovers and AgentListModal duplicate Resume
Removes no-op `agents.filter((a) => true)` calls (a leftover from the
terminated AgentState refactor) flagged by eslint and updates affected
tests and fixtures so `terminated` is no longer referenced. Also:

- Deletes the duplicate `state === "paused"` render branch in
  AgentListModal list view that produced two "Resume" buttons.
- Updates the AgentDetailView help text to reflect the current
  deletable states ("idle or paused").
- Aligns the bundled-plugin-install test with the new auto-load
  behavior for already-installed enabled plugins.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 20:47:38 -07:00
gsxdsm
041eb894d8 feat(agents): per-agent run-missed-heartbeat-on-startup setting
When the engine boots, if an agent has the new
runMissedHeartbeatOnStartup flag enabled and lastHeartbeatAt is older
than its interval, fire one catch-up heartbeat through the existing
executeHeartbeat path. Default is off, so existing agents are
unchanged. Toggle exposed in the agent's Heartbeat Settings tab.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 20:47:38 -07:00
gsxdsm
8a57d3fa96 feat(tui): up/down cycle sections on Main; Enter on Logs releases mouse for text selection
Up/Down arrows now cycle the focused panel on the Main page (mirroring
Left/Right), except on the Logs panel where they keep their existing
role of navigating log entries. Expanding a log entry with Enter now
also disables xterm mouse reporting so the user can click-drag to
select the message text; closing the expanded view restores wheel
scrolling.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 15:03:45 -07:00
gsxdsm
61dac2801d fix(cli): declare node-pty as runtime dep so npx runfusion.ai terminal works on clean install
node-pty was previously only present transitively via the workspace
@fusion/dashboard devDependency, which is stripped at publish time. Fresh
users running `npx runfusion.ai` hit a 503 "PTY module could not be loaded"
when opening the dashboard terminal. Tightened the package-config guard so
this regression is caught next time.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 15:02:41 -07:00
gsxdsm
045f94b98c chore: silence node:sqlite ExperimentalWarning in tests, fix QR mock type
Patch process.emitWarning in the shared vitest setup to drop the
"SQLite is an experimental feature" notice; align the test mock for
getQrPayload with the canonical RemoteQrPayload signature.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 14:33:26 -07:00
Fusion
30f6381ec0 feat(FN-3513): add eval domain store, plugin dashboard view registry, and G
This merge adds three major features: an eval domain (`eval-store.ts`, `eval-types.ts`) with persistence schema for evaluation data; a plugin dashboard view registry with navigation integration for third-party dashboard extensions; and GitHub source metadata traceability that locks and enforces issu

Fusion-Task-Id: FN-3513
2026-05-05 12:25:50 -07:00
Fusion
ca30babd97 feat(FN-3287): document PR link visibility in dashboard README
Merges the documentation update for FN-3287, adding 2 lines to the dashboard README covering PR link visibility behavior. This completes Step 5 of the task.

Fusion-Task-Id: FN-3287
2026-05-05 07:18:32 -07:00
Fusion
5b33e45544 fix(FN-3433): restore workspace llama-cpp docs index integrity
- Restore workspace llama-cpp extension path resolution in CLI command handling
- Add missing docs/README.md index entries and keep README/doc links aligned
- Add regression coverage for docs README index completeness and docker docs references
- Carry forward related workspace stability updates and test hardening from the branch

Fusion-Task-Id: FN-3433
2026-05-04 23:59:52 -07:00
Fusion
aab28e1adb feat(FN-3434): add Claude OAuth credential interop with verification and st
This merge lands four major features: the desktop app gains shell onboarding with remote mode support via a new `DesktopModeChooser` and `shell-settings` module (FN-3399); the dashboard gains full archived insights support with the `InsightsView` redesign and `useInsights` hook overhaul (FN-3315); C

Fusion-Task-Id: FN-3434
2026-05-04 23:47:26 -07:00
Fusion
b45b4dd17a feat(FN-3315): add test coverage for archived insights in three test suites
Adds test coverage for archived insights across the core store, `InsightsView` component, and `useInsights` hook — 156 lines of new tests covering FN-3315.

Fusion-Task-Id: FN-3315
2026-05-04 23:47:26 -07:00
Fusion
09cb8749a9 feat(FN-3411): document docker provisioning endpoints
- Expand architecture docs with Docker provisioning API endpoint details
- Add Docker documentation coverage for the new provisioning endpoint behavior
- Add CLI docker command tests to validate endpoint usage and regression coverage

Fusion-Task-Id: FN-3411
2026-05-04 22:17:10 -07:00
Fusion
d790854e24 feat(FN-3313): add plugin slot registry, planning mode rewind, and docker n
This merge lands five features spanning the Fusion stack: research settings key renaming (FN-3313, Steps 2–7) across types, defaults, CLI, and engine packages; static plugin slot-host rendering contract documentation (FN-3260); Docker node provisioning routes with a planning modal (FN-3116); plannin

Fusion-Task-Id: FN-3313
2026-05-04 21:21:22 -07:00
gsxdsm
f909688dd9 Merge pull request #30 from timothyjlaurent/fix/sqlite-corruption-wal-pragmas
fix: prevent SQLite B-tree corruption with WAL tuning and batched agent logs
2026-05-04 21:20:32 -07:00
gsxdsm
cbe272b93b feat(dashboard-tui): auto-toggle mouse mode based on focused panel
Default mouse reporting OFF so click-drag selection works by default —
useful for copying the auth token directly off the System panel without
needing the [c] keyboard shortcut. Auto-enable when the user focuses a
panel that consumes wheel events:

  - Status mode → on while Logs is focused, off elsewhere
  - Interactive → on for Files / Git / Board (which uses wheel in the
    task-detail screen), off for Agents / Settings

Implemented as a useEffect in DashboardApp that maps state.activeSection
+ state.mode + state.interactiveView → controller.setMouseEnabled. [M]
remains a manual override; the next focus change reapplies the auto
policy. Controller's start() now honors initial mouseEnabled rather than
unconditionally writing the SGR enable sequence.

Updated System-panel hint to advertise click-drag selection, simplified
the help-overlay [M] entry, and flipped the createInitialState test
expectation.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-04 18:21:57 -07:00
Fusion
69c75feaea feat(FN-3330): add wait_for_completion polling for research runs in extensi
Adds `wait_for_completion` polling support for research runs in the CLI extension, along with tests covering the research status schema and wait behavior, and ships a patch changeset for `@runfusion/fusion`.

Fusion-Task-Id: FN-3330
2026-05-04 17:57:17 -07:00
Fusion
1187ea45d0 feat(FN-3329): refine dashboard TUI system panel and setup wizard UX
- Expand dashboard TUI state/controller wiring for system panel interactions and mouse toggle behavior
- Update dashboard TUI app rendering and tests to cover the new panel controls
- Improve SetupWizardModal layout and interaction behavior with matching CSS and test updates
- Restore docs/research.md wording and add a changeset for the published CLI package

Fusion-Task-Id: FN-3329
2026-05-04 17:22:21 -07:00
Fusion
d5e8318748 feat(FN-3227): add startup model sync for opencode-go commands
- Add shared startup model sync helper and integrate it into dashboard, serve, and daemon command startup flows
- Introduce opencode-go model sync setting in core schema/types and expose it in dashboard settings UI
- Add CLI regression tests covering startup model sync behavior and command wiring
- Document the new startup model sync setting and related CLI behavior updates

Fusion-Task-Id: FN-3227
2026-05-04 17:22:21 -07:00
Timothy Laurent
cd09f12c77 merge main: resolve db.test.ts import conflict
Combined both branches: TaskStore import from main + rmSync import
from our branch (needed for fresh DB test cleanup).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-04 14:58:47 -07:00
Timothy Laurent
8e7b8e139f fix(tests): resolve 4 failing tests across cli and dashboard packages
- task.test.ts: save/delete GITHUB_REPOSITORY env before
  runTaskPrCreate fallback test so CI env doesn't bypass the
  getCurrentRepo code path
- app.test.tsx: increase waitForFrameContains timeout for ASCII QR
  render from 3s to 6s to accommodate slower CI environments
- remote-auth.test.ts: switch createRemoteSettings default from
  tailscale to cloudflare with a static ingressUrl so
  resolveRemoteBaseUrl doesn't 409 when no tunnel is running

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-04 14:54:55 -07:00
Fusion
496c000e99 feat(FN-3310): add fn update command to CLI reference
Adds a changeset for a new `fn` command and updates the CLI reference documentation with the command details.

Fusion-Task-Id: FN-3310
2026-05-04 14:18:25 -07:00
Fusion
73430354e1 docs(FN-3293): finalize stabilization audit documentation
- Add FN-3293 stabilization update section to docs/test-audit-report.md
- Document deterministic test hardening across CLI, dashboard, droid-cli, and core suites
- Update flaky hotspot notes to reflect resolved dashboard retry timeout coverage

Fusion-Task-Id: FN-3293
2026-05-04 13:17:57 -07:00
Fusion
d06475b056 feat(FN-3377): add llama.cpp provider integration with pi extension and mob
This merge adds a new llama.cpp local AI provider integration, including a `pi-llama-cpp` CLI extension package with model resolution and context retrieval, a `LlamaCppProviderCard` UI component for provider configuration, backend API routes for model registration and llama.cpp probe/health checking

Fusion-Task-Id: FN-3377
2026-05-04 10:44:38 -07:00
Fusion
1e73863ac6 feat(FN-3195): document llama.cpp provider setup and onboarding
Docs(FN-3195): adds llama.cpp provider setup and onboarding documentation to the main and dashboard READMEs.

Fusion-Task-Id: FN-3195
2026-05-04 10:18:38 -07:00
gsxdsm
89401cd2c9 Add changeset 2026-05-04 09:54:43 -07:00
Fusion
7cd7872e5a feat(FN-3366): document CI shard contract in contributing guide
Documentation update to `docs/contributing.md` adding details on the CI shard contract (FN-3366 Step 3).

Fusion-Task-Id: FN-3366
2026-05-04 09:20:07 -07:00
Fusion
0237607d81 feat(FN-3014): document research recovery semantics
Documents research recovery semantics in the CLI reference and settings reference, adding 9 lines of documentation across both files.

Fusion-Task-Id: FN-3014
2026-05-04 09:20:07 -07:00