Commit Graph

757 Commits

Author SHA1 Message Date
Fusion
4247e78c4e fix(dashboard): prevent foreign-branch diffs after worktree pool reuse
When the worktree-recycle pool reassigned a path to a new task, the old
task's diff endpoints kept reading the new task's branch state — surfacing
unrelated commits as the original task's "files changed" list.

- Clear task.worktree/branch in the merger after the worktree is released
  to the pool or removed, so the path no longer points anywhere.
- Validate the worktree's current branch matches task.branch in the three
  worktree-backed diff endpoints; on mismatch return empty rather than
  diffing against a foreign branch.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 11:34:49 -07:00
Fusion
41015b2d73 fix(FN-2698): load plugins during CLI runtime startup
- Load configured plugins during dashboard startup before launching the UI flow
- Load plugins during serve and daemon startup so runtime hooks are available immediately
- Add targeted CLI command tests for dashboard, serve, and daemon auto-load behavior at startup
- Add a changeset documenting the plugin runtime startup fix for @runfusion/fusion
2026-04-27 09:10:14 -07:00
Fusion
5033114625 feat(FN-2697): add todo task creation with agent picker actions
- Add TodoView controls to create todo tasks directly and optionally assign an agent
- Style the TodoView agent picker dropdown for desktop and mobile interactions
- Add TodoView tests covering todo task creation and agent assignment behavior
- Simplify dashboard TUI status grid sizing to use flexible panel layout
2026-04-27 09:01:32 -07:00
Fusion
92b94594f3 feat(FN-2694): merge fusion/fn-2694 2026-04-27 08:45:49 -07:00
Fusion
e877d99262 test(FN-2687): add plugin install getRootDir regression coverage
- Add CLI plugin install tests that reproduce and guard the getRootDir path-resolution regression
- Validate plugin installation behavior in the regression scenario to prevent future breakage
- Add a patch changeset for @runfusion/fusion documenting the plugin install getRootDir fix
2026-04-27 08:29:40 -07:00
Fusion
ce1c355b7e fix(FN-2688): add root dir to plugin install mock task store
- Add getRootDir() to the plugin command mock TaskStore used by createPluginLoader
- Ensure fn plugin install can resolve project root expectations without runtime failures
- Add a patch changeset for @runfusion/fusion documenting the CLI fix
2026-04-27 08:13:58 -07:00
gsxdsm
da3da74f6b fix(tui): keep Main header visible in single-column mode
In StatusModeSingle (cols<80 || rows<20), an active panel whose
intrinsic content exceeds the container could push the frame past
terminal rows under tmux, scrolling the header off the top. Yoga
defaults flexShrink to 0 (unlike CSS), so panels refused to shrink
when wrapped Text grew them vertically.

- Default Panel flexShrink to 1 so panels collapse to fit container
- Pin StatusModeSingle's three rows to explicit heights with
  overflow:hidden, eliminating overflow paths entirely
