Commit Graph

4512 Commits

Author SHA1 Message Date
Fusion
551bcdc53d feat(FN-3746): document plugin API coverage and add focus-visible states
Completes Step 6 of FN-3746 by adding `focus-visible` states to ProjectCard and ProjectOverview CSS components, and documenting the Even Realities plugin API coverage in the project docs.

Fusion-Task-Id: FN-3746
2026-05-08 21:06:44 -07:00
gsxdsm
72f8c48de9 feat(dashboard): render mailbox messages as markdown
Adds GitHub-flavored markdown rendering to message bodies in both
MailboxView and MailboxModal via a shared MailboxMessageContent
component (ReactMarkdown + remark-gfm). Plain-text messages render
unchanged. Raw HTML is not executed.

- New MailboxMessageContent component with mailbox-scoped pre/table/link
  overrides; links open in a new tab with noopener noreferrer.
- Wired into the full message body and conversation thread bodies in
  both Mailbox surfaces (parity preserved).
- CSS for .mailbox-markdown, .mailbox-markdown-pre, .mailbox-markdown-table
  with horizontal scroll for code blocks/tables; removed white-space:
  pre-wrap on bodies since markdown owns its own whitespace.
- 10 new unit tests cover headings, lists, bold/italic, inline code,
  fenced code blocks, link target/rel, GFM tables, plain-text passthrough,
  raw-HTML safety, and testId forwarding. Existing 108 mailbox tests
  continue to pass.
2026-05-08 20:48:26 -07:00
Fusion
b080ea0bc5 fix(FN-3760): add SSE first-event watchdog for legacy chat streams
- Add a first-event watchdog in legacy chat SSE handling to prevent hangs before initial stream data
- Cover watchdog behavior with legacy chat stream API tests
- Add hook-level regression tests for useChat and useQuickChat first-send stream scenarios
- Include a changeset for @runfusion/fusion patch release

Fusion-Task-Id: FN-3760
2026-05-08 20:45:48 -07:00
Fusion
df9f5a95c6 feat(FN-3750): add test for selected roadmap update merge path
Adds test coverage for the selected roadmap update merge path in the roadmaps dashboard module.

Fusion-Task-Id: FN-3750
2026-05-08 20:42:30 -07:00
Fusion
6ee85daa47 feat(FN-3548): add agent action routes and approval pause/resume lifecycle
Merges the FN-3548 approval pause/resume system: agents now stall at workflow gates pending approval, with a full lifecycle spanning gate context lookup, action-gate pause/retry, executor and heartbeat pause callbacks, and dedicated approval decision routes. Also lands FN-3744 agent action routes an

Fusion-Task-Id: FN-3548
2026-05-08 20:30:40 -07:00
Fusion
58576c882e feat(FN-3772): test vitest workspace resolution stale temp dir sweep
Test coverage added for workspace resolution edge cases, specifically verifying that stale temporary directories are properly swept.

Fusion-Task-Id: FN-3772
2026-05-08 20:16:42 -07:00
Fusion
fe5148cc19 feat(FN-3744): add agent action routes, tools, and roadmap plugin extractio
Merges agent lifecycle tools (create_agent, delete_agent) with full API routes, web fetch tool implementation and tests, and full roadmap UI extraction into a bundled plugin — including schema hook, chat scroll fixes, and autostash orchestrator cleanup. Also adds mesh auth snapshot replication acros

Fusion-Task-Id: FN-3744
2026-05-08 19:59:43 -07:00
Fusion
d060558189 feat(FN-3312): run full verification after in-merge fix
Added comprehensive test coverage for the merger module (124 lines in `merger.test.ts`), covering the in-merge fix from this branch with assertions that verify the corrected behavior.

Fusion-Task-Id: FN-3312
2026-05-08 19:51:41 -07:00
Fusion
72552fa93d feat(FN-3510): document coverage suites in multi-project docs
Added 8 lines of documentation for coverage suites in the multi-project guide (FN-3510 Step 6).

