Commit Graph

527 Commits

Author SHA1 Message Date
Fusion
44caaa45d9 fix(FN-2055): harden node test utilities and import resolution
- Convert seed-sample-nodes into a test-only helper and remove direct execution against the real central database
- Replace private-looking host examples with RFC 5737 test-net addresses in node connection docs and ConnectNodeModal expectations
- Add Vitest aliases for @fusion/core and @fusion/engine to stabilize cross-package test imports
- Load AgentReflectionService via local engine source path in in-process runtime to avoid alias resolution failures
2026-04-18 12:21:14 -07:00
Fusion
36cec38c14 fix(FN-2054): harden agent loop stuck-detection and self-healing
- Add defensive cleanup for in-memory task tracking when tasks move state or agents pause
- Improve stuck-detection and self-healing flow to reduce leaked state and missed recovery paths
- Add logging around previously swallowed errors and tighten executor cleanup behavior
- Expand restart and self-healing reliability tests to cover regression scenarios
2026-04-18 12:11:00 -07:00
gsxdsm
89b5a722dc feat(FN-2052): merge fusion/fn-2052 2026-04-18 10:43:23 -07:00
Fusion
fad2c68ba2 fix(FN-2053): enforce mission status consistency from feature state
- Recompute slice status when adding a feature so stale "complete" slices cascade back to milestone and mission statuses
- Require checkMissionCompletion to verify every feature is done before marking a mission complete
- Add mission-wide status-chain recomputation when stale complete slices or milestones are detected during reconciliation
- Expand core and engine tests to cover addFeature downgrades, stale complete states, and feature-level completion checks
2026-04-18 10:41:34 -07:00
gsxdsm
7575ae46bf feat(FN-2051): merge fusion/fn-2051 2026-04-18 10:28:16 -07:00
gsxdsm
bcc0b8eb01 feat: auto-revive in-review tasks with failed pre-merge workflow steps
Adds a SelfHealingManager scan that finds tasks parked in in-review with
a failed pre-merge workflow step and no active session, and sends them
back through the existing sendTaskBackForFix flow (PROMPT.md injection,
step reset, todo → in-progress). Bounded by a new maxPostReviewFixes
setting (default 1) and a per-task postReviewFixCount so a persistently-
failing verifier cannot ping-pong a task indefinitely.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-17 23:28:32 -07:00
Fusion
7b9a50fe32 fix(FN-2036): wire agent reflections runtime and UI dependencies
- Add a reusable .btn-secondary style (including light-theme hover/focus states) for reflections tab actions
- Initialize ReflectionStore in reflection API routes before reading or writing reflections
- Create AgentStore and ReflectionStore during in-process runtime startup and wire AgentReflectionService into TaskExecutor
- Reuse the initialized AgentStore for HeartbeatMonitor and trigger scheduler setup with non-fatal guards
2026-04-17 22:29:16 -07:00
Fusion
e4f43a8b43 fix(FN-2040): prevent false unresponsive agent states
- Apply a default 30s heartbeat interval when scheduler config is missing or invalid
- Dynamically register and update heartbeat triggers from AgentStore create/update events
- Register all non-disabled agents at startup and guard listener cleanup when stopping runtime
- Treat non-periodic agents as healthy in dashboard health checks to avoid stale-time false alarms
- Expand engine and dashboard tests and add a patch changeset for @gsxdsm/fusion
2026-04-17 20:40:06 -07:00
Fusion
96aeb67a4f feat(FN-2014): merge fusion/fn-2014 2026-04-17 14:31:43 -07:00
gsxdsm
ac9b0fcd9d feat(FN-2007): merge fusion/fn-2007 2026-04-17 14:25:18 -07:00
gsxdsm
e51393285b feat(FN-1982): merge fusion/fn-1982 2026-04-17 14:09:37 -07:00
gsxdsm
217ccdd4aa fix(FN-000): skip qmd index mutations in test runs
Why: tests were leaking ~700 per-temp-dir collection registrations
into the user's global ~/.config/qmd/index.yml because searchWithQmd
and the agent-memory qmd path called execFile("qmd", ...) with the
real binary, bypassing shouldSkipBackgroundQmdRefresh() which only
guarded the schedule* wrappers.

