Commit Graph

12 Commits

Author SHA1 Message Date
gsxdsm
438aff290a feat(FN-1079): add remote node runtime orchestration
- Add RemoteNodeClient and RemoteNodeRuntime with comprehensive lifecycle, status, and metrics test coverage
- Route projects by node assignment in ProjectManager and integrate remote runtime handling in HybridExecutor
- Introduce NodeHealthMonitor and wire diagnostic logging/export updates for remote node health tracking
- Harden remote runtime shutdown checks and type-safety paths surfaced during review feedback
2026-04-07 22:56:09 -07:00
gsxdsm
fb7edec4d5 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
6f91753270 feat(FN-1058): add heartbeat execution with agent tool support
- Extract shared agent tools (bash, read, write, edit) from executor into agent-tools.ts for reuse
- Implement heartbeat execution in HeartbeatMonitor with configurable interval and task_done support
- Wire heartbeat execution into InProcessRuntime lifecycle (start/stop)
- Add comprehensive test suite covering execution, timeouts, concurrency, and error handling
- Add heartbeat-related log constants to logger
2026-04-07 13:02:05 -07:00
gsxdsm
acae0e7aa0 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
eb6fbbb42c fix: recover completed tasks stuck in progress 2026-04-05 15:24:32 -07:00
gsxdsm
1b3eb7bf10 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
eef15f077c feat(engine): harden review pipeline with strict scope, build retry, and E2E tests
Improve the plan→review→approve→merge agent pipeline:

- Harden verdict extraction with JSON block parsing and anchored regexes
- Consolidate legacy/new merger conflict APIs into thin deprecated wrappers
- Add configurable strict scope enforcement (strictScopeEnforcement setting)
- Add build retry with timeout to merger (buildRetryCount, buildTimeoutMs)
- Add handleChangesRequested to PrCommentHandler for review feedback loop
- Remove dead code: handleFsChange, processTaskChange, unused imports/fields
- Add E2E multi-verdict sequence tests for the full review pipeline
- Fix unused parameter warnings across engine and core packages

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 00:29:34 -07:00
gsxdsm
bcb9915968 feat: add SelfHealingManager for unattended multi-day operation
Adds four self-healing subsystems to enable the engine to recover from
common failure modes without human intervention:

- Auto-unpause: clears rate-limit-triggered globalPause with escalating
  backoff (5 min → 60 min cap), resets on sustained recovery
- Stuck kill budget: caps task stuck-kill retries (default 3) to prevent
  infinite stuck→todo→stuck loops
- Periodic maintenance (every 15 min): git worktree prune, orphan cleanup,
  SQLite WAL checkpoint
- Worktree cap enforcement: removes oldest idle worktrees when count
  exceeds 2× maxWorktrees

New settings: autoUnpauseEnabled, autoUnpauseBaseDelayMs,
autoUnpauseMaxDelayMs, maxStuckKills, maintenanceIntervalMs.
New task field: stuckKillCount (schema v8 migration).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 15:35:12 -07:00
gsxdsm
371ec764b8 fix(FN-000): harden project migration runtime 2026-04-02 17:55:25 -07:00
gsxdsm
7fd5704a80 Removed unwanted files marked in .gitignore 2026-04-01 21:25:08 -07:00
gsxdsm
e8b6b98d57 feat(KB-635): integrate mission workflows across CLI, extension, and engine
- Add mission CLI commands and pi extension tools for creating missions, milestones, slices, features, and task links
- Extend core mission storage and schema migrations with auto-advance support, task slice linkage, and comment normalization coverage
- Wire mission-aware scheduler and executor behavior so linked features progress with task execution and completed slices can auto-activate follow-on work
- Add regression tests for mission CLI parsing, extension behaviors, scheduler mission semantics, and executor integration
2026-04-01 13:45:56 -07:00
gsxdsm
52a74036d5 feat(KB-616): add ProjectRuntime abstraction for task execution isolation
- Define ProjectRuntime interface with unified task execution contract\n- Implement IPC protocol for host-worker communication (messages, streaming, heartbeats)\n- Add InProcessRuntime for synchronous in-process task execution\n- Add ChildProcessRuntime with isolated worker processes for sandboxed execution\n- Implement ProjectManager to coordinate runtime selection and task lifecycle\n- Update engine exports to expose runtime APIs\n- Add comprehensive tests for all runtime implementations and IPC protocol
2026-03-31 20:12:28 -07:00