Commit Graph

522 Commits

Author SHA1 Message Date
gsxdsm
074868dd59 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
cfffe156b2 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
01eabe4aa7 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
39e833b91e feat(FN-2014): merge fusion/fn-2014 2026-04-17 14:31:43 -07:00
gsxdsm
b4764a1bd4 feat(FN-2007): merge fusion/fn-2007 2026-04-17 14:25:18 -07:00
gsxdsm
6f12375725 feat(FN-1982): merge fusion/fn-1982 2026-04-17 14:09:37 -07:00
gsxdsm
23c38c20b9 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
f35ea101c1 fix(FN-1572): stabilize fusion agent execution 2026-04-17 12:13:39 -07:00
gsxdsm
9bcefcb3a9 fix(FN-000): process agent memory dreams 2026-04-17 10:03:46 -07:00
gsxdsm
728022366d fix(FN-000): search agent memory through memory tools 2026-04-17 09:52:23 -07:00
gsxdsm
2a981fc4d1 fix(FN-000): align qmd memory lifecycle 2026-04-17 09:41:05 -07:00
Fusion
9baa29fd08 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
39cbfaba02 fix(FN-000): simplify qmd memory settings 2026-04-17 08:16:36 -07:00
gsxdsm
985b8a4eb5 fix(FN-000): rebuild layered memory system 2026-04-17 07:36:22 -07:00
Fusion
07ddb1ca1f 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
d7ff914e3d fix(FN-1989): stabilize triage fallback 2026-04-17 01:49:25 -07:00
gsxdsm
5ef809d935 fix(FN-1952): merge pi package settings 2026-04-17 00:20:19 -07:00
gsxdsm
bab9761591 fix(FN-1952): recover routines schedules merge 2026-04-16 23:07:40 -07:00
gsxdsm
8df18fab2b fix(FN-1952): restore pi auth and extension loading 2026-04-16 21:42:16 -07:00
gsxdsm
a99af24297 fix(FN-1952): read legacy oauth auth 2026-04-16 21:16:48 -07:00
gsxdsm
bd8324eba4 fix(FN-1952): recover failed review tasks 2026-04-16 20:52:50 -07:00
gsxdsm
e2560981fe feat(FN-1952): move archived tasks to cold database 2026-04-16 19:49:07 -07:00
gsxdsm
4a576c028c fix(FN-1952): bound recovery and task log growth 2026-04-16 19:32:35 -07:00
Fusion
80e49b8e40 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
8de7feeb13 feat(FN-1974): merge fusion/fn-1974 2026-04-16 15:55:14 -07:00
Fusion
9e1c18e0c8 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
ee72c3e3b2 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
cb9a58e0b1 feat(FN-1887): merge fusion/fn-1887 2026-04-16 10:58:19 -07:00
gsxdsm
695e908594 feat(FN-1914): merge fusion/fn-1914 2026-04-16 07:53:31 -07:00
Fusion
d6a0ac621c 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
db15ab78f6 feat(FN-1808): merge fusion/fn-1808 2026-04-16 04:53:09 -07:00
Fusion
45b6b5cfad 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
41fa75d4f2 feat(FN-1743): merge fusion/fn-1743 2026-04-16 01:08:05 -07:00
Fusion
06cade0228 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
c8a0876f45 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
f83d3483a6 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
aa9d7069d2 feat(FN-1766): merge fusion/fn-1766 2026-04-15 16:53:30 -07:00
Fusion
08a0d7157a 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
221b599d5a 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
7ef3737378 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
72076c65d1 feat(FN-1875): merge fusion/fn-1875 2026-04-15 09:45:57 -07:00
gsxdsm
84c42e4f26 feat(FN-1872): merge fusion/fn-1872 2026-04-15 09:31:20 -07:00
gsxdsm
dc39fa82d5 feat(FN-1678): merge fusion/fn-1678 2026-04-15 09:31:03 -07:00
Fusion
8b631a98df 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
ed35b494fe 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
Fusion
d234c99c3b refactor(FN-1633): migrate MessageStore from filesystem to SQLite backend
- Replace filesystem-based message storage with SQLite backend
- Add MessageStore class using better-sqlite3 with WAL mode
- Update message.ts CLI command to use new MessageStore API
- Update dashboard routes and engine runtime for SQLite integration
- Update all related tests for new storage implementation
2026-04-15 07:02:38 -07:00
Fusion
18e3724c92 feat(FN-1762): fix typecheck errors in engine test files
- Add SignalListener type definition to child-process-worker.test.ts
- Update mockImplementation callbacks to use unknown type instead of any
- Add proper TypeScript types to createAgentWithTaskDone opts parameter
- Use optional chaining for safer customTools access
- Use () => void | undefined type for resolvePrompt variables
2026-04-15 03:40:21 -07:00
Fusion
3cd5d2c610 fix(FN-1761): fix test lint with type-safe eslint-disable comments
- restart.integration.test.ts: add eslint-disable for Function/any types in mocks
- child-process-worker.test.ts: add eslint-disable for Function[] in baseline arrays
- Restore build to passing by avoiding overly strict type changes
- All tests pass
2026-04-15 03:08:58 -07:00
Fusion
b53883cad4 feat(FN-1761): fix lint errors in remaining test files
- child-process-worker.test.ts: replace Function[] with SignalListener type
- remote-node-runtime.test.ts: add yield statement to idleStream generator
- All 57 test files pass with 0 errors
2026-04-15 03:02:55 -07:00
Fusion
f2259282ea feat(FN-1761): fix lint errors in executor.test.ts and restart.integration.test.ts
- executor.test.ts: remove unused imports (Column, StuckTaskDetector),
  replace Function type with EventListener, add MockTaskStore interface
- restart.integration.test.ts: replace require() with ESM import,
  replace Function types with proper function signatures
- All tests pass
2026-04-15 03:00:54 -07:00