@openclaw/openshell-sandbox 2026.9.5 → 2026.9.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1189) hide show
  1. package/assets/icon.png +0 -0
  2. package/dist/index.js +85 -271
  3. package/node_modules/@openclaw/fs-safe/CHANGELOG.md +304 -0
  4. package/node_modules/@openclaw/fs-safe/README.md +68 -15
  5. package/node_modules/@openclaw/fs-safe/dist/absolute-path.d.ts +0 -1
  6. package/node_modules/@openclaw/fs-safe/dist/absolute-path.js +2 -8
  7. package/node_modules/@openclaw/fs-safe/dist/advanced.d.ts +12 -4
  8. package/node_modules/@openclaw/fs-safe/dist/advanced.js +7 -2
  9. package/node_modules/@openclaw/fs-safe/dist/archive-crc32.d.ts +0 -1
  10. package/node_modules/@openclaw/fs-safe/dist/archive-deadline.d.ts +0 -1
  11. package/node_modules/@openclaw/fs-safe/dist/archive-deadline.js +22 -23
  12. package/node_modules/@openclaw/fs-safe/dist/archive-durability.d.ts +1 -2
  13. package/node_modules/@openclaw/fs-safe/dist/archive-durability.js +1 -1
  14. package/node_modules/@openclaw/fs-safe/dist/archive-entry.d.ts +0 -1
  15. package/node_modules/@openclaw/fs-safe/dist/archive-errors.d.ts +0 -1
  16. package/node_modules/@openclaw/fs-safe/dist/archive-gzip-tail.d.ts +0 -1
  17. package/node_modules/@openclaw/fs-safe/dist/archive-input.d.ts +0 -1
  18. package/node_modules/@openclaw/fs-safe/dist/archive-kind.d.ts +0 -2
  19. package/node_modules/@openclaw/fs-safe/dist/archive-kind.js +5 -17
  20. package/node_modules/@openclaw/fs-safe/dist/archive-limits.d.ts +0 -1
  21. package/node_modules/@openclaw/fs-safe/dist/archive-merge.d.ts +3 -4
  22. package/node_modules/@openclaw/fs-safe/dist/archive-merge.js +130 -54
  23. package/node_modules/@openclaw/fs-safe/dist/archive-parser-errors.d.ts +0 -1
  24. package/node_modules/@openclaw/fs-safe/dist/archive-parser.wasm +0 -0
  25. package/node_modules/@openclaw/fs-safe/dist/archive-plan.d.ts +67 -2
  26. package/node_modules/@openclaw/fs-safe/dist/archive-plan.js +86 -22
  27. package/node_modules/@openclaw/fs-safe/dist/archive-read.d.ts +0 -1
  28. package/node_modules/@openclaw/fs-safe/dist/archive-read.js +16 -26
  29. package/node_modules/@openclaw/fs-safe/dist/archive-staging.d.ts +1 -3
  30. package/node_modules/@openclaw/fs-safe/dist/archive-staging.js +3 -3
  31. package/node_modules/@openclaw/fs-safe/dist/archive-tar-stream.d.ts +3 -1
  32. package/node_modules/@openclaw/fs-safe/dist/archive-tar-stream.js +56 -37
  33. package/node_modules/@openclaw/fs-safe/dist/archive-tar-wasm.d.ts +17 -6
  34. package/node_modules/@openclaw/fs-safe/dist/archive-tar-wasm.js +134 -34
  35. package/node_modules/@openclaw/fs-safe/dist/archive-zip-admission.d.ts +0 -1
  36. package/node_modules/@openclaw/fs-safe/dist/archive-zip-count.d.ts +0 -1
  37. package/node_modules/@openclaw/fs-safe/dist/archive-zip-count.js +21 -1
  38. package/node_modules/@openclaw/fs-safe/dist/archive-zip-directory.d.ts +5 -2
  39. package/node_modules/@openclaw/fs-safe/dist/archive-zip-directory.js +29 -1
  40. package/node_modules/@openclaw/fs-safe/dist/archive-zip-entry.d.ts +13 -10
  41. package/node_modules/@openclaw/fs-safe/dist/archive-zip-entry.js +9 -26
  42. package/node_modules/@openclaw/fs-safe/dist/archive-zip-integrity.d.ts +2 -3
  43. package/node_modules/@openclaw/fs-safe/dist/archive-zip-integrity.js +2 -13
  44. package/node_modules/@openclaw/fs-safe/dist/archive-zip-loader.d.ts +7 -2
  45. package/node_modules/@openclaw/fs-safe/dist/archive-zip-loader.js +119 -33
  46. package/node_modules/@openclaw/fs-safe/dist/archive-zip-manifest.d.ts +0 -1
  47. package/node_modules/@openclaw/fs-safe/dist/archive-zip-manifest.js +3 -1
  48. package/node_modules/@openclaw/fs-safe/dist/archive-zip-names.d.ts +1 -1
  49. package/node_modules/@openclaw/fs-safe/dist/archive-zip-names.js +13 -2
  50. package/node_modules/@openclaw/fs-safe/dist/archive-zip-preflight.d.ts +2 -4
  51. package/node_modules/@openclaw/fs-safe/dist/archive-zip-preflight.js +16 -8
  52. package/node_modules/@openclaw/fs-safe/dist/archive.d.ts +14 -9
  53. package/node_modules/@openclaw/fs-safe/dist/archive.js +223 -178
  54. package/node_modules/@openclaw/fs-safe/dist/async-lock.d.ts +0 -1
  55. package/node_modules/@openclaw/fs-safe/dist/atomic.d.ts +3 -2
  56. package/node_modules/@openclaw/fs-safe/dist/bounded-read-stream.d.ts +0 -2
  57. package/node_modules/@openclaw/fs-safe/dist/bounded-read-stream.js +0 -6
  58. package/node_modules/@openclaw/fs-safe/dist/bounded-read.d.ts +0 -1
  59. package/node_modules/@openclaw/fs-safe/dist/byte-budget.d.ts +0 -1
  60. package/node_modules/@openclaw/fs-safe/dist/byte-view.d.ts +2 -0
  61. package/node_modules/@openclaw/fs-safe/dist/byte-view.js +13 -0
  62. package/node_modules/@openclaw/fs-safe/dist/clone-metadata.d.ts +1 -1
  63. package/node_modules/@openclaw/fs-safe/dist/clone-metadata.js +6 -2
  64. package/node_modules/@openclaw/fs-safe/dist/config.d.ts +0 -1
  65. package/node_modules/@openclaw/fs-safe/dist/containment.d.ts +0 -1
  66. package/node_modules/@openclaw/fs-safe/dist/copy-file-input.d.ts +0 -1
  67. package/node_modules/@openclaw/fs-safe/dist/copy-policy.d.ts +0 -1
  68. package/node_modules/@openclaw/fs-safe/dist/copy-publication.d.ts +8 -5
  69. package/node_modules/@openclaw/fs-safe/dist/copy-publication.js +5 -6
  70. package/node_modules/@openclaw/fs-safe/dist/copy-tree-portable.d.ts +0 -1
  71. package/node_modules/@openclaw/fs-safe/dist/copy-tree-portable.js +51 -28
  72. package/node_modules/@openclaw/fs-safe/dist/copy.d.ts +0 -1
  73. package/node_modules/@openclaw/fs-safe/dist/copy.js +34 -16
  74. package/node_modules/@openclaw/fs-safe/dist/create-owned-file.d.ts +7 -0
  75. package/node_modules/@openclaw/fs-safe/dist/create-owned-file.js +16 -0
  76. package/node_modules/@openclaw/fs-safe/dist/create.d.ts +17 -0
  77. package/node_modules/@openclaw/fs-safe/dist/create.js +388 -0
  78. package/node_modules/@openclaw/fs-safe/dist/creation-boundary.d.ts +60 -0
  79. package/node_modules/@openclaw/fs-safe/dist/creation-boundary.js +371 -0
  80. package/node_modules/@openclaw/fs-safe/dist/deny-mutation-match.d.ts +2 -0
  81. package/node_modules/@openclaw/fs-safe/dist/deny-mutation-match.js +71 -0
  82. package/node_modules/@openclaw/fs-safe/dist/deny-mutations.d.ts +2 -3
  83. package/node_modules/@openclaw/fs-safe/dist/deny-mutations.js +56 -35
  84. package/node_modules/@openclaw/fs-safe/dist/device-path.d.ts +0 -1
  85. package/node_modules/@openclaw/fs-safe/dist/directory-durability.d.ts +7 -8
  86. package/node_modules/@openclaw/fs-safe/dist/directory-durability.js +22 -80
  87. package/node_modules/@openclaw/fs-safe/dist/directory-entry-path.d.ts +0 -1
  88. package/node_modules/@openclaw/fs-safe/dist/directory-guard.d.ts +5 -8
  89. package/node_modules/@openclaw/fs-safe/dist/directory-guard.js +23 -57
  90. package/node_modules/@openclaw/fs-safe/dist/directory-mode-node.d.ts +22 -3
  91. package/node_modules/@openclaw/fs-safe/dist/directory-mode-node.js +97 -3
  92. package/node_modules/@openclaw/fs-safe/dist/directory-receipt.d.ts +23 -0
  93. package/node_modules/@openclaw/fs-safe/dist/directory-receipt.js +121 -0
  94. package/node_modules/@openclaw/fs-safe/dist/durability.d.ts +2 -2
  95. package/node_modules/@openclaw/fs-safe/dist/effective-uid.d.ts +0 -1
  96. package/node_modules/@openclaw/fs-safe/dist/effective-uid.js +1 -4
  97. package/node_modules/@openclaw/fs-safe/dist/error-detail.d.ts +0 -1
  98. package/node_modules/@openclaw/fs-safe/dist/errors.d.ts +3 -2
  99. package/node_modules/@openclaw/fs-safe/dist/errors.js +3 -2
  100. package/node_modules/@openclaw/fs-safe/dist/file-cleanup.d.ts +19 -0
  101. package/node_modules/@openclaw/fs-safe/dist/file-cleanup.js +81 -0
  102. package/node_modules/@openclaw/fs-safe/dist/file-contents.d.ts +5 -0
  103. package/node_modules/@openclaw/fs-safe/dist/file-contents.js +40 -0
  104. package/node_modules/@openclaw/fs-safe/dist/file-handle-transfer.d.ts +2 -1
  105. package/node_modules/@openclaw/fs-safe/dist/file-handle-transfer.js +57 -2
  106. package/node_modules/@openclaw/fs-safe/dist/file-hash.d.ts +0 -1
  107. package/node_modules/@openclaw/fs-safe/dist/file-hash.js +186 -70
  108. package/node_modules/@openclaw/fs-safe/dist/file-identity.d.ts +0 -1
  109. package/node_modules/@openclaw/fs-safe/dist/file-identity.js +26 -4
  110. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-acquisition.d.ts +22 -0
  111. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-acquisition.js +98 -0
  112. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-admission.d.ts +17 -0
  113. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-admission.js +58 -0
  114. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-acquire.d.ts +3 -0
  115. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-acquire.js +303 -0
  116. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-arbitration.d.ts +17 -0
  117. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-arbitration.js +66 -0
  118. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-held.d.ts +25 -0
  119. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-held.js +392 -0
  120. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-io.d.ts +40 -0
  121. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-io.js +209 -0
  122. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-mutation.d.ts +16 -0
  123. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-mutation.js +275 -0
  124. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-options.d.ts +11 -0
  125. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-options.js +58 -0
  126. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-registration.d.ts +1 -0
  127. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-registration.js +90 -0
  128. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root.d.ts +34 -0
  129. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root.js +288 -0
  130. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-stale-admission.d.ts +19 -0
  131. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-stale-admission.js +199 -0
  132. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync.d.ts +4 -22
  133. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync.js +207 -249
  134. package/node_modules/@openclaw/fs-safe/dist/file-lock.d.ts +0 -1
  135. package/node_modules/@openclaw/fs-safe/dist/file-observation.d.ts +1 -2
  136. package/node_modules/@openclaw/fs-safe/dist/file-store-boundary.d.ts +11 -14
  137. package/node_modules/@openclaw/fs-safe/dist/file-store-boundary.js +73 -45
  138. package/node_modules/@openclaw/fs-safe/dist/file-store-prune.d.ts +0 -1
  139. package/node_modules/@openclaw/fs-safe/dist/file-store-prune.js +11 -6
  140. package/node_modules/@openclaw/fs-safe/dist/file-store-sync-directory.d.ts +0 -1
  141. package/node_modules/@openclaw/fs-safe/dist/file-store-sync-directory.js +197 -227
  142. package/node_modules/@openclaw/fs-safe/dist/file-store-sync-write.d.ts +0 -1
  143. package/node_modules/@openclaw/fs-safe/dist/file-store-sync-write.js +22 -36
  144. package/node_modules/@openclaw/fs-safe/dist/file-store.d.ts +4 -8
  145. package/node_modules/@openclaw/fs-safe/dist/file-store.js +72 -45
  146. package/node_modules/@openclaw/fs-safe/dist/file-sync.d.ts +0 -1
  147. package/node_modules/@openclaw/fs-safe/dist/filename.d.ts +0 -1
  148. package/node_modules/@openclaw/fs-safe/dist/filename.js +1 -7
  149. package/node_modules/@openclaw/fs-safe/dist/fs.d.ts +0 -1
  150. package/node_modules/@openclaw/fs-safe/dist/guarded-mkdir.d.ts +2 -2
  151. package/node_modules/@openclaw/fs-safe/dist/guarded-mkdir.js +27 -19
  152. package/node_modules/@openclaw/fs-safe/dist/guarded-mutation.d.ts +0 -7
  153. package/node_modules/@openclaw/fs-safe/dist/guarded-mutation.js +6 -11
  154. package/node_modules/@openclaw/fs-safe/dist/guest-dispatch-python.d.ts +0 -1
  155. package/node_modules/@openclaw/fs-safe/dist/guest-dispatch-python.js +41 -90
  156. package/node_modules/@openclaw/fs-safe/dist/guest-native-python.d.ts +0 -1
  157. package/node_modules/@openclaw/fs-safe/dist/guest-native-python.js +23 -31
  158. package/node_modules/@openclaw/fs-safe/dist/guest.d.ts +0 -1
  159. package/node_modules/@openclaw/fs-safe/dist/guest.js +21 -12
  160. package/node_modules/@openclaw/fs-safe/dist/home-dir.d.ts +0 -1
  161. package/node_modules/@openclaw/fs-safe/dist/index.d.ts +9 -7
  162. package/node_modules/@openclaw/fs-safe/dist/install-path.d.ts +0 -1
  163. package/node_modules/@openclaw/fs-safe/dist/install-path.js +2 -5
  164. package/node_modules/@openclaw/fs-safe/dist/json-document-store.d.ts +4 -10
  165. package/node_modules/@openclaw/fs-safe/dist/json-document-store.js +22 -15
  166. package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-directory.d.ts +13 -1
  167. package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-directory.js +134 -0
  168. package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-ownership.d.ts +1 -7
  169. package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-ownership.js +43 -72
  170. package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-read.d.ts +0 -1
  171. package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-read.js +13 -9
  172. package/node_modules/@openclaw/fs-safe/dist/json-durable-queue.d.ts +0 -2
  173. package/node_modules/@openclaw/fs-safe/dist/json-durable-queue.js +20 -148
  174. package/node_modules/@openclaw/fs-safe/dist/json-store.d.ts +0 -1
  175. package/node_modules/@openclaw/fs-safe/dist/json-store.js +1 -2
  176. package/node_modules/@openclaw/fs-safe/dist/json-stringify.d.ts +0 -1
  177. package/node_modules/@openclaw/fs-safe/dist/json.d.ts +0 -1
  178. package/node_modules/@openclaw/fs-safe/dist/json.js +39 -92
  179. package/node_modules/@openclaw/fs-safe/dist/local-file-access.d.ts +0 -1
  180. package/node_modules/@openclaw/fs-safe/dist/local-file-access.js +5 -15
  181. package/node_modules/@openclaw/fs-safe/dist/local-file-descriptor.d.ts +2 -6
  182. package/node_modules/@openclaw/fs-safe/dist/local-roots.d.ts +2 -8
  183. package/node_modules/@openclaw/fs-safe/dist/local-roots.js +19 -21
  184. package/node_modules/@openclaw/fs-safe/dist/lock-config.d.ts +0 -1
  185. package/node_modules/@openclaw/fs-safe/dist/move-path-cleanup.d.ts +5 -20
  186. package/node_modules/@openclaw/fs-safe/dist/move-path-cleanup.js +60 -24
  187. package/node_modules/@openclaw/fs-safe/dist/move-path-stage.d.ts +0 -1
  188. package/node_modules/@openclaw/fs-safe/dist/move-path.d.ts +0 -1
  189. package/node_modules/@openclaw/fs-safe/dist/move-path.js +64 -42
  190. package/node_modules/@openclaw/fs-safe/dist/mutation-authority.d.ts +0 -1
  191. package/node_modules/@openclaw/fs-safe/dist/mutation-authority.js +5 -0
  192. package/node_modules/@openclaw/fs-safe/dist/native-binding.d.ts +69 -15
  193. package/node_modules/@openclaw/fs-safe/dist/native-config.d.ts +0 -1
  194. package/node_modules/@openclaw/fs-safe/dist/native-directory-observation.d.ts +0 -1
  195. package/node_modules/@openclaw/fs-safe/dist/native-fallback-warning.d.ts +3 -0
  196. package/node_modules/@openclaw/fs-safe/dist/native-fallback-warning.js +11 -0
  197. package/node_modules/@openclaw/fs-safe/dist/native-operations.d.ts +1 -7
  198. package/node_modules/@openclaw/fs-safe/dist/native-operations.js +2 -31
  199. package/node_modules/@openclaw/fs-safe/dist/native-parent-admission.d.ts +5 -3
  200. package/node_modules/@openclaw/fs-safe/dist/native-parent-admission.js +27 -7
  201. package/node_modules/@openclaw/fs-safe/dist/native-pinned-write-windows.d.ts +2 -3
  202. package/node_modules/@openclaw/fs-safe/dist/native-pinned-write-windows.js +174 -29
  203. package/node_modules/@openclaw/fs-safe/dist/native-pinned-write.d.ts +1 -2
  204. package/node_modules/@openclaw/fs-safe/dist/native-pinned-write.js +230 -187
  205. package/node_modules/@openclaw/fs-safe/dist/native-policy-directory-observation.d.ts +11 -0
  206. package/node_modules/@openclaw/fs-safe/dist/native-policy-directory-observation.js +61 -0
  207. package/node_modules/@openclaw/fs-safe/dist/native-policy-parent-windows.d.ts +13 -0
  208. package/node_modules/@openclaw/fs-safe/dist/native-policy-parent-windows.js +209 -0
  209. package/node_modules/@openclaw/fs-safe/dist/native-rename-outcome.d.ts +3 -0
  210. package/node_modules/@openclaw/fs-safe/dist/native-rename-outcome.js +8 -0
  211. package/node_modules/@openclaw/fs-safe/dist/native-staged-file.d.ts +20 -6
  212. package/node_modules/@openclaw/fs-safe/dist/native-staged-file.js +149 -106
  213. package/node_modules/@openclaw/fs-safe/dist/native-staged-symlink.d.ts +13 -0
  214. package/node_modules/@openclaw/fs-safe/dist/native-staged-symlink.js +303 -0
  215. package/node_modules/@openclaw/fs-safe/dist/native.d.ts +0 -1
  216. package/node_modules/@openclaw/fs-safe/dist/native.js +2 -2
  217. package/node_modules/@openclaw/fs-safe/dist/opened-file-failure.d.ts +0 -1
  218. package/node_modules/@openclaw/fs-safe/dist/opened-realpath.d.ts +0 -1
  219. package/node_modules/@openclaw/fs-safe/dist/opened-realpath.js +11 -2
  220. package/node_modules/@openclaw/fs-safe/dist/output.d.ts +0 -1
  221. package/node_modules/@openclaw/fs-safe/dist/output.js +12 -8
  222. package/node_modules/@openclaw/fs-safe/dist/overwrite-file-handle.d.ts +0 -1
  223. package/node_modules/@openclaw/fs-safe/dist/owner-dacl-batch-worker.js +54 -0
  224. package/node_modules/@openclaw/fs-safe/dist/owner-dacl-batch.d.ts +5 -0
  225. package/node_modules/@openclaw/fs-safe/dist/owner-dacl-batch.js +64 -0
  226. package/node_modules/@openclaw/fs-safe/dist/owner-dacl.d.ts +2 -1
  227. package/node_modules/@openclaw/fs-safe/dist/owner-dacl.js +13 -4
  228. package/node_modules/@openclaw/fs-safe/dist/path-case.d.ts +0 -1
  229. package/node_modules/@openclaw/fs-safe/dist/path-policy.d.ts +0 -1
  230. package/node_modules/@openclaw/fs-safe/dist/path-prefix.d.ts +0 -1
  231. package/node_modules/@openclaw/fs-safe/dist/path-prefix.js +30 -8
  232. package/node_modules/@openclaw/fs-safe/dist/path-scope-lexical.d.ts +0 -1
  233. package/node_modules/@openclaw/fs-safe/dist/path-segment-route.d.ts +0 -1
  234. package/node_modules/@openclaw/fs-safe/dist/path-suffix-aliases.d.ts +2 -1
  235. package/node_modules/@openclaw/fs-safe/dist/path-suffix-aliases.js +25 -17
  236. package/node_modules/@openclaw/fs-safe/dist/path.d.ts +0 -1
  237. package/node_modules/@openclaw/fs-safe/dist/path.js +19 -2
  238. package/node_modules/@openclaw/fs-safe/dist/permission-exec.d.ts +8 -1
  239. package/node_modules/@openclaw/fs-safe/dist/permission-exec.js +141 -21
  240. package/node_modules/@openclaw/fs-safe/dist/permissions-public.d.ts +3 -2
  241. package/node_modules/@openclaw/fs-safe/dist/permissions-public.js +1 -0
  242. package/node_modules/@openclaw/fs-safe/dist/permissions-windows.d.ts +5 -16
  243. package/node_modules/@openclaw/fs-safe/dist/permissions-windows.js +11 -31
  244. package/node_modules/@openclaw/fs-safe/dist/permissions.d.ts +3 -11
  245. package/node_modules/@openclaw/fs-safe/dist/permissions.js +11 -34
  246. package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-admission.d.ts +1 -3
  247. package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-admission.js +27 -31
  248. package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-observation.d.ts +7 -3
  249. package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-observation.js +81 -18
  250. package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-shared-route.d.ts +3 -9
  251. package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-shared-route.js +1 -1
  252. package/node_modules/@openclaw/fs-safe/dist/pinned-open.d.ts +2 -2
  253. package/node_modules/@openclaw/fs-safe/dist/pinned-open.js +9 -5
  254. package/node_modules/@openclaw/fs-safe/dist/pinned-operation.d.ts +1 -2
  255. package/node_modules/@openclaw/fs-safe/dist/pinned-operation.js +3 -16
  256. package/node_modules/@openclaw/fs-safe/dist/pinned-write-input.d.ts +3 -0
  257. package/node_modules/@openclaw/fs-safe/dist/pinned-write-input.js +35 -0
  258. package/node_modules/@openclaw/fs-safe/dist/pinned-write-mode.d.ts +4 -0
  259. package/node_modules/@openclaw/fs-safe/dist/pinned-write-mode.js +31 -0
  260. package/node_modules/@openclaw/fs-safe/dist/pinned-write-staged.d.ts +5 -0
  261. package/node_modules/@openclaw/fs-safe/dist/pinned-write-staged.js +185 -0
  262. package/node_modules/@openclaw/fs-safe/dist/pinned-write-types.d.ts +14 -21
  263. package/node_modules/@openclaw/fs-safe/dist/pinned-write.d.ts +0 -2
  264. package/node_modules/@openclaw/fs-safe/dist/pinned-write.js +43 -151
  265. package/node_modules/@openclaw/fs-safe/dist/positional-read.d.ts +0 -1
  266. package/node_modules/@openclaw/fs-safe/dist/private-directory.d.ts +0 -1
  267. package/node_modules/@openclaw/fs-safe/dist/private-directory.js +18 -4
  268. package/node_modules/@openclaw/fs-safe/dist/private-producer-handoff-sync.d.ts +3 -0
  269. package/node_modules/@openclaw/fs-safe/dist/private-producer-handoff-sync.js +72 -0
  270. package/node_modules/@openclaw/fs-safe/dist/private-producer-handoff.d.ts +42 -5
  271. package/node_modules/@openclaw/fs-safe/dist/private-producer-handoff.js +166 -80
  272. package/node_modules/@openclaw/fs-safe/dist/private-temp-workspace.d.ts +0 -1
  273. package/node_modules/@openclaw/fs-safe/dist/private-temp-workspace.js +56 -128
  274. package/node_modules/@openclaw/fs-safe/dist/publish-copy-stage.d.ts +3 -3
  275. package/node_modules/@openclaw/fs-safe/dist/publish-copy-stage.js +20 -7
  276. package/node_modules/@openclaw/fs-safe/dist/publish-file-failure.d.ts +0 -1
  277. package/node_modules/@openclaw/fs-safe/dist/publish-file.d.ts +2 -4
  278. package/node_modules/@openclaw/fs-safe/dist/publish-file.js +59 -100
  279. package/node_modules/@openclaw/fs-safe/dist/read-open-flags.d.ts +0 -1
  280. package/node_modules/@openclaw/fs-safe/dist/read-opened-file.d.ts +2 -6
  281. package/node_modules/@openclaw/fs-safe/dist/realpath.d.ts +0 -1
  282. package/node_modules/@openclaw/fs-safe/dist/recursive-mkdir-path.d.ts +0 -1
  283. package/node_modules/@openclaw/fs-safe/dist/regular-file.d.ts +0 -1
  284. package/node_modules/@openclaw/fs-safe/dist/regular-file.js +111 -196
  285. package/node_modules/@openclaw/fs-safe/dist/replace-directory.d.ts +0 -1
  286. package/node_modules/@openclaw/fs-safe/dist/replace-directory.js +245 -20
  287. package/node_modules/@openclaw/fs-safe/dist/replace-file-buffer.d.ts +4 -0
  288. package/node_modules/@openclaw/fs-safe/dist/replace-file-buffer.js +36 -0
  289. package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-fallback.d.ts +4 -11
  290. package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-fallback.js +150 -117
  291. package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-source.d.ts +0 -1
  292. package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-source.js +27 -33
  293. package/node_modules/@openclaw/fs-safe/dist/replace-file-descriptor.d.ts +7 -12
  294. package/node_modules/@openclaw/fs-safe/dist/replace-file-descriptor.js +25 -18
  295. package/node_modules/@openclaw/fs-safe/dist/replace-file-destination.d.ts +21 -0
  296. package/node_modules/@openclaw/fs-safe/dist/replace-file-destination.js +123 -0
  297. package/node_modules/@openclaw/fs-safe/dist/replace-file-mode.d.ts +0 -1
  298. package/node_modules/@openclaw/fs-safe/dist/replace-file-mutation.d.ts +26 -0
  299. package/node_modules/@openclaw/fs-safe/dist/replace-file-mutation.js +47 -0
  300. package/node_modules/@openclaw/fs-safe/dist/replace-file-rename-policy.d.ts +1 -3
  301. package/node_modules/@openclaw/fs-safe/dist/replace-file-temp-owner.d.ts +19 -24
  302. package/node_modules/@openclaw/fs-safe/dist/replace-file-temp-owner.js +126 -149
  303. package/node_modules/@openclaw/fs-safe/dist/replace-file-types.d.ts +55 -0
  304. package/node_modules/@openclaw/fs-safe/dist/replace-file-types.js +1 -0
  305. package/node_modules/@openclaw/fs-safe/dist/replace-file.d.ts +3 -56
  306. package/node_modules/@openclaw/fs-safe/dist/replace-file.js +47 -31
  307. package/node_modules/@openclaw/fs-safe/dist/retained-directory-replacement.d.ts +26 -0
  308. package/node_modules/@openclaw/fs-safe/dist/retained-directory-replacement.js +193 -0
  309. package/node_modules/@openclaw/fs-safe/dist/retained-file-types.d.ts +50 -0
  310. package/node_modules/@openclaw/fs-safe/dist/retained-file-types.js +1 -0
  311. package/node_modules/@openclaw/fs-safe/dist/retained-file.d.ts +3 -0
  312. package/node_modules/@openclaw/fs-safe/dist/retained-file.js +121 -0
  313. package/node_modules/@openclaw/fs-safe/dist/root-boundary.d.ts +1 -1
  314. package/node_modules/@openclaw/fs-safe/dist/root-boundary.js +4 -0
  315. package/node_modules/@openclaw/fs-safe/dist/root-context.d.ts +0 -9
  316. package/node_modules/@openclaw/fs-safe/dist/root-context.js +6 -12
  317. package/node_modules/@openclaw/fs-safe/dist/root-create-input.d.ts +9 -3
  318. package/node_modules/@openclaw/fs-safe/dist/root-create-input.js +17 -4
  319. package/node_modules/@openclaw/fs-safe/dist/root-directory-creation.d.ts +4 -5
  320. package/node_modules/@openclaw/fs-safe/dist/root-directory-creation.js +20 -7
  321. package/node_modules/@openclaw/fs-safe/dist/root-directory-entry.d.ts +9 -0
  322. package/node_modules/@openclaw/fs-safe/dist/root-directory-entry.js +28 -0
  323. package/node_modules/@openclaw/fs-safe/dist/root-directory-list.d.ts +10 -2
  324. package/node_modules/@openclaw/fs-safe/dist/root-directory-list.js +105 -40
  325. package/node_modules/@openclaw/fs-safe/dist/root-directory.d.ts +0 -1
  326. package/node_modules/@openclaw/fs-safe/dist/root-entries.d.ts +0 -1
  327. package/node_modules/@openclaw/fs-safe/dist/root-entries.js +2 -2
  328. package/node_modules/@openclaw/fs-safe/dist/root-errors.d.ts +4 -1
  329. package/node_modules/@openclaw/fs-safe/dist/root-errors.js +5 -3
  330. package/node_modules/@openclaw/fs-safe/dist/root-file-final-admission.d.ts +2 -3
  331. package/node_modules/@openclaw/fs-safe/dist/root-file-final-admission.js +6 -8
  332. package/node_modules/@openclaw/fs-safe/dist/root-file.d.ts +0 -1
  333. package/node_modules/@openclaw/fs-safe/dist/root-file.js +5 -7
  334. package/node_modules/@openclaw/fs-safe/dist/root-handle-context.d.ts +4 -0
  335. package/node_modules/@openclaw/fs-safe/dist/root-handle-context.js +12 -0
  336. package/node_modules/@openclaw/fs-safe/dist/root-impl.d.ts +5 -18
  337. package/node_modules/@openclaw/fs-safe/dist/root-impl.js +239 -152
  338. package/node_modules/@openclaw/fs-safe/dist/root-move-noreplace.d.ts +4 -8
  339. package/node_modules/@openclaw/fs-safe/dist/root-move-noreplace.js +31 -28
  340. package/node_modules/@openclaw/fs-safe/dist/root-move-preflight.d.ts +0 -1
  341. package/node_modules/@openclaw/fs-safe/dist/root-observed-path.d.ts +0 -2
  342. package/node_modules/@openclaw/fs-safe/dist/root-observed-path.js +2 -7
  343. package/node_modules/@openclaw/fs-safe/dist/root-options.d.ts +13 -6
  344. package/node_modules/@openclaw/fs-safe/dist/root-path-errors.d.ts +1 -1
  345. package/node_modules/@openclaw/fs-safe/dist/root-path-errors.js +11 -2
  346. package/node_modules/@openclaw/fs-safe/dist/root-path-existing.d.ts +3 -1
  347. package/node_modules/@openclaw/fs-safe/dist/root-path-existing.js +45 -50
  348. package/node_modules/@openclaw/fs-safe/dist/root-path-observation.d.ts +4 -12
  349. package/node_modules/@openclaw/fs-safe/dist/root-path-stat.d.ts +0 -1
  350. package/node_modules/@openclaw/fs-safe/dist/root-path-stat.js +61 -11
  351. package/node_modules/@openclaw/fs-safe/dist/root-path.d.ts +0 -1
  352. package/node_modules/@openclaw/fs-safe/dist/root-path.js +64 -207
  353. package/node_modules/@openclaw/fs-safe/dist/root-paths-lexical.d.ts +0 -1
  354. package/node_modules/@openclaw/fs-safe/dist/root-paths.d.ts +2 -7
  355. package/node_modules/@openclaw/fs-safe/dist/root-public-types.d.ts +11 -0
  356. package/node_modules/@openclaw/fs-safe/dist/root-public-types.js +1 -0
  357. package/node_modules/@openclaw/fs-safe/dist/root-read-admission.d.ts +0 -1
  358. package/node_modules/@openclaw/fs-safe/dist/root-read-admission.js +31 -39
  359. package/node_modules/@openclaw/fs-safe/dist/root-remove-identity.d.ts +1 -4
  360. package/node_modules/@openclaw/fs-safe/dist/root-remove-identity.js +2 -4
  361. package/node_modules/@openclaw/fs-safe/dist/root-remove-receipt.d.ts +0 -1
  362. package/node_modules/@openclaw/fs-safe/dist/root-remove.d.ts +1 -1
  363. package/node_modules/@openclaw/fs-safe/dist/root-remove.js +21 -5
  364. package/node_modules/@openclaw/fs-safe/dist/root-symlink-policy.d.ts +0 -1
  365. package/node_modules/@openclaw/fs-safe/dist/root-walk.d.ts +19 -13
  366. package/node_modules/@openclaw/fs-safe/dist/root-walk.js +67 -16
  367. package/node_modules/@openclaw/fs-safe/dist/root-write-admission.d.ts +1 -4
  368. package/node_modules/@openclaw/fs-safe/dist/root-write-admission.js +4 -27
  369. package/node_modules/@openclaw/fs-safe/dist/root-write-compatibility.d.ts +1 -3
  370. package/node_modules/@openclaw/fs-safe/dist/root-write-compatibility.js +17 -68
  371. package/node_modules/@openclaw/fs-safe/dist/root-write-complete-parent.d.ts +2 -1
  372. package/node_modules/@openclaw/fs-safe/dist/root-write-complete-parent.js +13 -28
  373. package/node_modules/@openclaw/fs-safe/dist/root-write-lock-binding.d.ts +14 -0
  374. package/node_modules/@openclaw/fs-safe/dist/root-write-lock-binding.js +162 -0
  375. package/node_modules/@openclaw/fs-safe/dist/root-write-mode.d.ts +0 -1
  376. package/node_modules/@openclaw/fs-safe/dist/root-write-publication.d.ts +0 -1
  377. package/node_modules/@openclaw/fs-safe/dist/root-write-publication.js +1 -1
  378. package/node_modules/@openclaw/fs-safe/dist/root-write-verification.d.ts +1 -2
  379. package/node_modules/@openclaw/fs-safe/dist/root-write-verification.js +29 -42
  380. package/node_modules/@openclaw/fs-safe/dist/root.d.ts +2 -7
  381. package/node_modules/@openclaw/fs-safe/dist/safe-path-segment.d.ts +2 -2
  382. package/node_modules/@openclaw/fs-safe/dist/safe-path-segment.js +9 -6
  383. package/node_modules/@openclaw/fs-safe/dist/secret-file.d.ts +6 -3
  384. package/node_modules/@openclaw/fs-safe/dist/secret-file.js +22 -58
  385. package/node_modules/@openclaw/fs-safe/dist/secret-read-async.d.ts +0 -1
  386. package/node_modules/@openclaw/fs-safe/dist/secret-read-async.js +6 -27
  387. package/node_modules/@openclaw/fs-safe/dist/secret-read-policy.d.ts +6 -3
  388. package/node_modules/@openclaw/fs-safe/dist/secret-read-policy.js +27 -3
  389. package/node_modules/@openclaw/fs-safe/dist/secret.d.ts +0 -1
  390. package/node_modules/@openclaw/fs-safe/dist/secure-file-windows.d.ts +3 -3
  391. package/node_modules/@openclaw/fs-safe/dist/secure-file-windows.js +42 -149
  392. package/node_modules/@openclaw/fs-safe/dist/secure-file.d.ts +0 -1
  393. package/node_modules/@openclaw/fs-safe/dist/secure-file.js +14 -13
  394. package/node_modules/@openclaw/fs-safe/dist/secure-temp-dir.d.ts +0 -1
  395. package/node_modules/@openclaw/fs-safe/dist/secure-temp-dir.js +2 -7
  396. package/node_modules/@openclaw/fs-safe/dist/secure-temp-repair.d.ts +0 -1
  397. package/node_modules/@openclaw/fs-safe/dist/secure-temp-repair.js +5 -1
  398. package/node_modules/@openclaw/fs-safe/dist/sibling-staged-file.d.ts +0 -1
  399. package/node_modules/@openclaw/fs-safe/dist/sibling-staged-file.js +32 -39
  400. package/node_modules/@openclaw/fs-safe/dist/sibling-temp.d.ts +0 -1
  401. package/node_modules/@openclaw/fs-safe/dist/sibling-temp.js +23 -12
  402. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-acquire.d.ts +2 -29
  403. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-acquire.js +283 -220
  404. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-admission-context.d.ts +18 -0
  405. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-admission-context.js +60 -0
  406. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-admission-parser.d.ts +41 -0
  407. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-admission-parser.js +113 -0
  408. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-admission.d.ts +31 -0
  409. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-admission.js +1 -0
  410. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-handle.d.ts +5 -9
  411. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-handle.js +6 -0
  412. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-policy.d.ts +6 -8
  413. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-policy.js +23 -0
  414. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-reclaim.d.ts +12 -8
  415. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-reclaim.js +101 -44
  416. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-registration.d.ts +13 -0
  417. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-registration.js +47 -0
  418. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-root.d.ts +0 -1
  419. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-root.js +2 -1
  420. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-stale-admission.d.ts +34 -0
  421. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-stale-admission.js +228 -0
  422. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-target.d.ts +7 -0
  423. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-target.js +55 -0
  424. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-types.d.ts +22 -17
  425. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock.d.ts +0 -1
  426. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock.js +52 -35
  427. package/node_modules/@openclaw/fs-safe/dist/staged-directory.d.ts +7 -5
  428. package/node_modules/@openclaw/fs-safe/dist/staged-directory.js +43 -7
  429. package/node_modules/@openclaw/fs-safe/dist/staged-file-settlement.d.ts +16 -0
  430. package/node_modules/@openclaw/fs-safe/dist/staged-file-settlement.js +57 -0
  431. package/node_modules/@openclaw/fs-safe/dist/staged-file-types.d.ts +0 -1
  432. package/node_modules/@openclaw/fs-safe/dist/staged-symlink-types.d.ts +39 -0
  433. package/node_modules/@openclaw/fs-safe/dist/staged-symlink-types.js +1 -0
  434. package/node_modules/@openclaw/fs-safe/dist/stat-observation.d.ts +0 -1
  435. package/node_modules/@openclaw/fs-safe/dist/stat-observation.js +3 -10
  436. package/node_modules/@openclaw/fs-safe/dist/store.d.ts +0 -1
  437. package/node_modules/@openclaw/fs-safe/dist/strict-file-identity.d.ts +3 -2
  438. package/node_modules/@openclaw/fs-safe/dist/strict-file-identity.js +14 -14
  439. package/node_modules/@openclaw/fs-safe/dist/string-coerce.d.ts +0 -1
  440. package/node_modules/@openclaw/fs-safe/dist/suppressed-error.d.ts +0 -1
  441. package/node_modules/@openclaw/fs-safe/dist/symlink-parents.d.ts +0 -1
  442. package/node_modules/@openclaw/fs-safe/dist/symlink-parents.js +58 -32
  443. package/node_modules/@openclaw/fs-safe/dist/temp-cleanup.d.ts +0 -1
  444. package/node_modules/@openclaw/fs-safe/dist/temp-target.d.ts +0 -1
  445. package/node_modules/@openclaw/fs-safe/dist/temp-target.js +14 -55
  446. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-admission.d.ts +0 -8
  447. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-admission.js +50 -37
  448. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-child-admission.d.ts +16 -6
  449. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-child-admission.js +70 -15
  450. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-descriptor.d.ts +1 -7
  451. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-descriptor.js +11 -33
  452. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-owner.d.ts +1 -1
  453. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-owner.js +53 -35
  454. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-ownership.d.ts +8 -0
  455. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-ownership.js +52 -0
  456. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-types.d.ts +0 -1
  457. package/node_modules/@openclaw/fs-safe/dist/temp.d.ts +0 -1
  458. package/node_modules/@openclaw/fs-safe/dist/test-hooks.d.ts +5 -2
  459. package/node_modules/@openclaw/fs-safe/dist/text-atomic.d.ts +2 -2
  460. package/node_modules/@openclaw/fs-safe/dist/text-atomic.js +3 -1
  461. package/node_modules/@openclaw/fs-safe/dist/timing.d.ts +0 -1
  462. package/node_modules/@openclaw/fs-safe/dist/trash.d.ts +0 -1
  463. package/node_modules/@openclaw/fs-safe/dist/trash.js +27 -1
  464. package/node_modules/@openclaw/fs-safe/dist/types.d.ts +0 -1
  465. package/node_modules/@openclaw/fs-safe/dist/unicode-path.d.ts +0 -1
  466. package/node_modules/@openclaw/fs-safe/dist/unicode-path.js +3 -0
  467. package/node_modules/@openclaw/fs-safe/dist/walk.d.ts +7 -7
  468. package/node_modules/@openclaw/fs-safe/dist/walk.js +23 -8
  469. package/node_modules/@openclaw/fs-safe/dist/watch-alias.d.ts +6 -0
  470. package/node_modules/@openclaw/fs-safe/dist/watch-alias.js +88 -0
  471. package/node_modules/@openclaw/fs-safe/dist/watch-hints.d.ts +9 -0
  472. package/node_modules/@openclaw/fs-safe/dist/watch-hints.js +93 -0
  473. package/node_modules/@openclaw/fs-safe/dist/watch-native.d.ts +36 -0
  474. package/node_modules/@openclaw/fs-safe/dist/watch-native.js +73 -0
  475. package/node_modules/@openclaw/fs-safe/dist/watch-scan.d.ts +28 -0
  476. package/node_modules/@openclaw/fs-safe/dist/watch-scan.js +300 -0
  477. package/node_modules/@openclaw/fs-safe/dist/watch-stream.d.ts +8 -0
  478. package/node_modules/@openclaw/fs-safe/dist/watch-stream.js +32 -0
  479. package/node_modules/@openclaw/fs-safe/dist/watch-types.d.ts +60 -0
  480. package/node_modules/@openclaw/fs-safe/dist/watch-types.js +1 -0
  481. package/node_modules/@openclaw/fs-safe/dist/watch.d.ts +5 -0
  482. package/node_modules/@openclaw/fs-safe/dist/watch.js +530 -0
  483. package/node_modules/@openclaw/fs-safe/dist/windows-command.d.ts +0 -1
  484. package/node_modules/@openclaw/fs-safe/dist/windows-owner.d.ts +3 -8
  485. package/node_modules/@openclaw/fs-safe/dist/windows-owner.js +8 -5
  486. package/node_modules/@openclaw/fs-safe/dist/windows-path-alias.d.ts +1 -1
  487. package/node_modules/@openclaw/fs-safe/dist/windows-path-alias.js +12 -43
  488. package/node_modules/@openclaw/fs-safe/dist/windows-path-syntax.d.ts +5 -0
  489. package/node_modules/@openclaw/fs-safe/dist/windows-path-syntax.js +21 -0
  490. package/node_modules/@openclaw/fs-safe/dist/windows-security-bridge.cs +336 -0
  491. package/node_modules/@openclaw/fs-safe/dist/windows-security-bridge.ps1 +90 -0
  492. package/node_modules/@openclaw/fs-safe/dist/windows-security-command.d.ts +33 -0
  493. package/node_modules/@openclaw/fs-safe/dist/windows-security-command.js +414 -0
  494. package/node_modules/@openclaw/fs-safe/dist/windows-security-facts.d.ts +9 -0
  495. package/node_modules/@openclaw/fs-safe/dist/windows-security-facts.js +112 -0
  496. package/node_modules/@openclaw/fs-safe/dist/write-file-handle.d.ts +7 -1
  497. package/node_modules/@openclaw/fs-safe/dist/write-file-handle.js +23 -0
  498. package/node_modules/@openclaw/fs-safe/dist/write-open-flags.d.ts +0 -1
  499. package/node_modules/@openclaw/fs-safe/dist/write-open-flags.js +1 -8
  500. package/node_modules/@openclaw/fs-safe/dist/write-queue.d.ts +0 -1
  501. package/node_modules/@openclaw/fs-safe/dist/write-queue.js +1 -4
  502. package/node_modules/@openclaw/fs-safe/docs/advanced.md +79 -6
  503. package/node_modules/@openclaw/fs-safe/docs/archive.md +154 -48
  504. package/node_modules/@openclaw/fs-safe/docs/atomic.md +218 -13
  505. package/node_modules/@openclaw/fs-safe/docs/config.md +6 -2
  506. package/node_modules/@openclaw/fs-safe/docs/contributing.md +150 -8
  507. package/node_modules/@openclaw/fs-safe/docs/copy.md +41 -0
  508. package/node_modules/@openclaw/fs-safe/docs/creation.md +132 -0
  509. package/node_modules/@openclaw/fs-safe/docs/durability.md +66 -0
  510. package/node_modules/@openclaw/fs-safe/docs/file-contents.md +68 -0
  511. package/node_modules/@openclaw/fs-safe/docs/file-store.md +24 -0
  512. package/node_modules/@openclaw/fs-safe/docs/guest.md +8 -2
  513. package/node_modules/@openclaw/fs-safe/docs/index.md +1 -0
  514. package/node_modules/@openclaw/fs-safe/docs/install.md +61 -7
  515. package/node_modules/@openclaw/fs-safe/docs/json-store.md +5 -0
  516. package/node_modules/@openclaw/fs-safe/docs/json.md +5 -4
  517. package/node_modules/@openclaw/fs-safe/docs/local-roots.md +2 -0
  518. package/node_modules/@openclaw/fs-safe/docs/migrating-to-0.5.md +15 -6
  519. package/node_modules/@openclaw/fs-safe/docs/migrating-to-0.6.md +9 -4
  520. package/node_modules/@openclaw/fs-safe/docs/mutation-policy-proof.md +11 -7
  521. package/node_modules/@openclaw/fs-safe/docs/native-helper.md +51 -15
  522. package/node_modules/@openclaw/fs-safe/docs/native.md +117 -15
  523. package/node_modules/@openclaw/fs-safe/docs/output.md +6 -0
  524. package/node_modules/@openclaw/fs-safe/docs/path-prefix.md +10 -0
  525. package/node_modules/@openclaw/fs-safe/docs/path-suffix-aliases.md +51 -6
  526. package/node_modules/@openclaw/fs-safe/docs/path.md +4 -4
  527. package/node_modules/@openclaw/fs-safe/docs/permissions.md +122 -14
  528. package/node_modules/@openclaw/fs-safe/docs/public-api.md +38 -5
  529. package/node_modules/@openclaw/fs-safe/docs/quickstart.md +1 -1
  530. package/node_modules/@openclaw/fs-safe/docs/reading.md +2 -2
  531. package/node_modules/@openclaw/fs-safe/docs/regular-file.md +3 -0
  532. package/node_modules/@openclaw/fs-safe/docs/retained-file.md +115 -0
  533. package/node_modules/@openclaw/fs-safe/docs/root.md +110 -12
  534. package/node_modules/@openclaw/fs-safe/docs/secret-file.md +38 -2
  535. package/node_modules/@openclaw/fs-safe/docs/secure-file.md +9 -4
  536. package/node_modules/@openclaw/fs-safe/docs/security-model.md +4 -1
  537. package/node_modules/@openclaw/fs-safe/docs/sidecar-lock.md +131 -9
  538. package/node_modules/@openclaw/fs-safe/docs/staged-file.md +16 -6
  539. package/node_modules/@openclaw/fs-safe/docs/staged-symlink.md +124 -0
  540. package/node_modules/@openclaw/fs-safe/docs/store.md +12 -2
  541. package/node_modules/@openclaw/fs-safe/docs/temp.md +56 -9
  542. package/node_modules/@openclaw/fs-safe/docs/testing.md +210 -0
  543. package/node_modules/@openclaw/fs-safe/docs/types.md +24 -2
  544. package/node_modules/@openclaw/fs-safe/docs/walk.md +108 -2
  545. package/node_modules/@openclaw/fs-safe/docs/watch.md +251 -0
  546. package/node_modules/@openclaw/fs-safe/docs/writing.md +126 -11
  547. package/node_modules/@openclaw/fs-safe/package.json +23 -17
  548. package/node_modules/@openclaw/fs-safe-darwin-arm64/fs-safe-native.node +0 -0
  549. package/node_modules/@openclaw/fs-safe-darwin-arm64/package.json +1 -1
  550. package/node_modules/@openclaw/fs-safe-darwin-x64/fs-safe-native.node +0 -0
  551. package/node_modules/@openclaw/fs-safe-darwin-x64/package.json +1 -1
  552. package/node_modules/@openclaw/fs-safe-linux-arm64-gnu/fs-safe-native.node +0 -0
  553. package/node_modules/@openclaw/fs-safe-linux-arm64-gnu/package.json +1 -1
  554. package/node_modules/@openclaw/fs-safe-linux-arm64-musl/fs-safe-native.node +0 -0
  555. package/node_modules/@openclaw/fs-safe-linux-arm64-musl/package.json +1 -1
  556. package/node_modules/@openclaw/fs-safe-linux-x64-gnu/fs-safe-native.node +0 -0
  557. package/node_modules/@openclaw/fs-safe-linux-x64-gnu/package.json +1 -1
  558. package/node_modules/@openclaw/fs-safe-linux-x64-musl/fs-safe-native.node +0 -0
  559. package/node_modules/@openclaw/fs-safe-linux-x64-musl/package.json +1 -1
  560. package/node_modules/@openclaw/fs-safe-win32-x64-msvc/fs-safe-native.node +0 -0
  561. package/node_modules/@openclaw/fs-safe-win32-x64-msvc/package.json +1 -1
  562. package/node_modules/p-limit/index.d.ts +2 -0
  563. package/node_modules/p-limit/index.js +17 -1
  564. package/node_modules/p-limit/package.json +1 -1
  565. package/node_modules/p-limit/readme.md +2 -0
  566. package/node_modules/zod/README.md +2 -2
  567. package/node_modules/zod/compile.cjs +19 -0
  568. package/node_modules/zod/index.cjs +19 -0
  569. package/node_modules/zod/locales/index.cjs +19 -0
  570. package/node_modules/zod/mini/index.cjs +19 -0
  571. package/node_modules/zod/package.json +8 -7
  572. package/node_modules/zod/src/v3/helpers/errorUtil.ts +1 -1
  573. package/node_modules/zod/src/v4/classic/external.ts +2 -0
  574. package/node_modules/zod/src/v4/classic/from-json-schema.ts +248 -25
  575. package/node_modules/zod/src/v4/classic/schemas.ts +243 -168
  576. package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +60 -9
  577. package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +6 -0
  578. package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +2 -2
  579. package/node_modules/zod/src/v4/classic/tests/cyclic-data.test.ts +265 -0
  580. package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +112 -6
  581. package/node_modules/zod/src/v4/classic/tests/enum.test.ts +9 -0
  582. package/node_modules/zod/src/v4/classic/tests/error.test.ts +130 -1
  583. package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +157 -0
  584. package/node_modules/zod/src/v4/classic/tests/iban.test.ts +81 -0
  585. package/node_modules/zod/src/v4/classic/tests/instance-footprint.test.ts +40 -2
  586. package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +27 -7
  587. package/node_modules/zod/src/v4/classic/tests/issue-schema.test.ts +88 -56
  588. package/node_modules/zod/src/v4/classic/tests/number.test.ts +39 -0
  589. package/node_modules/zod/src/v4/classic/tests/object.test.ts +56 -0
  590. package/node_modules/zod/src/v4/classic/tests/optin-ladder.test.ts +3 -2
  591. package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +70 -0
  592. package/node_modules/zod/src/v4/classic/tests/properties.test.ts +141 -0
  593. package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +46 -1
  594. package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +19 -0
  595. package/node_modules/zod/src/v4/classic/tests/string.test.ts +95 -1
  596. package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +33 -1
  597. package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +234 -38
  598. package/node_modules/zod/src/v4/classic/tests/validate.test.ts +569 -0
  599. package/node_modules/zod/src/v4/core/api.ts +44 -28
  600. package/node_modules/zod/src/v4/core/checks.ts +62 -102
  601. package/node_modules/zod/src/v4/core/compile.ts +218 -93
  602. package/node_modules/zod/src/v4/core/core.ts +1 -3
  603. package/node_modules/zod/src/v4/core/doc.ts +6 -2
  604. package/node_modules/zod/src/v4/core/errors.ts +3 -6
  605. package/node_modules/zod/src/v4/core/json-schema-generator.ts +2 -2
  606. package/node_modules/zod/src/v4/core/json-schema-processors.ts +185 -81
  607. package/node_modules/zod/src/v4/core/memoizer.ts +75 -28
  608. package/node_modules/zod/src/v4/core/parse.ts +37 -16
  609. package/node_modules/zod/src/v4/core/regexes.ts +14 -4
  610. package/node_modules/zod/src/v4/core/schemas.ts +296 -132
  611. package/node_modules/zod/src/v4/core/tests/cached.test.ts +54 -0
  612. package/node_modules/zod/src/v4/core/tests/compile-differential.test.ts +35 -0
  613. package/node_modules/zod/src/v4/core/tests/compile-generative.test.ts +445 -0
  614. package/node_modules/zod/src/v4/core/tests/compile.test.ts +399 -2
  615. package/node_modules/zod/src/v4/core/tests/email-regex.test.ts +140 -0
  616. package/node_modules/zod/src/v4/core/tests/locales/tg.test.ts +85 -0
  617. package/node_modules/zod/src/v4/core/tests/polyfill-collision.test.ts +46 -0
  618. package/node_modules/zod/src/v4/core/tests/url-no-canparse.test.ts +118 -16
  619. package/node_modules/zod/src/v4/core/to-json-schema.ts +9 -7
  620. package/node_modules/zod/src/v4/core/util.ts +218 -147
  621. package/node_modules/zod/src/v4/core/versions.ts +2 -2
  622. package/node_modules/zod/src/v4/locales/ar.ts +2 -0
  623. package/node_modules/zod/src/v4/locales/az.ts +2 -0
  624. package/node_modules/zod/src/v4/locales/be.ts +2 -0
  625. package/node_modules/zod/src/v4/locales/bg.ts +2 -0
  626. package/node_modules/zod/src/v4/locales/bn.ts +2 -0
  627. package/node_modules/zod/src/v4/locales/ca.ts +2 -0
  628. package/node_modules/zod/src/v4/locales/ckb.ts +2 -0
  629. package/node_modules/zod/src/v4/locales/cs.ts +2 -0
  630. package/node_modules/zod/src/v4/locales/da.ts +2 -0
  631. package/node_modules/zod/src/v4/locales/de.ts +2 -0
  632. package/node_modules/zod/src/v4/locales/el.ts +2 -0
  633. package/node_modules/zod/src/v4/locales/en.ts +2 -0
  634. package/node_modules/zod/src/v4/locales/eo.ts +2 -0
  635. package/node_modules/zod/src/v4/locales/es.ts +2 -0
  636. package/node_modules/zod/src/v4/locales/fa.ts +2 -0
  637. package/node_modules/zod/src/v4/locales/fi.ts +2 -0
  638. package/node_modules/zod/src/v4/locales/fr-CA.ts +2 -0
  639. package/node_modules/zod/src/v4/locales/fr.ts +2 -0
  640. package/node_modules/zod/src/v4/locales/gu.ts +2 -0
  641. package/node_modules/zod/src/v4/locales/he.ts +2 -0
  642. package/node_modules/zod/src/v4/locales/hi.ts +2 -0
  643. package/node_modules/zod/src/v4/locales/hr.ts +2 -0
  644. package/node_modules/zod/src/v4/locales/hu.ts +2 -0
  645. package/node_modules/zod/src/v4/locales/hy.ts +2 -0
  646. package/node_modules/zod/src/v4/locales/id.ts +2 -0
  647. package/node_modules/zod/src/v4/locales/index.ts +1 -0
  648. package/node_modules/zod/src/v4/locales/is.ts +2 -0
  649. package/node_modules/zod/src/v4/locales/it.ts +2 -0
  650. package/node_modules/zod/src/v4/locales/ja.ts +2 -0
  651. package/node_modules/zod/src/v4/locales/ka.ts +2 -0
  652. package/node_modules/zod/src/v4/locales/km.ts +2 -0
  653. package/node_modules/zod/src/v4/locales/kn.ts +2 -0
  654. package/node_modules/zod/src/v4/locales/ko.ts +2 -0
  655. package/node_modules/zod/src/v4/locales/lt.ts +2 -0
  656. package/node_modules/zod/src/v4/locales/mk.ts +2 -0
  657. package/node_modules/zod/src/v4/locales/ms.ts +2 -0
  658. package/node_modules/zod/src/v4/locales/ne.ts +2 -0
  659. package/node_modules/zod/src/v4/locales/nl.ts +2 -0
  660. package/node_modules/zod/src/v4/locales/nn.ts +2 -0
  661. package/node_modules/zod/src/v4/locales/no.ts +2 -0
  662. package/node_modules/zod/src/v4/locales/ota.ts +2 -0
  663. package/node_modules/zod/src/v4/locales/pl.ts +2 -0
  664. package/node_modules/zod/src/v4/locales/ps.ts +2 -0
  665. package/node_modules/zod/src/v4/locales/pt-BR.ts +2 -0
  666. package/node_modules/zod/src/v4/locales/pt.ts +2 -0
  667. package/node_modules/zod/src/v4/locales/ro.ts +2 -0
  668. package/node_modules/zod/src/v4/locales/ru.ts +2 -0
  669. package/node_modules/zod/src/v4/locales/sk.ts +2 -0
  670. package/node_modules/zod/src/v4/locales/sl.ts +2 -0
  671. package/node_modules/zod/src/v4/locales/sv.ts +2 -0
  672. package/node_modules/zod/src/v4/locales/ta.ts +2 -0
  673. package/node_modules/zod/src/v4/locales/tg.ts +135 -0
  674. package/node_modules/zod/src/v4/locales/th.ts +2 -0
  675. package/node_modules/zod/src/v4/locales/tk.ts +2 -0
  676. package/node_modules/zod/src/v4/locales/tr.ts +2 -0
  677. package/node_modules/zod/src/v4/locales/uk.ts +2 -0
  678. package/node_modules/zod/src/v4/locales/ur.ts +2 -0
  679. package/node_modules/zod/src/v4/locales/uz.ts +2 -0
  680. package/node_modules/zod/src/v4/locales/vi.ts +2 -0
  681. package/node_modules/zod/src/v4/locales/yo.ts +2 -0
  682. package/node_modules/zod/src/v4/locales/zh-CN.ts +2 -0
  683. package/node_modules/zod/src/v4/locales/zh-TW.ts +2 -0
  684. package/node_modules/zod/src/v4/mini/external.ts +2 -0
  685. package/node_modules/zod/src/v4/mini/schemas.ts +32 -7
  686. package/node_modules/zod/src/v4/mini/tests/checks.test.ts +1 -1
  687. package/node_modules/zod/src/v4/mini/tests/computed.test.ts +11 -17
  688. package/node_modules/zod/src/v4/mini/tests/index.test.ts +86 -0
  689. package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +16 -0
  690. package/node_modules/zod/src/v4/mini/tests/string.test.ts +23 -0
  691. package/node_modules/zod/v3/ZodError.cjs +19 -0
  692. package/node_modules/zod/v3/errors.cjs +19 -0
  693. package/node_modules/zod/v3/external.cjs +19 -0
  694. package/node_modules/zod/v3/helpers/enumUtil.cjs +19 -0
  695. package/node_modules/zod/v3/helpers/errorUtil.cjs +20 -1
  696. package/node_modules/zod/v3/helpers/errorUtil.js +1 -1
  697. package/node_modules/zod/v3/helpers/parseUtil.cjs +19 -0
  698. package/node_modules/zod/v3/helpers/partialUtil.cjs +19 -0
  699. package/node_modules/zod/v3/helpers/typeAliases.cjs +19 -0
  700. package/node_modules/zod/v3/helpers/util.cjs +19 -0
  701. package/node_modules/zod/v3/index.cjs +19 -0
  702. package/node_modules/zod/v3/standard-schema.cjs +19 -0
  703. package/node_modules/zod/v3/types.cjs +19 -0
  704. package/node_modules/zod/v4/classic/checks.cjs +19 -0
  705. package/node_modules/zod/v4/classic/coerce.cjs +19 -0
  706. package/node_modules/zod/v4/classic/compat.cjs +19 -0
  707. package/node_modules/zod/v4/classic/deep-partial.cjs +19 -0
  708. package/node_modules/zod/v4/classic/errors.cjs +19 -0
  709. package/node_modules/zod/v4/classic/external.cjs +22 -1
  710. package/node_modules/zod/v4/classic/external.d.cts +1 -1
  711. package/node_modules/zod/v4/classic/external.d.ts +1 -1
  712. package/node_modules/zod/v4/classic/external.js +1 -1
  713. package/node_modules/zod/v4/classic/from-json-schema.cjs +264 -24
  714. package/node_modules/zod/v4/classic/from-json-schema.js +245 -24
  715. package/node_modules/zod/v4/classic/in-out.cjs +19 -0
  716. package/node_modules/zod/v4/classic/index.cjs +19 -0
  717. package/node_modules/zod/v4/classic/iso.cjs +19 -0
  718. package/node_modules/zod/v4/classic/parse.cjs +19 -0
  719. package/node_modules/zod/v4/classic/schemas.cjs +100 -35
  720. package/node_modules/zod/v4/classic/schemas.d.cts +15 -1
  721. package/node_modules/zod/v4/classic/schemas.d.ts +15 -1
  722. package/node_modules/zod/v4/classic/schemas.js +77 -33
  723. package/node_modules/zod/v4/core/api.cjs +45 -22
  724. package/node_modules/zod/v4/core/api.d.cts +12 -6
  725. package/node_modules/zod/v4/core/api.d.ts +12 -6
  726. package/node_modules/zod/v4/core/api.js +25 -22
  727. package/node_modules/zod/v4/core/checks.cjs +51 -97
  728. package/node_modules/zod/v4/core/checks.d.cts +17 -1
  729. package/node_modules/zod/v4/core/checks.d.ts +17 -1
  730. package/node_modules/zod/v4/core/checks.js +31 -96
  731. package/node_modules/zod/v4/core/compile.cjs +173 -78
  732. package/node_modules/zod/v4/core/compile.d.cts +18 -4
  733. package/node_modules/zod/v4/core/compile.d.ts +18 -4
  734. package/node_modules/zod/v4/core/compile.js +154 -79
  735. package/node_modules/zod/v4/core/core.cjs +20 -1
  736. package/node_modules/zod/v4/core/core.js +1 -1
  737. package/node_modules/zod/v4/core/doc.cjs +26 -2
  738. package/node_modules/zod/v4/core/doc.js +7 -2
  739. package/node_modules/zod/v4/core/errors.cjs +21 -5
  740. package/node_modules/zod/v4/core/errors.js +2 -5
  741. package/node_modules/zod/v4/core/index.cjs +19 -0
  742. package/node_modules/zod/v4/core/json-schema-generator.cjs +20 -1
  743. package/node_modules/zod/v4/core/json-schema-generator.js +2 -2
  744. package/node_modules/zod/v4/core/json-schema-processors.cjs +188 -72
  745. package/node_modules/zod/v4/core/json-schema-processors.d.cts +16 -0
  746. package/node_modules/zod/v4/core/json-schema-processors.d.ts +16 -0
  747. package/node_modules/zod/v4/core/json-schema-processors.js +170 -74
  748. package/node_modules/zod/v4/core/json-schema.cjs +19 -0
  749. package/node_modules/zod/v4/core/memoizer.cjs +111 -23
  750. package/node_modules/zod/v4/core/memoizer.js +69 -23
  751. package/node_modules/zod/v4/core/parse.cjs +56 -16
  752. package/node_modules/zod/v4/core/parse.js +37 -16
  753. package/node_modules/zod/v4/core/regexes.cjs +31 -6
  754. package/node_modules/zod/v4/core/regexes.d.cts +3 -0
  755. package/node_modules/zod/v4/core/regexes.d.ts +3 -0
  756. package/node_modules/zod/v4/core/regexes.js +10 -4
  757. package/node_modules/zod/v4/core/registries.cjs +19 -0
  758. package/node_modules/zod/v4/core/schemas.cjs +302 -114
  759. package/node_modules/zod/v4/core/schemas.d.cts +28 -8
  760. package/node_modules/zod/v4/core/schemas.d.ts +28 -8
  761. package/node_modules/zod/v4/core/schemas.js +279 -113
  762. package/node_modules/zod/v4/core/standard-schema.cjs +19 -0
  763. package/node_modules/zod/v4/core/to-json-schema.cjs +28 -7
  764. package/node_modules/zod/v4/core/to-json-schema.d.cts +4 -3
  765. package/node_modules/zod/v4/core/to-json-schema.d.ts +4 -3
  766. package/node_modules/zod/v4/core/to-json-schema.js +7 -6
  767. package/node_modules/zod/v4/core/util.cjs +177 -143
  768. package/node_modules/zod/v4/core/util.d.cts +25 -4
  769. package/node_modules/zod/v4/core/util.d.ts +25 -4
  770. package/node_modules/zod/v4/core/util.js +156 -143
  771. package/node_modules/zod/v4/core/versions.cjs +21 -2
  772. package/node_modules/zod/v4/core/versions.d.cts +1 -1
  773. package/node_modules/zod/v4/core/versions.d.ts +1 -1
  774. package/node_modules/zod/v4/core/versions.js +2 -2
  775. package/node_modules/zod/v4/core/visit.cjs +19 -0
  776. package/node_modules/zod/v4/index.cjs +19 -0
  777. package/node_modules/zod/v4/locales/ar.cjs +2 -0
  778. package/node_modules/zod/v4/locales/ar.js +2 -0
  779. package/node_modules/zod/v4/locales/az.cjs +2 -0
  780. package/node_modules/zod/v4/locales/az.js +2 -0
  781. package/node_modules/zod/v4/locales/be.cjs +2 -0
  782. package/node_modules/zod/v4/locales/be.js +2 -0
  783. package/node_modules/zod/v4/locales/bg.cjs +2 -0
  784. package/node_modules/zod/v4/locales/bg.js +2 -0
  785. package/node_modules/zod/v4/locales/bn.cjs +2 -0
  786. package/node_modules/zod/v4/locales/bn.js +2 -0
  787. package/node_modules/zod/v4/locales/ca.cjs +2 -0
  788. package/node_modules/zod/v4/locales/ca.js +2 -0
  789. package/node_modules/zod/v4/locales/ckb.cjs +2 -0
  790. package/node_modules/zod/v4/locales/ckb.js +2 -0
  791. package/node_modules/zod/v4/locales/cs.cjs +2 -0
  792. package/node_modules/zod/v4/locales/cs.js +2 -0
  793. package/node_modules/zod/v4/locales/da.cjs +2 -0
  794. package/node_modules/zod/v4/locales/da.js +2 -0
  795. package/node_modules/zod/v4/locales/de.cjs +2 -0
  796. package/node_modules/zod/v4/locales/de.js +2 -0
  797. package/node_modules/zod/v4/locales/el.cjs +2 -0
  798. package/node_modules/zod/v4/locales/el.js +2 -0
  799. package/node_modules/zod/v4/locales/en.cjs +2 -0
  800. package/node_modules/zod/v4/locales/en.js +2 -0
  801. package/node_modules/zod/v4/locales/eo.cjs +2 -0
  802. package/node_modules/zod/v4/locales/eo.js +2 -0
  803. package/node_modules/zod/v4/locales/es.cjs +2 -0
  804. package/node_modules/zod/v4/locales/es.js +2 -0
  805. package/node_modules/zod/v4/locales/fa.cjs +2 -0
  806. package/node_modules/zod/v4/locales/fa.js +2 -0
  807. package/node_modules/zod/v4/locales/fi.cjs +2 -0
  808. package/node_modules/zod/v4/locales/fi.js +2 -0
  809. package/node_modules/zod/v4/locales/fr-CA.cjs +2 -0
  810. package/node_modules/zod/v4/locales/fr-CA.js +2 -0
  811. package/node_modules/zod/v4/locales/fr.cjs +2 -0
  812. package/node_modules/zod/v4/locales/fr.js +2 -0
  813. package/node_modules/zod/v4/locales/gu.cjs +2 -0
  814. package/node_modules/zod/v4/locales/gu.js +2 -0
  815. package/node_modules/zod/v4/locales/he.cjs +2 -0
  816. package/node_modules/zod/v4/locales/he.js +2 -0
  817. package/node_modules/zod/v4/locales/hi.cjs +2 -0
  818. package/node_modules/zod/v4/locales/hi.js +2 -0
  819. package/node_modules/zod/v4/locales/hr.cjs +2 -0
  820. package/node_modules/zod/v4/locales/hr.js +2 -0
  821. package/node_modules/zod/v4/locales/hu.cjs +2 -0
  822. package/node_modules/zod/v4/locales/hu.js +2 -0
  823. package/node_modules/zod/v4/locales/hy.cjs +2 -0
  824. package/node_modules/zod/v4/locales/hy.js +2 -0
  825. package/node_modules/zod/v4/locales/id.cjs +2 -0
  826. package/node_modules/zod/v4/locales/id.js +2 -0
  827. package/node_modules/zod/v4/locales/index.cjs +22 -1
  828. package/node_modules/zod/v4/locales/index.d.cts +1 -0
  829. package/node_modules/zod/v4/locales/index.d.ts +1 -0
  830. package/node_modules/zod/v4/locales/index.js +1 -0
  831. package/node_modules/zod/v4/locales/is.cjs +2 -0
  832. package/node_modules/zod/v4/locales/is.js +2 -0
  833. package/node_modules/zod/v4/locales/it.cjs +2 -0
  834. package/node_modules/zod/v4/locales/it.js +2 -0
  835. package/node_modules/zod/v4/locales/ja.cjs +2 -0
  836. package/node_modules/zod/v4/locales/ja.js +2 -0
  837. package/node_modules/zod/v4/locales/ka.cjs +2 -0
  838. package/node_modules/zod/v4/locales/ka.js +2 -0
  839. package/node_modules/zod/v4/locales/km.cjs +2 -0
  840. package/node_modules/zod/v4/locales/km.js +2 -0
  841. package/node_modules/zod/v4/locales/kn.cjs +2 -0
  842. package/node_modules/zod/v4/locales/kn.js +2 -0
  843. package/node_modules/zod/v4/locales/ko.cjs +2 -0
  844. package/node_modules/zod/v4/locales/ko.js +2 -0
  845. package/node_modules/zod/v4/locales/lt.cjs +2 -0
  846. package/node_modules/zod/v4/locales/lt.js +2 -0
  847. package/node_modules/zod/v4/locales/mk.cjs +2 -0
  848. package/node_modules/zod/v4/locales/mk.js +2 -0
  849. package/node_modules/zod/v4/locales/ms.cjs +2 -0
  850. package/node_modules/zod/v4/locales/ms.js +2 -0
  851. package/node_modules/zod/v4/locales/ne.cjs +2 -0
  852. package/node_modules/zod/v4/locales/ne.js +2 -0
  853. package/node_modules/zod/v4/locales/nl.cjs +2 -0
  854. package/node_modules/zod/v4/locales/nl.js +2 -0
  855. package/node_modules/zod/v4/locales/nn.cjs +2 -0
  856. package/node_modules/zod/v4/locales/nn.js +2 -0
  857. package/node_modules/zod/v4/locales/no.cjs +2 -0
  858. package/node_modules/zod/v4/locales/no.js +2 -0
  859. package/node_modules/zod/v4/locales/ota.cjs +2 -0
  860. package/node_modules/zod/v4/locales/ota.js +2 -0
  861. package/node_modules/zod/v4/locales/pl.cjs +2 -0
  862. package/node_modules/zod/v4/locales/pl.js +2 -0
  863. package/node_modules/zod/v4/locales/ps.cjs +2 -0
  864. package/node_modules/zod/v4/locales/ps.js +2 -0
  865. package/node_modules/zod/v4/locales/pt-BR.cjs +2 -0
  866. package/node_modules/zod/v4/locales/pt-BR.js +2 -0
  867. package/node_modules/zod/v4/locales/pt.cjs +2 -0
  868. package/node_modules/zod/v4/locales/pt.js +2 -0
  869. package/node_modules/zod/v4/locales/ro.cjs +2 -0
  870. package/node_modules/zod/v4/locales/ro.js +2 -0
  871. package/node_modules/zod/v4/locales/ru.cjs +2 -0
  872. package/node_modules/zod/v4/locales/ru.js +2 -0
  873. package/node_modules/zod/v4/locales/sk.cjs +2 -0
  874. package/node_modules/zod/v4/locales/sk.js +2 -0
  875. package/node_modules/zod/v4/locales/sl.cjs +2 -0
  876. package/node_modules/zod/v4/locales/sl.js +2 -0
  877. package/node_modules/zod/v4/locales/sv.cjs +2 -0
  878. package/node_modules/zod/v4/locales/sv.js +2 -0
  879. package/node_modules/zod/v4/locales/ta.cjs +2 -0
  880. package/node_modules/zod/v4/locales/ta.js +2 -0
  881. package/node_modules/zod/v4/locales/tg.cjs +144 -0
  882. package/node_modules/zod/v4/locales/tg.d.cts +5 -0
  883. package/node_modules/zod/v4/locales/tg.d.ts +4 -0
  884. package/node_modules/zod/v4/locales/tg.js +117 -0
  885. package/node_modules/zod/v4/locales/th.cjs +2 -0
  886. package/node_modules/zod/v4/locales/th.js +2 -0
  887. package/node_modules/zod/v4/locales/tk.cjs +2 -0
  888. package/node_modules/zod/v4/locales/tk.js +2 -0
  889. package/node_modules/zod/v4/locales/tr.cjs +2 -0
  890. package/node_modules/zod/v4/locales/tr.js +2 -0
  891. package/node_modules/zod/v4/locales/uk.cjs +2 -0
  892. package/node_modules/zod/v4/locales/uk.js +2 -0
  893. package/node_modules/zod/v4/locales/ur.cjs +2 -0
  894. package/node_modules/zod/v4/locales/ur.js +2 -0
  895. package/node_modules/zod/v4/locales/uz.cjs +2 -0
  896. package/node_modules/zod/v4/locales/uz.js +2 -0
  897. package/node_modules/zod/v4/locales/vi.cjs +2 -0
  898. package/node_modules/zod/v4/locales/vi.js +2 -0
  899. package/node_modules/zod/v4/locales/yo.cjs +2 -0
  900. package/node_modules/zod/v4/locales/yo.js +2 -0
  901. package/node_modules/zod/v4/locales/zh-CN.cjs +2 -0
  902. package/node_modules/zod/v4/locales/zh-CN.js +2 -0
  903. package/node_modules/zod/v4/locales/zh-TW.cjs +2 -0
  904. package/node_modules/zod/v4/locales/zh-TW.js +2 -0
  905. package/node_modules/zod/v4/mini/checks.cjs +19 -0
  906. package/node_modules/zod/v4/mini/coerce.cjs +19 -0
  907. package/node_modules/zod/v4/mini/deep-partial.cjs +19 -0
  908. package/node_modules/zod/v4/mini/external.cjs +22 -1
  909. package/node_modules/zod/v4/mini/external.d.cts +1 -1
  910. package/node_modules/zod/v4/mini/external.d.ts +1 -1
  911. package/node_modules/zod/v4/mini/external.js +1 -1
  912. package/node_modules/zod/v4/mini/in-out.cjs +19 -0
  913. package/node_modules/zod/v4/mini/index.cjs +19 -0
  914. package/node_modules/zod/v4/mini/iso.cjs +19 -0
  915. package/node_modules/zod/v4/mini/parse.cjs +19 -0
  916. package/node_modules/zod/v4/mini/schemas.cjs +44 -8
  917. package/node_modules/zod/v4/mini/schemas.d.cts +6 -1
  918. package/node_modules/zod/v4/mini/schemas.d.ts +6 -1
  919. package/node_modules/zod/v4/mini/schemas.js +21 -6
  920. package/node_modules/zod/v4-mini/index.cjs +19 -0
  921. package/package.json +7 -7
  922. package/node_modules/@openclaw/fs-safe/dist/absolute-path.d.ts.map +0 -1
  923. package/node_modules/@openclaw/fs-safe/dist/advanced.d.ts.map +0 -1
  924. package/node_modules/@openclaw/fs-safe/dist/archive-crc32.d.ts.map +0 -1
  925. package/node_modules/@openclaw/fs-safe/dist/archive-deadline.d.ts.map +0 -1
  926. package/node_modules/@openclaw/fs-safe/dist/archive-durability.d.ts.map +0 -1
  927. package/node_modules/@openclaw/fs-safe/dist/archive-entry.d.ts.map +0 -1
  928. package/node_modules/@openclaw/fs-safe/dist/archive-errors.d.ts.map +0 -1
  929. package/node_modules/@openclaw/fs-safe/dist/archive-gzip-tail.d.ts.map +0 -1
  930. package/node_modules/@openclaw/fs-safe/dist/archive-input.d.ts.map +0 -1
  931. package/node_modules/@openclaw/fs-safe/dist/archive-kind.d.ts.map +0 -1
  932. package/node_modules/@openclaw/fs-safe/dist/archive-limits.d.ts.map +0 -1
  933. package/node_modules/@openclaw/fs-safe/dist/archive-merge.d.ts.map +0 -1
  934. package/node_modules/@openclaw/fs-safe/dist/archive-native.d.ts +0 -21
  935. package/node_modules/@openclaw/fs-safe/dist/archive-native.d.ts.map +0 -1
  936. package/node_modules/@openclaw/fs-safe/dist/archive-native.js +0 -97
  937. package/node_modules/@openclaw/fs-safe/dist/archive-options.d.ts +0 -23
  938. package/node_modules/@openclaw/fs-safe/dist/archive-options.d.ts.map +0 -1
  939. package/node_modules/@openclaw/fs-safe/dist/archive-parser-errors.d.ts.map +0 -1
  940. package/node_modules/@openclaw/fs-safe/dist/archive-plan.d.ts.map +0 -1
  941. package/node_modules/@openclaw/fs-safe/dist/archive-policy.d.ts +0 -22
  942. package/node_modules/@openclaw/fs-safe/dist/archive-policy.d.ts.map +0 -1
  943. package/node_modules/@openclaw/fs-safe/dist/archive-policy.js +0 -38
  944. package/node_modules/@openclaw/fs-safe/dist/archive-read.d.ts.map +0 -1
  945. package/node_modules/@openclaw/fs-safe/dist/archive-staging.d.ts.map +0 -1
  946. package/node_modules/@openclaw/fs-safe/dist/archive-tar-inspect.d.ts +0 -7
  947. package/node_modules/@openclaw/fs-safe/dist/archive-tar-inspect.d.ts.map +0 -1
  948. package/node_modules/@openclaw/fs-safe/dist/archive-tar-inspect.js +0 -62
  949. package/node_modules/@openclaw/fs-safe/dist/archive-tar-stream.d.ts.map +0 -1
  950. package/node_modules/@openclaw/fs-safe/dist/archive-tar-wasm.d.ts.map +0 -1
  951. package/node_modules/@openclaw/fs-safe/dist/archive-tar.d.ts +0 -19
  952. package/node_modules/@openclaw/fs-safe/dist/archive-tar.d.ts.map +0 -1
  953. package/node_modules/@openclaw/fs-safe/dist/archive-tar.js +0 -21
  954. package/node_modules/@openclaw/fs-safe/dist/archive-zip-admission.d.ts.map +0 -1
  955. package/node_modules/@openclaw/fs-safe/dist/archive-zip-count.d.ts.map +0 -1
  956. package/node_modules/@openclaw/fs-safe/dist/archive-zip-directory.d.ts.map +0 -1
  957. package/node_modules/@openclaw/fs-safe/dist/archive-zip-entry.d.ts.map +0 -1
  958. package/node_modules/@openclaw/fs-safe/dist/archive-zip-integrity.d.ts.map +0 -1
  959. package/node_modules/@openclaw/fs-safe/dist/archive-zip-loader.d.ts.map +0 -1
  960. package/node_modules/@openclaw/fs-safe/dist/archive-zip-manifest.d.ts.map +0 -1
  961. package/node_modules/@openclaw/fs-safe/dist/archive-zip-names.d.ts.map +0 -1
  962. package/node_modules/@openclaw/fs-safe/dist/archive-zip-preflight.d.ts.map +0 -1
  963. package/node_modules/@openclaw/fs-safe/dist/archive.d.ts.map +0 -1
  964. package/node_modules/@openclaw/fs-safe/dist/async-lock.d.ts.map +0 -1
  965. package/node_modules/@openclaw/fs-safe/dist/atomic.d.ts.map +0 -1
  966. package/node_modules/@openclaw/fs-safe/dist/bounded-read-stream.d.ts.map +0 -1
  967. package/node_modules/@openclaw/fs-safe/dist/bounded-read.d.ts.map +0 -1
  968. package/node_modules/@openclaw/fs-safe/dist/byte-budget.d.ts.map +0 -1
  969. package/node_modules/@openclaw/fs-safe/dist/clone-metadata.d.ts.map +0 -1
  970. package/node_modules/@openclaw/fs-safe/dist/config.d.ts.map +0 -1
  971. package/node_modules/@openclaw/fs-safe/dist/containment.d.ts.map +0 -1
  972. package/node_modules/@openclaw/fs-safe/dist/copy-file-input.d.ts.map +0 -1
  973. package/node_modules/@openclaw/fs-safe/dist/copy-policy.d.ts.map +0 -1
  974. package/node_modules/@openclaw/fs-safe/dist/copy-publication.d.ts.map +0 -1
  975. package/node_modules/@openclaw/fs-safe/dist/copy-tree-portable.d.ts.map +0 -1
  976. package/node_modules/@openclaw/fs-safe/dist/copy.d.ts.map +0 -1
  977. package/node_modules/@openclaw/fs-safe/dist/darwin-acl.d.ts +0 -4
  978. package/node_modules/@openclaw/fs-safe/dist/darwin-acl.d.ts.map +0 -1
  979. package/node_modules/@openclaw/fs-safe/dist/darwin-acl.js +0 -24
  980. package/node_modules/@openclaw/fs-safe/dist/deny-mutations.d.ts.map +0 -1
  981. package/node_modules/@openclaw/fs-safe/dist/device-path.d.ts.map +0 -1
  982. package/node_modules/@openclaw/fs-safe/dist/directory-durability.d.ts.map +0 -1
  983. package/node_modules/@openclaw/fs-safe/dist/directory-entry-path.d.ts.map +0 -1
  984. package/node_modules/@openclaw/fs-safe/dist/directory-guard.d.ts.map +0 -1
  985. package/node_modules/@openclaw/fs-safe/dist/directory-mode-node.d.ts.map +0 -1
  986. package/node_modules/@openclaw/fs-safe/dist/directory-mode-owner.d.ts +0 -21
  987. package/node_modules/@openclaw/fs-safe/dist/directory-mode-owner.d.ts.map +0 -1
  988. package/node_modules/@openclaw/fs-safe/dist/directory-mode-owner.js +0 -78
  989. package/node_modules/@openclaw/fs-safe/dist/durability.d.ts.map +0 -1
  990. package/node_modules/@openclaw/fs-safe/dist/effective-uid.d.ts.map +0 -1
  991. package/node_modules/@openclaw/fs-safe/dist/error-detail.d.ts.map +0 -1
  992. package/node_modules/@openclaw/fs-safe/dist/errors.d.ts.map +0 -1
  993. package/node_modules/@openclaw/fs-safe/dist/file-handle-transfer.d.ts.map +0 -1
  994. package/node_modules/@openclaw/fs-safe/dist/file-hash.d.ts.map +0 -1
  995. package/node_modules/@openclaw/fs-safe/dist/file-identity.d.ts.map +0 -1
  996. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync.d.ts.map +0 -1
  997. package/node_modules/@openclaw/fs-safe/dist/file-lock.d.ts.map +0 -1
  998. package/node_modules/@openclaw/fs-safe/dist/file-observation.d.ts.map +0 -1
  999. package/node_modules/@openclaw/fs-safe/dist/file-store-boundary.d.ts.map +0 -1
  1000. package/node_modules/@openclaw/fs-safe/dist/file-store-copy-source.d.ts +0 -5
  1001. package/node_modules/@openclaw/fs-safe/dist/file-store-copy-source.d.ts.map +0 -1
  1002. package/node_modules/@openclaw/fs-safe/dist/file-store-copy-source.js +0 -31
  1003. package/node_modules/@openclaw/fs-safe/dist/file-store-limit.d.ts +0 -2
  1004. package/node_modules/@openclaw/fs-safe/dist/file-store-limit.d.ts.map +0 -1
  1005. package/node_modules/@openclaw/fs-safe/dist/file-store-limit.js +0 -8
  1006. package/node_modules/@openclaw/fs-safe/dist/file-store-path.d.ts +0 -3
  1007. package/node_modules/@openclaw/fs-safe/dist/file-store-path.d.ts.map +0 -1
  1008. package/node_modules/@openclaw/fs-safe/dist/file-store-path.js +0 -30
  1009. package/node_modules/@openclaw/fs-safe/dist/file-store-prune.d.ts.map +0 -1
  1010. package/node_modules/@openclaw/fs-safe/dist/file-store-sync-directory.d.ts.map +0 -1
  1011. package/node_modules/@openclaw/fs-safe/dist/file-store-sync-write.d.ts.map +0 -1
  1012. package/node_modules/@openclaw/fs-safe/dist/file-store.d.ts.map +0 -1
  1013. package/node_modules/@openclaw/fs-safe/dist/file-sync.d.ts.map +0 -1
  1014. package/node_modules/@openclaw/fs-safe/dist/filename.d.ts.map +0 -1
  1015. package/node_modules/@openclaw/fs-safe/dist/fs.d.ts.map +0 -1
  1016. package/node_modules/@openclaw/fs-safe/dist/guarded-mkdir.d.ts.map +0 -1
  1017. package/node_modules/@openclaw/fs-safe/dist/guarded-mutation.d.ts.map +0 -1
  1018. package/node_modules/@openclaw/fs-safe/dist/guest-dispatch-python.d.ts.map +0 -1
  1019. package/node_modules/@openclaw/fs-safe/dist/guest-native-python.d.ts.map +0 -1
  1020. package/node_modules/@openclaw/fs-safe/dist/guest.d.ts.map +0 -1
  1021. package/node_modules/@openclaw/fs-safe/dist/home-dir.d.ts.map +0 -1
  1022. package/node_modules/@openclaw/fs-safe/dist/index.d.ts.map +0 -1
  1023. package/node_modules/@openclaw/fs-safe/dist/install-path.d.ts.map +0 -1
  1024. package/node_modules/@openclaw/fs-safe/dist/json-document-store.d.ts.map +0 -1
  1025. package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-directory.d.ts.map +0 -1
  1026. package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-ownership.d.ts.map +0 -1
  1027. package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-paths.d.ts +0 -11
  1028. package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-paths.d.ts.map +0 -1
  1029. package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-paths.js +0 -42
  1030. package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-read.d.ts.map +0 -1
  1031. package/node_modules/@openclaw/fs-safe/dist/json-durable-queue.d.ts.map +0 -1
  1032. package/node_modules/@openclaw/fs-safe/dist/json-store.d.ts.map +0 -1
  1033. package/node_modules/@openclaw/fs-safe/dist/json-stringify.d.ts.map +0 -1
  1034. package/node_modules/@openclaw/fs-safe/dist/json.d.ts.map +0 -1
  1035. package/node_modules/@openclaw/fs-safe/dist/local-file-access.d.ts.map +0 -1
  1036. package/node_modules/@openclaw/fs-safe/dist/local-file-descriptor.d.ts.map +0 -1
  1037. package/node_modules/@openclaw/fs-safe/dist/local-roots.d.ts.map +0 -1
  1038. package/node_modules/@openclaw/fs-safe/dist/lock-config.d.ts.map +0 -1
  1039. package/node_modules/@openclaw/fs-safe/dist/move-path-cleanup.d.ts.map +0 -1
  1040. package/node_modules/@openclaw/fs-safe/dist/move-path-stage.d.ts.map +0 -1
  1041. package/node_modules/@openclaw/fs-safe/dist/move-path.d.ts.map +0 -1
  1042. package/node_modules/@openclaw/fs-safe/dist/mutation-authority.d.ts.map +0 -1
  1043. package/node_modules/@openclaw/fs-safe/dist/native-binding.d.ts.map +0 -1
  1044. package/node_modules/@openclaw/fs-safe/dist/native-config.d.ts.map +0 -1
  1045. package/node_modules/@openclaw/fs-safe/dist/native-directory-observation.d.ts.map +0 -1
  1046. package/node_modules/@openclaw/fs-safe/dist/native-operations.d.ts.map +0 -1
  1047. package/node_modules/@openclaw/fs-safe/dist/native-parent-admission.d.ts.map +0 -1
  1048. package/node_modules/@openclaw/fs-safe/dist/native-pinned-write-windows.d.ts.map +0 -1
  1049. package/node_modules/@openclaw/fs-safe/dist/native-pinned-write.d.ts.map +0 -1
  1050. package/node_modules/@openclaw/fs-safe/dist/native-staged-file.d.ts.map +0 -1
  1051. package/node_modules/@openclaw/fs-safe/dist/native.d.ts.map +0 -1
  1052. package/node_modules/@openclaw/fs-safe/dist/opened-file-failure.d.ts.map +0 -1
  1053. package/node_modules/@openclaw/fs-safe/dist/opened-realpath.d.ts.map +0 -1
  1054. package/node_modules/@openclaw/fs-safe/dist/output.d.ts.map +0 -1
  1055. package/node_modules/@openclaw/fs-safe/dist/overwrite-file-handle.d.ts.map +0 -1
  1056. package/node_modules/@openclaw/fs-safe/dist/owner-dacl.d.ts.map +0 -1
  1057. package/node_modules/@openclaw/fs-safe/dist/path-case.d.ts.map +0 -1
  1058. package/node_modules/@openclaw/fs-safe/dist/path-policy.d.ts.map +0 -1
  1059. package/node_modules/@openclaw/fs-safe/dist/path-prefix.d.ts.map +0 -1
  1060. package/node_modules/@openclaw/fs-safe/dist/path-scope-lexical.d.ts.map +0 -1
  1061. package/node_modules/@openclaw/fs-safe/dist/path-segment-route.d.ts.map +0 -1
  1062. package/node_modules/@openclaw/fs-safe/dist/path-suffix-aliases.d.ts.map +0 -1
  1063. package/node_modules/@openclaw/fs-safe/dist/path.d.ts.map +0 -1
  1064. package/node_modules/@openclaw/fs-safe/dist/permission-exec.d.ts.map +0 -1
  1065. package/node_modules/@openclaw/fs-safe/dist/permissions-public.d.ts.map +0 -1
  1066. package/node_modules/@openclaw/fs-safe/dist/permissions-windows.d.ts.map +0 -1
  1067. package/node_modules/@openclaw/fs-safe/dist/permissions.d.ts.map +0 -1
  1068. package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-admission.d.ts.map +0 -1
  1069. package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-observation.d.ts.map +0 -1
  1070. package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-shared-route.d.ts.map +0 -1
  1071. package/node_modules/@openclaw/fs-safe/dist/pinned-open.d.ts.map +0 -1
  1072. package/node_modules/@openclaw/fs-safe/dist/pinned-operation.d.ts.map +0 -1
  1073. package/node_modules/@openclaw/fs-safe/dist/pinned-write-types.d.ts.map +0 -1
  1074. package/node_modules/@openclaw/fs-safe/dist/pinned-write.d.ts.map +0 -1
  1075. package/node_modules/@openclaw/fs-safe/dist/positional-read.d.ts.map +0 -1
  1076. package/node_modules/@openclaw/fs-safe/dist/private-directory.d.ts.map +0 -1
  1077. package/node_modules/@openclaw/fs-safe/dist/private-producer-handoff.d.ts.map +0 -1
  1078. package/node_modules/@openclaw/fs-safe/dist/private-temp-workspace.d.ts.map +0 -1
  1079. package/node_modules/@openclaw/fs-safe/dist/publish-copy-stage.d.ts.map +0 -1
  1080. package/node_modules/@openclaw/fs-safe/dist/publish-file-failure.d.ts.map +0 -1
  1081. package/node_modules/@openclaw/fs-safe/dist/publish-file.d.ts.map +0 -1
  1082. package/node_modules/@openclaw/fs-safe/dist/read-open-flags.d.ts.map +0 -1
  1083. package/node_modules/@openclaw/fs-safe/dist/read-opened-file.d.ts.map +0 -1
  1084. package/node_modules/@openclaw/fs-safe/dist/realpath.d.ts.map +0 -1
  1085. package/node_modules/@openclaw/fs-safe/dist/recursive-mkdir-path.d.ts.map +0 -1
  1086. package/node_modules/@openclaw/fs-safe/dist/regular-file.d.ts.map +0 -1
  1087. package/node_modules/@openclaw/fs-safe/dist/replace-directory.d.ts.map +0 -1
  1088. package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-fallback.d.ts.map +0 -1
  1089. package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-source.d.ts.map +0 -1
  1090. package/node_modules/@openclaw/fs-safe/dist/replace-file-descriptor.d.ts.map +0 -1
  1091. package/node_modules/@openclaw/fs-safe/dist/replace-file-mode.d.ts.map +0 -1
  1092. package/node_modules/@openclaw/fs-safe/dist/replace-file-rename-policy.d.ts.map +0 -1
  1093. package/node_modules/@openclaw/fs-safe/dist/replace-file-temp-owner.d.ts.map +0 -1
  1094. package/node_modules/@openclaw/fs-safe/dist/replace-file.d.ts.map +0 -1
  1095. package/node_modules/@openclaw/fs-safe/dist/root-boundary.d.ts.map +0 -1
  1096. package/node_modules/@openclaw/fs-safe/dist/root-context.d.ts.map +0 -1
  1097. package/node_modules/@openclaw/fs-safe/dist/root-create-input.d.ts.map +0 -1
  1098. package/node_modules/@openclaw/fs-safe/dist/root-directory-creation.d.ts.map +0 -1
  1099. package/node_modules/@openclaw/fs-safe/dist/root-directory-list.d.ts.map +0 -1
  1100. package/node_modules/@openclaw/fs-safe/dist/root-directory.d.ts.map +0 -1
  1101. package/node_modules/@openclaw/fs-safe/dist/root-entries.d.ts.map +0 -1
  1102. package/node_modules/@openclaw/fs-safe/dist/root-errors.d.ts.map +0 -1
  1103. package/node_modules/@openclaw/fs-safe/dist/root-file-final-admission.d.ts.map +0 -1
  1104. package/node_modules/@openclaw/fs-safe/dist/root-file.d.ts.map +0 -1
  1105. package/node_modules/@openclaw/fs-safe/dist/root-impl.d.ts.map +0 -1
  1106. package/node_modules/@openclaw/fs-safe/dist/root-move-noreplace.d.ts.map +0 -1
  1107. package/node_modules/@openclaw/fs-safe/dist/root-move-preflight.d.ts.map +0 -1
  1108. package/node_modules/@openclaw/fs-safe/dist/root-observed-path.d.ts.map +0 -1
  1109. package/node_modules/@openclaw/fs-safe/dist/root-options.d.ts.map +0 -1
  1110. package/node_modules/@openclaw/fs-safe/dist/root-path-errors.d.ts.map +0 -1
  1111. package/node_modules/@openclaw/fs-safe/dist/root-path-existing.d.ts.map +0 -1
  1112. package/node_modules/@openclaw/fs-safe/dist/root-path-observation.d.ts.map +0 -1
  1113. package/node_modules/@openclaw/fs-safe/dist/root-path-stat.d.ts.map +0 -1
  1114. package/node_modules/@openclaw/fs-safe/dist/root-path-symlink.d.ts +0 -7
  1115. package/node_modules/@openclaw/fs-safe/dist/root-path-symlink.d.ts.map +0 -1
  1116. package/node_modules/@openclaw/fs-safe/dist/root-path-symlink.js +0 -55
  1117. package/node_modules/@openclaw/fs-safe/dist/root-path.d.ts.map +0 -1
  1118. package/node_modules/@openclaw/fs-safe/dist/root-paths-lexical.d.ts.map +0 -1
  1119. package/node_modules/@openclaw/fs-safe/dist/root-paths.d.ts.map +0 -1
  1120. package/node_modules/@openclaw/fs-safe/dist/root-read-admission.d.ts.map +0 -1
  1121. package/node_modules/@openclaw/fs-safe/dist/root-remove-identity.d.ts.map +0 -1
  1122. package/node_modules/@openclaw/fs-safe/dist/root-remove-receipt.d.ts.map +0 -1
  1123. package/node_modules/@openclaw/fs-safe/dist/root-remove.d.ts.map +0 -1
  1124. package/node_modules/@openclaw/fs-safe/dist/root-symlink-policy.d.ts.map +0 -1
  1125. package/node_modules/@openclaw/fs-safe/dist/root-walk.d.ts.map +0 -1
  1126. package/node_modules/@openclaw/fs-safe/dist/root-write-admission.d.ts.map +0 -1
  1127. package/node_modules/@openclaw/fs-safe/dist/root-write-compatibility.d.ts.map +0 -1
  1128. package/node_modules/@openclaw/fs-safe/dist/root-write-complete-parent.d.ts.map +0 -1
  1129. package/node_modules/@openclaw/fs-safe/dist/root-write-mode.d.ts.map +0 -1
  1130. package/node_modules/@openclaw/fs-safe/dist/root-write-publication.d.ts.map +0 -1
  1131. package/node_modules/@openclaw/fs-safe/dist/root-write-verification.d.ts.map +0 -1
  1132. package/node_modules/@openclaw/fs-safe/dist/root.d.ts.map +0 -1
  1133. package/node_modules/@openclaw/fs-safe/dist/safe-path-segment.d.ts.map +0 -1
  1134. package/node_modules/@openclaw/fs-safe/dist/secret-file.d.ts.map +0 -1
  1135. package/node_modules/@openclaw/fs-safe/dist/secret-read-async.d.ts.map +0 -1
  1136. package/node_modules/@openclaw/fs-safe/dist/secret-read-policy.d.ts.map +0 -1
  1137. package/node_modules/@openclaw/fs-safe/dist/secret.d.ts.map +0 -1
  1138. package/node_modules/@openclaw/fs-safe/dist/secure-file-windows.d.ts.map +0 -1
  1139. package/node_modules/@openclaw/fs-safe/dist/secure-file.d.ts.map +0 -1
  1140. package/node_modules/@openclaw/fs-safe/dist/secure-temp-dir.d.ts.map +0 -1
  1141. package/node_modules/@openclaw/fs-safe/dist/secure-temp-repair.d.ts.map +0 -1
  1142. package/node_modules/@openclaw/fs-safe/dist/sibling-staged-file.d.ts.map +0 -1
  1143. package/node_modules/@openclaw/fs-safe/dist/sibling-temp.d.ts.map +0 -1
  1144. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-acquire.d.ts.map +0 -1
  1145. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-handle.d.ts.map +0 -1
  1146. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-policy.d.ts.map +0 -1
  1147. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-reclaim.d.ts.map +0 -1
  1148. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-root.d.ts.map +0 -1
  1149. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-types.d.ts.map +0 -1
  1150. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock.d.ts.map +0 -1
  1151. package/node_modules/@openclaw/fs-safe/dist/staged-directory.d.ts.map +0 -1
  1152. package/node_modules/@openclaw/fs-safe/dist/staged-file-types.d.ts.map +0 -1
  1153. package/node_modules/@openclaw/fs-safe/dist/standalone-publication-path.d.ts +0 -2
  1154. package/node_modules/@openclaw/fs-safe/dist/standalone-publication-path.d.ts.map +0 -1
  1155. package/node_modules/@openclaw/fs-safe/dist/standalone-publication-path.js +0 -6
  1156. package/node_modules/@openclaw/fs-safe/dist/stat-observation.d.ts.map +0 -1
  1157. package/node_modules/@openclaw/fs-safe/dist/store.d.ts.map +0 -1
  1158. package/node_modules/@openclaw/fs-safe/dist/strict-file-identity.d.ts.map +0 -1
  1159. package/node_modules/@openclaw/fs-safe/dist/string-coerce.d.ts.map +0 -1
  1160. package/node_modules/@openclaw/fs-safe/dist/suppressed-error.d.ts.map +0 -1
  1161. package/node_modules/@openclaw/fs-safe/dist/symlink-parents.d.ts.map +0 -1
  1162. package/node_modules/@openclaw/fs-safe/dist/temp-cleanup.d.ts.map +0 -1
  1163. package/node_modules/@openclaw/fs-safe/dist/temp-target.d.ts.map +0 -1
  1164. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-admission.d.ts.map +0 -1
  1165. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-child-admission.d.ts.map +0 -1
  1166. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-descriptor.d.ts.map +0 -1
  1167. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-identity.d.ts +0 -15
  1168. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-identity.d.ts.map +0 -1
  1169. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-identity.js +0 -41
  1170. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-owner.d.ts.map +0 -1
  1171. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-permissions.d.ts +0 -4
  1172. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-permissions.d.ts.map +0 -1
  1173. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-permissions.js +0 -32
  1174. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-types.d.ts.map +0 -1
  1175. package/node_modules/@openclaw/fs-safe/dist/temp.d.ts.map +0 -1
  1176. package/node_modules/@openclaw/fs-safe/dist/test-hooks.d.ts.map +0 -1
  1177. package/node_modules/@openclaw/fs-safe/dist/text-atomic.d.ts.map +0 -1
  1178. package/node_modules/@openclaw/fs-safe/dist/timing.d.ts.map +0 -1
  1179. package/node_modules/@openclaw/fs-safe/dist/trash.d.ts.map +0 -1
  1180. package/node_modules/@openclaw/fs-safe/dist/types.d.ts.map +0 -1
  1181. package/node_modules/@openclaw/fs-safe/dist/unicode-path.d.ts.map +0 -1
  1182. package/node_modules/@openclaw/fs-safe/dist/walk.d.ts.map +0 -1
  1183. package/node_modules/@openclaw/fs-safe/dist/windows-command.d.ts.map +0 -1
  1184. package/node_modules/@openclaw/fs-safe/dist/windows-owner.d.ts.map +0 -1
  1185. package/node_modules/@openclaw/fs-safe/dist/windows-path-alias.d.ts.map +0 -1
  1186. package/node_modules/@openclaw/fs-safe/dist/write-file-handle.d.ts.map +0 -1
  1187. package/node_modules/@openclaw/fs-safe/dist/write-open-flags.d.ts.map +0 -1
  1188. package/node_modules/@openclaw/fs-safe/dist/write-queue.d.ts.map +0 -1
  1189. /package/node_modules/@openclaw/fs-safe/dist/{archive-options.js → owner-dacl-batch-worker.d.ts} +0 -0