Fusion-Task-Id: FN-3510
2026-05-08 19:36:58 -07:00
Fusion
ea8cca24bb feat(FN-3164): update roadmap API architecture docs
Updated the roadmap API architecture documentation in `docs/architecture.md` as part of Step 6 of FN-3164.

Fusion-Task-Id: FN-3164
2026-05-08 19:20:58 -07:00
Fusion
840653e529 feat(FN-3777): add create_agent and delete_agent tools
Adds agent creation and deletion tools to the pi extension, with engine-side implementation in `agent-tools.ts`, core store integration for agent lifecycle management, and corresponding tests and documentation updates across the workspace.

Fusion-Task-Id: FN-3777
2026-05-08 19:15:10 -07:00
Fusion
a79e91d3aa feat(FN-3758): align web fetch test coverage and documentation
Aligns web fetch tool test coverage across multiple test suites and updates the agents documentation, with a patch changeset for `@runfusion/fusion`.

Fusion-Task-Id: FN-3758
2026-05-08 18:59:08 -07:00
Fusion
eed16abacb feat(FN-3509): document node mapping availability UI in dashboard guide
Documents the node mapping availability UI in the dashboard guide.

Fusion-Task-Id: FN-3509
2026-05-08 18:44:16 -07:00
Fusion
6ab07c27d0 feat(FN-3163): test suggestion route error contract in roadmap routes
Adds an assertion for the suggestion route error contract in the roadmap routes test file, completing the test coverage for that endpoint.

