@openclaw/openshell-sandbox 2026.9.5 → 2026.9.7

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 (1189) hide show
  1. package/assets/icon.png +0 -0
  2. package/dist/index.js +85 -271
  3. package/node_modules/@openclaw/fs-safe/CHANGELOG.md +304 -0
  4. package/node_modules/@openclaw/fs-safe/README.md +68 -15
  5. package/node_modules/@openclaw/fs-safe/dist/absolute-path.d.ts +0 -1
  6. package/node_modules/@openclaw/fs-safe/dist/absolute-path.js +2 -8
  7. package/node_modules/@openclaw/fs-safe/dist/advanced.d.ts +12 -4
  8. package/node_modules/@openclaw/fs-safe/dist/advanced.js +7 -2
  9. package/node_modules/@openclaw/fs-safe/dist/archive-crc32.d.ts +0 -1
  10. package/node_modules/@openclaw/fs-safe/dist/archive-deadline.d.ts +0 -1
  11. package/node_modules/@openclaw/fs-safe/dist/archive-deadline.js +22 -23
  12. package/node_modules/@openclaw/fs-safe/dist/archive-durability.d.ts +1 -2
  13. package/node_modules/@openclaw/fs-safe/dist/archive-durability.js +1 -1
  14. package/node_modules/@openclaw/fs-safe/dist/archive-entry.d.ts +0 -1
  15. package/node_modules/@openclaw/fs-safe/dist/archive-errors.d.ts +0 -1
  16. package/node_modules/@openclaw/fs-safe/dist/archive-gzip-tail.d.ts +0 -1
  17. package/node_modules/@openclaw/fs-safe/dist/archive-input.d.ts +0 -1
  18. package/node_modules/@openclaw/fs-safe/dist/archive-kind.d.ts +0 -2
  19. package/node_modules/@openclaw/fs-safe/dist/archive-kind.js +5 -17
  20. package/node_modules/@openclaw/fs-safe/dist/archive-limits.d.ts +0 -1
  21. package/node_modules/@openclaw/fs-safe/dist/archive-merge.d.ts +3 -4
  22. package/node_modules/@openclaw/fs-safe/dist/archive-merge.js +130 -54
  23. package/node_modules/@openclaw/fs-safe/dist/archive-parser-errors.d.ts +0 -1
  24. package/node_modules/@openclaw/fs-safe/dist/archive-parser.wasm +0 -0
  25. package/node_modules/@openclaw/fs-safe/dist/archive-plan.d.ts +67 -2
  26. package/node_modules/@openclaw/fs-safe/dist/archive-plan.js +86 -22
  27. package/node_modules/@openclaw/fs-safe/dist/archive-read.d.ts +0 -1
  28. package/node_modules/@openclaw/fs-safe/dist/archive-read.js +16 -26
  29. package/node_modules/@openclaw/fs-safe/dist/archive-staging.d.ts +1 -3
  30. package/node_modules/@openclaw/fs-safe/dist/archive-staging.js +3 -3
  31. package/node_modules/@openclaw/fs-safe/dist/archive-tar-stream.d.ts +3 -1
  32. package/node_modules/@openclaw/fs-safe/dist/archive-tar-stream.js +56 -37
  33. package/node_modules/@openclaw/fs-safe/dist/archive-tar-wasm.d.ts +17 -6
  34. package/node_modules/@openclaw/fs-safe/dist/archive-tar-wasm.js +134 -34
  35. package/node_modules/@openclaw/fs-safe/dist/archive-zip-admission.d.ts +0 -1
  36. package/node_modules/@openclaw/fs-safe/dist/archive-zip-count.d.ts +0 -1
  37. package/node_modules/@openclaw/fs-safe/dist/archive-zip-count.js +21 -1
  38. package/node_modules/@openclaw/fs-safe/dist/archive-zip-directory.d.ts +5 -2
  39. package/node_modules/@openclaw/fs-safe/dist/archive-zip-directory.js +29 -1
  40. package/node_modules/@openclaw/fs-safe/dist/archive-zip-entry.d.ts +13 -10
  41. package/node_modules/@openclaw/fs-safe/dist/archive-zip-entry.js +9 -26
  42. package/node_modules/@openclaw/fs-safe/dist/archive-zip-integrity.d.ts +2 -3
  43. package/node_modules/@openclaw/fs-safe/dist/archive-zip-integrity.js +2 -13
  44. package/node_modules/@openclaw/fs-safe/dist/archive-zip-loader.d.ts +7 -2
  45. package/node_modules/@openclaw/fs-safe/dist/archive-zip-loader.js +119 -33
  46. package/node_modules/@openclaw/fs-safe/dist/archive-zip-manifest.d.ts +0 -1
  47. package/node_modules/@openclaw/fs-safe/dist/archive-zip-manifest.js +3 -1
  48. package/node_modules/@openclaw/fs-safe/dist/archive-zip-names.d.ts +1 -1
  49. package/node_modules/@openclaw/fs-safe/dist/archive-zip-names.js +13 -2
  50. package/node_modules/@openclaw/fs-safe/dist/archive-zip-preflight.d.ts +2 -4
  51. package/node_modules/@openclaw/fs-safe/dist/archive-zip-preflight.js +16 -8
  52. package/node_modules/@openclaw/fs-safe/dist/archive.d.ts +14 -9
  53. package/node_modules/@openclaw/fs-safe/dist/archive.js +223 -178
  54. package/node_modules/@openclaw/fs-safe/dist/async-lock.d.ts +0 -1
  55. package/node_modules/@openclaw/fs-safe/dist/atomic.d.ts +3 -2
  56. package/node_modules/@openclaw/fs-safe/dist/bounded-read-stream.d.ts +0 -2
  57. package/node_modules/@openclaw/fs-safe/dist/bounded-read-stream.js +0 -6
  58. package/node_modules/@openclaw/fs-safe/dist/bounded-read.d.ts +0 -1
  59. package/node_modules/@openclaw/fs-safe/dist/byte-budget.d.ts +0 -1
  60. package/node_modules/@openclaw/fs-safe/dist/byte-view.d.ts +2 -0
  61. package/node_modules/@openclaw/fs-safe/dist/byte-view.js +13 -0
  62. package/node_modules/@openclaw/fs-safe/dist/clone-metadata.d.ts +1 -1
  63. package/node_modules/@openclaw/fs-safe/dist/clone-metadata.js +6 -2
  64. package/node_modules/@openclaw/fs-safe/dist/config.d.ts +0 -1
  65. package/node_modules/@openclaw/fs-safe/dist/containment.d.ts +0 -1
  66. package/node_modules/@openclaw/fs-safe/dist/copy-file-input.d.ts +0 -1
  67. package/node_modules/@openclaw/fs-safe/dist/copy-policy.d.ts +0 -1
  68. package/node_modules/@openclaw/fs-safe/dist/copy-publication.d.ts +8 -5
  69. package/node_modules/@openclaw/fs-safe/dist/copy-publication.js +5 -6
  70. package/node_modules/@openclaw/fs-safe/dist/copy-tree-portable.d.ts +0 -1
  71. package/node_modules/@openclaw/fs-safe/dist/copy-tree-portable.js +51 -28
  72. package/node_modules/@openclaw/fs-safe/dist/copy.d.ts +0 -1
  73. package/node_modules/@openclaw/fs-safe/dist/copy.js +34 -16
  74. package/node_modules/@openclaw/fs-safe/dist/create-owned-file.d.ts +7 -0
  75. package/node_modules/@openclaw/fs-safe/dist/create-owned-file.js +16 -0
  76. package/node_modules/@openclaw/fs-safe/dist/create.d.ts +17 -0
  77. package/node_modules/@openclaw/fs-safe/dist/create.js +388 -0
  78. package/node_modules/@openclaw/fs-safe/dist/creation-boundary.d.ts +60 -0
  79. package/node_modules/@openclaw/fs-safe/dist/creation-boundary.js +371 -0
  80. package/node_modules/@openclaw/fs-safe/dist/deny-mutation-match.d.ts +2 -0
  81. package/node_modules/@openclaw/fs-safe/dist/deny-mutation-match.js +71 -0
  82. package/node_modules/@openclaw/fs-safe/dist/deny-mutations.d.ts +2 -3
  83. package/node_modules/@openclaw/fs-safe/dist/deny-mutations.js +56 -35
  84. package/node_modules/@openclaw/fs-safe/dist/device-path.d.ts +0 -1
  85. package/node_modules/@openclaw/fs-safe/dist/directory-durability.d.ts +7 -8
  86. package/node_modules/@openclaw/fs-safe/dist/directory-durability.js +22 -80
  87. package/node_modules/@openclaw/fs-safe/dist/directory-entry-path.d.ts +0 -1
  88. package/node_modules/@openclaw/fs-safe/dist/directory-guard.d.ts +5 -8
  89. package/node_modules/@openclaw/fs-safe/dist/directory-guard.js +23 -57
  90. package/node_modules/@openclaw/fs-safe/dist/directory-mode-node.d.ts +22 -3
  91. package/node_modules/@openclaw/fs-safe/dist/directory-mode-node.js +97 -3
  92. package/node_modules/@openclaw/fs-safe/dist/directory-receipt.d.ts +23 -0
  93. package/node_modules/@openclaw/fs-safe/dist/directory-receipt.js +121 -0
  94. package/node_modules/@openclaw/fs-safe/dist/durability.d.ts +2 -2
  95. package/node_modules/@openclaw/fs-safe/dist/effective-uid.d.ts +0 -1
  96. package/node_modules/@openclaw/fs-safe/dist/effective-uid.js +1 -4
  97. package/node_modules/@openclaw/fs-safe/dist/error-detail.d.ts +0 -1
  98. package/node_modules/@openclaw/fs-safe/dist/errors.d.ts +3 -2
  99. package/node_modules/@openclaw/fs-safe/dist/errors.js +3 -2
  100. package/node_modules/@openclaw/fs-safe/dist/file-cleanup.d.ts +19 -0
  101. package/node_modules/@openclaw/fs-safe/dist/file-cleanup.js +81 -0
  102. package/node_modules/@openclaw/fs-safe/dist/file-contents.d.ts +5 -0
  103. package/node_modules/@openclaw/fs-safe/dist/file-contents.js +40 -0
  104. package/node_modules/@openclaw/fs-safe/dist/file-handle-transfer.d.ts +2 -1
  105. package/node_modules/@openclaw/fs-safe/dist/file-handle-transfer.js +57 -2
  106. package/node_modules/@openclaw/fs-safe/dist/file-hash.d.ts +0 -1
  107. package/node_modules/@openclaw/fs-safe/dist/file-hash.js +186 -70
  108. package/node_modules/@openclaw/fs-safe/dist/file-identity.d.ts +0 -1
  109. package/node_modules/@openclaw/fs-safe/dist/file-identity.js +26 -4
  110. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-acquisition.d.ts +22 -0
  111. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-acquisition.js +98 -0
  112. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-admission.d.ts +17 -0
  113. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-admission.js +58 -0
  114. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-acquire.d.ts +3 -0
  115. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-acquire.js +303 -0
  116. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-arbitration.d.ts +17 -0
  117. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-arbitration.js +66 -0
  118. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-held.d.ts +25 -0
  119. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-held.js +392 -0
  120. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-io.d.ts +40 -0
  121. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-io.js +209 -0
  122. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-mutation.d.ts +16 -0
  123. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-mutation.js +275 -0
  124. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-options.d.ts +11 -0
  125. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-options.js +58 -0
  126. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-registration.d.ts +1 -0
  127. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-registration.js +90 -0
  128. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root.d.ts +34 -0
  129. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root.js +288 -0
  130. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-stale-admission.d.ts +19 -0
  131. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-stale-admission.js +199 -0
  132. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync.d.ts +4 -22
  133. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync.js +207 -249
  134. package/node_modules/@openclaw/fs-safe/dist/file-lock.d.ts +0 -1
  135. package/node_modules/@openclaw/fs-safe/dist/file-observation.d.ts +1 -2
  136. package/node_modules/@openclaw/fs-safe/dist/file-store-boundary.d.ts +11 -14
  137. package/node_modules/@openclaw/fs-safe/dist/file-store-boundary.js +73 -45
  138. package/node_modules/@openclaw/fs-safe/dist/file-store-prune.d.ts +0 -1
  139. package/node_modules/@openclaw/fs-safe/dist/file-store-prune.js +11 -6
  140. package/node_modules/@openclaw/fs-safe/dist/file-store-sync-directory.d.ts +0 -1
  141. package/node_modules/@openclaw/fs-safe/dist/file-store-sync-directory.js +197 -227
  142. package/node_modules/@openclaw/fs-safe/dist/file-store-sync-write.d.ts +0 -1
  143. package/node_modules/@openclaw/fs-safe/dist/file-store-sync-write.js +22 -36
  144. package/node_modules/@openclaw/fs-safe/dist/file-store.d.ts +4 -8
  145. package/node_modules/@openclaw/fs-safe/dist/file-store.js +72 -45
  146. package/node_modules/@openclaw/fs-safe/dist/file-sync.d.ts +0 -1
  147. package/node_modules/@openclaw/fs-safe/dist/filename.d.ts +0 -1
  148. package/node_modules/@openclaw/fs-safe/dist/filename.js +1 -7
  149. package/node_modules/@openclaw/fs-safe/dist/fs.d.ts +0 -1
  150. package/node_modules/@openclaw/fs-safe/dist/guarded-mkdir.d.ts +2 -2
  151. package/node_modules/@openclaw/fs-safe/dist/guarded-mkdir.js +27 -19
  152. package/node_modules/@openclaw/fs-safe/dist/guarded-mutation.d.ts +0 -7
  153. package/node_modules/@openclaw/fs-safe/dist/guarded-mutation.js +6 -11
  154. package/node_modules/@openclaw/fs-safe/dist/guest-dispatch-python.d.ts +0 -1
  155. package/node_modules/@openclaw/fs-safe/dist/guest-dispatch-python.js +41 -90
  156. package/node_modules/@openclaw/fs-safe/dist/guest-native-python.d.ts +0 -1
  157. package/node_modules/@openclaw/fs-safe/dist/guest-native-python.js +23 -31
  158. package/node_modules/@openclaw/fs-safe/dist/guest.d.ts +0 -1
  159. package/node_modules/@openclaw/fs-safe/dist/guest.js +21 -12
  160. package/node_modules/@openclaw/fs-safe/dist/home-dir.d.ts +0 -1
  161. package/node_modules/@openclaw/fs-safe/dist/index.d.ts +9 -7
  162. package/node_modules/@openclaw/fs-safe/dist/install-path.d.ts +0 -1
  163. package/node_modules/@openclaw/fs-safe/dist/install-path.js +2 -5
  164. package/node_modules/@openclaw/fs-safe/dist/json-document-store.d.ts +4 -10
  165. package/node_modules/@openclaw/fs-safe/dist/json-document-store.js +22 -15
  166. package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-directory.d.ts +13 -1
  167. package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-directory.js +134 -0
  168. package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-ownership.d.ts +1 -7
  169. package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-ownership.js +43 -72
  170. package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-read.d.ts +0 -1
  171. package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-read.js +13 -9
  172. package/node_modules/@openclaw/fs-safe/dist/json-durable-queue.d.ts +0 -2
  173. package/node_modules/@openclaw/fs-safe/dist/json-durable-queue.js +20 -148
  174. package/node_modules/@openclaw/fs-safe/dist/json-store.d.ts +0 -1
  175. package/node_modules/@openclaw/fs-safe/dist/json-store.js +1 -2
  176. package/node_modules/@openclaw/fs-safe/dist/json-stringify.d.ts +0 -1
  177. package/node_modules/@openclaw/fs-safe/dist/json.d.ts +0 -1
  178. package/node_modules/@openclaw/fs-safe/dist/json.js +39 -92
  179. package/node_modules/@openclaw/fs-safe/dist/local-file-access.d.ts +0 -1
  180. package/node_modules/@openclaw/fs-safe/dist/local-file-access.js +5 -15
  181. package/node_modules/@openclaw/fs-safe/dist/local-file-descriptor.d.ts +2 -6
  182. package/node_modules/@openclaw/fs-safe/dist/local-roots.d.ts +2 -8
  183. package/node_modules/@openclaw/fs-safe/dist/local-roots.js +19 -21
  184. package/node_modules/@openclaw/fs-safe/dist/lock-config.d.ts +0 -1
  185. package/node_modules/@openclaw/fs-safe/dist/move-path-cleanup.d.ts +5 -20
  186. package/node_modules/@openclaw/fs-safe/dist/move-path-cleanup.js +60 -24
  187. package/node_modules/@openclaw/fs-safe/dist/move-path-stage.d.ts +0 -1
  188. package/node_modules/@openclaw/fs-safe/dist/move-path.d.ts +0 -1
  189. package/node_modules/@openclaw/fs-safe/dist/move-path.js +64 -42
  190. package/node_modules/@openclaw/fs-safe/dist/mutation-authority.d.ts +0 -1
  191. package/node_modules/@openclaw/fs-safe/dist/mutation-authority.js +5 -0
  192. package/node_modules/@openclaw/fs-safe/dist/native-binding.d.ts +69 -15
  193. package/node_modules/@openclaw/fs-safe/dist/native-config.d.ts +0 -1
  194. package/node_modules/@openclaw/fs-safe/dist/native-directory-observation.d.ts +0 -1
  195. package/node_modules/@openclaw/fs-safe/dist/native-fallback-warning.d.ts +3 -0
  196. package/node_modules/@openclaw/fs-safe/dist/native-fallback-warning.js +11 -0
  197. package/node_modules/@openclaw/fs-safe/dist/native-operations.d.ts +1 -7
  198. package/node_modules/@openclaw/fs-safe/dist/native-operations.js +2 -31
  199. package/node_modules/@openclaw/fs-safe/dist/native-parent-admission.d.ts +5 -3
  200. package/node_modules/@openclaw/fs-safe/dist/native-parent-admission.js +27 -7
  201. package/node_modules/@openclaw/fs-safe/dist/native-pinned-write-windows.d.ts +2 -3
  202. package/node_modules/@openclaw/fs-safe/dist/native-pinned-write-windows.js +174 -29
  203. package/node_modules/@openclaw/fs-safe/dist/native-pinned-write.d.ts +1 -2
  204. package/node_modules/@openclaw/fs-safe/dist/native-pinned-write.js +230 -187
  205. package/node_modules/@openclaw/fs-safe/dist/native-policy-directory-observation.d.ts +11 -0
  206. package/node_modules/@openclaw/fs-safe/dist/native-policy-directory-observation.js +61 -0
  207. package/node_modules/@openclaw/fs-safe/dist/native-policy-parent-windows.d.ts +13 -0
  208. package/node_modules/@openclaw/fs-safe/dist/native-policy-parent-windows.js +209 -0
  209. package/node_modules/@openclaw/fs-safe/dist/native-rename-outcome.d.ts +3 -0
  210. package/node_modules/@openclaw/fs-safe/dist/native-rename-outcome.js +8 -0
  211. package/node_modules/@openclaw/fs-safe/dist/native-staged-file.d.ts +20 -6
  212. package/node_modules/@openclaw/fs-safe/dist/native-staged-file.js +149 -106
  213. package/node_modules/@openclaw/fs-safe/dist/native-staged-symlink.d.ts +13 -0
  214. package/node_modules/@openclaw/fs-safe/dist/native-staged-symlink.js +303 -0
  215. package/node_modules/@openclaw/fs-safe/dist/native.d.ts +0 -1
  216. package/node_modules/@openclaw/fs-safe/dist/native.js +2 -2
  217. package/node_modules/@openclaw/fs-safe/dist/opened-file-failure.d.ts +0 -1
  218. package/node_modules/@openclaw/fs-safe/dist/opened-realpath.d.ts +0 -1
  219. package/node_modules/@openclaw/fs-safe/dist/opened-realpath.js +11 -2
  220. package/node_modules/@openclaw/fs-safe/dist/output.d.ts +0 -1
  221. package/node_modules/@openclaw/fs-safe/dist/output.js +12 -8
  222. package/node_modules/@openclaw/fs-safe/dist/overwrite-file-handle.d.ts +0 -1
  223. package/node_modules/@openclaw/fs-safe/dist/owner-dacl-batch-worker.js +54 -0
  224. package/node_modules/@openclaw/fs-safe/dist/owner-dacl-batch.d.ts +5 -0
  225. package/node_modules/@openclaw/fs-safe/dist/owner-dacl-batch.js +64 -0
  226. package/node_modules/@openclaw/fs-safe/dist/owner-dacl.d.ts +2 -1
  227. package/node_modules/@openclaw/fs-safe/dist/owner-dacl.js +13 -4
  228. package/node_modules/@openclaw/fs-safe/dist/path-case.d.ts +0 -1
  229. package/node_modules/@openclaw/fs-safe/dist/path-policy.d.ts +0 -1
  230. package/node_modules/@openclaw/fs-safe/dist/path-prefix.d.ts +0 -1
  231. package/node_modules/@openclaw/fs-safe/dist/path-prefix.js +30 -8
  232. package/node_modules/@openclaw/fs-safe/dist/path-scope-lexical.d.ts +0 -1
  233. package/node_modules/@openclaw/fs-safe/dist/path-segment-route.d.ts +0 -1
  234. package/node_modules/@openclaw/fs-safe/dist/path-suffix-aliases.d.ts +2 -1
  235. package/node_modules/@openclaw/fs-safe/dist/path-suffix-aliases.js +25 -17
  236. package/node_modules/@openclaw/fs-safe/dist/path.d.ts +0 -1
  237. package/node_modules/@openclaw/fs-safe/dist/path.js +19 -2
  238. package/node_modules/@openclaw/fs-safe/dist/permission-exec.d.ts +8 -1
  239. package/node_modules/@openclaw/fs-safe/dist/permission-exec.js +141 -21
  240. package/node_modules/@openclaw/fs-safe/dist/permissions-public.d.ts +3 -2
  241. package/node_modules/@openclaw/fs-safe/dist/permissions-public.js +1 -0
  242. package/node_modules/@openclaw/fs-safe/dist/permissions-windows.d.ts +5 -16
  243. package/node_modules/@openclaw/fs-safe/dist/permissions-windows.js +11 -31
  244. package/node_modules/@openclaw/fs-safe/dist/permissions.d.ts +3 -11
  245. package/node_modules/@openclaw/fs-safe/dist/permissions.js +11 -34
  246. package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-admission.d.ts +1 -3
  247. package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-admission.js +27 -31
  248. package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-observation.d.ts +7 -3
  249. package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-observation.js +81 -18
  250. package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-shared-route.d.ts +3 -9
  251. package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-shared-route.js +1 -1
  252. package/node_modules/@openclaw/fs-safe/dist/pinned-open.d.ts +2 -2
  253. package/node_modules/@openclaw/fs-safe/dist/pinned-open.js +9 -5
  254. package/node_modules/@openclaw/fs-safe/dist/pinned-operation.d.ts +1 -2
  255. package/node_modules/@openclaw/fs-safe/dist/pinned-operation.js +3 -16
  256. package/node_modules/@openclaw/fs-safe/dist/pinned-write-input.d.ts +3 -0
  257. package/node_modules/@openclaw/fs-safe/dist/pinned-write-input.js +35 -0
  258. package/node_modules/@openclaw/fs-safe/dist/pinned-write-mode.d.ts +4 -0
  259. package/node_modules/@openclaw/fs-safe/dist/pinned-write-mode.js +31 -0
  260. package/node_modules/@openclaw/fs-safe/dist/pinned-write-staged.d.ts +5 -0
  261. package/node_modules/@openclaw/fs-safe/dist/pinned-write-staged.js +185 -0
  262. package/node_modules/@openclaw/fs-safe/dist/pinned-write-types.d.ts +14 -21
  263. package/node_modules/@openclaw/fs-safe/dist/pinned-write.d.ts +0 -2
  264. package/node_modules/@openclaw/fs-safe/dist/pinned-write.js +43 -151
  265. package/node_modules/@openclaw/fs-safe/dist/positional-read.d.ts +0 -1
  266. package/node_modules/@openclaw/fs-safe/dist/private-directory.d.ts +0 -1
  267. package/node_modules/@openclaw/fs-safe/dist/private-directory.js +18 -4
  268. package/node_modules/@openclaw/fs-safe/dist/private-producer-handoff-sync.d.ts +3 -0
  269. package/node_modules/@openclaw/fs-safe/dist/private-producer-handoff-sync.js +72 -0
  270. package/node_modules/@openclaw/fs-safe/dist/private-producer-handoff.d.ts +42 -5
  271. package/node_modules/@openclaw/fs-safe/dist/private-producer-handoff.js +166 -80
  272. package/node_modules/@openclaw/fs-safe/dist/private-temp-workspace.d.ts +0 -1
  273. package/node_modules/@openclaw/fs-safe/dist/private-temp-workspace.js +56 -128
  274. package/node_modules/@openclaw/fs-safe/dist/publish-copy-stage.d.ts +3 -3
  275. package/node_modules/@openclaw/fs-safe/dist/publish-copy-stage.js +20 -7
  276. package/node_modules/@openclaw/fs-safe/dist/publish-file-failure.d.ts +0 -1
  277. package/node_modules/@openclaw/fs-safe/dist/publish-file.d.ts +2 -4
  278. package/node_modules/@openclaw/fs-safe/dist/publish-file.js +59 -100
  279. package/node_modules/@openclaw/fs-safe/dist/read-open-flags.d.ts +0 -1
  280. package/node_modules/@openclaw/fs-safe/dist/read-opened-file.d.ts +2 -6
  281. package/node_modules/@openclaw/fs-safe/dist/realpath.d.ts +0 -1
  282. package/node_modules/@openclaw/fs-safe/dist/recursive-mkdir-path.d.ts +0 -1
  283. package/node_modules/@openclaw/fs-safe/dist/regular-file.d.ts +0 -1
  284. package/node_modules/@openclaw/fs-safe/dist/regular-file.js +111 -196
  285. package/node_modules/@openclaw/fs-safe/dist/replace-directory.d.ts +0 -1
  286. package/node_modules/@openclaw/fs-safe/dist/replace-directory.js +245 -20
  287. package/node_modules/@openclaw/fs-safe/dist/replace-file-buffer.d.ts +4 -0
  288. package/node_modules/@openclaw/fs-safe/dist/replace-file-buffer.js +36 -0
  289. package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-fallback.d.ts +4 -11
  290. package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-fallback.js +150 -117
  291. package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-source.d.ts +0 -1
  292. package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-source.js +27 -33
  293. package/node_modules/@openclaw/fs-safe/dist/replace-file-descriptor.d.ts +7 -12
  294. package/node_modules/@openclaw/fs-safe/dist/replace-file-descriptor.js +25 -18
  295. package/node_modules/@openclaw/fs-safe/dist/replace-file-destination.d.ts +21 -0
  296. package/node_modules/@openclaw/fs-safe/dist/replace-file-destination.js +123 -0
  297. package/node_modules/@openclaw/fs-safe/dist/replace-file-mode.d.ts +0 -1
  298. package/node_modules/@openclaw/fs-safe/dist/replace-file-mutation.d.ts +26 -0
  299. package/node_modules/@openclaw/fs-safe/dist/replace-file-mutation.js +47 -0
  300. package/node_modules/@openclaw/fs-safe/dist/replace-file-rename-policy.d.ts +1 -3
  301. package/node_modules/@openclaw/fs-safe/dist/replace-file-temp-owner.d.ts +19 -24
  302. package/node_modules/@openclaw/fs-safe/dist/replace-file-temp-owner.js +126 -149
  303. package/node_modules/@openclaw/fs-safe/dist/replace-file-types.d.ts +55 -0
  304. package/node_modules/@openclaw/fs-safe/dist/replace-file-types.js +1 -0
  305. package/node_modules/@openclaw/fs-safe/dist/replace-file.d.ts +3 -56
  306. package/node_modules/@openclaw/fs-safe/dist/replace-file.js +47 -31
  307. package/node_modules/@openclaw/fs-safe/dist/retained-directory-replacement.d.ts +26 -0
  308. package/node_modules/@openclaw/fs-safe/dist/retained-directory-replacement.js +193 -0
  309. package/node_modules/@openclaw/fs-safe/dist/retained-file-types.d.ts +50 -0
  310. package/node_modules/@openclaw/fs-safe/dist/retained-file-types.js +1 -0
  311. package/node_modules/@openclaw/fs-safe/dist/retained-file.d.ts +3 -0
  312. package/node_modules/@openclaw/fs-safe/dist/retained-file.js +121 -0
  313. package/node_modules/@openclaw/fs-safe/dist/root-boundary.d.ts +1 -1
  314. package/node_modules/@openclaw/fs-safe/dist/root-boundary.js +4 -0
  315. package/node_modules/@openclaw/fs-safe/dist/root-context.d.ts +0 -9
  316. package/node_modules/@openclaw/fs-safe/dist/root-context.js +6 -12
  317. package/node_modules/@openclaw/fs-safe/dist/root-create-input.d.ts +9 -3
  318. package/node_modules/@openclaw/fs-safe/dist/root-create-input.js +17 -4
  319. package/node_modules/@openclaw/fs-safe/dist/root-directory-creation.d.ts +4 -5
  320. package/node_modules/@openclaw/fs-safe/dist/root-directory-creation.js +20 -7
  321. package/node_modules/@openclaw/fs-safe/dist/root-directory-entry.d.ts +9 -0
  322. package/node_modules/@openclaw/fs-safe/dist/root-directory-entry.js +28 -0
  323. package/node_modules/@openclaw/fs-safe/dist/root-directory-list.d.ts +10 -2
  324. package/node_modules/@openclaw/fs-safe/dist/root-directory-list.js +105 -40
  325. package/node_modules/@openclaw/fs-safe/dist/root-directory.d.ts +0 -1
  326. package/node_modules/@openclaw/fs-safe/dist/root-entries.d.ts +0 -1
  327. package/node_modules/@openclaw/fs-safe/dist/root-entries.js +2 -2
  328. package/node_modules/@openclaw/fs-safe/dist/root-errors.d.ts +4 -1
  329. package/node_modules/@openclaw/fs-safe/dist/root-errors.js +5 -3
  330. package/node_modules/@openclaw/fs-safe/dist/root-file-final-admission.d.ts +2 -3
  331. package/node_modules/@openclaw/fs-safe/dist/root-file-final-admission.js +6 -8
  332. package/node_modules/@openclaw/fs-safe/dist/root-file.d.ts +0 -1
  333. package/node_modules/@openclaw/fs-safe/dist/root-file.js +5 -7
  334. package/node_modules/@openclaw/fs-safe/dist/root-handle-context.d.ts +4 -0
  335. package/node_modules/@openclaw/fs-safe/dist/root-handle-context.js +12 -0
  336. package/node_modules/@openclaw/fs-safe/dist/root-impl.d.ts +5 -18
  337. package/node_modules/@openclaw/fs-safe/dist/root-impl.js +239 -152
  338. package/node_modules/@openclaw/fs-safe/dist/root-move-noreplace.d.ts +4 -8
  339. package/node_modules/@openclaw/fs-safe/dist/root-move-noreplace.js +31 -28
  340. package/node_modules/@openclaw/fs-safe/dist/root-move-preflight.d.ts +0 -1
  341. package/node_modules/@openclaw/fs-safe/dist/root-observed-path.d.ts +0 -2
  342. package/node_modules/@openclaw/fs-safe/dist/root-observed-path.js +2 -7
  343. package/node_modules/@openclaw/fs-safe/dist/root-options.d.ts +13 -6
  344. package/node_modules/@openclaw/fs-safe/dist/root-path-errors.d.ts +1 -1
  345. package/node_modules/@openclaw/fs-safe/dist/root-path-errors.js +11 -2
  346. package/node_modules/@openclaw/fs-safe/dist/root-path-existing.d.ts +3 -1
  347. package/node_modules/@openclaw/fs-safe/dist/root-path-existing.js +45 -50
  348. package/node_modules/@openclaw/fs-safe/dist/root-path-observation.d.ts +4 -12
  349. package/node_modules/@openclaw/fs-safe/dist/root-path-stat.d.ts +0 -1
  350. package/node_modules/@openclaw/fs-safe/dist/root-path-stat.js +61 -11
  351. package/node_modules/@openclaw/fs-safe/dist/root-path.d.ts +0 -1
  352. package/node_modules/@openclaw/fs-safe/dist/root-path.js +64 -207
  353. package/node_modules/@openclaw/fs-safe/dist/root-paths-lexical.d.ts +0 -1
  354. package/node_modules/@openclaw/fs-safe/dist/root-paths.d.ts +2 -7
  355. package/node_modules/@openclaw/fs-safe/dist/root-public-types.d.ts +11 -0
  356. package/node_modules/@openclaw/fs-safe/dist/root-public-types.js +1 -0
  357. package/node_modules/@openclaw/fs-safe/dist/root-read-admission.d.ts +0 -1
  358. package/node_modules/@openclaw/fs-safe/dist/root-read-admission.js +31 -39
  359. package/node_modules/@openclaw/fs-safe/dist/root-remove-identity.d.ts +1 -4
  360. package/node_modules/@openclaw/fs-safe/dist/root-remove-identity.js +2 -4
  361. package/node_modules/@openclaw/fs-safe/dist/root-remove-receipt.d.ts +0 -1
  362. package/node_modules/@openclaw/fs-safe/dist/root-remove.d.ts +1 -1
  363. package/node_modules/@openclaw/fs-safe/dist/root-remove.js +21 -5
  364. package/node_modules/@openclaw/fs-safe/dist/root-symlink-policy.d.ts +0 -1
  365. package/node_modules/@openclaw/fs-safe/dist/root-walk.d.ts +19 -13
  366. package/node_modules/@openclaw/fs-safe/dist/root-walk.js +67 -16
  367. package/node_modules/@openclaw/fs-safe/dist/root-write-admission.d.ts +1 -4
  368. package/node_modules/@openclaw/fs-safe/dist/root-write-admission.js +4 -27
  369. package/node_modules/@openclaw/fs-safe/dist/root-write-compatibility.d.ts +1 -3
  370. package/node_modules/@openclaw/fs-safe/dist/root-write-compatibility.js +17 -68
  371. package/node_modules/@openclaw/fs-safe/dist/root-write-complete-parent.d.ts +2 -1
  372. package/node_modules/@openclaw/fs-safe/dist/root-write-complete-parent.js +13 -28
  373. package/node_modules/@openclaw/fs-safe/dist/root-write-lock-binding.d.ts +14 -0
  374. package/node_modules/@openclaw/fs-safe/dist/root-write-lock-binding.js +162 -0
  375. package/node_modules/@openclaw/fs-safe/dist/root-write-mode.d.ts +0 -1
  376. package/node_modules/@openclaw/fs-safe/dist/root-write-publication.d.ts +0 -1
  377. package/node_modules/@openclaw/fs-safe/dist/root-write-publication.js +1 -1
  378. package/node_modules/@openclaw/fs-safe/dist/root-write-verification.d.ts +1 -2
  379. package/node_modules/@openclaw/fs-safe/dist/root-write-verification.js +29 -42
  380. package/node_modules/@openclaw/fs-safe/dist/root.d.ts +2 -7
  381. package/node_modules/@openclaw/fs-safe/dist/safe-path-segment.d.ts +2 -2
  382. package/node_modules/@openclaw/fs-safe/dist/safe-path-segment.js +9 -6
  383. package/node_modules/@openclaw/fs-safe/dist/secret-file.d.ts +6 -3
  384. package/node_modules/@openclaw/fs-safe/dist/secret-file.js +22 -58
  385. package/node_modules/@openclaw/fs-safe/dist/secret-read-async.d.ts +0 -1
  386. package/node_modules/@openclaw/fs-safe/dist/secret-read-async.js +6 -27
  387. package/node_modules/@openclaw/fs-safe/dist/secret-read-policy.d.ts +6 -3
  388. package/node_modules/@openclaw/fs-safe/dist/secret-read-policy.js +27 -3
  389. package/node_modules/@openclaw/fs-safe/dist/secret.d.ts +0 -1
  390. package/node_modules/@openclaw/fs-safe/dist/secure-file-windows.d.ts +3 -3
  391. package/node_modules/@openclaw/fs-safe/dist/secure-file-windows.js +42 -149
  392. package/node_modules/@openclaw/fs-safe/dist/secure-file.d.ts +0 -1
  393. package/node_modules/@openclaw/fs-safe/dist/secure-file.js +14 -13
  394. package/node_modules/@openclaw/fs-safe/dist/secure-temp-dir.d.ts +0 -1
  395. package/node_modules/@openclaw/fs-safe/dist/secure-temp-dir.js +2 -7
  396. package/node_modules/@openclaw/fs-safe/dist/secure-temp-repair.d.ts +0 -1
  397. package/node_modules/@openclaw/fs-safe/dist/secure-temp-repair.js +5 -1
  398. package/node_modules/@openclaw/fs-safe/dist/sibling-staged-file.d.ts +0 -1
  399. package/node_modules/@openclaw/fs-safe/dist/sibling-staged-file.js +32 -39
  400. package/node_modules/@openclaw/fs-safe/dist/sibling-temp.d.ts +0 -1
  401. package/node_modules/@openclaw/fs-safe/dist/sibling-temp.js +23 -12
  402. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-acquire.d.ts +2 -29
  403. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-acquire.js +283 -220
  404. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-admission-context.d.ts +18 -0
  405. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-admission-context.js +60 -0
  406. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-admission-parser.d.ts +41 -0
  407. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-admission-parser.js +113 -0
  408. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-admission.d.ts +31 -0
  409. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-admission.js +1 -0
  410. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-handle.d.ts +5 -9
  411. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-handle.js +6 -0
  412. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-policy.d.ts +6 -8
  413. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-policy.js +23 -0
  414. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-reclaim.d.ts +12 -8
  415. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-reclaim.js +101 -44
  416. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-registration.d.ts +13 -0
  417. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-registration.js +47 -0
  418. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-root.d.ts +0 -1
  419. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-root.js +2 -1
  420. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-stale-admission.d.ts +34 -0
  421. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-stale-admission.js +228 -0
  422. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-target.d.ts +7 -0
  423. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-target.js +55 -0
  424. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-types.d.ts +22 -17
  425. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock.d.ts +0 -1
  426. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock.js +52 -35
  427. package/node_modules/@openclaw/fs-safe/dist/staged-directory.d.ts +7 -5
  428. package/node_modules/@openclaw/fs-safe/dist/staged-directory.js +43 -7
  429. package/node_modules/@openclaw/fs-safe/dist/staged-file-settlement.d.ts +16 -0
  430. package/node_modules/@openclaw/fs-safe/dist/staged-file-settlement.js +57 -0
  431. package/node_modules/@openclaw/fs-safe/dist/staged-file-types.d.ts +0 -1
  432. package/node_modules/@openclaw/fs-safe/dist/staged-symlink-types.d.ts +39 -0
  433. package/node_modules/@openclaw/fs-safe/dist/staged-symlink-types.js +1 -0
  434. package/node_modules/@openclaw/fs-safe/dist/stat-observation.d.ts +0 -1
  435. package/node_modules/@openclaw/fs-safe/dist/stat-observation.js +3 -10
  436. package/node_modules/@openclaw/fs-safe/dist/store.d.ts +0 -1
  437. package/node_modules/@openclaw/fs-safe/dist/strict-file-identity.d.ts +3 -2
  438. package/node_modules/@openclaw/fs-safe/dist/strict-file-identity.js +14 -14
  439. package/node_modules/@openclaw/fs-safe/dist/string-coerce.d.ts +0 -1
  440. package/node_modules/@openclaw/fs-safe/dist/suppressed-error.d.ts +0 -1
  441. package/node_modules/@openclaw/fs-safe/dist/symlink-parents.d.ts +0 -1
  442. package/node_modules/@openclaw/fs-safe/dist/symlink-parents.js +58 -32
  443. package/node_modules/@openclaw/fs-safe/dist/temp-cleanup.d.ts +0 -1
  444. package/node_modules/@openclaw/fs-safe/dist/temp-target.d.ts +0 -1
  445. package/node_modules/@openclaw/fs-safe/dist/temp-target.js +14 -55
  446. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-admission.d.ts +0 -8
  447. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-admission.js +50 -37
  448. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-child-admission.d.ts +16 -6
  449. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-child-admission.js +70 -15
  450. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-descriptor.d.ts +1 -7
  451. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-descriptor.js +11 -33
  452. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-owner.d.ts +1 -1
  453. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-owner.js +53 -35
  454. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-ownership.d.ts +8 -0
  455. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-ownership.js +52 -0
  456. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-types.d.ts +0 -1
  457. package/node_modules/@openclaw/fs-safe/dist/temp.d.ts +0 -1
  458. package/node_modules/@openclaw/fs-safe/dist/test-hooks.d.ts +5 -2
  459. package/node_modules/@openclaw/fs-safe/dist/text-atomic.d.ts +2 -2
  460. package/node_modules/@openclaw/fs-safe/dist/text-atomic.js +3 -1
  461. package/node_modules/@openclaw/fs-safe/dist/timing.d.ts +0 -1
  462. package/node_modules/@openclaw/fs-safe/dist/trash.d.ts +0 -1
  463. package/node_modules/@openclaw/fs-safe/dist/trash.js +27 -1
  464. package/node_modules/@openclaw/fs-safe/dist/types.d.ts +0 -1
  465. package/node_modules/@openclaw/fs-safe/dist/unicode-path.d.ts +0 -1
  466. package/node_modules/@openclaw/fs-safe/dist/unicode-path.js +3 -0
  467. package/node_modules/@openclaw/fs-safe/dist/walk.d.ts +7 -7
  468. package/node_modules/@openclaw/fs-safe/dist/walk.js +23 -8
  469. package/node_modules/@openclaw/fs-safe/dist/watch-alias.d.ts +6 -0
  470. package/node_modules/@openclaw/fs-safe/dist/watch-alias.js +88 -0
  471. package/node_modules/@openclaw/fs-safe/dist/watch-hints.d.ts +9 -0
  472. package/node_modules/@openclaw/fs-safe/dist/watch-hints.js +93 -0
  473. package/node_modules/@openclaw/fs-safe/dist/watch-native.d.ts +36 -0
  474. package/node_modules/@openclaw/fs-safe/dist/watch-native.js +73 -0
  475. package/node_modules/@openclaw/fs-safe/dist/watch-scan.d.ts +28 -0
  476. package/node_modules/@openclaw/fs-safe/dist/watch-scan.js +300 -0
  477. package/node_modules/@openclaw/fs-safe/dist/watch-stream.d.ts +8 -0
  478. package/node_modules/@openclaw/fs-safe/dist/watch-stream.js +32 -0
  479. package/node_modules/@openclaw/fs-safe/dist/watch-types.d.ts +60 -0
  480. package/node_modules/@openclaw/fs-safe/dist/watch-types.js +1 -0
  481. package/node_modules/@openclaw/fs-safe/dist/watch.d.ts +5 -0
  482. package/node_modules/@openclaw/fs-safe/dist/watch.js +530 -0
  483. package/node_modules/@openclaw/fs-safe/dist/windows-command.d.ts +0 -1
  484. package/node_modules/@openclaw/fs-safe/dist/windows-owner.d.ts +3 -8
  485. package/node_modules/@openclaw/fs-safe/dist/windows-owner.js +8 -5
  486. package/node_modules/@openclaw/fs-safe/dist/windows-path-alias.d.ts +1 -1
  487. package/node_modules/@openclaw/fs-safe/dist/windows-path-alias.js +12 -43
  488. package/node_modules/@openclaw/fs-safe/dist/windows-path-syntax.d.ts +5 -0
  489. package/node_modules/@openclaw/fs-safe/dist/windows-path-syntax.js +21 -0
  490. package/node_modules/@openclaw/fs-safe/dist/windows-security-bridge.cs +336 -0
  491. package/node_modules/@openclaw/fs-safe/dist/windows-security-bridge.ps1 +90 -0
  492. package/node_modules/@openclaw/fs-safe/dist/windows-security-command.d.ts +33 -0
  493. package/node_modules/@openclaw/fs-safe/dist/windows-security-command.js +414 -0
  494. package/node_modules/@openclaw/fs-safe/dist/windows-security-facts.d.ts +9 -0
  495. package/node_modules/@openclaw/fs-safe/dist/windows-security-facts.js +112 -0
  496. package/node_modules/@openclaw/fs-safe/dist/write-file-handle.d.ts +7 -1
  497. package/node_modules/@openclaw/fs-safe/dist/write-file-handle.js +23 -0
  498. package/node_modules/@openclaw/fs-safe/dist/write-open-flags.d.ts +0 -1
  499. package/node_modules/@openclaw/fs-safe/dist/write-open-flags.js +1 -8
  500. package/node_modules/@openclaw/fs-safe/dist/write-queue.d.ts +0 -1
  501. package/node_modules/@openclaw/fs-safe/dist/write-queue.js +1 -4
  502. package/node_modules/@openclaw/fs-safe/docs/advanced.md +79 -6
  503. package/node_modules/@openclaw/fs-safe/docs/archive.md +154 -48
  504. package/node_modules/@openclaw/fs-safe/docs/atomic.md +218 -13
  505. package/node_modules/@openclaw/fs-safe/docs/config.md +6 -2
  506. package/node_modules/@openclaw/fs-safe/docs/contributing.md +150 -8
  507. package/node_modules/@openclaw/fs-safe/docs/copy.md +41 -0
  508. package/node_modules/@openclaw/fs-safe/docs/creation.md +132 -0
  509. package/node_modules/@openclaw/fs-safe/docs/durability.md +66 -0
  510. package/node_modules/@openclaw/fs-safe/docs/file-contents.md +68 -0
  511. package/node_modules/@openclaw/fs-safe/docs/file-store.md +24 -0
  512. package/node_modules/@openclaw/fs-safe/docs/guest.md +8 -2
  513. package/node_modules/@openclaw/fs-safe/docs/index.md +1 -0
  514. package/node_modules/@openclaw/fs-safe/docs/install.md +61 -7
  515. package/node_modules/@openclaw/fs-safe/docs/json-store.md +5 -0
  516. package/node_modules/@openclaw/fs-safe/docs/json.md +5 -4
  517. package/node_modules/@openclaw/fs-safe/docs/local-roots.md +2 -0
  518. package/node_modules/@openclaw/fs-safe/docs/migrating-to-0.5.md +15 -6
  519. package/node_modules/@openclaw/fs-safe/docs/migrating-to-0.6.md +9 -4
  520. package/node_modules/@openclaw/fs-safe/docs/mutation-policy-proof.md +11 -7
  521. package/node_modules/@openclaw/fs-safe/docs/native-helper.md +51 -15
  522. package/node_modules/@openclaw/fs-safe/docs/native.md +117 -15
  523. package/node_modules/@openclaw/fs-safe/docs/output.md +6 -0
  524. package/node_modules/@openclaw/fs-safe/docs/path-prefix.md +10 -0
  525. package/node_modules/@openclaw/fs-safe/docs/path-suffix-aliases.md +51 -6
  526. package/node_modules/@openclaw/fs-safe/docs/path.md +4 -4
  527. package/node_modules/@openclaw/fs-safe/docs/permissions.md +122 -14
  528. package/node_modules/@openclaw/fs-safe/docs/public-api.md +38 -5
  529. package/node_modules/@openclaw/fs-safe/docs/quickstart.md +1 -1
  530. package/node_modules/@openclaw/fs-safe/docs/reading.md +2 -2
  531. package/node_modules/@openclaw/fs-safe/docs/regular-file.md +3 -0
  532. package/node_modules/@openclaw/fs-safe/docs/retained-file.md +115 -0
  533. package/node_modules/@openclaw/fs-safe/docs/root.md +110 -12
  534. package/node_modules/@openclaw/fs-safe/docs/secret-file.md +38 -2
  535. package/node_modules/@openclaw/fs-safe/docs/secure-file.md +9 -4
  536. package/node_modules/@openclaw/fs-safe/docs/security-model.md +4 -1
  537. package/node_modules/@openclaw/fs-safe/docs/sidecar-lock.md +131 -9
  538. package/node_modules/@openclaw/fs-safe/docs/staged-file.md +16 -6
  539. package/node_modules/@openclaw/fs-safe/docs/staged-symlink.md +124 -0
  540. package/node_modules/@openclaw/fs-safe/docs/store.md +12 -2
  541. package/node_modules/@openclaw/fs-safe/docs/temp.md +56 -9
  542. package/node_modules/@openclaw/fs-safe/docs/testing.md +210 -0
  543. package/node_modules/@openclaw/fs-safe/docs/types.md +24 -2
  544. package/node_modules/@openclaw/fs-safe/docs/walk.md +108 -2
  545. package/node_modules/@openclaw/fs-safe/docs/watch.md +251 -0
  546. package/node_modules/@openclaw/fs-safe/docs/writing.md +126 -11
  547. package/node_modules/@openclaw/fs-safe/package.json +23 -17
  548. package/node_modules/@openclaw/fs-safe-darwin-arm64/fs-safe-native.node +0 -0
  549. package/node_modules/@openclaw/fs-safe-darwin-arm64/package.json +1 -1
  550. package/node_modules/@openclaw/fs-safe-darwin-x64/fs-safe-native.node +0 -0
  551. package/node_modules/@openclaw/fs-safe-darwin-x64/package.json +1 -1
  552. package/node_modules/@openclaw/fs-safe-linux-arm64-gnu/fs-safe-native.node +0 -0
  553. package/node_modules/@openclaw/fs-safe-linux-arm64-gnu/package.json +1 -1
  554. package/node_modules/@openclaw/fs-safe-linux-arm64-musl/fs-safe-native.node +0 -0
  555. package/node_modules/@openclaw/fs-safe-linux-arm64-musl/package.json +1 -1
  556. package/node_modules/@openclaw/fs-safe-linux-x64-gnu/fs-safe-native.node +0 -0
  557. package/node_modules/@openclaw/fs-safe-linux-x64-gnu/package.json +1 -1
  558. package/node_modules/@openclaw/fs-safe-linux-x64-musl/fs-safe-native.node +0 -0
  559. package/node_modules/@openclaw/fs-safe-linux-x64-musl/package.json +1 -1
  560. package/node_modules/@openclaw/fs-safe-win32-x64-msvc/fs-safe-native.node +0 -0
  561. package/node_modules/@openclaw/fs-safe-win32-x64-msvc/package.json +1 -1
  562. package/node_modules/p-limit/index.d.ts +2 -0
  563. package/node_modules/p-limit/index.js +17 -1
  564. package/node_modules/p-limit/package.json +1 -1
  565. package/node_modules/p-limit/readme.md +2 -0
  566. package/node_modules/zod/README.md +2 -2
  567. package/node_modules/zod/compile.cjs +19 -0
  568. package/node_modules/zod/index.cjs +19 -0
  569. package/node_modules/zod/locales/index.cjs +19 -0
  570. package/node_modules/zod/mini/index.cjs +19 -0
  571. package/node_modules/zod/package.json +8 -7
  572. package/node_modules/zod/src/v3/helpers/errorUtil.ts +1 -1
  573. package/node_modules/zod/src/v4/classic/external.ts +2 -0
  574. package/node_modules/zod/src/v4/classic/from-json-schema.ts +248 -25
  575. package/node_modules/zod/src/v4/classic/schemas.ts +243 -168
  576. package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +60 -9
  577. package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +6 -0
  578. package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +2 -2
  579. package/node_modules/zod/src/v4/classic/tests/cyclic-data.test.ts +265 -0
  580. package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +112 -6
  581. package/node_modules/zod/src/v4/classic/tests/enum.test.ts +9 -0
  582. package/node_modules/zod/src/v4/classic/tests/error.test.ts +130 -1
  583. package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +157 -0
  584. package/node_modules/zod/src/v4/classic/tests/iban.test.ts +81 -0
  585. package/node_modules/zod/src/v4/classic/tests/instance-footprint.test.ts +40 -2
  586. package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +27 -7
  587. package/node_modules/zod/src/v4/classic/tests/issue-schema.test.ts +88 -56
  588. package/node_modules/zod/src/v4/classic/tests/number.test.ts +39 -0
  589. package/node_modules/zod/src/v4/classic/tests/object.test.ts +56 -0
  590. package/node_modules/zod/src/v4/classic/tests/optin-ladder.test.ts +3 -2
  591. package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +70 -0
  592. package/node_modules/zod/src/v4/classic/tests/properties.test.ts +141 -0
  593. package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +46 -1
  594. package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +19 -0
  595. package/node_modules/zod/src/v4/classic/tests/string.test.ts +95 -1
  596. package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +33 -1
  597. package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +234 -38
  598. package/node_modules/zod/src/v4/classic/tests/validate.test.ts +569 -0
  599. package/node_modules/zod/src/v4/core/api.ts +44 -28
  600. package/node_modules/zod/src/v4/core/checks.ts +62 -102
  601. package/node_modules/zod/src/v4/core/compile.ts +218 -93
  602. package/node_modules/zod/src/v4/core/core.ts +1 -3
  603. package/node_modules/zod/src/v4/core/doc.ts +6 -2
  604. package/node_modules/zod/src/v4/core/errors.ts +3 -6
  605. package/node_modules/zod/src/v4/core/json-schema-generator.ts +2 -2
  606. package/node_modules/zod/src/v4/core/json-schema-processors.ts +185 -81
  607. package/node_modules/zod/src/v4/core/memoizer.ts +75 -28
  608. package/node_modules/zod/src/v4/core/parse.ts +37 -16
  609. package/node_modules/zod/src/v4/core/regexes.ts +14 -4
  610. package/node_modules/zod/src/v4/core/schemas.ts +296 -132
  611. package/node_modules/zod/src/v4/core/tests/cached.test.ts +54 -0
  612. package/node_modules/zod/src/v4/core/tests/compile-differential.test.ts +35 -0
  613. package/node_modules/zod/src/v4/core/tests/compile-generative.test.ts +445 -0
  614. package/node_modules/zod/src/v4/core/tests/compile.test.ts +399 -2
  615. package/node_modules/zod/src/v4/core/tests/email-regex.test.ts +140 -0
  616. package/node_modules/zod/src/v4/core/tests/locales/tg.test.ts +85 -0
  617. package/node_modules/zod/src/v4/core/tests/polyfill-collision.test.ts +46 -0
  618. package/node_modules/zod/src/v4/core/tests/url-no-canparse.test.ts +118 -16
  619. package/node_modules/zod/src/v4/core/to-json-schema.ts +9 -7
  620. package/node_modules/zod/src/v4/core/util.ts +218 -147
  621. package/node_modules/zod/src/v4/core/versions.ts +2 -2
  622. package/node_modules/zod/src/v4/locales/ar.ts +2 -0
  623. package/node_modules/zod/src/v4/locales/az.ts +2 -0
  624. package/node_modules/zod/src/v4/locales/be.ts +2 -0
  625. package/node_modules/zod/src/v4/locales/bg.ts +2 -0
  626. package/node_modules/zod/src/v4/locales/bn.ts +2 -0
  627. package/node_modules/zod/src/v4/locales/ca.ts +2 -0
  628. package/node_modules/zod/src/v4/locales/ckb.ts +2 -0
  629. package/node_modules/zod/src/v4/locales/cs.ts +2 -0
  630. package/node_modules/zod/src/v4/locales/da.ts +2 -0
  631. package/node_modules/zod/src/v4/locales/de.ts +2 -0
  632. package/node_modules/zod/src/v4/locales/el.ts +2 -0
  633. package/node_modules/zod/src/v4/locales/en.ts +2 -0
  634. package/node_modules/zod/src/v4/locales/eo.ts +2 -0
  635. package/node_modules/zod/src/v4/locales/es.ts +2 -0
  636. package/node_modules/zod/src/v4/locales/fa.ts +2 -0
  637. package/node_modules/zod/src/v4/locales/fi.ts +2 -0
  638. package/node_modules/zod/src/v4/locales/fr-CA.ts +2 -0
  639. package/node_modules/zod/src/v4/locales/fr.ts +2 -0
  640. package/node_modules/zod/src/v4/locales/gu.ts +2 -0
  641. package/node_modules/zod/src/v4/locales/he.ts +2 -0
  642. package/node_modules/zod/src/v4/locales/hi.ts +2 -0
  643. package/node_modules/zod/src/v4/locales/hr.ts +2 -0
  644. package/node_modules/zod/src/v4/locales/hu.ts +2 -0
  645. package/node_modules/zod/src/v4/locales/hy.ts +2 -0
  646. package/node_modules/zod/src/v4/locales/id.ts +2 -0
  647. package/node_modules/zod/src/v4/locales/index.ts +1 -0
  648. package/node_modules/zod/src/v4/locales/is.ts +2 -0
  649. package/node_modules/zod/src/v4/locales/it.ts +2 -0
  650. package/node_modules/zod/src/v4/locales/ja.ts +2 -0
  651. package/node_modules/zod/src/v4/locales/ka.ts +2 -0
  652. package/node_modules/zod/src/v4/locales/km.ts +2 -0
  653. package/node_modules/zod/src/v4/locales/kn.ts +2 -0
  654. package/node_modules/zod/src/v4/locales/ko.ts +2 -0
  655. package/node_modules/zod/src/v4/locales/lt.ts +2 -0
  656. package/node_modules/zod/src/v4/locales/mk.ts +2 -0
  657. package/node_modules/zod/src/v4/locales/ms.ts +2 -0
  658. package/node_modules/zod/src/v4/locales/ne.ts +2 -0
  659. package/node_modules/zod/src/v4/locales/nl.ts +2 -0
  660. package/node_modules/zod/src/v4/locales/nn.ts +2 -0
  661. package/node_modules/zod/src/v4/locales/no.ts +2 -0
  662. package/node_modules/zod/src/v4/locales/ota.ts +2 -0
  663. package/node_modules/zod/src/v4/locales/pl.ts +2 -0
  664. package/node_modules/zod/src/v4/locales/ps.ts +2 -0
  665. package/node_modules/zod/src/v4/locales/pt-BR.ts +2 -0
  666. package/node_modules/zod/src/v4/locales/pt.ts +2 -0
  667. package/node_modules/zod/src/v4/locales/ro.ts +2 -0
  668. package/node_modules/zod/src/v4/locales/ru.ts +2 -0
  669. package/node_modules/zod/src/v4/locales/sk.ts +2 -0
  670. package/node_modules/zod/src/v4/locales/sl.ts +2 -0
  671. package/node_modules/zod/src/v4/locales/sv.ts +2 -0
  672. package/node_modules/zod/src/v4/locales/ta.ts +2 -0
  673. package/node_modules/zod/src/v4/locales/tg.ts +135 -0
  674. package/node_modules/zod/src/v4/locales/th.ts +2 -0
  675. package/node_modules/zod/src/v4/locales/tk.ts +2 -0
  676. package/node_modules/zod/src/v4/locales/tr.ts +2 -0
  677. package/node_modules/zod/src/v4/locales/uk.ts +2 -0
  678. package/node_modules/zod/src/v4/locales/ur.ts +2 -0
  679. package/node_modules/zod/src/v4/locales/uz.ts +2 -0
  680. package/node_modules/zod/src/v4/locales/vi.ts +2 -0
  681. package/node_modules/zod/src/v4/locales/yo.ts +2 -0
  682. package/node_modules/zod/src/v4/locales/zh-CN.ts +2 -0
  683. package/node_modules/zod/src/v4/locales/zh-TW.ts +2 -0
  684. package/node_modules/zod/src/v4/mini/external.ts +2 -0
  685. package/node_modules/zod/src/v4/mini/schemas.ts +32 -7
  686. package/node_modules/zod/src/v4/mini/tests/checks.test.ts +1 -1
  687. package/node_modules/zod/src/v4/mini/tests/computed.test.ts +11 -17
  688. package/node_modules/zod/src/v4/mini/tests/index.test.ts +86 -0
  689. package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +16 -0
  690. package/node_modules/zod/src/v4/mini/tests/string.test.ts +23 -0
  691. package/node_modules/zod/v3/ZodError.cjs +19 -0
  692. package/node_modules/zod/v3/errors.cjs +19 -0
  693. package/node_modules/zod/v3/external.cjs +19 -0
  694. package/node_modules/zod/v3/helpers/enumUtil.cjs +19 -0
  695. package/node_modules/zod/v3/helpers/errorUtil.cjs +20 -1
  696. package/node_modules/zod/v3/helpers/errorUtil.js +1 -1
  697. package/node_modules/zod/v3/helpers/parseUtil.cjs +19 -0
  698. package/node_modules/zod/v3/helpers/partialUtil.cjs +19 -0
  699. package/node_modules/zod/v3/helpers/typeAliases.cjs +19 -0
  700. package/node_modules/zod/v3/helpers/util.cjs +19 -0
  701. package/node_modules/zod/v3/index.cjs +19 -0
  702. package/node_modules/zod/v3/standard-schema.cjs +19 -0
  703. package/node_modules/zod/v3/types.cjs +19 -0
  704. package/node_modules/zod/v4/classic/checks.cjs +19 -0
  705. package/node_modules/zod/v4/classic/coerce.cjs +19 -0
  706. package/node_modules/zod/v4/classic/compat.cjs +19 -0
  707. package/node_modules/zod/v4/classic/deep-partial.cjs +19 -0
  708. package/node_modules/zod/v4/classic/errors.cjs +19 -0
  709. package/node_modules/zod/v4/classic/external.cjs +22 -1
  710. package/node_modules/zod/v4/classic/external.d.cts +1 -1
  711. package/node_modules/zod/v4/classic/external.d.ts +1 -1
  712. package/node_modules/zod/v4/classic/external.js +1 -1
  713. package/node_modules/zod/v4/classic/from-json-schema.cjs +264 -24
  714. package/node_modules/zod/v4/classic/from-json-schema.js +245 -24
  715. package/node_modules/zod/v4/classic/in-out.cjs +19 -0
  716. package/node_modules/zod/v4/classic/index.cjs +19 -0
  717. package/node_modules/zod/v4/classic/iso.cjs +19 -0
  718. package/node_modules/zod/v4/classic/parse.cjs +19 -0
  719. package/node_modules/zod/v4/classic/schemas.cjs +100 -35
  720. package/node_modules/zod/v4/classic/schemas.d.cts +15 -1
  721. package/node_modules/zod/v4/classic/schemas.d.ts +15 -1
  722. package/node_modules/zod/v4/classic/schemas.js +77 -33
  723. package/node_modules/zod/v4/core/api.cjs +45 -22
  724. package/node_modules/zod/v4/core/api.d.cts +12 -6
  725. package/node_modules/zod/v4/core/api.d.ts +12 -6
  726. package/node_modules/zod/v4/core/api.js +25 -22
  727. package/node_modules/zod/v4/core/checks.cjs +51 -97
  728. package/node_modules/zod/v4/core/checks.d.cts +17 -1
  729. package/node_modules/zod/v4/core/checks.d.ts +17 -1
  730. package/node_modules/zod/v4/core/checks.js +31 -96
  731. package/node_modules/zod/v4/core/compile.cjs +173 -78
  732. package/node_modules/zod/v4/core/compile.d.cts +18 -4
  733. package/node_modules/zod/v4/core/compile.d.ts +18 -4
  734. package/node_modules/zod/v4/core/compile.js +154 -79
  735. package/node_modules/zod/v4/core/core.cjs +20 -1
  736. package/node_modules/zod/v4/core/core.js +1 -1
  737. package/node_modules/zod/v4/core/doc.cjs +26 -2
  738. package/node_modules/zod/v4/core/doc.js +7 -2
  739. package/node_modules/zod/v4/core/errors.cjs +21 -5
  740. package/node_modules/zod/v4/core/errors.js +2 -5
  741. package/node_modules/zod/v4/core/index.cjs +19 -0
  742. package/node_modules/zod/v4/core/json-schema-generator.cjs +20 -1
  743. package/node_modules/zod/v4/core/json-schema-generator.js +2 -2
  744. package/node_modules/zod/v4/core/json-schema-processors.cjs +188 -72
  745. package/node_modules/zod/v4/core/json-schema-processors.d.cts +16 -0
  746. package/node_modules/zod/v4/core/json-schema-processors.d.ts +16 -0
  747. package/node_modules/zod/v4/core/json-schema-processors.js +170 -74
  748. package/node_modules/zod/v4/core/json-schema.cjs +19 -0
  749. package/node_modules/zod/v4/core/memoizer.cjs +111 -23
  750. package/node_modules/zod/v4/core/memoizer.js +69 -23
  751. package/node_modules/zod/v4/core/parse.cjs +56 -16
  752. package/node_modules/zod/v4/core/parse.js +37 -16
  753. package/node_modules/zod/v4/core/regexes.cjs +31 -6
  754. package/node_modules/zod/v4/core/regexes.d.cts +3 -0
  755. package/node_modules/zod/v4/core/regexes.d.ts +3 -0
  756. package/node_modules/zod/v4/core/regexes.js +10 -4
  757. package/node_modules/zod/v4/core/registries.cjs +19 -0
  758. package/node_modules/zod/v4/core/schemas.cjs +302 -114
  759. package/node_modules/zod/v4/core/schemas.d.cts +28 -8
  760. package/node_modules/zod/v4/core/schemas.d.ts +28 -8
  761. package/node_modules/zod/v4/core/schemas.js +279 -113
  762. package/node_modules/zod/v4/core/standard-schema.cjs +19 -0
  763. package/node_modules/zod/v4/core/to-json-schema.cjs +28 -7
  764. package/node_modules/zod/v4/core/to-json-schema.d.cts +4 -3
  765. package/node_modules/zod/v4/core/to-json-schema.d.ts +4 -3
  766. package/node_modules/zod/v4/core/to-json-schema.js +7 -6
  767. package/node_modules/zod/v4/core/util.cjs +177 -143
  768. package/node_modules/zod/v4/core/util.d.cts +25 -4
  769. package/node_modules/zod/v4/core/util.d.ts +25 -4
  770. package/node_modules/zod/v4/core/util.js +156 -143
  771. package/node_modules/zod/v4/core/versions.cjs +21 -2
  772. package/node_modules/zod/v4/core/versions.d.cts +1 -1
  773. package/node_modules/zod/v4/core/versions.d.ts +1 -1
  774. package/node_modules/zod/v4/core/versions.js +2 -2
  775. package/node_modules/zod/v4/core/visit.cjs +19 -0
  776. package/node_modules/zod/v4/index.cjs +19 -0
  777. package/node_modules/zod/v4/locales/ar.cjs +2 -0
  778. package/node_modules/zod/v4/locales/ar.js +2 -0
  779. package/node_modules/zod/v4/locales/az.cjs +2 -0
  780. package/node_modules/zod/v4/locales/az.js +2 -0
  781. package/node_modules/zod/v4/locales/be.cjs +2 -0
  782. package/node_modules/zod/v4/locales/be.js +2 -0
  783. package/node_modules/zod/v4/locales/bg.cjs +2 -0
  784. package/node_modules/zod/v4/locales/bg.js +2 -0
  785. package/node_modules/zod/v4/locales/bn.cjs +2 -0
  786. package/node_modules/zod/v4/locales/bn.js +2 -0
  787. package/node_modules/zod/v4/locales/ca.cjs +2 -0
  788. package/node_modules/zod/v4/locales/ca.js +2 -0
  789. package/node_modules/zod/v4/locales/ckb.cjs +2 -0
  790. package/node_modules/zod/v4/locales/ckb.js +2 -0
  791. package/node_modules/zod/v4/locales/cs.cjs +2 -0
  792. package/node_modules/zod/v4/locales/cs.js +2 -0
  793. package/node_modules/zod/v4/locales/da.cjs +2 -0
  794. package/node_modules/zod/v4/locales/da.js +2 -0
  795. package/node_modules/zod/v4/locales/de.cjs +2 -0
  796. package/node_modules/zod/v4/locales/de.js +2 -0
  797. package/node_modules/zod/v4/locales/el.cjs +2 -0
  798. package/node_modules/zod/v4/locales/el.js +2 -0
  799. package/node_modules/zod/v4/locales/en.cjs +2 -0
  800. package/node_modules/zod/v4/locales/en.js +2 -0
  801. package/node_modules/zod/v4/locales/eo.cjs +2 -0
  802. package/node_modules/zod/v4/locales/eo.js +2 -0
  803. package/node_modules/zod/v4/locales/es.cjs +2 -0
  804. package/node_modules/zod/v4/locales/es.js +2 -0
  805. package/node_modules/zod/v4/locales/fa.cjs +2 -0
  806. package/node_modules/zod/v4/locales/fa.js +2 -0
  807. package/node_modules/zod/v4/locales/fi.cjs +2 -0
  808. package/node_modules/zod/v4/locales/fi.js +2 -0
  809. package/node_modules/zod/v4/locales/fr-CA.cjs +2 -0
  810. package/node_modules/zod/v4/locales/fr-CA.js +2 -0
  811. package/node_modules/zod/v4/locales/fr.cjs +2 -0
  812. package/node_modules/zod/v4/locales/fr.js +2 -0
  813. package/node_modules/zod/v4/locales/gu.cjs +2 -0
  814. package/node_modules/zod/v4/locales/gu.js +2 -0
  815. package/node_modules/zod/v4/locales/he.cjs +2 -0
  816. package/node_modules/zod/v4/locales/he.js +2 -0
  817. package/node_modules/zod/v4/locales/hi.cjs +2 -0
  818. package/node_modules/zod/v4/locales/hi.js +2 -0
  819. package/node_modules/zod/v4/locales/hr.cjs +2 -0
  820. package/node_modules/zod/v4/locales/hr.js +2 -0
  821. package/node_modules/zod/v4/locales/hu.cjs +2 -0
  822. package/node_modules/zod/v4/locales/hu.js +2 -0
  823. package/node_modules/zod/v4/locales/hy.cjs +2 -0
  824. package/node_modules/zod/v4/locales/hy.js +2 -0
  825. package/node_modules/zod/v4/locales/id.cjs +2 -0
  826. package/node_modules/zod/v4/locales/id.js +2 -0
  827. package/node_modules/zod/v4/locales/index.cjs +22 -1
  828. package/node_modules/zod/v4/locales/index.d.cts +1 -0
  829. package/node_modules/zod/v4/locales/index.d.ts +1 -0
  830. package/node_modules/zod/v4/locales/index.js +1 -0
  831. package/node_modules/zod/v4/locales/is.cjs +2 -0
  832. package/node_modules/zod/v4/locales/is.js +2 -0
  833. package/node_modules/zod/v4/locales/it.cjs +2 -0
  834. package/node_modules/zod/v4/locales/it.js +2 -0
  835. package/node_modules/zod/v4/locales/ja.cjs +2 -0
  836. package/node_modules/zod/v4/locales/ja.js +2 -0
  837. package/node_modules/zod/v4/locales/ka.cjs +2 -0
  838. package/node_modules/zod/v4/locales/ka.js +2 -0
  839. package/node_modules/zod/v4/locales/km.cjs +2 -0
  840. package/node_modules/zod/v4/locales/km.js +2 -0
  841. package/node_modules/zod/v4/locales/kn.cjs +2 -0
  842. package/node_modules/zod/v4/locales/kn.js +2 -0
  843. package/node_modules/zod/v4/locales/ko.cjs +2 -0
  844. package/node_modules/zod/v4/locales/ko.js +2 -0
  845. package/node_modules/zod/v4/locales/lt.cjs +2 -0
  846. package/node_modules/zod/v4/locales/lt.js +2 -0
  847. package/node_modules/zod/v4/locales/mk.cjs +2 -0
  848. package/node_modules/zod/v4/locales/mk.js +2 -0
  849. package/node_modules/zod/v4/locales/ms.cjs +2 -0
  850. package/node_modules/zod/v4/locales/ms.js +2 -0
  851. package/node_modules/zod/v4/locales/ne.cjs +2 -0
  852. package/node_modules/zod/v4/locales/ne.js +2 -0
  853. package/node_modules/zod/v4/locales/nl.cjs +2 -0
  854. package/node_modules/zod/v4/locales/nl.js +2 -0
  855. package/node_modules/zod/v4/locales/nn.cjs +2 -0
  856. package/node_modules/zod/v4/locales/nn.js +2 -0
  857. package/node_modules/zod/v4/locales/no.cjs +2 -0
  858. package/node_modules/zod/v4/locales/no.js +2 -0
  859. package/node_modules/zod/v4/locales/ota.cjs +2 -0
  860. package/node_modules/zod/v4/locales/ota.js +2 -0
  861. package/node_modules/zod/v4/locales/pl.cjs +2 -0
  862. package/node_modules/zod/v4/locales/pl.js +2 -0
  863. package/node_modules/zod/v4/locales/ps.cjs +2 -0
  864. package/node_modules/zod/v4/locales/ps.js +2 -0
  865. package/node_modules/zod/v4/locales/pt-BR.cjs +2 -0
  866. package/node_modules/zod/v4/locales/pt-BR.js +2 -0
  867. package/node_modules/zod/v4/locales/pt.cjs +2 -0
  868. package/node_modules/zod/v4/locales/pt.js +2 -0
  869. package/node_modules/zod/v4/locales/ro.cjs +2 -0
  870. package/node_modules/zod/v4/locales/ro.js +2 -0
  871. package/node_modules/zod/v4/locales/ru.cjs +2 -0
  872. package/node_modules/zod/v4/locales/ru.js +2 -0
  873. package/node_modules/zod/v4/locales/sk.cjs +2 -0
  874. package/node_modules/zod/v4/locales/sk.js +2 -0
  875. package/node_modules/zod/v4/locales/sl.cjs +2 -0
  876. package/node_modules/zod/v4/locales/sl.js +2 -0
  877. package/node_modules/zod/v4/locales/sv.cjs +2 -0
  878. package/node_modules/zod/v4/locales/sv.js +2 -0
  879. package/node_modules/zod/v4/locales/ta.cjs +2 -0
  880. package/node_modules/zod/v4/locales/ta.js +2 -0
  881. package/node_modules/zod/v4/locales/tg.cjs +144 -0
  882. package/node_modules/zod/v4/locales/tg.d.cts +5 -0
  883. package/node_modules/zod/v4/locales/tg.d.ts +4 -0
  884. package/node_modules/zod/v4/locales/tg.js +117 -0
  885. package/node_modules/zod/v4/locales/th.cjs +2 -0
  886. package/node_modules/zod/v4/locales/th.js +2 -0
  887. package/node_modules/zod/v4/locales/tk.cjs +2 -0
  888. package/node_modules/zod/v4/locales/tk.js +2 -0
  889. package/node_modules/zod/v4/locales/tr.cjs +2 -0
  890. package/node_modules/zod/v4/locales/tr.js +2 -0
  891. package/node_modules/zod/v4/locales/uk.cjs +2 -0
  892. package/node_modules/zod/v4/locales/uk.js +2 -0
  893. package/node_modules/zod/v4/locales/ur.cjs +2 -0
  894. package/node_modules/zod/v4/locales/ur.js +2 -0
  895. package/node_modules/zod/v4/locales/uz.cjs +2 -0
  896. package/node_modules/zod/v4/locales/uz.js +2 -0
  897. package/node_modules/zod/v4/locales/vi.cjs +2 -0
  898. package/node_modules/zod/v4/locales/vi.js +2 -0
  899. package/node_modules/zod/v4/locales/yo.cjs +2 -0
  900. package/node_modules/zod/v4/locales/yo.js +2 -0
  901. package/node_modules/zod/v4/locales/zh-CN.cjs +2 -0
  902. package/node_modules/zod/v4/locales/zh-CN.js +2 -0
  903. package/node_modules/zod/v4/locales/zh-TW.cjs +2 -0
  904. package/node_modules/zod/v4/locales/zh-TW.js +2 -0
  905. package/node_modules/zod/v4/mini/checks.cjs +19 -0
  906. package/node_modules/zod/v4/mini/coerce.cjs +19 -0
  907. package/node_modules/zod/v4/mini/deep-partial.cjs +19 -0
  908. package/node_modules/zod/v4/mini/external.cjs +22 -1
  909. package/node_modules/zod/v4/mini/external.d.cts +1 -1
  910. package/node_modules/zod/v4/mini/external.d.ts +1 -1
  911. package/node_modules/zod/v4/mini/external.js +1 -1
  912. package/node_modules/zod/v4/mini/in-out.cjs +19 -0
  913. package/node_modules/zod/v4/mini/index.cjs +19 -0
  914. package/node_modules/zod/v4/mini/iso.cjs +19 -0
  915. package/node_modules/zod/v4/mini/parse.cjs +19 -0
  916. package/node_modules/zod/v4/mini/schemas.cjs +44 -8
  917. package/node_modules/zod/v4/mini/schemas.d.cts +6 -1
  918. package/node_modules/zod/v4/mini/schemas.d.ts +6 -1
  919. package/node_modules/zod/v4/mini/schemas.js +21 -6
  920. package/node_modules/zod/v4-mini/index.cjs +19 -0
  921. package/package.json +7 -7
  922. package/node_modules/@openclaw/fs-safe/dist/absolute-path.d.ts.map +0 -1
  923. package/node_modules/@openclaw/fs-safe/dist/advanced.d.ts.map +0 -1
  924. package/node_modules/@openclaw/fs-safe/dist/archive-crc32.d.ts.map +0 -1
  925. package/node_modules/@openclaw/fs-safe/dist/archive-deadline.d.ts.map +0 -1
  926. package/node_modules/@openclaw/fs-safe/dist/archive-durability.d.ts.map +0 -1
  927. package/node_modules/@openclaw/fs-safe/dist/archive-entry.d.ts.map +0 -1
  928. package/node_modules/@openclaw/fs-safe/dist/archive-errors.d.ts.map +0 -1
  929. package/node_modules/@openclaw/fs-safe/dist/archive-gzip-tail.d.ts.map +0 -1
  930. package/node_modules/@openclaw/fs-safe/dist/archive-input.d.ts.map +0 -1
  931. package/node_modules/@openclaw/fs-safe/dist/archive-kind.d.ts.map +0 -1
  932. package/node_modules/@openclaw/fs-safe/dist/archive-limits.d.ts.map +0 -1
  933. package/node_modules/@openclaw/fs-safe/dist/archive-merge.d.ts.map +0 -1
  934. package/node_modules/@openclaw/fs-safe/dist/archive-native.d.ts +0 -21
  935. package/node_modules/@openclaw/fs-safe/dist/archive-native.d.ts.map +0 -1
  936. package/node_modules/@openclaw/fs-safe/dist/archive-native.js +0 -97
  937. package/node_modules/@openclaw/fs-safe/dist/archive-options.d.ts +0 -23
  938. package/node_modules/@openclaw/fs-safe/dist/archive-options.d.ts.map +0 -1
  939. package/node_modules/@openclaw/fs-safe/dist/archive-parser-errors.d.ts.map +0 -1
  940. package/node_modules/@openclaw/fs-safe/dist/archive-plan.d.ts.map +0 -1
  941. package/node_modules/@openclaw/fs-safe/dist/archive-policy.d.ts +0 -22
  942. package/node_modules/@openclaw/fs-safe/dist/archive-policy.d.ts.map +0 -1
  943. package/node_modules/@openclaw/fs-safe/dist/archive-policy.js +0 -38
  944. package/node_modules/@openclaw/fs-safe/dist/archive-read.d.ts.map +0 -1
  945. package/node_modules/@openclaw/fs-safe/dist/archive-staging.d.ts.map +0 -1
  946. package/node_modules/@openclaw/fs-safe/dist/archive-tar-inspect.d.ts +0 -7
  947. package/node_modules/@openclaw/fs-safe/dist/archive-tar-inspect.d.ts.map +0 -1
  948. package/node_modules/@openclaw/fs-safe/dist/archive-tar-inspect.js +0 -62
  949. package/node_modules/@openclaw/fs-safe/dist/archive-tar-stream.d.ts.map +0 -1
  950. package/node_modules/@openclaw/fs-safe/dist/archive-tar-wasm.d.ts.map +0 -1
  951. package/node_modules/@openclaw/fs-safe/dist/archive-tar.d.ts +0 -19
  952. package/node_modules/@openclaw/fs-safe/dist/archive-tar.d.ts.map +0 -1
  953. package/node_modules/@openclaw/fs-safe/dist/archive-tar.js +0 -21
  954. package/node_modules/@openclaw/fs-safe/dist/archive-zip-admission.d.ts.map +0 -1
  955. package/node_modules/@openclaw/fs-safe/dist/archive-zip-count.d.ts.map +0 -1
  956. package/node_modules/@openclaw/fs-safe/dist/archive-zip-directory.d.ts.map +0 -1
  957. package/node_modules/@openclaw/fs-safe/dist/archive-zip-entry.d.ts.map +0 -1
  958. package/node_modules/@openclaw/fs-safe/dist/archive-zip-integrity.d.ts.map +0 -1
  959. package/node_modules/@openclaw/fs-safe/dist/archive-zip-loader.d.ts.map +0 -1
  960. package/node_modules/@openclaw/fs-safe/dist/archive-zip-manifest.d.ts.map +0 -1
  961. package/node_modules/@openclaw/fs-safe/dist/archive-zip-names.d.ts.map +0 -1
  962. package/node_modules/@openclaw/fs-safe/dist/archive-zip-preflight.d.ts.map +0 -1
  963. package/node_modules/@openclaw/fs-safe/dist/archive.d.ts.map +0 -1
  964. package/node_modules/@openclaw/fs-safe/dist/async-lock.d.ts.map +0 -1
  965. package/node_modules/@openclaw/fs-safe/dist/atomic.d.ts.map +0 -1
  966. package/node_modules/@openclaw/fs-safe/dist/bounded-read-stream.d.ts.map +0 -1
  967. package/node_modules/@openclaw/fs-safe/dist/bounded-read.d.ts.map +0 -1
  968. package/node_modules/@openclaw/fs-safe/dist/byte-budget.d.ts.map +0 -1
  969. package/node_modules/@openclaw/fs-safe/dist/clone-metadata.d.ts.map +0 -1
  970. package/node_modules/@openclaw/fs-safe/dist/config.d.ts.map +0 -1
  971. package/node_modules/@openclaw/fs-safe/dist/containment.d.ts.map +0 -1
  972. package/node_modules/@openclaw/fs-safe/dist/copy-file-input.d.ts.map +0 -1
  973. package/node_modules/@openclaw/fs-safe/dist/copy-policy.d.ts.map +0 -1
  974. package/node_modules/@openclaw/fs-safe/dist/copy-publication.d.ts.map +0 -1
  975. package/node_modules/@openclaw/fs-safe/dist/copy-tree-portable.d.ts.map +0 -1
  976. package/node_modules/@openclaw/fs-safe/dist/copy.d.ts.map +0 -1
  977. package/node_modules/@openclaw/fs-safe/dist/darwin-acl.d.ts +0 -4
  978. package/node_modules/@openclaw/fs-safe/dist/darwin-acl.d.ts.map +0 -1
  979. package/node_modules/@openclaw/fs-safe/dist/darwin-acl.js +0 -24
  980. package/node_modules/@openclaw/fs-safe/dist/deny-mutations.d.ts.map +0 -1
  981. package/node_modules/@openclaw/fs-safe/dist/device-path.d.ts.map +0 -1
  982. package/node_modules/@openclaw/fs-safe/dist/directory-durability.d.ts.map +0 -1
  983. package/node_modules/@openclaw/fs-safe/dist/directory-entry-path.d.ts.map +0 -1
  984. package/node_modules/@openclaw/fs-safe/dist/directory-guard.d.ts.map +0 -1
  985. package/node_modules/@openclaw/fs-safe/dist/directory-mode-node.d.ts.map +0 -1
  986. package/node_modules/@openclaw/fs-safe/dist/directory-mode-owner.d.ts +0 -21
  987. package/node_modules/@openclaw/fs-safe/dist/directory-mode-owner.d.ts.map +0 -1
  988. package/node_modules/@openclaw/fs-safe/dist/directory-mode-owner.js +0 -78
  989. package/node_modules/@openclaw/fs-safe/dist/durability.d.ts.map +0 -1
  990. package/node_modules/@openclaw/fs-safe/dist/effective-uid.d.ts.map +0 -1
  991. package/node_modules/@openclaw/fs-safe/dist/error-detail.d.ts.map +0 -1
  992. package/node_modules/@openclaw/fs-safe/dist/errors.d.ts.map +0 -1
  993. package/node_modules/@openclaw/fs-safe/dist/file-handle-transfer.d.ts.map +0 -1
  994. package/node_modules/@openclaw/fs-safe/dist/file-hash.d.ts.map +0 -1
  995. package/node_modules/@openclaw/fs-safe/dist/file-identity.d.ts.map +0 -1
  996. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync.d.ts.map +0 -1
  997. package/node_modules/@openclaw/fs-safe/dist/file-lock.d.ts.map +0 -1
  998. package/node_modules/@openclaw/fs-safe/dist/file-observation.d.ts.map +0 -1
  999. package/node_modules/@openclaw/fs-safe/dist/file-store-boundary.d.ts.map +0 -1
  1000. package/node_modules/@openclaw/fs-safe/dist/file-store-copy-source.d.ts +0 -5
  1001. package/node_modules/@openclaw/fs-safe/dist/file-store-copy-source.d.ts.map +0 -1
  1002. package/node_modules/@openclaw/fs-safe/dist/file-store-copy-source.js +0 -31
  1003. package/node_modules/@openclaw/fs-safe/dist/file-store-limit.d.ts +0 -2
  1004. package/node_modules/@openclaw/fs-safe/dist/file-store-limit.d.ts.map +0 -1
  1005. package/node_modules/@openclaw/fs-safe/dist/file-store-limit.js +0 -8
  1006. package/node_modules/@openclaw/fs-safe/dist/file-store-path.d.ts +0 -3
  1007. package/node_modules/@openclaw/fs-safe/dist/file-store-path.d.ts.map +0 -1
  1008. package/node_modules/@openclaw/fs-safe/dist/file-store-path.js +0 -30
  1009. package/node_modules/@openclaw/fs-safe/dist/file-store-prune.d.ts.map +0 -1
  1010. package/node_modules/@openclaw/fs-safe/dist/file-store-sync-directory.d.ts.map +0 -1
  1011. package/node_modules/@openclaw/fs-safe/dist/file-store-sync-write.d.ts.map +0 -1
  1012. package/node_modules/@openclaw/fs-safe/dist/file-store.d.ts.map +0 -1
  1013. package/node_modules/@openclaw/fs-safe/dist/file-sync.d.ts.map +0 -1
  1014. package/node_modules/@openclaw/fs-safe/dist/filename.d.ts.map +0 -1
  1015. package/node_modules/@openclaw/fs-safe/dist/fs.d.ts.map +0 -1
  1016. package/node_modules/@openclaw/fs-safe/dist/guarded-mkdir.d.ts.map +0 -1
  1017. package/node_modules/@openclaw/fs-safe/dist/guarded-mutation.d.ts.map +0 -1
  1018. package/node_modules/@openclaw/fs-safe/dist/guest-dispatch-python.d.ts.map +0 -1
  1019. package/node_modules/@openclaw/fs-safe/dist/guest-native-python.d.ts.map +0 -1
  1020. package/node_modules/@openclaw/fs-safe/dist/guest.d.ts.map +0 -1
  1021. package/node_modules/@openclaw/fs-safe/dist/home-dir.d.ts.map +0 -1
  1022. package/node_modules/@openclaw/fs-safe/dist/index.d.ts.map +0 -1
  1023. package/node_modules/@openclaw/fs-safe/dist/install-path.d.ts.map +0 -1
  1024. package/node_modules/@openclaw/fs-safe/dist/json-document-store.d.ts.map +0 -1
  1025. package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-directory.d.ts.map +0 -1
  1026. package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-ownership.d.ts.map +0 -1
  1027. package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-paths.d.ts +0 -11
  1028. package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-paths.d.ts.map +0 -1
  1029. package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-paths.js +0 -42
  1030. package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-read.d.ts.map +0 -1
  1031. package/node_modules/@openclaw/fs-safe/dist/json-durable-queue.d.ts.map +0 -1
  1032. package/node_modules/@openclaw/fs-safe/dist/json-store.d.ts.map +0 -1
  1033. package/node_modules/@openclaw/fs-safe/dist/json-stringify.d.ts.map +0 -1
  1034. package/node_modules/@openclaw/fs-safe/dist/json.d.ts.map +0 -1
  1035. package/node_modules/@openclaw/fs-safe/dist/local-file-access.d.ts.map +0 -1
  1036. package/node_modules/@openclaw/fs-safe/dist/local-file-descriptor.d.ts.map +0 -1
  1037. package/node_modules/@openclaw/fs-safe/dist/local-roots.d.ts.map +0 -1
  1038. package/node_modules/@openclaw/fs-safe/dist/lock-config.d.ts.map +0 -1
  1039. package/node_modules/@openclaw/fs-safe/dist/move-path-cleanup.d.ts.map +0 -1
  1040. package/node_modules/@openclaw/fs-safe/dist/move-path-stage.d.ts.map +0 -1
  1041. package/node_modules/@openclaw/fs-safe/dist/move-path.d.ts.map +0 -1
  1042. package/node_modules/@openclaw/fs-safe/dist/mutation-authority.d.ts.map +0 -1
  1043. package/node_modules/@openclaw/fs-safe/dist/native-binding.d.ts.map +0 -1
  1044. package/node_modules/@openclaw/fs-safe/dist/native-config.d.ts.map +0 -1
  1045. package/node_modules/@openclaw/fs-safe/dist/native-directory-observation.d.ts.map +0 -1
  1046. package/node_modules/@openclaw/fs-safe/dist/native-operations.d.ts.map +0 -1
  1047. package/node_modules/@openclaw/fs-safe/dist/native-parent-admission.d.ts.map +0 -1
  1048. package/node_modules/@openclaw/fs-safe/dist/native-pinned-write-windows.d.ts.map +0 -1
  1049. package/node_modules/@openclaw/fs-safe/dist/native-pinned-write.d.ts.map +0 -1
  1050. package/node_modules/@openclaw/fs-safe/dist/native-staged-file.d.ts.map +0 -1
  1051. package/node_modules/@openclaw/fs-safe/dist/native.d.ts.map +0 -1
  1052. package/node_modules/@openclaw/fs-safe/dist/opened-file-failure.d.ts.map +0 -1
  1053. package/node_modules/@openclaw/fs-safe/dist/opened-realpath.d.ts.map +0 -1
  1054. package/node_modules/@openclaw/fs-safe/dist/output.d.ts.map +0 -1
  1055. package/node_modules/@openclaw/fs-safe/dist/overwrite-file-handle.d.ts.map +0 -1
  1056. package/node_modules/@openclaw/fs-safe/dist/owner-dacl.d.ts.map +0 -1
  1057. package/node_modules/@openclaw/fs-safe/dist/path-case.d.ts.map +0 -1
  1058. package/node_modules/@openclaw/fs-safe/dist/path-policy.d.ts.map +0 -1
  1059. package/node_modules/@openclaw/fs-safe/dist/path-prefix.d.ts.map +0 -1
  1060. package/node_modules/@openclaw/fs-safe/dist/path-scope-lexical.d.ts.map +0 -1
  1061. package/node_modules/@openclaw/fs-safe/dist/path-segment-route.d.ts.map +0 -1
  1062. package/node_modules/@openclaw/fs-safe/dist/path-suffix-aliases.d.ts.map +0 -1
  1063. package/node_modules/@openclaw/fs-safe/dist/path.d.ts.map +0 -1
  1064. package/node_modules/@openclaw/fs-safe/dist/permission-exec.d.ts.map +0 -1
  1065. package/node_modules/@openclaw/fs-safe/dist/permissions-public.d.ts.map +0 -1
  1066. package/node_modules/@openclaw/fs-safe/dist/permissions-windows.d.ts.map +0 -1
  1067. package/node_modules/@openclaw/fs-safe/dist/permissions.d.ts.map +0 -1
  1068. package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-admission.d.ts.map +0 -1
  1069. package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-observation.d.ts.map +0 -1
  1070. package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-shared-route.d.ts.map +0 -1
  1071. package/node_modules/@openclaw/fs-safe/dist/pinned-open.d.ts.map +0 -1
  1072. package/node_modules/@openclaw/fs-safe/dist/pinned-operation.d.ts.map +0 -1
  1073. package/node_modules/@openclaw/fs-safe/dist/pinned-write-types.d.ts.map +0 -1
  1074. package/node_modules/@openclaw/fs-safe/dist/pinned-write.d.ts.map +0 -1
  1075. package/node_modules/@openclaw/fs-safe/dist/positional-read.d.ts.map +0 -1
  1076. package/node_modules/@openclaw/fs-safe/dist/private-directory.d.ts.map +0 -1
  1077. package/node_modules/@openclaw/fs-safe/dist/private-producer-handoff.d.ts.map +0 -1
  1078. package/node_modules/@openclaw/fs-safe/dist/private-temp-workspace.d.ts.map +0 -1
  1079. package/node_modules/@openclaw/fs-safe/dist/publish-copy-stage.d.ts.map +0 -1
  1080. package/node_modules/@openclaw/fs-safe/dist/publish-file-failure.d.ts.map +0 -1
  1081. package/node_modules/@openclaw/fs-safe/dist/publish-file.d.ts.map +0 -1
  1082. package/node_modules/@openclaw/fs-safe/dist/read-open-flags.d.ts.map +0 -1
  1083. package/node_modules/@openclaw/fs-safe/dist/read-opened-file.d.ts.map +0 -1
  1084. package/node_modules/@openclaw/fs-safe/dist/realpath.d.ts.map +0 -1
  1085. package/node_modules/@openclaw/fs-safe/dist/recursive-mkdir-path.d.ts.map +0 -1
  1086. package/node_modules/@openclaw/fs-safe/dist/regular-file.d.ts.map +0 -1
  1087. package/node_modules/@openclaw/fs-safe/dist/replace-directory.d.ts.map +0 -1
  1088. package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-fallback.d.ts.map +0 -1
  1089. package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-source.d.ts.map +0 -1
  1090. package/node_modules/@openclaw/fs-safe/dist/replace-file-descriptor.d.ts.map +0 -1
  1091. package/node_modules/@openclaw/fs-safe/dist/replace-file-mode.d.ts.map +0 -1
  1092. package/node_modules/@openclaw/fs-safe/dist/replace-file-rename-policy.d.ts.map +0 -1
  1093. package/node_modules/@openclaw/fs-safe/dist/replace-file-temp-owner.d.ts.map +0 -1
  1094. package/node_modules/@openclaw/fs-safe/dist/replace-file.d.ts.map +0 -1
  1095. package/node_modules/@openclaw/fs-safe/dist/root-boundary.d.ts.map +0 -1
  1096. package/node_modules/@openclaw/fs-safe/dist/root-context.d.ts.map +0 -1
  1097. package/node_modules/@openclaw/fs-safe/dist/root-create-input.d.ts.map +0 -1
  1098. package/node_modules/@openclaw/fs-safe/dist/root-directory-creation.d.ts.map +0 -1
  1099. package/node_modules/@openclaw/fs-safe/dist/root-directory-list.d.ts.map +0 -1
  1100. package/node_modules/@openclaw/fs-safe/dist/root-directory.d.ts.map +0 -1
  1101. package/node_modules/@openclaw/fs-safe/dist/root-entries.d.ts.map +0 -1
  1102. package/node_modules/@openclaw/fs-safe/dist/root-errors.d.ts.map +0 -1
  1103. package/node_modules/@openclaw/fs-safe/dist/root-file-final-admission.d.ts.map +0 -1
  1104. package/node_modules/@openclaw/fs-safe/dist/root-file.d.ts.map +0 -1
  1105. package/node_modules/@openclaw/fs-safe/dist/root-impl.d.ts.map +0 -1
  1106. package/node_modules/@openclaw/fs-safe/dist/root-move-noreplace.d.ts.map +0 -1
  1107. package/node_modules/@openclaw/fs-safe/dist/root-move-preflight.d.ts.map +0 -1
  1108. package/node_modules/@openclaw/fs-safe/dist/root-observed-path.d.ts.map +0 -1
  1109. package/node_modules/@openclaw/fs-safe/dist/root-options.d.ts.map +0 -1
  1110. package/node_modules/@openclaw/fs-safe/dist/root-path-errors.d.ts.map +0 -1
  1111. package/node_modules/@openclaw/fs-safe/dist/root-path-existing.d.ts.map +0 -1
  1112. package/node_modules/@openclaw/fs-safe/dist/root-path-observation.d.ts.map +0 -1
  1113. package/node_modules/@openclaw/fs-safe/dist/root-path-stat.d.ts.map +0 -1
  1114. package/node_modules/@openclaw/fs-safe/dist/root-path-symlink.d.ts +0 -7
  1115. package/node_modules/@openclaw/fs-safe/dist/root-path-symlink.d.ts.map +0 -1
  1116. package/node_modules/@openclaw/fs-safe/dist/root-path-symlink.js +0 -55
  1117. package/node_modules/@openclaw/fs-safe/dist/root-path.d.ts.map +0 -1
  1118. package/node_modules/@openclaw/fs-safe/dist/root-paths-lexical.d.ts.map +0 -1
  1119. package/node_modules/@openclaw/fs-safe/dist/root-paths.d.ts.map +0 -1
  1120. package/node_modules/@openclaw/fs-safe/dist/root-read-admission.d.ts.map +0 -1
  1121. package/node_modules/@openclaw/fs-safe/dist/root-remove-identity.d.ts.map +0 -1
  1122. package/node_modules/@openclaw/fs-safe/dist/root-remove-receipt.d.ts.map +0 -1
  1123. package/node_modules/@openclaw/fs-safe/dist/root-remove.d.ts.map +0 -1
  1124. package/node_modules/@openclaw/fs-safe/dist/root-symlink-policy.d.ts.map +0 -1
  1125. package/node_modules/@openclaw/fs-safe/dist/root-walk.d.ts.map +0 -1
  1126. package/node_modules/@openclaw/fs-safe/dist/root-write-admission.d.ts.map +0 -1
  1127. package/node_modules/@openclaw/fs-safe/dist/root-write-compatibility.d.ts.map +0 -1
  1128. package/node_modules/@openclaw/fs-safe/dist/root-write-complete-parent.d.ts.map +0 -1
  1129. package/node_modules/@openclaw/fs-safe/dist/root-write-mode.d.ts.map +0 -1
  1130. package/node_modules/@openclaw/fs-safe/dist/root-write-publication.d.ts.map +0 -1
  1131. package/node_modules/@openclaw/fs-safe/dist/root-write-verification.d.ts.map +0 -1
  1132. package/node_modules/@openclaw/fs-safe/dist/root.d.ts.map +0 -1
  1133. package/node_modules/@openclaw/fs-safe/dist/safe-path-segment.d.ts.map +0 -1
  1134. package/node_modules/@openclaw/fs-safe/dist/secret-file.d.ts.map +0 -1
  1135. package/node_modules/@openclaw/fs-safe/dist/secret-read-async.d.ts.map +0 -1
  1136. package/node_modules/@openclaw/fs-safe/dist/secret-read-policy.d.ts.map +0 -1
  1137. package/node_modules/@openclaw/fs-safe/dist/secret.d.ts.map +0 -1
  1138. package/node_modules/@openclaw/fs-safe/dist/secure-file-windows.d.ts.map +0 -1
  1139. package/node_modules/@openclaw/fs-safe/dist/secure-file.d.ts.map +0 -1
  1140. package/node_modules/@openclaw/fs-safe/dist/secure-temp-dir.d.ts.map +0 -1
  1141. package/node_modules/@openclaw/fs-safe/dist/secure-temp-repair.d.ts.map +0 -1
  1142. package/node_modules/@openclaw/fs-safe/dist/sibling-staged-file.d.ts.map +0 -1
  1143. package/node_modules/@openclaw/fs-safe/dist/sibling-temp.d.ts.map +0 -1
  1144. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-acquire.d.ts.map +0 -1
  1145. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-handle.d.ts.map +0 -1
  1146. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-policy.d.ts.map +0 -1
  1147. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-reclaim.d.ts.map +0 -1
  1148. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-root.d.ts.map +0 -1
  1149. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-types.d.ts.map +0 -1
  1150. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock.d.ts.map +0 -1
  1151. package/node_modules/@openclaw/fs-safe/dist/staged-directory.d.ts.map +0 -1
  1152. package/node_modules/@openclaw/fs-safe/dist/staged-file-types.d.ts.map +0 -1
  1153. package/node_modules/@openclaw/fs-safe/dist/standalone-publication-path.d.ts +0 -2
  1154. package/node_modules/@openclaw/fs-safe/dist/standalone-publication-path.d.ts.map +0 -1
  1155. package/node_modules/@openclaw/fs-safe/dist/standalone-publication-path.js +0 -6
  1156. package/node_modules/@openclaw/fs-safe/dist/stat-observation.d.ts.map +0 -1
  1157. package/node_modules/@openclaw/fs-safe/dist/store.d.ts.map +0 -1
  1158. package/node_modules/@openclaw/fs-safe/dist/strict-file-identity.d.ts.map +0 -1
  1159. package/node_modules/@openclaw/fs-safe/dist/string-coerce.d.ts.map +0 -1
  1160. package/node_modules/@openclaw/fs-safe/dist/suppressed-error.d.ts.map +0 -1
  1161. package/node_modules/@openclaw/fs-safe/dist/symlink-parents.d.ts.map +0 -1
  1162. package/node_modules/@openclaw/fs-safe/dist/temp-cleanup.d.ts.map +0 -1
  1163. package/node_modules/@openclaw/fs-safe/dist/temp-target.d.ts.map +0 -1
  1164. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-admission.d.ts.map +0 -1
  1165. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-child-admission.d.ts.map +0 -1
  1166. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-descriptor.d.ts.map +0 -1
  1167. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-identity.d.ts +0 -15
  1168. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-identity.d.ts.map +0 -1
  1169. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-identity.js +0 -41
  1170. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-owner.d.ts.map +0 -1
  1171. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-permissions.d.ts +0 -4
  1172. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-permissions.d.ts.map +0 -1
  1173. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-permissions.js +0 -32
  1174. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-types.d.ts.map +0 -1
  1175. package/node_modules/@openclaw/fs-safe/dist/temp.d.ts.map +0 -1
  1176. package/node_modules/@openclaw/fs-safe/dist/test-hooks.d.ts.map +0 -1
  1177. package/node_modules/@openclaw/fs-safe/dist/text-atomic.d.ts.map +0 -1
  1178. package/node_modules/@openclaw/fs-safe/dist/timing.d.ts.map +0 -1
  1179. package/node_modules/@openclaw/fs-safe/dist/trash.d.ts.map +0 -1
  1180. package/node_modules/@openclaw/fs-safe/dist/types.d.ts.map +0 -1
  1181. package/node_modules/@openclaw/fs-safe/dist/unicode-path.d.ts.map +0 -1
  1182. package/node_modules/@openclaw/fs-safe/dist/walk.d.ts.map +0 -1
  1183. package/node_modules/@openclaw/fs-safe/dist/windows-command.d.ts.map +0 -1
  1184. package/node_modules/@openclaw/fs-safe/dist/windows-owner.d.ts.map +0 -1
  1185. package/node_modules/@openclaw/fs-safe/dist/windows-path-alias.d.ts.map +0 -1
  1186. package/node_modules/@openclaw/fs-safe/dist/write-file-handle.d.ts.map +0 -1
  1187. package/node_modules/@openclaw/fs-safe/dist/write-open-flags.d.ts.map +0 -1
  1188. package/node_modules/@openclaw/fs-safe/dist/write-queue.d.ts.map +0 -1
  1189. /package/node_modules/@openclaw/fs-safe/dist/{archive-options.js → owner-dacl-batch-worker.d.ts} +0 -0
