@hanzo/bot 2026.3.7 → 2026.3.9

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 (534) hide show
  1. package/dist/{accounts-Cp7zE1zb.js → accounts-B-9Bhdn6.js} +17 -17
  2. package/dist/{accounts-D-CXitCL.js → accounts-BVV0eCmx.js} +2 -2
  3. package/dist/{accounts-Da-TWEIc.js → accounts-C04lw_uh.js} +4 -4
  4. package/dist/{accounts-B4Cft76I.js → accounts-C2vo5fEt.js} +2 -2
  5. package/dist/{accounts-DRUpcCkN.js → accounts-CtzU1wJb.js} +2 -2
  6. package/dist/{accounts-C_LXSS3x.js → accounts-DNligSyz.js} +2 -2
  7. package/dist/{acp-cli-DYkqqqaJ.js → acp-cli-CDUVvPjD.js} +28 -24
  8. package/dist/{active-listener-DlziGqIg.js → active-listener-NprMzFx6.js} +2 -2
  9. package/dist/{active-listener-BR7vpJxr.js → active-listener-zLV9i9LQ.js} +2 -2
  10. package/dist/{agent-scope-C5bklqr1.js → agent-scope-BcruZHHR.js} +5 -5
  11. package/dist/{agents-CH9da9zi.js → agents-D8rH1P3g.js} +20 -19
  12. package/dist/{agents.config-BQ8I8wuY.js → agents.config-OuZqDEe6.js} +4 -4
  13. package/dist/{api-0IJLBHQk.js → api-Bgrt1pfd.js} +1 -1
  14. package/dist/{api-key-rotation-iYITGuLK.js → api-key-rotation-BENZC8ep.js} +2 -2
  15. package/dist/{api-key-rotation-DuxfwUin.js → api-key-rotation-C0toONXd.js} +2 -2
  16. package/dist/{audio-preflight-CpAXC_Ct.js → audio-preflight-Bd44yEnM.js} +32 -32
  17. package/dist/{audio-preflight-BnfuyvxO.js → audio-preflight-D_s-peid.js} +4 -4
  18. package/dist/audio-preflight-d9iZknwY.js +102 -0
  19. package/dist/{audio-transcription-runner-GcMnO6sT.js → audio-transcription-runner-BePCnZfw.js} +1 -1
  20. package/dist/{audio-transcription-runner-CAOjjGxN.js → audio-transcription-runner-CsXaWVup.js} +12 -12
  21. package/dist/{audio-transcription-runner-DCsEpXgz.js → audio-transcription-runner-bvBQs8UB.js} +13 -13
  22. package/dist/{audit-DCJbont3.js → audit-BWNRwu8g.js} +28 -28
  23. package/dist/{audit-membership-runtime-CVVxrZ7j.js → audit-membership-runtime-BJ149bTU.js} +4 -4
  24. package/dist/{audit-membership-runtime-BIZ4bigJ.js → audit-membership-runtime-Bki8LzkA.js} +7 -6
  25. package/dist/{auth-CqlFkBrB.js → auth-CWHo884l.js} +5 -5
  26. package/dist/{auth-choice-9obtL17m.js → auth-choice-DUtpqOiw.js} +25 -22
  27. package/dist/{auth-choice-w2mL3d_M.js → auth-choice-n72qSpix.js} +15 -14
  28. package/dist/{auth-choice-options-DMoNPDm6.js → auth-choice-options-D13GahL8.js} +1 -1
  29. package/dist/{auth-choice-prompt-Btp8AqFI.js → auth-choice-prompt-8z7z_AUr.js} +1 -1
  30. package/dist/{auth-choice.apply-helpers-JU7nAiWC.js → auth-choice.apply-helpers-DMhFdoYH.js} +3 -3
  31. package/dist/{auth-mode-policy-slU2Nkgr.js → auth-mode-policy-BopOhrK8.js} +1 -1
  32. package/dist/{auth-profiles-BCHBDrea.js → auth-profiles-BtxyXCZY.js} +48 -925
  33. package/dist/{auth-token-BfzDARSk.js → auth-token-zcumGtdt.js} +3 -3
  34. package/dist/{banner-C4sx0Vaf.js → banner-C1G_GtAz.js} +3 -3
  35. package/dist/{bonjour-discovery-CzNIGZ7K.js → bonjour-discovery-C1SH2QqR.js} +3 -3
  36. package/dist/{browser-cli-qPNZkfDX.js → browser-cli-Bd81bwqM.js} +36 -32
  37. package/dist/build-info.json +3 -3
  38. package/dist/bundled/boot-md/handler.js +51 -51
  39. package/dist/bundled/bootstrap-extra-files/handler.js +6 -6
  40. package/dist/bundled/command-logger/handler.js +2 -2
  41. package/dist/bundled/session-memory/handler.js +51 -51
  42. package/dist/{call-C4z2LJrI.js → call-DL23sPxF.js} +9 -8
  43. package/dist/canvas-host/a2ui/.bundle.hash +1 -1
  44. package/dist/{channel-account-context-DyLW8OD1.js → channel-account-context-DGbGZhGz.js} +3 -3
  45. package/dist/{channel-activity-Bch3Rz78.js → channel-activity-DItBzFyQ.js} +3 -3
  46. package/dist/{channel-activity-DR4SiHcg.js → channel-activity-DO-d_jr4.js} +3 -3
  47. package/dist/{channel-options-ChtPFPQx.js → channel-options-DU65sVdF.js} +4 -4
  48. package/dist/{channel-selection-CXz2aSCs.js → channel-selection-BnXQH0vV.js} +2 -2
  49. package/dist/{channel-web-Bok0lFvq.js → channel-web-BbWnfun7.js} +25 -24
  50. package/dist/{channels-cli-B5oDUpEB.js → channels-cli-B8LCe0vu.js} +142 -135
  51. package/dist/{channels-status-issues-BAy-21Cb.js → channels-status-issues-DXNaEL8i.js} +1 -1
  52. package/dist/{chrome--CFg5C_H.js → chrome-B24-8NDM.js} +8 -8
  53. package/dist/{chrome-TWq_09_a.js → chrome-D4EfbMKb.js} +7 -7
  54. package/dist/{chrome-jCt9JCU8.js → chrome-hkgY24uS.js} +18 -18
  55. package/dist/{clack-prompter-0Rux0QKP.js → clack-prompter-CNKAp_jq.js} +5 -5
  56. package/dist/clawbot-cli-Bv8oZgvA.js +36 -0
  57. package/dist/cli/daemon-cli.js +1 -1
  58. package/dist/cli-DXbYdTNH.js +162 -0
  59. package/dist/{client-DWdu7Vc_.js → client-Bvvecv3V.js} +25 -142
  60. package/dist/{clipboard-Bfhk9cp3.js → clipboard-DwO9zZBK.js} +1 -1
  61. package/dist/{cloud-connect-BERMG0cQ.js → cloud-connect-CknfBF39.js} +89 -52
  62. package/dist/cloud-launch-7mm4ZKXy.js +172 -0
  63. package/dist/{command-poll-backoff.runtime-COz7plyi.js → command-poll-backoff.runtime-ClRAZFDL.js} +1 -1
  64. package/dist/{command-registry-DTMuq-Fw.js → command-registry-CTaJSsqV.js} +11 -11
  65. package/dist/{command-secret-targets-B2OuvZQf.js → command-secret-targets-C382v6Qd.js} +6 -6
  66. package/dist/{commands-BAjCW6P6.js → commands-BoGUirwW.js} +2 -2
  67. package/dist/{commands-registry-Ce7SJnAP.js → commands-registry-C6INZSSX.js} +4 -4
  68. package/dist/{commands-registry-bwa5zMJ1.js → commands-registry-Dn_5_JYs.js} +6 -6
  69. package/dist/{compact-CenE94cW.js → compact-CuLMew-8.js} +141 -910
  70. package/dist/{completion-cli-spiS5-xU.js → completion-cli-CixfDHo4.js} +6 -6
  71. package/dist/{config-cli-w-RlQ3jB.js → config-cli-Bu2Eakz-.js} +22 -19
  72. package/dist/{config-guard-rlTIXCSD.js → config-guard-Bt2BdsMd.js} +5 -5
  73. package/dist/{config-validation-B3rr-h3d.js → config-validation-WdHwRX05.js} +6 -6
  74. package/dist/{configure-YxPFskRy.js → configure-ClIJiVqS.js} +32 -31
  75. package/dist/{control-ui-assets-CvLJNwEr.js → control-ui-assets-Co9rmXkB.js} +3 -3
  76. package/dist/{credentials-DVX7Krq5.js → credentials-SIFZMlmo.js} +1 -1
  77. package/dist/{cron-cli-DI9DN0vu.js → cron-cli-DR13ajr7.js} +32 -28
  78. package/dist/{daemon-cli-OBRBnIhu.js → daemon-cli-C6ZVajFI.js} +28 -28
  79. package/dist/{daemon-install-CGk2QyeB.js → daemon-install-DsDcMh2v.js} +43 -39
  80. package/dist/{daemon-install-helpers-C1QLEGFF.js → daemon-install-helpers-BtOiCRD1.js} +7 -35
  81. package/dist/{deliver-BVtVDxwX.js → deliver-B1PE5Kmq.js} +21 -21
  82. package/dist/{deliver-DPkEY6xb.js → deliver-Bge0HwrF.js} +13 -13
  83. package/dist/{deliver-DmfS4khs.js → deliver-DudaV86i.js} +1 -1
  84. package/dist/deliver-runtime-L42k3QaI.js +36 -0
  85. package/dist/{deliver-runtime-PxJvVUhh.js → deliver-runtime-qDmQqiF-.js} +3 -3
  86. package/dist/deliver-runtime-s0eLCemL.js +63 -0
  87. package/dist/{delivery-queue-DgdE_Ifa.js → delivery-queue-BVKd_xSI.js} +1 -1
  88. package/dist/deps-send-discord.runtime-C8HKp3uO.js +37 -0
  89. package/dist/deps-send-discord.runtime-DSqcSnN3.js +26 -0
  90. package/dist/deps-send-imessage.runtime-Ch2ZcE2r.js +25 -0
  91. package/dist/deps-send-imessage.runtime-ECy162Cs.js +36 -0
  92. package/dist/deps-send-signal.runtime-XbioSg-_.js +35 -0
  93. package/dist/deps-send-signal.runtime-c-v7bD8y.js +24 -0
  94. package/dist/deps-send-slack.runtime-BM7Vp8vX.js +33 -0
  95. package/dist/deps-send-slack.runtime-xA-JRpSq.js +22 -0
  96. package/dist/deps-send-telegram.runtime-CO2npp7q.js +27 -0
  97. package/dist/deps-send-telegram.runtime-IFD4dAk7.js +39 -0
  98. package/dist/deps-send-whatsapp.runtime-BHuShWkA.js +124 -0
  99. package/dist/{deps-send-whatsapp.runtime-CrzuaVhC.js → deps-send-whatsapp.runtime-Cq-TLsJw.js} +7 -7
  100. package/dist/deps-send-whatsapp.runtime-wvdxQphB.js +60 -0
  101. package/dist/device-identity-DtdLP7QQ.js +148 -0
  102. package/dist/{devices-cli-C7xKmiR9.js → devices-cli-DZRtpqol.js} +25 -21
  103. package/dist/{diagnostic-DCevSIi3.js → diagnostic-CXxZq_XY.js} +3 -3
  104. package/dist/{diagnostic-D1IbJfJM.js → diagnostic-Do7hUiao.js} +2 -2
  105. package/dist/{diagnostics-vhe8iPOe.js → diagnostics-GQuagqCt.js} +1 -1
  106. package/dist/{directory-cli-BrLvL2oD.js → directory-cli-Tqim_rB9.js} +24 -21
  107. package/dist/{dns-cli-Dcytc0em.js → dns-cli-AcAZnW-T.js} +19 -16
  108. package/dist/{dock-D1Nz-RwP.js → dock-nMBfeGKa.js} +7 -7
  109. package/dist/{docs-cli-CjnLrTzs.js → docs-cli-C6mNYtxD.js} +17 -16
  110. package/dist/{doctor-completion-BKaFgAAN.js → doctor-completion-Dg6AJY6Q.js} +4 -4
  111. package/dist/{doctor-config-flow-Bp3eehAS.js → doctor-config-flow-CKY6Mr3X.js} +19 -19
  112. package/dist/{enable-pUSco1cm.js → enable-BWraNcrd.js} +2 -2
  113. package/dist/entry.js +20 -12
  114. package/dist/{errors-Dh5KARaE.js → errors-ClLWB67m.js} +1 -1
  115. package/dist/{errors-CHd6Q-vF.js → errors-DDrhcWHi.js} +1 -1
  116. package/dist/{exec-B45rafWZ.js → exec-B8Hv4Nkd.js} +1 -1
  117. package/dist/{exec-approvals-B5leCM6K.js → exec-approvals-Bh1osORd.js} +1 -1
  118. package/dist/{exec-approvals-allowlist-CSlk-iUy.js → exec-approvals-allowlist-dlIMsRq0.js} +1 -1
  119. package/dist/{exec-approvals-cli-B722kWhJ.js → exec-approvals-cli-B2V935Or.js} +33 -29
  120. package/dist/{exec-safe-bin-runtime-policy-C4OXhXIe.js → exec-safe-bin-runtime-policy-Ds-cMyOt.js} +2 -2
  121. package/dist/extensionAPI.js +6 -6
  122. package/dist/{fetch-C6doVJxZ.js → fetch-BETRLmK8.js} +5 -5
  123. package/dist/{fetch-COQIeEVX.js → fetch-BPh3R9xH.js} +3 -3
  124. package/dist/{fetch-TlhZeXdg.js → fetch-DyJnPUwL.js} +1 -1
  125. package/dist/{fetch-guard-BiNciKHu.js → fetch-guard-hL-C2yQz.js} +3 -3
  126. package/dist/{fetch-guard-C-neMX4E.js → fetch-guard-pwJ-F5aP.js} +2 -2
  127. package/dist/{frontmatter-BIwJR052.js → frontmatter-B0viix_h.js} +2 -2
  128. package/dist/{frontmatter-B6XNqDx2.js → frontmatter-BFHzrAY7.js} +3 -3
  129. package/dist/{fs-safe-DtMJsayp.js → fs-safe-CFIinCN2.js} +3 -3
  130. package/dist/{fs-safe-DmeSz0Nd.js → fs-safe-CeZ_BXcn.js} +4 -4
  131. package/dist/gateway-cli-DjWebqxe.js +1436 -0
  132. package/dist/{gateway-install-token-tifgQqTq.js → gateway-install-token-olAkdWwV.js} +6 -6
  133. package/dist/gateway-lock-DNpln_70.js +192 -0
  134. package/dist/{gateway-rpc--AYNXZQF.js → gateway-rpc-B37zbuoK.js} +3 -3
  135. package/dist/{github-copilot-token-BDioPmd6.js → github-copilot-token-BKQ4nXAw.js} +3 -24
  136. package/dist/{github-copilot-token-Byc_YVYE.js → github-copilot-token-D13V9YBz.js} +7 -7
  137. package/dist/{gmail-setup-utils-B1wEc-nz.js → gmail-setup-utils-DuoBM8ed.js} +3 -3
  138. package/dist/{health-DTtmaQPz.js → health-Cs-k6kLT.js} +18 -16
  139. package/dist/{helpers-CIEbwEWl.js → helpers-DDBxLojl.js} +1 -1
  140. package/dist/{hooks-cli-DJDBpL-Z.js → hooks-cli-Zqdxhm6M.js} +123 -116
  141. package/dist/{hooks-status-CFT0VML6.js → hooks-status-DqCwY9M6.js} +4 -4
  142. package/dist/{image-DSK1hSSV.js → image-DJo3nF6e.js} +6 -6
  143. package/dist/{image-DFnt4Uwg.js → image-m1GU1uco.js} +7 -7
  144. package/dist/{image-BdZcUz8M.js → image-nUHQF6BX.js} +1 -1
  145. package/dist/{image-ops-DBPCaLYI.js → image-ops-Bnk-bI_x.js} +1 -1
  146. package/dist/{image-ops-C-QWxnVw.js → image-ops-CLQ9abCf.js} +2 -2
  147. package/dist/{image-runtime-ueqmfx1a.js → image-runtime-B5M_-diF.js} +3 -3
  148. package/dist/image-runtime-Bd2-_2Fa.js +29 -0
  149. package/dist/image-runtime-CesErRak.js +57 -0
  150. package/dist/{inspect-BVm4U2OP.js → inspect-CMuOPXUf.js} +2 -2
  151. package/dist/{install-safe-path-Df97RWiJ.js → install-safe-path-BxdyoAni.js} +3 -3
  152. package/dist/{installs-BGMsioU1.js → installs-c4kWJSG4.js} +8 -8
  153. package/dist/ip-C7WWCRN7.js +204 -0
  154. package/dist/{ipv4-Difv_P0_.js → ipv4-DcjwXncJ.js} +2 -2
  155. package/dist/{ir-B0iARYlT.js → ir-9Bn85Mqy.js} +8 -8
  156. package/dist/{ir-CaGizvli.js → ir-BjnGKA2N.js} +8 -8
  157. package/dist/{issue-format-DjqrcimU.js → issue-format-BMPYbT1P.js} +1 -1
  158. package/dist/json-file-CNp4GTiH.js +25 -0
  159. package/dist/{legacy-names-DZdACm3t.js → legacy-names-Bkl4tjN-.js} +1 -1
  160. package/dist/{lifecycle-core-BXWGDU3R.js → lifecycle-core-fN_BonzB.js} +10 -10
  161. package/dist/{links-C7eMwu1P.js → links-DZZ9QxWA.js} +1 -1
  162. package/dist/llm-slug-generator.js +51 -51
  163. package/dist/local-launch-C2RER-G3.js +126 -0
  164. package/dist/{logger-LCC1m_20.js → logger-D4RcXHR-.js} +7 -7
  165. package/dist/{logger-DB-PHqB2.js → logger-DyQjakwH.js} +2 -1
  166. package/dist/{logging-CS4C9VwV.js → logging--bXnY6uw.js} +1 -1
  167. package/dist/{login-B8HwtO61.js → login-DTK-M8Is.js} +6 -6
  168. package/dist/{login-BbBqhgOM.js → login-nNeuyFrd.js} +5 -5
  169. package/dist/{login-qr-AAX0vgZR.js → login-qr-BEawmd_E.js} +10 -10
  170. package/dist/{login-qr-amd1X6Dw.js → login-qr-CmnyPjTv.js} +29 -16
  171. package/dist/{logs-cli-BH8DNgo2.js → logs-cli-BSlzurlM.js} +27 -23
  172. package/dist/machine-name-BWZ0tBHk.js +41 -0
  173. package/dist/{manager-BYSXh-I3.js → manager-BVqjeGyT.js} +11 -11
  174. package/dist/{manager-BOyc7q1-.js → manager-Bq6y1TH8.js} +13 -13
  175. package/dist/manager-runtime-CBdUM6c8.js +27 -0
  176. package/dist/manager-runtime-DNkH2nza.js +18 -0
  177. package/dist/{manifest-registry-9oWnIuht.js → manifest-registry-m_hXBIk-.js} +4 -4
  178. package/dist/{memory-cli-C6ocXZHW.js → memory-cli-yvsbLFgi.js} +15 -14
  179. package/dist/{message-channel-7mpcAPwa.js → message-channel-DOpIvru6.js} +34 -2
  180. package/dist/{model-catalog-B3fDLVsV.js → model-catalog-DtjVcDuN.js} +11 -5
  181. package/dist/{model-picker-V0gt2kzq.js → model-picker-oa-NsQXX.js} +5 -4
  182. package/dist/{model-selection-BNMWRHZu.js → model-selection-DQ5NblsF.js} +43 -43
  183. package/dist/{models-D9CovevI.js → models-Bi78FQeE.js} +26 -25
  184. package/dist/{models-cli-CQBq_lri.js → models-cli-DUkH_80R.js} +126 -119
  185. package/dist/{models-config-Tnpb1ctj.js → models-config-D_IvpQGa.js} +3 -2
  186. package/dist/{node-cli-Cy9sSHy5.js → node-cli-B1iGQlR9.js} +61 -54
  187. package/dist/{node-command-policy-C9mK2tft.js → node-command-policy-CeKPGmlP.js} +2 -2
  188. package/dist/node-commands-sMomb3e1.js +20 -0
  189. package/dist/{node-service-DB36GYv5.js → node-service-BLMp6VWJ.js} +2 -2
  190. package/dist/{nodes-cli-DEtlooE3.js → nodes-cli-CD9qv7k5.js} +39 -35
  191. package/dist/{nodes-screen-DmJ2G431.js → nodes-screen-X8daVm8e.js} +5 -5
  192. package/dist/{note-DI9vedAF.js → note-C3wyXRP2.js} +2 -2
  193. package/dist/{npm-pack-install-_OjtFm2J.js → npm-pack-install-B0X6q-Co.js} +3 -3
  194. package/dist/{npm-resolution-DzmQqopk.js → npm-resolution-CavQ2ST5.js} +5 -5
  195. package/dist/{oauth-env-DKoO0B8-.js → oauth-env-9SRuwpTK.js} +1 -1
  196. package/dist/{oauth-tls-preflight-Dzh0FiLy.js → oauth-tls-preflight-C_9v9ytQ.js} +2 -2
  197. package/dist/{onboard-B_1mmscr.js → onboard-Dgav6iT6.js} +17 -17
  198. package/dist/{onboard-auth.credentials-CtuA7DuT.js → onboard-auth.credentials-CMsut-0h.js} +4 -3
  199. package/dist/{onboard-channels-C1ZeD4r3.js → onboard-channels-oAN4ja4v.js} +26 -25
  200. package/dist/{onboard-custom-BU2l3aiF.js → onboard-custom-B3RIFmaw.js} +7 -7
  201. package/dist/{onboard-helpers-Dtu3-e93.js → onboard-helpers-BkwNJPNU.js} +12 -12
  202. package/dist/{onboard-hooks-w-a3FVVK.js → onboard-hooks-BRCGmt7Q.js} +12 -11
  203. package/dist/{onboard-remote-C-HD7hQU.js → onboard-remote-CE5v5J2R.js} +5 -5
  204. package/dist/{onboard-skills-DvgdlwqH.js → onboard-skills-DD5L2MsA.js} +5 -5
  205. package/dist/{onboarding-DozRyXTe.js → onboarding-gbgi-zx9.js} +23 -23
  206. package/dist/{onboarding.finalize-BfSNnhpS.js → onboarding.finalize-dk1j3ozb.js} +135 -128
  207. package/dist/{onboarding.gateway-config-C02W81hD.js → onboarding.gateway-config-DNQfWDVc.js} +39 -34
  208. package/dist/{onboarding.secret-input-BO32ZliB.js → onboarding.secret-input-BDId1_5K.js} +2 -2
  209. package/dist/{openai-codex-model-default-gJryyHmS.js → openai-codex-model-default-EWrFsdir.js} +5 -5
  210. package/dist/{openai-model-default-D2LuX7D-.js → openai-model-default-CcOzYsIQ.js} +3 -3
  211. package/dist/{outbound-C72ULCcI.js → outbound-CPL9ID8o.js} +6 -6
  212. package/dist/{outbound-CXQEMm6n.js → outbound-DCuHHD3G.js} +8 -8
  213. package/dist/{outbound-attachment-D7sOzAQn.js → outbound-attachment-Bm82Qbyl.js} +3 -3
  214. package/dist/{outbound-attachment-BF1JVcCB.js → outbound-attachment-BmiVeNLr.js} +2 -2
  215. package/dist/{pairing-cli-BkbpM3Mt.js → pairing-cli-dXCvRk1U.js} +23 -20
  216. package/dist/{pairing-labels-CjKrz2C9.js → pairing-labels-B_3GjgjR.js} +1 -1
  217. package/dist/{pairing-store-nyK6CFoT.js → pairing-store-CXFEv3Gr.js} +5 -5
  218. package/dist/{pairing-token-Tb0YsOGr.js → pairing-token-BIAdQuAM.js} +1 -1
  219. package/dist/{path-alias-guards-CUaIvLOE.js → path-alias-guards-Bz8AnRb7.js} +1 -1
  220. package/dist/{path-alias-guards-BCv18tKc.js → path-alias-guards-DBVdJRcc.js} +1 -1
  221. package/dist/{path-env-LTMy-Xkk.js → path-env-CgmdxEc7.js} +1 -1
  222. package/dist/{path-safety-DwIbN_B2.js → path-safety-EkGa1GqP.js} +1 -1
  223. package/dist/{paths-Dr0uMr7v.js → paths-BBXgPm_n.js} +2 -2
  224. package/dist/{paths-Cvc9EM8Y.js → paths-C6TxBCvO.js} +5 -5
  225. package/dist/{paths-l8GkNRRD.js → paths-Cgd1FfOW.js} +4 -4
  226. package/dist/{paths-0GcCtgXm.js → paths-gTdorMgW.js} +1 -1
  227. package/dist/{pi-embedded-DBn841N-.js → pi-embedded-BYfpUcIY.js} +159 -159
  228. package/dist/{pi-embedded-DYc6emwb.js → pi-embedded-DvWHP6Nn.js} +24 -24
  229. package/dist/{pi-embedded-helpers-BMC2HFyB.js → pi-embedded-helpers-CCkKNz_h.js} +5 -5
  230. package/dist/{pi-embedded-helpers-DLm1Mtr2.js → pi-embedded-helpers-Ck1qEeMH.js} +3 -3
  231. package/dist/{pi-embedded-helpers-BtnBVL-4.js → pi-embedded-helpers-_OL4yNw0.js} +52 -52
  232. package/dist/{pi-model-discovery-BUP6uy2Q.js → pi-model-discovery-6_opNECD.js} +2 -1
  233. package/dist/{pi-model-discovery-Cucu_uXw.js → pi-model-discovery-DANpv7pw.js} +7 -7
  234. package/dist/pi-model-discovery-runtime-8K2F-Fkl.js +20 -0
  235. package/dist/pi-model-discovery-runtime-Dr5-MM2j.js +11 -0
  236. package/dist/{pi-tools.before-tool-call.runtime-r5_UoU-W.js → pi-tools.before-tool-call.runtime-BrFKAhWX.js} +16 -13
  237. package/dist/{pi-tools.before-tool-call.runtime-DQ2d5nM_.js → pi-tools.before-tool-call.runtime-CLb1M0uM.js} +9 -9
  238. package/dist/{pi-tools.policy-C_cbrlt5.js → pi-tools.policy-U1G3dAzL.js} +9 -9
  239. package/dist/{plugin-auto-enable-DdGdWKDo.js → plugin-auto-enable-3v7X3qMK.js} +6 -6
  240. package/dist/{plugin-registry-FdOZQF3c.js → plugin-registry-Brz1ypl9.js} +5 -5
  241. package/dist/plugin-sdk/discord.js +6 -6
  242. package/dist/{plugins-D3Wuignn.js → plugins-CCkC0dRo.js} +7 -6
  243. package/dist/{plugins-YJZX7mvv.js → plugins-CeflwBVL.js} +13 -13
  244. package/dist/{plugins-cli-CV4ilsn4.js → plugins-cli-DGfFRLeo.js} +123 -116
  245. package/dist/{ports-BZsa4E0e.js → ports-BG0KrTF5.js} +3 -2
  246. package/dist/{ports-B8DmvnDT.js → ports-BxwhTkI2.js} +5 -29
  247. package/dist/ports-lsof-C-KFQ3hh.js +27 -0
  248. package/dist/{probe-D23qt8BT.js → probe-AK77B0YW.js} +4 -4
  249. package/dist/{program-GusnXq4M.js → program-DfJJCEJW.js} +125 -118
  250. package/dist/{progress-DLHMb9Nz.js → progress-DB5E2Y0L.js} +1 -1
  251. package/dist/{prompt-select-styled-B8L90ha2.js → prompt-select-styled-Cm8h3ln5.js} +50 -49
  252. package/dist/{provider-auth-helpers-DCzPHYBh.js → provider-auth-helpers-BWFf-ICH.js} +9 -8
  253. package/dist/{proxy-env-CKBWNd19.js → proxy-env-a_fwG5uV.js} +1 -1
  254. package/dist/{proxy-env-CreSu2Ej.js → proxy-env-zUD967XQ.js} +1 -1
  255. package/dist/{proxy-fetch-CuomJeW8.js → proxy-fetch-B-9MM6tH.js} +1 -1
  256. package/dist/{proxy-fetch-lxJGuoUa.js → proxy-fetch-ChfJDZwG.js} +1 -1
  257. package/dist/{push-apns-BNjpWCK5.js → push-apns-D7Kl5IlU.js} +6 -6
  258. package/dist/{pw-ai-DbzNFC8m.js → pw-ai-BuJLXHSR.js} +28 -24
  259. package/dist/{pw-ai-C-Sy12jT.js → pw-ai-DweqbnMJ.js} +1 -1
  260. package/dist/{pw-ai-pJMhS79V.js → pw-ai-yR5naMge.js} +14 -14
  261. package/dist/{qmd-manager-5C5L5YNn.js → qmd-manager-CWAXF3Vk.js} +10 -10
  262. package/dist/{qmd-manager-BuqPkrhL.js → qmd-manager-ChOTfdZQ.js} +14 -13
  263. package/dist/{qr-cli-DCqr6_WR.js → qr-cli-CNV3ou88.js} +8 -7
  264. package/dist/{query-expansion-BeRz7_bo.js → query-expansion-Cbd21KuP.js} +6 -6
  265. package/dist/{redact-DqlKR0-n.js → redact-DGz6yigq.js} +1 -1
  266. package/dist/{redact-snapshot-COg8NLLO.js → redact-snapshot-DDgxiqE4.js} +3 -3
  267. package/dist/{register.agent-yjg7wijd.js → register.agent-B6lw56u_.js} +147 -140
  268. package/dist/register.configure-A26LOYA5.js +173 -0
  269. package/dist/{register.maintenance-B1tKJXP8.js → register.maintenance-Bv41DKCC.js} +144 -136
  270. package/dist/{register.message-BJm9UQ1U.js → register.message-BTZUaOa_.js} +119 -112
  271. package/dist/{register.onboard-Si5PW3Ke.js → register.onboard-Cla_XQtJ.js} +47 -43
  272. package/dist/{register.setup-Dgd21xa5.js → register.setup-BO3qmf_4.js} +46 -42
  273. package/dist/{register.status-health-sessions-DijNX4q2.js → register.status-health-sessions-DQxR8MS5.js} +134 -127
  274. package/dist/{register.subclis-RfmNwdNw.js → register.subclis-CasWzZR5.js} +32 -32
  275. package/dist/{registry-CxLUHPLp.js → registry-DnJ84ILp.js} +6 -83
  276. package/dist/{resolve-configured-secret-input-string-ySbc3h26.js → resolve-configured-secret-input-string-D9uWNIsN.js} +2 -2
  277. package/dist/restart-D97MOP8K.js +782 -0
  278. package/dist/{rpc-DaYUgLOy.js → rpc-DyZoASXQ.js} +4 -4
  279. package/dist/run-loop-Zvh_699t.js +224 -0
  280. package/dist/{run-main-t3x2kkjY.js → run-main-CgFUs81l.js} +148 -133
  281. package/dist/{run-with-concurrency-ffnO0KnQ.js → run-with-concurrency-kEFC1Fle.js} +4 -4
  282. package/dist/{runtime-BkR9qMZk.js → runtime-BBknab-X.js} +6 -5
  283. package/dist/runtime-CvdZtNmJ.js +100 -0
  284. package/dist/{runtime-config-collectors-CCkqshyY.js → runtime-config-collectors-CML7zUqZ.js} +2 -2
  285. package/dist/{runtime-guard-BMUPc-7K.js → runtime-guard-jpG1v0SY.js} +1 -1
  286. package/dist/runtime-whatsapp-login.runtime-BKnJdTKn.js +13 -0
  287. package/dist/runtime-whatsapp-login.runtime-COI7KRKp.js +23 -0
  288. package/dist/runtime-whatsapp-outbound.runtime-DZYgfcRc.js +22 -0
  289. package/dist/runtime-whatsapp-outbound.runtime-la1XDkPQ.js +33 -0
  290. package/dist/{sandbox-DN9CY7lp.js → sandbox-DKscghPx.js} +19 -18
  291. package/dist/{sandbox-cli-BoXV0LgP.js → sandbox-cli-CPwPZJBq.js} +52 -48
  292. package/dist/{secrets-cli-CyF7PIF1.js → secrets-cli-BY0IyBZM.js} +31 -26
  293. package/dist/{security-cli-Dyvx1GHA.js → security-cli-CG6OlQ29.js} +66 -61
  294. package/dist/{send-7T5wUQDt.js → send-BSbPEzn5.js} +7 -7
  295. package/dist/{send-CmVj590_.js → send-Bi_r7Hno.js} +7 -7
  296. package/dist/{send-Ge3BmrKO.js → send-C2xEPjDg.js} +8 -8
  297. package/dist/{send-BrlM68Dd.js → send-C4kartXc.js} +6 -6
  298. package/dist/{send-DGbx1H-1.js → send-CFNNbHEA.js} +11 -11
  299. package/dist/{send-rLuC3ZNP.js → send-CIW-foVz.js} +7 -7
  300. package/dist/{send-CGAq-Ure.js → send-CZtdjq0Y.js} +20 -20
  301. package/dist/{send-Cp6dmr2f.js → send-CisFoCif.js} +28 -28
  302. package/dist/{send-BXQ1U9Zk.js → send-DKjV2v4c.js} +5 -5
  303. package/dist/{send-CKIMBFLs.js → send-DqQOo6dv.js} +8 -8
  304. package/dist/{gateway-cli-D7jJhAZQ.js → server-CG9eco0N.js} +122 -1835
  305. package/dist/{server-BM8Bplbe.js → server-DfSS2w17.js} +36 -32
  306. package/dist/{server-context-B1j20KiF.js → server-context-CcW_Z5sB.js} +15 -15
  307. package/dist/{server-lifecycle-D8uRbSiN.js → server-lifecycle-DWK8vMXD.js} +2 -2
  308. package/dist/{server-middleware-C0e-wReR.js → server-middleware-BtyTo4hI.js} +2 -2
  309. package/dist/{server-node-events-C876mSJD.js → server-node-events-Ck1bPPa5.js} +117 -110
  310. package/dist/{service-BJxGQl0h.js → service-DnXLOpYd.js} +2 -2
  311. package/dist/{session-1LXasKCO.js → session-Dnt2qKJU.js} +4 -4
  312. package/dist/{session-DoD05Mm8.js → session-U4Hk8Woy.js} +8 -8
  313. package/dist/{session-cost-usage-BKD6u4HD.js → session-cost-usage-CBHvFXhD.js} +3 -3
  314. package/dist/{session-utils-CigqosOc.js → session-utils-t4ZmEDMj.js} +9 -8
  315. package/dist/{sessions-Db2DF_68.js → sessions-BkKVGWHa.js} +13 -12
  316. package/dist/{sessions-CwRdJvxU.js → sessions-D6VEpJTN.js} +7 -7
  317. package/dist/{shared-DcKZdze7.js → shared-DKj9yygb.js} +4 -4
  318. package/dist/{skill-commands-DGy6Juvb.js → skill-commands-BN9qtrxT.js} +9 -9
  319. package/dist/{skill-commands-BFUWbeCU.js → skill-commands-Dyi0nIIE.js} +8 -8
  320. package/dist/{skill-scanner-B5APVdka.js → skill-scanner-C6efDeWr.js} +2 -2
  321. package/dist/{skills-DjMDgmlj.js → skills-Cp-zTGor.js} +8 -8
  322. package/dist/{skills-BDJUqEFI.js → skills-DgwotBrr.js} +22 -22
  323. package/dist/{skills-cli-CvDeA9Mz.js → skills-cli-BcLVYbwo.js} +19 -16
  324. package/dist/{skills-install-jLz2vwvm.js → skills-install-LXdiRh5j.js} +10 -10
  325. package/dist/{skills-status-CeHRbTXe.js → skills-status-NIhVZfqm.js} +5 -5
  326. package/dist/slash-commands.runtime-Bq0XWi2w.js +28 -0
  327. package/dist/slash-commands.runtime-iBi9rbmg.js +16 -0
  328. package/dist/slash-dispatch.runtime-7RhcnuYY.js +119 -0
  329. package/dist/slash-dispatch.runtime-8okSdt7k.js +56 -0
  330. package/dist/{slash-dispatch.runtime-Vp6IDoCc.js → slash-dispatch.runtime-DzpJjr3K.js} +6 -6
  331. package/dist/slash-skill-commands.runtime-HWFM7WtA.js +34 -0
  332. package/dist/slash-skill-commands.runtime-a4qnxIQp.js +20 -0
  333. package/dist/{sqlite-C0jSdAfK.js → sqlite-BOrw_KhN.js} +4 -4
  334. package/dist/stable-node-path-BghYt81T.js +32 -0
  335. package/dist/{status-D3cIxG_a.js → status-DN8lRmcz.js} +40 -40
  336. package/dist/{status-pXeXDUup.js → status-DNPn0STZ.js} +1 -1
  337. package/dist/{status.update-DeJopD-c.js → status.update-Cd4sMxYz.js} +4 -4
  338. package/dist/{store-cJlS-gR6.js → store-CNWtYorN.js} +2 -2
  339. package/dist/store-D8F_4CRR.js +701 -0
  340. package/dist/{store-BgCLFtxS.js → store-DCoVH3mG.js} +2 -2
  341. package/dist/subagent-registry-runtime-C4H5Ofm0.js +56 -0
  342. package/dist/subagent-registry-runtime-DVd9wO_D.js +119 -0
  343. package/dist/{subagent-registry-runtime-BlAI3eqU.js → subagent-registry-runtime-a7xfwPB8.js} +6 -6
  344. package/dist/{subsystem-Cfn2Pryx.js → subsystem-C6poMade.js} +2 -94
  345. package/dist/{subsystem-CdFYjh2k.js → subsystem-W834z9Wa.js} +14 -14
  346. package/dist/{system-cli-GQBIKMxE.js → system-cli-Zu5LiJFn.js} +25 -21
  347. package/dist/{system-run-command-ZDr-0-G2.js → system-run-command-Kw0jxir0.js} +1 -1
  348. package/dist/{systemd-hints-CLH4_-IK.js → systemd-hints-Da4Q7Orc.js} +5 -5
  349. package/dist/{systemd-linger-PnO8ebUK.js → systemd-linger-NLcFYPEu.js} +2 -2
  350. package/dist/{systemd-tpTWQ79a.js → systemd-tjVNbfBk.js} +2 -2
  351. package/dist/{table-D9z5aFl9.js → table-BP6N5EYA.js} +2 -2
  352. package/dist/{tables-Bb1hkkgV.js → tables-D4LxfXpk.js} +2 -2
  353. package/dist/{tables-CgcFNr6G.js → tables-DBZFzS9x.js} +1 -1
  354. package/dist/{tailnet-B-wq8YXh.js → tailnet-CInGXmk9.js} +1 -1
  355. package/dist/{tailscale-DOG3cjSj.js → tailscale-DRFhBuh-.js} +1 -1
  356. package/dist/{target-errors-D41KLMCY.js → target-errors-CkcKdefZ.js} +2 -2
  357. package/dist/{target-errors-DPj6Es2y.js → target-errors-CxUP9L6c.js} +2 -2
  358. package/dist/{thinking-C3b10cHs.js → thinking-Xlbm5WNq.js} +7 -7
  359. package/dist/{tokens-g3GBx2U9.js → tokens-C3eENCf9.js} +1 -1
  360. package/dist/{tokens-mtgzW7UN.js → tokens-Cyi-NbsV.js} +1 -1
  361. package/dist/{tool-display-CpQNRadF.js → tool-display-qTfeZx-b.js} +2 -2
  362. package/dist/{tool-images-Bkv3er-8.js → tool-images-BwtNIRsT.js} +2 -2
  363. package/dist/{tool-images-D9pdW1gE.js → tool-images-D217wDXi.js} +2 -2
  364. package/dist/{trash-ChZlaria.js → trash-DHZNy01S.js} +2 -2
  365. package/dist/{tui-BdX0dbMg.js → tui-CW9for1h.js} +18 -18
  366. package/dist/tui-cli-ChrtbCqc.js +91 -0
  367. package/dist/types.secrets-CpVqMFti.js +81 -0
  368. package/dist/{update-BLXj6ysD.js → update-Bb-g7rqr.js} +4 -4
  369. package/dist/{update-cli-lYpdoDyw.js → update-cli-DHGCFiKY.js} +155 -148
  370. package/dist/{update-runner-DtN1XGSv.js → update-runner-BDHtvoca.js} +6 -6
  371. package/dist/web-CCim-JL4.js +123 -0
  372. package/dist/{web-BvId86u4.js → web-IBqHOVI2.js} +6 -6
  373. package/dist/{web-BEuMJbx-.js → web-o9PMPEDK.js} +55 -55
  374. package/dist/{webhooks-cli-CvPAdGDn.js → webhooks-cli-C32h-6dI.js} +21 -18
  375. package/dist/{whatsapp-actions-DSjBUB00.js → whatsapp-actions-BZRxKavO.js} +31 -28
  376. package/dist/{whatsapp-actions-nZnQ4BwK.js → whatsapp-actions-DmKZmCkz.js} +21 -21
  377. package/dist/{widearea-dns-Blh7W-0q.js → widearea-dns-9PZLZ6zk.js} +1 -1
  378. package/dist/{with-timeout-BVwCWUvY.js → with-timeout-DKgjtZv2.js} +6 -43
  379. package/dist/{workspace-BC5WA0Th.js → workspace-CPNwHoy5.js} +20 -20
  380. package/dist/{workspace-BrC46nbq.js → workspace-CedZZfvJ.js} +5 -5
  381. package/dist/{workspace-dirs-Cb43onAl.js → workspace-dirs-BgwJ2Axm.js} +1 -1
  382. package/dist/{ws-ChEZbUss.js → ws-BwH2d97O.js} +2 -2
  383. package/docs/es/concepts/sessions.md +1 -1
  384. package/docs/pt-BR/concepts/sessions.md +1 -1
  385. package/extensions/acpx/package.json +1 -1
  386. package/extensions/bluebubbles/package.json +1 -1
  387. package/extensions/ci-fix-loop/package.json +1 -1
  388. package/extensions/continuous-learning/package.json +1 -1
  389. package/extensions/copilot-proxy/package.json +1 -1
  390. package/extensions/diagnostics-otel/package.json +1 -1
  391. package/extensions/diffs/package.json +1 -1
  392. package/extensions/discord/package.json +1 -1
  393. package/extensions/feishu/package.json +1 -1
  394. package/extensions/flow/package.json +1 -1
  395. package/extensions/google-antigravity-auth/package.json +1 -1
  396. package/extensions/google-gemini-cli-auth/package.json +1 -1
  397. package/extensions/googlechat/node_modules/.bin/openclaw +2 -2
  398. package/extensions/googlechat/package.json +2 -2
  399. package/extensions/imessage/package.json +1 -1
  400. package/extensions/irc/package.json +1 -1
  401. package/extensions/line/package.json +1 -1
  402. package/extensions/llm-task/package.json +1 -1
  403. package/extensions/lobster/package.json +1 -1
  404. package/extensions/matrix/CHANGELOG.md +10 -0
  405. package/extensions/matrix/package.json +1 -1
  406. package/extensions/mattermost/package.json +1 -1
  407. package/extensions/memory-core/node_modules/.bin/openclaw +2 -2
  408. package/extensions/memory-core/package.json +2 -2
  409. package/extensions/memory-lancedb/package.json +1 -1
  410. package/extensions/minimax-portal-auth/package.json +1 -1
  411. package/extensions/msteams/CHANGELOG.md +10 -0
  412. package/extensions/msteams/package.json +1 -1
  413. package/extensions/nextcloud-talk/package.json +1 -1
  414. package/extensions/nostr/CHANGELOG.md +10 -0
  415. package/extensions/nostr/package.json +1 -1
  416. package/extensions/open-prose/package.json +1 -1
  417. package/extensions/self-improvement/package.json +1 -1
  418. package/extensions/signal/package.json +1 -1
  419. package/extensions/slack/package.json +1 -1
  420. package/extensions/synology-chat/package.json +1 -1
  421. package/extensions/telegram/package.json +1 -1
  422. package/extensions/tlon/package.json +1 -1
  423. package/extensions/twitch/CHANGELOG.md +10 -0
  424. package/extensions/twitch/package.json +1 -1
  425. package/extensions/voice-call/CHANGELOG.md +10 -0
  426. package/extensions/voice-call/package.json +1 -1
  427. package/extensions/whatsapp/package.json +1 -1
  428. package/extensions/zalo/CHANGELOG.md +10 -0
  429. package/extensions/zalo/package.json +1 -1
  430. package/extensions/zalouser/CHANGELOG.md +10 -0
  431. package/extensions/zalouser/package.json +1 -1
  432. package/package.json +3 -2
  433. package/dist/audio-preflight-Bk3KZQei.js +0 -98
  434. package/dist/clawbot-cli-DpO-ZwmI.js +0 -32
  435. package/dist/cli-1p9b3pE_.js +0 -155
  436. package/dist/deliver-runtime-CESEQ4NM.js +0 -59
  437. package/dist/deliver-runtime-G0G5orrZ.js +0 -36
  438. package/dist/deps-send-discord.runtime-BM3uHet5.js +0 -26
  439. package/dist/deps-send-discord.runtime-dTfY4NLn.js +0 -34
  440. package/dist/deps-send-imessage.runtime-CBlUhUeN.js +0 -25
  441. package/dist/deps-send-imessage.runtime-Cm_XDGKz.js +0 -33
  442. package/dist/deps-send-signal.runtime-9WH9ir2Z.js +0 -32
  443. package/dist/deps-send-signal.runtime-DnH0lazO.js +0 -24
  444. package/dist/deps-send-slack.runtime-Cx_x379p.js +0 -30
  445. package/dist/deps-send-slack.runtime-Dmq0lsvR.js +0 -22
  446. package/dist/deps-send-telegram.runtime-33sbp3Ol.js +0 -27
  447. package/dist/deps-send-telegram.runtime-BFHbiOeI.js +0 -36
  448. package/dist/deps-send-whatsapp.runtime-8bLqjmui.js +0 -60
  449. package/dist/deps-send-whatsapp.runtime-BeJLvpI1.js +0 -117
  450. package/dist/image-runtime-Bq51vNRb.js +0 -53
  451. package/dist/image-runtime-xqxW2PQA.js +0 -29
  452. package/dist/manager-runtime-20Upetpf.js +0 -18
  453. package/dist/manager-runtime-D2MqM9iK.js +0 -24
  454. package/dist/node-commands-DYz_oQFz.js +0 -12
  455. package/dist/pi-model-discovery-runtime-BcJAGnf4.js +0 -11
  456. package/dist/pi-model-discovery-runtime-IFYIuVfT.js +0 -17
  457. package/dist/register.configure-a0uTvfCu.js +0 -166
  458. package/dist/runtime-whatsapp-login.runtime-BcbYtLph.js +0 -13
  459. package/dist/runtime-whatsapp-login.runtime-CQLsSWjA.js +0 -20
  460. package/dist/runtime-whatsapp-outbound.runtime-DoZi3gnM.js +0 -40
  461. package/dist/runtime-whatsapp-outbound.runtime-MIKcURpN.js +0 -22
  462. package/dist/slash-commands.runtime-2kptrdDi.js +0 -16
  463. package/dist/slash-commands.runtime-Ckcj6TnD.js +0 -25
  464. package/dist/slash-dispatch.runtime-B5ykjP8B.js +0 -112
  465. package/dist/slash-dispatch.runtime-DLP2IeNv.js +0 -56
  466. package/dist/slash-skill-commands.runtime-6jUbSMOW.js +0 -20
  467. package/dist/slash-skill-commands.runtime-DbzbD-ZQ.js +0 -31
  468. package/dist/subagent-registry-runtime-Bjh1H1uK.js +0 -112
  469. package/dist/subagent-registry-runtime-COKZwsHd.js +0 -56
  470. package/dist/tui-cli-C9UujwTv.js +0 -86
  471. package/dist/web-C14E8nHS.js +0 -116
  472. /package/dist/{allow-from-Do0aB7F6.js → allow-from-D5r7UcQr.js} +0 -0
  473. /package/dist/{boolean-DtWR5bt3.js → boolean-ydSOedIP.js} +0 -0
  474. /package/dist/{brew-sUdeII-D.js → brew-Djs-Lc5s.js} +0 -0
  475. /package/dist/{chat-envelope-CrWMMV_a.js → chat-envelope-DVKDDTSu.js} +0 -0
  476. /package/dist/{cli-utils-DK6017OO.js → cli-utils-CCaEbxAz.js} +0 -0
  477. /package/dist/{command-format-CLEQe4bk.js → command-format-MESnUO9S.js} +0 -0
  478. /package/dist/{command-options-j8s8APBQ.js → command-options-ZvhOayEd.js} +0 -0
  479. /package/dist/{command-poll-backoff-Cse56OCv.js → command-poll-backoff-Dal4OaUV.js} +0 -0
  480. /package/dist/{constants-BgSj-mRP.js → constants-CkIxhEvX.js} +0 -0
  481. /package/dist/{context-window-guard-BgcfPYTd.js → context-window-guard-BUJ2pfYi.js} +0 -0
  482. /package/dist/{daemon-runtime-VfkpXuRu.js → daemon-runtime-CbyS9Xgu.js} +0 -0
  483. /package/dist/{dangerous-name-matching-BAJAZtyB.js → dangerous-name-matching-PRkNIyQj.js} +0 -0
  484. /package/dist/{dangerous-tools-DjOwyW3J.js → dangerous-tools-B9LIt3MU.js} +0 -0
  485. /package/dist/{entry-status-DVwZos2N.js → entry-status-4cDL0OcK.js} +0 -0
  486. /package/dist/{fetch-timeout-BL0dTnkh.js → fetch-timeout-EpWPz-Eu.js} +0 -0
  487. /package/dist/{format-C-890_pY.js → format-DVLB9DNB.js} +0 -0
  488. /package/dist/{format-duration-BvkrOKhT.js → format-duration-CrBESKOT.js} +0 -0
  489. /package/dist/{format-relative-8cNYQsqb.js → format-relative-BsYuWm-Q.js} +0 -0
  490. /package/dist/{health-format-CqfOHMzL.js → health-format-BIotQmMH.js} +0 -0
  491. /package/dist/{heartbeat-visibility-_K4bnQDH.js → heartbeat-visibility-C_P1yurK.js} +0 -0
  492. /package/dist/{help-format-ncfKj8zq.js → help-format-Ce4Xueed.js} +0 -0
  493. /package/dist/{helpers-5EH85AYF.js → helpers-CpIyUra4.js} +0 -0
  494. /package/dist/{input-provenance-ByYWugDu.js → input-provenance-qgaZGYuK.js} +0 -0
  495. /package/dist/{json-files-UKlMS7yU.js → json-files-BH1UBATr.js} +0 -0
  496. /package/dist/{kill-tree-CeEi7v61.js → kill-tree-W9BwtYuE.js} +0 -0
  497. /package/dist/{legacy-names-D3aIn6ij.js → legacy-names-DV-6rguu.js} +0 -0
  498. /package/dist/{load-options-CLMiD1a9.js → load-options-BuY2PXsl.js} +0 -0
  499. /package/dist/{logging-DRwtiLIS.js → logging-kuFzZMsG.js} +0 -0
  500. /package/dist/{model-param-b-NJsgH2EF.js → model-param-b-4PN786ZX.js} +0 -0
  501. /package/dist/{mutable-allowlist-detectors-DiZDtmlZ.js → mutable-allowlist-detectors-TCG6mnbz.js} +0 -0
  502. /package/dist/{node-resolve-C8bjtxQk.js → node-resolve-DSu0lzHd.js} +0 -0
  503. /package/dist/{onboard-config-DFLATNN1.js → onboard-config-YMJ1PLAF.js} +0 -0
  504. /package/dist/{onboard-provider-auth-flags-CpVNpwzI.js → onboard-provider-auth-flags-DHzbi9kj.js} +0 -0
  505. /package/dist/{openclaw-root-BFfBQ6FD.js → openclaw-root-T5G2ldGE.js} +0 -0
  506. /package/dist/{parse-log-line-DxFrnzNo.js → parse-log-line-BrrE4onI.js} +0 -0
  507. /package/dist/{parse-port-CboE2EQm.js → parse-port-DjjWDROB.js} +0 -0
  508. /package/dist/{parse-timeout-uTDpUWKR.js → parse-timeout-BS3EWcf6.js} +0 -0
  509. /package/dist/{polls-D86s6oEI.js → polls-QrTzhQf5.js} +0 -0
  510. /package/dist/{program-context-DQD9Uf8U.js → program-context-BqyLhTGk.js} +0 -0
  511. /package/dist/{prompt-style-C1jf_-k5.js → prompt-style-DB_OyH4q.js} +0 -0
  512. /package/dist/{prompts-GoDC3iAV.js → prompts-DomsZukd.js} +0 -0
  513. /package/dist/{provider-env-vars-D3-Jf8PX.js → provider-env-vars-DYZiYet-.js} +0 -0
  514. /package/dist/{proxy-BNFyBgvu.js → proxy-CUsDSClP.js} +0 -0
  515. /package/dist/{redact-BsCSVGmT.js → redact-B1GVGbib.js} +0 -0
  516. /package/dist/{render-scQFEkLe.js → render-CUAKPmvZ.js} +0 -0
  517. /package/dist/{run-with-concurrency-CzLnwXXV.js → run-with-concurrency-CLARJMM7.js} +0 -0
  518. /package/dist/{runtime-status-CL_bKfj_.js → runtime-status-Fmu5gNYW.js} +0 -0
  519. /package/dist/{secret-equal-DxKrAcRs.js → secret-equal-BN0idTaZ.js} +0 -0
  520. /package/dist/{secure-random-CruxVpoI.js → secure-random-B2UrD2xa.js} +0 -0
  521. /package/dist/{session-key-k6urs9r-.js → session-key-CC77ya0a.js} +0 -0
  522. /package/dist/{stagger-DW-U0kcV.js → stagger-Cek4Eizw.js} +0 -0
  523. /package/dist/{targets-CwCifSLG.js → targets-CD5AQXRB.js} +0 -0
  524. /package/dist/{targets-xSi-e-_L.js → targets-DPUt073v.js} +0 -0
  525. /package/dist/{text-format-CFm4X8Ze.js → text-format-DarxU3JH.js} +0 -0
  526. /package/dist/{thinking-RV_E8HFV.js → thinking-C0gzzPsv.js} +0 -0
  527. /package/dist/{timeouts-G9Yto-nj.js → timeouts-DEnpCqGd.js} +0 -0
  528. /package/dist/{tool-catalog-omkiks3D.js → tool-catalog-3w4XiWhy.js} +0 -0
  529. /package/dist/{transcript-events-CtWhopMu.js → transcript-events-CdWLIofg.js} +0 -0
  530. /package/dist/{usage-format-BMWvYDjj.js → usage-format-zuuFSdkg.js} +0 -0
  531. /package/dist/{utils-cwpAMi-t.js → utils-BnC3HGtm.js} +0 -0
  532. /package/dist/{version-DdJhsIqk.js → version-DT-JIO28.js} +0 -0
  533. /package/dist/{windows-spawn-CsdZOQMr.js → windows-spawn-CVnPunjY.js} +0 -0
  534. /package/dist/{wsl-Cx5T6MYb.js → wsl-DLw4LET-.js} +0 -0
