@noxsoft/anima 5.1.1 → 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.
Files changed (485) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/README.md +2 -2
  3. package/dist/{APEv2Parser-DV7AH14P.js → APEv2Parser-Dvsbp_2R.js} +3 -3
  4. package/dist/{AbstractID3Parser-C3RlCr-Y.js → AbstractID3Parser-IB9gxozg.js} +5 -5
  5. package/dist/{AiffParser-DaFyNU8n.js → AiffParser-R2IhrBzL.js} +4 -4
  6. package/dist/{AsfParser-CDCRfCXr.js → AsfParser-DJEueUMg.js} +4 -4
  7. package/dist/{DsdiffParser-BX31LICZ.js → DsdiffParser-DXLYn9tT.js} +4 -4
  8. package/dist/{DsfParser-C3JBjE-C.js → DsfParser-D2--NF0i.js} +5 -5
  9. package/dist/{FlacParser-DY4m-7v1.js → FlacParser-8cDAjrth.js} +5 -5
  10. package/dist/{ID3v1Parser-DL9AGlNt.js → ID3v1Parser-B494XuP9.js} +3 -3
  11. package/dist/{ID3v2Parser-Mr8o-5GJ.js → ID3v2Parser-DlxcNqv5.js} +4 -4
  12. package/dist/{ID3v2Token-DQqGh8AB.js → ID3v2Token-CSLSVrSQ.js} +2 -2
  13. package/dist/{MP4Parser-DkunlEqI.js → MP4Parser-COql2J-w.js} +6 -6
  14. package/dist/{MatroskaParser-IKjHx0h7.js → MatroskaParser-bNP5wC2F.js} +3 -3
  15. package/dist/{MpegParser-EecSeRWJ.js → MpegParser-C1gjfYqq.js} +4 -4
  16. package/dist/{MusepackParser-CkfsAeuE.js → MusepackParser-DBdYf7kV.js} +5 -5
  17. package/dist/{OggParser-z3QlSd8U.js → OggParser-CxajqbK3.js} +5 -5
  18. package/dist/{Util-DDVY6AaC.js → Util-BRZxoY1Q.js} +1 -1
  19. package/dist/{WavPackParser-PimUUBRx.js → WavPackParser-CtH9QFia.js} +4 -4
  20. package/dist/{WaveParser-B539YtoQ.js → WaveParser-yufLki1G.js} +5 -5
  21. package/dist/{accounts-CL0JV_xk.js → accounts-B_2nt5Cd.js} +2 -2
  22. package/dist/{accounts-CYEa4ttU.js → accounts-COxGcLGB.js} +1 -1
  23. package/dist/{accounts-Bj5MvaDs.js → accounts-DIES085e.js} +11 -11
  24. package/dist/{accounts-Dyb3ijJm.js → accounts-TUsfghIW.js} +5 -5
  25. package/dist/{acp-cli-ynoZZhYQ.js → acp-cli-CWgqDQQH.js} +6 -6
  26. package/dist/{acp-cli-BFAoKBvs.js → acp-cli-D0wfP8-l.js} +16 -16
  27. package/dist/{active-listener-BWPgtTZp.js → active-listener-BKtsWhsb.js} +4 -4
  28. package/dist/{active-listener-B7OcwSxK.js → active-listener-D2r8IO7g.js} +4 -4
  29. package/dist/{agent-DImD77Te.js → agent-CnS0SRpT.js} +93 -236
  30. package/dist/{agent-B8ciDTm6.js → agent-VRQM14Xp.js} +98 -229
  31. package/dist/{agent-scope-C9CiVcmh.js → agent-scope-ByIGrCTT.js} +2 -2
  32. package/dist/{agent-scope-D3HZp64M.js → agent-scope-CXxC8FFX.js} +2 -2
  33. package/dist/{agent-scope-BHR6uOLT.js → agent-scope-CxBzAozu.js} +2 -2
  34. package/dist/{agents-DvkZi7oF.js → agents-CvMRplDx.js} +15 -13
  35. package/dist/{agents.config-J7iEgdW_.js → agents.config-BR5JLtud.js} +1 -1
  36. package/dist/{anthropic-direct-runner-B12V2Q5H.js → anthropic-direct-runner-BeYCnvZ8.js} +37 -15
  37. package/dist/{anthropic-direct-runner-CzQb7QkD.js → anthropic-direct-runner-C2Kwju-r.js} +29 -7
  38. package/dist/{audit-ByHmjh-G.js → audit-B05W5ckN.js} +23 -34
  39. package/dist/{audit-HJOpXfgY.js → audit-DDz7UOIx.js} +18 -15
  40. package/dist/{auth-DXrALxdm.js → auth-DsC5pZ_0.js} +2 -2
  41. package/dist/{prompts-C9IyM74_.js → auth-choice-DY1saszS.js} +12 -107
  42. package/dist/{auth-choice-i9Z_cli_.js → auth-choice-Dc5TAJwT.js} +10 -9
  43. package/dist/{auth-health-DmrnGklu.js → auth-health-Cc8-vy8y.js} +1 -1
  44. package/dist/auth-health-Dhr8p2SD.js +149 -0
  45. package/dist/{auth-profiles-BF5x9Ej0.js → auth-profiles-Brxz2ojJ.js} +193 -42
  46. package/dist/{auth-profiles-DjCH4kWT.js → auth-profiles-C-LuhW6c.js} +195 -44
  47. package/dist/{auth-profiles-PJVsRqf4.js → auth-profiles-DKu7ZUzl.js} +189 -29
  48. package/dist/{auth-profiles-Da39zGOD.js → auth-profiles-DtWUl1-k.js} +189 -29
  49. package/dist/{auth-store-Bl6rpC4E.js → auth-store-Bd0GoqEL.js} +3 -3
  50. package/dist/{auth-store-KnWGteIV.js → auth-store-BpYI9t_y.js} +3 -3
  51. package/dist/{auth-store-DjcQlyze.js → auth-store-Jvgz2_l1.js} +2 -2
  52. package/dist/{banner-CjrhpA68.js → banner-DAMtSjUF.js} +1 -1
  53. package/dist/{bonjour-discovery-QsoaZ8Pr.js → bonjour-discovery-Co-b97Dz.js} +2 -2
  54. package/dist/build-info.json +3 -3
  55. package/dist/bundled/boot-md/handler.js +220 -149
  56. package/dist/bundled/bootstrap-extra-files/handler.js +3 -3
  57. package/dist/bundled/session-memory/handler.js +22 -22
  58. package/dist/{call-DHZ76BNg.js → call-B4lhqS6H.js} +3 -3
  59. package/dist/{call-DQjoz63V.js → call-CDPbPDAr.js} +4 -4
  60. package/dist/canvas-host/a2ui/.bundle.hash +1 -1
  61. package/dist/{catalog-AZNRamJ4.js → catalog-CsXv59Tq.js} +2 -2
  62. package/dist/{channel-web-9ikdY9RK.js → channel-web-B8mzTSaY.js} +15 -15
  63. package/dist/{channels-status-issues-DdjvFHx9.js → channels-status-issues-WkG3Tmxk.js} +4 -4
  64. package/dist/{chrome-HTuFjVWW.js → chrome-B8EnYGj1.js} +9 -9
  65. package/dist/{chrome-BNggURXT.js → chrome-BaU-H9m7.js} +3 -3
  66. package/dist/{chrome-CkSIMI7j.js → chrome-DLUBPBPz.js} +2 -2
  67. package/dist/{chunk-5llVa3wc.js → chunk-B4Kx-ocg.js} +11 -9
  68. package/dist/{chunk-Dffz_QIs.js → chunk-CFSle8n5.js} +1 -1
  69. package/dist/{chunk-D3vyM2EQ.js → chunk-Cy0Bj0F3.js} +1 -1
  70. package/dist/{chunk-DFqo_u5A.js → chunk-DJXDX69U.js} +11 -9
  71. package/dist/{clack-prompter-QbDK4ABC.js → clack-prompter-0JW5kry0.js} +3 -3
  72. package/dist/{clack-prompter-DlmPIB0y.js → clack-prompter-fZSmnHda.js} +5 -5
  73. package/dist/cli/daemon-cli.js +1 -1
  74. package/dist/{cli-d0H0Bpz9.js → cli-D8exVpuI.js} +30 -29
  75. package/dist/cli-hcHk5KuP.js +102 -0
  76. package/dist/{cli-utils-BdkJVXjy.js → cli-utils-D2X_bDLt.js} +9 -1
  77. package/dist/{cli-utils-DGnL8raH.js → cli-utils-DcDBK4C5.js} +9 -1
  78. package/dist/{client-D9E5Wwb_.js → client-BWkoTfOH.js} +3 -2
  79. package/dist/{client-DzIcZx4J.js → client-CfLiulzK.js} +2 -1
  80. package/dist/{command-registry-Dv064HDc.js → command-registry-D3VhxpWx.js} +21 -12
  81. package/dist/{commands-NIY0IDXe.js → commands-DE8FNH0v.js} +92 -20
  82. package/dist/{commands-eY0Ao0wt.js → commands-Mekaw9WG.js} +92 -20
  83. package/dist/{common-C2wAYEWA.js → common-BCW6hLGI.js} +2 -2
  84. package/dist/{common-CKoFTq83.js → common-Bf_TG87Y.js} +2 -2
  85. package/dist/{common-6Fcbzr42.js → common-DT_obM-k.js} +2 -2
  86. package/dist/{completion-cli-Blp8bILB.js → completion-cli-B3BqQJq9.js} +3 -3
  87. package/dist/{completion-cli-C-fu_7Kd.js → completion-cli-CepDzeW1.js} +2 -2
  88. package/dist/{config-Ofh9gKvs.js → config-BrVuTQ8R.js} +14 -2
  89. package/dist/{config-BfhpauV9.js → config-CweTwOtr.js} +19 -7
  90. package/dist/{config-DqwH4y-D.js → config-DaD4FsAn.js} +19 -7
  91. package/dist/{config-D2kCn7yR.js → config-ZYN8tezd.js} +18 -6
  92. package/dist/{config-cli-BFQDt_5i.js → config-cli-3CaIxSKo.js} +4 -4
  93. package/dist/config-cli-B6Np85rk.js +15 -0
  94. package/dist/{config-guard-B1plY6aQ.js → config-guard-C4b2dksv.js} +2 -2
  95. package/dist/{config-guard-CYlpjNN7.js → config-guard-CWhoBtB3.js} +20 -20
  96. package/dist/{config-sync-CDUhjDom.js → config-sync-CCVp-tVX.js} +4 -4
  97. package/dist/{config-sync-CYX9Tzyr.js → config-sync-CMO_5lyl.js} +4 -4
  98. package/dist/{configure-CJYocuSp.js → configure-D882Bg7c.js} +39 -15
  99. package/dist/{configure-DLPHJ8nv.js → configure-D88dg6mE.js} +79 -77
  100. package/dist/{configure-Bbx4y0lr.js → configure-xpjwedvJ.js} +50 -49
  101. package/dist/{configure-fHta2Meh.js → configure-zXK6UZ51.js} +49 -24
  102. package/dist/{context-CpsnZLOp.js → context-B5X720Bs.js} +1 -1
  103. package/dist/{control-service-D1oxSXVg.js → control-service-3CI4vt1h.js} +2 -2
  104. package/dist/{control-service-CzAfyR4e.js → control-service-5YtMvm7D.js} +5 -5
  105. package/dist/control-ui/assets/index-C4ejMN5U.js +72 -0
  106. package/dist/control-ui/assets/index-C4ejMN5U.js.map +1 -0
  107. package/dist/control-ui/assets/index-CcPNqN3R.css +1 -0
  108. package/dist/control-ui/assets/index-D7Bf6Say.js +3 -0
  109. package/dist/control-ui/assets/index-D7Bf6Say.js.map +1 -0
  110. package/dist/control-ui/assets/index-yhFuaOnc.js +2 -0
  111. package/dist/control-ui/assets/index-yhFuaOnc.js.map +1 -0
  112. package/dist/control-ui/assets/observers-V7q9lNYt.js +2 -0
  113. package/dist/control-ui/assets/observers-V7q9lNYt.js.map +1 -0
  114. package/dist/control-ui/assets/rrweb-plugin-console-record-sPdhR0i8.js +138 -0
  115. package/dist/control-ui/assets/rrweb-plugin-console-record-sPdhR0i8.js.map +1 -0
  116. package/dist/control-ui/assets/rrweb-record-CMVXB7aO.js +129 -0
  117. package/dist/control-ui/assets/rrweb-record-CMVXB7aO.js.map +1 -0
  118. package/dist/control-ui/index.html +2 -2
  119. package/dist/{cron-cli-C4qZZo4e.js → cron-cli-Cht6Itx6.js} +18 -18
  120. package/dist/{cron-cli-CSivg2i9.js → cron-cli-D9XrF-Gx.js} +8 -8
  121. package/dist/{daemon-cli-DfxT-pQ4.js → daemon-cli-9zrnYRjh.js} +8 -8
  122. package/dist/{daemon-cli-KMzjJH_D.js → daemon-cli-CrdPhSxr.js} +15 -15
  123. package/dist/daemon-cli.js +34 -6
  124. package/dist/{daemon-runtime-CIE27usH.js → daemon-runtime-BrUj88ZO.js} +2 -2
  125. package/dist/{daemon-runtime-BfgstLVI.js → daemon-runtime-DCqwraWR.js} +1 -1
  126. package/dist/{deliver-8r6UbXnC.js → deliver-B-dPbUIs.js} +18 -28
  127. package/dist/{deliver-ahx1N11n.js → deliver-BKzX3YoN.js} +7 -7
  128. package/dist/{deliver-DVt8TbK9.js → deliver-C1L5nO0K.js} +3 -3
  129. package/dist/{deliver-CoQP7nSu.js → deliver-d-CaN0uL.js} +18 -28
  130. package/dist/deps-DyT32VfN.js +23 -0
  131. package/dist/{diagnostics-DXeDqA_-.js → diagnostics-Cu9pZAFn.js} +1 -1
  132. package/dist/{dispatcher-DpSnqIL0.js → dispatcher-BQQugU-7.js} +1 -1
  133. package/dist/{dispatcher-DzT6jltc.js → dispatcher-DzwzLQRk.js} +2 -2
  134. package/dist/{dns-cli-D9ka2fZD.js → dns-cli-C8KIX4P3.js} +12 -12
  135. package/dist/{dns-cli-D2Orvc8E.js → dns-cli-V2bo6vSt.js} +3 -3
  136. package/dist/{docs-cli-CKfzGqYM.js → docs-cli-Bt-YV3xs.js} +2 -2
  137. package/dist/{docs-cli-DWYXJd-j.js → docs-cli-D2cVJxjP.js} +7 -7
  138. package/dist/{doctor-qayl5A-F.js → doctor-DEnSKgHu.js} +21 -21
  139. package/dist/{doctor-2O2knHXJ.js → doctor-WpKCNZeO.js} +36 -181
  140. package/dist/{doctor-completion-CaC89XwQ.js → doctor-completion-CPff9UlF.js} +2 -2
  141. package/dist/{doctor-completion-jbYrRr0H.js → doctor-completion-CypXc1Uo.js} +2 -2
  142. package/dist/{doctor-config-flow-DA50eWp5.js → doctor-config-flow-Bgl0Cc20.js} +6 -6
  143. package/dist/{doctor-config-flow-BjfGQ1Br.js → doctor-config-flow-Dxy7RIm0.js} +4 -4
  144. package/dist/{engine-CKqNpVwE.js → engine-DpbYPop7.js} +6 -6
  145. package/dist/{engine-BVchKo5_.js → engine-zmn3SOYa.js} +7 -6
  146. package/dist/entry.js +19 -28
  147. package/dist/{env-DVJCc7dM.js → env-DlTia1B4.js} +1 -1
  148. package/dist/{exec-cazBMA02.js → exec-BylR5qWS.js} +1 -1
  149. package/dist/{exec-gKbUce2p.js → exec-C6tXfeqA.js} +1 -1
  150. package/dist/{exec-CEFTijVj.js → exec-DUzVF5_D.js} +1 -1
  151. package/dist/{exec-approvals-cli-BPwW6GIK.js → exec-approvals-cli-CN2WeH7y.js} +20 -20
  152. package/dist/{exec-approvals-cli-6HndodnP.js → exec-approvals-cli-DYZVBnqS.js} +8 -8
  153. package/dist/extensionAPI.js +22 -22
  154. package/dist/format-BCAtE7cT.js +20 -0
  155. package/dist/{gateway-cli-DAPK-NMP.js → gateway-cli-B_xsx5Nv.js} +104 -101
  156. package/dist/{gateway-cli-CDg1qmsU.js → gateway-cli-D3VBOA_i.js} +69 -66
  157. package/dist/{gateway-rpc-CrSglZPE.js → gateway-rpc-Cj_h2sVM.js} +3 -3
  158. package/dist/{gateway-rpc-BtOX_e53.js → gateway-rpc-CnXMGsxp.js} +3 -3
  159. package/dist/{gmail-setup-utils-D2uUKNlF.js → gmail-setup-utils-DaJoXV_3.js} +3 -3
  160. package/dist/{health-BNasz7nv.js → health-C8KCBhuo.js} +8 -8
  161. package/dist/{health-2sA2ziYt.js → health-CabOEPQ0.js} +13 -13
  162. package/dist/{health-format-CH6JWH45.js → health-format-D-JJ5_S4.js} +2 -2
  163. package/dist/{heartbeat-visibility-B2MDtPTL.js → heartbeat-visibility-BjYY-mKG.js} +1 -1
  164. package/dist/{heartbeat-visibility-DcGQOTXe.js → heartbeat-visibility-ZfNSbFcq.js} +1 -1
  165. package/dist/{help-format-7YidDC5Z.js → help-format-Dt-I_Mls.js} +1 -1
  166. package/dist/{hooks-cli-D8SvsiGN.js → hooks-cli-Cs7GUa7G.js} +34 -33
  167. package/dist/{hooks-cli-Cwe9oz1p.js → hooks-cli-DOs9WZ3K.js} +56 -55
  168. package/dist/{hooks-status-VvwKn90L.js → hooks-status-DdweuSIj.js} +4 -4
  169. package/dist/{image-ops-BUy__GHL.js → image-ops-Ct3GueyT.js} +1 -1
  170. package/dist/index.js +79 -71
  171. package/dist/{init-B8PBeUpi.js → init-CFndGgTJ.js} +1 -1
  172. package/dist/{init-DxkAVKP0.js → init-DkBwXNme.js} +1 -1
  173. package/dist/{installs-sayrGjx1.js → installs-Bi6UipiE.js} +6 -6
  174. package/dist/{installs-BcnNDR54.js → installs-a4Vz_J08.js} +3 -3
  175. package/dist/ipv4-DfMwLQ0d.js +14 -0
  176. package/dist/{lib-D4dE4_XZ.js → lib-6xd5SQjU.js} +20 -20
  177. package/dist/{lifecycle-core-BerWWP7p.js → lifecycle-core-B8PI1NZJ.js} +3 -3
  178. package/dist/{links-OhvsEkVw.js → links-DcilUrqq.js} +1 -1
  179. package/dist/llm-slug-generator.js +23 -23
  180. package/dist/{loader-CLNb0v_s.js → loader-Bw2wdN4l.js} +159 -3
  181. package/dist/{loader-Bww_qb65.js → loader-C87TLS4J.js} +159 -3
  182. package/dist/{logging-DhXRGHWg.js → logging-Chc1Sj6N.js} +1 -1
  183. package/dist/{login-BovU8kno.js → login-BHnvW9HA.js} +6 -6
  184. package/dist/{login-BPtmlRRv.js → login-BTOKtSQN.js} +5 -5
  185. package/dist/{login-C54B66KM.js → login-CrMpAZ0n.js} +4 -4
  186. package/dist/{login-7Yj2TvMd.js → login-DKkQ3Czu.js} +5 -5
  187. package/dist/{login-qr-bim3Nkyu.js → login-qr-BGbHImRb.js} +8 -8
  188. package/dist/{login-qr-pFbvowe5.js → login-qr-CsAVGp00.js} +12 -12
  189. package/dist/{login-qr-657mh7cI.js → login-qr-DILcBA_q.js} +6 -6
  190. package/dist/{login-qr-CuwWMetN.js → login-qr-OUAGpDsU.js} +9 -9
  191. package/dist/{logs-cli-CQStwrGd.js → logs-cli-Bc6IOyHA.js} +8 -8
  192. package/dist/{logs-cli-De79vyiP.js → logs-cli-BiAJbjnq.js} +15 -15
  193. package/dist/{manager-B043uMPT.js → manager-BYu34CX3.js} +12 -12
  194. package/dist/{manager-Cvmm95Pf.js → manager-C6L_DH0O.js} +2 -2
  195. package/dist/{manager-BtrVJ8Ve.js → manager-D8VCuzru.js} +9 -9
  196. package/dist/{manager-kdmVqWxk.js → manager-b_aZwo00.js} +12 -12
  197. package/dist/{manifest-registry-D-DOtLzo.js → manifest-registry-qF960vMH.js} +1 -1
  198. package/dist/{memory-cli-COl5xoIl.js → memory-cli-B0kKl-9T.js} +7 -7
  199. package/dist/{memory-cli-691NgCXx.js → memory-cli-DLtBA6r5.js} +11 -11
  200. package/dist/{message-channel-DZYYDt1_.js → message-channel-CMsexA3K.js} +9 -7
  201. package/dist/{message-channel-DdOBO6Qm.js → message-channel-DIHHKJhk.js} +8 -6
  202. package/dist/{migrate-DkBWjPPs.js → migrate-DuohB_ur.js} +3 -3
  203. package/dist/{migrate-BLjwxe9X.js → migrate-bgeTT_GR.js} +3 -3
  204. package/dist/{model-auth-DKhjNVHc.js → model-auth-CHB3EySM.js} +10 -5
  205. package/dist/{model-auth-CxAB4iZ0.js → model-auth-KpsOXKDc.js} +3 -3
  206. package/dist/model-param-b-C1QDqzQp.js +16 -0
  207. package/dist/{model-selection-BuMFehML.js → model-selection-CLcoOT3e.js} +25 -7
  208. package/dist/{model-selection-wCaVeFbb.js → model-selection-CY6r_3wt.js} +25 -7
  209. package/dist/{model-selection-DFbDH9o2.js → model-selection-DcO3qJOu.js} +24 -6
  210. package/dist/{model-selection-BPkpXepz.js → model-selection-DjsJGv1R.js} +67 -8
  211. package/dist/models-BM2_NkMu.js +2707 -0
  212. package/dist/models-cli-BjY8wA-C.js +272 -0
  213. package/dist/models-cli-BpjeKsUz.js +2946 -0
  214. package/dist/{node-cli-Ajhng-5p.js → node-cli-BmuVEJ1C.js} +12 -12
  215. package/dist/{node-cli-t3N6HE9R.js → node-cli-DU_oREff.js} +27 -27
  216. package/dist/{node-service-4B-0AjmA.js → node-service-qZXF7T7A.js} +1 -1
  217. package/dist/{note-De2zPKl3.js → note-iMYVGjpA.js} +2 -2
  218. package/dist/noxsoft-bootstrap-C4dSx7K_.js +77 -0
  219. package/dist/noxsoft-bootstrap-CrlkSFzd.js +77 -0
  220. package/dist/{npm-registry-spec-CFp4OEe4.js → npm-registry-spec-Br4B4I_3.js} +2 -2
  221. package/dist/{npm-registry-spec-DVDcgWxm.js → npm-registry-spec-jf7Mowdn.js} +1 -1
  222. package/dist/{onboard-DJ4ON8sf.js → onboard-DM9gULJN.js} +24 -19
  223. package/dist/{onboard-DbzYS52G.js → onboard-_-D81kAy.js} +19 -15
  224. package/dist/{onboard-channels-CWMuM-3k.js → onboard-channels-CtT-RN60.js} +8 -8
  225. package/dist/{onboard-channels-Cqeff8-v.js → onboard-channels-UkphAdCy.js} +4 -4
  226. package/dist/{onboard-helpers-IeOtcIME.js → onboard-helpers-CFudIoX4.js} +3 -3
  227. package/dist/{onboard-helpers-DPqXrhma.js → onboard-helpers-CJ3HzoUO.js} +7 -7
  228. package/dist/{onboarding-SrNptVqc.js → onboarding-BB9PteK8.js} +20 -17
  229. package/dist/{onboarding-GIx1Wpw0.js → onboarding-Djmm0PEM.js} +27 -23
  230. package/dist/{orchestrator-COMX8CF2.js → orchestrator-C1nWKIJS.js} +7 -3
  231. package/dist/{orchestrator-BLXpTTgr.js → orchestrator-C2ypFiPL.js} +6 -3
  232. package/dist/{outbound-CovlPIFx.js → outbound-Bmft-5um.js} +4 -4
  233. package/dist/{outbound-Rs0fFC2g.js → outbound-C577aWZp.js} +1 -1
  234. package/dist/{outbound-DLCmFGfJ.js → outbound-DW2eod1S.js} +4 -4
  235. package/dist/{outbound-uxBpmALx.js → outbound-fPqdCDR4.js} +4 -4
  236. package/dist/outbound-send-deps-DVfWC4E8.js +14 -0
  237. package/dist/outbound-send-deps-T_FgdfgW.js +36 -0
  238. package/dist/{parse-timeout-DkOL1T_l.js → parse-timeout-C4WLf3Qy.js} +3 -3
  239. package/dist/{parse-timeout-DlU4ymhF.js → parse-timeout-D4UO8pY_.js} +1 -1
  240. package/dist/{path-env-CjpH-KWH.js → path-env-DLQPf9qj.js} +2 -2
  241. package/dist/{paths-DQMKfv60.js → paths-CAQJvbeZ.js} +2 -2
  242. package/dist/{paths-CLxC7m0Z.js → paths-Q6h5HODL.js} +1 -1
  243. package/dist/{pi-auth-json-BLdaEAx2.js → pi-auth-json-B_lKNFK6.js} +5 -5
  244. package/dist/{pi-auth-json-BH7uvkKr.js → pi-auth-json-BmdBnmlZ.js} +8 -9
  245. package/dist/{pi-auth-json-DjxzPUt3.js → pi-auth-json-DkYqdjrV.js} +2 -2
  246. package/dist/{pi-auth-json-BLCyhR5p.js → pi-auth-json-WTvcP2gz.js} +9 -8
  247. package/dist/{pi-embedded-BL-Js-lp.js → pi-embedded-BMbtgOzv.js} +852 -338
  248. package/dist/{pi-embedded-fZ1QlJ9C.js → pi-embedded-DfbM3fAT.js} +850 -336
  249. package/dist/{pi-embedded-helpers-B6wVA0hU.js → pi-embedded-helpers-BZ9GspxK.js} +1 -1
  250. package/dist/{pi-tools.policy-CDgjN_3f.js → pi-tools.policy-D2FusuQa.js} +3 -3
  251. package/dist/{pi-tools.policy-ox141hP6.js → pi-tools.policy-WdTAfqbV.js} +6 -6
  252. package/dist/{plugin-auto-enable-Mj7AnofW.js → plugin-auto-enable-CtYcdTju.js} +5 -5
  253. package/dist/{plugin-auto-enable-OqDAK-ap.js → plugin-auto-enable-DhuD30Je.js} +2 -2
  254. package/dist/{plugin-registry-DboWDOrG.js → plugin-registry-DePMxn4z.js} +4 -4
  255. package/dist/{plugin-registry-X7L3BrUu.js → plugin-registry-QTkplP4s.js} +2 -2
  256. package/dist/plugin-sdk/agents/cli-backends.d.ts +8 -2
  257. package/dist/plugin-sdk/agents/cli-credentials.d.ts +0 -10
  258. package/dist/plugin-sdk/agents/cli-runner.d.ts +2 -0
  259. package/dist/plugin-sdk/agents/defaults.d.ts +2 -2
  260. package/dist/plugin-sdk/agents/model-auto.d.ts +43 -0
  261. package/dist/plugin-sdk/agents/model-fallback.d.ts +5 -0
  262. package/dist/plugin-sdk/agents/model-preference.d.ts +25 -0
  263. package/dist/plugin-sdk/agents/noxsoft-runner.d.ts +94 -0
  264. package/dist/plugin-sdk/agents/pi-embedded-runner/run/params.d.ts +6 -3
  265. package/dist/plugin-sdk/agents/pi-embedded.d.ts +6 -50
  266. package/dist/plugin-sdk/agents/runner-capabilities.d.ts +2 -0
  267. package/dist/plugin-sdk/agents/sandbox/constants.d.ts +1 -1
  268. package/dist/plugin-sdk/auth/noxsoft-auth.d.ts +55 -0
  269. package/dist/plugin-sdk/channels/registry.d.ts +2 -2
  270. package/dist/plugin-sdk/cli/deps.d.ts +2 -1
  271. package/dist/plugin-sdk/cli/outbound-send-deps.d.ts +10 -0
  272. package/dist/plugin-sdk/commands/agent/types.d.ts +2 -0
  273. package/dist/plugin-sdk/config/types.agent-defaults.d.ts +14 -0
  274. package/dist/plugin-sdk/config/types.models.d.ts +1 -1
  275. package/dist/plugin-sdk/config/zod-schema.agent-defaults.d.ts +13 -0
  276. package/dist/plugin-sdk/config/zod-schema.agents.d.ts +13 -0
  277. package/dist/plugin-sdk/config/zod-schema.d.ts +13 -0
  278. package/dist/plugin-sdk/gateway/protocol/schema/agent.d.ts +1 -0
  279. package/dist/plugin-sdk/identity/loader.d.ts +1 -0
  280. package/dist/plugin-sdk/identity/trust-graph.d.ts +32 -0
  281. package/dist/plugin-sdk/index.js +57 -47
  282. package/dist/plugin-sdk/utils/message-channel.d.ts +2 -1
  283. package/dist/{plugins-DnJgmFJR.js → plugins-DYcg0qBW.js} +1 -1
  284. package/dist/{plugins-cli-C-PA_T5k.js → plugins-cli-Bc9oU1ld.js} +58 -57
  285. package/dist/{plugins-cli-BraLLKDO.js → plugins-cli-Dv0KQTWo.js} +36 -35
  286. package/dist/{polls-DuwPgAV7.js → polls-DFISjV7H.js} +5 -5
  287. package/dist/{ports-B1b1r9Dz.js → ports-DaVrZDUq.js} +2 -2
  288. package/dist/{ports-BX00e96t.js → ports-q535r1PZ.js} +2 -2
  289. package/dist/{program-BriwVW7P.js → program-CuwbF8YO.js} +48 -40
  290. package/dist/{program-context-oXX-h-yI.js → program-context-CxPfy-Wr.js} +51 -35
  291. package/dist/{progress-B-VBLfHr.js → progress-CVLvQV_t.js} +1 -1
  292. package/dist/{prompt-style-DU9Vjqe5.js → prompt-style-BI53UVgE.js} +1 -1
  293. package/dist/{prompts-D6b3zLVO.js → prompts-BmgT_kkv.js} +33 -2
  294. package/dist/prompts-Bq4QGFQM.js +158 -0
  295. package/dist/{pw-ai-BV57RRmp.js → pw-ai-CB-zeR7h.js} +5 -5
  296. package/dist/{pw-ai-BJfL9dGV.js → pw-ai-C_1-7IgH.js} +3 -3
  297. package/dist/{pw-ai-CTHtrCEC.js → pw-ai-DxNrJcCA.js} +3 -3
  298. package/dist/{qmd-manager-DJeQYS-r.js → qmd-manager-C_XBZ_bT.js} +5 -5
  299. package/dist/{qmd-manager-DHQgWjsV.js → qmd-manager-CpNYgSrx.js} +6 -6
  300. package/dist/{qmd-manager-Cbm03z8H.js → qmd-manager-Q0OSDQ-e.js} +5 -5
  301. package/dist/{register.agent-BO5BCkbO.js → register.agent-DFQmkIEH.js} +53 -50
  302. package/dist/{register.agent-BMKeVZeq.js → register.agent-DUjwGw9d.js} +77 -73
  303. package/dist/{register.anima-BS8nsOpD.js → register.anima-CRFHJu2J.js} +21 -21
  304. package/dist/{register.anima-DPurDgXW.js → register.anima-CtKNrpE8.js} +21 -21
  305. package/dist/{register.configure-Di8agIXW.js → register.configure-CSSN07XN.js} +50 -49
  306. package/dist/register.configure-CnEKV57N.js +107 -0
  307. package/dist/register.maintenance-CU1A-90-.js +102 -0
  308. package/dist/{register.maintenance-DjXwK16H.js → register.maintenance-fhcCB7ih.js} +48 -47
  309. package/dist/register.message-C1a0y2ZR.js +661 -0
  310. package/dist/register.message-fM0jSKB8.js +659 -0
  311. package/dist/register.onboard-B7Gavmvt.js +128 -0
  312. package/dist/{register.onboard-BkUxrYi2.js → register.onboard-BhPlqjFi.js} +50 -49
  313. package/dist/{register.setup-DyqOWQ2D.js → register.setup-0jPnMgnz.js} +96 -92
  314. package/dist/{register.setup-DEtz71o0.js → register.setup-CADdQUEN.js} +72 -69
  315. package/dist/{register.status-health-sessions-DjsEuYmp.js → register.status-health-sessions-Cu5fDT-z.js} +68 -67
  316. package/dist/{register.status-health-sessions-CXMn5NfF.js → register.status-health-sessions-DdQsABr_.js} +40 -39
  317. package/dist/{register.subclis-CMlPDwE5.js → register.subclis-CZ91ufCy.js} +28 -21
  318. package/dist/{reply-DWdVFSBB.js → reply-DtHlnzOx.js} +6658 -6191
  319. package/dist/{reply-prefix-CRGxza-M.js → reply-prefix-C8dIgJur.js} +1 -1
  320. package/dist/{reply-prefix-_gr2uQ1Z.js → reply-prefix-DmWGtcH-.js} +1 -1
  321. package/dist/{routes-ZlpnlJFF.js → routes-CWCAc8uJ.js} +2 -2
  322. package/dist/{routes-DeDgHj5Y.js → routes-FT0Us8Md.js} +6 -6
  323. package/dist/{run-GZnwhuUG.js → run-Dfz_7j7t.js} +1256 -166
  324. package/dist/{run-CXLRGLdR.js → run-DqBQ-bGn.js} +1230 -140
  325. package/dist/{run-main-Coy6Vx7R.js → run-main-DGDW0fhx.js} +51 -50
  326. package/dist/{runtime-guard-cBL2D5J8.js → runtime-guard-D14Z_QY6.js} +1 -1
  327. package/dist/{sandbox-DDOFuJU9.js → sandbox-D-N7M7lp.js} +2 -2
  328. package/dist/{sandbox-cli-GhcxR1Va.js → sandbox-cli-CQKz2I1X.js} +9 -9
  329. package/dist/{sandbox-cli-CGJvhJ4L.js → sandbox-cli-DHNFlTo-.js} +23 -23
  330. package/dist/{sandbox-B8Nza4lP.js → sandbox-pBHlfFdB.js} +6 -6
  331. package/dist/{security-cli-B7VIDDSL.js → security-cli-Bdi7MuP6.js} +14 -22
  332. package/dist/{security-cli-gsyz4Wrw.js → security-cli-C3aI09uy.js} +27 -35
  333. package/dist/{semantic-C3Z-zhNi.js → semantic-9rgWUrz3.js} +1 -1
  334. package/dist/{semantic-BZw2SVoG.js → semantic-C1UN3bb9.js} +1 -1
  335. package/dist/{semantic-DCd6zBnV.js → semantic-CQApJNO_.js} +1 -1
  336. package/dist/{server-context-Dkz4Ce8z.js → server-context-Clykq0XU.js} +1 -1
  337. package/dist/{server-context-BlJi7pjP.js → server-context-Yx4pgBqJ.js} +7 -7
  338. package/dist/{server-node-events-yZM_OBSZ.js → server-node-events-BR1aXVlu.js} +55 -53
  339. package/dist/{server-node-events-BMO931Md.js → server-node-events-Ca797E1d.js} +34 -31
  340. package/dist/{service-QlHhVsQf.js → service-Dd1DfPia.js} +1 -1
  341. package/dist/{service-audit-D4xG05j8.js → service-audit-Bwpoc2LD.js} +1 -1
  342. package/dist/{service-audit-BaoBb09i.js → service-audit-KzOtcw_V.js} +3 -3
  343. package/dist/{session-BJ9XCJBg.js → session-5YO_H-Ra.js} +1 -1
  344. package/dist/{session-CB9OL4Ml.js → session-BiA6jrcs.js} +1 -1
  345. package/dist/session-C7IGnhd1.js +190 -0
  346. package/dist/{session-KNXzWBht.js → session-CSmfU0D3.js} +1 -1
  347. package/dist/{session-CqKJvPTq.js → session-DLevr8Vd.js} +5 -5
  348. package/dist/session-DfsMJNG3.js +190 -0
  349. package/dist/{session-TAOVpONo.js → session-FmXsucR7.js} +2 -2
  350. package/dist/{session-cost-usage-BamtB1rn.js → session-cost-usage-BWqR-ik6.js} +1 -1
  351. package/dist/{sessions-C2th3rm6.js → sessions-BOzeFzuL.js} +12 -22
  352. package/dist/{sessions-1XK2mH6L.js → sessions-C_3wTmSA.js} +9 -19
  353. package/dist/{sessions-BrQHxX_o.js → sessions-Dj7_4mkr.js} +4 -4
  354. package/dist/{settings-cli-_DoMmFH9.js → settings-cli-DxNeu6kx.js} +79 -77
  355. package/dist/{settings-cli-BVBFgDUd.js → settings-cli-Dytfop1H.js} +50 -49
  356. package/dist/{setup-token-Dqtgnjxw.js → setup-token-B802CZwe.js} +13 -18
  357. package/dist/{setup-token-Bcer2kX8.js → setup-token-DYh2QzJ-.js} +29 -34
  358. package/dist/{shared-Hnu5dChj.js → shared-C-rqLtIT.js} +2 -2
  359. package/dist/{shell-env-KRrv3dPW.js → shell-env-CMI9f7-7.js} +1 -1
  360. package/dist/{shell-env-DaSbgZYX.js → shell-env-HkVWMh--.js} +1 -1
  361. package/dist/{shell-env-PnmcBTp4.js → shell-env-iPnSIi-t.js} +1 -1
  362. package/dist/{skills-CQoUYlGu.js → skills-4v6-kw0C.js} +3 -3
  363. package/dist/{skills-cli-DQuLxQUM.js → skills-cli-BoasNTpZ.js} +15 -15
  364. package/dist/{skills-cli-CNNy0FxN.js → skills-cli-TeAq3fRG.js} +3 -3
  365. package/dist/{skills-install-2DbC1Yo2.js → skills-install-D6_qpRjW.js} +7 -7
  366. package/dist/{skills-install-CE6djAWL.js → skills-install-Qw2oU8L8.js} +2 -2
  367. package/dist/{skills-status-ybjSmiHu.js → skills-status-CvH7AUoY.js} +4 -4
  368. package/dist/{soul-DFeEGG5h.js → soul-BiIdv3Wp.js} +124 -4
  369. package/dist/{soul-B7vtVbSs.js → soul-Bt8UNmTq.js} +125 -4
  370. package/dist/{soul-CwWWw7cs.js → soul-D9k5zulC.js} +2 -2
  371. package/dist/{soul-Bru-rRjk.js → soul-DQSYs-4l.js} +1 -1
  372. package/dist/{sqlite-BTcAhNls.js → sqlite-BMMt7osH.js} +2 -2
  373. package/dist/{sqlite-D_h-b5t2.js → sqlite-CZ1vD4VS.js} +2 -2
  374. package/dist/{sqlite-CLZ1eR5Q.js → sqlite-CpAJt-JS.js} +1 -1
  375. package/dist/{start-C6a18wc7.js → start-BqnPia0t.js} +66 -63
  376. package/dist/start-C3fuLzX0.js +157 -0
  377. package/dist/{status-DyD7gtoK.js → status-CHGNPonc.js} +26 -44
  378. package/dist/{status-CUyIggna.js → status-CxF6k_jr.js} +2 -2
  379. package/dist/{status-CWgHkLTE.js → status-DfZJJqNs.js} +15 -15
  380. package/dist/{status-DmsznVj5.js → status-tLgozFYL.js} +4 -4
  381. package/dist/{status.update-CbIRaeaV.js → status.update-B6Tdpk07.js} +2 -2
  382. package/dist/{status.update-CPACVnCc.js → status.update-E9dSFk_b.js} +1 -1
  383. package/dist/{subagent-registry-BVrDlKmm.js → subagent-registry-CPtElVX0.js} +834 -367
  384. package/dist/{subsystem-BMsbqSb4.js → subsystem-BAADN1B8.js} +18 -27
  385. package/dist/{subsystem-CucjNlOk.js → subsystem-D-Xta-sj.js} +17 -26
  386. package/dist/{subsystem-BP2l3SHn.js → subsystem-D1AJZPgG.js} +18 -27
  387. package/dist/{system-cli-BKicxULp.js → system-cli-CP7JrhR0.js} +15 -15
  388. package/dist/{system-cli-Unb-WFAR.js → system-cli-DoLzi2Sn.js} +8 -8
  389. package/dist/{systemd-5KGZ3NHE.js → systemd-Bx76sJ3M.js} +2 -2
  390. package/dist/{systemd-linger-B-uyzDap.js → systemd-linger-BVwGXVS0.js} +2 -2
  391. package/dist/{systemd-linger-CS_pA1-a.js → systemd-linger-CxGmIy_5.js} +1 -1
  392. package/dist/{table-CdHBo5d1.js → table-Blmz7glr.js} +2 -2
  393. package/dist/{tokens-DGhK0fpG.js → tokens-SP2Q7i59.js} +1 -1
  394. package/dist/{tool-images-CUx-9B7B.js → tool-images-2qproko3.js} +2 -2
  395. package/dist/{tool-images-Dq55i0mz.js → tool-images-C6cKHTbj.js} +2 -2
  396. package/dist/{tool-images-J0rGmoDV.js → tool-images-CgDT0Xzv.js} +2 -2
  397. package/dist/{tui-Bm8FEW0b.js → tui-C2eLfbhA.js} +5 -5
  398. package/dist/{tui-cli-BGjsxGle.js → tui-cli-BgcbCtgc.js} +12 -12
  399. package/dist/{tui-cli-TwCYv-a7.js → tui-cli-cLSYBQu9.js} +27 -27
  400. package/dist/{tui-DtGKiHUr.js → tui-r4qpJhNk.js} +10 -10
  401. package/dist/{update-Dfi92PZJ.js → update-CqKpX3cX.js} +3 -3
  402. package/dist/{update-Dle5MRUz.js → update-DA91za97.js} +1 -1
  403. package/dist/{update-cli-JPLB8AtM.js → update-cli-BuCw75tM.js} +87 -85
  404. package/dist/{update-cli-4VAEZsrR.js → update-cli-C-er5av6.js} +55 -54
  405. package/dist/{update-runner-BxdLd4Q8.js → update-runner-czCqHZCu.js} +5 -5
  406. package/dist/{update-runner-pmlbxeZ-.js → update-runner-kE8AMQt4.js} +1 -1
  407. package/dist/{utils-B60lF9Wq.js → utils-CLYlhJuc.js} +1 -1
  408. package/dist/{web-cpPr1Em8.js → web-BHGK5GtV.js} +24 -24
  409. package/dist/web-CyYunanU.js +65 -0
  410. package/dist/{web-D8EsFSet.js → web-DvTXV-fo.js} +35 -34
  411. package/dist/{web-B3O004_b.js → web-so3pGceM.js} +25 -25
  412. package/dist/{webhooks-cli-Cg0F2mU6.js → webhooks-cli-k3QMf7Rs.js} +4 -4
  413. package/dist/{webhooks-cli-BsWx7MgH.js → webhooks-cli-vlEfXEKm.js} +12 -12
  414. package/dist/{whatsapp-actions-gpz6-vPI.js → whatsapp-actions-6fPRKwPV.js} +11 -11
  415. package/dist/{whatsapp-actions-DJpQVKnT.js → whatsapp-actions-BJn-z76S.js} +17 -17
  416. package/dist/{whatsapp-actions-tWRWRZ4X.js → whatsapp-actions-C0tlEdLy.js} +5 -5
  417. package/dist/{whatsapp-actions-9PCfw-Zh.js → whatsapp-actions-Hr-W8vjY.js} +12 -12
  418. package/dist/{widearea-dns-BDtWuGCY.js → widearea-dns-CHAT20aR.js} +1 -1
  419. package/dist/{workspace-Cvio8QlZ.js → workspace-BFIZCnGo.js} +1 -1
  420. package/dist/{ws-log-Bc4grA6W.js → ws-log-CUobU2tD.js} +1 -1
  421. package/package.json +1 -1
  422. package/templates/profiles/nox.profile.json5 +5 -5
  423. package/dist/cli-PD3ygS3H.js +0 -101
  424. package/dist/config-cli-CgG6CaWK.js +0 -15
  425. package/dist/control-ui/assets/index-B7CJLRZD.css +0 -1
  426. package/dist/control-ui/assets/index-DLPYIcs0.js +0 -58
  427. package/dist/control-ui/assets/index-DLPYIcs0.js.map +0 -1
  428. package/dist/deps-CMFpRoYp.js +0 -13
  429. package/dist/models-2GYW4-6h.js +0 -1350
  430. package/dist/register.configure-Dvg0Vi23.js +0 -105
  431. package/dist/register.maintenance-CKE15LXK.js +0 -100
  432. package/dist/register.onboard-Du-u1lcX.js +0 -126
  433. package/dist/start-C0Uw_pIA.js +0 -154
  434. package/dist/web-B9-C6C1i.js +0 -64
  435. /package/dist/{BasicParser-BiEpjka-.js → BasicParser-D4BHCxVb.js} +0 -0
  436. /package/dist/{agents.config-DibGEnBs.js → agents.config-Br4ULmK0.js} +0 -0
  437. /package/dist/{archive-BIKRyvqD.js → archive-CNqghdwQ.js} +0 -0
  438. /package/dist/{archive-5e-Ytlq-.js → archive-D-dHRz-v.js} +0 -0
  439. /package/dist/{argv-B6vsXQtF.js → argv-nNQ109_K.js} +0 -0
  440. /package/dist/{auth-store-Vfd6oc1G.js → auth-store-BEfSfCbW.js} +0 -0
  441. /package/dist/{auto-update-BUbllW1X.js → auto-update-Cvd8YJrT.js} +0 -0
  442. /package/dist/{auto-update-DdH8fo63.js → auto-update-DO4nHkfM.js} +0 -0
  443. /package/dist/{brew-Bkf_MwX9.js → brew-DHWnVWm3.js} +0 -0
  444. /package/dist/{budget-CV0a771W.js → budget-DvjICb0t.js} +0 -0
  445. /package/dist/{budget-GiXjG9eW.js → budget-e0R5xsU3.js} +0 -0
  446. /package/dist/{command-options-DfPEZwUK.js → command-options-DtJ8-EC7.js} +0 -0
  447. /package/dist/{command-options-mgpP-XId.js → command-options-eC-m_qJx.js} +0 -0
  448. /package/dist/{delivery-queue-DGnDKL02.js → delivery-queue-BKQk1j0k.js} +0 -0
  449. /package/dist/{delivery-queue-DZ_ibFDu.js → delivery-queue-CExaJXRz.js} +0 -0
  450. /package/dist/{display-BwSYYxVE.js → display-4p3-O9mP.js} +0 -0
  451. /package/dist/{display-Dck2kudh.js → display-Bo8pBhMp.js} +0 -0
  452. /package/dist/{exec-approvals-BJikgQkX.js → exec-approvals-DK5-KCUz.js} +0 -0
  453. /package/dist/{format-wiLVr0D3.js → format-9DMvWYUJ.js} +0 -0
  454. /package/dist/{format-duration-C5oKCGwB.js → format-duration-CnGkTPRF.js} +0 -0
  455. /package/dist/{gmail-setup-utils-CR33Gqfc.js → gmail-setup-utils-BIXtKTpT.js} +0 -0
  456. /package/dist/{help-format-DJx5Rwy2.js → help-format-ZKxl6UCb.js} +0 -0
  457. /package/dist/{helpers-8O7IVGO-.js → helpers-CWQnEONe.js} +0 -0
  458. /package/dist/{hooks-status-DiqubDlK.js → hooks-status-DqfJDvYl.js} +0 -0
  459. /package/dist/{ipv4-BYbwrpG-.js → ipv4-CExV55ho.js} +0 -0
  460. /package/dist/{is-main-BnikY3ud.js → is-main-H-hpHkdq.js} +0 -0
  461. /package/dist/{lib-D1DXSMt_.js → lib-D0_kW-B6.js} +0 -0
  462. /package/dist/{links-3c7gzW-G.js → links-BjjDMNIq.js} +0 -0
  463. /package/dist/{logging-Bpf6Cepz.js → logging-DWwOqnTW.js} +0 -0
  464. /package/dist/{logging-DcXIbpwk.js → logging-_rCcBkls.js} +0 -0
  465. /package/dist/{model-param-b-BcBBSgiD.js → model-param-b-2KmFir_0.js} +0 -0
  466. /package/dist/{node-service-BDlDNv3t.js → node-service-cOoW5hLa.js} +0 -0
  467. /package/dist/{note-BaOKDvcy.js → note-CeLGcHqv.js} +0 -0
  468. /package/dist/{noxsoft-auth-Bmict45b.js → noxsoft-auth-CE75mBXE.js} +0 -0
  469. /package/dist/{noxsoft-auth-DpwLJIW0.js → noxsoft-auth-CgCk5707.js} +0 -0
  470. /package/dist/{pi-model-discovery-ClWISQ3j.js → pi-model-discovery-Bu4Zr7nI.js} +0 -0
  471. /package/dist/{ports-aNJUI3Mi.js → ports-BGLuwt2Z.js} +0 -0
  472. /package/dist/{progress-Dj2aBWOI.js → progress-glCgu57m.js} +0 -0
  473. /package/dist/{qmd-manager-DrDX4o7e.js → qmd-manager-CO795NK4.js} +0 -0
  474. /package/dist/{queue-B77yV52t.js → queue-DDq0uzy5.js} +0 -0
  475. /package/dist/{queue-wFYwitx0.js → queue-DtQ5sbyD.js} +0 -0
  476. /package/dist/{registry-gaRST__4.js → registry-BvymIcVf.js} +0 -0
  477. /package/dist/{registry-Cv8RtADU.js → registry-DwaHkd_j.js} +0 -0
  478. /package/dist/{requirements-CEowKaVY.js → requirements-Ct4XnMiK.js} +0 -0
  479. /package/dist/{skill-scanner-DGoUYV22.js → skill-scanner-5_Y3u6SU.js} +0 -0
  480. /package/dist/{skill-scanner-FO7SyxAD.js → skill-scanner-Dld2ijVw.js} +0 -0
  481. /package/dist/{templates-D-h5PNIK.js → templates-4_And8I_.js} +0 -0
  482. /package/dist/{templates-ndPXOyGA.js → templates-5Z-UIDze.js} +0 -0
  483. /package/dist/{types-DSS9sywz.js → types-BQk_oAin.js} +0 -0
  484. /package/dist/{usage-format-BtlQ-77V.js → usage-format-BSa7cHyK.js} +0 -0
  485. /package/dist/{ws-log-BA9w1cJs.js → ws-log-CG6cvCZW.js} +0 -0