- Pass availableRows to LogsPanel from the capped middleHeight so
  its rowBudget matches the actual height instead of stdout.rows-11

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 05:16:25 -07:00
Fusion
b969b01b1c fix(FN-2672): harden automation execution and scheduling flows
- Improve automation startup diagnostics and route handling for manual execution steps
- Add support for full manual automation step execution in dashboard and engine flows
- Expand due-schedule coverage in automation store and dashboard route tests
- Add cron runner regression tests for edge cases and document the automation execution fix via changeset
2026-04-27 03:07:58 -07:00
Fusion
e80850e7c9 feat(FN-2663): add cached update-check setting, APIs, and banner
- Add global updateCheckEnabled setting to core schema/types and wire dashboard command to cache update checks in the CLI
- Implement dashboard server update-check cache module plus REST routes for status and refresh behavior
- Add dashboard client hook, legacy API helpers, and UpdateAvailableBanner UI to show cached CLI update notices
- Cover update-check server routes, hook behavior, banner rendering, and route registration with focused tests
- Document update-check configuration and API behavior in architecture and settings reference docs
2026-04-27 01:40:07 -07:00
Fusion
c8b27040f9 fix(FN-2657): stabilize TUI logs panel width
- Set explicit column widths in the dashboard TUI logs panel to prevent width jitter during log updates
- Add a regression test covering logs panel width stability across rerenders
- Keep existing layout behavior while eliminating shifting in the logs view
2026-04-27 00:47:47 -07:00
Fusion
70155b0f1d feat(FN-2640): align planning labels across agent log and tests
- Rename Planning/Triage label to Planning in Agent Log model metadata and related assertions
- Map triage agent badge display name to Plan while preserving existing labels for other agent roles
- Update TaskDetailModal and AgentLogViewer tests to match the revised planning terminology
- Stabilize dashboard TUI QR payload test by waiting for label and payload text separately with explicit timeouts
2026-04-27 00:09:53 -07:00
gsxdsm
6e336ffccc fix(tui): recover frame on dim-poll divergence under tmux+ssh
The 2s dim-poll fallback relied on _refreshSize() emitting a 'resize'
event to trigger recovery, which doesn't always propagate under tmux+ssh
— leaving Ink's frame buffer pinned to the old layout until the user
resized again. Extract the recovery body and call it directly whenever
OS-reported dims differ from the last recovered size.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 00:00:26 -07:00
Fusion
864d55065b feat(FN-2648): merge fusion/fn-2648 2026-04-26 23:51:25 -07:00
Fusion
ddf5b13c00 feat(FN-2635): add optimistic agent state updates across dashboard
- Apply optimistic start/stop state transitions in AgentsView and AgentDetailView action handlers
- Add optimistic behavior to AgentListModal while preserving rollback on API failure
- Expand unit test coverage for optimistic transitions and failure recovery in all three agent views
- Update dashboard TUI test expectation to align with the new agent state update flow
2026-04-26 22:59:45 -07:00
Fusion
7e13ebff3a feat(FN-2633): anchor usage popover to header trigger
- Track and thread usage trigger bounds from Header through modal management to UsageIndicator
- Render desktop usage details as an anchored popover while preserving existing modal wiring behavior
- Extract usage indicator styling into a dedicated UsageIndicator.css and remove planning-mode style duplication
- Expand header and usage indicator tests to cover anchor rect propagation and popover behavior
- Stabilize CLI bundle output sqlite assertion for workspace test reliability
2026-04-26 22:33:06 -07:00
Fusion
c009427401 fix(FN-2577): preserve Todos access and TodoView interaction behavior
- Keep the view overflow trigger available when Todos is supported so the Todos view remains reachable
- Update TodoView list rows to use an explicit select button and align active-state assertions with the new structure
- Restore keyboard focus styling and mobile action visibility in TodoView CSS for accessibility and usability
- Harden CLI extension test cleanup with retry logic for transient ENOTEMPTY/EBUSY tempdir removal errors
2026-04-26 22:07:43 -07:00
gsxdsm
27e72190a6 feat(FN-2625): merge fusion/fn-2625 2026-04-26 21:36:23 -07:00
Fusion
d8c4ab9c50 feat(FN-2626): make task detail logs responsive to terminal width
- Add narrow-log helper formatting to compact task detail log output on small terminals
- Implement responsive log panel layout that adapts between narrow and wide views
- Preserve readable wide-terminal formatting while reducing wrapping in constrained widths
- Add app-level tests covering narrow and wide log formatting behavior
2026-04-26 21:32:03 -07:00
gsxdsm
a942b71de6 chore(release): v0.6.0
Version bump via changesets.
2026-04-26 21:27:49 -07:00
gsxdsm
8b089d0a81 feat(cli): rebrand splash and surface version in dashboard
Splash now reads "multi node agent orchestrator" / runfusion.ai / v<version>.
System panel and status bar also display the running CLI version.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 21:27:04 -07:00
gsxdsm
3fc49a2e6b feat(FN-2622): merge fusion/fn-2622 2026-04-26 17:56:18 -07:00
gsxdsm
635dba8cbb chore(release): v0.5.0
Manual version bump to 0.5.0 (changeset version produced 1.0.0 from a
single minor changeset against 0.4.1; that release was rolled back and
the 1.0.0 npm version deprecated).

