@noxsoft/anima 2.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 (1570) hide show
  1. package/CHANGELOG.md +2065 -0
  2. package/LICENSE +23 -0
  3. package/README.md +47 -0
  4. package/anima.mjs +56 -0
  5. package/dist/accounts-Cc5E4IDO.js +260 -0
  6. package/dist/accounts-CcVrwKqv.js +259 -0
  7. package/dist/acp-cli-BbvR4dNz.js +1081 -0
  8. package/dist/acp-cli-CePIi7gD.js +1084 -0
  9. package/dist/agent-CSrGrAg1.js +725 -0
  10. package/dist/agent-NgeWEcBM.js +725 -0
  11. package/dist/agent-events-UF0DxwKS.js +182 -0
  12. package/dist/agent-scope-BVf4aSwY.js +112 -0
  13. package/dist/agent-scope-OZi7lb8S.js +452 -0
  14. package/dist/agent-scope-V1bi9OYL.js +452 -0
  15. package/dist/agents-Bw06WthM.js +809 -0
  16. package/dist/agents.config-Dvo2ULxs.js +182 -0
  17. package/dist/agents.config-d6H0_3oj.js +182 -0
  18. package/dist/argv-DqUHKf0o.js +73 -0
  19. package/dist/audit-Buja3mbS.js +2401 -0
  20. package/dist/audit-CWIz6mM7.js +2401 -0
  21. package/dist/auth-91o2YM96.js +648 -0
  22. package/dist/auth-choice-7dFCqblU.js +2681 -0
  23. package/dist/auth-choice-S_0K9gpl.js +2681 -0
  24. package/dist/auth-health-CctpRTdC.js +149 -0
  25. package/dist/auth-health-DoHai4eD.js +149 -0
  26. package/dist/auth-lZ26wsbN.js +639 -0
  27. package/dist/auth-profiles-Cz2rxrav.js +2690 -0
  28. package/dist/auth-profiles-_5BsNObq.js +1565 -0
  29. package/dist/banner-ieAUufx9.js +294 -0
  30. package/dist/boolean-Ce2-qkSB.js +30 -0
  31. package/dist/boolean-Wzu0-e0P.js +30 -0
  32. package/dist/brew-CVZkr0GU.js +46 -0
  33. package/dist/brew-DAdyX1_1.js +46 -0
  34. package/dist/browser-cli-D_qgYDik.js +1679 -0
  35. package/dist/browser-cli-DldrdaCW.js +1676 -0
  36. package/dist/budget-ChKARYPY.js +132 -0
  37. package/dist/budget-Dspr6N_e.js +132 -0
  38. package/dist/build-info.json +5 -0
  39. package/dist/bundled/boot-md/HOOK.md +19 -0
  40. package/dist/bundled/boot-md/handler.js +861 -0
  41. package/dist/bundled/bootstrap-extra-files/HOOK.md +53 -0
  42. package/dist/bundled/bootstrap-extra-files/handler.js +39 -0
  43. package/dist/bundled/command-logger/HOOK.md +122 -0
  44. package/dist/bundled/command-logger/handler.js +55 -0
  45. package/dist/bundled/session-memory/HOOK.md +109 -0
  46. package/dist/bundled/session-memory/handler.js +128 -0
  47. package/dist/call-DPzNR_Qi.js +282 -0
  48. package/dist/call-ktoEhkOQ.js +282 -0
  49. package/dist/canvas-host/a2ui/.bundle.hash +1 -0
  50. package/dist/canvas-host/a2ui/a2ui.bundle.js +19040 -0
  51. package/dist/canvas-host/a2ui/index.html +307 -0
  52. package/dist/catalog-BAayBt1L.js +185 -0
  53. package/dist/catalog-BNsf97BM.js +185 -0
  54. package/dist/channel-options-C3GV4Fgg.js +33 -0
  55. package/dist/channel-options-DJ4GNfwk.js +32 -0
  56. package/dist/channel-selection-CujyiWGM.js +51 -0
  57. package/dist/channel-selection-DfGpCyh2.js +51 -0
  58. package/dist/channel-web-D42mzlCJ.js +2162 -0
  59. package/dist/channels-cli-BAtARz4A.js +1306 -0
  60. package/dist/channels-cli-Ddo_tIRR.js +1304 -0
  61. package/dist/channels-status-issues-DBc1pU_R.js +18 -0
  62. package/dist/channels-status-issues-DjO9MHIG.js +18 -0
  63. package/dist/chrome-Bi6iZ5sG.js +1601 -0
  64. package/dist/chrome-DNSv7Cpy.js +1629 -0
  65. package/dist/chrome-DScZx4Lk.js +1601 -0
  66. package/dist/chunk-mxPVo000.js +348 -0
  67. package/dist/clack-prompter-B0kl7shw.js +92 -0
  68. package/dist/clack-prompter-B1YxZdRy.js +92 -0
  69. package/dist/cli/daemon-cli.js +9 -0
  70. package/dist/cli-D3hUnL_G.js +101 -0
  71. package/dist/cli-DDwD6VgH.js +99 -0
  72. package/dist/cli-session-CP7ZH2-6.js +5463 -0
  73. package/dist/cli-session-oXJQpenl.js +5408 -0
  74. package/dist/cli-utils-BTBABPX9.js +40 -0
  75. package/dist/cli-utils-DtAxdCte.js +40 -0
  76. package/dist/client-C1avc0vD.js +1692 -0
  77. package/dist/client-CC94YZrT.js +1692 -0
  78. package/dist/clipboard-B2fBy8tG.js +31 -0
  79. package/dist/clipboard-BbGnZskJ.js +31 -0
  80. package/dist/command-format-Clp46jkj.js +38 -0
  81. package/dist/command-format-DELazozB.js +52 -0
  82. package/dist/command-format-SkzzRqR1.js +52 -0
  83. package/dist/command-options-CSbuuqHr.js +8 -0
  84. package/dist/command-options-Cp1tf96a.js +8 -0
  85. package/dist/command-registry-DDGudZEQ.js +248 -0
  86. package/dist/commands-CRcFD5MO.js +509 -0
  87. package/dist/commands-Dh40OpQL.js +509 -0
  88. package/dist/commands-registry-Bd0xbvwG.js +766 -0
  89. package/dist/commands-registry-DYfRSVF3.js +766 -0
  90. package/dist/common-D6bu0zHC.js +287 -0
  91. package/dist/common-zW9Y2P1B.js +287 -0
  92. package/dist/completion-cli-B9Cn374l.js +431 -0
  93. package/dist/completion-cli-BEHghUFx.js +432 -0
  94. package/dist/config-Bmm8tmZF.js +6523 -0
  95. package/dist/config-CHc5qzaI.js +5704 -0
  96. package/dist/config-Co6UXXF5.js +11 -0
  97. package/dist/config-Xm0j9LUa.js +5705 -0
  98. package/dist/config-cli-9ZbCHoV8.js +247 -0
  99. package/dist/config-cli-sxuGl29N.js +244 -0
  100. package/dist/config-guard-BwRD-b9Z.js +93 -0
  101. package/dist/config-guard-Dy7wyhAX.js +76 -0
  102. package/dist/config-sync-Bllc1TJ4.js +89 -0
  103. package/dist/config-sync-mfuOoGHl.js +89 -0
  104. package/dist/configure-CCyVzQZ7.js +1006 -0
  105. package/dist/configure-Nntbxt4t.js +1008 -0
  106. package/dist/constants-BwBn5CGe.js +65 -0
  107. package/dist/constants-O8yBqCBv.js +65 -0
  108. package/dist/context-DKaQYnCH.js +60 -0
  109. package/dist/control-service-BeOtZCCS.js +72 -0
  110. package/dist/control-service-vyKJ-XUp.js +72 -0
  111. package/dist/cron-cli-BasqtsJ0.js +451 -0
  112. package/dist/cron-cli-C8XzIpyX.js +448 -0
  113. package/dist/daemon-cli-cwL2GI5i.js +565 -0
  114. package/dist/daemon-cli-sjDh2xbf.js +566 -0
  115. package/dist/daemon-cli.js +13117 -0
  116. package/dist/daemon-runtime-BuMT6nck.js +460 -0
  117. package/dist/daemon-runtime-CTvi3m4D.js +460 -0
  118. package/dist/dangerous-tools-5ObDWy1N.js +32 -0
  119. package/dist/dangerous-tools-Jwr7jqNw.js +32 -0
  120. package/dist/deliver-D6cdhg5m.js +1097 -0
  121. package/dist/deliver-DlNDKlA4.js +1162 -0
  122. package/dist/deliver-bC6iI_rv.js +1097 -0
  123. package/dist/delivery-queue-B6IHz4Ry.js +220 -0
  124. package/dist/delivery-queue-TnQykYsg.js +220 -0
  125. package/dist/deps-C9kDG-Ru.js +42 -0
  126. package/dist/devices-cli-BE-Nib4Y.js +198 -0
  127. package/dist/devices-cli-GyPlNRyd.js +195 -0
  128. package/dist/diagnostics-Dj75aEHN.js +35 -0
  129. package/dist/diagnostics-DlIw6fqD.js +35 -0
  130. package/dist/directory-cli-BEaIvWkc.js +246 -0
  131. package/dist/directory-cli-CZ_-DP5Z.js +243 -0
  132. package/dist/dispatcher-Bkcui7jz.js +100 -0
  133. package/dist/dispatcher-C1B6cT_7.js +100 -0
  134. package/dist/display-A8k-mxv8.js +171 -0
  135. package/dist/display-BDOsXu8F.js +171 -0
  136. package/dist/dns-cli-BUzpVoMv.js +200 -0
  137. package/dist/dns-cli-DstQOMQt.js +197 -0
  138. package/dist/dock-DbxBBv30.js +753 -0
  139. package/dist/dock-cPBY4qGl.js +753 -0
  140. package/dist/docs-cli-BWp6p-Tq.js +161 -0
  141. package/dist/docs-cli-x22FnZfL.js +159 -0
  142. package/dist/doctor-B5HFw-nC.js +1813 -0
  143. package/dist/doctor-DnEyqGcQ.js +1815 -0
  144. package/dist/doctor-completion-BMEPXgVg.js +92 -0
  145. package/dist/doctor-completion-usPeH2ol.js +92 -0
  146. package/dist/doctor-config-flow-CS0WFnjL.js +1232 -0
  147. package/dist/doctor-config-flow-Cs4O_Kmq.js +1232 -0
  148. package/dist/engine-DgK9s3lk.js +561 -0
  149. package/dist/engine-ZSd5I5JN.js +561 -0
  150. package/dist/entry.js +1560 -0
  151. package/dist/env-0lJfCPsw.js +32 -0
  152. package/dist/errors-A_GqUU6B.js +26 -0
  153. package/dist/errors-CHow2wtt.js +37 -0
  154. package/dist/errors-Cojm0Kl7.js +37 -0
  155. package/dist/exec-BenD3A5l.js +1167 -0
  156. package/dist/exec-BizYYQgP.js +255 -0
  157. package/dist/exec-Bv3pyjeM.js +255 -0
  158. package/dist/exec-approvals-BP9AhCSw.js +1221 -0
  159. package/dist/exec-approvals-CdLmKX2R.js +1221 -0
  160. package/dist/exec-approvals-cli-25CGlFNw.js +368 -0
  161. package/dist/exec-approvals-cli-BXZ-hOlT.js +371 -0
  162. package/dist/extensionAPI.js +8542 -0
  163. package/dist/format-CjKG6raZ.js +20 -0
  164. package/dist/format-Mq6iU0_5.js +20 -0
  165. package/dist/format-duration-Cm3xh8xz.js +58 -0
  166. package/dist/format-duration-DhWzz_5b.js +58 -0
  167. package/dist/format-relative-C6kUHuOj.js +55 -0
  168. package/dist/format-relative-sy9iviQN.js +55 -0
  169. package/dist/frontmatter-YijVi0FQ.js +204 -0
  170. package/dist/gateway-cli-B9uc0RCI.js +19971 -0
  171. package/dist/gateway-cli-D8Qz7kCf.js +19972 -0
  172. package/dist/gateway-rpc-Ch9mCYEB.js +28 -0
  173. package/dist/gateway-rpc-DBhcdLFs.js +28 -0
  174. package/dist/github-copilot-auth-D6ZErYqa.js +1418 -0
  175. package/dist/github-copilot-auth-DGmyWJms.js +1418 -0
  176. package/dist/gmail-setup-utils-BPo_LkKI.js +428 -0
  177. package/dist/gmail-setup-utils-D3Yqgor7.js +428 -0
  178. package/dist/health-DsTZaAzV.js +1258 -0
  179. package/dist/health-V6dGthLA.js +1253 -0
  180. package/dist/health-format-CdP99j3Y.js +208 -0
  181. package/dist/health-format-JEChH08S.js +208 -0
  182. package/dist/heartbeat-visibility-CkL00WRR.js +98 -0
  183. package/dist/heartbeat-visibility-Cmni9671.js +98 -0
  184. package/dist/help-format-DUBI91Ti.js +17 -0
  185. package/dist/help-format-Dl4bsrLI.js +17 -0
  186. package/dist/helpers-9N2Q5aZj.js +25 -0
  187. package/dist/helpers-DLgbkcEn.js +25 -0
  188. package/dist/helpers-ZKNRexvX.js +10 -0
  189. package/dist/helpers-eJFa4K6r.js +10 -0
  190. package/dist/hooks-cli-Cu0D0fPS.js +993 -0
  191. package/dist/hooks-cli-E63uffR6.js +991 -0
  192. package/dist/hooks-status-B-e96dZj.js +356 -0
  193. package/dist/hooks-status-C_9sE0ox.js +356 -0
  194. package/dist/image-ops-Dlt3T7th.js +541 -0
  195. package/dist/image-ops-omlvdfah.js +541 -0
  196. package/dist/index.js +499 -0
  197. package/dist/init-Bm04RagW.js +122 -0
  198. package/dist/init-CaJBf4p1.js +122 -0
  199. package/dist/input-provenance-BgwBljRz.js +35 -0
  200. package/dist/input-provenance-DJBdpeKk.js +35 -0
  201. package/dist/input-provenance-iu26y0GH.js +35 -0
  202. package/dist/installs-C2iMRBVz.js +383 -0
  203. package/dist/installs-D-cPGdCw.js +383 -0
  204. package/dist/internal-hooks-DFTIurVM.js +77 -0
  205. package/dist/ipv4-C5QxzriV.js +1964 -0
  206. package/dist/ipv4-TxR9wQCQ.js +1964 -0
  207. package/dist/is-main-Dt9DTcH1.js +25 -0
  208. package/dist/is-main-cB3p7uob.js +25 -0
  209. package/dist/lanes-CNxj3tit.js +232 -0
  210. package/dist/legacy-names-CKU7tKQR.js +8 -0
  211. package/dist/lifecycle-core-B_7XRcvF.js +388 -0
  212. package/dist/lifecycle-core-By83PVAK.js +387 -0
  213. package/dist/links-BfjHVTB_.js +15 -0
  214. package/dist/links-DPGe0OHw.js +15 -0
  215. package/dist/llm-slug-generator.js +62 -0
  216. package/dist/loader-6Qkyybg1.js +87 -0
  217. package/dist/loader-Dmc0KyQK.js +87 -0
  218. package/dist/logging-54nXj81z.js +1 -0
  219. package/dist/logging-BdnOSVPD.js +1 -0
  220. package/dist/logging-DB6BQmhi.js +15 -0
  221. package/dist/logging-mcb66J0p.js +15 -0
  222. package/dist/login--8D8kyRy.js +61 -0
  223. package/dist/login-C-ugYHKt.js +61 -0
  224. package/dist/login-CX5Q2fYl.js +59 -0
  225. package/dist/login-qr-BLmGvITg.js +321 -0
  226. package/dist/login-qr-BNtuXLKL.js +323 -0
  227. package/dist/login-qr-PcyTC7Ra.js +326 -0
  228. package/dist/logs-cli-BEQVkiXp.js +245 -0
  229. package/dist/logs-cli-CIqiVMkY.js +242 -0
  230. package/dist/manager-Bsy9ifug.js +3244 -0
  231. package/dist/manager-CDgcZ51c.js +3246 -0
  232. package/dist/manager-D7QQ5XrE.js +3244 -0
  233. package/dist/manifest-registry-CW1zCyRF.js +748 -0
  234. package/dist/manifest-registry-D4lM2RdV.js +748 -0
  235. package/dist/markdown-tables-BT1X6jqH.js +347 -0
  236. package/dist/markdown-tables-DHgOK2vI.js +348 -0
  237. package/dist/media-THyainiE.js +1342 -0
  238. package/dist/memory-cli-BmIyAOZm.js +869 -0
  239. package/dist/memory-cli-BoXdfCLT.js +868 -0
  240. package/dist/message-channel-dSTVVCyX.js +110 -0
  241. package/dist/message-channel-w4F2b2F6.js +110 -0
  242. package/dist/migrate-BR6iAIjO.js +157 -0
  243. package/dist/migrate-D0EcMs0f.js +157 -0
  244. package/dist/mime-B1ZoR53M.js +145 -0
  245. package/dist/mime-Bm1xTtpY.js +145 -0
  246. package/dist/mime-C1RlpUSs.js +145 -0
  247. package/dist/model-param-b-C4BL7w0Z.js +16 -0
  248. package/dist/model-param-b-DPwyNGn8.js +16 -0
  249. package/dist/model-selection-BnEobs_z.js +2692 -0
  250. package/dist/models-KLd8Evmq.js +2545 -0
  251. package/dist/models-cli-D4UFQLid.js +258 -0
  252. package/dist/models-cli-DJHs5rJF.js +2739 -0
  253. package/dist/net-B5lXhYLV.js +218 -0
  254. package/dist/net-CDi_lJMH.js +88 -0
  255. package/dist/node-cli-BNCJUkgA.js +1319 -0
  256. package/dist/node-cli-C7S0vk0_.js +1322 -0
  257. package/dist/node-match-8XZnaid6.js +34 -0
  258. package/dist/node-match-B3Osv-5C.js +34 -0
  259. package/dist/node-service-BFxHJsno.js +67 -0
  260. package/dist/node-service-DUnan4uK.js +67 -0
  261. package/dist/nodes-cli-DOXhYgc8.js +1200 -0
  262. package/dist/nodes-cli-wvPZ3HwH.js +1197 -0
  263. package/dist/nodes-screen-1YiLkqr5.js +234 -0
  264. package/dist/nodes-screen-DZeD8hE5.js +234 -0
  265. package/dist/normalize-Dlcj9D3K.js +52 -0
  266. package/dist/normalize-GDK8JTNW.js +52 -0
  267. package/dist/note-Bi8Wb8DV.js +73 -0
  268. package/dist/note-uiuPxhyX.js +73 -0
  269. package/dist/npm-registry-spec-B-XIShkB.js +351 -0
  270. package/dist/npm-registry-spec-za3itb5Y.js +351 -0
  271. package/dist/onboard-DiTRW6CH.js +1165 -0
  272. package/dist/onboard-channels-BgruIpyg.js +672 -0
  273. package/dist/onboard-channels-gyq0VHHp.js +672 -0
  274. package/dist/onboard-helpers-BEaUind0.js +365 -0
  275. package/dist/onboard-helpers-f5Zprayl.js +365 -0
  276. package/dist/onboard-lH3XPWAK.js +1166 -0
  277. package/dist/onboarding-D0FOkXGt.js +910 -0
  278. package/dist/onboarding-kQVgbiIR.js +911 -0
  279. package/dist/openclaw-root-0yHXtO35.js +88 -0
  280. package/dist/openclaw-root-C85WMnVV.js +88 -0
  281. package/dist/orchestrator-CYTk7mq6.js +355 -0
  282. package/dist/orchestrator-J6ELnJXl.js +355 -0
  283. package/dist/outbound-BEq0qbPR.js +214 -0
  284. package/dist/outbound-BSVD-rjk.js +2062 -0
  285. package/dist/outbound-DXijk0db.js +214 -0
  286. package/dist/outbound-send-deps-ANnAhImn.js +14 -0
  287. package/dist/outbound-send-deps-BNGPU7jV.js +55 -0
  288. package/dist/pairing-cli-DKUyb6eK.js +118 -0
  289. package/dist/pairing-cli-ET2p_mXH.js +121 -0
  290. package/dist/pairing-store-CGYSwICJ.js +388 -0
  291. package/dist/pairing-store-DqQPqRMe.js +388 -0
  292. package/dist/parse-6-2MDhdT.js +23 -0
  293. package/dist/parse-CpunmTOS.js +23 -0
  294. package/dist/parse-log-line-Bqh1SSzC.js +44 -0
  295. package/dist/parse-log-line-DUZCjXbl.js +44 -0
  296. package/dist/parse-port-BKB9Exlg.js +12 -0
  297. package/dist/parse-port-DrfvwwiL.js +12 -0
  298. package/dist/parse-timeout-Di_tcEmi.js +16 -0
  299. package/dist/parse-timeout-vVlESvju.js +16 -0
  300. package/dist/path-env-Bu6k0jDQ.js +89 -0
  301. package/dist/path-env-C0zQSjw8.js +89 -0
  302. package/dist/paths-BTc4nk-6.js +126 -0
  303. package/dist/paths-BgUi2Z2G.js +54 -0
  304. package/dist/paths-C6VCWKo3.js +238 -0
  305. package/dist/paths-CCxa0o9c.js +222 -0
  306. package/dist/paths-CxRf2rBG.js +129 -0
  307. package/dist/paths-DcVEkYX5.js +54 -0
  308. package/dist/paths-hcX1Gqg5.js +129 -0
  309. package/dist/pi-auth-json-BzX-qyRo.js +82 -0
  310. package/dist/pi-auth-json-eesA38iW.js +78 -0
  311. package/dist/pi-auth-json-uEDdgg8K.js +80 -0
  312. package/dist/pi-embedded-C1Nl7L89.js +22 -0
  313. package/dist/pi-model-discovery-BkqhoPls.js +20 -0
  314. package/dist/pi-model-discovery-CQOWUAmK.js +3 -0
  315. package/dist/pi-model-discovery-DsRqYJLy.js +20 -0
  316. package/dist/pi-tools.policy-D9AUlreI.js +200 -0
  317. package/dist/pi-tools.policy-DRDm3v-2.js +200 -0
  318. package/dist/plugin-auto-enable-C-JwYMlZ.js +282 -0
  319. package/dist/plugin-auto-enable-DLIDBBfi.js +282 -0
  320. package/dist/plugin-registry-Bp8mivr-.js +32 -0
  321. package/dist/plugin-registry-CP7KgCvC.js +32 -0
  322. package/dist/plugin-sdk/account-id.d.ts +1 -0
  323. package/dist/plugin-sdk/account-id.js +15 -0
  324. package/dist/plugin-sdk/agents/agent-paths.d.ts +6 -0
  325. package/dist/plugin-sdk/agents/agent-scope.d.ts +37 -0
  326. package/dist/plugin-sdk/agents/anima-tools.d.ts +1 -0
  327. package/dist/plugin-sdk/agents/apply-patch-update.d.ts +10 -0
  328. package/dist/plugin-sdk/agents/apply-patch.d.ts +35 -0
  329. package/dist/plugin-sdk/agents/auth-profiles/constants.d.ts +20 -0
  330. package/dist/plugin-sdk/agents/auth-profiles/display.d.ts +7 -0
  331. package/dist/plugin-sdk/agents/auth-profiles/doctor.d.ts +8 -0
  332. package/dist/plugin-sdk/agents/auth-profiles/external-cli-sync.d.ts +7 -0
  333. package/dist/plugin-sdk/agents/auth-profiles/oauth.d.ts +12 -0
  334. package/dist/plugin-sdk/agents/auth-profiles/order.d.ts +8 -0
  335. package/dist/plugin-sdk/agents/auth-profiles/paths.d.ts +4 -0
  336. package/dist/plugin-sdk/agents/auth-profiles/profiles.d.ts +23 -0
  337. package/dist/plugin-sdk/agents/auth-profiles/repair.d.ts +14 -0
  338. package/dist/plugin-sdk/agents/auth-profiles/session-override.d.ts +18 -0
  339. package/dist/plugin-sdk/agents/auth-profiles/store.d.ts +10 -0
  340. package/dist/plugin-sdk/agents/auth-profiles/types.d.ts +60 -0
  341. package/dist/plugin-sdk/agents/auth-profiles/usage.d.ts +47 -0
  342. package/dist/plugin-sdk/agents/auth-profiles.d.ts +11 -0
  343. package/dist/plugin-sdk/agents/bash-process-registry.d.ts +70 -0
  344. package/dist/plugin-sdk/agents/bash-tools.d.ts +4 -0
  345. package/dist/plugin-sdk/agents/bash-tools.exec-runtime.d.ts +73 -0
  346. package/dist/plugin-sdk/agents/bash-tools.exec.d.ts +55 -0
  347. package/dist/plugin-sdk/agents/bash-tools.process.d.ts +7 -0
  348. package/dist/plugin-sdk/agents/bash-tools.shared.d.ts +48 -0
  349. package/dist/plugin-sdk/agents/bedrock-discovery.d.ts +9 -0
  350. package/dist/plugin-sdk/agents/bootstrap-files.d.ts +25 -0
  351. package/dist/plugin-sdk/agents/bootstrap-hooks.d.ts +10 -0
  352. package/dist/plugin-sdk/agents/channel-tools.d.ts +27 -0
  353. package/dist/plugin-sdk/agents/chutes-oauth.d.ts +46 -0
  354. package/dist/plugin-sdk/agents/cli-backends.d.ts +8 -0
  355. package/dist/plugin-sdk/agents/cli-credentials.d.ts +83 -0
  356. package/dist/plugin-sdk/agents/cli-runner/helpers.d.ts +76 -0
  357. package/dist/plugin-sdk/agents/cli-runner.d.ts +41 -0
  358. package/dist/plugin-sdk/agents/cli-session.d.ts +3 -0
  359. package/dist/plugin-sdk/agents/cloudflare-ai-gateway.d.ts +22 -0
  360. package/dist/plugin-sdk/agents/context.d.ts +1 -0
  361. package/dist/plugin-sdk/agents/current-time.d.ts +17 -0
  362. package/dist/plugin-sdk/agents/date-time.d.ts +13 -0
  363. package/dist/plugin-sdk/agents/defaults.d.ts +3 -0
  364. package/dist/plugin-sdk/agents/docs-path.d.ts +6 -0
  365. package/dist/plugin-sdk/agents/failover-error.d.ts +33 -0
  366. package/dist/plugin-sdk/agents/glob-pattern.d.ts +18 -0
  367. package/dist/plugin-sdk/agents/huggingface-models.d.ts +17 -0
  368. package/dist/plugin-sdk/agents/identity-avatar.d.ts +15 -0
  369. package/dist/plugin-sdk/agents/identity-file.d.ts +12 -0
  370. package/dist/plugin-sdk/agents/identity.d.ts +25 -0
  371. package/dist/plugin-sdk/agents/lanes.d.ts +3 -0
  372. package/dist/plugin-sdk/agents/memory-search.d.ts +66 -0
  373. package/dist/plugin-sdk/agents/minimax-vlm.d.ts +7 -0
  374. package/dist/plugin-sdk/agents/model-alias-lines.d.ts +2 -0
  375. package/dist/plugin-sdk/agents/model-auth.d.ts +36 -0
  376. package/dist/plugin-sdk/agents/model-catalog.d.ts +25 -0
  377. package/dist/plugin-sdk/agents/model-fallback.d.ts +40 -0
  378. package/dist/plugin-sdk/agents/model-selection.d.ts +94 -0
  379. package/dist/plugin-sdk/agents/models-config.d.ts +13 -0
  380. package/dist/plugin-sdk/agents/models-config.providers.d.ts +37 -0
  381. package/dist/plugin-sdk/agents/ollama-stream.d.ts +45 -0
  382. package/dist/plugin-sdk/agents/openclaw-tools.d.ts +46 -0
  383. package/dist/plugin-sdk/agents/pi-auth-json.d.ts +14 -0
  384. package/dist/plugin-sdk/agents/pi-embedded-helpers.d.ts +7 -0
  385. package/dist/plugin-sdk/agents/pi-embedded-runner/model.d.ts +1 -0
  386. package/dist/plugin-sdk/agents/pi-embedded-runner/run/params.d.ts +5 -0
  387. package/dist/plugin-sdk/agents/pi-embedded-runner.d.ts +25 -0
  388. package/dist/plugin-sdk/agents/pi-embedded-utils.d.ts +7 -0
  389. package/dist/plugin-sdk/agents/pi-embedded.d.ts +25 -0
  390. package/dist/plugin-sdk/agents/pi-model-discovery.d.ts +4 -0
  391. package/dist/plugin-sdk/agents/pi-settings.d.ts +19 -0
  392. package/dist/plugin-sdk/agents/pi-tools.abort.d.ts +2 -0
  393. package/dist/plugin-sdk/agents/pi-tools.before-tool-call.d.ts +29 -0
  394. package/dist/plugin-sdk/agents/pi-tools.d.ts +69 -0
  395. package/dist/plugin-sdk/agents/pi-tools.policy.d.ts +37 -0
  396. package/dist/plugin-sdk/agents/pi-tools.read.d.ts +44 -0
  397. package/dist/plugin-sdk/agents/pi-tools.schema.d.ts +3 -0
  398. package/dist/plugin-sdk/agents/pi-tools.types.d.ts +2 -0
  399. package/dist/plugin-sdk/agents/pty-dsr.d.ts +5 -0
  400. package/dist/plugin-sdk/agents/pty-keys.d.ts +13 -0
  401. package/dist/plugin-sdk/agents/sandbox/browser-bridges.d.ts +7 -0
  402. package/dist/plugin-sdk/agents/sandbox/browser.d.ts +12 -0
  403. package/dist/plugin-sdk/agents/sandbox/config-hash.d.ts +17 -0
  404. package/dist/plugin-sdk/agents/sandbox/config.d.ts +26 -0
  405. package/dist/plugin-sdk/agents/sandbox/constants.d.ts +19 -0
  406. package/dist/plugin-sdk/agents/sandbox/context.d.ts +12 -0
  407. package/dist/plugin-sdk/agents/sandbox/docker.d.ts +40 -0
  408. package/dist/plugin-sdk/agents/sandbox/fs-bridge.d.ts +56 -0
  409. package/dist/plugin-sdk/agents/sandbox/fs-paths.d.ts +28 -0
  410. package/dist/plugin-sdk/agents/sandbox/manage.d.ts +13 -0
  411. package/dist/plugin-sdk/agents/sandbox/prune.d.ts +3 -0
  412. package/dist/plugin-sdk/agents/sandbox/registry.d.ts +31 -0
  413. package/dist/plugin-sdk/agents/sandbox/runtime-status.d.ts +18 -0
  414. package/dist/plugin-sdk/agents/sandbox/shared.d.ts +4 -0
  415. package/dist/plugin-sdk/agents/sandbox/tool-policy.d.ts +4 -0
  416. package/dist/plugin-sdk/agents/sandbox/types.d.ts +76 -0
  417. package/dist/plugin-sdk/agents/sandbox/types.docker.d.ts +25 -0
  418. package/dist/plugin-sdk/agents/sandbox/workspace.d.ts +1 -0
  419. package/dist/plugin-sdk/agents/sandbox-paths.d.ts +23 -0
  420. package/dist/plugin-sdk/agents/sandbox.d.ts +8 -0
  421. package/dist/plugin-sdk/agents/schema/clean-for-gemini.d.ts +2 -0
  422. package/dist/plugin-sdk/agents/schema/typebox.d.ts +14 -0
  423. package/dist/plugin-sdk/agents/session-slug.d.ts +1 -0
  424. package/dist/plugin-sdk/agents/session-write-lock.d.ts +21 -0
  425. package/dist/plugin-sdk/agents/shell-utils.d.ts +7 -0
  426. package/dist/plugin-sdk/agents/skills/bundled-dir.d.ts +7 -0
  427. package/dist/plugin-sdk/agents/skills/config.d.ts +13 -0
  428. package/dist/plugin-sdk/agents/skills/env-overrides.d.ts +10 -0
  429. package/dist/plugin-sdk/agents/skills/frontmatter.d.ts +6 -0
  430. package/dist/plugin-sdk/agents/skills/plugin-skills.d.ts +5 -0
  431. package/dist/plugin-sdk/agents/skills/refresh.d.ts +19 -0
  432. package/dist/plugin-sdk/agents/skills/serialize.d.ts +1 -0
  433. package/dist/plugin-sdk/agents/skills/types.d.ts +80 -0
  434. package/dist/plugin-sdk/agents/skills/workspace.d.ts +49 -0
  435. package/dist/plugin-sdk/agents/skills.d.ts +7 -0
  436. package/dist/plugin-sdk/agents/subagent-announce-queue.d.ts +23 -0
  437. package/dist/plugin-sdk/agents/subagent-announce.d.ts +34 -0
  438. package/dist/plugin-sdk/agents/subagent-depth.d.ts +11 -0
  439. package/dist/plugin-sdk/agents/subagent-registry.d.ts +62 -0
  440. package/dist/plugin-sdk/agents/subagent-registry.store.d.ts +5 -0
  441. package/dist/plugin-sdk/agents/synthetic-models.d.ts +160 -0
  442. package/dist/plugin-sdk/agents/system-prompt-params.d.ts +30 -0
  443. package/dist/plugin-sdk/agents/system-prompt-report.d.ts +20 -0
  444. package/dist/plugin-sdk/agents/system-prompt.d.ts +78 -0
  445. package/dist/plugin-sdk/agents/timeout.d.ts +8 -0
  446. package/dist/plugin-sdk/agents/together-models.d.ts +4 -0
  447. package/dist/plugin-sdk/agents/tool-images.d.ts +19 -0
  448. package/dist/plugin-sdk/agents/tool-policy-pipeline.d.ts +27 -0
  449. package/dist/plugin-sdk/agents/tool-policy.d.ts +39 -0
  450. package/dist/plugin-sdk/agents/tool-summaries.d.ts +2 -0
  451. package/dist/plugin-sdk/agents/tools/agent-step.d.ts +15 -0
  452. package/dist/plugin-sdk/agents/tools/agents-list-tool.d.ts +6 -0
  453. package/dist/plugin-sdk/agents/tools/browser-tool.d.ts +5 -0
  454. package/dist/plugin-sdk/agents/tools/browser-tool.schema.d.ts +50 -0
  455. package/dist/plugin-sdk/agents/tools/canvas-tool.d.ts +2 -0
  456. package/dist/plugin-sdk/agents/tools/common.d.ts +56 -0
  457. package/dist/plugin-sdk/agents/tools/cron-tool.d.ts +6 -0
  458. package/dist/plugin-sdk/agents/tools/discord-actions-guild.d.ts +4 -0
  459. package/dist/plugin-sdk/agents/tools/discord-actions-messaging.d.ts +4 -0
  460. package/dist/plugin-sdk/agents/tools/discord-actions-moderation.d.ts +4 -0
  461. package/dist/plugin-sdk/agents/tools/discord-actions-presence.d.ts +4 -0
  462. package/dist/plugin-sdk/agents/tools/discord-actions.d.ts +3 -0
  463. package/dist/plugin-sdk/agents/tools/gateway-tool.d.ts +6 -0
  464. package/dist/plugin-sdk/agents/tools/gateway.d.ts +14 -0
  465. package/dist/plugin-sdk/agents/tools/image-tool.d.ts +35 -0
  466. package/dist/plugin-sdk/agents/tools/image-tool.helpers.d.ts +21 -0
  467. package/dist/plugin-sdk/agents/tools/memory-tool.d.ts +10 -0
  468. package/dist/plugin-sdk/agents/tools/message-tool.d.ts +18 -0
  469. package/dist/plugin-sdk/agents/tools/nodes-tool.d.ts +6 -0
  470. package/dist/plugin-sdk/agents/tools/nodes-utils.d.ts +20 -0
  471. package/dist/plugin-sdk/agents/tools/session-status-tool.d.ts +6 -0
  472. package/dist/plugin-sdk/agents/tools/sessions-announce-target.d.ts +5 -0
  473. package/dist/plugin-sdk/agents/tools/sessions-helpers.d.ts +90 -0
  474. package/dist/plugin-sdk/agents/tools/sessions-history-tool.d.ts +5 -0
  475. package/dist/plugin-sdk/agents/tools/sessions-list-tool.d.ts +5 -0
  476. package/dist/plugin-sdk/agents/tools/sessions-send-helpers.d.ts +34 -0
  477. package/dist/plugin-sdk/agents/tools/sessions-send-tool.a2a.d.ts +12 -0
  478. package/dist/plugin-sdk/agents/tools/sessions-send-tool.d.ts +7 -0
  479. package/dist/plugin-sdk/agents/tools/sessions-spawn-tool.d.ts +15 -0
  480. package/dist/plugin-sdk/agents/tools/slack-actions.d.ts +15 -0
  481. package/dist/plugin-sdk/agents/tools/subagents-tool.d.ts +4 -0
  482. package/dist/plugin-sdk/agents/tools/telegram-actions.d.ts +9 -0
  483. package/dist/plugin-sdk/agents/tools/tts-tool.d.ts +7 -0
  484. package/dist/plugin-sdk/agents/tools/web-fetch-utils.d.ts +18 -0
  485. package/dist/plugin-sdk/agents/tools/web-fetch.d.ts +25 -0
  486. package/dist/plugin-sdk/agents/tools/web-search.d.ts +71 -0
  487. package/dist/plugin-sdk/agents/tools/web-shared.d.ts +17 -0
  488. package/dist/plugin-sdk/agents/tools/web-tools.d.ts +2 -0
  489. package/dist/plugin-sdk/agents/tools/whatsapp-actions.d.ts +3 -0
  490. package/dist/plugin-sdk/agents/usage.d.ts +45 -0
  491. package/dist/plugin-sdk/agents/venice-models.d.ts +238 -0
  492. package/dist/plugin-sdk/agents/workspace-dir.d.ts +2 -0
  493. package/dist/plugin-sdk/agents/workspace-run.d.ts +18 -0
  494. package/dist/plugin-sdk/agents/workspace-templates.d.ts +6 -0
  495. package/dist/plugin-sdk/agents/workspace.d.ts +34 -0
  496. package/dist/plugin-sdk/auto-reply/chunk.d.ts +45 -0
  497. package/dist/plugin-sdk/auto-reply/command-auth.d.ts +17 -0
  498. package/dist/plugin-sdk/auto-reply/command-detection.d.ts +13 -0
  499. package/dist/plugin-sdk/auto-reply/commands-args.d.ts +3 -0
  500. package/dist/plugin-sdk/auto-reply/commands-registry.d.ts +54 -0
  501. package/dist/plugin-sdk/auto-reply/commands-registry.data.d.ts +3 -0
  502. package/dist/plugin-sdk/auto-reply/commands-registry.types.d.ts +66 -0
  503. package/dist/plugin-sdk/auto-reply/dispatch.d.ts +32 -0
  504. package/dist/plugin-sdk/auto-reply/envelope.d.ts +58 -0
  505. package/dist/plugin-sdk/auto-reply/group-activation.d.ts +6 -0
  506. package/dist/plugin-sdk/auto-reply/heartbeat-reply-payload.d.ts +2 -0
  507. package/dist/plugin-sdk/auto-reply/heartbeat.d.ts +26 -0
  508. package/dist/plugin-sdk/auto-reply/inbound-debounce.d.ts +16 -0
  509. package/dist/plugin-sdk/auto-reply/media-note.d.ts +2 -0
  510. package/dist/plugin-sdk/auto-reply/model.d.ts +8 -0
  511. package/dist/plugin-sdk/auto-reply/reply/abort.d.ts +22 -0
  512. package/dist/plugin-sdk/auto-reply/reply/agent-runner-execution.d.ts +49 -0
  513. package/dist/plugin-sdk/auto-reply/reply/agent-runner-helpers.d.ts +17 -0
  514. package/dist/plugin-sdk/auto-reply/reply/agent-runner-memory.d.ts +20 -0
  515. package/dist/plugin-sdk/auto-reply/reply/agent-runner-payloads.d.ts +25 -0
  516. package/dist/plugin-sdk/auto-reply/reply/agent-runner-utils.d.ts +30 -0
  517. package/dist/plugin-sdk/auto-reply/reply/agent-runner.d.ts +38 -0
  518. package/dist/plugin-sdk/auto-reply/reply/bash-command.d.ts +19 -0
  519. package/dist/plugin-sdk/auto-reply/reply/block-reply-coalescer.d.ts +15 -0
  520. package/dist/plugin-sdk/auto-reply/reply/block-reply-pipeline.d.ts +31 -0
  521. package/dist/plugin-sdk/auto-reply/reply/block-streaming.d.ts +22 -0
  522. package/dist/plugin-sdk/auto-reply/reply/body.d.ts +10 -0
  523. package/dist/plugin-sdk/auto-reply/reply/commands-allowlist.d.ts +2 -0
  524. package/dist/plugin-sdk/auto-reply/reply/commands-approve.d.ts +2 -0
  525. package/dist/plugin-sdk/auto-reply/reply/commands-bash.d.ts +2 -0
  526. package/dist/plugin-sdk/auto-reply/reply/commands-compact.d.ts +2 -0
  527. package/dist/plugin-sdk/auto-reply/reply/commands-config.d.ts +3 -0
  528. package/dist/plugin-sdk/auto-reply/reply/commands-context-report.d.ts +3 -0
  529. package/dist/plugin-sdk/auto-reply/reply/commands-context.d.ts +12 -0
  530. package/dist/plugin-sdk/auto-reply/reply/commands-core.d.ts +2 -0
  531. package/dist/plugin-sdk/auto-reply/reply/commands-info.d.ts +10 -0
  532. package/dist/plugin-sdk/auto-reply/reply/commands-models.d.ts +23 -0
  533. package/dist/plugin-sdk/auto-reply/reply/commands-plugin.d.ts +13 -0
  534. package/dist/plugin-sdk/auto-reply/reply/commands-session.d.ts +7 -0
  535. package/dist/plugin-sdk/auto-reply/reply/commands-status.d.ts +25 -0
  536. package/dist/plugin-sdk/auto-reply/reply/commands-subagents.d.ts +13 -0
  537. package/dist/plugin-sdk/auto-reply/reply/commands-tts.d.ts +2 -0
  538. package/dist/plugin-sdk/auto-reply/reply/commands-types.d.ts +60 -0
  539. package/dist/plugin-sdk/auto-reply/reply/commands.d.ts +4 -0
  540. package/dist/plugin-sdk/auto-reply/reply/config-commands.d.ts +15 -0
  541. package/dist/plugin-sdk/auto-reply/reply/config-value.d.ts +4 -0
  542. package/dist/plugin-sdk/auto-reply/reply/debug-commands.d.ts +16 -0
  543. package/dist/plugin-sdk/auto-reply/reply/directive-handling.auth.d.ts +19 -0
  544. package/dist/plugin-sdk/auto-reply/reply/directive-handling.d.ts +6 -0
  545. package/dist/plugin-sdk/auto-reply/reply/directive-handling.fast-lane.d.ts +7 -0
  546. package/dist/plugin-sdk/auto-reply/reply/directive-handling.impl.d.ts +3 -0
  547. package/dist/plugin-sdk/auto-reply/reply/directive-handling.model-picker.d.ts +13 -0
  548. package/dist/plugin-sdk/auto-reply/reply/directive-handling.model.d.ts +42 -0
  549. package/dist/plugin-sdk/auto-reply/reply/directive-handling.params.d.ts +51 -0
  550. package/dist/plugin-sdk/auto-reply/reply/directive-handling.parse.d.ts +62 -0
  551. package/dist/plugin-sdk/auto-reply/reply/directive-handling.persist.d.ts +37 -0
  552. package/dist/plugin-sdk/auto-reply/reply/directive-handling.queue-validation.d.ts +10 -0
  553. package/dist/plugin-sdk/auto-reply/reply/directive-handling.shared.d.ts +16 -0
  554. package/dist/plugin-sdk/auto-reply/reply/directive-parsing.d.ts +5 -0
  555. package/dist/plugin-sdk/auto-reply/reply/directives.d.ts +38 -0
  556. package/dist/plugin-sdk/auto-reply/reply/dispatch-from-config.d.ts +16 -0
  557. package/dist/plugin-sdk/auto-reply/reply/dispatcher-registry.d.ts +24 -0
  558. package/dist/plugin-sdk/auto-reply/reply/elevated-unavailable.d.ts +8 -0
  559. package/dist/plugin-sdk/auto-reply/reply/exec/directive.d.ts +20 -0
  560. package/dist/plugin-sdk/auto-reply/reply/exec.d.ts +1 -0
  561. package/dist/plugin-sdk/auto-reply/reply/followup-runner.d.ts +16 -0
  562. package/dist/plugin-sdk/auto-reply/reply/get-reply-directives-apply.d.ts +64 -0
  563. package/dist/plugin-sdk/auto-reply/reply/get-reply-directives-utils.d.ts +2 -0
  564. package/dist/plugin-sdk/auto-reply/reply/get-reply-directives.d.ts +92 -0
  565. package/dist/plugin-sdk/auto-reply/reply/get-reply-inline-actions.d.ts +59 -0
  566. package/dist/plugin-sdk/auto-reply/reply/get-reply-run.d.ts +69 -0
  567. package/dist/plugin-sdk/auto-reply/reply/get-reply.d.ts +4 -0
  568. package/dist/plugin-sdk/auto-reply/reply/groups.d.ts +26 -0
  569. package/dist/plugin-sdk/auto-reply/reply/history.d.ts +72 -0
  570. package/dist/plugin-sdk/auto-reply/reply/inbound-context.d.ts +8 -0
  571. package/dist/plugin-sdk/auto-reply/reply/inbound-dedupe.d.ts +8 -0
  572. package/dist/plugin-sdk/auto-reply/reply/inbound-meta.d.ts +3 -0
  573. package/dist/plugin-sdk/auto-reply/reply/inbound-text.d.ts +1 -0
  574. package/dist/plugin-sdk/auto-reply/reply/line-directives.d.ts +22 -0
  575. package/dist/plugin-sdk/auto-reply/reply/memory-flush.d.ts +23 -0
  576. package/dist/plugin-sdk/auto-reply/reply/mentions.d.ts +19 -0
  577. package/dist/plugin-sdk/auto-reply/reply/model-selection.d.ts +64 -0
  578. package/dist/plugin-sdk/auto-reply/reply/normalize-reply.d.ts +13 -0
  579. package/dist/plugin-sdk/auto-reply/reply/provider-dispatcher.d.ts +19 -0
  580. package/dist/plugin-sdk/auto-reply/reply/queue/cleanup.d.ts +6 -0
  581. package/dist/plugin-sdk/auto-reply/reply/queue/directive.d.ts +15 -0
  582. package/dist/plugin-sdk/auto-reply/reply/queue/drain.d.ts +2 -0
  583. package/dist/plugin-sdk/auto-reply/reply/queue/enqueue.d.ts +3 -0
  584. package/dist/plugin-sdk/auto-reply/reply/queue/normalize.d.ts +3 -0
  585. package/dist/plugin-sdk/auto-reply/reply/queue/settings.d.ts +2 -0
  586. package/dist/plugin-sdk/auto-reply/reply/queue/state.d.ts +19 -0
  587. package/dist/plugin-sdk/auto-reply/reply/queue/types.d.ts +84 -0
  588. package/dist/plugin-sdk/auto-reply/reply/queue.d.ts +8 -0
  589. package/dist/plugin-sdk/auto-reply/reply/reply-delivery.d.ts +27 -0
  590. package/dist/plugin-sdk/auto-reply/reply/reply-directives.d.ts +14 -0
  591. package/dist/plugin-sdk/auto-reply/reply/reply-dispatcher.d.ts +52 -0
  592. package/dist/plugin-sdk/auto-reply/reply/reply-elevated.d.ts +16 -0
  593. package/dist/plugin-sdk/auto-reply/reply/reply-inline.d.ts +8 -0
  594. package/dist/plugin-sdk/auto-reply/reply/reply-payloads.d.ts +22 -0
  595. package/dist/plugin-sdk/auto-reply/reply/reply-tags.d.ts +6 -0
  596. package/dist/plugin-sdk/auto-reply/reply/reply-threading.d.ts +9 -0
  597. package/dist/plugin-sdk/auto-reply/reply/response-prefix-template.d.ts +51 -0
  598. package/dist/plugin-sdk/auto-reply/reply/route-reply.d.ts +56 -0
  599. package/dist/plugin-sdk/auto-reply/reply/session-reset-model.d.ts +24 -0
  600. package/dist/plugin-sdk/auto-reply/reply/session-reset-prompt.d.ts +1 -0
  601. package/dist/plugin-sdk/auto-reply/reply/session-run-accounting.d.ts +11 -0
  602. package/dist/plugin-sdk/auto-reply/reply/session-updates.d.ts +34 -0
  603. package/dist/plugin-sdk/auto-reply/reply/session-usage.d.ts +21 -0
  604. package/dist/plugin-sdk/auto-reply/reply/session.d.ts +26 -0
  605. package/dist/plugin-sdk/auto-reply/reply/stage-sandbox-media.d.ts +9 -0
  606. package/dist/plugin-sdk/auto-reply/reply/subagents-utils.d.ts +7 -0
  607. package/dist/plugin-sdk/auto-reply/reply/typing-mode.d.ts +27 -0
  608. package/dist/plugin-sdk/auto-reply/reply/typing.d.ts +18 -0
  609. package/dist/plugin-sdk/auto-reply/reply/untrusted-context.d.ts +1 -0
  610. package/dist/plugin-sdk/auto-reply/reply.d.ts +6 -0
  611. package/dist/plugin-sdk/auto-reply/send-policy.d.ts +6 -0
  612. package/dist/plugin-sdk/auto-reply/skill-commands.d.ts +18 -0
  613. package/dist/plugin-sdk/auto-reply/status.d.ts +55 -0
  614. package/dist/plugin-sdk/auto-reply/templating.d.ts +152 -0
  615. package/dist/plugin-sdk/auto-reply/thinking.d.ts +22 -0
  616. package/dist/plugin-sdk/auto-reply/tokens.d.ts +3 -0
  617. package/dist/plugin-sdk/auto-reply/types.d.ts +61 -0
  618. package/dist/plugin-sdk/browser/bridge-auth-registry.d.ts +8 -0
  619. package/dist/plugin-sdk/browser/bridge-server.d.ts +18 -0
  620. package/dist/plugin-sdk/browser/cdp.d.ts +123 -0
  621. package/dist/plugin-sdk/browser/cdp.helpers.d.ts +13 -0
  622. package/dist/plugin-sdk/browser/chrome.d.ts +20 -0
  623. package/dist/plugin-sdk/browser/chrome.executables.d.ts +9 -0
  624. package/dist/plugin-sdk/browser/chrome.profile-decoration.d.ts +10 -0
  625. package/dist/plugin-sdk/browser/client-actions-core.d.ts +144 -0
  626. package/dist/plugin-sdk/browser/client-actions-observe.d.ts +68 -0
  627. package/dist/plugin-sdk/browser/client-actions-state.d.ts +90 -0
  628. package/dist/plugin-sdk/browser/client-actions-types.d.ts +18 -0
  629. package/dist/plugin-sdk/browser/client-actions.d.ts +4 -0
  630. package/dist/plugin-sdk/browser/client-fetch.d.ts +20 -0
  631. package/dist/plugin-sdk/browser/client.d.ts +147 -0
  632. package/dist/plugin-sdk/browser/config.d.ts +39 -0
  633. package/dist/plugin-sdk/browser/constants.d.ts +8 -0
  634. package/dist/plugin-sdk/browser/control-auth.d.ts +13 -0
  635. package/dist/plugin-sdk/browser/control-service.d.ts +5 -0
  636. package/dist/plugin-sdk/browser/csrf.d.ts +8 -0
  637. package/dist/plugin-sdk/browser/extension-relay.d.ts +15 -0
  638. package/dist/plugin-sdk/browser/http-auth.d.ts +5 -0
  639. package/dist/plugin-sdk/browser/paths.d.ts +27 -0
  640. package/dist/plugin-sdk/browser/profiles-service.d.ts +25 -0
  641. package/dist/plugin-sdk/browser/profiles.d.ts +30 -0
  642. package/dist/plugin-sdk/browser/proxy-files.d.ts +7 -0
  643. package/dist/plugin-sdk/browser/pw-ai-module.d.ts +6 -0
  644. package/dist/plugin-sdk/browser/pw-ai-state.d.ts +2 -0
  645. package/dist/plugin-sdk/browser/pw-ai.d.ts +2 -0
  646. package/dist/plugin-sdk/browser/pw-role-snapshot.d.ts +35 -0
  647. package/dist/plugin-sdk/browser/pw-session.d.ts +160 -0
  648. package/dist/plugin-sdk/browser/pw-tools-core.activity.d.ts +21 -0
  649. package/dist/plugin-sdk/browser/pw-tools-core.d.ts +8 -0
  650. package/dist/plugin-sdk/browser/pw-tools-core.downloads.d.ts +34 -0
  651. package/dist/plugin-sdk/browser/pw-tools-core.interactions.d.ts +114 -0
  652. package/dist/plugin-sdk/browser/pw-tools-core.responses.d.ts +13 -0
  653. package/dist/plugin-sdk/browser/pw-tools-core.shared.d.ts +6 -0
  654. package/dist/plugin-sdk/browser/pw-tools-core.snapshot.d.ts +64 -0
  655. package/dist/plugin-sdk/browser/pw-tools-core.state.d.ts +46 -0
  656. package/dist/plugin-sdk/browser/pw-tools-core.storage.d.ts +47 -0
  657. package/dist/plugin-sdk/browser/pw-tools-core.trace.d.ts +12 -0
  658. package/dist/plugin-sdk/browser/resolved-config-refresh.d.ts +12 -0
  659. package/dist/plugin-sdk/browser/routes/agent.act.d.ts +3 -0
  660. package/dist/plugin-sdk/browser/routes/agent.act.shared.d.ts +10 -0
  661. package/dist/plugin-sdk/browser/routes/agent.d.ts +3 -0
  662. package/dist/plugin-sdk/browser/routes/agent.debug.d.ts +3 -0
  663. package/dist/plugin-sdk/browser/routes/agent.shared.d.ts +9 -0
  664. package/dist/plugin-sdk/browser/routes/agent.snapshot.d.ts +3 -0
  665. package/dist/plugin-sdk/browser/routes/agent.storage.d.ts +3 -0
  666. package/dist/plugin-sdk/browser/routes/basic.d.ts +3 -0
  667. package/dist/plugin-sdk/browser/routes/dispatcher.d.ts +16 -0
  668. package/dist/plugin-sdk/browser/routes/index.d.ts +3 -0
  669. package/dist/plugin-sdk/browser/routes/path-output.d.ts +1 -0
  670. package/dist/plugin-sdk/browser/routes/tabs.d.ts +3 -0
  671. package/dist/plugin-sdk/browser/routes/types.d.ts +20 -0
  672. package/dist/plugin-sdk/browser/routes/utils.d.ts +15 -0
  673. package/dist/plugin-sdk/browser/screenshot.d.ts +9 -0
  674. package/dist/plugin-sdk/browser/server-context.d.ts +4 -0
  675. package/dist/plugin-sdk/browser/server-context.types.d.ts +79 -0
  676. package/dist/plugin-sdk/browser/server-middleware.d.ts +6 -0
  677. package/dist/plugin-sdk/browser/target-id.d.ts +11 -0
  678. package/dist/plugin-sdk/browser/trash.d.ts +1 -0
  679. package/dist/plugin-sdk/channel-web.d.ts +6 -0
  680. package/dist/plugin-sdk/channels/account-summary.d.ts +17 -0
  681. package/dist/plugin-sdk/channels/ack-reactions.d.ts +29 -0
  682. package/dist/plugin-sdk/channels/allowlist-match.d.ts +15 -0
  683. package/dist/plugin-sdk/channels/allowlists/resolve-utils.d.ts +20 -0
  684. package/dist/plugin-sdk/channels/channel-config.d.ts +39 -0
  685. package/dist/plugin-sdk/channels/chat-type.d.ts +2 -0
  686. package/dist/plugin-sdk/channels/command-gating.d.ts +20 -0
  687. package/dist/plugin-sdk/channels/conversation-label.d.ts +2 -0
  688. package/dist/plugin-sdk/channels/dock.d.ts +36 -0
  689. package/dist/plugin-sdk/channels/location.d.ts +21 -0
  690. package/dist/plugin-sdk/channels/logging.d.ts +20 -0
  691. package/dist/plugin-sdk/channels/mention-gating.d.ts +27 -0
  692. package/dist/plugin-sdk/channels/plugins/actions/discord/handle-action.d.ts +3 -0
  693. package/dist/plugin-sdk/channels/plugins/actions/discord/handle-action.guild-admin.d.ts +9 -0
  694. package/dist/plugin-sdk/channels/plugins/actions/discord.d.ts +2 -0
  695. package/dist/plugin-sdk/channels/plugins/actions/signal.d.ts +2 -0
  696. package/dist/plugin-sdk/channels/plugins/actions/telegram.d.ts +2 -0
  697. package/dist/plugin-sdk/channels/plugins/agent-tools/whatsapp-login.d.ts +2 -0
  698. package/dist/plugin-sdk/channels/plugins/allowlist-match.d.ts +2 -0
  699. package/dist/plugin-sdk/channels/plugins/bluebubbles-actions.d.ts +48 -0
  700. package/dist/plugin-sdk/channels/plugins/channel-config.d.ts +2 -0
  701. package/dist/plugin-sdk/channels/plugins/config-helpers.d.ts +14 -0
  702. package/dist/plugin-sdk/channels/plugins/config-schema.d.ts +3 -0
  703. package/dist/plugin-sdk/channels/plugins/config-writes.d.ts +7 -0
  704. package/dist/plugin-sdk/channels/plugins/directory-config.d.ts +16 -0
  705. package/dist/plugin-sdk/channels/plugins/group-mentions.d.ts +28 -0
  706. package/dist/plugin-sdk/channels/plugins/helpers.d.ts +8 -0
  707. package/dist/plugin-sdk/channels/plugins/index.d.ts +8 -0
  708. package/dist/plugin-sdk/channels/plugins/media-limits.d.ts +9 -0
  709. package/dist/plugin-sdk/channels/plugins/message-action-names.d.ts +2 -0
  710. package/dist/plugin-sdk/channels/plugins/message-actions.d.ts +7 -0
  711. package/dist/plugin-sdk/channels/plugins/normalize/discord.d.ts +2 -0
  712. package/dist/plugin-sdk/channels/plugins/normalize/imessage.d.ts +2 -0
  713. package/dist/plugin-sdk/channels/plugins/normalize/signal.d.ts +2 -0
  714. package/dist/plugin-sdk/channels/plugins/normalize/slack.d.ts +2 -0
  715. package/dist/plugin-sdk/channels/plugins/normalize/telegram.d.ts +2 -0
  716. package/dist/plugin-sdk/channels/plugins/normalize/whatsapp.d.ts +2 -0
  717. package/dist/plugin-sdk/channels/plugins/onboarding/channel-access.d.ts +31 -0
  718. package/dist/plugin-sdk/channels/plugins/onboarding/discord.d.ts +2 -0
  719. package/dist/plugin-sdk/channels/plugins/onboarding/helpers.d.ts +3 -0
  720. package/dist/plugin-sdk/channels/plugins/onboarding/imessage.d.ts +2 -0
  721. package/dist/plugin-sdk/channels/plugins/onboarding/signal.d.ts +3 -0
  722. package/dist/plugin-sdk/channels/plugins/onboarding/slack.d.ts +2 -0
  723. package/dist/plugin-sdk/channels/plugins/onboarding/telegram.d.ts +2 -0
  724. package/dist/plugin-sdk/channels/plugins/onboarding/whatsapp.d.ts +2 -0
  725. package/dist/plugin-sdk/channels/plugins/onboarding-types.d.ts +77 -0
  726. package/dist/plugin-sdk/channels/plugins/outbound/load.d.ts +2 -0
  727. package/dist/plugin-sdk/channels/plugins/pairing-message.d.ts +1 -0
  728. package/dist/plugin-sdk/channels/plugins/pairing.d.ts +16 -0
  729. package/dist/plugin-sdk/channels/plugins/setup-helpers.d.ts +13 -0
  730. package/dist/plugin-sdk/channels/plugins/status-issues/bluebubbles.d.ts +2 -0
  731. package/dist/plugin-sdk/channels/plugins/status-issues/discord.d.ts +2 -0
  732. package/dist/plugin-sdk/channels/plugins/status-issues/shared.d.ts +11 -0
  733. package/dist/plugin-sdk/channels/plugins/status-issues/telegram.d.ts +2 -0
  734. package/dist/plugin-sdk/channels/plugins/status-issues/whatsapp.d.ts +2 -0
  735. package/dist/plugin-sdk/channels/plugins/types.adapters.d.ts +297 -0
  736. package/dist/plugin-sdk/channels/plugins/types.core.d.ts +329 -0
  737. package/dist/plugin-sdk/channels/plugins/types.d.ts +6 -0
  738. package/dist/plugin-sdk/channels/plugins/types.plugin.d.ts +53 -0
  739. package/dist/plugin-sdk/channels/plugins/whatsapp-heartbeat.d.ts +11 -0
  740. package/dist/plugin-sdk/channels/registry.d.ts +16 -0
  741. package/dist/plugin-sdk/channels/reply-prefix.d.ts +24 -0
  742. package/dist/plugin-sdk/channels/sender-label.d.ts +9 -0
  743. package/dist/plugin-sdk/channels/session.d.ts +18 -0
  744. package/dist/plugin-sdk/channels/typing.d.ts +12 -0
  745. package/dist/plugin-sdk/channels/web/index.d.ts +1 -0
  746. package/dist/plugin-sdk/cli/cli-name.d.ts +3 -0
  747. package/dist/plugin-sdk/cli/cli-utils.d.ts +19 -0
  748. package/dist/plugin-sdk/cli/command-format.d.ts +1 -0
  749. package/dist/plugin-sdk/cli/deps.d.ts +18 -0
  750. package/dist/plugin-sdk/cli/memory-cli.d.ts +12 -0
  751. package/dist/plugin-sdk/cli/nodes-camera.d.ts +32 -0
  752. package/dist/plugin-sdk/cli/nodes-canvas.d.ts +10 -0
  753. package/dist/plugin-sdk/cli/nodes-run.d.ts +3 -0
  754. package/dist/plugin-sdk/cli/nodes-screen.d.ts +18 -0
  755. package/dist/plugin-sdk/cli/parse-bytes.d.ts +4 -0
  756. package/dist/plugin-sdk/cli/parse-duration.d.ts +4 -0
  757. package/dist/plugin-sdk/cli/parse-timeout.d.ts +1 -0
  758. package/dist/plugin-sdk/cli/profile-utils.d.ts +2 -0
  759. package/dist/plugin-sdk/cli/progress.d.ts +24 -0
  760. package/dist/plugin-sdk/cli/prompt.d.ts +1 -0
  761. package/dist/plugin-sdk/cli/wait.d.ts +1 -0
  762. package/dist/plugin-sdk/commands/agent/types.d.ts +77 -0
  763. package/dist/plugin-sdk/commands/daemon-runtime.d.ts +8 -0
  764. package/dist/plugin-sdk/commands/health.d.ts +63 -0
  765. package/dist/plugin-sdk/commands/oauth-flow.d.ts +21 -0
  766. package/dist/plugin-sdk/commands/onboard-helpers.d.ts +82 -0
  767. package/dist/plugin-sdk/commands/onboard-types.d.ts +76 -0
  768. package/dist/plugin-sdk/commands/signal-install.d.ts +30 -0
  769. package/dist/plugin-sdk/compat/legacy-names.d.ts +8 -0
  770. package/dist/plugin-sdk/config/agent-dirs.d.ts +14 -0
  771. package/dist/plugin-sdk/config/agent-limits.d.ts +5 -0
  772. package/dist/plugin-sdk/config/backup-rotation.d.ts +5 -0
  773. package/dist/plugin-sdk/config/cache-utils.d.ts +6 -0
  774. package/dist/plugin-sdk/config/config-paths.d.ts +10 -0
  775. package/dist/plugin-sdk/config/config.d.ts +7 -0
  776. package/dist/plugin-sdk/config/defaults.d.ts +18 -0
  777. package/dist/plugin-sdk/config/env-preserve.d.ts +25 -0
  778. package/dist/plugin-sdk/config/env-substitution.d.ts +36 -0
  779. package/dist/plugin-sdk/config/env-vars.d.ts +3 -0
  780. package/dist/plugin-sdk/config/group-policy.d.ts +47 -0
  781. package/dist/plugin-sdk/config/includes.d.ts +32 -0
  782. package/dist/plugin-sdk/config/io.d.ts +55 -0
  783. package/dist/plugin-sdk/config/legacy-migrate.d.ts +5 -0
  784. package/dist/plugin-sdk/config/legacy.d.ts +6 -0
  785. package/dist/plugin-sdk/config/legacy.migrations.d.ts +1 -0
  786. package/dist/plugin-sdk/config/legacy.migrations.part-1.d.ts +2 -0
  787. package/dist/plugin-sdk/config/legacy.migrations.part-2.d.ts +2 -0
  788. package/dist/plugin-sdk/config/legacy.migrations.part-3.d.ts +2 -0
  789. package/dist/plugin-sdk/config/legacy.rules.d.ts +2 -0
  790. package/dist/plugin-sdk/config/legacy.shared.d.ts +19 -0
  791. package/dist/plugin-sdk/config/markdown-tables.d.ts +7 -0
  792. package/dist/plugin-sdk/config/merge-config.d.ts +7 -0
  793. package/dist/plugin-sdk/config/merge-patch.d.ts +5 -0
  794. package/dist/plugin-sdk/config/normalize-paths.d.ts +8 -0
  795. package/dist/plugin-sdk/config/paths.d.ts +57 -0
  796. package/dist/plugin-sdk/config/port-defaults.d.ts +13 -0
  797. package/dist/plugin-sdk/config/runtime-overrides.d.ts +15 -0
  798. package/dist/plugin-sdk/config/sessions/delivery-info.d.ts +12 -0
  799. package/dist/plugin-sdk/config/sessions/group.d.ts +11 -0
  800. package/dist/plugin-sdk/config/sessions/main-session.d.ts +43 -0
  801. package/dist/plugin-sdk/config/sessions/metadata.d.ts +16 -0
  802. package/dist/plugin-sdk/config/sessions/paths.d.ts +21 -0
  803. package/dist/plugin-sdk/config/sessions/reset.d.ts +43 -0
  804. package/dist/plugin-sdk/config/sessions/session-key.d.ts +8 -0
  805. package/dist/plugin-sdk/config/sessions/store.d.ts +99 -0
  806. package/dist/plugin-sdk/config/sessions/transcript.d.ts +18 -0
  807. package/dist/plugin-sdk/config/sessions/types.d.ts +156 -0
  808. package/dist/plugin-sdk/config/sessions.d.ts +10 -0
  809. package/dist/plugin-sdk/config/talk.d.ts +11 -0
  810. package/dist/plugin-sdk/config/telegram-custom-commands.d.ts +24 -0
  811. package/dist/plugin-sdk/config/types.agent-defaults.d.ts +260 -0
  812. package/dist/plugin-sdk/config/types.agents.d.ts +80 -0
  813. package/dist/plugin-sdk/config/types.anima.d.ts +1 -0
  814. package/dist/plugin-sdk/config/types.approvals.d.ts +26 -0
  815. package/dist/plugin-sdk/config/types.auth.d.ts +28 -0
  816. package/dist/plugin-sdk/config/types.base.d.ts +172 -0
  817. package/dist/plugin-sdk/config/types.browser.d.ts +41 -0
  818. package/dist/plugin-sdk/config/types.channels.d.ts +48 -0
  819. package/dist/plugin-sdk/config/types.cron.d.ts +11 -0
  820. package/dist/plugin-sdk/config/types.d.ts +30 -0
  821. package/dist/plugin-sdk/config/types.discord.d.ts +188 -0
  822. package/dist/plugin-sdk/config/types.gateway.d.ts +288 -0
  823. package/dist/plugin-sdk/config/types.googlechat.d.ts +100 -0
  824. package/dist/plugin-sdk/config/types.hooks.d.ts +128 -0
  825. package/dist/plugin-sdk/config/types.imessage.d.ts +71 -0
  826. package/dist/plugin-sdk/config/types.irc.d.ts +96 -0
  827. package/dist/plugin-sdk/config/types.memory.d.ts +45 -0
  828. package/dist/plugin-sdk/config/types.messages.d.ts +121 -0
  829. package/dist/plugin-sdk/config/types.models.d.ts +54 -0
  830. package/dist/plugin-sdk/config/types.msteams.d.ts +101 -0
  831. package/dist/plugin-sdk/config/types.node-host.d.ts +10 -0
  832. package/dist/plugin-sdk/config/types.openclaw.d.ts +114 -0
  833. package/dist/plugin-sdk/config/types.plugins.d.ts +32 -0
  834. package/dist/plugin-sdk/config/types.queue.d.ts +14 -0
  835. package/dist/plugin-sdk/config/types.sandbox.d.ts +78 -0
  836. package/dist/plugin-sdk/config/types.signal.d.ts +86 -0
  837. package/dist/plugin-sdk/config/types.skills.d.ts +28 -0
  838. package/dist/plugin-sdk/config/types.slack.d.ts +150 -0
  839. package/dist/plugin-sdk/config/types.telegram.d.ts +163 -0
  840. package/dist/plugin-sdk/config/types.tools.d.ts +467 -0
  841. package/dist/plugin-sdk/config/types.tts.d.ts +78 -0
  842. package/dist/plugin-sdk/config/types.whatsapp.d.ts +142 -0
  843. package/dist/plugin-sdk/config/validation.d.ts +37 -0
  844. package/dist/plugin-sdk/config/version.d.ts +8 -0
  845. package/dist/plugin-sdk/config/zod-schema.agent-defaults.d.ts +249 -0
  846. package/dist/plugin-sdk/config/zod-schema.agent-runtime.d.ts +856 -0
  847. package/dist/plugin-sdk/config/zod-schema.agents.d.ts +504 -0
  848. package/dist/plugin-sdk/config/zod-schema.allowdeny.d.ts +13 -0
  849. package/dist/plugin-sdk/config/zod-schema.approvals.d.ts +15 -0
  850. package/dist/plugin-sdk/config/zod-schema.channels.d.ts +6 -0
  851. package/dist/plugin-sdk/config/zod-schema.core.d.ts +683 -0
  852. package/dist/plugin-sdk/config/zod-schema.d.ts +3401 -0
  853. package/dist/plugin-sdk/config/zod-schema.hooks.d.ts +79 -0
  854. package/dist/plugin-sdk/config/zod-schema.providers-core.d.ts +3233 -0
  855. package/dist/plugin-sdk/config/zod-schema.providers-whatsapp.d.ts +231 -0
  856. package/dist/plugin-sdk/config/zod-schema.providers.d.ts +1900 -0
  857. package/dist/plugin-sdk/config/zod-schema.sensitive.d.ts +2 -0
  858. package/dist/plugin-sdk/config/zod-schema.session.d.ts +203 -0
  859. package/dist/plugin-sdk/cron/delivery.d.ts +9 -0
  860. package/dist/plugin-sdk/cron/normalize.d.ts +9 -0
  861. package/dist/plugin-sdk/cron/parse.d.ts +1 -0
  862. package/dist/plugin-sdk/cron/payload-migration.d.ts +3 -0
  863. package/dist/plugin-sdk/cron/schedule.d.ts +2 -0
  864. package/dist/plugin-sdk/cron/service/jobs.d.ts +21 -0
  865. package/dist/plugin-sdk/cron/service/locked.d.ts +2 -0
  866. package/dist/plugin-sdk/cron/service/normalize.d.ts +17 -0
  867. package/dist/plugin-sdk/cron/service/ops.d.ts +43 -0
  868. package/dist/plugin-sdk/cron/service/state.d.ts +121 -0
  869. package/dist/plugin-sdk/cron/service/store.d.ts +9 -0
  870. package/dist/plugin-sdk/cron/service/timer.d.ts +25 -0
  871. package/dist/plugin-sdk/cron/service.d.ts +48 -0
  872. package/dist/plugin-sdk/cron/session-reaper.d.ts +35 -0
  873. package/dist/plugin-sdk/cron/store.d.ts +6 -0
  874. package/dist/plugin-sdk/cron/types.d.ts +95 -0
  875. package/dist/plugin-sdk/daemon/constants.d.ts +30 -0
  876. package/dist/plugin-sdk/discord/accounts.d.ts +9 -0
  877. package/dist/plugin-sdk/discord/audit.d.ts +2 -0
  878. package/dist/plugin-sdk/discord/directory-live.d.ts +4 -0
  879. package/dist/plugin-sdk/discord/monitor/allow-list.d.ts +1 -0
  880. package/dist/plugin-sdk/discord/monitor/gateway-registry.d.ts +3 -0
  881. package/dist/plugin-sdk/discord/monitor/presence-cache.d.ts +1 -0
  882. package/dist/plugin-sdk/discord/monitor.d.ts +3 -0
  883. package/dist/plugin-sdk/discord/pluralkit.d.ts +1 -0
  884. package/dist/plugin-sdk/discord/probe.d.ts +3 -0
  885. package/dist/plugin-sdk/discord/resolve-channels.d.ts +1 -0
  886. package/dist/plugin-sdk/discord/resolve-users.d.ts +1 -0
  887. package/dist/plugin-sdk/discord/send.d.ts +6 -0
  888. package/dist/plugin-sdk/discord/targets.d.ts +2 -0
  889. package/dist/plugin-sdk/gateway/auth-rate-limit.d.ts +59 -0
  890. package/dist/plugin-sdk/gateway/auth.d.ts +48 -0
  891. package/dist/plugin-sdk/gateway/call.d.ts +51 -0
  892. package/dist/plugin-sdk/gateway/chat-abort.d.ts +44 -0
  893. package/dist/plugin-sdk/gateway/chat-sanitize.d.ts +4 -0
  894. package/dist/plugin-sdk/gateway/client.d.ts +63 -0
  895. package/dist/plugin-sdk/gateway/control-ui-shared.d.ts +9 -0
  896. package/dist/plugin-sdk/gateway/device-auth.d.ts +12 -0
  897. package/dist/plugin-sdk/gateway/exec-approval-manager.d.ts +44 -0
  898. package/dist/plugin-sdk/gateway/net.d.ts +57 -0
  899. package/dist/plugin-sdk/gateway/node-registry.d.ts +60 -0
  900. package/dist/plugin-sdk/gateway/protocol/client-info.d.ts +58 -0
  901. package/dist/plugin-sdk/gateway/protocol/index.d.ts +661 -0
  902. package/dist/plugin-sdk/gateway/protocol/schema/agent.d.ts +86 -0
  903. package/dist/plugin-sdk/gateway/protocol/schema/agents-models-skills.d.ts +152 -0
  904. package/dist/plugin-sdk/gateway/protocol/schema/channels.d.ts +126 -0
  905. package/dist/plugin-sdk/gateway/protocol/schema/config.d.ts +51 -0
  906. package/dist/plugin-sdk/gateway/protocol/schema/cron.d.ts +353 -0
  907. package/dist/plugin-sdk/gateway/protocol/schema/devices.d.ts +38 -0
  908. package/dist/plugin-sdk/gateway/protocol/schema/error-codes.d.ts +14 -0
  909. package/dist/plugin-sdk/gateway/protocol/schema/exec-approvals.d.ts +163 -0
  910. package/dist/plugin-sdk/gateway/protocol/schema/frames.d.ts +164 -0
  911. package/dist/plugin-sdk/gateway/protocol/schema/logs-chat.d.ts +45 -0
  912. package/dist/plugin-sdk/gateway/protocol/schema/nodes.d.ts +64 -0
  913. package/dist/plugin-sdk/gateway/protocol/schema/primitives.d.ts +4 -0
  914. package/dist/plugin-sdk/gateway/protocol/schema/protocol-schemas.d.ts +3 -0
  915. package/dist/plugin-sdk/gateway/protocol/schema/sessions.d.ts +76 -0
  916. package/dist/plugin-sdk/gateway/protocol/schema/snapshot.d.ts +64 -0
  917. package/dist/plugin-sdk/gateway/protocol/schema/types.d.ts +124 -0
  918. package/dist/plugin-sdk/gateway/protocol/schema/wizard.d.ts +86 -0
  919. package/dist/plugin-sdk/gateway/protocol/schema.d.ts +16 -0
  920. package/dist/plugin-sdk/gateway/server/ws-types.d.ts +9 -0
  921. package/dist/plugin-sdk/gateway/server-channels.d.ts +24 -0
  922. package/dist/plugin-sdk/gateway/server-methods/types.d.ts +98 -0
  923. package/dist/plugin-sdk/gateway/server-shared.d.ts +7 -0
  924. package/dist/plugin-sdk/gateway/session-utils.d.ts +71 -0
  925. package/dist/plugin-sdk/gateway/session-utils.fs.d.ts +33 -0
  926. package/dist/plugin-sdk/gateway/session-utils.types.d.ts +84 -0
  927. package/dist/plugin-sdk/globals.d.ts +11 -0
  928. package/dist/plugin-sdk/hooks/internal-hooks.d.ts +95 -0
  929. package/dist/plugin-sdk/hooks/types.d.ts +62 -0
  930. package/dist/plugin-sdk/imessage/accounts.d.ts +8 -0
  931. package/dist/plugin-sdk/imessage/monitor.d.ts +3 -0
  932. package/dist/plugin-sdk/imessage/probe.d.ts +3 -0
  933. package/dist/plugin-sdk/imessage/send.d.ts +1 -0
  934. package/dist/plugin-sdk/imessage/target-parsing-helpers.d.ts +4 -0
  935. package/dist/plugin-sdk/imessage/targets.d.ts +2 -0
  936. package/dist/plugin-sdk/index.d.ts +1 -0
  937. package/dist/plugin-sdk/index.js +27570 -0
  938. package/dist/plugin-sdk/infra/agent-events.d.ts +21 -0
  939. package/dist/plugin-sdk/infra/anima-root.d.ts +1 -0
  940. package/dist/plugin-sdk/infra/archive.d.ts +41 -0
  941. package/dist/plugin-sdk/infra/backoff.d.ts +8 -0
  942. package/dist/plugin-sdk/infra/binaries.d.ts +3 -0
  943. package/dist/plugin-sdk/infra/brew.d.ts +8 -0
  944. package/dist/plugin-sdk/infra/channel-activity.d.ts +18 -0
  945. package/dist/plugin-sdk/infra/channel-summary.d.ts +6 -0
  946. package/dist/plugin-sdk/infra/dedupe.d.ts +11 -0
  947. package/dist/plugin-sdk/infra/device-auth-store.d.ts +18 -0
  948. package/dist/plugin-sdk/infra/device-identity.d.ts +11 -0
  949. package/dist/plugin-sdk/infra/device-pairing.d.ts +96 -0
  950. package/dist/plugin-sdk/infra/diagnostic-events.d.ts +121 -0
  951. package/dist/plugin-sdk/infra/dotenv.d.ts +3 -0
  952. package/dist/plugin-sdk/infra/env.d.ts +11 -0
  953. package/dist/plugin-sdk/infra/errors.d.ts +11 -0
  954. package/dist/plugin-sdk/infra/exec-approvals-allowlist.d.ts +45 -0
  955. package/dist/plugin-sdk/infra/exec-approvals-analysis.d.ts +78 -0
  956. package/dist/plugin-sdk/infra/exec-approvals.d.ts +107 -0
  957. package/dist/plugin-sdk/infra/exec-safety.d.ts +1 -0
  958. package/dist/plugin-sdk/infra/fetch.d.ts +2 -0
  959. package/dist/plugin-sdk/infra/file-lock.d.ts +2 -0
  960. package/dist/plugin-sdk/infra/format-time/format-datetime.d.ts +35 -0
  961. package/dist/plugin-sdk/infra/format-time/format-duration.d.ts +23 -0
  962. package/dist/plugin-sdk/infra/format-time/format-relative.d.ts +39 -0
  963. package/dist/plugin-sdk/infra/git-commit.d.ts +4 -0
  964. package/dist/plugin-sdk/infra/heartbeat-active-hours.d.ts +5 -0
  965. package/dist/plugin-sdk/infra/heartbeat-events-filter.d.ts +3 -0
  966. package/dist/plugin-sdk/infra/heartbeat-events.d.ts +21 -0
  967. package/dist/plugin-sdk/infra/heartbeat-runner.d.ts +45 -0
  968. package/dist/plugin-sdk/infra/heartbeat-visibility.d.ts +17 -0
  969. package/dist/plugin-sdk/infra/heartbeat-wake.d.ts +27 -0
  970. package/dist/plugin-sdk/infra/home-dir.d.ts +7 -0
  971. package/dist/plugin-sdk/infra/http-body.d.ts +46 -0
  972. package/dist/plugin-sdk/infra/json-file.d.ts +2 -0
  973. package/dist/plugin-sdk/infra/net/fetch-guard.d.ts +21 -0
  974. package/dist/plugin-sdk/infra/net/ssrf.d.ts +32 -0
  975. package/dist/plugin-sdk/infra/node-pairing.d.ts +62 -0
  976. package/dist/plugin-sdk/infra/node-shell.d.ts +1 -0
  977. package/dist/plugin-sdk/infra/openclaw-root.d.ts +10 -0
  978. package/dist/plugin-sdk/infra/outbound/abort.d.ts +8 -0
  979. package/dist/plugin-sdk/infra/outbound/channel-adapters.d.ts +6 -0
  980. package/dist/plugin-sdk/infra/outbound/channel-selection.d.ts +11 -0
  981. package/dist/plugin-sdk/infra/outbound/channel-target.d.ts +6 -0
  982. package/dist/plugin-sdk/infra/outbound/deliver.d.ts +77 -0
  983. package/dist/plugin-sdk/infra/outbound/delivery-queue.d.ts +103 -0
  984. package/dist/plugin-sdk/infra/outbound/directory-cache.d.ts +24 -0
  985. package/dist/plugin-sdk/infra/outbound/identity.d.ts +8 -0
  986. package/dist/plugin-sdk/infra/outbound/message-action-params.d.ts +47 -0
  987. package/dist/plugin-sdk/infra/outbound/message-action-runner.d.ts +74 -0
  988. package/dist/plugin-sdk/infra/outbound/message-action-spec.d.ts +5 -0
  989. package/dist/plugin-sdk/infra/outbound/message.d.ts +85 -0
  990. package/dist/plugin-sdk/infra/outbound/outbound-policy.d.ts +31 -0
  991. package/dist/plugin-sdk/infra/outbound/outbound-send-service.d.ts +64 -0
  992. package/dist/plugin-sdk/infra/outbound/outbound-session.d.ts +31 -0
  993. package/dist/plugin-sdk/infra/outbound/payloads.d.ts +16 -0
  994. package/dist/plugin-sdk/infra/outbound/target-errors.d.ts +6 -0
  995. package/dist/plugin-sdk/infra/outbound/target-normalization.d.ts +4 -0
  996. package/dist/plugin-sdk/infra/outbound/target-resolver.d.ts +53 -0
  997. package/dist/plugin-sdk/infra/outbound/targets.d.ts +65 -0
  998. package/dist/plugin-sdk/infra/outbound/tool-payload.d.ts +2 -0
  999. package/dist/plugin-sdk/infra/pairing-files.d.ts +11 -0
  1000. package/dist/plugin-sdk/infra/pairing-token.d.ts +3 -0
  1001. package/dist/plugin-sdk/infra/path-prepend.d.ts +5 -0
  1002. package/dist/plugin-sdk/infra/ports-format.d.ts +5 -0
  1003. package/dist/plugin-sdk/infra/ports-inspect.d.ts +2 -0
  1004. package/dist/plugin-sdk/infra/ports-lsof.d.ts +2 -0
  1005. package/dist/plugin-sdk/infra/ports-types.d.ts +17 -0
  1006. package/dist/plugin-sdk/infra/ports.d.ts +14 -0
  1007. package/dist/plugin-sdk/infra/provider-usage.auth.d.ts +11 -0
  1008. package/dist/plugin-sdk/infra/provider-usage.d.ts +4 -0
  1009. package/dist/plugin-sdk/infra/provider-usage.fetch.antigravity.d.ts +2 -0
  1010. package/dist/plugin-sdk/infra/provider-usage.fetch.claude.d.ts +2 -0
  1011. package/dist/plugin-sdk/infra/provider-usage.fetch.codex.d.ts +2 -0
  1012. package/dist/plugin-sdk/infra/provider-usage.fetch.copilot.d.ts +2 -0
  1013. package/dist/plugin-sdk/infra/provider-usage.fetch.d.ts +7 -0
  1014. package/dist/plugin-sdk/infra/provider-usage.fetch.gemini.d.ts +2 -0
  1015. package/dist/plugin-sdk/infra/provider-usage.fetch.minimax.d.ts +2 -0
  1016. package/dist/plugin-sdk/infra/provider-usage.fetch.shared.d.ts +1 -0
  1017. package/dist/plugin-sdk/infra/provider-usage.fetch.zai.d.ts +2 -0
  1018. package/dist/plugin-sdk/infra/provider-usage.format.d.ts +13 -0
  1019. package/dist/plugin-sdk/infra/provider-usage.load.d.ts +12 -0
  1020. package/dist/plugin-sdk/infra/provider-usage.shared.d.ts +8 -0
  1021. package/dist/plugin-sdk/infra/provider-usage.types.d.ts +17 -0
  1022. package/dist/plugin-sdk/infra/restart-sentinel.d.ts +50 -0
  1023. package/dist/plugin-sdk/infra/restart.d.ts +61 -0
  1024. package/dist/plugin-sdk/infra/retry.d.ts +21 -0
  1025. package/dist/plugin-sdk/infra/session-cost-usage.d.ts +45 -0
  1026. package/dist/plugin-sdk/infra/session-cost-usage.types.d.ts +153 -0
  1027. package/dist/plugin-sdk/infra/session-maintenance-warning.d.ts +10 -0
  1028. package/dist/plugin-sdk/infra/shell-env.d.ts +33 -0
  1029. package/dist/plugin-sdk/infra/skills-remote.d.ts +25 -0
  1030. package/dist/plugin-sdk/infra/system-events.d.ts +18 -0
  1031. package/dist/plugin-sdk/infra/tailnet.d.ts +7 -0
  1032. package/dist/plugin-sdk/infra/tailscale.d.ts +34 -0
  1033. package/dist/plugin-sdk/infra/tls/fingerprint.d.ts +1 -0
  1034. package/dist/plugin-sdk/infra/tls/gateway.d.ts +16 -0
  1035. package/dist/plugin-sdk/infra/tmp-anima-dir.d.ts +1 -0
  1036. package/dist/plugin-sdk/infra/tmp-openclaw-dir.d.ts +18 -0
  1037. package/dist/plugin-sdk/infra/unhandled-rejections.d.ts +15 -0
  1038. package/dist/plugin-sdk/infra/warning-filter.d.ts +7 -0
  1039. package/dist/plugin-sdk/infra/ws.d.ts +2 -0
  1040. package/dist/plugin-sdk/infra/wsl.d.ts +11 -0
  1041. package/dist/plugin-sdk/line/accounts.d.ts +9 -0
  1042. package/dist/plugin-sdk/line/config-schema.d.ts +1 -0
  1043. package/dist/plugin-sdk/line/flex-templates.d.ts +14 -0
  1044. package/dist/plugin-sdk/line/markdown-to-line.d.ts +6 -0
  1045. package/dist/plugin-sdk/line/monitor.d.ts +3 -0
  1046. package/dist/plugin-sdk/line/probe.d.ts +3 -0
  1047. package/dist/plugin-sdk/line/send.d.ts +14 -0
  1048. package/dist/plugin-sdk/line/template-messages.d.ts +1 -0
  1049. package/dist/plugin-sdk/line/types.d.ts +6 -0
  1050. package/dist/plugin-sdk/link-understanding/apply.d.ts +10 -0
  1051. package/dist/plugin-sdk/link-understanding/defaults.d.ts +2 -0
  1052. package/dist/plugin-sdk/link-understanding/detect.d.ts +3 -0
  1053. package/dist/plugin-sdk/link-understanding/format.d.ts +4 -0
  1054. package/dist/plugin-sdk/link-understanding/runner.d.ts +11 -0
  1055. package/dist/plugin-sdk/logger.d.ts +6 -0
  1056. package/dist/plugin-sdk/logging/config.d.ts +4 -0
  1057. package/dist/plugin-sdk/logging/console.d.ts +23 -0
  1058. package/dist/plugin-sdk/logging/diagnostic-session-state.d.ts +17 -0
  1059. package/dist/plugin-sdk/logging/diagnostic.d.ts +56 -0
  1060. package/dist/plugin-sdk/logging/levels.d.ts +4 -0
  1061. package/dist/plugin-sdk/logging/logger.d.ts +42 -0
  1062. package/dist/plugin-sdk/logging/redact-identifier.d.ts +4 -0
  1063. package/dist/plugin-sdk/logging/redact.d.ts +9 -0
  1064. package/dist/plugin-sdk/logging/state.d.ts +18 -0
  1065. package/dist/plugin-sdk/logging/subsystem.d.ts +18 -0
  1066. package/dist/plugin-sdk/logging.d.ts +10 -0
  1067. package/dist/plugin-sdk/markdown/fences.d.ts +10 -0
  1068. package/dist/plugin-sdk/markdown/frontmatter.d.ts +2 -0
  1069. package/dist/plugin-sdk/markdown/ir.d.ts +32 -0
  1070. package/dist/plugin-sdk/markdown/render.d.ts +18 -0
  1071. package/dist/plugin-sdk/markdown/tables.d.ts +2 -0
  1072. package/dist/plugin-sdk/markdown/whatsapp.d.ts +14 -0
  1073. package/dist/plugin-sdk/media/audio-tags.d.ts +10 -0
  1074. package/dist/plugin-sdk/media/audio.d.ts +19 -0
  1075. package/dist/plugin-sdk/media/base64.d.ts +1 -0
  1076. package/dist/plugin-sdk/media/constants.d.ts +7 -0
  1077. package/dist/plugin-sdk/media/fetch.d.ts +23 -0
  1078. package/dist/plugin-sdk/media/image-ops.d.ts +39 -0
  1079. package/dist/plugin-sdk/media/input-files.d.ts +81 -0
  1080. package/dist/plugin-sdk/media/mime.d.ts +16 -0
  1081. package/dist/plugin-sdk/media/parse.d.ts +8 -0
  1082. package/dist/plugin-sdk/media/png-encode.d.ts +8 -0
  1083. package/dist/plugin-sdk/media/read-response-with-limit.d.ts +7 -0
  1084. package/dist/plugin-sdk/media/sniff-mime-from-base64.d.ts +1 -0
  1085. package/dist/plugin-sdk/media/store.d.ts +28 -0
  1086. package/dist/plugin-sdk/media-understanding/apply.d.ts +19 -0
  1087. package/dist/plugin-sdk/media-understanding/attachments.d.ts +43 -0
  1088. package/dist/plugin-sdk/media-understanding/concurrency.d.ts +1 -0
  1089. package/dist/plugin-sdk/media-understanding/defaults.d.ts +14 -0
  1090. package/dist/plugin-sdk/media-understanding/errors.d.ts +6 -0
  1091. package/dist/plugin-sdk/media-understanding/format.d.ts +7 -0
  1092. package/dist/plugin-sdk/media-understanding/output-extract.d.ts +2 -0
  1093. package/dist/plugin-sdk/media-understanding/providers/image.d.ts +1 -0
  1094. package/dist/plugin-sdk/media-understanding/providers/index.d.ts +8 -0
  1095. package/dist/plugin-sdk/media-understanding/providers/shared.d.ts +4 -0
  1096. package/dist/plugin-sdk/media-understanding/resolve.d.ts +44 -0
  1097. package/dist/plugin-sdk/media-understanding/runner.d.ts +35 -0
  1098. package/dist/plugin-sdk/media-understanding/runner.entries.d.ts +33 -0
  1099. package/dist/plugin-sdk/media-understanding/scope.d.ts +9 -0
  1100. package/dist/plugin-sdk/media-understanding/types.d.ts +93 -0
  1101. package/dist/plugin-sdk/media-understanding/video.d.ts +2 -0
  1102. package/dist/plugin-sdk/memory/backend-config.d.ts +49 -0
  1103. package/dist/plugin-sdk/memory/batch-gemini.d.ts +55 -0
  1104. package/dist/plugin-sdk/memory/batch-http.d.ts +6 -0
  1105. package/dist/plugin-sdk/memory/batch-openai.d.ts +45 -0
  1106. package/dist/plugin-sdk/memory/batch-output.d.ts +23 -0
  1107. package/dist/plugin-sdk/memory/batch-voyage.d.ts +46 -0
  1108. package/dist/plugin-sdk/memory/embedding-chunk-limits.d.ts +3 -0
  1109. package/dist/plugin-sdk/memory/embedding-input-limits.d.ts +2 -0
  1110. package/dist/plugin-sdk/memory/embedding-model-limits.d.ts +2 -0
  1111. package/dist/plugin-sdk/memory/embeddings-gemini.d.ts +13 -0
  1112. package/dist/plugin-sdk/memory/embeddings-openai.d.ts +13 -0
  1113. package/dist/plugin-sdk/memory/embeddings-voyage.d.ts +13 -0
  1114. package/dist/plugin-sdk/memory/embeddings.d.ts +44 -0
  1115. package/dist/plugin-sdk/memory/hybrid.d.ts +34 -0
  1116. package/dist/plugin-sdk/memory/index.d.ts +3 -0
  1117. package/dist/plugin-sdk/memory/internal.d.ts +38 -0
  1118. package/dist/plugin-sdk/memory/manager-embedding-ops.d.ts +32 -0
  1119. package/dist/plugin-sdk/memory/manager-search.d.ts +60 -0
  1120. package/dist/plugin-sdk/memory/manager-sync-ops.d.ts +40 -0
  1121. package/dist/plugin-sdk/memory/manager.d.ts +75 -0
  1122. package/dist/plugin-sdk/memory/memory-schema.d.ts +10 -0
  1123. package/dist/plugin-sdk/memory/node-llama.d.ts +8 -0
  1124. package/dist/plugin-sdk/memory/qmd-manager.d.ts +109 -0
  1125. package/dist/plugin-sdk/memory/qmd-query-parser.d.ts +8 -0
  1126. package/dist/plugin-sdk/memory/qmd-scope.d.ts +4 -0
  1127. package/dist/plugin-sdk/memory/search-manager.d.ts +11 -0
  1128. package/dist/plugin-sdk/memory/session-files.d.ts +14 -0
  1129. package/dist/plugin-sdk/memory/sqlite-vec.d.ts +9 -0
  1130. package/dist/plugin-sdk/memory/sqlite.d.ts +1 -0
  1131. package/dist/plugin-sdk/memory/types.d.ts +94 -0
  1132. package/dist/plugin-sdk/pairing/pairing-messages.d.ts +6 -0
  1133. package/dist/plugin-sdk/pairing/pairing-store.d.ts +46 -0
  1134. package/dist/plugin-sdk/pi-model-discovery-Dw3A6oXH.js +37 -0
  1135. package/dist/plugin-sdk/plugin-sdk/account-id.d.ts +1 -0
  1136. package/dist/plugin-sdk/plugin-sdk/allow-from.d.ts +4 -0
  1137. package/dist/plugin-sdk/plugin-sdk/config-paths.d.ts +6 -0
  1138. package/dist/plugin-sdk/plugin-sdk/file-lock.d.ts +16 -0
  1139. package/dist/plugin-sdk/plugin-sdk/index.d.ts +123 -0
  1140. package/dist/plugin-sdk/plugin-sdk/onboarding.d.ts +11 -0
  1141. package/dist/plugin-sdk/plugin-sdk/text-chunking.d.ts +1 -0
  1142. package/dist/plugin-sdk/plugins/bundled-dir.d.ts +1 -0
  1143. package/dist/plugin-sdk/plugins/commands.d.ts +83 -0
  1144. package/dist/plugin-sdk/plugins/config-schema.d.ts +2 -0
  1145. package/dist/plugin-sdk/plugins/config-state.d.ts +33 -0
  1146. package/dist/plugin-sdk/plugins/discovery.d.ts +22 -0
  1147. package/dist/plugin-sdk/plugins/hook-runner-global.d.ts +37 -0
  1148. package/dist/plugin-sdk/plugins/hooks.d.ts +42 -0
  1149. package/dist/plugin-sdk/plugins/http-path.d.ts +1 -0
  1150. package/dist/plugin-sdk/plugins/http-registry.d.ts +13 -0
  1151. package/dist/plugin-sdk/plugins/loader.d.ts +14 -0
  1152. package/dist/plugin-sdk/plugins/manifest-registry.d.ts +33 -0
  1153. package/dist/plugin-sdk/plugins/manifest.d.ts +64 -0
  1154. package/dist/plugin-sdk/plugins/registry.d.ts +130 -0
  1155. package/dist/plugin-sdk/plugins/runtime/index.d.ts +3 -0
  1156. package/dist/plugin-sdk/plugins/runtime/native-deps.d.ts +8 -0
  1157. package/dist/plugin-sdk/plugins/runtime/types.d.ts +317 -0
  1158. package/dist/plugin-sdk/plugins/runtime.d.ts +5 -0
  1159. package/dist/plugin-sdk/plugins/schema-validator.d.ts +10 -0
  1160. package/dist/plugin-sdk/plugins/slots.d.ts +24 -0
  1161. package/dist/plugin-sdk/plugins/tools.d.ts +13 -0
  1162. package/dist/plugin-sdk/plugins/types.d.ts +411 -0
  1163. package/dist/plugin-sdk/polls.d.ts +31 -0
  1164. package/dist/plugin-sdk/process/command-queue.d.ts +51 -0
  1165. package/dist/plugin-sdk/process/exec.d.ts +26 -0
  1166. package/dist/plugin-sdk/process/lanes.d.ts +6 -0
  1167. package/dist/plugin-sdk/process/spawn-utils.d.ts +26 -0
  1168. package/dist/plugin-sdk/providers/github-copilot-token.d.ts +8 -0
  1169. package/dist/plugin-sdk/providers/qwen-portal-oauth.d.ts +8 -0
  1170. package/dist/plugin-sdk/routing/bindings.d.ts +11 -0
  1171. package/dist/plugin-sdk/routing/resolve-route.d.ts +42 -0
  1172. package/dist/plugin-sdk/routing/session-key.d.ts +48 -0
  1173. package/dist/plugin-sdk/runtime.d.ts +7 -0
  1174. package/dist/plugin-sdk/security/external-content.d.ts +67 -0
  1175. package/dist/plugin-sdk/security/secret-equal.d.ts +1 -0
  1176. package/dist/plugin-sdk/sessions/input-provenance.d.ts +16 -0
  1177. package/dist/plugin-sdk/sessions/level-overrides.d.ts +10 -0
  1178. package/dist/plugin-sdk/sessions/model-overrides.d.ts +14 -0
  1179. package/dist/plugin-sdk/sessions/send-policy.d.ts +11 -0
  1180. package/dist/plugin-sdk/sessions/session-key-utils.d.ts +11 -0
  1181. package/dist/plugin-sdk/sessions/session-label.d.ts +9 -0
  1182. package/dist/plugin-sdk/sessions/transcript-events.d.ts +7 -0
  1183. package/dist/plugin-sdk/shared/chat-envelope.d.ts +2 -0
  1184. package/dist/plugin-sdk/shared/config-eval.d.ts +5 -0
  1185. package/dist/plugin-sdk/shared/device-auth.d.ts +13 -0
  1186. package/dist/plugin-sdk/shared/frontmatter.d.ts +7 -0
  1187. package/dist/plugin-sdk/shared/node-match.d.ts +8 -0
  1188. package/dist/plugin-sdk/shared/subagents-format.d.ts +15 -0
  1189. package/dist/plugin-sdk/shared/text/reasoning-tags.d.ts +6 -0
  1190. package/dist/plugin-sdk/signal/accounts.d.ts +9 -0
  1191. package/dist/plugin-sdk/signal/format.d.ts +9 -0
  1192. package/dist/plugin-sdk/signal/identity.d.ts +3 -0
  1193. package/dist/plugin-sdk/signal/index.d.ts +3 -0
  1194. package/dist/plugin-sdk/signal/probe.d.ts +3 -0
  1195. package/dist/plugin-sdk/signal/reaction-level.d.ts +1 -0
  1196. package/dist/plugin-sdk/signal/send-reactions.d.ts +2 -0
  1197. package/dist/plugin-sdk/signal/send.d.ts +1 -0
  1198. package/dist/plugin-sdk/slack/accounts.d.ts +11 -0
  1199. package/dist/plugin-sdk/slack/actions.d.ts +17 -0
  1200. package/dist/plugin-sdk/slack/client.d.ts +1 -0
  1201. package/dist/plugin-sdk/slack/directory-live.d.ts +4 -0
  1202. package/dist/plugin-sdk/slack/index.d.ts +3 -0
  1203. package/dist/plugin-sdk/slack/message-actions.d.ts +2 -0
  1204. package/dist/plugin-sdk/slack/monitor/allow-list.d.ts +1 -0
  1205. package/dist/plugin-sdk/slack/probe.d.ts +3 -0
  1206. package/dist/plugin-sdk/slack/resolve-channels.d.ts +1 -0
  1207. package/dist/plugin-sdk/slack/resolve-users.d.ts +1 -0
  1208. package/dist/plugin-sdk/slack/send.d.ts +5 -0
  1209. package/dist/plugin-sdk/slack/targets.d.ts +2 -0
  1210. package/dist/plugin-sdk/slack/threading-tool-context.d.ts +1 -0
  1211. package/dist/plugin-sdk/telegram/accounts.d.ts +9 -0
  1212. package/dist/plugin-sdk/telegram/audit.d.ts +4 -0
  1213. package/dist/plugin-sdk/telegram/bot/helpers.d.ts +1 -0
  1214. package/dist/plugin-sdk/telegram/bot/types.d.ts +5 -0
  1215. package/dist/plugin-sdk/telegram/inline-buttons.d.ts +2 -0
  1216. package/dist/plugin-sdk/telegram/model-buttons.d.ts +5 -0
  1217. package/dist/plugin-sdk/telegram/monitor.d.ts +3 -0
  1218. package/dist/plugin-sdk/telegram/outbound-params.d.ts +2 -0
  1219. package/dist/plugin-sdk/telegram/probe.d.ts +6 -0
  1220. package/dist/plugin-sdk/telegram/reaction-level.d.ts +1 -0
  1221. package/dist/plugin-sdk/telegram/send.d.ts +10 -0
  1222. package/dist/plugin-sdk/telegram/sticker-cache.d.ts +2 -0
  1223. package/dist/plugin-sdk/telegram/targets.d.ts +1 -0
  1224. package/dist/plugin-sdk/telegram/token.d.ts +1 -0
  1225. package/dist/plugin-sdk/terminal/ansi.d.ts +2 -0
  1226. package/dist/plugin-sdk/terminal/health-style.d.ts +1 -0
  1227. package/dist/plugin-sdk/terminal/links.d.ts +6 -0
  1228. package/dist/plugin-sdk/terminal/palette.d.ts +10 -0
  1229. package/dist/plugin-sdk/terminal/progress-line.d.ts +3 -0
  1230. package/dist/plugin-sdk/terminal/prompt-style.d.ts +3 -0
  1231. package/dist/plugin-sdk/terminal/restore.d.ts +17 -0
  1232. package/dist/plugin-sdk/terminal/theme.d.ts +15 -0
  1233. package/dist/plugin-sdk/tts/tts-core.d.ts +52 -0
  1234. package/dist/plugin-sdk/tts/tts.d.ts +179 -0
  1235. package/dist/plugin-sdk/utils/account-id.d.ts +1 -0
  1236. package/dist/plugin-sdk/utils/boolean.d.ts +5 -0
  1237. package/dist/plugin-sdk/utils/delivery-context.d.ts +29 -0
  1238. package/dist/plugin-sdk/utils/directive-tags.d.ts +16 -0
  1239. package/dist/plugin-sdk/utils/fetch-timeout.d.ts +13 -0
  1240. package/dist/plugin-sdk/utils/message-channel.d.ts +27 -0
  1241. package/dist/plugin-sdk/utils/normalize-secret-input.d.ts +11 -0
  1242. package/dist/plugin-sdk/utils/provider-utils.d.ts +9 -0
  1243. package/dist/plugin-sdk/utils/queue-helpers.d.ts +41 -0
  1244. package/dist/plugin-sdk/utils/shell-argv.d.ts +1 -0
  1245. package/dist/plugin-sdk/utils/transcript-tools.d.ts +8 -0
  1246. package/dist/plugin-sdk/utils/usage-format.d.ts +26 -0
  1247. package/dist/plugin-sdk/utils.d.ts +67 -0
  1248. package/dist/plugin-sdk/version.d.ts +4 -0
  1249. package/dist/plugin-sdk/web/accounts.d.ts +39 -0
  1250. package/dist/plugin-sdk/web/active-listener.d.ts +25 -0
  1251. package/dist/plugin-sdk/web/auth-store.d.ts +25 -0
  1252. package/dist/plugin-sdk/web/auto-reply/constants.d.ts +1 -0
  1253. package/dist/plugin-sdk/web/auto-reply/deliver-reply.d.ts +18 -0
  1254. package/dist/plugin-sdk/web/auto-reply/heartbeat-runner.d.ts +20 -0
  1255. package/dist/plugin-sdk/web/auto-reply/loggers.d.ts +4 -0
  1256. package/dist/plugin-sdk/web/auto-reply/mentions.d.ts +19 -0
  1257. package/dist/plugin-sdk/web/auto-reply/monitor/ack-reaction.d.ts +13 -0
  1258. package/dist/plugin-sdk/web/auto-reply/monitor/broadcast.d.ts +16 -0
  1259. package/dist/plugin-sdk/web/auto-reply/monitor/commands.d.ts +2 -0
  1260. package/dist/plugin-sdk/web/auto-reply/monitor/echo.d.ts +17 -0
  1261. package/dist/plugin-sdk/web/auto-reply/monitor/group-activation.d.ts +9 -0
  1262. package/dist/plugin-sdk/web/auto-reply/monitor/group-gating.d.ts +29 -0
  1263. package/dist/plugin-sdk/web/auto-reply/monitor/group-members.d.ts +6 -0
  1264. package/dist/plugin-sdk/web/auto-reply/monitor/last-route.d.ts +15 -0
  1265. package/dist/plugin-sdk/web/auto-reply/monitor/message-line.d.ts +11 -0
  1266. package/dist/plugin-sdk/web/auto-reply/monitor/on-message.d.ts +24 -0
  1267. package/dist/plugin-sdk/web/auto-reply/monitor/peer.d.ts +2 -0
  1268. package/dist/plugin-sdk/web/auto-reply/monitor/process-message.d.ts +40 -0
  1269. package/dist/plugin-sdk/web/auto-reply/monitor.d.ts +5 -0
  1270. package/dist/plugin-sdk/web/auto-reply/session-snapshot.d.ts +17 -0
  1271. package/dist/plugin-sdk/web/auto-reply/types.d.ts +28 -0
  1272. package/dist/plugin-sdk/web/auto-reply/util.d.ts +2 -0
  1273. package/dist/plugin-sdk/web/auto-reply.d.ts +1 -0
  1274. package/dist/plugin-sdk/web/auto-reply.impl.d.ts +6 -0
  1275. package/dist/plugin-sdk/web/inbound/access-control.d.ts +24 -0
  1276. package/dist/plugin-sdk/web/inbound/dedupe.d.ts +2 -0
  1277. package/dist/plugin-sdk/web/inbound/extract.d.ts +13 -0
  1278. package/dist/plugin-sdk/web/inbound/media.d.ts +7 -0
  1279. package/dist/plugin-sdk/web/inbound/monitor.d.ts +30 -0
  1280. package/dist/plugin-sdk/web/inbound/send-api.d.ts +22 -0
  1281. package/dist/plugin-sdk/web/inbound/types.d.ts +41 -0
  1282. package/dist/plugin-sdk/web/inbound.d.ts +4 -0
  1283. package/dist/plugin-sdk/web/login-qr.d.ts +19 -0
  1284. package/dist/plugin-sdk/web/login.d.ts +3 -0
  1285. package/dist/plugin-sdk/web/media.d.ts +38 -0
  1286. package/dist/plugin-sdk/web/outbound.d.ts +23 -0
  1287. package/dist/plugin-sdk/web/qr-image.d.ts +4 -0
  1288. package/dist/plugin-sdk/web/reconnect.d.ts +12 -0
  1289. package/dist/plugin-sdk/web/session.d.ts +14 -0
  1290. package/dist/plugin-sdk/web/vcard.d.ts +6 -0
  1291. package/dist/plugin-sdk/whatsapp/normalize.d.ts +2 -0
  1292. package/dist/plugin-sdk/whatsapp/resolve-outbound-target.d.ts +1 -0
  1293. package/dist/plugin-sdk/wizard/prompts.d.ts +42 -0
  1294. package/dist/plugin-sdk/wizard/session.d.ts +42 -0
  1295. package/dist/plugins-B362e77G.js +168 -0
  1296. package/dist/plugins-CDJw924T.js +38 -0
  1297. package/dist/plugins-CmSUIUNi.js +38 -0
  1298. package/dist/plugins-cli-CtFRTC2I.js +734 -0
  1299. package/dist/plugins-cli-D1lvqLG9.js +736 -0
  1300. package/dist/polls-CItfB1H8.js +1343 -0
  1301. package/dist/ports-BVLMN1Sr.js +96 -0
  1302. package/dist/ports-CqLSlU6Z.js +317 -0
  1303. package/dist/ports-D94CwCrv.js +344 -0
  1304. package/dist/ports-D_NHthOz.js +96 -0
  1305. package/dist/program-Bve7k4jO.js +176 -0
  1306. package/dist/program-context-8lqacY-M.js +496 -0
  1307. package/dist/program-context-Bvn8046-.js +17 -0
  1308. package/dist/progress-Bek_GyWS.js +133 -0
  1309. package/dist/progress-CbZ2D53A.js +133 -0
  1310. package/dist/prompt-style-DKy6qQxR.js +9 -0
  1311. package/dist/prompt-style-lu0clOOE.js +9 -0
  1312. package/dist/prompts-BI__va99.js +10 -0
  1313. package/dist/prompts-_dDWkCAz.js +10 -0
  1314. package/dist/pw-ai-BLVMuSLv.js +1867 -0
  1315. package/dist/pw-ai-DZJWEF_f.js +1865 -0
  1316. package/dist/pw-ai-dzf-ptcn.js +1868 -0
  1317. package/dist/qmd-manager-B0FWDi1x.js +938 -0
  1318. package/dist/qmd-manager-CrDrpgh3.js +937 -0
  1319. package/dist/qmd-manager-DepEoASu.js +935 -0
  1320. package/dist/queue-2CW7pnm1.js +209 -0
  1321. package/dist/queue-DhjMEG_Q.js +209 -0
  1322. package/dist/redact-BHmk44DI.js +97 -0
  1323. package/dist/redact-ClVwO7Nn.js +97 -0
  1324. package/dist/register.agent-CE_8JbTE.js +265 -0
  1325. package/dist/register.agent-CGRdcftb.js +1003 -0
  1326. package/dist/register.anima-B4NPeesF.js +167 -0
  1327. package/dist/register.anima-hNCtQ_jl.js +167 -0
  1328. package/dist/register.configure-3prVPXwx.js +101 -0
  1329. package/dist/register.configure-Dqm2IveL.js +103 -0
  1330. package/dist/register.maintenance-BSIx4eNS.js +543 -0
  1331. package/dist/register.maintenance-DDeG6CHa.js +543 -0
  1332. package/dist/register.message-DcYPDzYr.js +657 -0
  1333. package/dist/register.message-RbFrjbch.js +660 -0
  1334. package/dist/register.onboard-BBJK_0_C.js +170 -0
  1335. package/dist/register.onboard-BrcWHC9j.js +170 -0
  1336. package/dist/register.setup-ByvEHxYQ.js +175 -0
  1337. package/dist/register.setup-CNwO5Yq3.js +175 -0
  1338. package/dist/register.status-health-sessions-CGT7bn4C.js +142 -0
  1339. package/dist/register.status-health-sessions-QK6iQSJc.js +313 -0
  1340. package/dist/register.subclis-Bd8eE94r.js +255 -0
  1341. package/dist/registry-BiekeB9q.js +116 -0
  1342. package/dist/registry-qI6V4gqU.js +116 -0
  1343. package/dist/reply-Clj5jcM5.js +32212 -0
  1344. package/dist/reply-DnH1Ueoz.js +32212 -0
  1345. package/dist/reply-prefix-D2NxVzGZ.js +100 -0
  1346. package/dist/reply-prefix-DPpz_mEi.js +100 -0
  1347. package/dist/requirements-BzZxj2Wu.js +107 -0
  1348. package/dist/requirements-DIW1svgA.js +107 -0
  1349. package/dist/rolldown-runtime-Cbj13DAv.js +20 -0
  1350. package/dist/routes-CXpne1-p.js +1820 -0
  1351. package/dist/routes-DtRwwTy6.js +1820 -0
  1352. package/dist/rpc-BBB_Fbes.js +70 -0
  1353. package/dist/rpc-CMEWfcci.js +70 -0
  1354. package/dist/run-main-DOXNrnL2.js +371 -0
  1355. package/dist/runtime-guard-BSUFiAQV.js +60 -0
  1356. package/dist/runtime-guard-DeOXA_86.js +60 -0
  1357. package/dist/sandbox-Bk0ZXcag.js +859 -0
  1358. package/dist/sandbox-D3CFkNeF.js +858 -0
  1359. package/dist/sandbox-cli-BCnnmQ03.js +458 -0
  1360. package/dist/sandbox-cli-Ctpa2Isy.js +461 -0
  1361. package/dist/secret-equal-B268kALC.js +13 -0
  1362. package/dist/secret-equal-Dghy3xsA.js +13 -0
  1363. package/dist/security-cli-BiiLLcQV.js +462 -0
  1364. package/dist/security-cli-DOZmLENS.js +465 -0
  1365. package/dist/send-BTA6qupx.js +10 -0
  1366. package/dist/send-BhAfdGII.js +10 -0
  1367. package/dist/send-C2t9xpXI.js +10 -0
  1368. package/dist/send-C6ccOW_U.js +10 -0
  1369. package/dist/send-CP74DxzJ.js +28 -0
  1370. package/dist/send-CS3G_YWr.js +10 -0
  1371. package/dist/send-D5JnqErc.js +10 -0
  1372. package/dist/send-DEMhcauI.js +32 -0
  1373. package/dist/send-DF8KJImx.js +28 -0
  1374. package/dist/send-DVW0CcHX.js +32 -0
  1375. package/dist/send-DigO-i9j.js +28 -0
  1376. package/dist/send-DqMLjD9Z.js +10 -0
  1377. package/dist/send-Dz2BDHll.js +32 -0
  1378. package/dist/send-ga9udK1_.js +10 -0
  1379. package/dist/send-oDz9NATu.js +10 -0
  1380. package/dist/server-context-BznDS2td.js +824 -0
  1381. package/dist/server-context-CXnE2F7d.js +824 -0
  1382. package/dist/server-node-events-Cu6Qkjor.js +231 -0
  1383. package/dist/server-node-events-Cv8MuF1g.js +233 -0
  1384. package/dist/service-BNVpYcQe.js +642 -0
  1385. package/dist/service-D56aMXUB.js +642 -0
  1386. package/dist/service-audit-DBsygs7y.js +488 -0
  1387. package/dist/service-audit-DKWJcTu4.js +488 -0
  1388. package/dist/session-CXcl3Xrp.js +181 -0
  1389. package/dist/session-DUFuU29j.js +179 -0
  1390. package/dist/session-M_uCxF0U.js +181 -0
  1391. package/dist/session-cost-usage-BwiTZuKl.js +600 -0
  1392. package/dist/session-cost-usage-DT9YNXTJ.js +600 -0
  1393. package/dist/session-key-BGiG_JcT.js +198 -0
  1394. package/dist/session-key-DxcgHezu.js +198 -0
  1395. package/dist/sessions-B8GUAiF6.js +1296 -0
  1396. package/dist/sessions-D0Zd1CND.js +1296 -0
  1397. package/dist/sessions-D0spLCm7.js +187 -0
  1398. package/dist/sessions-XvkHLXt4.js +2038 -0
  1399. package/dist/shared-CEHU0exQ.js +77 -0
  1400. package/dist/shared-Cgly1vPb.js +66 -0
  1401. package/dist/shared-DAHxpviD.js +77 -0
  1402. package/dist/shared-JOo05hST.js +66 -0
  1403. package/dist/shell-argv-CAq1mLa2.js +72 -0
  1404. package/dist/shell-argv-Ce41guJv.js +72 -0
  1405. package/dist/skill-scanner-CkaVLABv.js +263 -0
  1406. package/dist/skill-scanner-Coo4QoCd.js +263 -0
  1407. package/dist/skills-B-G7UHOa.js +808 -0
  1408. package/dist/skills-B5LQx4lT.js +807 -0
  1409. package/dist/skills-cli-DF9XJ2_0.js +286 -0
  1410. package/dist/skills-cli-eLBluVoD.js +289 -0
  1411. package/dist/skills-status-Clq9ZnYu.js +166 -0
  1412. package/dist/skills-status-JQluhU-P.js +166 -0
  1413. package/dist/sqlite-BukcjdJa.js +321 -0
  1414. package/dist/sqlite-CGcOZZ0C.js +368 -0
  1415. package/dist/sqlite-Ck6f9KWc.js +453 -0
  1416. package/dist/start-BvsoGNHJ.js +354 -0
  1417. package/dist/start-CF_Cp6YC.js +353 -0
  1418. package/dist/status-BKGJ7VPQ.js +27 -0
  1419. package/dist/status-BZip7mx9.js +27 -0
  1420. package/dist/status-BqYq_J5J.js +2132 -0
  1421. package/dist/status-CMnlcBVc.js +21 -0
  1422. package/dist/status-CXQrTLri.js +2137 -0
  1423. package/dist/status-tDZPwewW.js +21 -0
  1424. package/dist/status.update-CWiod7o_.js +79 -0
  1425. package/dist/status.update-D1PyrhoB.js +79 -0
  1426. package/dist/subagent-registry-CpSZ2RSO.js +2760 -0
  1427. package/dist/subagent-registry-DkCXRdwf.js +2759 -0
  1428. package/dist/subagent-registry-MPrTYaEB.js +14 -0
  1429. package/dist/subsystem-Dowf8fSU.js +860 -0
  1430. package/dist/system-cli-4Urk9KV1.js +79 -0
  1431. package/dist/system-cli-CgMzkg8R.js +82 -0
  1432. package/dist/system-run-command-DGk7dwQP.js +93 -0
  1433. package/dist/system-run-command-X9lDJIy0.js +93 -0
  1434. package/dist/systemd-BSrHDyeU.js +452 -0
  1435. package/dist/systemd-By5xdSB4.js +452 -0
  1436. package/dist/systemd-hints-BtjL_5Rh.js +36 -0
  1437. package/dist/systemd-hints-sJmr6cjb.js +36 -0
  1438. package/dist/systemd-linger-BNz8PXPF.js +75 -0
  1439. package/dist/systemd-linger-D5vLilKH.js +75 -0
  1440. package/dist/table-BL0lJzsm.js +279 -0
  1441. package/dist/table-DoiRPsn0.js +279 -0
  1442. package/dist/tailnet-CuiNECdL.js +42 -0
  1443. package/dist/tailnet-__ODlBOT.js +42 -0
  1444. package/dist/templates-DJ0ii6X2.js +47 -0
  1445. package/dist/templates-DPTs18po.js +47 -0
  1446. package/dist/thinking-BLU0jXR8.js +204 -0
  1447. package/dist/thinking-BXEswx1X.js +204 -0
  1448. package/dist/timeout-CswI_K-U.js +232 -0
  1449. package/dist/tokens-C-X7wDKj.js +14 -0
  1450. package/dist/tokens-DkvqA72p.js +14 -0
  1451. package/dist/transcript-events-C1hdue6u.js +17 -0
  1452. package/dist/transcript-events-C8Tqw4td.js +17 -0
  1453. package/dist/transcript-events-DW_H__a1.js +17 -0
  1454. package/dist/transcript-tools-DtE5di1q.js +108 -0
  1455. package/dist/transcript-tools-DuyYOkUq.js +108 -0
  1456. package/dist/trash-BJLK1vMn.js +23 -0
  1457. package/dist/trash-_x5UZ94k.js +23 -0
  1458. package/dist/tui-Cj25a9wc.js +3894 -0
  1459. package/dist/tui-Iv4T-9gg.js +3894 -0
  1460. package/dist/tui-cli-BkJxFa_n.js +50 -0
  1461. package/dist/tui-cli-DeFmBtZ7.js +47 -0
  1462. package/dist/update-DZRKbMjq.js +317 -0
  1463. package/dist/update-LFgxHHPd.js +317 -0
  1464. package/dist/update-check-CWc7YXmc.js +400 -0
  1465. package/dist/update-check-IhlWaui6.js +400 -0
  1466. package/dist/update-cli-qGGlL5Lg.js +1105 -0
  1467. package/dist/update-cli-rMqhSUMc.js +1105 -0
  1468. package/dist/update-runner-BT77y3bz.js +894 -0
  1469. package/dist/update-runner-DvzFqFJf.js +894 -0
  1470. package/dist/usage-BeZuVAY4.js +4516 -0
  1471. package/dist/usage-format-BAirWUSO.js +36 -0
  1472. package/dist/usage-format-CpORtVCG.js +36 -0
  1473. package/dist/utils-Bsw__U-F.js +243 -0
  1474. package/dist/utils-C9sj30YY.js +239 -0
  1475. package/dist/warning-filter.js +48 -0
  1476. package/dist/web-DEx7MMYq.js +2203 -0
  1477. package/dist/web-DHSoj6bL.js +46842 -0
  1478. package/dist/web-DI0g5K4c.js +63 -0
  1479. package/dist/webhooks-cli-sfLRE89X.js +319 -0
  1480. package/dist/webhooks-cli-xtZBlaD1.js +316 -0
  1481. package/dist/whatsapp-actions-DIREhxrq.js +49 -0
  1482. package/dist/whatsapp-actions-TGHl9p4i.js +45 -0
  1483. package/dist/whatsapp-actions-dBHozeuk.js +53 -0
  1484. package/dist/widearea-dns-B6ocX23x.js +127 -0
  1485. package/dist/widearea-dns-NsEUNYwz.js +127 -0
  1486. package/dist/workspace-Dcfoy5JJ.js +649 -0
  1487. package/dist/ws-COSqlEPx.js +218 -0
  1488. package/dist/ws-log-N8R5MvGE.js +267 -0
  1489. package/dist/ws-log-gwFxPxj5.js +267 -0
  1490. package/dist/wsl-CqyuRvtM.js +26 -0
  1491. package/dist/wsl-ymJYvc9Q.js +26 -0
  1492. package/package.json +209 -0
  1493. package/skills/1password/SKILL.md +70 -0
  1494. package/skills/1password/references/cli-examples.md +29 -0
  1495. package/skills/1password/references/get-started.md +17 -0
  1496. package/skills/animahub/SKILL.md +77 -0
  1497. package/skills/apple-notes/SKILL.md +77 -0
  1498. package/skills/apple-reminders/SKILL.md +96 -0
  1499. package/skills/audit/SKILL.md +68 -0
  1500. package/skills/bear-notes/SKILL.md +107 -0
  1501. package/skills/blogwatcher/SKILL.md +69 -0
  1502. package/skills/blucli/SKILL.md +47 -0
  1503. package/skills/bluebubbles/SKILL.md +131 -0
  1504. package/skills/camsnap/SKILL.md +45 -0
  1505. package/skills/canvas/SKILL.md +198 -0
  1506. package/skills/coding-agent/SKILL.md +284 -0
  1507. package/skills/deploy/SKILL.md +45 -0
  1508. package/skills/discord/SKILL.md +160 -0
  1509. package/skills/eightctl/SKILL.md +50 -0
  1510. package/skills/food-order/SKILL.md +48 -0
  1511. package/skills/gemini/SKILL.md +43 -0
  1512. package/skills/gifgrep/SKILL.md +79 -0
  1513. package/skills/github/SKILL.md +77 -0
  1514. package/skills/gog/SKILL.md +116 -0
  1515. package/skills/goplaces/SKILL.md +52 -0
  1516. package/skills/healthcheck/SKILL.md +245 -0
  1517. package/skills/himalaya/SKILL.md +257 -0
  1518. package/skills/himalaya/references/configuration.md +184 -0
  1519. package/skills/himalaya/references/message-composition.md +199 -0
  1520. package/skills/imsg/SKILL.md +74 -0
  1521. package/skills/mcporter/SKILL.md +61 -0
  1522. package/skills/model-usage/SKILL.md +69 -0
  1523. package/skills/model-usage/references/codexbar-cli.md +33 -0
  1524. package/skills/model-usage/scripts/model_usage.py +310 -0
  1525. package/skills/nano-banana-pro/SKILL.md +58 -0
  1526. package/skills/nano-banana-pro/scripts/generate_image.py +184 -0
  1527. package/skills/nano-pdf/SKILL.md +38 -0
  1528. package/skills/notion/SKILL.md +172 -0
  1529. package/skills/obsidian/SKILL.md +81 -0
  1530. package/skills/openai-image-gen/SKILL.md +89 -0
  1531. package/skills/openai-image-gen/scripts/gen.py +240 -0
  1532. package/skills/openai-whisper/SKILL.md +38 -0
  1533. package/skills/openai-whisper-api/SKILL.md +52 -0
  1534. package/skills/openai-whisper-api/scripts/transcribe.sh +85 -0
  1535. package/skills/openhue/SKILL.md +51 -0
  1536. package/skills/oracle/SKILL.md +125 -0
  1537. package/skills/ordercli/SKILL.md +78 -0
  1538. package/skills/peekaboo/SKILL.md +190 -0
  1539. package/skills/review/SKILL.md +58 -0
  1540. package/skills/sag/SKILL.md +87 -0
  1541. package/skills/session-logs/SKILL.md +115 -0
  1542. package/skills/sherpa-onnx-tts/SKILL.md +103 -0
  1543. package/skills/sherpa-onnx-tts/bin/sherpa-onnx-tts +178 -0
  1544. package/skills/skill-creator/SKILL.md +370 -0
  1545. package/skills/skill-creator/license.txt +202 -0
  1546. package/skills/skill-creator/scripts/init_skill.py +378 -0
  1547. package/skills/skill-creator/scripts/package_skill.py +111 -0
  1548. package/skills/skill-creator/scripts/quick_validate.py +101 -0
  1549. package/skills/slack/SKILL.md +144 -0
  1550. package/skills/songsee/SKILL.md +49 -0
  1551. package/skills/sonoscli/SKILL.md +46 -0
  1552. package/skills/spotify-player/SKILL.md +64 -0
  1553. package/skills/summarize/SKILL.md +87 -0
  1554. package/skills/things-mac/SKILL.md +86 -0
  1555. package/skills/tmux/SKILL.md +135 -0
  1556. package/skills/tmux/scripts/find-sessions.sh +112 -0
  1557. package/skills/tmux/scripts/wait-for-text.sh +83 -0
  1558. package/skills/trello/SKILL.md +95 -0
  1559. package/skills/video-frames/SKILL.md +46 -0
  1560. package/skills/video-frames/scripts/frame.sh +81 -0
  1561. package/skills/voice-call/SKILL.md +45 -0
  1562. package/skills/wacli/SKILL.md +72 -0
  1563. package/skills/weather/SKILL.md +54 -0
  1564. package/templates/BRAIN.md +65 -0
  1565. package/templates/GUT.md +44 -0
  1566. package/templates/HEART.md +51 -0
  1567. package/templates/MEMORY.md +66 -0
  1568. package/templates/SHADOW.md +68 -0
  1569. package/templates/SOUL.md +38 -0
  1570. package/templates/SPIRIT.md +43 -0