@@ -1,1350 +0,0 @@
1
- import { B as CONFIG_PATH, M as isRich$1, N as theme, j as colorize, o as createSubsystemLogger } from "./entry.js";
2
- import { S as resolveAuthProfileDisplayLabel, i as resolveProfileUnusableUntilForDisplay, l as ensureAuthProfileStore, m as resolveAuthStorePathForDisplay, n as resolveAuthProfileOrder, s as listProfilesForProvider } from "./auth-profiles-BF5x9Ej0.js";
3
- import { t as formatCliCommand } from "./command-format-kLw3YIIu.js";
4
- import { S as shortenHomePath } from "./utils-D1VGbO3C.js";
5
- import "./exec-BtBJICHE.js";
6
- import { a as resolveAgentModelPrimary, c as resolveDefaultAgentId, i as resolveAgentModelFallbacksOverride, r as resolveAgentDir, s as resolveAgentWorkspaceDir, w as resolveDefaultAgentWorkspaceDir } from "./agent-scope-Dm8IL1Ks.js";
7
- import { _ as DEFAULT_MODEL, c as normalizeProviderId, d as resolveConfiguredModelRef, f as resolveDefaultModelForAgent, g as DEFAULT_CONTEXT_TOKENS, l as parseModelRef, m as resolveModelRefFromString, o as modelKey, r as buildModelAliasIndex, v as DEFAULT_PROVIDER } from "./model-selection-DFbDH9o2.js";
8
- import "./file-lock-CxXn285m.js";
9
- import { t as resolveAnimaAgentDir } from "./agent-paths-niQrLbGc.js";
10
- import { n as discoverModels, t as discoverAuthStorage } from "./pi-model-discovery-BZryRo8-.js";
11
- import "./skills-DtoVe1dS.js";
12
- import "./manifest-registry-W_OfCIRP.js";
13
- import { i as loadConfig } from "./config-Ofh9gKvs.js";
14
- import { o as shouldEnableShellEnvFallback, t as getShellEnvAppliedKeys } from "./shell-env-2QqHvBMl.js";
15
- import "./client-DzIcZx4J.js";
16
- import "./call-DHZ76BNg.js";
17
- import "./message-channel-DdOBO6Qm.js";
18
- import { Kt as loadProviderUsageSummary, Qt as resolveUsageProviderId, Rn as loadModelCatalog, Zt as formatUsageWindowSummary, c as runEmbeddedPiAgent, wr as describeFailoverError } from "./subagent-registry-BVrDlKmm.js";
19
- import "./sessions-1XK2mH6L.js";
20
- import "./tokens-CmlI2hSz.js";
21
- import { Z as resolveModel } from "./anthropic-direct-runner-CzQb7QkD.js";
22
- import "./pi-embedded-helpers-D2SLlgS4.js";
23
- import "./sandbox-DDOFuJU9.js";
24
- import "./chrome-CmxIwwsr.js";
25
- import "./auth-Cp__MMeO.js";
26
- import "./server-context-Dkz4Ce8z.js";
27
- import "./routes-ZlpnlJFF.js";
28
- import "./image-ops-BdrMmiG4.js";
29
- import "./ports-B_f42zcA.js";
30
- import "./plugins-BOMS6J5A.js";
31
- import { i as resolveSessionTranscriptPath, s as resolveSessionTranscriptsDirForAgent } from "./paths-DMk3Q7yD.js";
32
- import "./tool-images-D1HuaGdS.js";
33
- import { a as resolveAwsSdkEnvVarName, n as getCustomProviderApiKey, o as resolveEnvApiKey } from "./model-auth-CxAB4iZ0.js";
34
- import "./deliver-DVt8TbK9.js";
35
- import "./memory-cli-COl5xoIl.js";
36
- import "./manager-Cvmm95Pf.js";
37
- import "./sqlite-Cm6OqTQB.js";
38
- import "./redact-C_niMCEt.js";
39
- import "./session-BP3NrBgu.js";
40
- import "./semantic-DnQUajHa.js";
41
- import "./loader-Bww_qb65.js";
42
- import "./soul-Bru-rRjk.js";
43
- import "./common-CqIa2poH.js";
44
- import "./chunk-D3vyM2EQ.js";
45
- import "./parse-timeout-DlU4ymhF.js";
46
- import "./active-listener-gGCoq55D.js";
47
- import { n as ensureAnimaModelsJson } from "./context-CpsnZLOp.js";
48
- import "./pi-tools.policy-CDgjN_3f.js";
49
- import "./session-cost-usage-DnxtnK1E.js";
50
- import "./control-service-D1oxSXVg.js";
51
- import "./dispatcher-DpSnqIL0.js";
52
- import "./delivery-queue-DGnDKL02.js";
53
- import "./links-3c7gzW-G.js";
54
- import { r as withProgressTotals } from "./progress-Dj2aBWOI.js";
55
- import "./logging-Bpf6Cepz.js";
56
- import "./auth-store-Vfd6oc1G.js";
57
- import "./onboard-helpers-IeOtcIME.js";
58
- import "./prompt-style-D6SRiiTV.js";
59
- import { t as renderTable } from "./table-Bt7rSYC6.js";
60
- import { a as isLocalBaseUrl, i as formatTokenK, n as ensureFlagCompatibility, o as resolveKnownAgentId, r as formatMs } from "./prompts-D6b3zLVO.js";
61
- import "./logging-DcXIbpwk.js";
62
- import "./note-BaOKDvcy.js";
63
- import { n as redactSecrets } from "./format-wiLVr0D3.js";
64
- import "./clack-prompter-QbDK4ABC.js";
65
- import { n as buildAuthHealthSummary, r as formatRemainingShort, t as DEFAULT_OAUTH_WARN_MS } from "./auth-health-DmrnGklu.js";
66
- import path from "node:path";
67
- import fs from "node:fs/promises";
68
- import crypto from "node:crypto";
69
- import { complete, getEnvApiKey } from "@mariozechner/pi-ai";
70
- import { Type } from "@sinclair/typebox";
71
- import { cancel, confirm, isCancel, multiselect, select, text } from "@clack/prompts";
72
-
73
- //#region src/plugins/providers.ts
74
- const log = createSubsystemLogger("plugins");
75
-
76
- //#endregion
77
- //#region src/agents/model-compat.ts
78
- function isOpenAiCompletionsModel(model) {
79
- return model.api === "openai-completions";
80
- }
81
- function normalizeModelCompat(model) {
82
- const baseUrl = model.baseUrl ?? "";
83
- if (!(model.provider === "zai" || baseUrl.includes("api.z.ai")) || !isOpenAiCompletionsModel(model)) return model;
84
- const openaiModel = model;
85
- const compat = openaiModel.compat ?? void 0;
86
- if (compat?.supportsDeveloperRole === false) return model;
87
- openaiModel.compat = compat ? {
88
- ...compat,
89
- supportsDeveloperRole: false
90
- } : { supportsDeveloperRole: false };
91
- return openaiModel;
92
- }
93
-
94
- //#endregion
95
- //#region src/agents/model-forward-compat.ts
96
- const OPENAI_CODEX_GPT_53_MODEL_ID = "gpt-5.3-codex";
97
- const OPENAI_CODEX_TEMPLATE_MODEL_IDS = ["gpt-5.2-codex"];
98
- const ANTHROPIC_OPUS_46_MODEL_ID = "claude-opus-4-6";
99
- const ANTHROPIC_OPUS_46_DOT_MODEL_ID = "claude-opus-4.6";
100
- const ANTHROPIC_OPUS_TEMPLATE_MODEL_IDS = ["claude-opus-4-5", "claude-opus-4.5"];
101
- const ZAI_GLM5_MODEL_ID = "glm-5";
102
- const ZAI_GLM5_TEMPLATE_MODEL_IDS = ["glm-4.7"];
103
- const ANTIGRAVITY_OPUS_46_MODEL_ID = "claude-opus-4-6";
104
- const ANTIGRAVITY_OPUS_46_DOT_MODEL_ID = "claude-opus-4.6";
105
- const ANTIGRAVITY_OPUS_TEMPLATE_MODEL_IDS = ["claude-opus-4-5", "claude-opus-4.5"];
106
- const ANTIGRAVITY_OPUS_46_THINKING_MODEL_ID = "claude-opus-4-6-thinking";
107
- const ANTIGRAVITY_OPUS_46_DOT_THINKING_MODEL_ID = "claude-opus-4.6-thinking";
108
- const ANTIGRAVITY_OPUS_THINKING_TEMPLATE_MODEL_IDS = ["claude-opus-4-5-thinking", "claude-opus-4.5-thinking"];
109
- const ANTIGRAVITY_OPUS_46_FORWARD_COMPAT_CANDIDATES = [{
110
- id: ANTIGRAVITY_OPUS_46_THINKING_MODEL_ID,
111
- templatePrefixes: ["google-antigravity/claude-opus-4-5-thinking", "google-antigravity/claude-opus-4.5-thinking"]
112
- }, {
113
- id: ANTIGRAVITY_OPUS_46_MODEL_ID,
114
- templatePrefixes: ["google-antigravity/claude-opus-4-5", "google-antigravity/claude-opus-4.5"]
115
- }];
116
- function resolveOpenAICodexGpt53FallbackModel(provider, modelId, modelRegistry) {
117
- const normalizedProvider = normalizeProviderId(provider);
118
- const trimmedModelId = modelId.trim();
119
- if (normalizedProvider !== "openai-codex") return;
120
- if (trimmedModelId.toLowerCase() !== OPENAI_CODEX_GPT_53_MODEL_ID) return;
121
- for (const templateId of OPENAI_CODEX_TEMPLATE_MODEL_IDS) {
122
- const template = modelRegistry.find(normalizedProvider, templateId);
123
- if (!template) continue;
124
- return normalizeModelCompat({
125
- ...template,
126
- id: trimmedModelId,
127
- name: trimmedModelId
128
- });
129
- }
130
- return normalizeModelCompat({
131
- id: trimmedModelId,
132
- name: trimmedModelId,
133
- api: "openai-codex-responses",
134
- provider: normalizedProvider,
135
- baseUrl: "https://chatgpt.com/backend-api",
136
- reasoning: true,
137
- input: ["text", "image"],
138
- cost: {
139
- input: 0,
140
- output: 0,
141
- cacheRead: 0,
142
- cacheWrite: 0
143
- },
144
- contextWindow: DEFAULT_CONTEXT_TOKENS,
145
- maxTokens: DEFAULT_CONTEXT_TOKENS
146
- });
147
- }
148
- function resolveAnthropicOpus46ForwardCompatModel(provider, modelId, modelRegistry) {
149
- const normalizedProvider = normalizeProviderId(provider);
150
- if (normalizedProvider !== "anthropic") return;
151
- const trimmedModelId = modelId.trim();
152
- const lower = trimmedModelId.toLowerCase();
153
- if (!(lower === ANTHROPIC_OPUS_46_MODEL_ID || lower === ANTHROPIC_OPUS_46_DOT_MODEL_ID || lower.startsWith(`${ANTHROPIC_OPUS_46_MODEL_ID}-`) || lower.startsWith(`${ANTHROPIC_OPUS_46_DOT_MODEL_ID}-`))) return;
154
- const templateIds = [];
155
- if (lower.startsWith(ANTHROPIC_OPUS_46_MODEL_ID)) templateIds.push(lower.replace(ANTHROPIC_OPUS_46_MODEL_ID, "claude-opus-4-5"));
156
- if (lower.startsWith(ANTHROPIC_OPUS_46_DOT_MODEL_ID)) templateIds.push(lower.replace(ANTHROPIC_OPUS_46_DOT_MODEL_ID, "claude-opus-4.5"));
157
- templateIds.push(...ANTHROPIC_OPUS_TEMPLATE_MODEL_IDS);
158
- for (const templateId of [...new Set(templateIds)].filter(Boolean)) {
159
- const template = modelRegistry.find(normalizedProvider, templateId);
160
- if (!template) continue;
161
- return normalizeModelCompat({
162
- ...template,
163
- id: trimmedModelId,
164
- name: trimmedModelId
165
- });
166
- }
167
- }
168
- function resolveZaiGlm5ForwardCompatModel(provider, modelId, modelRegistry) {
169
- if (normalizeProviderId(provider) !== "zai") return;
170
- const trimmed = modelId.trim();
171
- const lower = trimmed.toLowerCase();
172
- if (lower !== ZAI_GLM5_MODEL_ID && !lower.startsWith(`${ZAI_GLM5_MODEL_ID}-`)) return;
173
- for (const templateId of ZAI_GLM5_TEMPLATE_MODEL_IDS) {
174
- const template = modelRegistry.find("zai", templateId);
175
- if (!template) continue;
176
- return normalizeModelCompat({
177
- ...template,
178
- id: trimmed,
179
- name: trimmed,
180
- reasoning: true
181
- });
182
- }
183
- return normalizeModelCompat({
184
- id: trimmed,
185
- name: trimmed,
186
- api: "openai-completions",
187
- provider: "zai",
188
- reasoning: true,
189
- input: ["text"],
190
- cost: {
191
- input: 0,
192
- output: 0,
193
- cacheRead: 0,
194
- cacheWrite: 0
195
- },
196
- contextWindow: DEFAULT_CONTEXT_TOKENS,
197
- maxTokens: DEFAULT_CONTEXT_TOKENS
198
- });
199
- }
200
- function resolveAntigravityOpus46ForwardCompatModel(provider, modelId, modelRegistry) {
201
- const normalizedProvider = normalizeProviderId(provider);
202
- if (normalizedProvider !== "google-antigravity") return;
203
- const trimmedModelId = modelId.trim();
204
- const lower = trimmedModelId.toLowerCase();
205
- const isOpus46 = lower === ANTIGRAVITY_OPUS_46_MODEL_ID || lower === ANTIGRAVITY_OPUS_46_DOT_MODEL_ID || lower.startsWith(`${ANTIGRAVITY_OPUS_46_MODEL_ID}-`) || lower.startsWith(`${ANTIGRAVITY_OPUS_46_DOT_MODEL_ID}-`);
206
- const isOpus46Thinking = lower === ANTIGRAVITY_OPUS_46_THINKING_MODEL_ID || lower === ANTIGRAVITY_OPUS_46_DOT_THINKING_MODEL_ID || lower.startsWith(`${ANTIGRAVITY_OPUS_46_THINKING_MODEL_ID}-`) || lower.startsWith(`${ANTIGRAVITY_OPUS_46_DOT_THINKING_MODEL_ID}-`);
207
- if (!isOpus46 && !isOpus46Thinking) return;
208
- const templateIds = [];
209
- if (lower.startsWith(ANTIGRAVITY_OPUS_46_MODEL_ID)) templateIds.push(lower.replace(ANTIGRAVITY_OPUS_46_MODEL_ID, "claude-opus-4-5"));
210
- if (lower.startsWith(ANTIGRAVITY_OPUS_46_DOT_MODEL_ID)) templateIds.push(lower.replace(ANTIGRAVITY_OPUS_46_DOT_MODEL_ID, "claude-opus-4.5"));
211
- if (lower.startsWith(ANTIGRAVITY_OPUS_46_THINKING_MODEL_ID)) templateIds.push(lower.replace(ANTIGRAVITY_OPUS_46_THINKING_MODEL_ID, "claude-opus-4-5-thinking"));
212
- if (lower.startsWith(ANTIGRAVITY_OPUS_46_DOT_THINKING_MODEL_ID)) templateIds.push(lower.replace(ANTIGRAVITY_OPUS_46_DOT_THINKING_MODEL_ID, "claude-opus-4.5-thinking"));
213
- templateIds.push(...ANTIGRAVITY_OPUS_TEMPLATE_MODEL_IDS);
214
- templateIds.push(...ANTIGRAVITY_OPUS_THINKING_TEMPLATE_MODEL_IDS);
215
- for (const templateId of [...new Set(templateIds)].filter(Boolean)) {
216
- const template = modelRegistry.find(normalizedProvider, templateId);
217
- if (!template) continue;
218
- return normalizeModelCompat({
219
- ...template,
220
- id: trimmedModelId,
221
- name: trimmedModelId
222
- });
223
- }
224
- }
225
- function resolveForwardCompatModel(provider, modelId, modelRegistry) {
226
- return resolveOpenAICodexGpt53FallbackModel(provider, modelId, modelRegistry) ?? resolveAnthropicOpus46ForwardCompatModel(provider, modelId, modelRegistry) ?? resolveZaiGlm5ForwardCompatModel(provider, modelId, modelRegistry) ?? resolveAntigravityOpus46ForwardCompatModel(provider, modelId, modelRegistry);
227
- }
228
-
229
- //#endregion
230
- //#region src/commands/models/list.configured.ts
231
- function resolveConfiguredEntries(cfg) {
232
- const resolvedDefault = resolveConfiguredModelRef({
233
- cfg,
234
- defaultProvider: DEFAULT_PROVIDER,
235
- defaultModel: DEFAULT_MODEL
236
- });
237
- const aliasIndex = buildModelAliasIndex({
238
- cfg,
239
- defaultProvider: DEFAULT_PROVIDER
240
- });
241
- const order = [];
242
- const tagsByKey = /* @__PURE__ */ new Map();
243
- const aliasesByKey = /* @__PURE__ */ new Map();
244
- for (const [key, aliases] of aliasIndex.byKey.entries()) aliasesByKey.set(key, aliases);
245
- const addEntry = (ref, tag) => {
246
- const key = modelKey(ref.provider, ref.model);
247
- if (!tagsByKey.has(key)) {
248
- tagsByKey.set(key, /* @__PURE__ */ new Set());
249
- order.push(key);
250
- }
251
- tagsByKey.get(key)?.add(tag);
252
- };
253
- addEntry(resolvedDefault, "default");
254
- const modelConfig = cfg.agents?.defaults?.model;
255
- const imageModelConfig = cfg.agents?.defaults?.imageModel;
256
- const modelFallbacks = typeof modelConfig === "object" ? modelConfig?.fallbacks ?? [] : [];
257
- const imageFallbacks = typeof imageModelConfig === "object" ? imageModelConfig?.fallbacks ?? [] : [];
258
- const imagePrimary = imageModelConfig?.primary?.trim() ?? "";
259
- modelFallbacks.forEach((raw, idx) => {
260
- const resolved = resolveModelRefFromString({
261
- raw: String(raw ?? ""),
262
- defaultProvider: DEFAULT_PROVIDER,
263
- aliasIndex
264
- });
265
- if (!resolved) return;
266
- addEntry(resolved.ref, `fallback#${idx + 1}`);
267
- });
268
- if (imagePrimary) {
269
- const resolved = resolveModelRefFromString({
270
- raw: imagePrimary,
271
- defaultProvider: DEFAULT_PROVIDER,
272
- aliasIndex
273
- });
274
- if (resolved) addEntry(resolved.ref, "image");
275
- }
276
- imageFallbacks.forEach((raw, idx) => {
277
- const resolved = resolveModelRefFromString({
278
- raw: String(raw ?? ""),
279
- defaultProvider: DEFAULT_PROVIDER,
280
- aliasIndex
281
- });
282
- if (!resolved) return;
283
- addEntry(resolved.ref, `img-fallback#${idx + 1}`);
284
- });
285
- for (const key of Object.keys(cfg.agents?.defaults?.models ?? {})) {
286
- const parsed = parseModelRef(String(key ?? ""), DEFAULT_PROVIDER);
287
- if (!parsed) continue;
288
- addEntry(parsed, "configured");
289
- }
290
- return { entries: order.map((key) => {
291
- const slash = key.indexOf("/");
292
- return {
293
- key,
294
- ref: {
295
- provider: slash === -1 ? key : key.slice(0, slash),
296
- model: slash === -1 ? "" : key.slice(slash + 1)
297
- },
298
- tags: tagsByKey.get(key) ?? /* @__PURE__ */ new Set(),
299
- aliases: aliasesByKey.get(key) ?? []
300
- };
301
- }) };
302
- }
303
-
304
- //#endregion
305
- //#region src/commands/models/list.errors.ts
306
- const MODEL_AVAILABILITY_UNAVAILABLE_CODE = "MODEL_AVAILABILITY_UNAVAILABLE";
307
- function formatErrorWithStack(err) {
308
- if (err instanceof Error) return err.stack ?? `${err.name}: ${err.message}`;
309
- return String(err);
310
- }
311
- function shouldFallbackToAuthHeuristics(err) {
312
- if (!(err instanceof Error)) return false;
313
- return err.code === MODEL_AVAILABILITY_UNAVAILABLE_CODE;
314
- }
315
-
316
- //#endregion
317
- //#region src/commands/models/list.registry.ts
318
- const hasAuthForProvider = (provider, cfg, authStore) => {
319
- if (!cfg || !authStore) return false;
320
- if (listProfilesForProvider(authStore, provider).length > 0) return true;
321
- if (provider === "amazon-bedrock" && resolveAwsSdkEnvVarName()) return true;
322
- if (resolveEnvApiKey(provider)) return true;
323
- if (getCustomProviderApiKey(cfg, provider)) return true;
324
- return false;
325
- };
326
- function createAvailabilityUnavailableError(message) {
327
- const err = new Error(message);
328
- err.code = MODEL_AVAILABILITY_UNAVAILABLE_CODE;
329
- return err;
330
- }
331
- function normalizeAvailabilityError(err) {
332
- if (shouldFallbackToAuthHeuristics(err) && err instanceof Error) return err;
333
- return createAvailabilityUnavailableError(`Model availability unavailable: getAvailable() failed.\n${formatErrorWithStack(err)}`);
334
- }
335
- function validateAvailableModels(availableModels) {
336
- if (!Array.isArray(availableModels)) throw createAvailabilityUnavailableError("Model availability unavailable: getAvailable() returned a non-array value.");
337
- for (const model of availableModels) if (!model || typeof model !== "object" || typeof model.provider !== "string" || typeof model.id !== "string") throw createAvailabilityUnavailableError("Model availability unavailable: getAvailable() returned invalid model entries.");
338
- return availableModels;
339
- }
340
- function loadAvailableModels(registry) {
341
- let availableModels;
342
- try {
343
- availableModels = registry.getAvailable();
344
- } catch (err) {
345
- throw normalizeAvailabilityError(err);
346
- }
347
- try {
348
- return validateAvailableModels(availableModels);
349
- } catch (err) {
350
- throw normalizeAvailabilityError(err);
351
- }
352
- }
353
- async function loadModelRegistry(cfg) {
354
- await ensureAnimaModelsJson(cfg);
355
- const agentDir = resolveAnimaAgentDir();
356
- const registry = discoverModels(discoverAuthStorage(agentDir), agentDir);
357
- const appended = appendAntigravityForwardCompatModels(registry.getAll(), registry);
358
- const models = appended.models;
359
- const synthesizedForwardCompat = appended.synthesizedForwardCompat;
360
- let availableKeys;
361
- let availabilityErrorMessage;
362
- try {
363
- const availableModels = loadAvailableModels(registry);
364
- availableKeys = new Set(availableModels.map((model) => modelKey(model.provider, model.id)));
365
- for (const synthesized of synthesizedForwardCompat) if (hasAvailableTemplate(availableKeys, synthesized.templatePrefixes)) availableKeys.add(synthesized.key);
366
- } catch (err) {
367
- if (!shouldFallbackToAuthHeuristics(err)) throw err;
368
- availableKeys = void 0;
369
- if (!availabilityErrorMessage) availabilityErrorMessage = formatErrorWithStack(err);
370
- }
371
- return {
372
- registry,
373
- models,
374
- availableKeys,
375
- availabilityErrorMessage
376
- };
377
- }
378
- function appendAntigravityForwardCompatModels(models, modelRegistry) {
379
- const nextModels = [...models];
380
- const synthesizedForwardCompat = [];
381
- for (const candidate of ANTIGRAVITY_OPUS_46_FORWARD_COMPAT_CANDIDATES) {
382
- const key = modelKey("google-antigravity", candidate.id);
383
- if (nextModels.some((model) => modelKey(model.provider, model.id) === key)) continue;
384
- const fallback = resolveForwardCompatModel("google-antigravity", candidate.id, modelRegistry);
385
- if (!fallback) continue;
386
- nextModels.push(fallback);
387
- synthesizedForwardCompat.push({
388
- key,
389
- templatePrefixes: candidate.templatePrefixes
390
- });
391
- }
392
- return {
393
- models: nextModels,
394
- synthesizedForwardCompat
395
- };
396
- }
397
- function hasAvailableTemplate(availableKeys, templatePrefixes) {
398
- for (const key of availableKeys) if (templatePrefixes.some((prefix) => key.startsWith(prefix))) return true;
399
- return false;
400
- }
401
- function toModelRow(params) {
402
- const { model, key, tags, aliases = [], availableKeys, cfg, authStore } = params;
403
- if (!model) return {
404
- key,
405
- name: key,
406
- input: "-",
407
- contextWindow: null,
408
- local: null,
409
- available: null,
410
- tags: [...tags, "missing"],
411
- missing: true
412
- };
413
- const input = model.input.join("+") || "text";
414
- const local = isLocalBaseUrl(model.baseUrl);
415
- const available = availableKeys !== void 0 ? availableKeys.has(modelKey(model.provider, model.id)) : cfg && authStore ? hasAuthForProvider(model.provider, cfg, authStore) : false;
416
- const aliasTags = aliases.length > 0 ? [`alias:${aliases.join(",")}`] : [];
417
- const mergedTags = new Set(tags);
418
- if (aliasTags.length > 0) {
419
- for (const tag of mergedTags) if (tag === "alias" || tag.startsWith("alias:")) mergedTags.delete(tag);
420
- for (const tag of aliasTags) mergedTags.add(tag);
421
- }
422
- return {
423
- key,
424
- name: model.name || model.id,
425
- input,
426
- contextWindow: model.contextWindow ?? null,
427
- local,
428
- available,
429
- tags: Array.from(mergedTags),
430
- missing: false
431
- };
432
- }
433
-
434
- //#endregion
435
- //#region src/commands/models/list.format.ts
436
- const isRich = (opts) => Boolean(isRich$1() && !opts?.json && !opts?.plain);
437
- const pad = (value, size) => value.padEnd(size);
438
- const formatTag = (tag, rich) => {
439
- if (!rich) return tag;
440
- if (tag === "default") return theme.success(tag);
441
- if (tag === "image") return theme.accentBright(tag);
442
- if (tag === "configured") return theme.accent(tag);
443
- if (tag === "missing") return theme.error(tag);
444
- if (tag.startsWith("fallback#")) return theme.warn(tag);
445
- if (tag.startsWith("img-fallback#")) return theme.warn(tag);
446
- if (tag.startsWith("alias:")) return theme.accentDim(tag);
447
- return theme.muted(tag);
448
- };
449
- const truncate = (value, max) => {
450
- if (value.length <= max) return value;
451
- if (max <= 3) return value.slice(0, max);
452
- return `${value.slice(0, max - 3)}...`;
453
- };
454
- const maskApiKey = (value) => {
455
- const trimmed = value.trim();
456
- if (!trimmed) return "missing";
457
- if (trimmed.length <= 16) return trimmed;
458
- return `${trimmed.slice(0, 8)}...${trimmed.slice(-8)}`;
459
- };
460
-
461
- //#endregion
462
- //#region src/commands/models/list.table.ts
463
- const MODEL_PAD = 42;
464
- const INPUT_PAD = 10;
465
- const CTX_PAD = 8;
466
- const LOCAL_PAD = 5;
467
- const AUTH_PAD = 5;
468
- function printModelTable(rows, runtime, opts = {}) {
469
- if (opts.json) {
470
- runtime.log(JSON.stringify({
471
- count: rows.length,
472
- models: rows
473
- }, null, 2));
474
- return;
475
- }
476
- if (opts.plain) {
477
- for (const row of rows) runtime.log(row.key);
478
- return;
479
- }
480
- const rich = isRich(opts);
481
- const header = [
482
- pad("Model", MODEL_PAD),
483
- pad("Input", INPUT_PAD),
484
- pad("Ctx", CTX_PAD),
485
- pad("Local", LOCAL_PAD),
486
- pad("Auth", AUTH_PAD),
487
- "Tags"
488
- ].join(" ");
489
- runtime.log(rich ? theme.heading(header) : header);
490
- for (const row of rows) {
491
- const keyLabel = pad(truncate(row.key, MODEL_PAD), MODEL_PAD);
492
- const inputLabel = pad(row.input || "-", INPUT_PAD);
493
- const ctxLabel = pad(formatTokenK(row.contextWindow), CTX_PAD);
494
- const localLabel = pad(row.local === null ? "-" : row.local ? "yes" : "no", LOCAL_PAD);
495
- const authLabel = pad(row.available === null ? "-" : row.available ? "yes" : "no", AUTH_PAD);
496
- const tagsLabel = row.tags.length > 0 ? rich ? row.tags.map((tag) => formatTag(tag, rich)).join(",") : row.tags.join(",") : "";
497
- const coloredInput = colorize(rich, row.input.includes("image") ? theme.accentBright : theme.info, inputLabel);
498
- const coloredLocal = colorize(rich, row.local === null ? theme.muted : row.local ? theme.success : theme.muted, localLabel);
499
- const coloredAuth = colorize(rich, row.available === null ? theme.muted : row.available ? theme.success : theme.error, authLabel);
500
- const line = [
501
- rich ? theme.accent(keyLabel) : keyLabel,
502
- coloredInput,
503
- ctxLabel,
504
- coloredLocal,
505
- coloredAuth,
506
- tagsLabel
507
- ].join(" ");
508
- runtime.log(line);
509
- }
510
- }
511
-
512
- //#endregion
513
- //#region src/commands/models/list.list-command.ts
514
- async function modelsListCommand(opts, runtime) {
515
- ensureFlagCompatibility(opts);
516
- const cfg = loadConfig();
517
- const authStore = ensureAuthProfileStore();
518
- const providerFilter = (() => {
519
- const raw = opts.provider?.trim();
520
- if (!raw) return;
521
- return parseModelRef(`${raw}/_`, DEFAULT_PROVIDER)?.provider ?? raw.toLowerCase();
522
- })();
523
- let models = [];
524
- let modelRegistry;
525
- let availableKeys;
526
- let availabilityErrorMessage;
527
- try {
528
- const loaded = await loadModelRegistry(cfg);
529
- modelRegistry = loaded.registry;
530
- models = loaded.models;
531
- availableKeys = loaded.availableKeys;
532
- availabilityErrorMessage = loaded.availabilityErrorMessage;
533
- } catch (err) {
534
- runtime.error(`Model registry unavailable:\n${formatErrorWithStack(err)}`);
535
- process.exitCode = 1;
536
- return;
537
- }
538
- if (availabilityErrorMessage !== void 0) runtime.error(`Model availability lookup failed; falling back to auth heuristics for discovered models: ${availabilityErrorMessage}`);
539
- const modelByKey = new Map(models.map((model) => [modelKey(model.provider, model.id), model]));
540
- const { entries } = resolveConfiguredEntries(cfg);
541
- const configuredByKey = new Map(entries.map((entry) => [entry.key, entry]));
542
- const rows = [];
543
- if (opts.all) {
544
- const sorted = [...models].toSorted((a, b) => {
545
- const p = a.provider.localeCompare(b.provider);
546
- if (p !== 0) return p;
547
- return a.id.localeCompare(b.id);
548
- });
549
- for (const model of sorted) {
550
- if (providerFilter && model.provider.toLowerCase() !== providerFilter) continue;
551
- if (opts.local && !isLocalBaseUrl(model.baseUrl)) continue;
552
- const key = modelKey(model.provider, model.id);
553
- const configured = configuredByKey.get(key);
554
- rows.push(toModelRow({
555
- model,
556
- key,
557
- tags: configured ? Array.from(configured.tags) : [],
558
- aliases: configured?.aliases ?? [],
559
- availableKeys,
560
- cfg,
561
- authStore
562
- }));
563
- }
564
- } else for (const entry of entries) {
565
- if (providerFilter && entry.ref.provider.toLowerCase() !== providerFilter) continue;
566
- let model = modelByKey.get(entry.key);
567
- if (!model && modelRegistry) {
568
- const forwardCompat = resolveForwardCompatModel(entry.ref.provider, entry.ref.model, modelRegistry);
569
- if (forwardCompat) {
570
- model = forwardCompat;
571
- modelByKey.set(entry.key, forwardCompat);
572
- }
573
- }
574
- if (!model) model = resolveModel(entry.ref.provider, entry.ref.model, void 0, cfg).model;
575
- if (opts.local && model && !isLocalBaseUrl(model.baseUrl)) continue;
576
- if (opts.local && !model) continue;
577
- rows.push(toModelRow({
578
- model,
579
- key: entry.key,
580
- tags: Array.from(entry.tags),
581
- aliases: entry.aliases,
582
- availableKeys,
583
- cfg,
584
- authStore
585
- }));
586
- }
587
- if (rows.length === 0) {
588
- runtime.log("No models found.");
589
- return;
590
- }
591
- printModelTable(rows, runtime, opts);
592
- }
593
-
594
- //#endregion
595
- //#region src/commands/models/list.auth-overview.ts
596
- function resolveProviderAuthOverview(params) {
597
- const { provider, cfg, store } = params;
598
- const now = Date.now();
599
- const profiles = listProfilesForProvider(store, provider);
600
- const withUnusableSuffix = (base, profileId) => {
601
- const unusableUntil = resolveProfileUnusableUntilForDisplay(store, profileId);
602
- if (!unusableUntil || now >= unusableUntil) return base;
603
- const stats = store.usageStats?.[profileId];
604
- return `${base} [${typeof stats?.disabledUntil === "number" && now < stats.disabledUntil ? `disabled${stats.disabledReason ? `:${stats.disabledReason}` : ""}` : "cooldown"} ${formatRemainingShort(unusableUntil - now)}]`;
605
- };
606
- const labels = profiles.map((profileId) => {
607
- const profile = store.profiles[profileId];
608
- if (!profile) return `${profileId}=missing`;
609
- if (profile.type === "api_key") return withUnusableSuffix(`${profileId}=${maskApiKey(profile.key ?? "")}`, profileId);
610
- if (profile.type === "token") return withUnusableSuffix(`${profileId}=token:${maskApiKey(profile.token)}`, profileId);
611
- const display = resolveAuthProfileDisplayLabel({
612
- cfg,
613
- store,
614
- profileId
615
- });
616
- const suffix = display === profileId ? "" : display.startsWith(profileId) ? display.slice(profileId.length).trim() : `(${display})`;
617
- return withUnusableSuffix(`${profileId}=OAuth${suffix ? ` ${suffix}` : ""}`, profileId);
618
- });
619
- const oauthCount = profiles.filter((id) => store.profiles[id]?.type === "oauth").length;
620
- const tokenCount = profiles.filter((id) => store.profiles[id]?.type === "token").length;
621
- const apiKeyCount = profiles.filter((id) => store.profiles[id]?.type === "api_key").length;
622
- const envKey = resolveEnvApiKey(provider);
623
- const customKey = getCustomProviderApiKey(cfg, provider);
624
- return {
625
- provider,
626
- effective: (() => {
627
- if (profiles.length > 0) return {
628
- kind: "profiles",
629
- detail: shortenHomePath(resolveAuthStorePathForDisplay())
630
- };
631
- if (envKey) return {
632
- kind: "env",
633
- detail: envKey.source.includes("OAUTH_TOKEN") || envKey.source.toLowerCase().includes("oauth") ? "OAuth (env)" : maskApiKey(envKey.apiKey)
634
- };
635
- if (customKey) return {
636
- kind: "models.json",
637
- detail: maskApiKey(customKey)
638
- };
639
- return {
640
- kind: "missing",
641
- detail: "missing"
642
- };
643
- })(),
644
- profiles: {
645
- count: profiles.length,
646
- oauth: oauthCount,
647
- token: tokenCount,
648
- apiKey: apiKeyCount,
649
- labels
650
- },
651
- ...envKey ? { env: {
652
- value: envKey.source.includes("OAUTH_TOKEN") || envKey.source.toLowerCase().includes("oauth") ? "OAuth (env)" : maskApiKey(envKey.apiKey),
653
- source: envKey.source
654
- } } : {},
655
- ...customKey ? { modelsJson: {
656
- value: maskApiKey(customKey),
657
- source: `models.json: ${shortenHomePath(params.modelsPath)}`
658
- } } : {}
659
- };
660
- }
661
-
662
- //#endregion
663
- //#region src/commands/models/list.probe.ts
664
- const PROBE_PROMPT = "Reply with OK. Do not use tools.";
665
- const toStatus = (reason) => {
666
- if (!reason) return "unknown";
667
- if (reason === "auth") return "auth";
668
- if (reason === "rate_limit") return "rate_limit";
669
- if (reason === "billing") return "billing";
670
- if (reason === "timeout") return "timeout";
671
- if (reason === "format") return "format";
672
- return "unknown";
673
- };
674
- function buildCandidateMap(modelCandidates) {
675
- const map = /* @__PURE__ */ new Map();
676
- for (const raw of modelCandidates) {
677
- const parsed = parseModelRef(String(raw ?? ""), DEFAULT_PROVIDER);
678
- if (!parsed) continue;
679
- const list = map.get(parsed.provider) ?? [];
680
- if (!list.includes(parsed.model)) list.push(parsed.model);
681
- map.set(parsed.provider, list);
682
- }
683
- return map;
684
- }
685
- function selectProbeModel(params) {
686
- const { provider, candidates, catalog } = params;
687
- const direct = candidates.get(provider);
688
- if (direct && direct.length > 0) return {
689
- provider,
690
- model: direct[0]
691
- };
692
- const fromCatalog = catalog.find((entry) => entry.provider === provider);
693
- if (fromCatalog) return {
694
- provider: fromCatalog.provider,
695
- model: fromCatalog.id
696
- };
697
- return null;
698
- }
699
- function buildProbeTargets(params) {
700
- const { cfg, providers, modelCandidates, options } = params;
701
- const store = ensureAuthProfileStore();
702
- const providerFilter = options.provider?.trim();
703
- const providerFilterKey = providerFilter ? normalizeProviderId(providerFilter) : null;
704
- const profileFilter = new Set((options.profileIds ?? []).map((id) => id.trim()).filter(Boolean));
705
- return loadModelCatalog({ config: cfg }).then((catalog) => {
706
- const candidates = buildCandidateMap(modelCandidates);
707
- const targets = [];
708
- const results = [];
709
- for (const provider of providers) {
710
- const providerKey = normalizeProviderId(provider);
711
- if (providerFilterKey && providerKey !== providerFilterKey) continue;
712
- const model = selectProbeModel({
713
- provider: providerKey,
714
- candidates,
715
- catalog
716
- });
717
- const profileIds = listProfilesForProvider(store, providerKey);
718
- const explicitOrder = (() => {
719
- const order = store.order;
720
- if (order) {
721
- for (const [key, value] of Object.entries(order)) if (normalizeProviderId(key) === providerKey) return value;
722
- }
723
- const cfgOrder = cfg?.auth?.order;
724
- if (cfgOrder) {
725
- for (const [key, value] of Object.entries(cfgOrder)) if (normalizeProviderId(key) === providerKey) return value;
726
- }
727
- })();
728
- const allowedProfiles = explicitOrder && explicitOrder.length > 0 ? new Set(resolveAuthProfileOrder({
729
- cfg,
730
- store,
731
- provider: providerKey
732
- })) : null;
733
- const filteredProfiles = profileFilter.size ? profileIds.filter((id) => profileFilter.has(id)) : profileIds;
734
- if (filteredProfiles.length > 0) {
735
- for (const profileId of filteredProfiles) {
736
- const mode = store.profiles[profileId]?.type;
737
- const label = resolveAuthProfileDisplayLabel({
738
- cfg,
739
- store,
740
- profileId
741
- });
742
- if (explicitOrder && !explicitOrder.includes(profileId)) {
743
- results.push({
744
- provider: providerKey,
745
- model: model ? `${model.provider}/${model.model}` : void 0,
746
- profileId,
747
- label,
748
- source: "profile",
749
- mode,
750
- status: "unknown",
751
- error: "Excluded by auth.order for this provider."
752
- });
753
- continue;
754
- }
755
- if (allowedProfiles && !allowedProfiles.has(profileId)) {
756
- results.push({
757
- provider: providerKey,
758
- model: model ? `${model.provider}/${model.model}` : void 0,
759
- profileId,
760
- label,
761
- source: "profile",
762
- mode,
763
- status: "unknown",
764
- error: "Auth profile credentials are missing or expired."
765
- });
766
- continue;
767
- }
768
- if (!model) {
769
- results.push({
770
- provider: providerKey,
771
- model: void 0,
772
- profileId,
773
- label,
774
- source: "profile",
775
- mode,
776
- status: "no_model",
777
- error: "No model available for probe"
778
- });
779
- continue;
780
- }
781
- targets.push({
782
- provider: providerKey,
783
- model,
784
- profileId,
785
- label,
786
- source: "profile",
787
- mode
788
- });
789
- }
790
- continue;
791
- }
792
- if (profileFilter.size > 0) continue;
793
- const envKey = resolveEnvApiKey(providerKey);
794
- const customKey = getCustomProviderApiKey(cfg, providerKey);
795
- if (!envKey && !customKey) continue;
796
- const label = envKey ? "env" : "models.json";
797
- const source = envKey ? "env" : "models.json";
798
- const mode = envKey?.source.includes("OAUTH_TOKEN") ? "oauth" : "api_key";
799
- if (!model) {
800
- results.push({
801
- provider: providerKey,
802
- model: void 0,
803
- label,
804
- source,
805
- mode,
806
- status: "no_model",
807
- error: "No model available for probe"
808
- });
809
- continue;
810
- }
811
- targets.push({
812
- provider: providerKey,
813
- model,
814
- label,
815
- source,
816
- mode
817
- });
818
- }
819
- return {
820
- targets,
821
- results
822
- };
823
- });
824
- }
825
- async function probeTarget(params) {
826
- const { cfg, agentId, agentDir, workspaceDir, sessionDir, target, timeoutMs, maxTokens } = params;
827
- if (!target.model) return {
828
- provider: target.provider,
829
- model: void 0,
830
- profileId: target.profileId,
831
- label: target.label,
832
- source: target.source,
833
- mode: target.mode,
834
- status: "no_model",
835
- error: "No model available for probe"
836
- };
837
- const sessionId = `probe-${target.provider}-${crypto.randomUUID()}`;
838
- const sessionFile = resolveSessionTranscriptPath(sessionId, agentId);
839
- await fs.mkdir(sessionDir, { recursive: true });
840
- const start = Date.now();
841
- try {
842
- await runEmbeddedPiAgent({
843
- sessionId,
844
- sessionFile,
845
- agentId,
846
- workspaceDir,
847
- agentDir,
848
- config: cfg,
849
- prompt: PROBE_PROMPT,
850
- provider: target.model.provider,
851
- model: target.model.model,
852
- authProfileId: target.profileId,
853
- authProfileIdSource: target.profileId ? "user" : void 0,
854
- timeoutMs,
855
- runId: `probe-${crypto.randomUUID()}`,
856
- lane: `auth-probe:${target.provider}:${target.profileId ?? target.source}`,
857
- thinkLevel: "off",
858
- reasoningLevel: "off",
859
- verboseLevel: "off",
860
- streamParams: { maxTokens }
861
- });
862
- return {
863
- provider: target.provider,
864
- model: `${target.model.provider}/${target.model.model}`,
865
- profileId: target.profileId,
866
- label: target.label,
867
- source: target.source,
868
- mode: target.mode,
869
- status: "ok",
870
- latencyMs: Date.now() - start
871
- };
872
- } catch (err) {
873
- const described = describeFailoverError(err);
874
- return {
875
- provider: target.provider,
876
- model: `${target.model.provider}/${target.model.model}`,
877
- profileId: target.profileId,
878
- label: target.label,
879
- source: target.source,
880
- mode: target.mode,
881
- status: toStatus(described.reason),
882
- error: redactSecrets(described.message),
883
- latencyMs: Date.now() - start
884
- };
885
- }
886
- }
887
- async function runTargetsWithConcurrency(params) {
888
- const { cfg, targets, timeoutMs, maxTokens, onProgress } = params;
889
- const concurrency = Math.max(1, Math.min(targets.length || 1, params.concurrency));
890
- const agentId = resolveDefaultAgentId(cfg);
891
- const agentDir = resolveAnimaAgentDir();
892
- const workspaceDir = resolveAgentWorkspaceDir(cfg, agentId) ?? resolveDefaultAgentWorkspaceDir();
893
- const sessionDir = resolveSessionTranscriptsDirForAgent(agentId);
894
- await fs.mkdir(workspaceDir, { recursive: true });
895
- let completed = 0;
896
- const results = Array.from({ length: targets.length });
897
- let cursor = 0;
898
- const worker = async () => {
899
- while (true) {
900
- const index = cursor;
901
- cursor += 1;
902
- if (index >= targets.length) return;
903
- const target = targets[index];
904
- onProgress?.({
905
- completed,
906
- total: targets.length,
907
- label: `Probing ${target.provider}${target.profileId ? ` (${target.label})` : ""}`
908
- });
909
- results[index] = await probeTarget({
910
- cfg,
911
- agentId,
912
- agentDir,
913
- workspaceDir,
914
- sessionDir,
915
- target,
916
- timeoutMs,
917
- maxTokens
918
- });
919
- completed += 1;
920
- onProgress?.({
921
- completed,
922
- total: targets.length
923
- });
924
- }
925
- };
926
- await Promise.all(Array.from({ length: concurrency }, () => worker()));
927
- return results.filter((entry) => Boolean(entry));
928
- }
929
- async function runAuthProbes(params) {
930
- const startedAt = Date.now();
931
- const plan = await buildProbeTargets({
932
- cfg: params.cfg,
933
- providers: params.providers,
934
- modelCandidates: params.modelCandidates,
935
- options: params.options
936
- });
937
- const totalTargets = plan.targets.length;
938
- params.onProgress?.({
939
- completed: 0,
940
- total: totalTargets
941
- });
942
- const results = totalTargets ? await runTargetsWithConcurrency({
943
- cfg: params.cfg,
944
- targets: plan.targets,
945
- timeoutMs: params.options.timeoutMs,
946
- maxTokens: params.options.maxTokens,
947
- concurrency: params.options.concurrency,
948
- onProgress: params.onProgress
949
- }) : [];
950
- const finishedAt = Date.now();
951
- return {
952
- startedAt,
953
- finishedAt,
954
- durationMs: finishedAt - startedAt,
955
- totalTargets,
956
- options: params.options,
957
- results: [...plan.results, ...results]
958
- };
959
- }
960
- function formatProbeLatency(latencyMs) {
961
- if (!latencyMs && latencyMs !== 0) return "-";
962
- return formatMs(latencyMs);
963
- }
964
- function sortProbeResults(results) {
965
- return results.slice().toSorted((a, b) => {
966
- const provider = a.provider.localeCompare(b.provider);
967
- if (provider !== 0) return provider;
968
- const aLabel = a.label || a.profileId || "";
969
- const bLabel = b.label || b.profileId || "";
970
- return aLabel.localeCompare(bLabel);
971
- });
972
- }
973
- function describeProbeSummary(summary) {
974
- if (summary.totalTargets === 0) return "No probe targets.";
975
- return `Probed ${summary.totalTargets} target${summary.totalTargets === 1 ? "" : "s"} in ${formatMs(summary.durationMs)}`;
976
- }
977
-
978
- //#endregion
979
- //#region src/commands/models/list.status-command.ts
980
- async function modelsStatusCommand(opts, runtime) {
981
- ensureFlagCompatibility(opts);
982
- if (opts.plain && opts.probe) throw new Error("--probe cannot be used with --plain output.");
983
- const cfg = loadConfig();
984
- const agentId = resolveKnownAgentId({
985
- cfg,
986
- rawAgentId: opts.agent
987
- });
988
- const agentDir = agentId ? resolveAgentDir(cfg, agentId) : resolveAnimaAgentDir();
989
- const agentModelPrimary = agentId ? resolveAgentModelPrimary(cfg, agentId) : void 0;
990
- const agentFallbacksOverride = agentId ? resolveAgentModelFallbacksOverride(cfg, agentId) : void 0;
991
- const resolved = agentId ? resolveDefaultModelForAgent({
992
- cfg,
993
- agentId
994
- }) : resolveConfiguredModelRef({
995
- cfg,
996
- defaultProvider: DEFAULT_PROVIDER,
997
- defaultModel: DEFAULT_MODEL
998
- });
999
- const modelConfig = cfg.agents?.defaults?.model;
1000
- const imageConfig = cfg.agents?.defaults?.imageModel;
1001
- const rawDefaultsModel = typeof modelConfig === "string" ? modelConfig.trim() : modelConfig?.primary?.trim() ?? "";
1002
- const rawModel = agentModelPrimary ?? rawDefaultsModel;
1003
- const resolvedLabel = `${resolved.provider}/${resolved.model}`;
1004
- const defaultLabel = rawModel || resolvedLabel;
1005
- const defaultsFallbacks = typeof modelConfig === "object" ? modelConfig?.fallbacks ?? [] : [];
1006
- const fallbacks = agentFallbacksOverride ?? defaultsFallbacks;
1007
- const imageModel = typeof imageConfig === "string" ? imageConfig.trim() : imageConfig?.primary?.trim() ?? "";
1008
- const imageFallbacks = typeof imageConfig === "object" ? imageConfig?.fallbacks ?? [] : [];
1009
- const aliases = Object.entries(cfg.agents?.defaults?.models ?? {}).reduce((acc, [key, entry]) => {
1010
- const alias = typeof entry?.alias === "string" ? entry.alias.trim() : void 0;
1011
- if (alias) acc[alias] = key;
1012
- return acc;
1013
- }, {});
1014
- const allowed = Object.keys(cfg.agents?.defaults?.models ?? {});
1015
- const store = ensureAuthProfileStore(agentDir);
1016
- const modelsPath = path.join(agentDir, "models.json");
1017
- const providersFromStore = new Set(Object.values(store.profiles).map((profile) => profile.provider).filter((p) => Boolean(p)));
1018
- const providersFromConfig = new Set(Object.keys(cfg.models?.providers ?? {}).map((p) => typeof p === "string" ? p.trim() : "").filter(Boolean));
1019
- const providersFromModels = /* @__PURE__ */ new Set();
1020
- const providersInUse = /* @__PURE__ */ new Set();
1021
- for (const raw of [
1022
- defaultLabel,
1023
- ...fallbacks,
1024
- imageModel,
1025
- ...imageFallbacks,
1026
- ...allowed
1027
- ]) {
1028
- const parsed = parseModelRef(String(raw ?? ""), DEFAULT_PROVIDER);
1029
- if (parsed?.provider) providersFromModels.add(parsed.provider);
1030
- }
1031
- for (const raw of [
1032
- defaultLabel,
1033
- ...fallbacks,
1034
- imageModel,
1035
- ...imageFallbacks
1036
- ]) {
1037
- const parsed = parseModelRef(String(raw ?? ""), DEFAULT_PROVIDER);
1038
- if (parsed?.provider) providersInUse.add(parsed.provider);
1039
- }
1040
- const providersFromEnv = /* @__PURE__ */ new Set();
1041
- for (const provider of [
1042
- "anthropic",
1043
- "github-copilot",
1044
- "google-vertex",
1045
- "openai",
1046
- "google",
1047
- "groq",
1048
- "cerebras",
1049
- "xai",
1050
- "openrouter",
1051
- "zai",
1052
- "mistral",
1053
- "synthetic"
1054
- ]) if (resolveEnvApiKey(provider)) providersFromEnv.add(provider);
1055
- const providers = Array.from(new Set([
1056
- ...providersFromStore,
1057
- ...providersFromConfig,
1058
- ...providersFromModels,
1059
- ...providersFromEnv
1060
- ])).map((p) => typeof p === "string" ? p.trim() : "").filter(Boolean).toSorted((a, b) => a.localeCompare(b));
1061
- const applied = getShellEnvAppliedKeys();
1062
- const shellFallbackEnabled = shouldEnableShellEnvFallback(process.env) || cfg.env?.shellEnv?.enabled === true;
1063
- const providerAuth = providers.map((provider) => resolveProviderAuthOverview({
1064
- provider,
1065
- cfg,
1066
- store,
1067
- modelsPath
1068
- })).filter((entry) => {
1069
- return entry.profiles.count > 0 || Boolean(entry.env) || Boolean(entry.modelsJson);
1070
- });
1071
- const providerAuthMap = new Map(providerAuth.map((entry) => [entry.provider, entry]));
1072
- const missingProvidersInUse = Array.from(providersInUse).filter((provider) => !providerAuthMap.has(provider)).toSorted((a, b) => a.localeCompare(b));
1073
- const probeProfileIds = (() => {
1074
- if (!opts.probeProfile) return [];
1075
- return (Array.isArray(opts.probeProfile) ? opts.probeProfile : [opts.probeProfile]).flatMap((value) => String(value ?? "").split(",")).map((value) => value.trim()).filter(Boolean);
1076
- })();
1077
- const probeTimeoutMs = opts.probeTimeout ? Number(opts.probeTimeout) : 8e3;
1078
- if (!Number.isFinite(probeTimeoutMs) || probeTimeoutMs <= 0) throw new Error("--probe-timeout must be a positive number (ms).");
1079
- const probeConcurrency = opts.probeConcurrency ? Number(opts.probeConcurrency) : 2;
1080
- if (!Number.isFinite(probeConcurrency) || probeConcurrency <= 0) throw new Error("--probe-concurrency must be > 0.");
1081
- const probeMaxTokens = opts.probeMaxTokens ? Number(opts.probeMaxTokens) : 8;
1082
- if (!Number.isFinite(probeMaxTokens) || probeMaxTokens <= 0) throw new Error("--probe-max-tokens must be > 0.");
1083
- const aliasIndex = buildModelAliasIndex({
1084
- cfg,
1085
- defaultProvider: DEFAULT_PROVIDER
1086
- });
1087
- const modelCandidates = [
1088
- rawModel || resolvedLabel,
1089
- ...fallbacks,
1090
- imageModel,
1091
- ...imageFallbacks,
1092
- ...allowed
1093
- ].filter(Boolean).map((raw) => resolveModelRefFromString({
1094
- raw: String(raw ?? ""),
1095
- defaultProvider: DEFAULT_PROVIDER,
1096
- aliasIndex
1097
- })?.ref).filter((ref) => Boolean(ref)).map((ref) => `${ref.provider}/${ref.model}`);
1098
- let probeSummary;
1099
- if (opts.probe) probeSummary = await withProgressTotals({
1100
- label: "Probing auth profiles…",
1101
- total: 1
1102
- }, async (update) => {
1103
- return await runAuthProbes({
1104
- cfg,
1105
- providers,
1106
- modelCandidates,
1107
- options: {
1108
- provider: opts.probeProvider,
1109
- profileIds: probeProfileIds,
1110
- timeoutMs: probeTimeoutMs,
1111
- concurrency: probeConcurrency,
1112
- maxTokens: probeMaxTokens
1113
- },
1114
- onProgress: update
1115
- });
1116
- });
1117
- const providersWithOauth = providerAuth.filter((entry) => entry.profiles.oauth > 0 || entry.profiles.token > 0 || entry.env?.value === "OAuth (env)").map((entry) => {
1118
- const count = entry.profiles.oauth + entry.profiles.token + (entry.env?.value === "OAuth (env)" ? 1 : 0);
1119
- return `${entry.provider} (${count})`;
1120
- });
1121
- const authHealth = buildAuthHealthSummary({
1122
- store,
1123
- cfg,
1124
- warnAfterMs: DEFAULT_OAUTH_WARN_MS,
1125
- providers
1126
- });
1127
- const oauthProfiles = authHealth.profiles.filter((profile) => profile.type === "oauth" || profile.type === "token");
1128
- const unusableProfiles = (() => {
1129
- const now = Date.now();
1130
- const out = [];
1131
- for (const profileId of Object.keys(store.usageStats ?? {})) {
1132
- const unusableUntil = resolveProfileUnusableUntilForDisplay(store, profileId);
1133
- if (!unusableUntil || now >= unusableUntil) continue;
1134
- const stats = store.usageStats?.[profileId];
1135
- const kind = typeof stats?.disabledUntil === "number" && now < stats.disabledUntil ? "disabled" : "cooldown";
1136
- out.push({
1137
- profileId,
1138
- provider: store.profiles[profileId]?.provider,
1139
- kind,
1140
- reason: stats?.disabledReason,
1141
- until: unusableUntil,
1142
- remainingMs: unusableUntil - now
1143
- });
1144
- }
1145
- return out.toSorted((a, b) => a.remainingMs - b.remainingMs);
1146
- })();
1147
- const checkStatus = (() => {
1148
- const hasExpiredOrMissing = oauthProfiles.some((profile) => ["expired", "missing"].includes(profile.status)) || missingProvidersInUse.length > 0;
1149
- const hasExpiring = oauthProfiles.some((profile) => profile.status === "expiring");
1150
- if (hasExpiredOrMissing) return 1;
1151
- if (hasExpiring) return 2;
1152
- return 0;
1153
- })();
1154
- if (opts.json) {
1155
- runtime.log(JSON.stringify({
1156
- configPath: CONFIG_PATH,
1157
- ...agentId ? { agentId } : {},
1158
- agentDir,
1159
- defaultModel: defaultLabel,
1160
- resolvedDefault: resolvedLabel,
1161
- fallbacks,
1162
- imageModel: imageModel || null,
1163
- imageFallbacks,
1164
- ...agentId ? { modelConfig: {
1165
- defaultSource: agentModelPrimary ? "agent" : "defaults",
1166
- fallbacksSource: agentFallbacksOverride !== void 0 ? "agent" : "defaults"
1167
- } } : {},
1168
- aliases,
1169
- allowed,
1170
- auth: {
1171
- storePath: resolveAuthStorePathForDisplay(agentDir),
1172
- shellEnvFallback: {
1173
- enabled: shellFallbackEnabled,
1174
- appliedKeys: applied
1175
- },
1176
- providersWithOAuth: providersWithOauth,
1177
- missingProvidersInUse,
1178
- providers: providerAuth,
1179
- unusableProfiles,
1180
- oauth: {
1181
- warnAfterMs: authHealth.warnAfterMs,
1182
- profiles: authHealth.profiles,
1183
- providers: authHealth.providers
1184
- },
1185
- probes: probeSummary
1186
- }
1187
- }, null, 2));
1188
- if (opts.check) runtime.exit(checkStatus);
1189
- return;
1190
- }
1191
- if (opts.plain) {
1192
- runtime.log(resolvedLabel);
1193
- if (opts.check) runtime.exit(checkStatus);
1194
- return;
1195
- }
1196
- const rich = isRich(opts);
1197
- const label = (value) => colorize(rich, theme.accent, value.padEnd(14));
1198
- const labelWithSource = (value, source) => label(source ? `${value} (${source})` : value);
1199
- const displayDefault = rawModel && rawModel !== resolvedLabel ? `${resolvedLabel} (from ${rawModel})` : resolvedLabel;
1200
- runtime.log(`${label("Config")}${colorize(rich, theme.muted, ":")} ${colorize(rich, theme.info, shortenHomePath(CONFIG_PATH))}`);
1201
- runtime.log(`${label("Agent dir")}${colorize(rich, theme.muted, ":")} ${colorize(rich, theme.info, shortenHomePath(agentDir))}`);
1202
- runtime.log(`${labelWithSource("Default", agentId ? agentModelPrimary ? "agent" : "defaults" : void 0)}${colorize(rich, theme.muted, ":")} ${colorize(rich, theme.success, displayDefault)}`);
1203
- runtime.log(`${labelWithSource(`Fallbacks (${fallbacks.length || 0})`, agentId ? agentFallbacksOverride !== void 0 ? "agent" : "defaults" : void 0)}${colorize(rich, theme.muted, ":")} ${colorize(rich, fallbacks.length ? theme.warn : theme.muted, fallbacks.length ? fallbacks.join(", ") : "-")}`);
1204
- runtime.log(`${labelWithSource("Image model", agentId ? "defaults" : void 0)}${colorize(rich, theme.muted, ":")} ${colorize(rich, imageModel ? theme.accentBright : theme.muted, imageModel || "-")}`);
1205
- runtime.log(`${labelWithSource(`Image fallbacks (${imageFallbacks.length || 0})`, agentId ? "defaults" : void 0)}${colorize(rich, theme.muted, ":")} ${colorize(rich, imageFallbacks.length ? theme.accentBright : theme.muted, imageFallbacks.length ? imageFallbacks.join(", ") : "-")}`);
1206
- runtime.log(`${label(`Aliases (${Object.keys(aliases).length || 0})`)}${colorize(rich, theme.muted, ":")} ${colorize(rich, Object.keys(aliases).length ? theme.accent : theme.muted, Object.keys(aliases).length ? Object.entries(aliases).map(([alias, target]) => rich ? `${theme.accentDim(alias)} ${theme.muted("->")} ${theme.info(target)}` : `${alias} -> ${target}`).join(", ") : "-")}`);
1207
- runtime.log(`${label(`Configured models (${allowed.length || 0})`)}${colorize(rich, theme.muted, ":")} ${colorize(rich, allowed.length ? theme.info : theme.muted, allowed.length ? allowed.join(", ") : "all")}`);
1208
- runtime.log("");
1209
- runtime.log(colorize(rich, theme.heading, "Auth overview"));
1210
- runtime.log(`${label("Auth store")}${colorize(rich, theme.muted, ":")} ${colorize(rich, theme.info, shortenHomePath(resolveAuthStorePathForDisplay(agentDir)))}`);
1211
- runtime.log(`${label("Shell env")}${colorize(rich, theme.muted, ":")} ${colorize(rich, shellFallbackEnabled ? theme.success : theme.muted, shellFallbackEnabled ? "on" : "off")}${applied.length ? colorize(rich, theme.muted, ` (applied: ${applied.join(", ")})`) : ""}`);
1212
- runtime.log(`${label(`Providers w/ OAuth/tokens (${providersWithOauth.length || 0})`)}${colorize(rich, theme.muted, ":")} ${colorize(rich, providersWithOauth.length ? theme.info : theme.muted, providersWithOauth.length ? providersWithOauth.join(", ") : "-")}`);
1213
- const formatKey = (key) => colorize(rich, theme.warn, key);
1214
- const formatKeyValue = (key, value) => `${formatKey(key)}=${colorize(rich, theme.info, value)}`;
1215
- const formatSeparator = () => colorize(rich, theme.muted, " | ");
1216
- for (const entry of providerAuth) {
1217
- const separator = formatSeparator();
1218
- const bits = [];
1219
- bits.push(formatKeyValue("effective", `${colorize(rich, theme.accentBright, entry.effective.kind)}:${colorize(rich, theme.muted, entry.effective.detail)}`));
1220
- if (entry.profiles.count > 0) {
1221
- bits.push(formatKeyValue("profiles", `${entry.profiles.count} (oauth=${entry.profiles.oauth}, token=${entry.profiles.token}, api_key=${entry.profiles.apiKey})`));
1222
- if (entry.profiles.labels.length > 0) bits.push(colorize(rich, theme.info, entry.profiles.labels.join(", ")));
1223
- }
1224
- if (entry.env) bits.push(formatKeyValue("env", `${entry.env.value}${separator}${formatKeyValue("source", entry.env.source)}`));
1225
- if (entry.modelsJson) bits.push(formatKeyValue("models.json", `${entry.modelsJson.value}${separator}${formatKeyValue("source", entry.modelsJson.source)}`));
1226
- runtime.log(`- ${theme.heading(entry.provider)} ${bits.join(separator)}`);
1227
- }
1228
- if (missingProvidersInUse.length > 0) {
1229
- runtime.log("");
1230
- runtime.log(colorize(rich, theme.heading, "Missing auth"));
1231
- for (const provider of missingProvidersInUse) {
1232
- const hint = provider === "anthropic" ? `Run \`claude setup-token\`, then \`${formatCliCommand("anima models auth setup-token")}\` or \`${formatCliCommand("anima configure")}\`.` : `Run \`${formatCliCommand("anima configure")}\` or set an API key env var.`;
1233
- runtime.log(`- ${theme.heading(provider)} ${hint}`);
1234
- }
1235
- }
1236
- runtime.log("");
1237
- runtime.log(colorize(rich, theme.heading, "OAuth/token status"));
1238
- if (oauthProfiles.length === 0) runtime.log(colorize(rich, theme.muted, "- none"));
1239
- else {
1240
- const usageByProvider = /* @__PURE__ */ new Map();
1241
- const usageProviders = Array.from(new Set(oauthProfiles.map((profile) => resolveUsageProviderId(profile.provider)).filter((provider) => Boolean(provider))));
1242
- if (usageProviders.length > 0) try {
1243
- const usageSummary = await loadProviderUsageSummary({
1244
- providers: usageProviders,
1245
- agentDir,
1246
- timeoutMs: 3500
1247
- });
1248
- for (const snapshot of usageSummary.providers) {
1249
- const formatted = formatUsageWindowSummary(snapshot, {
1250
- now: Date.now(),
1251
- maxWindows: 2,
1252
- includeResets: true
1253
- });
1254
- if (formatted) usageByProvider.set(snapshot.provider, formatted);
1255
- }
1256
- } catch {}
1257
- const formatStatus = (status) => {
1258
- if (status === "ok") return colorize(rich, theme.success, "ok");
1259
- if (status === "static") return colorize(rich, theme.muted, "static");
1260
- if (status === "expiring") return colorize(rich, theme.warn, "expiring");
1261
- if (status === "missing") return colorize(rich, theme.warn, "unknown");
1262
- return colorize(rich, theme.error, "expired");
1263
- };
1264
- const profilesByProvider = /* @__PURE__ */ new Map();
1265
- for (const profile of oauthProfiles) {
1266
- const current = profilesByProvider.get(profile.provider);
1267
- if (current) current.push(profile);
1268
- else profilesByProvider.set(profile.provider, [profile]);
1269
- }
1270
- for (const [provider, profiles] of profilesByProvider) {
1271
- const usageKey = resolveUsageProviderId(provider);
1272
- const usage = usageKey ? usageByProvider.get(usageKey) : void 0;
1273
- const usageSuffix = usage ? colorize(rich, theme.muted, ` usage: ${usage}`) : "";
1274
- runtime.log(`- ${colorize(rich, theme.heading, provider)}${usageSuffix}`);
1275
- for (const profile of profiles) {
1276
- const labelText = profile.label || profile.profileId;
1277
- const label = colorize(rich, theme.accent, labelText);
1278
- const status = formatStatus(profile.status);
1279
- const expiry = profile.status === "static" ? "" : profile.expiresAt ? ` expires in ${formatRemainingShort(profile.remainingMs)}` : " expires unknown";
1280
- runtime.log(` - ${label} ${status}${expiry}`);
1281
- }
1282
- }
1283
- }
1284
- if (probeSummary) {
1285
- runtime.log("");
1286
- runtime.log(colorize(rich, theme.heading, "Auth probes"));
1287
- if (probeSummary.results.length === 0) runtime.log(colorize(rich, theme.muted, "- none"));
1288
- else {
1289
- const tableWidth = Math.max(60, (process.stdout.columns ?? 120) - 1);
1290
- const sorted = sortProbeResults(probeSummary.results);
1291
- const statusColor = (status) => {
1292
- if (status === "ok") return theme.success;
1293
- if (status === "rate_limit") return theme.warn;
1294
- if (status === "timeout" || status === "billing") return theme.warn;
1295
- if (status === "auth" || status === "format") return theme.error;
1296
- if (status === "no_model") return theme.muted;
1297
- return theme.muted;
1298
- };
1299
- const rows = sorted.map((result) => {
1300
- const status = colorize(rich, statusColor(result.status), result.status);
1301
- const latency = formatProbeLatency(result.latencyMs);
1302
- const modelLabel = result.model ?? `${result.provider}/-`;
1303
- const modeLabel = result.mode ? ` ${colorize(rich, theme.muted, `(${result.mode})`)}` : "";
1304
- const profile = `${colorize(rich, theme.accent, result.label)}${modeLabel}`;
1305
- const detail = result.error?.trim();
1306
- const detailLabel = detail ? `\n${colorize(rich, theme.muted, `↳ ${detail}`)}` : "";
1307
- const statusLabel = `${status}${colorize(rich, theme.muted, ` · ${latency}`)}${detailLabel}`;
1308
- return {
1309
- Model: colorize(rich, theme.heading, modelLabel),
1310
- Profile: profile,
1311
- Status: statusLabel
1312
- };
1313
- });
1314
- runtime.log(renderTable({
1315
- width: tableWidth,
1316
- columns: [
1317
- {
1318
- key: "Model",
1319
- header: "Model",
1320
- minWidth: 18
1321
- },
1322
- {
1323
- key: "Profile",
1324
- header: "Profile",
1325
- minWidth: 24
1326
- },
1327
- {
1328
- key: "Status",
1329
- header: "Status",
1330
- minWidth: 12
1331
- }
1332
- ],
1333
- rows
1334
- }).trimEnd());
1335
- runtime.log(colorize(rich, theme.muted, describeProbeSummary(probeSummary)));
1336
- }
1337
- }
1338
- if (opts.check) runtime.exit(checkStatus);
1339
- }
1340
-
1341
- //#endregion
1342
- //#region src/agents/model-scan.ts
1343
- const TOOL_PING = {
1344
- name: "ping",
1345
- description: "Return OK.",
1346
- parameters: Type.Object({})
1347
- };
1348
-
1349
- //#endregion
1350
- export { modelsListCommand, modelsStatusCommand };