Guard both direct-execFile paths under the same skip flag and fall
back to file-based agent memory search when skipping.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-17 13:54:28 -07:00
gsxdsm
ef696f4564 fix(FN-1572): stabilize fusion agent execution 2026-04-17 12:13:39 -07:00
gsxdsm
0515882da1 fix(FN-000): process agent memory dreams 2026-04-17 10:03:46 -07:00
gsxdsm
d5d5c13781 fix(FN-000): search agent memory through memory tools 2026-04-17 09:52:23 -07:00
gsxdsm
383033fcdc fix(FN-000): align qmd memory lifecycle 2026-04-17 09:41:05 -07:00
Fusion
28accdb085 feat(FN-2000): add memory auto-summarize settings and automation sync
- Add Memory section controls for enabling auto-summarize with threshold and cron schedule inputs
- Wire ProjectEngine to sync auto-summarize automation on startup and when related settings change
- Reuse a single startup settings snapshot when syncing insight extraction and auto-summarize automations
- Add SettingsModal and ProjectEngine tests covering auto-summarize UI persistence and automation re-sync behavior
2026-04-17 09:16:08 -07:00
gsxdsm
75dc5a8c77 fix(FN-000): simplify qmd memory settings 2026-04-17 08:16:36 -07:00
gsxdsm
bdfb4842d2 fix(FN-000): rebuild layered memory system 2026-04-17 07:36:22 -07:00
Fusion
a5a65e86fd feat(FN-1984): enrich chat and heartbeat prompts with agent context
- Add agent memory support to instruction resolution and introduce/export buildAgentChatPrompt for identity-aware prompt assembly with optional project memory
- Wire ChatManager to AgentStore so chat sessions can enrich system prompts per agent and include recent conversation context in prompt payloads
- Update server chat wiring to provide an AgentStore for prompt enrichment and keep graceful fallback behavior when agent context is unavailable
- Enrich HeartbeatMonitor system prompts with resolved agent instructions/ratings while preserving base-prompt fallback paths
- Expand dashboard and engine tests to cover prompt enrichment, fallback behavior, conversation context assembly, and AgentStore route mocks
2026-04-17 02:19:54 -07:00
gsxdsm
4c2db876da fix(FN-1989): stabilize triage fallback 2026-04-17 01:49:25 -07:00
gsxdsm
d51992850f fix(FN-1952): merge pi package settings 2026-04-17 00:20:19 -07:00
gsxdsm
8bf3e4a3ec fix(FN-1952): recover routines schedules merge 2026-04-16 23:07:40 -07:00
gsxdsm
32a92e961e fix(FN-1952): restore pi auth and extension loading 2026-04-16 21:42:16 -07:00
gsxdsm
22e411a82b fix(FN-1952): read legacy oauth auth 2026-04-16 21:16:48 -07:00
gsxdsm
a313037cca fix(FN-1952): recover failed review tasks 2026-04-16 20:52:50 -07:00
gsxdsm
48e79cd46d feat(FN-1952): move archived tasks to cold database 2026-04-16 19:49:07 -07:00
gsxdsm
99394ee05c fix(FN-1952): bound recovery and task log growth 2026-04-16 19:32:35 -07:00
Fusion
bede73c81d feat(FN-1976): forward mailbox message events end to end
- Wire MessageStore into the in-process executor runtime and project engine
- Forward MessageStore events through dashboard SSE infrastructure for mailbox updates
- Close mailbox pipeline gaps across API routes, server wiring, and mailbox UI components
- Add regression coverage for messaging routes, SSE forwarding, and agent tool behavior
- Document the MessageStore SSE wiring pattern in .fusion/memory.md
2026-04-16 18:20:58 -07:00
gsxdsm
47f19676ae feat(FN-1974): merge fusion/fn-1974 2026-04-16 15:55:14 -07:00
Fusion
c3e92cdec4 feat(FN-1949): add send_message and read_messages agent tools
- Add send_message tool factory for executor agents to send messages
- Add read_messages tool factory to retrieve agent inbox messages
- Update heartbeat to process pending messages during agent wake cycles
- Include message tools in executor agent tool context
- Add comprehensive unit tests for message tools
- Add heartbeat message processing tests
- Add end-to-end agent messaging test
- Create changeset for @gsxdsm/fusion package
2026-04-16 13:50:10 -07:00
Fusion
222a807dc2 feat(FN-1950): add list_agents and delegate_task agent delegation tools
- Add list_agents tool for discovering agents by role, state, or includeEphemeral filter
- Add delegate_task tool for assigning work to a specific agent by ID
- Add comprehensive test coverage for both delegation tools in agent-tools-delegation.test.ts
- Update executor.ts to wire up delegation tools when agentStore is configured
- Document both tools in AGENTS.md and docs/agents.md
2026-04-16 13:17:17 -07:00
Fusion
74b4d20c45 feat(FN-1887): merge fusion/fn-1887 2026-04-16 10:58:19 -07:00
gsxdsm
68b1651e0b feat(FN-1914): merge fusion/fn-1914 2026-04-16 07:53:31 -07:00
Fusion
9e1b81227e feat(FN-1822): add settings sync between mesh nodes
- Add settings sync options and logic to PeerExchangeService for bidirectional settings exchange
- Extend mesh/sync endpoint with push, pull, sync-status, and auth-sync operations
- Add comprehensive tests for settings sync in peer-exchange-service.test.ts
- Add mesh route tests for settings exchange endpoints in dashboard
- Update memory.md with settings sync documentation
2026-04-16 07:10:47 -07:00
gsxdsm
72842d8687 feat(FN-1808): merge fusion/fn-1808 2026-04-16 04:53:09 -07:00
Fusion
21759d34e7 feat(FN-1776): expose AgentStore for SSE event forwarding with ephemeral agent filtering
- Expose getAgentStore from runtime and engine packages
- Add includeSystem filter to getOrgTree API endpoint
- Wire AgentStore into SSE endpoint for event forwarding
- Forward agent events through the SSE pipeline
- Exclude ephemeral agents from org tree API and UI
- Filter ephemeral agents in useAgents hook
- Update AgentsView test to expect includeSystem filter
- Document agent SSE event forwarding architecture
2026-04-16 01:44:54 -07:00
gsxdsm
ed778db7c2 feat(FN-1743): merge fusion/fn-1743 2026-04-16 01:08:05 -07:00
Fusion
37fdcc99a7 test(FN-1893): add comprehensive QMD test coverage
- Add QMD route success tests in dashboard routes
- Expand QMD prompt completeness tests in executor
- Add QMD bootstrap and instruction completeness tests in triage
- Add QMD convenience function integration tests in memory-backend and project-memory
2026-04-15 23:09:02 -07:00
Fusion
f2c5ac7b82 feat(FN-1737): auto-delete child/task-worker agents and hide system agents by default
- Auto-delete spawned child agents when their parent task terminates (reportsTo cleanup)
- Auto-delete task-worker agents when their owned task completes
- Add includeSystem filter to AgentStore.list() and REST API
- Hide system agents by default on the agents page (show only user-facing agents)
- Wire includeSystem toggle through the API layer and AgentsView component
- Add changeset for @gsxdsm/fusion patch release
- Add comprehensive tests for agent cleanup and includeSystem filtering
2026-04-15 20:36:42 -07:00
Fusion
9bd437e166 feat(FN-1733): add dedicated pause/resume APIs for projects
- Add pauseProject() and resumeProject() methods to ProjectEngineManager
- Wire pause and resume routes to engineManager with proper error handling
- Update frontend useProjectActions hook to use dedicated pause/resume APIs
- Add comprehensive tests for pause/resume in ProjectEngineManager
- Add route tests for project pause/resume with engineManager mocks
- Fix mock stubs for getProject/updateProject/updateProjectHealth
2026-04-15 19:53:22 -07:00
gsxdsm
c18608c7e6 feat(FN-1766): merge fusion/fn-1766 2026-04-15 16:53:30 -07:00
Fusion
03863986bf feat(FN-1715): add scope-aware automation and routine scheduling
- Add scope field to automations and routines for granular control
- Update automation-store and routine-store with scope-aware query methods
- Extend database schema with scope column for automations and routines
- Update cron-runner and routine-scheduler to respect scope boundaries
- Add project context injection to in-process runtime for scoped execution
- Include changeset for minor version bump
2026-04-15 16:32:16 -07:00
gsxdsm
561ca32040 fix(FN-1673): recover interrupted merge finalization
Add self-healing for stale in-review tasks left in merging status after the merge commit lands. Recovery uses taskStuckTimeoutMs, records merge details, moves confirmed merges to done, and clears stale merge status for retry when no landed commit is found.
2026-04-15 15:22:15 -07:00
Fusion
ddf0fc7303 feat(FN-1877): add auto-compaction on context window errors to promptWithFallback
- Detect context-window-limit errors from AI sessions and automatically compact
  the session conversation history before retrying (one attempt per session)