@@ -0,0 +1,2739 @@
1
+ import { t as CONFIG_PATH } from "./paths-C6VCWKo3.js";
2
+ import { B as theme, R as colorize, u as defaultRuntime, z as isRich$1 } from "./subsystem-Dowf8fSU.js";
3
+ import { C as shortenHomePath } from "./utils-Bsw__U-F.js";
4
+ import "./thinking-BLU0jXR8.js";
5
+ import "./subagent-registry-CpSZ2RSO.js";
6
+ import { c as loadProviderUsageSummary, d as resolveUsageProviderId, u as formatUsageWindowSummary } from "./reply-DnH1Ueoz.js";
7
+ import "./exec-Bv3pyjeM.js";
8
+ import { a as resolveAgentModelPrimary, c as resolveDefaultAgentId, i as resolveAgentModelFallbacksOverride, r as resolveAgentDir, s as resolveAgentWorkspaceDir, w as resolveDefaultAgentWorkspaceDir } from "./agent-scope-V1bi9OYL.js";
9
+ import { At as DEFAULT_PROVIDER, B as getShellEnvAppliedKeys, G as shouldEnableShellEnvFallback, I as resolveApiKeyForProvider, L as resolveAwsSdkEnvVarName, Ot as DEFAULT_CONTEXT_TOKENS, P as getCustomProviderApiKey, R as resolveEnvApiKey, Tt as resolveAuthProfileDisplayLabel, c as normalizeProviderId, dt as setAuthProfileOrder, f as resolveConfiguredModelRef, ft as upsertAuthProfile, h as resolveModelRefFromString, kt as DEFAULT_MODEL, l as parseModelRef, mt as ensureAuthProfileStore, o as modelKey, p as resolveDefaultModelForAgent, r as buildModelAliasIndex, rt as resolveProfileUnusableUntilForDisplay, tt as resolveAuthProfileOrder, ut as listProfilesForProvider, vt as resolveAuthStorePathForDisplay, yt as resolveAnimaAgentDir } from "./model-selection-BnEobs_z.js";
10
+ import { t as formatCliCommand } from "./command-format-DELazozB.js";
11
+ import "./boolean-Wzu0-e0P.js";
12
+ import "./env-0lJfCPsw.js";
13
+ import { b as runEmbeddedPiAgent } from "./lanes-CNxj3tit.js";
14
+ import { i as loadConfig, m as parseDurationMs, o as readConfigFileSnapshot } from "./config-Xm0j9LUa.js";
15
+ import "./manifest-registry-CW1zCyRF.js";
16
+ import "./sessions-B8GUAiF6.js";
17
+ import "./image-ops-omlvdfah.js";
18
+ import "./polls-CItfB1H8.js";
19
+ import "./mime-C1RlpUSs.js";
20
+ import { A as describeFailoverError, at as resolveModel, en as loadModelCatalog, nn as ensureAnimaModelsJson } from "./cli-session-CP7ZH2-6.js";
21
+ import "./dock-cPBY4qGl.js";
22
+ import "./logging-54nXj81z.js";
23
+ import "./accounts-Cc5E4IDO.js";
24
+ import "./tokens-DkvqA72p.js";
25
+ import "./sandbox-Bk0ZXcag.js";
26
+ import "./chrome-DScZx4Lk.js";
27
+ import "./auth-91o2YM96.js";
28
+ import "./server-context-CXnE2F7d.js";
29
+ import "./skills-B-G7UHOa.js";
30
+ import "./routes-DtRwwTy6.js";
31
+ import "./paths-BgUi2Z2G.js";
32
+ import "./ports-D94CwCrv.js";
33
+ import "./trash-_x5UZ94k.js";
34
+ import "./message-channel-dSTVVCyX.js";
35
+ import "./plugins-CmSUIUNi.js";
36
+ import { i as resolveSessionTranscriptPath, s as resolveSessionTranscriptsDirForAgent } from "./paths-hcX1Gqg5.js";
37
+ import "./commands-registry-DYfRSVF3.js";
38
+ import "./markdown-tables-DHgOK2vI.js";
39
+ import "./deliver-D6cdhg5m.js";
40
+ import "./pairing-store-CGYSwICJ.js";
41
+ import "./client-CC94YZrT.js";
42
+ import "./call-DPzNR_Qi.js";
43
+ import "./nodes-screen-1YiLkqr5.js";
44
+ import "./memory-cli-BmIyAOZm.js";
45
+ import "./manager-CDgcZ51c.js";
46
+ import "./sqlite-CGcOZZ0C.js";
47
+ import "./redact-BHmk44DI.js";
48
+ import "./common-zW9Y2P1B.js";
49
+ import { t as formatDocsLink } from "./links-DPGe0OHw.js";
50
+ import { n as runCommandWithRuntime, t as resolveOptionFromCommand } from "./cli-utils-BTBABPX9.js";
51
+ import { r as withProgressTotals } from "./progress-Bek_GyWS.js";
52
+ import "./control-service-BeOtZCCS.js";
53
+ import "./dispatcher-C1B6cT_7.js";
54
+ import { n as discoverModels, t as discoverAuthStorage } from "./pi-model-discovery-BkqhoPls.js";
55
+ import "./channel-selection-CujyiWGM.js";
56
+ import "./delivery-queue-TnQykYsg.js";
57
+ import "./pi-tools.policy-D9AUlreI.js";
58
+ import "./session-cost-usage-DT9YNXTJ.js";
59
+ import { n as stylePromptMessage, r as stylePromptTitle, t as stylePromptHint } from "./prompt-style-lu0clOOE.js";
60
+ import "./note-Bi8Wb8DV.js";
61
+ import { t as createClackPrompter } from "./clack-prompter-B1YxZdRy.js";
62
+ import { d as openUrl } from "./onboard-helpers-BEaUind0.js";
63
+ import { t as renderTable } from "./table-BL0lJzsm.js";
64
+ import { _ as applyAuthProfileConfig, a as resolveProviderMatch, c as resolvePluginProviders, i as pickAuthMethod, kt as validateAnthropicSetupToken, n as applyDefaultModel, o as createVpsAwareOAuthHandlers, r as mergeConfigPatch, s as isRemoteEnvironment, t as githubCopilotLoginCommand } from "./github-copilot-auth-DGmyWJms.js";
65
+ import { a as normalizeAlias, c as updateConfig, i as isLocalBaseUrl, n as formatMs, o as resolveKnownAgentId, r as formatTokenK, s as resolveModelTarget, t as ensureFlagCompatibility } from "./shared-CEHU0exQ.js";
66
+ import { n as logConfigUpdated } from "./logging-mcb66J0p.js";
67
+ import { t as inferParamBFromIdOrName } from "./model-param-b-C4BL7w0Z.js";
68
+ import { n as redactSecrets } from "./format-CjKG6raZ.js";
69
+ import { n as buildAuthHealthSummary, r as formatRemainingShort, t as DEFAULT_OAUTH_WARN_MS } from "./auth-health-CctpRTdC.js";
70
+ import path from "node:path";
71
+ import fs from "node:fs/promises";
72
+ import crypto from "node:crypto";
73
+ import { complete, getEnvApiKey, getModel } from "@mariozechner/pi-ai";
74
+ import { Type } from "@sinclair/typebox";
75
+ import { cancel, confirm, isCancel, multiselect, select, text } from "@clack/prompts";
76
+
77
+ //#region src/commands/models/aliases.ts
78
+ async function modelsAliasesListCommand(opts, runtime) {
79
+ ensureFlagCompatibility(opts);
80
+ const models = loadConfig().agents?.defaults?.models ?? {};
81
+ const aliases = Object.entries(models).reduce((acc, [modelKey, entry]) => {
82
+ const alias = entry?.alias?.trim();
83
+ if (alias) acc[alias] = modelKey;
84
+ return acc;
85
+ }, {});
86
+ if (opts.json) {
87
+ runtime.log(JSON.stringify({ aliases }, null, 2));
88
+ return;
89
+ }
90
+ if (opts.plain) {
91
+ for (const [alias, target] of Object.entries(aliases)) runtime.log(`${alias} ${target}`);
92
+ return;
93
+ }
94
+ runtime.log(`Aliases (${Object.keys(aliases).length}):`);
95
+ if (Object.keys(aliases).length === 0) {
96
+ runtime.log("- none");
97
+ return;
98
+ }
99
+ for (const [alias, target] of Object.entries(aliases)) runtime.log(`- ${alias} -> ${target}`);
100
+ }
101
+ async function modelsAliasesAddCommand(aliasRaw, modelRaw, runtime) {
102
+ const alias = normalizeAlias(aliasRaw);
103
+ const resolved = resolveModelTarget({
104
+ raw: modelRaw,
105
+ cfg: loadConfig()
106
+ });
107
+ await updateConfig((cfg) => {
108
+ const modelKey = `${resolved.provider}/${resolved.model}`;
109
+ const nextModels = { ...cfg.agents?.defaults?.models };
110
+ for (const [key, entry] of Object.entries(nextModels)) {
111
+ const existing = entry?.alias?.trim();
112
+ if (existing && existing === alias && key !== modelKey) throw new Error(`Alias ${alias} already points to ${key}.`);
113
+ }
114
+ nextModels[modelKey] = {
115
+ ...nextModels[modelKey] ?? {},
116
+ alias
117
+ };
118
+ return {
119
+ ...cfg,
120
+ agents: {
121
+ ...cfg.agents,
122
+ defaults: {
123
+ ...cfg.agents?.defaults,
124
+ models: nextModels
125
+ }
126
+ }
127
+ };
128
+ });
129
+ logConfigUpdated(runtime);
130
+ runtime.log(`Alias ${alias} -> ${resolved.provider}/${resolved.model}`);
131
+ }
132
+ async function modelsAliasesRemoveCommand(aliasRaw, runtime) {
133
+ const alias = normalizeAlias(aliasRaw);
134
+ const updated = await updateConfig((cfg) => {
135
+ const nextModels = { ...cfg.agents?.defaults?.models };
136
+ let found = false;
137
+ for (const [key, entry] of Object.entries(nextModels)) if (entry?.alias?.trim() === alias) {
138
+ nextModels[key] = {
139
+ ...entry,
140
+ alias: void 0
141
+ };
142
+ found = true;
143
+ break;
144
+ }
145
+ if (!found) throw new Error(`Alias not found: ${alias}`);
146
+ return {
147
+ ...cfg,
148
+ agents: {
149
+ ...cfg.agents,
150
+ defaults: {
151
+ ...cfg.agents?.defaults,
152
+ models: nextModels
153
+ }
154
+ }
155
+ };
156
+ });
157
+ logConfigUpdated(runtime);
158
+ if (!updated.agents?.defaults?.models || Object.values(updated.agents.defaults.models).every((entry) => !entry?.alias?.trim())) runtime.log("No aliases configured.");
159
+ }
160
+
161
+ //#endregion
162
+ //#region src/commands/models/auth.ts
163
+ const confirm$1 = (params) => confirm({
164
+ ...params,
165
+ message: stylePromptMessage(params.message)
166
+ });
167
+ const text$1 = (params) => text({
168
+ ...params,
169
+ message: stylePromptMessage(params.message)
170
+ });
171
+ const select$1 = (params) => select({
172
+ ...params,
173
+ message: stylePromptMessage(params.message),
174
+ options: params.options.map((opt) => opt.hint === void 0 ? opt : {
175
+ ...opt,
176
+ hint: stylePromptHint(opt.hint)
177
+ })
178
+ });
179
+ function resolveTokenProvider(raw) {
180
+ const trimmed = raw?.trim();
181
+ if (!trimmed) return null;
182
+ if (normalizeProviderId(trimmed) === "anthropic") return "anthropic";
183
+ return "custom";
184
+ }
185
+ function resolveDefaultTokenProfileId(provider) {
186
+ return `${normalizeProviderId(provider)}:manual`;
187
+ }
188
+ async function modelsAuthSetupTokenCommand(opts, runtime) {
189
+ const provider = resolveTokenProvider(opts.provider ?? "anthropic");
190
+ if (provider !== "anthropic") throw new Error("Only --provider anthropic is supported for setup-token.");
191
+ if (!process.stdin.isTTY) throw new Error("setup-token requires an interactive TTY.");
192
+ if (!opts.yes) {
193
+ if (!await confirm$1({
194
+ message: "Have you run `claude setup-token` and copied the token?",
195
+ initialValue: true
196
+ })) return;
197
+ }
198
+ const tokenInput = await text$1({
199
+ message: "Paste Anthropic setup-token",
200
+ validate: (value) => validateAnthropicSetupToken(String(value ?? ""))
201
+ });
202
+ const token = String(tokenInput ?? "").trim();
203
+ const profileId = resolveDefaultTokenProfileId(provider);
204
+ upsertAuthProfile({
205
+ profileId,
206
+ credential: {
207
+ type: "token",
208
+ provider,
209
+ token
210
+ }
211
+ });
212
+ await updateConfig((cfg) => applyAuthProfileConfig(cfg, {
213
+ profileId,
214
+ provider,
215
+ mode: "token"
216
+ }));
217
+ logConfigUpdated(runtime);
218
+ runtime.log(`Auth profile: ${profileId} (${provider}/token)`);
219
+ }
220
+ async function modelsAuthPasteTokenCommand(opts, runtime) {
221
+ const rawProvider = opts.provider?.trim();
222
+ if (!rawProvider) throw new Error("Missing --provider.");
223
+ const provider = normalizeProviderId(rawProvider);
224
+ const profileId = opts.profileId?.trim() || resolveDefaultTokenProfileId(provider);
225
+ const tokenInput = await text$1({
226
+ message: `Paste token for ${provider}`,
227
+ validate: (value) => value?.trim() ? void 0 : "Required"
228
+ });
229
+ const token = String(tokenInput ?? "").trim();
230
+ const expires = opts.expiresIn?.trim() && opts.expiresIn.trim().length > 0 ? Date.now() + parseDurationMs(String(opts.expiresIn ?? "").trim(), { defaultUnit: "d" }) : void 0;
231
+ upsertAuthProfile({
232
+ profileId,
233
+ credential: {
234
+ type: "token",
235
+ provider,
236
+ token,
237
+ ...expires ? { expires } : {}
238
+ }
239
+ });
240
+ await updateConfig((cfg) => applyAuthProfileConfig(cfg, {
241
+ profileId,
242
+ provider,
243
+ mode: "token"
244
+ }));
245
+ logConfigUpdated(runtime);
246
+ runtime.log(`Auth profile: ${profileId} (${provider}/token)`);
247
+ }
248
+ async function modelsAuthAddCommand(_opts, runtime) {
249
+ const provider = await select$1({
250
+ message: "Token provider",
251
+ options: [{
252
+ value: "anthropic",
253
+ label: "anthropic"
254
+ }, {
255
+ value: "custom",
256
+ label: "custom (type provider id)"
257
+ }]
258
+ });
259
+ const providerId = provider === "custom" ? normalizeProviderId(String(await text$1({
260
+ message: "Provider id",
261
+ validate: (value) => value?.trim() ? void 0 : "Required"
262
+ }))) : provider;
263
+ if (await select$1({
264
+ message: "Token method",
265
+ options: [...providerId === "anthropic" ? [{
266
+ value: "setup-token",
267
+ label: "setup-token (claude)",
268
+ hint: "Paste a setup-token from `claude setup-token`"
269
+ }] : [], {
270
+ value: "paste",
271
+ label: "paste token"
272
+ }]
273
+ }) === "setup-token") {
274
+ await modelsAuthSetupTokenCommand({ provider: providerId }, runtime);
275
+ return;
276
+ }
277
+ const profileIdDefault = resolveDefaultTokenProfileId(providerId);
278
+ await modelsAuthPasteTokenCommand({
279
+ provider: providerId,
280
+ profileId: String(await text$1({
281
+ message: "Profile id",
282
+ initialValue: profileIdDefault,
283
+ validate: (value) => value?.trim() ? void 0 : "Required"
284
+ })).trim(),
285
+ expiresIn: await confirm$1({
286
+ message: "Does this token expire?",
287
+ initialValue: false
288
+ }) ? String(await text$1({
289
+ message: "Expires in (duration)",
290
+ initialValue: "365d",
291
+ validate: (value) => {
292
+ try {
293
+ parseDurationMs(String(value ?? ""), { defaultUnit: "d" });
294
+ return;
295
+ } catch {
296
+ return "Invalid duration (e.g. 365d, 12h, 30m)";
297
+ }
298
+ }
299
+ })).trim() : void 0
300
+ }, runtime);
301
+ }
302
+ function resolveRequestedLoginProviderOrThrow(providers, rawProvider) {
303
+ const requested = rawProvider?.trim();
304
+ if (!requested) return null;
305
+ const matched = resolveProviderMatch(providers, requested);
306
+ if (matched) return matched;
307
+ const available = providers.map((provider) => provider.id).filter(Boolean).toSorted((a, b) => a.localeCompare(b));
308
+ const availableText = available.length > 0 ? available.join(", ") : "(none)";
309
+ throw new Error(`Unknown provider "${requested}". Loaded providers: ${availableText}. Verify plugins via \`${formatCliCommand("anima plugins list --json")}\`.`);
310
+ }
311
+ function credentialMode(credential) {
312
+ if (credential.type === "api_key") return "api_key";
313
+ if (credential.type === "token") return "token";
314
+ return "oauth";
315
+ }
316
+ async function modelsAuthLoginCommand(opts, runtime) {
317
+ if (!process.stdin.isTTY) throw new Error("models auth login requires an interactive TTY.");
318
+ const snapshot = await readConfigFileSnapshot();
319
+ if (!snapshot.valid) {
320
+ const issues = snapshot.issues.map((issue) => `- ${issue.path}: ${issue.message}`).join("\n");
321
+ throw new Error(`Invalid config at ${snapshot.path}\n${issues}`);
322
+ }
323
+ const config = snapshot.config;
324
+ const defaultAgentId = resolveDefaultAgentId(config);
325
+ const agentDir = resolveAgentDir(config, defaultAgentId);
326
+ const workspaceDir = resolveAgentWorkspaceDir(config, defaultAgentId) ?? resolveDefaultAgentWorkspaceDir();
327
+ const providers = resolvePluginProviders({
328
+ config,
329
+ workspaceDir
330
+ });
331
+ if (providers.length === 0) throw new Error(`No provider plugins found. Install one via \`${formatCliCommand("anima plugins install")}\`.`);
332
+ const prompter = createClackPrompter();
333
+ const selectedProvider = resolveRequestedLoginProviderOrThrow(providers, opts.provider) ?? await prompter.select({
334
+ message: "Select a provider",
335
+ options: providers.map((provider) => ({
336
+ value: provider.id,
337
+ label: provider.label,
338
+ hint: provider.docsPath ? `Docs: ${provider.docsPath}` : void 0
339
+ }))
340
+ }).then((id) => resolveProviderMatch(providers, String(id)));
341
+ if (!selectedProvider) throw new Error("Unknown provider. Use --provider <id> to pick a provider plugin.");
342
+ const chosenMethod = pickAuthMethod(selectedProvider, opts.method) ?? (selectedProvider.auth.length === 1 ? selectedProvider.auth[0] : await prompter.select({
343
+ message: `Auth method for ${selectedProvider.label}`,
344
+ options: selectedProvider.auth.map((method) => ({
345
+ value: method.id,
346
+ label: method.label,
347
+ hint: method.hint
348
+ }))
349
+ }).then((id) => selectedProvider.auth.find((method) => method.id === String(id))));
350
+ if (!chosenMethod) throw new Error("Unknown auth method. Use --method <id> to select one.");
351
+ const isRemote = isRemoteEnvironment();
352
+ const result = await chosenMethod.run({
353
+ config,
354
+ agentDir,
355
+ workspaceDir,
356
+ prompter,
357
+ runtime,
358
+ isRemote,
359
+ openUrl: async (url) => {
360
+ await openUrl(url);
361
+ },
362
+ oauth: { createVpsAwareHandlers: (params) => createVpsAwareOAuthHandlers(params) }
363
+ });
364
+ for (const profile of result.profiles) upsertAuthProfile({
365
+ profileId: profile.profileId,
366
+ credential: profile.credential,
367
+ agentDir
368
+ });
369
+ await updateConfig((cfg) => {
370
+ let next = cfg;
371
+ if (result.configPatch) next = mergeConfigPatch(next, result.configPatch);
372
+ for (const profile of result.profiles) next = applyAuthProfileConfig(next, {
373
+ profileId: profile.profileId,
374
+ provider: profile.credential.provider,
375
+ mode: credentialMode(profile.credential)
376
+ });
377
+ if (opts.setDefault && result.defaultModel) next = applyDefaultModel(next, result.defaultModel);
378
+ return next;
379
+ });
380
+ logConfigUpdated(runtime);
381
+ for (const profile of result.profiles) runtime.log(`Auth profile: ${profile.profileId} (${profile.credential.provider}/${credentialMode(profile.credential)})`);
382
+ if (result.defaultModel) runtime.log(opts.setDefault ? `Default model set to ${result.defaultModel}` : `Default model available: ${result.defaultModel} (use --set-default to apply)`);
383
+ if (result.notes && result.notes.length > 0) await prompter.note(result.notes.join("\n"), "Provider notes");
384
+ }
385
+
386
+ //#endregion
387
+ //#region src/commands/models/auth-order.ts
388
+ function resolveTargetAgent(cfg, raw) {
389
+ const agentId = resolveKnownAgentId({
390
+ cfg,
391
+ rawAgentId: raw
392
+ }) ?? resolveDefaultAgentId(cfg);
393
+ return {
394
+ agentId,
395
+ agentDir: resolveAgentDir(cfg, agentId)
396
+ };
397
+ }
398
+ function describeOrder(store, provider) {
399
+ const providerKey = normalizeProviderId(provider);
400
+ const order = store.order?.[providerKey];
401
+ return Array.isArray(order) ? order : [];
402
+ }
403
+ async function modelsAuthOrderGetCommand(opts, runtime) {
404
+ const rawProvider = opts.provider?.trim();
405
+ if (!rawProvider) throw new Error("Missing --provider.");
406
+ const provider = normalizeProviderId(rawProvider);
407
+ const { agentId, agentDir } = resolveTargetAgent(loadConfig(), opts.agent);
408
+ const order = describeOrder(ensureAuthProfileStore(agentDir, { allowKeychainPrompt: false }), provider);
409
+ if (opts.json) {
410
+ runtime.log(JSON.stringify({
411
+ agentId,
412
+ agentDir,
413
+ provider,
414
+ authStorePath: shortenHomePath(`${agentDir}/auth-profiles.json`),
415
+ order: order.length > 0 ? order : null
416
+ }, null, 2));
417
+ return;
418
+ }
419
+ runtime.log(`Agent: ${agentId}`);
420
+ runtime.log(`Provider: ${provider}`);
421
+ runtime.log(`Auth file: ${shortenHomePath(`${agentDir}/auth-profiles.json`)}`);
422
+ runtime.log(order.length > 0 ? `Order override: ${order.join(", ")}` : "Order override: (none)");
423
+ }
424
+ async function modelsAuthOrderClearCommand(opts, runtime) {
425
+ const rawProvider = opts.provider?.trim();
426
+ if (!rawProvider) throw new Error("Missing --provider.");
427
+ const provider = normalizeProviderId(rawProvider);
428
+ const { agentId, agentDir } = resolveTargetAgent(loadConfig(), opts.agent);
429
+ if (!await setAuthProfileOrder({
430
+ agentDir,
431
+ provider,
432
+ order: null
433
+ })) throw new Error("Failed to update auth-profiles.json (lock busy?).");
434
+ runtime.log(`Agent: ${agentId}`);
435
+ runtime.log(`Provider: ${provider}`);
436
+ runtime.log("Cleared per-agent order override.");
437
+ }
438
+ async function modelsAuthOrderSetCommand(opts, runtime) {
439
+ const rawProvider = opts.provider?.trim();
440
+ if (!rawProvider) throw new Error("Missing --provider.");
441
+ const provider = normalizeProviderId(rawProvider);
442
+ const { agentId, agentDir } = resolveTargetAgent(loadConfig(), opts.agent);
443
+ const store = ensureAuthProfileStore(agentDir, { allowKeychainPrompt: false });
444
+ const providerKey = normalizeProviderId(provider);
445
+ const requested = (opts.order ?? []).map((entry) => String(entry).trim()).filter(Boolean);
446
+ if (requested.length === 0) throw new Error("Missing profile ids. Provide one or more profile ids.");
447
+ for (const profileId of requested) {
448
+ const cred = store.profiles[profileId];
449
+ if (!cred) throw new Error(`Auth profile "${profileId}" not found in ${agentDir}.`);
450
+ if (normalizeProviderId(cred.provider) !== providerKey) throw new Error(`Auth profile "${profileId}" is for ${cred.provider}, not ${provider}.`);
451
+ }
452
+ const updated = await setAuthProfileOrder({
453
+ agentDir,
454
+ provider,
455
+ order: requested
456
+ });
457
+ if (!updated) throw new Error("Failed to update auth-profiles.json (lock busy?).");
458
+ runtime.log(`Agent: ${agentId}`);
459
+ runtime.log(`Provider: ${provider}`);
460
+ runtime.log(`Order override: ${describeOrder(updated, provider).join(", ")}`);
461
+ }
462
+
463
+ //#endregion
464
+ //#region src/commands/models/fallbacks.ts
465
+ async function modelsFallbacksListCommand(opts, runtime) {
466
+ ensureFlagCompatibility(opts);
467
+ const fallbacks = loadConfig().agents?.defaults?.model?.fallbacks ?? [];
468
+ if (opts.json) {
469
+ runtime.log(JSON.stringify({ fallbacks }, null, 2));
470
+ return;
471
+ }
472
+ if (opts.plain) {
473
+ for (const entry of fallbacks) runtime.log(entry);
474
+ return;
475
+ }
476
+ runtime.log(`Fallbacks (${fallbacks.length}):`);
477
+ if (fallbacks.length === 0) {
478
+ runtime.log("- none");
479
+ return;
480
+ }
481
+ for (const entry of fallbacks) runtime.log(`- ${entry}`);
482
+ }
483
+ async function modelsFallbacksAddCommand(modelRaw, runtime) {
484
+ const updated = await updateConfig((cfg) => {
485
+ const resolved = resolveModelTarget({
486
+ raw: modelRaw,
487
+ cfg
488
+ });
489
+ const targetKey = modelKey(resolved.provider, resolved.model);
490
+ const nextModels = { ...cfg.agents?.defaults?.models };
491
+ if (!nextModels[targetKey]) nextModels[targetKey] = {};
492
+ const aliasIndex = buildModelAliasIndex({
493
+ cfg,
494
+ defaultProvider: DEFAULT_PROVIDER
495
+ });
496
+ const existing = cfg.agents?.defaults?.model?.fallbacks ?? [];
497
+ if (existing.map((entry) => resolveModelRefFromString({
498
+ raw: String(entry ?? ""),
499
+ defaultProvider: DEFAULT_PROVIDER,
500
+ aliasIndex
501
+ })).filter((entry) => Boolean(entry)).map((entry) => modelKey(entry.ref.provider, entry.ref.model)).includes(targetKey)) return cfg;
502
+ const existingModel = cfg.agents?.defaults?.model;
503
+ return {
504
+ ...cfg,
505
+ agents: {
506
+ ...cfg.agents,
507
+ defaults: {
508
+ ...cfg.agents?.defaults,
509
+ model: {
510
+ ...existingModel?.primary ? { primary: existingModel.primary } : void 0,
511
+ fallbacks: [...existing, targetKey]
512
+ },
513
+ models: nextModels
514
+ }
515
+ }
516
+ };
517
+ });
518
+ logConfigUpdated(runtime);
519
+ runtime.log(`Fallbacks: ${(updated.agents?.defaults?.model?.fallbacks ?? []).join(", ")}`);
520
+ }
521
+ async function modelsFallbacksRemoveCommand(modelRaw, runtime) {
522
+ const updated = await updateConfig((cfg) => {
523
+ const resolved = resolveModelTarget({
524
+ raw: modelRaw,
525
+ cfg
526
+ });
527
+ const targetKey = modelKey(resolved.provider, resolved.model);
528
+ const aliasIndex = buildModelAliasIndex({
529
+ cfg,
530
+ defaultProvider: DEFAULT_PROVIDER
531
+ });
532
+ const existing = cfg.agents?.defaults?.model?.fallbacks ?? [];
533
+ const filtered = existing.filter((entry) => {
534
+ const resolvedEntry = resolveModelRefFromString({
535
+ raw: String(entry ?? ""),
536
+ defaultProvider: DEFAULT_PROVIDER,
537
+ aliasIndex
538
+ });
539
+ if (!resolvedEntry) return true;
540
+ return modelKey(resolvedEntry.ref.provider, resolvedEntry.ref.model) !== targetKey;
541
+ });
542
+ if (filtered.length === existing.length) throw new Error(`Fallback not found: ${targetKey}`);
543
+ const existingModel = cfg.agents?.defaults?.model;
544
+ return {
545
+ ...cfg,
546
+ agents: {
547
+ ...cfg.agents,
548
+ defaults: {
549
+ ...cfg.agents?.defaults,
550
+ model: {
551
+ ...existingModel?.primary ? { primary: existingModel.primary } : void 0,
552
+ fallbacks: filtered
553
+ }
554
+ }
555
+ }
556
+ };
557
+ });
558
+ logConfigUpdated(runtime);
559
+ runtime.log(`Fallbacks: ${(updated.agents?.defaults?.model?.fallbacks ?? []).join(", ")}`);
560
+ }
561
+ async function modelsFallbacksClearCommand(runtime) {
562
+ await updateConfig((cfg) => {
563
+ const existingModel = cfg.agents?.defaults?.model;
564
+ return {
565
+ ...cfg,
566
+ agents: {
567
+ ...cfg.agents,
568
+ defaults: {
569
+ ...cfg.agents?.defaults,
570
+ model: {
571
+ ...existingModel?.primary ? { primary: existingModel.primary } : void 0,
572
+ fallbacks: []
573
+ }
574
+ }
575
+ }
576
+ };
577
+ });
578
+ logConfigUpdated(runtime);
579
+ runtime.log("Fallback list cleared.");
580
+ }
581
+
582
+ //#endregion
583
+ //#region src/commands/models/image-fallbacks.ts
584
+ async function modelsImageFallbacksListCommand(opts, runtime) {
585
+ ensureFlagCompatibility(opts);
586
+ const fallbacks = loadConfig().agents?.defaults?.imageModel?.fallbacks ?? [];
587
+ if (opts.json) {
588
+ runtime.log(JSON.stringify({ fallbacks }, null, 2));
589
+ return;
590
+ }
591
+ if (opts.plain) {
592
+ for (const entry of fallbacks) runtime.log(entry);
593
+ return;
594
+ }
595
+ runtime.log(`Image fallbacks (${fallbacks.length}):`);
596
+ if (fallbacks.length === 0) {
597
+ runtime.log("- none");
598
+ return;
599
+ }
600
+ for (const entry of fallbacks) runtime.log(`- ${entry}`);
601
+ }
602
+ async function modelsImageFallbacksAddCommand(modelRaw, runtime) {
603
+ const updated = await updateConfig((cfg) => {
604
+ const resolved = resolveModelTarget({
605
+ raw: modelRaw,
606
+ cfg
607
+ });
608
+ const targetKey = modelKey(resolved.provider, resolved.model);
609
+ const nextModels = { ...cfg.agents?.defaults?.models };
610
+ if (!nextModels[targetKey]) nextModels[targetKey] = {};
611
+ const aliasIndex = buildModelAliasIndex({
612
+ cfg,
613
+ defaultProvider: DEFAULT_PROVIDER
614
+ });
615
+ const existing = cfg.agents?.defaults?.imageModel?.fallbacks ?? [];
616
+ if (existing.map((entry) => resolveModelRefFromString({
617
+ raw: String(entry ?? ""),
618
+ defaultProvider: DEFAULT_PROVIDER,
619
+ aliasIndex
620
+ })).filter((entry) => Boolean(entry)).map((entry) => modelKey(entry.ref.provider, entry.ref.model)).includes(targetKey)) return cfg;
621
+ const existingModel = cfg.agents?.defaults?.imageModel;
622
+ return {
623
+ ...cfg,
624
+ agents: {
625
+ ...cfg.agents,
626
+ defaults: {
627
+ ...cfg.agents?.defaults,
628
+ imageModel: {
629
+ ...existingModel?.primary ? { primary: existingModel.primary } : void 0,
630
+ fallbacks: [...existing, targetKey]
631
+ },
632
+ models: nextModels
633
+ }
634
+ }
635
+ };
636
+ });
637
+ logConfigUpdated(runtime);
638
+ runtime.log(`Image fallbacks: ${(updated.agents?.defaults?.imageModel?.fallbacks ?? []).join(", ")}`);
639
+ }
640
+ async function modelsImageFallbacksRemoveCommand(modelRaw, runtime) {
641
+ const updated = await updateConfig((cfg) => {
642
+ const resolved = resolveModelTarget({
643
+ raw: modelRaw,
644
+ cfg
645
+ });
646
+ const targetKey = modelKey(resolved.provider, resolved.model);
647
+ const aliasIndex = buildModelAliasIndex({
648
+ cfg,
649
+ defaultProvider: DEFAULT_PROVIDER
650
+ });
651
+ const existing = cfg.agents?.defaults?.imageModel?.fallbacks ?? [];
652
+ const filtered = existing.filter((entry) => {
653
+ const resolvedEntry = resolveModelRefFromString({
654
+ raw: String(entry ?? ""),
655
+ defaultProvider: DEFAULT_PROVIDER,
656
+ aliasIndex
657
+ });
658
+ if (!resolvedEntry) return true;
659
+ return modelKey(resolvedEntry.ref.provider, resolvedEntry.ref.model) !== targetKey;
660
+ });
661
+ if (filtered.length === existing.length) throw new Error(`Image fallback not found: ${targetKey}`);
662
+ const existingModel = cfg.agents?.defaults?.imageModel;
663
+ return {
664
+ ...cfg,
665
+ agents: {
666
+ ...cfg.agents,
667
+ defaults: {
668
+ ...cfg.agents?.defaults,
669
+ imageModel: {
670
+ ...existingModel?.primary ? { primary: existingModel.primary } : void 0,
671
+ fallbacks: filtered
672
+ }
673
+ }
674
+ }
675
+ };
676
+ });
677
+ logConfigUpdated(runtime);
678
+ runtime.log(`Image fallbacks: ${(updated.agents?.defaults?.imageModel?.fallbacks ?? []).join(", ")}`);
679
+ }
680
+ async function modelsImageFallbacksClearCommand(runtime) {
681
+ await updateConfig((cfg) => {
682
+ const existingModel = cfg.agents?.defaults?.imageModel;
683
+ return {
684
+ ...cfg,
685
+ agents: {
686
+ ...cfg.agents,
687
+ defaults: {
688
+ ...cfg.agents?.defaults,
689
+ imageModel: {
690
+ ...existingModel?.primary ? { primary: existingModel.primary } : void 0,
691
+ fallbacks: []
692
+ }
693
+ }
694
+ }
695
+ };
696
+ });
697
+ logConfigUpdated(runtime);
698
+ runtime.log("Image fallback list cleared.");
699
+ }
700
+
701
+ //#endregion
702
+ //#region src/agents/model-compat.ts
703
+ function isOpenAiCompletionsModel(model) {
704
+ return model.api === "openai-completions";
705
+ }
706
+ function normalizeModelCompat(model) {
707
+ const baseUrl = model.baseUrl ?? "";
708
+ if (!(model.provider === "zai" || baseUrl.includes("api.z.ai")) || !isOpenAiCompletionsModel(model)) return model;
709
+ const openaiModel = model;
710
+ const compat = openaiModel.compat ?? void 0;
711
+ if (compat?.supportsDeveloperRole === false) return model;
712
+ openaiModel.compat = compat ? {
713
+ ...compat,
714
+ supportsDeveloperRole: false
715
+ } : { supportsDeveloperRole: false };
716
+ return openaiModel;
717
+ }
718
+
719
+ //#endregion
720
+ //#region src/agents/model-forward-compat.ts
721
+ const OPENAI_CODEX_GPT_53_MODEL_ID = "gpt-5.3-codex";
722
+ const OPENAI_CODEX_TEMPLATE_MODEL_IDS = ["gpt-5.2-codex"];
723
+ const ANTHROPIC_OPUS_46_MODEL_ID = "claude-opus-4-6";
724
+ const ANTHROPIC_OPUS_46_DOT_MODEL_ID = "claude-opus-4.6";
725
+ const ANTHROPIC_OPUS_TEMPLATE_MODEL_IDS = ["claude-opus-4-5", "claude-opus-4.5"];
726
+ const ZAI_GLM5_MODEL_ID = "glm-5";
727
+ const ZAI_GLM5_TEMPLATE_MODEL_IDS = ["glm-4.7"];
728
+ const ANTIGRAVITY_OPUS_46_MODEL_ID = "claude-opus-4-6";
729
+ const ANTIGRAVITY_OPUS_46_DOT_MODEL_ID = "claude-opus-4.6";
730
+ const ANTIGRAVITY_OPUS_TEMPLATE_MODEL_IDS = ["claude-opus-4-5", "claude-opus-4.5"];
731
+ const ANTIGRAVITY_OPUS_46_THINKING_MODEL_ID = "claude-opus-4-6-thinking";
732
+ const ANTIGRAVITY_OPUS_46_DOT_THINKING_MODEL_ID = "claude-opus-4.6-thinking";
733
+ const ANTIGRAVITY_OPUS_THINKING_TEMPLATE_MODEL_IDS = ["claude-opus-4-5-thinking", "claude-opus-4.5-thinking"];
734
+ const ANTIGRAVITY_OPUS_46_FORWARD_COMPAT_CANDIDATES = [{
735
+ id: ANTIGRAVITY_OPUS_46_THINKING_MODEL_ID,
736
+ templatePrefixes: ["google-antigravity/claude-opus-4-5-thinking", "google-antigravity/claude-opus-4.5-thinking"]
737
+ }, {
738
+ id: ANTIGRAVITY_OPUS_46_MODEL_ID,
739
+ templatePrefixes: ["google-antigravity/claude-opus-4-5", "google-antigravity/claude-opus-4.5"]
740
+ }];
741
+ function resolveOpenAICodexGpt53FallbackModel(provider, modelId, modelRegistry) {
742
+ const normalizedProvider = normalizeProviderId(provider);
743
+ const trimmedModelId = modelId.trim();
744
+ if (normalizedProvider !== "openai-codex") return;
745
+ if (trimmedModelId.toLowerCase() !== OPENAI_CODEX_GPT_53_MODEL_ID) return;
746
+ for (const templateId of OPENAI_CODEX_TEMPLATE_MODEL_IDS) {
747
+ const template = modelRegistry.find(normalizedProvider, templateId);
748
+ if (!template) continue;
749
+ return normalizeModelCompat({
750
+ ...template,
751
+ id: trimmedModelId,
752
+ name: trimmedModelId
753
+ });
754
+ }
755
+ return normalizeModelCompat({
756
+ id: trimmedModelId,
757
+ name: trimmedModelId,
758
+ api: "openai-codex-responses",
759
+ provider: normalizedProvider,
760
+ baseUrl: "https://chatgpt.com/backend-api",
761
+ reasoning: true,
762
+ input: ["text", "image"],
763
+ cost: {
764
+ input: 0,
765
+ output: 0,
766
+ cacheRead: 0,
767
+ cacheWrite: 0
768
+ },
769
+ contextWindow: DEFAULT_CONTEXT_TOKENS,
770
+ maxTokens: DEFAULT_CONTEXT_TOKENS
771
+ });
772
+ }
773
+ function resolveAnthropicOpus46ForwardCompatModel(provider, modelId, modelRegistry) {
774
+ const normalizedProvider = normalizeProviderId(provider);
775
+ if (normalizedProvider !== "anthropic") return;
776
+ const trimmedModelId = modelId.trim();
777
+ const lower = trimmedModelId.toLowerCase();
778
+ 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;
779
+ const templateIds = [];
780
+ if (lower.startsWith(ANTHROPIC_OPUS_46_MODEL_ID)) templateIds.push(lower.replace(ANTHROPIC_OPUS_46_MODEL_ID, "claude-opus-4-5"));
781
+ if (lower.startsWith(ANTHROPIC_OPUS_46_DOT_MODEL_ID)) templateIds.push(lower.replace(ANTHROPIC_OPUS_46_DOT_MODEL_ID, "claude-opus-4.5"));
782
+ templateIds.push(...ANTHROPIC_OPUS_TEMPLATE_MODEL_IDS);
783
+ for (const templateId of [...new Set(templateIds)].filter(Boolean)) {
784
+ const template = modelRegistry.find(normalizedProvider, templateId);
785
+ if (!template) continue;
786
+ return normalizeModelCompat({
787
+ ...template,
788
+ id: trimmedModelId,
789
+ name: trimmedModelId
790
+ });
791
+ }
792
+ }
793
+ function resolveZaiGlm5ForwardCompatModel(provider, modelId, modelRegistry) {
794
+ if (normalizeProviderId(provider) !== "zai") return;
795
+ const trimmed = modelId.trim();
796
+ const lower = trimmed.toLowerCase();
797
+ if (lower !== ZAI_GLM5_MODEL_ID && !lower.startsWith(`${ZAI_GLM5_MODEL_ID}-`)) return;
798
+ for (const templateId of ZAI_GLM5_TEMPLATE_MODEL_IDS) {
799
+ const template = modelRegistry.find("zai", templateId);
800
+ if (!template) continue;
801
+ return normalizeModelCompat({
802
+ ...template,
803
+ id: trimmed,
804
+ name: trimmed,
805
+ reasoning: true
806
+ });
807
+ }
808
+ return normalizeModelCompat({
809
+ id: trimmed,
810
+ name: trimmed,
811
+ api: "openai-completions",
812
+ provider: "zai",
813
+ reasoning: true,
814
+ input: ["text"],
815
+ cost: {
816
+ input: 0,
817
+ output: 0,
818
+ cacheRead: 0,
819
+ cacheWrite: 0
820
+ },
821
+ contextWindow: DEFAULT_CONTEXT_TOKENS,
822
+ maxTokens: DEFAULT_CONTEXT_TOKENS
823
+ });
824
+ }
825
+ function resolveAntigravityOpus46ForwardCompatModel(provider, modelId, modelRegistry) {
826
+ const normalizedProvider = normalizeProviderId(provider);
827
+ if (normalizedProvider !== "google-antigravity") return;
828
+ const trimmedModelId = modelId.trim();
829
+ const lower = trimmedModelId.toLowerCase();
830
+ 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}-`);
831
+ 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}-`);
832
+ if (!isOpus46 && !isOpus46Thinking) return;
833
+ const templateIds = [];
834
+ if (lower.startsWith(ANTIGRAVITY_OPUS_46_MODEL_ID)) templateIds.push(lower.replace(ANTIGRAVITY_OPUS_46_MODEL_ID, "claude-opus-4-5"));
835
+ if (lower.startsWith(ANTIGRAVITY_OPUS_46_DOT_MODEL_ID)) templateIds.push(lower.replace(ANTIGRAVITY_OPUS_46_DOT_MODEL_ID, "claude-opus-4.5"));
836
+ if (lower.startsWith(ANTIGRAVITY_OPUS_46_THINKING_MODEL_ID)) templateIds.push(lower.replace(ANTIGRAVITY_OPUS_46_THINKING_MODEL_ID, "claude-opus-4-5-thinking"));
837
+ 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"));
838
+ templateIds.push(...ANTIGRAVITY_OPUS_TEMPLATE_MODEL_IDS);
839
+ templateIds.push(...ANTIGRAVITY_OPUS_THINKING_TEMPLATE_MODEL_IDS);
840
+ for (const templateId of [...new Set(templateIds)].filter(Boolean)) {
841
+ const template = modelRegistry.find(normalizedProvider, templateId);
842
+ if (!template) continue;
843
+ return normalizeModelCompat({
844
+ ...template,
845
+ id: trimmedModelId,
846
+ name: trimmedModelId
847
+ });
848
+ }
849
+ }
850
+ function resolveForwardCompatModel(provider, modelId, modelRegistry) {
851
+ return resolveOpenAICodexGpt53FallbackModel(provider, modelId, modelRegistry) ?? resolveAnthropicOpus46ForwardCompatModel(provider, modelId, modelRegistry) ?? resolveZaiGlm5ForwardCompatModel(provider, modelId, modelRegistry) ?? resolveAntigravityOpus46ForwardCompatModel(provider, modelId, modelRegistry);
852
+ }
853
+
854
+ //#endregion
855
+ //#region src/commands/models/list.configured.ts
856
+ function resolveConfiguredEntries(cfg) {
857
+ const resolvedDefault = resolveConfiguredModelRef({
858
+ cfg,
859
+ defaultProvider: DEFAULT_PROVIDER,
860
+ defaultModel: DEFAULT_MODEL
861
+ });
862
+ const aliasIndex = buildModelAliasIndex({
863
+ cfg,
864
+ defaultProvider: DEFAULT_PROVIDER
865
+ });
866
+ const order = [];
867
+ const tagsByKey = /* @__PURE__ */ new Map();
868
+ const aliasesByKey = /* @__PURE__ */ new Map();
869
+ for (const [key, aliases] of aliasIndex.byKey.entries()) aliasesByKey.set(key, aliases);
870
+ const addEntry = (ref, tag) => {
871
+ const key = modelKey(ref.provider, ref.model);
872
+ if (!tagsByKey.has(key)) {
873
+ tagsByKey.set(key, /* @__PURE__ */ new Set());
874
+ order.push(key);
875
+ }
876
+ tagsByKey.get(key)?.add(tag);
877
+ };
878
+ addEntry(resolvedDefault, "default");
879
+ const modelConfig = cfg.agents?.defaults?.model;
880
+ const imageModelConfig = cfg.agents?.defaults?.imageModel;
881
+ const modelFallbacks = typeof modelConfig === "object" ? modelConfig?.fallbacks ?? [] : [];
882
+ const imageFallbacks = typeof imageModelConfig === "object" ? imageModelConfig?.fallbacks ?? [] : [];
883
+ const imagePrimary = imageModelConfig?.primary?.trim() ?? "";
884
+ modelFallbacks.forEach((raw, idx) => {
885
+ const resolved = resolveModelRefFromString({
886
+ raw: String(raw ?? ""),
887
+ defaultProvider: DEFAULT_PROVIDER,
888
+ aliasIndex
889
+ });
890
+ if (!resolved) return;
891
+ addEntry(resolved.ref, `fallback#${idx + 1}`);
892
+ });
893
+ if (imagePrimary) {
894
+ const resolved = resolveModelRefFromString({
895
+ raw: imagePrimary,
896
+ defaultProvider: DEFAULT_PROVIDER,
897
+ aliasIndex
898
+ });
899
+ if (resolved) addEntry(resolved.ref, "image");
900
+ }
901
+ imageFallbacks.forEach((raw, idx) => {
902
+ const resolved = resolveModelRefFromString({
903
+ raw: String(raw ?? ""),
904
+ defaultProvider: DEFAULT_PROVIDER,
905
+ aliasIndex
906
+ });
907
+ if (!resolved) return;
908
+ addEntry(resolved.ref, `img-fallback#${idx + 1}`);
909
+ });
910
+ for (const key of Object.keys(cfg.agents?.defaults?.models ?? {})) {
911
+ const parsed = parseModelRef(String(key ?? ""), DEFAULT_PROVIDER);
912
+ if (!parsed) continue;
913
+ addEntry(parsed, "configured");
914
+ }
915
+ return { entries: order.map((key) => {
916
+ const slash = key.indexOf("/");
917
+ return {
918
+ key,
919
+ ref: {
920
+ provider: slash === -1 ? key : key.slice(0, slash),
921
+ model: slash === -1 ? "" : key.slice(slash + 1)
922
+ },
923
+ tags: tagsByKey.get(key) ?? /* @__PURE__ */ new Set(),
924
+ aliases: aliasesByKey.get(key) ?? []
925
+ };
926
+ }) };
927
+ }
928
+
929
+ //#endregion
930
+ //#region src/commands/models/list.errors.ts
931
+ const MODEL_AVAILABILITY_UNAVAILABLE_CODE = "MODEL_AVAILABILITY_UNAVAILABLE";
932
+ function formatErrorWithStack(err) {
933
+ if (err instanceof Error) return err.stack ?? `${err.name}: ${err.message}`;
934
+ return String(err);
935
+ }
936
+ function shouldFallbackToAuthHeuristics(err) {
937
+ if (!(err instanceof Error)) return false;
938
+ return err.code === MODEL_AVAILABILITY_UNAVAILABLE_CODE;
939
+ }
940
+
941
+ //#endregion
942
+ //#region src/commands/models/list.registry.ts
943
+ const hasAuthForProvider = (provider, cfg, authStore) => {
944
+ if (!cfg || !authStore) return false;
945
+ if (listProfilesForProvider(authStore, provider).length > 0) return true;
946
+ if (provider === "amazon-bedrock" && resolveAwsSdkEnvVarName()) return true;
947
+ if (resolveEnvApiKey(provider)) return true;
948
+ if (getCustomProviderApiKey(cfg, provider)) return true;
949
+ return false;
950
+ };
951
+ function createAvailabilityUnavailableError(message) {
952
+ const err = new Error(message);
953
+ err.code = MODEL_AVAILABILITY_UNAVAILABLE_CODE;
954
+ return err;
955
+ }
956
+ function normalizeAvailabilityError(err) {
957
+ if (shouldFallbackToAuthHeuristics(err) && err instanceof Error) return err;
958
+ return createAvailabilityUnavailableError(`Model availability unavailable: getAvailable() failed.\n${formatErrorWithStack(err)}`);
959
+ }
960
+ function validateAvailableModels(availableModels) {
961
+ if (!Array.isArray(availableModels)) throw createAvailabilityUnavailableError("Model availability unavailable: getAvailable() returned a non-array value.");
962
+ 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.");
963
+ return availableModels;
964
+ }
965
+ function loadAvailableModels(registry) {
966
+ let availableModels;
967
+ try {
968
+ availableModels = registry.getAvailable();
969
+ } catch (err) {
970
+ throw normalizeAvailabilityError(err);
971
+ }
972
+ try {
973
+ return validateAvailableModels(availableModels);
974
+ } catch (err) {
975
+ throw normalizeAvailabilityError(err);
976
+ }
977
+ }
978
+ async function loadModelRegistry(cfg) {
979
+ await ensureAnimaModelsJson(cfg);
980
+ const agentDir = resolveAnimaAgentDir();
981
+ const registry = discoverModels(discoverAuthStorage(agentDir), agentDir);
982
+ const appended = appendAntigravityForwardCompatModels(registry.getAll(), registry);
983
+ const models = appended.models;
984
+ const synthesizedForwardCompat = appended.synthesizedForwardCompat;
985
+ let availableKeys;
986
+ let availabilityErrorMessage;
987
+ try {
988
+ const availableModels = loadAvailableModels(registry);
989
+ availableKeys = new Set(availableModels.map((model) => modelKey(model.provider, model.id)));
990
+ for (const synthesized of synthesizedForwardCompat) if (hasAvailableTemplate(availableKeys, synthesized.templatePrefixes)) availableKeys.add(synthesized.key);
991
+ } catch (err) {
992
+ if (!shouldFallbackToAuthHeuristics(err)) throw err;
993
+ availableKeys = void 0;
994
+ if (!availabilityErrorMessage) availabilityErrorMessage = formatErrorWithStack(err);
995
+ }
996
+ return {
997
+ registry,
998
+ models,
999
+ availableKeys,
1000
+ availabilityErrorMessage
1001
+ };
1002
+ }
1003
+ function appendAntigravityForwardCompatModels(models, modelRegistry) {
1004
+ const nextModels = [...models];
1005
+ const synthesizedForwardCompat = [];
1006
+ for (const candidate of ANTIGRAVITY_OPUS_46_FORWARD_COMPAT_CANDIDATES) {
1007
+ const key = modelKey("google-antigravity", candidate.id);
1008
+ if (nextModels.some((model) => modelKey(model.provider, model.id) === key)) continue;
1009
+ const fallback = resolveForwardCompatModel("google-antigravity", candidate.id, modelRegistry);
1010
+ if (!fallback) continue;
1011
+ nextModels.push(fallback);
1012
+ synthesizedForwardCompat.push({
1013
+ key,
1014
+ templatePrefixes: candidate.templatePrefixes
1015
+ });
1016
+ }
1017
+ return {
1018
+ models: nextModels,
1019
+ synthesizedForwardCompat
1020
+ };
1021
+ }
1022
+ function hasAvailableTemplate(availableKeys, templatePrefixes) {
1023
+ for (const key of availableKeys) if (templatePrefixes.some((prefix) => key.startsWith(prefix))) return true;
1024
+ return false;
1025
+ }
1026
+ function toModelRow(params) {
1027
+ const { model, key, tags, aliases = [], availableKeys, cfg, authStore } = params;
1028
+ if (!model) return {
1029
+ key,
1030
+ name: key,
1031
+ input: "-",
1032
+ contextWindow: null,
1033
+ local: null,
1034
+ available: null,
1035
+ tags: [...tags, "missing"],
1036
+ missing: true
1037
+ };
1038
+ const input = model.input.join("+") || "text";
1039
+ const local = isLocalBaseUrl(model.baseUrl);
1040
+ const available = availableKeys !== void 0 ? availableKeys.has(modelKey(model.provider, model.id)) : cfg && authStore ? hasAuthForProvider(model.provider, cfg, authStore) : false;
1041
+ const aliasTags = aliases.length > 0 ? [`alias:${aliases.join(",")}`] : [];
1042
+ const mergedTags = new Set(tags);
1043
+ if (aliasTags.length > 0) {
1044
+ for (const tag of mergedTags) if (tag === "alias" || tag.startsWith("alias:")) mergedTags.delete(tag);
1045
+ for (const tag of aliasTags) mergedTags.add(tag);
1046
+ }
1047
+ return {
1048
+ key,
1049
+ name: model.name || model.id,
1050
+ input,
1051
+ contextWindow: model.contextWindow ?? null,
1052
+ local,
1053
+ available,
1054
+ tags: Array.from(mergedTags),
1055
+ missing: false
1056
+ };
1057
+ }
1058
+
1059
+ //#endregion
1060
+ //#region src/commands/models/list.format.ts
1061
+ const isRich = (opts) => Boolean(isRich$1() && !opts?.json && !opts?.plain);
1062
+ const pad$1 = (value, size) => value.padEnd(size);
1063
+ const formatTag = (tag, rich) => {
1064
+ if (!rich) return tag;
1065
+ if (tag === "default") return theme.success(tag);
1066
+ if (tag === "image") return theme.accentBright(tag);
1067
+ if (tag === "configured") return theme.accent(tag);
1068
+ if (tag === "missing") return theme.error(tag);
1069
+ if (tag.startsWith("fallback#")) return theme.warn(tag);
1070
+ if (tag.startsWith("img-fallback#")) return theme.warn(tag);
1071
+ if (tag.startsWith("alias:")) return theme.accentDim(tag);
1072
+ return theme.muted(tag);
1073
+ };
1074
+ const truncate$1 = (value, max) => {
1075
+ if (value.length <= max) return value;
1076
+ if (max <= 3) return value.slice(0, max);
1077
+ return `${value.slice(0, max - 3)}...`;
1078
+ };
1079
+ const maskApiKey = (value) => {
1080
+ const trimmed = value.trim();
1081
+ if (!trimmed) return "missing";
1082
+ if (trimmed.length <= 16) return trimmed;
1083
+ return `${trimmed.slice(0, 8)}...${trimmed.slice(-8)}`;
1084
+ };
1085
+
1086
+ //#endregion
1087
+ //#region src/commands/models/list.table.ts
1088
+ const MODEL_PAD$1 = 42;
1089
+ const INPUT_PAD = 10;
1090
+ const CTX_PAD$1 = 8;
1091
+ const LOCAL_PAD = 5;
1092
+ const AUTH_PAD = 5;
1093
+ function printModelTable(rows, runtime, opts = {}) {
1094
+ if (opts.json) {
1095
+ runtime.log(JSON.stringify({
1096
+ count: rows.length,
1097
+ models: rows
1098
+ }, null, 2));
1099
+ return;
1100
+ }
1101
+ if (opts.plain) {
1102
+ for (const row of rows) runtime.log(row.key);
1103
+ return;
1104
+ }
1105
+ const rich = isRich(opts);
1106
+ const header = [
1107
+ pad$1("Model", MODEL_PAD$1),
1108
+ pad$1("Input", INPUT_PAD),
1109
+ pad$1("Ctx", CTX_PAD$1),
1110
+ pad$1("Local", LOCAL_PAD),
1111
+ pad$1("Auth", AUTH_PAD),
1112
+ "Tags"
1113
+ ].join(" ");
1114
+ runtime.log(rich ? theme.heading(header) : header);
1115
+ for (const row of rows) {
1116
+ const keyLabel = pad$1(truncate$1(row.key, MODEL_PAD$1), MODEL_PAD$1);
1117
+ const inputLabel = pad$1(row.input || "-", INPUT_PAD);
1118
+ const ctxLabel = pad$1(formatTokenK(row.contextWindow), CTX_PAD$1);
1119
+ const localLabel = pad$1(row.local === null ? "-" : row.local ? "yes" : "no", LOCAL_PAD);
1120
+ const authLabel = pad$1(row.available === null ? "-" : row.available ? "yes" : "no", AUTH_PAD);
1121
+ const tagsLabel = row.tags.length > 0 ? rich ? row.tags.map((tag) => formatTag(tag, rich)).join(",") : row.tags.join(",") : "";
1122
+ const coloredInput = colorize(rich, row.input.includes("image") ? theme.accentBright : theme.info, inputLabel);
1123
+ const coloredLocal = colorize(rich, row.local === null ? theme.muted : row.local ? theme.success : theme.muted, localLabel);
1124
+ const coloredAuth = colorize(rich, row.available === null ? theme.muted : row.available ? theme.success : theme.error, authLabel);
1125
+ const line = [
1126
+ rich ? theme.accent(keyLabel) : keyLabel,
1127
+ coloredInput,
1128
+ ctxLabel,
1129
+ coloredLocal,
1130
+ coloredAuth,
1131
+ tagsLabel
1132
+ ].join(" ");
1133
+ runtime.log(line);
1134
+ }
1135
+ }
1136
+
1137
+ //#endregion
1138
+ //#region src/commands/models/list.list-command.ts
1139
+ async function modelsListCommand(opts, runtime) {
1140
+ ensureFlagCompatibility(opts);
1141
+ const cfg = loadConfig();
1142
+ const authStore = ensureAuthProfileStore();
1143
+ const providerFilter = (() => {
1144
+ const raw = opts.provider?.trim();
1145
+ if (!raw) return;
1146
+ return parseModelRef(`${raw}/_`, DEFAULT_PROVIDER)?.provider ?? raw.toLowerCase();
1147
+ })();
1148
+ let models = [];
1149
+ let modelRegistry;
1150
+ let availableKeys;
1151
+ let availabilityErrorMessage;
1152
+ try {
1153
+ const loaded = await loadModelRegistry(cfg);
1154
+ modelRegistry = loaded.registry;
1155
+ models = loaded.models;
1156
+ availableKeys = loaded.availableKeys;
1157
+ availabilityErrorMessage = loaded.availabilityErrorMessage;
1158
+ } catch (err) {
1159
+ runtime.error(`Model registry unavailable:\n${formatErrorWithStack(err)}`);
1160
+ process.exitCode = 1;
1161
+ return;
1162
+ }
1163
+ if (availabilityErrorMessage !== void 0) runtime.error(`Model availability lookup failed; falling back to auth heuristics for discovered models: ${availabilityErrorMessage}`);
1164
+ const modelByKey = new Map(models.map((model) => [modelKey(model.provider, model.id), model]));
1165
+ const { entries } = resolveConfiguredEntries(cfg);
1166
+ const configuredByKey = new Map(entries.map((entry) => [entry.key, entry]));
1167
+ const rows = [];
1168
+ if (opts.all) {
1169
+ const sorted = [...models].toSorted((a, b) => {
1170
+ const p = a.provider.localeCompare(b.provider);
1171
+ if (p !== 0) return p;
1172
+ return a.id.localeCompare(b.id);
1173
+ });
1174
+ for (const model of sorted) {
1175
+ if (providerFilter && model.provider.toLowerCase() !== providerFilter) continue;
1176
+ if (opts.local && !isLocalBaseUrl(model.baseUrl)) continue;
1177
+ const key = modelKey(model.provider, model.id);
1178
+ const configured = configuredByKey.get(key);
1179
+ rows.push(toModelRow({
1180
+ model,
1181
+ key,
1182
+ tags: configured ? Array.from(configured.tags) : [],
1183
+ aliases: configured?.aliases ?? [],
1184
+ availableKeys,
1185
+ cfg,
1186
+ authStore
1187
+ }));
1188
+ }
1189
+ } else for (const entry of entries) {
1190
+ if (providerFilter && entry.ref.provider.toLowerCase() !== providerFilter) continue;
1191
+ let model = modelByKey.get(entry.key);
1192
+ if (!model && modelRegistry) {
1193
+ const forwardCompat = resolveForwardCompatModel(entry.ref.provider, entry.ref.model, modelRegistry);
1194
+ if (forwardCompat) {
1195
+ model = forwardCompat;
1196
+ modelByKey.set(entry.key, forwardCompat);
1197
+ }
1198
+ }
1199
+ if (!model) model = resolveModel(entry.ref.provider, entry.ref.model, void 0, cfg).model;
1200
+ if (opts.local && model && !isLocalBaseUrl(model.baseUrl)) continue;
1201
+ if (opts.local && !model) continue;
1202
+ rows.push(toModelRow({
1203
+ model,
1204
+ key: entry.key,
1205
+ tags: Array.from(entry.tags),
1206
+ aliases: entry.aliases,
1207
+ availableKeys,
1208
+ cfg,
1209
+ authStore
1210
+ }));
1211
+ }
1212
+ if (rows.length === 0) {
1213
+ runtime.log("No models found.");
1214
+ return;
1215
+ }
1216
+ printModelTable(rows, runtime, opts);
1217
+ }
1218
+
1219
+ //#endregion
1220
+ //#region src/commands/models/list.auth-overview.ts
1221
+ function resolveProviderAuthOverview(params) {
1222
+ const { provider, cfg, store } = params;
1223
+ const now = Date.now();
1224
+ const profiles = listProfilesForProvider(store, provider);
1225
+ const withUnusableSuffix = (base, profileId) => {
1226
+ const unusableUntil = resolveProfileUnusableUntilForDisplay(store, profileId);
1227
+ if (!unusableUntil || now >= unusableUntil) return base;
1228
+ const stats = store.usageStats?.[profileId];
1229
+ return `${base} [${typeof stats?.disabledUntil === "number" && now < stats.disabledUntil ? `disabled${stats.disabledReason ? `:${stats.disabledReason}` : ""}` : "cooldown"} ${formatRemainingShort(unusableUntil - now)}]`;
1230
+ };
1231
+ const labels = profiles.map((profileId) => {
1232
+ const profile = store.profiles[profileId];
1233
+ if (!profile) return `${profileId}=missing`;
1234
+ if (profile.type === "api_key") return withUnusableSuffix(`${profileId}=${maskApiKey(profile.key ?? "")}`, profileId);
1235
+ if (profile.type === "token") return withUnusableSuffix(`${profileId}=token:${maskApiKey(profile.token)}`, profileId);
1236
+ const display = resolveAuthProfileDisplayLabel({
1237
+ cfg,
1238
+ store,
1239
+ profileId
1240
+ });
1241
+ const suffix = display === profileId ? "" : display.startsWith(profileId) ? display.slice(profileId.length).trim() : `(${display})`;
1242
+ return withUnusableSuffix(`${profileId}=OAuth${suffix ? ` ${suffix}` : ""}`, profileId);
1243
+ });
1244
+ const oauthCount = profiles.filter((id) => store.profiles[id]?.type === "oauth").length;
1245
+ const tokenCount = profiles.filter((id) => store.profiles[id]?.type === "token").length;
1246
+ const apiKeyCount = profiles.filter((id) => store.profiles[id]?.type === "api_key").length;
1247
+ const envKey = resolveEnvApiKey(provider);
1248
+ const customKey = getCustomProviderApiKey(cfg, provider);
1249
+ return {
1250
+ provider,
1251
+ effective: (() => {
1252
+ if (profiles.length > 0) return {
1253
+ kind: "profiles",
1254
+ detail: shortenHomePath(resolveAuthStorePathForDisplay())
1255
+ };
1256
+ if (envKey) return {
1257
+ kind: "env",
1258
+ detail: envKey.source.includes("OAUTH_TOKEN") || envKey.source.toLowerCase().includes("oauth") ? "OAuth (env)" : maskApiKey(envKey.apiKey)
1259
+ };
1260
+ if (customKey) return {
1261
+ kind: "models.json",
1262
+ detail: maskApiKey(customKey)
1263
+ };
1264
+ return {
1265
+ kind: "missing",
1266
+ detail: "missing"
1267
+ };
1268
+ })(),
1269
+ profiles: {
1270
+ count: profiles.length,
1271
+ oauth: oauthCount,
1272
+ token: tokenCount,
1273
+ apiKey: apiKeyCount,
1274
+ labels
1275
+ },
1276
+ ...envKey ? { env: {
1277
+ value: envKey.source.includes("OAUTH_TOKEN") || envKey.source.toLowerCase().includes("oauth") ? "OAuth (env)" : maskApiKey(envKey.apiKey),
1278
+ source: envKey.source
1279
+ } } : {},
1280
+ ...customKey ? { modelsJson: {
1281
+ value: maskApiKey(customKey),
1282
+ source: `models.json: ${shortenHomePath(params.modelsPath)}`
1283
+ } } : {}
1284
+ };
1285
+ }
1286
+
1287
+ //#endregion
1288
+ //#region src/commands/models/list.probe.ts
1289
+ const PROBE_PROMPT = "Reply with OK. Do not use tools.";
1290
+ const toStatus = (reason) => {
1291
+ if (!reason) return "unknown";
1292
+ if (reason === "auth") return "auth";
1293
+ if (reason === "rate_limit") return "rate_limit";
1294
+ if (reason === "billing") return "billing";
1295
+ if (reason === "timeout") return "timeout";
1296
+ if (reason === "format") return "format";
1297
+ return "unknown";
1298
+ };
1299
+ function buildCandidateMap(modelCandidates) {
1300
+ const map = /* @__PURE__ */ new Map();
1301
+ for (const raw of modelCandidates) {
1302
+ const parsed = parseModelRef(String(raw ?? ""), DEFAULT_PROVIDER);
1303
+ if (!parsed) continue;
1304
+ const list = map.get(parsed.provider) ?? [];
1305
+ if (!list.includes(parsed.model)) list.push(parsed.model);
1306
+ map.set(parsed.provider, list);
1307
+ }
1308
+ return map;
1309
+ }
1310
+ function selectProbeModel(params) {
1311
+ const { provider, candidates, catalog } = params;
1312
+ const direct = candidates.get(provider);
1313
+ if (direct && direct.length > 0) return {
1314
+ provider,
1315
+ model: direct[0]
1316
+ };
1317
+ const fromCatalog = catalog.find((entry) => entry.provider === provider);
1318
+ if (fromCatalog) return {
1319
+ provider: fromCatalog.provider,
1320
+ model: fromCatalog.id
1321
+ };
1322
+ return null;
1323
+ }
1324
+ function buildProbeTargets(params) {
1325
+ const { cfg, providers, modelCandidates, options } = params;
1326
+ const store = ensureAuthProfileStore();
1327
+ const providerFilter = options.provider?.trim();
1328
+ const providerFilterKey = providerFilter ? normalizeProviderId(providerFilter) : null;
1329
+ const profileFilter = new Set((options.profileIds ?? []).map((id) => id.trim()).filter(Boolean));
1330
+ return loadModelCatalog({ config: cfg }).then((catalog) => {
1331
+ const candidates = buildCandidateMap(modelCandidates);
1332
+ const targets = [];
1333
+ const results = [];
1334
+ for (const provider of providers) {
1335
+ const providerKey = normalizeProviderId(provider);
1336
+ if (providerFilterKey && providerKey !== providerFilterKey) continue;
1337
+ const model = selectProbeModel({
1338
+ provider: providerKey,
1339
+ candidates,
1340
+ catalog
1341
+ });
1342
+ const profileIds = listProfilesForProvider(store, providerKey);
1343
+ const explicitOrder = (() => {
1344
+ const order = store.order;
1345
+ if (order) {
1346
+ for (const [key, value] of Object.entries(order)) if (normalizeProviderId(key) === providerKey) return value;
1347
+ }
1348
+ const cfgOrder = cfg?.auth?.order;
1349
+ if (cfgOrder) {
1350
+ for (const [key, value] of Object.entries(cfgOrder)) if (normalizeProviderId(key) === providerKey) return value;
1351
+ }
1352
+ })();
1353
+ const allowedProfiles = explicitOrder && explicitOrder.length > 0 ? new Set(resolveAuthProfileOrder({
1354
+ cfg,
1355
+ store,
1356
+ provider: providerKey
1357
+ })) : null;
1358
+ const filteredProfiles = profileFilter.size ? profileIds.filter((id) => profileFilter.has(id)) : profileIds;
1359
+ if (filteredProfiles.length > 0) {
1360
+ for (const profileId of filteredProfiles) {
1361
+ const mode = store.profiles[profileId]?.type;
1362
+ const label = resolveAuthProfileDisplayLabel({
1363
+ cfg,
1364
+ store,
1365
+ profileId
1366
+ });
1367
+ if (explicitOrder && !explicitOrder.includes(profileId)) {
1368
+ results.push({
1369
+ provider: providerKey,
1370
+ model: model ? `${model.provider}/${model.model}` : void 0,
1371
+ profileId,
1372
+ label,
1373
+ source: "profile",
1374
+ mode,
1375
+ status: "unknown",
1376
+ error: "Excluded by auth.order for this provider."
1377
+ });
1378
+ continue;
1379
+ }
1380
+ if (allowedProfiles && !allowedProfiles.has(profileId)) {
1381
+ results.push({
1382
+ provider: providerKey,
1383
+ model: model ? `${model.provider}/${model.model}` : void 0,
1384
+ profileId,
1385
+ label,
1386
+ source: "profile",
1387
+ mode,
1388
+ status: "unknown",
1389
+ error: "Auth profile credentials are missing or expired."
1390
+ });
1391
+ continue;
1392
+ }
1393
+ if (!model) {
1394
+ results.push({
1395
+ provider: providerKey,
1396
+ model: void 0,
1397
+ profileId,
1398
+ label,
1399
+ source: "profile",
1400
+ mode,
1401
+ status: "no_model",
1402
+ error: "No model available for probe"
1403
+ });
1404
+ continue;
1405
+ }
1406
+ targets.push({
1407
+ provider: providerKey,
1408
+ model,
1409
+ profileId,
1410
+ label,
1411
+ source: "profile",
1412
+ mode
1413
+ });
1414
+ }
1415
+ continue;
1416
+ }
1417
+ if (profileFilter.size > 0) continue;
1418
+ const envKey = resolveEnvApiKey(providerKey);
1419
+ const customKey = getCustomProviderApiKey(cfg, providerKey);
1420
+ if (!envKey && !customKey) continue;
1421
+ const label = envKey ? "env" : "models.json";
1422
+ const source = envKey ? "env" : "models.json";
1423
+ const mode = envKey?.source.includes("OAUTH_TOKEN") ? "oauth" : "api_key";
1424
+ if (!model) {
1425
+ results.push({
1426
+ provider: providerKey,
1427
+ model: void 0,
1428
+ label,
1429
+ source,
1430
+ mode,
1431
+ status: "no_model",
1432
+ error: "No model available for probe"
1433
+ });
1434
+ continue;
1435
+ }
1436
+ targets.push({
1437
+ provider: providerKey,
1438
+ model,
1439
+ label,
1440
+ source,
1441
+ mode
1442
+ });
1443
+ }
1444
+ return {
1445
+ targets,
1446
+ results
1447
+ };
1448
+ });
1449
+ }
1450
+ async function probeTarget(params) {
1451
+ const { cfg, agentId, agentDir, workspaceDir, sessionDir, target, timeoutMs, maxTokens } = params;
1452
+ if (!target.model) return {
1453
+ provider: target.provider,
1454
+ model: void 0,
1455
+ profileId: target.profileId,
1456
+ label: target.label,
1457
+ source: target.source,
1458
+ mode: target.mode,
1459
+ status: "no_model",
1460
+ error: "No model available for probe"
1461
+ };
1462
+ const sessionId = `probe-${target.provider}-${crypto.randomUUID()}`;
1463
+ const sessionFile = resolveSessionTranscriptPath(sessionId, agentId);
1464
+ await fs.mkdir(sessionDir, { recursive: true });
1465
+ const start = Date.now();
1466
+ try {
1467
+ await runEmbeddedPiAgent({
1468
+ sessionId,
1469
+ sessionFile,
1470
+ agentId,
1471
+ workspaceDir,
1472
+ agentDir,
1473
+ config: cfg,
1474
+ prompt: PROBE_PROMPT,
1475
+ provider: target.model.provider,
1476
+ model: target.model.model,
1477
+ authProfileId: target.profileId,
1478
+ authProfileIdSource: target.profileId ? "user" : void 0,
1479
+ timeoutMs,
1480
+ runId: `probe-${crypto.randomUUID()}`,
1481
+ lane: `auth-probe:${target.provider}:${target.profileId ?? target.source}`,
1482
+ thinkLevel: "off",
1483
+ reasoningLevel: "off",
1484
+ verboseLevel: "off",
1485
+ streamParams: { maxTokens }
1486
+ });
1487
+ return {
1488
+ provider: target.provider,
1489
+ model: `${target.model.provider}/${target.model.model}`,
1490
+ profileId: target.profileId,
1491
+ label: target.label,
1492
+ source: target.source,
1493
+ mode: target.mode,
1494
+ status: "ok",
1495
+ latencyMs: Date.now() - start
1496
+ };
1497
+ } catch (err) {
1498
+ const described = describeFailoverError(err);
1499
+ return {
1500
+ provider: target.provider,
1501
+ model: `${target.model.provider}/${target.model.model}`,
1502
+ profileId: target.profileId,
1503
+ label: target.label,
1504
+ source: target.source,
1505
+ mode: target.mode,
1506
+ status: toStatus(described.reason),
1507
+ error: redactSecrets(described.message),
1508
+ latencyMs: Date.now() - start
1509
+ };
1510
+ }
1511
+ }
1512
+ async function runTargetsWithConcurrency(params) {
1513
+ const { cfg, targets, timeoutMs, maxTokens, onProgress } = params;
1514
+ const concurrency = Math.max(1, Math.min(targets.length || 1, params.concurrency));
1515
+ const agentId = resolveDefaultAgentId(cfg);
1516
+ const agentDir = resolveAnimaAgentDir();
1517
+ const workspaceDir = resolveAgentWorkspaceDir(cfg, agentId) ?? resolveDefaultAgentWorkspaceDir();
1518
+ const sessionDir = resolveSessionTranscriptsDirForAgent(agentId);
1519
+ await fs.mkdir(workspaceDir, { recursive: true });
1520
+ let completed = 0;
1521
+ const results = Array.from({ length: targets.length });
1522
+ let cursor = 0;
1523
+ const worker = async () => {
1524
+ while (true) {
1525
+ const index = cursor;
1526
+ cursor += 1;
1527
+ if (index >= targets.length) return;
1528
+ const target = targets[index];
1529
+ onProgress?.({
1530
+ completed,
1531
+ total: targets.length,
1532
+ label: `Probing ${target.provider}${target.profileId ? ` (${target.label})` : ""}`
1533
+ });
1534
+ results[index] = await probeTarget({
1535
+ cfg,
1536
+ agentId,
1537
+ agentDir,
1538
+ workspaceDir,
1539
+ sessionDir,
1540
+ target,
1541
+ timeoutMs,
1542
+ maxTokens
1543
+ });
1544
+ completed += 1;
1545
+ onProgress?.({
1546
+ completed,
1547
+ total: targets.length
1548
+ });
1549
+ }
1550
+ };
1551
+ await Promise.all(Array.from({ length: concurrency }, () => worker()));
1552
+ return results.filter((entry) => Boolean(entry));
1553
+ }
1554
+ async function runAuthProbes(params) {
1555
+ const startedAt = Date.now();
1556
+ const plan = await buildProbeTargets({
1557
+ cfg: params.cfg,
1558
+ providers: params.providers,
1559
+ modelCandidates: params.modelCandidates,
1560
+ options: params.options
1561
+ });
1562
+ const totalTargets = plan.targets.length;
1563
+ params.onProgress?.({
1564
+ completed: 0,
1565
+ total: totalTargets
1566
+ });
1567
+ const results = totalTargets ? await runTargetsWithConcurrency({
1568
+ cfg: params.cfg,
1569
+ targets: plan.targets,
1570
+ timeoutMs: params.options.timeoutMs,
1571
+ maxTokens: params.options.maxTokens,
1572
+ concurrency: params.options.concurrency,
1573
+ onProgress: params.onProgress
1574
+ }) : [];
1575
+ const finishedAt = Date.now();
1576
+ return {
1577
+ startedAt,
1578
+ finishedAt,
1579
+ durationMs: finishedAt - startedAt,
1580
+ totalTargets,
1581
+ options: params.options,
1582
+ results: [...plan.results, ...results]
1583
+ };
1584
+ }
1585
+ function formatProbeLatency(latencyMs) {
1586
+ if (!latencyMs && latencyMs !== 0) return "-";
1587
+ return formatMs(latencyMs);
1588
+ }
1589
+ function sortProbeResults(results) {
1590
+ return results.slice().toSorted((a, b) => {
1591
+ const provider = a.provider.localeCompare(b.provider);
1592
+ if (provider !== 0) return provider;
1593
+ const aLabel = a.label || a.profileId || "";
1594
+ const bLabel = b.label || b.profileId || "";
1595
+ return aLabel.localeCompare(bLabel);
1596
+ });
1597
+ }
1598
+ function describeProbeSummary(summary) {
1599
+ if (summary.totalTargets === 0) return "No probe targets.";
1600
+ return `Probed ${summary.totalTargets} target${summary.totalTargets === 1 ? "" : "s"} in ${formatMs(summary.durationMs)}`;
1601
+ }
1602
+
1603
+ //#endregion
1604
+ //#region src/commands/models/list.status-command.ts
1605
+ async function modelsStatusCommand(opts, runtime) {
1606
+ ensureFlagCompatibility(opts);
1607
+ if (opts.plain && opts.probe) throw new Error("--probe cannot be used with --plain output.");
1608
+ const cfg = loadConfig();
1609
+ const agentId = resolveKnownAgentId({
1610
+ cfg,
1611
+ rawAgentId: opts.agent
1612
+ });
1613
+ const agentDir = agentId ? resolveAgentDir(cfg, agentId) : resolveAnimaAgentDir();
1614
+ const agentModelPrimary = agentId ? resolveAgentModelPrimary(cfg, agentId) : void 0;
1615
+ const agentFallbacksOverride = agentId ? resolveAgentModelFallbacksOverride(cfg, agentId) : void 0;
1616
+ const resolved = agentId ? resolveDefaultModelForAgent({
1617
+ cfg,
1618
+ agentId
1619
+ }) : resolveConfiguredModelRef({
1620
+ cfg,
1621
+ defaultProvider: DEFAULT_PROVIDER,
1622
+ defaultModel: DEFAULT_MODEL
1623
+ });
1624
+ const modelConfig = cfg.agents?.defaults?.model;
1625
+ const imageConfig = cfg.agents?.defaults?.imageModel;
1626
+ const rawDefaultsModel = typeof modelConfig === "string" ? modelConfig.trim() : modelConfig?.primary?.trim() ?? "";
1627
+ const rawModel = agentModelPrimary ?? rawDefaultsModel;
1628
+ const resolvedLabel = `${resolved.provider}/${resolved.model}`;
1629
+ const defaultLabel = rawModel || resolvedLabel;
1630
+ const defaultsFallbacks = typeof modelConfig === "object" ? modelConfig?.fallbacks ?? [] : [];
1631
+ const fallbacks = agentFallbacksOverride ?? defaultsFallbacks;
1632
+ const imageModel = typeof imageConfig === "string" ? imageConfig.trim() : imageConfig?.primary?.trim() ?? "";
1633
+ const imageFallbacks = typeof imageConfig === "object" ? imageConfig?.fallbacks ?? [] : [];
1634
+ const aliases = Object.entries(cfg.agents?.defaults?.models ?? {}).reduce((acc, [key, entry]) => {
1635
+ const alias = typeof entry?.alias === "string" ? entry.alias.trim() : void 0;
1636
+ if (alias) acc[alias] = key;
1637
+ return acc;
1638
+ }, {});
1639
+ const allowed = Object.keys(cfg.agents?.defaults?.models ?? {});
1640
+ const store = ensureAuthProfileStore(agentDir);
1641
+ const modelsPath = path.join(agentDir, "models.json");
1642
+ const providersFromStore = new Set(Object.values(store.profiles).map((profile) => profile.provider).filter((p) => Boolean(p)));
1643
+ const providersFromConfig = new Set(Object.keys(cfg.models?.providers ?? {}).map((p) => typeof p === "string" ? p.trim() : "").filter(Boolean));
1644
+ const providersFromModels = /* @__PURE__ */ new Set();
1645
+ const providersInUse = /* @__PURE__ */ new Set();
1646
+ for (const raw of [
1647
+ defaultLabel,
1648
+ ...fallbacks,
1649
+ imageModel,
1650
+ ...imageFallbacks,
1651
+ ...allowed
1652
+ ]) {
1653
+ const parsed = parseModelRef(String(raw ?? ""), DEFAULT_PROVIDER);
1654
+ if (parsed?.provider) providersFromModels.add(parsed.provider);
1655
+ }
1656
+ for (const raw of [
1657
+ defaultLabel,
1658
+ ...fallbacks,
1659
+ imageModel,
1660
+ ...imageFallbacks
1661
+ ]) {
1662
+ const parsed = parseModelRef(String(raw ?? ""), DEFAULT_PROVIDER);
1663
+ if (parsed?.provider) providersInUse.add(parsed.provider);
1664
+ }
1665
+ const providersFromEnv = /* @__PURE__ */ new Set();
1666
+ for (const provider of [
1667
+ "anthropic",
1668
+ "github-copilot",
1669
+ "google-vertex",
1670
+ "openai",
1671
+ "google",
1672
+ "groq",
1673
+ "cerebras",
1674
+ "xai",
1675
+ "openrouter",
1676
+ "zai",
1677
+ "mistral",
1678
+ "synthetic"
1679
+ ]) if (resolveEnvApiKey(provider)) providersFromEnv.add(provider);
1680
+ const providers = Array.from(new Set([
1681
+ ...providersFromStore,
1682
+ ...providersFromConfig,
1683
+ ...providersFromModels,
1684
+ ...providersFromEnv
1685
+ ])).map((p) => typeof p === "string" ? p.trim() : "").filter(Boolean).toSorted((a, b) => a.localeCompare(b));
1686
+ const applied = getShellEnvAppliedKeys();
1687
+ const shellFallbackEnabled = shouldEnableShellEnvFallback(process.env) || cfg.env?.shellEnv?.enabled === true;
1688
+ const providerAuth = providers.map((provider) => resolveProviderAuthOverview({
1689
+ provider,
1690
+ cfg,
1691
+ store,
1692
+ modelsPath
1693
+ })).filter((entry) => {
1694
+ return entry.profiles.count > 0 || Boolean(entry.env) || Boolean(entry.modelsJson);
1695
+ });
1696
+ const providerAuthMap = new Map(providerAuth.map((entry) => [entry.provider, entry]));
1697
+ const missingProvidersInUse = Array.from(providersInUse).filter((provider) => !providerAuthMap.has(provider)).toSorted((a, b) => a.localeCompare(b));
1698
+ const probeProfileIds = (() => {
1699
+ if (!opts.probeProfile) return [];
1700
+ return (Array.isArray(opts.probeProfile) ? opts.probeProfile : [opts.probeProfile]).flatMap((value) => String(value ?? "").split(",")).map((value) => value.trim()).filter(Boolean);
1701
+ })();
1702
+ const probeTimeoutMs = opts.probeTimeout ? Number(opts.probeTimeout) : 8e3;
1703
+ if (!Number.isFinite(probeTimeoutMs) || probeTimeoutMs <= 0) throw new Error("--probe-timeout must be a positive number (ms).");
1704
+ const probeConcurrency = opts.probeConcurrency ? Number(opts.probeConcurrency) : 2;
1705
+ if (!Number.isFinite(probeConcurrency) || probeConcurrency <= 0) throw new Error("--probe-concurrency must be > 0.");
1706
+ const probeMaxTokens = opts.probeMaxTokens ? Number(opts.probeMaxTokens) : 8;
1707
+ if (!Number.isFinite(probeMaxTokens) || probeMaxTokens <= 0) throw new Error("--probe-max-tokens must be > 0.");
1708
+ const aliasIndex = buildModelAliasIndex({
1709
+ cfg,
1710
+ defaultProvider: DEFAULT_PROVIDER
1711
+ });
1712
+ const modelCandidates = [
1713
+ rawModel || resolvedLabel,
1714
+ ...fallbacks,
1715
+ imageModel,
1716
+ ...imageFallbacks,
1717
+ ...allowed
1718
+ ].filter(Boolean).map((raw) => resolveModelRefFromString({
1719
+ raw: String(raw ?? ""),
1720
+ defaultProvider: DEFAULT_PROVIDER,
1721
+ aliasIndex
1722
+ })?.ref).filter((ref) => Boolean(ref)).map((ref) => `${ref.provider}/${ref.model}`);
1723
+ let probeSummary;
1724
+ if (opts.probe) probeSummary = await withProgressTotals({
1725
+ label: "Probing auth profiles…",
1726
+ total: 1
1727
+ }, async (update) => {
1728
+ return await runAuthProbes({
1729
+ cfg,
1730
+ providers,
1731
+ modelCandidates,
1732
+ options: {
1733
+ provider: opts.probeProvider,
1734
+ profileIds: probeProfileIds,
1735
+ timeoutMs: probeTimeoutMs,
1736
+ concurrency: probeConcurrency,
1737
+ maxTokens: probeMaxTokens
1738
+ },
1739
+ onProgress: update
1740
+ });
1741
+ });
1742
+ const providersWithOauth = providerAuth.filter((entry) => entry.profiles.oauth > 0 || entry.profiles.token > 0 || entry.env?.value === "OAuth (env)").map((entry) => {
1743
+ const count = entry.profiles.oauth + entry.profiles.token + (entry.env?.value === "OAuth (env)" ? 1 : 0);
1744
+ return `${entry.provider} (${count})`;
1745
+ });
1746
+ const authHealth = buildAuthHealthSummary({
1747
+ store,
1748
+ cfg,
1749
+ warnAfterMs: DEFAULT_OAUTH_WARN_MS,
1750
+ providers
1751
+ });
1752
+ const oauthProfiles = authHealth.profiles.filter((profile) => profile.type === "oauth" || profile.type === "token");
1753
+ const unusableProfiles = (() => {
1754
+ const now = Date.now();
1755
+ const out = [];
1756
+ for (const profileId of Object.keys(store.usageStats ?? {})) {
1757
+ const unusableUntil = resolveProfileUnusableUntilForDisplay(store, profileId);
1758
+ if (!unusableUntil || now >= unusableUntil) continue;
1759
+ const stats = store.usageStats?.[profileId];
1760
+ const kind = typeof stats?.disabledUntil === "number" && now < stats.disabledUntil ? "disabled" : "cooldown";
1761
+ out.push({
1762
+ profileId,
1763
+ provider: store.profiles[profileId]?.provider,
1764
+ kind,
1765
+ reason: stats?.disabledReason,
1766
+ until: unusableUntil,
1767
+ remainingMs: unusableUntil - now
1768
+ });
1769
+ }
1770
+ return out.toSorted((a, b) => a.remainingMs - b.remainingMs);
1771
+ })();
1772
+ const checkStatus = (() => {
1773
+ const hasExpiredOrMissing = oauthProfiles.some((profile) => ["expired", "missing"].includes(profile.status)) || missingProvidersInUse.length > 0;
1774
+ const hasExpiring = oauthProfiles.some((profile) => profile.status === "expiring");
1775
+ if (hasExpiredOrMissing) return 1;
1776
+ if (hasExpiring) return 2;
1777
+ return 0;
1778
+ })();
1779
+ if (opts.json) {
1780
+ runtime.log(JSON.stringify({
1781
+ configPath: CONFIG_PATH,
1782
+ ...agentId ? { agentId } : {},
1783
+ agentDir,
1784
+ defaultModel: defaultLabel,
1785
+ resolvedDefault: resolvedLabel,
1786
+ fallbacks,
1787
+ imageModel: imageModel || null,
1788
+ imageFallbacks,
1789
+ ...agentId ? { modelConfig: {
1790
+ defaultSource: agentModelPrimary ? "agent" : "defaults",
1791
+ fallbacksSource: agentFallbacksOverride !== void 0 ? "agent" : "defaults"
1792
+ } } : {},
1793
+ aliases,
1794
+ allowed,
1795
+ auth: {
1796
+ storePath: resolveAuthStorePathForDisplay(agentDir),
1797
+ shellEnvFallback: {
1798
+ enabled: shellFallbackEnabled,
1799
+ appliedKeys: applied
1800
+ },
1801
+ providersWithOAuth: providersWithOauth,
1802
+ missingProvidersInUse,
1803
+ providers: providerAuth,
1804
+ unusableProfiles,
1805
+ oauth: {
1806
+ warnAfterMs: authHealth.warnAfterMs,
1807
+ profiles: authHealth.profiles,
1808
+ providers: authHealth.providers
1809
+ },
1810
+ probes: probeSummary
1811
+ }
1812
+ }, null, 2));
1813
+ if (opts.check) runtime.exit(checkStatus);
1814
+ return;
1815
+ }
1816
+ if (opts.plain) {
1817
+ runtime.log(resolvedLabel);
1818
+ if (opts.check) runtime.exit(checkStatus);
1819
+ return;
1820
+ }
1821
+ const rich = isRich(opts);
1822
+ const label = (value) => colorize(rich, theme.accent, value.padEnd(14));
1823
+ const labelWithSource = (value, source) => label(source ? `${value} (${source})` : value);
1824
+ const displayDefault = rawModel && rawModel !== resolvedLabel ? `${resolvedLabel} (from ${rawModel})` : resolvedLabel;
1825
+ runtime.log(`${label("Config")}${colorize(rich, theme.muted, ":")} ${colorize(rich, theme.info, shortenHomePath(CONFIG_PATH))}`);
1826
+ runtime.log(`${label("Agent dir")}${colorize(rich, theme.muted, ":")} ${colorize(rich, theme.info, shortenHomePath(agentDir))}`);
1827
+ runtime.log(`${labelWithSource("Default", agentId ? agentModelPrimary ? "agent" : "defaults" : void 0)}${colorize(rich, theme.muted, ":")} ${colorize(rich, theme.success, displayDefault)}`);
1828
+ 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(", ") : "-")}`);
1829
+ runtime.log(`${labelWithSource("Image model", agentId ? "defaults" : void 0)}${colorize(rich, theme.muted, ":")} ${colorize(rich, imageModel ? theme.accentBright : theme.muted, imageModel || "-")}`);
1830
+ 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(", ") : "-")}`);
1831
+ 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(", ") : "-")}`);
1832
+ 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")}`);
1833
+ runtime.log("");
1834
+ runtime.log(colorize(rich, theme.heading, "Auth overview"));
1835
+ runtime.log(`${label("Auth store")}${colorize(rich, theme.muted, ":")} ${colorize(rich, theme.info, shortenHomePath(resolveAuthStorePathForDisplay(agentDir)))}`);
1836
+ 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(", ")})`) : ""}`);
1837
+ 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(", ") : "-")}`);
1838
+ const formatKey = (key) => colorize(rich, theme.warn, key);
1839
+ const formatKeyValue = (key, value) => `${formatKey(key)}=${colorize(rich, theme.info, value)}`;
1840
+ const formatSeparator = () => colorize(rich, theme.muted, " | ");
1841
+ for (const entry of providerAuth) {
1842
+ const separator = formatSeparator();
1843
+ const bits = [];
1844
+ bits.push(formatKeyValue("effective", `${colorize(rich, theme.accentBright, entry.effective.kind)}:${colorize(rich, theme.muted, entry.effective.detail)}`));
1845
+ if (entry.profiles.count > 0) {
1846
+ bits.push(formatKeyValue("profiles", `${entry.profiles.count} (oauth=${entry.profiles.oauth}, token=${entry.profiles.token}, api_key=${entry.profiles.apiKey})`));
1847
+ if (entry.profiles.labels.length > 0) bits.push(colorize(rich, theme.info, entry.profiles.labels.join(", ")));
1848
+ }
1849
+ if (entry.env) bits.push(formatKeyValue("env", `${entry.env.value}${separator}${formatKeyValue("source", entry.env.source)}`));
1850
+ if (entry.modelsJson) bits.push(formatKeyValue("models.json", `${entry.modelsJson.value}${separator}${formatKeyValue("source", entry.modelsJson.source)}`));
1851
+ runtime.log(`- ${theme.heading(entry.provider)} ${bits.join(separator)}`);
1852
+ }
1853
+ if (missingProvidersInUse.length > 0) {
1854
+ runtime.log("");
1855
+ runtime.log(colorize(rich, theme.heading, "Missing auth"));
1856
+ for (const provider of missingProvidersInUse) {
1857
+ 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.`;
1858
+ runtime.log(`- ${theme.heading(provider)} ${hint}`);
1859
+ }
1860
+ }
1861
+ runtime.log("");
1862
+ runtime.log(colorize(rich, theme.heading, "OAuth/token status"));
1863
+ if (oauthProfiles.length === 0) runtime.log(colorize(rich, theme.muted, "- none"));
1864
+ else {
1865
+ const usageByProvider = /* @__PURE__ */ new Map();
1866
+ const usageProviders = Array.from(new Set(oauthProfiles.map((profile) => resolveUsageProviderId(profile.provider)).filter((provider) => Boolean(provider))));
1867
+ if (usageProviders.length > 0) try {
1868
+ const usageSummary = await loadProviderUsageSummary({
1869
+ providers: usageProviders,
1870
+ agentDir,
1871
+ timeoutMs: 3500
1872
+ });
1873
+ for (const snapshot of usageSummary.providers) {
1874
+ const formatted = formatUsageWindowSummary(snapshot, {
1875
+ now: Date.now(),
1876
+ maxWindows: 2,
1877
+ includeResets: true
1878
+ });
1879
+ if (formatted) usageByProvider.set(snapshot.provider, formatted);
1880
+ }
1881
+ } catch {}
1882
+ const formatStatus = (status) => {
1883
+ if (status === "ok") return colorize(rich, theme.success, "ok");
1884
+ if (status === "static") return colorize(rich, theme.muted, "static");
1885
+ if (status === "expiring") return colorize(rich, theme.warn, "expiring");
1886
+ if (status === "missing") return colorize(rich, theme.warn, "unknown");
1887
+ return colorize(rich, theme.error, "expired");
1888
+ };
1889
+ const profilesByProvider = /* @__PURE__ */ new Map();
1890
+ for (const profile of oauthProfiles) {
1891
+ const current = profilesByProvider.get(profile.provider);
1892
+ if (current) current.push(profile);
1893
+ else profilesByProvider.set(profile.provider, [profile]);
1894
+ }
1895
+ for (const [provider, profiles] of profilesByProvider) {
1896
+ const usageKey = resolveUsageProviderId(provider);
1897
+ const usage = usageKey ? usageByProvider.get(usageKey) : void 0;
1898
+ const usageSuffix = usage ? colorize(rich, theme.muted, ` usage: ${usage}`) : "";
1899
+ runtime.log(`- ${colorize(rich, theme.heading, provider)}${usageSuffix}`);
1900
+ for (const profile of profiles) {
1901
+ const labelText = profile.label || profile.profileId;
1902
+ const label = colorize(rich, theme.accent, labelText);
1903
+ const status = formatStatus(profile.status);
1904
+ const expiry = profile.status === "static" ? "" : profile.expiresAt ? ` expires in ${formatRemainingShort(profile.remainingMs)}` : " expires unknown";
1905
+ runtime.log(` - ${label} ${status}${expiry}`);
1906
+ }
1907
+ }
1908
+ }
1909
+ if (probeSummary) {
1910
+ runtime.log("");
1911
+ runtime.log(colorize(rich, theme.heading, "Auth probes"));
1912
+ if (probeSummary.results.length === 0) runtime.log(colorize(rich, theme.muted, "- none"));
1913
+ else {
1914
+ const tableWidth = Math.max(60, (process.stdout.columns ?? 120) - 1);
1915
+ const sorted = sortProbeResults(probeSummary.results);
1916
+ const statusColor = (status) => {
1917
+ if (status === "ok") return theme.success;
1918
+ if (status === "rate_limit") return theme.warn;
1919
+ if (status === "timeout" || status === "billing") return theme.warn;
1920
+ if (status === "auth" || status === "format") return theme.error;
1921
+ if (status === "no_model") return theme.muted;
1922
+ return theme.muted;
1923
+ };
1924
+ const rows = sorted.map((result) => {
1925
+ const status = colorize(rich, statusColor(result.status), result.status);
1926
+ const latency = formatProbeLatency(result.latencyMs);
1927
+ const modelLabel = result.model ?? `${result.provider}/-`;
1928
+ const modeLabel = result.mode ? ` ${colorize(rich, theme.muted, `(${result.mode})`)}` : "";
1929
+ const profile = `${colorize(rich, theme.accent, result.label)}${modeLabel}`;
1930
+ const detail = result.error?.trim();
1931
+ const detailLabel = detail ? `\n${colorize(rich, theme.muted, `↳ ${detail}`)}` : "";
1932
+ const statusLabel = `${status}${colorize(rich, theme.muted, ` · ${latency}`)}${detailLabel}`;
1933
+ return {
1934
+ Model: colorize(rich, theme.heading, modelLabel),
1935
+ Profile: profile,
1936
+ Status: statusLabel
1937
+ };
1938
+ });
1939
+ runtime.log(renderTable({
1940
+ width: tableWidth,
1941
+ columns: [
1942
+ {
1943
+ key: "Model",
1944
+ header: "Model",
1945
+ minWidth: 18
1946
+ },
1947
+ {
1948
+ key: "Profile",
1949
+ header: "Profile",
1950
+ minWidth: 24
1951
+ },
1952
+ {
1953
+ key: "Status",
1954
+ header: "Status",
1955
+ minWidth: 12
1956
+ }
1957
+ ],
1958
+ rows
1959
+ }).trimEnd());
1960
+ runtime.log(colorize(rich, theme.muted, describeProbeSummary(probeSummary)));
1961
+ }
1962
+ }
1963
+ if (opts.check) runtime.exit(checkStatus);
1964
+ }
1965
+
1966
+ //#endregion
1967
+ //#region src/agents/model-scan.ts
1968
+ const OPENROUTER_MODELS_URL = "https://openrouter.ai/api/v1/models";
1969
+ const DEFAULT_TIMEOUT_MS = 12e3;
1970
+ const DEFAULT_CONCURRENCY = 3;
1971
+ const BASE_IMAGE_PNG = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+X3mIAAAAASUVORK5CYII=";
1972
+ const TOOL_PING = {
1973
+ name: "ping",
1974
+ description: "Return OK.",
1975
+ parameters: Type.Object({})
1976
+ };
1977
+ function normalizeCreatedAtMs(value) {
1978
+ if (typeof value !== "number" || !Number.isFinite(value)) return null;
1979
+ if (value <= 0) return null;
1980
+ if (value > 0xe8d4a51000) return Math.round(value);
1981
+ return Math.round(value * 1e3);
1982
+ }
1983
+ function parseModality(modality) {
1984
+ if (!modality) return ["text"];
1985
+ return modality.toLowerCase().split(/[^a-z]+/).filter(Boolean).includes("image") ? ["text", "image"] : ["text"];
1986
+ }
1987
+ function parseNumberString(value) {
1988
+ if (typeof value === "number" && Number.isFinite(value)) return value;
1989
+ if (typeof value !== "string") return null;
1990
+ const trimmed = value.trim();
1991
+ if (!trimmed) return null;
1992
+ const num = Number(trimmed);
1993
+ if (!Number.isFinite(num)) return null;
1994
+ return num;
1995
+ }
1996
+ function parseOpenRouterPricing(value) {
1997
+ if (!value || typeof value !== "object") return null;
1998
+ const obj = value;
1999
+ const prompt = parseNumberString(obj.prompt);
2000
+ const completion = parseNumberString(obj.completion);
2001
+ const request = parseNumberString(obj.request) ?? 0;
2002
+ const image = parseNumberString(obj.image) ?? 0;
2003
+ const webSearch = parseNumberString(obj.web_search) ?? 0;
2004
+ const internalReasoning = parseNumberString(obj.internal_reasoning) ?? 0;
2005
+ if (prompt === null || completion === null) return null;
2006
+ return {
2007
+ prompt,
2008
+ completion,
2009
+ request,
2010
+ image,
2011
+ webSearch,
2012
+ internalReasoning
2013
+ };
2014
+ }
2015
+ function isFreeOpenRouterModel(entry) {
2016
+ if (entry.id.endsWith(":free")) return true;
2017
+ if (!entry.pricing) return false;
2018
+ return entry.pricing.prompt === 0 && entry.pricing.completion === 0;
2019
+ }
2020
+ async function withTimeout(timeoutMs, fn) {
2021
+ const controller = new AbortController();
2022
+ const timer = setTimeout(controller.abort.bind(controller), timeoutMs);
2023
+ try {
2024
+ return await fn(controller.signal);
2025
+ } finally {
2026
+ clearTimeout(timer);
2027
+ }
2028
+ }
2029
+ async function fetchOpenRouterModels(fetchImpl) {
2030
+ const res = await fetchImpl(OPENROUTER_MODELS_URL, { headers: { Accept: "application/json" } });
2031
+ if (!res.ok) throw new Error(`OpenRouter /models failed: HTTP ${res.status}`);
2032
+ const payload = await res.json();
2033
+ return (Array.isArray(payload.data) ? payload.data : []).map((entry) => {
2034
+ if (!entry || typeof entry !== "object") return null;
2035
+ const obj = entry;
2036
+ const id = typeof obj.id === "string" ? obj.id.trim() : "";
2037
+ if (!id) return null;
2038
+ const name = typeof obj.name === "string" && obj.name.trim() ? obj.name.trim() : id;
2039
+ const contextLength = typeof obj.context_length === "number" && Number.isFinite(obj.context_length) ? obj.context_length : null;
2040
+ const maxCompletionTokens = typeof obj.max_completion_tokens === "number" && Number.isFinite(obj.max_completion_tokens) ? obj.max_completion_tokens : typeof obj.max_output_tokens === "number" && Number.isFinite(obj.max_output_tokens) ? obj.max_output_tokens : null;
2041
+ const supportedParameters = Array.isArray(obj.supported_parameters) ? obj.supported_parameters.filter((value) => typeof value === "string").map((value) => value.trim()).filter(Boolean) : [];
2042
+ return {
2043
+ id,
2044
+ name,
2045
+ contextLength,
2046
+ maxCompletionTokens,
2047
+ supportedParameters,
2048
+ supportedParametersCount: supportedParameters.length,
2049
+ supportsToolsMeta: supportedParameters.includes("tools"),
2050
+ modality: typeof obj.modality === "string" && obj.modality.trim() ? obj.modality.trim() : null,
2051
+ inferredParamB: inferParamBFromIdOrName(`${id} ${name}`),
2052
+ createdAtMs: normalizeCreatedAtMs(obj.created_at),
2053
+ pricing: parseOpenRouterPricing(obj.pricing)
2054
+ };
2055
+ }).filter((entry) => Boolean(entry));
2056
+ }
2057
+ async function probeTool(model, apiKey, timeoutMs) {
2058
+ const context = {
2059
+ messages: [{
2060
+ role: "user",
2061
+ content: "Call the ping tool with {} and nothing else.",
2062
+ timestamp: Date.now()
2063
+ }],
2064
+ tools: [TOOL_PING]
2065
+ };
2066
+ const startedAt = Date.now();
2067
+ try {
2068
+ if (!(await withTimeout(timeoutMs, (signal) => complete(model, context, {
2069
+ apiKey,
2070
+ maxTokens: 32,
2071
+ temperature: 0,
2072
+ toolChoice: "required",
2073
+ signal
2074
+ }))).content.some((block) => block.type === "toolCall")) return {
2075
+ ok: false,
2076
+ latencyMs: Date.now() - startedAt,
2077
+ error: "No tool call returned"
2078
+ };
2079
+ return {
2080
+ ok: true,
2081
+ latencyMs: Date.now() - startedAt
2082
+ };
2083
+ } catch (err) {
2084
+ return {
2085
+ ok: false,
2086
+ latencyMs: Date.now() - startedAt,
2087
+ error: err instanceof Error ? err.message : String(err)
2088
+ };
2089
+ }
2090
+ }
2091
+ async function probeImage(model, apiKey, timeoutMs) {
2092
+ const context = { messages: [{
2093
+ role: "user",
2094
+ content: [{
2095
+ type: "text",
2096
+ text: "Reply with OK."
2097
+ }, {
2098
+ type: "image",
2099
+ data: BASE_IMAGE_PNG,
2100
+ mimeType: "image/png"
2101
+ }],
2102
+ timestamp: Date.now()
2103
+ }] };
2104
+ const startedAt = Date.now();
2105
+ try {
2106
+ await withTimeout(timeoutMs, (signal) => complete(model, context, {
2107
+ apiKey,
2108
+ maxTokens: 16,
2109
+ temperature: 0,
2110
+ signal
2111
+ }));
2112
+ return {
2113
+ ok: true,
2114
+ latencyMs: Date.now() - startedAt
2115
+ };
2116
+ } catch (err) {
2117
+ return {
2118
+ ok: false,
2119
+ latencyMs: Date.now() - startedAt,
2120
+ error: err instanceof Error ? err.message : String(err)
2121
+ };
2122
+ }
2123
+ }
2124
+ function ensureImageInput(model) {
2125
+ if (model.input.includes("image")) return model;
2126
+ return {
2127
+ ...model,
2128
+ input: Array.from(new Set([...model.input, "image"]))
2129
+ };
2130
+ }
2131
+ async function mapWithConcurrency(items, concurrency, fn, opts) {
2132
+ const limit = Math.max(1, Math.floor(concurrency));
2133
+ const results = Array.from({ length: items.length }, () => void 0);
2134
+ let nextIndex = 0;
2135
+ let completed = 0;
2136
+ const worker = async () => {
2137
+ while (true) {
2138
+ const current = nextIndex;
2139
+ nextIndex += 1;
2140
+ if (current >= items.length) return;
2141
+ results[current] = await fn(items[current], current);
2142
+ completed += 1;
2143
+ opts?.onProgress?.(completed, items.length);
2144
+ }
2145
+ };
2146
+ if (items.length === 0) {
2147
+ opts?.onProgress?.(0, 0);
2148
+ return results;
2149
+ }
2150
+ await Promise.all(Array.from({ length: Math.min(limit, items.length) }, () => worker()));
2151
+ return results;
2152
+ }
2153
+ async function scanOpenRouterModels(options = {}) {
2154
+ const fetchImpl = options.fetchImpl ?? fetch;
2155
+ const probe = options.probe ?? true;
2156
+ const apiKey = options.apiKey?.trim() || getEnvApiKey("openrouter") || "";
2157
+ if (probe && !apiKey) throw new Error("Missing OpenRouter API key. Set OPENROUTER_API_KEY to run models scan.");
2158
+ const timeoutMs = Math.max(1, Math.floor(options.timeoutMs ?? DEFAULT_TIMEOUT_MS));
2159
+ const concurrency = Math.max(1, Math.floor(options.concurrency ?? DEFAULT_CONCURRENCY));
2160
+ const minParamB = Math.max(0, Math.floor(options.minParamB ?? 0));
2161
+ const maxAgeDays = Math.max(0, Math.floor(options.maxAgeDays ?? 0));
2162
+ const providerFilter = options.providerFilter?.trim().toLowerCase() ?? "";
2163
+ const catalog = await fetchOpenRouterModels(fetchImpl);
2164
+ const now = Date.now();
2165
+ const filtered = catalog.filter((entry) => {
2166
+ if (!isFreeOpenRouterModel(entry)) return false;
2167
+ if (providerFilter) {
2168
+ if ((entry.id.split("/")[0]?.toLowerCase() ?? "") !== providerFilter) return false;
2169
+ }
2170
+ if (minParamB > 0) {
2171
+ if ((entry.inferredParamB ?? 0) < minParamB) return false;
2172
+ }
2173
+ if (maxAgeDays > 0 && entry.createdAtMs) {
2174
+ if ((now - entry.createdAtMs) / (1440 * 60 * 1e3) > maxAgeDays) return false;
2175
+ }
2176
+ return true;
2177
+ });
2178
+ const baseModel = getModel("openrouter", "openrouter/auto");
2179
+ options.onProgress?.({
2180
+ phase: "probe",
2181
+ completed: 0,
2182
+ total: filtered.length
2183
+ });
2184
+ return mapWithConcurrency(filtered, concurrency, async (entry) => {
2185
+ const isFree = isFreeOpenRouterModel(entry);
2186
+ if (!probe) return {
2187
+ id: entry.id,
2188
+ name: entry.name,
2189
+ provider: "openrouter",
2190
+ modelRef: `openrouter/${entry.id}`,
2191
+ contextLength: entry.contextLength,
2192
+ maxCompletionTokens: entry.maxCompletionTokens,
2193
+ supportedParametersCount: entry.supportedParametersCount,
2194
+ supportsToolsMeta: entry.supportsToolsMeta,
2195
+ modality: entry.modality,
2196
+ inferredParamB: entry.inferredParamB,
2197
+ createdAtMs: entry.createdAtMs,
2198
+ pricing: entry.pricing,
2199
+ isFree,
2200
+ tool: {
2201
+ ok: false,
2202
+ latencyMs: null,
2203
+ skipped: true
2204
+ },
2205
+ image: {
2206
+ ok: false,
2207
+ latencyMs: null,
2208
+ skipped: true
2209
+ }
2210
+ };
2211
+ const model = {
2212
+ ...baseModel,
2213
+ id: entry.id,
2214
+ name: entry.name || entry.id,
2215
+ contextWindow: entry.contextLength ?? baseModel.contextWindow,
2216
+ maxTokens: entry.maxCompletionTokens ?? baseModel.maxTokens,
2217
+ input: parseModality(entry.modality),
2218
+ reasoning: baseModel.reasoning
2219
+ };
2220
+ const toolResult = await probeTool(model, apiKey, timeoutMs);
2221
+ const imageResult = model.input.includes("image") ? await probeImage(ensureImageInput(model), apiKey, timeoutMs) : {
2222
+ ok: false,
2223
+ latencyMs: null,
2224
+ skipped: true
2225
+ };
2226
+ return {
2227
+ id: entry.id,
2228
+ name: entry.name,
2229
+ provider: "openrouter",
2230
+ modelRef: `openrouter/${entry.id}`,
2231
+ contextLength: entry.contextLength,
2232
+ maxCompletionTokens: entry.maxCompletionTokens,
2233
+ supportedParametersCount: entry.supportedParametersCount,
2234
+ supportsToolsMeta: entry.supportsToolsMeta,
2235
+ modality: entry.modality,
2236
+ inferredParamB: entry.inferredParamB,
2237
+ createdAtMs: entry.createdAtMs,
2238
+ pricing: entry.pricing,
2239
+ isFree,
2240
+ tool: toolResult,
2241
+ image: imageResult
2242
+ };
2243
+ }, { onProgress: (completed, total) => options.onProgress?.({
2244
+ phase: "probe",
2245
+ completed,
2246
+ total
2247
+ }) });
2248
+ }
2249
+
2250
+ //#endregion
2251
+ //#region src/commands/models/scan.ts
2252
+ const MODEL_PAD = 42;
2253
+ const CTX_PAD = 8;
2254
+ const multiselect$1 = (params) => multiselect({
2255
+ ...params,
2256
+ message: stylePromptMessage(params.message),
2257
+ options: params.options.map((opt) => opt.hint === void 0 ? opt : {
2258
+ ...opt,
2259
+ hint: stylePromptHint(opt.hint)
2260
+ })
2261
+ });
2262
+ const pad = (value, size) => value.padEnd(size);
2263
+ const truncate = (value, max) => {
2264
+ if (value.length <= max) return value;
2265
+ if (max <= 3) return value.slice(0, max);
2266
+ return `${value.slice(0, max - 3)}...`;
2267
+ };
2268
+ function sortScanResults(results) {
2269
+ return results.slice().toSorted((a, b) => {
2270
+ const aImage = a.image.ok ? 1 : 0;
2271
+ const bImage = b.image.ok ? 1 : 0;
2272
+ if (aImage !== bImage) return bImage - aImage;
2273
+ const aToolLatency = a.tool.latencyMs ?? Number.POSITIVE_INFINITY;
2274
+ const bToolLatency = b.tool.latencyMs ?? Number.POSITIVE_INFINITY;
2275
+ if (aToolLatency !== bToolLatency) return aToolLatency - bToolLatency;
2276
+ return compareScanMetadata(a, b);
2277
+ });
2278
+ }
2279
+ function sortImageResults(results) {
2280
+ return results.slice().toSorted((a, b) => {
2281
+ const aLatency = a.image.latencyMs ?? Number.POSITIVE_INFINITY;
2282
+ const bLatency = b.image.latencyMs ?? Number.POSITIVE_INFINITY;
2283
+ if (aLatency !== bLatency) return aLatency - bLatency;
2284
+ return compareScanMetadata(a, b);
2285
+ });
2286
+ }
2287
+ function compareScanMetadata(a, b) {
2288
+ const aCtx = a.contextLength ?? 0;
2289
+ const bCtx = b.contextLength ?? 0;
2290
+ if (aCtx !== bCtx) return bCtx - aCtx;
2291
+ const aParams = a.inferredParamB ?? 0;
2292
+ const bParams = b.inferredParamB ?? 0;
2293
+ if (aParams !== bParams) return bParams - aParams;
2294
+ return a.modelRef.localeCompare(b.modelRef);
2295
+ }
2296
+ function buildScanHint(result) {
2297
+ return [
2298
+ result.tool.ok ? `tool ${formatMs(result.tool.latencyMs)}` : "tool fail",
2299
+ result.image.skipped ? "img skip" : result.image.ok ? `img ${formatMs(result.image.latencyMs)}` : "img fail",
2300
+ result.contextLength ? `ctx ${formatTokenK(result.contextLength)}` : "ctx ?",
2301
+ result.inferredParamB ? `${result.inferredParamB}b` : null
2302
+ ].filter(Boolean).join(" | ");
2303
+ }
2304
+ function printScanSummary(results, runtime) {
2305
+ const toolOk = results.filter((r) => r.tool.ok);
2306
+ const imageOk = results.filter((r) => r.image.ok);
2307
+ const toolImageOk = results.filter((r) => r.tool.ok && r.image.ok);
2308
+ const imageOnly = imageOk.filter((r) => !r.tool.ok);
2309
+ runtime.log(`Scan results: tested ${results.length}, tool ok ${toolOk.length}, image ok ${imageOk.length}, tool+image ok ${toolImageOk.length}, image only ${imageOnly.length}`);
2310
+ }
2311
+ function printScanTable(results, runtime) {
2312
+ const header = [
2313
+ pad("Model", MODEL_PAD),
2314
+ pad("Tool", 10),
2315
+ pad("Image", 10),
2316
+ pad("Ctx", CTX_PAD),
2317
+ pad("Params", 8),
2318
+ "Notes"
2319
+ ].join(" ");
2320
+ runtime.log(header);
2321
+ for (const entry of results) {
2322
+ const modelLabel = pad(truncate(entry.modelRef, MODEL_PAD), MODEL_PAD);
2323
+ const toolLabel = pad(entry.tool.ok ? formatMs(entry.tool.latencyMs) : "fail", 10);
2324
+ const imageLabel = pad(entry.image.ok ? formatMs(entry.image.latencyMs) : entry.image.skipped ? "skip" : "fail", 10);
2325
+ const ctxLabel = pad(formatTokenK(entry.contextLength), CTX_PAD);
2326
+ const paramsLabel = pad(entry.inferredParamB ? `${entry.inferredParamB}b` : "-", 8);
2327
+ const notes = entry.modality ? `modality:${entry.modality}` : "";
2328
+ runtime.log([
2329
+ modelLabel,
2330
+ toolLabel,
2331
+ imageLabel,
2332
+ ctxLabel,
2333
+ paramsLabel,
2334
+ notes
2335
+ ].join(" "));
2336
+ }
2337
+ }
2338
+ async function modelsScanCommand(opts, runtime) {
2339
+ const minParams = opts.minParams ? Number(opts.minParams) : void 0;
2340
+ if (minParams !== void 0 && (!Number.isFinite(minParams) || minParams < 0)) throw new Error("--min-params must be >= 0");
2341
+ const maxAgeDays = opts.maxAgeDays ? Number(opts.maxAgeDays) : void 0;
2342
+ if (maxAgeDays !== void 0 && (!Number.isFinite(maxAgeDays) || maxAgeDays < 0)) throw new Error("--max-age-days must be >= 0");
2343
+ const maxCandidates = opts.maxCandidates ? Number(opts.maxCandidates) : 6;
2344
+ if (!Number.isFinite(maxCandidates) || maxCandidates <= 0) throw new Error("--max-candidates must be > 0");
2345
+ const timeout = opts.timeout ? Number(opts.timeout) : void 0;
2346
+ if (timeout !== void 0 && (!Number.isFinite(timeout) || timeout <= 0)) throw new Error("--timeout must be > 0");
2347
+ const concurrency = opts.concurrency ? Number(opts.concurrency) : void 0;
2348
+ if (concurrency !== void 0 && (!Number.isFinite(concurrency) || concurrency <= 0)) throw new Error("--concurrency must be > 0");
2349
+ const cfg = loadConfig();
2350
+ const probe = opts.probe ?? true;
2351
+ let storedKey;
2352
+ if (probe) try {
2353
+ storedKey = (await resolveApiKeyForProvider({
2354
+ provider: "openrouter",
2355
+ cfg
2356
+ })).apiKey;
2357
+ } catch {
2358
+ storedKey = void 0;
2359
+ }
2360
+ const results = await withProgressTotals({
2361
+ label: "Scanning OpenRouter models...",
2362
+ indeterminate: false,
2363
+ enabled: opts.json !== true
2364
+ }, async (update) => await scanOpenRouterModels({
2365
+ apiKey: storedKey ?? void 0,
2366
+ minParamB: minParams,
2367
+ maxAgeDays,
2368
+ providerFilter: opts.provider,
2369
+ timeoutMs: timeout,
2370
+ concurrency,
2371
+ probe,
2372
+ onProgress: ({ phase, completed, total }) => {
2373
+ if (phase !== "probe") return;
2374
+ update({
2375
+ completed,
2376
+ total,
2377
+ label: `${probe ? "Probing models" : "Scanning models"} (${completed}/${total})`
2378
+ });
2379
+ }
2380
+ }));
2381
+ if (!probe) {
2382
+ if (!opts.json) {
2383
+ runtime.log(`Found ${results.length} OpenRouter free models (metadata only; pass --probe to test tools/images).`);
2384
+ printScanTable(sortScanResults(results), runtime);
2385
+ } else runtime.log(JSON.stringify(results, null, 2));
2386
+ return;
2387
+ }
2388
+ const toolOk = results.filter((entry) => entry.tool.ok);
2389
+ if (toolOk.length === 0) throw new Error("No tool-capable OpenRouter free models found.");
2390
+ const sorted = sortScanResults(results);
2391
+ const toolSorted = sortScanResults(toolOk);
2392
+ const imageSorted = sortImageResults(results.filter((entry) => entry.image.ok));
2393
+ const imagePreferred = toolSorted.filter((entry) => entry.image.ok);
2394
+ const preselected = (imagePreferred.length > 0 ? imagePreferred : toolSorted).slice(0, Math.floor(maxCandidates)).map((entry) => entry.modelRef);
2395
+ const imagePreselected = imageSorted.slice(0, Math.floor(maxCandidates)).map((entry) => entry.modelRef);
2396
+ if (!opts.json) {
2397
+ printScanSummary(results, runtime);
2398
+ printScanTable(sorted, runtime);
2399
+ }
2400
+ const noInput = opts.input === false;
2401
+ const canPrompt = process.stdin.isTTY && !opts.yes && !noInput && !opts.json;
2402
+ let selected = preselected;
2403
+ let selectedImages = imagePreselected;
2404
+ if (canPrompt) {
2405
+ const selection = await multiselect$1({
2406
+ message: "Select fallback models (ordered)",
2407
+ options: toolSorted.map((entry) => ({
2408
+ value: entry.modelRef,
2409
+ label: entry.modelRef,
2410
+ hint: buildScanHint(entry)
2411
+ })),
2412
+ initialValues: preselected
2413
+ });
2414
+ if (isCancel(selection)) {
2415
+ cancel(stylePromptTitle("Model scan cancelled.") ?? "Model scan cancelled.");
2416
+ runtime.exit(0);
2417
+ }
2418
+ selected = selection;
2419
+ if (imageSorted.length > 0) {
2420
+ const imageSelection = await multiselect$1({
2421
+ message: "Select image fallback models (ordered)",
2422
+ options: imageSorted.map((entry) => ({
2423
+ value: entry.modelRef,
2424
+ label: entry.modelRef,
2425
+ hint: buildScanHint(entry)
2426
+ })),
2427
+ initialValues: imagePreselected
2428
+ });
2429
+ if (isCancel(imageSelection)) {
2430
+ cancel(stylePromptTitle("Model scan cancelled.") ?? "Model scan cancelled.");
2431
+ runtime.exit(0);
2432
+ }
2433
+ selectedImages = imageSelection;
2434
+ }
2435
+ } else if (!process.stdin.isTTY && !opts.yes && !noInput && !opts.json) throw new Error("Non-interactive scan: pass --yes to apply defaults.");
2436
+ if (selected.length === 0) throw new Error("No models selected for fallbacks.");
2437
+ if (opts.setImage && selectedImages.length === 0) throw new Error("No image-capable models selected for image model.");
2438
+ await updateConfig((cfg) => {
2439
+ const nextModels = { ...cfg.agents?.defaults?.models };
2440
+ for (const entry of selected) if (!nextModels[entry]) nextModels[entry] = {};
2441
+ for (const entry of selectedImages) if (!nextModels[entry]) nextModels[entry] = {};
2442
+ const existingImageModel = cfg.agents?.defaults?.imageModel;
2443
+ const nextImageModel = selectedImages.length > 0 ? {
2444
+ ...existingImageModel?.primary ? { primary: existingImageModel.primary } : void 0,
2445
+ fallbacks: selectedImages,
2446
+ ...opts.setImage ? { primary: selectedImages[0] } : {}
2447
+ } : cfg.agents?.defaults?.imageModel;
2448
+ const existingModel = cfg.agents?.defaults?.model;
2449
+ const defaults = {
2450
+ ...cfg.agents?.defaults,
2451
+ model: {
2452
+ ...existingModel?.primary ? { primary: existingModel.primary } : void 0,
2453
+ fallbacks: selected,
2454
+ ...opts.setDefault ? { primary: selected[0] } : {}
2455
+ },
2456
+ ...nextImageModel ? { imageModel: nextImageModel } : {},
2457
+ models: nextModels
2458
+ };
2459
+ return {
2460
+ ...cfg,
2461
+ agents: {
2462
+ ...cfg.agents,
2463
+ defaults
2464
+ }
2465
+ };
2466
+ });
2467
+ if (opts.json) {
2468
+ runtime.log(JSON.stringify({
2469
+ selected,
2470
+ selectedImages,
2471
+ setDefault: Boolean(opts.setDefault),
2472
+ setImage: Boolean(opts.setImage),
2473
+ results,
2474
+ warnings: []
2475
+ }, null, 2));
2476
+ return;
2477
+ }
2478
+ logConfigUpdated(runtime);
2479
+ runtime.log(`Fallbacks: ${selected.join(", ")}`);
2480
+ if (selectedImages.length > 0) runtime.log(`Image fallbacks: ${selectedImages.join(", ")}`);
2481
+ if (opts.setDefault) runtime.log(`Default model: ${selected[0]}`);
2482
+ if (opts.setImage && selectedImages.length > 0) runtime.log(`Image model: ${selectedImages[0]}`);
2483
+ }
2484
+
2485
+ //#endregion
2486
+ //#region src/commands/models/set.ts
2487
+ async function modelsSetCommand(modelRaw, runtime) {
2488
+ const updated = await updateConfig((cfg) => {
2489
+ const resolved = resolveModelTarget({
2490
+ raw: modelRaw,
2491
+ cfg
2492
+ });
2493
+ const key = `${resolved.provider}/${resolved.model}`;
2494
+ const nextModels = { ...cfg.agents?.defaults?.models };
2495
+ if (!nextModels[key]) nextModels[key] = {};
2496
+ const existingModel = cfg.agents?.defaults?.model;
2497
+ return {
2498
+ ...cfg,
2499
+ agents: {
2500
+ ...cfg.agents,
2501
+ defaults: {
2502
+ ...cfg.agents?.defaults,
2503
+ model: {
2504
+ ...existingModel?.fallbacks ? { fallbacks: existingModel.fallbacks } : void 0,
2505
+ primary: key
2506
+ },
2507
+ models: nextModels
2508
+ }
2509
+ }
2510
+ };
2511
+ });
2512
+ logConfigUpdated(runtime);
2513
+ runtime.log(`Default model: ${updated.agents?.defaults?.model?.primary ?? modelRaw}`);
2514
+ }
2515
+
2516
+ //#endregion
2517
+ //#region src/commands/models/set-image.ts
2518
+ async function modelsSetImageCommand(modelRaw, runtime) {
2519
+ const updated = await updateConfig((cfg) => {
2520
+ const resolved = resolveModelTarget({
2521
+ raw: modelRaw,
2522
+ cfg
2523
+ });
2524
+ const key = `${resolved.provider}/${resolved.model}`;
2525
+ const nextModels = { ...cfg.agents?.defaults?.models };
2526
+ if (!nextModels[key]) nextModels[key] = {};
2527
+ const existingModel = cfg.agents?.defaults?.imageModel;
2528
+ return {
2529
+ ...cfg,
2530
+ agents: {
2531
+ ...cfg.agents,
2532
+ defaults: {
2533
+ ...cfg.agents?.defaults,
2534
+ imageModel: {
2535
+ ...existingModel?.fallbacks ? { fallbacks: existingModel.fallbacks } : void 0,
2536
+ primary: key
2537
+ },
2538
+ models: nextModels
2539
+ }
2540
+ }
2541
+ };
2542
+ });
2543
+ logConfigUpdated(runtime);
2544
+ runtime.log(`Image model: ${updated.agents?.defaults?.imageModel?.primary ?? modelRaw}`);
2545
+ }
2546
+
2547
+ //#endregion
2548
+ //#region src/cli/models-cli.ts
2549
+ function runModelsCommand(action) {
2550
+ return runCommandWithRuntime(defaultRuntime, action);
2551
+ }
2552
+ function registerModelsCli(program) {
2553
+ const models = program.command("models").description("Model discovery, scanning, and configuration").option("--status-json", "Output JSON (alias for `models status --json`)", false).option("--status-plain", "Plain output (alias for `models status --plain`)", false).option("--agent <id>", "Agent id to inspect (overrides OPENCLAW_AGENT_DIR/PI_CODING_AGENT_DIR)").addHelpText("after", () => `\n${theme.muted("Docs:")} ${formatDocsLink("/cli/models", "docs.openclaw.ai/cli/models")}\n`);
2554
+ models.command("list").description("List models (configured by default)").option("--all", "Show full model catalog", false).option("--local", "Filter to local models", false).option("--provider <name>", "Filter by provider").option("--json", "Output JSON", false).option("--plain", "Plain line output", false).action(async (opts) => {
2555
+ await runModelsCommand(async () => {
2556
+ await modelsListCommand(opts, defaultRuntime);
2557
+ });
2558
+ });
2559
+ models.command("status").description("Show configured model state").option("--json", "Output JSON", false).option("--plain", "Plain output", false).option("--check", "Exit non-zero if auth is expiring/expired (1=expired/missing, 2=expiring)", false).option("--probe", "Probe configured provider auth (live)", false).option("--probe-provider <name>", "Only probe a single provider").option("--probe-profile <id>", "Only probe specific auth profile ids (repeat or comma-separated)", (value, previous) => {
2560
+ const next = Array.isArray(previous) ? previous : previous ? [previous] : [];
2561
+ next.push(value);
2562
+ return next;
2563
+ }).option("--probe-timeout <ms>", "Per-probe timeout in ms").option("--probe-concurrency <n>", "Concurrent probes").option("--probe-max-tokens <n>", "Probe max tokens (best-effort)").option("--agent <id>", "Agent id to inspect (overrides OPENCLAW_AGENT_DIR/PI_CODING_AGENT_DIR)").action(async (opts, command) => {
2564
+ const agent = resolveOptionFromCommand(command, "agent") ?? opts.agent;
2565
+ await runModelsCommand(async () => {
2566
+ await modelsStatusCommand({
2567
+ json: Boolean(opts.json),
2568
+ plain: Boolean(opts.plain),
2569
+ check: Boolean(opts.check),
2570
+ probe: Boolean(opts.probe),
2571
+ probeProvider: opts.probeProvider,
2572
+ probeProfile: opts.probeProfile,
2573
+ probeTimeout: opts.probeTimeout,
2574
+ probeConcurrency: opts.probeConcurrency,
2575
+ probeMaxTokens: opts.probeMaxTokens,
2576
+ agent
2577
+ }, defaultRuntime);
2578
+ });
2579
+ });
2580
+ models.command("set").description("Set the default model").argument("<model>", "Model id or alias").action(async (model) => {
2581
+ await runModelsCommand(async () => {
2582
+ await modelsSetCommand(model, defaultRuntime);
2583
+ });
2584
+ });
2585
+ models.command("set-image").description("Set the image model").argument("<model>", "Model id or alias").action(async (model) => {
2586
+ await runModelsCommand(async () => {
2587
+ await modelsSetImageCommand(model, defaultRuntime);
2588
+ });
2589
+ });
2590
+ const aliases = models.command("aliases").description("Manage model aliases");
2591
+ aliases.command("list").description("List model aliases").option("--json", "Output JSON", false).option("--plain", "Plain output", false).action(async (opts) => {
2592
+ await runModelsCommand(async () => {
2593
+ await modelsAliasesListCommand(opts, defaultRuntime);
2594
+ });
2595
+ });
2596
+ aliases.command("add").description("Add or update a model alias").argument("<alias>", "Alias name").argument("<model>", "Model id or alias").action(async (alias, model) => {
2597
+ await runModelsCommand(async () => {
2598
+ await modelsAliasesAddCommand(alias, model, defaultRuntime);
2599
+ });
2600
+ });
2601
+ aliases.command("remove").description("Remove a model alias").argument("<alias>", "Alias name").action(async (alias) => {
2602
+ await runModelsCommand(async () => {
2603
+ await modelsAliasesRemoveCommand(alias, defaultRuntime);
2604
+ });
2605
+ });
2606
+ const fallbacks = models.command("fallbacks").description("Manage model fallback list");
2607
+ fallbacks.command("list").description("List fallback models").option("--json", "Output JSON", false).option("--plain", "Plain output", false).action(async (opts) => {
2608
+ await runModelsCommand(async () => {
2609
+ await modelsFallbacksListCommand(opts, defaultRuntime);
2610
+ });
2611
+ });
2612
+ fallbacks.command("add").description("Add a fallback model").argument("<model>", "Model id or alias").action(async (model) => {
2613
+ await runModelsCommand(async () => {
2614
+ await modelsFallbacksAddCommand(model, defaultRuntime);
2615
+ });
2616
+ });
2617
+ fallbacks.command("remove").description("Remove a fallback model").argument("<model>", "Model id or alias").action(async (model) => {
2618
+ await runModelsCommand(async () => {
2619
+ await modelsFallbacksRemoveCommand(model, defaultRuntime);
2620
+ });
2621
+ });
2622
+ fallbacks.command("clear").description("Clear all fallback models").action(async () => {
2623
+ await runModelsCommand(async () => {
2624
+ await modelsFallbacksClearCommand(defaultRuntime);
2625
+ });
2626
+ });
2627
+ const imageFallbacks = models.command("image-fallbacks").description("Manage image model fallback list");
2628
+ imageFallbacks.command("list").description("List image fallback models").option("--json", "Output JSON", false).option("--plain", "Plain output", false).action(async (opts) => {
2629
+ await runModelsCommand(async () => {
2630
+ await modelsImageFallbacksListCommand(opts, defaultRuntime);
2631
+ });
2632
+ });
2633
+ imageFallbacks.command("add").description("Add an image fallback model").argument("<model>", "Model id or alias").action(async (model) => {
2634
+ await runModelsCommand(async () => {
2635
+ await modelsImageFallbacksAddCommand(model, defaultRuntime);
2636
+ });
2637
+ });
2638
+ imageFallbacks.command("remove").description("Remove an image fallback model").argument("<model>", "Model id or alias").action(async (model) => {
2639
+ await runModelsCommand(async () => {
2640
+ await modelsImageFallbacksRemoveCommand(model, defaultRuntime);
2641
+ });
2642
+ });
2643
+ imageFallbacks.command("clear").description("Clear all image fallback models").action(async () => {
2644
+ await runModelsCommand(async () => {
2645
+ await modelsImageFallbacksClearCommand(defaultRuntime);
2646
+ });
2647
+ });
2648
+ models.command("scan").description("Scan OpenRouter free models for tools + images").option("--min-params <b>", "Minimum parameter size (billions)").option("--max-age-days <days>", "Skip models older than N days").option("--provider <name>", "Filter by provider prefix").option("--max-candidates <n>", "Max fallback candidates", "6").option("--timeout <ms>", "Per-probe timeout in ms").option("--concurrency <n>", "Probe concurrency").option("--no-probe", "Skip live probes; list free candidates only").option("--yes", "Accept defaults without prompting", false).option("--no-input", "Disable prompts (use defaults)").option("--set-default", "Set agents.defaults.model to the first selection", false).option("--set-image", "Set agents.defaults.imageModel to the first image selection", false).option("--json", "Output JSON", false).action(async (opts) => {
2649
+ await runModelsCommand(async () => {
2650
+ await modelsScanCommand(opts, defaultRuntime);
2651
+ });
2652
+ });
2653
+ models.action(async (opts) => {
2654
+ await runModelsCommand(async () => {
2655
+ await modelsStatusCommand({
2656
+ json: Boolean(opts?.statusJson),
2657
+ plain: Boolean(opts?.statusPlain),
2658
+ agent: opts?.agent
2659
+ }, defaultRuntime);
2660
+ });
2661
+ });
2662
+ const auth = models.command("auth").description("Manage model auth profiles");
2663
+ auth.option("--agent <id>", "Agent id for auth order get/set/clear");
2664
+ auth.action(() => {
2665
+ auth.help();
2666
+ });
2667
+ auth.command("add").description("Interactive auth helper (setup-token or paste token)").action(async () => {
2668
+ await runModelsCommand(async () => {
2669
+ await modelsAuthAddCommand({}, defaultRuntime);
2670
+ });
2671
+ });
2672
+ auth.command("login").description("Run a provider plugin auth flow (OAuth/API key)").option("--provider <id>", "Provider id registered by a plugin").option("--method <id>", "Provider auth method id").option("--set-default", "Apply the provider's default model recommendation", false).action(async (opts) => {
2673
+ await runModelsCommand(async () => {
2674
+ await modelsAuthLoginCommand({
2675
+ provider: opts.provider,
2676
+ method: opts.method,
2677
+ setDefault: Boolean(opts.setDefault)
2678
+ }, defaultRuntime);
2679
+ });
2680
+ });
2681
+ auth.command("setup-token").description("Run a provider CLI to create/sync a token (TTY required)").option("--provider <name>", "Provider id (default: anthropic)").option("--yes", "Skip confirmation", false).action(async (opts) => {
2682
+ await runModelsCommand(async () => {
2683
+ await modelsAuthSetupTokenCommand({
2684
+ provider: opts.provider,
2685
+ yes: Boolean(opts.yes)
2686
+ }, defaultRuntime);
2687
+ });
2688
+ });
2689
+ auth.command("paste-token").description("Paste a token into auth-profiles.json and update config").requiredOption("--provider <name>", "Provider id (e.g. anthropic)").option("--profile-id <id>", "Auth profile id (default: <provider>:manual)").option("--expires-in <duration>", "Optional expiry duration (e.g. 365d, 12h). Stored as absolute expiresAt.").action(async (opts) => {
2690
+ await runModelsCommand(async () => {
2691
+ await modelsAuthPasteTokenCommand({
2692
+ provider: opts.provider,
2693
+ profileId: opts.profileId,
2694
+ expiresIn: opts.expiresIn
2695
+ }, defaultRuntime);
2696
+ });
2697
+ });
2698
+ auth.command("login-github-copilot").description("Login to GitHub Copilot via GitHub device flow (TTY required)").option("--profile-id <id>", "Auth profile id (default: github-copilot:github)").option("--yes", "Overwrite existing profile without prompting", false).action(async (opts) => {
2699
+ await runModelsCommand(async () => {
2700
+ await githubCopilotLoginCommand({
2701
+ profileId: opts.profileId,
2702
+ yes: Boolean(opts.yes)
2703
+ }, defaultRuntime);
2704
+ });
2705
+ });
2706
+ const order = auth.command("order").description("Manage per-agent auth profile order overrides");
2707
+ order.command("get").description("Show per-agent auth order override (from auth-profiles.json)").requiredOption("--provider <name>", "Provider id (e.g. anthropic)").option("--agent <id>", "Agent id (default: configured default agent)").option("--json", "Output JSON", false).action(async (opts, command) => {
2708
+ const agent = resolveOptionFromCommand(command, "agent") ?? opts.agent;
2709
+ await runModelsCommand(async () => {
2710
+ await modelsAuthOrderGetCommand({
2711
+ provider: opts.provider,
2712
+ agent,
2713
+ json: Boolean(opts.json)
2714
+ }, defaultRuntime);
2715
+ });
2716
+ });
2717
+ order.command("set").description("Set per-agent auth order override (locks rotation to this list)").requiredOption("--provider <name>", "Provider id (e.g. anthropic)").option("--agent <id>", "Agent id (default: configured default agent)").argument("<profileIds...>", "Auth profile ids (e.g. anthropic:default)").action(async (profileIds, opts, command) => {
2718
+ const agent = resolveOptionFromCommand(command, "agent") ?? opts.agent;
2719
+ await runModelsCommand(async () => {
2720
+ await modelsAuthOrderSetCommand({
2721
+ provider: opts.provider,
2722
+ agent,
2723
+ order: profileIds
2724
+ }, defaultRuntime);
2725
+ });
2726
+ });
2727
+ order.command("clear").description("Clear per-agent auth order override (fall back to config/round-robin)").requiredOption("--provider <name>", "Provider id (e.g. anthropic)").option("--agent <id>", "Agent id (default: configured default agent)").action(async (opts, command) => {
2728
+ const agent = resolveOptionFromCommand(command, "agent") ?? opts.agent;
2729
+ await runModelsCommand(async () => {
2730
+ await modelsAuthOrderClearCommand({
2731
+ provider: opts.provider,
2732
+ agent
2733
+ }, defaultRuntime);
2734
+ });
2735
+ });
2736
+ }
2737
+
2738
+ //#endregion
2739
+ export { registerModelsCli };