@polderlabs/bizar 10.3.0 → 10.4.1
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/bizar-dash/dist/assets/{ActivityFeed-xXiUCZLB.js → ActivityFeed-DtRtg-JN.js} +1 -1
- package/bizar-dash/dist/assets/{ActivityFeed-xXiUCZLB.js.map → ActivityFeed-DtRtg-JN.js.map} +1 -1
- package/bizar-dash/dist/assets/{ActivityView-nOYhCp3h.js → ActivityView-CoTXDyU_.js} +1 -1
- package/bizar-dash/dist/assets/{ActivityView-nOYhCp3h.js.map → ActivityView-CoTXDyU_.js.map} +1 -1
- package/bizar-dash/dist/assets/{AdminView-Coi4V3sq.js → AdminView-DNc5Ll7L.js} +1 -1
- package/bizar-dash/dist/assets/{AdminView-Coi4V3sq.js.map → AdminView-DNc5Ll7L.js.map} +1 -1
- package/bizar-dash/dist/assets/{AgentActivity-nEri4lbx.js → AgentActivity-CrX7LmQ6.js} +1 -1
- package/bizar-dash/dist/assets/{AgentActivity-nEri4lbx.js.map → AgentActivity-CrX7LmQ6.js.map} +1 -1
- package/bizar-dash/dist/assets/{AgentsView-ByiIJ0ej.js → AgentsView-Du-G_skK.js} +1 -1
- package/bizar-dash/dist/assets/{AgentsView-ByiIJ0ej.js.map → AgentsView-Du-G_skK.js.map} +1 -1
- package/bizar-dash/dist/assets/{Alert-Dg_Vwxh5.js → Alert-B6DjfRFI.js} +1 -1
- package/bizar-dash/dist/assets/{Alert-Dg_Vwxh5.js.map → Alert-B6DjfRFI.js.map} +1 -1
- package/bizar-dash/dist/assets/{ArtifactsView-CGclRNnz.js → ArtifactsView-znhN8GTR.js} +1 -1
- package/bizar-dash/dist/assets/{ArtifactsView-CGclRNnz.js.map → ArtifactsView-znhN8GTR.js.map} +1 -1
- package/bizar-dash/dist/assets/{AuthView-utVm6M3D.js → AuthView-Rk8eKUPr.js} +1 -1
- package/bizar-dash/dist/assets/{AuthView-utVm6M3D.js.map → AuthView-Rk8eKUPr.js.map} +1 -1
- package/bizar-dash/dist/assets/{Avatar-CXDZdKy4.js → Avatar-B41upSD1.js} +1 -1
- package/bizar-dash/dist/assets/{Avatar-CXDZdKy4.js.map → Avatar-B41upSD1.js.map} +1 -1
- package/bizar-dash/dist/assets/{BackgroundJobsView-j603pz6o.js → BackgroundJobsView-BLWuN9qz.js} +1 -1
- package/bizar-dash/dist/assets/{BackgroundJobsView-j603pz6o.js.map → BackgroundJobsView-BLWuN9qz.js.map} +1 -1
- package/bizar-dash/dist/assets/{BackupView-DgvnntTE.js → BackupView-CqbtcnuQ.js} +1 -1
- package/bizar-dash/dist/assets/{BackupView-DgvnntTE.js.map → BackupView-CqbtcnuQ.js.map} +1 -1
- package/bizar-dash/dist/assets/{Card-D9019JOD.js → Card-rF59wHiO.js} +1 -1
- package/bizar-dash/dist/assets/{Card-D9019JOD.js.map → Card-rF59wHiO.js.map} +1 -1
- package/bizar-dash/dist/assets/{ChatView-C0cTgj5d.js → ChatView-CUriVEgU.js} +1 -1
- package/bizar-dash/dist/assets/{ChatView-C0cTgj5d.js.map → ChatView-CUriVEgU.js.map} +1 -1
- package/bizar-dash/dist/assets/{Chip-DQtalZ4y.js → Chip-Dc2KmeWl.js} +1 -1
- package/bizar-dash/dist/assets/{Chip-DQtalZ4y.js.map → Chip-Dc2KmeWl.js.map} +1 -1
- package/bizar-dash/dist/assets/{ClaudeSessionsView-H3Bqjo6b.js → ClaudeSessionsView-CiaHQdDZ.js} +1 -1
- package/bizar-dash/dist/assets/{ClaudeSessionsView-H3Bqjo6b.js.map → ClaudeSessionsView-CiaHQdDZ.js.map} +1 -1
- package/bizar-dash/dist/assets/{ClipboardView-BAguaKbx.js → ClipboardView-DdP6aVso.js} +1 -1
- package/bizar-dash/dist/assets/{ClipboardView-BAguaKbx.js.map → ClipboardView-DdP6aVso.js.map} +1 -1
- package/bizar-dash/dist/assets/{ConfigView-DWHJgoe8.js → ConfigView-B2ysnTZU.js} +1 -1
- package/bizar-dash/dist/assets/{ConfigView-DWHJgoe8.js.map → ConfigView-B2ysnTZU.js.map} +1 -1
- package/bizar-dash/dist/assets/{DiagnosticsView-oCT624hk.js → DiagnosticsView-88OZ5k0f.js} +1 -1
- package/bizar-dash/dist/assets/{DiagnosticsView-oCT624hk.js.map → DiagnosticsView-88OZ5k0f.js.map} +1 -1
- package/bizar-dash/dist/assets/{DialogsView-CqHNals_.js → DialogsView-BcqDDCZQ.js} +1 -1
- package/bizar-dash/dist/assets/{DialogsView-CqHNals_.js.map → DialogsView-BcqDDCZQ.js.map} +1 -1
- package/bizar-dash/dist/assets/{DoctorView-6kfQq_Mx.js → DoctorView-BQwqvMAh.js} +1 -1
- package/bizar-dash/dist/assets/{DoctorView-6kfQq_Mx.js.map → DoctorView-BQwqvMAh.js.map} +1 -1
- package/bizar-dash/dist/assets/{EmptyState-DLmtBX_6.js → EmptyState-D65J5FQN.js} +1 -1
- package/bizar-dash/dist/assets/{EmptyState-DLmtBX_6.js.map → EmptyState-D65J5FQN.js.map} +1 -1
- package/bizar-dash/dist/assets/{EnvVarsView-DySOXlP1.js → EnvVarsView-DX-3oGH-.js} +1 -1
- package/bizar-dash/dist/assets/{EnvVarsView-DySOXlP1.js.map → EnvVarsView-DX-3oGH-.js.map} +1 -1
- package/bizar-dash/dist/assets/{ErrorState-Bump8diE.js → ErrorState-DULZnttJ.js} +1 -1
- package/bizar-dash/dist/assets/{ErrorState-Bump8diE.js.map → ErrorState-DULZnttJ.js.map} +1 -1
- package/bizar-dash/dist/assets/{EvalView-FnZ5d93z.js → EvalView-CpdFu_ID.js} +1 -1
- package/bizar-dash/dist/assets/{EvalView-FnZ5d93z.js.map → EvalView-CpdFu_ID.js.map} +1 -1
- package/bizar-dash/dist/assets/{GoalsView-C4m1WnVv.js → GoalsView-Br8oPPfb.js} +1 -1
- package/bizar-dash/dist/assets/{GoalsView-C4m1WnVv.js.map → GoalsView-Br8oPPfb.js.map} +1 -1
- package/bizar-dash/dist/assets/{Grid-dEnoGGws.js → Grid-BSXhsCPC.js} +1 -1
- package/bizar-dash/dist/assets/{Grid-dEnoGGws.js.map → Grid-BSXhsCPC.js.map} +1 -1
- package/bizar-dash/dist/assets/{HistoryView-xdRybjZ2.js → HistoryView-D0J3aoZF.js} +1 -1
- package/bizar-dash/dist/assets/{HistoryView-xdRybjZ2.js.map → HistoryView-D0J3aoZF.js.map} +1 -1
- package/bizar-dash/dist/assets/{Input-BSa3lh_-.js → Input-CZmRw5QX.js} +1 -1
- package/bizar-dash/dist/assets/{Input-BSa3lh_-.js.map → Input-CZmRw5QX.js.map} +1 -1
- package/bizar-dash/dist/assets/{LibrariesView-1zR04Eci.js → LibrariesView-B1YX9wzp.js} +1 -1
- package/bizar-dash/dist/assets/{LibrariesView-1zR04Eci.js.map → LibrariesView-B1YX9wzp.js.map} +1 -1
- package/bizar-dash/dist/assets/{LightRAGView-PubmA9oL.js → LightRAGView-CykR0t9y.js} +1 -1
- package/bizar-dash/dist/assets/{LightRAGView-PubmA9oL.js.map → LightRAGView-CykR0t9y.js.map} +1 -1
- package/bizar-dash/dist/assets/{ListHeader-Ak9WJd39.js → ListHeader-Dpun-r36.js} +1 -1
- package/bizar-dash/dist/assets/{ListHeader-Ak9WJd39.js.map → ListHeader-Dpun-r36.js.map} +1 -1
- package/bizar-dash/dist/assets/{MemoryView-DBGpuETw.js → MemoryView-BbER5ZKt.js} +1 -1
- package/bizar-dash/dist/assets/{MemoryView-DBGpuETw.js.map → MemoryView-BbER5ZKt.js.map} +1 -1
- package/bizar-dash/dist/assets/{MiscView-DufqBHkX.js → MiscView-DLNEGdML.js} +1 -1
- package/bizar-dash/dist/assets/{MiscView-DufqBHkX.js.map → MiscView-DLNEGdML.js.map} +1 -1
- package/bizar-dash/dist/assets/{ModsView-DcX6eVU2.js → ModsView-P7gDeNHM.js} +1 -1
- package/bizar-dash/dist/assets/{ModsView-DcX6eVU2.js.map → ModsView-P7gDeNHM.js.map} +1 -1
- package/bizar-dash/dist/assets/{NotificationsView-B8IhHRQC.js → NotificationsView-DAm2O0yf.js} +1 -1
- package/bizar-dash/dist/assets/{NotificationsView-B8IhHRQC.js.map → NotificationsView-DAm2O0yf.js.map} +1 -1
- package/bizar-dash/dist/assets/{ObsidianView-DEuk65zS.js → ObsidianView-Ci80gnwS.js} +1 -1
- package/bizar-dash/dist/assets/{ObsidianView-DEuk65zS.js.map → ObsidianView-Ci80gnwS.js.map} +1 -1
- package/bizar-dash/dist/assets/{OverviewView-CTI2spTd.js → OverviewView-rriw1GjA.js} +1 -1
- package/bizar-dash/dist/assets/{OverviewView-CTI2spTd.js.map → OverviewView-rriw1GjA.js.map} +1 -1
- package/bizar-dash/dist/assets/{ProgressBar-D3lkz42E.js → ProgressBar-BahmeJhP.js} +1 -1
- package/bizar-dash/dist/assets/{ProgressBar-D3lkz42E.js.map → ProgressBar-BahmeJhP.js.map} +1 -1
- package/bizar-dash/dist/assets/{ProjectsView-Du0LzE7A.js → ProjectsView-ChzM12bs.js} +1 -1
- package/bizar-dash/dist/assets/{ProjectsView-Du0LzE7A.js.map → ProjectsView-ChzM12bs.js.map} +1 -1
- package/bizar-dash/dist/assets/{ProvidersView-5bCgXwBo.js → ProvidersView-BftGn8Cr.js} +1 -1
- package/bizar-dash/dist/assets/{ProvidersView-5bCgXwBo.js.map → ProvidersView-BftGn8Cr.js.map} +1 -1
- package/bizar-dash/dist/assets/{SchedulesView-DFHdIz5P.js → SchedulesView-CtNxtzN6.js} +1 -1
- package/bizar-dash/dist/assets/{SchedulesView-DFHdIz5P.js.map → SchedulesView-CtNxtzN6.js.map} +1 -1
- package/bizar-dash/dist/assets/{Select-C8EJj4NM.js → Select-0VcfTDeL.js} +1 -1
- package/bizar-dash/dist/assets/{Select-C8EJj4NM.js.map → Select-0VcfTDeL.js.map} +1 -1
- package/bizar-dash/dist/assets/{SettingsRow-BdOOmYMD.js → SettingsRow-BLic3DQl.js} +1 -1
- package/bizar-dash/dist/assets/{SettingsRow-BdOOmYMD.js.map → SettingsRow-BLic3DQl.js.map} +1 -1
- package/bizar-dash/dist/assets/{SettingsView-CqwQ6Knv.js → SettingsView-BjS3i4nr.js} +1 -1
- package/bizar-dash/dist/assets/{SettingsView-CqwQ6Knv.js.map → SettingsView-BjS3i4nr.js.map} +1 -1
- package/bizar-dash/dist/assets/{Sheet-Cztsvgse.js → Sheet-BOProMs2.js} +1 -1
- package/bizar-dash/dist/assets/{Sheet-Cztsvgse.js.map → Sheet-BOProMs2.js.map} +1 -1
- package/bizar-dash/dist/assets/{Slider-BexNfF6K.js → Slider-B0eLEEUt.js} +1 -1
- package/bizar-dash/dist/assets/{Slider-BexNfF6K.js.map → Slider-B0eLEEUt.js.map} +1 -1
- package/bizar-dash/dist/assets/{Sparkline-CLZBtvsN.js → Sparkline-SSrdgyW0.js} +1 -1
- package/bizar-dash/dist/assets/{Sparkline-CLZBtvsN.js.map → Sparkline-SSrdgyW0.js.map} +1 -1
- package/bizar-dash/dist/assets/{Switch-B1tiRwNK.js → Switch-B3EQzb_q.js} +1 -1
- package/bizar-dash/dist/assets/{Switch-B1tiRwNK.js.map → Switch-B3EQzb_q.js.map} +1 -1
- package/bizar-dash/dist/assets/{TasksView-CT0fPlos.js → TasksView-SWjF_ZUQ.js} +1 -1
- package/bizar-dash/dist/assets/{TasksView-CT0fPlos.js.map → TasksView-SWjF_ZUQ.js.map} +1 -1
- package/bizar-dash/dist/assets/{Textarea-D_TPpVMy.js → Textarea-QuofpMlq.js} +1 -1
- package/bizar-dash/dist/assets/{Textarea-D_TPpVMy.js.map → Textarea-QuofpMlq.js.map} +1 -1
- package/bizar-dash/dist/assets/{UpdateView-tD2q2OhW.js → UpdateView-CEHW2nd6.js} +1 -1
- package/bizar-dash/dist/assets/{UpdateView-tD2q2OhW.js.map → UpdateView-CEHW2nd6.js.map} +1 -1
- package/bizar-dash/dist/assets/{UsageView-B4BuAFKA.js → UsageView-BqOw6FBg.js} +1 -1
- package/bizar-dash/dist/assets/{UsageView-B4BuAFKA.js.map → UsageView-BqOw6FBg.js.map} +1 -1
- package/bizar-dash/dist/assets/{ViewHeader-V_SzbUpw.js → ViewHeader-B6P-C4GD.js} +1 -1
- package/bizar-dash/dist/assets/{ViewHeader-V_SzbUpw.js.map → ViewHeader-B6P-C4GD.js.map} +1 -1
- package/bizar-dash/dist/assets/{VoiceView-D3vb5OM2.js → VoiceView-CwrPwWgi.js} +1 -1
- package/bizar-dash/dist/assets/{VoiceView-D3vb5OM2.js.map → VoiceView-CwrPwWgi.js.map} +1 -1
- package/bizar-dash/dist/assets/{brain-BmfWcitQ.js → brain-CwZt9Kta.js} +1 -1
- package/bizar-dash/dist/assets/{brain-BmfWcitQ.js.map → brain-CwZt9Kta.js.map} +1 -1
- package/bizar-dash/dist/assets/{calendar-VntJUzFB.js → calendar-C5oK0_nM.js} +1 -1
- package/bizar-dash/dist/assets/{calendar-VntJUzFB.js.map → calendar-C5oK0_nM.js.map} +1 -1
- package/bizar-dash/dist/assets/{circle-KrQQySeK.js → circle-D1Lc_P2a.js} +1 -1
- package/bizar-dash/dist/assets/{circle-KrQQySeK.js.map → circle-D1Lc_P2a.js.map} +1 -1
- package/bizar-dash/dist/assets/{circle-alert-CQ9MLygI.js → circle-alert-HdHe7m8K.js} +1 -1
- package/bizar-dash/dist/assets/{circle-alert-CQ9MLygI.js.map → circle-alert-HdHe7m8K.js.map} +1 -1
- package/bizar-dash/dist/assets/{circle-check-COtVgsWw.js → circle-check-Cs-xoV7R.js} +1 -1
- package/bizar-dash/dist/assets/{circle-check-COtVgsWw.js.map → circle-check-Cs-xoV7R.js.map} +1 -1
- package/bizar-dash/dist/assets/{clock-C0GlM4qp.js → clock-DEIuPV60.js} +1 -1
- package/bizar-dash/dist/assets/{clock-C0GlM4qp.js.map → clock-DEIuPV60.js.map} +1 -1
- package/bizar-dash/dist/assets/{download-CW4DmtRe.js → download-Clkq90Ct.js} +1 -1
- package/bizar-dash/dist/assets/{download-CW4DmtRe.js.map → download-Clkq90Ct.js.map} +1 -1
- package/bizar-dash/dist/assets/{external-link-CAOnh_DH.js → external-link-D5tq2o_I.js} +1 -1
- package/bizar-dash/dist/assets/{external-link-CAOnh_DH.js.map → external-link-D5tq2o_I.js.map} +1 -1
- package/bizar-dash/dist/assets/{file-text-CS1jB_oV.js → file-text-CQ12t7Oc.js} +1 -1
- package/bizar-dash/dist/assets/{file-text-CS1jB_oV.js.map → file-text-CQ12t7Oc.js.map} +1 -1
- package/bizar-dash/dist/assets/{filter-DyQbml3L.js → filter-BcbE37wP.js} +1 -1
- package/bizar-dash/dist/assets/{filter-DyQbml3L.js.map → filter-BcbE37wP.js.map} +1 -1
- package/bizar-dash/dist/assets/{git-pull-request-Co6gYfba.js → git-pull-request-D1qNDRia.js} +1 -1
- package/bizar-dash/dist/assets/{git-pull-request-Co6gYfba.js.map → git-pull-request-D1qNDRia.js.map} +1 -1
- package/bizar-dash/dist/assets/{main-CyAIirBB.js → main-Cxeu4LhG.js} +2 -2
- package/bizar-dash/dist/assets/{main-CyAIirBB.js.map → main-Cxeu4LhG.js.map} +1 -1
- package/bizar-dash/dist/assets/{network-CDn43Gsj.js → network-DJdvVaHx.js} +1 -1
- package/bizar-dash/dist/assets/{network-CDn43Gsj.js.map → network-DJdvVaHx.js.map} +1 -1
- package/bizar-dash/dist/assets/{pause-CKYjSTGX.js → pause-DUn9L5PB.js} +1 -1
- package/bizar-dash/dist/assets/{pause-CKYjSTGX.js.map → pause-DUn9L5PB.js.map} +1 -1
- package/bizar-dash/dist/assets/{pencil-BUJ2DpWs.js → pencil-DVrBlYV3.js} +1 -1
- package/bizar-dash/dist/assets/{pencil-BUJ2DpWs.js.map → pencil-DVrBlYV3.js.map} +1 -1
- package/bizar-dash/dist/assets/{play-CGxZWqtW.js → play-CZjsr3XM.js} +1 -1
- package/bizar-dash/dist/assets/{play-CGxZWqtW.js.map → play-CZjsr3XM.js.map} +1 -1
- package/bizar-dash/dist/assets/{plug-CQYGgGSy.js → plug-BKuyIe5W.js} +1 -1
- package/bizar-dash/dist/assets/{plug-CQYGgGSy.js.map → plug-BKuyIe5W.js.map} +1 -1
- package/bizar-dash/dist/assets/{plus-fFxt-8z5.js → plus-77h62zZm.js} +1 -1
- package/bizar-dash/dist/assets/{plus-fFxt-8z5.js.map → plus-77h62zZm.js.map} +1 -1
- package/bizar-dash/dist/assets/{power-Cjgy2KsI.js → power-DLmx-gCP.js} +1 -1
- package/bizar-dash/dist/assets/{power-Cjgy2KsI.js.map → power-DLmx-gCP.js.map} +1 -1
- package/bizar-dash/dist/assets/{power-off-B81hLRah.js → power-off-BFKzHXic.js} +1 -1
- package/bizar-dash/dist/assets/{power-off-B81hLRah.js.map → power-off-BFKzHXic.js.map} +1 -1
- package/bizar-dash/dist/assets/{refresh-ccw-BCXx86xp.js → refresh-ccw-DenGBOcq.js} +1 -1
- package/bizar-dash/dist/assets/{refresh-ccw-BCXx86xp.js.map → refresh-ccw-DenGBOcq.js.map} +1 -1
- package/bizar-dash/dist/assets/{refresh-cw-COTg1nZo.js → refresh-cw-ENBVR8hW.js} +1 -1
- package/bizar-dash/dist/assets/{refresh-cw-COTg1nZo.js.map → refresh-cw-ENBVR8hW.js.map} +1 -1
- package/bizar-dash/dist/assets/{rotate-ccw-BZrEVc0Z.js → rotate-ccw-MxryaY7q.js} +1 -1
- package/bizar-dash/dist/assets/{rotate-ccw-BZrEVc0Z.js.map → rotate-ccw-MxryaY7q.js.map} +1 -1
- package/bizar-dash/dist/assets/{rotate-cw-CsTtaLV2.js → rotate-cw-CDOlRtUR.js} +1 -1
- package/bizar-dash/dist/assets/{rotate-cw-CsTtaLV2.js.map → rotate-cw-CDOlRtUR.js.map} +1 -1
- package/bizar-dash/dist/assets/{save-DtMTge1F.js → save-Db1b-1Uq.js} +1 -1
- package/bizar-dash/dist/assets/{save-DtMTge1F.js.map → save-Db1b-1Uq.js.map} +1 -1
- package/bizar-dash/dist/assets/{send-DyBhyk8t.js → send-yz6HFZM5.js} +1 -1
- package/bizar-dash/dist/assets/{send-DyBhyk8t.js.map → send-yz6HFZM5.js.map} +1 -1
- package/bizar-dash/dist/assets/{shield-alert-BPGJlRF8.js → shield-alert-DY6RAaC8.js} +1 -1
- package/bizar-dash/dist/assets/{shield-alert-BPGJlRF8.js.map → shield-alert-DY6RAaC8.js.map} +1 -1
- package/bizar-dash/dist/assets/{trash-2-2NsyTU8c.js → trash-2-Cv7U38jw.js} +1 -1
- package/bizar-dash/dist/assets/{trash-2-2NsyTU8c.js.map → trash-2-Cv7U38jw.js.map} +1 -1
- package/bizar-dash/dist/assets/{trending-up-BXwP23VK.js → trending-up-CRPNagyX.js} +1 -1
- package/bizar-dash/dist/assets/{trending-up-BXwP23VK.js.map → trending-up-CRPNagyX.js.map} +1 -1
- package/bizar-dash/dist/assets/{triangle-alert-DFmQ_RXN.js → triangle-alert-tUTXbcEP.js} +1 -1
- package/bizar-dash/dist/assets/{triangle-alert-DFmQ_RXN.js.map → triangle-alert-tUTXbcEP.js.map} +1 -1
- package/bizar-dash/dist/assets/{upload-Cj-HYRYV.js → upload-Cq7uTsrT.js} +1 -1
- package/bizar-dash/dist/assets/{upload-Cj-HYRYV.js.map → upload-Cq7uTsrT.js.map} +1 -1
- package/bizar-dash/dist/assets/{zap-BaOiybcl.js → zap-5lAQBAPX.js} +1 -1
- package/bizar-dash/dist/assets/{zap-BaOiybcl.js.map → zap-5lAQBAPX.js.map} +1 -1
- package/bizar-dash/dist/index.html +1 -1
- package/bizar-dash/src/server/api.mjs +5 -1
- package/bizar-dash/src/web/v8/shell/Sidebar.tsx +3 -3
- package/cli/doctor.mjs +1 -1
- package/cli/provision.mjs +8 -0
- package/package.json +1 -1
- package/packages/sdk/dist/mcp/server.js +41 -409
- package/packages/sdk/dist/router/q-learning-router.d.ts +3 -5
- package/packages/sdk/dist/router/q-learning-router.js +9 -5
- package/packages/sdk/package.json +1 -1
|
@@ -38,17 +38,8 @@ import { existsSync, readFileSync, writeFileSync, mkdirSync, readdirSync } from
|
|
|
38
38
|
import { join } from "node:path";
|
|
39
39
|
import { homedir } from "node:os";
|
|
40
40
|
import { listNotes, readNote, searchNotes, writeNote, resolveVaultRoot, } from "../memory/index.js";
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import { QLearningRouter } from "../router/q-learning-router.js";
|
|
44
|
-
import { runDistillation } from "../router/memory-distillation.js";
|
|
45
|
-
import { decideAgentWith, loadModelRegistry, resolveAgentModel, resolveTierModel, } from "../router/index.js";
|
|
46
|
-
import { bizarAgentRegistry } from "../agent-registry.js";
|
|
47
|
-
import { initSwarm as initSwarmOnRegistry, DEFAULT_TOPOLOGY, DEFAULT_MAX_AGENTS, } from "../swarm-topology.js";
|
|
48
|
-
import { getSharedConsensus } from "../consensus/index.js";
|
|
49
|
-
import { createFederation, } from "../federation/index.js";
|
|
50
|
-
import { startHeartbeat, stopHeartbeat, failHeartbeat, } from "../agent/heartbeat.js";
|
|
51
|
-
import { addCronTask, listCronTasks, removeCronTask, } from "../agent/cron.js";
|
|
41
|
+
import { listInstincts } from "../learning/instincts.js";
|
|
42
|
+
import { listDecisions } from "../learning/decisions.js";
|
|
52
43
|
/**
|
|
53
44
|
* Build a single MCP tool definition with a zod-less validator. This
|
|
54
45
|
* avoids taking a hard dep on zod at SDK-level; the dashboard or
|
|
@@ -121,6 +112,43 @@ const memorySearchTool = defineTool("memory_search", "Full-text search the Bizar
|
|
|
121
112
|
}
|
|
122
113
|
}, { readOnlyHint: true });
|
|
123
114
|
// ---------------------------------------------------------------------------
|
|
115
|
+
// Pillar D — instinct + decision read-back (v10.3.0)
|
|
116
|
+
// ---------------------------------------------------------------------------
|
|
117
|
+
const listInstinctsTool = defineTool("list_instincts", "List recorded instincts (Pillar D auto-instinct + learning-extract). scope: project (default) or global. Returns up to `limit` entries (default 50) from `.bizar/learning/instincts.jsonl`.", { scope: "string", project: "string", limit: "number" }, async ({ scope, project, limit }) => {
|
|
118
|
+
try {
|
|
119
|
+
const opts = {};
|
|
120
|
+
if (scope === "project" || scope === "global")
|
|
121
|
+
opts.scope = scope;
|
|
122
|
+
if (project)
|
|
123
|
+
opts.project = project;
|
|
124
|
+
const entries = listInstincts(opts);
|
|
125
|
+
const n = typeof limit === "number" ? limit : 50;
|
|
126
|
+
const sliced = entries.slice(-n);
|
|
127
|
+
if (sliced.length === 0)
|
|
128
|
+
return ok("no_instincts");
|
|
129
|
+
return ok(JSON.stringify(sliced, null, 2));
|
|
130
|
+
}
|
|
131
|
+
catch (e) {
|
|
132
|
+
return err(String(e));
|
|
133
|
+
}
|
|
134
|
+
}, { readOnlyHint: true });
|
|
135
|
+
const listDecisionsTool = defineTool("list_decisions", "List architectural / project decisions logged via Pillar D. Returns up to `limit` entries (default 50) from `.bizar/learning/decisions.jsonl`.", { project: "string", limit: "number" }, async ({ project, limit }) => {
|
|
136
|
+
try {
|
|
137
|
+
const opts = {};
|
|
138
|
+
if (project)
|
|
139
|
+
opts.project = project;
|
|
140
|
+
const entries = listDecisions(opts);
|
|
141
|
+
const n = typeof limit === "number" ? limit : 50;
|
|
142
|
+
const sliced = entries.slice(-n);
|
|
143
|
+
if (sliced.length === 0)
|
|
144
|
+
return ok("no_decisions");
|
|
145
|
+
return ok(JSON.stringify(sliced, null, 2));
|
|
146
|
+
}
|
|
147
|
+
catch (e) {
|
|
148
|
+
return err(String(e));
|
|
149
|
+
}
|
|
150
|
+
}, { readOnlyHint: true });
|
|
151
|
+
// ---------------------------------------------------------------------------
|
|
124
152
|
// Plan / KB tools
|
|
125
153
|
// ---------------------------------------------------------------------------
|
|
126
154
|
const KB_HOME = join(homedir(), ".bizar_kb");
|
|
@@ -307,388 +335,6 @@ const graphPathTool = defineTool("graph_path", "Find the shortest path between t
|
|
|
307
335
|
}
|
|
308
336
|
}, { readOnlyHint: true });
|
|
309
337
|
// ---------------------------------------------------------------------------
|
|
310
|
-
// Swarm / agent lifecycle tools (F-032)
|
|
311
|
-
// ---------------------------------------------------------------------------
|
|
312
|
-
const agentSpawnTool = defineTool("agent_spawn", "Spawn a new agent in the in-process BizarAgentRegistry. Returns the new agentId. Heartbeat is a stub — this registry is a coordination surface, not an agent runtime.", { type: "string", name: "string", priority: "string", metadata: "string" }, async ({ type, name, priority, metadata }) => {
|
|
313
|
-
try {
|
|
314
|
-
let parsedMetadata;
|
|
315
|
-
if (metadata && typeof metadata === "string" && metadata.trim().length > 0) {
|
|
316
|
-
try {
|
|
317
|
-
parsedMetadata = JSON.parse(metadata);
|
|
318
|
-
}
|
|
319
|
-
catch {
|
|
320
|
-
return err("agent_spawn: `metadata` must be a JSON string");
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
const result = bizarAgentRegistry.registerAgent({
|
|
324
|
-
type,
|
|
325
|
-
name,
|
|
326
|
-
priority,
|
|
327
|
-
metadata: parsedMetadata,
|
|
328
|
-
});
|
|
329
|
-
return ok(JSON.stringify(result, null, 2));
|
|
330
|
-
}
|
|
331
|
-
catch (e) {
|
|
332
|
-
return err(String(e));
|
|
333
|
-
}
|
|
334
|
-
});
|
|
335
|
-
const agentListTool = defineTool("agent_list", "List agents tracked by the in-process BizarAgentRegistry. Filter by status (active|terminated|all) and/or type. Supports limit/offset pagination.", { status: "string", type: "string", limit: "number", offset: "number" }, async ({ status, type, limit, offset }) => {
|
|
336
|
-
try {
|
|
337
|
-
const allowedStatuses = ["active", "terminated", "all"];
|
|
338
|
-
const s = allowedStatuses.includes(status ?? "")
|
|
339
|
-
? status
|
|
340
|
-
: "all";
|
|
341
|
-
const result = bizarAgentRegistry.listAgents({
|
|
342
|
-
status: s,
|
|
343
|
-
type,
|
|
344
|
-
limit: typeof limit === "number" ? limit : undefined,
|
|
345
|
-
offset: typeof offset === "number" ? offset : undefined,
|
|
346
|
-
});
|
|
347
|
-
return ok(JSON.stringify(result, null, 2));
|
|
348
|
-
}
|
|
349
|
-
catch (e) {
|
|
350
|
-
return err(String(e));
|
|
351
|
-
}
|
|
352
|
-
}, { readOnlyHint: true });
|
|
353
|
-
const agentTerminateTool = defineTool("agent_terminate", "Terminate a registered agent. Returns the agentId, status, and terminatedAt timestamp. No-op if the agent is already terminated.", { agentId: "string", graceful: "boolean", reason: "string" }, async ({ agentId, graceful, reason }) => {
|
|
354
|
-
try {
|
|
355
|
-
const result = bizarAgentRegistry.terminateAgent({
|
|
356
|
-
agentId,
|
|
357
|
-
reason,
|
|
358
|
-
graceful: graceful ?? true,
|
|
359
|
-
});
|
|
360
|
-
return ok(JSON.stringify(result, null, 2));
|
|
361
|
-
}
|
|
362
|
-
catch (e) {
|
|
363
|
-
return err(String(e));
|
|
364
|
-
}
|
|
365
|
-
});
|
|
366
|
-
const swarmInitTool = defineTool("swarm_init", "Initialize a new swarm in the SwarmTopologyRegistry. topology ∈ hierarchical|mesh|adaptive|collective|hierarchical-mesh (default 'hierarchical-mesh'); maxAgents clamped to [1,1000] (default 15). The 'default' swarm is created lazily on first call.", { topology: "string", maxAgents: "number", metadata: "string" }, async ({ topology, maxAgents, metadata }) => {
|
|
367
|
-
try {
|
|
368
|
-
let parsedMetadata;
|
|
369
|
-
if (metadata && typeof metadata === "string" && metadata.trim().length > 0) {
|
|
370
|
-
try {
|
|
371
|
-
parsedMetadata = JSON.parse(metadata);
|
|
372
|
-
}
|
|
373
|
-
catch {
|
|
374
|
-
return err("swarm_init: `metadata` must be a JSON string");
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
const allowedTopologies = [
|
|
378
|
-
"hierarchical", "mesh", "adaptive", "collective", "hierarchical-mesh",
|
|
379
|
-
];
|
|
380
|
-
const topo = allowedTopologies.includes(topology ?? "")
|
|
381
|
-
? topology
|
|
382
|
-
: DEFAULT_TOPOLOGY;
|
|
383
|
-
const max = typeof maxAgents === "number" ? maxAgents : DEFAULT_MAX_AGENTS;
|
|
384
|
-
const result = initSwarmOnRegistry({
|
|
385
|
-
topology: topo,
|
|
386
|
-
maxAgents: max,
|
|
387
|
-
metadata: parsedMetadata,
|
|
388
|
-
});
|
|
389
|
-
return ok(JSON.stringify(result, null, 2));
|
|
390
|
-
}
|
|
391
|
-
catch (e) {
|
|
392
|
-
return err(String(e));
|
|
393
|
-
}
|
|
394
|
-
});
|
|
395
|
-
// ---------------------------------------------------------------------------
|
|
396
|
-
// Safety tool — exposed so any model can self-audit a Bash command
|
|
397
|
-
// before running it.
|
|
398
|
-
// ---------------------------------------------------------------------------
|
|
399
|
-
const dangerCheckTool = defineTool("danger_check", "Audit a shell command for dangerous patterns (rm -rf, sudo, SSRF, etc.) and report the decision (allow/require-approval/deny).", { command: "string" }, async ({ command }) => {
|
|
400
|
-
try {
|
|
401
|
-
const check = checkDangerous({ command });
|
|
402
|
-
return ok(JSON.stringify(check, null, 2));
|
|
403
|
-
}
|
|
404
|
-
catch (e) {
|
|
405
|
-
return err(String(e));
|
|
406
|
-
}
|
|
407
|
-
}, { readOnlyHint: true });
|
|
408
|
-
// ---------------------------------------------------------------------------
|
|
409
|
-
// Self-learning tools (F-033 / ADR-174) — Thompson-sampling model
|
|
410
|
-
// router + Q-learning agent router + memory distillation trigger.
|
|
411
|
-
// ---------------------------------------------------------------------------
|
|
412
|
-
/** Singleton model router — the priors accumulate across tool calls
|
|
413
|
-
* within one MCP server instance, so the bandit can learn from
|
|
414
|
-
* outcomes in real time. Tests construct their own router via the
|
|
415
|
-
* exported `BIZAR_TOOLS` indirection. */
|
|
416
|
-
const modelRouter = new ModelRouter();
|
|
417
|
-
/** Singleton Q-learning router — same reasoning as above. */
|
|
418
|
-
const agentRouter = new QLearningRouter();
|
|
419
|
-
const modelRouteTool = defineTool("model_route", "Adaptive model-tier routing. Returns the recommended tier ('flash'|'mid'|'expensive') for a prompt using a Thompson-sampling bandit over Beta(α,β) priors. Codemod-eligible prompts (var-to-const, remove-console, add-logging) short-circuit to 'flash' with codemodIntent set.", { prompt: "string" }, async ({ prompt }) => {
|
|
420
|
-
try {
|
|
421
|
-
const decision = modelRouter.route(prompt);
|
|
422
|
-
return ok(JSON.stringify(decision, null, 2));
|
|
423
|
-
}
|
|
424
|
-
catch (e) {
|
|
425
|
-
return err(String(e));
|
|
426
|
-
}
|
|
427
|
-
}, { readOnlyHint: true });
|
|
428
|
-
const agentRouteTool = defineTool("agent_route", "Adaptive agent routing. Returns the recommended Bizar agent (odin|frigg|vor|mimir|heimdall|thor|tyr|forseti) for a task using Q-learning over a 64-dim bag-of-words feature hash. Codemod-eligible tasks route to heimdall (the routine-implementation agent).", { task: "string" }, async ({ task }) => {
|
|
429
|
-
try {
|
|
430
|
-
const decision = agentRouter.selectAgent(task);
|
|
431
|
-
return ok(JSON.stringify(decision, null, 2));
|
|
432
|
-
}
|
|
433
|
-
catch (e) {
|
|
434
|
-
return err(String(e));
|
|
435
|
-
}
|
|
436
|
-
}, { readOnlyHint: true });
|
|
437
|
-
const memoryDistillTool = defineTool("memory_distill", "Run the ReasoningBank distillation pipeline (ADR-174: RETRIEVE → JUDGE → DISTILL → CONSOLIDATE) over the in-process memory vault. Optionally filter entries by createdAt >= since. Returns {distilled, promoted, byTier} — promoted patterns are only emitted for oracle:test-exec or judge:fable tiers.", { since: "string" }, async ({ since }) => {
|
|
438
|
-
try {
|
|
439
|
-
// The dashboard owns the consolidator module; the SDK tool
|
|
440
|
-
// shim reads directly from the vault and runs the same
|
|
441
|
-
// RETRIEVE → JUDGE → DISTILL → CONSOLIDATE pipeline inline,
|
|
442
|
-
// so the tool works without the dashboard process.
|
|
443
|
-
const root = resolveVaultRoot();
|
|
444
|
-
const all = listNotes(root, "", 10000);
|
|
445
|
-
const cutoff = since ? new Date(since) : null;
|
|
446
|
-
const entries = all
|
|
447
|
-
.filter((n) => !cutoff || !Number.isNaN(cutoff.getTime()) && new Date(String(n.frontmatter?.createdAt ?? n.frontmatter?.created ?? 0)) >= cutoff)
|
|
448
|
-
.map((n) => ({
|
|
449
|
-
memory_id: n.relPath,
|
|
450
|
-
relPath: n.relPath,
|
|
451
|
-
frontmatter: n.frontmatter ?? {},
|
|
452
|
-
body: n.body ?? "",
|
|
453
|
-
kind: typeof (n.frontmatter?.kind ?? n.frontmatter?.type) === "string"
|
|
454
|
-
? (n.frontmatter?.kind ?? n.frontmatter?.type)
|
|
455
|
-
: undefined,
|
|
456
|
-
created: typeof (n.frontmatter?.createdAt ?? n.frontmatter?.created) === "string"
|
|
457
|
-
? (n.frontmatter?.createdAt ?? n.frontmatter?.created)
|
|
458
|
-
: undefined,
|
|
459
|
-
}));
|
|
460
|
-
// Static import — the SDK owns `memory-distillation.ts` so the
|
|
461
|
-
// tool can run the RETRIEVE → JUDGE → DISTILL → CONSOLIDATE
|
|
462
|
-
// pipeline without depending on the dashboard process.
|
|
463
|
-
const result = runDistillation(entries);
|
|
464
|
-
return ok(JSON.stringify({
|
|
465
|
-
distilled: result.patterns.length,
|
|
466
|
-
promoted: result.promoted.map((p) => p.id),
|
|
467
|
-
byTier: result.byTier,
|
|
468
|
-
}, null, 2));
|
|
469
|
-
}
|
|
470
|
-
catch (e) {
|
|
471
|
-
return err(String(e));
|
|
472
|
-
}
|
|
473
|
-
});
|
|
474
|
-
// ---------------------------------------------------------------------------
|
|
475
|
-
// Self-learning orchestrator tool (F-033)
|
|
476
|
-
//
|
|
477
|
-
// Replaces the prompt-time heuristics in the Odin agent with a single
|
|
478
|
-
// tool call. Combines the codemod tier-1 short-circuit, the
|
|
479
|
-
// Q-learning agent pick, and the Thompson-bandit model-tier pick
|
|
480
|
-
// behind one MCP `hooks_route` tool (matches ruflo
|
|
481
|
-
// `v3/mcp/tools/hooks-tools.ts:1207`).
|
|
482
|
-
// ---------------------------------------------------------------------------
|
|
483
|
-
const hooksRouteTool = defineTool("hooks_route", "Self-Learning router (F-033): decide which agent + model tier should handle a task. Returns {agent, modelTier, agentConfidence, modelConfidence, codemodIntent, surfacedTags}. surfacedTags contains the human-readable markers (e.g. [CODEMOD_AVAILABLE] / [TASK_MODEL_RECOMMENDATION]) that should be prepended to the prompt for downstream observability.", { task: "string", explicitAgent: "string" }, async ({ task, explicitAgent }) => {
|
|
484
|
-
try {
|
|
485
|
-
const decision = decideAgentWith(modelRouter, agentRouter, {
|
|
486
|
-
task: String(task ?? ""),
|
|
487
|
-
explicitAgent: explicitAgent ? String(explicitAgent) : undefined,
|
|
488
|
-
});
|
|
489
|
-
return ok(JSON.stringify(decision, null, 2));
|
|
490
|
-
}
|
|
491
|
-
catch (e) {
|
|
492
|
-
return err(String(e));
|
|
493
|
-
}
|
|
494
|
-
}, { readOnlyHint: true });
|
|
495
|
-
// ---------------------------------------------------------------------------
|
|
496
|
-
// Agent → model resolution tool (v10.1.0)
|
|
497
|
-
//
|
|
498
|
-
// Reads `.claude/model-router.json` (the Bizar model registry) and
|
|
499
|
-
// returns the concrete modelId + endpoint URL for an agent name. This
|
|
500
|
-
// is the bridge between the orchestrator's tier decision and the
|
|
501
|
-
// downstream HTTP call — the orchestrator says "flash / mid / expensive",
|
|
502
|
-
// this tool says "use this specific model at this URL".
|
|
503
|
-
//
|
|
504
|
-
// Pair with `hooks_route`: pass `agent=...` and you get the resolved
|
|
505
|
-
// model in one call. Use `list=true` to dump the entire registry for
|
|
506
|
-
// the dashboard / debugging.
|
|
507
|
-
// ---------------------------------------------------------------------------
|
|
508
|
-
const routeAgentTool = defineTool("route_agent", "Resolve an agent name (e.g. 'odin', 'thor', 'tyr') to its concrete modelId + endpoint URL by reading .claude/model-router.json. Pass {list: true} to dump the full registry. Returns JSON: {agent, modelId, tier, endpoint, rationale, fallback?, allAgents?}.", { agent: "string", list: "boolean" }, async ({ agent, list }) => {
|
|
509
|
-
try {
|
|
510
|
-
const reg = loadModelRegistry();
|
|
511
|
-
if (list === true) {
|
|
512
|
-
return ok(JSON.stringify({
|
|
513
|
-
endpoint: reg.endpoint,
|
|
514
|
-
agents: Array.from(reg.agents.values()),
|
|
515
|
-
tiers: Array.from(reg.tiers.values()),
|
|
516
|
-
fallbackChain: reg.fallbackChain,
|
|
517
|
-
gptOnlyFor: reg.gptOnlyFor,
|
|
518
|
-
gptNeverFor: reg.gptNeverFor,
|
|
519
|
-
}, null, 2));
|
|
520
|
-
}
|
|
521
|
-
const name = typeof agent === "string" && agent.trim().length > 0
|
|
522
|
-
? agent.trim()
|
|
523
|
-
: "odin";
|
|
524
|
-
const resolved = resolveAgentModel(name, reg);
|
|
525
|
-
const tierResolved = resolveTierModel(resolved.tier, reg);
|
|
526
|
-
return ok(JSON.stringify({
|
|
527
|
-
...resolved,
|
|
528
|
-
fallback: tierResolved.fallback,
|
|
529
|
-
allAgents: Array.from(reg.agents.keys()),
|
|
530
|
-
}, null, 2));
|
|
531
|
-
}
|
|
532
|
-
catch (e) {
|
|
533
|
-
return err(String(e));
|
|
534
|
-
}
|
|
535
|
-
}, { readOnlyHint: true });
|
|
536
|
-
// ---------------------------------------------------------------------------
|
|
537
|
-
// Consensus tool (F-039) — thin PBFT-style 3-of-5 majority for
|
|
538
|
-
// review/decision steps. Wraps the shared `getSharedConsensus()`
|
|
539
|
-
// orchestrator; the MCP surface is intentionally minimal (one tool)
|
|
540
|
-
// because the consensus layer is a coordination primitive — model
|
|
541
|
-
// callers propose payloads, the cluster of 5 agents (odin / frigg /
|
|
542
|
-
// vor / mimir / heimdall) reaches quorum, and the tool returns the
|
|
543
|
-
// proposalId + status. Vote tally and view-change are internal — the
|
|
544
|
-
// MCP caller drives the lifecycle through the orchestrator's
|
|
545
|
-
// `castVote` / `viewChange` if it wants finer control.
|
|
546
|
-
//
|
|
547
|
-
// The payload is a JSON string so callers don't need a zod schema for
|
|
548
|
-
// every consensus call; the orchestrator's replay-protection hash
|
|
549
|
-
// keys on the canonicalized JSON anyway, so semantically equivalent
|
|
550
|
-
// payloads collapse to the same proposalId.
|
|
551
|
-
// ---------------------------------------------------------------------------
|
|
552
|
-
const consensusProposeTool = defineTool("consensus_propose", "PBFT-style 3-of-5 majority consensus for Bizar review/decision steps. payload is a JSON-encoded string (canonicalized via JSON.stringify). vote ∈ yes|no|abstain (defaults to 'yes' from the local agent). agentId is the peer whose vote this call represents (defaults to the local agent = 'odin'). Returns { proposalId, status, phase, approvals, rejections }. Re-submitting the same payload in the same view returns the cached proposalId (replay protection).", { payload: "string", quorum: "number", vote: "string", agentId: "string" }, async ({ payload, quorum, vote, agentId }) => {
|
|
553
|
-
try {
|
|
554
|
-
if (typeof payload !== "string" || payload.trim().length === 0) {
|
|
555
|
-
return err("consensus_propose: `payload` must be a non-empty JSON string");
|
|
556
|
-
}
|
|
557
|
-
let parsedPayload;
|
|
558
|
-
try {
|
|
559
|
-
parsedPayload = JSON.parse(payload);
|
|
560
|
-
}
|
|
561
|
-
catch (e) {
|
|
562
|
-
return err(`consensus_propose: \`payload\` is not valid JSON: ${String(e)}`);
|
|
563
|
-
}
|
|
564
|
-
const consensus = getSharedConsensus();
|
|
565
|
-
const proposeResult = consensus.propose(parsedPayload);
|
|
566
|
-
const v = vote === "no" || vote === "abstain" ? vote : "yes";
|
|
567
|
-
const voter = agentId && agentId.trim().length > 0 ? agentId.trim() : consensus.localAgentId;
|
|
568
|
-
const voteResult = consensus.castVote(proposeResult.proposalId, voter, v);
|
|
569
|
-
return ok(JSON.stringify({
|
|
570
|
-
proposalId: voteResult.proposalId,
|
|
571
|
-
status: voteResult.status,
|
|
572
|
-
phase: voteResult.phase,
|
|
573
|
-
approvals: voteResult.approvals,
|
|
574
|
-
rejections: voteResult.rejections,
|
|
575
|
-
abstentions: voteResult.abstentions,
|
|
576
|
-
committed: voteResult.committed,
|
|
577
|
-
quorum: quorum ?? consensus.getQuorum(),
|
|
578
|
-
currentProposer: consensus.getCurrentProposer(),
|
|
579
|
-
viewNumber: consensus.getViewNumber(),
|
|
580
|
-
}, null, 2));
|
|
581
|
-
}
|
|
582
|
-
catch (e) {
|
|
583
|
-
return err(String(e));
|
|
584
|
-
}
|
|
585
|
-
});
|
|
586
|
-
// ---------------------------------------------------------------------------
|
|
587
|
-
// Federation tool (F-038) — Cross-installation agent federation
|
|
588
|
-
// skeleton. Reads status from the shared `createFederation()` handle
|
|
589
|
-
// (one per MCP server instance). The handle is configured against
|
|
590
|
-
// `.harness/federation-audit.log` + `.harness/federation-budget.json`
|
|
591
|
-
// under the project root. Per-call signing/receiving is not exposed
|
|
592
|
-
// as a tool here — it's a library API used by the dashboard / future
|
|
593
|
-
// transport layer; the MCP surface is intentionally a status probe
|
|
594
|
-
// so callers can check peer trust + audit size + budget headroom
|
|
595
|
-
// without needing to import the SDK.
|
|
596
|
-
// ---------------------------------------------------------------------------
|
|
597
|
-
function resolveFederationHandle() {
|
|
598
|
-
const root = findRepoRoot();
|
|
599
|
-
const nodeId = `${root.replace(/[^a-zA-Z0-9_-]+/g, "_")}-mcp`;
|
|
600
|
-
// Shared secret per repo — the F-038 skeleton is in-process, so a
|
|
601
|
-
// hard-coded secret is fine for the status probe. Real deployments
|
|
602
|
-
// would source this from the env (BIZAR_FEDERATION_SECRET).
|
|
603
|
-
const secret = process.env.BIZAR_FEDERATION_SECRET ?? `bizar-federation-${root}`;
|
|
604
|
-
return createFederation({
|
|
605
|
-
nodeId,
|
|
606
|
-
secret,
|
|
607
|
-
auditPath: join(root, ".harness", "federation-audit.log"),
|
|
608
|
-
budgetPath: join(root, ".harness", "federation-budget.json"),
|
|
609
|
-
});
|
|
610
|
-
}
|
|
611
|
-
const federationStatusTool = defineTool("federation_status", "Federation skeleton status probe (F-038). Returns { nodeId, peers, nonceCacheSize, auditSizeBytes, auditPath, budget: { path, perPeer, outstandingReservations } }. Reads from the local createFederation() handle configured against .harness/federation-audit.log + .harness/federation-budget.json. Read-only.", {}, async () => {
|
|
612
|
-
try {
|
|
613
|
-
const handle = resolveFederationHandle();
|
|
614
|
-
const snap = handle.status();
|
|
615
|
-
return ok(JSON.stringify(snap, null, 2));
|
|
616
|
-
}
|
|
617
|
-
catch (e) {
|
|
618
|
-
return err(String(e));
|
|
619
|
-
}
|
|
620
|
-
}, { readOnlyHint: true });
|
|
621
|
-
// ---------------------------------------------------------------------------
|
|
622
|
-
// Pillar A — session heartbeat + cron tools
|
|
623
|
-
// ---------------------------------------------------------------------------
|
|
624
|
-
/** In-memory store for active heartbeats started via the MCP tool.
|
|
625
|
-
* Maps sessionId → stop fn. Only used by the MCP surface; the JSONL
|
|
626
|
-
* file is the authoritative persistence. */
|
|
627
|
-
const _activeHeartbeats = new Map();
|
|
628
|
-
const sessionHeartbeatTool = defineTool("session_heartbeat", "Start, stop, or fail a session heartbeat. start returns a sessionId. Stop/fail write a terminal record to .harness/traces/heartbeat.jsonl.", { action: "string", sessionId: "string", intervalMs: "number" }, async ({ action, sessionId, intervalMs }) => {
|
|
629
|
-
try {
|
|
630
|
-
if (action === "start") {
|
|
631
|
-
const { sessionId: id, stop } = startHeartbeat(intervalMs ?? 30_000);
|
|
632
|
-
_activeHeartbeats.set(id, stop);
|
|
633
|
-
return ok(JSON.stringify({ sessionId: id }));
|
|
634
|
-
}
|
|
635
|
-
if (action === "stop") {
|
|
636
|
-
const id = sessionId ?? "";
|
|
637
|
-
const stop = _activeHeartbeats.get(id);
|
|
638
|
-
if (stop) {
|
|
639
|
-
stop();
|
|
640
|
-
_activeHeartbeats.delete(id);
|
|
641
|
-
}
|
|
642
|
-
else {
|
|
643
|
-
stopHeartbeat(id);
|
|
644
|
-
}
|
|
645
|
-
return ok(JSON.stringify({ sessionId: id ?? "", status: "done" }));
|
|
646
|
-
}
|
|
647
|
-
if (action === "fail") {
|
|
648
|
-
const id = sessionId ?? "";
|
|
649
|
-
const stop = _activeHeartbeats.get(id);
|
|
650
|
-
if (stop) {
|
|
651
|
-
stop();
|
|
652
|
-
_activeHeartbeats.delete(id);
|
|
653
|
-
}
|
|
654
|
-
else {
|
|
655
|
-
failHeartbeat(id);
|
|
656
|
-
}
|
|
657
|
-
return ok(JSON.stringify({ sessionId: id ?? "", status: "failed" }));
|
|
658
|
-
}
|
|
659
|
-
return err(`unknown_action: ${action}`);
|
|
660
|
-
}
|
|
661
|
-
catch (e) {
|
|
662
|
-
return err(String(e));
|
|
663
|
-
}
|
|
664
|
-
});
|
|
665
|
-
const cronAddTool = defineTool("cron_add", "Add a cron task. Persists to .bizar/cron.json. recurring=false tasks fire once and are then removed.", { cron: "string", prompt: "string", recurring: "boolean" }, async ({ cron, prompt, recurring }) => {
|
|
666
|
-
try {
|
|
667
|
-
const task = addCronTask({ cron, prompt, recurring: recurring ?? false });
|
|
668
|
-
return ok(JSON.stringify(task, null, 2));
|
|
669
|
-
}
|
|
670
|
-
catch (e) {
|
|
671
|
-
return err(String(e));
|
|
672
|
-
}
|
|
673
|
-
});
|
|
674
|
-
const cronListTool = defineTool("cron_list", "List all cron tasks from .bizar/cron.json.", {}, async () => {
|
|
675
|
-
try {
|
|
676
|
-
return ok(JSON.stringify(listCronTasks(), null, 2));
|
|
677
|
-
}
|
|
678
|
-
catch (e) {
|
|
679
|
-
return err(String(e));
|
|
680
|
-
}
|
|
681
|
-
}, { readOnlyHint: true });
|
|
682
|
-
const cronRemoveTool = defineTool("cron_remove", "Remove a cron task by its id. Returns true if the task existed.", { id: "string" }, async ({ id }) => {
|
|
683
|
-
try {
|
|
684
|
-
const removed = removeCronTask(id);
|
|
685
|
-
return ok(JSON.stringify({ id, removed }));
|
|
686
|
-
}
|
|
687
|
-
catch (e) {
|
|
688
|
-
return err(String(e));
|
|
689
|
-
}
|
|
690
|
-
});
|
|
691
|
-
// ---------------------------------------------------------------------------
|
|
692
338
|
// Factory — wire all tools into an MCP server
|
|
693
339
|
// ---------------------------------------------------------------------------
|
|
694
340
|
export const BIZAR_TOOLS = [
|
|
@@ -704,22 +350,8 @@ export const BIZAR_TOOLS = [
|
|
|
704
350
|
loopStopTool,
|
|
705
351
|
graphQueryTool,
|
|
706
352
|
graphPathTool,
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
agentListTool,
|
|
710
|
-
agentTerminateTool,
|
|
711
|
-
swarmInitTool,
|
|
712
|
-
modelRouteTool,
|
|
713
|
-
agentRouteTool,
|
|
714
|
-
memoryDistillTool,
|
|
715
|
-
hooksRouteTool,
|
|
716
|
-
routeAgentTool,
|
|
717
|
-
consensusProposeTool,
|
|
718
|
-
federationStatusTool,
|
|
719
|
-
sessionHeartbeatTool,
|
|
720
|
-
cronAddTool,
|
|
721
|
-
cronListTool,
|
|
722
|
-
cronRemoveTool,
|
|
353
|
+
listInstinctsTool,
|
|
354
|
+
listDecisionsTool,
|
|
723
355
|
];
|
|
724
356
|
/**
|
|
725
357
|
* Build the Bizar MCP server config. Pass this into Claude Code's
|
|
@@ -4,11 +4,9 @@
|
|
|
4
4
|
* v6.4.0 — ported from ruflo `q-learning-router.ts` (8-action softmax
|
|
5
5
|
* agent-route over coder / tester / reviewer / …).
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
* commonly
|
|
9
|
-
*
|
|
10
|
-
* 12-agent space could be done in a follow-up but each new agent
|
|
11
|
-
* increases state-action coverage cost; 8 keeps the bandit honest.
|
|
7
|
+
* All 14 agents registered. The Q-learning policy converges faster on
|
|
8
|
+
* commonly-dispatched targets; long-tail agents are still routable but
|
|
9
|
+
* get the prior policy until sufficient feedback accumulates.
|
|
12
10
|
*
|
|
13
11
|
* - State: a 64-dim bag-of-words hash of the task string (FNV-1a
|
|
14
12
|
* folded into 64 buckets). LRU-cached so repeated task patterns
|
|
@@ -4,11 +4,9 @@
|
|
|
4
4
|
* v6.4.0 — ported from ruflo `q-learning-router.ts` (8-action softmax
|
|
5
5
|
* agent-route over coder / tester / reviewer / …).
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
* commonly
|
|
9
|
-
*
|
|
10
|
-
* 12-agent space could be done in a follow-up but each new agent
|
|
11
|
-
* increases state-action coverage cost; 8 keeps the bandit honest.
|
|
7
|
+
* All 14 agents registered. The Q-learning policy converges faster on
|
|
8
|
+
* commonly-dispatched targets; long-tail agents are still routable but
|
|
9
|
+
* get the prior policy until sufficient feedback accumulates.
|
|
12
10
|
*
|
|
13
11
|
* - State: a 64-dim bag-of-words hash of the task string (FNV-1a
|
|
14
12
|
* folded into 64 buckets). LRU-cached so repeated task patterns
|
|
@@ -36,6 +34,12 @@ export const AGENT_ACTIONS = [
|
|
|
36
34
|
"thor",
|
|
37
35
|
"tyr",
|
|
38
36
|
"forseti",
|
|
37
|
+
"hermod",
|
|
38
|
+
"baldr",
|
|
39
|
+
"vidarr",
|
|
40
|
+
"quick",
|
|
41
|
+
"agent-browser",
|
|
42
|
+
"semble-search",
|
|
39
43
|
];
|
|
40
44
|
const DEFAULT_STATE_DIM = 64;
|
|
41
45
|
const DEFAULT_EPSILON = 0.1;
|