@@ -1,24 +1,17 @@
1
1
  import fs from "node:fs";
2
+ import { acquireFileLockSyncWithRoot } from "./file-lock-sync-root-acquire.js";
3
+ import { withSyncHeldLockHandle } from "./file-lock-sync-root-held.js";
2
4
  import path from "node:path";
3
- import { FsSafeError } from "./errors.js";
4
- import { readSidecarLockSnapshotSync, readSidecarLockRawSnapshotSync, parseSidecarLockSnapshot, relativeSidecarLockPath, removeSidecarLockIfUnchangedSync, serializeSidecarLockPayload, sidecarLockSnapshotMatches, } from "./sidecar-lock-reclaim.js";
5
- import { computeSidecarLockDelayMs, isTransientLockFileDenial, maxTransientLockDenials, sidecarLockPayloadCreatedAtMs, validateSidecarLockStaleMs, validateSidecarLockCompromiseCheckIntervalMs, validateSidecarLockRetryOptions, validateSidecarLockTimeoutMs, } from "./sidecar-lock-policy.js";
5
+ import { readSidecarLockRawSnapshotSync, readSidecarLockSnapshotSync, removeSidecarLockIfUnchangedSync, serializeSidecarLockPayload, sidecarLockSnapshotMatches, } from "./sidecar-lock-reclaim.js";
6
+ import { sidecarLockTimeout, isTransientLockFileDenial, validateSidecarLockStaleMs, validateSidecarLockCompromiseCheckIntervalMs, validateSidecarLockRetryOptions, validateSidecarLockTimeoutMs, } from "./sidecar-lock-policy.js";
6
7
  import { getFsSafeLockConfig } from "./lock-config.js";
