Commit Graph

479 Commits

Author SHA1 Message Date
gsxdsm
5b6a695c53 feat(FN-1119): add agent API key management APIs
- Add AgentApiKey and AgentApiKeyCreateResult types and export them from @fusion/core
- Implement AgentStore API key create/list/revoke methods with SHA-256 token hashing and JSONL persistence
- Add comprehensive AgentStore coverage for CRUD behavior, revocation semantics, persistence, and concurrent key creation
- Add dashboard routes and API tests for POST/GET/DELETE agent key endpoints with 404/validation handling
- Add a minor @gsxdsm/fusion changeset for the new agent API key feature
2026-04-07 23:32:26 -07:00
gsxdsm
56c07aa4de feat(FN-1096): add task agent assignment persistence and API
- Add assignedAgentId to core task types, database schema migration, and TaskStore persistence flows
- Implement dashboard assignment API routes for setting and clearing task-to-agent assignments
- Expand core and dashboard test coverage for persistence, migration behavior, and assignment route handling
- Add a changeset for the published CLI package to document the assignment core update
2026-04-07 22:53:47 -07:00
gsxdsm
04107abe09 test(FN-1115): add reusable test project fixture coverage
- Add a shared test-project fixture module that provisions isolated TaskStore-backed projects with cleanup helpers
- Implement seedTasks and destroyTestProject utilities for realistic task data setup and teardown in tests
- Add Vitest coverage for fixture initialization, seeded task counts, project isolation, custom settings, and real TaskStore operations
2026-04-07 22:25:16 -07:00
gsxdsm
a11167081f feat(FN-1078): add central node registry support
- Add NodeConfig/NodeStatus types, export node types from @fusion/core, and include optional nodeId on registered projects
- Upgrade central DB schema to v2 with a nodes table, node indexes, and projects.nodeId migration handling
- Implement CentralCore node APIs for register/update/list/get/unregister, health checks, and project-to-node assignment flows with emitted events
- Seed a default local node during central init and mark it online using global concurrency settings
- Expand central-core and central-db tests to cover node defaults, schema changes, lifecycle operations, health transitions, and assignment behavior
2026-04-07 19:23:03 -07:00
gsxdsm
71fdffb37b test(FN-1084): expand mission workflow automated test coverage
- Add dashboard mission e2e coverage for autopilot endpoint flows and mission summary behavior
- Add comprehensive mission interview tests for planning, step progression, and output handling
- Extend CLI mission command tests for add/link workflows and argument validation paths
- Strengthen engine mission scheduler assertions around activation sequencing and state transitions
- Add core mission store tests to validate mission persistence and related edge cases
2026-04-07 19:06:18 -07:00
gsxdsm
981c5d951c feat(FN-1065): add immediate message response mode for heartbeats
- Add MessageResponseMode and messageResponseMode runtime config to core agent heartbeat types and exports
- Extend MessageStore with an onMessageToAgent hook plus runtime hook updates for agent-directed messages
- Wire HeartbeatMonitor to wake agents on incoming messages when messageResponseMode is immediate and state is eligible
- Update AgentDetailView with a Message Response Mode setting, validation, and runtimeConfig persistence
- Expand core and engine tests to cover hook behavior, wake-on-message triggering, and start/stop hook lifecycle
2026-04-07 18:43:16 -07:00
gsxdsm
06fe36a64c feat(FN-1061): add heartbeat trigger scheduling for agent wakeup
- Add HeartbeatTriggerScheduler class with timer, assignment, and on-demand trigger types
- Wire timer-based periodic wakeups using per-agent heartbeatIntervalMs config
- Add agent:assigned event in AgentStore for assignment-triggered wakeups
- Enhance POST /api/agents/:id/runs with WakeContext and 409 conflict on concurrent runs
- Integrate trigger scheduler into InProcessRuntime lifecycle (start/stop)
- Add enabled field to AgentHeartbeatConfig for per-agent trigger control
- Update AGENTS.md with heartbeat trigger scheduling documentation
2026-04-07 15:55:09 -07:00
gsxdsm
0f0ddc02fb feat(FN-1050): add per-agent custom instructions support
- Add instructionsPath and instructionsText fields to Agent type and AgentStore
- Create agent-instructions resolver module in engine with priority-based resolution
- Wire custom instructions into executor, triage, reviewer, and merger agents
- Add PATCH /agents/:id/instructions API endpoint with file and text support
- Add instructions editor UI to dashboard agent detail config tab
- Add comprehensive tests for instructions resolver and AgentStore integration
- Add changeset for published package bump
2026-04-07 15:17:08 -07:00
gsxdsm
28bc4a3bfa feat(FN-1045): add clickable agent run history with inline log viewer
- Add backend API endpoint for time-range filtered agent log retrieval (GET /api/agents/:id/logs)
- Add fetchAgentRunLogs API function in dashboard client
- Make RunsTab run cards clickable with inline log viewer accordion
- Make AgentRunHistory run rows clickable to expand and view logs
- Enhance AgentDetailView with collapsible log sections and time-range filtering
- Add comprehensive tests for store, routes, and component click behavior
2026-04-07 12:55:05 -07:00
gsxdsm
52e5ec8793 feat(FN-1048): add configurable agent prompts with built-in templates
- Add AgentPromptTemplate and AgentPromptsConfig types to ProjectSettings
- Create agent-prompts module with 7 built-in prompt templates and role resolver
- Wire engine agents (executor, reviewer, merger, triage) to use resolved prompts
- Add 25 test cases covering template resolution, role assignment, and validation
- Export new types from @fusion/core package
- Document agentPrompts configuration and built-in templates in AGENTS.md
2026-04-07 12:31:28 -07:00
gsxdsm
880f29115c feat(FN-1044): add thinkingLevel and planning model support to task creation
- Add thinkingLevel field to createTask and updateTask in core store
- Accept thinkingLevel and planningModel fields in dashboard task routes
- Send thinkingLevel and planningModel in frontend API calls from task forms
- Add ThinkingLevel selector to ModelSelectorTab component with tests
- Wire up planning model and thinking level in QuickEntryBox, TaskForm, and NewTaskModal
- Add unit tests for store, routes, and ModelSelectorTab coverage
- Add changeset and update AGENTS.md documentation
2026-04-07 12:18:49 -07:00
gsxdsm
825ae1061b feat(FN-1049): add per-agent heartbeat configuration via runtimeConfig
- Define AgentHeartbeatConfig interface in core types (heartbeatIntervalMs, heartbeatTimeoutMs, maxConcurrentRuns)
- Update HeartbeatMonitor to resolve per-agent config from AgentStore with validated min/max clamping
- Wire AgentStore into HeartbeatMonitor via InProcessRuntime initialization
- Add heartbeat settings section to dashboard AgentDetailView ConfigTab
- Add PATCH /api/agents/:id endpoint accepting runtimeConfig updates
- Add comprehensive tests for per-agent heartbeat config resolution and validation
- Document per-agent heartbeat configuration in AGENTS.md
2026-04-07 11:50:17 -07:00
gsxdsm
39f4f4929f feat(FN-976): add companies.sh agent import for CLI and dashboard
- Add companies.sh type definitions and parser in @fusion/core with comprehensive tests
- Create CLI `kb agent-import` command to import agents from companies.sh
- Add POST /api/agents/import dashboard endpoint with dry-run support
- Build AgentImportModal component with search, preview, and batch import UI
- Add dashboard route tests for the agent import API endpoint
- Create changeset for @gsxdsm/fusion minor bump
2026-04-07 11:41:38 -07:00
gsxdsm
43b1f6e772 feat(FN-989): add inter-agent messaging system with mailbox UI and CLI commands
- Add Message types (Message, MessageThread, MessageRecipient) and exports to @fusion/core
- Create MessageStore with full CRUD: send, read, delete, inbox, threads, and search
- Add messages table migration (schema v12) with SQLite full-text search support
- Add REST API routes for messaging (CRUD, search, broadcast, unread count)
- Add frontend API client functions for all messaging endpoints
- Build MailboxModal and MessageComposer dashboard components with header integration
- Add CLI message commands (inbox, send, read, delete) with rich output formatting
- Add comprehensive test coverage for MessageStore, CLI commands, and UI components
- Update documentation (CLI STANDALONE.md, dashboard README) with messaging usage
2026-04-07 11:21:59 -07:00
gsxdsm
1c10f2f27b refactor(FN-1056): remove dead code and unused CSS
- Delete SetupWizard component and its test file (no longer used)
- Remove migration-stubs.ts (dead migration helper code)
- Strip unused CSS rules from dashboard styles.css
- Fix minor test assertion in activity-feed theme test
- Add changeset for patch release
2026-04-07 11:18:47 -07:00
gsxdsm
c852620090 feat(FN-1022): add project memory bootstrap with agent integration
- Add project-memory module in @fusion/core with read/write/resolve helpers and upsert-on-store hook
- Bootstrap project memory during task creation (store) with structured task context
- Inject resolved project memory into executor and triage agent system prompts
- Add comprehensive tests for project-memory module, store integration, and agent prompt changes
- Document project memory architecture and usage in README
2026-04-07 00:41:19 -07:00
gsxdsm
ab064ebc26 feat(FN-965): add per-task planning model override
- Add planningModelProvider and planningModelId fields to core Task type
- Update backend API validation to accept planning model fields on create/update
- Update frontend API client and TaskForm to handle planning model
- Add planning model selector row to ModelSelectorTab component
- Wire up planning model in TaskDetailModal edit mode with save support
- Update AGENTS.md with planning model override documentation
- Add comprehensive tests for ModelSelectorTab and API routes
- Bump schema version from 10 to 11
2026-04-06 22:55:25 -07:00
gsxdsm
ff8a8682c3 feat(FN-1036): add mergeDetails collection and storage in merger
- Add MergeDetails type import and mergeDetails field to TaskStore.updateTask signature
- Store merge details (commitSha, filesChanged, insertions, deletions, mergeCommitMessage, resolution info) after successful squash merge
- Capture best-effort commitSha even when branch is not found (mergeConfirmed: false)
- Add comprehensive tests for store updateTask with mergeDetails and merger detail collection
2026-04-06 21:36:31 -07:00
gsxdsm
ddf7714ed7 fix(FN-1037): bump SCHEMA_VERSION from 9 to 10 so migration runs
- Increment SCHEMA_VERSION constant from 9 to 10 in packages/core/src/db.ts
- Ensures the auto-migration system detects the schema change and runs the new migration
- Matches migration logic that checks version delta against SCHEMA_VERSION
2026-04-06 20:27:15 -07:00
gsxdsm
0f4cfecebe feat(FN-1013): complete Step 1 — add runStepsInNewSessions and maxParallelSteps settings 2026-04-06 18:31:08 -07:00
gsxdsm
2a3a320d19 feat(FN-980): add mission autopilot for autonomous slice progression
- Add MissionAutopilot class with state machine (inactive → watching → activating → completing)
- Add autopilot database schema: autopilotEnabled, autopilotState, lastAutopilotActivityAt columns
- Integrate autopilot with scheduler: handleTaskCompletion() triggers slice activation
- Add API routes: GET/PATCH /missions/:id/autopilot, POST start/stop endpoints
- Add autopilot toggle UI in MissionManager dashboard component
- Add retry logic with exponential backoff (up to 3 attempts) for slice activation
- Add background poll (60s) to detect stale autopilot missions
- Include changeset for @gsxdsm/fusion minor bump
2026-04-05 23:11:28 -07:00
gsxdsm
31437c5a74 feat(FN-1023): add project status reconciliation and apply to GET /api/projects route
- Add reconcileProjectStatuses() method to CentralCore that scans all registered projects and updates stale health records
- Integrate reconciliation into the GET /api/projects dashboard route so statuses are refreshed on read
- Add comprehensive tests for CentralCore reconciliation logic (144 lines)
- Add route-level tests verifying reconciliation runs before response (61 lines)
2026-04-05 23:09:22 -07:00
gsxdsm
992e525648 feat(FN-1016): add comment-aware triage generation and stale approval invalidation
- Include user comments as context during AI triage spec generation and spec review
- Invalidate stale spec approvals when new user comments are added after approval
- Add lastApprovedAt tracking to task metadata for approval freshness detection
- Add comprehensive tests for comment-aware triage, review, and stale approval logic
- Add changeset for published package and update README with feature documentation
2026-04-05 23:04:27 -07:00
gsxdsm
904e4c8e00 feat(FN-1000): add token cap detection for agent task execution
- Add tokenCap to ProjectSettings with tokenCapEnabled flag, default 500K tokens
- Create TokenCapDetector class with usage tracking and cap enforcement
- Wire TokenCapDetector into executor agentWork() to auto-fail tasks exceeding cap
- Add token cap input fields to Settings Modal dashboard UI
- Add comprehensive unit tests for TokenCapDetector (174 lines)
2026-04-05 22:50:03 -07:00
gsxdsm
d2b5d58699 Fix workflow step execution wiring 2026-04-05 22:28:22 -07:00
gsxdsm
b670d8b3e3 chore: update stuck task handling and dashboard tweaks 2026-04-05 21:36:18 -07:00
gsxdsm
63beead394 fix: reserve and clear task worktrees correctly 2026-04-05 20:56:58 -07:00
gsxdsm
54e46387ec feat(FN-996): add in-review to todo retry transition with UI and state cleanup
- Add valid board transitions from todo to in-review and in-review to todo (retry)
- Clear transient fields (agentId, worktree, branch, prInfo, mergeRetries, etc.) on in-review→todo transition
- Add Retry button to TaskDetailModal for in-review tasks
- Add tests for retry transition and transient field cleanup in store
2026-04-05 18:29:44 -07:00
gsxdsm
934f61774d feat(FN-995): add slate, ash, graphite, silver color themes
- Add four new neutral-palette themes (slate, ash, graphite, silver) to the theme type definitions and selector
- Add full CSS variable sets for each theme covering backgrounds, text, borders, accents, and UI element colors
- Add swatch preview entries in ThemeSelector component for the new themes
- Add comprehensive tests covering theme registration, selector rendering, and CSS variable application
2026-04-05 17:45:09 -07:00
gsxdsm
88df7387b5 feat(FN-971): add mission status summary with progress bar to mission list
- Add MissionSummary type and getMissionSummary method to MissionStore
- Include mission summary data in GET /missions API endpoint
- Update frontend types and API client for mission summary
- Display mission status summary with progress bar on MissionManager list cards
- Add CSS styles for progress bar and summary display
- Update MissionManager tests for summary display
2026-04-05 17:19:48 -07:00
gsxdsm
f6bd237f46 feat(FN-986): add agent stop/start CLI commands and extension tools
- Add `fn agent stop <id>` and `fn agent start <id>` CLI commands for pausing/resuming agents
- Add `kb_agent_stop` and `kb_agent_start` tools to the pi extension for in-session agent control
- Validate state transitions using AGENT_VALID_TRANSITIONS before applying changes
- Export AgentStore from @fusion/core public API
- Add comprehensive tests for agent CLI commands (210 lines)
- Add changeset for @gsxdsm/fusion patch release
2026-04-05 16:15:22 -07:00
gsxdsm
18c8fd9858 fix(FN-985): clear transient fields when archiving and moving tasks to done
- Clear prInfo, issueInfo, and modelPresetId in unarchiveTask to avoid stale badge/model data
- Clear prInfo, issueInfo, and modelPresetId in moveToDone after successful merge
- Add regression tests for transient field clearing in both code paths
- Fix existing tests to use public API instead of private methods
2026-04-05 15:53:48 -07:00
gsxdsm
cb941df102 feat(FN-966): add new color themes and reduce purple across existing themes
- Add 4 new themes: night-owl, palenight, monokai-pro, slime
- Add one-dark light variant for the existing one-dark theme
- Reduce purple dominance in high-contrast, github-dark, catppuccin-mocha, everforest, and kanagawa themes
- Update workflow badges and step-type-ai-prompt to use non-purple accent colors
- Add new theme IDs to index.html validThemes for flash-of-unstyled-content prevention
- Create changeset for published @gsxdsm/fusion package
2026-04-05 14:57:31 -07:00
gsxdsm
4c5f7a5ff3 feat(FN-975): add agent spawning support for hierarchical task delegation
- Add spawn settings (maxSpawnedAgentsPerParent, maxSpawnedAgentsGlobal) to ProjectSettings type
- Implement AgentStore access and spawned agent tracking in TaskExecutor
- Add spawn_agent tool with child agent execution in isolated worktrees
- Wire up child termination on parent session end and system prompt generation
- Add comprehensive test suite (554 lines) covering spawning, limits, termination, and error handling
- Document agent spawning architecture, IPC protocol, and usage in AGENTS.md
2026-04-05 11:53:35 -07:00
gsxdsm
ec2dc79569 feat(FN-972): auto-triage features when slice activated with autoAdvance
- When a slice is activated and has autoAdvance enabled, automatically triage all features in that slice
- Add auto-triage logic to mission-store activateSlice method
- Add comprehensive tests for auto-triage behavior covering edge cases
- Fix module import paths across mission-related files (mission.ts, extension.ts, mission-integration.test.ts, mission-routes.ts, scheduler.ts)
2026-04-05 11:04:16 -07:00
gsxdsm
d4971c2d4a feat(FN-917): add 5 new color themes with full CSS, selector options, and tests
- Add 5 new color theme constants (ocean, forest, sunset, lavender, midnight) to types and index.html
- Add complete CSS theme definitions with color swatches for all 5 themes in styles.css
- Add 5 new theme options to the ThemeSelector component dropdown
- Add comprehensive tests covering all new theme options in ThemeSelector
- No breaking changes; all existing themes remain unchanged
2026-04-04 20:41:40 -07:00
gsxdsm
e105da2a6e feat(FN-946): add orphaned branch scanning and automatic cleanup
- Add scanOrphanedBranches utility to worktree-pool for detecting fusion/* branches with no matching task
- Add cleanupOrphanedBranches to SelfHealingManager with dry-run support and task re-registration
- Wire branch cleanup into deleteTask and archiveTask so branches are removed when tasks are deleted or archived
- Add comprehensive tests for scanning, cleanup, and integration with delete/archive flows
2026-04-04 18:31:18 -07:00
gsxdsm
bc980926e0 feat(FN-938): add feature triage, mission pause/stop/resume, and scheduler blocked check
- Add mission store methods for pausing, stopping, and resuming missions with proper state transitions
- Implement feature triage flow that evaluates and classifies mission features
- Add scheduler blocked-task check to prevent scheduling when dependencies are unmet
- Create dashboard mission management UI with pause/stop/resume controls
- Add mission API routes for triage, pause, stop, and resume operations
- Add e2e tests for mission routes and unit tests for mission store and scheduler
2026-04-04 18:03:03 -07:00
gsxdsm
d916628442 feat(FN-942): add resetAgent method and allow terminated→idle transition
- Add terminated→idle as a valid state transition in AGENT_VALID_TRANSITIONS
- Add resetAgent() method that clears lastError, taskId, and ends heartbeat runs
- Clear lastError automatically when transitioning away from terminated state
- Remove inline heartbeat lifecycle from updateAgentState (moved to resetAgent)
- Add comprehensive tests for state transitions, error clearing, and resetAgent behavior
2026-04-04 17:56:07 -07:00
gsxdsm
e5497db55a feat(FN-940): allow terminated agents to restart as active or running
- Remove blanket block on terminated→any state transitions in agent-store
- Add active and running as valid transitions from terminated state in types
- Update tests to verify terminated→active and terminated→running succeed
- Add tests for invalid terminated transitions (idle, paused) still throwing
2026-04-04 17:40:31 -07:00
gsxdsm
9a8d68fce8 feat(FN-837): add workflow step phase support with pre-merge and post-merge execution
- Add phase field to workflow step definitions (pre-merge vs post-merge) with persistence and API
- Execute pre-merge steps in executor before merge; post-merge steps in merger after successful merge
- Pre-merge failures block merge and keep task in in-review; post-merge failures are logged only
- Expose phase controls and phase-aware results in the dashboard UI
- Add changeset for the published @gsxdsm/fusion package
2026-04-04 17:36:18 -07:00
gsxdsm
ea4fe6fe0f feat(FN-925): add memoryEnabled setting with UI toggle and engine integration
- Add memoryEnabled boolean setting to core types and default settings
- Add Memory section toggle to SettingsModal dashboard UI
- Integrate memoryEnabled check in executor and triage engine prompts
- Add tests for settings UI, executor prompt behavior, and triage prompt behavior
- Update SettingsModal section count test for the new Memory section
2026-04-04 15:06:57 -07:00
gsxdsm
dd0b53c358 feat: add background AI sessions with persistent storage and SSE streaming
Introduces ai_sessions table (schema v9), AiSessionStore, and background
session support for mission interviews, planning, and subtask breakdown.
Adds BackgroundTasksIndicator component, SSE-based progress streaming,
and dashboard API routes for session management.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-04 13:42:02 -07:00
gsxdsm
fa25cef402 feat(FN-924): add memory insights module with extraction settings
- Add MemoryInsightsEngine class for extracting insights from task memory
- Implement pattern, metric, trend, anomaly, recommendation, and summary extractors
- Add insight extraction settings fields (enabled, maxInsights, types, schedule) to ProjectSettings
- Export MemoryInsightsEngine and related types from @fusion/core
- Add comprehensive test suite covering all extractor types and edge cases (538 lines)
2026-04-04 13:25:22 -07:00
gsxdsm
c32c4e6e83 fix(FN-915): use getFusionDir() for agent storage location
- Add getFusionDir() method to TaskStore for resolving agent database path
- Update in-process-runtime to use getFusionDir() instead of hardcoded path
- Update dashboard routes AgentStore initialization to use getFusionDir()
- Add changeset for published package patch bump
2026-04-04 12:35:15 -07:00
gsxdsm
01ffffee81 fix(FN-834): fix branch prefix drift, add merger branch guard, and fix test OOM
- Fix resolveBaseBranch to use stored branch name and consistent fusion/ prefix
  for both explicit deps and blockedBy paths (was using kb/ for blockedBy)
- Add main branch checkout verification in merger before squash merge to prevent
  feature code from landing on wrong branch lineage
- Align all branch prefix references from stale kb/ to fusion/ across executor,
  merger, store, and routes
- Fix executor test OOM by mocking merger fully, adding fake timers to retry
  tests, and switching vitest pool to vmThreads
- Update all test assertions to use fusion/ branch prefix

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-04 11:11:59 -07:00
gsxdsm
0c31127169 fix(FN-850): harden merge readiness and reopen done tasks 2026-04-04 08:35:19 -07:00
gsxdsm
e250f99b8b feat(FN-838): add defaultOn flag to workflow steps with auto-apply on task creation
- Add defaultOn boolean to WorkflowStep type and store persistence
- Auto-apply default-on workflow steps when creating tasks
- Refactor AgentDetailView and AgentListModal components for cleaner rendering
- Add CSS styles for agent detail and list modal improvements
- Update TaskCard to display workflow step status badges
- Add comprehensive tests for defaultOn store logic and TaskCard behavior
2026-04-04 05:49:54 -07:00
gsxdsm
e7fee33eba feat(FN-835): add workflow step execution mode and improve step editor UX
- Add executionMode field to WorkflowStep type with 'agent' | 'api' options and validation
- Extend TaskStore CRUD with execution mode support and validation for prompt/description
- Add API validation layer in dashboard routes for workflow step create/update/delete
- Enhance WorkflowStepManager component with inline editing, validation feedback, and improved UX
- Add comprehensive tests for store CRUD validation and API route validation
- Clean up dashboard styles by removing unused CSS rules and dead test assertions
2026-04-04 05:00:03 -07:00
gsxdsm
4e0077f48a feat(FN-834): add per-workflow-step model overrides for execution
- Extend WorkflowStep type with optional modelProvider, modelId, validatorModelProvider, validatorModelId fields
- Add API endpoints (PATCH /api/workflow-steps/:id) to update model overrides on workflow steps
- Update executor to use per-step model overrides when running workflow step agents
- Add AgentDetailView support for displaying workflow step model configuration
- Add store and executor tests for new model override behavior
2026-04-04 04:08:16 -07:00