- Centralize auto-compaction in promptWithFallback (pi.ts) so executor, merger,
  and step-session-executor all benefit from the same mechanism
- Remove scattered context-limit error handling from executor.ts, merger.ts, and
  step-session-executor.ts in favor of the centralized approach
- Add comprehensive tests for auto-compaction retry behavior in pi.test.ts
- Remove unused compactSessionContext import from step-session-executor.ts
- Add memory note documenting the centralized auto-compaction design
2026-04-15 10:42:20 -07:00
gsxdsm
afcf2fd12e feat(FN-1875): merge fusion/fn-1875 2026-04-15 09:45:57 -07:00
gsxdsm
b59a3dea23 feat(FN-1872): merge fusion/fn-1872 2026-04-15 09:31:20 -07:00
gsxdsm
dde7c3174e feat(FN-1678): merge fusion/fn-1678 2026-04-15 09:31:03 -07:00
Fusion
2b4c95bcc0 feat(FN-1854): send tasks back to in-progress when verification fails
- Add sendTaskBackForFix() method that encapsulates the 'verification failed
  — send back to in-progress' pattern
- Replace all 4 hard failure locations with sendTaskBackForFix() calls
- Update failure feedback template to mention 'sent back to in-progress'
- Update test assertions for workflow step failure cases
- Rename test that verifies passing workflow step behavior
- Add new test for verification failure send-back flow
- Add addTaskComment mock to store factories for testing

The task executor now sends tasks back to in-progress (instead of 'in-review'
with 'failed' status) when workflow step verification fails and retries are
exhausted. This allows the executor to attempt to fix the issues on the
next pass, mirroring the existing deterministic verification failure behavior
in project-engine.ts.
2026-04-15 08:28:51 -07:00
Fusion
647a10b161 feat(FN-1634): promote mailbox to first-class navigation view
- Add MailboxView as a full-page navigation view replacing the modal-based approach
- Migrate MessageStore from filesystem to SQLite backend for message persistence
- Implement conversation grouping for inbox display with unread badge state
- Remove modal plumbing (useModalManager, AppModals exports) and simplify App.tsx
- Add evictStaleProcessing() to TriageProcessor for self-healing hung triage sessions
- Add comprehensive MailboxView tests and Header mailbox tests
- Update README documentation with MailboxView features
- Add CSS styles for MailboxView component
- Fix MobileNavBar tests for mailbox tab visibility
2026-04-15 08:04:02 -07:00