@johpaz/hive-agents 0.0.45 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +119 -852
- package/dist/hive.js +59290 -58797
- package/dist/tool-worker.js +220 -925
- package/dist/ui/assets/A2UIPage-D4nUFe5q.js +8 -0
- package/dist/ui/assets/AgentCreateForm-g1mQnIoJ.js +1 -0
- package/dist/ui/assets/AgentDetailPage-C3XkU4Ll.js +1 -0
- package/dist/ui/assets/AgentNewPage-CEkLeA79.js +1 -0
- package/dist/ui/assets/AgentsPage-CNA778Eo.js +10 -0
- package/dist/ui/assets/ApiClientPage-t5DpKhmA.js +3 -0
- package/dist/ui/assets/ChannelsPage-yY6t0YTU.js +8 -0
- package/dist/ui/assets/DashboardPage-BSeNSYg5.js +6 -0
- package/dist/ui/assets/{LoginPage-BTxJdFVG.js → LoginPage-eT5zDRDa.js} +1 -1
- package/dist/ui/assets/{LogsPage-DVV2eHbh.js → LogsPage-Gczzzsdh.js} +1 -1
- package/dist/ui/assets/MeetingPage-Bu4aMMNR.js +1 -0
- package/dist/ui/assets/ModelSelector-nNOrW3te.js +1 -0
- package/dist/ui/assets/{NotFound-BIUDlIXU.js → NotFound-Bpr12V51.js} +1 -1
- package/dist/ui/assets/Office3DPage-B_iXEbyv.js +4614 -0
- package/dist/ui/assets/Office3DPage-C3SIzd2H.css +1 -0
- package/dist/ui/assets/ProvidersPage-BupHs5yO.js +1 -0
- package/dist/ui/assets/{RecoverPage-7YDQysBL.js → RecoverPage-DMqSasKk.js} +1 -1
- package/dist/ui/assets/SettingsPage-B6FTSkOn.js +9 -0
- package/dist/ui/assets/SetupPage-DhcRbGgg.js +1 -0
- package/dist/ui/assets/WebChatPage-CWXjW4Hn.js +29 -0
- package/dist/ui/assets/{activity-c3pNngT_.js → activity-CQuPevhB.js} +1 -1
- package/dist/ui/assets/agentCapabilities-CDC6y91E.js +1 -0
- package/dist/ui/assets/alert-CQlRq6sv.js +1 -0
- package/dist/ui/assets/arrow-left-0EBE7nsF.js +1 -0
- package/dist/ui/assets/arrow-right-5QIaph-z.js +1 -0
- package/dist/ui/assets/arrow-up-right-DQQCY007.js +1 -0
- package/dist/ui/assets/badge-DKGZbVZJ.js +1 -0
- package/dist/ui/assets/{calendar-B-KZ9RQO.js → calendar-Be23hQGc.js} +1 -1
- package/dist/ui/assets/{card-CNf6BS2e.js → card-D3Nw3kh3.js} +1 -1
- package/dist/ui/assets/check-Dp6tzwax.js +1 -0
- package/dist/ui/assets/chevron-down-33N886NY.js +1 -0
- package/dist/ui/assets/chevron-left-C6itJXh3.js +1 -0
- package/dist/ui/assets/chevron-right-CFodBS-b.js +1 -0
- package/dist/ui/assets/chevron-up-BvSmyBEs.js +1 -0
- package/dist/ui/assets/{circle-alert-KuAm2FWh.js → circle-alert-BDVHxmAz.js} +1 -1
- package/dist/ui/assets/circle-check-BJWNbLuF.js +1 -0
- package/dist/ui/assets/{circle-x-DjLkFDO8.js → circle-x-Cb2Yer4s.js} +1 -1
- package/dist/ui/assets/{copy-Bu5d7C-0.js → copy-33tZrzc9.js} +1 -1
- package/dist/ui/assets/{dialog-Jk4bieO4.js → dialog-KOZKWbib.js} +1 -1
- package/dist/ui/assets/dist-CD_qfA30.js +1 -0
- package/dist/ui/assets/{download-Cjbk4Rek.js → download-CiQqqXyz.js} +1 -1
- package/dist/ui/assets/earth-DCvN7ynm.js +1 -0
- package/dist/ui/assets/ellipsis-vertical-BybFZDk2.js +1 -0
- package/dist/ui/assets/{external-link-6sTlRDUR.js → external-link-0iNNBvZm.js} +1 -1
- package/dist/ui/assets/{eye-Df8o0tkC.js → eye-C8sKSSkg.js} +1 -1
- package/dist/ui/assets/{file-text-lnxnjBp0.js → file-text-DO8jqiJK.js} +1 -1
- package/dist/ui/assets/{gateway-url-DwzPmoc8.js → gateway-url-BlnabM5e.js} +1 -1
- package/dist/ui/assets/gauge-BRGwuN8G.js +1 -0
- package/dist/ui/assets/{history-CAF_R34_.js → history-BtTD1kDo.js} +1 -1
- package/dist/ui/assets/index-Bejlp-R1.js +116 -0
- package/dist/ui/assets/index-XoTT41Hr.css +2 -0
- package/dist/ui/assets/{info-WjromB4Y.js → info-mpk1tsNC.js} +1 -1
- package/dist/ui/assets/key-CoQ0qtXt.js +1 -0
- package/dist/ui/assets/label-k0jYxoWW.js +1 -0
- package/dist/ui/assets/loader-circle-BhqRN2nO.js +1 -0
- package/dist/ui/assets/lock-open-Cd2aqwOd.js +1 -0
- package/dist/ui/assets/mail-BG0RYSkL.js +1 -0
- package/dist/ui/assets/{pause-VqeUmp2Z.js → pause-Cme88_9s.js} +1 -1
- package/dist/ui/assets/pencil-f1nJ1xhs.js +1 -0
- package/dist/ui/assets/play-CfYDHD6h.js +1 -0
- package/dist/ui/assets/plus-C5BxJeOX.js +1 -0
- package/dist/ui/assets/progress-DrI2UDu-.js +1 -0
- package/dist/ui/assets/radio-B5SpKJ-J.js +1 -0
- package/dist/ui/assets/{refresh-cw-CCzDCAuz.js → refresh-cw-CroGQY62.js} +1 -1
- package/dist/ui/assets/scroll-area-CfHn94Vb.js +1 -0
- package/dist/ui/assets/search-rfBcmohK.js +1 -0
- package/dist/ui/assets/select-BhbW0stK.js +1 -0
- package/dist/ui/assets/{send-BPk9XbIq.js → send-D6whYpw-.js} +1 -1
- package/dist/ui/assets/{settings-BGfrZ_zM.js → settings-BX6q3MGB.js} +1 -1
- package/dist/ui/assets/{shield-CxhcUT39.js → shield-BnGyu1xf.js} +1 -1
- package/dist/ui/assets/slider-CmE_z1Ii.js +1 -0
- package/dist/ui/assets/{sparkles-BhwlS1pc.js → sparkles-BcaOs_Jk.js} +1 -1
- package/dist/ui/assets/{square-DMNWw4Hi.js → square-ju5H8nrT.js} +1 -1
- package/dist/ui/assets/switch-DXcELPsM.js +1 -0
- package/dist/ui/assets/tabs-CxiybXcw.js +1 -0
- package/dist/ui/assets/terminal-Bjfu-TkS.js +1 -0
- package/dist/ui/assets/{textarea-B6Z1Zc6W.js → textarea-rp6vsOZl.js} +1 -1
- package/dist/ui/assets/{trash-2-xD2o4SgX.js → trash-2-DjQXac_0.js} +1 -1
- package/dist/ui/assets/{triangle-alert-pVIJGjga.js → triangle-alert-B04mgMcg.js} +1 -1
- package/dist/ui/assets/{useHiveAgentsModelLoad-BnC4jLE-.js → useHiveAgentsModelLoad-DT5-4CCj.js} +1 -1
- package/dist/ui/assets/useOfficeModel-Cy7cAyEn.js +1 -0
- package/dist/ui/assets/useProviders-DSX7eVsz.js +1 -0
- package/dist/ui/assets/utils-Dyb7SC2_.js +1 -0
- package/dist/ui/assets/vendor-charts-K3xcRl0X.js +60 -0
- package/dist/ui/assets/{vendor-query-DsWPbQdG.js → vendor-query-Dj8xYhQD.js} +1 -1
- package/dist/ui/assets/vendor-radix-D0s_k6Gp.js +63 -0
- package/dist/ui/assets/vendor-react-CPJEWbIG.js +1 -0
- package/dist/ui/assets/{vendor-router-gqiZ7xhx.js → vendor-router-zpB-76nT.js} +1 -1
- package/dist/ui/assets/volume-x-qnVxkRSM.js +1 -0
- package/dist/ui/assets/wifi-BA1m2dGO.js +1 -0
- package/dist/ui/assets/{zap-B4RaNNO5.js → zap-DT7cM7YS.js} +1 -1
- package/dist/ui/index.html +10 -9
- package/package.json +8 -9
- package/packages/cli/src/adapters/config.ts +1 -80
- package/packages/cli/src/adapters/factory.ts +0 -45
- package/packages/cli/src/adapters/index.ts +0 -8
- package/packages/cli/src/commands/doctor.ts +45 -1
- package/packages/cli/src/commands/gateway.ts +2 -9
- package/packages/cli/src/index.ts +9 -11
- package/packages/core/src/agent/acceptance-verifier.ts +300 -0
- package/packages/core/src/agent/agent-catalog.ts +384 -0
- package/packages/core/src/agent/agent-loop.ts +185 -28
- package/packages/core/src/agent/capability-search.ts +5 -5
- package/packages/core/src/agent/catalog-selector.ts +104 -0
- package/packages/core/src/agent/compaction.ts +36 -41
- package/packages/core/src/agent/context-compiler.ts +182 -62
- package/packages/core/src/agent/conversation-store.ts +56 -3
- package/packages/core/src/agent/curator.ts +129 -34
- package/packages/core/src/agent/delegation-runtime.ts +248 -0
- package/packages/core/src/agent/index.ts +17 -0
- package/packages/core/src/agent/llm-providers/hiveagents.ts +1 -1
- package/packages/core/src/agent/llm-providers/interface.ts +3 -3
- package/packages/core/src/agent/llm-providers/openai-compat-base.ts +1 -1
- package/packages/core/src/agent/minimal-loadout.ts +46 -0
- package/packages/core/src/agent/playbook-selector.ts +1 -1
- package/packages/core/src/agent/prompt-builder.ts +4 -0
- package/packages/core/src/agent/proof-packet.ts +15 -1
- package/packages/core/src/agent/providers/index.ts +8 -3
- package/packages/core/src/agent/routing-intent.ts +22 -0
- package/packages/core/src/agent/run-store.ts +24 -3
- package/packages/core/src/agent/service.ts +2 -2
- package/packages/core/src/agent/skill-selector.ts +12 -31
- package/packages/core/src/agent/tool-selector.ts +36 -35
- package/packages/core/src/agent/tracer.ts +5 -1
- package/packages/core/src/artifacts/store.ts +162 -0
- package/packages/core/src/canvas/canvas-manager.ts +5 -234
- package/packages/core/src/canvas/emitter.ts +165 -69
- package/packages/core/src/canvas/index.ts +0 -2
- package/packages/core/src/channels/base.ts +3 -1
- package/packages/core/src/channels/webchat.ts +4 -8
- package/packages/core/src/config/loader.ts +0 -22
- package/packages/core/src/events/agent-bus.ts +0 -31
- package/packages/core/src/events/narration.ts +82 -0
- package/packages/core/src/gateway/channel-notify.ts +34 -5
- package/packages/core/src/gateway/delegation-groups.ts +245 -0
- package/packages/core/src/gateway/delegation-notify.ts +103 -0
- package/packages/core/src/gateway/durable-queue.ts +33 -2
- package/packages/core/src/gateway/helpers/index.ts +2 -2
- package/packages/core/src/gateway/helpers/narration.ts +12 -7
- package/packages/core/src/gateway/helpers/redact.ts +1 -1
- package/packages/core/src/gateway/initializer.ts +15 -13
- package/packages/core/src/gateway/job-executors.ts +232 -101
- package/packages/core/src/gateway/lane-queue.ts +1 -1
- package/packages/core/src/gateway/notification-inbox.ts +57 -0
- package/packages/core/src/gateway/resolver.ts +1 -23
- package/packages/core/src/gateway/routes/agents.ts +91 -1
- package/packages/core/src/gateway/routes/auth.ts +21 -42
- package/packages/core/src/gateway/routes/chat.ts +6 -6
- package/packages/core/src/gateway/routes/cron-api.ts +0 -4
- package/packages/core/src/gateway/routes/mcp.ts +0 -63
- package/packages/core/src/gateway/routes/meeting.ts +245 -0
- package/packages/core/src/gateway/routes/providers.ts +1 -0
- package/packages/core/src/gateway/routes/setup.ts +29 -24
- package/packages/core/src/gateway/routes/skills.ts +2 -2
- package/packages/core/src/gateway/routes/system.ts +23 -5
- package/packages/core/src/gateway/routes/users.ts +24 -1
- package/packages/core/src/gateway/server.ts +153 -117
- package/packages/core/src/gateway/session.ts +6 -4
- package/packages/core/src/gateway/slash-commands.ts +7 -6
- package/packages/core/src/gateway/webchat-turn.ts +34 -8
- package/packages/core/src/index.ts +3 -0
- package/packages/core/src/mcp/hot-reload.ts +14 -7
- package/packages/core/src/mcp/singleton.ts +0 -3
- package/packages/core/src/mcp/tool-sync.ts +2 -2
- package/packages/core/src/resilience/retry.ts +1 -1
- package/packages/core/src/scheduler/CronScheduler.ts +3 -1
- package/packages/core/src/scheduler/integration.ts +1 -1
- package/packages/core/src/storage/bootstrap.ts +25 -5
- package/packages/core/src/storage/collections.ts +201 -27
- package/packages/core/src/storage/onboarding.ts +147 -32
- package/packages/core/src/storage/reconcile.ts +2 -5
- package/packages/core/src/storage/seed.ts +202 -38
- package/packages/core/src/storage/usage.ts +0 -9
- package/packages/core/src/storage/user-email.ts +11 -0
- package/packages/core/src/tool-runtime/index.ts +69 -23
- package/packages/core/src/tool-runtime/worker-tools.ts +4 -2
- package/packages/core/src/{canvas/a2ui-tools.ts → tools/a2ui/index.ts} +17 -8
- package/packages/core/src/tools/agents/get-available-models.ts +11 -3
- package/packages/core/src/tools/agents/index.ts +404 -86
- package/packages/core/src/tools/core/index.ts +28 -10
- package/packages/core/src/tools/cron/index.ts +1 -6
- package/packages/core/src/tools/index.ts +17 -45
- package/packages/core/src/tools/types.ts +1 -1
- package/packages/core/src/tools/web/artifact-inspect.ts +23 -0
- package/packages/core/src/tools/web/browser-screenshot.ts +26 -5
- package/packages/core/src/tools/web/index.ts +3 -0
- package/packages/core/src/utils/logger.ts +58 -30
- package/packages/core/src/utils/toon.ts +0 -20
- package/packages/mcp/src/manager.ts +8 -7
- package/packages/mcp/src/transports/sse.ts +0 -4
- package/packages/mcp/src/transports/websocket.ts +0 -6
- package/packages/skills/src/bundled/{canvas → a2ui}/a2ui_dashboard/SKILL.md +4 -4
- package/packages/skills/src/bundled/{canvas → a2ui}/a2ui_form/SKILL.md +4 -4
- package/packages/skills/src/bundled/{canvas → a2ui}/a2ui_interactive/SKILL.md +5 -5
- package/packages/skills/src/bundled/agents/acceptance_verification/SKILL.md +26 -0
- package/packages/skills/src/bundled/agents/agent_spawner/SKILL.md +24 -18
- package/packages/skills/src/bundled/agents/task_orchestrator/SKILL.md +47 -148
- package/packages/skills/src/bundled/cli/cli_pipeline/SKILL.md +9 -10
- package/packages/skills/src/bundled/cli/cli_safe_exec/SKILL.md +1 -1
- package/packages/skills/src/bundled/cli/software_engineering/SKILL.md +23 -0
- package/packages/skills/src/bundled/cron_manager/SKILL.md +2 -2
- package/packages/skills/src/bundled/cron_reminder/SKILL.md +7 -7
- package/packages/skills/src/bundled/filesystem/file_read_and_summarize/SKILL.md +11 -10
- package/packages/skills/src/bundled/filesystem/file_writer/SKILL.md +29 -35
- package/packages/skills/src/bundled/filesystem/workspace_file_operator/SKILL.md +22 -0
- package/packages/skills/src/bundled/search_knowledge/capability_discovery/SKILL.md +5 -4
- package/packages/skills/src/bundled-data.generated.ts +155 -720
- package/dist/ui/assets/AgentCreateForm-DzaIT-dA.js +0 -1
- package/dist/ui/assets/AgentDetailPage-DgqcJceY.js +0 -1
- package/dist/ui/assets/AgentNewPage-CNSpoOSA.js +0 -1
- package/dist/ui/assets/AgentsPage-BMUJzTD6.js +0 -10
- package/dist/ui/assets/ApiClientPage-Cum_a_3j.js +0 -3
- package/dist/ui/assets/CanvasPage-o6oCP6uq.js +0 -33
- package/dist/ui/assets/ChannelsPage-WrB0zwLq.js +0 -8
- package/dist/ui/assets/DashboardPage-BCd6kNw0.js +0 -6
- package/dist/ui/assets/MeetingPage-BULIAWzq.js +0 -1
- package/dist/ui/assets/ModelSelector-BMYOChYb.js +0 -1
- package/dist/ui/assets/ProvidersPage-BVN5UZrI.js +0 -1
- package/dist/ui/assets/SettingsPage-CYmpFfDn.js +0 -9
- package/dist/ui/assets/SetupPage-Dnmb1Lbv.js +0 -1
- package/dist/ui/assets/WebChatPage-DmmdFhIC.js +0 -16
- package/dist/ui/assets/accordion-CnLzKNHK.js +0 -1
- package/dist/ui/assets/alert-B9J6KHmt.js +0 -1
- package/dist/ui/assets/alert-dialog-KcYQWcJ6.js +0 -1
- package/dist/ui/assets/arrow-left-CBcbX5EZ.js +0 -1
- package/dist/ui/assets/badge-88dRb4M8.js +0 -1
- package/dist/ui/assets/bell-8BqRYmzf.js +0 -1
- package/dist/ui/assets/chevron-down-DIosfU_U.js +0 -1
- package/dist/ui/assets/chevron-left-D4U-5A27.js +0 -1
- package/dist/ui/assets/chevron-right-CR4Skrf3.js +0 -1
- package/dist/ui/assets/chevron-up-CI-W21Fy.js +0 -1
- package/dist/ui/assets/circle-check-6Ard1-2z.js +0 -1
- package/dist/ui/assets/dropdown-menu-DDiaHg5y.js +0 -1
- package/dist/ui/assets/es-4I-joeZz.js +0 -1
- package/dist/ui/assets/folder-open-DJBLDFjv.js +0 -1
- package/dist/ui/assets/format-DsLPBxvt.js +0 -1
- package/dist/ui/assets/gauge-B8Tj43rC.js +0 -1
- package/dist/ui/assets/hexagon-6L79pgVK.js +0 -1
- package/dist/ui/assets/index-BmwTAwOF.css +0 -2
- package/dist/ui/assets/index-Cyw7L0Li.js +0 -116
- package/dist/ui/assets/key-DyKOoQh5.js +0 -1
- package/dist/ui/assets/label-B_15zZlR.js +0 -1
- package/dist/ui/assets/loader-circle-BmBOgYze.js +0 -1
- package/dist/ui/assets/lock-BS6OLXPv.js +0 -1
- package/dist/ui/assets/play-zJpWuhrr.js +0 -1
- package/dist/ui/assets/plus-BZQX26Dr.js +0 -1
- package/dist/ui/assets/progress-D5c-Eilm.js +0 -1
- package/dist/ui/assets/scroll-area-CihOx0cb.js +0 -1
- package/dist/ui/assets/search-DzDptO9s.js +0 -1
- package/dist/ui/assets/select-BQCOjM2j.js +0 -1
- package/dist/ui/assets/slider-bcUiUfx0.js +0 -14
- package/dist/ui/assets/switch-BR30E4ej.js +0 -1
- package/dist/ui/assets/table-B3aGEaVp.js +0 -1
- package/dist/ui/assets/tabs-LQidMKRS.js +0 -1
- package/dist/ui/assets/terminal--7G943As.js +0 -1
- package/dist/ui/assets/useProviders-C1xVKLxB.js +0 -1
- package/dist/ui/assets/utils-3pnRFmFe.js +0 -1
- package/dist/ui/assets/vendor-charts-Bu2lyBKP.js +0 -65
- package/dist/ui/assets/vendor-radix-D6rA7xKY.js +0 -63
- package/dist/ui/assets/vendor-react-BU5iQU4f.js +0 -1
- package/dist/ui/assets/volume-2-BekVQl6P.js +0 -1
- package/packages/core/src/agent/context-guard.ts +0 -91
- package/packages/core/src/agent/hooks.ts +0 -166
- package/packages/core/src/agent/providers.ts +0 -1
- package/packages/core/src/auth/auth.ts +0 -111
- package/packages/core/src/auth/index.ts +0 -1
- package/packages/core/src/canvas/canvas-tools.ts +0 -448
- package/packages/core/src/gateway/router.ts +0 -126
- package/packages/core/src/scheduler/dag/AgentExecutor.ts +0 -53
- package/packages/core/src/scheduler/dag/DAGScheduler.ts +0 -250
- package/packages/core/src/scheduler/dag/EventBridge.ts +0 -122
- package/packages/core/src/scheduler/dag/TaskGraph.ts +0 -192
- package/packages/core/src/scheduler/dag/TaskNode.ts +0 -97
- package/packages/core/src/scheduler/dag/TaskResult.ts +0 -22
- package/packages/core/src/scheduler/dag/errors.ts +0 -37
- package/packages/core/src/scheduler/dag/index.ts +0 -26
- package/packages/core/src/scheduler/dag/presets/ResearchPreset.ts +0 -97
- package/packages/core/src/scheduler/dag/strategies/ParallelStrategy.ts +0 -21
- package/packages/core/src/scheduler/dag/strategies/PriorityStrategy.ts +0 -46
- package/packages/core/src/scheduler/index.ts +0 -22
- package/packages/core/src/scheduler/task-driver.ts +0 -216
- package/packages/core/src/tools/canvas/index.ts +0 -420
- package/packages/core/src/tools/meeting/index.ts +0 -336
- package/packages/core/src/tools/projects/index.ts +0 -348
- package/packages/core/src/tools/voice/index.ts +0 -104
- package/packages/core/src/utils/index.ts +0 -5
- package/packages/skills/src/bundled/agents/code_delegator/SKILL.md +0 -156
- package/packages/skills/src/bundled/canvas/canvas_dashboard/SKILL.md +0 -146
- package/packages/skills/src/bundled/canvas/canvas_interact/SKILL.md +0 -148
- package/packages/skills/src/bundled/canvas/canvas_report/SKILL.md +0 -146
- package/packages/skills/src/bundled/meeting/meeting_transcription/SKILL.md +0 -213
- package/packages/skills/src/bundled/voice/voice_assistant/SKILL.md +0 -174
- package/packages/skills/src/bundled/voice/voice_input/SKILL.md +0 -146
- package/packages/skills/src/bundled/voice/voice_output/SKILL.md +0 -151
|
@@ -11,6 +11,9 @@ export * from "./agent/conversation-store.ts";
|
|
|
11
11
|
export * from "./agent/tool-selector.ts";
|
|
12
12
|
export * from "./agent/skill-selector.ts";
|
|
13
13
|
export * from "./agent/playbook-selector.ts";
|
|
14
|
+
export * from "./agent/catalog-selector.ts";
|
|
15
|
+
export * from "./agent/delegation-runtime.ts";
|
|
16
|
+
export * from "./agent/acceptance-verifier.ts";
|
|
14
17
|
export * from "./agent/llm-client.ts";
|
|
15
18
|
|
|
16
19
|
// Channels
|
|
@@ -12,7 +12,7 @@ import { col, updateDoc } from "../storage/hive";
|
|
|
12
12
|
import type { McpServerDoc } from "../storage/collections";
|
|
13
13
|
import { logger } from "../utils/logger";
|
|
14
14
|
import { loadMcpHeaders } from "../storage/crypto";
|
|
15
|
-
import { syncMCPToolsToDB,
|
|
15
|
+
import { syncMCPToolsToDB, syncMCPToolsToIndex, clearMCPToolsFromDB } from "./tool-sync";
|
|
16
16
|
import type { MCPClientManager } from "@johpaz/hive-agents-mcp";
|
|
17
17
|
|
|
18
18
|
const log = logger.child("mcp:hot-reload");
|
|
@@ -88,7 +88,7 @@ async function syncMCPServers(mcpManager: MCPClientManager): Promise<void> {
|
|
|
88
88
|
mcpServerConfig.headers = mcpHeaders;
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
//
|
|
91
|
+
// Register (or refresh) the server's config in the manager.
|
|
92
92
|
const currentConfig = (mcpManager as any).config || { servers: {} };
|
|
93
93
|
await mcpManager.updateConfig({
|
|
94
94
|
...currentConfig,
|
|
@@ -98,17 +98,24 @@ async function syncMCPServers(mcpManager: MCPClientManager): Promise<void> {
|
|
|
98
98
|
},
|
|
99
99
|
});
|
|
100
100
|
|
|
101
|
-
//
|
|
102
|
-
|
|
101
|
+
// updateConfig() only reconnects a server whose config changed AND was
|
|
102
|
+
// already connected — it never connects a server that's merely registered
|
|
103
|
+
// (true for both a brand-new server and one restored from DB on boot).
|
|
104
|
+
// Connect explicitly so "new to this process" always means "usable now".
|
|
105
|
+
await mcpManager.connectServer(serverName).catch((err) => {
|
|
106
|
+
log.error(`Failed to connect MCP server ${serverName}: ${err.message}`);
|
|
107
|
+
});
|
|
103
108
|
|
|
104
|
-
// Get tools count and update status
|
|
109
|
+
// Get tools count and update status from the manager's real state —
|
|
110
|
+
// never assume success.
|
|
105
111
|
const tools = mcpManager.getServerTools(serverName) || [];
|
|
106
|
-
|
|
112
|
+
const connected = mcpManager.getServerStatus(serverName) === "connected";
|
|
113
|
+
await updateDoc<McpServerDoc>("mcpServers", server.id, { status: connected ? "connected" : "error", tools_count: tools.length }).catch(() => { /* not found */ });
|
|
107
114
|
|
|
108
115
|
// Persist MCP tool definitions to DB and the HiveDB index
|
|
109
116
|
// Use server.name (human-readable) for mcpToolId consistency with context-compiler
|
|
110
117
|
await syncMCPToolsToDB(server.id || server.name, server.name || serverName, tools);
|
|
111
|
-
await
|
|
118
|
+
await syncMCPToolsToIndex();
|
|
112
119
|
|
|
113
120
|
log.info(`MCP server ${serverName} connected: ${tools.length} tools available`);
|
|
114
121
|
} catch (err) {
|
|
@@ -38,7 +38,7 @@ export interface MCPToolDefinition {
|
|
|
38
38
|
* resolves search results against executors by this exact string — so it
|
|
39
39
|
* delegates to mcpToolFullName instead of duplicating the algorithm.
|
|
40
40
|
*/
|
|
41
|
-
|
|
41
|
+
function mcpToolId(serverName: string, toolName: string): string {
|
|
42
42
|
return mcpToolFullName(serverName, toolName)
|
|
43
43
|
}
|
|
44
44
|
|
|
@@ -85,7 +85,7 @@ export async function syncMCPToolsToDB(
|
|
|
85
85
|
*
|
|
86
86
|
* This does a full replace of `type=mcp` documents to avoid drift.
|
|
87
87
|
*/
|
|
88
|
-
export async function
|
|
88
|
+
export async function syncMCPToolsToIndex(): Promise<void> {
|
|
89
89
|
try {
|
|
90
90
|
const mcpToolsCol = await col<McpToolDoc>("mcpTools")
|
|
91
91
|
const mcpTools = (await mcpToolsCol.scan({})).map(e => e.doc).filter(t => t.active)
|
|
@@ -10,6 +10,7 @@ import { logger } from "../utils/logger";
|
|
|
10
10
|
import { notifyTaskCompletion } from "./integration";
|
|
11
11
|
import { col, toIndexable, fromIndexable } from "../storage/hive";
|
|
12
12
|
import type { CronJobDoc, TaskRunDoc } from "../storage/collections";
|
|
13
|
+
import { expireArtifacts } from "../artifacts/store";
|
|
13
14
|
import type {
|
|
14
15
|
CronJob,
|
|
15
16
|
TaskRun,
|
|
@@ -707,7 +708,8 @@ export class CronScheduler {
|
|
|
707
708
|
}
|
|
708
709
|
}
|
|
709
710
|
|
|
710
|
-
|
|
711
|
+
const artifacts = await expireArtifacts();
|
|
712
|
+
log.info(`[runCleanup] Cleanup completed (expired artifacts=${artifacts.expired})`);
|
|
711
713
|
}
|
|
712
714
|
|
|
713
715
|
/**
|
|
@@ -34,7 +34,7 @@ export function setSchedulerForCleanup(scheduler: { runCleanup(): Promise<void>
|
|
|
34
34
|
* 4. Executes the tool if tool_name is specified
|
|
35
35
|
* 5. Returns the agent response
|
|
36
36
|
*/
|
|
37
|
-
|
|
37
|
+
async function executeScheduledTask(job: CronJob): Promise<CronJobExecutionResult> {
|
|
38
38
|
log.info(`[execute] Processing job "${job.name}" (${job.id})`);
|
|
39
39
|
|
|
40
40
|
try {
|
|
@@ -36,6 +36,7 @@ const INDEXES: IndexSpec[] = [
|
|
|
36
36
|
{ collection: "agents", field: "parent_id" },
|
|
37
37
|
{ collection: "agents", field: "role" },
|
|
38
38
|
{ collection: "agents", field: "status" },
|
|
39
|
+
{ collection: "agents", field: "source" },
|
|
39
40
|
// Stage 2 — catalog
|
|
40
41
|
{ collection: "channels", field: "user_id" },
|
|
41
42
|
{ collection: "channels", field: "type" },
|
|
@@ -50,6 +51,8 @@ const INDEXES: IndexSpec[] = [
|
|
|
50
51
|
{ collection: "userChannels", field: "channel" },
|
|
51
52
|
{ collection: "refreshTokens", field: "token_hash", unique: true },
|
|
52
53
|
{ collection: "refreshTokens", field: "user_id" },
|
|
54
|
+
{ collection: "notifications", field: "user_id" },
|
|
55
|
+
{ collection: "notifications", field: "channel" },
|
|
53
56
|
// Stage 4 — chat/ACE
|
|
54
57
|
{ collection: "traces", field: "thread_id" },
|
|
55
58
|
{ collection: "traces", field: "agent_id" },
|
|
@@ -64,6 +67,7 @@ const INDEXES: IndexSpec[] = [
|
|
|
64
67
|
{ collection: "agentRuns", field: "thread_id" },
|
|
65
68
|
{ collection: "agentRuns", field: "agent_id" },
|
|
66
69
|
{ collection: "agentRuns", field: "kind" },
|
|
70
|
+
{ collection: "agentRuns", field: "catalog_agent_id" },
|
|
67
71
|
{ collection: "jobQueue", field: "status" },
|
|
68
72
|
{ collection: "jobQueue", field: "lane" },
|
|
69
73
|
{ collection: "jobQueue", field: "type" },
|
|
@@ -71,17 +75,33 @@ const INDEXES: IndexSpec[] = [
|
|
|
71
75
|
{ collection: "jobQueue", field: "idempotency_key" },
|
|
72
76
|
{ collection: "proofPackets", field: "run_id" },
|
|
73
77
|
{ collection: "proofPackets", field: "agent_id" },
|
|
78
|
+
{ collection: "proofPackets", field: "catalog_agent_id" },
|
|
79
|
+
{ collection: "artifacts", field: "run_id" },
|
|
80
|
+
{ collection: "artifacts", field: "task_id" },
|
|
81
|
+
{ collection: "artifacts", field: "user_id" },
|
|
82
|
+
{ collection: "artifacts", field: "status" },
|
|
83
|
+
{ collection: "verifications", field: "run_id" },
|
|
84
|
+
{ collection: "verifications", field: "task_id" },
|
|
85
|
+
{ collection: "verifications", field: "executor_agent_id" },
|
|
86
|
+
{ collection: "verifications", field: "status" },
|
|
87
|
+
{ collection: "agentProposals", field: "agent_id" },
|
|
88
|
+
{ collection: "agentProposals", field: "status" },
|
|
89
|
+
{ collection: "agentProposals", field: "type" },
|
|
74
90
|
// Stage 6 — orchestration
|
|
75
|
-
{ collection: "projects", field: "user_id" },
|
|
76
|
-
{ collection: "projects", field: "agent_id" },
|
|
77
|
-
{ collection: "projects", field: "status" },
|
|
78
|
-
{ collection: "projects", field: "parent_id" },
|
|
79
|
-
{ collection: "tasks", field: "project_id" },
|
|
80
91
|
{ collection: "tasks", field: "agent_id" },
|
|
81
92
|
{ collection: "tasks", field: "status" },
|
|
93
|
+
{ collection: "tasks", field: "catalog_agent_id" },
|
|
94
|
+
{ collection: "tasks", field: "delegation_group_id" },
|
|
95
|
+
{ collection: "delegationGroups", field: "turn_id", unique: true },
|
|
96
|
+
{ collection: "delegationGroups", field: "thread_id" },
|
|
97
|
+
{ collection: "delegationGroups", field: "status" },
|
|
82
98
|
{ collection: "agentBusMessages", field: "to_worker_id" },
|
|
83
99
|
{ collection: "agentBusMessages", field: "from_worker_id" },
|
|
84
100
|
{ collection: "agentBusMessages", field: "event_type" },
|
|
101
|
+
{ collection: "narrationEvents", field: "turn_id" },
|
|
102
|
+
{ collection: "narrationEvents", field: "thread_id" },
|
|
103
|
+
{ collection: "narrationEvents", field: "user_id" },
|
|
104
|
+
{ collection: "narrationEvents", field: "kind" },
|
|
85
105
|
// Stage 7 — meeting
|
|
86
106
|
{ collection: "meetingSessions", field: "user_id" },
|
|
87
107
|
{ collection: "meetingSessions", field: "status" },
|
|
@@ -45,6 +45,14 @@ export interface ModelDoc {
|
|
|
45
45
|
capabilities: string | null
|
|
46
46
|
enabled: boolean
|
|
47
47
|
active: boolean
|
|
48
|
+
/**
|
|
49
|
+
* "catalog" for rows that come from SEED_DATA, "discovered" for rows
|
|
50
|
+
* inserted at runtime by querying a provider (Ollama tags, /v1/models).
|
|
51
|
+
* The boot reseed only purges catalog rows — a discovered model has no
|
|
52
|
+
* canonical source to be re-created from, so wiping it would orphan every
|
|
53
|
+
* agent pointing at it. Legacy rows (undefined) are treated as discovered.
|
|
54
|
+
*/
|
|
55
|
+
source?: "catalog" | "discovered"
|
|
48
56
|
}
|
|
49
57
|
|
|
50
58
|
export interface AgentDoc {
|
|
@@ -63,6 +71,8 @@ export interface AgentDoc {
|
|
|
63
71
|
model_id: string
|
|
64
72
|
tools_json: string | null
|
|
65
73
|
skills_json: string | null
|
|
74
|
+
/** MCP server ids currently leased for this execution. */
|
|
75
|
+
active_mcp_json?: string | null
|
|
66
76
|
/** `toIndexable`-encoded — `NO_PARENT` for the coordinator. */
|
|
67
77
|
parent_id: string
|
|
68
78
|
max_iterations: number
|
|
@@ -71,6 +81,24 @@ export interface AgentDoc {
|
|
|
71
81
|
lastTraceAt: number | null
|
|
72
82
|
created_at: number
|
|
73
83
|
updated_at: number
|
|
84
|
+
|
|
85
|
+
// ─── Catalog fields (only populated for source:"catalog" seeded agents) ────
|
|
86
|
+
/** "catalog" = seeded persona from agent-catalog.ts (insert-only, survives reseed). Absent/"user" for everything else (coordinator, agent_create workers). */
|
|
87
|
+
source?: "user" | "catalog"
|
|
88
|
+
/** BM25 routing metadata (capability-search.ts) — `description` itself is already routing-friendly (one line, suitable for small local models) and doubles as the catalog line shown to the coordinator. */
|
|
89
|
+
routing_examples_json?: string | null
|
|
90
|
+
routing_exclusions_json?: string | null
|
|
91
|
+
/** Glob patterns. When present, task_delegate re-expands against the live tool registry at delegation time instead of trusting a possibly-stale tools_json. */
|
|
92
|
+
tool_allowlist_json?: string | null
|
|
93
|
+
/** Persistent MCP server assignments. User specialists normally contain exactly one server id. */
|
|
94
|
+
mcp_server_ids_json?: string | null
|
|
95
|
+
workspace_scope_json?: string | null
|
|
96
|
+
model_override_json?: string | null
|
|
97
|
+
default_acceptance_json?: string | null
|
|
98
|
+
/** ACE learning counters — updated by independent verifier verdicts (acceptance-verifier.ts), not by loop completion. */
|
|
99
|
+
helpful_count?: number
|
|
100
|
+
harmful_count?: number
|
|
101
|
+
seed_version?: number
|
|
74
102
|
}
|
|
75
103
|
|
|
76
104
|
// ─── Stage 2: catalog ─────────────────────────────────────────────────────────
|
|
@@ -143,6 +171,26 @@ export interface ToolDoc {
|
|
|
143
171
|
updated_at: number
|
|
144
172
|
}
|
|
145
173
|
|
|
174
|
+
// Sub-types for AgentDoc's catalog fields (workspace_scope_json, model_override_json,
|
|
175
|
+
// default_acceptance_json) — kept as named types for readability even though they're
|
|
176
|
+
// stored as JSON strings on the shared agents table, not a separate collection.
|
|
177
|
+
export type AgentWorkspaceScope =
|
|
178
|
+
| { kind: "none" }
|
|
179
|
+
| { kind: "workspace"; read_globs: string[]; write_globs: string[] }
|
|
180
|
+
| { kind: "resource"; resource_types: string[] }
|
|
181
|
+
|
|
182
|
+
export interface AgentModelOverride {
|
|
183
|
+
required_capabilities: string[]
|
|
184
|
+
fallback: "general"
|
|
185
|
+
prefer_different_family?: boolean
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
export interface AgentAcceptanceCriterion {
|
|
189
|
+
id: string
|
|
190
|
+
description: string
|
|
191
|
+
check_tool?: string | null
|
|
192
|
+
}
|
|
193
|
+
|
|
146
194
|
export interface EthicsDoc {
|
|
147
195
|
id: string
|
|
148
196
|
name: string
|
|
@@ -172,6 +220,16 @@ export interface UserIdentityDoc {
|
|
|
172
220
|
linked_at: number
|
|
173
221
|
}
|
|
174
222
|
|
|
223
|
+
export interface NotificationDoc {
|
|
224
|
+
id: string
|
|
225
|
+
user_id: string
|
|
226
|
+
channel: string
|
|
227
|
+
message: string
|
|
228
|
+
created_at: number
|
|
229
|
+
delivered_at: number | null
|
|
230
|
+
read_at: number | null
|
|
231
|
+
}
|
|
232
|
+
|
|
175
233
|
export interface UserChannelDoc {
|
|
176
234
|
id: string
|
|
177
235
|
user_id: string
|
|
@@ -197,16 +255,27 @@ export interface RefreshTokenDoc {
|
|
|
197
255
|
|
|
198
256
|
// ─── Stage 4: chat/ACE ────────────────────────────────────────────────────────
|
|
199
257
|
|
|
258
|
+
/** Where an incoming turn's content came from. */
|
|
259
|
+
export type TurnSource =
|
|
260
|
+
| "message" | "audio" | "a2ui" | "canvas" | "api"
|
|
261
|
+
| "task_complete" | "delegation_summary"
|
|
262
|
+
|
|
263
|
+
/** What gets persisted — adds the synthetic marker for rows written before `source` existed. */
|
|
264
|
+
export type MessageSource = TurnSource | "legacy_internal"
|
|
265
|
+
|
|
200
266
|
export interface ConversationDoc {
|
|
201
267
|
id: string
|
|
202
268
|
thread_id: string
|
|
203
269
|
channel: string
|
|
270
|
+
/** @deprecated "system" only appears in rows written before `source` existed — never written going forward. */
|
|
204
271
|
role: "user" | "assistant" | "tool" | "system"
|
|
205
272
|
content: string
|
|
206
273
|
content_multimodal: string | null
|
|
207
274
|
tool_calls_json: string | null
|
|
208
275
|
tool_call_id: string | null
|
|
209
276
|
reasoning_content: string | null
|
|
277
|
+
/** null on rows written before this field existed (legacy). */
|
|
278
|
+
source: MessageSource | null
|
|
210
279
|
token_count: number
|
|
211
280
|
created_at: number
|
|
212
281
|
updated_at: number
|
|
@@ -234,6 +303,8 @@ export interface TraceDoc {
|
|
|
234
303
|
created_at: number
|
|
235
304
|
/** G9 causal stream id for this run (agent-loop.ts's causalStreamId), when the causal log is enabled. */
|
|
236
305
|
causal_stream_id?: string | null
|
|
306
|
+
/** Catalog agent id when this trace belongs to a source:"catalog" agent. */
|
|
307
|
+
catalog_agent_id?: string
|
|
237
308
|
}
|
|
238
309
|
|
|
239
310
|
export interface ReflectionDoc {
|
|
@@ -300,6 +371,8 @@ export interface AgentRunDoc {
|
|
|
300
371
|
acceptance_json: string | null
|
|
301
372
|
/** Fixed-worker epoch recorded at run creation: {provider, model, app_version, tool_catalog_hash}. */
|
|
302
373
|
epoch_json: string | null
|
|
374
|
+
/** `toIndexable`-encoded catalog agent id, or `NO_PARENT` for ordinary agents. */
|
|
375
|
+
catalog_agent_id?: string
|
|
303
376
|
|
|
304
377
|
error: string | null
|
|
305
378
|
created_at: number
|
|
@@ -310,7 +383,7 @@ export interface AgentRunDoc {
|
|
|
310
383
|
export interface JobDoc {
|
|
311
384
|
id: string
|
|
312
385
|
lane: string
|
|
313
|
-
type: "chat_turn" | "worker_task" | "
|
|
386
|
+
type: "chat_turn" | "worker_task" | "goal_run"
|
|
314
387
|
status: "pending" | "running" | "completed" | "failed" | "cancelled" | "interrupted"
|
|
315
388
|
priority: number
|
|
316
389
|
payload_json: string
|
|
@@ -386,10 +459,87 @@ export interface ProofPacketDoc {
|
|
|
386
459
|
known_limits: string | null
|
|
387
460
|
/** Fixed-worker epoch this run executed under — copied from AgentRunDoc.epoch_json. */
|
|
388
461
|
epoch_json: string | null
|
|
462
|
+
/** Required when met=true. Points at an independent verified verdict. */
|
|
463
|
+
verification_id: string
|
|
464
|
+
/** `toIndexable`-encoded catalog agent id, or `NO_PARENT`. */
|
|
465
|
+
catalog_agent_id: string
|
|
389
466
|
met: boolean
|
|
390
467
|
created_at: number
|
|
391
468
|
}
|
|
392
469
|
|
|
470
|
+
/** Durable metadata for binary evidence managed under HIVE_HOME/artifacts. */
|
|
471
|
+
export interface ArtifactDoc {
|
|
472
|
+
id: string
|
|
473
|
+
run_id: string | null
|
|
474
|
+
task_id: string | null
|
|
475
|
+
user_id: string
|
|
476
|
+
kind: string
|
|
477
|
+
path: string
|
|
478
|
+
mime_type: string
|
|
479
|
+
size: number
|
|
480
|
+
sha256: string
|
|
481
|
+
width: number | null
|
|
482
|
+
height: number | null
|
|
483
|
+
status: "active" | "expired"
|
|
484
|
+
created_at: number
|
|
485
|
+
expires_at: number
|
|
486
|
+
expired_at: number | null
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
export interface VerificationCriterionResult {
|
|
490
|
+
criterion_id: string
|
|
491
|
+
met: boolean
|
|
492
|
+
evidence: string[]
|
|
493
|
+
check_used: string
|
|
494
|
+
confidence: number
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
export interface VerificationVerdict {
|
|
498
|
+
status: "verified" | "rejected" | "needs_evidence"
|
|
499
|
+
criterion_results: VerificationCriterionResult[]
|
|
500
|
+
summary: string
|
|
501
|
+
retry_guidance: string | null
|
|
502
|
+
risks: string[]
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
/** Independent acceptance-gate record. Executors cannot write a verified proof packet without one. */
|
|
506
|
+
export interface VerificationDoc {
|
|
507
|
+
id: string
|
|
508
|
+
run_id: string
|
|
509
|
+
task_id: string
|
|
510
|
+
/** Any AgentDoc id (catalog-seeded or not). */
|
|
511
|
+
executor_agent_id: string
|
|
512
|
+
verifier_agent_id: "acceptance_verifier"
|
|
513
|
+
objective: string
|
|
514
|
+
acceptance_json: string
|
|
515
|
+
verdict_json: string
|
|
516
|
+
status: VerificationVerdict["status"]
|
|
517
|
+
attempt: number
|
|
518
|
+
executor_epoch_json: string
|
|
519
|
+
verifier_epoch_json: string
|
|
520
|
+
/** Diagnostic classification when the verifier could not produce a usable verdict. */
|
|
521
|
+
failure_code?: "invalid_output" | "verifier_error" | null
|
|
522
|
+
/** Sanitized diagnostic detail; never used to authorize success. */
|
|
523
|
+
failure_detail?: string | null
|
|
524
|
+
/** Bounded and sanitized preview of the verifier output. */
|
|
525
|
+
raw_output_preview?: string | null
|
|
526
|
+
verifier_provider?: string | null
|
|
527
|
+
verifier_model?: string | null
|
|
528
|
+
created_at: number
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
export interface AgentProposalDoc {
|
|
532
|
+
id: string
|
|
533
|
+
type: "move_tool" | "create_agent" | "disable_agent"
|
|
534
|
+
agent_id: string
|
|
535
|
+
proposed_change_json: string
|
|
536
|
+
evidence_trace_ids_json: string
|
|
537
|
+
confidence: number
|
|
538
|
+
status: "proposed" | "approved" | "rejected" | "applied"
|
|
539
|
+
created_at: number
|
|
540
|
+
updated_at: number
|
|
541
|
+
}
|
|
542
|
+
|
|
393
543
|
export interface TaskRunDoc {
|
|
394
544
|
id: string
|
|
395
545
|
task_id: string
|
|
@@ -413,45 +563,23 @@ export interface MemoryDoc {
|
|
|
413
563
|
updated_at: number
|
|
414
564
|
}
|
|
415
565
|
|
|
416
|
-
export interface ProjectDoc {
|
|
417
|
-
id: string
|
|
418
|
-
user_id: string
|
|
419
|
-
/** `toIndexable`-encoded — `NO_PARENT` when unset. */
|
|
420
|
-
agent_id: string
|
|
421
|
-
name: string
|
|
422
|
-
description: string | null
|
|
423
|
-
type: string
|
|
424
|
-
task: string | null
|
|
425
|
-
progress: number
|
|
426
|
-
status: "pending" | "active" | "paused" | "done" | "failed"
|
|
427
|
-
context: string | null
|
|
428
|
-
/** `toIndexable`-encoded — `NO_PARENT` for a top-level project. */
|
|
429
|
-
parent_id: string
|
|
430
|
-
created_at: number
|
|
431
|
-
updated_at: number
|
|
432
|
-
started_at: number | null
|
|
433
|
-
completed_at: number | null
|
|
434
|
-
}
|
|
435
|
-
|
|
436
566
|
export interface TaskDoc {
|
|
437
567
|
id: string
|
|
438
|
-
project_id: string
|
|
439
568
|
/** `toIndexable`-encoded — `NO_PARENT` when unset. */
|
|
440
569
|
agent_id: string
|
|
441
|
-
parent_task_id: string | null
|
|
442
570
|
name: string
|
|
443
571
|
description: string | null
|
|
444
|
-
|
|
445
|
-
status: "pending" | "queued" | "in_progress" | "completed" | "failed" | "blocked"
|
|
572
|
+
status: "pending" | "in_progress" | "completed" | "failed" | "blocked"
|
|
446
573
|
progress: number
|
|
447
|
-
priority: number
|
|
448
|
-
depends_on: string | null
|
|
449
574
|
result: string | null
|
|
450
575
|
error: string | null
|
|
451
576
|
metadata: string | null
|
|
452
577
|
job_id: string | null
|
|
453
578
|
run_id: string | null
|
|
454
579
|
thread_id: string | null
|
|
580
|
+
delegation_group_id?: string | null
|
|
581
|
+
/** `toIndexable`-encoded catalog agent id, or `NO_PARENT`. */
|
|
582
|
+
catalog_agent_id?: string
|
|
455
583
|
started_at: number | null
|
|
456
584
|
attempts: number
|
|
457
585
|
created_at: number
|
|
@@ -459,6 +587,35 @@ export interface TaskDoc {
|
|
|
459
587
|
completed_at: number | null
|
|
460
588
|
}
|
|
461
589
|
|
|
590
|
+
export interface DelegationGroupOutcome {
|
|
591
|
+
task_id: string
|
|
592
|
+
job_id: string
|
|
593
|
+
worker_id: string
|
|
594
|
+
task_name: string
|
|
595
|
+
ok: boolean
|
|
596
|
+
result: unknown | null
|
|
597
|
+
error: string | null
|
|
598
|
+
finished_at: number
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
export interface DelegationGroupDoc {
|
|
602
|
+
id: string
|
|
603
|
+
turn_id: string
|
|
604
|
+
thread_id: string
|
|
605
|
+
channel: string
|
|
606
|
+
user_id: string
|
|
607
|
+
session_id: string
|
|
608
|
+
coordinator_agent_id: string
|
|
609
|
+
status: "open" | "sealed" | "ready" | "notified"
|
|
610
|
+
task_ids_json: string
|
|
611
|
+
outcomes_json: string
|
|
612
|
+
summary_job_id: string | null
|
|
613
|
+
created_at: number
|
|
614
|
+
sealed_at: number | null
|
|
615
|
+
ready_at: number | null
|
|
616
|
+
notified_at: number | null
|
|
617
|
+
}
|
|
618
|
+
|
|
462
619
|
export interface AgentBusMessageDoc {
|
|
463
620
|
id: string
|
|
464
621
|
event_type: string
|
|
@@ -473,6 +630,23 @@ export interface AgentBusMessageDoc {
|
|
|
473
630
|
created_at: number
|
|
474
631
|
}
|
|
475
632
|
|
|
633
|
+
export interface NarrationEventDoc {
|
|
634
|
+
id: string
|
|
635
|
+
turn_id: string
|
|
636
|
+
thread_id: string
|
|
637
|
+
channel: string
|
|
638
|
+
user_id: string
|
|
639
|
+
session_id: string
|
|
640
|
+
agent_id: string
|
|
641
|
+
agent_name: string
|
|
642
|
+
kind: "delegated" | "worker_started" | "tool_call" | "tool_result" | "verifying" | "verified" | "failed" | "group_ready"
|
|
643
|
+
status: "queued" | "running" | "done" | "error"
|
|
644
|
+
label: string
|
|
645
|
+
detail: string | null
|
|
646
|
+
dedupe_key: string
|
|
647
|
+
created_at: number
|
|
648
|
+
}
|
|
649
|
+
|
|
476
650
|
// ─── Stage 7: meeting ─────────────────────────────────────────────────────────
|
|
477
651
|
|
|
478
652
|
export interface MeetingSessionDoc {
|