@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
@@ -16,7 +16,7 @@ import {
16
16
 
17
17
  Write `content` to a sibling temp file in the destination directory, apply the parent-directory and final file modes through verified descriptors, optionally `fsync` the file descriptor, optionally `fsync` the parent directory after rename, then atomically rename over the destination. No permission change follows a caller-supplied pathname.
18
18
 
19
- On POSIX, the parent is opened with no-follow and directory-only flags, checked against its pre-open identity, and mode-adjusted through that descriptor. A replacement symlink is rejected rather than followed. If the directory cannot be opened for descriptor access, the operation fails closed instead of retrying by pathname. Windows does not enforce POSIX directory modes and Node cannot consistently open directory descriptors there, so `dirMode` is passed only to `mkdir`; no pathname `chmod` fallback is attempted.
19
+ On POSIX, the parent is opened with no-follow and directory-only flags, checked against its exact pre-open device/inode identity, and mode-adjusted through that descriptor. A replacement symlink is rejected rather than followed. If the directory cannot be opened for descriptor access, the operation fails closed instead of retrying by pathname. Windows does not enforce POSIX directory modes and Node cannot consistently open directory descriptors there, so `dirMode` is passed only to `mkdir`; no pathname `chmod` fallback is attempted.
20
20
 
21
21
  Async replacements to the same destination are serialized inside the current process, so two overlapping `replaceFileAtomic()` calls do not interleave their temp-write/rename phases. Use a sidecar lock when multiple processes may write the same target.
22
22
 
@@ -60,6 +60,8 @@ type ReplaceFileAtomicOptions = {
60
60
  syncTempFile?: boolean; // fsync(temp) before rename, or the final file after copy fallback; default false
61
61
  syncParentDir?: boolean; // fsync(parent) after rename, POSIX only; default false
62
62
  throwOnCleanupError?: boolean; // report temp cleanup failure; default false
63
+ assertBeforeMutation?: () => void;
64
+ onDestinationState?: (state: ReplaceFileAtomicDestinationState) => void;
63
65
  beforeRename?: (params: { filePath: string; tempPath: string }) => Promise<void>;
64
66
  fileSystem?: ReplaceFileAtomicFileSystem; // injectable fs for tests
65
67
  };
@@ -92,8 +94,82 @@ await replaceFileAtomic({
92
94
 
93
95
  If `beforeRename` throws, the rename is skipped and the owned temp file is removed — the destination is unchanged. Cleanup unlinks only the exact admitted single-link file; a substitute observed at the temp name is preserved and removed from cleanup authority. The same identity is rechecked before every rename retry, when entering copy fallback, and at the final name after rename. A post-rename verification failure reports the race without rolling back or deleting the published name.
94
96
 
97
+ JavaScript permits `beforeRename` callbacks and filesystem adapters to throw any value, including
98
+ `undefined`, `null`, `false`, signed zero, `0n`, an empty string, and `NaN`.
99
+ Atomic replacement preserves such operational failures when cleanup and close
100
+ succeed, including rename and post-rename verification failures. Rename retry
101
+ and copy-fallback classification reads the error code once without coercion;
102
+ missing or unreadable codes preserve the original failure. A rejected call has
103
+ no success receipt even if an adapter committed its rename before throwing. With
104
+ `throwOnCleanupError: true`, an additional owned-temp cleanup failure keeps the
105
+ existing cleanup wrapper whose `cause` is the original thrown value. A later
106
+ descriptor-close failure is reported in an `AggregateError`, in operation/cleanup
107
+ then close order. The default `throwOnCleanupError: false` omits only the cleanup
108
+ failure: the temp stays registered for identity-checked process-exit cleanup, the
109
+ descriptor is still closed, and a close failure remains reportable.
110
+
95
111
  Identity checks and pathname rename/unlink remain separate syscalls, not atomic conditional mutations. Use an approved writable parent plus cooperative locking or OS isolation when arbitrary concurrent namespace mutation is in scope.
96
112
 
113
+ ### Atomic write authority and destination state
114
+
115
+ Use `assertBeforeMutation` when a write depends on a lease or other revocable
116
+ application authority. Both atomic variants capture the callback at entry and
117
+ run it synchronously before directory creation or mode changes, compatibility
118
+ lock acquisition, staging creation and writes, each rename attempt, and fallback
119
+ removal, destination acquisition, truncation, and each content write. Asynchronous destination identity checks
120
+ finish before the final authority check; no await separates that check from the
121
+ write dispatch. A dispatched operation still owns its completion.
122
+
123
+ `onDestinationState` captures facts that a caller may need if the operation later
124
+ rejects:
125
+
126
+ ```ts
127
+ type ReplaceFileAtomicDestinationState =
128
+ | Readonly<{ state: "removed"; path: string }>
129
+ | Readonly<{
130
+ state: "writing" | "published";
131
+ path: string;
132
+ dev: bigint;
133
+ ino: bigint;
134
+ }>;
135
+ ```
136
+
137
+ - `removed` follows successful removal of an existing fallback destination.
138
+ - `writing` records the fallback's retained descriptor after exclusive creation
139
+ or the first successful truncation of an existing `restore-original` target.
140
+ Opening an existing target leaves it untouched and emits no receipt. This state
141
+ does not claim that all requested bytes were written.
142
+ - `published` follows successful rename and destination identity verification,
143
+ before parent synchronization or descriptor close can fail. Copy fallback
144
+ reports it after its content, mode, and requested file synchronization complete.
145
+ The explicit `verify-content-with-lock` policy first applies its existing
146
+ locked content verification to admit the replacement descriptor.
147
+
148
+ Receipts are frozen and use the destination spelling captured by the operation.
149
+ File identities come from retained descriptors, never from reopening a pathname
150
+ after a failed copy. Failed or indeterminate admission can leave no identity
151
+ receipt; a rename followed by replacement before verification also has no
152
+ publication receipt. Do not infer ownership from a fresh post-failure stat. A later writer
153
+ can replace the pathname, so compare the recorded identity with the current
154
+ entry and recheck application authority before compensation. Receipts do not
155
+ promise durable storage or authorize rollback.
156
+
157
+ Both callbacks must complete synchronously; Promise, thenable, and synchronous
158
+ or asynchronous generator results are rejected. Returned generators are never
159
+ advanced; other ordinary return values are ignored. The first callback refusal
160
+ is terminal, including falsy thrown values; an `EPERM`, `EEXIST`, or `EBUSY` code
161
+ from a callback never starts fallback or retry. Refusal during an in-place
162
+ fallback also stops new restoration writes. Final mode, synchronization, close,
163
+ and private-stage cleanup may still settle against owned identities after
164
+ revocation. Callback refusal does not delete a published destination or a
165
+ competing file at a staging name. An observer that throws must retain its receipt
166
+ first if recovery needs it.
167
+
168
+ `beforeRename` remains the hook for preparing backups. Effects performed inside
169
+ that hook remain the caller's responsibility; the authority option guards the
170
+ atomic writer's own effects. Omitting both new callbacks preserves existing
171
+ write, fallback, restoration, result, and cleanup behavior.
172
+
97
173
  ### FUSE, Windows exFAT/FAT32, and unstable rename identity
98
174
 
99
175
  Strict source-to-destination identity is the default. Some FUSE mounts assign a different inode to the destination during rename even without concurrency. Set `renameIdentity: "verify-content-with-lock"` to accept that boundary only when the re-opened no-follow destination has the exact requested SHA-256 content under an exclusive hashed sidecar lock in the destination parent. The newly accepted descriptor and identity remain pinned through parent sync and final verification. The synchronous helper provides the same policy with the synchronous lock implementation.
@@ -139,6 +215,28 @@ must not have aliases. The policy reads `nlink` from a pinned destination
139
215
  descriptor, not pathname metadata, before rename and rechecks it in the copy
140
216
  fallback.
141
217
 
218
+ The asynchronous helper closes a successfully admitted hardlink-check pin
219
+ best-effort, including synchronous adapter throws and rejected close promises.
220
+ The synchronous helper reports a close failure after successful admission.
221
+
222
+ Source and pinned destination admission compare exact bigint device/inode
223
+ observations, so distinct identities that round to the same JavaScript number
224
+ cannot authorize a copy. Unknown Windows identities get one bounded reinspection
225
+ of the same descriptor or path; incomplete or inconsistent observations fail
226
+ closed without reopening. Injected filesystem adapters must honor the
227
+ `{ bigint: true }` stat option. Source admission reuses that exact pair instead
228
+ of immediately repeating it with numeric metadata.
229
+
230
+ Copy-source close is best-effort. A failed pinned-destination admission also
231
+ preserves its selected failure when close fails. These cleanup rules include
232
+ synchronous throws and rejected promises from custom asynchronous adapters.
233
+
234
+ The best-effort parent-directory synchronization helper also ignores either form
235
+ of close failure. Parent-directory mode admission and its close remain fail-closed.
236
+ A compatibility-publication handle that was not adopted also receives one
237
+ best-effort close, preserving the selected verification or previous-handle close
238
+ failure. The retained owner's close failures remain reportable.
239
+
142
240
  The default `copyFallbackRestore: "none"` preserves the existing fallback
143
241
  contract: a failed copy can leave a partial destination. For state files where
144
242
  preserving the old bytes is more important, choose `"restore-original"` and set
@@ -148,6 +246,35 @@ that same descriptor, and synchronizes the result. Any write, mode, or sync
148
246
  failure triggers a byte-and-mode restore and another sync through the same
149
247
  descriptor.
150
248
 
249
+ With mutation callbacks enabled, an `EIO` from destination `stat`/`lstat` after
250
+ successful truncation also attempts restoration through that retained descriptor.
251
+ Each restore write still requires live application authority and fresh exact
252
+ descriptor identity, regular-file, and configured hardlink checks. The failed
253
+ pathname observation is not retried to authorize restoration; no pathname is
254
+ opened, removed, or replaced. A successor at that name is left untouched.
255
+ `details.cleanup: "restored"` means the retained original file's bytes and mode
256
+ were restored and synchronized, not that the pathname still names it. The existing
257
+ `writing` receipt identifies that file; no `published` receipt is emitted for a
258
+ failed replacement. Restoration I/O failures report `"restore-failed"`.
259
+
260
+ Callback refusals, detected identity/type/link changes, and other metadata errors
261
+ remain terminal. Failed descriptor revalidation also stops restoration. These
262
+ cases can leave the retained file empty or partial with only a `writing` receipt;
263
+ before the first successful truncation, verification failure leaves it untouched.
264
+
265
+ With `syncTempFile: false`, an exclusive-create copy fallback does not report
266
+ success until its new destination writer closes successfully. This includes
267
+ `"restore-original"` when the destination did not exist. A close rejection or throw is
268
+ propagated exactly, including falsy values. The destination may already contain
269
+ all or part of the replacement, so a close failure does not prove that the old
270
+ destination survived or that the replacement was published. The outer atomic
271
+ operation still attempts identity-bound cleanup of its owned source temp; an
272
+ unverifiable or substituted temp remains preserved. If writing, mode adjustment,
273
+ or another earlier operation also fails, that earlier value remains the reported
274
+ failure and the destination close is attempted once. Successful synchronized
275
+ fallbacks and in-place `"restore-original"` replacements retain their existing best-effort final-close
276
+ handling.
277
+
151
278
  Restore failures are `FsSafeError("helper-failed")` values with typed
152
279
  `details.cleanup` set to `"restored"` or `"restore-failed"`. An original larger
153
280
  than `maxRestoreBytes` fails with `too-large` before mutation. A missing
@@ -165,10 +292,16 @@ through short reads and EOF, grow only as data arrives, and enforce the same
165
292
  `beforeRename` callback, and `ReplaceFileAtomicSyncFileSystem`. Use it inside
166
293
  synchronous boot paths or test setup code. It returns the same
167
294
  `{ method: "rename" | "copy-fallback" }` receipt as the async variant.
295
+ Promise, thenable, and synchronous or asynchronous generator results from the
296
+ hook reject with `TypeError` before publication; rejected promises are consumed
297
+ and generators are never advanced. Other synchronous return values are ignored.
298
+ The replacement is not published; owned-temp cleanup follows the rules above.
168
299
 
169
300
  ## `replaceDirectoryAtomic`
170
301
 
171
- Atomically swap one directory's contents with another, using a temporary backup during the swap.
302
+ Publish one staged directory at a target without overwriting a concurrently
303
+ created entry. Despite the historical name, replacing an existing target is a
304
+ guarded two-rename protocol, not an atomic directory exchange.
172
305
 
173
306
  ```ts
174
307
  import { replaceDirectoryAtomic } from "@openclaw/fs-safe/atomic";
@@ -179,23 +312,74 @@ await replaceDirectoryAtomic({
179
312
  });
180
313
  ```
181
314
 
182
- The helper renames `targetDir` to a generated backup path, renames `stagedDir → targetDir`, then removes the backup. If the second rename fails, it tries to restore the original target before rethrowing.
183
- Concurrent replacements of the same resolved target are serialized inside the
184
- current process so their backup, commit, and cleanup phases cannot interleave.
185
- On Windows, ordinary drive-relative staged and target paths are anchored at
186
- entry before namespace-alias admission and resolution.
315
+ Every publication requires the dedicated native identity-fenced,
316
+ descriptor-relative no-replace rename capability and readable retained
317
+ descriptors for the staged and target parents. Older bindings that expose only
318
+ the legacy four-argument no-replace rename fail with `helper-unavailable`
319
+ before target-parent creation or any other replacement effect. This applies
320
+ when the parents are the same or different. There is no JavaScript rename
321
+ fallback, and a cross-device rename still fails. Replacing an existing target
322
+ additionally requires usable native bounded owned-tree cleanup and a readable
323
+ retained descriptor for the original target.
324
+
325
+ If the target is absent, the helper publishes `stagedDir → targetDir` with a
326
+ single no-replace rename. If the target exists, it renames `targetDir` to a
327
+ randomized sibling backup and then renames `stagedDir → targetDir`. The target
328
+ name is temporarily absent between those two operations. A competing entry is
329
+ never overwritten. Publication rollback is attempted only when the staged
330
+ rename is known not to have committed and the target name is still absent; the
331
+ rollback itself is no-replace, so a competitor is preserved and the backup is
332
+ left for recovery.
333
+
334
+ Exact staged-directory identity and parent checks run before and after each
335
+ rename. On Windows, the native rename opens the source relative to the retained
336
+ parent, compares that handle's exact volume and file-index identity with the
337
+ pre-rename bigint receipt, and only then mutates it. POSIX does not provide a
338
+ rename operation that also compares an expected source inode, so on POSIX a
339
+ source-name substitution in the final check-to-rename gap can be moved briefly
340
+ and then detected by the post-rename verification. Similarly, a successful
341
+ rename can be followed by a verification error. Inspect the error's
342
+ `details.publication` value rather than treating rejection as proof that
343
+ publication did not happen.
344
+
345
+ A Windows source-identity mismatch is rejected before mutation, reported
346
+ publicly as `path-mismatch`, and treated as definitely uncommitted so an earlier
347
+ backup can be rolled back. Other `path-mismatch`-shaped native errors are not
348
+ assumed to be pre-commit failures; their publication outcome remains
349
+ indeterminate and observed competitors are preserved.
350
+
351
+ Any native rename error without explicit pre-dispatch provenance has an
352
+ indeterminate outcome, including ordinary errno such as `ENOENT`, `EEXIST`,
353
+ or `EACCES`: a remote filesystem may commit before losing its reply. The helper
354
+ does not guess whether that rename committed or perform another rename or
355
+ cleanup based on that guess; observed names are preserved for caller-directed
356
+ recovery. An error `details.backupPath`, when present, is only the attempted or
357
+ last-observed backup pathname. It does not prove that the path still exists or
358
+ still names the original directory.
359
+
360
+ After a verified commit, the original backup is removed through its retained
361
+ directory identity and bounded native traversal. Cleanup failures reject after
362
+ publication and can leave the backup. On POSIX, cleanup retains the
363
+ [bounded final-entry unlink limitation](temp.md#private-temp-workspaces).
364
+
365
+ Concurrent calls for the same resolved target are serialized inside the current
366
+ process so their backup, publication, and cleanup phases cannot interleave.
367
+ Other processes are not serialized; no-replace renames provide the competitor
368
+ boundary. On Windows, ordinary drive-relative staged and target paths are
369
+ anchored at entry before namespace-alias admission and resolution.
187
370
  `backupPrefix`, when supplied, is sanitized as one path prefix and cannot contain
188
371
  path separators or NUL bytes; the generated backup tail is randomized.
189
372
 
190
- Use it when callers must see a whole staged tree at the target path. For single-file replacement, `replaceFileAtomic` is the right tool.
373
+ Use it when callers must publish a whole staged tree with these recovery
374
+ semantics. For single-file replacement, `replaceFileAtomic` is the right tool.
191
375
 
192
376
  ## `writeTextAtomic`
193
377
 
194
378
  Atomic UTF-8 text write with the same secure defaults as `writeJson`: sibling
195
379
  temp file, descriptor-bound mode setting and fsync, rename, and parent fsync.
196
- It delegates to `replaceFileAtomic()` with a smaller call shape. Use it when
197
- you do not need replacement hooks such as `beforeRename`, `preserveExistingMode`,
198
- or custom copy-fallback policy.
380
+ It delegates to `replaceFileAtomic()` with a smaller call shape, including its
381
+ pre-publication hook and staging-prefix options. Use `replaceFileAtomic()` when
382
+ you need mode preservation or a custom copy-fallback policy.
199
383
 
200
384
  ```ts
201
385
  import { writeTextAtomic } from "@openclaw/fs-safe/atomic";
@@ -215,9 +399,17 @@ type WriteTextAtomicOptions = {
215
399
  dirMode?: number; // parent mode (default 0o777 masked by process umask)
216
400
  trailingNewline?: boolean; // append "\n" if missing; default false
217
401
  durable?: boolean; // default true; false skips temp/parent fsync
402
+ beforeRename?: (params: { filePath: string; tempPath: string }) => Promise<void>;
403
+ tempPrefix?: string; // default ".fs-safe-replace"
218
404
  };
219
405
  ```
220
406
 
407
+ `beforeRename` is awaited after the complete text is staged and before
408
+ publication, with the same [stage identity and refusal cleanup](#beforerename)
409
+ checks as `replaceFileAtomic`. Pass `tempPrefix` to identify staged files; it
410
+ uses the same prefix validation, including rejection of empty prefixes and path
411
+ separators.
412
+
221
413
  `durable: false` keeps the sibling-temp replace/rename behavior but skips the
222
414
  temp-file and parent-directory `fsync` calls. Use it only for reconstructible
223
415
  metadata where lower latency matters more than crash-durability.
@@ -272,7 +464,10 @@ the preflight cap fails with `FsSafeError("too-large")`.
272
464
  If another writer changes source entries during the fallback, the staged copy
273
465
  throws `ESTALE` before commit when possible. If the destination has already
274
466
  been committed, cleanup still preserves the changed source entries and throws
275
- `ESTALE`. Directory manifests retain an exact bigint device/inode receipt from
467
+ `ESTALE`. Copied file and symlink manifests retain exact bigint identities and
468
+ nanosecond timestamps, so rounded file IDs cannot authorize copying or removal
469
+ of a different entry. Hardlink groups also use exact identities. Directory
470
+ manifests retain an exact bigint device/inode receipt from
276
471
  copy admission. Each directory is rechecked after traversal, and the source root
277
472
  is checked again before publication. Cleanup checks the same receipt before
278
473
  removing children, then invokes mutation authority and rechecks the receipt and
@@ -289,6 +484,11 @@ unlink is verified through a remaining manifested alias and its exact resulting
289
484
  identity becomes the next cleanup receipt. This accounts for the operation's
290
485
  own link-count and ctime changes without suppressing unexpected external
291
486
  mutations.
487
+ On Windows, opening a regular source may advance its ctime while all other
488
+ fingerprint fields match. That exception applies only to opening; post-copy
489
+ verification and cleanup retain their full fingerprint checks.
490
+ Copied aliases share each verified open-time update. Changes observed between
491
+ copies still reject instead of being mistaken for an owned open transition.
292
492
 
293
493
  ### Mutation authority and publication receipts
294
494
 
@@ -327,6 +527,11 @@ thenable, or any other value fails with a `TypeError`; rejected asynchronous
327
527
  results are consumed. Perform asynchronous policy checks before calling the
328
528
  helper and use the authority callback to recheck the current owner at each
329
529
  mutation boundary. All callbacks are captured before the first await.
530
+ Copied source leaves are checked again immediately after authority returns and
531
+ before unlink is submitted. Supplying any of the three callbacks also
532
+ retains the original source-parent route and renews copied-directory ancestry
533
+ before cleanup. Substituted entries are preserved; pathname checks and unlink
534
+ remain a best-effort sequence, not atomic.
330
535
 
331
536
  `onDestinationPublished` runs exactly once after a successful rename resolves,
332
537
  before awaited post-rename directory checks or source cleanup. It receives a
@@ -396,7 +601,7 @@ type ReplaceFileAtomicSyncFileSystem = {
396
601
  };
397
602
  ```
398
603
 
399
- The async interface already requires `open()`, whose `FileHandle` supplies `chmod()`, so injecting `node:fs` or another conforming adapter needs no new async member. On POSIX, that `open()` must support no-follow directory descriptors as Node does. A custom synchronous filesystem that passes `mode`, `dirMode`, or `preserveExistingMode` must supply `fchmodSync`; omission fails before any file or directory is created and never falls back to a pathname `chmod`. Existing synchronous adapters that request none of those options may omit it; their parent is still opened and identity-checked through a no-follow directory descriptor. Injecting plain `node:fs` supports explicit file and directory modes. Older adapter literals may continue to include `chmod` or `chmodSync` for source compatibility, but those operations are ignored. Copy fallback applies the file mode through its pinned destination descriptor as well, preserving exact modes despite the process umask.
604
+ The async interface already requires `open()`, whose `FileHandle` supplies `chmod()`, so injecting `node:fs` or another conforming adapter needs no new async member. The async temp owner consumes its retained handle before awaiting `close()` during publication handoff and terminal settlement: if a custom adapter releases the resource and then rejects, that rejection is reported without calling `close()` on the same retained handle again. If publication verification opened a replacement handle before the previous retained handle failed to close, the replacement receives one best-effort close attempt. On POSIX, `open()` must support no-follow directory descriptors as Node does. A custom synchronous filesystem that passes `mode`, `dirMode`, or `preserveExistingMode` must supply `fchmodSync`; omission fails before any file or directory is created and never falls back to a pathname `chmod`. Existing synchronous adapters that request none of those options may omit it; their parent is still opened and identity-checked through a no-follow directory descriptor. Injecting plain `node:fs` supports explicit file and directory modes. Older adapter literals may continue to include `chmod` or `chmodSync` for source compatibility, but those operations are ignored. Copy fallback applies the file mode through its pinned destination descriptor as well, preserving exact modes despite the process umask.
400
605
 
401
606
  ## See also
402
607
 
@@ -37,10 +37,14 @@ Set the process-global loading policy. Configure once at startup, before the fir
37
37
 
38
38
  | Mode | Behavior |
39
39
  |---|---|
40
- | `auto` | Default. Prefer the platform binding and use guarded JavaScript when it is unavailable. |
41
- | `off` | Do not load the binding; use guarded JavaScript deterministically. |
40
+ | `auto` | Default. Prefer the platform binding and use supported fallbacks when it is unavailable. |
41
+ | `off` | Do not load the binding; use supported fallbacks and reject native-only operations. |
42
42
  | `require` | Operations that need the binding raise `FsSafeError("helper-unavailable")` when it cannot load. |
43
43
 
44
+ Fallbacks include guarded JavaScript, the bundled TAR/gzip WASM parser, and the
45
+ [packaged Windows security scripts](install.md#windows-security-fallback).
46
+ Windows command fallbacks remain subject to normal system execution policy.
47
+
44
48
  ## `getFsSafeNativeConfig()`
45
49
 
46
50
  ```ts
@@ -19,10 +19,50 @@ manager version declared in `package.json`.
19
19
  pnpm build
20
20
  ```
21
21
 
22
- Runs TypeScript compilation and builds the portable Rust TAR parser for
23
- `wasm32-unknown-unknown`. Contributors need Rust (the native crate's declared
24
- minimum or newer) and `rustup target add wasm32-unknown-unknown`; Alpine's
25
- packaged toolchain uses `rust-wasm`. `pnpm archive:wasm` rebuilds just the parser.
22
+ Runs TypeScript compilation and builds the portable Rust TAR parser and its
23
+ bzip2/zstd codecs for `wasm32-unknown-unknown`. Contributors need Rust (the
24
+ native crate's declared minimum or newer), `rustup target add
25
+ wasm32-unknown-unknown`, and LLVM's WebAssembly-capable `clang` and `llvm-ar`.
26
+ The system's native `ar` is not sufficient. `pnpm archive:wasm` rebuilds just
27
+ the portable module.
28
+
29
+ Linux, macOS, and Windows CI use the same pinned WASI SDK 34 LLVM toolchain;
30
+ Alpine uses its versioned LLVM 22 packages alongside `rust-wasm`. For local
31
+ builds, install LLVM through your package manager or use the official
32
+ [WASI SDK](https://github.com/WebAssembly/wasi-sdk/releases/tag/wasi-sdk-34).
33
+ On macOS, `brew install llvm` supplies the archiver missing from Apple's
34
+ Command Line Tools. On Windows, install the LLVM distribution with both
35
+ `clang.exe` and `llvm-ar.exe`. On Linux, install the matching `clang` and
36
+ `llvm` packages; a GCC-only build toolchain cannot compile these WASM codecs.
37
+
38
+ The build discovers tools on `PATH`, in `LLVM_PATH/bin`, in Homebrew's LLVM
39
+ prefixes, and in Windows' standard LLVM installation. It also checks the
40
+ versioned `clang-18` through `clang-21` and `llvm-ar-18` through `llvm-ar-21`
41
+ executables. To select another installation explicitly, set
42
+ `CC_wasm32_unknown_unknown` and `AR_wasm32_unknown_unknown` to its compiler
43
+ and archiver. The corresponding hyphenated target variables and cc-rs's
44
+ `TARGET_CC`/`TARGET_AR` or `CC`/`AR` overrides are also respected; an unusable
45
+ explicit override fails with a builder diagnostic instead of being ignored.
46
+ Windows build environment names are case-insensitive, including when worker
47
+ processes uppercase them. The build normalizes only its copied child environment.
48
+ Clang's implicit configuration is disabled for this target so the WASI SDK's
49
+ default libc/sysroot cannot leak into the import-free module. These settings
50
+ affect compilation only and do not become runtime dependencies.
51
+
52
+ The build disables release LTO only in the WASM Cargo subprocess. An observed
53
+ Rust 1.98.1 optimized-WASM-LTO allocation/free failure makes that necessary;
54
+ the native release profile stays unchanged. The WASM linker strips debug
55
+ sections to keep the bundled module small without stripping native binaries.
56
+ The build verifies zero host
57
+ imports and one unshared 32-bit memory with the existing 256 MiB maximum
58
+ before copying the artifact. Allocator regression tests build a separate
59
+ instrumented module with `pnpm archive:wasm:allocator-tests` under the Cargo
60
+ target directory. That module is never copied to `dist/` or packaged. `pnpm
61
+ check` and coverage collection build it explicitly before testing. After a
62
+ fresh checkout, run that command before `pnpm test`, `pnpm test:coverage`, or
63
+ focused `test/archive-codec-wasm-allocator.test.ts` runs; the tests fail if
64
+ their prerequisite artifact is missing.
65
+
26
66
  The import-free asset lands at `dist/archive-parser.wasm`; source tests and
27
67
  compiled consumers both resolve that generated artifact. Run `pnpm build`
28
68
  before source tests in a fresh checkout. Do not commit `dist/` or built WASM.
@@ -30,6 +70,36 @@ Consumers receive the asset in the npm package and need no compiler.
30
70
 
31
71
  Output lands in `dist/`. The package's `prepack` hook re-runs the build before publishing — manual `pnpm build` is only required when you want to inspect the output or run a freshly-built copy locally.
32
72
 
73
+ ### Linux GNU release bindings
74
+
75
+ GNU x64 and arm64 artifacts use Zig 0.16.0 and `cargo-zigbuild` 0.23.4 with an
76
+ explicit glibc 2.28 target, independent of the runner's libc. This matches the
77
+ Node Linux runtime baseline and supports RHEL 8-family users without adding a
78
+ second legacy package. Run the same build and ABI gate used in CI and releases:
79
+
80
+ ```bash
81
+ cargo install cargo-zigbuild --version 0.23.4 --locked
82
+ rustup target add x86_64-unknown-linux-gnu aarch64-unknown-linux-gnu
83
+ node scripts/build-linux-gnu.mjs x86_64-unknown-linux-gnu
84
+ node scripts/build-linux-gnu.mjs aarch64-unknown-linux-gnu
85
+ ```
86
+
87
+ These commands require Zig on `PATH` and GNU `objdump`. They build the N-API
88
+ cdylib with `cargo zigbuild --target <triple>.2.28`, copy it to the existing
89
+ `artifacts/fs-safe-native.<platform>.node` name, and reject any GLIBC symbol
90
+ requirement above 2.28 before upload. The gate also rejects missing or unknown
91
+ GLIBC versions. To inspect an existing binding, use
92
+ `node scripts/check-linux-glibc.mjs <binding.node>`.
93
+
94
+ `pnpm native:build` remains a host-toolchain development build; it does not
95
+ establish the GNU release ABI floor.
96
+
97
+ On Linux x64 or arm64 with Docker, run `pnpm build`, copy the matching GNU artifact from
98
+ `artifacts/` to `native/`, run `node scripts/stage-host-native.mjs`, then run
99
+ `bash scripts/test-linux-glibc-floor.sh`. CI uses this command to load the actual
100
+ artifact and run native security and no-replace move tests in Rocky Linux 8
101
+ (glibc 2.28). Both GNU architectures execute this load test on matching runners.
102
+
33
103
  ## Test
34
104
 
35
105
  ```bash
@@ -97,6 +167,52 @@ pnpm check
97
167
  This runs the filesystem boundary checks, build, tests, and package
98
168
  tarball/import validation.
99
169
 
170
+ The native watch lane requires events on Linux, macOS, and Windows and reports
171
+ actual edit latency. Run `FS_SAFE_TEST_SERIAL=1 pnpm check` to isolate local timing
172
+ checks from the other filesystem stress suites. Watch fixtures use normal OS
173
+ temporary storage; session scratch trees may suppress macOS filesystem events.
174
+
175
+ ### Optional Linux Testbox
176
+
177
+ The manual `testbox-validation.yml` workflow prepares a 16-vCPU Ubuntu 24.04
178
+ Blacksmith Testbox with Node 24.21.0, pnpm 12.4.2, dependencies, the Rust WASM
179
+ target, and the pinned portable archive compiler. It leaves library builds and
180
+ validation commands to the caller and does not replace required CI checks.
181
+
182
+ Use an authenticated Blacksmith CLI with access to the repository and its
183
+ Blacksmith organization. From a full repository checkout, warm one session
184
+ through Crabbox:
185
+
186
+ ```sh
187
+ CRABBOX_BLACKSMITH_IDLE_TIMEOUT=240m crabbox warmup --provider blacksmith-testbox \
188
+ --blacksmith-org openclaw \
189
+ --blacksmith-workflow .github/workflows/testbox-validation.yml \
190
+ --blacksmith-job validate --blacksmith-ref main \
191
+ --idle-timeout 240m --timing-json
192
+ ```
193
+
194
+ Use a branch or tag containing the workflow for `--blacksmith-ref`; GitHub must
195
+ first have registered the workflow on the default branch. The job has a fixed
196
+ 240-minute limit. Keep the idle timeout at that limit (240 minutes in the native
197
+ Blacksmith CLI) because the pinned Testbox action can miss active SSH sessions
198
+ behind a forwarded port. Bound commands by the remaining job time and leave time
199
+ to collect results and stop before the deadline.
200
+
201
+ Use the returned `tbx_...` ID for subsequent commands. The `fs-safe-testbox`
202
+ wrapper restores the prepared tool paths and WASM compiler settings in the SSH
203
+ shell. For example:
204
+
205
+ ```sh
206
+ crabbox run --provider blacksmith-testbox --id <tbx_id> --timing-json -- \
207
+ fs-safe-testbox pnpm check
208
+ crabbox stop --provider blacksmith-testbox <tbx_id>
209
+ ```
210
+
211
+ Stop the session when finished and verify its terminal status. Blacksmith owns
212
+ checkout synchronization; record the tested source revision or diff, Testbox ID,
213
+ and Actions run. This backend is Linux-only and does not accept Crabbox's direct
214
+ SSH `--script` or `--download` flags. The workflow provides no application secrets.
215
+
100
216
  ### Method benchmarks
101
217
 
102
218
  `pnpm benchmark:methods` measures the callable library surface against synthetic
@@ -117,6 +233,10 @@ pnpm archive:producer-smoke ./consumer require
117
233
  This uses a child bound to canonical cwd/device/inode running `/usr/bin/tar -czf - .`
118
234
  with unchanged stdout, and npm tar, on synthetic Unicode/newline/long-name files,
119
235
  then the installed package API for exact payload hashes and bounded reads.
236
+ The consumer must be separate from the source checkout; package resolution must
237
+ stay within its own `node_modules`, including pnpm's local `.pnpm` layout.
238
+ Workspace self-resolution, upward resolution, and external package links reject
239
+ before package imports or archive fixture creation.
120
240
  It also rejects a valid PAX override attached to an invalid raw UTF-8 field.
121
241
  The `require` command must resolve the freshly packed native binding; the
122
242
  `off` command uses the installed WASM asset. No live user files are read.
@@ -157,10 +277,32 @@ require the pnpm lifecycle CLI path; JavaScript CLIs run through Node and standa
157
277
  direct `node` invocation without lifecycle metadata is unsupported. Archive
158
278
  codecs and their dependencies are packed from the installed dependency graph.
159
279
 
160
- PR CI builds and executes four host targets: Linux x64 glibc, Linux x64 musl
161
- (Alpine), macOS arm64, and Windows x64. The root-only smoke runs on each. The
162
- seven-target source build matrix runs on release tags; packaging all seven is
163
- not execution proof for every architecture. The smoke writes manager versions,
280
+ PR CI builds and executes all seven shipped bindings. The existing check names
281
+ stay stable; extra runner/runtime combinations add checks without changing the
282
+ repository ruleset. Native lanes run Node 24; the GNU host lanes also exercise
283
+ Bun 1.4.2 (as do macOS and Windows).
284
+
285
+ | Lane | Runner | Architecture / libc | Runtime |
286
+ | --- | --- | --- | --- |
287
+ | JavaScript check | `ubuntu-latest` | x64 / glibc | Node 22, 24, 26 |
288
+ | JavaScript check | `macos-15` | arm64 | Node 22, 24, 26 |
289
+ | JavaScript check | `fs-safe-windows-16core` (`windows-latest`) | x64 | Node 22, 24, 26 |
290
+ | Native check | `ubuntu-latest` | x64 / glibc | Node 24, Bun 1.4.2 |
291
+ | Native check (forced no-openat2) | `ubuntu-latest` | x64 / glibc | Node 24 |
292
+ | Native check | `ubuntu-24.04-arm` | arm64 / glibc | Node 24, Bun 1.4.2 |
293
+ | Native check | `macos-15` | arm64 | Node 24, Bun 1.4.2 |
294
+ | Native check | `macos-15-intel` | x64 | Node 24, Bun 1.4.2 |
295
+ | Native check | `fs-safe-windows-16core` (`windows-latest`) | x64 | Node 24, Bun 1.4.2 |
296
+ | Native check | `windows-2022` (standard hosted) | x64 | Node 24, Bun 1.4.2 |
297
+ | Native check (Alpine 3.24) | `ubuntu-latest` | x64 / musl | Node 24 |
298
+ | Native check (Alpine 3.24) | `ubuntu-24.04-arm` | arm64 / musl | Node 24 |
299
+ | GNU glibc 2.28 build + Rocky Linux 8 load | `ubuntu-latest` | x64 / glibc | Node 24 |
300
+ | GNU glibc 2.28 build + Rocky Linux 8 load | `ubuntu-24.04-arm` | arm64 / glibc | Node 24 |
301
+ | Bundled package smoke | `ubuntu-latest`, `macos-15`, `fs-safe-windows-16core` | host | Node 22, 24 |
302
+ | Coverage | `ubuntu-latest`, `macos-15`, `fs-safe-windows-16core` | host | Node 22 |
303
+
304
+ Both musl lanes also run root-only package smoke with the real host binding.
305
+ The seven-target source build matrix still runs on release tags. The smoke writes manager versions,
164
306
  cases, and synthetic-fixture scope to `release-artifacts/consumer-proof.json`.
165
307
 
166
308
  ## Docs
@@ -66,16 +66,22 @@ On Windows, automatic byte copying uses the native binding when available to tra
66
66
 
67
67
  On Linux, automatic byte copying also uses the native binding when available. It reads in chunks up to 1 MiB, using smaller buffers for smaller source-size hints, and leaves leading and trailing zero-filled portions of each chunk unwritten in the new file, avoiding their allocation on filesystems that support sparse files. A final size update preserves trailing holes and all-zero files. This path uses reads and writes, without cloning or copy offload; it still reads the full logical contents and does not promise identical sparse extent layout. `clone: "never"` retains the JavaScript byte-copy path.
68
68
 
69
+ Tree-copy cleanup attempts every acquired close once, even when another close fails. Portable file handles close output before input; completed directories close their pinned source before target; the public wrapper then closes its source before the destination parent. A copy, identity, metadata, native-clone, or cancellation failure already observed at one of those scopes remains the reported value instead of being replaced by cleanup. If that scope otherwise succeeded, its first close failure is reported unchanged. Concurrent siblings have no global structural close order: the first observed sibling failure stops new work while admitted work settles. Portable copying records caller cancellation when it occurs, so a later abort during cleanup cannot replace an earlier copy failure.
70
+
69
71
  Clones preserve file contents, empty directories, timestamps, executable modes where supported, and literal symbolic links. Editing a clone does not modify its source. Unsupported filesystem operations fail; callers may choose their own copy or checkout fallback after the failed operation has settled.
70
72
 
71
73
  Native Windows byte copies can store large zero-filled chunks as sparse ranges when the destination is initially empty and its filesystem supports sparse files. This still reads every source byte and creates an independent copy.
72
74
 
73
75
  The ReFS backend rejects files with alternate data streams and unsupported reparse-point types instead of silently losing their contents. Symbolic links and junctions are preserved.
74
76
 
77
+ Failed ReFS clones attempt to remove their partial output through the retained directory handles. On Windows versions that reject the ignore-readonly deletion flag, clone rollback retries without that flag so ordinary output can be removed. It never clears readonly attributes: readonly output can remain, and the original clone error includes the cleanup failure. Other processes retaining output handles can delay deletion beyond settlement; a failed call does not guarantee an absent destination.
78
+
75
79
  XFS and ZFS preserve regular-file and directory modes, timestamps, extended attributes, and ACLs. They reject special files, symlink extended attributes, non-UTF-8 names, and directory nesting deeper than 128 levels. Hardlinked source files become independent reflinked files. Portable byte copying preserves file contents, empty directories, modes where supported, file and directory timestamps, and literal symbolic links; it does not promise ownership, ACL, extended-attribute, alternate-stream, or sparse-layout preservation. On Windows, byte copying rejects unresolved symbolic links because Node does not expose their file/directory link type; resolved links keep their literal target and source type. POSIX dangling links are preserved. Choose a copying policy that meets the caller's metadata requirements; automatic copying can select either path.
76
80
 
77
81
  `readCloneFileMetadata(files)` asynchronously reads APFS data-stream identities and file metadata in one native batch. Results correspond to input order; missing or unsupported entries return `undefined`. The returned `CloneFileMetadata` includes clone ID, device/inode, size, mode, ownership, and timestamps. These are point-in-time observations, not authorization or proof that later reads remain unchanged. Consumers such as Git index adapters must validate their own content and timestamp invariants. The reader does not follow leaf symbolic links.
78
82
 
83
+ All input paths must be absolute and valid before native availability is checked. On platforms other than macOS, `auto` and `off` can return one `undefined` per path without the addon, matching native's unsupported result. On macOS, `off` or an unavailable addon still rejects with `helper-unavailable`; JavaScript cannot supply APFS clone IDs. Explicit `require` mode rejects an unavailable addon on every platform, including for an empty batch. Errors from a loaded native helper remain terminal.
84
+
79
85
  ## Borrowed FileHandle transfers
80
86
 
81
87
  `copyFileHandle` from `@openclaw/fs-safe/advanced` copies bytes between two
@@ -137,14 +143,49 @@ descriptor inspection does not prove that the source remained unchanged while
137
143
  copying. Keep existing source-fingerprint and publication checks around the
138
144
  transfer when building snapshot operations.
139
145
 
146
+ ### Synchronous descriptor transfers
147
+
148
+ `copyFileDescriptorSync(sourceFd, targetFd, options?)` provides the same
149
+ zero-origin byte transfer for borrowed numeric descriptors. It shares
150
+ `CopyFileHandleOptions` and returns the copied byte count synchronously:
151
+
152
+ ```ts
153
+ import { copyFileDescriptorSync } from "@openclaw/fs-safe/advanced";
154
+
155
+ const bytes = copyFileDescriptorSync(sourceFd, targetFd, {
156
+ maxBytes: expectedSize,
157
+ assertBeforeMutation: assertSnapshotOwnerCurrent,
158
+ });
159
+ ```
160
+
161
+ The same regular-file and exact-identity admission, byte limits, short-I/O
162
+ handling, cursor preservation, and caller-owned cleanup apply. The target must
163
+ be opened without append mode, and both descriptors must remain open and free
164
+ of concurrent I/O, including inside callbacks. Neither helper makes a mutable
165
+ source into a consistent snapshot or truncates an existing destination suffix.
166
+
167
+ The synchronous helper snapshots the four options once and invokes both
168
+ callbacks with no receiver (`this` is `undefined` in strict callbacks).
169
+ `onChunk` receives a borrowed view that must be consumed immediately without
170
+ retaining or mutating it. Both callbacks must finish synchronously; thenables
171
+ throw `TypeError` before the current write. Cancellation is cooperative: a
172
+ pre-aborted signal or an abort triggered by a callback stops the transfer before
173
+ the next write. Timers cannot interrupt synchronous filesystem calls while the
174
+ event loop is blocked. Authority runs before every partial write; an abort
175
+ triggered by that assertion prevents the same write.
176
+
140
177
  ## Ownership and cancellation
141
178
 
142
179
  These are low-level operations on caller-owned absolute paths, not Root-relative methods. The source and destination parent must be real directories. The library pins their descriptors and verifies their identities; it does not establish the caller's authorization to use them. Keep the source immutable for the operation, including writes through other aliases, and keep the destination namespace under the caller's control. Literal symlinks in the cloned contents are preserved rather than followed or sanitized.
143
180
 
144
181
  An already aborted signal prevents dispatch. In-flight cancellation stops cancellable traversal and waits for admitted native writes to finish before rejecting. APFS and Btrfs bulk operations cannot be interrupted once dispatched. An aborted or failed call can therefore leave a destination, including a complete bulk clone. It remains caller-owned; after settlement, the caller decides whether to retain or remove it. Do not start cleanup by racing the cloning promise against an abort promise.
145
182
 
183
+ Tree copying preserves caller abort handlers and receives cancellation even when a caller handler stops event propagation, including native cloning and byte-copy fallbacks.
184
+
146
185
  Completion is not a crash-durability guarantee. The API is suitable for reconstructible templates and checkouts; it does not sync every file or replace application-level publication and recovery rules.
147
186
 
187
+ A close-only rejection reports descriptor settlement, not whether bytes reached stable storage. The destination can already be complete when a close fails, just as other failed or cancelled calls can leave caller-owned output. Inspect or remove that output only after the copying promise settles and under the same source and destination authority assumptions.
188
+
148
189
  Byte copying retains fractional file and directory access/modification timestamps to the precision supported by Node's timestamp APIs and the destination filesystem. This includes dates before 1970 on Unix. On Windows, [Node's unsigned stat seconds](https://github.com/nodejs/node/blob/v26.8.2/src/node_file-inl.h#L93-L104) can report pre-1970 timestamps as dates about 136 years later; byte copying inherits that upstream limitation.
149
190
 
150
191
  ## Platform tests and benchmarks