@polderlabs/bizar 10.1.0 → 10.3.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/README.md +31 -10
- package/bizar-dash/CONTROL_SURFACES.md +0 -1
- package/bizar-dash/dist/assets/{ActivityFeed-Da-JCrE6.js → ActivityFeed-xXiUCZLB.js} +1 -1
- package/bizar-dash/dist/assets/{ActivityFeed-Da-JCrE6.js.map → ActivityFeed-xXiUCZLB.js.map} +1 -1
- package/bizar-dash/dist/assets/{ActivityView-nIRsSETb.js → ActivityView-nOYhCp3h.js} +1 -1
- package/bizar-dash/dist/assets/{ActivityView-nIRsSETb.js.map → ActivityView-nOYhCp3h.js.map} +1 -1
- package/bizar-dash/dist/assets/{AdminView-DP1NMxmG.js → AdminView-Coi4V3sq.js} +1 -1
- package/bizar-dash/dist/assets/{AdminView-DP1NMxmG.js.map → AdminView-Coi4V3sq.js.map} +1 -1
- package/bizar-dash/dist/assets/{AgentActivity-lSPkOr-O.js → AgentActivity-nEri4lbx.js} +1 -1
- package/bizar-dash/dist/assets/{AgentActivity-lSPkOr-O.js.map → AgentActivity-nEri4lbx.js.map} +1 -1
- package/bizar-dash/dist/assets/{AgentsView-BIWGkz7w.js → AgentsView-ByiIJ0ej.js} +3 -3
- package/bizar-dash/dist/assets/{AgentsView-BIWGkz7w.js.map → AgentsView-ByiIJ0ej.js.map} +1 -1
- package/bizar-dash/dist/assets/{Alert-DN0UysMg.js → Alert-Dg_Vwxh5.js} +1 -1
- package/bizar-dash/dist/assets/{Alert-DN0UysMg.js.map → Alert-Dg_Vwxh5.js.map} +1 -1
- package/bizar-dash/dist/assets/ArtifactsView-CGclRNnz.js +21 -0
- package/bizar-dash/dist/assets/ArtifactsView-CGclRNnz.js.map +1 -0
- package/bizar-dash/dist/assets/{AuthView-DW5cs7ma.js → AuthView-utVm6M3D.js} +1 -1
- package/bizar-dash/dist/assets/{AuthView-DW5cs7ma.js.map → AuthView-utVm6M3D.js.map} +1 -1
- package/bizar-dash/dist/assets/{Avatar-DZPv9pvd.js → Avatar-CXDZdKy4.js} +1 -1
- package/bizar-dash/dist/assets/{Avatar-DZPv9pvd.js.map → Avatar-CXDZdKy4.js.map} +1 -1
- package/bizar-dash/dist/assets/{BackgroundJobsView-D8O-EyMD.js → BackgroundJobsView-j603pz6o.js} +1 -1
- package/bizar-dash/dist/assets/{BackgroundJobsView-D8O-EyMD.js.map → BackgroundJobsView-j603pz6o.js.map} +1 -1
- package/bizar-dash/dist/assets/{BackupView-uwXkhxOV.js → BackupView-DgvnntTE.js} +1 -1
- package/bizar-dash/dist/assets/{BackupView-uwXkhxOV.js.map → BackupView-DgvnntTE.js.map} +1 -1
- package/bizar-dash/dist/assets/{Card-Tyboihu7.js → Card-D9019JOD.js} +1 -1
- package/bizar-dash/dist/assets/{Card-Tyboihu7.js.map → Card-D9019JOD.js.map} +1 -1
- package/bizar-dash/dist/assets/{ChatView-DRBHzgay.js → ChatView-C0cTgj5d.js} +1 -1
- package/bizar-dash/dist/assets/{ChatView-DRBHzgay.js.map → ChatView-C0cTgj5d.js.map} +1 -1
- package/bizar-dash/dist/assets/{Chip-BrXIlR9w.js → Chip-DQtalZ4y.js} +1 -1
- package/bizar-dash/dist/assets/{Chip-BrXIlR9w.js.map → Chip-DQtalZ4y.js.map} +1 -1
- package/bizar-dash/dist/assets/{ClaudeSessionsView-Ck62jaOr.js → ClaudeSessionsView-H3Bqjo6b.js} +1 -1
- package/bizar-dash/dist/assets/{ClaudeSessionsView-Ck62jaOr.js.map → ClaudeSessionsView-H3Bqjo6b.js.map} +1 -1
- package/bizar-dash/dist/assets/{ClipboardView-DfND6xL6.js → ClipboardView-BAguaKbx.js} +1 -1
- package/bizar-dash/dist/assets/{ClipboardView-DfND6xL6.js.map → ClipboardView-BAguaKbx.js.map} +1 -1
- package/bizar-dash/dist/assets/{ConfigView-DjJmSrOJ.js → ConfigView-DWHJgoe8.js} +1 -1
- package/bizar-dash/dist/assets/{ConfigView-DjJmSrOJ.js.map → ConfigView-DWHJgoe8.js.map} +1 -1
- package/bizar-dash/dist/assets/{DiagnosticsView-CKgItf0J.js → DiagnosticsView-oCT624hk.js} +1 -1
- package/bizar-dash/dist/assets/{DiagnosticsView-CKgItf0J.js.map → DiagnosticsView-oCT624hk.js.map} +1 -1
- package/bizar-dash/dist/assets/{DialogsView-DHYF8dE1.js → DialogsView-CqHNals_.js} +1 -1
- package/bizar-dash/dist/assets/{DialogsView-DHYF8dE1.js.map → DialogsView-CqHNals_.js.map} +1 -1
- package/bizar-dash/dist/assets/{DoctorView-DDLHrSKk.js → DoctorView-6kfQq_Mx.js} +1 -1
- package/bizar-dash/dist/assets/{DoctorView-DDLHrSKk.js.map → DoctorView-6kfQq_Mx.js.map} +1 -1
- package/bizar-dash/dist/assets/{EmptyState-DZ2ouKwd.js → EmptyState-DLmtBX_6.js} +1 -1
- package/bizar-dash/dist/assets/{EmptyState-DZ2ouKwd.js.map → EmptyState-DLmtBX_6.js.map} +1 -1
- package/bizar-dash/dist/assets/{EnvVarsView-D1cx83mB.js → EnvVarsView-DySOXlP1.js} +2 -2
- package/bizar-dash/dist/assets/{EnvVarsView-D1cx83mB.js.map → EnvVarsView-DySOXlP1.js.map} +1 -1
- package/bizar-dash/dist/assets/{ErrorState-DwwJ2-Jq.js → ErrorState-Bump8diE.js} +1 -1
- package/bizar-dash/dist/assets/{ErrorState-DwwJ2-Jq.js.map → ErrorState-Bump8diE.js.map} +1 -1
- package/bizar-dash/dist/assets/{EvalView-C9aYixXW.js → EvalView-FnZ5d93z.js} +1 -1
- package/bizar-dash/dist/assets/{EvalView-C9aYixXW.js.map → EvalView-FnZ5d93z.js.map} +1 -1
- package/bizar-dash/dist/assets/{GoalsView-DZa_mGmh.js → GoalsView-C4m1WnVv.js} +1 -1
- package/bizar-dash/dist/assets/{GoalsView-DZa_mGmh.js.map → GoalsView-C4m1WnVv.js.map} +1 -1
- package/bizar-dash/dist/assets/{Grid-CiRyhAgR.js → Grid-dEnoGGws.js} +1 -1
- package/bizar-dash/dist/assets/{Grid-CiRyhAgR.js.map → Grid-dEnoGGws.js.map} +1 -1
- package/bizar-dash/dist/assets/{HistoryView-Dv7aPxJE.js → HistoryView-xdRybjZ2.js} +1 -1
- package/bizar-dash/dist/assets/{HistoryView-Dv7aPxJE.js.map → HistoryView-xdRybjZ2.js.map} +1 -1
- package/bizar-dash/dist/assets/{Input-BbFUDQnS.js → Input-BSa3lh_-.js} +1 -1
- package/bizar-dash/dist/assets/{Input-BbFUDQnS.js.map → Input-BSa3lh_-.js.map} +1 -1
- package/bizar-dash/dist/assets/{LibrariesView-DBQ83TNa.js → LibrariesView-1zR04Eci.js} +1 -1
- package/bizar-dash/dist/assets/{LibrariesView-DBQ83TNa.js.map → LibrariesView-1zR04Eci.js.map} +1 -1
- package/bizar-dash/dist/assets/{LightRAGView-JYpE5u9p.js → LightRAGView-PubmA9oL.js} +1 -1
- package/bizar-dash/dist/assets/{LightRAGView-JYpE5u9p.js.map → LightRAGView-PubmA9oL.js.map} +1 -1
- package/bizar-dash/dist/assets/{ListHeader-BGjm11Z0.js → ListHeader-Ak9WJd39.js} +1 -1
- package/bizar-dash/dist/assets/{ListHeader-BGjm11Z0.js.map → ListHeader-Ak9WJd39.js.map} +1 -1
- package/bizar-dash/dist/assets/{MemoryView-CnOP2MvM.js → MemoryView-DBGpuETw.js} +1 -1
- package/bizar-dash/dist/assets/{MemoryView-CnOP2MvM.js.map → MemoryView-DBGpuETw.js.map} +1 -1
- package/bizar-dash/dist/assets/MiscView-DufqBHkX.js +1 -0
- package/bizar-dash/dist/assets/{MiscView-BBcpUbZZ.js.map → MiscView-DufqBHkX.js.map} +1 -1
- package/bizar-dash/dist/assets/{ModsView-CU4cAmIz.js → ModsView-DcX6eVU2.js} +2 -2
- package/bizar-dash/dist/assets/{ModsView-CU4cAmIz.js.map → ModsView-DcX6eVU2.js.map} +1 -1
- package/bizar-dash/dist/assets/{NotificationsView-BYffvthq.js → NotificationsView-B8IhHRQC.js} +1 -1
- package/bizar-dash/dist/assets/{NotificationsView-BYffvthq.js.map → NotificationsView-B8IhHRQC.js.map} +1 -1
- package/bizar-dash/dist/assets/ObsidianView-DEuk65zS.js +1 -0
- package/bizar-dash/dist/assets/{ObsidianView-D3bI0row.js.map → ObsidianView-DEuk65zS.js.map} +1 -1
- package/bizar-dash/dist/assets/{OverviewView-0tq8f-Y0.js → OverviewView-CTI2spTd.js} +1 -1
- package/bizar-dash/dist/assets/{OverviewView-0tq8f-Y0.js.map → OverviewView-CTI2spTd.js.map} +1 -1
- package/bizar-dash/dist/assets/{ProgressBar-B-h60LKA.js → ProgressBar-D3lkz42E.js} +1 -1
- package/bizar-dash/dist/assets/{ProgressBar-B-h60LKA.js.map → ProgressBar-D3lkz42E.js.map} +1 -1
- package/bizar-dash/dist/assets/{ProjectsView-DhX5lzHS.js → ProjectsView-Du0LzE7A.js} +1 -1
- package/bizar-dash/dist/assets/{ProjectsView-DhX5lzHS.js.map → ProjectsView-Du0LzE7A.js.map} +1 -1
- package/bizar-dash/dist/assets/{ProvidersView-CJMX7jm9.js → ProvidersView-5bCgXwBo.js} +1 -1
- package/bizar-dash/dist/assets/{ProvidersView-CJMX7jm9.js.map → ProvidersView-5bCgXwBo.js.map} +1 -1
- package/bizar-dash/dist/assets/{SchedulesView-CcwDQ9Nm.js → SchedulesView-DFHdIz5P.js} +1 -1
- package/bizar-dash/dist/assets/{SchedulesView-CcwDQ9Nm.js.map → SchedulesView-DFHdIz5P.js.map} +1 -1
- package/bizar-dash/dist/assets/{Select-Cw7Qtz2M.js → Select-C8EJj4NM.js} +1 -1
- package/bizar-dash/dist/assets/{Select-Cw7Qtz2M.js.map → Select-C8EJj4NM.js.map} +1 -1
- package/bizar-dash/dist/assets/{SettingsRow-DgsgbPSI.js → SettingsRow-BdOOmYMD.js} +1 -1
- package/bizar-dash/dist/assets/{SettingsRow-DgsgbPSI.js.map → SettingsRow-BdOOmYMD.js.map} +1 -1
- package/bizar-dash/dist/assets/{SettingsView-DTAFdKyK.js → SettingsView-CqwQ6Knv.js} +1 -1
- package/bizar-dash/dist/assets/{SettingsView-DTAFdKyK.js.map → SettingsView-CqwQ6Knv.js.map} +1 -1
- package/bizar-dash/dist/assets/{Sheet-DH-WNJ3Y.js → Sheet-Cztsvgse.js} +1 -1
- package/bizar-dash/dist/assets/{Sheet-DH-WNJ3Y.js.map → Sheet-Cztsvgse.js.map} +1 -1
- package/bizar-dash/dist/assets/{Slider-DXbJuQ7y.js → Slider-BexNfF6K.js} +1 -1
- package/bizar-dash/dist/assets/{Slider-DXbJuQ7y.js.map → Slider-BexNfF6K.js.map} +1 -1
- package/bizar-dash/dist/assets/{Sparkline-CYtAn82j.js → Sparkline-CLZBtvsN.js} +1 -1
- package/bizar-dash/dist/assets/{Sparkline-CYtAn82j.js.map → Sparkline-CLZBtvsN.js.map} +1 -1
- package/bizar-dash/dist/assets/{Switch-BItGrPqr.js → Switch-B1tiRwNK.js} +1 -1
- package/bizar-dash/dist/assets/{Switch-BItGrPqr.js.map → Switch-B1tiRwNK.js.map} +1 -1
- package/bizar-dash/dist/assets/{TasksView-i5tm6CkX.js → TasksView-CT0fPlos.js} +1 -1
- package/bizar-dash/dist/assets/{TasksView-i5tm6CkX.js.map → TasksView-CT0fPlos.js.map} +1 -1
- package/bizar-dash/dist/assets/{Textarea-qYDf3yds.js → Textarea-D_TPpVMy.js} +1 -1
- package/bizar-dash/dist/assets/{Textarea-qYDf3yds.js.map → Textarea-D_TPpVMy.js.map} +1 -1
- package/bizar-dash/dist/assets/{UpdateView-Xln-ej26.js → UpdateView-tD2q2OhW.js} +1 -1
- package/bizar-dash/dist/assets/{UpdateView-Xln-ej26.js.map → UpdateView-tD2q2OhW.js.map} +1 -1
- package/bizar-dash/dist/assets/{UsageView-BGuZSUZ6.js → UsageView-B4BuAFKA.js} +1 -1
- package/bizar-dash/dist/assets/{UsageView-BGuZSUZ6.js.map → UsageView-B4BuAFKA.js.map} +1 -1
- package/bizar-dash/dist/assets/{ViewHeader-BqIPVKuG.js → ViewHeader-V_SzbUpw.js} +1 -1
- package/bizar-dash/dist/assets/{ViewHeader-BqIPVKuG.js.map → ViewHeader-V_SzbUpw.js.map} +1 -1
- package/bizar-dash/dist/assets/{VoiceView-CWUOCQs_.js → VoiceView-D3vb5OM2.js} +1 -1
- package/bizar-dash/dist/assets/{VoiceView-CWUOCQs_.js.map → VoiceView-D3vb5OM2.js.map} +1 -1
- package/bizar-dash/dist/assets/{brain-fsBSDl2g.js → brain-BmfWcitQ.js} +1 -1
- package/bizar-dash/dist/assets/{brain-fsBSDl2g.js.map → brain-BmfWcitQ.js.map} +1 -1
- package/bizar-dash/dist/assets/{calendar-DsHTZoCU.js → calendar-VntJUzFB.js} +1 -1
- package/bizar-dash/dist/assets/{calendar-DsHTZoCU.js.map → calendar-VntJUzFB.js.map} +1 -1
- package/bizar-dash/dist/assets/{circle-CqSxqqeJ.js → circle-KrQQySeK.js} +1 -1
- package/bizar-dash/dist/assets/{circle-CqSxqqeJ.js.map → circle-KrQQySeK.js.map} +1 -1
- package/bizar-dash/dist/assets/{circle-alert-BsLl001l.js → circle-alert-CQ9MLygI.js} +1 -1
- package/bizar-dash/dist/assets/{circle-alert-BsLl001l.js.map → circle-alert-CQ9MLygI.js.map} +1 -1
- package/bizar-dash/dist/assets/{circle-check-rVKMQmZp.js → circle-check-COtVgsWw.js} +1 -1
- package/bizar-dash/dist/assets/{circle-check-rVKMQmZp.js.map → circle-check-COtVgsWw.js.map} +1 -1
- package/bizar-dash/dist/assets/{clock-OuficfgH.js → clock-C0GlM4qp.js} +1 -1
- package/bizar-dash/dist/assets/{clock-OuficfgH.js.map → clock-C0GlM4qp.js.map} +1 -1
- package/bizar-dash/dist/assets/{download-BdHlstUY.js → download-CW4DmtRe.js} +1 -1
- package/bizar-dash/dist/assets/{download-BdHlstUY.js.map → download-CW4DmtRe.js.map} +1 -1
- package/bizar-dash/dist/assets/{external-link-DA3_VGm-.js → external-link-CAOnh_DH.js} +1 -1
- package/bizar-dash/dist/assets/{external-link-DA3_VGm-.js.map → external-link-CAOnh_DH.js.map} +1 -1
- package/bizar-dash/dist/assets/{file-text-B-g8H227.js → file-text-CS1jB_oV.js} +1 -1
- package/bizar-dash/dist/assets/{file-text-B-g8H227.js.map → file-text-CS1jB_oV.js.map} +1 -1
- package/bizar-dash/dist/assets/{filter-D9B8s5CG.js → filter-DyQbml3L.js} +1 -1
- package/bizar-dash/dist/assets/{filter-D9B8s5CG.js.map → filter-DyQbml3L.js.map} +1 -1
- package/bizar-dash/dist/assets/{git-pull-request-ByH0YuVz.js → git-pull-request-Co6gYfba.js} +1 -1
- package/bizar-dash/dist/assets/{git-pull-request-ByH0YuVz.js.map → git-pull-request-Co6gYfba.js.map} +1 -1
- package/bizar-dash/dist/assets/{main-CdOm1Pj9.js → main-CyAIirBB.js} +28 -33
- package/bizar-dash/dist/assets/main-CyAIirBB.js.map +1 -0
- package/bizar-dash/dist/assets/network-CDn43Gsj.js +6 -0
- package/bizar-dash/dist/assets/network-CDn43Gsj.js.map +1 -0
- package/bizar-dash/dist/assets/{pause-C9hgd8wX.js → pause-CKYjSTGX.js} +1 -1
- package/bizar-dash/dist/assets/{pause-C9hgd8wX.js.map → pause-CKYjSTGX.js.map} +1 -1
- package/bizar-dash/dist/assets/{pencil-BanqaMw7.js → pencil-BUJ2DpWs.js} +1 -1
- package/bizar-dash/dist/assets/{pencil-BanqaMw7.js.map → pencil-BUJ2DpWs.js.map} +1 -1
- package/bizar-dash/dist/assets/{play-CawUZ02_.js → play-CGxZWqtW.js} +1 -1
- package/bizar-dash/dist/assets/{play-CawUZ02_.js.map → play-CGxZWqtW.js.map} +1 -1
- package/bizar-dash/dist/assets/{plug-Cmv0-T_e.js → plug-CQYGgGSy.js} +1 -1
- package/bizar-dash/dist/assets/{plug-Cmv0-T_e.js.map → plug-CQYGgGSy.js.map} +1 -1
- package/bizar-dash/dist/assets/{plus-M6LYiKX8.js → plus-fFxt-8z5.js} +1 -1
- package/bizar-dash/dist/assets/{plus-M6LYiKX8.js.map → plus-fFxt-8z5.js.map} +1 -1
- package/bizar-dash/dist/assets/{power-DP5x_SRF.js → power-Cjgy2KsI.js} +1 -1
- package/bizar-dash/dist/assets/{power-DP5x_SRF.js.map → power-Cjgy2KsI.js.map} +1 -1
- package/bizar-dash/dist/assets/{power-off-NOJRLAIs.js → power-off-B81hLRah.js} +1 -1
- package/bizar-dash/dist/assets/{power-off-NOJRLAIs.js.map → power-off-B81hLRah.js.map} +1 -1
- package/bizar-dash/dist/assets/{refresh-ccw-CHMprsm5.js → refresh-ccw-BCXx86xp.js} +1 -1
- package/bizar-dash/dist/assets/{refresh-ccw-CHMprsm5.js.map → refresh-ccw-BCXx86xp.js.map} +1 -1
- package/bizar-dash/dist/assets/{refresh-cw-1RBqDKgJ.js → refresh-cw-COTg1nZo.js} +1 -1
- package/bizar-dash/dist/assets/{refresh-cw-1RBqDKgJ.js.map → refresh-cw-COTg1nZo.js.map} +1 -1
- package/bizar-dash/dist/assets/{rotate-ccw-DJRekBbi.js → rotate-ccw-BZrEVc0Z.js} +1 -1
- package/bizar-dash/dist/assets/{rotate-ccw-DJRekBbi.js.map → rotate-ccw-BZrEVc0Z.js.map} +1 -1
- package/bizar-dash/dist/assets/{rotate-cw-DHooc0Tx.js → rotate-cw-CsTtaLV2.js} +1 -1
- package/bizar-dash/dist/assets/{rotate-cw-DHooc0Tx.js.map → rotate-cw-CsTtaLV2.js.map} +1 -1
- package/bizar-dash/dist/assets/{save-DQKCKyZK.js → save-DtMTge1F.js} +1 -1
- package/bizar-dash/dist/assets/{save-DQKCKyZK.js.map → save-DtMTge1F.js.map} +1 -1
- package/bizar-dash/dist/assets/{send-xgy3RAi7.js → send-DyBhyk8t.js} +1 -1
- package/bizar-dash/dist/assets/{send-xgy3RAi7.js.map → send-DyBhyk8t.js.map} +1 -1
- package/bizar-dash/dist/assets/{shield-alert-CWV2F5ab.js → shield-alert-BPGJlRF8.js} +1 -1
- package/bizar-dash/dist/assets/{shield-alert-CWV2F5ab.js.map → shield-alert-BPGJlRF8.js.map} +1 -1
- package/bizar-dash/dist/assets/{trash-2-CL4khSRv.js → trash-2-2NsyTU8c.js} +1 -1
- package/bizar-dash/dist/assets/{trash-2-CL4khSRv.js.map → trash-2-2NsyTU8c.js.map} +1 -1
- package/bizar-dash/dist/assets/{trending-up-CSJJhWTS.js → trending-up-BXwP23VK.js} +1 -1
- package/bizar-dash/dist/assets/{trending-up-CSJJhWTS.js.map → trending-up-BXwP23VK.js.map} +1 -1
- package/bizar-dash/dist/assets/{triangle-alert-BPLb7uLt.js → triangle-alert-DFmQ_RXN.js} +1 -1
- package/bizar-dash/dist/assets/{triangle-alert-BPLb7uLt.js.map → triangle-alert-DFmQ_RXN.js.map} +1 -1
- package/bizar-dash/dist/assets/{upload-Cww6MvFq.js → upload-Cj-HYRYV.js} +1 -1
- package/bizar-dash/dist/assets/{upload-Cww6MvFq.js.map → upload-Cj-HYRYV.js.map} +1 -1
- package/bizar-dash/dist/assets/{zap-DmhVUzRA.js → zap-BaOiybcl.js} +1 -1
- package/bizar-dash/dist/assets/{zap-DmhVUzRA.js.map → zap-BaOiybcl.js.map} +1 -1
- package/bizar-dash/dist/index.html +1 -1
- package/bizar-dash/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
- package/bizar-dash/src/server/api.mjs +11 -0
- package/bizar-dash/src/server/artifacts-store.mjs +120 -14
- package/bizar-dash/src/server/claude-artifacts.mjs +281 -0
- package/bizar-dash/src/server/routes/artifacts.mjs +42 -6
- package/bizar-dash/src/server/routes/audit.mjs +78 -0
- package/bizar-dash/src/server/routes/decisions.mjs +78 -0
- package/bizar-dash/src/server/routes/model-router.mjs +55 -0
- package/bizar-dash/src/server/routes/model-router.test.mjs +28 -0
- package/bizar-dash/src/server/routes/sessions.mjs +80 -0
- package/bizar-dash/src/server/routes/update.mjs +48 -21
- package/bizar-dash/src/server/sprint.test.mjs +163 -0
- package/bizar-dash/src/web/v8/App.tsx +0 -4
- package/bizar-dash/src/web/v8/__tests__/new-views.test.tsx +0 -17
- package/bizar-dash/src/web/v8/shell/Sidebar.tsx +0 -1
- package/bizar-dash/src/web/v8/views/Artifacts/ArtifactsView.tsx +232 -21
- package/bizar-dash/src/web/v8/views/Artifacts/ClaudeArtifactView.tsx +179 -0
- package/bizar-dash/src/web/v8/views/Router.tsx +0 -5
- package/bizar-dash/tests/_update-test-helpers.mjs +13 -0
- package/bizar-dash/tests/update-check.test.mjs +18 -13
- package/bizar-dash/tests/update-packages.test.mjs +154 -0
- package/bizar-dash/tests/update-run.test.mjs +17 -80
- package/cli/banner.mjs +1 -1
- package/cli/bin.mjs +8 -1
- package/cli/bootstrap.mjs +1 -1
- package/cli/commands/claude-cmd.mjs +1 -1
- package/cli/commands/deploy/docker.mjs +0 -3
- package/cli/install/banner.mjs +67 -0
- package/cli/install/banner.test.mjs +39 -0
- package/cli/install/index.mjs +32 -0
- package/cli/install/index.test.mjs +61 -0
- package/cli/install/paths.mjs +80 -0
- package/cli/install/paths.test.mjs +77 -0
- package/cli/install/plugin.mjs +161 -0
- package/cli/install/postinstall.mjs +111 -0
- package/cli/install.mjs +13 -600
- package/cli/migrate.mjs +157 -0
- package/cli/migrate.test.mjs +85 -0
- package/cli/provision.mjs +615 -1918
- package/cli/provision.test.mjs +1 -1
- package/cli/service-controller.test.mjs +0 -1
- package/cli/service-env.mjs +0 -1
- package/cli/utils.mjs +0 -1
- package/install.sh +54 -466
- package/package.json +1 -1
- package/packages/sdk/dist/agent/cron.d.ts +44 -0
- package/packages/sdk/dist/agent/cron.js +79 -0
- package/packages/sdk/dist/agent/heartbeat.d.ts +43 -0
- package/packages/sdk/dist/agent/heartbeat.js +116 -0
- package/packages/sdk/dist/index.d.ts +3 -0
- package/packages/sdk/dist/index.js +5 -0
- package/packages/sdk/dist/learning/decisions.d.ts +46 -0
- package/packages/sdk/dist/learning/decisions.js +132 -0
- package/packages/sdk/dist/learning/index.d.ts +8 -0
- package/packages/sdk/dist/learning/index.js +8 -0
- package/packages/sdk/dist/learning/instincts.d.ts +38 -0
- package/packages/sdk/dist/learning/instincts.js +139 -0
- package/packages/sdk/dist/mcp/server.js +119 -1
- package/packages/sdk/dist/router/agent-model-registry.d.ts +89 -0
- package/packages/sdk/dist/router/agent-model-registry.js +144 -0
- package/packages/sdk/dist/router/index.d.ts +1 -0
- package/packages/sdk/dist/router/index.js +1 -0
- package/packages/sdk/package.json +3 -2
- package/scripts/audit.mjs +388 -0
- package/scripts/audit.test.mjs +149 -0
- package/scripts/eval-gate.mjs +134 -0
- package/scripts/eval-gate.test.mjs +138 -0
- package/scripts/feature-state-machine.mjs +178 -0
- package/scripts/feature-state-machine.test.mjs +135 -0
- package/scripts/install-curl.sh +17 -0
- package/scripts/spec-dedup.test.mjs +124 -0
- package/scripts/sprint.mjs +213 -0
- package/scripts/worktree-setup.sh +79 -0
- package/bizar-dash/dist/assets/ArtifactsView-CDIhPBAx.js +0 -6
- package/bizar-dash/dist/assets/ArtifactsView-CDIhPBAx.js.map +0 -1
- package/bizar-dash/dist/assets/HeadroomView-CNc-TI7u.js +0 -11
- package/bizar-dash/dist/assets/HeadroomView-CNc-TI7u.js.map +0 -1
- package/bizar-dash/dist/assets/MiscView-BBcpUbZZ.js +0 -1
- package/bizar-dash/dist/assets/ObsidianView-D3bI0row.js +0 -1
- package/bizar-dash/dist/assets/main-CdOm1Pj9.js.map +0 -1
- package/bizar-dash/src/web/v8/views/Headroom/HeadroomView.tsx +0 -201
- package/bizar-dash/tests/graphify-mod-spawn.node.test.mjs +0 -90
- package/bizar-dash/tests/v7-archive/mobile-overview.test.tsx +0 -214
- package/bizar-dash/tests/v7-archive/mobile-settings.test.tsx +0 -181
- package/bizar-dash/tests/v7-archive/navigation/CommandPalette.test.tsx +0 -105
- package/bizar-dash/tests/v7-archive/settings-nav.test.tsx +0 -128
- package/bizar-dash/tests/v7-archive/views/Overview.test.tsx +0 -413
- package/cli/provision-claude.mjs +0 -1176
|
@@ -42,11 +42,13 @@ import { checkDangerous } from "../dangerous-patterns.js";
|
|
|
42
42
|
import { ModelRouter } from "../router/model-router.js";
|
|
43
43
|
import { QLearningRouter } from "../router/q-learning-router.js";
|
|
44
44
|
import { runDistillation } from "../router/memory-distillation.js";
|
|
45
|
-
import { decideAgentWith } from "../router/index.js";
|
|
45
|
+
import { decideAgentWith, loadModelRegistry, resolveAgentModel, resolveTierModel, } from "../router/index.js";
|
|
46
46
|
import { bizarAgentRegistry } from "../agent-registry.js";
|
|
47
47
|
import { initSwarm as initSwarmOnRegistry, DEFAULT_TOPOLOGY, DEFAULT_MAX_AGENTS, } from "../swarm-topology.js";
|
|
48
48
|
import { getSharedConsensus } from "../consensus/index.js";
|
|
49
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";
|
|
50
52
|
/**
|
|
51
53
|
* Build a single MCP tool definition with a zod-less validator. This
|
|
52
54
|
* avoids taking a hard dep on zod at SDK-level; the dashboard or
|
|
@@ -491,6 +493,47 @@ const hooksRouteTool = defineTool("hooks_route", "Self-Learning router (F-033):
|
|
|
491
493
|
}
|
|
492
494
|
}, { readOnlyHint: true });
|
|
493
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
|
+
// ---------------------------------------------------------------------------
|
|
494
537
|
// Consensus tool (F-039) — thin PBFT-style 3-of-5 majority for
|
|
495
538
|
// review/decision steps. Wraps the shared `getSharedConsensus()`
|
|
496
539
|
// orchestrator; the MCP surface is intentionally minimal (one tool)
|
|
@@ -576,6 +619,76 @@ const federationStatusTool = defineTool("federation_status", "Federation skeleto
|
|
|
576
619
|
}
|
|
577
620
|
}, { readOnlyHint: true });
|
|
578
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
|
+
// ---------------------------------------------------------------------------
|
|
579
692
|
// Factory — wire all tools into an MCP server
|
|
580
693
|
// ---------------------------------------------------------------------------
|
|
581
694
|
export const BIZAR_TOOLS = [
|
|
@@ -600,8 +713,13 @@ export const BIZAR_TOOLS = [
|
|
|
600
713
|
agentRouteTool,
|
|
601
714
|
memoryDistillTool,
|
|
602
715
|
hooksRouteTool,
|
|
716
|
+
routeAgentTool,
|
|
603
717
|
consensusProposeTool,
|
|
604
718
|
federationStatusTool,
|
|
719
|
+
sessionHeartbeatTool,
|
|
720
|
+
cronAddTool,
|
|
721
|
+
cronListTool,
|
|
722
|
+
cronRemoveTool,
|
|
605
723
|
];
|
|
606
724
|
/**
|
|
607
725
|
* Build the Bizar MCP server config. Pass this into Claude Code's
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* router/agent-model-registry.ts — resolve agent → concrete model ID.
|
|
3
|
+
*
|
|
4
|
+
* v10.1.0 — Reads `.claude/model-router.json` (the Bizar model registry)
|
|
5
|
+
* and exposes:
|
|
6
|
+
*
|
|
7
|
+
* - resolveAgentModel(agent) → { modelId, tier, endpoint, rationale }
|
|
8
|
+
* - listAgentModels() → Array<{ agent, modelId, tier, ... }>
|
|
9
|
+
* - resolveTierModel(tier) → { modelId, endpoint, fallback[] }
|
|
10
|
+
* - getEndpoint() → endpoint URL (env override honored)
|
|
11
|
+
*
|
|
12
|
+
* The router decides which tier; this registry decides which concrete
|
|
13
|
+
* model ID lives at that tier and which endpoint URL to call. Together
|
|
14
|
+
* they form the dispatch contract the MCP `route_agent` tool surfaces.
|
|
15
|
+
*
|
|
16
|
+
* Why a separate module: the Thompson-bandit model-router.ts doesn't
|
|
17
|
+
* know about model IDs (it only reasons about `flash / mid / expensive`
|
|
18
|
+
* priors). The agent-registry.ts knows about agent types but not about
|
|
19
|
+
* concrete models. This module is the bridge.
|
|
20
|
+
*/
|
|
21
|
+
export type BizarTier = "premium" | "high" | "mid-design" | "default" | "mid" | "budget";
|
|
22
|
+
export interface AgentModelEntry {
|
|
23
|
+
agent: string;
|
|
24
|
+
modelId: string;
|
|
25
|
+
tier: BizarTier;
|
|
26
|
+
rationale: string;
|
|
27
|
+
}
|
|
28
|
+
export interface TierModelEntry {
|
|
29
|
+
tier: BizarTier;
|
|
30
|
+
modelIds: string[];
|
|
31
|
+
purpose: string;
|
|
32
|
+
}
|
|
33
|
+
export interface ResolvedAgentModel {
|
|
34
|
+
agent: string;
|
|
35
|
+
modelId: string;
|
|
36
|
+
tier: BizarTier;
|
|
37
|
+
endpoint: string;
|
|
38
|
+
rationale: string;
|
|
39
|
+
}
|
|
40
|
+
export interface ResolvedTierModel {
|
|
41
|
+
tier: BizarTier;
|
|
42
|
+
modelId: string;
|
|
43
|
+
fallback: string[];
|
|
44
|
+
endpoint: string;
|
|
45
|
+
purpose: string;
|
|
46
|
+
}
|
|
47
|
+
export interface ModelRegistry {
|
|
48
|
+
endpoint: string;
|
|
49
|
+
agents: Map<string, AgentModelEntry>;
|
|
50
|
+
tiers: Map<BizarTier, TierModelEntry>;
|
|
51
|
+
fallbackChain: string[];
|
|
52
|
+
gptOnlyFor: string[];
|
|
53
|
+
gptNeverFor: string[];
|
|
54
|
+
}
|
|
55
|
+
export interface RegistrySource {
|
|
56
|
+
/** Path to `model-router.json`. Default: `.claude/model-router.json`. */
|
|
57
|
+
configPath?: string;
|
|
58
|
+
/** Override the endpoint URL (otherwise read from the JSON). */
|
|
59
|
+
endpoint?: string;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Read the registry from disk. Tolerates a missing/corrupt file by
|
|
63
|
+
* returning a minimal registry pointing at the local router default —
|
|
64
|
+
* agents can still operate, just without the per-agent rationale data.
|
|
65
|
+
*/
|
|
66
|
+
export declare function loadModelRegistry(src?: RegistrySource): ModelRegistry;
|
|
67
|
+
/**
|
|
68
|
+
* Resolve the concrete model + endpoint for a named agent.
|
|
69
|
+
* Falls back to the default agent entry (or a hard-coded `bizar/MiniMax-M3`
|
|
70
|
+
* if even the default is missing) so a call always returns something
|
|
71
|
+
* usable. Never throws.
|
|
72
|
+
*/
|
|
73
|
+
export declare function resolveAgentModel(agent: string, reg: ModelRegistry): ResolvedAgentModel;
|
|
74
|
+
/**
|
|
75
|
+
* Resolve a tier to its primary model ID + the fallback chain. Always
|
|
76
|
+
* returns at least one model ID.
|
|
77
|
+
*/
|
|
78
|
+
export declare function resolveTierModel(tier: BizarTier, reg: ModelRegistry): ResolvedTierModel;
|
|
79
|
+
/**
|
|
80
|
+
* Return the full agent → model table. Stable order: insertion order from
|
|
81
|
+
* the JSON (preserves whatever order the operator wrote).
|
|
82
|
+
*/
|
|
83
|
+
export declare function listAgentModels(reg: ModelRegistry): AgentModelEntry[];
|
|
84
|
+
/**
|
|
85
|
+
* Convenience: read the endpoint from the registry / env. Useful in
|
|
86
|
+
* scripts that don't want to load the full registry just for a URL.
|
|
87
|
+
*/
|
|
88
|
+
export declare function getEndpoint(reg?: ModelRegistry): string;
|
|
89
|
+
//# sourceMappingURL=agent-model-registry.d.ts.map
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* router/agent-model-registry.ts — resolve agent → concrete model ID.
|
|
3
|
+
*
|
|
4
|
+
* v10.1.0 — Reads `.claude/model-router.json` (the Bizar model registry)
|
|
5
|
+
* and exposes:
|
|
6
|
+
*
|
|
7
|
+
* - resolveAgentModel(agent) → { modelId, tier, endpoint, rationale }
|
|
8
|
+
* - listAgentModels() → Array<{ agent, modelId, tier, ... }>
|
|
9
|
+
* - resolveTierModel(tier) → { modelId, endpoint, fallback[] }
|
|
10
|
+
* - getEndpoint() → endpoint URL (env override honored)
|
|
11
|
+
*
|
|
12
|
+
* The router decides which tier; this registry decides which concrete
|
|
13
|
+
* model ID lives at that tier and which endpoint URL to call. Together
|
|
14
|
+
* they form the dispatch contract the MCP `route_agent` tool surfaces.
|
|
15
|
+
*
|
|
16
|
+
* Why a separate module: the Thompson-bandit model-router.ts doesn't
|
|
17
|
+
* know about model IDs (it only reasons about `flash / mid / expensive`
|
|
18
|
+
* priors). The agent-registry.ts knows about agent types but not about
|
|
19
|
+
* concrete models. This module is the bridge.
|
|
20
|
+
*/
|
|
21
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
22
|
+
import { isAbsolute, resolve } from "node:path";
|
|
23
|
+
const DEFAULT_CONFIG = ".claude/model-router.json";
|
|
24
|
+
const KNOWN_TIERS = [
|
|
25
|
+
"premium",
|
|
26
|
+
"high",
|
|
27
|
+
"mid-design",
|
|
28
|
+
"default",
|
|
29
|
+
"mid",
|
|
30
|
+
"budget",
|
|
31
|
+
];
|
|
32
|
+
function isKnownTier(t) {
|
|
33
|
+
return typeof t === "string" && KNOWN_TIERS.includes(t);
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Read the registry from disk. Tolerates a missing/corrupt file by
|
|
37
|
+
* returning a minimal registry pointing at the local router default —
|
|
38
|
+
* agents can still operate, just without the per-agent rationale data.
|
|
39
|
+
*/
|
|
40
|
+
export function loadModelRegistry(src = {}) {
|
|
41
|
+
const fp = src.configPath
|
|
42
|
+
? isAbsolute(src.configPath) ? src.configPath : resolve(src.configPath)
|
|
43
|
+
: resolve(DEFAULT_CONFIG);
|
|
44
|
+
let raw = {};
|
|
45
|
+
if (existsSync(fp)) {
|
|
46
|
+
try {
|
|
47
|
+
raw = JSON.parse(readFileSync(fp, "utf8"));
|
|
48
|
+
}
|
|
49
|
+
catch {
|
|
50
|
+
raw = {};
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
const endpoint = src.endpoint
|
|
54
|
+
?? process.env.BIZAR_MODEL_ROUTER_URL
|
|
55
|
+
?? process.env.ANTHROPIC_BASE_URL
|
|
56
|
+
?? raw.endpoint
|
|
57
|
+
?? "http://localhost:20128/v1";
|
|
58
|
+
const agents = new Map();
|
|
59
|
+
if (raw.agents && typeof raw.agents === "object") {
|
|
60
|
+
for (const [name, def] of Object.entries(raw.agents)) {
|
|
61
|
+
if (!def || typeof def !== "object")
|
|
62
|
+
continue;
|
|
63
|
+
const modelId = typeof def.model === "string" ? def.model : "bizar/MiniMax-M3";
|
|
64
|
+
const tier = isKnownTier(def.tier) ? def.tier : "default";
|
|
65
|
+
const rationale = typeof def.rationale === "string" ? def.rationale : "";
|
|
66
|
+
agents.set(name, { agent: name, modelId, tier, rationale });
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
const tiers = new Map();
|
|
70
|
+
if (raw.tiers && typeof raw.tiers === "object") {
|
|
71
|
+
for (const [name, def] of Object.entries(raw.tiers)) {
|
|
72
|
+
if (!def || typeof def !== "object")
|
|
73
|
+
continue;
|
|
74
|
+
if (!isKnownTier(name))
|
|
75
|
+
continue;
|
|
76
|
+
const ids = Array.isArray(def.models) ? def.models.filter((m) => typeof m === "string") : [];
|
|
77
|
+
const purpose = typeof def.purpose === "string" ? def.purpose : "";
|
|
78
|
+
tiers.set(name, { tier: name, modelIds: ids, purpose });
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
const fallbackChain = Array.isArray(raw.policies?.fallback_chain)
|
|
82
|
+
? raw.policies.fallback_chain.filter((m) => typeof m === "string")
|
|
83
|
+
: [];
|
|
84
|
+
const gptOnlyFor = Array.isArray(raw.policies?.gpt_only_for)
|
|
85
|
+
? raw.policies.gpt_only_for.filter((s) => typeof s === "string")
|
|
86
|
+
: [];
|
|
87
|
+
const gptNeverFor = Array.isArray(raw.policies?.gpt_never_for)
|
|
88
|
+
? raw.policies.gpt_never_for.filter((s) => typeof s === "string")
|
|
89
|
+
: [];
|
|
90
|
+
return { endpoint, agents, tiers, fallbackChain, gptOnlyFor, gptNeverFor };
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Resolve the concrete model + endpoint for a named agent.
|
|
94
|
+
* Falls back to the default agent entry (or a hard-coded `bizar/MiniMax-M3`
|
|
95
|
+
* if even the default is missing) so a call always returns something
|
|
96
|
+
* usable. Never throws.
|
|
97
|
+
*/
|
|
98
|
+
export function resolveAgentModel(agent, reg) {
|
|
99
|
+
const entry = reg.agents.get(agent)
|
|
100
|
+
?? reg.agents.get("odin")
|
|
101
|
+
?? { agent: "odin", modelId: "bizar/MiniMax-M3", tier: "default", rationale: "fallback" };
|
|
102
|
+
return {
|
|
103
|
+
agent: entry.agent,
|
|
104
|
+
modelId: entry.modelId,
|
|
105
|
+
tier: entry.tier,
|
|
106
|
+
endpoint: reg.endpoint,
|
|
107
|
+
rationale: entry.rationale,
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Resolve a tier to its primary model ID + the fallback chain. Always
|
|
112
|
+
* returns at least one model ID.
|
|
113
|
+
*/
|
|
114
|
+
export function resolveTierModel(tier, reg) {
|
|
115
|
+
const entry = reg.tiers.get(tier);
|
|
116
|
+
const primary = entry?.modelIds[0] ?? "bizar/MiniMax-M3";
|
|
117
|
+
const fallback = entry?.modelIds.slice(1) ?? [];
|
|
118
|
+
return {
|
|
119
|
+
tier,
|
|
120
|
+
modelId: primary,
|
|
121
|
+
fallback,
|
|
122
|
+
endpoint: reg.endpoint,
|
|
123
|
+
purpose: entry?.purpose ?? "",
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Return the full agent → model table. Stable order: insertion order from
|
|
128
|
+
* the JSON (preserves whatever order the operator wrote).
|
|
129
|
+
*/
|
|
130
|
+
export function listAgentModels(reg) {
|
|
131
|
+
return Array.from(reg.agents.values());
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Convenience: read the endpoint from the registry / env. Useful in
|
|
135
|
+
* scripts that don't want to load the full registry just for a URL.
|
|
136
|
+
*/
|
|
137
|
+
export function getEndpoint(reg) {
|
|
138
|
+
if (reg)
|
|
139
|
+
return reg.endpoint;
|
|
140
|
+
return process.env.BIZAR_MODEL_ROUTER_URL
|
|
141
|
+
?? process.env.ANTHROPIC_BASE_URL
|
|
142
|
+
?? "http://localhost:20128/v1";
|
|
143
|
+
}
|
|
144
|
+
//# sourceMappingURL=agent-model-registry.js.map
|
|
@@ -97,4 +97,5 @@ export { detectCodemodIntent, CODEMOD_CONFIDENCE_THRESHOLD, } from "./codemod-in
|
|
|
97
97
|
export type { CodemodIntent, CodemodIntentHit } from "./codemod-intent.js";
|
|
98
98
|
export { ModelRouter, type ModelTier, type RouteDecision, } from "./model-router.js";
|
|
99
99
|
export { QLearningRouter, AGENT_ACTIONS, type AgentName, type AgentRouteDecision, } from "./q-learning-router.js";
|
|
100
|
+
export { loadModelRegistry, resolveAgentModel, resolveTierModel, listAgentModels, getEndpoint, type ModelRegistry, type ResolvedAgentModel, type ResolvedTierModel, type AgentModelEntry, type TierModelEntry, type BizarTier, } from "./agent-model-registry.js";
|
|
100
101
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -146,4 +146,5 @@ export function tierTag(decision) {
|
|
|
146
146
|
export { detectCodemodIntent, CODEMOD_CONFIDENCE_THRESHOLD, } from "./codemod-intent.js";
|
|
147
147
|
export { ModelRouter, } from "./model-router.js";
|
|
148
148
|
export { QLearningRouter, AGENT_ACTIONS, } from "./q-learning-router.js";
|
|
149
|
+
export { loadModelRegistry, resolveAgentModel, resolveTierModel, listAgentModels, getEndpoint, } from "./agent-model-registry.js";
|
|
149
150
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@polderlabs/bizar-sdk",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
".": "./dist/index.js",
|
|
12
12
|
"./memory": "./dist/memory/index.js",
|
|
13
13
|
"./mcp": "./dist/mcp/server.js",
|
|
14
|
-
"./dangerous-patterns": "./dist/dangerous-patterns.js"
|
|
14
|
+
"./dangerous-patterns": "./dist/dangerous-patterns.js",
|
|
15
|
+
"./learning": "./dist/learning/index.js"
|
|
15
16
|
},
|
|
16
17
|
"files": [
|
|
17
18
|
"dist"
|