@gguf/claw 2026.2.4 → 2026.2.5

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 (616) hide show
  1. package/CHANGELOG.md +50 -1
  2. package/LICENSE +1 -1
  3. package/README.md +50 -43
  4. package/dist/{accounts-BlHoTziG.js → accounts-BgZmhIm6.js} +4 -4
  5. package/dist/{accounts-B5QZU96b.js → accounts-Dto4p9zB.js} +2 -2
  6. package/dist/{acp-cli-DU_cVWbN.js → acp-cli-BOKabdeW.js} +15 -15
  7. package/dist/{acp-cli-O8LcQigE.js → acp-cli-BwcHtBDk.js} +19 -19
  8. package/dist/{agent-BBI-UGkN.js → agent-DztWhVCH.js} +20 -13
  9. package/dist/{agent-DuQt3QDO.js → agent-_H-0rbHV.js} +21 -14
  10. package/dist/{agent-scope-jm0ZdXwM.js → agent-scope-C9VjJXEK.js} +5 -180
  11. package/dist/{agent-scope-CrgUOY3f.js → agent-scope-CMs5Y7l-.js} +6 -181
  12. package/dist/{agent-scope-COnICB_7.js → agent-scope-Csu2B6AM.js} +2 -2
  13. package/dist/{audit-D-OqdjQu.js → audit-BWbjQmyv.js} +182 -15
  14. package/dist/{audit-CWGOX7Eh.js → audit-ZY6Dk5Ec.js} +183 -16
  15. package/dist/{auth-viF_w60n.js → auth-CbhB03Rz.js} +2 -2
  16. package/dist/{auth-DK3l201_.js → auth-DksjO6WG.js} +2 -2
  17. package/dist/{auth-health-DcKoxhDo.js → auth-health-C4bElkgf.js} +1 -1
  18. package/dist/{auth-health-Ba9GTScq.js → auth-health-Ctf-_JFE.js} +1 -1
  19. package/dist/{auth-profiles-CfFGCDJa.js → auth-profiles-CYBuGiBb.js} +38 -13
  20. package/dist/build-info.json +2 -2
  21. package/dist/{call-CfqL-4Nc.js → call-90HgQQ8o.js} +34 -8
  22. package/dist/{call-CPBhMXxo.js → call-BTbA5OB4.js} +35 -9
  23. package/dist/canvas-host/a2ui/.bundle.hash +1 -1
  24. package/dist/canvas-host/a2ui/a2ui.bundle.js +29 -44
  25. package/dist/{channel-options-eRR8_a8h.js → channel-options-DrUmtdd9.js} +3 -3
  26. package/dist/{channel-options-BCSvD6JM.js → channel-options-uftAnT5P.js} +7 -7
  27. package/dist/{channel-selection-BAwiO0li.js → channel-selection-CJWYmCLf.js} +2 -2
  28. package/dist/{channel-selection-BCn8_qun.js → channel-selection-PZuuCvrp.js} +2 -2
  29. package/dist/{channel-summary-BkqO8zZ9.js → channel-summary-D9nzC5WB.js} +8 -42
  30. package/dist/{channel-summary-C8GoEKgH.js → channel-summary-DUiKDBLv.js} +9 -43
  31. package/dist/{channels-cli-CBGINubh.js → channels-cli-PAlqhOZ7.js} +56 -54
  32. package/dist/{channels-cli-yQo-Rzw6.js → channels-cli-PPk5wwuy.js} +59 -57
  33. package/dist/{channels-status-issues-C9vMMPG0.js → channels-status-issues-CJ8PJgDc.js} +1 -1
  34. package/dist/{channels-status-issues-DRXQXvhY.js → channels-status-issues-CrS1r5sr.js} +1 -1
  35. package/dist/{chrome-DlqPCh1y.js → chrome-B3IuUad-.js} +2 -2
  36. package/dist/{chrome-D2LUApAY.js → chrome-BNSd7Bie.js} +5 -5
  37. package/dist/{clack-prompter-OmDa1Hm1.js → clack-prompter-CEKDd_Vg.js} +5 -5
  38. package/dist/{clack-prompter-BJuVh97L.js → clack-prompter-DuBVnTKy.js} +4 -4
  39. package/dist/cli/daemon-cli.js +1 -1
  40. package/dist/cli-DBAccB3n.js +86 -0
  41. package/dist/cli-DD5dW58-.js +89 -0
  42. package/dist/{client-zqMhLTAX.js → client-BYVbRnuQ.js} +13 -5
  43. package/dist/{client-cU7Xg1MO.js → client-CxbkcEZ7.js} +12 -4
  44. package/dist/{command-options-51bBgSJL.js → command-options-DUUINcz0.js} +3 -3
  45. package/dist/{commands-DMKDOFmC.js → commands-DAC7XMAT.js} +5 -4
  46. package/dist/completion-cli-BPIeQDFy.js +773 -0
  47. package/dist/{completion-cli-BoF86Oeq.js → completion-cli-BbhA_JbG.js} +62 -15
  48. package/dist/{config-qgIz1lbh.js → config-CAuZ-EkU.js} +93 -31
  49. package/dist/{config-CGsoho7J.js → config-CG73z4h6.js} +61 -28
  50. package/dist/{config-DCT1RAo6.js → config-CKLedg5Y.js} +92 -30
  51. package/dist/{config-guard-CJuPkD5Y.js → config-guard-a5ynrKd-.js} +181 -57
  52. package/dist/{configure-C1_0rFdQ.js → configure-B47GYdlB.js} +33 -23
  53. package/dist/{configure-D0OAmW2s.js → configure-ChnTy7Jz.js} +31 -21
  54. package/dist/{control-service-BW5sW2U1.js → control-service-CS61Road.js} +13 -6
  55. package/dist/{control-service-Ds9ompnU.js → control-service-D2E9NKqQ.js} +12 -5
  56. package/dist/control-ui/assets/{index-RwcW4Xl0.css → index-BoXosYY6.css} +1 -1
  57. package/dist/control-ui/assets/index-Dm6g1E26.js +7553 -0
  58. package/dist/control-ui/assets/index-Dm6g1E26.js.map +1 -0
  59. package/dist/control-ui/index.html +2 -2
  60. package/dist/{cron-cli-Bn_e3WGb.js → cron-cli-CssI71-c.js} +20 -19
  61. package/dist/{cron-cli-BVARiNrv.js → cron-cli-Ys53MyTg.js} +24 -23
  62. package/dist/{daemon-cli-fHXAapHL.js → daemon-cli-B6aLZ8OE.js} +28 -23
  63. package/dist/{daemon-cli-yy_MAYxv.js → daemon-cli-CMKd_D6h.js} +26 -21
  64. package/dist/{daemon-runtime-vNkYv9tq.js → daemon-runtime-BCn_QIHK.js} +64 -7
  65. package/dist/{daemon-runtime-ELWW7q0C.js → daemon-runtime-DMd0mgTK.js} +64 -7
  66. package/dist/{deliver-Bsvrattg.js → deliver-C3bnXkg5.js} +12 -10
  67. package/dist/{deliver-Dl8TEyHM.js → deliver-CZPhTA7x.js} +7 -5
  68. package/dist/{deliver-eE21zdeQ.js → deliver-Cau4HL7W.js} +11 -9
  69. package/dist/{deps-BrcOX0ht.js → deps-BG1LonF6.js} +2 -2
  70. package/dist/{deps-wXkiMwLZ.js → deps-ytXmI88x.js} +2 -2
  71. package/dist/{devices-cli-BjlwgE6B.js → devices-cli-Cm0ENrXH.js} +16 -16
  72. package/dist/{devices-cli-BVc_Ic5O.js → devices-cli-D_rnGkqO.js} +12 -12
  73. package/dist/{directory-cli-cc9ivzEM.js → directory-cli-CGLolzJC.js} +15 -15
  74. package/dist/{directory-cli-CULRQACb.js → directory-cli-CTtv_AB7.js} +19 -19
  75. package/dist/{dispatcher-BNB5aCZ6.js → dispatcher-6oI-H42S.js} +1 -1
  76. package/dist/{dns-cli-BwDdBlsK.js → dns-cli-BRkJGLqK.js} +15 -15
  77. package/dist/{dns-cli-B79COhmu.js → dns-cli-CoeI4817.js} +11 -11
  78. package/dist/{docs-cli-BM55jf4Y.js → docs-cli-BH9bMx3a.js} +7 -7
  79. package/dist/{docs-cli-t7IEzxr8.js → docs-cli-Bh1Coji2.js} +10 -10
  80. package/dist/{doctor-CT9JPoCt.js → doctor-CwSrWRCp.js} +43 -38
  81. package/dist/{doctor-OmfNRlMS.js → doctor-JnMryC_M.js} +40 -35
  82. package/dist/entry.js +12 -8
  83. package/dist/{env-DOcCob95.js → env-0_mKbEWW.js} +2 -2
  84. package/dist/{errors-DdT2Dtkb.js → errors-CZ9opC6L.js} +4 -4
  85. package/dist/{exec-B7WKla_0.js → exec-BMnoMcZW.js} +1 -1
  86. package/dist/{exec-CTo4hK94.js → exec-HEWTMJ7j.js} +1 -1
  87. package/dist/{exec-approvals-WdYFyy5N.js → exec-approvals-BCEFzcbC.js} +19 -2
  88. package/dist/{exec-approvals-CK-Umdr3.js → exec-approvals-DZixgolZ.js} +19 -2
  89. package/dist/{exec-approvals-cli-DD_z4fL9.js → exec-approvals-cli-D7aVv5hN.js} +19 -19
  90. package/dist/{exec-approvals-cli-BK2toX2b.js → exec-approvals-cli-DzLp5G7t.js} +23 -23
  91. package/dist/extensionAPI.js +1186 -267
  92. package/dist/{gateway-cli-BCC0T5iY.js → gateway-cli-DHP5DRUH.js} +910 -199
  93. package/dist/{gateway-cli-BTlr6Uwl.js → gateway-cli-ape0pnBU.js} +912 -202
  94. package/dist/{gateway-rpc-CMAcradB.js → gateway-rpc-C8rNIC0P.js} +3 -3
  95. package/dist/{gateway-rpc-SvVB4Fmv.js → gateway-rpc-CWnTaSEY.js} +3 -3
  96. package/dist/{github-copilot-auth-BHLcQ1sN.js → github-copilot-auth-B_lK1g__.js} +173 -87
  97. package/dist/{github-copilot-auth-BoRchp_Q.js → github-copilot-auth-C8Uf0Q03.js} +174 -88
  98. package/dist/{github-copilot-token-BEtihsn6.js → github-copilot-token-B3SA95yo.js} +8 -2
  99. package/dist/{github-copilot-token-rP-6QdKv.js → github-copilot-token-SLWintYd.js} +7 -1
  100. package/dist/{github-copilot-token-VZsS4013.js → github-copilot-token-pGSmVaW-.js} +8 -2
  101. package/dist/{gmail-setup-utils-4czdWNCN.js → gmail-setup-utils-Bi6W14MK.js} +3 -3
  102. package/dist/{gmail-setup-utils-B1CTmT2V.js → gmail-setup-utils-QpN7TEXS.js} +4 -4
  103. package/dist/{health-format-B4_A88V3.js → health-format-B3eStY5r.js} +215 -21
  104. package/dist/{health-format-Ct8J0fwc.js → health-format-ND2rUbQO.js} +213 -19
  105. package/dist/{help-format-CGcnDM3D.js → help-format-Bozi4K9H.js} +1 -1
  106. package/dist/{helpers-DfgBr1D5.js → helpers-BIc7L8EF.js} +1 -1
  107. package/dist/{helpers-Cw9kFCkw.js → helpers-D66_XoIz.js} +1 -1
  108. package/dist/{hooks-cli-NmkXLKmj.js → hooks-cli-BMu_-4Ru.js} +49 -49
  109. package/dist/{hooks-cli-B-28F__A.js → hooks-cli-CmeQxEOM.js} +45 -45
  110. package/dist/{hooks-status-I3Y60zVN.js → hooks-status-CKmUPU-M.js} +3 -3
  111. package/dist/{hooks-status-XV9oQICf.js → hooks-status-DepPyfBb.js} +4 -4
  112. package/dist/{image-ClOB6QDJ.js → image-Ca_PtqY7.js} +8 -6
  113. package/dist/{image-BYmtfVH8.js → image-CgBndiQy.js} +9 -7
  114. package/dist/{image-CXg7Z0WD.js → image-nRwqkmtf.js} +8 -6
  115. package/dist/index.js +231 -105
  116. package/dist/{installs-C5cjVarj.js → installs-BhEjOqPy.js} +43 -6
  117. package/dist/{installs-W4Pc1LJz.js → installs-DsJkyWfL.js} +43 -6
  118. package/dist/{links-C9fyAH-V.js → links-B5pRdmo1.js} +1 -1
  119. package/dist/{links-jGisPfXW.js → links-D0uzJbi6.js} +1 -1
  120. package/dist/{loader-BYWxo-_j.js → loader-_Pj-TZS2.js} +920 -491
  121. package/dist/{logging-BnUUuH3y.js → logging-Cc7m6PTv.js} +1 -1
  122. package/dist/{logging-CLCWl7Iu.js → logging-TXWhN8jG.js} +2 -2
  123. package/dist/{login-qr-C2H_iQJU.js → login-qr-BIlr0vwe.js} +12 -7
  124. package/dist/{login-qr-7WOtj6zE.js → login-qr-CcOWO_dR.js} +9 -4
  125. package/dist/{login-qr-sEcxw1_U.js → login-qr-Cmsf7BGt.js} +11 -6
  126. package/dist/{logs-cli-C5v4fEDj.js → logs-cli-5L3NxTsc.js} +19 -19
  127. package/dist/{logs-cli-nVwK5g60.js → logs-cli-DtiFFkZL.js} +15 -15
  128. package/dist/{manager-rDmdE7O9.js → manager-BXiIQku7.js} +9 -7
  129. package/dist/{manager-JSP5pLyv.js → manager-C4ILl-d3.js} +10 -8
  130. package/dist/{manager-BArueSTR.js → manager-LpytrxUw.js} +12 -10
  131. package/dist/{manifest-registry-tuAcHxrV.js → manifest-registry-C69Z-I4v.js} +1 -1
  132. package/dist/{manifest-registry-BFpLJJDB.js → manifest-registry-DHaa1SJb.js} +1 -1
  133. package/dist/{message-channel-CAFcg7mw.js → message-channel-BlgPSDAh.js} +6 -1
  134. package/dist/{message-channel-CQGWXVL4.js → message-channel-Bpfe5l5f.js} +7 -2
  135. package/dist/{model-selection-Cp1maz7B.js → model-selection-DMUrNhQP.js} +41 -16
  136. package/dist/{model-selection-Cs1y6OBv.js → model-selection-mzTqrNoj.js} +38 -14
  137. package/dist/{models-cli-n9a8pESx.js → models-cli-DHzyyLvp.js} +49 -49
  138. package/dist/{models-cli-DGnLcr4X.js → models-cli-EhrWjNLH.js} +53 -53
  139. package/dist/{net-DaJz_a4n.js → net-C8YRVt16.js} +1 -1
  140. package/dist/{net-DeiCIMU6.js → net-CWMMy37F.js} +1 -1
  141. package/dist/{node-cli-rtEq-YyU.js → node-cli-2oYmIWJt.js} +30 -30
  142. package/dist/{node-cli-AOO0HsM1.js → node-cli-DH7Ykym5.js} +26 -26
  143. package/dist/{node-service-CjtBRyjp.js → node-service-BAYHx0E7.js} +2 -2
  144. package/dist/{node-service-BW_LhY5w.js → node-service-Lc1LlnFH.js} +2 -2
  145. package/dist/{nodes-cli-Coxj5hDA.js → nodes-cli-Bc5K-0Lt.js} +22 -22
  146. package/dist/{nodes-cli-ChBsNXzz.js → nodes-cli-hT8yYD7S.js} +18 -18
  147. package/dist/{nodes-screen-Ln98EX_f.js → nodes-screen-DGlNPbk4.js} +2 -2
  148. package/dist/{nodes-screen-DOhGEibx.js → nodes-screen-DT5HvhJV.js} +2 -2
  149. package/dist/{note-BFpD-42H.js → note-B5HnoeZX.js} +2 -2
  150. package/dist/{note-CBiVaqG7.js → note-Ci08TSbV.js} +1 -1
  151. package/dist/{onboard-channels-CF7lTDNu.js → onboard-channels-D-ZQTy5V.js} +9 -8
  152. package/dist/{onboard-channels-CJCy7TTQ.js → onboard-channels-DKT27PdN.js} +10 -9
  153. package/dist/{onboard-skills-DdFGj9pt.js → onboard-skills-YobctE-R.js} +259 -194
  154. package/dist/{onboard-skills-fL84FI8F.js → onboard-skills-s8J5xbUr.js} +259 -194
  155. package/dist/{onboarding-DcN1avQK.js → onboarding-BP4-5uzE.js} +96 -60
  156. package/dist/{pairing-cli-DbP9KqPL.js → pairing-cli-C8KHRjaU.js} +15 -15
  157. package/dist/{pairing-cli-B7RQFp4r.js → pairing-cli-i7wiTmYC.js} +19 -19
  158. package/dist/{pairing-labels-DK2aLSd2.js → pairing-labels-BbydDT7w.js} +1 -1
  159. package/dist/{pairing-labels-C6I3dD-m.js → pairing-labels-CtqLxbG6.js} +1 -1
  160. package/dist/{pairing-store-BnMngoWQ.js → pairing-store-DFq7WtOv.js} +2 -2
  161. package/dist/{pairing-store-DMex6WWe.js → pairing-store-DTfv_FGA.js} +1 -1
  162. package/dist/{path-env-CuGC6r1F.js → path-env-DP3DsVge.js} +2 -2
  163. package/dist/{path-env-CUhrC5DA.js → path-env-h3xp5PqO.js} +1 -1
  164. package/dist/{paths-xPuk88Yf.js → paths-B4kigINg.js} +2 -2
  165. package/dist/{paths-50eo6DV6.js → paths-Bb0nwPeu.js} +2 -2
  166. package/dist/{paths-RvF0P6tQ.js → paths-CTg8F3AE.js} +1 -1
  167. package/dist/{pi-embedded-helpers-DJgCXZEz.js → pi-embedded-helpers-BB4uACeq.js} +175 -170
  168. package/dist/{pi-embedded-helpers-DiK8Qn1l.js → pi-embedded-helpers-BxqZh6U7.js} +43 -19
  169. package/dist/{pi-embedded-helpers-CC00lEFI.js → pi-embedded-helpers-DF8SAHU-.js} +175 -170
  170. package/dist/{pi-model-discovery-DjGamP_B.js → pi-model-discovery-CV2V1HHz.js} +8 -1
  171. package/dist/{pi-model-discovery-CnK2Dol8.js → pi-model-discovery-DzEIEgHL.js} +8 -1
  172. package/dist/{pi-model-discovery-CsRo-xMp.js → pi-model-discovery-EhM2JAQo.js} +8 -1
  173. package/dist/{pi-tools.policy-DleRi9eC.js → pi-tools.policy-BQ8N5y8a.js} +5 -4
  174. package/dist/{plugin-auto-enable-JQ63k0Ce.js → plugin-auto-enable-Ci7TBlH2.js} +5 -5
  175. package/dist/{plugin-auto-enable-CIVp3SAp.js → plugin-auto-enable-DyW8lHTT.js} +4 -4
  176. package/dist/plugin-sdk/index.d.ts +228 -283
  177. package/dist/plugin-sdk/index.js +22528 -69091
  178. package/dist/plugin-sdk/pi-model-discovery-Dw3A6oXH.js +37 -0
  179. package/dist/{plugins-TrKFfrLt.js → plugins-BUPpq5aS.js} +3 -2
  180. package/dist/{plugins-D1CxUobm.js → plugins-BYIWo0Cp.js} +5 -4
  181. package/dist/{plugins-cli-17wYux52.js → plugins-cli-CGfxctIx.js} +50 -49
  182. package/dist/{plugins-cli-VyQWn_LW.js → plugins-cli-Dr_R2-FY.js} +46 -45
  183. package/dist/{ports-B27T1uRn.js → ports-0V-Mu4ch.js} +2 -2
  184. package/dist/{program-BA9_uWfO.js → program-oR55MCAT.js} +84 -81
  185. package/dist/{progress-uNDQDtGB.js → progress-xpLtQsNY.js} +1 -1
  186. package/dist/{prompt-style-gfROyHgB.js → prompt-style-vzh0MGHs.js} +1 -1
  187. package/dist/{pw-ai-BC4dLE7k.js → pw-ai-B7Fvw8DW.js} +4 -4
  188. package/dist/{pw-ai-DlTBXZjY.js → pw-ai-DYpQO6HI.js} +6 -6
  189. package/dist/{pw-ai-BEqPnalN.js → pw-ai-tNPuRNn3.js} +4 -4
  190. package/dist/{qmd-manager-8xWxIGbO.js → qmd-manager-BKkFEEN_.js} +9 -8
  191. package/dist/{plugin-sdk/qmd-manager-DvkA01DP.js → qmd-manager-CF52nuBg.js} +6 -6
  192. package/dist/{qmd-manager-BSCOmXYZ.js → qmd-manager-Dub8jfbo.js} +7 -6
  193. package/dist/{register.subclis-CWWz9WdX.js → register.subclis-BpIR6Iqi.js} +36 -30
  194. package/dist/{reply-CoztdrN_.js → reply-B8pOiUNN.js} +935 -506
  195. package/dist/rolldown-runtime-Cbj13DAv.js +20 -0
  196. package/dist/{routes-yI5QIzeL.js → routes-BSfXf8a5.js} +5 -5
  197. package/dist/{routes-Ds-tIZFJ.js → routes-DchZU3EK.js} +6 -6
  198. package/dist/{rpc-HF82_iLh.js → rpc-DqI3QH59.js} +3 -3
  199. package/dist/{rpc-HdKLb6jx.js → rpc-Vo2ACfn-.js} +3 -3
  200. package/dist/{run-main-B3krVvc1.js → run-main-DrVUUPHV.js} +84 -84
  201. package/dist/{sandbox-BXUfp_qv.js → sandbox-CV8VwPij.js} +36 -16
  202. package/dist/{sandbox-Cnq9TXEn.js → sandbox-DuqLKN5J.js} +34 -14
  203. package/dist/{sandbox-cli-C7j1V6tb.js → sandbox-cli-C0_Hrk7i.js} +25 -24
  204. package/dist/{sandbox-cli-CnS9JJlO.js → sandbox-cli-Ces6i3n2.js} +21 -20
  205. package/dist/{security-cli-Clg7RQT3.js → security-cli-CybLT9XS.js} +32 -30
  206. package/dist/{security-cli-BGd4NO4l.js → security-cli-T7yrd3lb.js} +28 -26
  207. package/dist/{server-context-D2cv-pIA.js → server-context-vChIAqjH.js} +6 -6
  208. package/dist/{server-context-CM_E6wD5.js → server-context-yKyxyxOJ.js} +5 -5
  209. package/dist/{server-node-events-IMwI538C.js → server-node-events-BR2vHqf6.js} +44 -43
  210. package/dist/{server-node-events-C5EqDe_U.js → server-node-events-D39FA0NG.js} +48 -47
  211. package/dist/{service-CAxAjHNB.js → service-BZesBIaG.js} +3 -3
  212. package/dist/{service-BoDHq_LN.js → service-_JwSmGSn.js} +2 -2
  213. package/dist/{service-audit-Bf33pqEM.js → service-audit-C-IA4omi.js} +6 -6
  214. package/dist/{service-audit-DBSAGhm8.js → service-audit-DDX1kO3k.js} +6 -6
  215. package/dist/session-cost-usage-BTXosU1k.js +692 -0
  216. package/dist/session-cost-usage-CBP4Hv9D.js +692 -0
  217. package/dist/session-key-CZkcvAtx.js +177 -0
  218. package/dist/session-key-Dm2EOhrH.js +177 -0
  219. package/dist/{shared-ChNOqAzp.js → shared-BmtNKsPq.js} +4 -4
  220. package/dist/{shared-D42-KbPa.js → shared-C1XLEyB0.js} +3 -3
  221. package/dist/{shared-xZjRQa6y.js → shared-C8_5pNbb.js} +4 -4
  222. package/dist/{shared-DBGw227P.js → shared-fnGLWyZ6.js} +3 -3
  223. package/dist/skill-scanner-BoGjHXUZ.js +255 -0
  224. package/dist/skill-scanner-Bp1D9gra.js +255 -0
  225. package/dist/{skills-DtwGIkTI.js → skills-CmU0Q92f.js} +3 -3
  226. package/dist/{skills-C4b1FA1e.js → skills-D5JDj3TR.js} +5 -5
  227. package/dist/{skills-cli-BPkuJAz9.js → skills-cli-C1yJvIkL.js} +16 -16
  228. package/dist/{skills-cli-b0ZmGlmh.js → skills-cli-DBC5zFat.js} +12 -12
  229. package/dist/{skills-status-CSCMqNZP.js → skills-status-CEvVUD3U.js} +3 -3
  230. package/dist/{skills-status-CWkBweWW.js → skills-status-DtXrj3fy.js} +2 -2
  231. package/dist/{status-BIWeu5mN.js → status-BRXuHUsK.js} +94 -58
  232. package/dist/{status-CcM6W8r4.js → status-BTGXSvZ1.js} +3 -3
  233. package/dist/{status-PjegR5Cv.js → status-DBZ5Z7ng.js} +4 -4
  234. package/dist/{subsystem-46MXi6Ip.js → subsystem-CAq3uyo7.js} +1 -1
  235. package/dist/{system-cli-B4FEIE5d.js → system-cli-Dqnt-b0D.js} +13 -13
  236. package/dist/{system-cli-BL_QZ1VP.js → system-cli-SJLtqI47.js} +17 -17
  237. package/dist/{systemd-DAgZTW06.js → systemd-8sIc6isV.js} +2 -2
  238. package/dist/{systemd-CNYEkRek.js → systemd-B-3NdMmA.js} +3 -3
  239. package/dist/{systemd-hints-CcgK8AJE.js → systemd-hints-DO88c_nD.js} +1 -1
  240. package/dist/{systemd-hints-okqOoOug.js → systemd-hints-Wim4Bq6j.js} +1 -1
  241. package/dist/{systemd-linger-CTe0ZDxD.js → systemd-linger-N-cIaegf.js} +8 -3
  242. package/dist/{systemd-linger-Cbkoh9qw.js → systemd-linger-SsSOsJST.js} +8 -3
  243. package/dist/{table-f0EgX-YI.js → table-CJSx0YID.js} +1 -1
  244. package/dist/{table-DuNe7Qes.js → table-CLtGjVsx.js} +2 -2
  245. package/dist/{tailscale-BUcKO8Rr.js → tailscale-9MusRvOi.js} +1 -1
  246. package/dist/{tailscale-Cvk3mQDZ.js → tailscale-BVGD9gSD.js} +2 -2
  247. package/dist/{tool-display-rIUh61kT.js → tool-display-BxZG0o1b.js} +2 -2
  248. package/dist/{tool-display-BMYWrp0L.js → tool-display-DmgKs6-V.js} +2 -2
  249. package/dist/{tui-cV-R-JXi.js → tui-DPorsF4z.js} +203 -75
  250. package/dist/{tui-DBmFYQTk.js → tui-XH6_v0qC.js} +204 -74
  251. package/dist/{tui-cli-B_CKOjZ1.js → tui-cli-DRSIBDgZ.js} +30 -29
  252. package/dist/{tui-cli-CVdJ28TX.js → tui-cli-DV_JAtnq.js} +26 -25
  253. package/dist/{update-BDyA5Iqy.js → update-DNAVcIQ7.js} +3 -3
  254. package/dist/{update-BIB5jGcv.js → update-DzMcwy1G.js} +3 -3
  255. package/dist/{update-cli-p49uMWby.js → update-cli-OAcZiYuA.js} +112 -27
  256. package/dist/{update-cli-C5vwquH_.js → update-cli-tQcy8mkI.js} +109 -23
  257. package/dist/{update-runner-8XFxQglY.js → update-runner-2i8_mIG5.js} +254 -17
  258. package/dist/{update-runner-s8Rs8ex3.js → update-runner-BDdk_K2S.js} +254 -17
  259. package/dist/usage-format-DvowRSs-.js +36 -0
  260. package/dist/usage-format-E3bMcUMV.js +36 -0
  261. package/dist/{utils-Dg0Xbl6w.js → utils-CKSrBNwq.js} +2 -2
  262. package/dist/{webhooks-cli-DkQGQ2ae.js → webhooks-cli-BztQHEco.js} +11 -11
  263. package/dist/{webhooks-cli-kRN8qR7B.js → webhooks-cli-ZAn97osC.js} +15 -15
  264. package/dist/{widearea-dns-BIhjVRG1.js → widearea-dns-CsSylzXH.js} +2 -2
  265. package/dist/{widearea-dns-D4yoSNNw.js → widearea-dns-D9Al4QRv.js} +2 -2
  266. package/dist/{ws-log-DQ6nkLys.js → ws-log-B7UNLFLC.js} +3 -3
  267. package/dist/{ws-log-C4IerKk4.js → ws-log-DJIXahf0.js} +2 -2
  268. package/dist/{wsl-DASmek7h.js → wsl-ATjkMwMA.js} +1 -1
  269. package/docs/.i18n/glossary.zh-CN.json +20 -0
  270. package/docs/assets/macos-onboarding/01-macos-warning.jpeg +0 -0
  271. package/docs/assets/macos-onboarding/02-local-networks.jpeg +0 -0
  272. package/docs/assets/macos-onboarding/03-security-notice.png +0 -0
  273. package/docs/assets/macos-onboarding/04-choose-gateway.png +0 -0
  274. package/docs/assets/macos-onboarding/05-permissions.png +0 -0
  275. package/docs/bedrock.md +3 -3
  276. package/docs/channels/discord.md +2 -1
  277. package/docs/channels/feishu.md +72 -2
  278. package/docs/channels/telegram.md +19 -0
  279. package/docs/cli/devices.md +3 -0
  280. package/docs/cli/gateway.md +3 -0
  281. package/docs/cli/index.md +2 -0
  282. package/docs/cli/onboard.md +16 -2
  283. package/docs/concepts/features.md +53 -0
  284. package/docs/concepts/memory.md +1 -1
  285. package/docs/concepts/messages.md +1 -1
  286. package/docs/concepts/model-providers.md +11 -11
  287. package/docs/concepts/models.md +1 -1
  288. package/docs/concepts/multi-agent.md +2 -2
  289. package/docs/concepts/session.md +19 -3
  290. package/docs/docs.json +331 -182
  291. package/docs/gateway/cli-backends.md +7 -5
  292. package/docs/gateway/configuration-examples.md +4 -4
  293. package/docs/gateway/configuration.md +34 -16
  294. package/docs/gateway/heartbeat.md +61 -1
  295. package/docs/gateway/local-models.md +3 -3
  296. package/docs/gateway/network-model.md +17 -0
  297. package/docs/gateway/remote.md +3 -1
  298. package/docs/gateway/security/index.md +1 -1
  299. package/docs/help/faq.md +25 -26
  300. package/docs/help/submitting-a-pr.md +214 -0
  301. package/docs/help/submitting-an-issue.md +165 -0
  302. package/docs/index.md +127 -193
  303. package/docs/install/docker.md +2 -2
  304. package/docs/{platforms → install}/exe-dev.md +4 -3
  305. package/docs/{platforms → install}/fly.md +1 -1
  306. package/docs/install/index.md +4 -2
  307. package/docs/nodes/media-understanding.md +2 -2
  308. package/docs/platforms/digitalocean.md +2 -2
  309. package/docs/platforms/index.md +4 -4
  310. package/docs/platforms/linux.md +1 -1
  311. package/docs/platforms/mac/release.md +7 -7
  312. package/docs/platforms/oracle.md +1 -1
  313. package/docs/platforms/raspberry-pi.md +1 -1
  314. package/docs/providers/anthropic.md +3 -3
  315. package/docs/providers/index.md +1 -1
  316. package/docs/providers/minimax.md +3 -3
  317. package/docs/providers/models.md +1 -1
  318. package/docs/providers/ollama.md +60 -6
  319. package/docs/providers/openai.md +2 -2
  320. package/docs/providers/opencode.md +1 -1
  321. package/docs/providers/vercel-ai-gateway.md +1 -1
  322. package/docs/reference/credits.md +27 -0
  323. package/docs/reference/wizard.md +268 -0
  324. package/docs/start/bootstrapping.md +41 -0
  325. package/docs/start/docs-directory.md +64 -0
  326. package/docs/start/getting-started.md +109 -197
  327. package/docs/start/hubs.md +12 -0
  328. package/docs/start/onboarding.md +51 -81
  329. package/docs/start/openclaw.md +3 -20
  330. package/docs/start/quickstart.md +22 -0
  331. package/docs/start/setup.md +14 -1
  332. package/docs/start/wizard-cli-automation.md +141 -0
  333. package/docs/start/wizard-cli-reference.md +244 -0
  334. package/docs/start/wizard.md +48 -289
  335. package/docs/style.css +3 -0
  336. package/docs/testing.md +9 -9
  337. package/docs/token-use.md +2 -2
  338. package/docs/tools/index.md +3 -0
  339. package/docs/tools/llm-task.md +1 -1
  340. package/docs/tools/thinking.md +1 -0
  341. package/docs/tui.md +3 -0
  342. package/docs/vps.md +6 -6
  343. package/docs/web/control-ui.md +2 -0
  344. package/docs/web/dashboard.md +7 -7
  345. package/docs/zh-CN/channels/feishu.md +119 -3
  346. package/docs/zh-CN/concepts/features.md +59 -0
  347. package/docs/zh-CN/gateway/network-model.md +23 -0
  348. package/docs/zh-CN/gateway/remote.md +1 -1
  349. package/docs/zh-CN/help/faq.md +5 -5
  350. package/docs/zh-CN/index.md +124 -202
  351. package/docs/zh-CN/install/docker.md +1 -1
  352. package/docs/zh-CN/platforms/digitalocean.md +2 -2
  353. package/docs/zh-CN/platforms/index.md +4 -4
  354. package/docs/zh-CN/platforms/linux.md +1 -1
  355. package/docs/zh-CN/platforms/oracle.md +1 -1
  356. package/docs/zh-CN/platforms/raspberry-pi.md +1 -1
  357. package/docs/zh-CN/providers/ollama.md +1 -1
  358. package/docs/zh-CN/reference/credits.md +34 -0
  359. package/docs/zh-CN/start/docs-directory.md +70 -0
  360. package/docs/zh-CN/start/getting-started.md +1 -1
  361. package/docs/zh-CN/start/hubs.md +39 -30
  362. package/docs/zh-CN/start/quickstart.md +88 -0
  363. package/docs/zh-CN/vps.md +4 -4
  364. package/extensions/bluebubbles/package.json +1 -1
  365. package/extensions/bluebubbles/src/monitor.ts +9 -0
  366. package/extensions/copilot-proxy/index.ts +1 -0
  367. package/extensions/copilot-proxy/package.json +1 -1
  368. package/extensions/diagnostics-otel/package.json +1 -1
  369. package/extensions/discord/package.json +1 -1
  370. package/extensions/feishu/index.ts +49 -1
  371. package/extensions/feishu/openclaw.plugin.json +1 -0
  372. package/extensions/feishu/package.json +9 -5
  373. package/extensions/feishu/skills/feishu-doc/SKILL.md +105 -0
  374. package/extensions/feishu/skills/feishu-doc/references/block-types.md +103 -0
  375. package/extensions/feishu/skills/feishu-drive/SKILL.md +97 -0
  376. package/extensions/feishu/skills/feishu-perm/SKILL.md +119 -0
  377. package/extensions/feishu/skills/feishu-wiki/SKILL.md +111 -0
  378. package/extensions/feishu/src/accounts.ts +144 -0
  379. package/extensions/feishu/src/bitable.ts +459 -0
  380. package/extensions/feishu/src/bot.ts +871 -0
  381. package/extensions/feishu/src/channel.ts +267 -202
  382. package/extensions/feishu/src/client.ts +118 -0
  383. package/extensions/feishu/src/config-schema.ts +152 -26
  384. package/extensions/feishu/src/directory.ts +177 -0
  385. package/extensions/feishu/src/doc-schema.ts +47 -0
  386. package/extensions/feishu/src/docx.ts +521 -0
  387. package/extensions/feishu/src/drive-schema.ts +46 -0
  388. package/extensions/feishu/src/drive.ts +227 -0
  389. package/extensions/feishu/src/media.ts +527 -0
  390. package/extensions/feishu/src/mention.ts +126 -0
  391. package/extensions/feishu/src/monitor.ts +190 -0
  392. package/extensions/feishu/src/onboarding.ts +278 -200
  393. package/extensions/feishu/src/outbound.ts +40 -0
  394. package/extensions/feishu/src/perm-schema.ts +52 -0
  395. package/extensions/feishu/src/perm.ts +173 -0
  396. package/extensions/feishu/src/policy.ts +104 -0
  397. package/extensions/feishu/src/probe.ts +44 -0
  398. package/extensions/feishu/src/reactions.ts +160 -0
  399. package/extensions/feishu/src/reply-dispatcher.ts +184 -0
  400. package/extensions/feishu/src/runtime.ts +14 -0
  401. package/extensions/feishu/src/send.ts +358 -0
  402. package/extensions/feishu/src/targets.ts +78 -0
  403. package/extensions/feishu/src/tools-config.ts +21 -0
  404. package/extensions/feishu/src/types.ts +75 -0
  405. package/extensions/feishu/src/typing.ts +80 -0
  406. package/extensions/feishu/src/wiki-schema.ts +55 -0
  407. package/extensions/feishu/src/wiki.ts +232 -0
  408. package/extensions/google-antigravity-auth/package.json +1 -1
  409. package/extensions/google-gemini-cli-auth/package.json +1 -1
  410. package/extensions/googlechat/package.json +1 -1
  411. package/extensions/googlechat/src/monitor.ts +12 -1
  412. package/extensions/imessage/package.json +1 -1
  413. package/extensions/line/package.json +1 -1
  414. package/extensions/llm-task/package.json +1 -1
  415. package/extensions/lobster/package.json +1 -1
  416. package/extensions/matrix/CHANGELOG.md +6 -0
  417. package/extensions/matrix/package.json +1 -1
  418. package/extensions/matrix/src/config-schema.ts +1 -0
  419. package/extensions/matrix/src/matrix/monitor/handler.ts +9 -5
  420. package/extensions/matrix/src/types.ts +2 -0
  421. package/extensions/mattermost/package.json +1 -1
  422. package/extensions/mattermost/src/channel.test.ts +24 -0
  423. package/extensions/mattermost/src/config-schema.ts +1 -0
  424. package/extensions/mattermost/src/mattermost/monitor.ts +9 -5
  425. package/extensions/mattermost/src/types.ts +2 -0
  426. package/extensions/memory-core/package.json +1 -1
  427. package/extensions/memory-lancedb/node_modules/.bin/openai +2 -2
  428. package/extensions/memory-lancedb/node_modules/.bin/openai.CMD +2 -2
  429. package/extensions/memory-lancedb/node_modules/.bin/openai.ps1 +2 -2
  430. package/extensions/memory-lancedb/package.json +2 -2
  431. package/extensions/minimax-portal-auth/package.json +1 -1
  432. package/extensions/msteams/CHANGELOG.md +6 -0
  433. package/extensions/msteams/package.json +1 -1
  434. package/extensions/msteams/src/monitor-handler/message-handler.ts +1 -0
  435. package/extensions/msteams/src/reply-dispatcher.ts +7 -5
  436. package/extensions/nextcloud-talk/package.json +1 -1
  437. package/extensions/nextcloud-talk/src/config-schema.ts +1 -0
  438. package/extensions/nextcloud-talk/src/inbound.ts +10 -0
  439. package/extensions/nextcloud-talk/src/send.ts +7 -2
  440. package/extensions/nextcloud-talk/src/types.ts +2 -0
  441. package/extensions/nostr/CHANGELOG.md +6 -0
  442. package/extensions/nostr/package.json +1 -1
  443. package/extensions/open-prose/package.json +1 -1
  444. package/extensions/signal/package.json +1 -1
  445. package/extensions/slack/package.json +1 -1
  446. package/extensions/telegram/package.json +1 -1
  447. package/extensions/tlon/package.json +1 -1
  448. package/extensions/tlon/src/config-schema.ts +2 -0
  449. package/extensions/tlon/src/monitor/index.ts +41 -14
  450. package/extensions/tlon/src/monitor/utils.ts +1 -0
  451. package/extensions/twitch/CHANGELOG.md +6 -0
  452. package/extensions/twitch/package.json +1 -1
  453. package/extensions/twitch/src/config-schema.ts +2 -0
  454. package/extensions/twitch/src/monitor.ts +11 -0
  455. package/extensions/twitch/src/types.ts +2 -0
  456. package/extensions/voice-call/CHANGELOG.md +6 -0
  457. package/extensions/voice-call/package.json +1 -1
  458. package/extensions/voice-call/src/manager.test.ts +30 -0
  459. package/extensions/whatsapp/package.json +1 -1
  460. package/extensions/zalo/CHANGELOG.md +6 -0
  461. package/extensions/zalo/package.json +1 -1
  462. package/extensions/zalo/src/config-schema.ts +1 -0
  463. package/extensions/zalo/src/monitor.ts +11 -0
  464. package/extensions/zalo/src/types.ts +2 -0
  465. package/extensions/zalouser/CHANGELOG.md +6 -0
  466. package/extensions/zalouser/package.json +1 -1
  467. package/extensions/zalouser/src/config-schema.ts +1 -0
  468. package/extensions/zalouser/src/monitor.ts +12 -1
  469. package/extensions/zalouser/src/types.ts +2 -0
  470. package/package.json +14 -14
  471. package/dist/auth-profiles-3t9aTwDR.js +0 -11
  472. package/dist/auth-profiles-BYvLI-zr.js +0 -7
  473. package/dist/auth-profiles-DswR7tzt.js +0 -7
  474. package/dist/cli-BxIwNzhi.js +0 -89
  475. package/dist/cli-wFmvNjpg.js +0 -86
  476. package/dist/command-format-SkzzRqR1.js +0 -52
  477. package/dist/completion-cli-vxe-jqwC.js +0 -390
  478. package/dist/config-BwVg6hhl.js +0 -13
  479. package/dist/config-jKcyRiMo.js +0 -10
  480. package/dist/configure-DaecSBSI.js +0 -60
  481. package/dist/configure-t-7r9i4H.js +0 -64
  482. package/dist/control-service-Dag9b-dU.js +0 -16
  483. package/dist/control-service-DsUyuevF.js +0 -12
  484. package/dist/control-ui/assets/index-ryaCcbyp.js +0 -4584
  485. package/dist/control-ui/assets/index-ryaCcbyp.js.map +0 -1
  486. package/dist/daemon-cli-CUkUiGoK.js +0 -53
  487. package/dist/daemon-cli-D6FF4tmP.js +0 -49
  488. package/dist/deliver-BGnJ4-vz.js +0 -12
  489. package/dist/deliver-CXpx7BNb.js +0 -25
  490. package/dist/deliver-Ds2yqOA3.js +0 -21
  491. package/dist/doctor-BwqqPqMX.js +0 -58
  492. package/dist/doctor-DGrfzoKj.js +0 -62
  493. package/dist/github-copilot-token-B0CUgVkW.js +0 -4
  494. package/dist/github-copilot-token-B_uWT0Yi.js +0 -4
  495. package/dist/github-copilot-token-CXUZ9Lrb.js +0 -3
  496. package/dist/image-CgTMdnmz.js +0 -28
  497. package/dist/image-D1O-ebQc.js +0 -14
  498. package/dist/image-njq9Rf6U.js +0 -24
  499. package/dist/login-qr-BfbIJ1wP.js +0 -12
  500. package/dist/login-qr-CGWNrSQq.js +0 -9
  501. package/dist/login-qr-CUV9HZCg.js +0 -16
  502. package/dist/manager-DKpTd5pc.js +0 -10
  503. package/dist/manager-Dr_eVHpN.js +0 -10
  504. package/dist/manager-DtFcs1NT.js +0 -14
  505. package/dist/pi-model-discovery-BOramrmp.js +0 -3
  506. package/dist/pi-model-discovery-Bj98Srfa.js +0 -3
  507. package/dist/pi-model-discovery-DHPwfwKu.js +0 -3
  508. package/dist/plugin-sdk/agent-scope-qNPdmst1.js +0 -606
  509. package/dist/plugin-sdk/auth-profiles-D0LhX8iB.js +0 -7
  510. package/dist/plugin-sdk/chrome-DMuEXuKT.js +0 -1953
  511. package/dist/plugin-sdk/config-D5CsedNn.js +0 -5623
  512. package/dist/plugin-sdk/deliver-DOlMKwJ9.js +0 -12
  513. package/dist/plugin-sdk/deliver-Dl2ednkv.js +0 -2555
  514. package/dist/plugin-sdk/exec-CjyVHUuE.js +0 -1107
  515. package/dist/plugin-sdk/github-copilot-token-BoPqI-5_.js +0 -97
  516. package/dist/plugin-sdk/github-copilot-token-YEH9Bwov.js +0 -4
  517. package/dist/plugin-sdk/image-B_t0xXCb.js +0 -1419
  518. package/dist/plugin-sdk/image-DYTdodiR.js +0 -14
  519. package/dist/plugin-sdk/login-qr-B7ec28AI.js +0 -9
  520. package/dist/plugin-sdk/login-qr-BVBRxQRt.js +0 -470
  521. package/dist/plugin-sdk/manager-B-EITu1a.js +0 -10
  522. package/dist/plugin-sdk/manager-WCGzgWdf.js +0 -2868
  523. package/dist/plugin-sdk/model-selection-Bo7pocNu.js +0 -2667
  524. package/dist/plugin-sdk/paths-BFxmmTT5.js +0 -164
  525. package/dist/plugin-sdk/paths-Bkjq_KcG.js +0 -40
  526. package/dist/plugin-sdk/pi-embedded-helpers-fm5_Eokw.js +0 -8755
  527. package/dist/plugin-sdk/pi-model-discovery-CLgDNnGq.js +0 -13
  528. package/dist/plugin-sdk/pi-model-discovery-P2-pVRmz.js +0 -3
  529. package/dist/plugin-sdk/pw-ai-BN7Cwl9J.js +0 -1649
  530. package/dist/qmd-manager-CzArLjr6.js +0 -615
  531. package/dist/redact-BR0IM00e.js +0 -94
  532. package/dist/register.subclis-Bo-xmQ-W.js +0 -342
  533. package/dist/register.subclis-BuT7ZpPf.js +0 -3
  534. package/dist/restart-sentinel-CdcBcziq.js +0 -65
  535. package/dist/restart-sentinel-DywisDen.js +0 -65
  536. package/dist/runtime-guard-BG6JybtL.js +0 -60
  537. package/dist/runtime-guard-DvBpNsbR.js +0 -60
  538. package/dist/sqlite-Dz6S6ijV.js +0 -215
  539. package/dist/status.update-2ZdxeIeT.js +0 -79
  540. package/dist/status.update-ChwCPLBt.js +0 -79
  541. package/dist/systemd-linger-BZb1Uwsd.js +0 -7
  542. package/dist/systemd-linger-DemNCT5l.js +0 -9
  543. package/dist/transcript-events-fUhPZcB5.js +0 -17
  544. package/docs/_config.yml +0 -53
  545. package/docs/_layouts/default.html +0 -145
  546. package/docs/assets/docs-chat-widget.js +0 -667
  547. package/docs/assets/markdown.css +0 -179
  548. package/docs/assets/terminal.css +0 -473
  549. package/docs/assets/theme.js +0 -55
  550. package/extensions/feishu/README.md +0 -47
  551. /package/dist/{archive-BrH5WBhI.js → archive-D0z3LZDK.js} +0 -0
  552. /package/dist/{archive-mFgwsll-.js → archive-Dy3Ezb-5.js} +0 -0
  553. /package/dist/{boolean-CE7i9tBR.js → boolean-BgXe2hyu.js} +0 -0
  554. /package/dist/{brew-0HRgjHZw.js → brew-CAcErcKz.js} +0 -0
  555. /package/dist/{brew-Qdppmdlx.js → brew-CcZV0dSS.js} +0 -0
  556. /package/dist/{cli-utils-CukoNm8O.js → cli-utils-BkRQdAoC.js} +0 -0
  557. /package/dist/{cli-utils-DFbPmfWB.js → cli-utils-ByANh4Sp.js} +0 -0
  558. /package/dist/{plugin-sdk/command-format-CFzL448l.js → command-format-CFzL448l.js} +0 -0
  559. /package/dist/{command-format-BQK1OIvH.js → command-format-ChfKqObn.js} +0 -0
  560. /package/dist/{command-format-3xiXujG0.js → command-format-ayFsmwwz.js} +0 -0
  561. /package/dist/{constants-3er_81qc.js → constants-D1op9uGI.js} +0 -0
  562. /package/dist/{constants-CLUi6T-M.js → constants-HPrOsATF.js} +0 -0
  563. /package/dist/{exec-BIMFe4XS.js → exec-B8JKbXKW.js} +0 -0
  564. /package/dist/{format-BnjMmWWT.js → format-B7OjpGnt.js} +0 -0
  565. /package/dist/{format-hyFOmVZc.js → format-CS7EI0xF.js} +0 -0
  566. /package/dist/{help-format-af1XWYxC.js → help-format-CfZ94KRN.js} +0 -0
  567. /package/dist/{helpers-HZ-6iA1e.js → helpers-5yebzF4C.js} +0 -0
  568. /package/dist/{helpers-uGhPZ_kK.js → helpers-EKm3X92T.js} +0 -0
  569. /package/dist/{is-main-DD0MG3N8.js → is-main-B6kCyqsv.js} +0 -0
  570. /package/dist/{is-main-DrJg4t1R.js → is-main-qJ675wPV.js} +0 -0
  571. /package/dist/{logging-BdnOSVPD.js → logging-BWRYHvLp.js} +0 -0
  572. /package/dist/{logging-fywhKCmE.js → logging-CfEk_PnX.js} +0 -0
  573. /package/dist/{openclaw-root-Dean7Fp2.js → openclaw-root-9ILYSmJ9.js} +0 -0
  574. /package/dist/{openclaw-root-CJKDUIBP.js → openclaw-root-Cvotktkd.js} +0 -0
  575. /package/dist/{parse-BB0Cqon8.js → parse-BZz5lHzQ.js} +0 -0
  576. /package/dist/{parse-DLFPuO7w.js → parse-gTOGQPH6.js} +0 -0
  577. /package/dist/{parse-log-line-B3U8Kflp.js → parse-log-line-C6szvNBZ.js} +0 -0
  578. /package/dist/{parse-log-line-BmyeB3J2.js → parse-log-line-CARp5QyJ.js} +0 -0
  579. /package/dist/{parse-timeout-BIB19Upi.js → parse-timeout-CbVKLZ4B.js} +0 -0
  580. /package/dist/{parse-timeout-CmBmmqZZ.js → parse-timeout-Du-wHHNi.js} +0 -0
  581. /package/dist/{paths-VslOJiD2.js → paths-B1kfl4h5.js} +0 -0
  582. /package/dist/{paths-BDd7_JUB.js → paths-scjhy7N2.js} +0 -0
  583. /package/dist/{progress-Dn3kWpaL.js → progress-Da1ehW-x.js} +0 -0
  584. /package/dist/{prompt-style-D5D7b3cX.js → prompt-style-Dc0C5HC9.js} +0 -0
  585. /package/dist/{prompts-CIDznuZR.js → prompts-CXLLIBwP.js} +0 -0
  586. /package/dist/{prompts-CSlE5VZB.js → prompts-FbZThK8w.js} +0 -0
  587. /package/dist/{redact-BKh-zp-c.js → redact-B8YiFlwn.js} +0 -0
  588. /package/dist/{plugin-sdk/redact-wH73ib3-.js → redact-BIMJ3ntQ.js} +0 -0
  589. /package/dist/{redact-CDPAzwi8.js → redact-DJCFY628.js} +0 -0
  590. /package/dist/{plugin-sdk/sqlite-CqVsQPIl.js → sqlite-BKl1HJFe.js} +0 -0
  591. /package/dist/{sqlite-C59YNxdL.js → sqlite-Dnmf3LS7.js} +0 -0
  592. /package/dist/{sqlite-B_L84oiu.js → sqlite-DqUEZnjO.js} +0 -0
  593. /package/dist/{status-DkW6wMxZ.js → status-CRIEi8Mc.js} +0 -0
  594. /package/dist/{status-IDW1pkc0.js → status-tCu4RWZH.js} +0 -0
  595. /package/dist/{tailnet-BijMqkqa.js → tailnet-Byp3obcc.js} +0 -0
  596. /package/dist/{tailnet-Bk5cGmwE.js → tailnet-DLDGNuH2.js} +0 -0
  597. /package/dist/{plugin-sdk/transcript-events-DOI14YeV.js → transcript-events-CZ8CG4ht.js} +0 -0
  598. /package/dist/{transcript-events-Cj85Mq0h.js → transcript-events-ChU6IQwp.js} +0 -0
  599. /package/dist/{transcript-events-DW_H__a1.js → transcript-events-JLH5W4He.js} +0 -0
  600. /package/dist/{utils-PmTbZoD1.js → utils-DX85MiPR.js} +0 -0
  601. /package/dist/{ws-Cxo2p9fH.js → ws-CEcdsnN9.js} +0 -0
  602. /package/dist/{ws-DlSkA_BG.js → ws-D091yo4M.js} +0 -0
  603. /package/docs/{platforms → install}/gcp.md +0 -0
  604. /package/docs/{platforms → install}/hetzner.md +0 -0
  605. /package/docs/{platforms → install}/macos-vm.md +0 -0
  606. /package/docs/{northflank.mdx → install/northflank.mdx} +0 -0
  607. /package/docs/{railway.mdx → install/railway.mdx} +0 -0
  608. /package/docs/{render.mdx → install/render.mdx} +0 -0
  609. /package/docs/zh-CN/{platforms → install}/exe-dev.md +0 -0
  610. /package/docs/zh-CN/{platforms → install}/fly.md +0 -0
  611. /package/docs/zh-CN/{platforms → install}/gcp.md +0 -0
  612. /package/docs/zh-CN/{platforms → install}/hetzner.md +0 -0
  613. /package/docs/zh-CN/{platforms → install}/macos-vm.md +0 -0
  614. /package/docs/zh-CN/{northflank.mdx → install/northflank.mdx} +0 -0
  615. /package/docs/zh-CN/{railway.mdx → install/railway.mdx} +0 -0
  616. /package/docs/zh-CN/{render.mdx → install/render.mdx} +0 -0