Aggregates: status terminology refresh (planning/replan), Reviewer
rename, in-review pause behavior, dashboard-tui resize hardening,
dev-server experimental toggle fix, version reporting fix.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 17:31:46 -07:00
gsxdsm
a1b0bc552c Revert "chore(release): v1.0.0"
This reverts commit 69e7d53bb3.
2026-04-26 17:26:56 -07:00
gsxdsm
69e7d53bb3 chore(release): v1.0.0
Version bump via changesets.
2026-04-26 17:25:49 -07:00
gsxdsm
00b96f4fe0 test(cli): bump timeouts and skip slow FS-heavy suites
Raise per-test timeout to 30s in extension and provider-settings suites
where parallel FS load (or worker-pool starvation) can push pure-sync
tests past vitest's 5s default. Skip the fn pi extension and agent-export
suites whose coverage is duplicated by command-level tests but cost ~62s
and ~3.3s respectively on every run.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 17:24:00 -07:00
gsxdsm
f540faac9d fix(dashboard-tui): harden resize handling against tmux/ssh races
Debounce SIGWINCH bursts (50ms trailing edge), wipe the alt-screen before
Ink redraws so shrunk frames don't leave stale rows, and add a 2s dim-poll
fallback for environments that drop SIGWINCH. LogsPanel now reads stdout
rows itself so timer-driven renders always see live dimensions, and the
layoutKey includes a resizeTick so Yoga's cached layout is invalidated
even when cols×rows lands back on the same string.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 17:23:54 -07:00
Fusion
dfd82b144d feat(FN-2618): merge fusion/fn-2618
- test(FN-2618): harden process-manager fs/tmpdir mocks
- fix(cli): mark react-devtools-core external in bun compile
- fix(pty): switch to @homebridge/node-pty-prebuilt-multiarch fork
2026-04-26 15:33:39 -07:00
gsxdsm
14e41b0ebe fix(core,cli): make standalone binary actually run
Bun's --compile binary previously crashed at startup because:
  1. node:sqlite isn't implemented in Bun 1.3.8 (require returns
     undefined; import throws "No such built-in module")
  2. ink imports react-devtools-core inside its reconciler; even though
     gated by isDev(), the bundled module path failed to resolve at
     runtime