@@ -1,7 +1,8 @@
1
1
  import syncFs, {} from "node:fs";
2
2
  import fs, {} from "node:fs/promises";
3
3
  import path from "node:path";
4
- import { assertAsyncDirectoryGuard, createAsyncDirectoryGuard } from "./directory-guard.js";
4
+ import { createAsyncDirectoryGuard } from "./directory-guard.js";
5
+ import { hasErrorCode, removeOwnedPath } from "./file-cleanup.js";
5
6
  import { resolveReadOpenFlags } from "./read-open-flags.js";
6
7
  import { FsSafeError } from "./errors.js";
7
8
  import { sameFileIdentityForCleanup, sha256Hex } from "./file-identity.js";
@@ -9,6 +10,22 @@ import { withAsyncDirectoryGuards } from "./guarded-mutation.js";
9
10
  import { inspectFileIdentity, inspectFileIdentitySync } from "./strict-file-identity.js";
10
11
  import { registerTempPathForExit } from "./temp-cleanup.js";
11
12
  const PUBLISHED_READ_FLAGS = resolveReadOpenFlags();
13
+ function describeFailure(error) {
14
+ try {
15
+ return String(error);
16
+ }
17
+ catch {
18
+ return "<unprintable failure>";
19
+ }
20
+ }
21
+ function isErrorValue(error) {
22
+ try {
23
+ return error instanceof Error;
24
+ }
25
+ catch {
26
+ return false;
27
+ }
28
+ }
12
29
  export async function removePathIfIdentityUnchanged(targetPath, identity) {
13
30
  const parentGuard = await createAsyncDirectoryGuard(path.dirname(targetPath), { bigint: true });
14
31
  await withAsyncDirectoryGuards([parentGuard], async () => {
@@ -34,65 +51,33 @@ function missingOwnedFile(pathname, cause) {
34
51
  cause,
35
52
  });
36
53
  }
37
- function cleanupFailure(originalError, cleanupError) {
38
- if (originalError !== undefined) {
39
- return new Error(`Atomic file replace failed (${String(originalError)}); cleanup also failed (${String(cleanupError)})`, { cause: originalError });
54
+ function cleanupFailure(originalFailure, cleanupError) {
55
+ if (originalFailure) {
56
+ return new Error(`Atomic file replace failed (${describeFailure(originalFailure.error)}); cleanup also failed (${describeFailure(cleanupError)})`, { cause: originalFailure.error });
40
57
  }
41
- return cleanupError instanceof Error ? cleanupError : new Error(String(cleanupError));
58
+ return isErrorValue(cleanupError) ? cleanupError : new Error(describeFailure(cleanupError));
59
+ }
60
+ function closeFailure(closeError, params, cleanupFailure) {
61
+ return {
62
+ error: cleanupFailure
63
+ ? new AggregateError([cleanupFailure.error, closeError], "Atomic temp cleanup and close failed")
64
+ : params.originalFailure
65
+ ? new AggregateError([params.originalFailure.error, closeError], "Atomic file replace and close failed")
66
+ : closeError,
67
+ };
42
68
  }
43
69
  async function cleanupOwnedPath(params) {
44
- if (!params.identity)
45
- return true;
46
70
  try {
47
- const current = params.fsModule === fs
48
- ? syncFs.lstatSync(params.pathname, { bigint: true })
49
- : await params.fsModule.lstat(params.pathname, { bigint: true });
50
- if (current.isSymbolicLink() ||
51
- !current.isFile() ||
52
- current.nlink !== 1n ||
53
- !sameFileIdentityForCleanup(current, params.identity)) {
54
- return true;
55
- }
56
- await params.fsModule.unlink(params.pathname);
71
+ await removeOwnedPath(params);
57
72
  return true;
58
73
  }
59
74
  catch (cleanupError) {
60
- if (cleanupError.code === "ENOENT")
61
- return true;
62
75
  if (params.throwOnCleanupError) {
63
- throw cleanupFailure(params.originalError, cleanupError);
76
+ throw cleanupFailure(params.originalFailure, cleanupError);
64
77
  }
65
78
  return false;
66
79
  }
67
80
  }
68
- // Borrowed handle: the caller retains it until this best-effort cleanup finishes.
69
- export async function cleanupPinnedFilePath(params) {
70
- if (!params.identity)
71
- return;
72
- try {
73
- const guard = params.parentGuard;
74
- if ([guard.stat.dev, guard.stat.ino].some((value) => typeof value === "number" && !Number.isSafeInteger(value)))
75
- return;
76
- await assertAsyncDirectoryGuard(guard);
77
- const parent = syncFs.lstatSync(guard.dir, { bigint: true });
78
- if (parent.isSymbolicLink() || !parent.isDirectory() ||
79
- !sameFileIdentityForCleanup(parent, guard.stat))
80
- return;
81
- const opened = syncFs.fstatSync(params.handle.fd, { bigint: true });
82
- if (!opened.isFile() || opened.nlink !== 1n ||
83
- !sameFileIdentityForCleanup(opened, params.identity))
84
- return;
85
- await cleanupOwnedPath({
86
- fsModule: fs,
87
- pathname: params.pathname,
88
- identity: params.identity,
89
- throwOnCleanupError: false,
90
- });
91
- }
92
- catch {
93
- // Unverifiable authority must preserve the path and the original write failure.
94
- }
95
- }
96
81
  function cleanupOwnedPathSync(params) {
97
82
  if (!params.identity)
98
83
  return true;
@@ -108,44 +93,56 @@ function cleanupOwnedPathSync(params) {
108
93
  return true;
109
94
  }
110
95
  catch (cleanupError) {
111
- if (cleanupError.code === "ENOENT")
96
+ if (hasErrorCode(cleanupError, "ENOENT"))
112
97
  return true;
113
98
  if (params.throwOnCleanupError) {
114
- throw cleanupFailure(params.originalError, cleanupError);
99
+ throw cleanupFailure(params.originalFailure, cleanupError);
115
100
  }
116
101
  return false;
117
102
  }
118
103
  }
119
- export class AsyncAtomicTempOwner {
104
+ class AtomicTempOwner {
120
105
  pathname;
121
- #handle;
122
- #identity;
123
- #exists = false;
124
- #unregister;
106
+ resource;
107
+ recordedIdentity;
108
+ exists = false;
109
+ unregister;
125
110
  constructor(pathname) {
126
111
  this.pathname = pathname;
127
- this.#unregister = registerTempPathForExit(pathname, { singleLinkFile: true });
112
+ this.unregister = registerTempPathForExit(pathname, { singleLinkFile: true });
128
113
  }
129
114
  start() {
130
- this.#exists = true;
115
+ this.exists = true;
131
116
  }
132
117
  onIdentity = (identity) => {
133
- this.#identity = identity;
134
- this.#unregister.setIdentity(identity);
118
+ this.recordedIdentity = identity;
119
+ this.unregister.setIdentity(identity);
135
120
  };
136
- adopt(temp) {
137
- this.#handle = temp.handle;
138
- this.onIdentity(temp.identity);
139
- }
140
121
  get identity() {
141
- if (!this.#identity)
122
+ if (!this.recordedIdentity)
142
123
  throw new Error("Atomic temp owner has no identity");
143
- return this.#identity;
124
+ return this.recordedIdentity;
125
+ }
126
+ markRenamed() {
127
+ this.exists = false;
128
+ this.unregister();
129
+ }
130
+ takeResource() {
131
+ // A throwing close may already have released the descriptor for reuse.
132
+ const resource = this.resource;
133
+ this.resource = undefined;
134
+ return resource;
135
+ }
136
+ }
137
+ export class AsyncAtomicTempOwner extends AtomicTempOwner {
138
+ adopt(temp) {
139
+ this.resource = temp.handle;
140
+ this.onIdentity(temp.identity);
144
141
  }
145
142
  async assertCurrent(fsModule, pathname = this.pathname) {
146
143
  const opened = await inspectFileIdentity(async () => {
147
- const stat = fsModule === fs ? syncFs.fstatSync(this.#handle.fd, { bigint: true })
148
- : await this.#handle.stat({ bigint: true });
144
+ const stat = fsModule === fs ? syncFs.fstatSync(this.resource.fd, { bigint: true })
145
+ : await this.resource.stat({ bigint: true });
149
146
  assertOwnedFile(stat, pathname, false);
150
147
  return stat;
151
148
  }, this.identity);
@@ -158,29 +155,34 @@ export class AsyncAtomicTempOwner {
158
155
  }, opened);
159
156
  }
160
157
  catch (error) {
161
- if (error.code === "ENOENT") {
158
+ if (hasErrorCode(error, "ENOENT")) {
162
159
  throw missingOwnedFile(pathname, error);
163
160
  }
164
161
  throw error;
165
162
  }
166
163
  }
167
- async assertPublished(fsModule, pathname, expectedHash) {
164
+ async assertPublished(fsModule, pathname, expectedHash, onVerified) {
165
+ let identityCurrent = false;
168
166
  try {
169
167
  await this.assertCurrent(fsModule, pathname);
170
- return;
168
+ identityCurrent = true;
171
169
  }
172
170
  catch (error) {
173
- if (!(error instanceof FsSafeError) || error.code !== "path-mismatch" || !expectedHash) {
171
+ if (!(error instanceof FsSafeError) || !hasErrorCode(error, "path-mismatch") || !expectedHash) {
174
172
  throw error;
175
173
  }
176
174
  }
175
+ if (identityCurrent) {
176
+ onVerified?.(this.identity);
177
+ return;
178
+ }
177
179
  let published;
178
180
  try {
179
181
  try {
180
182
  published = await fsModule.open(pathname, PUBLISHED_READ_FLAGS);
181
183
  }
182
184
  catch (error) {
183
- if (error.code === "ELOOP") {
185
+ if (hasErrorCode(error, "ELOOP")) {
184
186
  throw new FsSafeError("symlink", `Atomic replace published file became a symlink: ${pathname}`, {
185
187
  cause: error,
186
188
  });
@@ -202,81 +204,60 @@ export class AsyncAtomicTempOwner {
202
204
  if (sha256Hex(await published.readFile()) !== expectedHash) {
203
205
  throw new FsSafeError("path-mismatch", `Atomic replace published content changed: ${pathname}`);
204
206
  }
205
- await this.#handle?.close();
206
- this.#handle = published;
207
- this.#identity = identity;
207
+ onVerified?.(identity);
208
+ const previousHandle = this.takeResource();
209
+ await previousHandle?.close();
210
+ this.resource = published;
211
+ this.recordedIdentity = identity;
208
212
  published = undefined;
209
213
  }
210
214
  finally {
211
- await published?.close().catch(() => undefined);
215
+ try {
216
+ await published?.close();
217
+ }
218
+ catch {
219
+ // Preserve the selected verification or previous-handle close failure.
220
+ }
212
221
  }
213
222
  }
214
- markRenamed() {
215
- this.#exists = false;
216
- this.#unregister();
217
- }
218
223
  async finish(params) {
219
- let deferredError;
220
- let cleanupComplete = !this.#exists;
221
- if (this.#exists) {
224
+ let deferredFailure;
225
+ let cleanupComplete = !this.exists;
226
+ if (this.exists) {
222
227
  try {
223
228
  cleanupComplete = await cleanupOwnedPath({
224
229
  fsModule: params.fsModule,
225
230
  pathname: this.pathname,
226
- identity: this.#identity,
227
- originalError: params.originalError,
231
+ identity: this.recordedIdentity,
232
+ originalFailure: params.originalFailure,
228
233
  throwOnCleanupError: params.throwOnCleanupError,
229
234
  });
230
235
  }
231
236
  catch (error) {
232
- deferredError = error;
237
+ deferredFailure = { error };
233
238
  }
234
239
  }
235
240
  if (cleanupComplete)
236
- this.#unregister();
241
+ this.unregister();
242
+ const handle = this.takeResource();
237
243
  try {
238
- await this.#handle?.close();
244
+ await handle?.close();
239
245
  }
240
246
  catch (closeError) {
241
- deferredError = deferredError
242
- ? new AggregateError([deferredError, closeError], "Atomic temp cleanup and close failed")
243
- : params.originalError !== undefined
244
- ? new AggregateError([params.originalError, closeError], "Atomic file replace and close failed")
245
- : closeError;
247
+ deferredFailure = closeFailure(closeError, params, deferredFailure);
246
248
  }
247
- if (deferredError)
248
- throw deferredError;
249
+ if (deferredFailure)
250
+ throw deferredFailure.error;
249
251
  }
250
252
  }
251
- export class SyncAtomicTempOwner {
252
- pathname;
253
- #fd;
254
- #identity;
255
- #exists = false;
256
- #unregister;
257
- constructor(pathname) {
258
- this.pathname = pathname;
259
- this.#unregister = registerTempPathForExit(pathname, { singleLinkFile: true });
260
- }
261
- start() {
262
- this.#exists = true;
263
- }
264
- onIdentity = (identity) => {
265
- this.#identity = identity;
266
- this.#unregister.setIdentity(identity);
267
- };
253
+ export class SyncAtomicTempOwner extends AtomicTempOwner {
268
254
  adopt(temp) {
269
- this.#fd = temp.fd;
255
+ this.resource = temp.fd;
270
256
  this.onIdentity(temp.identity);
271
257
  }
272
- get identity() {
273
- if (!this.#identity)
274
- throw new Error("Atomic temp owner has no identity");
275
- return this.#identity;
276
- }
277
258
  assertCurrent(fsModule, pathname = this.pathname) {
278
259
  const opened = inspectFileIdentitySync(() => {
279
- const stat = fsModule.fstatSync(this.#fd, { bigint: true });
260
+ const stat = fsModule.fstatSync(this.resource, { bigint: true });
280
261
  assertOwnedFile(stat, pathname, false);
281
262
  return stat;
282
263
  }, this.identity);
@@ -288,29 +269,34 @@ export class SyncAtomicTempOwner {
288
269
  }, opened);
289
270
  }
290
271
  catch (error) {
291
- if (error.code === "ENOENT") {
272
+ if (hasErrorCode(error, "ENOENT")) {
292
273
  throw missingOwnedFile(pathname, error);
293
274
  }
294
275
  throw error;
295
276
  }
296
277
  }
297
- assertPublished(fsModule, pathname, expectedHash) {
278
+ assertPublished(fsModule, pathname, expectedHash, onVerified) {
279
+ let identityCurrent = false;
298
280
  try {
299
281
  this.assertCurrent(fsModule, pathname);
300
- return;
282
+ identityCurrent = true;
301
283
  }
302
284
  catch (error) {
303
- if (!(error instanceof FsSafeError) || error.code !== "path-mismatch" || !expectedHash) {
285
+ if (!(error instanceof FsSafeError) || !hasErrorCode(error, "path-mismatch") || !expectedHash) {
304
286
  throw error;
305
287
  }
306
288
  }
289
+ if (identityCurrent) {
290
+ onVerified?.(this.identity);
291
+ return;
292
+ }
307
293
  let publishedFd;
308
294
  try {
309
295
  try {
310
296
  publishedFd = fsModule.openSync(pathname, PUBLISHED_READ_FLAGS);
311
297
  }
312
298
  catch (error) {
313
- if (error.code === "ELOOP") {
299
+ if (hasErrorCode(error, "ELOOP")) {
314
300
  throw new FsSafeError("symlink", `Atomic replace published file became a symlink: ${pathname}`, {
315
301
  cause: error,
316
302
  });
@@ -330,11 +316,11 @@ export class SyncAtomicTempOwner {
330
316
  if (sha256Hex(fsModule.readFileSync(publishedFd)) !== expectedHash) {
331
317
  throw new FsSafeError("path-mismatch", `Atomic replace published content changed: ${pathname}`);
332
318
  }
333
- const previousFd = this.#fd;
334
- this.#fd = undefined;
319
+ onVerified?.(identity);
320
+ const previousFd = this.takeResource();
335
321
  fsModule.closeSync(previousFd);
336
- this.#fd = publishedFd;
337
- this.#identity = identity;
322
+ this.resource = publishedFd;
323
+ this.recordedIdentity = identity;
338
324
  publishedFd = undefined;
339
325
  }
340
326
  finally {
@@ -348,44 +334,35 @@ export class SyncAtomicTempOwner {
348
334
  }
349
335
  }
350
336
  }
351
- markRenamed() {
352
- this.#exists = false;
353
- this.#unregister();
354
- }
355
337
  finish(params) {
356
- let deferredError;
357
- let cleanupComplete = !this.#exists;
358
- if (this.#exists) {
338
+ let deferredFailure;
339
+ let cleanupComplete = !this.exists;
340
+ if (this.exists) {
359
341
  try {
360
342
  cleanupComplete = cleanupOwnedPathSync({
361
343
  fsModule: params.fsModule,
362
344
  pathname: this.pathname,
363
- identity: this.#identity,
364
- originalError: params.originalError,
345
+ identity: this.recordedIdentity,
346
+ originalFailure: params.originalFailure,
365
347
  throwOnCleanupError: params.throwOnCleanupError,
366
348
  });
367
349
  }
368
350
  catch (error) {
369
- deferredError = error;
351
+ deferredFailure = { error };
370
352
  }
371
353
  }
372
354
  if (cleanupComplete)
373
- this.#unregister();
374
- if (this.#fd !== undefined) {
375
- const fd = this.#fd;
376
- this.#fd = undefined;
355
+ this.unregister();
356
+ const fd = this.takeResource();
357
+ if (fd !== undefined) {
377
358
  try {
378
359
  params.fsModule.closeSync(fd);
379
360
  }
380
361
  catch (closeError) {
381
- deferredError = deferredError
382
- ? new AggregateError([deferredError, closeError], "Atomic temp cleanup and close failed")
383
- : params.originalError !== undefined
384
- ? new AggregateError([params.originalError, closeError], "Atomic file replace and close failed")
385
- : closeError;
362
+ deferredFailure = closeFailure(closeError, params, deferredFailure);
386
363
  }
387
364
  }
388
- if (deferredError)
389
- throw deferredError;
365
+ if (deferredFailure)
366
+ throw deferredFailure.error;
390
367
  }
391
368
  }
@@ -0,0 +1,55 @@
1
+ import type syncFs from "node:fs";
2
+ import type fs from "node:fs/promises";
3
+ import type { RenameIdentityPolicy } from "./pinned-write-types.js";
4
+ import type { AtomicMutationOptions } from "./replace-file-mutation.js";
5
+ import type { ReplaceFileCopyFallbackRestorePolicy, ReplaceFileDestinationHardlinkPolicy } from "./replace-file-copy-fallback.js";
6
+ export type ReplaceFileAtomicFileSystem = {
7
+ promises: Pick<typeof fs, "mkdir" | "writeFile" | "rename" | "copyFile" | "unlink" | "rm" | "open" | "stat" | "lstat"> & {
8
+ /** @deprecated Accepted for adapter compatibility but never called. */
9
+ chmod?: typeof fs.chmod;
10
+ };
11
+ };
12
+ export type ReplaceFileAtomicSyncFileSystem = Pick<typeof syncFs, "mkdirSync" | "readFileSync" | "writeFileSync" | "renameSync" | "copyFileSync" | "unlinkSync" | "rmSync" | "openSync" | "fsyncSync" | "closeSync" | "fstatSync" | "statSync" | "lstatSync" | "ftruncateSync" | "readSync" | "writeSync"> & {
13
+ /** @deprecated Accepted for adapter compatibility but never called. */
14
+ chmodSync?: typeof syncFs.chmodSync;
15
+ fchmodSync?: typeof syncFs.fchmodSync;
16
+ };
17
+ export type ReplaceFileAtomicBaseOptions = AtomicMutationOptions & {
18
+ filePath: string;
19
+ content: string | Uint8Array;
20
+ dirMode?: number;
21
+ mode?: number;
22
+ /** Inherit only rwx bits from an existing non-symlink regular file. */
23
+ preserveExistingMode?: boolean;
24
+ tempPrefix?: string;
25
+ renameMaxRetries?: number;
26
+ renameRetryBaseDelayMs?: number;
27
+ copyFallbackOnPermissionError?: boolean;
28
+ copyFallbackRestore?: ReplaceFileCopyFallbackRestorePolicy;
29
+ maxRestoreBytes?: number;
30
+ destinationHardlinks?: ReplaceFileDestinationHardlinkPolicy;
31
+ /** Strict by default; locked content verification is an explicit FUSE compatibility policy. */
32
+ renameIdentity?: RenameIdentityPolicy;
33
+ syncTempFile?: boolean;
34
+ syncParentDir?: boolean;
35
+ throwOnCleanupError?: boolean;
36
+ };
37
+ export type ReplaceFileAtomicOptions = ReplaceFileAtomicBaseOptions & {
38
+ fileSystem?: ReplaceFileAtomicFileSystem;
39
+ /** Runs while the exact staged file is retained; replacing or hardlinking it is rejected. */
40
+ beforeRename?: (params: {
41
+ filePath: string;
42
+ tempPath: string;
43
+ }) => Promise<void>;
44
+ };
45
+ export type ReplaceFileAtomicSyncOptions = ReplaceFileAtomicBaseOptions & {
46
+ fileSystem?: ReplaceFileAtomicSyncFileSystem;
47
+ /** Runs while the exact staged file is retained; replacing or hardlinking it is rejected. */
48
+ beforeRename?: (params: {
49
+ filePath: string;
50
+ tempPath: string;
51
+ }) => void;
52
+ };
53
+ export type ReplaceFileAtomicResult = {
54
+ method: "rename" | "copy-fallback";
55
+ };
@@ -1,59 +1,6 @@
1
- import syncFs from "node:fs";
2
- import fs from "node:fs/promises";
3
- import { type ReplaceFileAtomicRestoreCleanup, type ReplaceFileAtomicRestoreFailureDetails, type ReplaceFileCopyFallbackRestorePolicy, type ReplaceFileDestinationHardlinkPolicy } from "./replace-file-copy-fallback.js";
4
- import { type RenameIdentityPolicy } from "./replace-file-rename-policy.js";
5
- export type ReplaceFileAtomicFileSystem = {
6
- promises: Pick<typeof fs, "mkdir" | "writeFile" | "rename" | "copyFile" | "unlink" | "rm" | "open" | "stat" | "lstat"> & {
7
- /** @deprecated Accepted for adapter compatibility but never called. */
8
- chmod?: typeof fs.chmod;
9
- };
10
- };
11
- export type ReplaceFileAtomicSyncFileSystem = Pick<typeof syncFs, "mkdirSync" | "readFileSync" | "writeFileSync" | "renameSync" | "copyFileSync" | "unlinkSync" | "rmSync" | "openSync" | "fsyncSync" | "closeSync" | "fstatSync" | "statSync" | "lstatSync" | "ftruncateSync" | "readSync" | "writeSync"> & {
12
- /** @deprecated Accepted for adapter compatibility but never called. */
13
- chmodSync?: typeof syncFs.chmodSync;
14
- fchmodSync?: typeof syncFs.fchmodSync;
15
- };
16
- export type { RenameIdentityPolicy, ReplaceFileAtomicRestoreCleanup, ReplaceFileAtomicRestoreFailureDetails, ReplaceFileCopyFallbackRestorePolicy, ReplaceFileDestinationHardlinkPolicy, };
17
- type ReplaceFileAtomicBaseOptions = {
18
- filePath: string;
19
- content: string | Uint8Array;
20
- dirMode?: number;
21
- mode?: number;
22
- /** Inherit only rwx bits from an existing non-symlink regular file. */
23
- preserveExistingMode?: boolean;
24
- tempPrefix?: string;
25
- renameMaxRetries?: number;
26
- renameRetryBaseDelayMs?: number;
27
- copyFallbackOnPermissionError?: boolean;
28
- copyFallbackRestore?: ReplaceFileCopyFallbackRestorePolicy;
29
- maxRestoreBytes?: number;
30
- destinationHardlinks?: ReplaceFileDestinationHardlinkPolicy;
31
- /** Strict by default; locked content verification is an explicit FUSE compatibility policy. */
32
- renameIdentity?: RenameIdentityPolicy;
33
- syncTempFile?: boolean;
34
- syncParentDir?: boolean;
35
- throwOnCleanupError?: boolean;
36
- };
37
- export type ReplaceFileAtomicOptions = ReplaceFileAtomicBaseOptions & {
38
- fileSystem?: ReplaceFileAtomicFileSystem;
39
- /** Runs while the exact staged file is retained; replacing or hardlinking it is rejected. */
40
- beforeRename?: (params: {
41
- filePath: string;
42
- tempPath: string;
43
- }) => Promise<void>;
44
- };
45
- export type ReplaceFileAtomicSyncOptions = ReplaceFileAtomicBaseOptions & {
46
- fileSystem?: ReplaceFileAtomicSyncFileSystem;
47
- /** Runs while the exact staged file is retained; replacing or hardlinking it is rejected. */
48
- beforeRename?: (params: {
49
- filePath: string;
50
- tempPath: string;
51
- }) => void;
52
- };
53
- export type ReplaceFileAtomicResult = {
54
- method: "rename" | "copy-fallback";
55
- };
1
+ import type { ReplaceFileAtomicOptions, ReplaceFileAtomicSyncOptions, ReplaceFileAtomicResult } from "./replace-file-types.js";
2
+ export type { ReplaceFileAtomicDestinationState } from "./replace-file-mutation.js";
3
+ export type { ReplaceFileAtomicFileSystem, ReplaceFileAtomicSyncFileSystem, ReplaceFileAtomicOptions, ReplaceFileAtomicSyncOptions, ReplaceFileAtomicResult, } from "./replace-file-types.js";
56
4
  export declare function replaceFileAtomic(options: ReplaceFileAtomicOptions): Promise<ReplaceFileAtomicResult>;
57
5
  export declare function replaceFileAtomicWithDirectorySync(options: ReplaceFileAtomicOptions, syncParent?: (directoryPath: string) => Promise<unknown>): Promise<ReplaceFileAtomicResult>;
58
6
  export declare function replaceFileAtomicSync(options: ReplaceFileAtomicSyncOptions): ReplaceFileAtomicResult;
59
- //# sourceMappingURL=replace-file.d.ts.map