@bitseek/claw 1.3.6 → 1.3.8-beta.1

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 (180) hide show
  1. package/dist/{accounts-CX1yOBOk.js → accounts-BTexwKe8.js} +1 -1
  2. package/dist/{accounts-Bwq1wvds.js → accounts-DMvETf-t.js} +1 -1
  3. package/dist/{accounts-CaiECgq3.js → accounts-ubG6irXZ.js} +16 -16
  4. package/dist/{active-listener-neKWQsOO.js → active-listener-Hd9sOu9T.js} +1 -1
  5. package/dist/{agent-scope-CTbRzU1C.js → agent-scope-C6hps0r3.js} +4 -4
  6. package/dist/{agents-BqONdWNu.js → agents-4yiCX5vO.js} +4 -4
  7. package/dist/{agents.config-2cTTTDPj.js → agents.config-C26BMyOA.js} +1 -1
  8. package/dist/{agents.config-DhIvFsFv.js → agents.config-C4xJzUcO.js} +1 -1
  9. package/dist/{api-key-rotation-BbZD-rsQ.js → api-key-rotation-Cv5_SG_o.js} +2 -2
  10. package/dist/{audio-preflight-C5Crv38h.js → audio-preflight-C2pZmbnM.js} +39 -39
  11. package/dist/{audio-transcription-runner-eVtEKUPC.js → audio-transcription-runner-CQ4BMvGX.js} +11 -11
  12. package/dist/{auth-choice-D6WGnKQk.js → auth-choice-Cpai95xS.js} +1 -1
  13. package/dist/{auth-choice-lhaABxGx.js → auth-choice-D9W2yx7x.js} +1 -1
  14. package/dist/{banner-CMCfl-_K.js → banner-DtaJorEc.js} +1 -1
  15. package/dist/{bindings-Daa-Etag.js → bindings-CsIiIjqN.js} +2 -2
  16. package/dist/build-info.json +2 -2
  17. package/dist/bundled/boot-md/handler.js +65 -65
  18. package/dist/bundled/bootstrap-extra-files/handler.js +7 -7
  19. package/dist/bundled/command-logger/handler.js +2 -2
  20. package/dist/bundled/session-memory/handler.js +65 -65
  21. package/dist/canvas-host/a2ui/.bundle.hash +1 -1
  22. package/dist/{channel-activity-D0BHmeoE.js → channel-activity-Dwc2BBvs.js} +3 -3
  23. package/dist/{channel-options-gDhT85r4.js → channel-options-D3Ck-1W2.js} +1 -1
  24. package/dist/{channel-options-Didnr81h.js → channel-options-DffMDeTp.js} +1 -1
  25. package/dist/{channel-web-C45x6ahP.js → channel-web-BB66exAr.js} +1 -1
  26. package/dist/{channel-web-rP0VBNIt.js → channel-web-zni8DLt7.js} +1 -1
  27. package/dist/{channels-cli-CZQbGl-H.js → channels-cli-D_gj850i.js} +6 -6
  28. package/dist/{channels-cli-BpiA2BQE.js → channels-cli-IQCAixeN.js} +6 -6
  29. package/dist/{chrome-BRjY_MCc.js → chrome-DWfXErGH.js} +26 -26
  30. package/dist/{chunk-Dfkbh8wX.js → chunk-2ZxftpDd.js} +1 -1
  31. package/dist/{cli-Cvdtw0CY.js → cli-BlPS7kZ9.js} +1 -1
  32. package/dist/{cli-D5yg1LCm.js → cli-CrgfzbyT.js} +1 -1
  33. package/dist/{command-registry-BSN6zVlZ.js → command-registry-CjTwwZuF.js} +11 -11
  34. package/dist/{commands-registry-NyRDVN7s.js → commands-registry-CTkboeeC.js} +5 -5
  35. package/dist/{completion-cli-BDeiV4p9.js → completion-cli-CgjnsXtn.js} +1 -1
  36. package/dist/{completion-cli-lZ6S6oKA.js → completion-cli-Clj1_156.js} +2 -2
  37. package/dist/{config-cli-C-yIXgGr.js → config-cli-CE1eTqAM.js} +1 -1
  38. package/dist/{config-cli-BtvOIDkG.js → config-cli-DwKVeQtE.js} +1 -1
  39. package/dist/{configure-DflayaB2.js → configure-BCUvl2Zf.js} +3 -3
  40. package/dist/{configure-CgbTpfrx.js → configure-D2KyFnr8.js} +3 -3
  41. package/dist/{deliver-DlLNT2iR.js → deliver-zrYSWfQ5.js} +22 -22
  42. package/dist/{diagnostic-DpOlXoSr.js → diagnostic-BO1GQJJf.js} +2 -2
  43. package/dist/{dock-DXlPVrMo.js → dock-Bm23mfim.js} +6 -6
  44. package/dist/{doctor-completion-BKCOmkBi.js → doctor-completion-BoZbJ2cC.js} +1 -1
  45. package/dist/{doctor-completion-Bim4XRFT.js → doctor-completion-CACrVkvp.js} +1 -1
  46. package/dist/entry.js +2 -2
  47. package/dist/{env-Bn6pmvjK.js → env-DNMZEG57.js} +2 -2
  48. package/dist/{errors-Ct2kCLWx.js → errors-B11yhRo6.js} +1 -1
  49. package/dist/extensionAPI.js +1 -1
  50. package/dist/{fetch-2cO0rj7X.js → fetch-4RonjgqX.js} +5 -5
  51. package/dist/{fetch-guard-iigSYt3Q.js → fetch-guard-B1EGEHan.js} +2 -2
  52. package/dist/{frontmatter-rlCI8Hmw.js → frontmatter-D6vByAHn.js} +2 -2
  53. package/dist/{fs-safe-CM9EhGvi.js → fs-safe-C77EShMC.js} +4 -4
  54. package/dist/{gateway-cli-CDgld1qp.js → gateway-cli-BUFxEad5.js} +8 -8
  55. package/dist/{gateway-cli-8DmbQc9V.js → gateway-cli-D9mIlXNc.js} +8 -8
  56. package/dist/{github-copilot-token-CPjAmbfr.js → github-copilot-token-DLGN-8YS.js} +7 -7
  57. package/dist/{health-Gkd0akfz.js → health-Cjj_F37M.js} +1 -1
  58. package/dist/{health-DaN3xECS.js → health-CpbNiL9A.js} +1 -1
  59. package/dist/{hooks-cli-gRM8FMyG.js → hooks-cli-C0lC4Kj0.js} +2 -2
  60. package/dist/{hooks-cli-n5Weiheq.js → hooks-cli-DRkHJxMs.js} +2 -2
  61. package/dist/{image-BWlmyhr-.js → image-DnxYCkHO.js} +6 -6
  62. package/dist/{image-ops-jvmQoiyw.js → image-ops-DCpyia_K.js} +1 -1
  63. package/dist/index.js +6 -6
  64. package/dist/{internal-hooks-oLQ2m8YT.js → internal-hooks-yQe6H47q.js} +1 -1
  65. package/dist/{ir-pR36nI-3.js → ir-DcDVAFj3.js} +6 -6
  66. package/dist/llm-slug-generator.js +65 -65
  67. package/dist/{logger-DelEB7MK.js → logger-BlH5MJiV.js} +1 -1
  68. package/dist/{login-Cm2zDfEU.js → login-CgEHUE7h.js} +6 -6
  69. package/dist/{login-qr-iS1jPDpP.js → login-qr-DUJfhbUe.js} +13 -13
  70. package/dist/{manager-BX3KtavU.js → manager-tozHviEd.js} +15 -15
  71. package/dist/{markdown-tables-pfs_NCNh.js → markdown-tables-BHONoo6S.js} +1 -1
  72. package/dist/{message-channel-DB68nc40.js → message-channel-pbgFFUNm.js} +1 -1
  73. package/dist/{model-selection-DfZMxaX3.js → model-selection-D_Si2Ict.js} +44 -44
  74. package/dist/{models-CJodAVSF.js → models-De_qVfBK.js} +2 -2
  75. package/dist/{models-cli-B1Dwj01V.js → models-cli-By7lFchJ.js} +2 -2
  76. package/dist/{models-cli-Ceb37L0t.js → models-cli-aJswKT_o.js} +3 -3
  77. package/dist/{npm-resolution-B5fqS6mO.js → npm-resolution-BiJCUhct.js} +1 -1
  78. package/dist/{npm-resolution-dNC8uD0I.js → npm-resolution-Ez_78UD2.js} +1 -1
  79. package/dist/{onboard-sKY5jwsH.js → onboard-CIrRD9vz.js} +2 -2
  80. package/dist/{onboard-BcaFvsav.js → onboard-DQJ6ZB5N.js} +2 -2
  81. package/dist/{onboard-channels-DPIysHDh.js → onboard-channels-AbBziYo3.js} +1 -1
  82. package/dist/{onboard-channels-DQ1rkv4c.js → onboard-channels-yslMqzIm.js} +1 -1
  83. package/dist/{onboarding-BRfS3PSa.js → onboarding-CIsQzEx6.js} +3 -3
  84. package/dist/{onboarding-JNyox6ZE.js → onboarding-exdNo-8e.js} +3 -3
  85. package/dist/{onboarding.finalize-CG9tTRyw.js → onboarding.finalize-BqpH39L7.js} +5 -5
  86. package/dist/{onboarding.finalize-hBg4b8IC.js → onboarding.finalize-spYqvVP0.js} +6 -6
  87. package/dist/{outbound-N9_vLIGT.js → outbound-9rXkgGZM.js} +7 -7
  88. package/dist/{outbound-attachment-CEt49GWZ.js → outbound-attachment-Cy8rvvJE.js} +2 -2
  89. package/dist/{path-alias-guards-xY_GOJVd.js → path-alias-guards-Cpb5gMG6.js} +1 -1
  90. package/dist/{paths-Bi8MJ8NM.js → paths-BHEVctLd.js} +3 -3
  91. package/dist/{paths-DKuX7-1L.js → paths-aGRLvQx9.js} +5 -5
  92. package/dist/{pi-embedded-cmJctBve.js → pi-embedded-BW8O-Z_R.js} +109 -15
  93. package/dist/{pi-embedded-CDXssetE.js → pi-embedded-DLrpQftt.js} +292 -198
  94. package/dist/{pi-embedded-helpers-DSPiPpLM.js → pi-embedded-helpers-Bo7e-QzJ.js} +29 -29
  95. package/dist/{pi-model-discovery-N7o4F93J.js → pi-model-discovery-DA46fxhD.js} +7 -7
  96. package/dist/{plugin-registry-NaHPDM1s.js → plugin-registry-CgjiDSJy.js} +1 -1
  97. package/dist/{plugin-registry-2CmN8Jv2.js → plugin-registry-DXEjCmXY.js} +1 -1
  98. package/dist/plugin-sdk/agents/pi-tools.read.d.ts +1 -0
  99. package/dist/plugin-sdk/{channel-web-Dn5fneOY.js → channel-web-BhgjzJX5.js} +1 -1
  100. package/dist/plugin-sdk/index.js +2 -2
  101. package/dist/plugin-sdk/{reply-rsLB0nJs.js → reply-CLQkx08P.js} +107 -13
  102. package/dist/plugin-sdk/{web-RBob4uU1.js → web-D5yQYvYF.js} +2 -2
  103. package/dist/{plugins-D63QYxW6.js → plugins-CJoaoIHc.js} +11 -11
  104. package/dist/{plugins-cli-DwKgp7q7.js → plugins-cli-CpSINdz-.js} +2 -2
  105. package/dist/{plugins-cli-o6KJO4Qe.js → plugins-cli-DKIC54hQ.js} +2 -2
  106. package/dist/{program-B_-eFyJE.js → program-R4eCXcVV.js} +7 -7
  107. package/dist/{program-context-BJQXRZ1w.js → program-context-XIBDpYkH.js} +19 -19
  108. package/dist/{prompt-select-styled-QH4mD93d.js → prompt-select-styled-CSGsMtmW.js} +4 -4
  109. package/dist/{prompt-select-styled-asxoqY78.js → prompt-select-styled-CxcE42jh.js} +4 -4
  110. package/dist/{provider-auth-helpers-hI1pbI9r.js → provider-auth-helpers-BPwzCB_M.js} +1 -1
  111. package/dist/{provider-auth-helpers-CzSm0FSu.js → provider-auth-helpers-BqRZaAgE.js} +1 -1
  112. package/dist/{proxy-jINniQBi.js → proxy-DfJJLvch.js} +1 -1
  113. package/dist/{proxy-env-Drg9J503.js → proxy-env-ynOWOBHx.js} +1 -1
  114. package/dist/{proxy-fetch-AvkSvetA.js → proxy-fetch-xlbVQYN_.js} +1 -1
  115. package/dist/{push-apns-DZ0qaSFA.js → push-apns-BFPYim-z.js} +1 -1
  116. package/dist/{push-apns-DMeB2M_b.js → push-apns-D_JirvZj.js} +1 -1
  117. package/dist/{pw-ai-gDXxKGzT.js → pw-ai-Cu3cnNF0.js} +17 -17
  118. package/dist/{qmd-manager-DXbV8CPG.js → qmd-manager-n4jauq3A.js} +11 -11
  119. package/dist/{query-expansion-C0A4WwZX.js → query-expansion-CdDUaBcQ.js} +5 -5
  120. package/dist/{redact-BC9R18Uw.js → redact-CaZQhKzI.js} +1 -1
  121. package/dist/{register.agent-D9rmYCMS.js → register.agent-Cls5qjTc.js} +6 -6
  122. package/dist/{register.agent-BBOmACUM.js → register.agent-rU2v36L0.js} +7 -7
  123. package/dist/{register.configure-CZF2XAPO.js → register.configure-BMDzBahu.js} +7 -7
  124. package/dist/{register.configure-BJ7l1h-A.js → register.configure-BUhyYBGQ.js} +7 -7
  125. package/dist/{register.init-BdPckTb9.js → register.init-CFdcOH88.js} +1 -0
  126. package/dist/{register.init-CNKrbvCo.js → register.init-pWy0PRza.js} +1 -0
  127. package/dist/{register.maintenance-B0nZqqML.js → register.maintenance-CofdyNUx.js} +7 -7
  128. package/dist/{register.maintenance-DvWoKstb.js → register.maintenance-Cy17SXVH.js} +8 -8
  129. package/dist/{register.message-BME4m1Jr.js → register.message-3BQdcipC.js} +2 -2
  130. package/dist/{register.message-Cs0mwtTw.js → register.message-Ce33qQCZ.js} +2 -2
  131. package/dist/{register.onboard-DOhvWYV7.js → register.onboard-BlcK7F0u.js} +2 -2
  132. package/dist/{register.onboard-B1-O21vU.js → register.onboard-ESEjBMtx.js} +2 -2
  133. package/dist/{register.setup-ixDBzvTR.js → register.setup-CUxHFPRL.js} +2 -2
  134. package/dist/{register.setup-KPZYo_I1.js → register.setup-N8V5bjG1.js} +2 -2
  135. package/dist/{register.start-Df91ZVJJ.js → register.start-CI8ol0Mk.js} +1 -1
  136. package/dist/{register.start-DErNT3nQ.js → register.start-D5trBtN0.js} +1 -1
  137. package/dist/{register.status-health-sessions-Czq26k6E.js → register.status-health-sessions-BKFS62CW.js} +3 -3
  138. package/dist/{register.status-health-sessions-wp3A615j.js → register.status-health-sessions-Bj4rUQRe.js} +3 -3
  139. package/dist/{register.subclis-BSGvOwqU.js → register.subclis-lEqV1Knw.js} +9 -9
  140. package/dist/{registry-C2GEGa2t.js → registry-CJCkqTms.js} +3 -3
  141. package/dist/{replies-B6I1tT5t.js → replies-D6zARd6r.js} +3 -3
  142. package/dist/{reply-OEcNPoWd.js → reply-CAA6gLtt.js} +109 -15
  143. package/dist/{reply-prefix-9mzt89Cf.js → reply-prefix-DK1i6bCJ.js} +1 -1
  144. package/dist/{resolve-route-BNElrVxR.js → resolve-route-C5hVstLo.js} +4 -4
  145. package/dist/{retry-Ayb7e4XG.js → retry-DTeP7C3h.js} +1 -1
  146. package/dist/{run-main-CdI1kXKr.js → run-main-BTmP3wme.js} +14 -14
  147. package/dist/{send-BMzVXosN.js → send--Gq-Uh-l.js} +7 -7
  148. package/dist/{send-DC_e_Iev.js → send-BpyiQEov.js} +6 -6
  149. package/dist/{send-B6QQ8XfC.js → send-CcQZM0c7.js} +8 -8
  150. package/dist/{send-Buidj_8L.js → send-D2zYssqK.js} +27 -27
  151. package/dist/{send-BQETStDl.js → send-DcL81tZr.js} +10 -10
  152. package/dist/{server-node-events-BE-B31Iv.js → server-node-events-CD_Wo8L4.js} +2 -2
  153. package/dist/{server-node-events-h5NyibKC.js → server-node-events-ap09x8RZ.js} +2 -2
  154. package/dist/{session-meta-DAMj6ZRX.js → session-meta-BbCwXniv.js} +2 -2
  155. package/dist/{session-TVb8hgJP.js → session-xKPVUYQP.js} +9 -9
  156. package/dist/{sessions-Ck4ZR4dY.js → sessions-D7EjW0sG.js} +31 -31
  157. package/dist/{skill-commands-KesfMtZ9.js → skill-commands-Cea3CZFF.js} +9 -9
  158. package/dist/{skills-BYmEoxNo.js → skills-BttlqUXr.js} +22 -22
  159. package/dist/{status-CmNVuywF.js → status-CB2Fs5iL.js} +2 -2
  160. package/dist/{status-D_I-fLJF.js → status-DCtLhxlh.js} +2 -2
  161. package/dist/{store-KLMMBnKE.js → store-B7PaqfvZ.js} +2 -2
  162. package/dist/{subagent-registry-D4xGq2uc.js → subagent-registry-B4xJjOu2.js} +109 -15
  163. package/dist/{subsystem-CAatx5oo.js → subsystem-BRjuJbbM.js} +14 -14
  164. package/dist/{tables-DqechQWF.js → tables-BJ0XAman.js} +1 -1
  165. package/dist/{target-errors-C-KolUyX.js → target-errors-Dad0aUFR.js} +2 -2
  166. package/dist/{tokens-BvzZdrVJ.js → tokens-B9EDT4jv.js} +1 -1
  167. package/dist/{tool-images-DiKIlElg.js → tool-images-ArXzv82F.js} +2 -2
  168. package/dist/{tool-loop-detection-C4V990MS.js → tool-loop-detection-CLoYKYIq.js} +3 -3
  169. package/dist/{update-cli-CfeiDzYx.js → update-cli-BIMys5Ua.js} +7 -7
  170. package/dist/{update-cli-DKmrzt8l.js → update-cli-BuVnlit7.js} +8 -8
  171. package/dist/{update-runner-D5vyQGte.js → update-runner-C4bLqctv.js} +1 -1
  172. package/dist/{update-runner-BUth8QlB.js → update-runner-DGqZqXVF.js} +1 -1
  173. package/dist/{utils-Bo1RFF0l.js → utils-BFZnl-5N.js} +6 -6
  174. package/dist/{web-CQqnJkMB.js → web-BCpNE4aE.js} +2 -2
  175. package/dist/{web-BYeS4JNp.js → web-BJQKWHqO.js} +1 -1
  176. package/dist/{web-BPI4HIht.js → web-Bun-T89j.js} +69 -69
  177. package/dist/{web-Bc1AWW4q.js → web-Cb4sindp.js} +2 -2
  178. package/dist/{whatsapp-actions-Bf61u88d.js → whatsapp-actions-Be9uvUUL.js} +28 -28
  179. package/dist/{workspace-CswOYN9T.js → workspace-D6mrCnXi.js} +21 -21
  180. package/package.json +1 -1