Fixes:
  - Add packages/core/src/sqlite-adapter.ts: a thin DatabaseSync wrapper
    that picks bun:sqlite under Bun and node:sqlite under Node via
    createRequire (so the bundler doesn't statically pull in either).
    Drop-in for the three core files that import DatabaseSync.
  - Install react-devtools-core as a workspace devDependency so it
    resolves at bundle time. The dev-only code path is still gated by
    DEV=true, so it stays inert in production.
  - Revert the prior --external react-devtools-core flag (no longer
    needed and was causing a different runtime error).
  - Mark node-pty external in tsup so esbuild stops choking on the
    homebridge fork's conditional native require()s
    (build/Release/conpty.node etc.) when bundling for the npm package.
  - Update bundle-output test: the bundle now contains both
    bun:sqlite and node:sqlite specifiers (loaded via createRequire).

Verified end-to-end: dist/fn dashboard -p 0 starts cleanly (no PTY,
sqlite, or devtools errors). Core tests 3038/3038, CLI tests 826/826
(up from 822/826 baseline).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 15:25:06 -07:00
gsxdsm
19c75e0b39 fix(cli): mark react-devtools-core external in bun compile
ink@6 has a devtools.js module that imports react-devtools-core. It is
only loaded at runtime when DEV=true, but Bun's static bundler still
tries to resolve it at compile time and fails with "Could not resolve".
Marking it external lets the compile succeed; the dynamic import path
is never taken in production.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 15:03:12 -07:00
gsxdsm
5937910e8d merge: node-pty -> @homebridge fork migration 2026-04-26 15:00:15 -07:00
gsxdsm
4bae9d22a1 fix(pty): switch to @homebridge/node-pty-prebuilt-multiarch fork
Resolves "Failed to load PTY module" install errors on Linux/macOS by
aliasing node-pty to the homebridge fork, which ships prebuilds for
linux x64/arm64/arm/ia32 across many Node ABIs and uses prebuild-install
for darwin/windows binaries on install.

- Aliased dep so all "node-pty" import specifiers (and vi.mock calls)
  keep working unchanged.
- Removed darwin chmod postinstall hack (fork handles permissions).
- Updated cli/build.ts to dynamically resolve node-pty install root and
  pick prebuilds by ABI for Linux cross-compile; warn-and-skip for
  darwin/windows cross-compile (host-only there, as before).
- Added type shim because the fork's bundled typings declare module
  '@homebridge/node-pty-prebuilt-multiarch', not 'node-pty'.

Verified: pnpm install clean, dashboard typecheck clean, native module
loads and spawns shell via fork, host + linux-x64 cross-compile staging
both produce dist/runtime/<plat>/pty.node.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 15:00:10 -07:00
Fusion
f69c006a8c feat(FN-2604): merge fusion/fn-2604 (auto-resolved)
- feat(FN-2604): complete Step 8 — add changeset and delivery docs
- test(FN-2604): complete Step 7 — align tests and regenerate extension skill docs
- test(FN-2604): complete Step 6 — update dashboard tests for planning statuses
- feat(FN-2604): complete Step 5 — update CLI planning terminology
- feat(FN-2604): complete Step 4 — update workflow route status strings
- feat(FN-2604): complete Step 3 — update settings planning terminology
- feat(FN-2604): complete Step 2 — rename replanning actions in column and spec editor
- feat(FN-2604): complete Step 1 — update dashboard component status strings
2026-04-26 14:06:48 -07:00
Fusion
69aa1a550a feat(FN-2605): merge fusion/fn-2605 (auto-resolved)
- test(FN-2605): complete Step 4 — align tests with planning labels
- docs(FN-2605): complete Step 3 — update demo and script terminology
- docs(FN-2605): complete Step 2 — update docs terminology
- docs(FN-2605): complete Step 1 — update README terminology
2026-04-26 12:34:02 -07:00
gsxdsm
6a0660262c chore(release): v0.4.1
Version bump via changesets.
2026-04-26 12:24:08 -07:00
gsxdsm
03e82383d4 fix(FN-2586): restore 0.4.x release line and agent log stability 2026-04-26 12:22:06 -07:00
gsxdsm
6560e359cc chore: bump @runfusion/fusion to 0.4.0 2026-04-26 11:47:09 -07:00
gsxdsm
0928f3fb31 feat(FN-2594): merge fusion/fn-2594 2026-04-26 10:56:20 -07:00
Fusion
4379922cc8 feat(FN-2585): remove top-level remote access toggle
- Remove the standalone remoteEnabled setting from CLI, core settings defaults/types, and dashboard settings APIs/UI
- Treat remote access as enabled when an active provider is selected and that provider is configured as enabled
- Update remote auth and engine lifecycle checks to gate on provider activation instead of a global flag
- Adjust tests and add a changeset documenting the remote access configuration simplification
2026-04-26 09:19:03 -07:00
Fusion
a53ad1ae18 test(FN-2531): expand headless remote access test coverage
- Add serve command assertions for headless remote-access provider and lifecycle route behavior
- Add auth middleware integration coverage for hybrid login-url and remote-login token scenarios
- Add dedicated remote-access routes tests to verify route parity in headless mode
- Update dashboard route and server tests to validate remote auth and access flow expectations
2026-04-26 07:51:54 -07:00
Fusion
5a95353272 fix(FN-2525): harden remote access auth and tunnel regression coverage
- Add regression tests across CLI, core, dashboard, and engine for remote access auth, settings parity, and serve/TUI callback wiring
- Expand dashboard route and modal coverage for remote settings/auth flows including node environment behaviors
- Redact provider-switch failure details in tunnel process manager to avoid leaking sensitive provider diagnostics
- Update route registration and engine lifecycle tests to lock in remote-access behavior under real execution paths
2026-04-26 06:35:46 -07:00
Fusion
984f7965f6 feat(FN-2518): add remote TUI settings controls and routing
- Wire remote dashboard route contracts into CLI/TUI state and controller flows
- Add remote settings interaction UX in dashboard and dashboard-tui command paths
- Expand regression coverage for remote TUI behavior in dashboard and app test suites
- Document remote TUI controls and QR behavior in the CLI reference
- Add a changeset for @runfusion/fusion patch release
2026-04-26 01:20:32 -07:00
Fusion
b85abfa799 feat(FN-2579): merge fusion/fn-2579 (auto-resolved)
- fix(FN-2579): complete Step 3 — refine split-button accessibility
- fix(FN-2579): resolve workspace lint regression in provider
- test(FN-2579): complete Step 2 — update header engine control tests
- feat(FN-2579): complete Step 1 — style engine split-button dropdown
- feat(FN-2579): complete Step 0 — add engine control split-button behavior
- chore(release): v1.0.0
2026-04-26 00:29:19 -07:00
Fusion
1f931733f8 feat(FN-2517): add remote access controls across dashboard and TUI
- Add project-scoped remote settings and control APIs for provider activation, tunnel lifecycle, token generation, URL, and QR retrieval
- Extend Settings modal with a dedicated Remote Access section, provider forms, status/actions, and coverage in SettingsModal tests
- Wire dashboard TUI settings state to remote configuration/status and add interactive remote shortcuts for start/stop/token/url/qr actions
- Document remote-access behavior in architecture, CLI, and settings references and include a patch changeset for @runfusion/fusion
2026-04-26 00:20:43 -07:00
gsxdsm
e460abfd6d chore(release): v0.3.0
Version bump via changesets (consumed 11 changesets). Forced 0.3.0
instead of changesets' default escalation to 1.0.0 for the pre-1.0
minor bump.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 00:15:09 -07:00
gsxdsm
371f2d8e01 fix(pi-claude-cli): unblock parameterless MCP tool calls in triage
Triage with claude-sonnet-4-6 via pi-claude-cli kept looping on
fn_review_spec calls that were rejected by pi's validator with
"root: must be object". Parameterless MCP tools (schema
{type:"object", properties:{}}) emit zero input_json_delta events,
so partialJson stayed "" and the catch fell through to
finalArgs = "" — a string, which TypeBox's Type.Object({}) rightly
refuses. Default empty partialJson to {} so the call lands.

Also:
- Add a 2-step reminder loop in triage before swapping to the
  fallback planning model — primary models that wrote PROMPT.md
  but forgot fn_review_spec recover from a nudge, no need to pay
  the cold-start tax of a new triage on a different model.
- Inject @runfusion/fusion's own pi extension into dashboard/
  daemon/serve sessions and propagate the path to createFnAgent
  via setHostExtensionPaths so fn_* tools register globally
  without requiring `pi install npm:@runfusion/fusion`.
- Drop the "historical" qualifier from replayed tool labels —
  Claude was reading "TOOL RESULT (historical Read):" as
  "previous session, ignore" and looping on verification.
- Remove subprocess-lifecycle stderr debug logs that landed for
  hang diagnosis — root cause is fixed, the noise can go.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 00:00:49 -07:00
Fusion
cfd78af504 feat(FN-2569): sync fusion skill docs with runtime tools
- Add generated engine-tools reference and refresh extension/capabilities docs from source definitions
- Enhance sync-fusion-skill-tools script to verify and maintain skill documentation consistency
- Expand skill-sync tests and enforce sync:fusion-skill:check in the workspace test pipeline
- Add FN-2569 changeset documenting the published @runfusion/fusion patch update
2026-04-25 20:07:49 -07:00
Fusion
e864f6c66a fix(pi-claude-cli): rewrite bare custom tool refs in system prompt to MCP names
Triage system prompts read "MUST call fn_review_spec()" but Sonnet 4.6 routed
through pi-claude-cli writes PROMPT.md and silently skips the call — even with
the addendum explaining the deferred-tool protocol. Confirmed by the FN-2564
agent log: model called other MCP tools (fn_memory_search, fn_task_list) fine
but consistently never reached fn_review_spec, leaving triage looping on
"fn_review_spec was never called" and falling back to zai/glm-5.1 every time.

Rewrite bare `fn_*` (and any non-built-in custom tool name) references in the
system prompt to their `mcp__custom-tools__fn_*` form before sending. The
prompt now literally says "call mcp__custom-tools__fn_review_spec()" so the
model has no inference step, and the deferred-tool reminder Claude Code injects
matches verbatim. Word-boundary safe (won't touch fn_review_specifier) and
idempotent (won't double-prefix already-MCP-named occurrences).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 17:01:53 -07:00
Fusion
a4dc62d817 fix(engine): register grep/find/ls alongside read/bash/edit/write for coding sessions
pi-coding-agent 0.70's createCodingTools preset only includes read/bash/edit/write,
but pi-claude-cli's tool-mapping translates Claude's Glob→find and Grep→grep.
Triage sessions running through Claude CLI hit "Tool find not found" the moment
the model called Glob and looped on the error.

Compose the built-in set explicitly so every tool referenced by tool-mapping.ts
is registered. Read-only sessions also gain ls (was silently dropped earlier
when readonly was redefined upstream).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 16:50:33 -07:00
gsxdsm
818bff7d06 fix(extensions): always prefer vendored @fusion/pi-claude-cli over external installs
When users have an external pi-claude-cli (e.g. a global `npm install -g
pi-claude-cli`, or `npm:pi-claude-cli` in ~/.pi/agent/settings.json packages),
pi's extension discovery loaded the upstream copy and shadowed our fork. The
upstream has a once-and-lock MCP-config bug that throws "Extension runtime not
initialized" during early streamSimple calls and never recovers.

Adds reconcileClaudeCliPaths in @fusion/core, used by both the daemon's
extension assembly and the engine's per-session registerExtensionProviders, to
drop any path with a `pi-claude-cli` segment that isn't our vendored fork and
prepend the vendored path. Engine resolves the fork via require.resolve and
gracefully no-ops when it isn't reachable (e.g. embedded standalone usage).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 15:25:08 -07:00
gsxdsm
bff703196e feat(FN-2501): merge fusion/fn-2501 2026-04-25 14:24:35 -07:00