@@ -1,615 +0,0 @@
1
- import { s as resolveStateDir } from "./paths-VslOJiD2.js";
2
- import { R as parseAgentSessionKey, s as resolveAgentWorkspaceDir } from "./agent-scope-COnICB_7.js";
3
- import { l as createSubsystemLogger } from "./exec-B7WKla_0.js";
4
- import { i as resolveSessionTranscriptsDirForAgent } from "./paths-xPuk88Yf.js";
5
- import { o as hashText, t as requireNodeSqlite } from "./sqlite-C59YNxdL.js";
6
- import { t as redactSensitiveText } from "./redact-BR0IM00e.js";
7
- import os from "node:os";
8
- import path from "node:path";
9
- import fs from "node:fs/promises";
10
- import { spawn } from "node:child_process";
11
-
12
- //#region src/memory/session-files.ts
13
- const log$1 = createSubsystemLogger("memory");
14
- async function listSessionFilesForAgent(agentId) {
15
- const dir = resolveSessionTranscriptsDirForAgent(agentId);
16
- try {
17
- return (await fs.readdir(dir, { withFileTypes: true })).filter((entry) => entry.isFile()).map((entry) => entry.name).filter((name) => name.endsWith(".jsonl")).map((name) => path.join(dir, name));
18
- } catch {
19
- return [];
20
- }
21
- }
22
- function sessionPathForFile(absPath) {
23
- return path.join("sessions", path.basename(absPath)).replace(/\\/g, "/");
24
- }
25
- function normalizeSessionText(value) {
26
- return value.replace(/\s*\n+\s*/g, " ").replace(/\s+/g, " ").trim();
27
- }
28
- function extractSessionText(content) {
29
- if (typeof content === "string") {
30
- const normalized = normalizeSessionText(content);
31
- return normalized ? normalized : null;
32
- }
33
- if (!Array.isArray(content)) return null;
34
- const parts = [];
35
- for (const block of content) {
36
- if (!block || typeof block !== "object") continue;
37
- const record = block;
38
- if (record.type !== "text" || typeof record.text !== "string") continue;
39
- const normalized = normalizeSessionText(record.text);
40
- if (normalized) parts.push(normalized);
41
- }
42
- if (parts.length === 0) return null;
43
- return parts.join(" ");
44
- }
45
- async function buildSessionEntry(absPath) {
46
- try {
47
- const stat = await fs.stat(absPath);
48
- const lines = (await fs.readFile(absPath, "utf-8")).split("\n");
49
- const collected = [];
50
- for (const line of lines) {
51
- if (!line.trim()) continue;
52
- let record;
53
- try {
54
- record = JSON.parse(line);
55
- } catch {
56
- continue;
57
- }
58
- if (!record || typeof record !== "object" || record.type !== "message") continue;
59
- const message = record.message;
60
- if (!message || typeof message.role !== "string") continue;
61
- if (message.role !== "user" && message.role !== "assistant") continue;
62
- const text = extractSessionText(message.content);
63
- if (!text) continue;
64
- const safe = redactSensitiveText(text, { mode: "tools" });
65
- const label = message.role === "user" ? "User" : "Assistant";
66
- collected.push(`${label}: ${safe}`);
67
- }
68
- const content = collected.join("\n");
69
- return {
70
- path: sessionPathForFile(absPath),
71
- absPath,
72
- mtimeMs: stat.mtimeMs,
73
- size: stat.size,
74
- hash: hashText(content),
75
- content
76
- };
77
- } catch (err) {
78
- log$1.debug(`Failed reading session file ${absPath}: ${String(err)}`);
79
- return null;
80
- }
81
- }
82
-
83
- //#endregion
84
- //#region src/memory/qmd-manager.ts
85
- const log = createSubsystemLogger("memory");
86
- const SNIPPET_HEADER_RE = /@@\s*-([0-9]+),([0-9]+)/;
87
- var QmdMemoryManager = class QmdMemoryManager {
88
- static async create(params) {
89
- const resolved = params.resolved.qmd;
90
- if (!resolved) return null;
91
- const manager = new QmdMemoryManager({
92
- cfg: params.cfg,
93
- agentId: params.agentId,
94
- resolved
95
- });
96
- await manager.initialize();
97
- return manager;
98
- }
99
- constructor(params) {
100
- this.collectionRoots = /* @__PURE__ */ new Map();
101
- this.sources = /* @__PURE__ */ new Set();
102
- this.docPathCache = /* @__PURE__ */ new Map();
103
- this.updateTimer = null;
104
- this.pendingUpdate = null;
105
- this.closed = false;
106
- this.db = null;
107
- this.lastUpdateAt = null;
108
- this.lastEmbedAt = null;
109
- this.cfg = params.cfg;
110
- this.agentId = params.agentId;
111
- this.qmd = params.resolved;
112
- this.workspaceDir = resolveAgentWorkspaceDir(params.cfg, params.agentId);
113
- this.stateDir = resolveStateDir(process.env, os.homedir);
114
- this.agentStateDir = path.join(this.stateDir, "agents", this.agentId);
115
- this.qmdDir = path.join(this.agentStateDir, "qmd");
116
- this.xdgConfigHome = path.join(this.qmdDir, "xdg-config");
117
- this.xdgCacheHome = path.join(this.qmdDir, "xdg-cache");
118
- this.indexPath = path.join(this.xdgCacheHome, "qmd", "index.sqlite");
119
- this.env = {
120
- ...process.env,
121
- XDG_CONFIG_HOME: this.xdgConfigHome,
122
- XDG_CACHE_HOME: this.xdgCacheHome,
123
- NO_COLOR: "1"
124
- };
125
- this.sessionExporter = this.qmd.sessions.enabled ? {
126
- dir: this.qmd.sessions.exportDir ?? path.join(this.qmdDir, "sessions"),
127
- retentionMs: this.qmd.sessions.retentionDays ? this.qmd.sessions.retentionDays * 24 * 60 * 60 * 1e3 : void 0,
128
- collectionName: this.pickSessionCollectionName()
129
- } : null;
130
- if (this.sessionExporter) this.qmd.collections = [...this.qmd.collections, {
131
- name: this.sessionExporter.collectionName,
132
- path: this.sessionExporter.dir,
133
- pattern: "**/*.md",
134
- kind: "sessions"
135
- }];
136
- }
137
- async initialize() {
138
- await fs.mkdir(this.xdgConfigHome, { recursive: true });
139
- await fs.mkdir(this.xdgCacheHome, { recursive: true });
140
- await fs.mkdir(path.dirname(this.indexPath), { recursive: true });
141
- this.bootstrapCollections();
142
- await this.ensureCollections();
143
- if (this.qmd.update.onBoot) await this.runUpdate("boot", true);
144
- if (this.qmd.update.intervalMs > 0) this.updateTimer = setInterval(() => {
145
- this.runUpdate("interval").catch((err) => {
146
- log.warn(`qmd update failed (${String(err)})`);
147
- });
148
- }, this.qmd.update.intervalMs);
149
- }
150
- bootstrapCollections() {
151
- this.collectionRoots.clear();
152
- this.sources.clear();
153
- for (const collection of this.qmd.collections) {
154
- const kind = collection.kind === "sessions" ? "sessions" : "memory";
155
- this.collectionRoots.set(collection.name, {
156
- path: collection.path,
157
- kind
158
- });
159
- this.sources.add(kind);
160
- }
161
- }
162
- async ensureCollections() {
163
- const existing = /* @__PURE__ */ new Set();
164
- try {
165
- const result = await this.runQmd([
166
- "collection",
167
- "list",
168
- "--json"
169
- ]);
170
- const parsed = JSON.parse(result.stdout);
171
- if (Array.isArray(parsed)) {
172
- for (const entry of parsed) if (typeof entry === "string") existing.add(entry);
173
- else if (entry && typeof entry === "object") {
174
- const name = entry.name;
175
- if (typeof name === "string") existing.add(name);
176
- }
177
- }
178
- } catch {}
179
- for (const collection of this.qmd.collections) {
180
- if (existing.has(collection.name)) continue;
181
- try {
182
- await this.runQmd([
183
- "collection",
184
- "add",
185
- collection.path,
186
- "--name",
187
- collection.name,
188
- "--mask",
189
- collection.pattern
190
- ]);
191
- } catch (err) {
192
- const message = err instanceof Error ? err.message : String(err);
193
- if (message.toLowerCase().includes("already exists")) continue;
194
- if (message.toLowerCase().includes("exists")) continue;
195
- log.warn(`qmd collection add failed for ${collection.name}: ${message}`);
196
- }
197
- }
198
- }
199
- async search(query, opts) {
200
- if (!this.isScopeAllowed(opts?.sessionKey)) return [];
201
- const trimmed = query.trim();
202
- if (!trimmed) return [];
203
- await this.pendingUpdate?.catch(() => void 0);
204
- const limit = Math.min(this.qmd.limits.maxResults, opts?.maxResults ?? this.qmd.limits.maxResults);
205
- const args = [
206
- "query",
207
- trimmed,
208
- "--json",
209
- "-n",
210
- String(limit)
211
- ];
212
- let stdout;
213
- try {
214
- stdout = (await this.runQmd(args, { timeoutMs: this.qmd.limits.timeoutMs })).stdout;
215
- } catch (err) {
216
- log.warn(`qmd query failed: ${String(err)}`);
217
- throw err instanceof Error ? err : new Error(String(err));
218
- }
219
- let parsed = [];
220
- try {
221
- parsed = JSON.parse(stdout);
222
- } catch (err) {
223
- const message = err instanceof Error ? err.message : String(err);
224
- log.warn(`qmd query returned invalid JSON: ${message}`);
225
- throw new Error(`qmd query returned invalid JSON: ${message}`, { cause: err });
226
- }
227
- const results = [];
228
- for (const entry of parsed) {
229
- const doc = await this.resolveDocLocation(entry.docid);
230
- if (!doc) continue;
231
- const snippet = entry.snippet?.slice(0, this.qmd.limits.maxSnippetChars) ?? "";
232
- const lines = this.extractSnippetLines(snippet);
233
- const score = typeof entry.score === "number" ? entry.score : 0;
234
- if (score < (opts?.minScore ?? 0)) continue;
235
- results.push({
236
- path: doc.rel,
237
- startLine: lines.startLine,
238
- endLine: lines.endLine,
239
- score,
240
- snippet,
241
- source: doc.source
242
- });
243
- }
244
- return this.clampResultsByInjectedChars(results.slice(0, limit));
245
- }
246
- async sync(params) {
247
- if (params?.progress) params.progress({
248
- completed: 0,
249
- total: 1,
250
- label: "Updating QMD index…"
251
- });
252
- await this.runUpdate(params?.reason ?? "manual", params?.force);
253
- if (params?.progress) params.progress({
254
- completed: 1,
255
- total: 1,
256
- label: "QMD index updated"
257
- });
258
- }
259
- async readFile(params) {
260
- const relPath = params.relPath?.trim();
261
- if (!relPath) throw new Error("path required");
262
- const absPath = this.resolveReadPath(relPath);
263
- if (!absPath.endsWith(".md")) throw new Error("path required");
264
- const stat = await fs.lstat(absPath);
265
- if (stat.isSymbolicLink() || !stat.isFile()) throw new Error("path required");
266
- const content = await fs.readFile(absPath, "utf-8");
267
- if (!params.from && !params.lines) return {
268
- text: content,
269
- path: relPath
270
- };
271
- const lines = content.split("\n");
272
- const start = Math.max(1, params.from ?? 1);
273
- const count = Math.max(1, params.lines ?? lines.length);
274
- return {
275
- text: lines.slice(start - 1, start - 1 + count).join("\n"),
276
- path: relPath
277
- };
278
- }
279
- status() {
280
- const counts = this.readCounts();
281
- return {
282
- backend: "qmd",
283
- provider: "qmd",
284
- model: "qmd",
285
- requestedProvider: "qmd",
286
- files: counts.totalDocuments,
287
- chunks: counts.totalDocuments,
288
- dirty: false,
289
- workspaceDir: this.workspaceDir,
290
- dbPath: this.indexPath,
291
- sources: Array.from(this.sources),
292
- sourceCounts: counts.sourceCounts,
293
- vector: {
294
- enabled: true,
295
- available: true
296
- },
297
- batch: {
298
- enabled: false,
299
- failures: 0,
300
- limit: 0,
301
- wait: false,
302
- concurrency: 0,
303
- pollIntervalMs: 0,
304
- timeoutMs: 0
305
- },
306
- custom: { qmd: {
307
- collections: this.qmd.collections.length,
308
- lastUpdateAt: this.lastUpdateAt
309
- } }
310
- };
311
- }
312
- async probeEmbeddingAvailability() {
313
- return { ok: true };
314
- }
315
- async probeVectorAvailability() {
316
- return true;
317
- }
318
- async close() {
319
- if (this.closed) return;
320
- this.closed = true;
321
- if (this.updateTimer) {
322
- clearInterval(this.updateTimer);
323
- this.updateTimer = null;
324
- }
325
- await this.pendingUpdate?.catch(() => void 0);
326
- if (this.db) {
327
- this.db.close();
328
- this.db = null;
329
- }
330
- }
331
- async runUpdate(reason, force) {
332
- if (this.pendingUpdate && !force) return this.pendingUpdate;
333
- if (this.shouldSkipUpdate(force)) return;
334
- const run = async () => {
335
- if (this.sessionExporter) await this.exportSessions();
336
- await this.runQmd(["update"], { timeoutMs: 12e4 });
337
- const embedIntervalMs = this.qmd.update.embedIntervalMs;
338
- if (Boolean(force) || this.lastEmbedAt === null || embedIntervalMs > 0 && Date.now() - this.lastEmbedAt > embedIntervalMs) try {
339
- await this.runQmd(["embed"], { timeoutMs: 12e4 });
340
- this.lastEmbedAt = Date.now();
341
- } catch (err) {
342
- log.warn(`qmd embed failed (${reason}): ${String(err)}`);
343
- }
344
- this.lastUpdateAt = Date.now();
345
- this.docPathCache.clear();
346
- };
347
- this.pendingUpdate = run().finally(() => {
348
- this.pendingUpdate = null;
349
- });
350
- await this.pendingUpdate;
351
- }
352
- async runQmd(args, opts) {
353
- return await new Promise((resolve, reject) => {
354
- const child = spawn(this.qmd.command, args, {
355
- env: this.env,
356
- cwd: this.workspaceDir
357
- });
358
- let stdout = "";
359
- let stderr = "";
360
- const timer = opts?.timeoutMs ? setTimeout(() => {
361
- child.kill("SIGKILL");
362
- reject(/* @__PURE__ */ new Error(`qmd ${args.join(" ")} timed out after ${opts.timeoutMs}ms`));
363
- }, opts.timeoutMs) : null;
364
- child.stdout.on("data", (data) => {
365
- stdout += data.toString();
366
- });
367
- child.stderr.on("data", (data) => {
368
- stderr += data.toString();
369
- });
370
- child.on("error", (err) => {
371
- if (timer) clearTimeout(timer);
372
- reject(err);
373
- });
374
- child.on("close", (code) => {
375
- if (timer) clearTimeout(timer);
376
- if (code === 0) resolve({
377
- stdout,
378
- stderr
379
- });
380
- else reject(/* @__PURE__ */ new Error(`qmd ${args.join(" ")} failed (code ${code}): ${stderr || stdout}`));
381
- });
382
- });
383
- }
384
- ensureDb() {
385
- if (this.db) return this.db;
386
- const { DatabaseSync } = requireNodeSqlite();
387
- this.db = new DatabaseSync(this.indexPath, { readOnly: true });
388
- return this.db;
389
- }
390
- async exportSessions() {
391
- if (!this.sessionExporter) return;
392
- const exportDir = this.sessionExporter.dir;
393
- await fs.mkdir(exportDir, { recursive: true });
394
- const files = await listSessionFilesForAgent(this.agentId);
395
- const keep = /* @__PURE__ */ new Set();
396
- const cutoff = this.sessionExporter.retentionMs ? Date.now() - this.sessionExporter.retentionMs : null;
397
- for (const sessionFile of files) {
398
- const entry = await buildSessionEntry(sessionFile);
399
- if (!entry) continue;
400
- if (cutoff && entry.mtimeMs < cutoff) continue;
401
- const target = path.join(exportDir, `${path.basename(sessionFile, ".jsonl")}.md`);
402
- await fs.writeFile(target, this.renderSessionMarkdown(entry), "utf-8");
403
- keep.add(target);
404
- }
405
- const exported = await fs.readdir(exportDir).catch(() => []);
406
- for (const name of exported) {
407
- if (!name.endsWith(".md")) continue;
408
- const full = path.join(exportDir, name);
409
- if (!keep.has(full)) await fs.rm(full, { force: true });
410
- }
411
- }
412
- renderSessionMarkdown(entry) {
413
- return `${`# Session ${path.basename(entry.absPath, path.extname(entry.absPath))}`}\n\n${entry.content?.trim().length ? entry.content.trim() : "(empty)"}\n`;
414
- }
415
- pickSessionCollectionName() {
416
- const existing = new Set(this.qmd.collections.map((collection) => collection.name));
417
- if (!existing.has("sessions")) return "sessions";
418
- let counter = 2;
419
- let candidate = `sessions-${counter}`;
420
- while (existing.has(candidate)) {
421
- counter += 1;
422
- candidate = `sessions-${counter}`;
423
- }
424
- return candidate;
425
- }
426
- async resolveDocLocation(docid) {
427
- if (!docid) return null;
428
- const normalized = docid.startsWith("#") ? docid.slice(1) : docid;
429
- if (!normalized) return null;
430
- const cached = this.docPathCache.get(normalized);
431
- if (cached) return cached;
432
- const row = this.ensureDb().prepare("SELECT collection, path FROM documents WHERE hash LIKE ? AND active = 1 LIMIT 1").get(`${normalized}%`);
433
- if (!row) return null;
434
- const location = this.toDocLocation(row.collection, row.path);
435
- if (!location) return null;
436
- this.docPathCache.set(normalized, location);
437
- return location;
438
- }
439
- extractSnippetLines(snippet) {
440
- const match = SNIPPET_HEADER_RE.exec(snippet);
441
- if (match) {
442
- const start = Number(match[1]);
443
- const count = Number(match[2]);
444
- if (Number.isFinite(start) && Number.isFinite(count)) return {
445
- startLine: start,
446
- endLine: start + count - 1
447
- };
448
- }
449
- return {
450
- startLine: 1,
451
- endLine: snippet.split("\n").length
452
- };
453
- }
454
- readCounts() {
455
- try {
456
- const rows = this.ensureDb().prepare("SELECT collection, COUNT(*) as c FROM documents WHERE active = 1 GROUP BY collection").all();
457
- const bySource = /* @__PURE__ */ new Map();
458
- for (const source of this.sources) bySource.set(source, {
459
- files: 0,
460
- chunks: 0
461
- });
462
- let total = 0;
463
- for (const row of rows) {
464
- const source = this.collectionRoots.get(row.collection)?.kind ?? "memory";
465
- const entry = bySource.get(source) ?? {
466
- files: 0,
467
- chunks: 0
468
- };
469
- entry.files += row.c ?? 0;
470
- entry.chunks += row.c ?? 0;
471
- bySource.set(source, entry);
472
- total += row.c ?? 0;
473
- }
474
- return {
475
- totalDocuments: total,
476
- sourceCounts: Array.from(bySource.entries()).map(([source, value]) => ({
477
- source,
478
- files: value.files,
479
- chunks: value.chunks
480
- }))
481
- };
482
- } catch (err) {
483
- log.warn(`failed to read qmd index stats: ${String(err)}`);
484
- return {
485
- totalDocuments: 0,
486
- sourceCounts: Array.from(this.sources).map((source) => ({
487
- source,
488
- files: 0,
489
- chunks: 0
490
- }))
491
- };
492
- }
493
- }
494
- isScopeAllowed(sessionKey) {
495
- const scope = this.qmd.scope;
496
- if (!scope) return true;
497
- const channel = this.deriveChannelFromKey(sessionKey);
498
- const chatType = this.deriveChatTypeFromKey(sessionKey);
499
- const normalizedKey = sessionKey ?? "";
500
- for (const rule of scope.rules ?? []) {
501
- if (!rule) continue;
502
- const match = rule.match ?? {};
503
- if (match.channel && match.channel !== channel) continue;
504
- if (match.chatType && match.chatType !== chatType) continue;
505
- if (match.keyPrefix && !normalizedKey.startsWith(match.keyPrefix)) continue;
506
- return rule.action === "allow";
507
- }
508
- return (scope.default ?? "allow") === "allow";
509
- }
510
- deriveChannelFromKey(key) {
511
- if (!key) return;
512
- const normalized = this.normalizeSessionKey(key);
513
- if (!normalized) return;
514
- const parts = normalized.split(":").filter(Boolean);
515
- if (parts.length >= 2 && (parts[1] === "group" || parts[1] === "channel" || parts[1] === "dm")) return parts[0]?.toLowerCase();
516
- }
517
- deriveChatTypeFromKey(key) {
518
- if (!key) return;
519
- const normalized = this.normalizeSessionKey(key);
520
- if (!normalized) return;
521
- if (normalized.includes(":group:")) return "group";
522
- if (normalized.includes(":channel:")) return "channel";
523
- return "direct";
524
- }
525
- normalizeSessionKey(key) {
526
- const trimmed = key.trim();
527
- if (!trimmed) return;
528
- const normalized = (parseAgentSessionKey(trimmed)?.rest ?? trimmed).toLowerCase();
529
- if (normalized.startsWith("subagent:")) return;
530
- return normalized;
531
- }
532
- toDocLocation(collection, collectionRelativePath) {
533
- const root = this.collectionRoots.get(collection);
534
- if (!root) return null;
535
- const normalizedRelative = collectionRelativePath.replace(/\\/g, "/");
536
- const absPath = path.normalize(path.resolve(root.path, collectionRelativePath));
537
- const relativeToWorkspace = path.relative(this.workspaceDir, absPath);
538
- return {
539
- rel: this.buildSearchPath(collection, normalizedRelative, relativeToWorkspace, absPath),
540
- abs: absPath,
541
- source: root.kind
542
- };
543
- }
544
- buildSearchPath(collection, collectionRelativePath, relativeToWorkspace, absPath) {
545
- if (this.isInsideWorkspace(relativeToWorkspace)) {
546
- const normalized = relativeToWorkspace.replace(/\\/g, "/");
547
- if (!normalized) return path.basename(absPath);
548
- return normalized;
549
- }
550
- return `qmd/${collection}/${collectionRelativePath.replace(/^\/+/, "")}`;
551
- }
552
- isInsideWorkspace(relativePath) {
553
- if (!relativePath) return true;
554
- if (relativePath.startsWith("..")) return false;
555
- if (relativePath.startsWith(`..${path.sep}`)) return false;
556
- return !path.isAbsolute(relativePath);
557
- }
558
- resolveReadPath(relPath) {
559
- if (relPath.startsWith("qmd/")) {
560
- const [, collection, ...rest] = relPath.split("/");
561
- if (!collection || rest.length === 0) throw new Error("invalid qmd path");
562
- const root = this.collectionRoots.get(collection);
563
- if (!root) throw new Error(`unknown qmd collection: ${collection}`);
564
- const joined = rest.join("/");
565
- const resolved = path.resolve(root.path, joined);
566
- if (!this.isWithinRoot(root.path, resolved)) throw new Error("qmd path escapes collection");
567
- return resolved;
568
- }
569
- const absPath = path.resolve(this.workspaceDir, relPath);
570
- if (!this.isWithinWorkspace(absPath)) throw new Error("path escapes workspace");
571
- return absPath;
572
- }
573
- isWithinWorkspace(absPath) {
574
- const normalizedWorkspace = this.workspaceDir.endsWith(path.sep) ? this.workspaceDir : `${this.workspaceDir}${path.sep}`;
575
- if (absPath === this.workspaceDir) return true;
576
- return (absPath.endsWith(path.sep) ? absPath : `${absPath}${path.sep}`).startsWith(normalizedWorkspace);
577
- }
578
- isWithinRoot(root, candidate) {
579
- const normalizedRoot = root.endsWith(path.sep) ? root : `${root}${path.sep}`;
580
- if (candidate === root) return true;
581
- return (candidate.endsWith(path.sep) ? candidate : `${candidate}${path.sep}`).startsWith(normalizedRoot);
582
- }
583
- clampResultsByInjectedChars(results) {
584
- const budget = this.qmd.limits.maxInjectedChars;
585
- if (!budget || budget <= 0) return results;
586
- let remaining = budget;
587
- const clamped = [];
588
- for (const entry of results) {
589
- if (remaining <= 0) break;
590
- const snippet = entry.snippet ?? "";
591
- if (snippet.length <= remaining) {
592
- clamped.push(entry);
593
- remaining -= snippet.length;
594
- } else {
595
- const trimmed = snippet.slice(0, Math.max(0, remaining));
596
- clamped.push({
597
- ...entry,
598
- snippet: trimmed
599
- });
600
- break;
601
- }
602
- }
603
- return clamped;
604
- }
605
- shouldSkipUpdate(force) {
606
- if (force) return false;
607
- const debounceMs = this.qmd.update.debounceMs;
608
- if (debounceMs <= 0) return false;
609
- if (!this.lastUpdateAt) return false;
610
- return Date.now() - this.lastUpdateAt < debounceMs;
611
- }
612
- };
613
-
614
- //#endregion
615
- export { QmdMemoryManager };
@@ -1,94 +0,0 @@
1
- import { createRequire } from "node:module";
2
-
3
- //#region src/logging/redact.ts
4
- const requireConfig = createRequire(import.meta.url);
5
- const DEFAULT_REDACT_MODE = "tools";
6
- const DEFAULT_REDACT_MIN_LENGTH = 18;
7
- const DEFAULT_REDACT_KEEP_START = 6;
8
- const DEFAULT_REDACT_KEEP_END = 4;
9
- const DEFAULT_REDACT_PATTERNS = [
10
- String.raw`\b[A-Z0-9_]*(?:KEY|TOKEN|SECRET|PASSWORD|PASSWD)\b\s*[=:]\s*(["']?)([^\s"'\\]+)\1`,
11
- String.raw`"(?:apiKey|token|secret|password|passwd|accessToken|refreshToken)"\s*:\s*"([^"]+)"`,
12
- String.raw`--(?:api[-_]?key|token|secret|password|passwd)\s+(["']?)([^\s"']+)\1`,
13
- String.raw`Authorization\s*[:=]\s*Bearer\s+([A-Za-z0-9._\-+=]+)`,
14
- String.raw`\bBearer\s+([A-Za-z0-9._\-+=]{18,})\b`,
15
- String.raw`-----BEGIN [A-Z ]*PRIVATE KEY-----[\s\S]+?-----END [A-Z ]*PRIVATE KEY-----`,
16
- String.raw`\b(sk-[A-Za-z0-9_-]{8,})\b`,
17
- String.raw`\b(ghp_[A-Za-z0-9]{20,})\b`,
18
- String.raw`\b(github_pat_[A-Za-z0-9_]{20,})\b`,
19
- String.raw`\b(xox[baprs]-[A-Za-z0-9-]{10,})\b`,
20
- String.raw`\b(xapp-[A-Za-z0-9-]{10,})\b`,
21
- String.raw`\b(gsk_[A-Za-z0-9_-]{10,})\b`,
22
- String.raw`\b(AIza[0-9A-Za-z\-_]{20,})\b`,
23
- String.raw`\b(pplx-[A-Za-z0-9_-]{10,})\b`,
24
- String.raw`\b(npm_[A-Za-z0-9]{10,})\b`,
25
- String.raw`\b(\d{6,}:[A-Za-z0-9_-]{20,})\b`
26
- ];
27
- function normalizeMode(value) {
28
- return value === "off" ? "off" : DEFAULT_REDACT_MODE;
29
- }
30
- function parsePattern(raw) {
31
- if (!raw.trim()) return null;
32
- const match = raw.match(/^\/(.+)\/([gimsuy]*)$/);
33
- try {
34
- if (match) {
35
- const flags = match[2].includes("g") ? match[2] : `${match[2]}g`;
36
- return new RegExp(match[1], flags);
37
- }
38
- return new RegExp(raw, "gi");
39
- } catch {
40
- return null;
41
- }
42
- }
43
- function resolvePatterns(value) {
44
- return (value?.length ? value : DEFAULT_REDACT_PATTERNS).map(parsePattern).filter((re) => Boolean(re));
45
- }
46
- function maskToken(token) {
47
- if (token.length < DEFAULT_REDACT_MIN_LENGTH) return "***";
48
- return `${token.slice(0, DEFAULT_REDACT_KEEP_START)}…${token.slice(-DEFAULT_REDACT_KEEP_END)}`;
49
- }
50
- function redactPemBlock(block) {
51
- const lines = block.split(/\r?\n/).filter(Boolean);
52
- if (lines.length < 2) return "***";
53
- return `${lines[0]}\n…redacted…\n${lines[lines.length - 1]}`;
54
- }
55
- function redactMatch(match, groups) {
56
- if (match.includes("PRIVATE KEY-----")) return redactPemBlock(match);
57
- const token = groups.filter((value) => typeof value === "string" && value.length > 0).at(-1) ?? match;
58
- const masked = maskToken(token);
59
- if (token === match) return masked;
60
- return match.replace(token, masked);
61
- }
62
- function redactText(text, patterns) {
63
- let next = text;
64
- for (const pattern of patterns) next = next.replace(pattern, (...args) => redactMatch(args[0], args.slice(1, args.length - 2)));
65
- return next;
66
- }
67
- function resolveConfigRedaction() {
68
- let cfg;
69
- try {
70
- cfg = requireConfig("../config/config.js").loadConfig?.().logging;
71
- } catch {
72
- cfg = void 0;
73
- }
74
- return {
75
- mode: normalizeMode(cfg?.redactSensitive),
76
- patterns: cfg?.redactPatterns
77
- };
78
- }
79
- function redactSensitiveText(text, options) {
80
- if (!text) return text;
81
- const resolved = options ?? resolveConfigRedaction();
82
- if (normalizeMode(resolved.mode) === "off") return text;
83
- const patterns = resolvePatterns(resolved.patterns);
84
- if (!patterns.length) return text;
85
- return redactText(text, patterns);
86
- }
87
- function redactToolDetail(detail) {
88
- const resolved = resolveConfigRedaction();
89
- if (normalizeMode(resolved.mode) !== "tools") return detail;
90
- return redactSensitiveText(detail, resolved);
91
- }
92
-
93
- //#endregion
94
- export { redactToolDetail as n, redactSensitiveText as t };