Commit Graph

195 Commits

Author SHA1 Message Date
gsxdsm
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>
2026-07-15 15:25:39 -07:00
gsxdsm
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.
2026-07-15 08:58:33 -07:00
gsxdsm
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 -->
2026-07-14 08:23:11 -07:00
gsxdsm
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>
2026-07-13 07:51:07 -07:00
gsxdsm
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>
2026-07-12 21:39:23 -07:00
gsxdsm
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>
2026-07-12 17:39:29 -07:00
gsxdsm
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>
2026-07-12 17:02:33 -07:00
gsxdsm
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>
2026-07-12 11:34:48 -07:00
gsxdsm
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>
2026-07-12 10:04:29 -07:00
gsxdsm
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>
2026-07-11 22:31:30 -07:00
gsxdsm
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>
2026-07-10 23:42:10 -07:00
gsxdsm
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>
2026-07-10 23:42:10 -07:00
gsxdsm
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>
2026-07-10 23:42:10 -07:00
gsxdsm
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>
2026-07-10 08:18:47 -07:00
gsxdsm
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>
2026-07-09 19:58:07 -07:00
gsxdsm
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>
2026-07-09 19:58:04 -07:00
gsxdsm
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>
2026-07-09 19:58:04 -07:00
gsxdsm
8ee8f15dc6 FN-7675: add agent runtime self-awareness to system prompts
Agents were composing plans (e.g. reboot/wait-and-retry loops) that assumed they could keep acting even after the Fusion platform itself shut down, since prompts never told them they run inside Fusion. This adds a shared, docs-grounded self-awareness preamble prepended to chat, heartbeat, and executor base prompts so agents know their own runtime constraints.

- Added FUSION_RUNTIME_SELF_AWARENESS shared preamble in packages/core/src/agent-prompts.ts, exported via packages/core/src/index.ts
- Prepended the preamble to the chat system prompt (packages/dashboard/src/chat.ts)
- Prepended the preamble to the heartbeat session prompt (packages/engine/src/agent-heartbeat.ts)
- Prepended the preamble to the executor base prompt (packages/engine/src/executor.ts)
- Updated docs/agents.md and CONCEPTS.md to document the new self-awareness/capability-grounding behavior
- Added regression tests across core, dashboard, and engine covering the new prompt content
- Added changeset for @runfusion/fusion (minor, fix category)

Files changed:
 .changeset/fn-7675-agent-runtime-self-awareness.md |  7 ++++
 CONCEPTS.md                                        |  4 +-
 docs/agents.md                                     | 17 ++++++++
 packages/core/src/__tests__/agent-prompts.test.ts  | 41 ++++++++++++++++++++
 packages/core/src/agent-prompts.ts                 | 32 ++++++++++++++-
 packages/core/src/index.ts                         |  1 +
 packages/dashboard/src/__tests__/chat-system-prompt.test.ts | 17 ++++++++
 packages/dashboard/src/chat.ts                     |  6 ++-
 packages/engine/src/__tests__/executor-prompt.test.ts       | 45 ++++++++++++++++++++++
 packages/engine/src/__tests__/heartbeat-session-prompt.test.ts | 35 +++++++++++++++++
 packages/engine/src/agent-heartbeat.ts             | 10 +++--
 packages/engine/src/executor.ts                    |  7 +++-
 12 files changed, 213 insertions(+), 9 deletions(-)

Fusion-Task-Id: FN-7675

Fusion-Task-Lineage: 126d04a6-2c68-4347-9789-591b274277bf

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-08 08:16:30 -07:00
gsxdsm
aa534c19af FN-7672: recover durable agents stuck in error state despite active manager
Root-causes 4 correlated CTO-report agent failures where durable non-ephemeral agents got stuck in `error` state indefinitely because the heartbeat scheduler stops ticking error-state agents entirely, and self-healing's recovery sweep previously only considered them when their manager row was missing.

- SelfHealingManager: scope the `managerMissing` gate to the "running" orphan-detection path only, so "error"-state durable agents with a present/active manager now fall through to the existing transient/operator-actionable/active-execution/cooldown/retry-budget recovery guards instead of being skipped outright
- Add FNXC:AgentHeartbeat comment documenting the FN-7672 incident and rationale for the scoping change
- Extend self-healing.test.ts with coverage for manager-present durable agents in error state
- Add changeset (patch) describing the fix for release notes
- Update docs/agents.md accordingly

Files changed:
 .changeset/fn-7672-durable-agent-recovery.md       |   7 ++
 docs/agents.md                                     |   2 +
 packages/engine/src/__tests__/self-healing.test.ts | 129 ++++++++++++++++++++-
 packages/engine/src/self-healing.ts                |  24 +++-
 4 files changed, 160 insertions(+), 2 deletions(-)

Fusion-Task-Id: FN-7672

Fusion-Task-Lineage: 6676dc9e-66e7-4f70-804a-cccf77e8d337

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-08 05:38:01 -07:00
gsxdsm
9e5c025113 FN-7608: block executors on pending approvals instead of allowing workarounds
Executors could previously treat a pending approval as a normal turn end and go hunt for ungated workarounds instead of stopping. This change makes wait-for-approval a hard suspend point.

- wait-for-approval now suspends the in-flight executor session via awaitAbortInFlightTaskWork
- Dedupe identical pending approvals so repeated waits don't pile up
- Executor prompts now carve out awaiting-approval as a legitimate turn end (agent-prompts.ts)
- Extend provisioning-gate and agent-action-gate coverage for the new suspend/carveout behavior
- Add changeset (patch) documenting the fix for release notes
- Update docs/agents.md and docs/architecture.md to describe the new blocking behavior

Files changed:
 .changeset/fn-7608-awaiting-approval-blocking.md   |   7 ++
 docs/agents.md                                     |   1 +
 docs/architecture.md                               |   1 +
 packages/core/src/agent-prompts.ts                 |   5 +
 .../engine/src/__tests__/agent-action-gate.test.ts |  82 +++++++++++++
 .../executor-approval-gate-suspend.test.ts         | 128 +++++++++++++++++++++
 .../executor-approval-prompt-carveout.test.ts      |  61 ++++++++++
 packages/engine/src/agent-heartbeat.ts             |  13 +++
 packages/engine/src/executor.ts                    |  28 +++++
 packages/engine/src/pi.ts                          |  22 +++-
 .../sandbox/__tests__/provisioning-gate.test.ts    |  29 +++++
 packages/engine/src/sandbox/provisioning-gate.ts   |  11 ++
 12 files changed, 384 insertions(+), 4 deletions(-)

Fusion-Task-Id: FN-7608

Fusion-Task-Lineage: 9e42d8ee-bda7-4ef1-b159-46c2100bbc48

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-06 19:03:07 -07:00
gsxdsm
91fb53f3c7 FN-7440: add agent update tool
Add a Fusion extension tool for updating existing agent configuration in place.

- Register fn_agent_update with editable agent fields, validation, and non-ephemeral guards.
- Enforce org-scoped authorization for agent callers and privileged manager-clearing semantics for operators.
- Cover update success, hierarchy denial, cycle prevention, and runtime/instruction edits in extension tests.
- Document the new tool in agent and Fusion skill references and add a published package changeset.

Files changed:
 .changeset/fn-7440-agent-update-tool.md            |   7 +
 docs/agents.md                                     |  21 +-
 package.json                                       |   1 +
 packages/cli/skill/fusion/SKILL.md                 |   2 +-
 .../cli/skill/fusion/references/extension-tools.md |  21 ++
 .../skill/fusion/references/fusion-capabilities.md |   1 +
 .../src/__tests__/extension-agent-update.test.ts   | 351 +++++++++++++++++++++
 packages/cli/src/extension.ts                      | 230 ++++++++++++++
 pnpm-lock.yaml                                     |   1 +
 9 files changed, 628 insertions(+), 7 deletions(-)

Fusion-Task-Id: FN-7440

Fusion-Task-Lineage: a6f4c928-5a63-4cf1-aa0b-4e38b536e965

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-02 13:16:07 -07:00
gsxdsm
85809103cd FN-7413: configure agent permissions across lifetimes
Enable explicit capability grants and runtime permission policies for both durable and ephemeral agents.

- Persist normalized agent capability grants and leave missing permission policies to inherit project defaults at runtime.
- Apply action and tool approval gates to permanent agents, ephemeral agents, and fallback task workers.
- Add Agent Detail controls, translations, docs, tests, and a changeset for cross-lifetime agent permissions.

Files changed:
 .changeset/fn-7413-agent-permissions.md            |  7 ++
 docs/agents.md                                     | 12 ++--
 docs/settings-reference.md                         | 11 ++-
 packages/core/src/__tests__/agent-store.test.ts    | 65 +++++++++++++----
 packages/core/src/agent-store.ts                   | 31 ++++++---
 packages/core/src/types.ts                         | 10 +--
 .../dashboard/app/components/AgentDetailView.css   | 48 +++++++++++++
 .../dashboard/app/components/AgentDetailView.tsx   | 81 +++++++++++++++++++++-
 .../settings/sections/AgentPermissionsSection.tsx  |  2 +-
 .../dashboard/src/__tests__/routes-agents.test.ts  |  8 +--
 .../src/routes/register-agent-core-routes.ts       | 32 ++++++---
 .../src/__tests__/heartbeat-executor.test.ts       | 14 +++-
 packages/engine/src/agent-heartbeat.ts             | 17 ++---
 packages/engine/src/executor.ts                    | 57 +++++++--------
 packages/i18n/locales/en/app.json                  | 12 +++-
 packages/i18n/locales/es/app.json                  | 12 +++-
 packages/i18n/locales/fr/app.json                  | 12 +++-
 packages/i18n/locales/ko/app.json                  | 12 +++-
 packages/i18n/locales/zh-CN/app.json               | 12 +++-
 packages/i18n/locales/zh-TW/app.json               | 12 +++-
 20 files changed, 363 insertions(+), 104 deletions(-)

Fusion-Task-Id: FN-7413
Fusion-Task-Lineage: bc004572-bde8-4d33-bb27-e941a5bc8884
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-02 11:38:31 -07:00
gsxdsm
12ee9a92d2 FN-7361: add exact tool permission overrides
Add exact tool-name permission overrides for permanent agent tool usage.

- Add persisted toolRules policy support with normalization, project-default inheritance, and escalation comparison.
- Enforce exact tool dispositions before category rules in engine gating and permanent-agent decisions.
- Extend the permission editor, agent/settings routes, translations, docs, and tests for fine-grained tool controls.

Files changed:
 .changeset/fn-7361-tool-permissions.md             |   7 +
 docs/agents.md                                     |  18 ++-
 docs/settings-reference.md                         |  12 +-
 .../agent-permission-policy-resolution.test.ts     |  58 +++++++-
 .../src/__tests__/agent-permission-policy.test.ts  |  17 +++
 ...settings-schema-agent-permission-policy.test.ts |   6 +-
 packages/core/src/agent-permission-policy.ts       |  87 ++++++++++--
 packages/core/src/index.ts                         |   2 +-
 packages/core/src/types.ts                         |  19 ++-
 .../dashboard/app/components/AgentDetailView.tsx   |  17 +--
 .../app/components/AgentPermissionPolicyEditor.css |  59 +++++++-
 .../app/components/AgentPermissionPolicyEditor.tsx | 156 ++++++++++++++++++++-
 .../__tests__/AgentPermissionPolicyEditor.test.tsx |  92 +++++++++++-
 .../settings/sections/AgentPermissionsSection.tsx  |   6 +-
 .../dashboard/src/__tests__/routes-agents.test.ts  |  79 +++++++++++
 .../src/__tests__/routes-settings.test.ts          |  21 +++
 .../src/routes/register-agent-core-routes.ts       |  37 +++--
 .../agent-action-gate-project-default.test.ts      |  34 +++++
 .../engine/src/__tests__/agent-action-gate.test.ts |  43 ++++++
 .../src/__tests__/gating-classifications.test.ts   |  55 ++++++++
 packages/engine/src/agent-action-gate.ts           |  17 ++-
 packages/engine/src/permanent-agent-gating.ts      |  11 +-
 packages/i18n/locales/en/app.json                  |  15 +-
 packages/i18n/locales/es/app.json                  |  15 +-
 packages/i18n/locales/fr/app.json                  |  15 +-
 packages/i18n/locales/ko/app.json                  |  15 +-
 packages/i18n/locales/zh-CN/app.json               |  15 +-
 packages/i18n/locales/zh-TW/app.json               |  15 +-
 28 files changed, 878 insertions(+), 65 deletions(-)

Fusion-Task-Id: FN-7361

Fusion-Task-Lineage: 006e4311-91a5-4792-9a54-feaba892129a

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-01 09:45:30 -07:00
gsxdsm
67f93cedd9 FN-7370: show thinking effort in model log markers
Display configured thinking effort alongside runtime task-log model markers.

- Add a shared formatter for model marker annotations and use it for triage, executor, reviewer, and workflow-step logs.
- Teach dashboard model parsing to ignore parenthesized marker diagnostics while preserving provider/model resolution.
- Cover thinking-effort markers with engine and dashboard tests, docs, and a patch changeset.

Files changed:
 .changeset/fn-7370-thinking-effort-model-logs.md   |  7 +++
 docs/agents.md                                     |  2 +
 packages/dashboard/app/components/TaskChatTab.tsx  |  7 +--
 .../app/components/__tests__/TaskChatTab.test.tsx  |  6 +--
 ...skDetailModal.models-progress-workflow.test.tsx |  6 +--
 .../__tests__/WorkflowResultsTab.test.tsx          |  6 +--
 .../__tests__/effective-model-resolution.test.ts   | 17 ++++--
 .../app/components/effective-model-resolution.ts   | 23 +++++---
 .../src/__tests__/executor-model-marker.test.ts    | 62 ++++++++++++++++++++++
 .../engine/src/__tests__/executor-test-helpers.ts  |  4 ++
 .../__tests__/executor-workflow-step-model.test.ts | 23 +++++++-
 packages/engine/src/__tests__/pi.test.ts           | 12 ++++-
 packages/engine/src/__tests__/reviewer.test.ts     | 37 +++++++++++++
 packages/engine/src/__tests__/triage.test.ts       | 20 ++++++-
 packages/engine/src/executor.ts                    | 17 ++++--
 packages/engine/src/pi.ts                          | 19 +++++++
 packages/engine/src/reviewer.ts                    |  7 +--
 packages/engine/src/triage.ts                      |  4 +-
 18 files changed, 244 insertions(+), 35 deletions(-)

Fusion-Task-Id: FN-7370

Fusion-Task-Lineage: 2c94a20c-77e1-41db-8af0-76239b30e3c4

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-01 09:30:00 -07:00
gsxdsm
bba415f91b FN-7308: preserve legacy Activity log access
Preserve the legacy task log affordances inside the Activity tab.

- Route legacy Logs entrypoints to Activity → Feed while keeping Raw Logs as the raw agent-output segment.
- Document the Activity Current, Feed, and Raw Logs behavior across operator docs.
- Add regression coverage for Feed legacy entries, duplicate feed rows, and Raw Logs pagination.
- Add a patch changeset for the published CLI package.

Files changed:
 .changeset/fn-7308-preserve-activity-logs.md       |  7 ++++
 docs/agents.md                                     |  4 +-
 docs/dashboard-guide.md                            |  8 ++--
 packages/dashboard/README.md                       |  2 +-
 .../dashboard/app/components/TaskDetailModal.tsx   |  8 ++--
 .../TaskDetailModal.attachments-and-tabs.test.tsx  | 29 ++++++++++++++
 .../components/__tests__/TaskDetailModal.test.tsx  | 45 ++++++++++++++++++++++
 7 files changed, 92 insertions(+), 11 deletions(-)

Fusion-Task-Id: FN-7308

Fusion-Task-Lineage: 45483e4e-4de8-4b5b-96ae-fca6914545d4

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-30 15:58:30 -07:00
gsxdsm
f01e5c9651 FN-7247: document current workflow behavior
Refresh workflow documentation to match the latest runtime, dashboard, and agent tool behavior.

- Add a current workflow behavior inventory covering built-ins, fail-closed runtime semantics, optional gates, settings, tools, routing, and create forwarding.
- Clarify dashboard All workflows aggregation, workflow badges, and workflow-aware task creation behavior.
- Expand editor, agent, CLI, and settings docs for governed workflow authoring, values, trait inspection, and selection boundaries.
- Add docs drift tests requiring workflow docs index coverage and current behavior markers.

Files changed:
 docs/agents.md                                     |  5 +-
 docs/cli-reference.md                              | 11 ++-
 docs/dashboard-guide.md                            | 10 ++-
 docs/settings-reference.md                         |  5 ++
 docs/workflow-editor.md                            | 15 +++-
 docs/workflow-steps.md                             | 48 ++++++++---
 .../cli/src/__tests__/docs-readme-index.test.ts    |  4 +
 .../src/__tests__/workflow-docs-current.test.ts    | 95 ++++++++++++++++++++++
 8 files changed, 172 insertions(+), 21 deletions(-)

Fusion-Task-Id: FN-7247
Fusion-Task-Lineage: 72bf0c89-80a3-440c-b6aa-1aea315279f5
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-29 19:46:23 -07:00
gsxdsm
42226edde1 FN-7245: expose workflow authoring tools to agents
Expose workflow authoring and selection tools through agent-visible extension surfaces.

- Register workflow list/get/create/update/delete/settings/select and trait-list tools in the published pi extension.
- Export shared workflow tool schemas/factories and include workflow settings in centralized authoring tool sets.
- Update action-gate classifications, permission examples, docs, tests, and the changeset for the new agent workflow surface.

Files changed:
 .changeset/FN-7245-workflow-tools.md               |   7 +
 docs/agents.md                                     |   4 +-
 docs/cli-reference.md                              |  17 ++
 docs/workflow-steps.md                             |   9 +-
 .../src/__tests__/extension-workflow-tools.test.ts | 244 +++++++++++++++++++++
 packages/cli/src/__tests__/extension.test.ts       |   8 +
 packages/cli/src/extension.ts                      | 142 ++++++++++++
 packages/core/src/types.ts                         |   6 +-
 .../dashboard/src/__tests__/chat-manager.test.ts   |   9 +-
 .../planning-document-tools-exposure.test.ts       |  19 +-
 .../engine/src/__tests__/agent-action-gate.test.ts |   8 +
 .../agent-workflow-tools-exposure.test.ts          |  30 ++-
 .../src/__tests__/gating-classifications.test.ts   |  13 +-
 .../src/__tests__/permanent-agent-gating.test.ts   |   4 +-
 packages/engine/src/agent-tools.ts                 |  13 +-
 packages/engine/src/gating-classifications.ts      |   6 +-
 packages/engine/src/index.ts                       |   7 +
 17 files changed, 506 insertions(+), 40 deletions(-)

Fusion-Task-Id: FN-7245

Fusion-Task-Lineage: 82501602-7177-4ee8-a67b-32de35aa73de

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-29 16:35:51 -07:00
gsxdsm
7a2137c250 FN-7191: allow direct agent questions
Permanent agents can ask structured user questions without approval gating.

- Classify fn_ask_question as a read-only coordination tool for permanent-agent decisions.
- Exempt fn_ask_question from the action gate under locked-down policies.
- Document the user-question exemption and add release notes plus gate coverage.

Files changed:
 .changeset/FN-7191-ask-question-no-gate.md         |  7 +++
 docs/agents.md                                     |  2 +-
 .../engine/src/__tests__/agent-action-gate.test.ts | 14 ++++++
 .../src/__tests__/gating-classifications.test.ts   |  6 +++
 .../src/__tests__/permanent-agent-gating.test.ts   | 50 ++++++++++++++++++++++
 packages/engine/src/gating-classifications.ts      | 10 +++++
 6 files changed, 88 insertions(+), 1 deletion(-)

Fusion-Task-Id: FN-7191

Fusion-Task-Lineage: 349084a8-9098-49f7-ab82-c5a775c0a24c

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-28 07:53:44 -07:00
gsxdsm
6f46fa17dd FN-7138: show task column context in agent assignments
Agent Current Task output now includes linked task column context to distinguish active execution from parked or stale links.

- Add shared Current Task formatting for active, terminal, and unresolved task links.
- Show linked task columns in engine and CLI agent list/show surfaces.
- Cover parked, active, terminal, and missing task-link display cases with tests.
- Document the durable agent task-link invariant and release the CLI fix.

Files changed:
 .changeset/fn-7138-agent-current-task-context.md   |  7 ++++
 docs/agents.md                                     |  1 +
 docs/architecture.md                               |  2 +-
 packages/cli/src/__tests__/extension.test.ts       | 44 ++++++++++++++++++++++
 packages/cli/src/extension.ts                      | 35 +++++++++++++++--
 packages/core/src/agent-store.ts                   | 30 +++++++++++++++
 packages/core/src/index.ts                         |  2 +-
 .../src/__tests__/agent-tools-delegation.test.ts   | 44 +++++++++++++++++++++-
 packages/engine/src/agent-tools.ts                 | 15 ++++++--
 9 files changed, 169 insertions(+), 11 deletions(-)

Fusion-Task-Id: FN-7138
Fusion-Task-Lineage: 0ea97b4c-d4f8-4289-a5b6-e5c51b47b768
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-27 16:16:25 -07:00
gsxdsm
c3c4216f76 FN-7132: classify task creation as a gated mutation
Classify fn_task_create as a task-agent mutation so permanent-agent policies can require approval or block task creation.

- Move fn_task_create out of the permanent-agent read-only tool set and into the shared task mutation classification.
- Add parity tests covering permanent-agent and action-gate decisions for fn_task_create.
- Preserve delegate and GitHub import tools as permanent-agent read-only coordination tools while documenting the distinction.
- Add a patch changeset for the published Fusion package.

Files changed:
 .../fn-7132-task-create-mutation-classification.md |  7 +++
 docs/agents.md                                     |  6 +--
 .../src/__tests__/gating-classifications.test.ts   | 58 +++++++++++++++++++++-
 .../src/__tests__/permanent-agent-gating.test.ts   |  3 +-
 packages/engine/src/gating-classifications.ts      | 10 ++--
 5 files changed, 75 insertions(+), 9 deletions(-)

Fusion-Task-Id: FN-7132

Fusion-Task-Lineage: 6e32ed9d-f0fa-46f2-a749-c5dbe863fb1f

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-27 12:44:50 -07:00
gsxdsm
45e27f8875 FN-7126: govern task creation with action gate
Task creation and delegation now honor task-agent mutation policies in action-gate evaluation.

- Classify task creation, delegation, and import tools as task_agent_mutation for action-gate policy decisions.
- Preserve permanent-agent recognition for coordination paths while documenting the split semantics.
- Update permission policy examples, regression tests, and release note metadata.

Files changed:
 .changeset/fn-7126-task-create-action-gate.md      |  7 +++++++
 docs/agents.md                                     |  2 +-
 packages/core/src/types.ts                         |  2 +-
 .../engine/src/__tests__/agent-action-gate.test.ts | 24 ++++++++++++++++++----
 .../src/__tests__/gating-classifications.test.ts   | 16 +++++++++++++--
 packages/engine/src/gating-classifications.ts      | 10 ++++++---
 6 files changed, 50 insertions(+), 11 deletions(-)

Fusion-Task-Id: FN-7126

Fusion-Task-Lineage: 0e5d2aea-6670-4f9c-9ee8-5a135774c784

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-27 11:54:06 -07:00
gsxdsm
c15d1294eb FN-7115: expose governed heartbeat workflow tools
Expose the missing governed workflow and promotion tools to heartbeat agent sessions.\n\n- Add workflow authoring/settings, research cancellation, and task promotion/select tools to the shared heartbeat work surface.\n- Keep task-read discovery and executor-only worktree tools correctly scoped while documenting the heartbeat lane surface.\n- Cover tool injection, permission-gate behavior, and workflow factory exposure with regression tests.\n\nFiles changed:\n .changeset/FN-7115-heartbeat-tool-injection.md     |  7 ++\n docs/agents.md                                     |  6 +-\n .../engine/src/__tests__/agent-action-gate.test.ts | 86 +++++++++++++++++++++-\n .../agent-workflow-tools-exposure.test.ts          | 16 ++--\n .../src/__tests__/heartbeat-executor.test.ts       | 31 +++++---\n .../src/__tests__/heartbeat-session-prompt.test.ts | 69 ++++++++++++++++-\n packages/engine/src/agent-heartbeat.ts             | 22 ++++--\n 7 files changed, 207 insertions(+), 30 deletions(-)

Fusion-Task-Id: FN-7115

Fusion-Task-Lineage: 0883767b-7982-4f10-a466-1467b867dea1

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-27 11:17:03 -07:00
gsxdsm
8f0f020caa FN-7118: add shared task read tool factories
Add reusable heartbeat-safe task read tools for agents.\n\n- Add shared fn_task_list, fn_task_show, and fn_task_search factories with text-safe formatting.\n- Wire the task read tools into permanent/custom heartbeat work tooling and prompts.\n- Classify task read surfaces as read-only coordination exemptions and export the factories.\n- Cover cross-surface task read behavior with engine tests and document the agent surface.\n\nFiles changed:\n .changeset/FN-7118-shared-task-read-tools.md       |   7 +\n docs/agents.md                                     |   2 +-\n .../src/__tests__/agent-task-read-tools.test.ts    | 160 ++++++++++++++++++++\n .../src/__tests__/gating-classifications.test.ts   |  15 ++\n .../src/__tests__/heartbeat-executor.test.ts       |  31 ++--\n .../src/__tests__/heartbeat-session-prompt.test.ts |   8 +-\n packages/engine/src/agent-heartbeat.ts             |  16 +-\n packages/engine/src/agent-tools.ts                 | 161 ++++++++++++++++++++-\n packages/engine/src/gating-classifications.ts      |  11 ++\n packages/engine/src/index.ts                       |   7 +\n 10 files changed, 396 insertions(+), 22 deletions(-)

Fusion-Task-Id: FN-7118

Fusion-Task-Lineage: 89a5b3a2-9295-435f-8bb9-f66f8ec73cc1

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-27 11:08:09 -07:00
gsxdsm
2b9e383e18 FN-7111: classify heartbeat tool parity gaps
Classify remaining heartbeat-agent tool gaps so permission gates enforce mutating and network behaviors consistently.

- Add shared classifications for workflow mutators, task update/promote/refine, verification/worktree acquisition, and research cancellation.
- Apply command-execution classifications in both action-gate and permanent-agent gating paths.
- Update operator docs, permission-policy examples, parity tests, and the published package changeset.

Files changed:
 .changeset/FN-7111-tool-classification-parity.md   |  7 ++
 docs/agents.md                                     |  8 +-
 packages/core/src/types.ts                         | 12 ++-
 .../engine/src/__tests__/agent-action-gate.test.ts | 11 ++-
 .../src/__tests__/gating-classifications.test.ts   | 93 +++++++++++++++++++++-
 .../src/__tests__/permanent-agent-gating.test.ts   | 44 ++++++++++
 packages/engine/src/agent-action-gate.ts           |  6 ++
 packages/engine/src/gating-classifications.ts      | 36 ++++++++-
 packages/engine/src/permanent-agent-gating.ts      |  5 ++
 9 files changed, 206 insertions(+), 16 deletions(-)

Fusion-Task-Id: FN-7111
Fusion-Task-Lineage: d2f5ee71-c742-4f10-af55-fec380f08f64
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-27 09:28:31 -07:00
gsxdsm
1a30ddd6e8 FN-7108: broaden heartbeat agent tool access
Heartbeat agents now receive safe coordination and discovery tools while risky calls remain permission-gated.

- Add shared heartbeat workflow, research, and clarification tools for task-scoped and no-task runs.
- Give no-task permanent agents artifact registry access alongside existing delegation, messaging, memory, goal, and identity tools.
- Cover the expanded tool surface and action-gate behavior with heartbeat and permission-policy tests.
- Document the permission-governed heartbeat tool model and add a minor changeset.

Files changed:
 .changeset/FN-7108-agent-tool-access.md            |  7 ++
 docs/agents.md                                     |  9 ++-
 .../src/__tests__/heartbeat-executor.test.ts       | 24 +++---
 .../src/__tests__/heartbeat-session-prompt.test.ts | 89 +++++++++++++++++++++-
 .../src/__tests__/pi-create-fn-agent.test.ts       | 67 ++++++++++++++++
 packages/engine/src/agent-heartbeat.ts             | 41 +++++++++-
 6 files changed, 221 insertions(+), 16 deletions(-)

Fusion-Task-Id: FN-7108

Fusion-Task-Lineage: 83302055-72be-47f8-a41d-70164d12f010

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-27 09:28:31 -07:00
gsxdsm
c17d745665 FN-7109: notify operators when CLI agents await input
Notify external providers when terminal-backed CLI agents pause for tool permission or user input.

- Add a dedicated cli-agent-awaiting-input notification event to settings, schema defaults, dashboard options, and provider tests.
- Dispatch CLI-agent waiting-on-input notifications from the in-process runtime with task context and prompt-scoped dedupe keys.
- Document the operator behavior and add a published package changeset for the new notification surface.

Files changed:
 .changeset/fn-7109-cli-agent-notification.md       |   7 ++
 docs/agents.md                                     |   4 +
 docs/settings-reference.md                         |   4 +-
 .../cli-agent-permission-notifications.md          |  13 +++
 .../core/src/__tests__/global-settings.test.ts     |   1 +
 packages/core/src/settings-schema.ts               |   1 +
 packages/core/src/types.ts                         |   6 ++
 .../SettingsModal.remote-notifications.test.tsx    |   1 +
 .../components/__tests__/settings-mobile.test.tsx  |   2 +-
 .../settings/sections/NotificationsSection.tsx     |   3 +
 .../src/__tests__/in-process-runtime.test.ts       |  56 ++++++++++-
 packages/engine/src/__tests__/notifier.test.ts     |   6 +-
 .../engine/src/__tests__/ntfy-provider.test.ts     |   4 +
 .../engine/src/__tests__/webhook-provider.test.ts  |   2 +
 .../engine/src/cli-agent/__tests__/runtime.test.ts |  39 +++++++-
 .../__tests__/notification-service.test.ts         |  56 ++++++++++-
 .../src/notification/notification-service.ts       |   9 +-
 packages/engine/src/notification/ntfy-provider.ts  |   7 ++
 .../engine/src/notification/webhook-provider.ts    |   2 +
 packages/engine/src/notifier.ts                    |   1 +
 packages/engine/src/runtimes/in-process-runtime.ts | 111 +++++++++++++++++++++
 21 files changed, 326 insertions(+), 9 deletions(-)

Fusion-Task-Id: FN-7109

Fusion-Task-Lineage: 636c1875-92a2-46a7-847e-1f4955c0822f

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-27 09:28:31 -07:00
gsxdsm
59fc94bc0f FN-7054: fix slash skill request matching
Normalize requested skill identifiers so slash/catalog forms load the discovered bare skill across chat and agent sessions.

- Add requested-name matching keys for slash paths, SKILL.md paths, and source-qualified skill identifiers.
- Preserve execution-skill disable/exclude behavior and not-found diagnostics while applying the new matching only to requested names.
- Cover chat/agent requested skill paths with resolver and full flow tests and document supported /skill forms.

Files changed:
 .changeset/fn-7054-skill-slash-names.md            |   7 ++
 docs/agents.md                                     |   2 +-
 docs/dashboard-guide.md                            |   2 +-
 .../engine/src/__tests__/agent-skills-flow.test.ts |  42 +++++++++
 .../engine/src/__tests__/skill-resolver.test.ts    | 101 +++++++++++++++++++++
 packages/engine/src/skill-resolver.ts              |  23 ++++-
 6 files changed, 170 insertions(+), 7 deletions(-)

Fusion-Task-Id: FN-7054
Fusion-Task-Lineage: 8d0f5c7d-9d8b-4b16-b24e-db6d2f6a464b
2026-06-26 01:38:57 -07:00
gsxdsm
6c94ee069c FN-7023: forward MCP runtime config to AI lanes
Forward enabled MCP server configuration through AI session creation and validation paths.

- Resolve and materialize effective MCP servers with secret values at runtime for triage, execution, review, merge, evaluation, reflection, mission validation, and dashboard chat/planning lanes.
- Add runtime support guards, Claude CLI MCP config generation, and a dashboard validation route for MCP server reachability probes.
- Cover MCP forwarding, provider support behavior, settings resolution, validation, and pi extension config generation with targeted tests and docs.

Files changed:
 .changeset/fn-7023-mcp-runtime-forwarding.md       |   7 +
 docs/agents.md                                     |   2 +
 docs/secrets.md                                    |   1 +
 docs/settings-reference.md                         |   6 +-
 .../src/__tests__/mcp-lane-forwarding.test.ts      |  79 +++++++++++
 .../src/__tests__/mcp-validate-route.test.ts       | 111 ++++++++++++++++
 packages/dashboard/src/chat.ts                     |   3 +
 packages/dashboard/src/planning.ts                 |   5 +
 packages/dashboard/src/routes.ts                   |  90 ++++++++++++-
 .../src/__tests__/mcp-lane-forwarding.test.ts      |  95 ++++++++++++++
 .../engine/src/__tests__/mcp-resolution.test.ts    | 104 +++++++++++++++
 .../src/__tests__/mcp-runtime-support.test.ts      |  44 +++++++
 .../src/__tests__/mcp-validation-service.test.ts   |  69 ++++++++++
 packages/engine/src/__tests__/pi.test.ts           |  65 +++++++++
 packages/engine/src/agent-reflection.ts            |   3 +
 packages/engine/src/agent-runtime.ts               |  36 ++++-
 packages/engine/src/agent-session-helpers.ts       |   2 +
 packages/engine/src/evaluator.ts                   |   3 +
 packages/engine/src/executor.ts                    |  14 ++
 packages/engine/src/index.ts                       |   3 +
 packages/engine/src/mcp-resolution.ts              |  81 ++++++++++++
 packages/engine/src/mcp-runtime-support.ts         |  41 ++++++
 packages/engine/src/mcp-validation-service.ts      | 146 +++++++++++++++++++++
 packages/engine/src/merger-ai.ts                   |   5 +
 packages/engine/src/merger.ts                      |  14 ++
 packages/engine/src/mission-execution-loop.ts      |   3 +
 packages/engine/src/pi.ts                          |  44 +++++--
 packages/engine/src/reviewer.ts                    |   3 +
 packages/engine/src/runtime-resolution.ts          |   8 +-
 packages/engine/src/step-session-executor.ts       |   6 +-
 packages/engine/src/triage.ts                      |   5 +
 packages/pi-claude-cli/index.ts                    |  20 ++-
 packages/pi-claude-cli/src/mcp-config.ts           |  65 ++++++++-
 33 files changed, 1150 insertions(+), 33 deletions(-)

Fusion-Task-Id: FN-7023
Fusion-Task-Lineage: ea09c6c7-b3c3-4af6-9ca6-0ebbfec17139
2026-06-26 00:57:32 -07:00
gsxdsm
e59d3d60e7 FN-6820: document artifact registry workflows
Document the user-facing artifact registry workflow from agent tools through dashboard discovery and storage behavior.

- Describe agent artifact registration, listing, viewing, and mailbox notification semantics.
- Expand the Artifacts dashboard workflow with gallery counts, previews, task links, and loading/error/empty states.
- Clarify artifact registry storage, hydration scope, retention, and concept terminology.

Files changed:
 CONCEPTS.md             |  2 +-
 docs/agents.md          | 17 ++++++++++++++---
 docs/dashboard-guide.md | 16 ++++++++++++----
 docs/storage.md         | 15 +++++++++++----
 4 files changed, 38 insertions(+), 12 deletions(-)

Fusion-Task-Id: FN-6820

Fusion-Task-Lineage: 1d3be0f3-fb4a-4d7e-9470-2110435e83a4
2026-06-22 19:18:49 -07:00
gsxdsm
c229a15e20 FN-6934: restrict agent workflow reassignment
Clarify agent workflow-routing prompts so agents do not reassign tasks they did not create unless directed.

- Add executor guardrails against changing the current task workflow without explicit user instruction.
- Update triage workflow-routing guidance to distinguish existing tasks from agent-created tasks.
- Cover workflow ownership policy in prompt and engine tests, docs, and a patch changeset.

Files changed:
 .changeset/fn-6934-workflow-movement-policy.md     |  5 +++++
 docs/agents.md                                     |  6 ++++++
 docs/custom-workflow-reliability-acceptance-map.md |  7 +++++--
 docs/settings-reference.md                         |  9 +++++++--
 docs/workflow-steps.md                             |  9 +++++++--
 packages/core/src/__tests__/agent-prompts.test.ts  | 15 ++++++++++++++
 packages/core/src/agent-prompts.ts                 | 23 ++++++++++++++++------
 .../src/__tests__/executor-review-verdicts.test.ts |  3 +++
 .../__tests__/triage-threshold-settings.test.ts    |  3 +++
 packages/engine/src/__tests__/triage.test.ts       |  2 +-
 packages/engine/src/executor.ts                    |  5 +++++
 11 files changed, 74 insertions(+), 13 deletions(-)

Fusion-Task-Id: FN-6934

Fusion-Task-Lineage: cc583806-b160-4a08-b1a7-e798a575dbd5
2026-06-22 17:58:27 -07:00
gsxdsm
2bfac78b47 fix(onboarding): simplify agent setup copy 2026-06-22 05:37:58 -07:00
gsxdsm
130fea2973 feat(onboarding): ask for optional first agent in setup 2026-06-22 03:48:08 -07:00
gsxdsm
af06170a51 FN-6778: add agent artifact registry tools
Adds engine and chat tools for registering, discovering, and viewing artifacts with inbox notifications.

- Add fn_artifact_register, fn_artifact_list, and fn_artifact_view tools for heartbeat, executor, and chat sessions.
- Send best-effort dashboard system inbox notifications when artifacts are registered.
- Classify artifact tools for action gating and coordination exemptions, with coverage for executor, heartbeat, permanent agent, and chat flows.
- Document the artifact registry behavior and update package metadata, quarantine ledger, and line-count baseline.

Files changed:
 .changeset/fn-6778-artifact-agent-tools.md         |   5 +
 CONCEPTS.md                                        |   3 +
 docs/agents.md                                     |   1 +
 packages/core/src/db.ts                            |   1 +
 .../src/__tests__/session-error-recovery.test.ts   |   1 +
 .../session-persistence-roundtrip.test.ts          |   1 +
 .../src/__tests__/session-reconnect.test.ts        |   1 +
 .../src/__tests__/session-resume-history.test.ts   |   1 +
 packages/dashboard/src/chat.ts                     |   6 +-
 packages/dashboard/src/planning.ts                 |   4 +
 packages/dashboard/src/test/mockCoreEngine.ts      |   1 +
 .../engine/src/__tests__/agent-action-gate.test.ts |   3 +
 .../src/__tests__/agent-artifact-tools.test.ts     | 458 +++++++++++++++++++++
 .../src/__tests__/executor-step-session.test.ts    |  48 +++
 .../src/__tests__/gating-classifications.test.ts   |   3 +
 .../src/__tests__/heartbeat-executor.test.ts       |  40 +-
 .../src/__tests__/heartbeat-session-prompt.test.ts |  25 +-
 .../src/__tests__/permanent-agent-gating.test.ts   |   6 +
 packages/engine/src/agent-heartbeat.ts             |   6 +-
 packages/engine/src/agent-tools.ts                 | 288 ++++++++++++-
 packages/engine/src/executor.ts                    |  25 ++
 packages/engine/src/gating-classifications.ts      |   7 +
 packages/engine/src/index.ts                       |   9 +
 scripts/lib/test-quarantine.json                   |   8 +-
 scripts/line-count-baseline.json                   |  54 +--
 25 files changed, 945 insertions(+), 60 deletions(-)

Fusion-Task-Id: FN-6778
Fusion-Task-Lineage: 7eb4afcb-8140-4f86-9540-eb3b83e64148
2026-06-22 03:34:14 -07:00
gsxdsm
09acfbb707 FN-6875: allow manual unpause for assigned tasks
Allow users to recover paused agent-assigned tasks without switching to agent controls.

- Remove the API conflict that blocked manual pause and unpause on assigned tasks.
- Keep pause and unpause actions visible for assigned, paused, and agent-paused tasks in the detail menu.
- Cover assigned-task pause controls and route unpause behavior with regression tests.
- Document manual unpause support and add a patch changeset.

Files changed:
 .changeset/fn-6875-allow-unpause-assigned.md       |   5 +
 docs/agents.md                                     |   2 +-
 docs/dashboard-guide.md                            |   1 +
 .../dashboard/app/components/TaskDetailModal.tsx   |  17 +++-
 .../TaskDetailModal.definition-actions.test.tsx    |  97 +++++++++++++++++--
 .../register-task-workflow-routes.unpause.test.ts  | 103 ++++++++++++++-------
 .../src/routes/register-task-workflow-routes.ts    |  14 ++-
 7 files changed, 187 insertions(+), 52 deletions(-)

Fusion-Task-Id: FN-6875

Fusion-Task-Lineage: 9233822c-2013-475d-b17a-2212a38ab388
2026-06-21 16:34:41 -07:00
gsxdsm
70cce18c31 FN-6712: add managed agent instructions tool
Add a scoped extension tool for managers to update report instructions through AgentStore.

- Register fn_agent_set_instructions with validation, hierarchy authorization, and config-revision persistence.
- Cover direct, indirect, privileged, denied, missing-target, and field-clearing behaviors with CLI extension tests.
- Document the new agent-management tool in agent docs, Fusion skill references, and a published package changeset.

Files changed:
 .changeset/fn-6712-agent-set-instructions-tool.md  |   5 +
 docs/agents.md                                     |  12 ++
 packages/cli/skill/fusion/SKILL.md                 |   2 +-
 .../cli/skill/fusion/references/extension-tools.md |  10 +
 .../skill/fusion/references/fusion-capabilities.md |   1 +
 .../extension-agent-set-instructions.test.ts       | 235 +++++++++++++++++++++
 packages/cli/src/extension.ts                      |  94 +++++++++
 7 files changed, 358 insertions(+), 1 deletion(-)

Fusion-Task-Id: FN-6712
Fusion-Task-Lineage: 1fac1ff0-283d-4911-8fbf-f15c5de6b902
2026-06-19 07:41:44 -07:00
gsxdsm
0ed46d9007 FN-6640: expose planning task document tools
Expose planning-lane task document tools with chat-style explicit task targeting.

- Add task document read/write tools to both planning agent creation paths.
- Cover non-streaming and streaming planning tool assembly plus explicit task_id document behavior.
- Update agent docs and generated skill tool references for chat/planning parity.
- Add a patch changeset for the published CLI package.

Files changed:
 .changeset/fn-6640-planning-document-tools.md      |   5 +
 docs/agents.md                                     |   2 +-
 .../cli/skill/fusion/references/engine-tools.md    |   4 +-
 .../planning-document-tools-exposure.test.ts       | 139 +++++++++++++++++++++
 packages/dashboard/src/planning.ts                 |   7 ++
 5 files changed, 154 insertions(+), 3 deletions(-)

Fusion-Task-Id: FN-6640

Fusion-Task-Lineage: 6a9225cf-fbe7-4a87-8927-e01355a38e92
2026-06-18 07:23:02 -07:00
gsxdsm
b1a2aeebf2 FN-6635: expose task document tools to chat agents
Expose task document read/write tools to dashboard chat agents with explicit task targeting.

- Add chat-specific fn_task_document_write/read factories that require task_id and reuse task document read behavior.
- Wire dashboard chat custom tools to include task document tools when a scoped task store is available.
- Cover chat document tool exposure and explicit-task document operations with engine and dashboard tests.
- Document chat availability and add a published package changeset.

Files changed:
 .changeset/fn-6635-chat-task-documents.md          |   5 +
 docs/agents.md                                     |   1 +
 .../cli/skill/fusion/references/engine-tools.md    |   4 +-
 .../dashboard/src/__tests__/chat-manager.test.ts   |  78 +++++++++++
 packages/dashboard/src/chat.ts                     |  15 ++-
 .../src/__tests__/agent-document-tools.test.ts     | 108 +++++++++++++++
 packages/engine/src/agent-tools.ts                 | 145 ++++++++++++++++-----
 packages/engine/src/index.ts                       |   3 +
 8 files changed, 318 insertions(+), 41 deletions(-)

Fusion-Task-Id: FN-6635

Fusion-Task-Lineage: 25e701d4-7670-470b-9dea-df49884f7b21
2026-06-18 07:06:00 -07:00
gsxdsm
cdadac1662 FN-6622: wire dashboard interviews to session skills
Dashboard interview lanes now request the same role-fallback and enabled plugin skills as agent-acting sessions.

- Add skillSelection to agent onboarding and milestone/slice interview agent creation.
- Thread the plugin runner through mission interview and onboarding routes.
- Cover enabled and disabled plugin skill selection behavior in dashboard tests.
- Document the newly covered dashboard interview lanes and add a minor changeset.

Files changed:
 .../fn-6622-session-skill-interview-lanes.md       |  5 ++
 docs/agents.md                                     |  2 +-
 .../src/__tests__/agent-onboarding.test.ts         | 68 ++++++++++++++++++++++
 .../__tests__/milestone-slice-interview.test.ts    | 66 +++++++++++++++++++++
 packages/dashboard/src/agent-onboarding.ts         | 10 +++-
 .../dashboard/src/milestone-slice-interview.ts     | 39 ++++++++++---
 packages/dashboard/src/mission-routes.ts           | 10 ++--
 ...gister-agent-import-export-generation-routes.ts |  3 +-
 8 files changed, 187 insertions(+), 16 deletions(-)

Fusion-Task-Id: FN-6622

Fusion-Task-Lineage: 5e3dded1-1866-4b76-8302-253e5b3867fa
2026-06-17 22:21:34 -07:00
gsxdsm
0453a65bf1 FN-6613: inject skills into agent session lanes
Ensure every agent-acting session lane requests available agent and plugin skills.\n\n- Add skill selection context to planning, mission interview, workflow design, memory insight, and cron automation sessions.\n- Thread plugin runners through dashboard session creation, retry, reconnect, and route registration paths.\n- Cover skill injection behavior with dashboard and cron runner regression tests.\n- Document which agent session lanes request skills and which utility-only lanes remain exempt.\n- Add a minor changeset for the published CLI package.\n\nFiles changed:\n .changeset/fn-6613-session-skill-lanes.md          |   5 +\n docs/agents.md                                     |   1 +\n .../src/__tests__/mission-interview.test.ts        |  55 ++++++\n .../src/__tests__/planning-skill-selection.test.ts | 130 +++++++++++++\n .../src/__tests__/session-error-recovery.test.ts   |   6 +\n .../session-persistence-roundtrip.test.ts          |   6 +\n .../src/__tests__/session-reconnect.test.ts        |   6 +\n .../src/__tests__/session-resume-history.test.ts   |   6 +\n packages/dashboard/src/mission-interview.ts        |  23 ++-\n packages/dashboard/src/mission-routes.ts           |   4 +-\n packages/dashboard/src/planning.ts                 |  32 +++-\n .../register-settings-memory-worktrunk.test.ts     | 203 ++++++++++++++++++++-\n .../routes/__tests__/workflow-design-route.test.ts |  56 +++++-\n .../src/routes/register-integrated-routers.ts      |   2 +-\n .../src/routes/register-planning-subtask-routes.ts |   5 +\n .../src/routes/register-settings-memory-routes.ts  |  33 +++-\n .../src/routes/register-workflow-routes.ts         |  16 +-\n packages/dashboard/src/test/mockCoreEngine.ts      |   9 +\n packages/engine/src/__tests__/cron-runner.test.ts  |  17 ++\n packages/engine/src/cron-runner.ts                 |   7 +\n 20 files changed, 599 insertions(+), 23 deletions(-)

Fusion-Task-Id: FN-6613

Fusion-Task-Lineage: 985fa9fb-0381-4abf-930f-b547a475c4ed
2026-06-17 21:12:53 -07:00
gsxdsm
7f4f611367 FN-6611: clarify engineer backlog auto-claim routing
Clarifies why engineer agents see but do not auto-claim backlog tasks without opt-in.

- Surface actionable project and per-agent opt-in guidance in no-task heartbeat prompts.
- Include eligible backlog candidates in the blocked engineer guidance so routing remains visible.
- Cover disabled engineer auto-claim scenarios with prompt assertions.
- Update agent and settings docs with the visible configuration paths.

Files changed:
 docs/agents.md                                        |  2 +-
 docs/settings-reference.md                            |  2 +-
 .../engine/src/__tests__/heartbeat-executor.test.ts   | 11 +++++++++--
 packages/engine/src/agent-heartbeat.ts                | 19 ++++++++++++++++---
 4 files changed, 27 insertions(+), 7 deletions(-)

Fusion-Task-Id: FN-6611

Fusion-Task-Lineage: ffcafc50-1664-4807-826c-cccf68d31012
2026-06-17 19:11:31 -07:00