7
- import { sleepSync } from "./timing.js";
8
+ import { SyncLockAcquisition } from "./file-lock-sync-acquisition.js";
8
9
  import { assertNoWindowsPathAlias } from "./windows-path-alias.js";
9
10
  import { realpathSync } from "./realpath.js";
10
11
  import { recursiveMkdirPath } from "./recursive-mkdir-path.js";
11
12
  import { createSuppressedError } from "./suppressed-error.js";
12
- const SYNC_HELD_LOCKS_KEY = Symbol.for("fsSafe.syncSidecarLocks");
13
- const SYNC_CLEANUP_REGISTERED_KEY = Symbol.for("fsSafe.syncSidecarLockCleanupRegistered");
14
- const SYNC_CLEANUP_HANDLER_KEY = Symbol.for("fsSafe.syncSidecarLockCleanupHandler");
15
- function getSyncHeldLocks() {
16
- const globalWithState = globalThis;
17
- if (!globalWithState[SYNC_HELD_LOCKS_KEY]) {
18
- globalWithState[SYNC_HELD_LOCKS_KEY] = new Map();
19
- }
20
- return globalWithState[SYNC_HELD_LOCKS_KEY];
21
- }
13
+ import { ensureSyncLockExitCleanupRegistered, getSyncHeldLocks, foreignSyncHeldLock, getSyncLockAdmissions, syncReclaimGuardExists, } from "./file-lock-sync-admission.js";
14
+ import { handleSyncStaleAdmission, } from "./file-lock-sync-stale-admission.js";
22
15
  function releaseAllSyncHeldLocks() {
23
16
  const heldLocks = getSyncHeldLocks();
24
17
  for (const [normalizedTargetPath, held] of heldLocks) {
@@ -41,17 +34,14 @@ function releaseAllSyncHeldLocks() {
41
34
  }
42
35
  heldLocks.delete(normalizedTargetPath);
43
36
  }
44
- }
45
- function ensureSyncExitCleanupRegistered() {
46
- const globalWithCleanup = globalThis;
47
- if (globalWithCleanup[SYNC_CLEANUP_REGISTERED_KEY])
48
- return;
49
- globalWithCleanup[SYNC_CLEANUP_REGISTERED_KEY] = true;
50
- globalWithCleanup[SYNC_CLEANUP_HANDLER_KEY] = releaseAllSyncHeldLocks;
51
- process.on("exit", releaseAllSyncHeldLocks);
37
+ getSyncLockAdmissions().clear();
52
38
  }