Fusion-Task-Id: FN-3163
2026-05-08 18:36:51 -07:00
Fusion
05329fb059 feat(FN-3707): implement mesh auth snapshot replication across core, engine
The merge delivers two major features: mesh auth snapshot synchronization across nodes (FN-3707 steps 2/4/5, including core types, central-core plumbing, peer-exchange updates, and settings/node sync route helpers) and a bundled roadmap plugin with chat UX improvements (FN-3162, FN-3756, FN-3771, FN

Fusion-Task-Id: FN-3707
2026-05-08 18:26:14 -07:00
Fusion
7913ea1f61 feat(FN-3761): extract roadmap UI into bundled plugin with chat fixes and m
This merge introduces a bundled roadmap plugin (extracting the roadmap UI into `plugins/fusion-plugin-roadmap`) with a new plugin-owned schema hook and store bootstrap, fixes chat scroll behavior by adding bottom-snap on open and correcting stale refs in queue flush handling for both `useChat` and `

Fusion-Task-Id: FN-3761
2026-05-08 18:12:59 -07:00
Fusion
f04ae16173 feat(FN-3771): add chat bottom-snap behavior and roadmap plugin extraction
Chat UX improvements land first: bottom-snap scrolling behavior is wired into both `ChatView` and `QuickChatFAB`, with comprehensive test coverage added for the components and their underlying hooks; stale-closure bugs in the `useChat` and `useQuickChat` queue-flush handlers are also patched. Roadna

Fusion-Task-Id: FN-3771
2026-05-08 17:59:57 -07:00
Fusion
1011dc5eab feat(FN-3759): fix stale refs in useChat and useQuickChat queue flush handl
Merged branch adds FN-3759 queue flush ref fixes for `useChat` and `useQuickChat` hooks (with expanded regression test coverage), extracts the roadmap UI into a standalone plugin with schema hook and store bootstrap, ships FN-3281 review revisions with dashboard/plugin integration updates, and resol

Fusion-Task-Id: FN-3759
2026-05-08 17:52:27 -07:00
Fusion
08d2d130b5 feat(FN-3756): extract roadmap UI into bundled plugin and add autostash orp
Merges major roadmap plugin extraction (FN-3160/3161/3162), hardening the merger with autostash orphan cleanup and TOCTOU defenses (FN-3755/3756), adding shared state snapshots for mesh sync (FN-3451), shipping polling task notifications for the even realities plugin (FN-3743), defaulting non-epheme

Fusion-Task-Id: FN-3756
2026-05-08 17:43:47 -07:00
Fusion
726eb9a1d7 feat(FN-3162): add plugin-owned roadmap schema hook and store bootstrap
The merge introduces a plugin-owned roadmap schema system (FN-3162), allowing plugins to define their own schema initialization hook, with tests bootstrapped in the roadmap store and documentation added to the plugin authoring guide. The parallel FN-3281 work delivers review revisions, updates the l

Fusion-Task-Id: FN-3162
2026-05-08 17:37:38 -07:00
Fusion
c0cd5553da feat(FN-3281): ship review revisions and dashboard/plugin integration updates
- Add same-task review revision action and lock-resume regression coverage in TaskReview flow
- Migrate built-in roadmap surface to bundled plugin registration and update lazy view wiring
- Align node-specific working-directory/runtime resolution across core, engine, and dashboard routes
- Add even-realities polling task notifications and default non-ephemeral agents to active with supporting docs/changesets

Fusion-Task-Id: FN-3281
2026-05-08 17:17:59 -07:00
Fusion
6a6cb07d2c feat(FN-3508): resolve node-specific working dirs and align runtime surfaces
- Add canonical working-directory resolution with node mapping support in core and engine paths
- Update runtime/multi-project documentation and include published-package changesets for the merged work
- Migrate roadmap dashboard surface to the bundled plugin registry flow and adjust lazy-view integration/tests
- Default non-ephemeral agents to active state and extend related agent/route/executor test coverage

Fusion-Task-Id: FN-3508
2026-05-08 17:04:19 -07:00
Fusion
7e749ae1f4 feat(FN-3161): extract roadmap UI into plugin and remove built-in roadmaps
Merges a major roadmap plugin migration (FN-3161) that extracts the built-in roadmaps UI into `fusion-plugin-roadmap` with bundled plugin view registration, alongside three smaller features: agent default state hardening (FN-3773), polling task notifications for the even realities plugin (FN-3743),

Fusion-Task-Id: FN-3161
2026-05-08 17:01:28 -07:00
Fusion
d42d8ee2f2 fix(FN-3161): migrate roadmap dashboard surface to bundled plugin
- Move RoadmapsView UI, hooks, and tests from dashboard app into fusion-plugin-roadmap
- Replace the built-in roadmaps route/nav wiring with plugin view registration and host rendering
- Add bundled plugin view registration bootstrap in dashboard startup
- Update roadmap plugin build/test config and add FN-3161 removal changeset

Fusion-Task-Id: FN-3161
2026-05-08 16:51:07 -07:00
Fusion
7cb9ab78fe feat(FN-3773): default non-ephemeral agents to active and add polling task
Non-ephemeral agents now default to `active` state on creation (FN-3773), with aligned test coverage across the agent store and dashboard routes. The even-realities plugin gains a polling notification system including a notification store, card rendering, diff logic, and API routes. Review state per

Fusion-Task-Id: FN-3773
2026-05-08 16:48:44 -07:00
Fusion
089c139bad feat(FN-3743): add polling task notifications for even realities plugin
Commits merged:
- feat(FN-3743): add polling task notifications for even realities plugin

Files changed:
.../fusion-plugin-even-realities-glasses/README.md |  27 +++
 .../package.json                                   |   2 +
 .../src/__tests__/cards.test.ts                    |  82 +++------
 .../src/__tests__/diff.test.ts                     |  76 ++++++++
 .../src/__tests__/notification-card.test.ts        |  40 +++++
 .../src/__tests__/notification-routes.test.ts      |  78 ++++++++
 .../src/__tests__/notification-store.test.ts       |  71 ++++++++
 .../src/__tests__/notifier.test.ts                 | 138 +++++++++-----
 .../src/__tests__/transport.test.ts                |   4 +-
 .../src/agent-actions.ts                           |   4 +-
 .../src/cards.ts                                   | 127 ++++++++++---
 .../src/index.ts                                   |  22 ++-
 .../src/notifications/diff.ts                      |  77 ++++++++
 .../src/notifications/store.ts                     |  46 +++++
 .../src/notifications/types.ts                     |  19 ++
 .../src/notifier.ts                                | 199 +++++++++++++--------
 .../src/routes/notification-routes.ts              | 103 +++++++++++
 pnpm-lock.yaml                                     |  31 +++-
 18 files changed, 929 insertions(+), 217 deletions(-)

Fusion-Task-Id: FN-3743
2026-05-08 16:35:22 -07:00
Fusion
cc6cf53d66 feat(FN-3280): harden reviewState persistence, API, and PR feedback sync
Merges reviewState hardening (FN-3280 steps 2-3: hardened persistence, API fixes, and PR feedback sync), stepIndex reconciliation for task updates (FN-3757), roadmap route context extraction into the fusion-plugin-roadmap plugin (FN-3160), and shared state snapshots for mesh sync with autostash hard

Fusion-Task-Id: FN-3280
2026-05-08 16:28:03 -07:00
Fusion
0a4a07bda3 feat(FN-3757): normalize stepIndex lookups in task update map to match verd
Fixes a step-index normalization bug in the task executor where update map lookups were inconsistent with the zero-indexed keys used by verdicts and checkpoints, causing reconciliation failures on review/update step pairing.

Fusion-Task-Id: FN-3757
2026-05-08 16:13:06 -07:00
Fusion
a1f158f13b feat(FN-3160): move roadmap route context into fusion-plugin-roadmap plugin
The merge completes FN-3160 by making the roadmap route context plugin-owned, moving `roadmap-routes` and `roadmap-suggestions` logic from the dashboard into `fusion-plugin-roadmap` with updated plugin-loader integration. It also includes FN-3755's shared state snapshot support for mesh sync hardeni

Fusion-Task-Id: FN-3160
2026-05-08 15:43:22 -07:00
Fusion
c5948681b5 feat(FN-3755): add shared state snapshots for mesh sync and harden autostas
Adds shared state snapshots for mesh sync (FN-3451) along with 143-line mesh route registration, unifies agent action gating classifications (FN-3742), and patches the merger engine with two autostash fixes (capture stderr with AI fallback and TOCTOU race defense). Also ships a new quick-capture fea

Fusion-Task-Id: FN-3755
2026-05-08 15:07:08 -07:00
gsxdsm
46ea535b56 fix(engine): capture stderr and add AI fallback for autostash hard-fail apply
When `git stash apply` exits non-zero without producing conflict markers
(typical causes: untracked-overwrite, path missing at HEAD, index-conflict
that git refuses to mark), the previous code logged the bare exception
message and abandoned the stash. Operators couldn't distinguish failure
shapes without grepping runtime logs, and the dev's uncommitted work was
left to manual recovery even when an automated path would have worked.

Three additions on top of the conflict-marker path that already exists:

1. Capture stderr from the failing `git stash apply` (execAsync attaches
   stderr/stdout to the rejection) and surface it in the task feed and
   any subsequent failure messages, so the operator sees `error: untracked
   working tree files would be overwritten by merge:` directly instead of
   hunting it in mergerLog.

2. Layer 1 fallback: extract the patch via `git stash show -p --binary`
   and try `git apply --3way`. This is more permissive than `stash apply`
   for several common shapes (notably untracked overwrites — `--3way`
   produces conflict markers we can route to the existing AI resolver
   where stash apply just refuses).

3. Layer 2 fallback: if `--3way` also hard-fails and smartConflictResolution
   is enabled, spawn `runAiAgentForAutostashHardFail` with the patch text +
   git stderr. The agent reconstructs the developer's edits on top of HEAD
   by editing files directly, then the orchestrator scans for residual
   conflict markers before declaring success and dropping the stash.

The existing conflict-marker path remains unchanged — only the previously-
abandoned hard-fail branch gains recovery. Stash is dropped on success at
every layer; on every failure path the stash is preserved for manual
recovery and the failure cause is surfaced to the task feed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 14:08:53 -07:00
gsxdsm
24f2c56413 fix(engine): defend autostash drop against TOCTOU race
dropAutostashBySha resolved SHA→stash@{N} then ran git stash drop ${ref}
non-atomically. Any other process (interactive shell, parallel merger,
fix-agent) pushing a stash between resolve and drop shifted the index, so
we silently dropped the wrong entry while leaving ours behind. The task
log then claimed "Restored pre-merge autostash X cleanly" even though the
stash was still in the list — observed on FN-3558 (e81e922) and others.

Verify the ref still resolves to our SHA via git rev-parse before dropping;
on mismatch, re-resolve and retry up to 5x. Return success/failure so the
caller can record honest status to the task feed instead of unconditionally
logging "cleanly".

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 14:05:06 -07:00
Fusion
0e9d9f281a feat(FN-3451): add shared state snapshots for mesh sync
This merge completes the mesh sync shared-state pipeline (FN-3451 Steps 1–3) by adding agent run snapshot limits, applying inbound snapshots, and returning shared state snapshots, while hardening agent store cache initialization during sync. It also unifies agent action gating classifications across

Fusion-Task-Id: FN-3451
2026-05-08 14:03:17 -07:00
Fusion
8c112ffda8 feat(FN-3742): unify agent action gating classifications across permanent a
Merges a significant refactor of agent action gating into a unified `gating-classifications.ts` module shared across permanent agents and executor gating logic, plus new glasses quick-capture support with dedicated routes and parser, and a fix restoring step progress visibility during task execution

Fusion-Task-Id: FN-3742
2026-05-08 13:59:14 -07:00
Fusion
ded66d0488 feat(FN-3754): unify agent action gating classifications and add even cards
The merge introduces the new `fusion-plugin-even-cards` workspace plugin providing board card endpoints and API key authentication, while also unifying agent action gating classifications across permanent agents with configurable display limits. The GitHub integration receives review state refresh i

Fusion-Task-Id: FN-3754
2026-05-08 13:53:37 -07:00
gsxdsm
d57daf13c0 fix(engine): restore step progress visibility during task execution
Revert an off-by-one regression in fn_task_update (introduced in 8e969bd72)
that translated 0-indexed step numbers to step-1, mis-targeting updates and
desyncing codeReviewVerdicts/stepCheckpoints keys with fn_review_step. Also
auto-advance step state from inside fn_review_step (in-progress on entry,
done on code-review APPROVE) so the dashboard reflects progress when an
agent runtime skips the follow-up fn_task_update call — observed with
permanent-agent CEO sessions on the openai-codex transport.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 13:50:09 -07:00
Fusion
0370db4099 feat(FN-3753): unify agent action gating classifications and add even cards
The merge adds the `fusion-plugin-even-cards` workspace plugin with board card endpoints and auth support, refactors agent action gating classifications into a unified `gating-classifications.ts` module, refreshes review state on manual triggers, repoints roadmap type imports to the plugin package,

Fusion-Task-Id: FN-3753
2026-05-08 13:49:55 -07:00
Fusion
f09c629596 feat(FN-3751): unify agent action gating classifications across permanent a
Merges two new plugin packages — `fusion-plugin-even-cards` (board/card endpoints with API key auth) and `fusion-plugin-even-realities-glasses` (notifier, quick-capture, settings, transport, Fusion API client, and agent actions) — plus a substantial engine refactor that unifies agent action gating c

Fusion-Task-Id: FN-3751
2026-05-08 13:43:38 -07:00
Fusion
86daa5f3e1 feat(FN-3741): repoint roadmap type imports to plugin package
Repointed roadmap type imports to the plugin package across the dashboard (RoadmapsView, useRoadmaps hook, legacy API). Also replaced an invalid spinner token in the TaskDetailModal CSS.

Fusion-Task-Id: FN-3741
2026-05-08 13:36:13 -07:00
Fusion
a2c5438c3b feat(FN-3749): repoint roadmap type imports to plugin package
Fixed FN-3749 by repointing roadmap type imports from their original location to the plugin package across the legacy API, RoadmapsView component, and useRoadmaps hook.

Fusion-Task-Id: FN-3749
2026-05-08 13:29:45 -07:00
Fusion
5639dd87ff feat(FN-3755): reorder task detail timestamps
Reorders timestamps in the task detail modal and adds a rendering test for the component, with a pnpm-lock bump.

Fusion-Task-Id: FN-3755
2026-05-08 13:22:28 -07:00
Fusion
87a53d1127 feat(FN-3739): add even cards plugin with board card endpoints and api key
Adds a new `fusion-plugin-even-cards` plugin that exposes read-only board card endpoints via API key authentication, including board-cards, task-cards, and format utilities, along with comprehensive test coverage and updated plugin authoring documentation.

Fusion-Task-Id: FN-3739
2026-05-08 13:15:22 -07:00
Fusion
cb0b01b3d5 feat(FN-3279): refresh review state on manual trigger and restore roadmap e
Adds review tab refresh UX, metadata, and API (FN-3279) alongside permanent-agent action gating coordination tools (FN-3724), and introduces two new workspace plugin packages: `fusion-plugin-even-cards` (board/task cards with auth and board-routes) and `fusion-plugin-even-realities-glasses` (cards,

Fusion-Task-Id: FN-3279
2026-05-08 13:05:27 -07:00
gsxdsm
11cd2342af fix: remove unused globals directive in roadmap-suggestions.js 2026-05-08 12:50:38 -07:00
Fusion
7582a32cda feat(FN-3739): add fusion-plugin-even-cards workspace plugin
- Add a new fusion-plugin-even-cards package with typed card formatting utilities and board/task card generation
- Implement authenticated plugin routes for board card endpoints and plugin registration wiring
- Add unit tests for auth handling, board routes, and card formatting behavior
- Document plugin in PLUGIN_AUTHORING guide and register it in pnpm workspace

Fusion-Task-Id: FN-3739
2026-05-08 12:46:12 -07:00
Fusion
71e5360630 feat(FN-3752): add fusion-plugin-even-realities-glasses plugin package
This merge introduces `fusion-plugin-even-realities-glasses`, a new plugin package providing tools for cards, notifications, quick capture, settings sync, Fusion API client, and agent actions, along with corresponding tests. It also adds eval feature flags and documentation, applies UI refinements t

Fusion-Task-Id: FN-3752
2026-05-08 12:12:57 -07:00
Fusion
cafaa68a5f feat(FN-3738): add fusion-plugin-even-realities-glasses plugin package with
Implements a new Fusion plugin package (`fusion-plugin-even-realities-glasses`) providing settings schema, a Fusion HTTP API client, cards, quick capture actions, a notifier, and transport stub — plus plugin routes and lifecycle hooks wired into the pi extension. The branch concludes with a small fi

Fusion-Task-Id: FN-3738
2026-05-08 12:05:46 -07:00
Fusion
6b2164fe7d feat(FN-3736): declare setTimeout global in roadmap-suggestions.js
Declares the `setTimeout` global in `roadmap-suggestions.js` to resolve a linting or runtime error in the roadmap plugin route handler.

Fusion-Task-Id: FN-3736
2026-05-08 11:47:58 -07:00
Fusion
fbc47ec49c feat(FN-3724): add coordination tools and permanent-agent action gating
This merge adds a direct-mode review tab to the task detail modal (FN-3278), improves mobile mailbox keyboard handling and fixes request hangs during wake dispatch (FN-3750/FN-3751), and reclassifies coordination tools with lock exemptions in the agent gating system (FN-3724), alongside GitHub route

Fusion-Task-Id: FN-3724
2026-05-08 11:43:11 -07:00
Fusion
04ff9d9403 feat(FN-3278): add direct-mode review tab to task detail modal
Merges FN-3278 review tab direct-mode (data, rendering, regression tests, typing fixes, and docs across Steps 2/3/6), FN-3750 mobile keyboard stabilization for mailbox and reply composer, FN-3751 fire-and-forget wake dispatch to prevent request hangs, and FN-3748 workspace aliases for @fusion/* pack

Fusion-Task-Id: FN-3278
2026-05-08 11:36:26 -07:00