Commit Graph

1755 Commits

Author SHA1 Message Date
gsxdsm
15f3dca938 feat(FN-1190): add agent export for Agent Companies packages
- Add a core exporter that generates COMPANY.md, per-agent AGENTS.md files, and optional SKILL.md stubs with stable slug/link handling
- Export new Agent Companies exporter APIs from @fusion/core and extend manifest kinds to include skill entries
- Add fn agent export with project-aware agent loading, optional company metadata flags, and export summary/error output
- Add POST /api/agents/export route with request validation, agent ID filtering, custom/default output directory support, and exporter integration
- Add focused tests for core exporter behavior, CLI export command, and dashboard route handling
2026-04-08 13:31:07 -07:00
gsxdsm
0ff0e3e914 feat(FN-1150): add session notification banner for awaiting input
- Add SessionNotificationBanner to list awaiting_input AI sessions with type-specific labels/icons and resume or dismiss actions
- Integrate the banner into App project layout and wire resume handlers for planning, subtask, and mission interview sessions
- Add dismiss-all handling that clears all currently awaiting-input background sessions from the banner
- Style the banner with sticky placement, entry animation, responsive layout, and action button states
- Add component tests covering filtering, count rendering, resume/dismiss callbacks, type metadata, and local dismissal behavior
2026-04-08 13:18:28 -07:00
gsxdsm
9cb4d3f323 feat(FN-1171): add agent soul memory and employees workflows
- Add soul and memory fields to agent types and AgentStore with persistence/update test coverage
- Add dashboard routes and API helpers to fetch and update agent soul/memory data
- Extend AgentDetailView with Soul, Memory, and Employees tabs and rename children labels to employees
- Normalize employee route params for type safety and add focused route/component tests for the new flows
2026-04-08 13:00:12 -07:00
gsxdsm
ac4d8a18bc feat(FN-1179): improve dashboard core modal mobile behavior
- Update core modal CSS for mobile breakpoints across task detail, new task, settings, and git manager flows
- Align spacing, sizing, and responsive layout rules to keep modal interactions usable on small screens
- Add core-modals-mobile tests to verify mobile-specific CSS behavior and regression coverage
- Document the modal mobile adaptations in the dashboard README for maintainability
2026-04-08 12:59:39 -07:00
gsxdsm
bcbe4ad286 fix(FN-1300): capture agent run output in heartbeat and step sessions
- Wire AgentLogger into heartbeat runs, including tool/text callbacks and stdout excerpts on run records
- Persist heartbeat context taskId snapshots earlier and ensure logger flushes on success and failure paths
- Pass TaskStore into StepSessionExecutor and flush per-attempt agent logs in finally cleanup
- Expand heartbeat and step-session tests to verify log persistence and flush behavior, and add a patch changeset for @gsxdsm/fusion
2026-04-08 12:46:24 -07:00
gsxdsm
d6de98f7f8 docs(FN-1315): update AGENTS.md CLI references to fn
- Replace kb CLI command examples with fn equivalents across multi-project documentation
- Update project resolution and error message examples to reference fn commands
- Align terminology from kb to fn/Fusion in architecture and runtime sections
2026-04-08 12:43:25 -07:00
gsxdsm
3a9bee20bd fix(FN-1287): standardize dashboard API error responses
- Add shared ApiError class and response helpers for consistent error shape
- Migrate routes and mission-routes handlers to use standardized API errors
- Update server error middleware, rate limiter, and node metrics error handling to use shared helpers
- Expand dashboard tests with ApiError coverage and standardized response assertions
- Add a changeset documenting the @gsxdsm/fusion patch for API error shape standardization
2026-04-08 12:37:47 -07:00
gsxdsm
659febf8ee docs(FN-1314): document headless fn serve mode
- Add a dedicated AGENTS.md section describing fn serve as a headless node runtime
- Document serve flags, remote binding defaults, and differences from fn dashboard behavior
- Capture startup banner, lifecycle state updates, graceful shutdown order, and implementation references
- Add /api/health endpoint details and common remote and Docker usage examples
2026-04-08 12:36:52 -07:00
gsxdsm
16f07b7d29 fix(FN-1313): use stable mission event ordering
- Replace mission event list sorting fallback from rowid to id for deterministic ordering
- Update latest mission error lookup to order by id instead of rowid when timestamps tie
2026-04-08 12:36:19 -07:00
gsxdsm
62f00aaac1 feat(FN-1301): add Projects action to mobile more sheet
- Add a Projects entry with icon and test id in the mobile More sheet actions
- Extend MobileNavBar props with onViewAllProjects and trigger it via the shared more-sheet action handler
- Wire App to pass handleViewAllProjects into MobileNavBar so the new action opens project selection
- Add test coverage for rendering the Projects item and invoking its callback while closing the sheet
2026-04-08 12:30:24 -07:00
gsxdsm
70a5810891 test(FN-1312): add mobile feature access regression guard
- Add dashboard regression tests that keep board, list, and agents views reachable on mobile
- Verify mobile header overflow preserves project navigation and All Projects access
- Assert More-sheet secondary actions and mobile-nav visibility fallbacks remain accessible
2026-04-08 12:29:35 -07:00
gsxdsm
d271b42840 feat(FN-1272): add task document tools for triage and executor
- Add task_document_write and task_document_read factories with schemas, revision-aware responses, and error handling in agent-tools
- Wire document tools into executor and triage sessions and update prompts to persist and reuse planning artifacts across runs
- Export document tool factories and parameter schemas from engine public entrypoints while keeping executor re-export compatibility
- Add comprehensive tests covering write/read success paths, empty/not-found cases, and store failure handling
2026-04-08 12:27:11 -07:00
gsxdsm
0cdc163a67 feat(FN-1178): harden mobile responsiveness across agent modals
- Add mobile full-screen and safe-area CSS rules for agent dialogs, including touch-friendly inputs and footer actions
- Remove hardcoded inline width constraints from AgentGenerationModal so mobile styles can fully apply
- Fill AgentListModal mobile gaps with improved control sizing, wrapped layouts, and single-column behavior at small breakpoints
- Add agent modal mobile regression tests covering responsive classes, breakpoints, and dialog sizing expectations
2026-04-08 12:18:55 -07:00
gsxdsm
a5d27c7a0e fix(FN-1299): stabilize agent detail refresh callbacks
- Stabilize AgentDetailView callback usage by storing onClose/addToast in refs and removing them from loadAgent dependencies
- Prevent full-screen loading spinner on background refresh by only showing it before the initial agent load
- Memoize detail modal handlers in AgentsView to keep callback identities stable across parent re-renders
- Add regression tests covering callback identity churn and refresh behavior without loading-state flicker
2026-04-08 12:15:54 -07:00
gsxdsm
db9fcd0bd0 feat(FN-1297): prevent mobile detail open from control taps
- Broaden TaskCard touch target detection from HTMLElement to Element so nested SVG targets are treated as interactive
- Keep mobile tap handling from opening task details when pressing card controls
- Add board-mobile regressions for edit button taps, steps toggle taps, and SVG-inside-button touch events
2026-04-08 12:10:16 -07:00
gsxdsm
bae9d8cd2a feat(FN-1270): add task document storage with revision history
- Add task document domain types and key validation helpers in core types
- Introduce schema v18 migration creating task_documents and task_document_revisions tables with indexes
- Implement TaskStore CRUD/upsert APIs for task documents, including revision archiving and task update events
- Export task document types from the core index for downstream consumers
- Add comprehensive task document tests and update database schema/version assertions
2026-04-08 12:09:41 -07:00
gsxdsm
f35515ed19 feat(FN-1264): enforce heartbeat budget governance for trigger execution
- Gate heartbeat runs in executeHeartbeat when agents are over budget and skip timer runs above threshold
- Pause agents with pauseReason "budget-exhausted" when run usage pushes them over budget
- Budget-gate assignment and timer triggers in HeartbeatTriggerScheduler and include budgetStatus in assignment wake context
- Expand agent-heartbeat test coverage for budget exhaustion, threshold behavior, pause transitions, and trigger gating
2026-04-08 12:03:38 -07:00
gsxdsm
8b2881aad4 feat(FN-1277): hydrate dashboard theme settings from backend
- Hydrate useTheme from global settings while seeding initial state from localStorage cache to prevent flash
- Add write-through theme persistence so setter updates local cache immediately and asynchronously saves via updateGlobalSettings
- Clarify Settings modal save behavior for intentional idempotent global theme writes
- Expand useTheme and App tests to cover backend hydration, fallback handling, and new global settings fetch expectations
2026-04-08 11:58:18 -07:00
gsxdsm
7881a09a07 fix(FN-1285): harden async listener error guards
- Wrap TaskExecutor task:updated async listener logic in a top-level guard and log uncaught listener failures
- Add explicit catch handling for ProjectManager activity logging and dashboard stuck-detector settings-triggered checkNow calls
- Document async EventEmitter guard conventions in scheduler and hybrid executor listener wiring
- Add regression tests for executor and dashboard listener guards and include a patch changeset for @gsxdsm/fusion
2026-04-08 11:49:33 -07:00
gsxdsm
90ccfb4d17 feat(FN-1263): add agent budget tracking and reset APIs
- Add AgentBudgetConfig and AgentBudgetStatus types to runtime config and export them from @fusion/core
- Implement AgentStore.getBudgetStatus to compute usage, thresholds, over-budget flags, and next reset timestamps for daily/weekly/monthly/lifetime periods
- Implement AgentStore.resetBudgetUsage to zero token counters, record budgetResetAt, and emit agent updates while preserving other runtime settings
- Add comprehensive AgentStore budget management tests covering no-budget behavior, threshold calculations, reset behavior, and reset-day edge cases
2026-04-08 11:42:39 -07:00
gsxdsm
95c27f3950 refactor(FN-1289): extract AppInner logic into hooks and modal component
- Extract view state, project actions, and task handler concerns from AppInner into dedicated hooks
- Add AppModals component to centralize modal rendering and related props wiring
- Inline thin aliases and complete AppInner cleanup after moving responsibilities out
- Add unit tests for useViewState, useProjectActions, and useTaskHandlers hooks
2026-04-08 11:39:59 -07:00
gsxdsm
a19116e1d8 feat(FN-1177): polish mission and planning modals for mobile
- Improve Mission Manager mobile behavior with wrapped headers/actions, 44px icon touch targets, overflow guards, and safe-area padding
- Refine planning and subtask modal mobile UX with touch-friendly drag/action controls, compact progress/layout spacing, and 16px form inputs to prevent iOS zoom
- Update model selection mobile styles to use constrained dropdown sizing and larger tappable options across 768px/640px breakpoints
- Add mission-planning-modals-mobile CSS tests that assert key mobile rules for Mission Manager, Subtask Breakdown, Planning Mode, and model combobox interactions
2026-04-08 11:38:09 -07:00
gsxdsm
d100a887f1 fix(FN-1252): add dashboard dispose lifecycle to prevent listener leaks
- Track runDashboard event handlers through a centralized register helper
- Add an idempotent dispose() that unregisters store/process listeners and clears merge retry timers
- Guard periodic merge retry scheduling against disposed state and invoke cleanup on shutdown paths
- Add lifecycle regression tests covering listener cleanup, idempotent dispose, and MaxListeners warnings
2026-04-08 11:27:42 -07:00
gsxdsm
f2f41e05e6 fix(FN-1294): make Settings memory editor wrapper a flex container
- Add display: "flex" to the Memory tab editor wrapper in SettingsModal.
- Set flexDirection: "column" so the embedded FileEditor lays out correctly inside the fixed-height container.
2026-04-08 11:24:48 -07:00
gsxdsm
ff7f35c6c0 feat(FN-1227): add mesh state and system metrics support to CentralCore
- Add SystemMetrics, PeerNode, NodeMeshState, and MeshDiscovery types and export new mesh/metrics APIs from @fusion/core
- Introduce collectSystemMetrics with CPU, memory, storage, and uptime collection (including check-disk-space integration) plus dedicated unit tests
- Bump central DB schema to v3 with nodes.systemMetrics/knownPeers and peerNodes table, including migration coverage for v2->v3 upgrades
- Extend CentralCore with node metrics updates, peer register/unregister/list operations, mesh snapshot reporting, and event emissions backed by expanded test coverage
2026-04-08 11:21:18 -07:00
gsxdsm
0e200e2483 fix(FN-1250): route task-creation endpoints through scoped project stores
- Resolve projectId-scoped TaskStore instances for GitHub issue/PR import and batch import mutations
- Use scoped stores for planning and subtask breakdown create flows, including rootDir lookups, dependency updates, and parent cleanup
- Add regression tests to verify projectId requests mutate only the scoped store across import, planning, and subtask routes
2026-04-08 11:19:43 -07:00
gsxdsm
37035c818a feat(FN-1167): add agent org chart and reporting chain views
- Add an Org Chart view mode in AgentsView with persisted view selection, API-backed tree loading, and node selection into AgentDetailView
- Add a Chain of Command section to AgentDetailView dashboard that loads reporting paths and lets users navigate to ancestor agents
- Introduce dedicated styling for org chart cards/connectors, loading states, and chain-of-command pills with responsive behavior
- Expand AgentsView and AgentDetailView test coverage for org chart rendering, loading/empty states, and chain-of-command interactions
2026-04-08 11:11:06 -07:00
gsxdsm
03ac3258a7 fix(FN-1284): move terminal execution failures to in-review
- Move single-session and step-session executor failure paths to in-review after marking tasks failed
- Route exhausted transient recovery retries to in-review instead of leaving tasks outside review flow
- Move stuck-kill budget exhaustion failures in self-healing to in-review and update failure log wording
- Add regression tests in executor and self-healing suites to verify in-review transitions on these failure states
2026-04-08 11:01:04 -07:00
gsxdsm
4f48d2d186 feat(FN-1163): align command references with fn naming
- Update CLI command strings, help text, and project-resolution messaging to reference fn
- Sync core backup/store messaging and dashboard API/planning/subtask prompt examples with fn usage
- Refresh dashboard UI copy in settings, project detection, and PR guidance for consistent command naming
- Adjust CLI/dashboard tests and add a @gsxdsm/fusion changeset for the naming alignment patch
2026-04-08 11:00:32 -07:00
gsxdsm
6ac147b8fe fix(FN-1210): stabilize workflow-step refine route and tests
- Add an injectable createKbAgent override for the workflow-step refine route to avoid brittle dynamic import behavior in tests
- Update refine logic to use injected agent factory when provided and fall back to @fusion/engine import otherwise
- Expand route tests with a successful AI refinement path using a mocked session text stream
- Reset refine agent injection between tests and tighten fallback assertions when AI creation fails
2026-04-08 10:53:13 -07:00
gsxdsm
8ef31a81c4 test(FN-1282): expand dashboard hook and modal coverage
- Add tests for useAgents and useProjectHealth hooks, including loading, success, and error flows
- Add useFileBrowser and useFileEditor hook tests for file navigation, save behavior, and edge cases
- Add component tests for AgentImportModal and AgentGenerationModal interaction paths
- Add MissionInterviewModal tests covering question flow, submission, and state transitions
- Stabilize dashboard test suite cleanup and mocking patterns to reduce flakiness
2026-04-08 10:48:42 -07:00
gsxdsm
df1d7228c2 feat(FN-1159): add dramatic dashboard themes
- Add new dramatic color theme IDs to shared settings types and dashboard theme bootstrap
- Implement dramatic theme token sets and component-level CSS overrides with matching swatches
- Register the new themes in ThemeSelector and expand ThemeSelector tests for visibility and init whitelist coverage
- Add a changeset for @gsxdsm/fusion documenting the dramatic theme addition
2026-04-08 10:46:48 -07:00
gsxdsm
cf5c862db8 test(FN-1281): expand mission and subtask test coverage
- Extend mission API e2e coverage across CRUD, validation edge cases, observability, interview flows, and autopilot endpoints
- Add regression tests for generated mission/milestone/slice/feature ID handling across route validation paths
- Add subtask-breakdown unit tests for stream manager behavior, JSON parsing/normalization, fallback generation, and error handling
- Cover subtask session lifecycle and SQLite rehydration behavior, including corrupted-row resilience and in-memory fallback precedence
2026-04-08 10:40:21 -07:00
gsxdsm
0359166b6c feat(FN-1276): scope dashboard persistence by project
- Add a project storage utility with scoped key helpers and key inventories for global vs project state
- Scope dashboard/task view, list preferences, quick-entry drafts, agent/tree state, terminal tabs, usage view, and modal draft persistence to projectId
- Reload persisted UI state when project context changes so per-project settings and drafts do not leak across projects
- Update and expand dashboard tests, including new projectStorage coverage and scoped persistence regression fixes
2026-04-08 10:39:38 -07:00
gsxdsm
4c843a60f3 test(FN-1283): expand CLI settings and routing coverage
- Add comprehensive settings-import tests for global/project scope handling and error paths
- Add settings-export tests covering output targets, filtering, and serialization behavior
- Expand project-resolver test matrix for flag/default/CWD resolution and fallback cases
- Extend bin entrypoint tests for command routing, argument forwarding, and failure handling
2026-04-08 10:38:15 -07:00
gsxdsm
c36d54b757 feat(FN-1174): migrate agent import flow to agent companies format
- Replace legacy companies.sh parser/types with the new agent companies parser and exported core types.
- Update CLI agent import wiring and tests to consume the new import source handling.
- Update dashboard agent import modal, API client, and import route tests to support archive-based sources.
- Add release-note changesets and lockfile updates for the @gsxdsm/fusion patch release.
2026-04-08 10:35:28 -07:00
gsxdsm
e076be355c fix(FN-1169): align mailbox styles to current theme tokens
- Replace mailbox text and accent usage from legacy primary/text-primary tokens to text/todo tokens
- Update hover and unread/current message backgrounds to use card-hover and todo-based color-mix highlights
- Harmonize compose button and composer input focus colors with mailbox todo accents for consistent theming
2026-04-08 10:24:20 -07:00
gsxdsm
90908794cb fix(FN-1278): enforce settings parity for keys and defaults
- Add missing GlobalSettings and ProjectSettings entries to key arrays for full runtime coverage
- Fill default settings gaps for newly listed global and project configuration fields
- Add compile-time parity assertions to fail typechecking when interface keys and arrays drift
- Add parity tests validating key coverage, default coverage, duplicate detection, and cross-scope overlap
2026-04-08 10:21:15 -07:00
gsxdsm
b6323507d4 test(FN-1279): expand child-process runtime and worker coverage
- Refactor ChildProcessRuntime tests with typed fork/IPC mocks and deterministic command-response helpers
- Add lifecycle and resilience assertions for startup failures, stop idempotency, heartbeat checks, and exponential restart backoff
- Verify IPC event forwarding, metrics fallback behavior, and not-accessible runtime API guards
- Add child-process-worker tests covering START/STOP/GET_STATUS/GET_METRICS handlers, runtime event bridging, and SIGTERM/SIGINT shutdown paths
2026-04-08 10:17:44 -07:00
gsxdsm
6d2377fca0 feat(FN-1149): add send-to-background actions for AI planning modals
- Add Send to background header action to Planning Mode, Subtask Breakdown, and Mission Interview modals using a shared minimize icon pattern
- Show the action only during active AI session states and keep it hidden in initial states
- Implement background behavior to close the live stream connection and modal without canceling the underlying AI session
- Add modal tests that verify button visibility rules and confirm send-to-background does not trigger cancel APIs
- Add shared CSS styling for modal send-to-background controls, including hover and focus-visible states
2026-04-08 10:15:14 -07:00
gsxdsm
f31a74deac test(FN-1280): add automation module coverage tests
- Add comprehensive tests for AUTOMATION_PRESETS, ScheduleType values, and MAX_RUN_HISTORY invariants
- Verify AutomationStore-facing type contracts for scheduled tasks, step definitions, and run result shapes
- Cover cron preset edge cases including weekday/monthly cadence and interval progression checks
- Handle cron-parser nullable ISO date values in test helpers by falling back to getTime()
2026-04-08 10:08:29 -07:00
gsxdsm
dfa109742a feat(FN-1218): harden mission autopilot with self-healing recovery
- Add mission self-healing project settings for stale activation thresholds, task retry budgets, and mission health-check intervals
- Extend MissionAutopilot with failed-task retry handling, blocked feature escalation, stale activating mission recovery, and periodic feature/task consistency reconciliation
- Wire autopilot failure and recovery flows through Scheduler and InProcessRuntime, including startup recovery for watched missions after crashes
- Add blocked feature status support in core mission types and CLI mission status labels
- Expand mission-autopilot coverage for retry flows, stale/startup recovery, health checks, and regression scenarios, and include a patch changeset for @gsxdsm/fusion
2026-04-08 10:01:06 -07:00
gsxdsm
a321b89011 feat(FN-1273): support agent assignment in extension task tools
- Add optional agentId parameter to kb_task_create and persist it as assignedAgentId
- Extend kb_task_create output/details to include assignee information when present
- Add kb_task_update support for setting or clearing assignedAgentId via agentId (including null)
- Expand extension tests for create/update/clear assignment flows and add a patch changeset for @gsxdsm/fusion
2026-04-08 09:57:45 -07:00
gsxdsm
d03cc933d7 test(FN-1245): harden bundle-output tests for hermetic behavior
- Only require dist/bin.js in setup so tests do not depend on dashboard client artifacts being prebuilt
- Gate dashboard client asset assertion behind a presence check to avoid flaky environment-specific failures
- Add tsup.config.ts assertions to verify dashboard/dist/client is copied into cli dist/client during build
2026-04-08 09:57:05 -07:00
gsxdsm
82ffa089a8 refactor(FN-1251): harden child runtime timer lifecycle
- Add generation tracking plus dedicated SIGKILL and restart timer fields in ChildProcessRuntime
- Guard delayed kill/restart callbacks so stale generations and stopping runtimes are ignored
- Clear pending lifecycle timers during stop and before rescheduling to prevent stacked callbacks
- Expand child-process runtime tests to cover timer cancellation, generation safety, and spawn generation increments
2026-04-08 09:56:28 -07:00
gsxdsm
478b2eec4c fix(FN-1249): degrade failed wave worktrees to sequential fallback
- Track per-step worktree creation failures in step-session execution waves
- Split wave execution into parallel and sequential phases so failed-worktree steps run on the primary worktree
- Cherry-pick only successful parallel-step commits and return consistently ordered results
- Add comprehensive tests covering partial/all worktree creation failures, fallback ordering, and cleanup behavior
2026-04-08 09:47:26 -07:00
gsxdsm
6a0e3a4c5b feat(FN-1166): improve task description editing in TaskForm
- Increase edit-mode description textarea height and add fullscreen expand/collapse controls with Escape support
- Add debounced 1.5s description auto-save in edit mode with Saving/Saved status feedback
- Wire TaskDetailModal to persist auto-saved descriptions via updateTask and show success/error toasts
- Add TaskForm coverage for expand mode and auto-save debounce behavior, and update related icon/test/style support
2026-04-08 09:46:28 -07:00
gsxdsm
f68a5f0565 fix(FN-1243): add build-time dashboard stub fallback for CLI bundles
- Add resilient client asset staging in packages/cli/build.ts with automatic dist/client/index.html stub generation when dashboard assets are missing
- Update packages/cli/tsup.config.ts onSuccess hook to clear stale client output and emit the same minimal stub fallback in clean checkout builds
- Make bundle-output test build-aware by running pnpm build in beforeAll when bundle artifacts are absent, then assert client assets are present
- Preserve build output visibility by reporting whether real or stub client assets were staged
2026-04-08 09:44:42 -07:00
gsxdsm
2892ae192a feat(FN-1193): use sha^ base for done-task diff endpoints
- Update done-task /diff and /file-diffs routes to always resolve merge base from commitSha^ for squash merges
- Remove baseCommitSha ancestor/merge-base fallback logic that could include unrelated merged task changes
- Expand routes-diff regression tests to assert sha^ behavior and ensure baseCommitSha/baseBranch are ignored for done tasks
- Add done-task coverage in routes-file-diffs tests for sha^ success, missing commitSha, and rev-parse failure paths
2026-04-08 09:35:24 -07:00
gsxdsm
eac3f1c6a1 feat(FN-1225): add headless fn serve command with health checks
- Add a new serve command implementation that runs the dashboard server in headless mode and exposes a health endpoint
- Register the serve command in CLI routing and extend bin command coverage for dispatch behavior
- Add comprehensive serve command tests for startup flow, options handling, and health-check responses
- Fix mission event ordering in MissionStore to keep health snapshots deterministic under concurrent updates
- Include a changeset for @gsxdsm/fusion documenting the new fn serve capability
2026-04-08 09:26:56 -07:00