@@ -0,0 +1,701 @@
1
+ import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
2
+ import { g as resolveStateDir, h as resolveOAuthPath } from "./paths-BMo6kTge.js";
3
+ import { t as createSubsystemLogger } from "./subsystem-C6poMade.js";
4
+ import { t as DEFAULT_AGENT_ID } from "./session-key-CC77ya0a.js";
5
+ import { v as resolveUserPath } from "./utils-BnC3HGtm.js";
6
+ import { n as saveJsonFile, t as loadJsonFile } from "./json-file-CNp4GTiH.js";
7
+ import { execFileSync } from "node:child_process";
8
+ import path from "node:path";
9
+ import fs from "node:fs";
10
+ import fs$1 from "node:fs/promises";
11
+ import { createHash } from "node:crypto";
12
+
13
+ //#region src/agents/auth-profiles/constants.ts
14
+ const AUTH_STORE_VERSION = 1;
15
+ const AUTH_PROFILE_FILENAME = "auth-profiles.json";
16
+ const LEGACY_AUTH_FILENAME = "auth.json";
17
+ const CLAUDE_CLI_PROFILE_ID = "anthropic:claude-cli";
18
+ const CODEX_CLI_PROFILE_ID = "openai-codex:codex-cli";
19
+ const QWEN_CLI_PROFILE_ID = "qwen-portal:qwen-cli";
20
+ const MINIMAX_CLI_PROFILE_ID = "minimax-portal:minimax-cli";
21
+ const AUTH_STORE_LOCK_OPTIONS = {
22
+ retries: {
23
+ retries: 10,
24
+ factor: 2,
25
+ minTimeout: 100,
26
+ maxTimeout: 1e4,
27
+ randomize: true
28
+ },
29
+ stale: 3e4
30
+ };
31
+ const EXTERNAL_CLI_SYNC_TTL_MS = 900 * 1e3;
32
+ const EXTERNAL_CLI_NEAR_EXPIRY_MS = 600 * 1e3;
33
+ const log$1 = createSubsystemLogger("agents/auth-profiles");
34
+
35
+ //#endregion
36
+ //#region src/shared/pid-alive.ts
37
+ function isValidPid(pid) {
38
+ return Number.isInteger(pid) && pid > 0;
39
+ }
40
+ /**
41
+ * Check if a process is a zombie on Linux by reading /proc/<pid>/status.
42
+ * Returns false on non-Linux platforms or if the proc file can't be read.
43
+ */
44
+ function isZombieProcess(pid) {
45
+ if (process.platform !== "linux") return false;
46
+ try {
47
+ return fs.readFileSync(`/proc/${pid}/status`, "utf8").match(/^State:\s+(\S)/m)?.[1] === "Z";
48
+ } catch {
49
+ return false;
50
+ }
51
+ }
52
+ function isPidAlive(pid) {
53
+ if (!isValidPid(pid)) return false;
54
+ try {
55
+ process.kill(pid, 0);
56
+ } catch {
57
+ return false;
58
+ }
59
+ if (isZombieProcess(pid)) return false;
60
+ return true;
61
+ }
62
+ /**
63
+ * Read the process start time (field 22 "starttime") from /proc/<pid>/stat.
64
+ * Returns the value in clock ticks since system boot, or null on non-Linux
65
+ * platforms or if the proc file can't be read.
66
+ *
67
+ * This is used to detect PID recycling: if two readings for the same PID
68
+ * return different starttimes, the PID has been reused by a different process.
69
+ */
70
+ function getProcessStartTime(pid) {
71
+ if (process.platform !== "linux") return null;
72
+ if (!isValidPid(pid)) return null;
73
+ try {
74
+ const stat = fs.readFileSync(`/proc/${pid}/stat`, "utf8");
75
+ const commEndIndex = stat.lastIndexOf(")");
76
+ if (commEndIndex < 0) return null;
77
+ const fields = stat.slice(commEndIndex + 1).trimStart().split(/\s+/);
78
+ const starttime = Number(fields[19]);
79
+ return Number.isInteger(starttime) && starttime >= 0 ? starttime : null;
80
+ } catch {
81
+ return null;
82
+ }
83
+ }
84
+
85
+ //#endregion
86
+ //#region src/shared/process-scoped-map.ts
87
+ function resolveProcessScopedMap(key) {
88
+ const proc = process;
89
+ const existing = proc[key];
90
+ if (existing) return existing;
91
+ const created = /* @__PURE__ */ new Map();
92
+ proc[key] = created;
93
+ return created;
94
+ }
95
+
96
+ //#endregion
97
+ //#region src/plugin-sdk/file-lock.ts
98
+ const HELD_LOCKS = resolveProcessScopedMap(Symbol.for("openclaw.fileLockHeldLocks"));
99
+ function computeDelayMs(retries, attempt) {
100
+ const base = Math.min(retries.maxTimeout, Math.max(retries.minTimeout, retries.minTimeout * retries.factor ** attempt));
101
+ const jitter = retries.randomize ? 1 + Math.random() : 1;
102
+ return Math.min(retries.maxTimeout, Math.round(base * jitter));
103
+ }
104
+ async function readLockPayload(lockPath) {
105
+ try {
106
+ const raw = await fs$1.readFile(lockPath, "utf8");
107
+ const parsed = JSON.parse(raw);
108
+ if (typeof parsed.pid !== "number" || typeof parsed.createdAt !== "string") return null;
109
+ return {
110
+ pid: parsed.pid,
111
+ createdAt: parsed.createdAt
112
+ };
113
+ } catch {
114
+ return null;
115
+ }
116
+ }
117
+ async function resolveNormalizedFilePath(filePath) {
118
+ const resolved = path.resolve(filePath);
119
+ const dir = path.dirname(resolved);
120
+ await fs$1.mkdir(dir, { recursive: true });
121
+ try {
122
+ const realDir = await fs$1.realpath(dir);
123
+ return path.join(realDir, path.basename(resolved));
124
+ } catch {
125
+ return resolved;
126
+ }
127
+ }
128
+ async function isStaleLock(lockPath, staleMs) {
129
+ const payload = await readLockPayload(lockPath);
130
+ if (payload?.pid && !isPidAlive(payload.pid)) return true;
131
+ if (payload?.createdAt) {
132
+ const createdAt = Date.parse(payload.createdAt);
133
+ if (!Number.isFinite(createdAt) || Date.now() - createdAt > staleMs) return true;
134
+ }
135
+ try {
136
+ const stat = await fs$1.stat(lockPath);
137
+ return Date.now() - stat.mtimeMs > staleMs;
138
+ } catch {
139
+ return true;
140
+ }
141
+ }
142
+ async function releaseHeldLock(normalizedFile) {
143
+ const current = HELD_LOCKS.get(normalizedFile);
144
+ if (!current) return;
145
+ current.count -= 1;
146
+ if (current.count > 0) return;
147
+ HELD_LOCKS.delete(normalizedFile);
148
+ await current.handle.close().catch(() => void 0);
149
+ await fs$1.rm(current.lockPath, { force: true }).catch(() => void 0);
150
+ }
151
+ async function acquireFileLock(filePath, options) {
152
+ const normalizedFile = await resolveNormalizedFilePath(filePath);
153
+ const lockPath = `${normalizedFile}.lock`;
154
+ const held = HELD_LOCKS.get(normalizedFile);
155
+ if (held) {
156
+ held.count += 1;
157
+ return {
158
+ lockPath,
159
+ release: () => releaseHeldLock(normalizedFile)
160
+ };
161
+ }
162
+ const attempts = Math.max(1, options.retries.retries + 1);
163
+ for (let attempt = 0; attempt < attempts; attempt += 1) try {
164
+ const handle = await fs$1.open(lockPath, "wx");
165
+ await handle.writeFile(JSON.stringify({
166
+ pid: process.pid,
167
+ createdAt: (/* @__PURE__ */ new Date()).toISOString()
168
+ }, null, 2), "utf8");
169
+ HELD_LOCKS.set(normalizedFile, {
170
+ count: 1,
171
+ handle,
172
+ lockPath
173
+ });
174
+ return {
175
+ lockPath,
176
+ release: () => releaseHeldLock(normalizedFile)
177
+ };
178
+ } catch (err) {
179
+ if (err.code !== "EEXIST") throw err;
180
+ if (await isStaleLock(lockPath, options.stale)) {
181
+ await fs$1.rm(lockPath, { force: true }).catch(() => void 0);
182
+ continue;
183
+ }
184
+ if (attempt >= attempts - 1) break;
185
+ await new Promise((resolve) => setTimeout(resolve, computeDelayMs(options.retries, attempt)));
186
+ }
187
+ throw new Error(`file lock timeout for ${normalizedFile}`);
188
+ }
189
+ async function withFileLock(filePath, options, fn) {
190
+ const lock = await acquireFileLock(filePath, options);
191
+ try {
192
+ return await fn();
193
+ } finally {
194
+ await lock.release();
195
+ }
196
+ }
197
+
198
+ //#endregion
199
+ //#region src/agents/cli-credentials.ts
200
+ const log = createSubsystemLogger("agents/auth-profiles");
201
+ const QWEN_CLI_CREDENTIALS_RELATIVE_PATH = ".qwen/oauth_creds.json";
202
+ const MINIMAX_CLI_CREDENTIALS_RELATIVE_PATH = ".minimax/oauth_creds.json";
203
+ let qwenCliCache = null;
204
+ let minimaxCliCache = null;
205
+ function resolveQwenCliCredentialsPath(homeDir) {
206
+ const baseDir = homeDir ?? resolveUserPath("~");
207
+ return path.join(baseDir, QWEN_CLI_CREDENTIALS_RELATIVE_PATH);
208
+ }
209
+ function resolveMiniMaxCliCredentialsPath(homeDir) {
210
+ const baseDir = homeDir ?? resolveUserPath("~");
211
+ return path.join(baseDir, MINIMAX_CLI_CREDENTIALS_RELATIVE_PATH);
212
+ }
213
+ function readQwenCliCredentials(options) {
214
+ return readPortalCliOauthCredentials(resolveQwenCliCredentialsPath(options?.homeDir), "qwen-portal");
215
+ }
216
+ function readPortalCliOauthCredentials(credPath, provider) {
217
+ const raw = loadJsonFile(credPath);
218
+ if (!raw || typeof raw !== "object") return null;
219
+ const data = raw;
220
+ const accessToken = data.access_token;
221
+ const refreshToken = data.refresh_token;
222
+ const expiresAt = data.expiry_date;
223
+ if (typeof accessToken !== "string" || !accessToken) return null;
224
+ if (typeof refreshToken !== "string" || !refreshToken) return null;
225
+ if (typeof expiresAt !== "number" || !Number.isFinite(expiresAt)) return null;
226
+ return {
227
+ type: "oauth",
228
+ provider,
229
+ access: accessToken,
230
+ refresh: refreshToken,
231
+ expires: expiresAt
232
+ };
233
+ }
234
+ function readMiniMaxCliCredentials(options) {
235
+ return readPortalCliOauthCredentials(resolveMiniMaxCliCredentialsPath(options?.homeDir), "minimax-portal");
236
+ }
237
+ function readQwenCliCredentialsCached(options) {
238
+ const ttlMs = options?.ttlMs ?? 0;
239
+ const now = Date.now();
240
+ const cacheKey = resolveQwenCliCredentialsPath(options?.homeDir);
241
+ if (ttlMs > 0 && qwenCliCache && qwenCliCache.cacheKey === cacheKey && now - qwenCliCache.readAt < ttlMs) return qwenCliCache.value;
242
+ const value = readQwenCliCredentials({ homeDir: options?.homeDir });
243
+ if (ttlMs > 0) qwenCliCache = {
244
+ value,
245
+ readAt: now,
246
+ cacheKey
247
+ };
248
+ return value;
249
+ }
250
+ function readMiniMaxCliCredentialsCached(options) {
251
+ const ttlMs = options?.ttlMs ?? 0;
252
+ const now = Date.now();
253
+ const cacheKey = resolveMiniMaxCliCredentialsPath(options?.homeDir);
254
+ if (ttlMs > 0 && minimaxCliCache && minimaxCliCache.cacheKey === cacheKey && now - minimaxCliCache.readAt < ttlMs) return minimaxCliCache.value;
255
+ const value = readMiniMaxCliCredentials({ homeDir: options?.homeDir });
256
+ if (ttlMs > 0) minimaxCliCache = {
257
+ value,
258
+ readAt: now,
259
+ cacheKey
260
+ };
261
+ return value;
262
+ }
263
+
264
+ //#endregion
265
+ //#region src/agents/auth-profiles/external-cli-sync.ts
266
+ function shallowEqualOAuthCredentials(a, b) {
267
+ if (!a) return false;
268
+ if (a.type !== "oauth") return false;
269
+ return a.provider === b.provider && a.access === b.access && a.refresh === b.refresh && a.expires === b.expires && a.email === b.email && a.enterpriseUrl === b.enterpriseUrl && a.projectId === b.projectId && a.accountId === b.accountId;
270
+ }
271
+ function isExternalProfileFresh(cred, now) {
272
+ if (!cred) return false;
273
+ if (cred.type !== "oauth" && cred.type !== "token") return false;
274
+ if (cred.provider !== "qwen-portal" && cred.provider !== "minimax-portal") return false;
275
+ if (typeof cred.expires !== "number") return true;
276
+ return cred.expires > now + EXTERNAL_CLI_NEAR_EXPIRY_MS;
277
+ }
278
+ /** Sync external CLI credentials into the store for a given provider. */
279
+ function syncExternalCliCredentialsForProvider(store, profileId, provider, readCredentials, now) {
280
+ const existing = store.profiles[profileId];
281
+ const creds = !existing || existing.provider !== provider || !isExternalProfileFresh(existing, now) ? readCredentials() : null;
282
+ if (!creds) return false;
283
+ const existingOAuth = existing?.type === "oauth" ? existing : void 0;
284
+ if ((!existingOAuth || existingOAuth.provider !== provider || existingOAuth.expires <= now || creds.expires > existingOAuth.expires) && !shallowEqualOAuthCredentials(existingOAuth, creds)) {
285
+ store.profiles[profileId] = creds;
286
+ log$1.info(`synced ${provider} credentials from external cli`, {
287
+ profileId,
288
+ expires: new Date(creds.expires).toISOString()
289
+ });
290
+ return true;
291
+ }
292
+ return false;
293
+ }
294
+ /**
295
+ * Sync OAuth credentials from external CLI tools (Qwen Code CLI, MiniMax CLI) into the store.
296
+ *
297
+ * Returns true if any credentials were updated.
298
+ */
299
+ function syncExternalCliCredentials(store) {
300
+ let mutated = false;
301
+ const now = Date.now();
302
+ const existingQwen = store.profiles[QWEN_CLI_PROFILE_ID];
303
+ const qwenCreds = !existingQwen || existingQwen.provider !== "qwen-portal" || !isExternalProfileFresh(existingQwen, now) ? readQwenCliCredentialsCached({ ttlMs: EXTERNAL_CLI_SYNC_TTL_MS }) : null;
304
+ if (qwenCreds) {
305
+ const existing = store.profiles[QWEN_CLI_PROFILE_ID];
306
+ const existingOAuth = existing?.type === "oauth" ? existing : void 0;
307
+ if ((!existingOAuth || existingOAuth.provider !== "qwen-portal" || existingOAuth.expires <= now || qwenCreds.expires > existingOAuth.expires) && !shallowEqualOAuthCredentials(existingOAuth, qwenCreds)) {
308
+ store.profiles[QWEN_CLI_PROFILE_ID] = qwenCreds;
309
+ mutated = true;
310
+ log$1.info("synced qwen credentials from qwen cli", {
311
+ profileId: QWEN_CLI_PROFILE_ID,
312
+ expires: new Date(qwenCreds.expires).toISOString()
313
+ });
314
+ }
315
+ }
316
+ if (syncExternalCliCredentialsForProvider(store, MINIMAX_CLI_PROFILE_ID, "minimax-portal", () => readMiniMaxCliCredentialsCached({ ttlMs: EXTERNAL_CLI_SYNC_TTL_MS }), now)) mutated = true;
317
+ return mutated;
318
+ }
319
+
320
+ //#endregion
321
+ //#region src/agents/agent-paths.ts
322
+ function resolveOpenClawAgentDir() {
323
+ const override = process.env.OPENCLAW_AGENT_DIR?.trim() || process.env.PI_CODING_AGENT_DIR?.trim();
324
+ if (override) return resolveUserPath(override);
325
+ return resolveUserPath(path.join(resolveStateDir(), "agents", DEFAULT_AGENT_ID, "agent"));
326
+ }
327
+
328
+ //#endregion
329
+ //#region src/agents/auth-profiles/paths.ts
330
+ function resolveAuthStorePath(agentDir) {
331
+ const resolved = resolveUserPath(agentDir ?? resolveOpenClawAgentDir());
332
+ return path.join(resolved, AUTH_PROFILE_FILENAME);
333
+ }
334
+ function resolveLegacyAuthStorePath(agentDir) {
335
+ const resolved = resolveUserPath(agentDir ?? resolveOpenClawAgentDir());
336
+ return path.join(resolved, LEGACY_AUTH_FILENAME);
337
+ }
338
+ function resolveAuthStorePathForDisplay(agentDir) {
339
+ const pathname = resolveAuthStorePath(agentDir);
340
+ return pathname.startsWith("~") ? pathname : resolveUserPath(pathname);
341
+ }
342
+ function ensureAuthStoreFile(pathname) {
343
+ if (fs.existsSync(pathname)) return;
344
+ saveJsonFile(pathname, {
345
+ version: AUTH_STORE_VERSION,
346
+ profiles: {}
347
+ });
348
+ }
349
+
350
+ //#endregion
351
+ //#region src/agents/auth-profiles/store.ts
352
+ var store_exports = /* @__PURE__ */ __exportAll({
353
+ clearRuntimeAuthProfileStoreSnapshots: () => clearRuntimeAuthProfileStoreSnapshots,
354
+ ensureAuthProfileStore: () => ensureAuthProfileStore,
355
+ loadAuthProfileStore: () => loadAuthProfileStore,
356
+ loadAuthProfileStoreForRuntime: () => loadAuthProfileStoreForRuntime,
357
+ loadAuthProfileStoreForSecretsRuntime: () => loadAuthProfileStoreForSecretsRuntime,
358
+ replaceRuntimeAuthProfileStoreSnapshots: () => replaceRuntimeAuthProfileStoreSnapshots,
359
+ saveAuthProfileStore: () => saveAuthProfileStore,
360
+ updateAuthProfileStoreWithLock: () => updateAuthProfileStoreWithLock
361
+ });
362
+ const AUTH_PROFILE_TYPES = new Set([
363
+ "api_key",
364
+ "oauth",
365
+ "token"
366
+ ]);
367
+ const runtimeAuthStoreSnapshots = /* @__PURE__ */ new Map();
368
+ function resolveRuntimeStoreKey(agentDir) {
369
+ return resolveAuthStorePath(agentDir);
370
+ }
371
+ function cloneAuthProfileStore(store) {
372
+ return structuredClone(store);
373
+ }
374
+ function resolveRuntimeAuthProfileStore(agentDir) {
375
+ if (runtimeAuthStoreSnapshots.size === 0) return null;
376
+ const mainKey = resolveRuntimeStoreKey(void 0);
377
+ const requestedKey = resolveRuntimeStoreKey(agentDir);
378
+ const mainStore = runtimeAuthStoreSnapshots.get(mainKey);
379
+ const requestedStore = runtimeAuthStoreSnapshots.get(requestedKey);
380
+ if (!agentDir || requestedKey === mainKey) {
381
+ if (!mainStore) return null;
382
+ return cloneAuthProfileStore(mainStore);
383
+ }
384
+ if (mainStore && requestedStore) return mergeAuthProfileStores(cloneAuthProfileStore(mainStore), cloneAuthProfileStore(requestedStore));
385
+ if (requestedStore) return cloneAuthProfileStore(requestedStore);
386
+ if (mainStore) return cloneAuthProfileStore(mainStore);
387
+ return null;
388
+ }
389
+ function replaceRuntimeAuthProfileStoreSnapshots(entries) {
390
+ runtimeAuthStoreSnapshots.clear();
391
+ for (const entry of entries) runtimeAuthStoreSnapshots.set(resolveRuntimeStoreKey(entry.agentDir), cloneAuthProfileStore(entry.store));
392
+ }
393
+ function clearRuntimeAuthProfileStoreSnapshots() {
394
+ runtimeAuthStoreSnapshots.clear();
395
+ }
396
+ async function updateAuthProfileStoreWithLock(params) {
397
+ const authPath = resolveAuthStorePath(params.agentDir);
398
+ ensureAuthStoreFile(authPath);
399
+ try {
400
+ return await withFileLock(authPath, AUTH_STORE_LOCK_OPTIONS, async () => {
401
+ const store = ensureAuthProfileStore(params.agentDir);
402
+ if (params.updater(store)) saveAuthProfileStore(store, params.agentDir);
403
+ return store;
404
+ });
405
+ } catch {
406
+ return null;
407
+ }
408
+ }
409
+ /**
410
+ * Normalise a raw auth-profiles.json credential entry.
411
+ *
412
+ * The official format uses `type` and (for api_key credentials) `key`.
413
+ * A common mistake — caused by the similarity with the `openclaw.json`
414
+ * `auth.profiles` section which uses `mode` — is to write `mode` instead of
415
+ * `type` and `apiKey` instead of `key`. Accept both spellings so users don't
416
+ * silently lose their credentials.
417
+ */
418
+ function normalizeRawCredentialEntry(raw) {
419
+ const entry = { ...raw };
420
+ if (!("type" in entry) && typeof entry["mode"] === "string") entry["type"] = entry["mode"];
421
+ if (!("key" in entry) && typeof entry["apiKey"] === "string") entry["key"] = entry["apiKey"];
422
+ return entry;
423
+ }
424
+ function parseCredentialEntry(raw, fallbackProvider) {
425
+ if (!raw || typeof raw !== "object") return {
426
+ ok: false,
427
+ reason: "non_object"
428
+ };
429
+ const typed = normalizeRawCredentialEntry(raw);
430
+ if (!AUTH_PROFILE_TYPES.has(typed.type)) return {
431
+ ok: false,
432
+ reason: "invalid_type"
433
+ };
434
+ const provider = typed.provider ?? fallbackProvider;
435
+ if (typeof provider !== "string" || provider.trim().length === 0) return {
436
+ ok: false,
437
+ reason: "missing_provider"
438
+ };
439
+ return {
440
+ ok: true,
441
+ credential: {
442
+ ...typed,
443
+ provider
444
+ }
445
+ };
446
+ }
447
+ function warnRejectedCredentialEntries(source, rejected) {
448
+ if (rejected.length === 0) return;
449
+ const reasons = rejected.reduce((acc, current) => {
450
+ acc[current.reason] = (acc[current.reason] ?? 0) + 1;
451
+ return acc;
452
+ }, {});
453
+ log$1.warn("ignored invalid auth profile entries during store load", {
454
+ source,
455
+ dropped: rejected.length,
456
+ reasons,
457
+ keys: rejected.slice(0, 10).map((entry) => entry.key)
458
+ });
459
+ }
460
+ function coerceLegacyStore(raw) {
461
+ if (!raw || typeof raw !== "object") return null;
462
+ const record = raw;
463
+ if ("profiles" in record) return null;
464
+ const entries = {};
465
+ const rejected = [];
466
+ for (const [key, value] of Object.entries(record)) {
467
+ const parsed = parseCredentialEntry(value, key);
468
+ if (!parsed.ok) {
469
+ rejected.push({
470
+ key,
471
+ reason: parsed.reason
472
+ });
473
+ continue;
474
+ }
475
+ entries[key] = parsed.credential;
476
+ }
477
+ warnRejectedCredentialEntries("auth.json", rejected);
478
+ return Object.keys(entries).length > 0 ? entries : null;
479
+ }
480
+ function coerceAuthStore(raw) {
481
+ if (!raw || typeof raw !== "object") return null;
482
+ const record = raw;
483
+ if (!record.profiles || typeof record.profiles !== "object") return null;
484
+ const profiles = record.profiles;
485
+ const normalized = {};
486
+ const rejected = [];
487
+ for (const [key, value] of Object.entries(profiles)) {
488
+ const parsed = parseCredentialEntry(value);
489
+ if (!parsed.ok) {
490
+ rejected.push({
491
+ key,
492
+ reason: parsed.reason
493
+ });
494
+ continue;
495
+ }
496
+ normalized[key] = parsed.credential;
497
+ }
498
+ warnRejectedCredentialEntries("auth-profiles.json", rejected);
499
+ const order = record.order && typeof record.order === "object" ? Object.entries(record.order).reduce((acc, [provider, value]) => {
500
+ if (!Array.isArray(value)) return acc;
501
+ const list = value.map((entry) => typeof entry === "string" ? entry.trim() : "").filter(Boolean);
502
+ if (list.length === 0) return acc;
503
+ acc[provider] = list;
504
+ return acc;
505
+ }, {}) : void 0;
506
+ return {
507
+ version: Number(record.version ?? AUTH_STORE_VERSION),
508
+ profiles: normalized,
509
+ order,
510
+ lastGood: record.lastGood && typeof record.lastGood === "object" ? record.lastGood : void 0,
511
+ usageStats: record.usageStats && typeof record.usageStats === "object" ? record.usageStats : void 0
512
+ };
513
+ }
514
+ function mergeRecord(base, override) {
515
+ if (!base && !override) return;
516
+ if (!base) return { ...override };
517
+ if (!override) return { ...base };
518
+ return {
519
+ ...base,
520
+ ...override
521
+ };
522
+ }
523
+ function mergeAuthProfileStores(base, override) {
524
+ if (Object.keys(override.profiles).length === 0 && !override.order && !override.lastGood && !override.usageStats) return base;
525
+ return {
526
+ version: Math.max(base.version, override.version ?? base.version),
527
+ profiles: {
528
+ ...base.profiles,
529
+ ...override.profiles
530
+ },
531
+ order: mergeRecord(base.order, override.order),
532
+ lastGood: mergeRecord(base.lastGood, override.lastGood),
533
+ usageStats: mergeRecord(base.usageStats, override.usageStats)
534
+ };
535
+ }
536
+ function mergeOAuthFileIntoStore(store) {
537
+ const oauthRaw = loadJsonFile(resolveOAuthPath());
538
+ if (!oauthRaw || typeof oauthRaw !== "object") return false;
539
+ const oauthEntries = oauthRaw;
540
+ let mutated = false;
541
+ for (const [provider, creds] of Object.entries(oauthEntries)) {
542
+ if (!creds || typeof creds !== "object") continue;
543
+ const profileId = `${provider}:default`;
544
+ if (store.profiles[profileId]) continue;
545
+ store.profiles[profileId] = {
546
+ type: "oauth",
547
+ provider,
548
+ ...creds
549
+ };
550
+ mutated = true;
551
+ }
552
+ return mutated;
553
+ }
554
+ function applyLegacyStore(store, legacy) {
555
+ for (const [provider, cred] of Object.entries(legacy)) {
556
+ const profileId = `${provider}:default`;
557
+ if (cred.type === "api_key") {
558
+ store.profiles[profileId] = {
559
+ type: "api_key",
560
+ provider: String(cred.provider ?? provider),
561
+ key: cred.key,
562
+ ...cred.email ? { email: cred.email } : {}
563
+ };
564
+ continue;
565
+ }
566
+ if (cred.type === "token") {
567
+ store.profiles[profileId] = {
568
+ type: "token",
569
+ provider: String(cred.provider ?? provider),
570
+ token: cred.token,
571
+ ...typeof cred.expires === "number" ? { expires: cred.expires } : {},
572
+ ...cred.email ? { email: cred.email } : {}
573
+ };
574
+ continue;
575
+ }
576
+ store.profiles[profileId] = {
577
+ type: "oauth",
578
+ provider: String(cred.provider ?? provider),
579
+ access: cred.access,
580
+ refresh: cred.refresh,
581
+ expires: cred.expires,
582
+ ...cred.enterpriseUrl ? { enterpriseUrl: cred.enterpriseUrl } : {},
583
+ ...cred.projectId ? { projectId: cred.projectId } : {},
584
+ ...cred.accountId ? { accountId: cred.accountId } : {},
585
+ ...cred.email ? { email: cred.email } : {}
586
+ };
587
+ }
588
+ }
589
+ function loadCoercedStore(authPath) {
590
+ return coerceAuthStore(loadJsonFile(authPath));
591
+ }
592
+ function loadAuthProfileStore() {
593
+ const authPath = resolveAuthStorePath();
594
+ const asStore = loadCoercedStore(authPath);
595
+ if (asStore) {
596
+ if (syncExternalCliCredentials(asStore)) saveJsonFile(authPath, asStore);
597
+ return asStore;
598
+ }
599
+ const legacy = coerceLegacyStore(loadJsonFile(resolveLegacyAuthStorePath()));
600
+ if (legacy) {
601
+ const store = {
602
+ version: AUTH_STORE_VERSION,
603
+ profiles: {}
604
+ };
605
+ applyLegacyStore(store, legacy);
606
+ syncExternalCliCredentials(store);
607
+ return store;
608
+ }
609
+ const store = {
610
+ version: AUTH_STORE_VERSION,
611
+ profiles: {}
612
+ };
613
+ syncExternalCliCredentials(store);
614
+ return store;
615
+ }
616
+ function loadAuthProfileStoreForAgent(agentDir, options) {
617
+ const readOnly = options?.readOnly === true;
618
+ const authPath = resolveAuthStorePath(agentDir);
619
+ const asStore = loadCoercedStore(authPath);
620
+ if (asStore) {
621
+ if (syncExternalCliCredentials(asStore) && !readOnly) saveJsonFile(authPath, asStore);
622
+ return asStore;
623
+ }
624
+ if (agentDir && !readOnly) {
625
+ const mainStore = coerceAuthStore(loadJsonFile(resolveAuthStorePath()));
626
+ if (mainStore && Object.keys(mainStore.profiles).length > 0) {
627
+ saveJsonFile(authPath, mainStore);
628
+ log$1.info("inherited auth-profiles from main agent", { agentDir });
629
+ return mainStore;
630
+ }
631
+ }
632
+ const legacy = coerceLegacyStore(loadJsonFile(resolveLegacyAuthStorePath(agentDir)));
633
+ const store = {
634
+ version: AUTH_STORE_VERSION,
635
+ profiles: {}
636
+ };
637
+ if (legacy) applyLegacyStore(store, legacy);
638
+ const mergedOAuth = mergeOAuthFileIntoStore(store);
639
+ const syncedCli = syncExternalCliCredentials(store);
640
+ const forceReadOnly = process.env.OPENCLAW_AUTH_STORE_READONLY === "1";
641
+ const shouldWrite = !readOnly && !forceReadOnly && (legacy !== null || mergedOAuth || syncedCli);
642
+ if (shouldWrite) saveJsonFile(authPath, store);
643
+ if (shouldWrite && legacy !== null) {
644
+ const legacyPath = resolveLegacyAuthStorePath(agentDir);
645
+ try {
646
+ fs.unlinkSync(legacyPath);
647
+ } catch (err) {
648
+ if (err?.code !== "ENOENT") log$1.warn("failed to delete legacy auth.json after migration", {
649
+ err,
650
+ legacyPath
651
+ });
652
+ }
653
+ }
654
+ return store;
655
+ }
656
+ function loadAuthProfileStoreForRuntime(agentDir, options) {
657
+ const store = loadAuthProfileStoreForAgent(agentDir, options);
658
+ const authPath = resolveAuthStorePath(agentDir);
659
+ const mainAuthPath = resolveAuthStorePath();
660
+ if (!agentDir || authPath === mainAuthPath) return store;
661
+ return mergeAuthProfileStores(loadAuthProfileStoreForAgent(void 0, options), store);
662
+ }
663
+ function loadAuthProfileStoreForSecretsRuntime(agentDir) {
664
+ return loadAuthProfileStoreForRuntime(agentDir, {
665
+ readOnly: true,
666
+ allowKeychainPrompt: false
667
+ });
668
+ }
669
+ function ensureAuthProfileStore(agentDir, options) {
670
+ const runtimeStore = resolveRuntimeAuthProfileStore(agentDir);
671
+ if (runtimeStore) return runtimeStore;
672
+ const store = loadAuthProfileStoreForAgent(agentDir, options);
673
+ const authPath = resolveAuthStorePath(agentDir);
674
+ const mainAuthPath = resolveAuthStorePath();
675
+ if (!agentDir || authPath === mainAuthPath) return store;
676
+ return mergeAuthProfileStores(loadAuthProfileStoreForAgent(void 0, options), store);
677
+ }
678
+ function saveAuthProfileStore(store, agentDir) {
679
+ saveJsonFile(resolveAuthStorePath(agentDir), {
680
+ version: AUTH_STORE_VERSION,
681
+ profiles: Object.fromEntries(Object.entries(store.profiles).map(([profileId, credential]) => {
682
+ if (credential.type === "api_key" && credential.keyRef && credential.key !== void 0) {
683
+ const sanitized = { ...credential };
684
+ delete sanitized.key;
685
+ return [profileId, sanitized];
686
+ }
687
+ if (credential.type === "token" && credential.tokenRef && credential.token !== void 0) {
688
+ const sanitized = { ...credential };
689
+ delete sanitized.token;
690
+ return [profileId, sanitized];
691
+ }
692
+ return [profileId, credential];
693
+ })),
694
+ order: store.order ?? void 0,
695
+ lastGood: store.lastGood ?? void 0,
696
+ usageStats: store.usageStats ?? void 0
697
+ });
698
+ }
699
+
700
+ //#endregion
701
+ export { AUTH_STORE_LOCK_OPTIONS as _, replaceRuntimeAuthProfileStoreSnapshots as a, CODEX_CLI_PROFILE_ID as b, updateAuthProfileStoreWithLock as c, resolveAuthStorePathForDisplay as d, resolveOpenClawAgentDir as f, isPidAlive as g, getProcessStartTime as h, loadAuthProfileStoreForSecretsRuntime as i, ensureAuthStoreFile as l, resolveProcessScopedMap as m, ensureAuthProfileStore as n, saveAuthProfileStore as o, withFileLock as p, loadAuthProfileStore as r, store_exports as s, clearRuntimeAuthProfileStoreSnapshots as t, resolveAuthStorePath as u, AUTH_STORE_VERSION as v, log$1 as x, CLAUDE_CLI_PROFILE_ID as y };
@@ -1,5 +1,5 @@
1
- import { h as resolveConfigDir } from "./utils-cwpAMi-t.js";
2
- import { c as detectMime, l as extensionForMime } from "./image-ops-DBPCaLYI.js";
1
+ import { h as resolveConfigDir } from "./utils-BnC3HGtm.js";
2
+ import { c as detectMime, l as extensionForMime } from "./image-ops-Bnk-bI_x.js";
3
3
  import path from "node:path";
4
4
  import { createWriteStream } from "node:fs";
5
5
  import fs$1 from "node:fs/promises";