71b09e677dbd4a204409830e8a8def8651af01ec
228 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
c9f3f11a72 |
fix: allow worktree agents to read user skills (#3506)
## Summary - allow worktree sessions to read the standard user skill root at `~/.agents/skills` - keep sibling `~/.agents` files and all write/edit/Bash access outside the exception - canonicalize existing path components so symlinks cannot escape an allowed skill root - document the boundary and add a patch changeset This extends the same host-skill consistency fixed in #2384: Fusion should not tell an agent to load a skill and then block the skill body. ## Test plan - [x] 15 worktree-boundary tests - [x] `pnpm --filter @fusion/engine typecheck` - [x] scoped ESLint - [x] changeset and FNXC date checks - [x] `pnpm verify:fast` (20 steps, including build and boot smoke) - [x] CLI CI-shape test (72 tests) ## Local gate notes `pnpm test:gate` passed all static checks, 432 engine-core tests, and 184 core unit tests. Its PostgreSQL lane could not authenticate locally (`empty password returned by client`). The full `pi-create-fn-agent.test.ts` run also reaches an unrelated dashboard-chat principal assertion failure already present at the exact `origin/main` SHA; the 15 boundary tests pass. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Worktree agents can read and search skills installed in the standard `~/.agents/skills` directory. - **Bug Fixes** - Preserved worktree protections for writing, editing, and Bash operations. - Blocked access to unrelated files and prevented symlink-based boundary escapes across supported path operations. - Improved access validation for paths that do not yet exist. - **Documentation** - Updated worktree boundary documentation to describe skill access and its restrictions. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
0b4dbd219b |
FN-125: prevent workflow agents from creating tasks
Stop workflow executor agents from creating ordinary tasks while preserving explicit self-spawned dependency handling. - Gate task creation by session identity and execution context. - Add self-spawned dependency support, validation, and persistence coverage. - Update agent prompts, tools, documentation, and CLI integration. - Add a published-package changeset. Files changed: .changeset/fn-125-removal.md | 7 +++ docs/agents.md | 2 +- docs/dashboard-guide.md | 2 +- docs/settings-reference.md | 6 +- .../cli/skill/fusion/references/engine-tools.md | 10 ++-- .../extension-task-execution-task-creation.test.ts | 70 ++++++++++++++++++++++ packages/cli/src/extension.ts | 49 +++++++++++++-- .../postgres/store-self-spawned-dep.pg.test.ts | 56 +++++++++++++++++ .../src/__tests__/self-spawned-dependency.test.ts | 18 ++++++ .../__tests__/session-identity-registry.test.ts | 14 ++++- packages/core/src/agents/agent-prompts.ts | 27 ++++----- .../src/agents/task-execution-task-creation.ts | 19 ++++++ packages/core/src/index.ts | 7 +++ packages/core/src/session-identity-registry.ts | 7 +++ packages/core/src/store.ts | 2 + packages/core/src/task-store/errors.ts | 21 +++++++ packages/core/src/task-store/task-update.ts | 10 +++- packages/core/src/task-store/update-task-deps.ts | 12 +++- .../__tests__/ephemeral-task-create-gate.test.ts | 18 +++--- .../src/__tests__/executor-review-verdicts.test.ts | 3 +- packages/engine/src/agent-tools.ts | 4 ++ packages/engine/src/agents/agent-runtime.ts | 2 + .../engine/src/execution/step-session-executor.ts | 15 ++--- .../executor/attempt-executor-verification-fix.ts | 1 + .../engine/src/executor/create-spawn-agent-tool.ts | 1 + .../engine/src/executor/create-task-done-tool.ts | 18 +++++- .../engine/src/executor/create-task-update-tool.ts | 12 +++- .../engine/src/executor/execute-workflow-step.ts | 1 + packages/engine/src/executor/run-implementation.ts | 18 +++--- packages/engine/src/executor/system-prompt.ts | 21 +++---- packages/engine/src/executor/task-add-dep-tool.ts | 14 ++++- packages/engine/src/pi.ts | 15 ++++- 32 files changed, 401 insertions(+), 81 deletions(-) Fusion-Task-Id: FN-125 Fusion-Task-Lineage: da3d69f6-c9cb-45fd-8691-3dfaf7007514 Co-authored-by: Fusion <noreply@runfusion.ai> |
||
|
|
bbca7a1ffc |
FN-094: add mono- and multi-repository lifecycle parity
Extend workspace lifecycle behavior so mono-repository and multi-repository tasks share the same durable scope, workflow, review, and merge semantics. - Add repository-scope persistence, migrations, serialization, and task mutation support. - Align dashboard task creation, detail, and workspace worktree views with repository-aware lifecycle state. - Extend executor, reviewer, merger, triage, and self-healing paths with parity coverage and tests. - Document the lifecycle contract and publish the operator-facing changeset. Files changed: .changeset/fn-094-multi-repository-lifecycle.md | 7 + docs/agents.md | 8 + docs/architecture.md | 6 + docs/dashboard-guide.md | 4 + docs/multi-project.md | 6 + docs/settings-reference.md | 2 +- docs/testing.md | 12 ++ docs/workspaces.md | 6 + ...workspace-worktrees-concurrent-merge.pg.test.ts | 19 +++ packages/core/src/index.ts | 2 +- .../core/src/postgres/migrations/0000_initial.sql | 1 + .../0064_fn_094_task_repository_scope.sql | 2 + packages/core/src/postgres/schema-applier.ts | 13 +- packages/core/src/postgres/schema/project.ts | 2 + packages/core/src/store.ts | 21 ++- .../core/src/task-store/branch-and-pr-entities.ts | 2 +- packages/core/src/task-store/persistence.ts | 4 +- packages/core/src/task-store/serialization.ts | 2 + packages/core/src/task-store/task-creation.ts | 31 ++++ packages/core/src/task-store/task-mutation-ops.ts | 131 +++++++++++++++- packages/core/src/task-store/task-row-mappers.ts | 2 +- packages/core/src/task-store/task-update.ts | 55 +++++-- packages/core/src/tasks/repository-scope.ts | 29 ++++ packages/core/src/types.ts | 4 + packages/core/src/types/task/task-core.ts | 35 ++++- packages/core/src/types/workflow/workflow-steps.ts | 21 +++ packages/dashboard/app/api/tasks/tasks.ts | 14 ++ packages/dashboard/app/components/NewTaskModal.tsx | 16 +- .../dashboard/app/components/TaskDetailModal.css | 27 ++++ .../dashboard/app/components/TaskDetailModal.tsx | 15 +- .../app/components/WorkspaceWorktreesSummary.tsx | 68 ++++++++- .../app/components/__tests__/NewTaskModal.test.tsx | 1 + .../__tests__/WorkspaceWorktreesSummary.test.tsx | 27 +++- .../src/routes/register-task-workflow-routes.ts | 48 ++++++ .../__tests__/executor-workspace-taskdone.test.ts | 20 +++ .../src/__tests__/reviewer-workspace.test.ts | 170 ++++++++++++++++++++- .../src/__tests__/self-healing-workspace.test.ts | 4 + .../workflow-graph-optional-group.test.ts | 32 ++++ .../workflow-graph-optional-step-fix.test.ts | 58 +++++++ .../engine/src/__tests__/workspace-e2e.test.ts | 91 ++++++++++- .../__tests__/workspace-lifecycle-parity.test.ts | 61 ++++++++ .../src/__tests__/workspace-merger-lease.test.ts | 25 +++ .../__tests__/workspace-merger-scope-gates.test.ts | 58 +++++++ .../engine/src/__tests__/workspace-merger.test.ts | 59 ++++++- packages/engine/src/agent-tools.ts | 92 ++++++++++- packages/engine/src/execution/reviewer.ts | 10 +- .../create-authoritative-workflow-seams.ts | 95 ++++++++++-- .../engine/src/executor/execute-workflow-graph.ts | 37 ++++- .../request-pre-merge-optional-step-fix.ts | 70 +++++++++ .../engine/src/executor/run-graph-custom-node.ts | 124 ++++++++++----- .../engine/src/executor/workflow-step-verdict.ts | 6 +- .../src/executor/workspace-review-per-repo.ts | 118 +++++++++++++- .../src/executor/worktree-task-done-scope-leak.ts | 109 ++++++++++++- packages/engine/src/merge/merger-ai.ts | 88 ++++++++++- packages/engine/src/self-healing.ts | 19 ++- packages/engine/src/triage.ts | 9 ++ .../src/workflows/workflow-graph-executor.ts | 73 +++++++-- .../engine/src/workflows/workflow-node-handlers.ts | 12 +- 58 files changed, 1962 insertions(+), 121 deletions(-) Fusion-Task-Id: FN-094 Fusion-Task-Lineage: 483f958f-cc67-474e-9383-26856c329543 Co-authored-by: Fusion <noreply@runfusion.ai> |
||
|
|
aad4b73a47 |
FN-033: use default chat model for task chat
Task chat now uses the resolved project default while matching general chat controls and session behavior. - Resolve the effective task-chat model and expose model/thinking selectors in the task chat composer. - Persist per-session model and thinking overrides through scoped task-chat routes. - Refresh task-chat UI, documentation, tests, and release metadata for the new behavior. Files changed: .changeset/fn-033-task-chat-default-model.md | 7 + docs/agents.md | 4 +- docs/dashboard-guide.md | 26 +-- packages/dashboard/app/api/chat/chat.ts | 26 +-- .../dashboard/app/components/TaskDetailModal.tsx | 4 +- .../app/components/TaskPlannerChatTab.css | 38 ++- .../app/components/TaskPlannerChatTab.tsx | 211 +++++++++++++++++---- .../__tests__/TaskDetailModal.test-helpers.ts | 2 + .../components/__tests__/TaskDetailModal.test.tsx | 4 +- .../__tests__/TaskPlannerChatTab.test.tsx | 149 +++++++++------ .../__tests__/effective-model-resolution.test.ts | 32 +++ .../app/components/effective-model-resolution.ts | 30 ++- .../dashboard/src/__tests__/chat-manager.test.ts | 14 +- .../routes-task-planner-chat-session.test.ts | 210 +++++++++++++++++++ .../dashboard/src/routes/register-chat-routes.ts | 116 +++++++---- 15 files changed, 700 insertions(+), 173 deletions(-) Fusion-Task-Id: FN-033 Fusion-Task-Lineage: 10cffb5e-1a38-47e1-9b29-cd3cb0b99b81 Co-authored-by: Fusion <noreply@runfusion.ai> |
||
|
|
9f5f981e33 |
FN-9114: expose enabled skills and enforce agent skill reads
Make project-enabled skills available across agent sessions while preserving explicit per-agent skills as observable read-first requirements. - resolve all enabled discovered skills without using agent metadata as an availability filter - carry forced skill intent through PI, plugin, chat, workflow, merger, and heartbeat session paths - report resolved and unavailable forced skills in session summaries and diagnostics - document the updated skill model and add release notes and regression coverage Files changed: .changeset/fn-9114-forced-skills.md | 7 + docs/PLUGIN_AUTHORING.md | 2 +- docs/agents.md | 10 +- docs/diagnostics.md | 2 +- docs/settings-reference.md | 2 +- packages/core/src/__tests__/skill-settings.test.ts | 9 + .../dashboard/src/__tests__/chat-manager.test.ts | 26 ++- packages/dashboard/src/chat.ts | 10 + .../engine/src/__tests__/agent-skills-flow.test.ts | 14 +- .../compound-engineering-skill-resolution.test.ts | 2 +- .../engine/src/__tests__/heartbeat-skills.test.ts | 41 ++++ .../__tests__/hermes-runtime-integration.test.ts | 63 +++++- .../engine/src/__tests__/merger-skills.test.ts | 33 ++- packages/engine/src/__tests__/pi.test.ts | 35 ++- .../__tests__/plugin-skill-body-delivery.test.ts | 8 +- .../src/__tests__/plugin-skill-integration.test.ts | 3 +- .../src/__tests__/session-skill-context.test.ts | 40 ++-- .../engine/src/__tests__/skill-resolver.test.ts | 38 +++- .../__tests__/step-execute-skill-loading.test.ts | 6 + packages/engine/src/agents/agent-runtime.ts | 2 + .../engine/src/agents/agent-session-helpers.ts | 88 ++++++- .../src/cli-runtime/session-skill-context.ts | 117 ++++------ packages/engine/src/cli-runtime/skill-resolver.ts | 252 +++++++++------------ .../engine/src/executor/execute-workflow-step.ts | 14 ++ packages/engine/src/executor/run-implementation.ts | 5 + packages/engine/src/pi.ts | 28 ++- 26 files changed, 576 insertions(+), 281 deletions(-) Fusion-Task-Id: FN-9114 Fusion-Task-Lineage: fe63ebd1-f947-40d7-be7b-c13d7f1c35c9 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
d9fcabfaef |
FN-9112: default Memory Keeper heartbeats to disabled
Default built-in Memory Keeper agents to opt-in heartbeat scheduling while retaining operator choices. - Provision new Memory Keeper agents with heartbeat disabled and hourly scheduling preconfigured. - Preserve explicit heartbeat settings during startup convergence and avoid no-op rewrites. - Add provisioning coverage, operator documentation, and a release changeset. Files changed: .../fn-9112-memory-keeper-heartbeat-default-off.md | 7 +++ docs/agents.md | 2 +- .../__tests__/memory-agent-provisioning.test.ts | 59 +++++++++++++++++++--- packages/core/src/agents/agent-store.ts | 34 ++++++++++--- 4 files changed, 86 insertions(+), 16 deletions(-) Fusion-Task-Id: FN-9112 Fusion-Task-Lineage: 49edc6d9-3d9b-412f-91a5-c26f4a26a662 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
8699ff41e2 |
FN-9016: add manager evaluation tools
Enable managers to review report evaluations and record coaching follow-ups. - Add manager-scoped evaluation read and follow-up extension tools. - Enforce management-subtree access through action gating and regression tests. - Document the tool surface and add a minor release changeset. Files changed: .changeset/fn-9016-manager-eval-tools.md | 7 + docs/agent-tool-surface-full-loop.md | 4 +- docs/agents.md | 8 +- packages/cli/skill/fusion/SKILL.md | 2 +- .../cli/skill/fusion/references/extension-tools.md | 22 ++ .../skill/fusion/references/fusion-capabilities.md | 2 + .../__tests__/extension-manager-eval-tools.test.ts | 159 +++++++++++++++ packages/cli/src/extension.ts | 227 +++++++++++++++++++++ .../engine/src/__tests__/agent-action-gate.test.ts | 1 + .../src/__tests__/gating-classifications.test.ts | 1 + .../src/__tests__/permanent-agent-gating.test.ts | 1 + .../engine/src/execution/gating-classifications.ts | 8 + 12 files changed, 438 insertions(+), 4 deletions(-) Fusion-Task-Id: FN-9016 Fusion-Task-Lineage: 1ad7c344-0f3c-4565-aabc-acb51481431d Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
5a1853cac6 |
FN-8934: add memory pre-steering across agent prompts
Add bounded memory-first guidance and consolidation observability across agent workflows. - Apply mode-aware memory pre-steering to execution, triage, reviewer, heartbeat, and merger prompts. - Export and test shared memory nudges while documenting memory inclusion settings. - Expose agent memory consolidation history through dashboard API and detail UI. Files changed: .changeset/fn-8934-memory-pre-steering.md | 7 ++ docs/agents.md | 4 + docs/settings-reference.md | 2 + .../core/src/__tests__/memory-pre-steering.test.ts | 28 +++++++ packages/core/src/__tests__/project-memory.test.ts | 22 ++++++ packages/core/src/index.gate.ts | 7 ++ packages/core/src/index.ts | 7 ++ packages/core/src/memory/index.ts | 1 + packages/core/src/memory/memory-pre-steering.ts | 41 ++++++++++ packages/core/src/memory/project-memory.ts | 19 +++++ packages/dashboard/app/api/agents/agents.ts | 12 +++ packages/dashboard/app/api/legacy.ts | 2 + .../dashboard/app/components/AgentDetailView.css | 41 ++++++++++ .../dashboard/app/components/AgentDetailView.tsx | 56 +++++++++++++- ...etailView.memory-consolidation-history.test.tsx | 58 +++++++++++++++ .../__tests__/AgentDetailView.test-helpers.ts | 3 + .../register-agent-memory-consolidations.test.ts | 87 ++++++++++++++++++++++ .../register-agent-reflection-rating-routes.ts | 36 +++++++++ .../memory-pre-steering-injection.test.ts | 50 +++++++++++++ packages/engine/src/__tests__/reviewer.test.ts | 18 +++++ packages/engine/src/__tests__/triage.test.ts | 18 ++++- packages/engine/src/agent-heartbeat.ts | 14 +++- .../engine/src/agents/agent-heartbeat-prompts.ts | 2 + packages/engine/src/agents/agent-instructions.ts | 16 ++-- packages/engine/src/execution/reviewer.ts | 31 +++++--- packages/engine/src/executor/execution-prompt.ts | 6 +- packages/engine/src/merger.ts | 9 ++- packages/engine/src/triage.ts | 12 ++- 28 files changed, 577 insertions(+), 32 deletions(-) Fusion-Task-Id: FN-8934 Fusion-Task-Lineage: a062cc6b-1277-4d36-9926-b3ecba4945eb Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
637854ad36 |
FN-8932: add durable memory consolidation agent
Add a provisioned memory agent that consolidates durable recall material through idempotent heartbeat ticks. - Provision and configure the durable memory agent with an enabled workflow setting. - Add consolidation adapters, material collection, recall graph references, and run-audit metadata. - Expose the setting in the dashboard and document the memory-agent behavior. - Cover provisioning, heartbeat, consolidation, audit, and recall graph behavior with tests. Files changed: .changeset/fn-8932-memory-agent.md | 7 ++ AGENTS.md | 1 + docs/agents.md | 10 ++ docs/settings-reference.md | 1 + docs/storage.md | 2 +- .../memoryConsolidationEnabled-default.test.ts | 22 ++++ .../memory-recall-graph-cross-reference.pg.test.ts | 115 +++++++++++++++++++++ .../__tests__/memory-agent-provisioning.test.ts | 31 ++++++ packages/core/src/agents/agent-store.ts | 85 +++++++++++++++ packages/core/src/agents/memory-agent-defaults.ts | 30 ++++++ packages/core/src/index.gate.ts | 2 + packages/core/src/index.ts | 9 ++ packages/core/src/memory/recall/index.ts | 1 + packages/core/src/memory/recall/recall-dedup.ts | 3 + packages/core/src/memory/recall/recall-store.ts | 35 ++++++- .../src/workflows/builtin-workflow-settings.ts | 14 +++ .../src/workflows/workflow-settings-resolver.ts | 12 ++- .../__tests__/WorkflowSettingsPanel.test.tsx | 8 ++ .../__tests__/workflow-setting-display.test.ts | 6 ++ .../app/components/workflow-setting-display.ts | 5 + .../memory-consolidation-heartbeat-hook.test.ts | 92 +++++++++++++++++ .../__tests__/memory-consolidation-ports.test.ts | 34 ++++++ ...memory-consolidation-run-audit-metadata.test.ts | 19 ++++ .../__tests__/memory-consolidation-tick.test.ts | 62 +++++++++++ packages/engine/src/agent-heartbeat.ts | 55 ++++++++++ packages/engine/src/index.ts | 1 + packages/engine/src/memory/index.ts | 3 + .../src/memory/memory-consolidation-adapters.ts | 29 ++++++ .../src/memory/memory-consolidation-material.ts | 22 ++++ packages/engine/src/memory/memory-consolidation.ts | 41 ++++++++ packages/engine/src/util/run-audit.ts | 10 ++ 31 files changed, 764 insertions(+), 3 deletions(-) Fusion-Task-Id: FN-8932 Fusion-Task-Lineage: b4fdec50-1f42-4120-af17-0b6f3a94586e Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
3143f9536f |
FN-8908: auto-recover terminal task failures
Recover generic terminal task failures through a bounded, durable retry budget before escalating them to operators. - add fenced task-store recovery claims, retries, budget resets, and audit events - defer terminal-failure notifications until recovery is exhausted while preserving a single escalation - expose operator retry budget reset and cover recovery lifecycle behavior Files changed: .../fn-8908-terminal-failure-auto-recovery.md | 7 + AGENTS.md | 1 + docs/agents.md | 2 + docs/architecture.md | 2 + packages/cli/src/commands/task.ts | 2 + packages/cli/src/extension.ts | 2 + ...terminal-failure-auto-recovery-store.pg.test.ts | 108 +++++++++ .../terminal-failure-auto-recovery.test.ts | 60 +++++ packages/core/src/index.gate.ts | 1 + packages/core/src/index.ts | 1 + packages/core/src/store.ts | 179 ++++++++++++++- .../core/src/task-store/archive-lifecycle-2.ts | 15 ++ packages/core/src/task-store/moves.ts | 48 +++- packages/core/src/task-store/persistence.ts | 18 +- packages/core/src/task-store/project-store-ops.ts | 4 +- .../src/task-store/workflow-task-create-ops.ts | 4 +- packages/core/src/tasks/index.ts | 1 + .../src/tasks/terminal-failure-auto-recovery.ts | 114 ++++++++++ packages/core/src/types/task/task-core.ts | 24 ++ .../src/routes/register-task-workflow-routes.ts | 2 + ...-healing-terminal-failure-auto-recovery.test.ts | 199 ++++++++++++++++ .../__tests__/notification-service.test.ts | 86 ++++++- .../__tests__/task-wedge-notification.test.ts | 2 +- .../src/notification/notification-service.ts | 103 +++++++-- .../src/notification/task-wedge-notification.ts | 30 ++- packages/engine/src/self-healing.ts | 251 ++++++++++++++++++++- packages/engine/src/util/run-audit.ts | 7 + 27 files changed, 1240 insertions(+), 33 deletions(-) Fusion-Task-Id: FN-8908 Fusion-Task-Lineage: 99e96b16-0306-41f1-87da-8623d69735f7 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
5b9e6643d6 |
FN-8869: inherit project model overrides for role agents
Role-based permanent agents now consistently use their effective project model and thinking settings. - Resolve permanent-agent model and thinking inheritance by workflow role in core. - Apply inherited settings to Agent views, Chat sessions, routes, and heartbeat sessions. - Cover role-specific inheritance and preserve the lifecycle-column ratchet classification. Files changed: .changeset/fn-8869-role-agent-project-model-override.md | 7 ++ docs/agents.md | 9 +- docs/settings-reference.md | 4 +- packages/core/src/__tests__/agent-effective-model.test.ts | 97 +++++++++++++++++++ packages/core/src/__tests__/no-hardcoded-lifecycle-columns.test.ts | 2 + packages/core/src/ai/agent-effective-model.ts | 82 +++++++++++++++++ packages/core/src/ai/model-resolution.ts | 14 +++ packages/core/src/index.gate.ts | 7 ++ packages/core/src/index.ts | 7 ++ packages/core/src/types.ts | 7 ++ packages/dashboard/app/components/AgentDetailView.tsx | 49 ++++++--- packages/dashboard/app/components/AgentsView.tsx | 11 ++- packages/dashboard/app/components/__tests__/AgentDetailView.effective-model.test.tsx | 55 +++++++++++ packages/dashboard/app/components/__tests__/AgentDetailView.settings.test.tsx | 22 +++++ packages/dashboard/app/components/__tests__/AgentsView.test.tsx | 25 +++++ packages/dashboard/src/__tests__/chat-manager.test.ts | 45 +++++++++ packages/dashboard/src/__tests__/routes-chat-sessions-project-model.test.ts | 103 +++++++++++++++++++++ packages/dashboard/src/chat.ts | 65 +++++-------- packages/dashboard/src/routes/register-chat-routes.ts | 37 +++++--- packages/engine/src/__tests__/agent-session-helpers-test-mode.test.ts | 13 +++ packages/engine/src/__tests__/agent-session-helpers.test.ts | 54 +++++++++++ packages/engine/src/agent-heartbeat.ts | 10 +- packages/engine/src/agents/agent-session-helpers.ts | 6 +- 23 files changed, 648 insertions(+), 83 deletions(-) Fusion-Task-Id: FN-8869 Fusion-Task-Lineage: 00227aaf-b33b-43f1-bcbb-2203c9930dbc Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
1474c617b5 |
FN-8918: suppress false parked-task alerts
Prevent stale self-healing observations from notifying operators about active or intentionally held tasks. - Require ownerless self-healing proof before classifying a task as wedged. - Revalidate live tasks and suppress notifications for progressing, held, deleted, archived, or complete-lane rows. - Cover reviewing, typed not-found reads, and archived episode resolution; document the behavior. - Add a patch changeset for the notification fix. Files changed: .changeset/fn-8918-false-parked-task-alerts.md | 7 ++ docs/agents.md | 2 +- docs/architecture.md | 2 +- packages/engine/src/notification/__tests__/task-wedge-notification.test.ts | 121 +++++++++++++++++++-- packages/engine/src/notification/notification-service.ts | 34 ++++-- packages/engine/src/notification/task-wedge-notification.ts | 21 +++- 6 files changed, 166 insertions(+), 21 deletions(-) Fusion-Task-Id: FN-8918 Fusion-Task-Lineage: 4da385aa-c625-40c5-a781-36becdf94fe5 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
9c43736794 |
FN-8870: add structural approval and report mail
Add typed report and approval metadata to the mailbox contract. - Define and validate structural mail kinds, report sections, and approval references. - Let agents send validated reports while reserving approval mail for engine emission. - Emit idempotent, fail-soft approval notifications and document the contract. Files changed: .changeset/fn-8870-structural-mail-contract.md | 7 ++ docs/agents.md | 2 + docs/architecture.md | 4 + .../message-metadata-structural-mail.test.ts | 25 ++++ packages/core/src/index.gate.ts | 2 +- packages/core/src/index.ts | 2 +- packages/core/src/types.ts | 30 +++++ packages/core/src/types/messaging/messages.ts | 21 ++++ ...gent-tools-send-message-structural-mail.test.ts | 34 +++++ .../src/__tests__/approval-mail-emission.test.ts | 137 +++++++++++++++++++++ packages/engine/src/agent-heartbeat.ts | 3 + packages/engine/src/agent-tools.ts | 28 ++++- packages/engine/src/agents/approval-mail.ts | 40 ++++++ packages/engine/src/executor.ts | 3 + 14 files changed, 334 insertions(+), 4 deletions(-) Fusion-Task-Id: FN-8870 Fusion-Task-Lineage: 7d30b2f9-c004-4975-86b1-9600e2c8d76f Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
0e8d743064 |
FN-8867: prevent false task wedge notifications
Prevent stale terminal snapshots and pause markers from notifying for progressing tasks. - Reclassify the live task immediately before claiming wedge episodes. - Require actual pause state for pause-derived wedge reasons. - Cover resumed-task races and stale pause markers with notification tests. - Document the wedge notification behavior and add a patch changeset. Files changed: .changeset/fn-8867-wedge-false-terminal-alerts.md | 7 ++ docs/agents.md | 2 +- docs/architecture.md | 2 +- .../__tests__/notification-service.test.ts | 9 +- .../__tests__/task-wedge-notification.test.ts | 102 +++++++++++++++++++-- .../src/notification/notification-service.ts | 22 +++-- .../src/notification/task-wedge-notification.ts | 22 ++++- 7 files changed, 137 insertions(+), 29 deletions(-) Fusion-Task-Id: FN-8867 Fusion-Task-Lineage: c92c7735-e8b9-4979-8028-10a0555810f1 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
70a830d1ad |
FN-8830: backfill built-in workflow agent identities
Provision complete workflow-agent identities while preserving operator-owned configuration. - Seed instructions, souls, and managed setup mirrors for canonical workflow owners. - Repair sparse default owners and demote duplicate provenance without losing agent data. - Cover provisioning recovery and identity preservation with PostgreSQL and engine tests. Files changed: .changeset/fn-8830-workflow-agent-identities.md | 7 + docs/agents.md | 10 + ...nt-store-builtin-role-provisioning-pool.test.ts | 41 ++++ .../postgres/agent-instructions.pg.test.ts | 233 +++++++++++++++++++++ packages/core/src/agents/agent-store.ts | 167 ++++++++++++--- .../src/agents/workflow-role-agent-defaults.ts | 57 +++++ packages/core/src/index.ts | 6 + .../src/__tests__/agent-instructions.test.ts | 32 ++- 8 files changed, 526 insertions(+), 27 deletions(-) Fusion-Task-Id: FN-8830 Fusion-Task-Lineage: bdf75989-3282-4833-a8b6-8c2997af8363 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
eaadd153b1 |
FN-8764: route workflow stages through durable role agents
Route workflow stages through task-scoped durable role agents. - Persist normalized multi-role agents and workflow principal fences with migrations. - Route planning, execution, review, and merge workflow nodes through authorized permanent principals with capacity leasing and recovery. - Retire ephemeral workflow-stage workers and expose role-aware agent configuration, workflow editing, and documentation. - Preserve lifecycle-column ratchet coverage by centralizing workflow-role classification rather than adding test exemptions. Files changed: .changeset/fn-8764-workflow-role-agents.md | 7 + CONCEPTS.md | 3 + docs/agents.md | 6 + docs/architecture.md | 6 + docs/cli-reference.md | 2 + docs/dashboard-guide.md | 4 + docs/settings-reference.md | 6 +- docs/storage.md | 2 + docs/workflow-steps.md | 6 + .../src/__tests__/extension-agent-update.test.ts | 11 +- packages/cli/src/__tests__/extension.test.ts | 18 +- packages/cli/src/extension.ts | 41 +- .../core/src/__tests__/agent-permissions.test.ts | 12 + .../core/src/__tests__/agent-role-policy.test.ts | 7 + packages/core/src/__tests__/agent-roles.test.ts | 21 + .../legacy-column-collection-gating-ledger.test.ts | 19 +- .../src/__tests__/postgres/schema-applier.test.ts | 16 +- .../core/src/__tests__/settings-parity.test.ts | 9 +- .../workflow-agent-node-classification.test.ts | 25 + .../src/__tests__/workflow-work-item-cas.test.ts | 38 ++ packages/core/src/agents/agent-permissions.ts | 11 +- packages/core/src/agents/agent-role-policy.ts | 39 +- packages/core/src/agents/agent-store.ts | 190 ++++++- .../core/src/async-stores/async-agent-store.ts | 6 + packages/core/src/config/settings-schema.ts | 5 +- packages/core/src/index.gate.ts | 2 +- packages/core/src/index.ts | 7 +- .../0045_fn_8764_multi_role_workflow_agents.sql | 20 + .../0046_fn_8764_workflow_principal_fence.sql | 49 ++ packages/core/src/postgres/schema-applier.ts | 22 +- packages/core/src/postgres/schema/project.ts | 21 + packages/core/src/store.ts | 2 +- .../task-store/async/async-workflow-workitems.ts | 49 +- packages/core/src/task-store/row-types.ts | 4 + packages/core/src/task-store/settings-helpers.ts | 16 +- packages/core/src/task-store/settings-ops-2.ts | 13 +- packages/core/src/task-store/settings-ops.ts | 16 +- packages/core/src/task-store/task-row-mappers.ts | 4 + .../src/task-store/workflow-task-create-ops.ts | 6 +- .../src/task-store/workflow-workitems-ops-2.ts | 25 +- packages/core/src/types.ts | 2 + packages/core/src/types/agents/agents.ts | 45 +- packages/core/src/types/merge/merge-queue.ts | 17 + packages/core/src/types/settings/settings-scope.ts | 9 +- packages/core/src/workflows/workflow-ir-types.ts | 58 +++ packages/core/src/workflows/workflow-ir.ts | 19 + .../dashboard/app/components/AgentDetailView.css | 14 + .../dashboard/app/components/AgentDetailView.tsx | 34 +- .../dashboard/app/components/NewAgentDialog.tsx | 28 +- .../app/components/WorkflowNodeEditor.tsx | 19 + .../__tests__/AgentDetailView.core.test.tsx | 4 +- .../app/components/__tests__/AgentsView.test.tsx | 2 +- .../__tests__/SettingsModal.general.test.tsx | 86 --- .../__tests__/SettingsModal.test-harness.tsx | 1 - .../components/agent-presets/agentCreatePayload.ts | 9 +- .../app/components/settings/section-keys.ts | 1 - .../settings/sections/GeneralSection.tsx | 8 - .../settings-default-descriptions.test.tsx | 1 - .../app/components/workflow-flow-mapping.ts | 7 + packages/dashboard/src/mission-routes.ts | 26 +- .../src/routes/__tests__/agent-core-routes.test.ts | 23 +- .../src/routes/register-agent-core-routes.ts | 42 +- ...gister-agent-import-export-generation-routes.ts | 21 - .../engine/src/__tests__/agent-action-gate.test.ts | 33 ++ .../engine/src/__tests__/agent-assignment.test.ts | 370 ------------- .../src/__tests__/ephemeral-worker-manager.test.ts | 575 --------------------- ...ecutor-ephemeral-disabled-dispatch-gate.test.ts | 223 -------- .../__tests__/executor-fast-mode-workflows.test.ts | 58 +++ .../engine/src/__tests__/log-severity-manifest.ts | 1 - .../__tests__/log-severity-spam-contract.test.ts | 3 - .../resolved-read-with-literal-filter.test.ts | 4 - .../__tests__/scheduler-ephemeral-toggle.test.ts | 175 ------- .../__tests__/scheduler-workflow-cutover.test.ts | 19 - .../src/__tests__/workflow-agent-capacity.test.ts | 47 ++ .../src/__tests__/workflow-agent-routing.test.ts | 137 +++++ .../src/__tests__/workflow-graph-foreach.test.ts | 15 + .../__tests__/workflow-graph-task-runner.test.ts | 73 +++ .../src/__tests__/workflow-task-runtime.test.ts | 95 ++++ .../src/__tests__/workflow-work-scheduler.test.ts | 20 + packages/engine/src/agents/agent-action-gate.ts | 64 +++ packages/engine/src/agents/agent-assignment.ts | 135 ----- packages/engine/src/agents/agent-reflection.ts | 1 + .../engine/src/agents/ephemeral-worker-manager.ts | 429 --------------- .../engine/src/agents/workflow-agent-capacity.ts | 113 ++++ .../engine/src/agents/workflow-agent-router.ts | 185 +++++++ packages/engine/src/execution/reviewer.ts | 26 +- packages/engine/src/executor.ts | 501 +++++++++++++++--- packages/engine/src/index.ts | 1 - packages/engine/src/merger.ts | 20 +- packages/engine/src/pi.ts | 11 + packages/engine/src/runtimes/in-process-runtime.ts | 37 -- packages/engine/src/scheduler.ts | 114 +--- packages/engine/src/triage.ts | 196 ++++++- .../src/workflows/workflow-graph-executor.ts | 109 +++- .../engine/src/workflows/workflow-graph-loop.ts | 13 +- .../src/workflows/workflow-graph-task-runner.ts | 12 + .../engine/src/workflows/workflow-task-runtime.ts | 125 ++++- .../src/workflows/workflow-work-scheduler.ts | 8 +- 98 files changed, 2722 insertions(+), 2468 deletions(-) Fusion-Task-Id: FN-8764 Fusion-Task-Lineage: 5527fccb-342d-46f6-8108-bbf89142efec Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
60706ed5e4 |
fix: demote high-frequency TUI log lines to debug
Session setup, track bookkeeping, intentional skill exclusions, token-cache metrics, zero-count recovery summaries, and expected-missing PROMPT seed reads were flooding the default log pane. Gate them behind FUSION_DEBUG so only state transitions and operator-actionable warnings remain visible. |
||
|
|
2bb8537352 |
FN-8616: make agent tool-output limits configurable
Expose the shared agent tool-output budget as a scoped operator setting with an explicit no-limit option. - Resolve global and project output caps with a safe finite default and zero sentinel. - Propagate configured budgets through PI and plugin runtime tool wrappers. - Add settings controls, localized labels, documentation, and regression coverage. Files changed: .changeset/fn-8616-tool-output-budget-setting.md | 7 ++++ docs/agents.md | 4 +- docs/settings-reference.md | 1 + .../core/src/__tests__/tool-output-budget.test.ts | 23 ++++++++--- packages/core/src/index.gate.ts | 2 + packages/core/src/index.ts | 2 + packages/core/src/settings-schema.ts | 12 ++++++ packages/core/src/tool-output-budget.ts | 31 +++++++++++++-- packages/core/src/types/settings-scope.ts | 8 ++++ .../app/components/settings/save-split.ts | 1 + .../sections/GlobalGeneralSection.search.ts | 20 ++++++++++ .../settings/sections/GlobalGeneralSection.tsx | 26 ++++++++++++ ...lobalGeneralSection.tool-output-budget.test.tsx | 46 ++++++++++++++++++++++ .../settings-default-descriptions.test.tsx | 1 + .../src/__tests__/agent-session-helpers.test.ts | 20 ++++++++++ .../src/__tests__/runtime-resolution.test.ts | 15 +++++++ .../__tests__/tool-output-budget-wrapper.test.ts | 45 ++++++++++++++++----- packages/engine/src/agent-runtime.ts | 2 + packages/engine/src/agent-session-helpers.ts | 18 +++++++-- packages/engine/src/pi.ts | 29 ++++++++++---- packages/engine/src/runtime-resolution.ts | 10 ++++- packages/i18n/locales/en/app.json | 4 ++ packages/i18n/locales/es/app.json | 6 ++- packages/i18n/locales/fr/app.json | 6 ++- packages/i18n/locales/ko/app.json | 6 ++- packages/i18n/locales/zh-CN/app.json | 6 ++- packages/i18n/locales/zh-TW/app.json | 6 ++- packages/i18n/src/resources.d.ts | 4 ++ 28 files changed, 323 insertions(+), 38 deletions(-) Fusion-Task-Id: FN-8616 Fusion-Task-Lineage: 3ca99a61-d6ae-48ff-98d2-f14a153aa2b7 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
07c8c95b10 |
FN-8614: cap agent tool output
Bound every engine-injected tool result to preserve agent context capacity. - Add shared 16,000-character total text budgets with deterministic truncation markers and validated overrides. - Apply outermost output clamps to Pi and non-Pi plugin tool paths, with semantic caps for high-volume reads. - Cover budget behavior and document the operator-facing configuration contract. Files changed: .changeset/fn-8614-tool-output-budget.md | 7 ++ docs/agents.md | 8 ++ .../core/src/__tests__/tool-output-budget.test.ts | 58 +++++++++++++ packages/core/src/index.gate.ts | 7 ++ packages/core/src/index.ts | 7 ++ packages/core/src/tool-output-budget.ts | 97 ++++++++++++++++++++++ .../src/__tests__/agent-artifact-tools.test.ts | 10 +++ .../src/__tests__/agent-document-tools.test.ts | 10 +++ .../__tests__/agent-task-logs-read-tools.test.ts | 8 ++ .../__tests__/tool-output-budget-wrapper.test.ts | 67 +++++++++++++++ packages/engine/src/agent-session-helpers.ts | 7 +- packages/engine/src/agent-tools.ts | 43 ++++++++-- packages/engine/src/pi.ts | 54 +++++++++++- 13 files changed, 374 insertions(+), 9 deletions(-) Fusion-Task-Id: FN-8614 Fusion-Task-Lineage: b6a76ccd-d7b4-4b43-af7e-cfd16ffb7fc8 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
3d0ce2ed3a |
FN-8545: enforce mission lineage task admission
Protect feature bootstrap task creation with mission-lineage admission rules. - Restrict supervised agents to linked autonomous mission features - Atomically claim defined feature tasks and preserve duplicate ownership - Lock defined feature claims to prevent concurrent bootstrap inserts - Document admission behavior and add PostgreSQL and delegation coverage Files changed: .changeset/fn-8545-mission-admission.md | 7 + docs/agents.md | 6 + docs/missions.md | 12 +- .../__tests__/postgres/mission-store.pg.test.ts | 119 ++++++++++++ packages/core/src/async-mission-store.ts | 203 +++++++++++++++++++-- packages/core/src/duplicate-guard.ts | 14 +- packages/core/src/mission-store.ts | 15 ++ packages/core/src/task-store/task-creation.ts | 152 ++++++++++----- .../src/__tests__/agent-tools-delegation.test.ts | 152 ++++++++++++++- packages/engine/src/agent-tools.ts | 151 ++++++++++++++- 10 files changed, 753 insertions(+), 78 deletions(-) Fusion-Task-Id: FN-8545 Fusion-Task-Lineage: c6e1b46d-f434-4b07-93bc-27e1f6b491b1 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
96a9da7979 |
FN-8505: notify operators of terminal task wedges
Deliver durable, actionable notifications when terminal task recovery wedges. - Persist and deduplicate terminal wedge notification episodes across task updates and service restarts. - Classify terminal failure and self-healing escalation states, then deliver actionable ntfy and mailbox alerts. - Align PostgreSQL baseline and upgrade migration registration for the durable wedge field. Files changed: .changeset/fn-8505-task-wedge-notifications.md | 7 + docs/agents.md | 4 + docs/architecture.md | 4 + .../core/src/postgres/migrations/0000_initial.sql | 2 + .../migrations/0033_fn-8505_wedge_notification.sql | 5 + packages/core/src/postgres/schema-applier.ts | 29 +++- packages/core/src/postgres/schema/project.ts | 1 + packages/core/src/store.ts | 22 ++- packages/core/src/task-store/persistence.ts | 2 + packages/core/src/task-store/serialization.ts | 1 + packages/core/src/task-store/task-row-mappers.ts | 2 +- packages/core/src/task-store/task-update.ts | 5 + packages/core/src/types.ts | 14 ++ packages/core/src/types/workflow-steps.ts | 2 + .../src/__tests__/notification-service.test.ts | 20 +++ packages/engine/src/__tests__/notifier.test.ts | 26 +++- packages/engine/src/__tests__/self-healing.test.ts | 9 +- .../__tests__/notification-service.test.ts | 34 ++++- .../__tests__/task-wedge-notification.test.ts | 134 +++++++++++++++++ .../src/notification/notification-service.ts | 108 +++++++++++++- packages/engine/src/notification/ntfy-provider.ts | 11 ++ .../src/notification/task-wedge-notification.ts | 160 +++++++++++++++++++++ packages/engine/src/notifier.ts | 3 + packages/engine/src/self-healing.ts | 17 +++ 24 files changed, 610 insertions(+), 12 deletions(-) Fusion-Task-Id: FN-8505 Fusion-Task-Lineage: eee85220-18ba-475d-9d01-dc96e2b923e6 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
f21d3ce132 |
feat(core): support additive archived task documents (#2375)
## Summary Re-lands the completed Fusion board task FX-005 on current upstream `main`, stacked on #2374 (FX-004). - adds a narrowly authorized additive publication path for archived task documents - preserves archived task and mission state and keeps ordinary replacement/deletion writes rejected - exposes retained archived current/revision reads - requires project-scoped revision/hash CAS for publication - maps malformed, unauthorized, missing, inconsistent, and stale states safely - rebases preserved dashboard drafts explicitly after CAS conflicts ## Why Operators need to append a correction or evidence revision to an archived task without unarchiving it or weakening ordinary archived-task immutability. ## Dependency This branch contains #2374 plus the eight FX-005 commits because cross-fork PRs cannot target a fork-only base branch. After #2374 lands, this PR should be rebased or refreshed so its diff collapses to FX-005 only. ## Validation - PostgreSQL task-store and archived-default suites: 33/33 - dashboard route and editor suites: 321/321 - agent document tools: 22/22 - core, dashboard, and engine typechecks pass <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added optimistic concurrency controls for task document creation and editing using revisions and content hashes. * Added safe, authenticated append-only corrections for documents retained on archived tasks. * Archived documents and revision history remain available for direct reading. * Agent and dashboard tools now report conflicts clearly and support explicit draft rebasing. * **Bug Fixes** * Prevented stale updates from overwriting newer document content. * Preserved archived-task immutability while allowing controlled corrections. * **Documentation** * Updated CLI, dashboard, storage, task-management, and agent guidance for these workflows. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: fusion-merge-train <merge-train@topkoli.local> Co-authored-by: Fusion <noreply@runfusion.ai> Co-authored-by: v <v@v.speedport.ip> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> |
||
|
|
0ade15481d |
FN-8477: label planning model activity logs
Planning activity consistently identifies its model provenance while preserving legacy log compatibility. - Emit Planning using model markers from the planning lane. - Accept Planning and legacy Triage markers in dashboard model resolution. - Update documentation, regression coverage, and release metadata. Files changed: .changeset/fn-8477-planning-model-marker.md | 7 +++++++ docs/agents.md | 2 +- packages/dashboard/app/components/TaskChatTab.tsx | 2 +- .../app/components/__tests__/TaskChatTab.test.tsx | 2 +- ...skDetailModal.models-progress-workflow.test.tsx | 4 ++-- .../__tests__/WorkflowResultsTab.test.tsx | 2 +- .../__tests__/effective-model-resolution.test.ts | 24 ++++++++++++++-------- .../app/components/effective-model-resolution.ts | 20 ++++++++++++------ packages/engine/src/__tests__/triage.test.ts | 8 ++++---- packages/engine/src/triage.ts | 8 ++++++-- 10 files changed, 52 insertions(+), 27 deletions(-) Fusion-Task-Id: FN-8477 Fusion-Task-Lineage: 7ddce64a-d378-4d08-ad63-ade1b20d4b87 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
c94920d885 |
FN-8466: allow reads of advertised plugin skills
Allow isolated worktree sessions to read only host-advertised plugin skill roots. - Normalize additional skill paths once for resource loading and boundary checks - Permit read, glob, and grep while keeping write, edit, and Bash worktree-bound - Document the boundary and cover root normalization and access restrictions Files changed: .changeset/fn-8466-skill-path-read-boundary.md | 7 ++ docs/agents.md | 4 + .../src/__tests__/pi-create-fn-agent.test.ts | 108 +++++++++++++++++++++ packages/engine/src/pi.ts | 75 +++++++++++--- 4 files changed, 183 insertions(+), 11 deletions(-) Fusion-Task-Id: FN-8466 Fusion-Task-Lineage: ff6566be-803d-48b8-8550-aa1bfe080fed Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
df488f25ea |
FN-8443: fix chat plugin skill loading
Forward enabled plugin skill body paths into chat sessions. - Pass resolved plugin skill directories through dashboard chat, QuickChat, and room responder sessions. - Preserve additional skill paths in the runtime session factory and cover both forwarding layers. - Document the chat skill contract and add a patch changeset. Files changed: .changeset/fn-8443-chat-plugin-skill-paths.md | 7 +++ docs/agents.md | 2 +- packages/dashboard/src/__tests__/chat-manager.test.ts | 60 ++++++++++++++++++++-- packages/dashboard/src/chat.ts | 12 +++-- packages/engine/src/__tests__/agent-session-helpers.test.ts | 37 +++++++++++++ packages/engine/src/agent-session-helpers.ts | 5 ++ 6 files changed, 114 insertions(+), 9 deletions(-) Fusion-Task-Id: FN-8443 Fusion-Task-Lineage: 92c4e32c-8c94-4e8e-ad62-a5dae2fb9dc3 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
3962222863 |
FN-8424: route CLI chat replies through inbox mail
Route agent replies to the correct CLI or dashboard mailbox with bounded polling deadlines. - add reply-parent routing validation and CLI/dashboard inbox selection - preserve named mailbox conversations while handling per-message reply deadlines - document chat and inbox interfaces and cover deadline and routing regressions Files changed: .changeset/fn-8424-cli-chat-reply-routing.md | 7 + docs/agents.md | 20 +- docs/cli-reference.md | 29 +- packages/cli/src/bin.ts | 15 +- packages/cli/src/commands/__tests__/chat.test.ts | 262 +++++++++--------- .../cli/src/commands/__tests__/message.test.ts | 12 + packages/cli/src/commands/chat.ts | 293 ++++++++++++--------- packages/cli/src/commands/message.ts | 18 +- ...tools-send-message-recipient-validation.test.ts | 86 +++++- packages/engine/src/agent-heartbeat-prompts.ts | 8 +- packages/engine/src/agent-tools.ts | 71 +++-- 11 files changed, 523 insertions(+), 298 deletions(-) Fusion-Task-Id: FN-8424 Fusion-Task-Lineage: 28d0ef88-717e-4f39-8880-64d2fef94706 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
9db0ffc1f9 |
FN-8425: route CLI chat through agent inbox
Route CLI chat messages through durable, named agent mailbox conversations. - Add conversation IDs and parsing for CLI chat sessions. - Filter CLI chat history and replies by mailbox conversation identity. - Surface conversation IDs to agents and document the inbox-based transport. Files changed: .changeset/fn-8425-cli-chat-conversation.md | 7 + docs/agents.md | 11 +- docs/cli-reference.md | 15 +- packages/cli/src/__tests__/bin-chat-args.test.ts | 34 +++++ packages/cli/src/bin.ts | 45 ++---- packages/cli/src/commands/__tests__/chat.test.ts | 162 +++++++++++++++++++++ packages/cli/src/commands/chat.ts | 132 +++++++++++++++-- packages/core/src/types/messages.ts | 6 + .../__tests__/agent-tools-read-messages.test.ts | 48 ++++++ packages/engine/src/agent-tools.ts | 10 +- 10 files changed, 418 insertions(+), 52 deletions(-) Fusion-Task-Id: FN-8425 Fusion-Task-Lineage: 5091f49f-1f12-4ff7-8d21-48f008cf984e Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
f6c788dee4 |
FN-8409: enable coding tools for dashboard chat agents
Enable interactive dashboard chat sessions to use the project coding workspace safely. - Share the coding tool mode across direct, room, and planner chat sessions. - Document branch-sticky workspace behavior and durable-agent policy gates. - Cover coding tool access and prompt guidance with chat tests. - Add a minor changeset for the published Fusion package. Files changed: .changeset/fn-8409-chat-coding-tools.md | 7 +++++ docs/agents.md | 6 +++++ docs/dashboard-guide.md | 2 ++ .../dashboard/src/__tests__/chat-manager.test.ts | 31 +++++++++++++++------- .../src/__tests__/chat-system-prompt.test.ts | 11 ++++++++ packages/dashboard/src/chat.ts | 12 ++++++--- 6 files changed, 56 insertions(+), 13 deletions(-) Fusion-Task-Id: FN-8409 Fusion-Task-Lineage: ca88794d-a5cf-4852-a931-90f61e3751df Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
fc8c7a6cca |
FN-8410: preserve productive work when reports are stuck
Guide managers to verify live progress before reassigning stuck heartbeat reports. - Replace immediate reassignment guidance with live-work verification steps - Cover the safe recovery guidance in heartbeat reports-health tests - Document stuck-report triage and reassignment criteria Files changed: docs/agents.md | 4 +++- packages/engine/src/__tests__/heartbeat-executor.test.ts | 2 ++ packages/engine/src/agent-heartbeat.ts | 10 +++++++++- 3 files changed, 14 insertions(+), 2 deletions(-) Fusion-Task-Id: FN-8410 Fusion-Task-Lineage: b1168aab-41cf-4148-be67-c20812e6f5b5 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
88fd8f3e7a |
FN-8280: document full-loop agent tool-surface plan
Document the current agent/chat build-loop surface, its gaps, and a safe delivery plan. - Audit ideation, research, roadmap, execution, verification, and concurrency boundaries - Define canonical-operation parity and guardrails for future tool exposure - Link the audit from the agent tooling documentation Files changed: docs/agent-tool-surface-full-loop.md | 138 +++++++++++++++++++++++++++++++++++ docs/agents.md | 2 +- 2 files changed, 139 insertions(+), 1 deletion(-) Fusion-Task-Id: FN-8280 Fusion-Task-Lineage: ff28e0f4-c934-40a4-b030-9541b74bb913 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
eb7d223a03 |
FN-8207: add task reassignment for delegated work
Correct delegation routing for duplicate tasks and enable explicit task owner reassignment. - Preserve requested assignee and todo routing on duplicate canonical tasks - Add governed fn_task_assign to engine, heartbeat, triage, workflow, and chat sessions - Cover assignment validation, truthful delegation responses, and tool availability Files changed: .changeset/fn-8207-delegate-assign.md | 7 ++ docs/agents.md | 6 ++ packages/core/src/types.ts | 1 + packages/core/src/usage-events.ts | 2 +- .../dashboard/src/__tests__/chat-manager.test.ts | 2 + packages/dashboard/src/__tests__/chat.test.ts | 2 + packages/dashboard/src/chat.ts | 2 + .../engine/src/__tests__/agent-action-gate.test.ts | 2 + .../src/__tests__/agent-tools-delegation.test.ts | 99 ++++++++++++++++++- .../src/__tests__/agent-tools-task-assign.test.ts | 75 +++++++++++++++ .../src/__tests__/gating-classifications.test.ts | 1 + .../src/__tests__/heartbeat-executor.test.ts | 8 +- .../src/__tests__/permanent-agent-gating.test.ts | 2 + .../src/__tests__/step-session-executor.test.ts | 4 +- packages/engine/src/__tests__/triage.test.ts | 5 +- packages/engine/src/agent-heartbeat.ts | 4 +- packages/engine/src/agent-tools.ts | 105 ++++++++++++++++++++- packages/engine/src/executor.ts | 3 + packages/engine/src/gating-classifications.ts | 1 + packages/engine/src/index.ts | 2 + packages/engine/src/step-session-executor.ts | 2 + packages/engine/src/triage.ts | 2 + 22 files changed, 324 insertions(+), 13 deletions(-) Fusion-Task-Id: FN-8207 Fusion-Task-Lineage: db6f3876-bdc8-4279-b726-29344d9acdb9 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
ced0e84f5d |
FN-8184: unify heartbeat multiplier timing
Keep scheduler repair and reports health aligned with the effective heartbeat cadence. - Apply heartbeatMultiplier once through shared interval calculations. - Align scheduler repair and reports-health stale thresholds with scaled cadence. - Add multiplier regression coverage and document the effective timing rules. Files changed: .../fn-8184-heartbeat-multiplier-consistency.md | 7 ++ docs/agents.md | 8 +- .../src/__tests__/heartbeat-executor.test.ts | 43 +++++++++ .../src/__tests__/heartbeat-scheduler.test.ts | 46 ++++++++++ packages/engine/src/agent-heartbeat.ts | 101 ++++++++++++++++----- 5 files changed, 176 insertions(+), 29 deletions(-) Fusion-Task-Id: FN-8184 Fusion-Task-Lineage: 05b79c5e-444a-42c3-9073-9c8c05df5def Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
3f133e0b13 |
FN-8058: add task agent log reader
Expose paginated, filterable persisted agent logs to task-scoped and chat agent sessions. - Add the read-only fn_task_logs_read tool across engine, dashboard chat/planning, heartbeat, step, and CLI extension surfaces. - Filter agent-log entries before pagination, report matching totals, and render complete persisted rows for diagnosis. - Document the tool, add release metadata, regression coverage, and complete affected engine mocks. Files changed: .changeset/fn-8058-task-logs-read.md | 7 ++ docs/agents.md | 4 +- packages/cli/skill/fusion/SKILL.md | 2 +- .../cli/skill/fusion/references/extension-tools.md | 11 +++ .../skill/fusion/references/fusion-capabilities.md | 1 + .../extension-experiment-finalize.test.ts | 2 + .../src/__tests__/extension-fn-secret-get.test.ts | 2 + .../__tests__/extension-gitlab-tracking.test.ts | 2 + .../src/__tests__/extension-integration.test.ts | 1 + .../cli/src/__tests__/extension-web-fetch.test.ts | 2 + packages/cli/src/__tests__/extension.test.ts | 1 + packages/cli/src/extension.ts | 34 ++++++++ .../src/__tests__/agent-logs-backend-mode.test.ts | 28 +++++- packages/core/src/store.ts | 11 ++- packages/core/src/task-store/remaining-ops-7.ts | 16 +++- packages/core/src/types.ts | 1 + packages/dashboard/src/__tests__/chat.test.ts | 1 + .../planning-answered-question-reemit.test.ts | 1 + .../planning-generation-cancellation.test.ts | 1 + packages/dashboard/src/chat.ts | 5 ++ packages/dashboard/src/planning.ts | 3 + .../__tests__/agent-task-logs-read-tools.test.ts | 72 ++++++++++++++++ packages/engine/src/agent-heartbeat.ts | 4 +- packages/engine/src/agent-tools.ts | 99 +++++++++++++++++++++- packages/engine/src/executor.ts | 6 ++ packages/engine/src/gating-classifications.ts | 2 + packages/engine/src/index.ts | 6 ++ packages/engine/src/step-session-executor.ts | 6 +- 28 files changed, 316 insertions(+), 15 deletions(-) Fusion-Task-Id: FN-8058 Fusion-Task-Lineage: 74f198b2-f538-4b39-973f-431f22e68f29 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
667f4c8a55 |
FN-7987: expose shared fusion toolset to chat agents and Grok CLI
Give dashboard chat and room responders the same safe coordination/productivity tools as other agent lanes, including via the Grok MCP bridge. - Export chat coordination tool factories from @fusion/engine for public use - Assemble createChatFusionToolset with board, delegation, web, goal, memory, and research tools - Wire the shared toolset into model-loop chat and room-responder sessions - Exclude destructive agent-lifecycle tools and fn_memory_append from chat - Cover chat fusion parity and Grok bridge tool preservation with tests - Document chat Grok tool parity and add a minor changeset Files changed: .changeset/fn-7987-chat-fusion-toolset.md | 7 ++ docs/agents.md | 1 + docs/grok-cli-contract.md | 2 +- packages/dashboard/src/__tests__/chat-manager.test.ts | 52 +++++++++++- packages/dashboard/src/chat.ts | 95 +++++++++++++++++++++- packages/engine/src/__tests__/agent-session-helpers.test.ts | 15 ++++ packages/engine/src/index.ts | 26 ++++++ plugins/fusion-plugin-grok-runtime/src/__tests__/tool-bridge.test.ts | 36 ++++++++ 8 files changed, 230 insertions(+), 4 deletions(-) Fusion-Task-Id: FN-7987 Fusion-Task-Lineage: 4d8d3dbc-10b8-4b56-9b63-79fe85a13755 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
7a4a9c8229 |
fix(engine): auto-recover false-positive heartbeat-model-unavailable parks
Admit under-budget paused/heartbeat-model-unavailable agents to the shared heartbeatErrorRecovery budget so timer, self-healing, and startup paths retry without a manual Retry. Keep the pause reason when the budget is exhausted so operators still see credential guidance. |
||
|
|
dff864e098 |
feat: harden permanent-agent heartbeat instructions (#2081)
## Summary Hardens permanent-agent operating law while keeping the heartbeat/executor split: - **Critical Rules** in task-scoped and no-task heartbeat system prompts (survive custom `HEARTBEAT.md`) - Stronger default procedures: disposition checklist, scoped-wake, blocked dedup, progress note style - **Wake Delta multi-assign inventory** (ranked, cap 8, coordination-only framing) + `checkout_conflict` regression test - Standing instructions six-section template for blank custom create / empty detail insert - Onboarding interview guidance to prefer structured `instructionsText` - Playbooks, CONCEPTS, agents.md accuracy; remove stale agent gap-analysis doc Plan: `docs/plans/2026-07-12-001-feat-permanent-agent-heartbeat-instructions-plan.md` ## Test plan - [x] `pnpm --filter @fusion/core exec vitest run src/__tests__/assigned-task-ranking.test.ts` - [x] `pnpm --filter @fusion/engine exec vitest run src/__tests__/agent-heartbeat-procedures.test.ts src/__tests__/heartbeat-executor.test.ts -u` - [x] `pnpm --filter @fusion/dashboard exec vitest run app/components/__tests__/standing-instructions-template.test.ts` - [ ] CI gate green on PR ## Residual Review Findings None recorded at open (inline review; no residual sink). <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added ranked multi-assignment context to agent heartbeat wake-ups, including task status, ownership, and lease details. * Added standing-instructions templates for creating and editing permanent agents. * Improved onboarding guidance with a consistent six-section instruction structure. * Added clearer heartbeat handling for blocked tasks, no-task runs, and checkout conflicts. * **Documentation** * Added permanent-agent heartbeat playbooks and expanded coordination glossary entries. * Updated documentation indexes and heartbeat behavior guidance. * **Tests** * Added coverage for task ranking, instruction templates, wake-up context, and conflict handling. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
e35620c9aa |
FN-7939: supervise heartbeat timer-audit interval and bound non-advancing zombie re-arms
Fixes agents silently going stale for hours even though the heartbeat repair audit process was running. - HeartbeatTriggerScheduler now runs an independent watchdog (armTimerAuditWatchdog/checkTimerAuditLiveness) that tracks the audit loop's last-run timestamp and re-arms + immediately re-runs the 60s audit interval if it goes stale beyond a bounded multiple of the cadence, so a silently dropped audit driver self-heals instead of leaving active agents unrepaired for hours. - Tracks consecutive non-advancing zombie-timer re-arms per agent (nonAdvancingRearmState) and escalates once the count crosses a threshold, recording consecutiveNonAdvancingRearms/nonAdvancingEscalated in agent.metadata.heartbeatTimerRepair and logging reason=heartbeat-rearm-nonadvancing-escalated instead of silently churning the same zombie-timer-rearmed repair forever. - Clears non-advancing rearm state on unregister, non-eligible agents, paused settings, and stale-run-reap skip paths so tracking never leaks stale per-agent counters. - Watchdog and its interval handle are armed in start() and cleared in stop() alongside the existing audit interval. - Adds a changeset (patch) describing the fix, and updates docs/agents.md and docs/architecture.md to document the FN-7939 audit watchdog and non-advancing escalation behavior. - Adds heartbeat-scheduler.test.ts coverage for watchdog re-arm/liveness and non-advancing escalation. Files changed: .changeset/fn-7939-heartbeat-audit-supervision.md | 7 + docs/agents.md | 8 +- docs/architecture.md | 1 + .../src/__tests__/heartbeat-scheduler.test.ts | 209 +++++++++++++++++++++ packages/engine/src/agent-heartbeat.ts | 128 ++++++++++++- 5 files changed, 341 insertions(+), 12 deletions(-) Fusion-Task-Id: FN-7939 Fusion-Task-Lineage: 9fa90240-4333-4588-b595-aef3811b1524 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
1ea185daa5 |
FN-7911: add workflow validate dry-run command, tool, and API route
Adds a non-mutating `fn workflow validate` dry-run path across CLI, agent tools, and dashboard API so custom workflow IR can be checked before create/update. - Add `packages/cli/src/commands/workflow.ts` implementing `fn workflow validate <id> | --file <path>` with JSON/text output, wired into `bin.ts`. - Add `fn_workflow_validate` agent tool (`agent-tools.ts`, `index.ts`) reusing the existing parseWorkflowIr/trait/code-node/column-agent validation used by create/update, performing no persistence. - Add `POST /api/workflows/validate` route in `register-workflow-routes.ts` plus dashboard route test coverage. - Extend heartbeat tool-gating/exposure tests and gating classifications to include `fn_workflow_validate` alongside the other workflow tools. - Update CLI/agent extension docs (`docs/cli-reference.md`, `docs/agents.md`, `docs/workflow-steps.md`, fusion skill references) to document the new command/tool. - Add changeset `.changeset/fn-7911-workflow-validate.md` (minor) describing the new capability. Files changed: .changeset/fn-7911-workflow-validate.md | 7 ++ docs/agents.md | 5 +- docs/cli-reference.md | 13 ++ docs/workflow-steps.md | 3 +- packages/cli/skill/fusion/SKILL.md | 2 +- .../cli/skill/fusion/references/extension-tools.md | 10 ++ .../skill/fusion/references/fusion-capabilities.md | 1 + .../src/__tests__/extension-workflow-tools.test.ts | 1 + packages/cli/src/__tests__/extension.test.ts | 1 + .../src/__tests__/workflow-docs-current.test.ts | 1 + packages/cli/src/bin.ts | 22 ++++ packages/cli/src/commands/workflow.ts | 80 ++++++++++++ packages/cli/src/extension.ts | 10 ++ .../dashboard/src/__tests__/chat-manager.test.ts | 1 + .../dashboard/src/__tests__/chat.rooms.test.ts | 1 + .../planning-document-tools-exposure.test.ts | 1 + .../__tests__/workflow-validate-route.test.ts | 101 +++++++++++++++ .../src/routes/register-workflow-routes.ts | 27 +++- .../engine/src/__tests__/agent-action-gate.test.ts | 2 +- .../agent-workflow-tools-exposure.test.ts | 70 ++++++++++- .../src/__tests__/gating-classifications.test.ts | 3 +- .../src/__tests__/heartbeat-executor.test.ts | 37 +++--- .../src/__tests__/heartbeat-session-prompt.test.ts | 5 +- .../src/__tests__/permanent-agent-gating.test.ts | 2 +- packages/engine/src/agent-heartbeat.ts | 5 +- packages/engine/src/agent-tools.ts | 140 ++++++++++++++++++++- packages/engine/src/executor.ts | 6 + packages/engine/src/gating-classifications.ts | 2 + packages/engine/src/index.ts | 4 + 29 files changed, 532 insertions(+), 31 deletions(-) Fusion-Task-Id: FN-7911 Fusion-Task-Lineage: 903d15fe-a7ec-458f-aa34-8f2e895a9603 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
2e7fce21ae |
FN-7884: reset durable-agent error state on engine restart
Engine startup now treats itself as an implicit operator retry for durable heartbeat agents stuck in error, clearing eligible error states and re-arming heartbeats instead of waiting for the steady-state sweep's cooldown/exhaustion gates. - Add SelfHealingManager.resetDurableAgentErrorStateOnStartup(), run first in runStartupRecovery(), which resets shared heartbeatErrorRecovery/legacy durableErrorRecovery metadata, clears lastError/pauseReason, flips eligible error and error-retry-exhausted-parked durable agents to active, and re-arms their heartbeat - Preserve suppression for operator-actionable, stale worktree/module-resolution, user-paused, error-unrecoverable, ephemeral, disabled-runtime, and actively-executing agents - Add agent:reset-error-state-on-startup run-audit mutation type with ids/counts/outcomes-only metadata (agentId, priorState, priorPauseReason, source) - Add changeset FN-7884 (patch) documenting the operator-facing behavior - Update AGENTS.md and docs/agents.md, docs/architecture.md to describe the new startup reset path alongside existing FN-7835/FN-7844/FN-7859/FN-7878 recovery docs - Extend self-healing.test.ts with coverage for the new startup reset behavior and its exclusions Files changed: .changeset/fn-7884-restart-error-reset.md | 7 ++ AGENTS.md | 1 + docs/agents.md | 4 +- docs/architecture.md | 2 +- packages/engine/src/__tests__/self-healing.test.ts | 127 ++++++++++++++++++++- packages/engine/src/run-audit.ts | 1 + packages/engine/src/self-healing.ts | 88 +++++++++++++- 7 files changed, 223 insertions(+), 7 deletions(-) Fusion-Task-Id: FN-7884 Fusion-Task-Lineage: fe64f6af-3ff3-4876-8308-8a75591c45f1 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
c745990aa2 |
FN-7879: deliver one-time Postgres-migration inbox notice on first 0.59 startup
Adds a best-effort, idempotent dashboard inbox notice announcing the upcoming embedded-Postgres storage migration, delivered once per project on the first engine start under the Fusion 0.59.x release line. - New `deliverPostgresMigrationNoticeIfNeeded` in `@fusion/engine` (`postgres-migration-notice.ts`) builds and sends a `system` -> `user` inbox message via `MessageStore`, gated to version `0.59.x` by `isPostgresMigrationNoticeVersion` - Idempotency via existing inbox message `metadata.kind = "postgres-migration-notice"` marker (no new settings key or table), so restarts never duplicate the notice - Delivery is fully best-effort: any `MessageStore` failure is caught, logged as a warning, and never blocks or fails `ProjectEngine.start()` - `ProjectEngine.start()` invokes the notice after runtime start, using an injected `cliPackageVersion` threaded from the CLI layer through `EngineManagerOptions` / `ProjectEngineOptions` so the engine never imports CLI/dashboard code directly - `daemon.ts`, `dashboard.ts`, and `serve.ts` resolve the published `@runfusion/fusion` version via `getCliPackageVersion` / `isUnresolvedCliPackageVersion` and pass it into `ProjectEngineManager` - Exported new symbols (`POSTGRES_MIGRATION_HELP_URL`, `POSTGRES_MIGRATION_NOTICE_KIND`, `deliverPostgresMigrationNoticeIfNeeded`, `isPostgresMigrationNoticeVersion`, related types) from `@fusion/engine`, and `isUnresolvedCliPackageVersion` from `@fusion/dashboard` - New unit tests covering version matching and single-delivery/idempotency behavior - Docs updated (`docs/agents.md`, `docs/dashboard-guide.md`) to describe the one-time notice and its dedup key - Changeset added for `@runfusion/fusion` (minor, feature) Files changed: .changeset/fn-7879-postgres-migration-inbox-notice.md | 7 ++ docs/agents.md | 1 + docs/dashboard-guide.md | 1 + packages/cli/src/commands/daemon.ts | 6 +- packages/cli/src/commands/dashboard.ts | 5 + packages/cli/src/commands/serve.ts | 6 +- packages/dashboard/src/index.ts | 2 +- packages/engine/src/__tests__/postgres-migration-notice.test.ts | 140 +++++++++++++++++++++ packages/engine/src/index.ts | 9 ++ packages/engine/src/postgres-migration-notice.ts | 107 ++++++++++++++++ packages/engine/src/project-engine-manager.ts | 6 + packages/engine/src/project-engine.ts | 12 ++ 12 files changed, 299 insertions(+), 3 deletions(-) Fusion-Task-Id: FN-7879 Fusion-Task-Lineage: 201877e5-6bdc-4168-a8ac-ae0e50ec8308 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
67cc025562 |
FN-7859: park non-recoverable durable heartbeat errors instead of stalling in bare error
Debug org agents error state recovery regression: durable heartbeat-managed agents with a non-recoverable error (permanent/credential/model-access/ config, not stale-worktree/module-resolution) were previously left indefinitely in bare `state:"error"` with no operator-visible reason, and CLI agent inspection tools did not surface error/pause diagnostics. - Timer path (`HeartbeatMonitor`) and run-entry recovery now classify non-recoverable durable heartbeat errors and park the agent `paused` with `pauseReason:"error-unrecoverable"` instead of restart-looping or sitting in `error` forever. - `SelfHealingManager` mirrors the same non-recoverable classification in its recovery sweep, parking with the same reason/metadata and skipping the exhausted/next-retry gates for that terminal bucket. - New `agent:error-parked-unrecoverable` run-audit event type emitted by both the heartbeat and self-healing paths (ids/counts/outcomes-only metadata). - `fn_agent_show` now prints `Last Error`, `Pause Reason`, and a compact `Error Recovery` counter line; `fn_list_agents` prints the same diagnostics only for agents currently in `error`/`paused`. - Updated `AGENTS.md`, `docs/agents.md`, and `docs/architecture.md` to document the new terminal-park behavior and CLI diagnostics surface. - Added a changeset (`@runfusion/fusion` patch) describing the operator-facing fix. Files changed: .changeset/fn-7859-org-agent-error-diagnostics.md | 7 ++ AGENTS.md | 2 +- docs/agents.md | 3 +- docs/architecture.md | 4 +- packages/cli/src/__tests__/extension.test.ts | 68 ++++++++++++++++ packages/cli/src/extension.ts | 64 +++++++++++++++ .../src/__tests__/heartbeat-error-recovery.test.ts | 47 ++++++++++- packages/engine/src/__tests__/self-healing.test.ts | 94 ++++++++++++++++++---- packages/engine/src/agent-heartbeat.ts | 71 +++++++++++++++- packages/engine/src/run-audit.ts | 1 + packages/engine/src/self-healing.ts | 46 +++++++++-- 11 files changed, 375 insertions(+), 32 deletions(-) Fusion-Task-Id: FN-7859 Fusion-Task-Lineage: 09b2035d-e8a0-438f-b1ab-1b0048b35c76 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
8b601810e0 |
fix(FN-7851): enforce per-agent assignment policy across all task-routing binding primitives
Issue #2015: product-code executor tasks were repeatedly routed to a liaison-only agent because every routing path gated only on the coarse role field, and several binding primitives had no guard at all. - Add runtimeConfig.assignmentPolicy ("auto" | "explicit-only" | "none"); "none" can never be bound to implementation tasks by ANY path — no override bypasses it (the liaison guarantee) - Route every binding surface through one shared evaluator (evaluateImplementationTaskBind): claimTaskForAgent, the previously unguarded checkoutTask/assignTask primitives, selectNextTaskForAgent (including the in-progress re-selection loop), scheduler auto-assign pool, heartbeat inbox/auto-claim, fn_delegate_task, CLI agent-id validation, and dashboard assign/checkout/inbox routes - Lock project isolation with a regression test: a foreign-project agent id is rejected by every binding primitive - Expose Assignment Policy in Agent Detail settings; document in docs/agents.md; add changeset Fusion-Task-Id: FN-7851 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
c9d0211bec |
FN-7844: coordinate heartbeat and self-healing durable-agent error recovery
Unifies the two independent durable-agent error-recovery paths (heartbeat timer and self-healing sweep) so they share one retry budget, eligibility check, and audit surface instead of racing separate counters. - Share the heartbeatErrorRecovery attempt budget between HeartbeatMonitor's timer-entry recovery and SelfHealingManager.recoverOrphanedAgents(), with self-healing's legacy durableErrorRecovery metadata folded into the same counter via readHeartbeatErrorRetryCount(). - Add isHeartbeatErrorRecoverable() as the single transient/non-operator-actionable eligibility check, used by both the heartbeat timer and self-healing paths (self-healing additionally allows stale-worktree module-resolution errors). - resetHeartbeatErrorRecoveryMetadata() now strips the legacy durableErrorRecovery field so recovered agents don't retain stale sweep bookkeeping. - Self-healing emits the shared agent:auto-recover-error-state / agent:error-retry-exhausted run-audit events with source:"self-healing", and parks the agent paused with pauseReason:"error-retry-exhausted" on budget exhaustion, matching the heartbeat-timer behavior. - Update AGENTS.md, docs/architecture.md, and docs/agents.md to describe the consolidated recovery budget and audit surface. - Add a patch changeset documenting the fix for @runfusion/fusion. Files changed: .changeset/fn-7844-error-recovery-coordination.md | 7 ++ AGENTS.md | 2 +- docs/agents.md | 14 ++-- docs/architecture.md | 2 +- packages/engine/src/__tests__/heartbeat-error-recovery.test.ts | 13 +++- packages/engine/src/__tests__/self-healing.test.ts | 58 ++++++++++++++- packages/engine/src/agent-heartbeat.ts | 35 ++++++--- packages/engine/src/self-healing.ts | 85 ++++++++++++++++++---- 8 files changed, 180 insertions(+), 36 deletions(-) Fusion-Task-Id: FN-7844 Fusion-Task-Lineage: b70dcba5-56b6-412c-8be2-ef827bee9964 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
8fa2ad0ecd |
Address PR review feedback (#1996)
- contain fn_artifact_register path payloads: realpath-canonicalized containment before stat/read — relative paths require and must stay inside baseDir, absolute paths allowed only under baseDir or the OS temp dir (deliberate allowance for browser/screenshot tooling); the process.cwd() fallback is gone, symlink escapes rejected - bind task-scoped heartbeat artifact registration to the acquired worktree (baseDir: sessionCwd rebind after acquisition); no-task heartbeat prompt now says to pass absolute temp-dir paths - enforce exactly-one payload source (content/uri/dataBase64/path); content+uri combos are now rejected to match the documented contract - add FNXC rationale comments at both visual-artifact instruction sites in the planning prompts (sync contract with the executor prompt) - media route: statSync -> await stat from node:fs/promises - range tests ride the in-memory MockSocket harness (TestResponse gains binary-safe bodyBuffer; real-TCP helper deleted) and assert the full 206 Content-Range/Content-Length contract for every range form - add PdfViewer coverage (iframe src/title) in DocumentsView tests Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
a8eafbbb14 |
feat: video, HTML mockup, and PDF artifact support end-to-end
Video was registrable but effectively unusable, and HTML/PDF deliverables had no first-class path from agents to the gallery. - media route now serves HTTP byte ranges (Accept-Ranges, 206 + Content-Range, 416 on unsatisfiable) so <video>/<audio> seeking works and Safari plays media at all - video attachments (mp4/webm/mov, 100MB cap vs 5MB for other types) bridge into the artifact registry like images; multer transport ceiling raised to 100MB with per-type caps enforced in the store - fn_artifact_register path payloads are signature-validated for video (ftyp box / EBML header) and PDF (%PDF- prefix), mirroring images - HTML doc artifacts (mimeType text/html) render as live sandboxed iframe previews by default in the doc viewer, with a Preview/Source toggle and the same FileEditor edit mode - executor/heartbeat/planning prompts and tool descriptions now cover the full type matrix: images, videos, audio, HTML mockups, PDFs, and markdown docs, each with the registration recipe Verified live: range requests (200/206/416) via curl, an ffmpeg-generated mp4 playing to completion in the gallery lightbox, and an interactive HTML mockup rendering in the sandboxed preview. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
9024f3a639 |
feat: agent-created visual artifacts end-to-end + redesigned category gallery with doc editing
Agents could never get screenshots/wireframes/mocks into the Artifacts view:
fn_artifact_register was gated on assignedAgentId (never set in default
ephemeral mode), the only image payload source was inline base64, and no
prompt ever told agents to register visual deliverables.
- always expose fn_artifact_register to executor sessions ("executor" author
fallback), resolve relative paths against the task worktree, and default
taskId to the executing task (heartbeat task lane too)
- add a `path` payload source: file read with 50MB cap, extension MIME
inference, PNG/JPEG/GIF/WebP signature + SVG sniff validation, persisted
through managed artifact storage
- executor/heartbeat/planning prompts + engine-tools reference now instruct
agents to register screenshots, wireframes, mockups, and recordings
- new ArtifactsGallery: Images/Docs/PDFs/Videos/Audio/Other category sections
and filter chips, visual tile grid + lightbox, embedded PDF viewer, audio
player rows, download rows; mobile-responsive down to the 768px breakpoint
- doc artifacts open a full viewer rendered as markdown by default with an
in-place edit mode using the shared CodeMirror FileEditor; persisted via new
GET/PATCH /api/artifacts/:id + TaskStore.updateArtifact and live-refreshed
through the new artifact:updated SSE event
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
||
|
|
a32307f8f1 |
FN-7778: resolve plugin-contributed skills per requesting project instead of daemon root
Fixes plugin skills silently disappearing when the fn daemon is started outside the project that enabled the contributing plugin, by making skill resolution project-aware instead of scoped to the daemon's root PluginLoader. - getPluginSkills now resolves per requesting rootDir against project_plugin_states rather than the daemon-root PluginLoader scope - Plugins skipped as disabled are now logged at load time for visibility - Wired the new project-aware resolution through dashboard.ts, serve.ts, and daemon.ts CLI commands - Added regression coverage in plugin-loader.test.ts and skills-adapter.test.ts - Documented the project-scoped behavior in docs/PLUGIN_AUTHORING.md and docs/agents.md - Added a patch changeset for @runfusion/fusion Files changed: .changeset/fn-7778-plugin-skills-project-scope.md | 7 +++ docs/PLUGIN_AUTHORING.md | 2 + docs/agents.md | 2 +- packages/cli/src/commands/daemon.ts | 68 +++++++++++++++++++-- packages/cli/src/commands/dashboard.ts | 71 ++++++++++++++++++++-- packages/cli/src/commands/serve.ts | 68 +++++++++++++++++++-- packages/core/src/__tests__/plugin-loader.test.ts | 69 +++++++++++++++++++++ packages/core/src/plugin-loader.ts | 29 ++++++--- .../dashboard/src/__tests__/skills-adapter.test.ts | 29 +++++++++ packages/dashboard/src/skills-adapter.ts | 19 ++++-- 10 files changed, 337 insertions(+), 27 deletions(-) Fusion-Task-Id: FN-7778 Fusion-Task-Lineage: 5d9a8ff2-ed0e-4859-bf9c-a16f715b081d Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
0e90578122 |
FN-7737: Add file_scope agent permission category with default allow disposition
Introduces a new file_scope sensitive-action category to the agent permission policy model so file-scope-related FN tools are classified and gated distinctly from other categories, defaulting to allowed under the grant-all preset. - Add file_scope to AGENT_PERMISSION_POLICY_ACTION_CATEGORIES in @fusion/core types - Classify FILE_SCOPE_FN_TOOLS in both agent-action-gate and permanent-agent-gating with a uniform preset disposition (no review_gate_bypass-style override) - Update AgentDetailView and AgentPermissionPolicyEditor to surface the new category in the dashboard UI - Add/extend unit tests across core, engine, and dashboard packages covering the new category's resolution, gating, and UI rendering - Update docs/agents.md and docs/settings-reference.md to document the new permission category - Regenerate i18n locale strings (en/es/fr/ko/zh-CN/zh-TW) and resources.d.ts for the new category labels - Add changeset for @runfusion/fusion (minor) describing the new File Scope permission category Files changed: .../fn-7737-file-scope-permission-category.md | 7 + docs/agents.md | 10 +- docs/settings-reference.md | 8 +- .../agent-permission-policy-resolution.test.ts | 13 + .../src/__tests__/agent-permission-policy.test.ts | 45 +++ packages/core/src/types.ts | 7 + .../dashboard/app/components/AgentDetailView.tsx | 2 + .../app/components/AgentPermissionPolicyEditor.tsx | 8 + .../__tests__/AgentPermissionPolicyEditor.test.tsx | 37 +++ .../engine/src/__tests__/agent-action-gate.test.ts | 46 +++ .../src/__tests__/gating-classifications.test.ts | 67 +++++ .../src/__tests__/permanent-agent-gating.test.ts | 41 +++ packages/engine/src/agent-action-gate.ts | 7 + packages/engine/src/gating-classifications.ts | 6 + packages/engine/src/permanent-agent-gating.ts | 6 + packages/i18n/locales/en/app.json | 4 + packages/i18n/locales/es/app.json | 4 + packages/i18n/locales/fr/app.json | 4 + packages/i18n/locales/ko/app.json | 4 + packages/i18n/locales/zh-CN/app.json | 4 + packages/i18n/locales/zh-TW/app.json | 4 + packages/i18n/src/resources.d.ts | 310 +++++++++++++++------ 22 files changed, 550 insertions(+), 94 deletions(-) Fusion-Task-Id: FN-7737 Fusion-Task-Lineage: 7b161fb3-7dd9-4860-aa4d-0cb35f38ea5b Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
e657d3b965 |
FN-7723: add cross-process agent state change notification bus
Adds opt-in cross-process change detection to AgentStore so the engine reacts to CLI-driven agent stop/start mutations promptly instead of waiting for the periodic audit sweep. - AgentStore gains fs.watch-based (with poll fallback) cross-process notification, modeled on TaskStore's existing mechanism - Re-emits existing agent:updated/agent:stateChanged events in the engine process when another process (the fn CLI) mutates an agent row - HeartbeatTriggerScheduler listeners now fire immediately instead of waiting up to 60s for the auditTimerRegistrations sweep; the sweep remains as durable backstop - in-process-runtime.ts wires up the new notification bus - Adds unit tests for agent-store cross-process notifications and heartbeat-scheduler reaction behavior - Updates docs/agents.md and docs/architecture.md - Adds changeset (patch) for @runfusion/fusion Files changed: .changeset/fn-7723-cross-process-agent-notify.md | 7 + docs/agents.md | 1 + docs/architecture.md | 1 + packages/core/src/__tests__/agent-store.test.ts | 177 +++++++++++++++++ packages/core/src/agent-store.ts | 210 ++++++++++++++++++++- .../src/__tests__/heartbeat-scheduler.test.ts | 162 ++++++++++++++++ packages/engine/src/runtimes/in-process-runtime.ts | 30 +++ 7 files changed, 587 insertions(+), 1 deletion(-) Fusion-Task-Id: FN-7723 Fusion-Task-Lineage: d3a7fa05-b40d-4388-8e98-140f9d8861c9 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
cda9532c3b |
FN-7718: fix zombie heartbeat timers surviving agent stop/start
Ensures stopping and restarting an agent durably clears its heartbeat timer instead of relying on the later FN-7645 watchdog repair. - HeartbeatTriggerScheduler.auditTimerRegistrations now unregisters lingering timers for non-eligible (stopped/paused/disabled) agents - syncTimerForAgent force-re-arms a stale present timer on a start transition so no orphaned timer entry lingers - Added 308 lines of new heartbeat-scheduler regression tests covering the stop/start zombie-timer scenarios - Added changeset (patch) documenting the fix - Updated docs/agents.md and docs/architecture.md to describe the new invariant Files changed: .changeset/fn-7718-zombie-timer-invalidate.md | 7 + docs/agents.md | 2 + docs/architecture.md | 1 + .../src/__tests__/heartbeat-scheduler.test.ts | 308 +++++++++++++++++++++ packages/engine/src/agent-heartbeat.ts | 49 +++- 5 files changed, 364 insertions(+), 3 deletions(-) Fusion-Task-Id: FN-7718 Fusion-Task-Lineage: fc834ccd-495e-4294-805d-325b4cb536a2 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |