Fusion
065dad8cdb
feat(FN-3004): merge fusion/fn-3004
- **New `fn custom-provider` CLI commands** (`register`, `unregister`, `list`) for managing custom AI providers; `dashboard.ts` and `serve.ts` now initialize the registry, and `packages/engine/src/custom-providers.ts` exposes the engine integration
- **Custom provider registration API** in `packages/dashboard/src/routes/register-agent-core-routes.ts` with `POST /api/agent-core/register-custom-provider`; providers are persisted in `store.ts` and exposed via `GET /api/agent-core/custom-providers`
- **Agent heartbeat improvements** (`packages/engine/src/agent-heartbeat.ts`): clearer conflict semantics when task is checked out by another agent, refactored `WakeContext` handling, and budget enforcement at heartbeat time
- **Inline quick chat composer** (FN-3004): `QuickChatFAB` reworked with inline attachment row, improved prompt template logic, and full TypeScript coverage in `QuickChatFAB.test.tsx`
- **Settings and onboarding**: `SettingsModal.tsx` surfaces custom provider management; `ModelOnboardingModal.tsx` updated to use the new registry
- **Agent instructions expanded** (`packages/engine/src/agent-instructions.ts`): richer system prompt injection for spawned agents including agent personality/soul, ratings context, and parent assignment details
- **`agent-store.ts`** now tracks `reportsTo` for spawned agent hierarchy and exposes `list_agents` and `delegate_task` tools via the pi extension
- **Database layer**: `db.ts` uses `prepareSelect()` helpers for query consistency; WAL mode enforced; foreign-key checks enabled in test suite
- **New tests**: `custom-provider-registry.test.ts`, `pi-create-fn-agent.test.ts`, `agent-heartbeat.test.ts`, `notifier.test.ts`, `routes.test.ts` for dashboard core routes, plus coverage for `QuickChatFAB`, `TaskCard`, and `UpdateAvailableBanner`
- **TaskCard**: status badge now uses `--card-status-badge--{status}` CSS classes instead of inline style helpers; `TaskCard.test.tsx` updated to match
Commits merged:
- fix(FN-3004): restore dashboard typecheck for custom provider state
- test(FN-3004): complete Step 2 — cover inline composer attachment row
- feat(FN-3004): complete Step 1 — inline quick chat composer row
- feat(FN-3003): merge fusion/fn-3003
- feat(FN-2962): merge fusion/fn-2962
- fix(FN-XXX): update release notes link in update notification
Files changed:
.changeset/fix-update-release-notes-link.md | 5 +
.changeset/register-custom-providers.md | 5 +
docs/architecture.md | 2 +
.../__tests__/custom-provider-registry.test.ts | 167 +++++++++++++++++++++
.../cli/src/commands/__tests__/dashboard.test.ts | 4 +
packages/cli/src/commands/__tests__/serve.test.ts | 3 +
.../cli/src/commands/custom-provider-registry.ts | 96 ++++++++++++
packages/cli/src/commands/dashboard.ts | 28 ++++
packages/cli/src/commands/serve.ts | 28 ++++
packages/core/src/__tests__/db.test.ts | 26 ++--
packages/core/src/__tests__/insight-store.test.ts | 8 +-
packages/core/src/__tests__/mission-store.test.ts | 2 +-
packages/core/src/__tests__/roadmap-store.test.ts | 2 +-
packages/core/src/__tests__/run-audit.test.ts | 2 +-
packages/core/src/__tests__/task-documents.test.ts | 2 +-
packages/core/src/agent-store.ts | 16 +-
packages/core/src/db.ts | 13 +-
packages/core/src/index.ts | 2 +-
packages/core/src/store.ts | 35 ++++-
packages/core/src/types.ts | 33 ++++
packages/dashboard/app/api/legacy.ts | 11 ++
.../dashboard/app/components/AgentDetailView.tsx | 92 +++++++++++-
.../app/components/ModelOnboardingModal.tsx | 15 +-
packages/dashboard/app/components/QuickChatFAB.css | 19 ++-
packages/dashboard/app/components/QuickChatFAB.tsx | 95 ++++++------
.../dashboard/app/components/SettingsModal.tsx | 39 ++++-
packages/dashboard/app/components/TaskCard.tsx | 46 ++++--
.../app/components/UpdateAvailableBanner.tsx | 2 +-
.../app/components/__tests__/QuickChatFAB.test.tsx | 23 +++
.../app/components/__tests__/TaskCard.test.tsx | 2 +-
.../__tests__/UpdateAvailableBanner.test.tsx | 2 +-
.../src/__tests__/routes-agent-skills.test.ts | 1 +
packages/dashboard/src/__tests__/routes.test.ts | 34 +++++
.../src/routes/register-agent-core-routes.ts | 78 ++++++++++
.../dashboard/src/routes/register-git-github.ts | 16 +-
.../engine/src/__tests__/agent-heartbeat.test.ts | 59 ++++++++
packages/engine/src/__tests__/notifier.test.ts | 33 ++++
.../src/__tests__/pi-create-fn-agent.test.ts | 36 +++++
.../engine/src/__tests__/project-engine.test.ts | 53 ++++++-
packages/engine/src/agent-heartbeat.ts | 86 ++++++++++-
packages/engine/src/agent-instructions.ts | 103 ++++++++++++-
packages/engine/src/custom-providers.ts | 15 ++
packages/engine/src/index.ts | 3 +
packages/engine/src/notifier.ts | 3 +-
packages/engine/src/pi.ts | 30 ++++
packages/engine/src/project-engine.ts | 12 +-
46 files changed, 1254 insertions(+), 133 deletions(-)
Fusion-Task-Id: FN-3004
2026-04-29 21:53:55 -07:00
..
2026-04-29 14:23:58 -07:00
2026-04-28 14:25:55 -07:00
2026-04-15 19:27:53 -07:00
2026-04-27 19:59:52 -07:00
2026-04-27 19:59:52 -07:00
2026-04-27 19:59:52 -07:00
2026-04-24 19:39:20 -07:00
2026-04-24 19:39:20 -07:00
2026-04-29 13:29:00 -07:00
2026-04-27 03:13:32 -07:00
2026-04-17 09:16:08 -07:00
2026-04-22 09:56:26 -07:00
2026-04-28 18:21:17 -07:00
2026-04-27 19:59:52 -07:00
2026-04-29 16:55:20 -07:00
2026-04-29 14:26:58 -07:00
2026-04-25 00:07:19 -07:00
2026-04-29 16:11:59 -07:00
2026-04-28 19:20:10 -07:00
2026-04-25 01:45:29 -07:00
2026-04-27 12:45:53 -07:00
2026-04-29 09:21:30 -07:00
2026-04-29 09:46:16 -07:00
2026-04-29 13:23:31 -07:00
2026-04-27 19:59:52 -07:00
2026-04-27 04:05:25 -07:00
2026-04-18 12:21:14 -07:00
2026-04-08 14:17:20 -07:00
2026-04-28 19:20:10 -07:00
2026-04-25 17:44:55 -07:00
2026-04-25 19:35:47 -07:00
2026-04-29 20:15:05 -07:00
2026-04-24 19:39:20 -07:00
2026-04-24 13:29:48 -07:00
2026-04-22 16:31:30 -07:00
2026-04-22 15:53:08 -07:00
2026-04-25 11:28:33 -07:00
2026-04-24 08:55:02 -07:00
2026-04-08 20:04:23 -07:00
2026-04-25 10:50:32 -07:00
2026-04-27 19:59:52 -07:00
2026-04-29 19:09:55 -07:00
2026-04-24 19:39:20 -07:00
2026-04-18 07:36:57 -07:00
2026-04-28 16:20:24 -07:00
2026-04-27 04:05:25 -07:00
2026-04-27 19:59:52 -07:00
2026-04-29 00:09:39 -07:00
2026-04-29 16:25:30 -07:00
2026-04-29 12:12:05 -07:00
2026-04-27 02:24:21 -07:00
2026-04-28 19:20:10 -07:00
2026-04-27 19:59:52 -07:00
2026-04-28 14:25:55 -07:00
2026-04-24 09:38:16 -07:00
2026-04-09 16:35:41 -07:00
2026-04-24 19:39:20 -07:00
2026-04-24 19:39:20 -07:00
2026-04-24 19:39:20 -07:00
2026-04-29 13:29:00 -07:00
2026-04-27 16:05:50 -07:00
2026-04-24 19:39:20 -07:00
2026-04-29 00:23:29 -07:00
2026-04-27 19:59:52 -07:00
2026-04-17 05:36:02 -07:00
2026-04-29 20:15:05 -07:00
2026-04-26 12:25:10 -07:00
2026-04-28 18:21:17 -07:00
2026-04-27 19:59:52 -07:00
2026-04-28 14:25:56 -07:00
2026-04-27 19:59:52 -07:00
2026-04-27 19:59:52 -07:00
2026-04-16 08:38:08 -07:00
2026-04-28 23:23:34 -07:00
2026-04-24 19:39:20 -07:00
2026-04-09 13:01:19 -07:00
2026-04-16 09:08:06 -07:00
2026-04-17 08:01:38 -07:00
2026-04-29 17:23:22 -07:00
2026-04-25 07:04:50 -07:00
2026-04-24 08:55:02 -07:00
2026-04-28 14:25:55 -07:00
2026-04-27 19:59:52 -07:00
2026-04-27 19:59:52 -07:00
2026-04-16 10:04:44 -07:00
2026-04-25 07:04:50 -07:00
2026-04-27 19:59:52 -07:00
2026-04-14 10:43:51 -07:00
2026-04-28 23:23:34 -07:00
2026-04-18 03:08:00 -07:00
2026-04-27 19:25:10 -07:00
2026-04-23 10:58:36 -07:00
2026-04-29 21:53:55 -07:00
2026-04-29 00:09:39 -07:00
2026-04-27 19:59:52 -07:00
2026-04-27 19:59:52 -07:00
2026-04-27 19:59:52 -07:00
2026-04-29 12:12:05 -07:00
2026-04-27 04:05:25 -07:00
2026-04-27 19:59:52 -07:00
2026-04-16 08:38:55 -07:00
2026-04-27 19:59:52 -07:00
2026-04-27 19:59:52 -07:00
2026-04-29 20:15:05 -07:00
2026-04-29 20:15:05 -07:00
2026-04-29 20:15:05 -07:00
2026-04-16 08:38:08 -07:00
2026-04-16 08:38:08 -07:00
2026-04-16 04:38:05 -07:00
2026-04-19 20:48:13 -07:00
2026-04-28 21:13:30 -07:00
2026-04-24 19:39:20 -07:00
2026-04-25 12:40:32 -07:00
2026-04-27 04:05:25 -07:00
2026-04-27 08:45:49 -07:00
2026-04-29 21:48:13 -07:00
2026-04-29 11:42:37 -07:00
2026-04-26 22:21:18 -07:00
2026-04-29 18:01:59 -07:00
2026-04-22 08:04:24 -07:00
2026-04-28 16:24:22 -07:00
2026-04-28 19:20:10 -07:00
2026-04-27 19:59:52 -07:00
2026-04-10 00:59:17 -07:00
2026-04-29 17:23:22 -07:00
2026-04-29 21:33:18 -07:00
2026-04-29 00:31:46 -07:00
2026-04-27 19:59:52 -07:00
2026-04-25 12:18:55 -07:00
2026-04-13 17:41:33 -07:00