@@ -1,14 +1,14 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
2
- import { n as listAgentIds, o as resolveAgentSkillsFilter, s as resolveAgentWorkspaceDir } from "./agent-scope-CTbRzU1C.js";
3
- import { c as resolveStateDir } from "./paths-DKuX7-1L.js";
4
- import { t as createSubsystemLogger, u as logVerbose } from "./subsystem-CAatx5oo.js";
5
- import { h as resolveUserPath, t as CONFIG_DIR } from "./utils-Bo1RFF0l.js";
6
- import { o as resolvePluginSkillDirs, t as buildWorkspaceSkillCommandSpecs } from "./skills-BYmEoxNo.js";
2
+ import { n as listAgentIds, o as resolveAgentSkillsFilter, s as resolveAgentWorkspaceDir } from "./agent-scope-C6hps0r3.js";
3
+ import { c as resolveStateDir } from "./paths-aGRLvQx9.js";
4
+ import { t as createSubsystemLogger, u as logVerbose } from "./subsystem-BRjuJbbM.js";
5
+ import { h as resolveUserPath, t as CONFIG_DIR } from "./utils-BFZnl-5N.js";
6
+ import { o as resolvePluginSkillDirs, t as buildWorkspaceSkillCommandSpecs } from "./skills-BttlqUXr.js";
7
7
  import { t as createAsyncLock } from "./json-files-BpxTFudd.js";
