@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
@@ -24,7 +24,7 @@ type RootDefaults = {
24
24
  denyMutations?: DenyMutationPolicy; // absolute paths/prefixes mutation methods may not change
25
25
  maxBytes?: number; // refuse reads larger than this many bytes; defaults to 16 MiB
26
26
  mkdir?: boolean; // create missing parent dirs on write/openWritable/append; default true
27
- mode?: number; // file mode applied to new writes; per-call override available
27
+ mode?: number; // requested file mode; per-call override available
28
28
  nonBlockingRead?: boolean; // compatibility hint; safe opens are already nonblocking where supported
29
29
  renameIdentity?: "strict" | "verify-content-with-lock"; // default "strict"
30
30
  symlinks?: "reject" | "follow-within-root" | "follow-parents-within-root"; // read policy
@@ -49,6 +49,10 @@ Every `maxBytes` value must be a non-negative safe integer or positive `Infinity
49
49
 
50
50
  Every method on the returned handle accepts paths relative to the root and rejects anything that would escape it.
51
51
 
52
+ Explicit path, data, and copy-source arguments select the operation. Properties
53
+ with those names in an options object do not replace them; a supplied source
54
+ Root retains ownership of source admission and read policy.
55
+
52
56
  ### Reads
53
57
 
54
58
  ```ts
@@ -64,7 +68,10 @@ fs.walk(rel, options) // root-bounded AsyncIterable<{ relativePath, kin
64
68
 
65
69
  `walk()` is the incremental, root-bounded recursive scan. It supports entry and
66
70
  depth budgets, cancellation, and `symlinkPolicy: "skip" |
67
- "follow-within-root"`. With an entry budget, sorted walks prepare small metadata
71
+ "follow-within-root" | "include"`. Include mode returns links as
72
+ `{ relativePath, kind: "symlink", size }` without resolving or entering their
73
+ targets, including dangling and outside-root links. `size` describes the link,
74
+ not its target. With an entry budget, sorted walks prepare small metadata
68
75
  batches within the remaining budget; unbounded sorted walks reuse the full
69
76
  directory snapshot.
70
77
  The default `order: "sorted"` enumerates and sorts each directory's names;
@@ -72,12 +79,24 @@ The default `order: "sorted"` enumerates and sorts each directory's names;
72
79
  wide directories. Budget exhaustion yields a `"truncated"` marker by
73
80
  default or throws `FsSafeError("too-large")` with `limitBehavior: "throw"`.
74
81
  Use `entryFilter(entry)` to return `"include"`, `"skip"`, or
75
- `"skip-subtree"`. `"skip"` omits the current entry but still descends into a
76
- directory; `"skip-subtree"` omits a directory and all of its descendants.
82
+ `"skip-subtree"`, directly or through a Promise. `"skip"` omits the current
83
+ entry but still descends into a directory; `"skip-subtree"` omits a directory
84
+ and all of its descendants.
85
+ Filters run serially outside metadata batches, with the options object as their
86
+ `this` receiver. After an awaited filter resolves, the walk checks cancellation
87
+ and revalidates the current listing directory and Root identities before using
88
+ the decision. Captured entry metadata retains its snapshot semantics.
89
+
90
+ Cancellation and iterator disposal wait for a pending filter to settle; they do
91
+ not race the callback or close its directory while it is running. Callback
92
+ throws and promise rejections reject the walk through normal cleanup.
77
93
  Directory reads remain fail-fast by default. With
78
94
  `onDirectoryError: "skip-and-report"`, the iterator instead yields
79
95
  `{ relativePath, kind: "directory-error", size: 0, error }` and continues with
80
- the remaining tree.
96
+ the remaining tree. That policy also covers identity-check failures after an
97
+ awaited filter, while callback failures always reject.
98
+ In include mode, a directory that becomes a symlink before descent is a
99
+ `path-mismatch` directory error; it is never silently omitted or followed.
81
100
  See [Directory walking](walk.md) for the pure-Node guarantees and the contrast
82
101
  with the standalone best-effort walkers.
83
102
 
@@ -103,6 +122,10 @@ created through a directory symlink or Windows junction. An absolute path
103
122
  outside the root is still rejected. On Windows, alternate casing is accepted
104
123
  only when the differently cased Root prefix has the Root's exact directory
105
124
  identity; the operation then continues under the trusted Root spelling.
125
+ Absolute paths keep literal `~` components: `readAbsolute("/srv/root/~/file")`
126
+ reads that entry under the root, without expanding the user's home directory.
127
+ Relative `~/file` inputs still expand the home directory and must remain inside
128
+ the Root; use `./~/file` for a literal relative `~` directory.
106
129
 
107
130
  ### Writes
108
131
 
@@ -120,8 +143,37 @@ fs.mkdir(rel, options?) // mkdir -p (creates missing parents)
120
143
  fs.ensureRoot(options?) // accepts "" / "." as the root itself
121
144
  ```
122
145
 
146
+ `mkdir`, `ensureRoot`, `create`, and `createJson` accept `private: true`.
147
+ Missing directories are created with private permissions, and an existing
148
+ requested directory must already be private. Existing ancestors are not
149
+ chmodded or assigned new ACLs. Private files use owner-only POSIX permissions
150
+ or a protected Windows DACL granting access to the current user, System, and
151
+ Administrators. On macOS, private directories and files must also have no ACL;
152
+ creation rejects relevant inheritable parent ACLs, while noninheriting parent
153
+ ACLs remain allowed. A native helper with `inspectDarwinAcl` is required. Native
154
+ `off`, a missing helper, or an older helper without that capability rejects with
155
+ `helper-unavailable` before creating parents or stages. See [creation](creation.md)
156
+ for platform support, synchronous leaf creation, and failure handling.
157
+
158
+ ```ts
159
+ await fs.mkdir("private-data", { private: true });
160
+ await fs.create("private-data/credential", "synthetic credential", { private: true });
161
+ ```
162
+
123
163
  `write`, `create`, `append`, `writeJson`, and `createJson` accept `mode?: number`; use `0o600` for credentials and other private state. `writeJson` also accepts the same options as `JSON.stringify` plus `trailingNewline?: boolean` (defaults `true` so the file ends in `\n`).
124
164
 
165
+ For `append` and `openWritable`, `mode` only affects new-file creation: POSIX
166
+ permissions remain subject to the process umask. These methods do not chmod
167
+ existing files. Replacement and create-only writes apply their final mode
168
+ through the retained descriptor; see [Writing](writing.md#write-options).
169
+
170
+ Buffered `create` and `createJson` also accept `atomic?: boolean`. With `true`,
171
+ complete content is staged before exclusive publication even in native-off mode;
172
+ the fallback requires hardlinks. Omitted or `false` keeps the existing buffered
173
+ publication behavior. Streamed creates always stage complete content. The flag
174
+ does not change `durable` or promise stronger containment or crash durability.
175
+ See [atomic creation and settlement](writing.md#atomic-buffered-creation).
176
+
125
177
  `create` also accepts `AsyncIterable<Uint8Array>` with `RootCreateStreamOptions`:
126
178
  the same path, authority, mode, and durability options, plus `maxBytes` and
127
179
  `signal`, without `encoding` or `renameIdentity`. It consumes one chunk at a
@@ -133,6 +185,8 @@ cleanup, and filesystem requirements.
133
185
  `append` accepts `prependNewlineIfNeeded: true` to separate text from existing
134
186
  content when neither side supplies a newline. String data uses its `encoding`
135
187
  for the newline check, including UTF-16LE; Buffer data uses a single LF byte.
188
+ Empty strings and Buffers add no separator; an empty append still creates a
189
+ missing file.
136
190
 
137
191
  These five methods and `copyIn` also accept `durable?: boolean`: the per-call value overrides
138
192
  `Root.defaults.durable`, which defaults to `true` when omitted. An explicitly
@@ -142,6 +196,11 @@ and parent-directory fsync calls. Use it only for reconstructible data: a crash
142
196
  may lose the write or leave the previous file. See [Writing](writing.md#write-options)
143
197
  for platform details.
144
198
 
199
+ `create` and `createJson` additionally accept `durable: "file"` to require file
200
+ synchronization, including propagating `EPERM`. Parent-directory synchronization
201
+ retains its existing best-effort behavior. This option applies to buffered and
202
+ streamed creation and does not select a publication strategy.
203
+
145
204
  `copyIn` accepts a `RootCopySource`: a trusted absolute source path or a file
146
205
  within another Root. The guarded form supplies `root` with only its `open` and
147
206
  `stat` read capabilities, plus `relativePath`:
@@ -204,8 +263,10 @@ occurred, later cancellation or verification failure preserves the destination.
204
263
  The synchronous optional `onDestinationPublished` callback receives a frozen
205
264
  `RootCopyPublicationReceipt` containing `{ path, dev, ino }`, with exact bigint identity immediately after
206
265
  publication, before later checks can fail. Callback errors also preserve the
207
- published file. This receipt records an outcome; it does not authorize removing
208
- a file that another actor may have edited. Application recovery and cooperative
266
+ published file. Promise, thenable, and synchronous or asynchronous generator
267
+ results reject with `TypeError`; returned generators are never advanced. Other
268
+ synchronous return values are ignored. This receipt records an outcome; it does
269
+ not authorize removing a file that another actor may have edited. Application recovery and cooperative
209
270
  locking remain caller-owned.
210
271
 
211
272
  Existing `copyIn` callers must account for completed destinations retained after
@@ -265,10 +326,19 @@ truncation, append, move, and removal. Buffered writes use bounded chunks and
265
326
  recheck before every partial-write submission; file removal submits a direct
266
327
  unlink request. Native calls that perform multiple filesystem steps are one
267
328
  dispatch. No asynchronous wait separates the check
268
- from that dispatch. A thrown value rejects the operation unchanged; an async
269
- or thenable-returning callback rejects with `TypeError` before that mutation.
270
- Synchronous return values are ignored. Callbacks can run multiple times and
271
- must inspect current authority each time.
329
+ from that dispatch. A thrown value rejects the operation unchanged; a Promise,
330
+ thenable, or synchronous or asynchronous generator result rejects with `TypeError`
331
+ before that mutation. Returned generators are never advanced. Other synchronous
332
+ return values are ignored. Generator detection applies to generator objects
333
+ themselves, not proxy wrappers. Callbacks can run multiple times and must inspect
334
+ current authority during each call; return-value validation does not establish it.
335
+ Directory creation rechecks the retained parent after the callback and before
336
+ submitting mkdir, so a replacement is rejected before creating that component.
337
+ Overwrite moves recheck the retained root, parents, source identity and both
338
+ routes after the callback, including destination parents that were missing
339
+ during preparation. Removals recheck cancellation, retained ancestry and exact
340
+ leaf identity before dispatch; `force` tolerates a missing leaf, not replaced
341
+ ancestry. Removing an admitted hardlink still leaves its other names intact.
272
342
 
273
343
  Already dispatched I/O cannot be revoked. Identity-checked cleanup, final
274
344
  permissions, and durability finish under the existing operation owner even
@@ -288,7 +358,23 @@ For `openWritable()`, the callback covers the library's parent creation,
288
358
  exclusive creation, and truncation. The returned raw `FileHandle` belongs to
289
359
  the caller, which must check authority before its own later writes.
290
360
 
291
- All mutation methods accept `denyMutations?: { paths?: string[]; prefixes?: string[] }`. Entries must be absolute paths. `paths` blocks those exact paths; `prefixes` blocks those paths and their descendants. fs-safe preserves path strings exactly and canonicalizes through existing ancestors before comparing, so a symlinked ancestor to a denied location is still denied. Denied mutations throw `FsSafeError` with code `denied-path`. Use this for caller-specific sensitive paths, not as a replacement for the root boundary, symlink, or hardlink checks.
361
+ All mutation methods accept `denyMutations?: { paths?: string[]; prefixes?: string[] }`. Entries must be absolute paths. `paths` blocks those exact paths; `prefixes` blocks those paths and their descendants. fs-safe preserves path strings exactly and canonicalizes through existing ancestors before comparing, so a symlinked ancestor to a denied location is still denied. Missing suffixes also match prospective case and canonical Unicode normalization aliases: case-folding and Unicode NFC/NFD-equivalent spellings cannot bypass a denied path or prefix. A read-only observation of the existing parent can establish that ASCII case variants are distinct. Admission never creates temporary probe files or directories. If sensitivity cannot be established (including empty or unreadable parents, future directories, and Unicode normalization), equivalent suffixes are denied conservatively, even on a filesystem that would allow distinct names. Distinct existing canonical ancestors and unrelated names remain distinct. Observations are local to each synchronous policy check and are refreshed after callbacks or mutations. This conservative fallback does not model other filesystem-specific equivalences, such as HFS+ ignorable formatting characters.
362
+
363
+ Denied mutations throw `FsSafeError` with code `denied-path`. Use this for caller-specific sensitive paths, not as a replacement for the root boundary, symlink, or hardlink checks.
364
+
365
+ `move()` snapshots its merged default and per-call mutation policy before
366
+ asynchronous preparation. Later changes to the original policy objects or arrays
367
+ apply to subsequent calls. Use `assertBeforeMutation` for live revocation of an
368
+ in-flight move.
369
+
370
+ For writes, creates, streams, and copies, parent creation admits the prospective
371
+ file and each missing directory before creating that directory, including on the
372
+ Windows native route. An exact deny on an existing parent does not prevent using
373
+ that parent to write an allowed child. If a deeper missing parent is denied,
374
+ earlier admitted directories may remain; the denied directory and file are not
375
+ created. With `mkdir: false`, missing parents are never created. Native Windows
376
+ policy-aware creation requires the direct-child helper and fails with
377
+ `helper-unavailable` if it is absent.
292
378
 
293
379
  All mutation methods also accept `mutationSymlinks`. `"reject"` rejects symlink
294
380
  components; `"follow-parents-within-root"` resolves contained parent directory
@@ -309,6 +395,12 @@ fs.entries(rel, options?) // nonrecursive AsyncIterable<DirEntry>, includ
309
395
  fs.resolve(rel) // absolute path inside the root, after canonicalization
310
396
  ```
311
397
 
398
+ Directory enumeration (`list`, `entries`, and `walk`) requires UTF-8 filenames.
399
+ A discovered name that cannot be represented losslessly as a JavaScript string
400
+ rejects with `invalid-path`, before looking up metadata through that name.
401
+ Streaming traversal may already have yielded earlier entries. Literal Unicode
402
+ replacement characters (`U+FFFD`) remain valid names.
403
+
312
404
  These do not pin a later operation. During `stat()`, the exact selected target and
313
405
  parent are checked around metadata collection; `list()` checks one exact selected
314
406
  directory around the complete name/metadata batch instead of repeating containment
@@ -355,6 +447,12 @@ fs.rootWithSep // rootReal with a trailing separator, for prefix comparisons
355
447
  fs.defaults // the RootDefaults you passed
356
448
  ```
357
449
 
450
+ The path properties are readonly metadata. Each Root retains the canonical
451
+ directory and exact identity admitted when it was created; changing object
452
+ properties is not a supported way to retarget it. Create another Root to use a
453
+ different directory. The `defaults` reference is readonly, while the supplied
454
+ object's option values remain live for later calls.
455
+
358
456
  ## Failure semantics
359
457
 
360
458
  Boundary and policy failures throw `FsSafeError` with a `code`. Parsing callbacks
@@ -113,6 +113,14 @@ If an already validated descriptor fails while reading, both readers throw an
113
113
  operational `FsSafeError` with `code: "read-failed"`; inspect `cause` for the
114
114
  underlying Node filesystem code such as `EIO`.
115
115
 
116
+ Caught `null` or `undefined` inspection and read failures are reported as
117
+ structured errors with an `Error` cause carrying `"null"` or `"undefined"`,
118
+ instead of an internal `TypeError` while inspecting the thrown value.
119
+
120
+ A synchronous reader closes its descriptor once. A close failure preserves an
121
+ earlier read or identity-validation error; after a successful read, the close
122
+ failure is reported before trimming or rejecting empty content.
123
+
116
124
  Use the async strict reader when a service cannot start safely without the
117
125
  credential:
118
126
 
@@ -133,6 +141,20 @@ startWebhookVerifier(signingKey);
133
141
 
134
142
  Async. Creates the parent directory at `dirMode` (default `0o700`) if missing, writes content to a sibling temp file, finalizes `mode` (default `0o600`) through an owned descriptor after content writes, and atomically renames over the destination. Publication verification checks the final file identity and mode.
135
143
 
144
+ Both secret writers capture top-level parameter values when called, before
145
+ asynchronous filesystem preparation; a supplied byte buffer is captured by
146
+ reference. A parameter getter throwing `null` or `undefined` rejects with that
147
+ same value before filesystem inspection.
148
+
149
+ On POSIX, both native and JavaScript writers verify actual `0o600` permission
150
+ bits through the retained descriptor before writing content. A filesystem that
151
+ reports successful chmod without enforcing those bits fails with
152
+ `insecure-permissions` before any payload is written, including when an explicit
153
+ `dirMode` permits other users to traverse the parent. The requested final `mode`
154
+ is still applied after content writes, including restrictive and special-bit
155
+ overrides. This mode-bit check does not require native ACL inspection; JavaScript
156
+ secret writes remain available on macOS.
157
+
136
158
  Concurrent writes to distinct leaves may share creation of a missing parent.
137
159
  After a parent-creation race, the helper re-inspects the entry and requires a
138
160
  non-symlink directory, then revalidates root/parent guards, containment, and
@@ -192,6 +214,10 @@ Both mode options must resolve to integers between `0o0000` and `0o7777`; invali
192
214
 
193
215
  After this operation wins directory creation, initialization uses a pinned descriptor bound to the admitted identity and effective user, with ancestor checks before chmod. It does not chmod the caller's pathname. Creation and descriptor admission are separate operations, not an atomic create-and-pin guarantee. A raced directory that has not reached its requested mode yet is rejected rather than repaired; callers may retry after its creator finishes initialization.
194
216
 
217
+ If initial directory-descriptor admission fails, its original identity, ownership,
218
+ or inspection error is preserved even when closing the rejected descriptor fails.
219
+ Close failures after successful admission remain reportable.
220
+
195
221
  Initialization fails closed if the platform cannot safely pin a created directory. In particular, a non-root macOS process cannot pin a new `000` directory produced by `umask(0o777)`; the write fails without repairing that directory or writing a secret. Restrictive masks retaining owner search permission remain usable. Linux x64/arm64 can use the guarded `O_PATH`/procfs descriptor route where available. There is no unguarded pathname-chmod fallback, and a failure may leave a created directory for caller-managed cleanup.
196
222
 
197
223
  ### `createSecretFileAtomic(params)`
@@ -202,6 +228,15 @@ if anything already occupies the target path it throws
202
228
  `FsSafeError("secret-exists")` without modifying that entry. Use the distinct
203
229
  name when first-writer-wins is part of the credential protocol.
204
230
 
231
+ Its `durable` option also accepts `"file"`, matching `Root.create()`. This
232
+ requires every file `fsync` to succeed, including on `EPERM`, while parent-directory
233
+ synchronization remains best effort. The default and boolean options retain their
234
+ existing behavior. `writeSecretFileAtomic()` continues to accept boolean durability.
235
+
236
+ Strict file synchronization preserves the existing publication strategy and
237
+ identity-checked cleanup. A failed file flush before staged publication prevents
238
+ publication; a failure after publication can leave the complete file present.
239
+
205
240
  Distinct leaves can share missing-parent creation without a `secret-exists`
206
241
  error. Concurrent creates at the same leaf still have exactly one winner;
207
242
  the loser receives `secret-exists` and leaves the winner's bytes intact.
@@ -218,6 +253,7 @@ try {
218
253
  rootDir: "/var/lib/app/credentials",
219
254
  filePath: "/var/lib/app/credentials/provider.refresh-token",
220
255
  content: refreshToken,
256
+ durable: "file",
221
257
  });
222
258
  } catch (error) {
223
259
  if (!(error instanceof FsSafeError) || error.code !== "secret-exists") throw error;
@@ -270,9 +306,9 @@ await withTimeout(
270
306
 
271
307
  ## Threat model notes
272
308
 
273
- - These helpers protect the secret file from **other processes with the same UID** that respect filesystem permissions. They do not defend against root or against attackers who can read process memory.
309
+ - On POSIX, the default `0600` file and `0700` directory modes restrict group and other access. They do not protect against processes with the same UID, root, attackers who can read process memory, or access granted by additional ACL entries.
274
310
  - Validation failures are tripwires, not authorization. Investigate before clearing a rejected credential file.
275
- - If the destination directory is on a tmpfs that does not honor mode bits, the helpers will set the mode bits but the OS may ignore them. Audit your platform.
311
+ - On POSIX, a file that still reports a mode other than `0600` after initialization is rejected with `insecure-permissions` before payload is written. Matching mode reports alone cannot prove that an arbitrary filesystem actually enforces those permissions.
276
312
 
277
313
  ## See also
278
314
 
@@ -27,9 +27,13 @@ The helper:
27
27
  - enforces `maxBytes` before and after reading
28
28
  - closes the handle on success, error, and timeout
29
29
 
30
- On POSIX, unsafe permissions mean group/world writable, and group/world readable unless `permissions.allowReadableByOthers` is true. On Windows, the helper queries owner, DACL, and locality from the same open descriptor that supplies the bytes. The native query returns the 32-bit volume serial and 64-bit file-index projection used by Node, which must equal Node's bigint descriptor receipt before its ACL facts are trusted. This avoids JavaScript number rounding but does not represent the full 128-bit file identity available on ReFS. Only the current user, LocalSystem, and built-in Administrators are trusted owner classes.
30
+ On POSIX, unsafe permissions mean group/world writable, and group/world readable unless `permissions.allowReadableByOthers` is true. On Windows, the helper queries owner, DACL, and locality from the same open descriptor that supplies the bytes. Both native and system-command queries return the 32-bit volume serial and 64-bit file-index projection used by Node, which must equal Node's bigint descriptor receipt before its ACL facts are trusted. This avoids JavaScript number rounding but does not represent the full 128-bit file identity available on ReFS. Only the current user, LocalSystem, and built-in Administrators are trusted owner classes.
31
31
 
32
- Windows secure reads require the matching current optional native package. A missing or stale helper, fd-to-handle conversion failure, denied `READ_CONTROL`, remote handle, incomplete descriptor, or unsupported ACE form rejects with `permission-unverified` before content is read. A malformed or different handle identity rejects with `path-mismatch`. There is no pathname-command fallback for `readSecureFile()`; the standalone reporting APIs in [`permissions`](permissions.md) retain their documented fallbacks. `permissions.allowInsecure` remains the explicit escape hatch and bypasses the ACL query.
32
+ Windows secure reads prefer the matching optional native package. In native `auto` or `off` mode, a missing binding or descriptor-inspection capability uses a packaged, readable PowerShell script and adjacent C# source to inspect the borrowed file handle. This route requires the [Windows security fallback prerequisites](install.md#windows-security-fallback), including permission to run the scripts under normal system policy. The command does not read file contents or reopen the pathname. Successful inspection waits for the child to exit and its output pipes to close. This emits a path-free `FS_SAFE_NATIVE_FALLBACK` warning once per process for secure reads and adds PowerShell startup and compilation overhead to each inspection.
33
+
34
+ Descriptor commands have a 30-second deadline. After a timeout or transport failure, fs-safe requests termination, waits at most one further second, and then rejects even if process exit or pipe closure remains unconfirmed. It closes its own output pipes and reports the observed exit separately from the termination attempt in the error cause. If the OS refuses termination, the child may retain its independently inherited Windows handle; closing the caller's descriptor cannot retarget that handle. No file bytes are returned from a failed inspection.
35
+
36
+ Native `require` still rejects a missing binding or capability with `permission-unverified`, without starting a command. An available native helper's failure is terminal. On either route, fd-to-handle conversion failure, denied `READ_CONTROL`, a remote handle, incomplete descriptor, unsupported ACE form, or unavailable command support rejects with `permission-unverified` before content is read. A malformed or different handle identity rejects with `path-mismatch`. The standalone reporting APIs in [`permissions`](permissions.md) retain their documented pathname fallbacks. `permissions.allowInsecure` remains the explicit escape hatch and bypasses the ACL query.
33
37
 
34
38
  Descriptor, pathname, and realpath identity checks use bigint stats internally to avoid JavaScript number rounding. The returned `stat` remains a normal Node `Stats` object with numeric fields. A zero Windows device or inode is unverified, never a match: the helper re-inspects that identity once using the same descriptor or pathname, then rejects persistent ambiguity with `path-mismatch`. A definite mismatch rejects immediately; retries retain known identity components and still enforce symlink policy.
35
39
 
@@ -92,13 +96,14 @@ On an actual Windows process with effective `platform: "win32"`, `inject.env` an
92
96
  | `timeout` | `timeoutMs` elapsed while reading. |
93
97
 
94
98
  Windows descriptor-inspection failures are operational `permission-unverified`
95
- errors and refuse the read. The original native exception is retained as
99
+ errors and refuse the read. The original native or descriptor-command exception is retained as
96
100
  `cause`; treat causes as restricted local diagnostic data. No pathname or ACL
97
101
  content is copied into the display message. Test adapters that simulate Windows
98
102
  on another operating system retain the standalone pathname inspector's
99
103
  structured command diagnostics (`ownerError`, `command`, `durationMs`,
100
104
  `timedOut`, `exitCode`, `signal`, and bounded escaped `stderr`). Actual Windows
101
- secure reads do not start those commands. No retries are performed.
105
+ secure reads never invoke the injected pathname inspector: their optional
106
+ command route inspects the borrowed descriptor instead. No retries are performed.
102
107
 
103
108
  ## See also
104
109
 
@@ -232,13 +232,16 @@ The library does not modify or constrain the global Node.js `fs` namespace, and
232
232
 
233
233
  | Mechanism | Reported containment | Boundary |
234
234
  |---|---|---|
235
- | Linux native | `kernel-atomic` | `openat2(RESOLVE_BENEATH | RESOLVE_NO_MAGICLINKS)` resolves and opens under the root in one kernel operation. |
235
+ | Linux native with `openat2` | `kernel-atomic` | `openat2(RESOLVE_BENEATH | RESOLVE_NO_MAGICLINKS)` resolves and opens under the root in one kernel operation. |
236
+ | Linux native without `openat2` | `best-effort` | A no-follow `openat` component walk retains each parent and verifies exact identity associations before and after the final open; all symlink components are rejected. |
236
237
  | macOS native | `best-effort` | macOS 15.4 and newer use `O_RESOLVE_BENEATH` first; older kernels use the guarded `openat(O_NOFOLLOW)` component walk. Both verify the opened descriptor with `F_GETPATH`. |
237
238
  | Windows native | `best-effort` | Handle-relative `NtCreateFile` rejects reparse points, but this package does not claim a Linux-style atomic beneath guarantee. |
238
239
  | JavaScript fallback | `best-effort` | Canonical checks, no-follow opens where Node exposes them, and post-open identity checks form a check-then-use sequence. |
239
240
 
240
241
  The macOS `F_GETPATH` verification is an escape detector, not a race-atomic guarantee. A hostile same-UID process can rename a directory after `O_RESOLVE_BENEATH` or the manual walk and race the post-open sample or a later descriptor-relative mutation. The native result therefore remains `best-effort` on macOS even when the kernel flag is available. No policy decision is attached to these labels; callers can inspect the fact and decide what their own threat model requires.
241
242
 
243
+ The Linux fallback's identity checks are also detection-based: a directory can be renamed between chain samples or before a later descriptor-relative mutation. It cannot provide atomic resolution, and rejection after a mutating open does not promise rollback. See [Linux without openat2](native.md#linux-without-openat2) for the cached capability probe, conservative symlink rejection, and operations that remain unavailable.
244
+
242
245
  The public `OpenResult`, `ReadResult`, and `WritableOpenResult` expose `containment`. Those root APIs currently report `best-effort`; direct native `openBeneath()` reports the platform value above. No-replace publication uses `renameat2(RENAME_NOREPLACE)` on Linux, `renameatx_np(RENAME_EXCL)` on macOS, and `FileRenameInfoEx` with replacement disabled on Windows, but those separate mutation semantics do not upgrade an open result's containment label.
243
246
 
244
247
  ## Limitations to keep in mind
@@ -9,6 +9,13 @@ normal meaning, and ordinary colon-bearing POSIX paths remain valid.
9
9
 
10
10
  JavaScript raw-sidecar creation passes mode `0o600` to that exclusive open. On POSIX, the process umask may further restrict the new file but cannot add group or other access. No pathname `chmod` fallback is used.
11
11
 
12
+ Root-backed lock records and reclaim guards also claim their final name
13
+ exclusively, including with the native backend. The native path retains the
14
+ admitted parent descriptor and removes incomplete claims only while their exact
15
+ identity remains owned. Ordinary Root creates still stage privately; lock records
16
+ use this internal exclusive-create path so racing contenders can retry without
17
+ an ambiguous rename outcome.
18
+
12
19
  ```ts
13
20
  import { acquireFileLock } from "@openclaw/fs-safe/file-lock";
14
21
 
@@ -28,17 +35,39 @@ try {
28
35
 
29
36
  The lock file sits next to the protected resource. If a process crashes mid-lock, the next acquirer notices the held entry, inspects its payload (PID, host, acquired-at timestamp), and decides — via `shouldReclaim` (defaulting to "is the lock older than `staleMs`?") — whether it should keep waiting or fail.
30
37
 
31
- On natural event-loop shutdown, a globally deduplicated `process.on("beforeExit")` handler attempts asynchronous cleanup of held Root-backed locks through their retained Root capability and ownership receipt. The synchronous `process.on("exit")` handler provides last-chance cleanup for raw locks and reclaim guards. Changed sidecars and failed Root cleanup remain in place; cleanup does not keep retrying during shutdown unless another acquisition re-arms it. Locks acquired with `retainOnExit: true` are exempt from both handlers: their sidecar stays in place after exit and is governed only by the caller's own stale policy. Because exit handlers are globally deduplicated across package copies, `retainOnExit` fails closed with `helper-unavailable` if an older copy that cannot honor it registered the handlers first.
38
+ On natural event-loop shutdown, a globally deduplicated `process.on("beforeExit")` handler attempts asynchronous cleanup of held Root-backed locks through their retained Root capability and ownership receipt. The synchronous `process.on("exit")` handler provides last-chance cleanup for raw locks and raw-path reclaim guards. Changed sidecars and failed Root cleanup remain in place; cleanup does not keep retrying during shutdown unless another acquisition re-arms it. Locks acquired with `retainOnExit: true` are exempt from both handlers: their sidecar stays in place after exit and is governed only by the caller's own stale policy. Because exit handlers are globally deduplicated across package copies, `retainOnExit` fails closed with `helper-unavailable` if an older copy that cannot honor it registered the handlers first.
39
+
40
+ Asynchronous Root-backed stale recovery uses a regular file at the
41
+ `.reclaim` name, created, verified, and removed through that Root. Its ownership
42
+ token and exact bytes are checked after awaited decisions and before stale
43
+ removal; Root mutation policies also apply to the guard. Raw and synchronous
44
+ Root reclaimers use directories and recognize these files as occupied guards.
45
+ Each asynchronous attempt owns its guard directly, outside process-exit cleanup,
46
+ so `beforeExit` cannot release an exclusion still needed by an unsettled attempt.
47
+ Normal completion removes it through the Root. Interrupted creation, revoked
48
+ cleanup authority, identity changes, or process exit can leave the guard in
49
+ place; recover it only after an application-owned liveness check proves the
50
+ attempt has ended. There is no raw-path cleanup fallback. These token/byte
51
+ checks retain the sidecar protocol's cooperative, non-atomic removal boundary.
52
+ The final guard check follows the last sidecar snapshot and parser call, before
53
+ removal. Parsers can run before guard ownership is established or verified;
54
+ invocation is not mutation authority. A failing final parser keeps its error
55
+ even if guard ownership has also changed.
56
+ `manager.reset()` invalidates admission bookkeeping but preserves a pending
57
+ Root guard; let its original attempt settle before retrying that guarded path.
58
+ It stops compromise monitoring for forgotten holders, including callbacks from checks already in flight.
32
59
 
33
60
  Always release locks in a `finally` block. Application-managed graceful shutdown can await `release()` or `manager.drain()` before terminating. Explicit `process.exit()`, uncaught failures, crashes, default signal handling, and fatal termination (including `SIGKILL`) do not reliably run asynchronous Root cleanup and may leave sidecars. Recover only after an application-owned liveness policy proves the holder cannot still be writing.
34
61
 
35
- Exit cleanup tolerates shared managers created by older package copies that lack reclaim-guard state, and continues through later manager domains. Handler ownership remains first-registration-wins: loading an updated copy does not replace an older copy's registered handler. Restart with the updated copy registering first to obtain the fix. After building, `node scripts/legacy-lock-exit-proof.mjs` checks clean exit, removal of legacy and modern raw locks, and preservation of a retained lock using synthetic temporary files.
62
+ Exit cleanup tolerates shared managers created by older package copies that lack reclaim-guard state, and continues through later manager domains. Handler ownership remains first-registration-wins: loading an updated copy does not replace an older copy's registered handler. First registration is committed only after Node accepts the listener; synchronous `newListener` reentry fails closed and a thrown registration rolls back so a later acquisition can retry. Restart with the updated copy registering first to obtain the fix. After building, `node scripts/legacy-lock-exit-proof.mjs` checks clean exit, removal of legacy and modern raw locks, and preservation of a retained lock using synthetic temporary files.
63
+
64
+ Each new sidecar also carries an internal random ownership token encoded as JSON trailing whitespace. `JSON.parse()` and every payload callback still see exactly the caller-provided object. Only the process that successfully created the sidecar keeps that token as release authority; merely reading token-shaped bytes from disk does not enable this mode. Release compares the in-memory token and exact serialized bytes, and requires the pathname to remain a regular file, instead of requiring an opened descriptor and pathname lookup to report the same inode identity. This preserves ownership checks on filesystems such as Docker Desktop VirtioFS where those two views can legitimately differ. Sidecars created by older releases have no token and retain the legacy identity-plus-content check. Raw acquisition, snapshot, and exit cleanup capture bigint device/inode values; unsafe numeric identities from older in-process receipts cannot authorize cleanup. If Windows reports a zero device or inode for either identity observation, that check is inconclusive and removal is skipped.
36
65
 
37
- Each new sidecar also carries an internal random ownership token encoded as JSON trailing whitespace. `JSON.parse()` and every payload callback still see exactly the caller-provided object. Only the process that successfully created the sidecar keeps that token as release authority; merely reading token-shaped bytes from disk does not enable this mode. Release compares the in-memory token and exact serialized bytes, and requires the pathname to remain a regular file, instead of requiring an opened descriptor and pathname lookup to report the same inode identity. This preserves ownership checks on filesystems such as Docker Desktop VirtioFS where those two views can legitimately differ. Sidecars created by older releases have no token and retain the legacy identity-plus-content check.
66
+ Last-chance raw-lock exit cleanup requires known Windows device and inode values from both pathname observations and the opened descriptor. A zero value leaves the sidecar in place, including for token-owned locks. Known descriptor/path identity differences remain supported; a pathname identity change during the read still prevents cleanup.
38
67
 
39
68
  The raw sidecar bytes are not a canonical JSON representation: tools that trim or rewrite the trailing whitespace invalidate the ownership token, so release leaves the changed sidecar in place and fails closed. The token distinguishes cooperating acquisitions; it is not a secret and does not make pathname compare-and-remove atomic against a hostile process that can replace files outside the lock protocol.
40
69
 
41
- `release()` propagates an I/O failure that prevents deletion of an unchanged, owned sidecar; it never reports successful cleanup while leaving that lock behind. The handle and manager retain the exact cleanup receipt after a failure, so the same handle can retry `release()` and `manager.drain()` can retry retained cleanup. A changed sidecar remains an ownership mismatch rather than a deletion failure and is left untouched. If both a `withFileLock()` callback and release fail, the release error is the primary `SuppressedError.error` and the callback failure remains available as `SuppressedError.suppressed`. Failed asynchronous acquisition cleanup uses the same shape, with the cleanup error primary and the acquisition failure suppressed. On Node runtimes without the global `SuppressedError` constructor, fs-safe returns the equivalent `Error` shape with the same name and properties.
70
+ `release()` propagates an I/O failure that prevents deletion of an unchanged, owned sidecar; it never reports successful cleanup while leaving that lock behind. The handle and manager retain the exact cleanup receipt after a failure, so the same handle can retry `release()` and `manager.drain()` can retry retained cleanup. A changed sidecar remains an ownership mismatch rather than a deletion failure and is left untouched. If both a `withFileLock()` or `withFileLockSync()` callback and release fail, the release error is the primary `SuppressedError.error` and the callback failure remains available as `SuppressedError.suppressed`. Failed asynchronous acquisition cleanup uses the same shape, with the cleanup error primary and the acquisition failure suppressed. On Node runtimes without the global `SuppressedError` constructor, fs-safe returns the equivalent `Error` shape with the same name and properties.
42
71
 
43
72
  ## API
44
73
 
@@ -62,6 +91,41 @@ function withFileLockSync<T, TPayload>(targetPath: string, options: FileLockSync
62
91
 
63
92
  `managerKey` is an optional identifier used to keep state isolated across multiple lock domains in the same process. Use distinct keys for distinct domains (`"snapshot"`, `"compact"`, `"build"`). If omitted, fs-safe derives one from the target path.
64
93
 
94
+ Within one manager domain, the canonical target path is the in-process
95
+ arbitration key even when callers supply different explicit `lockPath` values.
96
+ Admission remains pending while payload serialization and stale-policy callbacks
97
+ run, and becomes reentrant only after a matching owner is fully published.
98
+ Foreign owners wait or reach the configured timeout without opening their
99
+ alternate sidecar. Each unguarded attempt still invokes and serializes `payload`
100
+ before a completed foreign holder consumes retry budget, preserving callback and
101
+ retry compatibility; the holder is rechecked before delayed option accessors or
102
+ sidecar I/O. When the candidate resolves to the holder's actual sidecar (the
103
+ default path or an explicitly identical path), asynchronous retries also preserve
104
+ the existing parser observation: bytes are observed first, then its accessor is
105
+ read and the current holder bytes are parsed once per unguarded attempt.
106
+ Distinct alternate sidecars do not trigger that observation. Async acquisition releases
107
+ pending admission before retry backoff;
108
+ synchronous callback reentry cannot let the active stack progress, so it fails
109
+ closed with the normal `file_lock_timeout` fields. Async payload, serialization,
110
+ delayed-option, and stale-policy callbacks carry a process-shared ancestry scope:
111
+ a nested acquisition of the same canonical target in the same manager domain
112
+ fails before waiting on its ancestor, while independent tasks, different targets,
113
+ and different manager domains retain their normal retry behavior. The synchronous
114
+ API uses one process-wide domain. An ancestry snapshot keeps each ancestor that
115
+ is active when the child acquisition starts, even if the current callback's own
116
+ scope already became inactive; later deactivation cannot reclassify that child.
117
+ Detached work started only after every matching ancestor has finished is not
118
+ retained as a descendant. Promise-like callback results are assimilated inside
119
+ that ancestry scope, and the resolved payload crosses the internal return
120
+ boundary in a non-thenable envelope. The helper therefore does not observe a
121
+ stateful payload `then` accessor again outside the reservation.
122
+
123
+ The pending-admission registry coordinates package copies that implement this
124
+ protocol without placing incomplete state in the legacy held-lock map. An older
125
+ already-loaded executable copy does not consult that registry, so a mixed-version
126
+ process cannot rely on the new in-process arbitration until every copy is updated
127
+ and the process is restarted.
128
+
65
129
  ## Acquire options
66
130
 
67
131
  ```ts
@@ -105,7 +169,11 @@ type FileLockRetryOptions = {
105
169
  };
106
170
  ```
107
171
 
108
- `payload` is a function so you can re-evaluate it on each retry (e.g. timestamp, PID).
172
+ `payload` is a function so you can re-evaluate it on each retry (e.g. timestamp,
173
+ PID). Callback-valued option accessors are otherwise captured once for an
174
+ acquisition; the asynchronous same-sidecar parser observation above reads
175
+ `parsePayload` once per unguarded attempt. Callback invocation keeps its
176
+ established receiver behavior.
109
177
 
110
178
  Asynchronous acquisition snapshots `targetPath`, an explicit `lockPath`, and
111
179
  `lockRoot` before its first asynchronous operation. Cwd-dependent path spellings
@@ -133,6 +201,10 @@ explicit `retry.retries` still applies with `timeoutMs: Infinity`, and zero allo
133
201
  only the initial attempt. After process defaults are applied, an omitted retry
134
202
  count means unlimited retries, and an omitted or infinite timeout means no
135
203
  deadline. With neither budget bounded, contention can wait indefinitely.
204
+ Finite deadlines use monotonic elapsed time, so system clock corrections do not
205
+ extend or shorten the retry budget. Payload timestamps, `heldEntries().acquiredAt`,
206
+ and stale-policy `nowMs` remain wall-clock based. Deadlines are checked at retry
207
+ boundaries; they do not interrupt callbacks or filesystem operations.
136
208
  `parsePayload` replaces JSON parsing for legacy or custom sidecars. Its `unknown`
137
209
  result is passed to `shouldReclaim` and `shouldRemoveStaleLock`, allowing PID,
138
210
  process-start, argv, or role schemas to remain application-owned.
@@ -197,6 +269,8 @@ Pass `lockRoot` to place sidecar create, read, verification, and removal behind
197
269
  an existing `Root` capability. `lockPath` must resolve inside that root.
198
270
  Identity-conditioned removal remains the only release and reclaim deletion
199
271
  path.
272
+ Root mutation refusals during stale removal propagate unchanged, including
273
+ `null`, `undefined`, and errors carrying `ENOENT`; they do not become missing-sidecar retries.
200
274
 
201
275
  Async Root-backed acquisition normalizes the target's parent without creating
202
276
  it, checking the retained Root before and after normalization. A deleted or
@@ -230,10 +304,11 @@ Discarding an acquisition observation is not proof that the pathname is absent:
230
304
  another owner may already have created the next record. Every discarded
231
305
  observation consumes the normal retry/deadline budget and requires fresh
232
306
  exclusive creation. It supplies no release, reclaim, or held-lock authority.
233
- If that successor disappears during the recovery metadata probe, the waiter
234
- may discard the probe only with an operation-local receipt for an admitted
235
- regular file with one link, followed by current Root and canonical ancestor
236
- checks. A generic metadata error does not permit this retry, and public
307
+ If that successor disappears or is replaced during the recovery metadata probe,
308
+ the waiter may discard the probe only with an operation-local receipt for an
309
+ admitted regular file with one link. Replacement also requires a single exact
310
+ observation of a different regular file with one link. Current Root and canonical
311
+ ancestor checks must still pass. A generic metadata error does not permit this retry, and public
237
312
  `Root.stat()` still rejects a file that changes during observation.
238
313
  Generic `Root.open()` and held-owner/reclaim reads still reject failed opens.
239
314
  Moving an already-matched pinned descriptor without unlinking it, unknown or
@@ -270,6 +345,12 @@ sidecar no longer matches or after a verification I/O failure. This is
270
345
  detection, not revocation of work already in progress. Asynchronous checks are
271
346
  serialized, so a slow verification never overlaps the next timer tick.
272
347
 
348
+ Ownership-only checks compare serialized bytes, tokens, and file identities
349
+ without decoding an unused default JSON payload. Stale-policy reads still
350
+ decode the payload. Explicit `parsePayload` callbacks keep their existing
351
+ verification and asynchronous-cleanup calls, receivers, and errors;
352
+ synchronous release continues without invoking a custom parser.
353
+
273
354
  The compromise-check interval is validated before payload evaluation or
274
355
  filesystem acquisition. Omit it or pass `0` to disable monitoring; enabled
275
356
  intervals must be finite and between 1 and 2,147,483,647 milliseconds. Values
@@ -295,6 +376,46 @@ deadline budget. Errors from descriptor reads/stats or parsing are not treated
295
376
  as missing snapshots, even when their code is `ENOENT`. Held verification,
296
377
  release, and reclaim do not retry open denials.
297
378
 
379
+ Synchronous `lockRoot` is an authority boundary, not only a containment hint.
380
+ It requires a genuine `Root` returned by the same loaded package copy; a
381
+ structural/custom Root lookalike or a handle constructed by another installed
382
+ copy fails with `helper-unavailable` before any remaining acquisition option or
383
+ nested retry getter, payload evaluation, or filesystem effects. After reading
384
+ `lockRoot` once, the genuine Root and its policies are snapshotted before those
385
+ getters run. Construct `lockRoot` through the same import instance that provides
386
+ the synchronous lock function. The acquirer retains the original Root context,
387
+ exact root, parent, and file identities, and the Root's entry-time read, hardlink,
388
+ mutation-symlink, `denyMutations`, and `assertBeforeMutation` policies. Those
389
+ receipts remain authoritative through same-owner reuse, compromise checks,
390
+ reclaim, explicit release, and process-exit cleanup. If the Root, an admitted
391
+ parent, or the owned entry changes, cleanup leaves the ambiguous path in place.
392
+ Root-backed synchronous records and their exit handler use a separate versioned
393
+ global domain; legacy raw-lock handlers and legacy package copies cannot adopt or
394
+ pathname-delete those records. Root and raw acquisitions never share a
395
+ reentrant reference, even when their owner strings match.
396
+
397
+ As with asynchronous Root-backed acquisition, synchronous target normalization
398
+ does not create the target's parent. An explicit in-root `lockPath` can therefore
399
+ guard an external or not-yet-created target key without creating anything next
400
+ to that target. Missing directories for the sidecar itself are created one
401
+ component at a time through the retained Root policy; the returned `lockPath`
402
+ uses the admitted canonical spelling. This strengthens earlier synchronous
403
+ behavior that treated `lockRoot` as a one-time lexical/canonical bound and used
404
+ raw pathname operations afterward.
405
+
406
+ Windows Root-backed target keys use native existing-ancestor canonicalization,
407
+ so long and short spellings of the same target parent share an arbitration key.
408
+ Sidecar admission applies both the retained mutation policy and read/final-link
409
+ policy before payload evaluation; a dangling final sidecar link is rejected
410
+ without creating its target.
411
+
412
+ Exact Root, parent, and file receipts narrow replacement races but do not make a
413
+ pathname check and the following `open`, `mkdir`, `unlink`, or `rmdir` one atomic
414
+ filesystem operation. A hostile peer with direct write access can still race the
415
+ final syscall. An observed mismatch fails closed and ambiguous entries remain;
416
+ use OS-enforced directory permissions or a native descriptor-relative primitive
417
+ when that attacker model must be excluded.
418
+
298
419
  Both synchronous helpers consume the [process-wide lock defaults](config.md#configurefssafelocks-config).
299
420
  A synchronous retry sleep is clamped to the remaining finite deadline, so a long or jittered backoff cannot extend the configured timeout or block forever.
300
421
  Per-call options take precedence, including zero values; a per-call `retry`
@@ -332,6 +453,7 @@ error.
332
453
  The sync payload, reclaim, and parsing callbacks must also be synchronous. This
333
454
  shape is appropriate for a short boot migration; it is a poor fit for a server
334
455
  request because retry backoff uses a blocking wait.
456
+ Synchronous `shouldReclaim` and `shouldRemoveStaleLock` reject Promise or thenable results with `TypeError` before deleting the observed sidecar; an asynchronous result is never approval.
335
457
 
336
458
  If termination skips the relevant cleanup handler or cleanup fails, the sidecar remains. In particular, `process.exit()` skips asynchronous Root cleanup; await explicit release or drain during application-managed graceful shutdown. Once `staleMs` elapses (or your `shouldReclaim` returns true), acquisition fails closed by default instead of deleting by path.
337
459