53
39
  function verifySyncHeldLock(held) {
54
- const current = readSidecarLockSnapshotSync(held.lockPath, held.parsePayload);
40
+ const lockPath = held.lockPath;
41
+ const parsePayload = held.parsePayload;
42
+ const current = parsePayload
43
+ ? readSidecarLockSnapshotSync(lockPath, parsePayload)
44
+ : readSidecarLockRawSnapshotSync(lockPath);
55
45
  return !!current && sidecarLockSnapshotMatches(current, held.snapshot);
56
46
  }
57
47
  function releaseSyncHeldLock(held) {
@@ -113,42 +103,10 @@ function normalizeTargetPath(targetPath) {
113
103
  assertNoWindowsPathAlias(normalized);
114
104
  return normalized;
115
105
  }
116
- function boundedLockPath(lockPath, lockRoot) {
117
- const resolved = path.resolve(lockPath);
118
- assertNoWindowsPathAlias(resolved);
119
- if (!lockRoot)
120
- return resolved;
121
- relativeSidecarLockPath(lockRoot, resolved);
122
- const parent = path.dirname(resolved);
123
- const parentReal = canonicalLockParentSync(parent);
124
- assertNoWindowsPathAlias(parentReal);
125
- const parentRelative = path.relative(lockRoot.rootReal, parentReal);
126
- if (parentRelative === ".." || parentRelative.startsWith(`..${path.sep}`) || path.isAbsolute(parentRelative)) {
127
- throw new FsSafeError("outside-workspace", "sidecar lock parent is outside lockRoot");
128
- }
129
- const bounded = path.join(parentReal, path.basename(resolved));
130
- assertNoWindowsPathAlias(bounded);
131
- return bounded;
132
- }
133
- function defaultShouldReclaim(snapshot, staleMs, nowMs) {
134
- const createdAtMs = sidecarLockPayloadCreatedAtMs(snapshot.payload);
135
- if (createdAtMs !== null)
136
- return nowMs - createdAtMs > staleMs;
137
- // A cooperating holder can unlink after the snapshot; use its observed age.
138
- return !snapshot.stat || nowMs - snapshot.stat.mtimeMs > staleMs;
139
- }
140
- function reclaimGuardExists(reclaimGuardPath) {
141
- try {
142
- fs.lstatSync(reclaimGuardPath);
143
- return true;
144
- }
145
- catch (error) {
146
- if (error.code === "ENOENT")
147
- return false;
148
- throw error;
149
- }
150
- }
151
106
  export function acquireFileLockSync(targetPath, options) {
107
+ const lockRoot = options.lockRoot;
108
+ if (lockRoot)
109
+ return acquireFileLockSyncWithRoot(targetPath, options, lockRoot);
152
110
  const defaults = getFsSafeLockConfig();
153
111
  const retry = options.retry ?? defaults.retry ?? {};
154
112
  const timeoutMs = options.timeoutMs ?? defaults.timeoutMs;
@@ -156,228 +114,228 @@ export function acquireFileLockSync(targetPath, options) {
156
114
  validateSidecarLockTimeoutMs(timeoutMs);
157
115
  const staleMs = options.staleMs ?? defaults.staleMs ?? 30_000;
158
116
  validateSidecarLockStaleMs(staleMs);
159
- validateSidecarLockCompromiseCheckIntervalMs(options.compromiseCheckIntervalMs);
117
+ const compromiseCheckIntervalMs = options.compromiseCheckIntervalMs;
118
+ validateSidecarLockCompromiseCheckIntervalMs(compromiseCheckIntervalMs);
160
119
  const explicitLockPath = options.lockPath;
161
120
  assertNoWindowsPathAlias(targetPath);
162
121
  if (explicitLockPath !== undefined)
163
122
  assertNoWindowsPathAlias(explicitLockPath);
164
123
  const normalizedTargetPath = normalizeTargetPath(targetPath);
165
- const lockPath = boundedLockPath(explicitLockPath ?? `${normalizedTargetPath}.lock`, options.lockRoot);
124
+ const lockPath = path.resolve(explicitLockPath ?? `${normalizedTargetPath}.lock`);
125
+ assertNoWindowsPathAlias(lockPath);
126
+ const requestedReentrantOwner = options.reentrantOwner;
166
127
  const heldLocks = getSyncHeldLocks();
167
- const held = heldLocks.get(normalizedTargetPath);
168
- if (held &&
169
- options.reentrantOwner !== undefined &&
170
- held.reentrantOwner !== undefined &&
171
- options.reentrantOwner === held.reentrantOwner) {
172
- held.refCount += 1;
173
- return createSyncHeldLockHandle(held);
128
+ const currentTargetHolder = () => heldLocks.get(normalizedTargetPath) ??
129
+ foreignSyncHeldLock("raw", normalizedTargetPath);
130
+ const initiallyHeld = heldLocks.get(normalizedTargetPath);
131
+ if (initiallyHeld && !foreignSyncHeldLock("raw", normalizedTargetPath) &&
132
+ requestedReentrantOwner !== undefined &&
133
+ initiallyHeld.reentrantOwner !== undefined &&
134
+ requestedReentrantOwner === initiallyHeld.reentrantOwner) {
135
+ initiallyHeld.refCount += 1;
136
+ return createSyncHeldLockHandle(initiallyHeld);
174
137
  }
175
- // Process defaults fill the same fields here as withLockDefaults() fills for
176
- // the asynchronous manager, so both acquirers honor configureFsSafeLocks().
177
- const staleRecovery = options.staleRecovery ?? defaults.staleRecovery;
178
- const startedAt = Date.now();
179
- let attempt = 0;
180
- let transientDenials = 0;
138
+ const acquisition = new SyncLockAcquisition(lockPath, normalizedTargetPath, retry, timeoutMs);
139
+ let payloadCallback;
140
+ let onCompromised = undefined;
141
+ let onCompromisedObserved = false;
142
+ let parsePayload = undefined;
143
+ let parsePayloadObserved = false;
144
+ let staleRecovery = undefined;
145
+ let staleRecoveryObserved = false;
146
+ const staleOptions = {};
181
147
  const reclaimGuardPath = `${lockPath}.reclaim`;
182
- const waitForRetry = () => {
183
- const elapsed = Date.now() - startedAt;
184
- const timedOut = timeoutMs !== undefined && elapsed >= timeoutMs;
185
- if (timedOut || (retry.retries !== undefined && attempt >= retry.retries)) {
186
- throw Object.assign(new Error(`file lock timeout for ${normalizedTargetPath}`), {
187
- code: "file_lock_timeout",
188
- lockPath,
189
- normalizedTargetPath,
190
- });
191
- }
192
- const remaining = timeoutMs === undefined || timeoutMs === Number.POSITIVE_INFINITY
193
- ? Number.POSITIVE_INFINITY
194
- : Math.max(0, timeoutMs - elapsed);
195
- sleepSync(Math.min(computeSidecarLockDelayMs(retry, attempt), remaining));
196
- attempt += 1;
197
- };
198
- const retryLockFileDenial = (error) => {
199
- if (!isTransientLockFileDenial(error, lockPath) ||
200
- ++transientDenials > maxTransientLockDenials)
201
- return false;
202
- try {
203
- waitForRetry();
204
- }
205
- catch (waitError) {
206
- // Preserve the filesystem diagnosis when the caller's budget runs out.
207
- if (waitError.code === "file_lock_timeout")
208
- throw error;
209
- throw waitError;
210
- }
211
- return true;
212
- };
213
- while (true) {
214
- if (reclaimGuardExists(reclaimGuardPath)) {
215
- waitForRetry();
216
- continue;
217
- }
218
- let fd;
219
- const payload = options.payload();
220
- const { raw, ownershipToken } = serializeSidecarLockPayload(payload);
221
- let lockFileCreateDenied = false;
222
- try {
223
- const noFollow = process.platform !== "win32" && typeof fs.constants.O_NOFOLLOW === "number"
224
- ? fs.constants.O_NOFOLLOW
225
- : 0;
226
- try {
227
- fd = fs.openSync(lockPath, fs.constants.O_WRONLY | fs.constants.O_CREAT | fs.constants.O_EXCL | noFollow, 0o600);
228
- }
229
- catch (error) {
230
- lockFileCreateDenied = isTransientLockFileDenial(error, lockPath);
231
- throw error;
148
+ try {
149
+ while (true) {
150
+ if (!acquisition.owns) {
151
+ const held = heldLocks.get(normalizedTargetPath);
152
+ if (held && !foreignSyncHeldLock("raw", normalizedTargetPath) &&
153
+ requestedReentrantOwner !== undefined &&
154
+ held.reentrantOwner !== undefined &&
155
+ requestedReentrantOwner === held.reentrantOwner) {
156
+ held.refCount += 1;
157
+ return createSyncHeldLockHandle(held);
158
+ }
159
+ acquisition.reserve();
232
160
  }
233
- fs.writeFileSync(fd, raw, "utf8");
234
- fs.fsyncSync(fd);
235
- const snapshot = {
236
- raw,
237
- payload,
238
- stat: fs.fstatSync(fd),
239
- ownershipToken,
161
+ const attemptHeld = currentTargetHolder();
162
+ const holderWasReplaced = () => {
163
+ const current = currentTargetHolder();
164
+ return current !== undefined && current !== attemptHeld;
240
165
  };
241
- const createdHeld = {
242
- fd,
243
- lockPath,
244
- normalizedTargetPath,
245
- parsePayload: options.parsePayload,
246
- refCount: 1,
247
- reentrantOwner: options.reentrantOwner,
248
- snapshot,
249
- };
250
- heldLocks.set(normalizedTargetPath, createdHeld);
251
- ensureSyncExitCleanupRegistered();
252
- const returnedHandle = createSyncHeldLockHandle(createdHeld);
253
- if (options.onCompromised && (options.compromiseCheckIntervalMs ?? 0) > 0) {
254
- createdHeld.timer = setInterval(() => {
255
- let stillHeld;
256
- try {
257
- stillHeld = returnedHandle.verifyStillHeld();
258
- }
259
- catch {
260
- stillHeld = false;
261
- }
262
- if (!stillHeld && createdHeld.timer) {
263
- clearInterval(createdHeld.timer);
264
- createdHeld.timer = undefined;
265
- options.onCompromised?.({ lockPath, normalizedTargetPath });
266
- }
267
- }, options.compromiseCheckIntervalMs);
268
- createdHeld.timer.unref();
269
- }
270
- fd = undefined;
271
- return returnedHandle;
272
- }
273
- catch (error) {
274
- if (fd !== undefined) {
275
- const failed = { payload: null };
276
- try {
277
- failed.stat = fs.fstatSync(fd);
278
- }
279
- catch {
280
- // Missing identity leaves the sidecar in place, but must not skip close.
281
- }
282
- const failedFd = fd;
283
- // A close error may still free the number; consume ownership before closing.
284
- fd = undefined;
285
- try {
286
- fs.closeSync(failedFd);
287
- if (failed.stat)
288
- removeSidecarLockIfUnchangedSync(lockPath, failed);
289
- }
290
- catch (cleanupError) {
291
- throw createSuppressedError(error, cleanupError, "file lock acquisition and cleanup both failed");
166
+ if (!staleRecoveryObserved) {
167
+ staleRecovery = acquisition.run(() => options.staleRecovery ?? defaults.staleRecovery);
168
+ staleRecoveryObserved = true;
169
+ if (holderWasReplaced()) {
170
+ acquisition.waitForRetry();
171
+ continue;
292
172
  }
293
173
  }
294
- if (lockFileCreateDenied && retryLockFileDenial(error))
174
+ const reclaimGuardExists = syncReclaimGuardExists(reclaimGuardPath);
175
+ if (!acquisition.hasToken())
176
+ throw sidecarLockTimeout(lockPath, normalizedTargetPath);
177
+ if (holderWasReplaced()) {
178
+ acquisition.waitForRetry();
295
179
  continue;
296
- if (error.code !== "EEXIST")
297
- throw error;
298
- if (heldLocks.has(normalizedTargetPath)) {
299
- waitForRetry();
180
+ }
181
+ if (reclaimGuardExists) {
182
+ acquisition.waitForRetry();
300
183
  continue;
301
184
  }
302
- let rawSnapshot;
303
- let lockFileOpenDenied = false;
304
- try {
305
- rawSnapshot = readSidecarLockRawSnapshotSync(lockPath, {
306
- rejectNonFile: true,
307
- onOpenFailure: (error) => { lockFileOpenDenied = isTransientLockFileDenial(error, lockPath); },
308
- });
185
+ let fd;
186
+ let createdHeld;
187
+ let createdSnapshot;
188
+ if (!payloadCallback)
189
+ payloadCallback = acquisition.run(() => options.payload);
190
+ if (holderWasReplaced()) {
191
+ acquisition.waitForRetry();
192
+ continue;
309
193
  }
310
- catch (readError) {
311
- if (lockFileOpenDenied && retryLockFileDenial(readError))
312
- continue;
313
- throw readError;
194
+ const payload = acquisition.run(() => Reflect.apply(payloadCallback, options, []));
195
+ if (holderWasReplaced()) {
196
+ acquisition.waitForRetry();
197
+ continue;
198
+ }
199
+ const { raw, ownershipToken } = acquisition.run(() => serializeSidecarLockPayload(payload));
200
+ if (holderWasReplaced()) {
201
+ acquisition.waitForRetry();
202
+ continue;
314
203
  }
315
- const snapshot = parseSidecarLockSnapshot(rawSnapshot, options.parsePayload);
316
- if (!snapshot) {
317
- waitForRetry();
204
+ if (currentTargetHolder() !== undefined) {
205
+ acquisition.waitForRetry();
318
206
  continue;
319
207
  }
320
- const nowMs = Date.now();
321
- const reclaim = options.shouldReclaim
322
- ? options.shouldReclaim({
208
+ if (!onCompromisedObserved) {
209
+ onCompromised = acquisition.run(() => options.onCompromised);
210
+ onCompromisedObserved = true;
211
+ if (currentTargetHolder() !== undefined) {
212
+ acquisition.waitForRetry();
213
+ continue;
214
+ }
215
+ }
216
+ if (!parsePayloadObserved) {
217
+ parsePayload = acquisition.run(() => options.parsePayload);
218
+ parsePayloadObserved = true;
219
+ if (currentTargetHolder() !== undefined) {
220
+ acquisition.waitForRetry();
221
+ continue;
222
+ }
223
+ }
224
+ let lockFileCreateDenied = false;
225
+ let exclusiveCreateConflict = false;
226
+ try {
227
+ const noFollow = process.platform !== "win32" && typeof fs.constants.O_NOFOLLOW === "number"
228
+ ? fs.constants.O_NOFOLLOW
229
+ : 0;
230
+ try {
231
+ fd = fs.openSync(lockPath, fs.constants.O_WRONLY | fs.constants.O_CREAT | fs.constants.O_EXCL | noFollow, 0o600);
232
+ }
233
+ catch (error) {
234
+ lockFileCreateDenied = isTransientLockFileDenial(error, lockPath);
235
+ exclusiveCreateConflict = error.code === "EEXIST";
236
+ throw error;
237
+ }
238
+ fs.writeFileSync(fd, raw, "utf8");
239
+ fs.fsyncSync(fd);
240
+ createdSnapshot = {
241
+ raw,
242
+ payload,
243
+ stat: fs.fstatSync(fd, { bigint: true }),
244
+ ownershipToken,
245
+ };
246
+ createdHeld = {
247
+ fd,
323
248
  lockPath,
324
249
  normalizedTargetPath,
325
- payload: snapshot.payload,
326
- staleMs,
327
- nowMs,
328
- heldByThisProcess: false,
329
- })
330
- : defaultShouldReclaim(snapshot, staleMs, nowMs);
331
- if (reclaim) {
332
- if (staleRecovery === "remove-if-unchanged" &&
333
- snapshot.raw !== undefined &&
334
- options.shouldRemoveStaleLock?.({
335
- lockPath,
336
- normalizedTargetPath,
337
- raw: snapshot.raw,
338
- payload: snapshot.payload,
339
- })) {
340
- let ownsReclaimGuard = false;
250
+ parsePayload,
251
+ refCount: 1,
252
+ reentrantOwner: requestedReentrantOwner,
253
+ snapshot: createdSnapshot,
254
+ };
255
+ const candidateHeld = createdHeld;
256
+ ensureSyncLockExitCleanupRegistered(releaseAllSyncHeldLocks, lockPath, normalizedTargetPath);
257
+ if (!acquisition.hasToken() || currentTargetHolder() !== undefined) {
258
+ throw sidecarLockTimeout(lockPath, normalizedTargetPath);
259
+ }
260
+ const returnedHandle = createSyncHeldLockHandle(candidateHeld);
261
+ acquisition.monitor(candidateHeld, returnedHandle, onCompromised, compromiseCheckIntervalMs, options);
262
+ if (!acquisition.hasToken() ||
263
+ currentTargetHolder() !== undefined) {
264
+ throw sidecarLockTimeout(lockPath, normalizedTargetPath);
265
+ }
266
+ heldLocks.set(normalizedTargetPath, candidateHeld);
267
+ acquisition.release();
268
+ fd = undefined;
269
+ return returnedHandle;
270
+ }
271
+ catch (error) {
272
+ if (createdHeld?.timer) {
273
+ clearInterval(createdHeld.timer);
274
+ createdHeld.timer = undefined;
275
+ }
276
+ if (createdHeld && heldLocks.get(normalizedTargetPath) === createdHeld) {
277
+ heldLocks.delete(normalizedTargetPath);
278
+ }
279
+ if (fd !== undefined) {
280
+ const failed = createdSnapshot ?? { payload: null };
281
+ if (!failed.stat) {
282
+ try {
283
+ failed.stat = fs.fstatSync(fd, { bigint: true });
284
+ }
285
+ catch {
286
+ // Missing identity leaves the sidecar in place, but must not skip close.
287
+ }
288
+ }
289
+ const failedFd = fd;
290
+ fd = undefined;
291
+ if (createdHeld)
292
+ createdHeld.fd = undefined;
341
293
  try {
342
- fs.mkdirSync(reclaimGuardPath);
343
- ownsReclaimGuard = true;
344
- if (removeSidecarLockIfUnchangedSync(lockPath, snapshot))
345
- continue;
294
+ fs.closeSync(failedFd);
295
+ if (failed.stat)
296
+ removeSidecarLockIfUnchangedSync(lockPath, failed);
346
297
  }
347
- catch (reclaimError) {
348
- if (reclaimError.code !== "EEXIST") {
349
- throw reclaimError;
350
- }
351
- waitForRetry();
352
- continue;
298
+ catch (cleanupError) {
299
+ throw createSuppressedError(error, cleanupError, "file lock acquisition and cleanup both failed");
353
300
  }
354
- finally {
355
- if (ownsReclaimGuard) {
356
- try {
357
- fs.rmdirSync(reclaimGuardPath);
358
- }
359
- catch {
360
- // A surviving reclaim guard fails closed.
361
- }
362
- }
301
+ }
302
+ if (lockFileCreateDenied) {
303
+ if (!acquisition.hasToken())
304
+ throw sidecarLockTimeout(lockPath, normalizedTargetPath);
305
+ if (currentTargetHolder() !== undefined) {
306
+ acquisition.waitForRetry();
307
+ continue;
363
308
  }
309
+ if (acquisition.retryDenial(error))
310
+ continue;
311
+ throw error;
364
312
  }
365
- throw Object.assign(new Error(`file lock stale for ${normalizedTargetPath}`), {
366
- code: "file_lock_stale",
367
- lockPath,
368
- normalizedTargetPath,
313
+ if (!exclusiveCreateConflict)
314
+ throw error;
315
+ if (!acquisition.hasToken())
316
+ throw sidecarLockTimeout(lockPath, normalizedTargetPath);
317
+ if (currentTargetHolder() !== undefined) {
318
+ acquisition.waitForRetry();
319
+ continue;
320
+ }
321
+ handleSyncStaleAdmission(acquisition, {
322
+ currentHeld: currentTargetHolder,
323
+ options,
324
+ parsePayload,
325
+ reclaimGuardPath,
326
+ staleMs,
327
+ staleOptions,
328
+ staleRecovery,
369
329
  });
330
+ continue;
370
331
  }
371
- waitForRetry();
372
332
  }
373
333
  }
334
+ finally {
335
+ acquisition.release();
336
+ }
374
337
  }
375
338
  export function withFileLockSync(targetPath, options, fn) {
376
339
  const lock = acquireFileLockSync(targetPath, options);
377
- try {
378
- return fn();
379
- }
380
- finally {
381
- lock.release();
382
- }
340
+ return withSyncHeldLockHandle(lock, fn);
383
341
  }
@@ -21,4 +21,3 @@ export declare function withFileLock<T, TPayload extends Record<string, unknown>
21
21
  export declare function createFileLockManager(key: string): FileLockManager;
22
22
  export declare function drainFileLockManagerForTest(targetPath: string, managerKey?: string): Promise<void>;
23
23
  export declare function resetFileLockManagerForTest(targetPath: string, managerKey?: string): void;
24
- //# sourceMappingURL=file-lock.d.ts.map
@@ -1,4 +1,4 @@
1
- type FailureKind = "identity" | "resolution" | `open:${string}` | `exclusive-create:${string}` | `unlinked:${string}` | `changed:${string}` | `stat-leaf-missing:${string}`;
1
+ type FailureKind = "identity" | "resolution" | `open:${string}` | `exclusive-create:${string}` | `unlinked:${string}` | `changed:${string}` | `stat-leaf-missing:${string}` | `stat-leaf-changed:${string}`;
2
2
  export declare function recordFileObservationFailure(error: unknown, kind: FailureKind): void;
3
3
  export declare function isFileObservationFailure(error: unknown, kind: FailureKind): boolean;
4
4
  export declare function fileObservation(): {
@@ -6,4 +6,3 @@ export declare function fileObservation(): {
6
6
  has(error: unknown, kind: FailureKind): boolean;
7
7
  };
8
8
  export {};
9
- //# sourceMappingURL=file-observation.d.ts.map
@@ -1,12 +1,8 @@
1
- import { type BigIntStats } from "node:fs";
2
1
  import type { Readable } from "node:stream";
3
- import type { SyncDirectoryGuard } from "./directory-guard.js";
2
+ import { ensureSyncStoreDirectory, type SyncStoreDirectoryReceipt } from "./file-store-sync-directory.js";
4
3
  import { type Root } from "./root.js";
5
4
  import { prepareSecretFileWrite } from "./secret-file.js";
6
- export type SyncParentGuard = SyncDirectoryGuard & {
7
- /** Exact authority retained separately from the legacy numeric durability receipt. */
8
- readonly exactStat: BigIntStats;
9
- };
5
+ export type SyncParentGuard = SyncStoreDirectoryReceipt;
10
6
  export declare function ensureParentInRoot(scopedRoot: Root, relativePath: string, mode: number): Promise<void>;
11
7
  export declare function openWritableStoreRoot(params: {
12
8
  rootDir: string;
@@ -22,16 +18,17 @@ export declare function writeStreamToTempSource(params: {
22
18
  path: string;
23
19
  cleanup: () => Promise<void>;
24
20
  }>;
25
- export declare function assertSyncDirectoryGuard(guard: SyncParentGuard): void;
26
21
  export declare function ensureParentSync(params: {
27
22
  rootDir: string;
28
23
  filePath: string;
29
24
  mode: number;
30
25
  }): SyncParentGuard;
31
- export declare function ensureStoreDirectorySync(params: {
32
- rootDir: string;
33
- targetDir: string;
34
- mode: number;
35
- messagePrefix: "private store" | "store";
36
- }): SyncParentGuard;
37
- //# sourceMappingURL=file-store-boundary.d.ts.map
26
+ export declare function ensureStoreDirectorySync(params: Parameters<typeof ensureSyncStoreDirectory>[0]): SyncParentGuard;
27
+ export declare function literalStoreRootPath(relativePath: string): string;
28
+ export declare function assertRelativePath(relativePath: string): string;
29
+ export declare function resolveStorePath(rootDir: string, relativePath: string): string;
30
+ export declare function assertFileStoreMaxBytes(size: number, limit: number | undefined): void;
31
+ export declare function readFileStoreCopySource(params: {
32
+ sourcePath: string;
33
+ maxBytes: number;
34
+ }): Promise<Buffer>;