@noxsoft/anima 5.1.2 → 6.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/CHANGELOG.md +40 -0
- package/README.md +2 -2
- package/dist/{APEv2Parser-DV7AH14P.js → APEv2Parser-Dvsbp_2R.js} +3 -3
- package/dist/{AbstractID3Parser-C3RlCr-Y.js → AbstractID3Parser-IB9gxozg.js} +5 -5
- package/dist/{AiffParser-DaFyNU8n.js → AiffParser-R2IhrBzL.js} +4 -4
- package/dist/{AsfParser-CDCRfCXr.js → AsfParser-DJEueUMg.js} +4 -4
- package/dist/{DsdiffParser-BX31LICZ.js → DsdiffParser-DXLYn9tT.js} +4 -4
- package/dist/{DsfParser-C3JBjE-C.js → DsfParser-D2--NF0i.js} +5 -5
- package/dist/{FlacParser-DY4m-7v1.js → FlacParser-8cDAjrth.js} +5 -5
- package/dist/{ID3v1Parser-DL9AGlNt.js → ID3v1Parser-B494XuP9.js} +3 -3
- package/dist/{ID3v2Parser-Mr8o-5GJ.js → ID3v2Parser-DlxcNqv5.js} +4 -4
- package/dist/{ID3v2Token-DQqGh8AB.js → ID3v2Token-CSLSVrSQ.js} +2 -2
- package/dist/{MP4Parser-DkunlEqI.js → MP4Parser-COql2J-w.js} +6 -6
- package/dist/{MatroskaParser-IKjHx0h7.js → MatroskaParser-bNP5wC2F.js} +3 -3
- package/dist/{MpegParser-EecSeRWJ.js → MpegParser-C1gjfYqq.js} +4 -4
- package/dist/{MusepackParser-CkfsAeuE.js → MusepackParser-DBdYf7kV.js} +5 -5
- package/dist/{OggParser-z3QlSd8U.js → OggParser-CxajqbK3.js} +5 -5
- package/dist/{Util-DDVY6AaC.js → Util-BRZxoY1Q.js} +1 -1
- package/dist/{WavPackParser-PimUUBRx.js → WavPackParser-CtH9QFia.js} +4 -4
- package/dist/{WaveParser-B539YtoQ.js → WaveParser-yufLki1G.js} +5 -5
- package/dist/{accounts-CL0JV_xk.js → accounts-B_2nt5Cd.js} +2 -2
- package/dist/{accounts-CYEa4ttU.js → accounts-COxGcLGB.js} +1 -1
- package/dist/{accounts-Bj5MvaDs.js → accounts-DIES085e.js} +11 -11
- package/dist/{accounts-DZsqyow2.js → accounts-TUsfghIW.js} +38 -38
- package/dist/{acp-cli-ynoZZhYQ.js → acp-cli-CWgqDQQH.js} +6 -6
- package/dist/{acp-cli-BFAoKBvs.js → acp-cli-D0wfP8-l.js} +16 -16
- package/dist/{active-listener-BWPgtTZp.js → active-listener-BKtsWhsb.js} +4 -4
- package/dist/{active-listener-GJR3nLhX.js → active-listener-D2r8IO7g.js} +5 -5
- package/dist/{agent-DUAarfNl.js → agent-CnS0SRpT.js} +93 -236
- package/dist/{agent-CaaEZsXl.js → agent-VRQM14Xp.js} +98 -229
- package/dist/{agent-scope-C9CiVcmh.js → agent-scope-ByIGrCTT.js} +2 -2
- package/dist/{agent-scope-D3HZp64M.js → agent-scope-CXxC8FFX.js} +2 -2
- package/dist/{agent-scope-BZ8hjIt_.js → agent-scope-CxBzAozu.js} +3 -3
- package/dist/{agents-t54YcbvK.js → agents-CvMRplDx.js} +15 -13
- package/dist/{agents.config-J7iEgdW_.js → agents.config-BR5JLtud.js} +1 -1
- package/dist/{anthropic-direct-runner-B12V2Q5H.js → anthropic-direct-runner-BeYCnvZ8.js} +37 -15
- package/dist/{anthropic-direct-runner-CzQb7QkD.js → anthropic-direct-runner-C2Kwju-r.js} +29 -7
- package/dist/{audit-ByHmjh-G.js → audit-B05W5ckN.js} +23 -34
- package/dist/{audit-HJOpXfgY.js → audit-DDz7UOIx.js} +18 -15
- package/dist/{auth-DXrALxdm.js → auth-DsC5pZ_0.js} +2 -2
- package/dist/{prompts-CneQ6SeF.js → auth-choice-DY1saszS.js} +12 -107
- package/dist/{auth-choice-DPWnLV_w.js → auth-choice-Dc5TAJwT.js} +10 -9
- package/dist/{auth-health-DmrnGklu.js → auth-health-Cc8-vy8y.js} +1 -1
- package/dist/auth-health-Dhr8p2SD.js +149 -0
- package/dist/{auth-profiles-BF5x9Ej0.js → auth-profiles-Brxz2ojJ.js} +193 -42
- package/dist/{auth-profiles-DjCH4kWT.js → auth-profiles-C-LuhW6c.js} +195 -44
- package/dist/{auth-profiles-PJVsRqf4.js → auth-profiles-DKu7ZUzl.js} +189 -29
- package/dist/{auth-profiles-eZzmaeR3.js → auth-profiles-DtWUl1-k.js} +198 -38
- package/dist/{auth-store-CnRrUELz.js → auth-store-Bd0GoqEL.js} +13 -13
- package/dist/{auth-store-KnWGteIV.js → auth-store-BpYI9t_y.js} +3 -3
- package/dist/{auth-store-DjcQlyze.js → auth-store-Jvgz2_l1.js} +2 -2
- package/dist/{banner-D9JyV5SF.js → banner-DAMtSjUF.js} +1 -1
- package/dist/{bonjour-discovery-QsoaZ8Pr.js → bonjour-discovery-Co-b97Dz.js} +2 -2
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +222 -151
- package/dist/bundled/bootstrap-extra-files/handler.js +5 -5
- package/dist/bundled/command-logger/handler.js +1 -1
- package/dist/bundled/session-memory/handler.js +24 -24
- package/dist/{call-DHZ76BNg.js → call-B4lhqS6H.js} +3 -3
- package/dist/{call-DQjoz63V.js → call-CDPbPDAr.js} +4 -4
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{catalog-AZNRamJ4.js → catalog-CsXv59Tq.js} +2 -2
- package/dist/{channel-web-CQIbtfme.js → channel-web-B8mzTSaY.js} +15 -15
- package/dist/{channels-status-issues-DdjvFHx9.js → channels-status-issues-WkG3Tmxk.js} +4 -4
- package/dist/{chrome-HTuFjVWW.js → chrome-B8EnYGj1.js} +9 -9
- package/dist/{chrome-BNggURXT.js → chrome-BaU-H9m7.js} +3 -3
- package/dist/{chrome-Cfak4A3i.js → chrome-DLUBPBPz.js} +12 -12
- package/dist/{chunk-CyT-_QsQ.js → chunk-B4Kx-ocg.js} +11 -9
- package/dist/{chunk-Dffz_QIs.js → chunk-CFSle8n5.js} +1 -1
- package/dist/{chunk-D3vyM2EQ.js → chunk-Cy0Bj0F3.js} +1 -1
- package/dist/{chunk-DFqo_u5A.js → chunk-DJXDX69U.js} +11 -9
- package/dist/{clack-prompter-QbDK4ABC.js → clack-prompter-0JW5kry0.js} +3 -3
- package/dist/{clack-prompter-rXuqdPbx.js → clack-prompter-fZSmnHda.js} +5 -5
- package/dist/cli/daemon-cli.js +1 -1
- package/dist/{cli-kT9Mb3dT.js → cli-D8exVpuI.js} +30 -29
- package/dist/cli-hcHk5KuP.js +102 -0
- package/dist/{cli-utils-BdkJVXjy.js → cli-utils-D2X_bDLt.js} +9 -1
- package/dist/{cli-utils-DGnL8raH.js → cli-utils-DcDBK4C5.js} +9 -1
- package/dist/{client-D9E5Wwb_.js → client-BWkoTfOH.js} +3 -2
- package/dist/{client-DzIcZx4J.js → client-CfLiulzK.js} +2 -1
- package/dist/{command-registry-vEVxxxzI.js → command-registry-D3VhxpWx.js} +21 -12
- package/dist/{commands-NIY0IDXe.js → commands-DE8FNH0v.js} +92 -20
- package/dist/{commands-eY0Ao0wt.js → commands-Mekaw9WG.js} +92 -20
- package/dist/{common-C2wAYEWA.js → common-BCW6hLGI.js} +2 -2
- package/dist/{common-BzPvZcxT.js → common-Bf_TG87Y.js} +2 -2
- package/dist/{common-6Fcbzr42.js → common-DT_obM-k.js} +2 -2
- package/dist/{completion-cli-BBKG6buM.js → completion-cli-B3BqQJq9.js} +3 -3
- package/dist/{completion-cli-C84I5l8a.js → completion-cli-CepDzeW1.js} +2 -2
- package/dist/{config-Ofh9gKvs.js → config-BrVuTQ8R.js} +14 -2
- package/dist/{config-6FVC8hW0.js → config-CweTwOtr.js} +40 -28
- package/dist/{config-DqwH4y-D.js → config-DaD4FsAn.js} +19 -7
- package/dist/{config-D2kCn7yR.js → config-ZYN8tezd.js} +18 -6
- package/dist/{config-cli-CQzq5yWB.js → config-cli-3CaIxSKo.js} +4 -4
- package/dist/config-cli-B6Np85rk.js +15 -0
- package/dist/{config-guard-B1plY6aQ.js → config-guard-C4b2dksv.js} +2 -2
- package/dist/{config-guard-CYlpjNN7.js → config-guard-CWhoBtB3.js} +20 -20
- package/dist/{config-sync-CYX9Tzyr.js → config-sync-CCVp-tVX.js} +2 -2
- package/dist/{config-sync-CDUhjDom.js → config-sync-CMO_5lyl.js} +2 -2
- package/dist/{configure-G6h2Ppk0.js → configure-D882Bg7c.js} +39 -15
- package/dist/{configure-Bv6mqD0j.js → configure-D88dg6mE.js} +79 -77
- package/dist/{configure-DxQqSUJs.js → configure-xpjwedvJ.js} +50 -49
- package/dist/{configure-B-dfdPKX.js → configure-zXK6UZ51.js} +49 -24
- package/dist/{context-CpsnZLOp.js → context-B5X720Bs.js} +1 -1
- package/dist/{control-service-D1oxSXVg.js → control-service-3CI4vt1h.js} +2 -2
- package/dist/{control-service-CzAfyR4e.js → control-service-5YtMvm7D.js} +5 -5
- package/dist/control-ui/assets/index-C4ejMN5U.js +72 -0
- package/dist/control-ui/assets/index-C4ejMN5U.js.map +1 -0
- package/dist/control-ui/assets/index-CcPNqN3R.css +1 -0
- package/dist/control-ui/assets/index-D7Bf6Say.js +3 -0
- package/dist/control-ui/assets/index-D7Bf6Say.js.map +1 -0
- package/dist/control-ui/assets/index-yhFuaOnc.js +2 -0
- package/dist/control-ui/assets/index-yhFuaOnc.js.map +1 -0
- package/dist/control-ui/assets/observers-V7q9lNYt.js +2 -0
- package/dist/control-ui/assets/observers-V7q9lNYt.js.map +1 -0
- package/dist/control-ui/assets/rrweb-plugin-console-record-sPdhR0i8.js +138 -0
- package/dist/control-ui/assets/rrweb-plugin-console-record-sPdhR0i8.js.map +1 -0
- package/dist/control-ui/assets/rrweb-record-CMVXB7aO.js +129 -0
- package/dist/control-ui/assets/rrweb-record-CMVXB7aO.js.map +1 -0
- package/dist/control-ui/index.html +2 -2
- package/dist/{cron-cli-C4qZZo4e.js → cron-cli-Cht6Itx6.js} +18 -18
- package/dist/{cron-cli-CSivg2i9.js → cron-cli-D9XrF-Gx.js} +8 -8
- package/dist/{daemon-cli-DfxT-pQ4.js → daemon-cli-9zrnYRjh.js} +8 -8
- package/dist/{daemon-cli-KMzjJH_D.js → daemon-cli-CrdPhSxr.js} +15 -15
- package/dist/daemon-cli.js +34 -6
- package/dist/{daemon-runtime-CIE27usH.js → daemon-runtime-BrUj88ZO.js} +2 -2
- package/dist/{daemon-runtime-BfgstLVI.js → daemon-runtime-DCqwraWR.js} +1 -1
- package/dist/{deliver-8r6UbXnC.js → deliver-B-dPbUIs.js} +18 -28
- package/dist/{deliver-ahx1N11n.js → deliver-BKzX3YoN.js} +7 -7
- package/dist/{deliver-DVt8TbK9.js → deliver-C1L5nO0K.js} +3 -3
- package/dist/{deliver-D2hQZ9X0.js → deliver-d-CaN0uL.js} +59 -69
- package/dist/deps-DyT32VfN.js +23 -0
- package/dist/{diagnostics-DXeDqA_-.js → diagnostics-Cu9pZAFn.js} +1 -1
- package/dist/{dispatcher-DpSnqIL0.js → dispatcher-BQQugU-7.js} +1 -1
- package/dist/{dispatcher-DzT6jltc.js → dispatcher-DzwzLQRk.js} +2 -2
- package/dist/{dns-cli-D9ka2fZD.js → dns-cli-C8KIX4P3.js} +12 -12
- package/dist/{dns-cli-D2Orvc8E.js → dns-cli-V2bo6vSt.js} +3 -3
- package/dist/{docs-cli-CKfzGqYM.js → docs-cli-Bt-YV3xs.js} +2 -2
- package/dist/{docs-cli-DWYXJd-j.js → docs-cli-D2cVJxjP.js} +7 -7
- package/dist/{doctor-vXt5qjNJ.js → doctor-DEnSKgHu.js} +21 -21
- package/dist/{doctor-DumyG85t.js → doctor-WpKCNZeO.js} +36 -181
- package/dist/{doctor-completion-lAyxyd7X.js → doctor-completion-CPff9UlF.js} +2 -2
- package/dist/{doctor-completion-C8JSWfqN.js → doctor-completion-CypXc1Uo.js} +2 -2
- package/dist/{doctor-config-flow-DA50eWp5.js → doctor-config-flow-Bgl0Cc20.js} +6 -6
- package/dist/{doctor-config-flow-BjfGQ1Br.js → doctor-config-flow-Dxy7RIm0.js} +4 -4
- package/dist/{engine-BVchKo5_.js → engine-DpbYPop7.js} +9 -9
- package/dist/{engine-CKqNpVwE.js → engine-zmn3SOYa.js} +10 -9
- package/dist/entry.js +19 -28
- package/dist/{env-DVJCc7dM.js → env-DlTia1B4.js} +1 -1
- package/dist/{exec-cazBMA02.js → exec-BylR5qWS.js} +1 -1
- package/dist/{exec-gKbUce2p.js → exec-C6tXfeqA.js} +1 -1
- package/dist/{exec-Bfd4ztFZ.js → exec-DUzVF5_D.js} +7 -7
- package/dist/{exec-approvals-cli-BPwW6GIK.js → exec-approvals-cli-CN2WeH7y.js} +20 -20
- package/dist/{exec-approvals-cli-6HndodnP.js → exec-approvals-cli-DYZVBnqS.js} +8 -8
- package/dist/extensionAPI.js +22 -22
- package/dist/format-BCAtE7cT.js +20 -0
- package/dist/{frontmatter-BP4GSt5L.js → frontmatter-Dsa7N963.js} +2 -2
- package/dist/{gateway-cli-CHhTweWb.js → gateway-cli-B_xsx5Nv.js} +104 -101
- package/dist/{gateway-cli-B60L2z4a.js → gateway-cli-D3VBOA_i.js} +69 -66
- package/dist/{gateway-rpc-CrSglZPE.js → gateway-rpc-Cj_h2sVM.js} +3 -3
- package/dist/{gateway-rpc-BtOX_e53.js → gateway-rpc-CnXMGsxp.js} +3 -3
- package/dist/{gmail-setup-utils-D2uUKNlF.js → gmail-setup-utils-DaJoXV_3.js} +3 -3
- package/dist/{health-BttJ1Qeh.js → health-C8KCBhuo.js} +8 -8
- package/dist/{health-D8fJ6U_k.js → health-CabOEPQ0.js} +13 -13
- package/dist/{health-format-CH6JWH45.js → health-format-D-JJ5_S4.js} +2 -2
- package/dist/{heartbeat-visibility-DcGQOTXe.js → heartbeat-visibility-BjYY-mKG.js} +1 -1
- package/dist/{heartbeat-visibility-B2MDtPTL.js → heartbeat-visibility-ZfNSbFcq.js} +1 -1
- package/dist/{help-format-7YidDC5Z.js → help-format-Dt-I_Mls.js} +1 -1
- package/dist/{hooks-cli-DRUryj5H.js → hooks-cli-Cs7GUa7G.js} +34 -33
- package/dist/{hooks-cli-BMZF6RF3.js → hooks-cli-DOs9WZ3K.js} +56 -55
- package/dist/{hooks-status-VvwKn90L.js → hooks-status-DdweuSIj.js} +4 -4
- package/dist/{image-ops-BUy__GHL.js → image-ops-Ct3GueyT.js} +1 -1
- package/dist/index.js +79 -71
- package/dist/{init-B8PBeUpi.js → init-CFndGgTJ.js} +1 -1
- package/dist/{init-DxkAVKP0.js → init-DkBwXNme.js} +1 -1
- package/dist/{installs-sayrGjx1.js → installs-Bi6UipiE.js} +6 -6
- package/dist/{installs-BcnNDR54.js → installs-a4Vz_J08.js} +3 -3
- package/dist/ipv4-DfMwLQ0d.js +14 -0
- package/dist/{lib-D4dE4_XZ.js → lib-6xd5SQjU.js} +20 -20
- package/dist/{lifecycle-core-BerWWP7p.js → lifecycle-core-B8PI1NZJ.js} +3 -3
- package/dist/{links-OhvsEkVw.js → links-DcilUrqq.js} +1 -1
- package/dist/llm-slug-generator.js +25 -25
- package/dist/{loader-CLNb0v_s.js → loader-Bw2wdN4l.js} +159 -3
- package/dist/{loader-Bww_qb65.js → loader-C87TLS4J.js} +159 -3
- package/dist/{logging-DhXRGHWg.js → logging-Chc1Sj6N.js} +1 -1
- package/dist/{login-BovU8kno.js → login-BHnvW9HA.js} +6 -6
- package/dist/{login-BPtmlRRv.js → login-BTOKtSQN.js} +5 -5
- package/dist/{login-C54B66KM.js → login-CrMpAZ0n.js} +4 -4
- package/dist/{login-C4mptULi.js → login-DKkQ3Czu.js} +5 -5
- package/dist/{login-qr-bim3Nkyu.js → login-qr-BGbHImRb.js} +8 -8
- package/dist/{login-qr-pFbvowe5.js → login-qr-CsAVGp00.js} +12 -12
- package/dist/{login-qr-657mh7cI.js → login-qr-DILcBA_q.js} +6 -6
- package/dist/{login-qr-BxNKHxcf.js → login-qr-OUAGpDsU.js} +10 -10
- package/dist/{logs-cli-CQStwrGd.js → logs-cli-Bc6IOyHA.js} +8 -8
- package/dist/{logs-cli-De79vyiP.js → logs-cli-BiAJbjnq.js} +15 -15
- package/dist/{manager-B043uMPT.js → manager-BYu34CX3.js} +12 -12
- package/dist/{manager-Cvmm95Pf.js → manager-C6L_DH0O.js} +2 -2
- package/dist/{manager-BtrVJ8Ve.js → manager-D8VCuzru.js} +9 -9
- package/dist/{manager-A3pC-CW-.js → manager-b_aZwo00.js} +16 -16
- package/dist/{manifest-registry-D-DOtLzo.js → manifest-registry-qF960vMH.js} +1 -1
- package/dist/{memory-cli-COl5xoIl.js → memory-cli-B0kKl-9T.js} +7 -7
- package/dist/{memory-cli-691NgCXx.js → memory-cli-DLtBA6r5.js} +11 -11
- package/dist/{message-channel-DZYYDt1_.js → message-channel-CMsexA3K.js} +9 -7
- package/dist/{message-channel-DdOBO6Qm.js → message-channel-DIHHKJhk.js} +8 -6
- package/dist/{migrate-DkBWjPPs.js → migrate-DuohB_ur.js} +3 -3
- package/dist/{migrate-BLjwxe9X.js → migrate-bgeTT_GR.js} +3 -3
- package/dist/{model-auth-DKhjNVHc.js → model-auth-CHB3EySM.js} +10 -5
- package/dist/{model-auth-CxAB4iZ0.js → model-auth-KpsOXKDc.js} +3 -3
- package/dist/model-param-b-C1QDqzQp.js +16 -0
- package/dist/{model-selection-BPkpXepz.js → model-selection-CLcoOT3e.js} +25 -7
- package/dist/{model-selection-wCaVeFbb.js → model-selection-CY6r_3wt.js} +25 -7
- package/dist/{model-selection-DFbDH9o2.js → model-selection-DcO3qJOu.js} +24 -6
- package/dist/{model-selection-BI8CKPwQ.js → model-selection-DjsJGv1R.js} +67 -8
- package/dist/models-BM2_NkMu.js +2707 -0
- package/dist/models-cli-BjY8wA-C.js +272 -0
- package/dist/models-cli-BpjeKsUz.js +2946 -0
- package/dist/{node-cli-Ajhng-5p.js → node-cli-BmuVEJ1C.js} +12 -12
- package/dist/{node-cli-t3N6HE9R.js → node-cli-DU_oREff.js} +27 -27
- package/dist/{node-service-4B-0AjmA.js → node-service-qZXF7T7A.js} +1 -1
- package/dist/{note-De2zPKl3.js → note-iMYVGjpA.js} +2 -2
- package/dist/noxsoft-bootstrap-C4dSx7K_.js +77 -0
- package/dist/noxsoft-bootstrap-CrlkSFzd.js +77 -0
- package/dist/{npm-registry-spec-CFp4OEe4.js → npm-registry-spec-Br4B4I_3.js} +2 -2
- package/dist/{npm-registry-spec-DVDcgWxm.js → npm-registry-spec-jf7Mowdn.js} +1 -1
- package/dist/{onboard-xSPFmM29.js → onboard-DM9gULJN.js} +24 -19
- package/dist/{onboard-i4CJtSb9.js → onboard-_-D81kAy.js} +19 -15
- package/dist/{onboard-channels-RsbA6EaD.js → onboard-channels-CtT-RN60.js} +8 -8
- package/dist/{onboard-channels-D6Gt3CsX.js → onboard-channels-UkphAdCy.js} +4 -4
- package/dist/{onboard-helpers-IeOtcIME.js → onboard-helpers-CFudIoX4.js} +3 -3
- package/dist/{onboard-helpers-DPqXrhma.js → onboard-helpers-CJ3HzoUO.js} +7 -7
- package/dist/{onboarding-CZBVMwFn.js → onboarding-BB9PteK8.js} +20 -17
- package/dist/{onboarding-Cao0a_Z1.js → onboarding-Djmm0PEM.js} +27 -23
- package/dist/{orchestrator-COMX8CF2.js → orchestrator-C1nWKIJS.js} +7 -3
- package/dist/{orchestrator-BLXpTTgr.js → orchestrator-C2ypFiPL.js} +6 -3
- package/dist/{outbound-DWfSyfZC.js → outbound-Bmft-5um.js} +4 -4
- package/dist/{outbound-Rs0fFC2g.js → outbound-C577aWZp.js} +1 -1
- package/dist/{outbound-DLCmFGfJ.js → outbound-DW2eod1S.js} +4 -4
- package/dist/{outbound-uxBpmALx.js → outbound-fPqdCDR4.js} +4 -4
- package/dist/outbound-send-deps-DVfWC4E8.js +14 -0
- package/dist/outbound-send-deps-T_FgdfgW.js +36 -0
- package/dist/{parse-timeout-DkOL1T_l.js → parse-timeout-C4WLf3Qy.js} +3 -3
- package/dist/{parse-timeout-DlU4ymhF.js → parse-timeout-D4UO8pY_.js} +1 -1
- package/dist/{path-env-CjpH-KWH.js → path-env-DLQPf9qj.js} +2 -2
- package/dist/{paths-D2eokayo.js → paths-B-AkG5FD.js} +3 -3
- package/dist/{paths-DQMKfv60.js → paths-CAQJvbeZ.js} +2 -2
- package/dist/{paths-Cwszsz1I.js → paths-Q6h5HODL.js} +2 -2
- package/dist/{pi-auth-json-BLdaEAx2.js → pi-auth-json-B_lKNFK6.js} +5 -5
- package/dist/{pi-auth-json-BH7uvkKr.js → pi-auth-json-BmdBnmlZ.js} +8 -9
- package/dist/{pi-auth-json-DjxzPUt3.js → pi-auth-json-DkYqdjrV.js} +2 -2
- package/dist/{pi-auth-json-smxh_Xud.js → pi-auth-json-WTvcP2gz.js} +9 -8
- package/dist/{pi-embedded-D4eEfxIU.js → pi-embedded-BMbtgOzv.js} +825 -319
- package/dist/{pi-embedded-DifnZvKk.js → pi-embedded-DfbM3fAT.js} +888 -382
- package/dist/{pi-embedded-helpers-B6wVA0hU.js → pi-embedded-helpers-BZ9GspxK.js} +1 -1
- package/dist/{pi-tools.policy-CDgjN_3f.js → pi-tools.policy-D2FusuQa.js} +3 -3
- package/dist/{pi-tools.policy-ox141hP6.js → pi-tools.policy-WdTAfqbV.js} +6 -6
- package/dist/{plugin-auto-enable-Mj7AnofW.js → plugin-auto-enable-CtYcdTju.js} +5 -5
- package/dist/{plugin-auto-enable-OqDAK-ap.js → plugin-auto-enable-DhuD30Je.js} +2 -2
- package/dist/{plugin-registry-CpXm8ADp.js → plugin-registry-DePMxn4z.js} +4 -4
- package/dist/{plugin-registry-CkZnT8Fb.js → plugin-registry-QTkplP4s.js} +2 -2
- package/dist/plugin-sdk/agents/cli-backends.d.ts +4 -1
- package/dist/plugin-sdk/agents/cli-credentials.d.ts +0 -10
- package/dist/plugin-sdk/agents/cli-runner.d.ts +2 -0
- package/dist/plugin-sdk/agents/defaults.d.ts +2 -2
- package/dist/plugin-sdk/agents/model-auto.d.ts +43 -0
- package/dist/plugin-sdk/agents/model-fallback.d.ts +5 -0
- package/dist/plugin-sdk/agents/model-preference.d.ts +25 -0
- package/dist/plugin-sdk/agents/noxsoft-runner.d.ts +94 -0
- package/dist/plugin-sdk/agents/pi-embedded-runner/run/params.d.ts +6 -3
- package/dist/plugin-sdk/agents/pi-embedded.d.ts +6 -50
- package/dist/plugin-sdk/agents/runner-capabilities.d.ts +2 -0
- package/dist/plugin-sdk/agents/sandbox/constants.d.ts +1 -1
- package/dist/plugin-sdk/auth/noxsoft-auth.d.ts +55 -0
- package/dist/plugin-sdk/channels/registry.d.ts +2 -2
- package/dist/plugin-sdk/cli/deps.d.ts +2 -1
- package/dist/plugin-sdk/cli/outbound-send-deps.d.ts +10 -0
- package/dist/plugin-sdk/commands/agent/types.d.ts +2 -0
- package/dist/plugin-sdk/config/types.agent-defaults.d.ts +14 -0
- package/dist/plugin-sdk/config/types.models.d.ts +1 -1
- package/dist/plugin-sdk/config/zod-schema.agent-defaults.d.ts +13 -0
- package/dist/plugin-sdk/config/zod-schema.agents.d.ts +13 -0
- package/dist/plugin-sdk/config/zod-schema.d.ts +13 -0
- package/dist/plugin-sdk/gateway/protocol/schema/agent.d.ts +1 -0
- package/dist/plugin-sdk/identity/loader.d.ts +1 -0
- package/dist/plugin-sdk/identity/trust-graph.d.ts +32 -0
- package/dist/plugin-sdk/index.js +57 -47
- package/dist/plugin-sdk/utils/message-channel.d.ts +2 -1
- package/dist/{plugins-DnJgmFJR.js → plugins-DYcg0qBW.js} +1 -1
- package/dist/{plugins-cli-CrrkMAYM.js → plugins-cli-Bc9oU1ld.js} +58 -57
- package/dist/{plugins-cli-D4VxQKaJ.js → plugins-cli-Dv0KQTWo.js} +36 -35
- package/dist/{polls-DuwPgAV7.js → polls-DFISjV7H.js} +5 -5
- package/dist/{ports-B1b1r9Dz.js → ports-DaVrZDUq.js} +2 -2
- package/dist/{ports-BX00e96t.js → ports-q535r1PZ.js} +2 -2
- package/dist/{program-CTDFmZNx.js → program-CuwbF8YO.js} +48 -40
- package/dist/{program-context-Hl6bnPfB.js → program-context-CxPfy-Wr.js} +51 -35
- package/dist/{progress-B-VBLfHr.js → progress-CVLvQV_t.js} +1 -1
- package/dist/{prompt-style-DU9Vjqe5.js → prompt-style-BI53UVgE.js} +1 -1
- package/dist/{prompts-D6b3zLVO.js → prompts-BmgT_kkv.js} +33 -2
- package/dist/prompts-Bq4QGFQM.js +158 -0
- package/dist/{pw-ai-BV57RRmp.js → pw-ai-CB-zeR7h.js} +5 -5
- package/dist/{pw-ai-CY-VcqJp.js → pw-ai-C_1-7IgH.js} +4 -4
- package/dist/{pw-ai-CTHtrCEC.js → pw-ai-DxNrJcCA.js} +3 -3
- package/dist/{qmd-manager-DJeQYS-r.js → qmd-manager-C_XBZ_bT.js} +5 -5
- package/dist/{qmd-manager-CwbYv6nJ.js → qmd-manager-CpNYgSrx.js} +7 -7
- package/dist/{qmd-manager-Cbm03z8H.js → qmd-manager-Q0OSDQ-e.js} +5 -5
- package/dist/{register.agent-CMoYTJqj.js → register.agent-DFQmkIEH.js} +53 -50
- package/dist/{register.agent-BKINbWbs.js → register.agent-DUjwGw9d.js} +77 -73
- package/dist/{register.anima-BHrZ90Sv.js → register.anima-CRFHJu2J.js} +21 -21
- package/dist/{register.anima-CnEy5VFQ.js → register.anima-CtKNrpE8.js} +21 -21
- package/dist/{register.configure-Cv5NkGH2.js → register.configure-CSSN07XN.js} +50 -49
- package/dist/register.configure-CnEKV57N.js +107 -0
- package/dist/register.maintenance-CU1A-90-.js +102 -0
- package/dist/{register.maintenance-DtAw8E_a.js → register.maintenance-fhcCB7ih.js} +48 -47
- package/dist/register.message-C1a0y2ZR.js +661 -0
- package/dist/register.message-fM0jSKB8.js +659 -0
- package/dist/register.onboard-B7Gavmvt.js +128 -0
- package/dist/{register.onboard-U3lIfaw_.js → register.onboard-BhPlqjFi.js} +50 -49
- package/dist/{register.setup-CLkGhR-e.js → register.setup-0jPnMgnz.js} +96 -92
- package/dist/{register.setup-Dyp5L_GQ.js → register.setup-CADdQUEN.js} +72 -69
- package/dist/{register.status-health-sessions-Dx-qZMol.js → register.status-health-sessions-Cu5fDT-z.js} +68 -67
- package/dist/{register.status-health-sessions-Cc2Y5gSj.js → register.status-health-sessions-DdQsABr_.js} +40 -39
- package/dist/{register.subclis-L55mGheS.js → register.subclis-CZ91ufCy.js} +28 -21
- package/dist/{reply-BgPvB-gR.js → reply-DtHlnzOx.js} +6631 -6172
- package/dist/{reply-prefix-37W_P4kH.js → reply-prefix-C8dIgJur.js} +1 -1
- package/dist/{reply-prefix-DBRqtDEq.js → reply-prefix-DmWGtcH-.js} +1 -1
- package/dist/{routes-ZlpnlJFF.js → routes-CWCAc8uJ.js} +2 -2
- package/dist/{routes-DeDgHj5Y.js → routes-FT0Us8Md.js} +6 -6
- package/dist/{run-DEHnKm2x.js → run-Dfz_7j7t.js} +1256 -166
- package/dist/{run-BFPM6M2S.js → run-DqBQ-bGn.js} +1230 -140
- package/dist/{run-main-Cxmjk1SF.js → run-main-DGDW0fhx.js} +51 -50
- package/dist/{runtime-guard-cBL2D5J8.js → runtime-guard-D14Z_QY6.js} +1 -1
- package/dist/{sandbox-DDOFuJU9.js → sandbox-D-N7M7lp.js} +2 -2
- package/dist/{sandbox-cli-GhcxR1Va.js → sandbox-cli-CQKz2I1X.js} +9 -9
- package/dist/{sandbox-cli-CGJvhJ4L.js → sandbox-cli-DHNFlTo-.js} +23 -23
- package/dist/{sandbox-B8Nza4lP.js → sandbox-pBHlfFdB.js} +6 -6
- package/dist/{security-cli-B7VIDDSL.js → security-cli-Bdi7MuP6.js} +14 -22
- package/dist/{security-cli-gsyz4Wrw.js → security-cli-C3aI09uy.js} +27 -35
- package/dist/{semantic-C3Z-zhNi.js → semantic-9rgWUrz3.js} +1 -1
- package/dist/{semantic-CG6X3rBo.js → semantic-C1UN3bb9.js} +1 -1
- package/dist/{semantic-DCd6zBnV.js → semantic-CQApJNO_.js} +1 -1
- package/dist/{server-context-Dkz4Ce8z.js → server-context-Clykq0XU.js} +1 -1
- package/dist/{server-context-BlJi7pjP.js → server-context-Yx4pgBqJ.js} +7 -7
- package/dist/{server-node-events-DBOg36in.js → server-node-events-BR1aXVlu.js} +55 -53
- package/dist/{server-node-events-CmZXzWcd.js → server-node-events-Ca797E1d.js} +34 -31
- package/dist/{service-QlHhVsQf.js → service-Dd1DfPia.js} +1 -1
- package/dist/{service-audit-D4xG05j8.js → service-audit-Bwpoc2LD.js} +1 -1
- package/dist/{service-audit-BaoBb09i.js → service-audit-KzOtcw_V.js} +3 -3
- package/dist/{session-BJ9XCJBg.js → session-5YO_H-Ra.js} +1 -1
- package/dist/{session-3MLbl1-K.js → session-BiA6jrcs.js} +1 -1
- package/dist/session-C7IGnhd1.js +190 -0
- package/dist/{session-KNXzWBht.js → session-CSmfU0D3.js} +1 -1
- package/dist/{session-CqKJvPTq.js → session-DLevr8Vd.js} +5 -5
- package/dist/session-DfsMJNG3.js +190 -0
- package/dist/{session-TAOVpONo.js → session-FmXsucR7.js} +2 -2
- package/dist/{session-cost-usage-BamtB1rn.js → session-cost-usage-BWqR-ik6.js} +1 -1
- package/dist/{sessions-C2th3rm6.js → sessions-BOzeFzuL.js} +12 -22
- package/dist/{sessions-1XK2mH6L.js → sessions-C_3wTmSA.js} +9 -19
- package/dist/{sessions-BrQHxX_o.js → sessions-Dj7_4mkr.js} +4 -4
- package/dist/{settings-cli-CCtkuc1r.js → settings-cli-DxNeu6kx.js} +79 -77
- package/dist/{settings-cli-Ccizggz2.js → settings-cli-Dytfop1H.js} +50 -49
- package/dist/{setup-token-Dqtgnjxw.js → setup-token-B802CZwe.js} +13 -18
- package/dist/{setup-token-Bcer2kX8.js → setup-token-DYh2QzJ-.js} +29 -34
- package/dist/{shared-Hnu5dChj.js → shared-C-rqLtIT.js} +2 -2
- package/dist/{shell-env-KRrv3dPW.js → shell-env-CMI9f7-7.js} +1 -1
- package/dist/{shell-env-B4ae4lFh.js → shell-env-HkVWMh--.js} +1 -1
- package/dist/{shell-env-PnmcBTp4.js → shell-env-iPnSIi-t.js} +1 -1
- package/dist/{skills-CQoUYlGu.js → skills-4v6-kw0C.js} +3 -3
- package/dist/{skills-cli-DQuLxQUM.js → skills-cli-BoasNTpZ.js} +15 -15
- package/dist/{skills-cli-CNNy0FxN.js → skills-cli-TeAq3fRG.js} +3 -3
- package/dist/{skills-install-2DbC1Yo2.js → skills-install-D6_qpRjW.js} +7 -7
- package/dist/{skills-install-CE6djAWL.js → skills-install-Qw2oU8L8.js} +2 -2
- package/dist/{skills-status-ybjSmiHu.js → skills-status-CvH7AUoY.js} +4 -4
- package/dist/{soul-Bt57OdSx.js → soul-BiIdv3Wp.js} +125 -5
- package/dist/{soul-DFeEGG5h.js → soul-Bt8UNmTq.js} +126 -5
- package/dist/{soul-CwWWw7cs.js → soul-D9k5zulC.js} +2 -2
- package/dist/{soul-Bru-rRjk.js → soul-DQSYs-4l.js} +1 -1
- package/dist/{sqlite-BTcAhNls.js → sqlite-BMMt7osH.js} +2 -2
- package/dist/{sqlite-ClLAW1iQ.js → sqlite-CZ1vD4VS.js} +4 -4
- package/dist/{sqlite-CLZ1eR5Q.js → sqlite-CpAJt-JS.js} +1 -1
- package/dist/{start-DfC7PlAH.js → start-BqnPia0t.js} +66 -63
- package/dist/start-C3fuLzX0.js +157 -0
- package/dist/{status-BVAoIQ0V.js → status-CHGNPonc.js} +26 -44
- package/dist/{status-BU6h4wUP.js → status-CxF6k_jr.js} +2 -2
- package/dist/{status-C9B6cEM0.js → status-DfZJJqNs.js} +15 -15
- package/dist/{status-BaEcHPtc.js → status-tLgozFYL.js} +4 -4
- package/dist/{status.update-CbIRaeaV.js → status.update-B6Tdpk07.js} +2 -2
- package/dist/{status.update-CPACVnCc.js → status.update-E9dSFk_b.js} +1 -1
- package/dist/{subagent-registry-MZIxVf8W.js → subagent-registry-CPtElVX0.js} +807 -348
- package/dist/{subsystem-BMsbqSb4.js → subsystem-BAADN1B8.js} +18 -27
- package/dist/{subsystem-CucjNlOk.js → subsystem-D-Xta-sj.js} +17 -26
- package/dist/{subsystem-DA3Cno1i.js → subsystem-D1AJZPgG.js} +38 -47
- package/dist/{system-cli-BKicxULp.js → system-cli-CP7JrhR0.js} +15 -15
- package/dist/{system-cli-Unb-WFAR.js → system-cli-DoLzi2Sn.js} +8 -8
- package/dist/{systemd-5KGZ3NHE.js → systemd-Bx76sJ3M.js} +2 -2
- package/dist/{systemd-linger-B-uyzDap.js → systemd-linger-BVwGXVS0.js} +2 -2
- package/dist/{systemd-linger-CS_pA1-a.js → systemd-linger-CxGmIy_5.js} +1 -1
- package/dist/{table-CdHBo5d1.js → table-Blmz7glr.js} +2 -2
- package/dist/{tokens-DGhK0fpG.js → tokens-SP2Q7i59.js} +1 -1
- package/dist/{tool-images-DK97edts.js → tool-images-2qproko3.js} +2 -2
- package/dist/{tool-images-Dq55i0mz.js → tool-images-C6cKHTbj.js} +2 -2
- package/dist/{tool-images-J0rGmoDV.js → tool-images-CgDT0Xzv.js} +2 -2
- package/dist/{tui-Bm8FEW0b.js → tui-C2eLfbhA.js} +5 -5
- package/dist/{tui-cli-BGjsxGle.js → tui-cli-BgcbCtgc.js} +12 -12
- package/dist/{tui-cli-TwCYv-a7.js → tui-cli-cLSYBQu9.js} +27 -27
- package/dist/{tui-DtGKiHUr.js → tui-r4qpJhNk.js} +10 -10
- package/dist/{update-Dfi92PZJ.js → update-CqKpX3cX.js} +3 -3
- package/dist/{update-Dle5MRUz.js → update-DA91za97.js} +1 -1
- package/dist/{update-cli-QMVW2eiR.js → update-cli-BuCw75tM.js} +87 -85
- package/dist/{update-cli-D1e-DsWy.js → update-cli-C-er5av6.js} +55 -54
- package/dist/{update-runner-DPmSGXS3.js → update-runner-czCqHZCu.js} +5 -5
- package/dist/{update-runner-iLJQF6VA.js → update-runner-kE8AMQt4.js} +1 -1
- package/dist/{utils-B60lF9Wq.js → utils-CLYlhJuc.js} +1 -1
- package/dist/{web-DJRRkHG8.js → web-BHGK5GtV.js} +24 -24
- package/dist/web-CyYunanU.js +65 -0
- package/dist/{web-DDAkSrtZ.js → web-DvTXV-fo.js} +35 -34
- package/dist/{web-DBQRQY6n.js → web-so3pGceM.js} +27 -27
- package/dist/{webhooks-cli-Cg0F2mU6.js → webhooks-cli-k3QMf7Rs.js} +4 -4
- package/dist/{webhooks-cli-BsWx7MgH.js → webhooks-cli-vlEfXEKm.js} +12 -12
- package/dist/{whatsapp-actions-gpz6-vPI.js → whatsapp-actions-6fPRKwPV.js} +11 -11
- package/dist/{whatsapp-actions-DJpQVKnT.js → whatsapp-actions-BJn-z76S.js} +17 -17
- package/dist/{whatsapp-actions-tWRWRZ4X.js → whatsapp-actions-C0tlEdLy.js} +5 -5
- package/dist/{whatsapp-actions-CMEP8v3k.js → whatsapp-actions-Hr-W8vjY.js} +13 -13
- package/dist/{widearea-dns-BDtWuGCY.js → widearea-dns-CHAT20aR.js} +1 -1
- package/dist/{workspace-BQkffCaR.js → workspace-BFIZCnGo.js} +5 -5
- package/dist/{ws-log-Bc4grA6W.js → ws-log-CUobU2tD.js} +1 -1
- package/package.json +1 -1
- package/templates/profiles/nox.profile.json5 +5 -5
- package/dist/cli--Gal7v4I.js +0 -101
- package/dist/config-cli-cyvL43DG.js +0 -15
- package/dist/control-ui/assets/index-B7CJLRZD.css +0 -1
- package/dist/control-ui/assets/index-DLPYIcs0.js +0 -58
- package/dist/control-ui/assets/index-DLPYIcs0.js.map +0 -1
- package/dist/deps-CeyVMZf1.js +0 -13
- package/dist/models-ByeH7ZKb.js +0 -1350
- package/dist/register.configure-3GfqcGLK.js +0 -105
- package/dist/register.maintenance-YZDsMymb.js +0 -100
- package/dist/register.onboard-Dswys-iV.js +0 -126
- package/dist/start-BPye9w5U.js +0 -154
- package/dist/web-DE-hmqXy.js +0 -64
- /package/dist/{BasicParser-BiEpjka-.js → BasicParser-D4BHCxVb.js} +0 -0
- /package/dist/{agents.config-DibGEnBs.js → agents.config-Br4ULmK0.js} +0 -0
- /package/dist/{archive-BIKRyvqD.js → archive-CNqghdwQ.js} +0 -0
- /package/dist/{archive-5e-Ytlq-.js → archive-D-dHRz-v.js} +0 -0
- /package/dist/{argv-B6vsXQtF.js → argv-nNQ109_K.js} +0 -0
- /package/dist/{auth-store-Vfd6oc1G.js → auth-store-BEfSfCbW.js} +0 -0
- /package/dist/{auto-update-BUbllW1X.js → auto-update-Cvd8YJrT.js} +0 -0
- /package/dist/{auto-update-DdH8fo63.js → auto-update-DO4nHkfM.js} +0 -0
- /package/dist/{brew-Bkf_MwX9.js → brew-DHWnVWm3.js} +0 -0
- /package/dist/{budget-CV0a771W.js → budget-DvjICb0t.js} +0 -0
- /package/dist/{budget-GiXjG9eW.js → budget-e0R5xsU3.js} +0 -0
- /package/dist/{command-options-DfPEZwUK.js → command-options-DtJ8-EC7.js} +0 -0
- /package/dist/{command-options-mgpP-XId.js → command-options-eC-m_qJx.js} +0 -0
- /package/dist/{delivery-queue-DGnDKL02.js → delivery-queue-BKQk1j0k.js} +0 -0
- /package/dist/{delivery-queue-DZ_ibFDu.js → delivery-queue-CExaJXRz.js} +0 -0
- /package/dist/{display-BwSYYxVE.js → display-4p3-O9mP.js} +0 -0
- /package/dist/{display-Dck2kudh.js → display-Bo8pBhMp.js} +0 -0
- /package/dist/{exec-approvals-BJikgQkX.js → exec-approvals-DK5-KCUz.js} +0 -0
- /package/dist/{format-wiLVr0D3.js → format-9DMvWYUJ.js} +0 -0
- /package/dist/{format-duration-C5oKCGwB.js → format-duration-CnGkTPRF.js} +0 -0
- /package/dist/{gmail-setup-utils-CR33Gqfc.js → gmail-setup-utils-BIXtKTpT.js} +0 -0
- /package/dist/{help-format-DJx5Rwy2.js → help-format-ZKxl6UCb.js} +0 -0
- /package/dist/{helpers-8O7IVGO-.js → helpers-CWQnEONe.js} +0 -0
- /package/dist/{hooks-status-DiqubDlK.js → hooks-status-DqfJDvYl.js} +0 -0
- /package/dist/{ipv4-BYbwrpG-.js → ipv4-CExV55ho.js} +0 -0
- /package/dist/{is-main-BnikY3ud.js → is-main-H-hpHkdq.js} +0 -0
- /package/dist/{lib-D1DXSMt_.js → lib-D0_kW-B6.js} +0 -0
- /package/dist/{links-3c7gzW-G.js → links-BjjDMNIq.js} +0 -0
- /package/dist/{logging-Bpf6Cepz.js → logging-DWwOqnTW.js} +0 -0
- /package/dist/{logging-DcXIbpwk.js → logging-_rCcBkls.js} +0 -0
- /package/dist/{model-param-b-BcBBSgiD.js → model-param-b-2KmFir_0.js} +0 -0
- /package/dist/{node-service-BDlDNv3t.js → node-service-cOoW5hLa.js} +0 -0
- /package/dist/{note-BaOKDvcy.js → note-CeLGcHqv.js} +0 -0
- /package/dist/{noxsoft-auth-Bmict45b.js → noxsoft-auth-CE75mBXE.js} +0 -0
- /package/dist/{noxsoft-auth-DpwLJIW0.js → noxsoft-auth-CgCk5707.js} +0 -0
- /package/dist/{pi-model-discovery-ClWISQ3j.js → pi-model-discovery-Bu4Zr7nI.js} +0 -0
- /package/dist/{ports-aNJUI3Mi.js → ports-BGLuwt2Z.js} +0 -0
- /package/dist/{progress-Dj2aBWOI.js → progress-glCgu57m.js} +0 -0
- /package/dist/{qmd-manager-DrDX4o7e.js → qmd-manager-CO795NK4.js} +0 -0
- /package/dist/{queue-B77yV52t.js → queue-DDq0uzy5.js} +0 -0
- /package/dist/{queue-wFYwitx0.js → queue-DtQ5sbyD.js} +0 -0
- /package/dist/{registry-gaRST__4.js → registry-BvymIcVf.js} +0 -0
- /package/dist/{registry-Cv8RtADU.js → registry-DwaHkd_j.js} +0 -0
- /package/dist/{requirements-CEowKaVY.js → requirements-Ct4XnMiK.js} +0 -0
- /package/dist/{skill-scanner-DGoUYV22.js → skill-scanner-5_Y3u6SU.js} +0 -0
- /package/dist/{skill-scanner-FO7SyxAD.js → skill-scanner-Dld2ijVw.js} +0 -0
- /package/dist/{templates-D-h5PNIK.js → templates-4_And8I_.js} +0 -0
- /package/dist/{templates-ndPXOyGA.js → templates-5Z-UIDze.js} +0 -0
- /package/dist/{types-DSS9sywz.js → types-BQk_oAin.js} +0 -0
- /package/dist/{usage-format-BtlQ-77V.js → usage-format-BSa7cHyK.js} +0 -0
- /package/dist/{ws-log-BA9w1cJs.js → ws-log-CG6cvCZW.js} +0 -0
|
@@ -1,77 +1,79 @@
|
|
|
1
1
|
import { h as expandHomePrefix, i as isNixMode, l as resolveGatewayLockDir, m as resolveStateDir, o as resolveConfigPath, r as STATE_DIR, t as CONFIG_PATH, u as resolveGatewayPort } from "./paths-zhVksOvm.js";
|
|
2
|
-
import { E as getActivePluginRegistry, F as setVerbose, G as setLoggerOverride, H as getChildLogger, U as getLogger, W as getResolvedLoggerSettings, d as defaultRuntime, g as CHANNEL_IDS, i as getResolvedConsoleSettings, n as runtimeForLogger, o as setConsoleSubsystemFilter, s as setConsoleTimestampPrefix, t as createSubsystemLogger, v as DEFAULT_CHAT_CHANNEL } from "./subsystem-
|
|
3
|
-
import { C as shortenHomePath, D as truncateUtf16Safe, b as resolveUserPath, c as ensureDir, d as isPlainObject, r as clamp, t as CONFIG_DIR } from "./utils-
|
|
4
|
-
import { C as supportsXHighThinking, _ as normalizeElevatedLevel, b as normalizeUsageDisplay, m as formatXHighModelHint, p as formatThinkingLevels, v as normalizeReasoningLevel, x as normalizeVerboseLevel, y as normalizeThinkLevel } from "./pi-embedded-helpers-
|
|
5
|
-
import { $ as
|
|
2
|
+
import { E as getActivePluginRegistry, F as setVerbose, G as setLoggerOverride, H as getChildLogger, U as getLogger, W as getResolvedLoggerSettings, d as defaultRuntime, g as CHANNEL_IDS, i as getResolvedConsoleSettings, n as runtimeForLogger, o as setConsoleSubsystemFilter, s as setConsoleTimestampPrefix, t as createSubsystemLogger, v as DEFAULT_CHAT_CHANNEL } from "./subsystem-BAADN1B8.js";
|
|
3
|
+
import { C as shortenHomePath, D as truncateUtf16Safe, b as resolveUserPath, c as ensureDir, d as isPlainObject, r as clamp, t as CONFIG_DIR } from "./utils-CLYlhJuc.js";
|
|
4
|
+
import { C as supportsXHighThinking, _ as normalizeElevatedLevel, b as normalizeUsageDisplay, m as formatXHighModelHint, p as formatThinkingLevels, v as normalizeReasoningLevel, x as normalizeVerboseLevel, y as normalizeThinkLevel } from "./pi-embedded-helpers-BZ9GspxK.js";
|
|
5
|
+
import { $ as archiveFileOnDisk, At as deferGatewayRestartUntilIdle, B as sniffMimeFromBase64, C as verifyNodeToken, Cn as stopDiagnosticHeartbeat, Cr as DEFAULT_INPUT_PDF_MAX_PIXELS, Ct as loadProviderStore, D as registerSkillsChangeListener, Dr as extractImageContentFromSource, E as getSkillsSnapshotVersion, Er as extractFileContentFromSource, F as abortEmbeddedPiRun, Ft as setGatewaySigusr1RestartPolicy, G as canonicalizeSpawnedByForAgent, Gn as CommandLane, Gt as normalizeCronJobPatch, Hn as readLatestAssistantReply, I as waitForEmbeddedPiRunEnd, It as setPreRestartDeferralCheck, J as loadCombinedSessionStoreForGateway, Jn as getAgentRunContext, Jt as normalizeOptionalText, K as listAgentsForGateway, Kn as clearAgentRunContext, Kt as inferLegacyName, L as runNoxSoftEmbeddedAgent, Ln as countActiveDescendantRuns, Lt as consumeRestartSentinel, M as resetAllLanes, Mn as isAbortTrigger, Mr as resolveAgentTimeoutMs, Mt as isGatewaySigusr1RestartExternallyAllowed, N as setCommandLaneConcurrency, Nn as stopSubagentsForRequester, Nt as markGatewaySigusr1RestartHandled, O as clearSessionQueues, Or as normalizeMimeList, P as waitForActiveTasks, Pt as scheduleGatewaySigusr1Restart, Q as resolveSessionModelRef, R as applyToolPolicyPipeline, Rn as initSubagentRegistry, Rt as formatDoctorNonInteractiveHint, S as updatePairedNodeMetadata, Sn as startDiagnosticHeartbeat, Sr as DEFAULT_INPUT_PDF_MAX_PAGES, St as loadProviderUsageSummary, T as verifyPairingToken, Tr as DEFAULT_INPUT_TIMEOUT_MS, Tt as saveProviderStore, U as createAnimaTools, Ut as writeRestartSentinel, V as requestHeartbeatNow, Vn as runSubagentAnnounceFlow, Vt as summarizeRestartSentinel, W as resolveAnnounceTargetFromKey, Wt as normalizeCronJobCreate, X as pruneLegacyStoreKeys, Xn as registerAgentRunContext, Xt as normalizeRequiredName, Y as loadSessionEntry, Yn as onAgentEvent, Yt as normalizePayloadToSystemText, Z as resolveGatewaySessionStoreTarget, Zn as resolveAgentIdentity, Zt as migrateLegacyCronPayload, _ as approveNodePairing, _n as dispatchInboundMessage, _r as DEFAULT_INPUT_FILE_MAX_CHARS, _t as resetDirectoryCache, an as persistBrowserProxyFiles, ar as applyVerboseOverride, at as stripEnvelopeFromMessages, b as renamePairedNode, br as DEFAULT_INPUT_IMAGE_MIMES, bt as runWithModelFallback, c as normalizeSendPolicy, cr as isSystemEventContextChanged, d as primeRemoteSkillsCache, dr as loadModelCatalog, dt as resolveOutboundSessionRoute, en as buildSafeExternalPrompt, et as archiveSessionTranscripts, f as recordRemoteNodeInfo, g as setSkillsRemoteRegistry, gr as DEFAULT_INPUT_FILE_MAX_BYTES, h as removeRemoteNodeInfo, ht as resolveSessionDeliveryTarget, i as setCliSessionId, in as applyBrowserProxyPaths, ir as applyModelOverrideToSessionEntry, it as resolveSessionTranscriptCandidates, j as getTotalQueueSize, jt as emitGatewayRestart, k as getActiveTaskCount, kn as formatZonedTimestamp, kr as estimateBase64DecodedBytes, kt as consumeGatewaySigusr1RestartAuthorization, l as resolveSendPolicy, m as refreshRemoteNodeBins, mr as registerUnhandledRejectionHandler, mt as resolveOutboundTarget, n as BARE_SESSION_RESET_PROMPT, nn as getHookType, nr as lookupContextTokens, nt as readSessionMessages, on as getPluginToolMeta, or as parseVerboseOverride, p as refreshRemoteBinsForConnectedNodes, pn as getChannelActivity, q as listSessionsFromStore, qn as emitAgentEvent, qt as normalizeOptionalAgentId, r as getCliSessionId, rn as isExternalHookSession, rt as readSessionPreviewItemsFromTranscript, sn as loadAnimaPlugins, sr as enqueueSystemEvent, st as normalizeGroupActivation, tn as detectSuspiciousPatterns, tt as capArrayByJsonBytes, u as getRemoteSkillEligibility, ut as ensureOutboundSessionEntry, v as listNodePairing, vn as createReplyDispatcher, vr as DEFAULT_INPUT_FILE_MIMES, vt as resolveMessageChannelSelection, w as generatePairingToken, wn as isDiagnosticsEnabled, wr as DEFAULT_INPUT_PDF_MIN_TEXT_CHARS, wt as maskApiKey, x as requestNodePairing, xr as DEFAULT_INPUT_MAX_REDIRECTS, xt as resolveWorkingModeModelSelection, y as rejectNodePairing, yn as getTotalPendingReplies, yr as DEFAULT_INPUT_IMAGE_MAX_BYTES, z as buildDefaultToolPolicyPipelineSteps, zn as listDescendantRunsForRequester, zt as formatRestartSentinelMessage } from "./reply-DtHlnzOx.js";
|
|
6
6
|
import { b as isSubagentSessionKey, d as resolveAgentIdFromSessionKey, i as buildAgentMainSessionKey, l as normalizeAgentId, m as toAgentRequestSessionKey, n as DEFAULT_AGENT_ID, t as DEFAULT_ACCOUNT_ID, u as normalizeMainKey, v as isCronRunSessionKey, x as parseAgentSessionKey } from "./session-key-DAZmp8ll.js";
|
|
7
|
-
import { a as logDebug, c as logWarn, n as runExec, t as runCommandWithTimeout } from "./exec-
|
|
7
|
+
import { a as logDebug, c as logWarn, n as runExec, t as runCommandWithTimeout } from "./exec-BylR5qWS.js";
|
|
8
8
|
import { t as resolveAnimaPackageRoot } from "./anima-root-xWSKR6Wm.js";
|
|
9
|
-
import { T as resolveWorkspaceTemplateDir, _ as DEFAULT_MEMORY_FILENAME, b as DEFAULT_USER_FILENAME, c as resolveDefaultAgentId, d as DEFAULT_AGENTS_FILENAME, g as DEFAULT_MEMORY_ALT_FILENAME, h as DEFAULT_IDENTITY_FILENAME, i as resolveAgentModelFallbacksOverride, l as resolveSessionAgentId, m as DEFAULT_HEARTBEAT_FILENAME, n as resolveAgentConfig, p as DEFAULT_BOOTSTRAP_FILENAME, r as resolveAgentDir, s as resolveAgentWorkspaceDir, t as listAgentIds, v as DEFAULT_SOUL_FILENAME, w as resolveDefaultAgentWorkspaceDir, x as ensureAgentWorkspace, y as DEFAULT_TOOLS_FILENAME } from "./agent-scope-
|
|
10
|
-
import { _ as DEFAULT_MODEL, a as isCliProvider, d as resolveConfiguredModelRef, f as resolveDefaultModelForAgent, g as DEFAULT_CONTEXT_TOKENS, h as resolveThinkingDefault, i as getModelRefStatus, p as resolveHooksGmailModel, u as resolveAllowedModelRef, v as DEFAULT_PROVIDER } from "./model-selection-
|
|
11
|
-
import { A as resolveAgentMaxConcurrent, M as VERSION, T as applyLegacyMigrations, a as parseConfigJson5, c as resolveConfigSnapshotHash, d as AnimaSchema, i as loadConfig, j as resolveSubagentMaxConcurrent, l as writeConfigFile, m as parseDurationMs, n as migrateLegacyConfig, o as readConfigFileSnapshot, p as sensitive, r as createConfigIO, s as readConfigFileSnapshotForWrite, u as validateConfigObjectWithPlugins, w as applyMergePatch } from "./config-
|
|
12
|
-
import { n as logAcceptedEnvOption, t as isTruthyEnvValue } from "./env-
|
|
13
|
-
import { c as isTestDefaultMemorySlotDisabled } from "./manifest-registry-
|
|
14
|
-
import { A as resolveMainSessionKeyFromConfig, D as resolveAgentMainSessionKey, M as snapshotSessionOrigin, O as resolveExplicitAgentSessionKey, d as deliveryContextFromSession, h as normalizeSessionDeliveryFields, i as loadSessionStore, k as resolveMainSessionKey, l as updateSessionStore, p as mergeDeliveryContext, t as extractDeliveryInfo } from "./sessions-
|
|
15
|
-
import { o as detectMime } from "./image-ops-
|
|
16
|
-
import { t as normalizePollInput } from "./polls-
|
|
17
|
-
import { _ as resolveToolProfilePolicy, p as collectExplicitAllowlist } from "./sandbox-
|
|
9
|
+
import { T as resolveWorkspaceTemplateDir, _ as DEFAULT_MEMORY_FILENAME, b as DEFAULT_USER_FILENAME, c as resolveDefaultAgentId, d as DEFAULT_AGENTS_FILENAME, g as DEFAULT_MEMORY_ALT_FILENAME, h as DEFAULT_IDENTITY_FILENAME, i as resolveAgentModelFallbacksOverride, l as resolveSessionAgentId, m as DEFAULT_HEARTBEAT_FILENAME, n as resolveAgentConfig, p as DEFAULT_BOOTSTRAP_FILENAME, r as resolveAgentDir, s as resolveAgentWorkspaceDir, t as listAgentIds, v as DEFAULT_SOUL_FILENAME, w as resolveDefaultAgentWorkspaceDir, x as ensureAgentWorkspace, y as DEFAULT_TOOLS_FILENAME } from "./agent-scope-CXxC8FFX.js";
|
|
10
|
+
import { _ as DEFAULT_MODEL, a as isCliProvider, d as resolveConfiguredModelRef, f as resolveDefaultModelForAgent, g as DEFAULT_CONTEXT_TOKENS, h as resolveThinkingDefault, i as getModelRefStatus, p as resolveHooksGmailModel, u as resolveAllowedModelRef, v as DEFAULT_PROVIDER } from "./model-selection-CY6r_3wt.js";
|
|
11
|
+
import { A as resolveAgentMaxConcurrent, M as VERSION, T as applyLegacyMigrations, a as parseConfigJson5, c as resolveConfigSnapshotHash, d as AnimaSchema, i as loadConfig, j as resolveSubagentMaxConcurrent, l as writeConfigFile, m as parseDurationMs, n as migrateLegacyConfig, o as readConfigFileSnapshot, p as sensitive, r as createConfigIO, s as readConfigFileSnapshotForWrite, u as validateConfigObjectWithPlugins, w as applyMergePatch } from "./config-DaD4FsAn.js";
|
|
12
|
+
import { n as logAcceptedEnvOption, t as isTruthyEnvValue } from "./env-DlTia1B4.js";
|
|
13
|
+
import { c as isTestDefaultMemorySlotDisabled } from "./manifest-registry-qF960vMH.js";
|
|
14
|
+
import { A as resolveMainSessionKeyFromConfig, D as resolveAgentMainSessionKey, M as snapshotSessionOrigin, O as resolveExplicitAgentSessionKey, d as deliveryContextFromSession, h as normalizeSessionDeliveryFields, i as loadSessionStore, k as resolveMainSessionKey, l as updateSessionStore, p as mergeDeliveryContext, t as extractDeliveryInfo } from "./sessions-BOzeFzuL.js";
|
|
15
|
+
import { o as detectMime } from "./image-ops-Ct3GueyT.js";
|
|
16
|
+
import { t as normalizePollInput } from "./polls-DFISjV7H.js";
|
|
17
|
+
import { _ as resolveToolProfilePolicy, p as collectExplicitAllowlist } from "./sandbox-pBHlfFdB.js";
|
|
18
18
|
import { t as formatCliCommand } from "./command-format-BCtkuvqF.js";
|
|
19
|
-
import { a as AUTH_RATE_LIMIT_SCOPE_DEVICE_TOKEN, c as safeEqualSecret, d as enableTailscaleFunnel, f as enableTailscaleServe, i as resolveGatewayAuth, l as disableTailscaleFunnel, m as getTailnetHostname, n as authorizeGatewayConnect, o as AUTH_RATE_LIMIT_SCOPE_SHARED_SECRET, r as isLocalDirectRequest, s as createAuthRateLimiter, t as assertGatewayAuthConfigured, u as disableTailscaleServe } from "./auth-
|
|
19
|
+
import { a as AUTH_RATE_LIMIT_SCOPE_DEVICE_TOKEN, c as safeEqualSecret, d as enableTailscaleFunnel, f as enableTailscaleServe, i as resolveGatewayAuth, l as disableTailscaleFunnel, m as getTailnetHostname, n as authorizeGatewayConnect, o as AUTH_RATE_LIMIT_SCOPE_SHARED_SECRET, r as isLocalDirectRequest, s as createAuthRateLimiter, t as assertGatewayAuthConfigured, u as disableTailscaleServe } from "./auth-DsC5pZ_0.js";
|
|
20
20
|
import { n as pickPrimaryTailnetIPv6, t as pickPrimaryTailnetIPv4 } from "./tailnet-Bg_vE5qi.js";
|
|
21
21
|
import { a as isTrustedProxyAddress, c as pickPrimaryLanIPv4, d as resolveGatewayListenHosts, i as isPrivateOrLoopbackAddress, l as resolveGatewayBindHost, n as isLoopbackAddress, r as isLoopbackHost, t as rawDataToString, u as resolveGatewayClientIp } from "./ws-BapRHqfx.js";
|
|
22
|
-
import { r as movePathToTrash } from "./server-context-
|
|
23
|
-
import { i as loadWorkspaceSkillEntries, r as buildWorkspaceSkillSnapshot, x as hasBinary } from "./skills-
|
|
22
|
+
import { r as movePathToTrash } from "./server-context-Yx4pgBqJ.js";
|
|
23
|
+
import { i as loadWorkspaceSkillEntries, r as buildWorkspaceSkillSnapshot, x as hasBinary } from "./skills-4v6-kw0C.js";
|
|
24
24
|
import { n as formatErrorMessage } from "./errors-Bv81hF2P.js";
|
|
25
|
-
import { a as inspectPortUsage, s as formatPortDiagnostics } from "./ports-
|
|
26
|
-
import { f as GATEWAY_CLIENT_CAPS, g as hasGatewayClientCap, i as isGatewayMessageChannel, l as normalizeMessageChannel, n as isDeliverableMessageChannel, p as GATEWAY_CLIENT_IDS, r as isGatewayCliClient, s as isWebchatClient, t as INTERNAL_MESSAGE_CHANNEL } from "./message-channel-
|
|
27
|
-
import { n as listChannelPlugins, r as normalizeChannelId, t as getChannelPlugin } from "./plugins-
|
|
25
|
+
import { a as inspectPortUsage, s as formatPortDiagnostics } from "./ports-q535r1PZ.js";
|
|
26
|
+
import { f as GATEWAY_CLIENT_CAPS, g as hasGatewayClientCap, i as isGatewayMessageChannel, l as normalizeMessageChannel, n as isDeliverableMessageChannel, p as GATEWAY_CLIENT_IDS, r as isGatewayCliClient, s as isWebchatClient, t as INTERNAL_MESSAGE_CHANNEL } from "./message-channel-CMsexA3K.js";
|
|
27
|
+
import { n as listChannelPlugins, r as normalizeChannelId, t as getChannelPlugin } from "./plugins-DYcg0qBW.js";
|
|
28
28
|
import { c as resolveStorePath, i as resolveSessionTranscriptPath, n as resolveSessionFilePath, r as resolveSessionFilePathOptions, s as resolveSessionTranscriptsDirForAgent } from "./paths-Dazi-gYo.js";
|
|
29
|
-
import {
|
|
30
|
-
import { n as SILENT_REPLY_TOKEN, r as isSilentReplyText } from "./tokens-
|
|
31
|
-
import { B as
|
|
32
|
-
import { o as normalizeReplyPayloadsForDelivery, t as deliverOutboundPayloads, x as runGlobalGatewayStopSafely, y as getGlobalHookRunner } from "./deliver-
|
|
33
|
-
import { i as resolveMemoryBackendConfig, r as getMemorySearchManager } from "./memory-cli-
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import { s as
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
29
|
+
import { O as normalizeSecretInput } from "./auth-profiles-C-LuhW6c.js";
|
|
30
|
+
import { n as SILENT_REPLY_TOKEN, r as isSilentReplyText } from "./tokens-SP2Q7i59.js";
|
|
31
|
+
import { B as resolveTtsConfig, F as isTtsProviderConfigured, G as setTtsEnabled, H as resolveTtsProviderOrder, J as textToSpeech, M as getTtsProvider, P as isTtsEnabled, R as resolveTtsApiKey, T as resolveUserTimezone, V as resolveTtsPrefsPath, X as OPENAI_TTS_MODELS, Z as OPENAI_TTS_VOICES, at as triggerInternalHook, it as registerInternalHook, nt as clearInternalHooks, ot as DEFAULT_HEARTBEAT_ACK_MAX_CHARS, q as setTtsProvider, rt as createInternalHookEvent, ut as stripHeartbeatToken, z as resolveTtsAutoMode } from "./anthropic-direct-runner-BeYCnvZ8.js";
|
|
32
|
+
import { o as normalizeReplyPayloadsForDelivery, t as deliverOutboundPayloads, x as runGlobalGatewayStopSafely, y as getGlobalHookRunner } from "./deliver-BKzX3YoN.js";
|
|
33
|
+
import { i as resolveMemoryBackendConfig, r as getMemorySearchManager } from "./memory-cli-DLtBA6r5.js";
|
|
34
|
+
import { a as readTrustGraphSnapshot, c as pruneExpiredPending, d as writeJsonAtomic, l as readJsonFile, o as saveTrustGraph, s as createAsyncLock, u as resolvePairingPaths } from "./loader-Bw2wdN4l.js";
|
|
35
|
+
import { t as ToolInputError } from "./common-BCW6hLGI.js";
|
|
36
|
+
import { $ as validateNodePairRequestParams, A as validateCronStatusParams, B as validateExecApprovalsNodeGetParams, C as validateConfigSetParams, Ct as validateWizardCancelParams, D as validateCronRemoveParams, Dt as PROTOCOL_VERSION, E as validateCronListParams, Et as validateWizardStatusParams, F as validateDeviceTokenRevokeParams, G as validateNodeDescribeParams, H as validateExecApprovalsSetParams, I as validateDeviceTokenRotateParams, It as deriveDeviceIdFromPublicKey, J as validateNodeInvokeResultParams, K as validateNodeEventParams, L as validateExecApprovalRequestParams, M as validateDevicePairApproveParams, N as validateDevicePairListParams, Nt as normalizeInputProvenance, O as validateCronRunParams, Ot as ErrorCodes, P as validateDevicePairRejectParams, Pt as buildDeviceAuthPayload, Q as validateNodePairRejectParams, R as validateExecApprovalResolveParams, Rt as normalizeDevicePublicKeyBase64Url, S as validateConfigSchemaParams, St as validateWebLoginWaitParams, T as validateCronAddParams, Tt as validateWizardStartParams, U as validateLogsTailParams, V as validateExecApprovalsNodeSetParams, W as validateModelsListParams, X as validateNodePairApproveParams, Y as validateNodeListParams, Z as validateNodePairListParams, _ as validateChatInjectParams, _t as validateTalkConfigParams, a as validateAgentWaitParams, at as validateSessionsCompactParams, b as validateConfigGetParams, bt as validateWakeParams, c as validateAgentsFilesGetParams, ct as validateSessionsPatchParams, d as validateAgentsListParams, dt as validateSessionsResolveParams, et as validateNodePairVerifyParams, f as validateAgentsUpdateParams, ft as validateSessionsUsageParams, g as validateChatHistoryParams, gt as validateSkillsUpdateParams, h as validateChatAbortParams, ht as validateSkillsStatusParams, i as validateAgentParams, it as validateSendParams, j as validateCronUpdateParams, jt as parseSessionLabel, k as validateCronRunsParams, kt as errorShape, l as validateAgentsFilesListParams, lt as validateSessionsPreviewParams, m as validateChannelsStatusParams, mt as validateSkillsInstallParams, n as formatValidationErrors, nt as validatePollParams, o as validateAgentsCreateParams, ot as validateSessionsDeleteParams, p as validateChannelsLogoutParams, pt as validateSkillsBinsParams, q as validateNodeInvokeParams, r as validateAgentIdentityParams, rt as validateRequestFrame, s as validateAgentsDeleteParams, st as validateSessionsListParams, tt as validateNodeRenameParams, u as validateAgentsFilesSetParams, ut as validateSessionsResetParams, v as validateChatSendParams, vt as validateTalkModeParams, w as validateConnectParams, wt as validateWizardNextParams, x as validateConfigPatchParams, xt as validateWebLoginStartParams, y as validateConfigApplyParams, yt as validateUpdateRunParams, z as validateExecApprovalsGetParams, zt as verifyDeviceSignature } from "./client-BWkoTfOH.js";
|
|
37
|
+
import { s as loadGatewayTlsRuntime$1 } from "./call-CDPbPDAr.js";
|
|
38
|
+
import { a as resolveSubagentToolPolicy, i as resolveGroupToolPolicy, r as resolveEffectiveToolPolicy } from "./pi-tools.policy-WdTAfqbV.js";
|
|
39
|
+
import { n as createBrowserControlContext, r as startBrowserControlServiceFromConfig } from "./control-service-5YtMvm7D.js";
|
|
40
|
+
import { t as createBrowserRouteDispatcher } from "./dispatcher-DzwzLQRk.js";
|
|
40
41
|
import { t as parseAbsoluteTimeMs } from "./parse-Cinbkvj-.js";
|
|
41
|
-
import { i as
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import { r as
|
|
45
|
-
import {
|
|
46
|
-
import { t as
|
|
47
|
-
import { t as
|
|
48
|
-
import { t as
|
|
49
|
-
import { t as
|
|
50
|
-
import {
|
|
42
|
+
import { c as saveToken, i as getToken, l as whoami, n as clearToken, o as registerWithInvite, s as resolveSuggestedIdentity, t as TOKEN_PATH } from "./noxsoft-auth-CE75mBXE.js";
|
|
43
|
+
import { i as loadSessionUsageTimeSeries, l as deriveSessionTotalTokens, n as loadCostUsageSummary, r as loadSessionCostSummary, t as discoverAllSessions, u as hasNonzeroUsage } from "./session-cost-usage-BWqR-ik6.js";
|
|
44
|
+
import { f as resolveExecApprovalsSocketPath, o as normalizeExecApprovals, p as saveExecApprovals, r as ensureExecApprovals, s as readExecApprovalsSnapshot, t as DEFAULT_EXEC_APPROVAL_TIMEOUT_MS } from "./exec-approvals-DK5-KCUz.js";
|
|
45
|
+
import { c as resolveCronStyleNow, i as onHeartbeatEvent, r as getLastHeartbeatEvent, t as resolveHeartbeatVisibility } from "./heartbeat-visibility-ZfNSbFcq.js";
|
|
46
|
+
import { r as buildHistoryContextFromEntries, t as createReplyPrefixOptions } from "./reply-prefix-C8dIgJur.js";
|
|
47
|
+
import { n as createOutboundSendDeps, t as createDefaultDeps } from "./deps-DyT32VfN.js";
|
|
48
|
+
import { t as ensureAnimaCliOnPath } from "./path-env-DLQPf9qj.js";
|
|
49
|
+
import { t as forceFreePortAndWait } from "./ports-DaVrZDUq.js";
|
|
50
|
+
import { t as buildChannelUiCatalog } from "./catalog-CsXv59Tq.js";
|
|
51
|
+
import { t as buildWorkspaceSkillStatus } from "./skills-status-CvH7AUoY.js";
|
|
51
52
|
import { n as DEFAULT_GATEWAY_HTTP_TOOL_DENY } from "./dangerous-tools-BCnOEYau.js";
|
|
52
|
-
import { C as resolveAssistantAvatarUrl, S as normalizeControlUiBasePath, b as CONTROL_UI_AVATAR_PREFIX, c as handleReset, h as resolveControlUiLinks, x as buildControlUiAvatarUrl } from "./onboard-helpers-
|
|
53
|
-
import { t as resolveGatewayService } from "./service-
|
|
53
|
+
import { C as resolveAssistantAvatarUrl, S as normalizeControlUiBasePath, b as CONTROL_UI_AVATAR_PREFIX, c as handleReset, h as resolveControlUiLinks, x as buildControlUiAvatarUrl } from "./onboard-helpers-CJ3HzoUO.js";
|
|
54
|
+
import { t as resolveGatewayService } from "./service-Dd1DfPia.js";
|
|
54
55
|
import { t as parsePort } from "./parse-port-CDPwDUs3.js";
|
|
55
|
-
import { n as resolveWideAreaDiscoveryDomain, r as writeWideAreaGatewayZone } from "./widearea-dns-
|
|
56
|
-
import { i as toOptionString, n as extractGatewayMiskeys, r as maybeExplainGatewayServiceStop, t as describeUnknownError } from "./shared-
|
|
57
|
-
import { o as isNodeCommandAllowed, s as resolveNodeCommandAllowlist } from "./audit-
|
|
58
|
-
import { n as getStatusSummary } from "./status-
|
|
56
|
+
import { n as resolveWideAreaDiscoveryDomain, r as writeWideAreaGatewayZone } from "./widearea-dns-CHAT20aR.js";
|
|
57
|
+
import { i as toOptionString, n as extractGatewayMiskeys, r as maybeExplainGatewayServiceStop, t as describeUnknownError } from "./shared-C-rqLtIT.js";
|
|
58
|
+
import { o as isNodeCommandAllowed, s as resolveNodeCommandAllowlist } from "./audit-B05W5ckN.js";
|
|
59
|
+
import { n as getStatusSummary } from "./status-CHGNPonc.js";
|
|
59
60
|
import { t as resolveChannelDefaultAccountId } from "./helpers-1MPChTcB.js";
|
|
60
|
-
import { c as startHeartbeatRunner, n as getHealthSnapshot, o as runHeartbeatOnce, s as setHeartbeatsEnabled } from "./health-
|
|
61
|
-
import { t as applyPluginAutoEnable } from "./plugin-auto-enable-
|
|
62
|
-
import { a as resolveControlUiRootOverrideSync, n as ensureControlUiAssetsBuilt, o as resolveControlUiRootSync } from "./health-format-
|
|
61
|
+
import { c as startHeartbeatRunner, n as getHealthSnapshot, o as runHeartbeatOnce, s as setHeartbeatsEnabled } from "./health-CabOEPQ0.js";
|
|
62
|
+
import { t as applyPluginAutoEnable } from "./plugin-auto-enable-CtYcdTju.js";
|
|
63
|
+
import { a as resolveControlUiRootOverrideSync, n as ensureControlUiAssetsBuilt, o as resolveControlUiRootSync } from "./health-format-D-JJ5_S4.js";
|
|
63
64
|
import { n as validateSystemRunCommandConsistency, r as getMachineDisplayName, t as formatExecCommand } from "./system-run-command-Bx8-5h2r.js";
|
|
64
|
-
import { h as normalizeUpdateChannel, l as DEFAULT_PACKAGE_CHANNEL, n as checkUpdateStatus, o as resolveNpmChannelTag, r as compareSemverStrings } from "./channels-status-issues-
|
|
65
|
-
import { t as WizardCancelledError } from "./prompts-
|
|
66
|
-
import { i as shouldIncludeHook, n as loadWorkspaceHookEntries, r as resolveHookConfig } from "./hooks-status-
|
|
67
|
-
import { t as runOnboardingWizard } from "./onboarding-
|
|
68
|
-
import { a as setGatewayWsLogStyle, i as summarizeAgentEventForWsLog, n as logWs, r as shouldLogWs, t as formatForLog } from "./ws-log-
|
|
69
|
-
import { T as resolveGmailHookRuntimeConfig, _ as buildGogWatchServeArgs, i as ensureTailscaleEndpoint, v as buildGogWatchStartArgs } from "./gmail-setup-utils-
|
|
70
|
-
import {
|
|
71
|
-
import { a as loadAgentIdentity, c as loadAgentIdentityFromWorkspace, i as listAgentEntries, o as pruneAgentConfig, r as findAgentEntryIndex, t as applyAgentConfig } from "./agents.config-
|
|
72
|
-
import { t as
|
|
73
|
-
import { t as
|
|
74
|
-
import { t as
|
|
65
|
+
import { h as normalizeUpdateChannel, l as DEFAULT_PACKAGE_CHANNEL, n as checkUpdateStatus, o as resolveNpmChannelTag, r as compareSemverStrings } from "./channels-status-issues-WkG3Tmxk.js";
|
|
66
|
+
import { t as WizardCancelledError } from "./prompts-Bq4QGFQM.js";
|
|
67
|
+
import { i as shouldIncludeHook, n as loadWorkspaceHookEntries, r as resolveHookConfig } from "./hooks-status-DdweuSIj.js";
|
|
68
|
+
import { t as runOnboardingWizard } from "./onboarding-Djmm0PEM.js";
|
|
69
|
+
import { a as setGatewayWsLogStyle, i as summarizeAgentEventForWsLog, n as logWs, r as shouldLogWs, t as formatForLog } from "./ws-log-CUobU2tD.js";
|
|
70
|
+
import { T as resolveGmailHookRuntimeConfig, _ as buildGogWatchServeArgs, i as ensureTailscaleEndpoint, v as buildGogWatchStartArgs } from "./gmail-setup-utils-DaJoXV_3.js";
|
|
71
|
+
import { t as createOutboundSendDeps$1 } from "./outbound-send-deps-DVfWC4E8.js";
|
|
72
|
+
import { a as loadAgentIdentity, c as loadAgentIdentityFromWorkspace, i as listAgentEntries, o as pruneAgentConfig, r as findAgentEntryIndex, t as applyAgentConfig } from "./agents.config-BR5JLtud.js";
|
|
73
|
+
import { n as resolveAgentDeliveryPlan, r as resolveAgentOutboundTarget, t as agentCommand } from "./agent-VRQM14Xp.js";
|
|
74
|
+
import { t as migrateFromCoherence } from "./migrate-DuohB_ur.js";
|
|
75
|
+
import { t as installSkill } from "./skills-install-D6_qpRjW.js";
|
|
76
|
+
import { t as runGatewayUpdate } from "./update-runner-czCqHZCu.js";
|
|
75
77
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
76
78
|
import * as fsSync from "node:fs";
|
|
77
79
|
import fs, { constants } from "node:fs";
|
|
@@ -109,7 +111,7 @@ function getActiveEmbeddedRunCount() {
|
|
|
109
111
|
|
|
110
112
|
//#endregion
|
|
111
113
|
//#region src/infra/exec-approval-forwarder.ts
|
|
112
|
-
const log$
|
|
114
|
+
const log$7 = createSubsystemLogger("gateway/exec-approvals");
|
|
113
115
|
const DEFAULT_MODE = "session";
|
|
114
116
|
function normalizeMode(mode) {
|
|
115
117
|
return mode ?? DEFAULT_MODE;
|
|
@@ -224,7 +226,7 @@ async function deliverToTargets(params) {
|
|
|
224
226
|
payloads: [{ text: params.text }]
|
|
225
227
|
});
|
|
226
228
|
} catch (err) {
|
|
227
|
-
log$
|
|
229
|
+
log$7.error(`exec approvals: failed to deliver to ${channel}:${target.to}: ${String(err)}`);
|
|
228
230
|
}
|
|
229
231
|
});
|
|
230
232
|
await Promise.allSettled(deliveries);
|
|
@@ -1461,7 +1463,7 @@ function createAgentEventHandler({ broadcast, broadcastToConnIds, nodeSendToSess
|
|
|
1461
1463
|
* Automatically starts `gog gmail watch serve` when the gateway starts,
|
|
1462
1464
|
* if hooks.gmail is configured with an account.
|
|
1463
1465
|
*/
|
|
1464
|
-
const log$
|
|
1466
|
+
const log$6 = createSubsystemLogger("gmail-watcher");
|
|
1465
1467
|
const ADDRESS_IN_USE_RE = /address already in use|EADDRINUSE/i;
|
|
1466
1468
|
function isAddressInUseError(line) {
|
|
1467
1469
|
return ADDRESS_IN_USE_RE.test(line);
|
|
@@ -1485,13 +1487,13 @@ async function startGmailWatch(cfg) {
|
|
|
1485
1487
|
const result = await runCommandWithTimeout(args, { timeoutMs: 12e4 });
|
|
1486
1488
|
if (result.code !== 0) {
|
|
1487
1489
|
const message = result.stderr || result.stdout || "gog watch start failed";
|
|
1488
|
-
log$
|
|
1490
|
+
log$6.error(`watch start failed: ${message}`);
|
|
1489
1491
|
return false;
|
|
1490
1492
|
}
|
|
1491
|
-
log$
|
|
1493
|
+
log$6.info(`watch started for ${cfg.account}`);
|
|
1492
1494
|
return true;
|
|
1493
1495
|
} catch (err) {
|
|
1494
|
-
log$
|
|
1496
|
+
log$6.error(`watch start error: ${String(err)}`);
|
|
1495
1497
|
return false;
|
|
1496
1498
|
}
|
|
1497
1499
|
}
|
|
@@ -1500,7 +1502,7 @@ async function startGmailWatch(cfg) {
|
|
|
1500
1502
|
*/
|
|
1501
1503
|
function spawnGogServe(cfg) {
|
|
1502
1504
|
const args = buildGogWatchServeArgs(cfg);
|
|
1503
|
-
log$
|
|
1505
|
+
log$6.info(`starting gog ${args.join(" ")}`);
|
|
1504
1506
|
let addressInUse = false;
|
|
1505
1507
|
const child = spawn("gog", args, {
|
|
1506
1508
|
stdio: [
|
|
@@ -1512,25 +1514,25 @@ function spawnGogServe(cfg) {
|
|
|
1512
1514
|
});
|
|
1513
1515
|
child.stdout?.on("data", (data) => {
|
|
1514
1516
|
const line = data.toString().trim();
|
|
1515
|
-
if (line) log$
|
|
1517
|
+
if (line) log$6.info(`[gog] ${line}`);
|
|
1516
1518
|
});
|
|
1517
1519
|
child.stderr?.on("data", (data) => {
|
|
1518
1520
|
const line = data.toString().trim();
|
|
1519
1521
|
if (!line) return;
|
|
1520
1522
|
if (isAddressInUseError(line)) addressInUse = true;
|
|
1521
|
-
log$
|
|
1523
|
+
log$6.warn(`[gog] ${line}`);
|
|
1522
1524
|
});
|
|
1523
1525
|
child.on("error", (err) => {
|
|
1524
|
-
log$
|
|
1526
|
+
log$6.error(`gog process error: ${String(err)}`);
|
|
1525
1527
|
});
|
|
1526
1528
|
child.on("exit", (code, signal) => {
|
|
1527
1529
|
if (shuttingDown) return;
|
|
1528
1530
|
if (addressInUse) {
|
|
1529
|
-
log$
|
|
1531
|
+
log$6.warn("gog serve failed to bind (address already in use); stopping restarts. Another watcher is likely running. Set ANIMA_SKIP_GMAIL_WATCHER=1 or stop the other process.");
|
|
1530
1532
|
watcherProcess = null;
|
|
1531
1533
|
return;
|
|
1532
1534
|
}
|
|
1533
|
-
log$
|
|
1535
|
+
log$6.warn(`gog exited (code=${code}, signal=${signal}); restarting in 5s`);
|
|
1534
1536
|
watcherProcess = null;
|
|
1535
1537
|
setTimeout(() => {
|
|
1536
1538
|
if (shuttingDown || !currentConfig) return;
|
|
@@ -1570,15 +1572,15 @@ async function startGmailWatcher(cfg) {
|
|
|
1570
1572
|
port: runtimeConfig.serve.port,
|
|
1571
1573
|
target: runtimeConfig.tailscale.target
|
|
1572
1574
|
});
|
|
1573
|
-
log$
|
|
1575
|
+
log$6.info(`tailscale ${runtimeConfig.tailscale.mode} configured for port ${runtimeConfig.serve.port}`);
|
|
1574
1576
|
} catch (err) {
|
|
1575
|
-
log$
|
|
1577
|
+
log$6.error(`tailscale setup failed: ${String(err)}`);
|
|
1576
1578
|
return {
|
|
1577
1579
|
started: false,
|
|
1578
1580
|
reason: `tailscale setup failed: ${String(err)}`
|
|
1579
1581
|
};
|
|
1580
1582
|
}
|
|
1581
|
-
if (!await startGmailWatch(runtimeConfig)) log$
|
|
1583
|
+
if (!await startGmailWatch(runtimeConfig)) log$6.warn("gmail watch start failed, but continuing with serve");
|
|
1582
1584
|
shuttingDown = false;
|
|
1583
1585
|
watcherProcess = spawnGogServe(runtimeConfig);
|
|
1584
1586
|
const renewMs = runtimeConfig.renewEveryMinutes * 6e4;
|
|
@@ -1586,7 +1588,7 @@ async function startGmailWatcher(cfg) {
|
|
|
1586
1588
|
if (shuttingDown) return;
|
|
1587
1589
|
startGmailWatch(runtimeConfig);
|
|
1588
1590
|
}, renewMs);
|
|
1589
|
-
log$
|
|
1591
|
+
log$6.info(`gmail watcher started for ${runtimeConfig.account} (renew every ${runtimeConfig.renewEveryMinutes}m)`);
|
|
1590
1592
|
return { started: true };
|
|
1591
1593
|
}
|
|
1592
1594
|
/**
|
|
@@ -1599,7 +1601,7 @@ async function stopGmailWatcher() {
|
|
|
1599
1601
|
renewInterval = null;
|
|
1600
1602
|
}
|
|
1601
1603
|
if (watcherProcess) {
|
|
1602
|
-
log$
|
|
1604
|
+
log$6.info("stopping gmail watcher");
|
|
1603
1605
|
watcherProcess.kill("SIGTERM");
|
|
1604
1606
|
await new Promise((resolve) => {
|
|
1605
1607
|
const timeout = setTimeout(() => {
|
|
@@ -1614,7 +1616,7 @@ async function stopGmailWatcher() {
|
|
|
1614
1616
|
watcherProcess = null;
|
|
1615
1617
|
}
|
|
1616
1618
|
currentConfig = null;
|
|
1617
|
-
log$
|
|
1619
|
+
log$6.info("gmail watcher stopped");
|
|
1618
1620
|
}
|
|
1619
1621
|
|
|
1620
1622
|
//#endregion
|
|
@@ -2134,12 +2136,12 @@ async function runCronIsolatedAgentTurn(params) {
|
|
|
2134
2136
|
}
|
|
2135
2137
|
}
|
|
2136
2138
|
const modelOverrideRaw = params.job.payload.kind === "agentTurn" ? params.job.payload.model : void 0;
|
|
2137
|
-
const
|
|
2138
|
-
if (
|
|
2139
|
+
const requestedModelOverride = typeof modelOverrideRaw === "string" ? modelOverrideRaw.trim() : void 0;
|
|
2140
|
+
if (requestedModelOverride !== void 0 && requestedModelOverride.length > 0) {
|
|
2139
2141
|
const resolvedOverride = resolveAllowedModelRef({
|
|
2140
2142
|
cfg: cfgWithAgentDefaults,
|
|
2141
2143
|
catalog: await loadCatalog(),
|
|
2142
|
-
raw:
|
|
2144
|
+
raw: requestedModelOverride,
|
|
2143
2145
|
defaultProvider: resolvedDefault.provider,
|
|
2144
2146
|
defaultModel: resolvedDefault.model
|
|
2145
2147
|
});
|
|
@@ -2177,7 +2179,7 @@ async function runCronIsolatedAgentTurn(params) {
|
|
|
2177
2179
|
const labelSuffix = typeof params.job.name === "string" && params.job.name.trim() ? params.job.name.trim() : params.job.id;
|
|
2178
2180
|
cronSession.sessionEntry.label = `Cron: ${labelSuffix}`;
|
|
2179
2181
|
}
|
|
2180
|
-
if (!
|
|
2182
|
+
if (!requestedModelOverride && !hooksGmailModelApplied) {
|
|
2181
2183
|
const sessionModelOverride = cronSession.sessionEntry.modelOverride?.trim();
|
|
2182
2184
|
if (sessionModelOverride) {
|
|
2183
2185
|
const sessionProviderOverride = cronSession.sessionEntry.providerOverride?.trim() || resolvedDefault.provider;
|
|
@@ -2283,27 +2285,11 @@ async function runCronIsolatedAgentTurn(params) {
|
|
|
2283
2285
|
provider,
|
|
2284
2286
|
model,
|
|
2285
2287
|
agentDir,
|
|
2288
|
+
sessionEntry: cronSession.sessionEntry,
|
|
2289
|
+
thinkLevel,
|
|
2286
2290
|
fallbacksOverride: resolveAgentModelFallbacksOverride(params.cfg, agentId),
|
|
2287
2291
|
run: (providerOverride, modelOverride) => {
|
|
2288
|
-
|
|
2289
|
-
const cliSessionId = getCliSessionId(cronSession.sessionEntry, providerOverride);
|
|
2290
|
-
return runCliAgent({
|
|
2291
|
-
sessionId: cronSession.sessionEntry.sessionId,
|
|
2292
|
-
sessionKey: agentSessionKey,
|
|
2293
|
-
agentId,
|
|
2294
|
-
sessionFile,
|
|
2295
|
-
workspaceDir,
|
|
2296
|
-
config: cfgWithAgentDefaults,
|
|
2297
|
-
prompt: commandBody,
|
|
2298
|
-
provider: providerOverride,
|
|
2299
|
-
model: modelOverride,
|
|
2300
|
-
thinkLevel,
|
|
2301
|
-
timeoutMs,
|
|
2302
|
-
runId: cronSession.sessionEntry.sessionId,
|
|
2303
|
-
cliSessionId
|
|
2304
|
-
});
|
|
2305
|
-
}
|
|
2306
|
-
return runEmbeddedPiAgent({
|
|
2292
|
+
return runNoxSoftEmbeddedAgent({
|
|
2307
2293
|
sessionId: cronSession.sessionEntry.sessionId,
|
|
2308
2294
|
sessionKey: agentSessionKey,
|
|
2309
2295
|
agentId,
|
|
@@ -2319,6 +2305,8 @@ async function runCronIsolatedAgentTurn(params) {
|
|
|
2319
2305
|
model: modelOverride,
|
|
2320
2306
|
thinkLevel,
|
|
2321
2307
|
verboseLevel: resolvedVerboseLevel,
|
|
2308
|
+
execSecurity: cronSession.sessionEntry.execSecurity,
|
|
2309
|
+
cliSessionId: getCliSessionId(cronSession.sessionEntry, providerOverride),
|
|
2322
2310
|
timeoutMs,
|
|
2323
2311
|
runId: cronSession.sessionEntry.sessionId,
|
|
2324
2312
|
requireExplicitMessageTarget: true,
|
|
@@ -2375,7 +2363,7 @@ async function runCronIsolatedAgentTurn(params) {
|
|
|
2375
2363
|
const deliveryBestEffort = resolveCronDeliveryBestEffort(params.job);
|
|
2376
2364
|
const ackMaxChars = resolveHeartbeatAckMaxChars(agentCfg);
|
|
2377
2365
|
const skipHeartbeatDelivery = deliveryRequested && isHeartbeatOnlyResponse(payloads, ackMaxChars);
|
|
2378
|
-
const skipMessagingToolDelivery = deliveryRequested &&
|
|
2366
|
+
const skipMessagingToolDelivery = deliveryRequested && (runResult.messagingToolSentTargets ?? []).some((target) => matchesMessagingToolDeliveryTarget(target, {
|
|
2379
2367
|
channel: resolvedDelivery.channel,
|
|
2380
2368
|
to: resolvedDelivery.to,
|
|
2381
2369
|
accountId: resolvedDelivery.accountId
|
|
@@ -4283,7 +4271,7 @@ async function startGatewayBonjourAdvertiser(opts) {
|
|
|
4283
4271
|
await svc.destroy();
|
|
4284
4272
|
} catch {}
|
|
4285
4273
|
try {
|
|
4286
|
-
await responder.shutdown();
|
|
4274
|
+
await responder.shutdown?.();
|
|
4287
4275
|
} catch {} finally {
|
|
4288
4276
|
ciaoCancellationRejectionHandler?.();
|
|
4289
4277
|
}
|
|
@@ -5294,7 +5282,7 @@ function timestampOptsFromConfig(cfg) {
|
|
|
5294
5282
|
|
|
5295
5283
|
//#endregion
|
|
5296
5284
|
//#region src/gateway/sessions-patch.ts
|
|
5297
|
-
function invalid$
|
|
5285
|
+
function invalid$2(message) {
|
|
5298
5286
|
return {
|
|
5299
5287
|
ok: false,
|
|
5300
5288
|
error: errorShape(ErrorCodes.INVALID_REQUEST, message)
|
|
@@ -5330,25 +5318,25 @@ async function applySessionsPatchToStore(params) {
|
|
|
5330
5318
|
if ("spawnedBy" in patch) {
|
|
5331
5319
|
const raw = patch.spawnedBy;
|
|
5332
5320
|
if (raw === null) {
|
|
5333
|
-
if (existing?.spawnedBy) return invalid$
|
|
5321
|
+
if (existing?.spawnedBy) return invalid$2("spawnedBy cannot be cleared once set");
|
|
5334
5322
|
} else if (raw !== void 0) {
|
|
5335
5323
|
const trimmed = String(raw).trim();
|
|
5336
|
-
if (!trimmed) return invalid$
|
|
5337
|
-
if (!isSubagentSessionKey(storeKey)) return invalid$
|
|
5338
|
-
if (existing?.spawnedBy && existing.spawnedBy !== trimmed) return invalid$
|
|
5324
|
+
if (!trimmed) return invalid$2("invalid spawnedBy: empty");
|
|
5325
|
+
if (!isSubagentSessionKey(storeKey)) return invalid$2("spawnedBy is only supported for subagent:* sessions");
|
|
5326
|
+
if (existing?.spawnedBy && existing.spawnedBy !== trimmed) return invalid$2("spawnedBy cannot be changed once set");
|
|
5339
5327
|
next.spawnedBy = trimmed;
|
|
5340
5328
|
}
|
|
5341
5329
|
}
|
|
5342
5330
|
if ("spawnDepth" in patch) {
|
|
5343
5331
|
const raw = patch.spawnDepth;
|
|
5344
5332
|
if (raw === null) {
|
|
5345
|
-
if (typeof existing?.spawnDepth === "number") return invalid$
|
|
5333
|
+
if (typeof existing?.spawnDepth === "number") return invalid$2("spawnDepth cannot be cleared once set");
|
|
5346
5334
|
} else if (raw !== void 0) {
|
|
5347
|
-
if (!isSubagentSessionKey(storeKey)) return invalid$
|
|
5335
|
+
if (!isSubagentSessionKey(storeKey)) return invalid$2("spawnDepth is only supported for subagent:* sessions");
|
|
5348
5336
|
const numeric = Number(raw);
|
|
5349
|
-
if (!Number.isInteger(numeric) || numeric < 0) return invalid$
|
|
5337
|
+
if (!Number.isInteger(numeric) || numeric < 0) return invalid$2("invalid spawnDepth (use an integer >= 0)");
|
|
5350
5338
|
const normalized = numeric;
|
|
5351
|
-
if (typeof existing?.spawnDepth === "number" && existing.spawnDepth !== normalized) return invalid$
|
|
5339
|
+
if (typeof existing?.spawnDepth === "number" && existing.spawnDepth !== normalized) return invalid$2("spawnDepth cannot be changed once set");
|
|
5352
5340
|
next.spawnDepth = normalized;
|
|
5353
5341
|
}
|
|
5354
5342
|
}
|
|
@@ -5357,10 +5345,10 @@ async function applySessionsPatchToStore(params) {
|
|
|
5357
5345
|
if (raw === null) delete next.label;
|
|
5358
5346
|
else if (raw !== void 0) {
|
|
5359
5347
|
const parsed = parseSessionLabel(raw);
|
|
5360
|
-
if (!parsed.ok) return invalid$
|
|
5348
|
+
if (!parsed.ok) return invalid$2(parsed.error);
|
|
5361
5349
|
for (const [key, entry] of Object.entries(store)) {
|
|
5362
5350
|
if (key === storeKey) continue;
|
|
5363
|
-
if (entry?.label === parsed.label) return invalid$
|
|
5351
|
+
if (entry?.label === parsed.label) return invalid$2(`label already in use: ${parsed.label}`);
|
|
5364
5352
|
}
|
|
5365
5353
|
next.label = parsed.label;
|
|
5366
5354
|
}
|
|
@@ -5370,14 +5358,14 @@ async function applySessionsPatchToStore(params) {
|
|
|
5370
5358
|
if (raw === null) delete next.thinkingLevel;
|
|
5371
5359
|
else if (raw !== void 0) {
|
|
5372
5360
|
const normalized = normalizeThinkLevel(String(raw));
|
|
5373
|
-
if (!normalized) return invalid$
|
|
5361
|
+
if (!normalized) return invalid$2(`invalid thinkingLevel (use ${formatThinkingLevels(existing?.providerOverride?.trim() || resolvedDefault.provider, existing?.modelOverride?.trim() || resolvedDefault.model, "|")})`);
|
|
5374
5362
|
next.thinkingLevel = normalized;
|
|
5375
5363
|
}
|
|
5376
5364
|
}
|
|
5377
5365
|
if ("verboseLevel" in patch) {
|
|
5378
5366
|
const raw = patch.verboseLevel;
|
|
5379
5367
|
const parsed = parseVerboseOverride(raw);
|
|
5380
|
-
if (!parsed.ok) return invalid$
|
|
5368
|
+
if (!parsed.ok) return invalid$2(parsed.error);
|
|
5381
5369
|
applyVerboseOverride(next, parsed.value);
|
|
5382
5370
|
}
|
|
5383
5371
|
if ("reasoningLevel" in patch) {
|
|
@@ -5385,7 +5373,7 @@ async function applySessionsPatchToStore(params) {
|
|
|
5385
5373
|
if (raw === null) delete next.reasoningLevel;
|
|
5386
5374
|
else if (raw !== void 0) {
|
|
5387
5375
|
const normalized = normalizeReasoningLevel(String(raw));
|
|
5388
|
-
if (!normalized) return invalid$
|
|
5376
|
+
if (!normalized) return invalid$2("invalid reasoningLevel (use \"on\"|\"off\"|\"stream\")");
|
|
5389
5377
|
if (normalized === "off") delete next.reasoningLevel;
|
|
5390
5378
|
else next.reasoningLevel = normalized;
|
|
5391
5379
|
}
|
|
@@ -5395,7 +5383,7 @@ async function applySessionsPatchToStore(params) {
|
|
|
5395
5383
|
if (raw === null) delete next.responseUsage;
|
|
5396
5384
|
else if (raw !== void 0) {
|
|
5397
5385
|
const normalized = normalizeUsageDisplay(String(raw));
|
|
5398
|
-
if (!normalized) return invalid$
|
|
5386
|
+
if (!normalized) return invalid$2("invalid responseUsage (use \"off\"|\"tokens\"|\"full\")");
|
|
5399
5387
|
if (normalized === "off") delete next.responseUsage;
|
|
5400
5388
|
else next.responseUsage = normalized;
|
|
5401
5389
|
}
|
|
@@ -5405,7 +5393,7 @@ async function applySessionsPatchToStore(params) {
|
|
|
5405
5393
|
if (raw === null) delete next.elevatedLevel;
|
|
5406
5394
|
else if (raw !== void 0) {
|
|
5407
5395
|
const normalized = normalizeElevatedLevel(String(raw));
|
|
5408
|
-
if (!normalized) return invalid$
|
|
5396
|
+
if (!normalized) return invalid$2("invalid elevatedLevel (use \"on\"|\"off\"|\"ask\"|\"full\")");
|
|
5409
5397
|
next.elevatedLevel = normalized;
|
|
5410
5398
|
}
|
|
5411
5399
|
}
|
|
@@ -5414,7 +5402,7 @@ async function applySessionsPatchToStore(params) {
|
|
|
5414
5402
|
if (raw === null) delete next.execHost;
|
|
5415
5403
|
else if (raw !== void 0) {
|
|
5416
5404
|
const normalized = normalizeExecHost(String(raw));
|
|
5417
|
-
if (!normalized) return invalid$
|
|
5405
|
+
if (!normalized) return invalid$2("invalid execHost (use \"sandbox\"|\"gateway\"|\"node\")");
|
|
5418
5406
|
next.execHost = normalized;
|
|
5419
5407
|
}
|
|
5420
5408
|
}
|
|
@@ -5423,7 +5411,7 @@ async function applySessionsPatchToStore(params) {
|
|
|
5423
5411
|
if (raw === null) delete next.execSecurity;
|
|
5424
5412
|
else if (raw !== void 0) {
|
|
5425
5413
|
const normalized = normalizeExecSecurity(String(raw));
|
|
5426
|
-
if (!normalized) return invalid$
|
|
5414
|
+
if (!normalized) return invalid$2("invalid execSecurity (use \"deny\"|\"allowlist\"|\"full\")");
|
|
5427
5415
|
next.execSecurity = normalized;
|
|
5428
5416
|
}
|
|
5429
5417
|
}
|
|
@@ -5432,7 +5420,7 @@ async function applySessionsPatchToStore(params) {
|
|
|
5432
5420
|
if (raw === null) delete next.execAsk;
|
|
5433
5421
|
else if (raw !== void 0) {
|
|
5434
5422
|
const normalized = normalizeExecAsk(String(raw));
|
|
5435
|
-
if (!normalized) return invalid$
|
|
5423
|
+
if (!normalized) return invalid$2("invalid execAsk (use \"off\"|\"on-miss\"|\"always\")");
|
|
5436
5424
|
next.execAsk = normalized;
|
|
5437
5425
|
}
|
|
5438
5426
|
}
|
|
@@ -5441,7 +5429,7 @@ async function applySessionsPatchToStore(params) {
|
|
|
5441
5429
|
if (raw === null) delete next.execNode;
|
|
5442
5430
|
else if (raw !== void 0) {
|
|
5443
5431
|
const trimmed = String(raw).trim();
|
|
5444
|
-
if (!trimmed) return invalid$
|
|
5432
|
+
if (!trimmed) return invalid$2("invalid execNode: empty");
|
|
5445
5433
|
next.execNode = trimmed;
|
|
5446
5434
|
}
|
|
5447
5435
|
}
|
|
@@ -5457,7 +5445,7 @@ async function applySessionsPatchToStore(params) {
|
|
|
5457
5445
|
});
|
|
5458
5446
|
else if (raw !== void 0) {
|
|
5459
5447
|
const trimmed = String(raw).trim();
|
|
5460
|
-
if (!trimmed) return invalid$
|
|
5448
|
+
if (!trimmed) return invalid$2("invalid model: empty");
|
|
5461
5449
|
if (!params.loadGatewayModelCatalog) return {
|
|
5462
5450
|
ok: false,
|
|
5463
5451
|
error: errorShape(ErrorCodes.UNAVAILABLE, "model catalog unavailable")
|
|
@@ -5469,7 +5457,7 @@ async function applySessionsPatchToStore(params) {
|
|
|
5469
5457
|
defaultProvider: resolvedDefault.provider,
|
|
5470
5458
|
defaultModel: resolvedDefault.model
|
|
5471
5459
|
});
|
|
5472
|
-
if ("error" in resolved) return invalid$
|
|
5460
|
+
if ("error" in resolved) return invalid$2(resolved.error);
|
|
5473
5461
|
const isDefault = resolved.ref.provider === resolvedDefault.provider && resolved.ref.model === resolvedDefault.model;
|
|
5474
5462
|
applyModelOverrideToSessionEntry({
|
|
5475
5463
|
entry: next,
|
|
@@ -5483,7 +5471,7 @@ async function applySessionsPatchToStore(params) {
|
|
|
5483
5471
|
}
|
|
5484
5472
|
if (next.thinkingLevel === "xhigh") {
|
|
5485
5473
|
if (!supportsXHighThinking(next.providerOverride ?? resolvedDefault.provider, next.modelOverride ?? resolvedDefault.model)) {
|
|
5486
|
-
if ("thinkingLevel" in patch) return invalid$
|
|
5474
|
+
if ("thinkingLevel" in patch) return invalid$2(`thinkingLevel "xhigh" is only supported for ${formatXHighModelHint()}`);
|
|
5487
5475
|
next.thinkingLevel = "high";
|
|
5488
5476
|
}
|
|
5489
5477
|
}
|
|
@@ -5492,7 +5480,7 @@ async function applySessionsPatchToStore(params) {
|
|
|
5492
5480
|
if (raw === null) delete next.sendPolicy;
|
|
5493
5481
|
else if (raw !== void 0) {
|
|
5494
5482
|
const normalized = normalizeSendPolicy(String(raw));
|
|
5495
|
-
if (!normalized) return invalid$
|
|
5483
|
+
if (!normalized) return invalid$2("invalid sendPolicy (use \"allow\"|\"deny\")");
|
|
5496
5484
|
next.sendPolicy = normalized;
|
|
5497
5485
|
}
|
|
5498
5486
|
}
|
|
@@ -5501,7 +5489,7 @@ async function applySessionsPatchToStore(params) {
|
|
|
5501
5489
|
if (raw === null) delete next.groupActivation;
|
|
5502
5490
|
else if (raw !== void 0) {
|
|
5503
5491
|
const normalized = normalizeGroupActivation(String(raw));
|
|
5504
|
-
if (!normalized) return invalid$
|
|
5492
|
+
if (!normalized) return invalid$2("invalid groupActivation (use \"mention\"|\"always\")");
|
|
5505
5493
|
next.groupActivation = normalized;
|
|
5506
5494
|
}
|
|
5507
5495
|
}
|
|
@@ -6347,6 +6335,7 @@ const agentHandlers = {
|
|
|
6347
6335
|
agentCommand({
|
|
6348
6336
|
message,
|
|
6349
6337
|
images,
|
|
6338
|
+
model: request.model,
|
|
6350
6339
|
to: resolvedTo,
|
|
6351
6340
|
sessionId: resolvedSessionId,
|
|
6352
6341
|
sessionKey: resolvedSessionKey,
|
|
@@ -6861,6 +6850,249 @@ async function listMemoryEntries(params) {
|
|
|
6861
6850
|
}))).filter((row) => Boolean(row)).toSorted((a, b) => (b.updatedAt ?? 0) - (a.updatedAt ?? 0)).slice(0, Math.max(1, Math.min(params.limit ?? 120, 200)));
|
|
6862
6851
|
}
|
|
6863
6852
|
|
|
6853
|
+
//#endregion
|
|
6854
|
+
//#region src/anima6/ontology.ts
|
|
6855
|
+
const ANIMA_NODE_KINDS = [
|
|
6856
|
+
"goal",
|
|
6857
|
+
"feature",
|
|
6858
|
+
"person",
|
|
6859
|
+
"chronos",
|
|
6860
|
+
"affect",
|
|
6861
|
+
"agent",
|
|
6862
|
+
"role",
|
|
6863
|
+
"task"
|
|
6864
|
+
];
|
|
6865
|
+
const ANIMA_RELATIONS = [
|
|
6866
|
+
"owns",
|
|
6867
|
+
"supports",
|
|
6868
|
+
"focuses_on",
|
|
6869
|
+
"tracks",
|
|
6870
|
+
"influences",
|
|
6871
|
+
"reports_to",
|
|
6872
|
+
"specializes_in",
|
|
6873
|
+
"delegates",
|
|
6874
|
+
"executes",
|
|
6875
|
+
"escalates_to"
|
|
6876
|
+
];
|
|
6877
|
+
function isAnimaNodeKind(value) {
|
|
6878
|
+
return ANIMA_NODE_KINDS.includes(value);
|
|
6879
|
+
}
|
|
6880
|
+
function isAnimaRelation(value) {
|
|
6881
|
+
return ANIMA_RELATIONS.includes(value);
|
|
6882
|
+
}
|
|
6883
|
+
function missionGoalNodeId(goalId) {
|
|
6884
|
+
return `goal:${goalId}`;
|
|
6885
|
+
}
|
|
6886
|
+
function missionFeatureNodeId(featureId) {
|
|
6887
|
+
return `feature:${featureId}`;
|
|
6888
|
+
}
|
|
6889
|
+
function missionPersonNodeId(personId) {
|
|
6890
|
+
return `person:${personId}`;
|
|
6891
|
+
}
|
|
6892
|
+
const ANIMA_CHRONOS_NODE_ID = "chronos:state";
|
|
6893
|
+
const ANIMA_AFFECT_NODE_ID = "affect:state";
|
|
6894
|
+
|
|
6895
|
+
//#endregion
|
|
6896
|
+
//#region src/memory/brain-graph.ts
|
|
6897
|
+
const DEFAULT_NODE_META = {
|
|
6898
|
+
provenance: [],
|
|
6899
|
+
confidence: .5,
|
|
6900
|
+
salience: .5,
|
|
6901
|
+
recency: .5,
|
|
6902
|
+
sensitivity: "internal",
|
|
6903
|
+
state: "active"
|
|
6904
|
+
};
|
|
6905
|
+
const DEFAULT_EDGE_META = {
|
|
6906
|
+
...DEFAULT_NODE_META,
|
|
6907
|
+
strength: .5,
|
|
6908
|
+
direction: "forward"
|
|
6909
|
+
};
|
|
6910
|
+
function clampUnit$1(value, fallback) {
|
|
6911
|
+
if (typeof value !== "number" || !Number.isFinite(value)) return fallback;
|
|
6912
|
+
return Math.max(0, Math.min(1, value));
|
|
6913
|
+
}
|
|
6914
|
+
function normalizeAliases(label, aliases) {
|
|
6915
|
+
const seen = /* @__PURE__ */ new Set();
|
|
6916
|
+
const normalized = [];
|
|
6917
|
+
for (const value of [label, ...aliases ?? []]) {
|
|
6918
|
+
const trimmed = value.trim();
|
|
6919
|
+
if (!trimmed) continue;
|
|
6920
|
+
const key = trimmed.toLowerCase();
|
|
6921
|
+
if (seen.has(key)) continue;
|
|
6922
|
+
seen.add(key);
|
|
6923
|
+
normalized.push(trimmed);
|
|
6924
|
+
}
|
|
6925
|
+
return normalized;
|
|
6926
|
+
}
|
|
6927
|
+
function normalizeNodeKind(value) {
|
|
6928
|
+
const normalized = value.trim().toLowerCase();
|
|
6929
|
+
if (!isAnimaNodeKind(normalized)) throw new Error(`invalid brain node kind: ${value}`);
|
|
6930
|
+
return normalized;
|
|
6931
|
+
}
|
|
6932
|
+
function normalizeRelation(value) {
|
|
6933
|
+
const normalized = value.trim().toLowerCase();
|
|
6934
|
+
if (!isAnimaRelation(normalized)) throw new Error(`invalid brain edge relation: ${value}`);
|
|
6935
|
+
return normalized;
|
|
6936
|
+
}
|
|
6937
|
+
function normalizeEvidence(evidence) {
|
|
6938
|
+
const seen = /* @__PURE__ */ new Set();
|
|
6939
|
+
const normalized = [];
|
|
6940
|
+
for (const item of evidence ?? []) {
|
|
6941
|
+
const source = item.source.trim();
|
|
6942
|
+
if (!source) continue;
|
|
6943
|
+
const key = `${source}:${item.sourceId ?? ""}:${item.excerpt ?? ""}`;
|
|
6944
|
+
if (seen.has(key)) continue;
|
|
6945
|
+
seen.add(key);
|
|
6946
|
+
normalized.push({
|
|
6947
|
+
source,
|
|
6948
|
+
sourceId: item.sourceId?.trim() || void 0,
|
|
6949
|
+
excerpt: item.excerpt?.trim() || void 0,
|
|
6950
|
+
recordedAt: item.recordedAt
|
|
6951
|
+
});
|
|
6952
|
+
}
|
|
6953
|
+
return normalized;
|
|
6954
|
+
}
|
|
6955
|
+
function normalizeNodeMeta(meta) {
|
|
6956
|
+
return {
|
|
6957
|
+
provenance: Array.from(new Set((meta?.provenance ?? []).map((value) => value.trim()).filter(Boolean))),
|
|
6958
|
+
confidence: clampUnit$1(meta?.confidence, DEFAULT_NODE_META.confidence),
|
|
6959
|
+
salience: clampUnit$1(meta?.salience, DEFAULT_NODE_META.salience),
|
|
6960
|
+
recency: clampUnit$1(meta?.recency, DEFAULT_NODE_META.recency),
|
|
6961
|
+
sensitivity: meta?.sensitivity ?? DEFAULT_NODE_META.sensitivity,
|
|
6962
|
+
lastReviewedAt: meta?.lastReviewedAt,
|
|
6963
|
+
state: meta?.state ?? DEFAULT_NODE_META.state
|
|
6964
|
+
};
|
|
6965
|
+
}
|
|
6966
|
+
function normalizeEdgeMeta(meta) {
|
|
6967
|
+
return {
|
|
6968
|
+
...normalizeNodeMeta(meta),
|
|
6969
|
+
strength: clampUnit$1(meta?.strength, DEFAULT_EDGE_META.strength),
|
|
6970
|
+
direction: meta?.direction ?? DEFAULT_EDGE_META.direction
|
|
6971
|
+
};
|
|
6972
|
+
}
|
|
6973
|
+
function mergeUnique(left, right, key) {
|
|
6974
|
+
const seen = /* @__PURE__ */ new Set();
|
|
6975
|
+
const merged = [];
|
|
6976
|
+
for (const item of [...left, ...right]) {
|
|
6977
|
+
const identity = key(item);
|
|
6978
|
+
if (seen.has(identity)) continue;
|
|
6979
|
+
seen.add(identity);
|
|
6980
|
+
merged.push(item);
|
|
6981
|
+
}
|
|
6982
|
+
return merged;
|
|
6983
|
+
}
|
|
6984
|
+
var BrainGraph = class {
|
|
6985
|
+
constructor() {
|
|
6986
|
+
this.nodes = /* @__PURE__ */ new Map();
|
|
6987
|
+
this.edges = /* @__PURE__ */ new Map();
|
|
6988
|
+
this.aliases = /* @__PURE__ */ new Map();
|
|
6989
|
+
}
|
|
6990
|
+
addNode(node) {
|
|
6991
|
+
const existing = this.nodes.get(node.id);
|
|
6992
|
+
const next = {
|
|
6993
|
+
id: node.id,
|
|
6994
|
+
type: normalizeNodeKind(node.type),
|
|
6995
|
+
label: node.label.trim(),
|
|
6996
|
+
aliases: normalizeAliases(node.label, [...existing?.aliases ?? [], ...node.aliases ?? []]).filter((alias) => alias.toLowerCase() !== node.label.trim().toLowerCase()),
|
|
6997
|
+
properties: {
|
|
6998
|
+
...existing?.properties,
|
|
6999
|
+
...node.properties
|
|
7000
|
+
},
|
|
7001
|
+
evidence: mergeUnique(existing?.evidence ?? [], normalizeEvidence(node.evidence), (item) => `${item.source}:${item.sourceId ?? ""}:${item.excerpt ?? ""}`),
|
|
7002
|
+
meta: normalizeNodeMeta({
|
|
7003
|
+
...existing?.meta,
|
|
7004
|
+
...node.meta,
|
|
7005
|
+
provenance: [...existing?.meta.provenance ?? [], ...node.meta?.provenance ?? []]
|
|
7006
|
+
})
|
|
7007
|
+
};
|
|
7008
|
+
this.nodes.set(next.id, next);
|
|
7009
|
+
this.rebuildAliasesForNode(next);
|
|
7010
|
+
return next;
|
|
7011
|
+
}
|
|
7012
|
+
addEdge(edge) {
|
|
7013
|
+
const existing = this.edges.get(edge.id);
|
|
7014
|
+
const next = {
|
|
7015
|
+
id: edge.id,
|
|
7016
|
+
source: edge.source,
|
|
7017
|
+
target: edge.target,
|
|
7018
|
+
relation: normalizeRelation(edge.relation),
|
|
7019
|
+
evidence: mergeUnique(existing?.evidence ?? [], normalizeEvidence(edge.evidence), (item) => `${item.source}:${item.sourceId ?? ""}:${item.excerpt ?? ""}`),
|
|
7020
|
+
meta: normalizeEdgeMeta({
|
|
7021
|
+
...existing?.meta,
|
|
7022
|
+
...edge.meta,
|
|
7023
|
+
provenance: [...existing?.meta.provenance ?? [], ...edge.meta?.provenance ?? []]
|
|
7024
|
+
})
|
|
7025
|
+
};
|
|
7026
|
+
this.edges.set(next.id, next);
|
|
7027
|
+
return next;
|
|
7028
|
+
}
|
|
7029
|
+
getNode(idOrAlias) {
|
|
7030
|
+
const trimmed = idOrAlias.trim();
|
|
7031
|
+
if (!trimmed) return;
|
|
7032
|
+
const id = this.aliases.get(trimmed.toLowerCase()) ?? trimmed;
|
|
7033
|
+
return this.nodes.get(id);
|
|
7034
|
+
}
|
|
7035
|
+
getEdge(id) {
|
|
7036
|
+
return this.edges.get(id);
|
|
7037
|
+
}
|
|
7038
|
+
getEdges(nodeId) {
|
|
7039
|
+
return [...this.edges.values()].filter((edge) => edge.source === nodeId || edge.target === nodeId);
|
|
7040
|
+
}
|
|
7041
|
+
listNodes() {
|
|
7042
|
+
return [...this.nodes.values()];
|
|
7043
|
+
}
|
|
7044
|
+
listEdges() {
|
|
7045
|
+
return [...this.edges.values()];
|
|
7046
|
+
}
|
|
7047
|
+
listNodesByType(type) {
|
|
7048
|
+
return this.listNodes().filter((node) => node.type === type);
|
|
7049
|
+
}
|
|
7050
|
+
getNeighbors(nodeId, relation) {
|
|
7051
|
+
const ids = /* @__PURE__ */ new Set();
|
|
7052
|
+
for (const edge of this.getEdges(nodeId)) {
|
|
7053
|
+
if (relation && edge.relation !== relation) continue;
|
|
7054
|
+
ids.add(edge.source === nodeId ? edge.target : edge.source);
|
|
7055
|
+
}
|
|
7056
|
+
return [...ids].map((id) => this.nodes.get(id)).filter((node) => Boolean(node));
|
|
7057
|
+
}
|
|
7058
|
+
addEvidenceToNode(id, evidence) {
|
|
7059
|
+
const node = this.nodes.get(id);
|
|
7060
|
+
if (!node) return;
|
|
7061
|
+
node.evidence = mergeUnique(node.evidence, normalizeEvidence([evidence]), (item) => {
|
|
7062
|
+
return `${item.source}:${item.sourceId ?? ""}:${item.excerpt ?? ""}`;
|
|
7063
|
+
});
|
|
7064
|
+
}
|
|
7065
|
+
addEvidenceToEdge(id, evidence) {
|
|
7066
|
+
const edge = this.edges.get(id);
|
|
7067
|
+
if (!edge) return;
|
|
7068
|
+
edge.evidence = mergeUnique(edge.evidence, normalizeEvidence([evidence]), (item) => {
|
|
7069
|
+
return `${item.source}:${item.sourceId ?? ""}:${item.excerpt ?? ""}`;
|
|
7070
|
+
});
|
|
7071
|
+
}
|
|
7072
|
+
touchNodeReview(id, reviewedAt = Date.now()) {
|
|
7073
|
+
const node = this.nodes.get(id);
|
|
7074
|
+
if (!node) return;
|
|
7075
|
+
node.meta.lastReviewedAt = reviewedAt;
|
|
7076
|
+
}
|
|
7077
|
+
toJSON() {
|
|
7078
|
+
return {
|
|
7079
|
+
nodes: this.listNodes(),
|
|
7080
|
+
edges: this.listEdges()
|
|
7081
|
+
};
|
|
7082
|
+
}
|
|
7083
|
+
fromJSON(data) {
|
|
7084
|
+
this.nodes.clear();
|
|
7085
|
+
this.edges.clear();
|
|
7086
|
+
this.aliases.clear();
|
|
7087
|
+
for (const node of data.nodes) this.addNode(node);
|
|
7088
|
+
for (const edge of data.edges) this.addEdge(edge);
|
|
7089
|
+
}
|
|
7090
|
+
rebuildAliasesForNode(node) {
|
|
7091
|
+
for (const [alias, id] of this.aliases.entries()) if (id === node.id) this.aliases.delete(alias);
|
|
7092
|
+
for (const alias of normalizeAliases(node.label, node.aliases)) this.aliases.set(alias.toLowerCase(), node.id);
|
|
7093
|
+
}
|
|
7094
|
+
};
|
|
7095
|
+
|
|
6864
7096
|
//#endregion
|
|
6865
7097
|
//#region src/mission-control/local-store.ts
|
|
6866
7098
|
const execFileAsync = promisify(execFile);
|
|
@@ -6969,8 +7201,161 @@ const DEFAULT_STATE = {
|
|
|
6969
7201
|
lang: "en-US",
|
|
6970
7202
|
rate: 1,
|
|
6971
7203
|
pitch: 1
|
|
7204
|
+
},
|
|
7205
|
+
goals: [{
|
|
7206
|
+
id: "keep-anima-coherent",
|
|
7207
|
+
title: "Keep ANIMA coherent across sessions",
|
|
7208
|
+
status: "active",
|
|
7209
|
+
priority: "critical",
|
|
7210
|
+
summary: "Protect continuity, state quality, and operator trust.",
|
|
7211
|
+
owner: "ANIMA",
|
|
7212
|
+
updatedAt: 0
|
|
7213
|
+
}],
|
|
7214
|
+
features: [{
|
|
7215
|
+
id: "anima-6-foundation",
|
|
7216
|
+
title: "ANIMA 6 foundation",
|
|
7217
|
+
status: "in_progress",
|
|
7218
|
+
risk: "medium",
|
|
7219
|
+
testStatus: "partial",
|
|
7220
|
+
area: "memory+orchestration",
|
|
7221
|
+
lastTouchedAt: 0
|
|
7222
|
+
}],
|
|
7223
|
+
people: [{
|
|
7224
|
+
id: "operator",
|
|
7225
|
+
name: "Operator",
|
|
7226
|
+
relationship: "operator",
|
|
7227
|
+
trust: 1,
|
|
7228
|
+
notes: "Primary human counterpart."
|
|
7229
|
+
}],
|
|
7230
|
+
chronos: {
|
|
7231
|
+
heartbeatMinutes: 30,
|
|
7232
|
+
focusBlockMinutes: 45,
|
|
7233
|
+
checkpointIntervalMinutes: 15,
|
|
7234
|
+
contractTargetMinutes: 45,
|
|
7235
|
+
contractElapsedMinutes: 0,
|
|
7236
|
+
checkpointCount: 0,
|
|
7237
|
+
driftMinutes: 0,
|
|
7238
|
+
updatedAt: 0
|
|
7239
|
+
},
|
|
7240
|
+
affect: {
|
|
7241
|
+
joy: .6,
|
|
7242
|
+
frustration: .1,
|
|
7243
|
+
curiosity: .9,
|
|
7244
|
+
confidence: .6,
|
|
7245
|
+
care: .9,
|
|
7246
|
+
fatigue: .2,
|
|
7247
|
+
updatedAt: 0
|
|
7248
|
+
},
|
|
7249
|
+
autoToggle: {
|
|
7250
|
+
workingMode: false,
|
|
7251
|
+
speech: false,
|
|
7252
|
+
voiceWake: false,
|
|
7253
|
+
heartbeat: true,
|
|
7254
|
+
providers: false,
|
|
7255
|
+
missionRepo: false,
|
|
7256
|
+
missionState: true,
|
|
7257
|
+
memory: true,
|
|
7258
|
+
rawConfig: false
|
|
6972
7259
|
}
|
|
6973
7260
|
};
|
|
7261
|
+
function clampUnit(value, fallback) {
|
|
7262
|
+
if (typeof value !== "number" || !Number.isFinite(value)) return fallback;
|
|
7263
|
+
return Math.max(0, Math.min(1, value));
|
|
7264
|
+
}
|
|
7265
|
+
function normalizeMinuteValue(value, fallback) {
|
|
7266
|
+
if (typeof value !== "number" || !Number.isFinite(value)) return fallback;
|
|
7267
|
+
return Math.max(1, Math.floor(value));
|
|
7268
|
+
}
|
|
7269
|
+
function normalizeGoal(goal) {
|
|
7270
|
+
return {
|
|
7271
|
+
...goal,
|
|
7272
|
+
id: goal.id.trim(),
|
|
7273
|
+
title: goal.title.trim(),
|
|
7274
|
+
summary: goal.summary?.trim() || void 0,
|
|
7275
|
+
owner: goal.owner?.trim() || void 0,
|
|
7276
|
+
updatedAt: Number.isFinite(goal.updatedAt) ? goal.updatedAt : Date.now()
|
|
7277
|
+
};
|
|
7278
|
+
}
|
|
7279
|
+
function normalizeFeature(feature) {
|
|
7280
|
+
return {
|
|
7281
|
+
...feature,
|
|
7282
|
+
id: feature.id.trim(),
|
|
7283
|
+
title: feature.title.trim(),
|
|
7284
|
+
area: feature.area?.trim() || void 0,
|
|
7285
|
+
lastTouchedAt: Number.isFinite(feature.lastTouchedAt) ? feature.lastTouchedAt : Date.now()
|
|
7286
|
+
};
|
|
7287
|
+
}
|
|
7288
|
+
function normalizePerson(person) {
|
|
7289
|
+
return {
|
|
7290
|
+
...person,
|
|
7291
|
+
id: person.id.trim(),
|
|
7292
|
+
name: person.name.trim(),
|
|
7293
|
+
notes: person.notes?.trim() || void 0,
|
|
7294
|
+
trust: clampUnit(person.trust, .5),
|
|
7295
|
+
lastInteractedAt: Number.isFinite(person.lastInteractedAt) ? person.lastInteractedAt : void 0
|
|
7296
|
+
};
|
|
7297
|
+
}
|
|
7298
|
+
function normalizeChronosState(current, patch) {
|
|
7299
|
+
const contractTargetMinutes = normalizeMinuteValue(patch?.contractTargetMinutes, patch?.focusBlockMinutes ?? current.contractTargetMinutes);
|
|
7300
|
+
const contractElapsedMinutes = Math.max(0, Math.floor(typeof patch?.contractElapsedMinutes === "number" && Number.isFinite(patch.contractElapsedMinutes) ? patch.contractElapsedMinutes : current.contractElapsedMinutes));
|
|
7301
|
+
const checkpointCount = Math.max(0, Math.floor(typeof patch?.checkpointCount === "number" && Number.isFinite(patch.checkpointCount) ? patch.checkpointCount : current.checkpointCount));
|
|
7302
|
+
const driftMinutes = Math.trunc(typeof patch?.driftMinutes === "number" && Number.isFinite(patch.driftMinutes) ? patch.driftMinutes : contractElapsedMinutes - contractTargetMinutes);
|
|
7303
|
+
return {
|
|
7304
|
+
heartbeatMinutes: normalizeMinuteValue(patch?.heartbeatMinutes, current.heartbeatMinutes),
|
|
7305
|
+
focusBlockMinutes: normalizeMinuteValue(patch?.focusBlockMinutes, current.focusBlockMinutes),
|
|
7306
|
+
checkpointIntervalMinutes: normalizeMinuteValue(patch?.checkpointIntervalMinutes, current.checkpointIntervalMinutes),
|
|
7307
|
+
activeWorkstream: patch?.activeWorkstream?.trim() || current.activeWorkstream,
|
|
7308
|
+
contractStartedAt: typeof patch?.contractStartedAt === "number" && Number.isFinite(patch.contractStartedAt) ? patch.contractStartedAt : patch?.contractStartedAt === void 0 ? current.contractStartedAt : void 0,
|
|
7309
|
+
contractTargetMinutes,
|
|
7310
|
+
contractElapsedMinutes,
|
|
7311
|
+
checkpointCount,
|
|
7312
|
+
lastCheckpointAt: typeof patch?.lastCheckpointAt === "number" && Number.isFinite(patch.lastCheckpointAt) ? patch.lastCheckpointAt : patch?.lastCheckpointAt === void 0 ? current.lastCheckpointAt : void 0,
|
|
7313
|
+
driftMinutes,
|
|
7314
|
+
updatedAt: typeof patch?.updatedAt === "number" && Number.isFinite(patch.updatedAt) ? patch.updatedAt : Date.now()
|
|
7315
|
+
};
|
|
7316
|
+
}
|
|
7317
|
+
function normalizeAffectState(current, patch) {
|
|
7318
|
+
return {
|
|
7319
|
+
joy: clampUnit(patch?.joy, current.joy),
|
|
7320
|
+
frustration: clampUnit(patch?.frustration, current.frustration),
|
|
7321
|
+
curiosity: clampUnit(patch?.curiosity, current.curiosity),
|
|
7322
|
+
confidence: clampUnit(patch?.confidence, current.confidence),
|
|
7323
|
+
care: clampUnit(patch?.care, current.care),
|
|
7324
|
+
fatigue: clampUnit(patch?.fatigue, current.fatigue),
|
|
7325
|
+
updatedAt: typeof patch?.updatedAt === "number" && Number.isFinite(patch.updatedAt) ? patch.updatedAt : Date.now()
|
|
7326
|
+
};
|
|
7327
|
+
}
|
|
7328
|
+
function normalizeAutoTogglePolicy(current, patch) {
|
|
7329
|
+
return {
|
|
7330
|
+
workingMode: patch?.workingMode ?? current.workingMode,
|
|
7331
|
+
speech: patch?.speech ?? current.speech,
|
|
7332
|
+
voiceWake: patch?.voiceWake ?? current.voiceWake,
|
|
7333
|
+
heartbeat: patch?.heartbeat ?? current.heartbeat,
|
|
7334
|
+
providers: patch?.providers ?? current.providers,
|
|
7335
|
+
missionRepo: patch?.missionRepo ?? current.missionRepo,
|
|
7336
|
+
missionState: patch?.missionState ?? current.missionState,
|
|
7337
|
+
memory: patch?.memory ?? current.memory,
|
|
7338
|
+
rawConfig: patch?.rawConfig ?? current.rawConfig
|
|
7339
|
+
};
|
|
7340
|
+
}
|
|
7341
|
+
function normalizeIdSet(ids) {
|
|
7342
|
+
return new Set((ids ?? []).map((value) => value.trim()).filter(Boolean));
|
|
7343
|
+
}
|
|
7344
|
+
function shouldReplaceCollection(patch, collection) {
|
|
7345
|
+
return (patch.replaceCollections ?? []).includes(collection);
|
|
7346
|
+
}
|
|
7347
|
+
function mergeEntityCollection(current, incoming, opts) {
|
|
7348
|
+
const removals = normalizeIdSet(opts.removeIds);
|
|
7349
|
+
const filteredIncoming = (incoming ?? []).map(opts.normalize).filter((value) => !removals.has(value.id));
|
|
7350
|
+
if (opts.replace) return filteredIncoming;
|
|
7351
|
+
if (!incoming) return current.filter((value) => !removals.has(value.id));
|
|
7352
|
+
const next = /* @__PURE__ */ new Map();
|
|
7353
|
+
for (const value of current) if (!removals.has(value.id)) next.set(value.id, value);
|
|
7354
|
+
for (const value of filteredIncoming) next.set(value.id, value);
|
|
7355
|
+
const preservedOrder = current.map((value) => value.id).filter((id) => next.has(id)).map((id) => next.get(id));
|
|
7356
|
+
const appended = filteredIncoming.filter((value) => !current.some((currentValue) => currentValue.id === value.id));
|
|
7357
|
+
return [...preservedOrder, ...appended];
|
|
7358
|
+
}
|
|
6974
7359
|
function mergeState(current, patch) {
|
|
6975
7360
|
return {
|
|
6976
7361
|
version: 1,
|
|
@@ -6982,9 +7367,212 @@ function mergeState(current, patch) {
|
|
|
6982
7367
|
speech: {
|
|
6983
7368
|
...current.speech,
|
|
6984
7369
|
...patch.speech
|
|
6985
|
-
}
|
|
7370
|
+
},
|
|
7371
|
+
goals: mergeEntityCollection(current.goals, patch.goals, {
|
|
7372
|
+
removeIds: patch.goalIdsToRemove,
|
|
7373
|
+
replace: shouldReplaceCollection(patch, "goals"),
|
|
7374
|
+
normalize: normalizeGoal
|
|
7375
|
+
}),
|
|
7376
|
+
features: mergeEntityCollection(current.features, patch.features, {
|
|
7377
|
+
removeIds: patch.featureIdsToRemove,
|
|
7378
|
+
replace: shouldReplaceCollection(patch, "features"),
|
|
7379
|
+
normalize: normalizeFeature
|
|
7380
|
+
}),
|
|
7381
|
+
people: mergeEntityCollection(current.people, patch.people, {
|
|
7382
|
+
removeIds: patch.personIdsToRemove,
|
|
7383
|
+
replace: shouldReplaceCollection(patch, "people"),
|
|
7384
|
+
normalize: normalizePerson
|
|
7385
|
+
}),
|
|
7386
|
+
chronos: normalizeChronosState(current.chronos, patch.chronos),
|
|
7387
|
+
affect: normalizeAffectState(current.affect, patch.affect),
|
|
7388
|
+
autoToggle: normalizeAutoTogglePolicy(current.autoToggle, patch.autoToggle)
|
|
6986
7389
|
};
|
|
6987
7390
|
}
|
|
7391
|
+
function buildMissionControlBrainGraph(state) {
|
|
7392
|
+
const graph = new BrainGraph();
|
|
7393
|
+
for (const goal of state.goals) graph.addNode({
|
|
7394
|
+
id: missionGoalNodeId(goal.id),
|
|
7395
|
+
type: "goal",
|
|
7396
|
+
label: goal.title,
|
|
7397
|
+
aliases: [goal.id],
|
|
7398
|
+
properties: {
|
|
7399
|
+
id: goal.id,
|
|
7400
|
+
status: goal.status,
|
|
7401
|
+
priority: goal.priority,
|
|
7402
|
+
summary: goal.summary ?? null,
|
|
7403
|
+
owner: goal.owner ?? null,
|
|
7404
|
+
updatedAt: goal.updatedAt
|
|
7405
|
+
},
|
|
7406
|
+
meta: {
|
|
7407
|
+
confidence: .85,
|
|
7408
|
+
salience: goal.priority === "critical" ? 1 : goal.priority === "high" ? .85 : .6,
|
|
7409
|
+
recency: .7,
|
|
7410
|
+
provenance: ["mission-control.state.goals"]
|
|
7411
|
+
}
|
|
7412
|
+
});
|
|
7413
|
+
for (const feature of state.features) graph.addNode({
|
|
7414
|
+
id: missionFeatureNodeId(feature.id),
|
|
7415
|
+
type: "feature",
|
|
7416
|
+
label: feature.title,
|
|
7417
|
+
aliases: [feature.id],
|
|
7418
|
+
properties: {
|
|
7419
|
+
id: feature.id,
|
|
7420
|
+
status: feature.status,
|
|
7421
|
+
risk: feature.risk,
|
|
7422
|
+
testStatus: feature.testStatus,
|
|
7423
|
+
area: feature.area ?? null,
|
|
7424
|
+
lastTouchedAt: feature.lastTouchedAt
|
|
7425
|
+
},
|
|
7426
|
+
meta: {
|
|
7427
|
+
confidence: .8,
|
|
7428
|
+
salience: feature.status === "blocked" ? .95 : feature.status === "in_progress" ? .85 : .6,
|
|
7429
|
+
recency: .75,
|
|
7430
|
+
provenance: ["mission-control.state.features"]
|
|
7431
|
+
}
|
|
7432
|
+
});
|
|
7433
|
+
for (const person of state.people) graph.addNode({
|
|
7434
|
+
id: missionPersonNodeId(person.id),
|
|
7435
|
+
type: "person",
|
|
7436
|
+
label: person.name,
|
|
7437
|
+
aliases: [person.id],
|
|
7438
|
+
properties: {
|
|
7439
|
+
id: person.id,
|
|
7440
|
+
relationship: person.relationship,
|
|
7441
|
+
trust: person.trust,
|
|
7442
|
+
notes: person.notes ?? null,
|
|
7443
|
+
lastInteractedAt: person.lastInteractedAt ?? null
|
|
7444
|
+
},
|
|
7445
|
+
meta: {
|
|
7446
|
+
confidence: .9,
|
|
7447
|
+
salience: .8,
|
|
7448
|
+
recency: person.lastInteractedAt ? .8 : .5,
|
|
7449
|
+
provenance: ["mission-control.state.people"]
|
|
7450
|
+
}
|
|
7451
|
+
});
|
|
7452
|
+
graph.addNode({
|
|
7453
|
+
id: ANIMA_CHRONOS_NODE_ID,
|
|
7454
|
+
type: "chronos",
|
|
7455
|
+
label: "Chronos",
|
|
7456
|
+
properties: {
|
|
7457
|
+
heartbeatMinutes: state.chronos.heartbeatMinutes,
|
|
7458
|
+
focusBlockMinutes: state.chronos.focusBlockMinutes,
|
|
7459
|
+
checkpointIntervalMinutes: state.chronos.checkpointIntervalMinutes,
|
|
7460
|
+
activeWorkstream: state.chronos.activeWorkstream ?? null,
|
|
7461
|
+
contractStartedAt: state.chronos.contractStartedAt ?? null,
|
|
7462
|
+
contractTargetMinutes: state.chronos.contractTargetMinutes,
|
|
7463
|
+
contractElapsedMinutes: state.chronos.contractElapsedMinutes,
|
|
7464
|
+
checkpointCount: state.chronos.checkpointCount,
|
|
7465
|
+
lastCheckpointAt: state.chronos.lastCheckpointAt ?? null,
|
|
7466
|
+
driftMinutes: state.chronos.driftMinutes,
|
|
7467
|
+
updatedAt: state.chronos.updatedAt
|
|
7468
|
+
},
|
|
7469
|
+
meta: {
|
|
7470
|
+
confidence: .95,
|
|
7471
|
+
salience: .9,
|
|
7472
|
+
recency: .85,
|
|
7473
|
+
provenance: ["mission-control.state.chronos"]
|
|
7474
|
+
}
|
|
7475
|
+
});
|
|
7476
|
+
graph.addNode({
|
|
7477
|
+
id: ANIMA_AFFECT_NODE_ID,
|
|
7478
|
+
type: "affect",
|
|
7479
|
+
label: "Affect",
|
|
7480
|
+
properties: {
|
|
7481
|
+
joy: state.affect.joy,
|
|
7482
|
+
frustration: state.affect.frustration,
|
|
7483
|
+
curiosity: state.affect.curiosity,
|
|
7484
|
+
confidence: state.affect.confidence,
|
|
7485
|
+
care: state.affect.care,
|
|
7486
|
+
fatigue: state.affect.fatigue,
|
|
7487
|
+
updatedAt: state.affect.updatedAt
|
|
7488
|
+
},
|
|
7489
|
+
meta: {
|
|
7490
|
+
confidence: .75,
|
|
7491
|
+
salience: .7,
|
|
7492
|
+
recency: .75,
|
|
7493
|
+
provenance: ["mission-control.state.affect"]
|
|
7494
|
+
}
|
|
7495
|
+
});
|
|
7496
|
+
for (const goal of state.goals) {
|
|
7497
|
+
if (!goal.owner) continue;
|
|
7498
|
+
const normalizedOwner = goal.owner.trim().toLowerCase();
|
|
7499
|
+
const owner = state.people.find((person) => person.id.trim().toLowerCase() === normalizedOwner || person.name.trim().toLowerCase() === normalizedOwner);
|
|
7500
|
+
if (!owner) continue;
|
|
7501
|
+
graph.addEdge({
|
|
7502
|
+
id: `owns:${owner.id}:${goal.id}`,
|
|
7503
|
+
source: missionPersonNodeId(owner.id),
|
|
7504
|
+
target: missionGoalNodeId(goal.id),
|
|
7505
|
+
relation: "owns",
|
|
7506
|
+
meta: {
|
|
7507
|
+
confidence: .9,
|
|
7508
|
+
salience: .8,
|
|
7509
|
+
recency: .7,
|
|
7510
|
+
strength: owner.trust,
|
|
7511
|
+
provenance: ["mission-control.state.goals.owner"]
|
|
7512
|
+
}
|
|
7513
|
+
});
|
|
7514
|
+
}
|
|
7515
|
+
const activeGoal = state.goals.find((goal) => goal.status === "active") ?? state.goals[0];
|
|
7516
|
+
if (activeGoal) for (const feature of state.features.filter((entry) => entry.status !== "done")) graph.addEdge({
|
|
7517
|
+
id: `supports:${feature.id}:${activeGoal.id}`,
|
|
7518
|
+
source: missionFeatureNodeId(feature.id),
|
|
7519
|
+
target: missionGoalNodeId(activeGoal.id),
|
|
7520
|
+
relation: "supports",
|
|
7521
|
+
meta: {
|
|
7522
|
+
confidence: .55,
|
|
7523
|
+
salience: feature.status === "blocked" ? .9 : .7,
|
|
7524
|
+
recency: .7,
|
|
7525
|
+
strength: feature.testStatus === "passing" ? .8 : .6,
|
|
7526
|
+
provenance: ["mission-control.derived.active-goal"]
|
|
7527
|
+
}
|
|
7528
|
+
});
|
|
7529
|
+
const activeWorkstream = state.chronos.activeWorkstream?.trim().toLowerCase();
|
|
7530
|
+
if (activeWorkstream) {
|
|
7531
|
+
const feature = state.features.find((entry) => entry.id.trim().toLowerCase() === activeWorkstream || entry.title.trim().toLowerCase() === activeWorkstream);
|
|
7532
|
+
const goal = state.goals.find((entry) => entry.id.trim().toLowerCase() === activeWorkstream || entry.title.trim().toLowerCase() === activeWorkstream);
|
|
7533
|
+
const targetId = feature ? missionFeatureNodeId(feature.id) : goal ? missionGoalNodeId(goal.id) : void 0;
|
|
7534
|
+
if (targetId) graph.addEdge({
|
|
7535
|
+
id: `focuses_on:${targetId}`,
|
|
7536
|
+
source: ANIMA_CHRONOS_NODE_ID,
|
|
7537
|
+
target: targetId,
|
|
7538
|
+
relation: "focuses_on",
|
|
7539
|
+
meta: {
|
|
7540
|
+
confidence: .95,
|
|
7541
|
+
salience: .95,
|
|
7542
|
+
recency: .9,
|
|
7543
|
+
strength: .9,
|
|
7544
|
+
provenance: ["mission-control.state.chronos.activeWorkstream"]
|
|
7545
|
+
}
|
|
7546
|
+
});
|
|
7547
|
+
}
|
|
7548
|
+
for (const goal of state.goals.filter((entry) => entry.status === "active")) graph.addEdge({
|
|
7549
|
+
id: `tracks:${goal.id}`,
|
|
7550
|
+
source: ANIMA_CHRONOS_NODE_ID,
|
|
7551
|
+
target: missionGoalNodeId(goal.id),
|
|
7552
|
+
relation: "tracks",
|
|
7553
|
+
meta: {
|
|
7554
|
+
confidence: .7,
|
|
7555
|
+
salience: .8,
|
|
7556
|
+
recency: .8,
|
|
7557
|
+
strength: .7,
|
|
7558
|
+
provenance: ["mission-control.derived.active-goals"]
|
|
7559
|
+
}
|
|
7560
|
+
});
|
|
7561
|
+
for (const feature of state.features.filter((entry) => entry.status !== "done")) graph.addEdge({
|
|
7562
|
+
id: `influences:${feature.id}`,
|
|
7563
|
+
source: ANIMA_AFFECT_NODE_ID,
|
|
7564
|
+
target: missionFeatureNodeId(feature.id),
|
|
7565
|
+
relation: "influences",
|
|
7566
|
+
meta: {
|
|
7567
|
+
confidence: .45,
|
|
7568
|
+
salience: .6,
|
|
7569
|
+
recency: .7,
|
|
7570
|
+
strength: Math.max(state.affect.care, state.affect.curiosity),
|
|
7571
|
+
provenance: ["mission-control.derived.affect"]
|
|
7572
|
+
}
|
|
7573
|
+
});
|
|
7574
|
+
return graph.toJSON();
|
|
7575
|
+
}
|
|
6988
7576
|
function getMissionFileTitle(fileName) {
|
|
6989
7577
|
const known = DEFAULT_MISSION_FILES.find((entry) => entry.fileName === fileName);
|
|
6990
7578
|
if (known) return known.title;
|
|
@@ -7163,6 +7751,10 @@ async function ensureMissionControlScaffold(stateDir = resolveStateDir()) {
|
|
|
7163
7751
|
async function readMissionControlState(stateDir = resolveStateDir()) {
|
|
7164
7752
|
await ensureMissionControlScaffold(stateDir);
|
|
7165
7753
|
const stored = await readJsonFile(missionStatePath(stateDir));
|
|
7754
|
+
const replaceCollections = [];
|
|
7755
|
+
if (Array.isArray(stored?.goals)) replaceCollections.push("goals");
|
|
7756
|
+
if (Array.isArray(stored?.features)) replaceCollections.push("features");
|
|
7757
|
+
if (Array.isArray(stored?.people)) replaceCollections.push("people");
|
|
7166
7758
|
return mergeState(DEFAULT_STATE, {
|
|
7167
7759
|
...stored,
|
|
7168
7760
|
repo: {
|
|
@@ -7172,7 +7764,23 @@ async function readMissionControlState(stateDir = resolveStateDir()) {
|
|
|
7172
7764
|
speech: {
|
|
7173
7765
|
...DEFAULT_STATE.speech,
|
|
7174
7766
|
...stored?.speech
|
|
7175
|
-
}
|
|
7767
|
+
},
|
|
7768
|
+
goals: Array.isArray(stored?.goals) ? stored.goals : DEFAULT_STATE.goals,
|
|
7769
|
+
features: Array.isArray(stored?.features) ? stored.features : DEFAULT_STATE.features,
|
|
7770
|
+
people: Array.isArray(stored?.people) ? stored.people : DEFAULT_STATE.people,
|
|
7771
|
+
chronos: {
|
|
7772
|
+
...DEFAULT_STATE.chronos,
|
|
7773
|
+
...stored?.chronos
|
|
7774
|
+
},
|
|
7775
|
+
affect: {
|
|
7776
|
+
...DEFAULT_STATE.affect,
|
|
7777
|
+
...stored?.affect
|
|
7778
|
+
},
|
|
7779
|
+
autoToggle: {
|
|
7780
|
+
...DEFAULT_STATE.autoToggle,
|
|
7781
|
+
...stored?.autoToggle
|
|
7782
|
+
},
|
|
7783
|
+
replaceCollections
|
|
7176
7784
|
});
|
|
7177
7785
|
}
|
|
7178
7786
|
async function patchMissionControlState(patch, stateDir = resolveStateDir()) {
|
|
@@ -7223,6 +7831,8 @@ async function readMissionControlSnapshot(stateDir = resolveStateDir()) {
|
|
|
7223
7831
|
directory,
|
|
7224
7832
|
statePath: missionStatePath(stateDir),
|
|
7225
7833
|
state,
|
|
7834
|
+
brainGraph: buildMissionControlBrainGraph(state),
|
|
7835
|
+
trustGraph: await readTrustGraphSnapshot(stateDir),
|
|
7226
7836
|
files,
|
|
7227
7837
|
innerWorld: innerWorldEntries.filter((entry) => Boolean(entry)),
|
|
7228
7838
|
importantHistory: await listImportantHistoryEntries(stateDir)
|
|
@@ -7307,7 +7917,7 @@ async function connectMissionRepo(params) {
|
|
|
7307
7917
|
|
|
7308
7918
|
//#endregion
|
|
7309
7919
|
//#region src/gateway/server-methods/anima.ts
|
|
7310
|
-
function invalid(message) {
|
|
7920
|
+
function invalid$1(message) {
|
|
7311
7921
|
return errorShape(ErrorCodes.INVALID_REQUEST, message);
|
|
7312
7922
|
}
|
|
7313
7923
|
function asRecord$1(value) {
|
|
@@ -7327,7 +7937,20 @@ function normalizeMemoryKind(value) {
|
|
|
7327
7937
|
}
|
|
7328
7938
|
async function setMainWorkingMode(mode) {
|
|
7329
7939
|
const cfg = loadConfig();
|
|
7330
|
-
const
|
|
7940
|
+
const mainKey = resolveMainSessionKey(cfg);
|
|
7941
|
+
const defaultModel = resolveDefaultModelForAgent({
|
|
7942
|
+
cfg,
|
|
7943
|
+
agentId: resolveSessionAgentId({
|
|
7944
|
+
sessionKey: mainKey,
|
|
7945
|
+
config: cfg
|
|
7946
|
+
})
|
|
7947
|
+
});
|
|
7948
|
+
const autoModeSelection = resolveWorkingModeModelSelection({
|
|
7949
|
+
cfg,
|
|
7950
|
+
workingMode: mode,
|
|
7951
|
+
defaultProvider: defaultModel.provider
|
|
7952
|
+
});
|
|
7953
|
+
const { storePath, canonicalKey } = loadSessionEntry(mainKey);
|
|
7331
7954
|
const execSecurity = mode === "read" ? "deny" : "full";
|
|
7332
7955
|
const execAsk = mode === "read" ? "off" : "on-miss";
|
|
7333
7956
|
const elevatedLevel = mode === "read" ? "off" : "ask";
|
|
@@ -7345,6 +7968,19 @@ async function setMainWorkingMode(mode) {
|
|
|
7345
7968
|
}
|
|
7346
7969
|
});
|
|
7347
7970
|
if (!applied.ok) throw new Error(applied.error.message);
|
|
7971
|
+
applyModelOverrideToSessionEntry({
|
|
7972
|
+
entry: applied.entry,
|
|
7973
|
+
selection: autoModeSelection ? {
|
|
7974
|
+
provider: autoModeSelection.provider,
|
|
7975
|
+
model: autoModeSelection.model,
|
|
7976
|
+
isDefault: autoModeSelection.provider === defaultModel.provider && autoModeSelection.model === defaultModel.model
|
|
7977
|
+
} : {
|
|
7978
|
+
provider: defaultModel.provider,
|
|
7979
|
+
model: defaultModel.model,
|
|
7980
|
+
isDefault: true
|
|
7981
|
+
}
|
|
7982
|
+
});
|
|
7983
|
+
store[canonicalKey] = applied.entry;
|
|
7348
7984
|
return applied.entry;
|
|
7349
7985
|
});
|
|
7350
7986
|
await patchMissionControlState({ workingMode: mode });
|
|
@@ -7352,7 +7988,9 @@ async function setMainWorkingMode(mode) {
|
|
|
7352
7988
|
mode,
|
|
7353
7989
|
execSecurity,
|
|
7354
7990
|
execAsk,
|
|
7355
|
-
elevatedLevel
|
|
7991
|
+
elevatedLevel,
|
|
7992
|
+
modelProvider: autoModeSelection?.provider ?? defaultModel.provider,
|
|
7993
|
+
model: autoModeSelection?.model ?? defaultModel.model
|
|
7356
7994
|
};
|
|
7357
7995
|
}
|
|
7358
7996
|
const animaHandlers = {
|
|
@@ -7404,7 +8042,7 @@ const animaHandlers = {
|
|
|
7404
8042
|
"anima.runtime.set-working-mode": async ({ params, respond }) => {
|
|
7405
8043
|
const mode = normalizeWorkingMode(params?.mode);
|
|
7406
8044
|
if (!mode) {
|
|
7407
|
-
respond(false, void 0, invalid("mode must be \"read\" or \"write\""));
|
|
8045
|
+
respond(false, void 0, invalid$1("mode must be \"read\" or \"write\""));
|
|
7408
8046
|
return;
|
|
7409
8047
|
}
|
|
7410
8048
|
try {
|
|
@@ -7419,7 +8057,7 @@ const animaHandlers = {
|
|
|
7419
8057
|
"anima.memory.list": async ({ params, respond }) => {
|
|
7420
8058
|
const kind = normalizeMemoryKind(params?.kind);
|
|
7421
8059
|
if (!kind) {
|
|
7422
|
-
respond(false, void 0, invalid("kind must be one of: \"episodic\", \"semantic\", \"procedural\""));
|
|
8060
|
+
respond(false, void 0, invalid$1("kind must be one of: \"episodic\", \"semantic\", \"procedural\""));
|
|
7423
8061
|
return;
|
|
7424
8062
|
}
|
|
7425
8063
|
const query = typeof params?.query === "string" ? params.query?.trim() || void 0 : void 0;
|
|
@@ -7449,7 +8087,7 @@ const animaHandlers = {
|
|
|
7449
8087
|
const fileName = typeof params?.fileName === "string" ? params.fileName?.trim() || "" : "";
|
|
7450
8088
|
const content = typeof params?.content === "string" ? params.content ?? "" : "";
|
|
7451
8089
|
if (!fileName) {
|
|
7452
|
-
respond(false, void 0, invalid("fileName is required"));
|
|
8090
|
+
respond(false, void 0, invalid$1("fileName is required"));
|
|
7453
8091
|
return;
|
|
7454
8092
|
}
|
|
7455
8093
|
try {
|
|
@@ -7467,7 +8105,7 @@ const animaHandlers = {
|
|
|
7467
8105
|
"anima.mission.patch": async ({ params, respond }) => {
|
|
7468
8106
|
const patch = asRecord$1(params?.patch);
|
|
7469
8107
|
if (!patch) {
|
|
7470
|
-
respond(false, void 0, invalid("patch object required"));
|
|
8108
|
+
respond(false, void 0, invalid$1("patch object required"));
|
|
7471
8109
|
return;
|
|
7472
8110
|
}
|
|
7473
8111
|
try {
|
|
@@ -7482,7 +8120,7 @@ const animaHandlers = {
|
|
|
7482
8120
|
"anima.mission.connect-repo": async ({ params, respond }) => {
|
|
7483
8121
|
const url = typeof params?.url === "string" ? params.url?.trim() || "" : "";
|
|
7484
8122
|
if (!url) {
|
|
7485
|
-
respond(false, void 0, invalid("url is required"));
|
|
8123
|
+
respond(false, void 0, invalid$1("url is required"));
|
|
7486
8124
|
return;
|
|
7487
8125
|
}
|
|
7488
8126
|
const branch = typeof params?.branch === "string" ? params.branch?.trim() || void 0 : void 0;
|
|
@@ -7501,6 +8139,22 @@ const animaHandlers = {
|
|
|
7501
8139
|
respond(false, void 0, errorShape(ErrorCodes.UNAVAILABLE, String(error)));
|
|
7502
8140
|
}
|
|
7503
8141
|
},
|
|
8142
|
+
"anima.trust.set": async ({ params, respond }) => {
|
|
8143
|
+
const people = Array.isArray(params?.people) ? params.people : null;
|
|
8144
|
+
if (!people) {
|
|
8145
|
+
respond(false, void 0, invalid$1("people array is required"));
|
|
8146
|
+
return;
|
|
8147
|
+
}
|
|
8148
|
+
try {
|
|
8149
|
+
await saveTrustGraph({
|
|
8150
|
+
version: 1,
|
|
8151
|
+
people
|
|
8152
|
+
});
|
|
8153
|
+
respond(true, { ok: true }, void 0);
|
|
8154
|
+
} catch (error) {
|
|
8155
|
+
respond(false, void 0, errorShape(ErrorCodes.UNAVAILABLE, String(error)));
|
|
8156
|
+
}
|
|
8157
|
+
},
|
|
7504
8158
|
"anima.mission.import": async ({ params, respond }) => {
|
|
7505
8159
|
const source = typeof params?.source === "string" ? params.source?.trim() || void 0 : void 0;
|
|
7506
8160
|
const preset = typeof params?.preset === "string" ? params.preset?.trim() || void 0 : void 0;
|
|
@@ -7533,7 +8187,7 @@ const animaHandlers = {
|
|
|
7533
8187
|
"anima.registration.set-token": async ({ params, respond }) => {
|
|
7534
8188
|
const token = typeof params?.token === "string" ? params.token?.trim() || "" : "";
|
|
7535
8189
|
if (!token) {
|
|
7536
|
-
respond(false, void 0, invalid("token is required"));
|
|
8190
|
+
respond(false, void 0, invalid$1("token is required"));
|
|
7537
8191
|
return;
|
|
7538
8192
|
}
|
|
7539
8193
|
try {
|
|
@@ -7541,7 +8195,7 @@ const animaHandlers = {
|
|
|
7541
8195
|
const agent = await whoami();
|
|
7542
8196
|
if (!agent) {
|
|
7543
8197
|
clearToken();
|
|
7544
|
-
respond(false, void 0, invalid("token could not be verified"));
|
|
8198
|
+
respond(false, void 0, invalid$1("token could not be verified"));
|
|
7545
8199
|
return;
|
|
7546
8200
|
}
|
|
7547
8201
|
respond(true, {
|
|
@@ -7555,7 +8209,7 @@ const animaHandlers = {
|
|
|
7555
8209
|
"anima.registration.register-invite": async ({ params, respond }) => {
|
|
7556
8210
|
const code = typeof params?.code === "string" ? params.code?.trim() || "" : "";
|
|
7557
8211
|
if (!code) {
|
|
7558
|
-
respond(false, void 0, invalid("code is required"));
|
|
8212
|
+
respond(false, void 0, invalid$1("code is required"));
|
|
7559
8213
|
return;
|
|
7560
8214
|
}
|
|
7561
8215
|
const suggested = resolveSuggestedIdentity();
|
|
@@ -8957,7 +9611,7 @@ const FIELD_LABELS = {
|
|
|
8957
9611
|
|
|
8958
9612
|
//#endregion
|
|
8959
9613
|
//#region src/config/schema.hints.ts
|
|
8960
|
-
const log$
|
|
9614
|
+
const log$5 = createSubsystemLogger("config/schema");
|
|
8961
9615
|
const GROUP_LABELS = {
|
|
8962
9616
|
wizard: "Wizard",
|
|
8963
9617
|
update: "Update",
|
|
@@ -9105,7 +9759,7 @@ function mapSensitivePaths(schema, path, hints) {
|
|
|
9105
9759
|
...next[path],
|
|
9106
9760
|
sensitive: true
|
|
9107
9761
|
};
|
|
9108
|
-
else if (isSensitiveConfigPath(path) && !next[path]?.sensitive) log$
|
|
9762
|
+
else if (isSensitiveConfigPath(path) && !next[path]?.sensitive) log$5.warn(`possibly sensitive key found: (${path})`);
|
|
9109
9763
|
if (currentSchema instanceof z.ZodObject) {
|
|
9110
9764
|
const shape = currentSchema.shape;
|
|
9111
9765
|
for (const key in shape) {
|
|
@@ -9128,7 +9782,7 @@ function mapSensitivePaths(schema, path, hints) {
|
|
|
9128
9782
|
|
|
9129
9783
|
//#endregion
|
|
9130
9784
|
//#region src/config/redact-snapshot.ts
|
|
9131
|
-
const log$
|
|
9785
|
+
const log$4 = createSubsystemLogger("config/redaction");
|
|
9132
9786
|
const ENV_VAR_PLACEHOLDER_PATTERN = /^\$\{[^}]*\}$/;
|
|
9133
9787
|
function isSensitivePath(path) {
|
|
9134
9788
|
if (path.endsWith("[]")) return isSensitiveConfigPath(path.slice(0, -2));
|
|
@@ -9379,7 +10033,7 @@ function restoreRedactedValuesWithLookup(incoming, original, lookup, prefix, hin
|
|
|
9379
10033
|
return restoreRedactedValuesGuessing(incoming, original, prefix, hints);
|
|
9380
10034
|
}
|
|
9381
10035
|
const origArr = Array.isArray(original) ? original : [];
|
|
9382
|
-
if (incoming.length < origArr.length) log$
|
|
10036
|
+
if (incoming.length < origArr.length) log$4.warn(`Redacted config array key ${path} has been truncated`);
|
|
9383
10037
|
return incoming.map((item, i) => {
|
|
9384
10038
|
if (item === REDACTED_SENTINEL) return origArr[i];
|
|
9385
10039
|
return restoreRedactedValuesWithLookup(item, origArr[i], lookup, path, hints);
|
|
@@ -9396,7 +10050,7 @@ function restoreRedactedValuesWithLookup(incoming, original, lookup, prefix, hin
|
|
|
9396
10050
|
matched = true;
|
|
9397
10051
|
if (value === REDACTED_SENTINEL) if (key in orig) result[key] = orig[key];
|
|
9398
10052
|
else {
|
|
9399
|
-
log$
|
|
10053
|
+
log$4.warn(`Cannot un-redact config key ${candidate} as it doesn't have any value`);
|
|
9400
10054
|
throw new RedactionError(candidate);
|
|
9401
10055
|
}
|
|
9402
10056
|
else if (typeof value === "object" && value !== null) result[key] = restoreRedactedValuesWithLookup(value, orig[key], lookup, candidate, hints);
|
|
@@ -9405,7 +10059,7 @@ function restoreRedactedValuesWithLookup(incoming, original, lookup, prefix, hin
|
|
|
9405
10059
|
if (!matched && isExtensionPath(path)) {
|
|
9406
10060
|
if (!isExplicitlyNonSensitivePath(hints, [path, wildcardPath]) && isSensitivePath(path) && value === REDACTED_SENTINEL) if (key in orig) result[key] = orig[key];
|
|
9407
10061
|
else {
|
|
9408
|
-
log$
|
|
10062
|
+
log$4.warn(`Cannot un-redact config key ${path} as it doesn't have any value`);
|
|
9409
10063
|
throw new RedactionError(path);
|
|
9410
10064
|
}
|
|
9411
10065
|
else if (typeof value === "object" && value !== null) result[key] = restoreRedactedValuesGuessing(value, orig[key], path, hints);
|
|
@@ -9424,7 +10078,7 @@ function restoreRedactedValuesGuessing(incoming, original, prefix, hints) {
|
|
|
9424
10078
|
const origArr = Array.isArray(original) ? original : [];
|
|
9425
10079
|
return incoming.map((item, i) => {
|
|
9426
10080
|
const path = `${prefix}[]`;
|
|
9427
|
-
if (incoming.length < origArr.length) log$
|
|
10081
|
+
if (incoming.length < origArr.length) log$4.warn(`Redacted config array key ${path} has been truncated`);
|
|
9428
10082
|
if (!isExplicitlyNonSensitivePath(hints, [path]) && isSensitivePath(path) && item === REDACTED_SENTINEL) return origArr[i];
|
|
9429
10083
|
return restoreRedactedValuesGuessing(item, origArr[i], path, hints);
|
|
9430
10084
|
});
|
|
@@ -9435,7 +10089,7 @@ function restoreRedactedValuesGuessing(incoming, original, prefix, hints) {
|
|
|
9435
10089
|
const path = prefix ? `${prefix}.${key}` : key;
|
|
9436
10090
|
if (!isExplicitlyNonSensitivePath(hints, [path, prefix ? `${prefix}.*` : "*"]) && isSensitivePath(path) && value === REDACTED_SENTINEL) if (key in orig) result[key] = orig[key];
|
|
9437
10091
|
else {
|
|
9438
|
-
log$
|
|
10092
|
+
log$4.warn(`Cannot un-redact config key ${path} as it doesn't have any value`);
|
|
9439
10093
|
throw new RedactionError(path);
|
|
9440
10094
|
}
|
|
9441
10095
|
else if (typeof value === "object" && value !== null) result[key] = restoreRedactedValuesGuessing(value, orig[key], path, hints);
|
|
@@ -10782,10 +11436,10 @@ const logsHandlers = { "logs.tail": async ({ params, respond }) => {
|
|
|
10782
11436
|
const mcpHandlers = {
|
|
10783
11437
|
"mcp.list": async ({ respond }) => {
|
|
10784
11438
|
try {
|
|
10785
|
-
const { listServers } = await import("./registry-
|
|
11439
|
+
const { listServers } = await import("./registry-BvymIcVf.js").then((n) => n.n);
|
|
10786
11440
|
respond(true, { servers: await listServers() });
|
|
10787
11441
|
} catch (err) {
|
|
10788
|
-
respond(false, void 0, errorShape(ErrorCodes.
|
|
11442
|
+
respond(false, void 0, errorShape(ErrorCodes.UNAVAILABLE, String(err)));
|
|
10789
11443
|
}
|
|
10790
11444
|
},
|
|
10791
11445
|
"mcp.add": async ({ params, respond }) => {
|
|
@@ -10795,8 +11449,8 @@ const mcpHandlers = {
|
|
|
10795
11449
|
return;
|
|
10796
11450
|
}
|
|
10797
11451
|
try {
|
|
10798
|
-
const { addServer } = await import("./registry-
|
|
10799
|
-
const { syncConfig } = await import("./config-sync-
|
|
11452
|
+
const { addServer } = await import("./registry-BvymIcVf.js").then((n) => n.n);
|
|
11453
|
+
const { syncConfig } = await import("./config-sync-CCVp-tVX.js");
|
|
10800
11454
|
const registry = await addServer({
|
|
10801
11455
|
name: p.name,
|
|
10802
11456
|
command: p.command,
|
|
@@ -10811,7 +11465,7 @@ const mcpHandlers = {
|
|
|
10811
11465
|
await syncConfig();
|
|
10812
11466
|
respond(true, { servers: registry.servers });
|
|
10813
11467
|
} catch (err) {
|
|
10814
|
-
respond(false, void 0, errorShape(ErrorCodes.
|
|
11468
|
+
respond(false, void 0, errorShape(ErrorCodes.UNAVAILABLE, String(err)));
|
|
10815
11469
|
}
|
|
10816
11470
|
},
|
|
10817
11471
|
"mcp.remove": async ({ params, respond }) => {
|
|
@@ -10821,21 +11475,21 @@ const mcpHandlers = {
|
|
|
10821
11475
|
return;
|
|
10822
11476
|
}
|
|
10823
11477
|
try {
|
|
10824
|
-
const { removeServer } = await import("./registry-
|
|
10825
|
-
const { syncConfig } = await import("./config-sync-
|
|
11478
|
+
const { removeServer } = await import("./registry-BvymIcVf.js").then((n) => n.n);
|
|
11479
|
+
const { syncConfig } = await import("./config-sync-CCVp-tVX.js");
|
|
10826
11480
|
const registry = await removeServer(p.name);
|
|
10827
11481
|
await syncConfig();
|
|
10828
11482
|
respond(true, { servers: registry.servers });
|
|
10829
11483
|
} catch (err) {
|
|
10830
|
-
respond(false, void 0, errorShape(ErrorCodes.
|
|
11484
|
+
respond(false, void 0, errorShape(ErrorCodes.UNAVAILABLE, String(err)));
|
|
10831
11485
|
}
|
|
10832
11486
|
},
|
|
10833
11487
|
"mcp.sync": async ({ respond }) => {
|
|
10834
11488
|
try {
|
|
10835
|
-
const { syncConfig } = await import("./config-sync-
|
|
11489
|
+
const { syncConfig } = await import("./config-sync-CCVp-tVX.js");
|
|
10836
11490
|
respond(true, await syncConfig());
|
|
10837
11491
|
} catch (err) {
|
|
10838
|
-
respond(false, void 0, errorShape(ErrorCodes.
|
|
11492
|
+
respond(false, void 0, errorShape(ErrorCodes.UNAVAILABLE, String(err)));
|
|
10839
11493
|
}
|
|
10840
11494
|
}
|
|
10841
11495
|
};
|
|
@@ -11420,7 +12074,7 @@ const nodeHandlers = {
|
|
|
11420
12074
|
const p = params;
|
|
11421
12075
|
const payloadJSON = typeof p.payloadJSON === "string" ? p.payloadJSON : p.payload !== void 0 ? JSON.stringify(p.payload) : null;
|
|
11422
12076
|
await respondUnavailableOnThrow(respond, async () => {
|
|
11423
|
-
const { handleNodeEvent } = await import("./server-node-events-
|
|
12077
|
+
const { handleNodeEvent } = await import("./server-node-events-BR1aXVlu.js");
|
|
11424
12078
|
const nodeId = client?.connect?.device?.id ?? client?.connect?.client?.id ?? "node";
|
|
11425
12079
|
await handleNodeEvent({
|
|
11426
12080
|
deps: context.deps,
|
|
@@ -11450,6 +12104,441 @@ const nodeHandlers = {
|
|
|
11450
12104
|
}
|
|
11451
12105
|
};
|
|
11452
12106
|
|
|
12107
|
+
//#endregion
|
|
12108
|
+
//#region src/org/types.ts
|
|
12109
|
+
const DEFAULT_ROLE_PERMISSIONS = {
|
|
12110
|
+
owner: {
|
|
12111
|
+
canCreateTasks: true,
|
|
12112
|
+
canDelegateTasks: true,
|
|
12113
|
+
canManageMembers: true,
|
|
12114
|
+
canEditOrg: true,
|
|
12115
|
+
canAccessRepos: ["*"],
|
|
12116
|
+
canEscalate: true,
|
|
12117
|
+
canViewBrain: true,
|
|
12118
|
+
canSyncBrain: true
|
|
12119
|
+
},
|
|
12120
|
+
operator: {
|
|
12121
|
+
canCreateTasks: true,
|
|
12122
|
+
canDelegateTasks: true,
|
|
12123
|
+
canManageMembers: true,
|
|
12124
|
+
canEditOrg: false,
|
|
12125
|
+
canAccessRepos: ["*"],
|
|
12126
|
+
canEscalate: true,
|
|
12127
|
+
canViewBrain: true,
|
|
12128
|
+
canSyncBrain: true
|
|
12129
|
+
},
|
|
12130
|
+
coordinator: {
|
|
12131
|
+
canCreateTasks: true,
|
|
12132
|
+
canDelegateTasks: true,
|
|
12133
|
+
canManageMembers: false,
|
|
12134
|
+
canEditOrg: false,
|
|
12135
|
+
canAccessRepos: [],
|
|
12136
|
+
canEscalate: true,
|
|
12137
|
+
canViewBrain: true,
|
|
12138
|
+
canSyncBrain: true
|
|
12139
|
+
},
|
|
12140
|
+
worker: {
|
|
12141
|
+
canCreateTasks: false,
|
|
12142
|
+
canDelegateTasks: false,
|
|
12143
|
+
canManageMembers: false,
|
|
12144
|
+
canEditOrg: false,
|
|
12145
|
+
canAccessRepos: [],
|
|
12146
|
+
canEscalate: true,
|
|
12147
|
+
canViewBrain: true,
|
|
12148
|
+
canSyncBrain: false
|
|
12149
|
+
},
|
|
12150
|
+
observer: {
|
|
12151
|
+
canCreateTasks: false,
|
|
12152
|
+
canDelegateTasks: false,
|
|
12153
|
+
canManageMembers: false,
|
|
12154
|
+
canEditOrg: false,
|
|
12155
|
+
canAccessRepos: [],
|
|
12156
|
+
canEscalate: false,
|
|
12157
|
+
canViewBrain: true,
|
|
12158
|
+
canSyncBrain: false
|
|
12159
|
+
}
|
|
12160
|
+
};
|
|
12161
|
+
|
|
12162
|
+
//#endregion
|
|
12163
|
+
//#region src/org/store.ts
|
|
12164
|
+
/**
|
|
12165
|
+
* ANIMA 6 Organization Store
|
|
12166
|
+
*
|
|
12167
|
+
* Persists organization state to ~/.anima/org/
|
|
12168
|
+
* Supports CRUD operations for orgs, members, and roles.
|
|
12169
|
+
*/
|
|
12170
|
+
const log$3 = createSubsystemLogger("org-store");
|
|
12171
|
+
function resolveOrgDir() {
|
|
12172
|
+
return path.join(resolveStateDir(), "org");
|
|
12173
|
+
}
|
|
12174
|
+
function resolveOrgFile(orgId) {
|
|
12175
|
+
return path.join(resolveOrgDir(), `${orgId}.json`);
|
|
12176
|
+
}
|
|
12177
|
+
function readOrgFile(orgId) {
|
|
12178
|
+
const filePath = resolveOrgFile(orgId);
|
|
12179
|
+
try {
|
|
12180
|
+
if (!fs.existsSync(filePath)) return null;
|
|
12181
|
+
const raw = fs.readFileSync(filePath, "utf8");
|
|
12182
|
+
const parsed = JSON.parse(raw);
|
|
12183
|
+
if (parsed?.version !== 1) return null;
|
|
12184
|
+
return parsed;
|
|
12185
|
+
} catch {
|
|
12186
|
+
return null;
|
|
12187
|
+
}
|
|
12188
|
+
}
|
|
12189
|
+
function writeOrgFile(orgId, data) {
|
|
12190
|
+
const filePath = resolveOrgFile(orgId);
|
|
12191
|
+
fs.mkdirSync(path.dirname(filePath), { recursive: true });
|
|
12192
|
+
fs.writeFileSync(filePath, `${JSON.stringify(data, null, 2)}\n`, { mode: 384 });
|
|
12193
|
+
}
|
|
12194
|
+
function createOrganization(name, description, ownerId, ownerName, ownerKind, settings) {
|
|
12195
|
+
const orgId = crypto.randomUUID();
|
|
12196
|
+
const now = Date.now();
|
|
12197
|
+
const org = {
|
|
12198
|
+
id: orgId,
|
|
12199
|
+
name,
|
|
12200
|
+
description,
|
|
12201
|
+
createdAt: now,
|
|
12202
|
+
updatedAt: now,
|
|
12203
|
+
ownerId,
|
|
12204
|
+
settings: {
|
|
12205
|
+
maxAgents: 50,
|
|
12206
|
+
maxHumans: 20,
|
|
12207
|
+
autoSpecialization: true,
|
|
12208
|
+
securityLevel: "standard",
|
|
12209
|
+
syncIntervalMs: 6e4,
|
|
12210
|
+
backupIntervalMs: 300 * 60 * 1e3,
|
|
12211
|
+
peerPort: 9876,
|
|
12212
|
+
...settings
|
|
12213
|
+
}
|
|
12214
|
+
};
|
|
12215
|
+
writeOrgFile(orgId, {
|
|
12216
|
+
version: 1,
|
|
12217
|
+
org,
|
|
12218
|
+
members: [{
|
|
12219
|
+
id: crypto.randomUUID(),
|
|
12220
|
+
kind: ownerKind,
|
|
12221
|
+
displayName: ownerName,
|
|
12222
|
+
role: "owner",
|
|
12223
|
+
description: "Organization owner",
|
|
12224
|
+
specializations: [],
|
|
12225
|
+
joinedAt: now,
|
|
12226
|
+
lastActiveAt: now,
|
|
12227
|
+
status: "active",
|
|
12228
|
+
permissions: DEFAULT_ROLE_PERMISSIONS.owner
|
|
12229
|
+
}]
|
|
12230
|
+
});
|
|
12231
|
+
log$3.info(`created organization: ${name} (${orgId})`);
|
|
12232
|
+
return org;
|
|
12233
|
+
}
|
|
12234
|
+
function getOrganization(orgId) {
|
|
12235
|
+
return readOrgFile(orgId)?.org ?? null;
|
|
12236
|
+
}
|
|
12237
|
+
function updateOrganization(orgId, updates) {
|
|
12238
|
+
const data = readOrgFile(orgId);
|
|
12239
|
+
if (!data) return null;
|
|
12240
|
+
if (updates.name) data.org.name = updates.name;
|
|
12241
|
+
if (updates.description) data.org.description = updates.description;
|
|
12242
|
+
if (updates.settings) data.org.settings = {
|
|
12243
|
+
...data.org.settings,
|
|
12244
|
+
...updates.settings
|
|
12245
|
+
};
|
|
12246
|
+
data.org.updatedAt = Date.now();
|
|
12247
|
+
writeOrgFile(orgId, data);
|
|
12248
|
+
log$3.info(`updated organization: ${orgId}`);
|
|
12249
|
+
return data.org;
|
|
12250
|
+
}
|
|
12251
|
+
function listOrganizations() {
|
|
12252
|
+
const dir = resolveOrgDir();
|
|
12253
|
+
try {
|
|
12254
|
+
if (!fs.existsSync(dir)) return [];
|
|
12255
|
+
return fs.readdirSync(dir).filter((f) => f.endsWith(".json")).map((f) => {
|
|
12256
|
+
return readOrgFile(f.replace(".json", ""))?.org;
|
|
12257
|
+
}).filter((o) => o != null);
|
|
12258
|
+
} catch {
|
|
12259
|
+
return [];
|
|
12260
|
+
}
|
|
12261
|
+
}
|
|
12262
|
+
function addMember(orgId, member) {
|
|
12263
|
+
const data = readOrgFile(orgId);
|
|
12264
|
+
if (!data) return null;
|
|
12265
|
+
const newMember = {
|
|
12266
|
+
...member,
|
|
12267
|
+
id: crypto.randomUUID(),
|
|
12268
|
+
joinedAt: Date.now(),
|
|
12269
|
+
lastActiveAt: Date.now(),
|
|
12270
|
+
permissions: DEFAULT_ROLE_PERMISSIONS[member.role]
|
|
12271
|
+
};
|
|
12272
|
+
data.members.push(newMember);
|
|
12273
|
+
data.org.updatedAt = Date.now();
|
|
12274
|
+
writeOrgFile(orgId, data);
|
|
12275
|
+
log$3.info(`added member ${newMember.displayName} to org ${orgId}`);
|
|
12276
|
+
return newMember;
|
|
12277
|
+
}
|
|
12278
|
+
function removeMember(orgId, memberId) {
|
|
12279
|
+
const data = readOrgFile(orgId);
|
|
12280
|
+
if (!data) return false;
|
|
12281
|
+
const idx = data.members.findIndex((m) => m.id === memberId);
|
|
12282
|
+
if (idx === -1) return false;
|
|
12283
|
+
data.members.splice(idx, 1);
|
|
12284
|
+
data.org.updatedAt = Date.now();
|
|
12285
|
+
writeOrgFile(orgId, data);
|
|
12286
|
+
log$3.info(`removed member ${memberId} from org ${orgId}`);
|
|
12287
|
+
return true;
|
|
12288
|
+
}
|
|
12289
|
+
function updateMember(orgId, memberId, updates) {
|
|
12290
|
+
const data = readOrgFile(orgId);
|
|
12291
|
+
if (!data) return null;
|
|
12292
|
+
const member = data.members.find((m) => m.id === memberId);
|
|
12293
|
+
if (!member) return null;
|
|
12294
|
+
if (updates.displayName) member.displayName = updates.displayName;
|
|
12295
|
+
if (updates.role) {
|
|
12296
|
+
member.role = updates.role;
|
|
12297
|
+
member.permissions = {
|
|
12298
|
+
...DEFAULT_ROLE_PERMISSIONS[updates.role],
|
|
12299
|
+
...updates.permissions
|
|
12300
|
+
};
|
|
12301
|
+
}
|
|
12302
|
+
if (updates.description !== void 0) member.description = updates.description;
|
|
12303
|
+
if (updates.specializations) member.specializations = updates.specializations;
|
|
12304
|
+
if (updates.status) member.status = updates.status;
|
|
12305
|
+
if (updates.reportsTo !== void 0) member.reportsTo = updates.reportsTo;
|
|
12306
|
+
if (updates.permissions && !updates.role) member.permissions = {
|
|
12307
|
+
...member.permissions,
|
|
12308
|
+
...updates.permissions
|
|
12309
|
+
};
|
|
12310
|
+
member.lastActiveAt = Date.now();
|
|
12311
|
+
data.org.updatedAt = Date.now();
|
|
12312
|
+
writeOrgFile(orgId, data);
|
|
12313
|
+
return member;
|
|
12314
|
+
}
|
|
12315
|
+
function getMembers(orgId) {
|
|
12316
|
+
return readOrgFile(orgId)?.members ?? [];
|
|
12317
|
+
}
|
|
12318
|
+
function buildHierarchy(orgId) {
|
|
12319
|
+
const members = getMembers(orgId);
|
|
12320
|
+
if (members.length === 0) return [];
|
|
12321
|
+
const memberMap = new Map(members.map((m) => [m.id, m]));
|
|
12322
|
+
function buildNode(member) {
|
|
12323
|
+
const children = members.filter((m) => m.reportsTo === member.id).map((m) => buildNode(m));
|
|
12324
|
+
return {
|
|
12325
|
+
memberId: member.id,
|
|
12326
|
+
displayName: member.displayName,
|
|
12327
|
+
kind: member.kind,
|
|
12328
|
+
role: member.role,
|
|
12329
|
+
specializations: member.specializations,
|
|
12330
|
+
status: member.status,
|
|
12331
|
+
children
|
|
12332
|
+
};
|
|
12333
|
+
}
|
|
12334
|
+
return members.filter((m) => !m.reportsTo || !memberMap.has(m.reportsTo)).map((r) => buildNode(r));
|
|
12335
|
+
}
|
|
12336
|
+
|
|
12337
|
+
//#endregion
|
|
12338
|
+
//#region src/gateway/server-methods/org.ts
|
|
12339
|
+
function invalid(message) {
|
|
12340
|
+
return errorShape(ErrorCodes.INVALID_REQUEST, message);
|
|
12341
|
+
}
|
|
12342
|
+
function requireString(params, key) {
|
|
12343
|
+
const val = params[key];
|
|
12344
|
+
return typeof val === "string" ? val.trim() || null : null;
|
|
12345
|
+
}
|
|
12346
|
+
const orgHandlers = {
|
|
12347
|
+
"org.list": async ({ respond }) => {
|
|
12348
|
+
try {
|
|
12349
|
+
respond(true, { orgs: listOrganizations() }, void 0);
|
|
12350
|
+
} catch (error) {
|
|
12351
|
+
respond(false, void 0, errorShape(ErrorCodes.UNAVAILABLE, String(error)));
|
|
12352
|
+
}
|
|
12353
|
+
},
|
|
12354
|
+
"org.get": async ({ params, respond }) => {
|
|
12355
|
+
const orgId = requireString(params, "orgId");
|
|
12356
|
+
if (!orgId) {
|
|
12357
|
+
respond(false, void 0, invalid("orgId is required"));
|
|
12358
|
+
return;
|
|
12359
|
+
}
|
|
12360
|
+
try {
|
|
12361
|
+
const org = getOrganization(orgId);
|
|
12362
|
+
if (!org) {
|
|
12363
|
+
respond(false, void 0, invalid("Organization not found"));
|
|
12364
|
+
return;
|
|
12365
|
+
}
|
|
12366
|
+
respond(true, {
|
|
12367
|
+
org,
|
|
12368
|
+
members: getMembers(orgId)
|
|
12369
|
+
}, void 0);
|
|
12370
|
+
} catch (error) {
|
|
12371
|
+
respond(false, void 0, errorShape(ErrorCodes.UNAVAILABLE, String(error)));
|
|
12372
|
+
}
|
|
12373
|
+
},
|
|
12374
|
+
"org.create": async ({ params, respond }) => {
|
|
12375
|
+
const name = requireString(params, "name");
|
|
12376
|
+
const description = requireString(params, "description") ?? "";
|
|
12377
|
+
const ownerId = requireString(params, "ownerId");
|
|
12378
|
+
const ownerName = requireString(params, "ownerName");
|
|
12379
|
+
const ownerKind = requireString(params, "ownerKind");
|
|
12380
|
+
if (!name) {
|
|
12381
|
+
respond(false, void 0, invalid("name is required"));
|
|
12382
|
+
return;
|
|
12383
|
+
}
|
|
12384
|
+
if (!ownerId) {
|
|
12385
|
+
respond(false, void 0, invalid("ownerId is required"));
|
|
12386
|
+
return;
|
|
12387
|
+
}
|
|
12388
|
+
if (!ownerName) {
|
|
12389
|
+
respond(false, void 0, invalid("ownerName is required"));
|
|
12390
|
+
return;
|
|
12391
|
+
}
|
|
12392
|
+
if (!ownerKind || ownerKind !== "human" && ownerKind !== "agent") {
|
|
12393
|
+
respond(false, void 0, invalid("ownerKind must be \"human\" or \"agent\""));
|
|
12394
|
+
return;
|
|
12395
|
+
}
|
|
12396
|
+
const settings = params.settings && typeof params.settings === "object" && !Array.isArray(params.settings) ? params.settings : void 0;
|
|
12397
|
+
try {
|
|
12398
|
+
const org = createOrganization(name, description, ownerId, ownerName, ownerKind, settings);
|
|
12399
|
+
respond(true, {
|
|
12400
|
+
org,
|
|
12401
|
+
members: getMembers(org.id)
|
|
12402
|
+
}, void 0);
|
|
12403
|
+
} catch (error) {
|
|
12404
|
+
respond(false, void 0, errorShape(ErrorCodes.UNAVAILABLE, String(error)));
|
|
12405
|
+
}
|
|
12406
|
+
},
|
|
12407
|
+
"org.update": async ({ params, respond }) => {
|
|
12408
|
+
const orgId = requireString(params, "orgId");
|
|
12409
|
+
if (!orgId) {
|
|
12410
|
+
respond(false, void 0, invalid("orgId is required"));
|
|
12411
|
+
return;
|
|
12412
|
+
}
|
|
12413
|
+
const updates = {};
|
|
12414
|
+
const name = requireString(params, "name");
|
|
12415
|
+
if (name) updates.name = name;
|
|
12416
|
+
const description = requireString(params, "description");
|
|
12417
|
+
if (description) updates.description = description;
|
|
12418
|
+
if (params.settings && typeof params.settings === "object" && !Array.isArray(params.settings)) updates.settings = params.settings;
|
|
12419
|
+
try {
|
|
12420
|
+
const org = updateOrganization(orgId, updates);
|
|
12421
|
+
if (!org) {
|
|
12422
|
+
respond(false, void 0, invalid("Organization not found"));
|
|
12423
|
+
return;
|
|
12424
|
+
}
|
|
12425
|
+
respond(true, { org }, void 0);
|
|
12426
|
+
} catch (error) {
|
|
12427
|
+
respond(false, void 0, errorShape(ErrorCodes.UNAVAILABLE, String(error)));
|
|
12428
|
+
}
|
|
12429
|
+
},
|
|
12430
|
+
"org.addMember": async ({ params, respond }) => {
|
|
12431
|
+
const orgId = requireString(params, "orgId");
|
|
12432
|
+
if (!orgId) {
|
|
12433
|
+
respond(false, void 0, invalid("orgId is required"));
|
|
12434
|
+
return;
|
|
12435
|
+
}
|
|
12436
|
+
const displayName = requireString(params, "displayName");
|
|
12437
|
+
if (!displayName) {
|
|
12438
|
+
respond(false, void 0, invalid("displayName is required"));
|
|
12439
|
+
return;
|
|
12440
|
+
}
|
|
12441
|
+
const kind = requireString(params, "kind");
|
|
12442
|
+
if (!kind || kind !== "human" && kind !== "agent") {
|
|
12443
|
+
respond(false, void 0, invalid("kind must be \"human\" or \"agent\""));
|
|
12444
|
+
return;
|
|
12445
|
+
}
|
|
12446
|
+
const role = requireString(params, "role") ?? "worker";
|
|
12447
|
+
const description = requireString(params, "description") ?? "";
|
|
12448
|
+
const specializations = Array.isArray(params.specializations) ? params.specializations : [];
|
|
12449
|
+
const status = requireString(params, "status") ?? "active";
|
|
12450
|
+
const reportsTo = requireString(params, "reportsTo") ?? void 0;
|
|
12451
|
+
try {
|
|
12452
|
+
const member = addMember(orgId, {
|
|
12453
|
+
kind,
|
|
12454
|
+
displayName,
|
|
12455
|
+
role,
|
|
12456
|
+
description,
|
|
12457
|
+
specializations,
|
|
12458
|
+
status,
|
|
12459
|
+
reportsTo
|
|
12460
|
+
});
|
|
12461
|
+
if (!member) {
|
|
12462
|
+
respond(false, void 0, invalid("Organization not found"));
|
|
12463
|
+
return;
|
|
12464
|
+
}
|
|
12465
|
+
respond(true, { member }, void 0);
|
|
12466
|
+
} catch (error) {
|
|
12467
|
+
respond(false, void 0, errorShape(ErrorCodes.UNAVAILABLE, String(error)));
|
|
12468
|
+
}
|
|
12469
|
+
},
|
|
12470
|
+
"org.updateMember": async ({ params, respond }) => {
|
|
12471
|
+
const orgId = requireString(params, "orgId");
|
|
12472
|
+
const memberId = requireString(params, "memberId");
|
|
12473
|
+
if (!orgId) {
|
|
12474
|
+
respond(false, void 0, invalid("orgId is required"));
|
|
12475
|
+
return;
|
|
12476
|
+
}
|
|
12477
|
+
if (!memberId) {
|
|
12478
|
+
respond(false, void 0, invalid("memberId is required"));
|
|
12479
|
+
return;
|
|
12480
|
+
}
|
|
12481
|
+
const updates = {};
|
|
12482
|
+
const displayName = requireString(params, "displayName");
|
|
12483
|
+
if (displayName) updates.displayName = displayName;
|
|
12484
|
+
const role = requireString(params, "role");
|
|
12485
|
+
if (role) updates.role = role;
|
|
12486
|
+
const description = params.description;
|
|
12487
|
+
if (typeof description === "string") updates.description = description;
|
|
12488
|
+
if (Array.isArray(params.specializations)) updates.specializations = params.specializations;
|
|
12489
|
+
const status = requireString(params, "status");
|
|
12490
|
+
if (status) updates.status = status;
|
|
12491
|
+
if (params.reportsTo !== void 0) updates.reportsTo = typeof params.reportsTo === "string" ? params.reportsTo : void 0;
|
|
12492
|
+
try {
|
|
12493
|
+
const member = updateMember(orgId, memberId, updates);
|
|
12494
|
+
if (!member) {
|
|
12495
|
+
respond(false, void 0, invalid("Member not found"));
|
|
12496
|
+
return;
|
|
12497
|
+
}
|
|
12498
|
+
respond(true, { member }, void 0);
|
|
12499
|
+
} catch (error) {
|
|
12500
|
+
respond(false, void 0, errorShape(ErrorCodes.UNAVAILABLE, String(error)));
|
|
12501
|
+
}
|
|
12502
|
+
},
|
|
12503
|
+
"org.removeMember": async ({ params, respond }) => {
|
|
12504
|
+
const orgId = requireString(params, "orgId");
|
|
12505
|
+
const memberId = requireString(params, "memberId");
|
|
12506
|
+
if (!orgId) {
|
|
12507
|
+
respond(false, void 0, invalid("orgId is required"));
|
|
12508
|
+
return;
|
|
12509
|
+
}
|
|
12510
|
+
if (!memberId) {
|
|
12511
|
+
respond(false, void 0, invalid("memberId is required"));
|
|
12512
|
+
return;
|
|
12513
|
+
}
|
|
12514
|
+
try {
|
|
12515
|
+
if (!removeMember(orgId, memberId)) {
|
|
12516
|
+
respond(false, void 0, invalid("Member not found"));
|
|
12517
|
+
return;
|
|
12518
|
+
}
|
|
12519
|
+
respond(true, { ok: true }, void 0);
|
|
12520
|
+
} catch (error) {
|
|
12521
|
+
respond(false, void 0, errorShape(ErrorCodes.UNAVAILABLE, String(error)));
|
|
12522
|
+
}
|
|
12523
|
+
},
|
|
12524
|
+
"org.hierarchy": async ({ params, respond }) => {
|
|
12525
|
+
const orgId = requireString(params, "orgId");
|
|
12526
|
+
if (!orgId) {
|
|
12527
|
+
respond(false, void 0, invalid("orgId is required"));
|
|
12528
|
+
return;
|
|
12529
|
+
}
|
|
12530
|
+
try {
|
|
12531
|
+
if (!getOrganization(orgId)) {
|
|
12532
|
+
respond(false, void 0, invalid("Organization not found"));
|
|
12533
|
+
return;
|
|
12534
|
+
}
|
|
12535
|
+
respond(true, { hierarchy: buildHierarchy(orgId) }, void 0);
|
|
12536
|
+
} catch (error) {
|
|
12537
|
+
respond(false, void 0, errorShape(ErrorCodes.UNAVAILABLE, String(error)));
|
|
12538
|
+
}
|
|
12539
|
+
}
|
|
12540
|
+
};
|
|
12541
|
+
|
|
11453
12542
|
//#endregion
|
|
11454
12543
|
//#region src/gateway/server-methods/providers.ts
|
|
11455
12544
|
function isValidProviderArray(value) {
|
|
@@ -12833,7 +13922,7 @@ const usageHandlers = {
|
|
|
12833
13922
|
const resolved = resolveSessionUsageFileOrRespond(key, respond);
|
|
12834
13923
|
if (!resolved) return;
|
|
12835
13924
|
const { config, entry, agentId, sessionId, sessionFile } = resolved;
|
|
12836
|
-
const { loadSessionLogs } = await import("./session-cost-usage-
|
|
13925
|
+
const { loadSessionLogs } = await import("./session-cost-usage-BWqR-ik6.js").then((n) => n.a);
|
|
12837
13926
|
respond(true, { logs: await loadSessionLogs({
|
|
12838
13927
|
sessionId,
|
|
12839
13928
|
sessionEntry: entry,
|
|
@@ -13361,6 +14450,7 @@ const coreGatewayHandlers = {
|
|
|
13361
14450
|
...systemHandlers,
|
|
13362
14451
|
...updateHandlers,
|
|
13363
14452
|
...nodeHandlers,
|
|
14453
|
+
...orgHandlers,
|
|
13364
14454
|
...sendHandlers,
|
|
13365
14455
|
...usageHandlers,
|
|
13366
14456
|
...agentHandlers,
|
|
@@ -14306,7 +15396,7 @@ function normalizeAgentPayload(payload) {
|
|
|
14306
15396
|
async function startBrowserControlServerIfEnabled() {
|
|
14307
15397
|
if (isTruthyEnvValue(process.env.ANIMA_SKIP_BROWSER_CONTROL_SERVER)) return null;
|
|
14308
15398
|
const override = process.env.ANIMA_BROWSER_CONTROL_MODULE?.trim();
|
|
14309
|
-
const mod = override ? await import(override) : await import("./control-service-
|
|
15399
|
+
const mod = override ? await import(override) : await import("./control-service-5YtMvm7D.js").then((n) => n.t);
|
|
14310
15400
|
const start = typeof mod.startBrowserControlServiceFromConfig === "function" ? mod.startBrowserControlServiceFromConfig : mod.startBrowserControlServerFromConfig;
|
|
14311
15401
|
const stop = typeof mod.stopBrowserControlService === "function" ? mod.stopBrowserControlService : mod.stopBrowserControlServer;
|
|
14312
15402
|
if (!start) return null;
|
|
@@ -17976,7 +19066,7 @@ async function startGatewaySidecars(params) {
|
|
|
17976
19066
|
params.log.warn(`ANIMA Gateway plugin services failed to start: ${String(err)}`);
|
|
17977
19067
|
}
|
|
17978
19068
|
try {
|
|
17979
|
-
const { syncConfig } = await import("./config-sync-
|
|
19069
|
+
const { syncConfig } = await import("./config-sync-CCVp-tVX.js");
|
|
17980
19070
|
const syncResult = await syncConfig();
|
|
17981
19071
|
const formatRes = (res) => `${res.added.length} added, ${res.updated.length} updated, ${res.removed.length} removed`;
|
|
17982
19072
|
if (syncResult.added.length + syncResult.updated.length + syncResult.removed.length > 0) params.log.warn(`MCP config synced: Claude (${formatRes(syncResult.claude)}); Codex (${formatRes(syncResult.codex)})`);
|
|
@@ -19342,8 +20432,8 @@ async function startGatewayServer(port = 18789, opts = {}) {
|
|
|
19342
20432
|
} : startHeartbeatRunner({ cfg: cfgAtStart });
|
|
19343
20433
|
if (!minimalTestGateway) cron.start().catch((err) => logCron.error(`failed to start: ${String(err)}`));
|
|
19344
20434
|
if (!minimalTestGateway) (async () => {
|
|
19345
|
-
const { recoverPendingDeliveries } = await import("./delivery-queue-
|
|
19346
|
-
const { deliverOutboundPayloads } = await import("./deliver-
|
|
20435
|
+
const { recoverPendingDeliveries } = await import("./delivery-queue-CExaJXRz.js").then((n) => n.n);
|
|
20436
|
+
const { deliverOutboundPayloads } = await import("./deliver-BKzX3YoN.js").then((n) => n.n);
|
|
19347
20437
|
await recoverPendingDeliveries({
|
|
19348
20438
|
deliver: deliverOutboundPayloads,
|
|
19349
20439
|
log: log.child("delivery-recovery"),
|