8
- import { a as listChatCommands } from "./commands-registry-NyRDVN7s.js";
8
+ import { a as listChatCommands } from "./commands-registry-CTkboeeC.js";
9
9
  import os from "node:os";
10
10
  import path from "node:path";
11
- import fs from "node:fs";
11
+ import syncFs from "node:fs";
12
12
  import { randomUUID } from "node:crypto";
13
13
  import chokidar from "chokidar";
14
14
 
@@ -248,13 +248,13 @@ function listSkillCommandsForAgents(params) {
248
248
  const workspaceFilters = /* @__PURE__ */ new Map();
249
249
  for (const agentId of agentIds) {
250
250
  const workspaceDir = resolveAgentWorkspaceDir(params.cfg, agentId);
251
- if (!fs.existsSync(workspaceDir)) {
251
+ if (!syncFs.existsSync(workspaceDir)) {
252
252
  logVerbose(`Skipping agent "${agentId}": workspace does not exist: ${workspaceDir}`);
253
253
  continue;
254
254
  }
255
255
  let canonicalDir;
256
256
  try {
257
- canonicalDir = fs.realpathSync(workspaceDir);
257
+ canonicalDir = syncFs.realpathSync(workspaceDir);
258
258
  } catch {
259
259
  logVerbose(`Skipping agent "${agentId}": cannot resolve workspace: ${workspaceDir}`);
260
260
  continue;
@@ -1,13 +1,13 @@
1
- import { p as normalizeSkillFilter } from "./agent-scope-CTbRzU1C.js";
2
- import { t as createSubsystemLogger, w as resolvePreferredOpenClawTmpDir } from "./subsystem-CAatx5oo.js";
3
- import { h as resolveUserPath, t as CONFIG_DIR } from "./utils-Bo1RFF0l.js";
4
- import { A as isPathInside, _ as resolveOpenClawPackageRootSync } from "./workspace-CswOYN9T.js";
5
- import { At as resolveEffectiveEnableState, Sn as isDangerousHostEnvVarName, hn as isPathInsideWithRealpath, jt as resolveMemorySlotDecision, kt as normalizePluginsConfig, wt as loadPluginManifestRegistry } from "./model-selection-DfZMxaX3.js";
6
- import { a as resolveOpenClawManifestBlock, c as resolveOpenClawManifestRequires, d as hasBinary, f as isConfigPathTruthyWithDefaults, i as parseOpenClawManifestInstallBase, l as parseFrontmatterBlock, n as normalizeStringList, o as resolveOpenClawManifestInstall, r as parseFrontmatterBool, s as resolveOpenClawManifestOs, t as getFrontmatterString, u as evaluateRuntimeEligibility } from "./frontmatter-rlCI8Hmw.js";
7
- import { n as assertNoPathAliasEscape } from "./path-alias-guards-xY_GOJVd.js";
1
+ import { p as normalizeSkillFilter } from "./agent-scope-C6hps0r3.js";
2
+ import { t as createSubsystemLogger, w as resolvePreferredOpenClawTmpDir } from "./subsystem-BRjuJbbM.js";
3
+ import { h as resolveUserPath, t as CONFIG_DIR } from "./utils-BFZnl-5N.js";
4
+ import { A as isPathInside, _ as resolveOpenClawPackageRootSync } from "./workspace-D6mrCnXi.js";
5
+ import { At as resolveEffectiveEnableState, Sn as isDangerousHostEnvVarName, hn as isPathInsideWithRealpath, jt as resolveMemorySlotDecision, kt as normalizePluginsConfig, wt as loadPluginManifestRegistry } from "./model-selection-D_Si2Ict.js";
6
+ import { a as resolveOpenClawManifestBlock, c as resolveOpenClawManifestRequires, d as hasBinary, f as isConfigPathTruthyWithDefaults, i as parseOpenClawManifestInstallBase, l as parseFrontmatterBlock, n as normalizeStringList, o as resolveOpenClawManifestInstall, r as parseFrontmatterBool, s as resolveOpenClawManifestOs, t as getFrontmatterString, u as evaluateRuntimeEligibility } from "./frontmatter-D6vByAHn.js";
7
+ import { n as assertNoPathAliasEscape } from "./path-alias-guards-Cpb5gMG6.js";
8
8
  import os from "node:os";
9
9
  import path from "node:path";
10
- import fs from "node:fs";
10
+ import syncFs from "node:fs";
11
11
  import { URL as URL$1, fileURLToPath } from "node:url";
12
12
  import { formatSkillsForPrompt, loadSkillsFromDir } from "@mariozechner/pi-coding-agent";
13
13
 
@@ -540,13 +540,13 @@ function shortPath(value) {
540
540
  //#region src/agents/skills/bundled-dir.ts
541
541
  function looksLikeSkillsDir(dir) {
542
542
  try {
543
- const entries = fs.readdirSync(dir, { withFileTypes: true });
543
+ const entries = syncFs.readdirSync(dir, { withFileTypes: true });
544
544
  for (const entry of entries) {
545
545
  if (entry.name.startsWith(".")) continue;
546
546
  const fullPath = path.join(dir, entry.name);
547
547
  if (entry.isFile() && entry.name.endsWith(".md")) return true;
548
548
  if (entry.isDirectory()) {
549
- if (fs.existsSync(path.join(fullPath, "SKILL.md"))) return true;
549
+ if (syncFs.existsSync(path.join(fullPath, "SKILL.md"))) return true;
550
550
  }
551
551
  }
552
552
  } catch {
@@ -561,7 +561,7 @@ function resolveBundledSkillsDir(opts = {}) {
561
561
  const execPath = opts.execPath ?? process.execPath;
562
562
  const execDir = path.dirname(execPath);
563
563
  const sibling = path.join(execDir, "skills");
564
- if (fs.existsSync(sibling)) return sibling;
564
+ if (syncFs.existsSync(sibling)) return sibling;
565
565
  } catch {}
566
566
  try {
567
567
  const moduleUrl = opts.moduleUrl ?? import.meta.url;
@@ -624,7 +624,7 @@ function resolvePluginSkillDirs(params) {
624
624
  const trimmed = raw.trim();
625
625
  if (!trimmed) continue;
626
626
  const candidate = path.resolve(record.rootDir, trimmed);
627
- if (!fs.existsSync(candidate)) {
627
+ if (!syncFs.existsSync(candidate)) {
628
628
  log.warn(`plugin skill path not found (${record.id}): ${candidate}`);
629
629
  continue;
630
630
  }
@@ -655,7 +655,7 @@ async function serializeByKey(key, task) {
655
655
 
656
656
  //#endregion
657
657
  //#region src/agents/skills/workspace.ts
658
- const fsp = fs.promises;
658
+ const fsp = syncFs.promises;
659
659
  const skillsLogger = createSubsystemLogger("skills");
660
660
  const skillCommandDebugOnce = /* @__PURE__ */ new Set();
661
661
  /**
@@ -732,7 +732,7 @@ function resolveSkillsLimits(config) {
732
732
  }
733
733
  function listChildDirectories(dir) {
734
734
  try {
735
- const entries = fs.readdirSync(dir, { withFileTypes: true });
735
+ const entries = syncFs.readdirSync(dir, { withFileTypes: true });
736
736
  const dirs = [];
737
737
  for (const entry of entries) {
738
738
  if (entry.name.startsWith(".")) continue;
@@ -743,7 +743,7 @@ function listChildDirectories(dir) {
743
743
  continue;
744
744
  }
745
745
  if (entry.isSymbolicLink()) try {
746
- if (fs.statSync(fullPath).isDirectory()) dirs.push(entry.name);
746
+ if (syncFs.statSync(fullPath).isDirectory()) dirs.push(entry.name);
747
747
  } catch {}
748
748
  }
749
749
  return dirs;
@@ -754,7 +754,7 @@ function listChildDirectories(dir) {
754
754
  function resolveNestedSkillsRoot(dir, opts) {
755
755
  const nested = path.join(dir, "skills");
756
756
  try {
757
- if (!fs.existsSync(nested) || !fs.statSync(nested).isDirectory()) return { baseDir: dir };
757
+ if (!syncFs.existsSync(nested) || !syncFs.statSync(nested).isDirectory()) return { baseDir: dir };
758
758
  } catch {
759
759
  return { baseDir: dir };
760
760
  }
@@ -763,7 +763,7 @@ function resolveNestedSkillsRoot(dir, opts) {
763
763
  const toScan = scanLimit === 0 ? [] : nestedDirs.slice(0, Math.min(nestedDirs.length, scanLimit));
764
764
  for (const name of toScan) {
765
765
  const skillMd = path.join(nested, name, "SKILL.md");
766
- if (fs.existsSync(skillMd)) return {
766
+ if (syncFs.existsSync(skillMd)) return {
767
767
  baseDir: nested,
768
768
  note: `Detected nested skills root at ${nested}`
769
769
  };
@@ -783,9 +783,9 @@ function loadSkillEntries(workspaceDir, opts) {
783
783
  const loadSkills = (params) => {
784
784
  const baseDir = resolveNestedSkillsRoot(params.dir, { maxEntriesToScan: limits.maxCandidatesPerRoot }).baseDir;
785
785
  const rootSkillMd = path.join(baseDir, "SKILL.md");
786
- if (fs.existsSync(rootSkillMd)) {
786
+ if (syncFs.existsSync(rootSkillMd)) {
787
787
  try {
788
- const size = fs.statSync(rootSkillMd).size;
788
+ const size = syncFs.statSync(rootSkillMd).size;
789
789
  if (size > limits.maxSkillFileBytes) {
790
790
  skillsLogger.warn("Skipping skills root due to oversized SKILL.md.", {
791
791
  dir: baseDir,
@@ -824,9 +824,9 @@ function loadSkillEntries(workspaceDir, opts) {
824
824
  for (const name of limitedChildren) {
825
825
  const skillDir = path.join(baseDir, name);
826
826
  const skillMd = path.join(skillDir, "SKILL.md");
827
- if (!fs.existsSync(skillMd)) continue;
827
+ if (!syncFs.existsSync(skillMd)) continue;
828
828
  try {
829
- const size = fs.statSync(skillMd).size;
829
+ const size = syncFs.statSync(skillMd).size;
830
830
  if (size > limits.maxSkillFileBytes) {
831
831
  skillsLogger.warn("Skipping skill due to oversized SKILL.md.", {
832
832
  skill: name,
@@ -894,7 +894,7 @@ function loadSkillEntries(workspaceDir, opts) {
894
894
  return Array.from(merged.values()).map((skill) => {
895
895
  let frontmatter = {};
896
896
  try {
897
- frontmatter = parseFrontmatter(fs.readFileSync(skill.filePath, "utf-8"));
897
+ frontmatter = parseFrontmatter(syncFs.readFileSync(skill.filePath, "utf-8"));
898
898
  } catch {}
899
899
  return {
900
900
  skill,
@@ -1,6 +1,6 @@
1
1
  import { u as resolveGatewayPort } from "./paths-BYr-iJJ9.js";
2
2
  import { f as isRich, n as info, p as theme } from "./globals-uLeGcRW1.js";
3
- import { C as listAgentsForGateway, Jt as resolveContextTokensForModel, Nr as peekSystemEvents, S as classifySessionKey, U as readRestartSentinel, W as summarizeRestartSentinel, _t as formatUsageReportLines, c as buildChannelSummary, d as resolveChannelAccountConfigured, f as resolveChannelAccountEnabled, gt as loadProviderUsageSummary, k as resolveSessionModelRef, l as buildChannelAccountSnapshot, u as formatChannelAllowFrom } from "./reply-OEcNPoWd.js";
3
+ import { C as listAgentsForGateway, Jt as resolveContextTokensForModel, Nr as peekSystemEvents, S as classifySessionKey, U as readRestartSentinel, W as summarizeRestartSentinel, _t as formatUsageReportLines, c as buildChannelSummary, d as resolveChannelAccountConfigured, f as resolveChannelAccountEnabled, gt as loadProviderUsageSummary, k as resolveSessionModelRef, l as buildChannelAccountSnapshot, u as formatChannelAllowFrom } from "./reply-CAA6gLtt.js";
4
4
  import { u as resolveAgentWorkspaceDir } from "./agent-scope-CiBV1K6b.js";
5
5
  import { T as parseAgentSessionKey } from "./session-key-C9z4VQtw.js";
6
6
  import { y as resolveOpenClawPackageRoot } from "./workspace-CRdln__H.js";
@@ -30,7 +30,7 @@ import { t as formatRuntimeStatusWithDetails } from "./runtime-status-DZoVtX5E.j
30
30
  import { t as readLastGatewayErrorLine } from "./diagnostics-Cl-0KyBB.js";
31
31
  import { t as renderTable } from "./table-C0joisBj.js";
32
32
  import { a as probeGateway, i as resolveGatewayProbeAuth$1, t as runSecurityAudit } from "./audit-Dgxdk59F.js";
33
- import { o as resolveHeartbeatSummaryForAgent, t as formatHealthChannelLines } from "./health-DaN3xECS.js";
33
+ import { o as resolveHeartbeatSummaryForAgent, t as formatHealthChannelLines } from "./health-CpbNiL9A.js";
34
34
  import { a as shouldShowUpdateStatus, i as resolveUpdateAvailability, n as formatUpdateOneLiner, r as getUpdateCheckResult, t as formatUpdateAvailableHint } from "./status.update-CMEQvQ5o.js";
35
35
  import { _ as resolveUpdateChannelDisplay, a as formatGitInstallLabel, h as normalizeUpdateChannel, n as checkUpdateStatus, t as resolveDefaultChannelAccountContext } from "./channel-account-context-kALkWZk9.js";
36
36
  import { t as resolveNodeService } from "./node-service-BQmqeLS0.js";
@@ -11,7 +11,7 @@ import { t as VERSION } from "./version-CGDNfh5C.js";
11
11
  import { t as buildWorkspaceSkillStatus } from "./skills-status-C1TG3OK0.js";
12
12
  import { X as resolveFreshSessionTotalTokens, o as loadSessionStore, tt as resolveMainSessionKey } from "./sessions-ChAmoyIS.js";
13
13
  import { n as listChannelPlugins } from "./plugins-BYHJoTB8.js";
14
- import { An as formatChannelAllowFrom, Cn as formatUsageReportLines, Ln as peekSystemEvents, Mn as resolveChannelAccountEnabled, Mt as summarizeRestartSentinel, On as buildChannelSummary, Sn as loadProviderUsageSummary, jn as resolveChannelAccountConfigured, jt as readRestartSentinel, kn as buildChannelAccountSnapshot } from "./subagent-registry-D4xGq2uc.js";
14
+ import { An as formatChannelAllowFrom, Cn as formatUsageReportLines, Ln as peekSystemEvents, Mn as resolveChannelAccountEnabled, Mt as summarizeRestartSentinel, On as buildChannelSummary, Sn as loadProviderUsageSummary, jn as resolveChannelAccountConfigured, jt as readRestartSentinel, kn as buildChannelAccountSnapshot } from "./subagent-registry-B4xJjOu2.js";
15
15
  import { c as resolveStorePath } from "./paths-CFzDnbY4.js";
16
16
  import { n as callGateway, t as buildGatewayConnectionDetails } from "./call-BolSRDlL.js";
17
17
  import { o as getTailnetHostname, s as readTailscaleStatusJson } from "./tailscale-BVIS18LB.js";
@@ -32,7 +32,7 @@ import { t as formatRuntimeStatusWithDetails } from "./runtime-status-CnEdVO5M.j
32
32
  import { t as readLastGatewayErrorLine } from "./diagnostics-D16lnwhz.js";
33
33
  import { t as renderTable } from "./table-9IueuXKv.js";
34
34
  import { a as probeGateway, i as resolveGatewayProbeAuth$1, t as runSecurityAudit } from "./audit-Dp7M6JvG.js";
35
- import { o as resolveHeartbeatSummaryForAgent, t as formatHealthChannelLines } from "./health-Gkd0akfz.js";
35
+ import { o as resolveHeartbeatSummaryForAgent, t as formatHealthChannelLines } from "./health-Cjj_F37M.js";
36
36
  import { a as shouldShowUpdateStatus, i as resolveUpdateAvailability, n as formatUpdateOneLiner, r as getUpdateCheckResult, t as formatUpdateAvailableHint } from "./status.update-BX7tZJju.js";
37
37
  import { _ as resolveUpdateChannelDisplay, a as formatGitInstallLabel, h as normalizeUpdateChannel, n as checkUpdateStatus, t as resolveDefaultChannelAccountContext } from "./channel-account-context-DSofwLgp.js";
38
38
  import { t as resolveNodeService } from "./node-service-B10h5Sui.js";
@@ -1,5 +1,5 @@
1
- import { p as resolveConfigDir } from "./utils-Bo1RFF0l.js";
2
- import { c as detectMime, l as extensionForMime } from "./image-ops-jvmQoiyw.js";
1
+ import { p as resolveConfigDir } from "./utils-BFZnl-5N.js";
2
+ import { c as detectMime, l as extensionForMime } from "./image-ops-DCpyia_K.js";
3
3
  import fs from "node:fs/promises";
4
4
  import path from "node:path";
5
5
  import crypto from "node:crypto";
@@ -9,14 +9,14 @@ import { t as formatCliCommand } from "./command-format-CVXyxgq3.js";
9
9
  import { _ as resolveAgentModelPrimaryValue, a as resolveAgentDir, d as resolveDefaultAgentId, f as resolveEffectiveModelFallbacks, g as resolveAgentModelFallbackValues, h as resolveSessionAgentIds, i as resolveAgentConfig, l as resolveAgentSkillsFilter, m as resolveSessionAgentId, p as resolveRunModelFallbacksOverride, r as listAgentIds, t as hasConfiguredModelFallbacks, u as resolveAgentWorkspaceDir, v as toAgentModelListLike } from "./agent-scope-CJelRKYY.js";
10
10
  import { C as isCronSessionKey, E as resolveThreadParentSessionKey, T as parseAgentSessionKey, _ as normalizeOptionalAccountId, b as getSubagentDepth, c as normalizeAgentId, d as resolveThreadSessionKeys, f as sanitizeAgentId, g as normalizeAccountId$2, h as DEFAULT_ACCOUNT_ID, l as normalizeMainKey, o as classifySessionKeyShape, r as buildAgentMainSessionKey, s as isValidAgentId, t as DEFAULT_AGENT_ID, u as resolveAgentIdFromSessionKey, v as isBlockedObjectKey, w as isSubagentSessionKey, x as isAcpSessionKey, y as deriveSessionChatType } from "./session-key-BLprDJYq.js";
11
11
  import { C as sliceUtf16Safe, E as isPlainObject, S as sleep$1, T as truncateUtf16Safe, b as shortenHomeInString, c as escapeRegExp, p as normalizeE164, r as clampInt, t as CONFIG_DIR, u as isRecord$1, v as resolveUserPath, x as shortenHomePath } from "./utils-DIzy5B5o.js";
12
- import { C as openBoundaryFileSync, N as normalizeWindowsPathForComparison, S as openBoundaryFile, a as DEFAULT_IDENTITY_FILENAME, d as ensureAgentWorkspace, f as filterBootstrapFilesForSession, g as resolveWorkspaceAttachmentsRoot, m as loadWorkspaceBootstrapFiles, n as DEFAULT_AGENT_WORKSPACE_DIR, r as DEFAULT_BOOTSTRAP_FILENAME, y as resolveOpenClawPackageRoot } from "./workspace-BHfqkuYN.js";
12
+ import { A as isNotFoundPathError, C as openBoundaryFileSync, N as normalizeWindowsPathForComparison, S as openBoundaryFile, a as DEFAULT_IDENTITY_FILENAME, d as ensureAgentWorkspace, f as filterBootstrapFilesForSession, g as resolveWorkspaceAttachmentsRoot, j as isPathInside, k as hasNodeErrorCode, m as loadWorkspaceBootstrapFiles, n as DEFAULT_AGENT_WORKSPACE_DIR, r as DEFAULT_BOOTSTRAP_FILENAME, y as resolveOpenClawPackageRoot } from "./workspace-BHfqkuYN.js";
13
13
  import { i as logWarn, n as logError, r as logInfo, t as logDebug } from "./logger-BJMfryJd.js";
14
14
  import { n as runExec, r as spawnWithFallback, t as runCommandWithTimeout } from "./exec-CEAvKSx9.js";
15
15
  import { a as saveJsonFile, i as loadJsonFile } from "./github-copilot-token-CulJ9J5l.js";
16
16
  import { n as isDangerousHostEnvVarName } from "./host-env-security-CJMD0__Z.js";
17
17
  import { t as VERSION } from "./version-CGDNfh5C.js";
18
18
  import { E as triggerInternalHook, S as matchPluginCommand, _ as normalizePluginHttpPath, b as getPluginCommandSpecs, c as normalizeChannelId$1, d as getActivePluginRegistryKey, g as createPluginRegistry, m as setActivePluginRegistry, n as CHAT_CHANNEL_ORDER, p as requireActivePluginRegistry, s as normalizeAnyChannelId, u as getActivePluginRegistry, v as clearPluginCommands, w as createInternalHookEvent, x as listPluginCommands, y as executePluginCommand } from "./registry-7fg1BnMw.js";
19
- import { a as safeStatSync, d as normalizePluginsConfig, f as resolveEffectiveEnableState, i as isPathInside, l as applyTestPluginDefaults, n as loadPluginManifestRegistry, p as resolveMemorySlotDecision, r as discoverOpenClawPlugins } from "./manifest-registry-Kbw8YPsZ.js";
19
+ import { a as safeStatSync, d as normalizePluginsConfig, f as resolveEffectiveEnableState, i as isPathInside$1, l as applyTestPluginDefaults, n as loadPluginManifestRegistry, p as resolveMemorySlotDecision, r as discoverOpenClawPlugins } from "./manifest-registry-Kbw8YPsZ.js";
20
20
  import { a as resolveChannelGroupRequireMention, c as normalizeHyphenSlug, i as resolveChannelGroupPolicy, l as normalizeStringEntries, n as listChannelDocks, r as normalizeSignalMessagingTarget, s as normalizeAtHashSlug, t as getChannelDock, u as normalizeStringEntriesLower } from "./dock-DXBor-4C.js";
21
21
  import { t as runTasksWithConcurrency } from "./run-with-concurrency-kzSMVKJz.js";
22
22
  import { n as recordCommandPoll, r as resetCommandPollCount } from "./command-poll-backoff-KDiSpWTU.js";
@@ -53795,7 +53795,7 @@ function createOutboundSendDepsFromCliSource(deps) {
53795
53795
  function createDefaultDeps() {
53796
53796
  return {
53797
53797
  sendMessageWhatsApp: async (...args) => {
53798
- const { sendMessageWhatsApp } = await import("./web-CQqnJkMB.js");
53798
+ const { sendMessageWhatsApp } = await import("./web-BCpNE4aE.js");
53799
53799
  return await sendMessageWhatsApp(...args);
53800
53800
  },
53801
53801
  sendMessageTelegram: async (...args) => {
@@ -72047,7 +72047,7 @@ function loadWebLoginQr() {
72047
72047
  return webLoginQrPromise;
72048
72048
  }
72049
72049
  function loadWebChannel() {
72050
- webChannelPromise ??= import("./web-CQqnJkMB.js");
72050
+ webChannelPromise ??= import("./web-BCpNE4aE.js");
72051
72051
  return webChannelPromise;
72052
72052
  }
72053
72053
  function loadWhatsAppActions() {
@@ -72645,7 +72645,7 @@ function addPathToMatcher(matcher, rawPath) {
72645
72645
  }
72646
72646
  function matchesPathMatcher(matcher, sourcePath) {
72647
72647
  if (matcher.exact.has(sourcePath)) return true;
72648
- return matcher.dirs.some((dirPath) => isPathInside(dirPath, sourcePath));
72648
+ return matcher.dirs.some((dirPath) => isPathInside$1(dirPath, sourcePath));
72649
72649
  }
72650
72650
  function buildProvenanceIndex(params) {
72651
72651
  const loadPathMatcher = createPathMatcher();
@@ -74001,6 +74001,82 @@ function stripReadTruncationContentDetails(result) {
74001
74001
  }
74002
74002
  };
74003
74003
  }
74004
+ function extractRequestedReadPath(record) {
74005
+ const trimmed = (typeof record?.path === "string" ? record.path : typeof record?.file_path === "string" ? record.file_path : void 0)?.trim();
74006
+ return trimmed ? trimmed : void 0;
74007
+ }
74008
+ function normalizeReadPathCandidate(filePath) {
74009
+ const trimmed = filePath.trim();
74010
+ const withoutAt = trimmed.startsWith("@") ? trimmed.slice(1) : trimmed;
74011
+ if (/^file:\/\//i.test(withoutAt)) try {
74012
+ return fileURLToPath(withoutAt);
74013
+ } catch {
74014
+ return withoutAt;
74015
+ }
74016
+ return withoutAt;
74017
+ }
74018
+ function normalizeRelativeReadPath(filePath) {
74019
+ return filePath.replace(/\\/g, "/").replace(/^(?:\.\/)+/, "").replace(/^\/+/, "").replace(/\/+$/, "");
74020
+ }
74021
+ function getReadPathRelativeToWorkspace(filePath, workspaceRoot) {
74022
+ const normalized = normalizeReadPathCandidate(filePath);
74023
+ if (!path.isAbsolute(normalized)) return normalizeRelativeReadPath(normalized);
74024
+ if (!workspaceRoot) return;
74025
+ const root = path.resolve(workspaceRoot);
74026
+ const resolved = path.resolve(normalized);
74027
+ if (!isPathInside(root, resolved)) return;
74028
+ return normalizeRelativeReadPath(path.relative(root, resolved));
74029
+ }
74030
+ function isMemoryReadPath(filePath, workspaceRoot) {
74031
+ const relative = getReadPathRelativeToWorkspace(filePath, workspaceRoot);
74032
+ return relative === "memory" || Boolean(relative?.startsWith("memory/"));
74033
+ }
74034
+ function resolveReadPathWithinWorkspace(filePath, workspaceRoot) {
74035
+ if (!workspaceRoot) return;
74036
+ const normalized = normalizeReadPathCandidate(filePath);
74037
+ const resolved = path.isAbsolute(normalized) ? path.resolve(normalized) : path.resolve(workspaceRoot, normalized);
74038
+ return isPathInside(path.resolve(workspaceRoot), resolved) ? resolved : void 0;
74039
+ }
74040
+ function createMemoryDirectoryReadResult(filePath) {
74041
+ return {
74042
+ content: [{
74043
+ type: "text",
74044
+ text: `${filePath} is a directory, not a file. Read a specific file such as MEMORY.md or memory/YYYY-MM-DD.md instead.`
74045
+ }],
74046
+ details: {}
74047
+ };
74048
+ }
74049
+ function createMissingMemoryReadResult(filePath) {
74050
+ return {
74051
+ content: [{
74052
+ type: "text",
74053
+ text: `No memory file exists at ${filePath} yet. Continue normally, or create a file such as memory/YYYY-MM-DD.md when you want to save notes.`
74054
+ }],
74055
+ details: {}
74056
+ };
74057
+ }
74058
+ async function maybeCreateMemoryReadCompatibilityResult(params) {
74059
+ if (!isMemoryReadPath(params.filePath, params.workspaceRoot)) return null;
74060
+ const absolutePath = resolveReadPathWithinWorkspace(params.filePath, params.workspaceRoot);
74061
+ if (!absolutePath) return null;
74062
+ try {
74063
+ if ((await fs$1.stat(absolutePath)).isDirectory()) return createMemoryDirectoryReadResult(params.filePath);
74064
+ return null;
74065
+ } catch (error) {
74066
+ if (isNotFoundPathError(error)) return createMissingMemoryReadResult(params.filePath);
74067
+ throw error;
74068
+ }
74069
+ }
74070
+ function maybeRecoverMemoryReadError(params) {
74071
+ if (!isMemoryReadPath(params.filePath, params.workspaceRoot)) return null;
74072
+ if (params.error instanceof SafeOpenError) {
74073
+ if (params.error.code === "not-file") return createMemoryDirectoryReadResult(params.filePath);
74074
+ if (params.error.code === "not-found") return createMissingMemoryReadResult(params.filePath);
74075
+ }
74076
+ if (hasNodeErrorCode(params.error, "EISDIR")) return createMemoryDirectoryReadResult(params.filePath);
74077
+ if (isNotFoundPathError(params.error)) return createMissingMemoryReadResult(params.filePath);
74078
+ return null;
74079
+ }
74004
74080
  async function executeReadWithAdaptivePaging(params) {
74005
74081
  const userLimit = params.args.limit;
74006
74082
  if (typeof userLimit === "number" && Number.isFinite(userLimit) && userLimit > 0) return await params.base.execute(params.toolCallId, params.args, params.signal);
@@ -74276,7 +74352,8 @@ function wrapToolWorkspaceRootGuardWithOptions(tool, root, options) {
74276
74352
  function createSandboxedReadTool(params) {
74277
74353
  return createOpenClawReadTool(createReadTool(params.root, { operations: createSandboxReadOperations(params) }), {
74278
74354
  modelContextWindowTokens: params.modelContextWindowTokens,
74279
- imageSanitization: params.imageSanitization
74355
+ imageSanitization: params.imageSanitization,
74356
+ workspaceRoot: params.root
74280
74357
  });
74281
74358
  }
74282
74359
  function createSandboxedWriteTool(params) {
@@ -74342,14 +74419,30 @@ function createOpenClawReadTool(base, options) {
74342
74419
  const normalized = normalizeToolParams(params);
74343
74420
  const record = normalized ?? (params && typeof params === "object" ? params : void 0);
74344
74421
  assertRequiredParams(record, CLAUDE_PARAM_GROUPS.read, base.name);
74345
- const result = await executeReadWithAdaptivePaging({
74346
- base,
74347
- toolCallId,
74348
- args: normalized ?? params ?? {},
74349
- signal,
74350
- maxBytes: resolveAdaptiveReadMaxBytes(options)
74351
- });
74352
- const filePath = typeof record?.path === "string" ? String(record.path) : "<unknown>";
74422
+ const filePath = extractRequestedReadPath(record) ?? "<unknown>";
74423
+ const memoryCompatibilityResult = filePath !== "<unknown>" ? await maybeCreateMemoryReadCompatibilityResult({
74424
+ filePath,
74425
+ workspaceRoot: options?.workspaceRoot
74426
+ }) : null;
74427
+ if (memoryCompatibilityResult) return memoryCompatibilityResult;
74428
+ let result;
74429
+ try {
74430
+ result = await executeReadWithAdaptivePaging({
74431
+ base,
74432
+ toolCallId,
74433
+ args: normalized ?? params ?? {},
74434
+ signal,
74435
+ maxBytes: resolveAdaptiveReadMaxBytes(options)
74436
+ });
74437
+ } catch (error) {
74438
+ const recovered = filePath !== "<unknown>" ? maybeRecoverMemoryReadError({
74439
+ filePath,
74440
+ workspaceRoot: options?.workspaceRoot,
74441
+ error
74442
+ }) : null;
74443
+ if (recovered) return recovered;
74444
+ throw error;
74445
+ }
74353
74446
  return sanitizeToolResultImages(await normalizeReadImageResult(stripReadTruncationContentDetails(result), filePath), `read:${filePath}`, options?.imageSanitization);
74354
74447
  }
74355
74448
  };
@@ -75115,7 +75208,8 @@ function createOpenClawCodingTools(options) {
75115
75208
  }
75116
75209
  const wrapped = createOpenClawReadTool(createReadTool(workspaceRoot), {
75117
75210
  modelContextWindowTokens: options?.modelContextWindowTokens,
75118
- imageSanitization
75211
+ imageSanitization,
75212
+ workspaceRoot
75119
75213
  });
75120
75214
  return [workspaceOnly ? wrapToolWorkspaceRootGuard(wrapped, workspaceRoot) : wrapped];
75121
75215
  }
@@ -1,7 +1,7 @@
1
- import { r as resolveConfigPath } from "./paths-DKuX7-1L.js";
1
+ import { r as resolveConfigPath } from "./paths-aGRLvQx9.js";
2
2
  import os from "node:os";
3
3
  import path from "node:path";
4
- import fs from "node:fs";
4
+ import syncFs from "node:fs";
5
5
  import chalk, { Chalk } from "chalk";
6
6
  import { Logger } from "tslog";
7
7
  import JSON5 from "json5";
@@ -54,15 +54,15 @@ function getCommandPathInternal(argv, depth, opts) {
54
54
  //#endregion
55
55
  //#region src/infra/tmp-openclaw-dir.ts
56
56
  const POSIX_OPENCLAW_TMP_DIR = "/tmp/openclaw";
57
- const TMP_DIR_ACCESS_MODE = fs.constants.W_OK | fs.constants.X_OK;
57
+ const TMP_DIR_ACCESS_MODE = syncFs.constants.W_OK | syncFs.constants.X_OK;
58
58
  function isNodeErrorWithCode(err, code) {
59
59
  return typeof err === "object" && err !== null && "code" in err && err.code === code;
60
60
  }
61
61
  function resolvePreferredOpenClawTmpDir(options = {}) {
62
- const accessSync = options.accessSync ?? fs.accessSync;
63
- const chmodSync = options.chmodSync ?? fs.chmodSync;
64
- const lstatSync = options.lstatSync ?? fs.lstatSync;
65
- const mkdirSync = options.mkdirSync ?? fs.mkdirSync;
62
+ const accessSync = options.accessSync ?? syncFs.accessSync;
63
+ const chmodSync = options.chmodSync ?? syncFs.chmodSync;
64
+ const lstatSync = options.lstatSync ?? syncFs.lstatSync;
65
+ const mkdirSync = options.mkdirSync ?? syncFs.mkdirSync;
66
66
  const warn = options.warn ?? ((message) => console.warn(message));
67
67
  const getuid = options.getuid ?? (() => {
68
68
  try {
@@ -155,8 +155,8 @@ function resolvePreferredOpenClawTmpDir(options = {}) {
155
155
  function readLoggingConfig() {
156
156
  const configPath = resolveConfigPath();
157
157
  try {
158
- if (!fs.existsSync(configPath)) return;
159
- const raw = fs.readFileSync(configPath, "utf-8");
158
+ if (!syncFs.existsSync(configPath)) return;
159
+ const raw = syncFs.readFileSync(configPath, "utf-8");
160
160
  const logging = JSON5.parse(raw)?.logging;
161
161
  if (!logging || typeof logging !== "object" || Array.isArray(logging)) return;
162
162
  return logging;
@@ -344,7 +344,7 @@ function buildLogger(settings) {
344
344
  for (const transport of externalTransports) attachExternalTransport(logger, transport);
345
345
  return logger;
346
346
  }
347
- fs.mkdirSync(path.dirname(settings.file), { recursive: true });
347
+ syncFs.mkdirSync(path.dirname(settings.file), { recursive: true });
348
348
  if (isRollingPath(settings.file)) pruneOldRollingLogs(path.dirname(settings.file));
349
349
  let currentFileBytes = getCurrentLogFileBytes(settings.file);
350
350
  let warnedAboutSizeCap = false;
@@ -383,14 +383,14 @@ function resolveMaxLogFileBytes(raw) {
383
383
  }
384
384
  function getCurrentLogFileBytes(file) {
385
385
  try {
386
- return fs.statSync(file).size;
386
+ return syncFs.statSync(file).size;
387
387
  } catch {
388
388
  return 0;
389
389
  }
390
390
  }
391
391
  function appendLogLine(file, line) {
392
392
  try {
393
- fs.appendFileSync(file, line, { encoding: "utf8" });
393
+ syncFs.appendFileSync(file, line, { encoding: "utf8" });
394
394
  return true;
395
395
  } catch {
396
396
  return false;
@@ -442,14 +442,14 @@ function isRollingPath(file) {
442
442
  }
443
443
  function pruneOldRollingLogs(dir) {
444
444
  try {
445
- const entries = fs.readdirSync(dir, { withFileTypes: true });
445
+ const entries = syncFs.readdirSync(dir, { withFileTypes: true });
446
446
  const cutoff = Date.now() - MAX_LOG_AGE_MS;
447
447
  for (const entry of entries) {
448
448
  if (!entry.isFile()) continue;
449
449
  if (!entry.name.startsWith(`${LOG_PREFIX}-`) || !entry.name.endsWith(LOG_SUFFIX)) continue;
450
450
  const fullPath = path.join(dir, entry.name);
451
451
  try {
452
- if (fs.statSync(fullPath).mtimeMs < cutoff) fs.rmSync(fullPath, { force: true });
452
+ if (syncFs.statSync(fullPath).mtimeMs < cutoff) syncFs.rmSync(fullPath, { force: true });
453
453
  } catch {}
454
454
  }
455
455
  } catch {}
@@ -1,4 +1,4 @@
1
- import { r as markdownToIRWithMeta } from "./ir-pR36nI-3.js";
1
+ import { r as markdownToIRWithMeta } from "./ir-DcDVAFj3.js";
2
2
  import { t as renderMarkdownWithMarkers } from "./render-flG67HhW.js";
3
3
 
4
4
  //#region src/markdown/tables.ts
@@ -1,5 +1,5 @@
1
- import { c as detectMime } from "./image-ops-jvmQoiyw.js";
2
- import { r as sanitizeToolResultImages } from "./tool-images-DiKIlElg.js";
1
+ import { c as detectMime } from "./image-ops-DCpyia_K.js";
2
+ import { r as sanitizeToolResultImages } from "./tool-images-ArXzv82F.js";
3
3
  import fs from "node:fs/promises";
4
4
 
5
5
  //#region src/agents/tools/common.ts
@@ -1,4 +1,4 @@
1
- import { o as escapeRegExp } from "./utils-Bo1RFF0l.js";
1
+ import { o as escapeRegExp } from "./utils-BFZnl-5N.js";
2
2
 
3
3
  //#region src/auto-reply/tokens.ts
4
4
  const HEARTBEAT_TOKEN = "HEARTBEAT_OK";
@@ -1,5 +1,5 @@
1
- import { t as createSubsystemLogger } from "./subsystem-CAatx5oo.js";
2
- import { i as getImageMetadata, n as buildImageResizeSideGrid, s as resizeToJpeg, t as IMAGE_REDUCE_QUALITY_STEPS } from "./image-ops-jvmQoiyw.js";
1
+ import { t as createSubsystemLogger } from "./subsystem-BRjuJbbM.js";
2
+ import { i as getImageMetadata, n as buildImageResizeSideGrid, s as resizeToJpeg, t as IMAGE_REDUCE_QUALITY_STEPS } from "./image-ops-DCpyia_K.js";
3
3
 
4
4
  //#region src/media/base64.ts
5
5
  function estimateBase64DecodedBytes(base64) {
@@ -1,6 +1,6 @@
1
- import "./paths-DKuX7-1L.js";
2
- import { t as createSubsystemLogger } from "./subsystem-CAatx5oo.js";
3
- import { C as isPlainObject } from "./utils-Bo1RFF0l.js";
1
+ import "./paths-aGRLvQx9.js";
2
+ import { t as createSubsystemLogger } from "./subsystem-BRjuJbbM.js";
3
+ import { C as isPlainObject } from "./utils-BFZnl-5N.js";
4
4
  import { createHash } from "node:crypto";
5
5
 
6
6
  //#region src/agents/tool-loop-detection.ts
@@ -2,7 +2,7 @@ import { S as resolveCliName, g as resolveStateDir, n as DEFAULT_GATEWAY_PORT, u
2
2
  import { p as theme } from "./globals-uLeGcRW1.js";
3
3
  import { h as pathExists } from "./utils-CP51tiAi.js";
4
4
  import "./thinking-44rmAw5o.js";
5
- import { G as trimLogTail } from "./reply-OEcNPoWd.js";
5
+ import { G as trimLogTail } from "./reply-CAA6gLtt.js";
6
6
  import "./agent-scope-CiBV1K6b.js";
7
7
  import { d as defaultRuntime } from "./subsystem-BT74-yyS.js";
8
8
  import { y as resolveOpenClawPackageRoot } from "./workspace-CRdln__H.js";
@@ -122,7 +122,7 @@ import { f as resolveGatewaySystemdServiceName, l as resolveGatewayLaunchAgentLa
122
122
  import "./constants-BJMtcGm_.js";
123
123
  import "./context-window-guard-DfLcl4Sl.js";
124
124
  import { r as parseSemver } from "./runtime-guard-IbCMXYfp.js";
125
- import "./program-context-BJQXRZ1w.js";
125
+ import "./program-context-XIBDpYkH.js";
126
126
  import "./skills-status-CXKKJa9Q.js";
127
127
  import { n as inheritOptionFromParent } from "./command-options-CfGhT1Of.js";
128
128
  import "./note-CvWjGRTD.js";
@@ -132,7 +132,7 @@ import "./skill-scanner-ew2xZjjk.js";
132
132
  import "./installs-DOXDa0sd.js";
133
133
  import { n as formatConfigIssueLines } from "./issue-format-DTqjZOjH.js";
134
134
  import "./channels-status-issues-9pCBFmqu.js";
135
- import { r as installCompletion } from "./completion-cli-BDeiV4p9.js";
135
+ import { r as installCompletion } from "./completion-cli-CgjnsXtn.js";
136
136
  import "./daemon-install-helpers-BM1DaOy4.js";
137
137
  import "./systemd-BeNGyFHw.js";
138
138
  import { t as resolveGatewayService } from "./service-Y993dKjs.js";
@@ -141,19 +141,19 @@ import "./systemd-hints-CO2qXbpI.js";
141
141
  import { a as terminateStaleGatewayPids, i as renderRestartDiagnostics, o as waitForGatewayHealthyRestart, r as runDaemonRestart, s as runDaemonInstall } from "./daemon-cli-CjCAIJRC.js";
142
142
  import "./diagnostics-Cl-0KyBB.js";
143
143
  import { t as renderTable } from "./table-C0joisBj.js";
144
- import "./health-DaN3xECS.js";
144
+ import "./health-CpbNiL9A.js";
145
145
  import "./control-ui-assets-Cj27cPhO.js";
146
146
  import { a as shouldShowUpdateStatus, i as resolveUpdateAvailability, n as formatUpdateOneLiner, t as formatUpdateAvailableHint } from "./status.update-CMEQvQ5o.js";
147
147
  import { _ as resolveUpdateChannelDisplay, c as DEFAULT_GIT_CHANNEL, d as channelToNpmTag, f as formatUpdateChannelLabel, g as resolveEffectiveUpdateChannel, h as normalizeUpdateChannel, i as fetchNpmTagVersion, l as DEFAULT_PACKAGE_CHANNEL, n as checkUpdateStatus, o as resolveNpmChannelTag, r as compareSemverStrings } from "./channel-account-context-kALkWZk9.js";
148
- import { a as globalInstallArgs, c as readPackageName, i as detectGlobalInstallManagerForRoot, l as readPackageVersion, n as cleanupGlobalRenameDirs, o as resolveGlobalPackageRoot, r as detectGlobalInstallManagerByPresence, s as normalizePackageTagInput, t as runGatewayUpdate } from "./update-runner-D5vyQGte.js";
148
+ import { a as globalInstallArgs, c as readPackageName, i as detectGlobalInstallManagerForRoot, l as readPackageVersion, n as cleanupGlobalRenameDirs, o as resolveGlobalPackageRoot, r as detectGlobalInstallManagerByPresence, s as normalizePackageTagInput, t as runGatewayUpdate } from "./update-runner-C4bLqctv.js";
149
149
  import "./logging-DUqFcGxI.js";
150
150
  import { n as updateNpmInstalledPlugins, t as syncPluginsForUpdateChannel } from "./update-CaU7_eQx.js";
151
151
  import "./doctor-config-flow-CiAsN7mG.js";
152
152
  import "./oauth-tls-preflight-Di_O2hPI.js";
153
153
  import "./systemd-linger-iDZhUJvT.js";
154
154
  import "./health-format-Cp-jlwLm.js";
155
- import { n as doctorCommand, t as selectStyled } from "./prompt-select-styled-QH4mD93d.js";
156
- import { r as ensureCompletionCacheExists, t as checkShellCompletionStatus } from "./doctor-completion-Bim4XRFT.js";
155
+ import { n as doctorCommand, t as selectStyled } from "./prompt-select-styled-CSGsMtmW.js";
156
+ import { r as ensureCompletionCacheExists, t as checkShellCompletionStatus } from "./doctor-completion-CACrVkvp.js";
157
157
  import os from "node:os";
158
158
  import path from "node:path";
159
159
  import fs from "node:fs/promises";
@@ -32,7 +32,7 @@ import "./accounts-C0g5--0e.js";
32
32
  import "./bindings-C2tByF8e.js";
33
33
  import "./send-BaweV9LV.js";
34
34
  import "./send-aCOVuBQ6.js";
35
- import { Nt as trimLogTail } from "./subagent-registry-D4xGq2uc.js";
35
+ import { Nt as trimLogTail } from "./subagent-registry-B4xJjOu2.js";
36
36
  import "./paths-CFzDnbY4.js";
37
37
  import "./chat-envelope-AUuZAcrC.js";
38
38
  import "./client-D3Y8sx9i.js";
@@ -131,9 +131,9 @@ import "./skill-scanner-CSmiOSFd.js";
131
131
  import "./installs-B-WNFE2v.js";
132
132
  import { n as formatConfigIssueLines } from "./issue-format-Bm-71lmf.js";
133
133
  import "./channels-status-issues-ib5LY9cR.js";
134
- import { r as installCompletion } from "./completion-cli-lZ6S6oKA.js";
135
- import "./register.subclis-BSGvOwqU.js";
136
- import "./command-registry-BSN6zVlZ.js";
134
+ import { r as installCompletion } from "./completion-cli-Clj1_156.js";
135
+ import "./register.subclis-lEqV1Knw.js";
136
+ import "./command-registry-CjTwwZuF.js";
137
137
  import "./program-context-BqyLhTGk.js";
138
138
  import "./daemon-install-helpers-DJg83rPu.js";
139
139
  import { r as parseSemver } from "./runtime-guard-DzZMAUj_.js";
@@ -144,19 +144,19 @@ import "./systemd-hints-BtHGM1Jb.js";
144
144
  import { a as terminateStaleGatewayPids, i as renderRestartDiagnostics, o as waitForGatewayHealthyRestart, r as runDaemonRestart, s as runDaemonInstall } from "./daemon-cli-SPY75752.js";
145
145
  import "./diagnostics-D16lnwhz.js";
146
146
  import { t as renderTable } from "./table-9IueuXKv.js";
147
- import "./health-Gkd0akfz.js";
147
+ import "./health-Cjj_F37M.js";
148
148
  import "./control-ui-assets-CTp_YbTN.js";
149
149
  import { a as shouldShowUpdateStatus, i as resolveUpdateAvailability, n as formatUpdateOneLiner, t as formatUpdateAvailableHint } from "./status.update-BX7tZJju.js";
150
150
  import { _ as resolveUpdateChannelDisplay, c as DEFAULT_GIT_CHANNEL, d as channelToNpmTag, f as formatUpdateChannelLabel, g as resolveEffectiveUpdateChannel, h as normalizeUpdateChannel, i as fetchNpmTagVersion, l as DEFAULT_PACKAGE_CHANNEL, n as checkUpdateStatus, o as resolveNpmChannelTag, r as compareSemverStrings } from "./channel-account-context-DSofwLgp.js";
151
- import { a as globalInstallArgs, c as readPackageName, i as detectGlobalInstallManagerForRoot, l as readPackageVersion, n as cleanupGlobalRenameDirs, o as resolveGlobalPackageRoot, r as detectGlobalInstallManagerByPresence, s as normalizePackageTagInput, t as runGatewayUpdate } from "./update-runner-BUth8QlB.js";
151
+ import { a as globalInstallArgs, c as readPackageName, i as detectGlobalInstallManagerForRoot, l as readPackageVersion, n as cleanupGlobalRenameDirs, o as resolveGlobalPackageRoot, r as detectGlobalInstallManagerByPresence, s as normalizePackageTagInput, t as runGatewayUpdate } from "./update-runner-DGqZqXVF.js";
152
152
  import "./logging-CmPhQ5QB.js";
153
153
  import { n as updateNpmInstalledPlugins, t as syncPluginsForUpdateChannel } from "./update-Cn9hdCvW.js";
154
154
  import "./doctor-config-flow-DhnDuMG9.js";
155
155
  import "./oauth-tls-preflight-DLADeojn.js";
156
156
  import "./systemd-linger-CTeOH7Nl.js";
157
157
  import "./health-format-rPE0ELW5.js";
158
- import { n as doctorCommand, t as selectStyled } from "./prompt-select-styled-asxoqY78.js";
159
- import { r as ensureCompletionCacheExists, t as checkShellCompletionStatus } from "./doctor-completion-BKCOmkBi.js";
158
+ import { n as doctorCommand, t as selectStyled } from "./prompt-select-styled-CxcE42jh.js";
159
+ import { r as ensureCompletionCacheExists, t as checkShellCompletionStatus } from "./doctor-completion-BoZbJ2cC.js";
160
160
  import { spawn, spawnSync } from "node:child_process";
161
161
  import path from "node:path";
162
162
  import os from "node:os";