@openclaw/openshell-sandbox 2026.9.3 → 2026.9.5
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.
- package/assets/activity.svg +3 -0
- package/assets/icon.png +0 -0
- package/dist/index.js +32 -26
- package/node_modules/@openclaw/fs-safe/CHANGELOG.md +285 -0
- package/node_modules/@openclaw/fs-safe/LICENSE +1 -0
- package/node_modules/@openclaw/fs-safe/README.md +65 -10
- package/node_modules/@openclaw/fs-safe/dist/absolute-path.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/absolute-path.js +33 -11
- package/node_modules/@openclaw/fs-safe/dist/advanced.d.ts +8 -1
- package/node_modules/@openclaw/fs-safe/dist/advanced.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/advanced.js +8 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-crc32.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-crc32.js +6 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-deadline.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-deadline.js +3 -4
- package/node_modules/@openclaw/fs-safe/dist/archive-durability.d.ts +24 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-durability.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-durability.js +180 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-entry.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-entry.js +8 -8
- package/node_modules/@openclaw/fs-safe/dist/archive-gzip-tail.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-gzip-tail.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-gzip-tail.js +33 -8
- package/node_modules/@openclaw/fs-safe/dist/archive-input.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-input.js +14 -8
- package/node_modules/@openclaw/fs-safe/dist/archive-kind.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-kind.js +3 -2
- package/node_modules/@openclaw/fs-safe/dist/archive-merge.d.ts +6 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-merge.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-merge.js +68 -19
- package/node_modules/@openclaw/fs-safe/dist/archive-native.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-native.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-native.js +15 -25
- package/node_modules/@openclaw/fs-safe/dist/archive-options.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-options.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-parser.wasm +0 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-plan.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-read.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-read.js +128 -109
- package/node_modules/@openclaw/fs-safe/dist/archive-staging.d.ts +6 -3
- package/node_modules/@openclaw/fs-safe/dist/archive-staging.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-staging.js +100 -42
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-inspect.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-inspect.js +4 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-stream.d.ts +11 -4
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-stream.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-stream.js +23 -10
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-wasm.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-wasm.js +18 -14
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-admission.d.ts +2 -2
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-admission.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-admission.js +50 -14
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-directory.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-directory.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-directory.js +13 -2
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-loader.d.ts +7 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-loader.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-loader.js +64 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-manifest.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-manifest.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-manifest.js +22 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-names.d.ts +6 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-names.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-names.js +56 -18
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-preflight.d.ts +2 -3
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-preflight.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-preflight.js +4 -35
- package/node_modules/@openclaw/fs-safe/dist/archive.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/archive.js +25 -13
- package/node_modules/@openclaw/fs-safe/dist/bounded-read.d.ts +12 -0
- package/node_modules/@openclaw/fs-safe/dist/bounded-read.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/bounded-read.js +83 -46
- package/node_modules/@openclaw/fs-safe/dist/clone-metadata.d.ts +19 -0
- package/node_modules/@openclaw/fs-safe/dist/clone-metadata.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/clone-metadata.js +32 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-file-input.d.ts +22 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-file-input.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-file-input.js +71 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-policy.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-policy.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-policy.js +8 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-publication.d.ts +15 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-publication.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-publication.js +30 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-tree-portable.d.ts +9 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-tree-portable.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-tree-portable.js +222 -0
- package/node_modules/@openclaw/fs-safe/dist/copy.d.ts +16 -0
- package/node_modules/@openclaw/fs-safe/dist/copy.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/copy.js +125 -0
- package/node_modules/@openclaw/fs-safe/dist/darwin-acl.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/darwin-acl.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/darwin-acl.js +24 -0
- package/node_modules/@openclaw/fs-safe/dist/deny-mutations.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/deny-mutations.js +8 -2
- package/node_modules/@openclaw/fs-safe/dist/device-path.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/device-path.js +5 -3
- package/node_modules/@openclaw/fs-safe/dist/directory-durability.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/directory-durability.js +68 -23
- package/node_modules/@openclaw/fs-safe/dist/directory-entry-path.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-entry-path.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-entry-path.js +21 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-guard.d.ts +27 -1
- package/node_modules/@openclaw/fs-safe/dist/directory-guard.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/directory-guard.js +145 -17
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-node.d.ts +12 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-node.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-node.js +106 -8
- package/node_modules/@openclaw/fs-safe/dist/durability.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/durability.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/durability.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/effective-uid.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/effective-uid.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/effective-uid.js +25 -0
- package/node_modules/@openclaw/fs-safe/dist/error-detail.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/error-detail.js +4 -1
- package/node_modules/@openclaw/fs-safe/dist/file-handle-transfer.d.ts +14 -0
- package/node_modules/@openclaw/fs-safe/dist/file-handle-transfer.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/file-handle-transfer.js +135 -0
- package/node_modules/@openclaw/fs-safe/dist/file-hash.d.ts +9 -2
- package/node_modules/@openclaw/fs-safe/dist/file-hash.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/file-hash.js +147 -40
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync.js +44 -10
- package/node_modules/@openclaw/fs-safe/dist/file-lock.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/file-lock.js +29 -9
- package/node_modules/@openclaw/fs-safe/dist/file-observation.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/file-observation.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/file-store-boundary.d.ts +6 -2
- package/node_modules/@openclaw/fs-safe/dist/file-store-boundary.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/file-store-boundary.js +22 -65
- package/node_modules/@openclaw/fs-safe/dist/file-store-copy-source.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-copy-source.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-copy-source.js +31 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-path.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-path.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-path.js +30 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-prune.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/file-store-prune.js +15 -5
- package/node_modules/@openclaw/fs-safe/dist/file-store-sync-directory.d.ts +16 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-sync-directory.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-sync-directory.js +349 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-sync-write.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-sync-write.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/file-store-sync-write.js +63 -48
- package/node_modules/@openclaw/fs-safe/dist/file-store.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/file-store.js +23 -47
- package/node_modules/@openclaw/fs-safe/dist/filename.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/filename.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/filename.js +89 -36
- package/node_modules/@openclaw/fs-safe/dist/fs.js +3 -3
- package/node_modules/@openclaw/fs-safe/dist/guarded-mkdir.d.ts +11 -0
- package/node_modules/@openclaw/fs-safe/dist/guarded-mkdir.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/guarded-mkdir.js +218 -32
- package/node_modules/@openclaw/fs-safe/dist/guarded-mutation.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/guarded-mutation.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/guarded-mutation.js +9 -5
- package/node_modules/@openclaw/fs-safe/dist/guest-dispatch-python.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/guest-dispatch-python.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/guest-dispatch-python.js +117 -0
- package/node_modules/@openclaw/fs-safe/dist/guest-native-python.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/guest-native-python.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/guest-native-python.js +135 -0
- package/node_modules/@openclaw/fs-safe/dist/guest.d.ts +9 -0
- package/node_modules/@openclaw/fs-safe/dist/guest.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/guest.js +424 -0
- package/node_modules/@openclaw/fs-safe/dist/home-dir.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/home-dir.js +81 -16
- package/node_modules/@openclaw/fs-safe/dist/index.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/index.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/install-path.d.ts +6 -0
- package/node_modules/@openclaw/fs-safe/dist/install-path.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/install-path.js +71 -26
- package/node_modules/@openclaw/fs-safe/dist/json-document-store.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/json-document-store.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/json-document-store.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-directory.js +3 -3
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-ownership.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-ownership.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-ownership.js +137 -45
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-paths.d.ts +11 -0
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-paths.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-paths.js +42 -0
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-read.d.ts +6 -0
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-read.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-read.js +61 -0
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue.js +107 -152
- package/node_modules/@openclaw/fs-safe/dist/json-store.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/json-store.js +5 -1
- package/node_modules/@openclaw/fs-safe/dist/json.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/json.js +55 -22
- package/node_modules/@openclaw/fs-safe/dist/local-file-access.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/local-file-access.js +4 -0
- package/node_modules/@openclaw/fs-safe/dist/local-file-descriptor.d.ts +17 -0
- package/node_modules/@openclaw/fs-safe/dist/local-file-descriptor.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/local-file-descriptor.js +84 -0
- package/node_modules/@openclaw/fs-safe/dist/local-roots.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/local-roots.js +54 -27
- package/node_modules/@openclaw/fs-safe/dist/move-path-cleanup.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/move-path-cleanup.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/move-path-cleanup.js +47 -20
- package/node_modules/@openclaw/fs-safe/dist/move-path-stage.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/move-path-stage.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/move-path-stage.js +56 -0
- package/node_modules/@openclaw/fs-safe/dist/move-path.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/move-path.js +84 -50
- package/node_modules/@openclaw/fs-safe/dist/mutation-authority.d.ts +9 -0
- package/node_modules/@openclaw/fs-safe/dist/mutation-authority.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/mutation-authority.js +36 -0
- package/node_modules/@openclaw/fs-safe/dist/native-binding.d.ts +53 -1
- package/node_modules/@openclaw/fs-safe/dist/native-binding.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/native-binding.js +8 -1
- package/node_modules/@openclaw/fs-safe/dist/native-directory-observation.d.ts +17 -0
- package/node_modules/@openclaw/fs-safe/dist/native-directory-observation.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/native-directory-observation.js +37 -0
- package/node_modules/@openclaw/fs-safe/dist/native-operations.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/native-operations.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/native-operations.js +17 -9
- package/node_modules/@openclaw/fs-safe/dist/native-parent-admission.d.ts +32 -0
- package/node_modules/@openclaw/fs-safe/dist/native-parent-admission.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/native-parent-admission.js +127 -0
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write-windows.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write-windows.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write-windows.js +27 -16
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write.js +315 -41
- package/node_modules/@openclaw/fs-safe/dist/native-staged-file.d.ts +5 -5
- package/node_modules/@openclaw/fs-safe/dist/native-staged-file.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/native-staged-file.js +52 -15
- package/node_modules/@openclaw/fs-safe/dist/native.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/native.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/native.js +7 -2
- package/node_modules/@openclaw/fs-safe/dist/opened-file-failure.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/opened-file-failure.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/opened-file-failure.js +3 -2
- package/node_modules/@openclaw/fs-safe/dist/opened-realpath.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/opened-realpath.js +5 -4
- package/node_modules/@openclaw/fs-safe/dist/output.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/output.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/output.js +16 -4
- package/node_modules/@openclaw/fs-safe/dist/overwrite-file-handle.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/overwrite-file-handle.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/overwrite-file-handle.js +46 -0
- package/node_modules/@openclaw/fs-safe/dist/owner-dacl.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/owner-dacl.js +2 -0
- package/node_modules/@openclaw/fs-safe/dist/path-case.d.ts +7 -0
- package/node_modules/@openclaw/fs-safe/dist/path-case.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/path-case.js +136 -0
- package/node_modules/@openclaw/fs-safe/dist/path-policy.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/path-policy.js +7 -2
- package/node_modules/@openclaw/fs-safe/dist/path-prefix.d.ts +7 -0
- package/node_modules/@openclaw/fs-safe/dist/path-prefix.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/path-prefix.js +82 -0
- package/node_modules/@openclaw/fs-safe/dist/path-scope-lexical.d.ts +14 -0
- package/node_modules/@openclaw/fs-safe/dist/path-scope-lexical.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/path-scope-lexical.js +37 -0
- package/node_modules/@openclaw/fs-safe/dist/path-segment-route.d.ts +7 -0
- package/node_modules/@openclaw/fs-safe/dist/path-segment-route.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/path-segment-route.js +24 -0
- package/node_modules/@openclaw/fs-safe/dist/path-suffix-aliases.d.ts +10 -0
- package/node_modules/@openclaw/fs-safe/dist/path-suffix-aliases.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/path-suffix-aliases.js +386 -0
- package/node_modules/@openclaw/fs-safe/dist/path.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/path.js +39 -7
- package/node_modules/@openclaw/fs-safe/dist/permissions-windows.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/permissions-windows.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/permissions-windows.js +99 -56
- package/node_modules/@openclaw/fs-safe/dist/permissions.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/permissions.js +39 -10
- package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-admission.d.ts +25 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-admission.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-admission.js +425 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-observation.d.ts +34 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-observation.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-observation.js +142 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-shared-route.d.ts +24 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-shared-route.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-shared-route.js +70 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-open.d.ts +6 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-open.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/pinned-open.js +29 -9
- package/node_modules/@openclaw/fs-safe/dist/pinned-operation.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/pinned-write-types.d.ts +75 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-write-types.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-write-types.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-write.d.ts +7 -29
- package/node_modules/@openclaw/fs-safe/dist/pinned-write.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/pinned-write.js +203 -47
- package/node_modules/@openclaw/fs-safe/dist/positional-read.d.ts +9 -0
- package/node_modules/@openclaw/fs-safe/dist/positional-read.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/positional-read.js +36 -0
- package/node_modules/@openclaw/fs-safe/dist/private-directory.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/private-directory.js +2 -0
- package/node_modules/@openclaw/fs-safe/dist/private-producer-handoff.d.ts +16 -0
- package/node_modules/@openclaw/fs-safe/dist/private-producer-handoff.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/private-producer-handoff.js +272 -0
- package/node_modules/@openclaw/fs-safe/dist/private-temp-workspace.d.ts +2 -39
- package/node_modules/@openclaw/fs-safe/dist/private-temp-workspace.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/private-temp-workspace.js +183 -69
- package/node_modules/@openclaw/fs-safe/dist/publish-copy-stage.d.ts +13 -0
- package/node_modules/@openclaw/fs-safe/dist/publish-copy-stage.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/publish-copy-stage.js +47 -0
- package/node_modules/@openclaw/fs-safe/dist/publish-file.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/publish-file.js +63 -56
- package/node_modules/@openclaw/fs-safe/dist/realpath.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/realpath.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/realpath.js +43 -0
- package/node_modules/@openclaw/fs-safe/dist/recursive-mkdir-path.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/recursive-mkdir-path.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/recursive-mkdir-path.js +8 -0
- package/node_modules/@openclaw/fs-safe/dist/regular-file.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/regular-file.js +56 -45
- package/node_modules/@openclaw/fs-safe/dist/replace-directory.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/replace-directory.js +14 -6
- package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-fallback.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-fallback.js +52 -47
- package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-source.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-source.js +17 -17
- package/node_modules/@openclaw/fs-safe/dist/replace-file-mode.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-mode.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-mode.js +10 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-temp-owner.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-temp-owner.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/replace-file-temp-owner.js +18 -3
- package/node_modules/@openclaw/fs-safe/dist/replace-file.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/replace-file.js +43 -32
- package/node_modules/@openclaw/fs-safe/dist/root-boundary.d.ts +29 -0
- package/node_modules/@openclaw/fs-safe/dist/root-boundary.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-boundary.js +182 -0
- package/node_modules/@openclaw/fs-safe/dist/root-context.d.ts +15 -1
- package/node_modules/@openclaw/fs-safe/dist/root-context.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/root-context.js +131 -33
- package/node_modules/@openclaw/fs-safe/dist/root-create-input.d.ts +10 -0
- package/node_modules/@openclaw/fs-safe/dist/root-create-input.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-create-input.js +80 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory-creation.d.ts +13 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory-creation.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory-creation.js +212 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory-list.d.ts +38 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory-list.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory-list.js +368 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory.d.ts +23 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory.js +141 -0
- package/node_modules/@openclaw/fs-safe/dist/root-entries.d.ts +11 -0
- package/node_modules/@openclaw/fs-safe/dist/root-entries.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-entries.js +61 -0
- package/node_modules/@openclaw/fs-safe/dist/root-errors.d.ts +6 -5
- package/node_modules/@openclaw/fs-safe/dist/root-errors.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/root-errors.js +28 -13
- package/node_modules/@openclaw/fs-safe/dist/root-file-final-admission.d.ts +21 -0
- package/node_modules/@openclaw/fs-safe/dist/root-file-final-admission.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-file-final-admission.js +83 -0
- package/node_modules/@openclaw/fs-safe/dist/root-file.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/root-file.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/root-file.js +111 -24
- package/node_modules/@openclaw/fs-safe/dist/root-impl.d.ts +18 -51
- package/node_modules/@openclaw/fs-safe/dist/root-impl.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/root-impl.js +639 -510
- package/node_modules/@openclaw/fs-safe/dist/root-move-noreplace.d.ts +14 -0
- package/node_modules/@openclaw/fs-safe/dist/root-move-noreplace.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-move-noreplace.js +202 -0
- package/node_modules/@openclaw/fs-safe/dist/root-move-preflight.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/root-move-preflight.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-move-preflight.js +16 -0
- package/node_modules/@openclaw/fs-safe/dist/root-observed-path.d.ts +9 -0
- package/node_modules/@openclaw/fs-safe/dist/root-observed-path.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-observed-path.js +95 -0
- package/node_modules/@openclaw/fs-safe/dist/root-options.d.ts +77 -0
- package/node_modules/@openclaw/fs-safe/dist/root-options.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-options.js +18 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path-errors.d.ts +12 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path-errors.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path-errors.js +13 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path-existing.d.ts +7 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path-existing.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/root-path-existing.js +111 -14
- package/node_modules/@openclaw/fs-safe/dist/root-path-observation.d.ts +63 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path-observation.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path-observation.js +180 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path-stat.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path-stat.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path-stat.js +101 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path-symlink.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/root-path-symlink.js +24 -4
- package/node_modules/@openclaw/fs-safe/dist/root-path.d.ts +14 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/root-path.js +322 -220
- package/node_modules/@openclaw/fs-safe/dist/root-paths-lexical.d.ts +9 -0
- package/node_modules/@openclaw/fs-safe/dist/root-paths-lexical.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-paths-lexical.js +22 -0
- package/node_modules/@openclaw/fs-safe/dist/root-paths.d.ts +3 -29
- package/node_modules/@openclaw/fs-safe/dist/root-paths.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/root-paths.js +89 -174
- package/node_modules/@openclaw/fs-safe/dist/root-read-admission.d.ts +26 -0
- package/node_modules/@openclaw/fs-safe/dist/root-read-admission.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-read-admission.js +94 -0
- package/node_modules/@openclaw/fs-safe/dist/root-remove-identity.d.ts +15 -0
- package/node_modules/@openclaw/fs-safe/dist/root-remove-identity.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-remove-identity.js +89 -0
- package/node_modules/@openclaw/fs-safe/dist/root-remove-receipt.d.ts +17 -0
- package/node_modules/@openclaw/fs-safe/dist/root-remove-receipt.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-remove-receipt.js +37 -0
- package/node_modules/@openclaw/fs-safe/dist/root-remove.d.ts +6 -0
- package/node_modules/@openclaw/fs-safe/dist/root-remove.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-remove.js +448 -0
- package/node_modules/@openclaw/fs-safe/dist/root-symlink-policy.d.ts +14 -0
- package/node_modules/@openclaw/fs-safe/dist/root-symlink-policy.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-symlink-policy.js +34 -0
- package/node_modules/@openclaw/fs-safe/dist/root-walk.d.ts +5 -4
- package/node_modules/@openclaw/fs-safe/dist/root-walk.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/root-walk.js +100 -50
- package/node_modules/@openclaw/fs-safe/dist/root-write-admission.d.ts +68 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-admission.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-admission.js +322 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-compatibility.d.ts +13 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-compatibility.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-compatibility.js +74 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-complete-parent.d.ts +42 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-complete-parent.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-complete-parent.js +195 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-mode.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-mode.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/root-write-mode.js +22 -11
- package/node_modules/@openclaw/fs-safe/dist/root-write-publication.d.ts +24 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-publication.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-publication.js +85 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-verification.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/root-write-verification.js +18 -7
- package/node_modules/@openclaw/fs-safe/dist/root.d.ts +4 -1
- package/node_modules/@openclaw/fs-safe/dist/root.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/safe-path-segment.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/safe-path-segment.js +3 -1
- package/node_modules/@openclaw/fs-safe/dist/secret-file.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/secret-file.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/secret-file.js +65 -25
- package/node_modules/@openclaw/fs-safe/dist/secret-read-async.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/secret-read-async.js +22 -16
- package/node_modules/@openclaw/fs-safe/dist/secret-read-policy.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/secret-read-policy.js +5 -1
- package/node_modules/@openclaw/fs-safe/dist/secure-file-windows.d.ts +10 -0
- package/node_modules/@openclaw/fs-safe/dist/secure-file-windows.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/secure-file-windows.js +186 -0
- package/node_modules/@openclaw/fs-safe/dist/secure-file.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/secure-file.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/secure-file.js +137 -22
- package/node_modules/@openclaw/fs-safe/dist/secure-temp-dir.d.ts +6 -3
- package/node_modules/@openclaw/fs-safe/dist/secure-temp-dir.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/secure-temp-dir.js +122 -101
- package/node_modules/@openclaw/fs-safe/dist/secure-temp-repair.d.ts +35 -0
- package/node_modules/@openclaw/fs-safe/dist/secure-temp-repair.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/secure-temp-repair.js +106 -0
- package/node_modules/@openclaw/fs-safe/dist/sibling-staged-file.d.ts +4 -1
- package/node_modules/@openclaw/fs-safe/dist/sibling-staged-file.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/sibling-staged-file.js +210 -45
- package/node_modules/@openclaw/fs-safe/dist/sibling-temp.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/sibling-temp.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/sibling-temp.js +43 -17
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-acquire.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-acquire.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-acquire.js +64 -21
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-policy.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-policy.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-policy.js +22 -3
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-reclaim.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-reclaim.js +16 -4
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-root.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-root.js +4 -2
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock.js +4 -4
- package/node_modules/@openclaw/fs-safe/dist/staged-directory.d.ts +14 -5
- package/node_modules/@openclaw/fs-safe/dist/staged-directory.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/staged-directory.js +58 -6
- package/node_modules/@openclaw/fs-safe/dist/standalone-publication-path.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/standalone-publication-path.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/standalone-publication-path.js +6 -0
- package/node_modules/@openclaw/fs-safe/dist/stat-observation.d.ts +11 -0
- package/node_modules/@openclaw/fs-safe/dist/stat-observation.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/stat-observation.js +64 -0
- package/node_modules/@openclaw/fs-safe/dist/strict-file-identity.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/strict-file-identity.js +39 -2
- package/node_modules/@openclaw/fs-safe/dist/symlink-parents.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/symlink-parents.js +7 -2
- package/node_modules/@openclaw/fs-safe/dist/temp-cleanup.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/temp-cleanup.js +3 -2
- package/node_modules/@openclaw/fs-safe/dist/temp-target.d.ts +16 -12
- package/node_modules/@openclaw/fs-safe/dist/temp-target.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/temp-target.js +154 -14
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-admission.d.ts +22 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-admission.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-admission.js +374 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-child-admission.d.ts +13 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-child-admission.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-child-admission.js +95 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-descriptor.d.ts +48 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-descriptor.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-descriptor.js +363 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-identity.d.ts +15 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-identity.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-identity.js +41 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-owner.d.ts +7 -6
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-owner.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-owner.js +121 -61
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-permissions.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-permissions.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-permissions.js +32 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-types.d.ts +40 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-types.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-types.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/temp.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/temp.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/temp.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/test-hooks.d.ts +7 -0
- package/node_modules/@openclaw/fs-safe/dist/test-hooks.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/text-atomic.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/text-atomic.js +3 -1
- package/node_modules/@openclaw/fs-safe/dist/timing.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/timing.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/timing.js +25 -6
- package/node_modules/@openclaw/fs-safe/dist/trash.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/trash.js +61 -13
- package/node_modules/@openclaw/fs-safe/dist/unicode-path.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/unicode-path.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/unicode-path.js +13 -0
- package/node_modules/@openclaw/fs-safe/dist/walk.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/walk.js +25 -40
- package/node_modules/@openclaw/fs-safe/dist/windows-owner.d.ts +9 -12
- package/node_modules/@openclaw/fs-safe/dist/windows-owner.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/windows-owner.js +29 -58
- package/node_modules/@openclaw/fs-safe/dist/windows-path-alias.d.ts +39 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-path-alias.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-path-alias.js +153 -0
- package/node_modules/@openclaw/fs-safe/dist/write-file-handle.d.ts +7 -0
- package/node_modules/@openclaw/fs-safe/dist/write-file-handle.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/write-file-handle.js +26 -0
- package/node_modules/@openclaw/fs-safe/dist/write-open-flags.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/write-open-flags.js +1 -2
- package/node_modules/@openclaw/fs-safe/docs/advanced.md +50 -5
- package/node_modules/@openclaw/fs-safe/docs/archive.md +107 -12
- package/node_modules/@openclaw/fs-safe/docs/atomic.md +77 -5
- package/node_modules/@openclaw/fs-safe/docs/config.md +1 -0
- package/node_modules/@openclaw/fs-safe/docs/contributing.md +40 -2
- package/node_modules/@openclaw/fs-safe/docs/copy.md +158 -0
- package/node_modules/@openclaw/fs-safe/docs/directory-identity.md +85 -0
- package/node_modules/@openclaw/fs-safe/docs/durability.md +71 -5
- package/node_modules/@openclaw/fs-safe/docs/entries.md +109 -0
- package/node_modules/@openclaw/fs-safe/docs/errors.md +18 -10
- package/node_modules/@openclaw/fs-safe/docs/file-store.md +93 -6
- package/node_modules/@openclaw/fs-safe/docs/filename.md +21 -7
- package/node_modules/@openclaw/fs-safe/docs/guest.md +146 -0
- package/node_modules/@openclaw/fs-safe/docs/in-place-write.md +81 -0
- package/node_modules/@openclaw/fs-safe/docs/index.md +2 -0
- package/node_modules/@openclaw/fs-safe/docs/install-path.md +61 -15
- package/node_modules/@openclaw/fs-safe/docs/install.md +42 -7
- package/node_modules/@openclaw/fs-safe/docs/json-store.md +15 -1
- package/node_modules/@openclaw/fs-safe/docs/json.md +11 -0
- package/node_modules/@openclaw/fs-safe/docs/local-roots.md +8 -1
- package/node_modules/@openclaw/fs-safe/docs/mutation-policy-proof.md +65 -0
- package/node_modules/@openclaw/fs-safe/docs/native-helper.md +51 -12
- package/node_modules/@openclaw/fs-safe/docs/native.md +63 -10
- package/node_modules/@openclaw/fs-safe/docs/output.md +55 -7
- package/node_modules/@openclaw/fs-safe/docs/path-case.md +64 -0
- package/node_modules/@openclaw/fs-safe/docs/path-prefix.md +64 -0
- package/node_modules/@openclaw/fs-safe/docs/path-scope.md +1 -1
- package/node_modules/@openclaw/fs-safe/docs/path-suffix-aliases.md +159 -0
- package/node_modules/@openclaw/fs-safe/docs/path.md +12 -1
- package/node_modules/@openclaw/fs-safe/docs/permissions.md +55 -11
- package/node_modules/@openclaw/fs-safe/docs/positional-read.md +63 -0
- package/node_modules/@openclaw/fs-safe/docs/private-file-store.md +14 -0
- package/node_modules/@openclaw/fs-safe/docs/public-api.md +45 -2
- package/node_modules/@openclaw/fs-safe/docs/quickstart.md +1 -1
- package/node_modules/@openclaw/fs-safe/docs/reading.md +14 -1
- package/node_modules/@openclaw/fs-safe/docs/root.md +219 -12
- package/node_modules/@openclaw/fs-safe/docs/secret-file.md +9 -0
- package/node_modules/@openclaw/fs-safe/docs/secure-file.md +23 -16
- package/node_modules/@openclaw/fs-safe/docs/security-model.md +90 -9
- package/node_modules/@openclaw/fs-safe/docs/sidecar-lock.md +42 -4
- package/node_modules/@openclaw/fs-safe/docs/store.md +27 -2
- package/node_modules/@openclaw/fs-safe/docs/temp.md +283 -26
- package/node_modules/@openclaw/fs-safe/docs/test-hooks.md +14 -0
- package/node_modules/@openclaw/fs-safe/docs/timing.md +2 -0
- package/node_modules/@openclaw/fs-safe/docs/types.md +19 -12
- package/node_modules/@openclaw/fs-safe/docs/walk.md +54 -5
- package/node_modules/@openclaw/fs-safe/docs/writing.md +211 -11
- package/node_modules/@openclaw/fs-safe/package.json +24 -13
- package/node_modules/@openclaw/fs-safe-darwin-arm64/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-darwin-arm64/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-darwin-x64/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-darwin-x64/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-linux-arm64-gnu/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-linux-arm64-gnu/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-linux-arm64-musl/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-linux-arm64-musl/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-linux-x64-gnu/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-linux-x64-gnu/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-linux-x64-musl/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-linux-x64-musl/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-win32-x64-msvc/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-win32-x64-msvc/package.json +1 -1
- package/node_modules/jszip/.github/FUNDING.yml +1 -0
- package/node_modules/jszip/.github/actions/setup/action.yml +23 -0
- package/node_modules/jszip/.github/workflows/benchmark.yml +38 -0
- package/node_modules/jszip/.github/workflows/main.yml +55 -0
- package/node_modules/jszip/CHANGES.md +6 -0
- package/node_modules/jszip/dist/jszip.js +28 -19
- package/node_modules/jszip/dist/jszip.min.js +2 -2
- package/node_modules/jszip/index.d.ts +14 -0
- package/node_modules/jszip/lib/index.js +1 -1
- package/node_modules/jszip/lib/utils.js +26 -17
- package/node_modules/jszip/package.json +2 -2
- package/node_modules/p-limit/index.d.ts +1 -1
- package/node_modules/p-limit/index.js +6 -1
- package/node_modules/p-limit/package.json +1 -1
- package/node_modules/p-limit/readme.md +8 -0
- package/node_modules/zod/README.md +27 -0
- package/node_modules/zod/compile.cjs +77 -0
- package/node_modules/zod/compile.d.cts +1 -0
- package/node_modules/zod/compile.d.ts +1 -0
- package/node_modules/zod/compile.js +52 -0
- package/node_modules/zod/index.cjs +2 -2
- package/node_modules/zod/index.d.cts +1 -2
- package/node_modules/zod/index.d.ts +1 -2
- package/node_modules/zod/index.js +5 -2
- package/node_modules/zod/package.json +13 -2
- package/node_modules/zod/src/compile.ts +56 -0
- package/node_modules/zod/src/index.ts +5 -2
- package/node_modules/zod/src/v3/ZodError.ts +22 -12
- package/node_modules/zod/src/v3/tests/error.test.ts +35 -0
- package/node_modules/zod/src/v3/tests/intersection.test.ts +18 -0
- package/node_modules/zod/src/v3/tests/language-server.test.ts +1 -2
- package/node_modules/zod/src/v3/tests/object.test.ts +3 -6
- package/node_modules/zod/src/v3/tests/readonly.test.ts +0 -80
- package/node_modules/zod/src/v3/tests/string.test.ts +6 -0
- package/node_modules/zod/src/v3/types.ts +5 -5
- package/node_modules/zod/src/v4/classic/checks.ts +1 -0
- package/node_modules/zod/src/v4/classic/compat.ts +26 -18
- package/node_modules/zod/src/v4/classic/deep-partial.ts +76 -0
- package/node_modules/zod/src/v4/classic/errors.ts +59 -44
- package/node_modules/zod/src/v4/classic/external.ts +12 -9
- package/node_modules/zod/src/v4/classic/from-json-schema.ts +140 -78
- package/node_modules/zod/src/v4/classic/in-out.ts +45 -0
- package/node_modules/zod/src/v4/classic/index.ts +2 -2
- package/node_modules/zod/src/v4/classic/iso.ts +2 -72
- package/node_modules/zod/src/v4/classic/parse.ts +10 -4
- package/node_modules/zod/src/v4/classic/schemas.ts +452 -262
- package/node_modules/zod/src/v4/classic/tests/apply.test.ts +27 -0
- package/node_modules/zod/src/v4/classic/tests/array.test.ts +2 -2
- package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +135 -0
- package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +30 -1
- package/node_modules/zod/src/v4/classic/tests/catch.test.ts +278 -0
- package/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +1 -2
- package/node_modules/zod/src/v4/classic/tests/codec.test.ts +2 -1
- package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +2 -2
- package/node_modules/zod/src/v4/classic/tests/credit-card.test.ts +76 -0
- package/node_modules/zod/src/v4/classic/tests/cyclic-data.test.ts +720 -0
- package/node_modules/zod/src/v4/classic/tests/date.test.ts +30 -0
- package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +32 -18
- package/node_modules/zod/src/v4/classic/tests/deep-partial.test.ts +380 -0
- package/node_modules/zod/src/v4/classic/tests/default-locale.test.ts +32 -0
- package/node_modules/zod/src/v4/classic/tests/default.test.ts +46 -0
- package/node_modules/zod/src/v4/classic/tests/detached-methods.test.ts +31 -7
- package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +155 -13
- package/node_modules/zod/src/v4/classic/tests/enum.test.ts +11 -0
- package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +112 -2
- package/node_modules/zod/src/v4/classic/tests/error.test.ts +274 -6
- package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +425 -10
- package/node_modules/zod/src/v4/classic/tests/function.test.ts +31 -0
- package/node_modules/zod/src/v4/classic/tests/global-config.test.ts +2 -9
- package/node_modules/zod/src/v4/classic/tests/hash.test.ts +1 -2
- package/node_modules/zod/src/v4/classic/tests/in-out.test.ts +159 -0
- package/node_modules/zod/src/v4/classic/tests/index.test.ts +21 -2
- package/node_modules/zod/src/v4/classic/tests/instance-footprint.test.ts +281 -0
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +47 -0
- package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +136 -0
- package/node_modules/zod/src/v4/classic/tests/issue-schema.test.ts +183 -0
- package/node_modules/zod/src/v4/classic/tests/jitless-allows-eval.test.ts +3 -10
- package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +36 -1
- package/node_modules/zod/src/v4/classic/tests/literal.test.ts +12 -1
- package/node_modules/zod/src/v4/classic/tests/map.test.ts +12 -0
- package/node_modules/zod/src/v4/classic/tests/number.test.ts +46 -9
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +245 -12
- package/node_modules/zod/src/v4/classic/tests/optin-ladder.test.ts +234 -0
- package/node_modules/zod/src/v4/classic/tests/optional.test.ts +49 -16
- package/node_modules/zod/src/v4/classic/tests/partial.test.ts +51 -4
- package/node_modules/zod/src/v4/classic/tests/preprocess-types.test.ts +20 -2
- package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +0 -68
- package/node_modules/zod/src/v4/classic/tests/record.test.ts +186 -18
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +33 -2
- package/node_modules/zod/src/v4/classic/tests/redos.test.ts +68 -0
- package/node_modules/zod/src/v4/classic/tests/refine.test.ts +60 -0
- package/node_modules/zod/src/v4/classic/tests/set.test.ts +9 -0
- package/node_modules/zod/src/v4/classic/tests/string.test.ts +127 -5
- package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +18 -0
- package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +11 -2
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +1585 -173
- package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +45 -30
- package/node_modules/zod/src/v4/classic/tests/union.test.ts +39 -2
- package/node_modules/zod/src/v4/classic/tests/validate.test.ts +76 -0
- package/node_modules/zod/src/v4/classic/tests/validations.test.ts +2 -2
- package/node_modules/zod/src/v4/core/api.ts +48 -12
- package/node_modules/zod/src/v4/core/checks.ts +57 -44
- package/node_modules/zod/src/v4/core/compile.ts +2188 -0
- package/node_modules/zod/src/v4/core/core.ts +98 -19
- package/node_modules/zod/src/v4/core/doc.ts +11 -7
- package/node_modules/zod/src/v4/core/errors.ts +115 -24
- package/node_modules/zod/src/v4/core/index.ts +3 -0
- package/node_modules/zod/src/v4/core/json-schema-generator.ts +6 -1
- package/node_modules/zod/src/v4/core/json-schema-processors.ts +257 -93
- package/node_modules/zod/src/v4/core/json-schema.ts +2 -1
- package/node_modules/zod/src/v4/core/memoizer.ts +284 -0
- package/node_modules/zod/src/v4/core/parse.ts +131 -38
- package/node_modules/zod/src/v4/core/regexes.ts +30 -13
- package/node_modules/zod/src/v4/core/registries.ts +2 -2
- package/node_modules/zod/src/v4/core/schemas.ts +759 -461
- package/node_modules/zod/src/v4/core/tests/compile-differential.test.ts +969 -0
- package/node_modules/zod/src/v4/core/tests/compile-global.test.ts +89 -0
- package/node_modules/zod/src/v4/core/tests/compile-off-by-default.test.ts +26 -0
- package/node_modules/zod/src/v4/core/tests/compile-stats.test.ts +34 -0
- package/node_modules/zod/src/v4/core/tests/compile.test.ts +1639 -0
- package/node_modules/zod/src/v4/core/tests/locales/el.test.ts +1 -2
- package/node_modules/zod/src/v4/core/tests/locales/es.test.ts +1 -2
- package/node_modules/zod/src/v4/core/tests/locales/fr.test.ts +3 -3
- package/node_modules/zod/src/v4/core/tests/locales/parity.test.ts +42 -0
- package/node_modules/zod/src/v4/core/tests/locales/tk.test.ts +69 -0
- package/node_modules/zod/src/v4/core/tests/treeshake.test.ts +51 -0
- package/node_modules/zod/src/v4/core/tests/url-no-canparse.test.ts +31 -0
- package/node_modules/zod/src/v4/core/to-json-schema.ts +275 -42
- package/node_modules/zod/src/v4/core/util.ts +268 -42
- package/node_modules/zod/src/v4/core/versions.ts +2 -2
- package/node_modules/zod/src/v4/core/visit.ts +193 -0
- package/node_modules/zod/src/v4/index.ts +3 -3
- package/node_modules/zod/src/v4/locales/ar.ts +3 -0
- package/node_modules/zod/src/v4/locales/az.ts +3 -0
- package/node_modules/zod/src/v4/locales/be.ts +10 -0
- package/node_modules/zod/src/v4/locales/bg.ts +3 -0
- package/node_modules/zod/src/v4/locales/bn.ts +121 -0
- package/node_modules/zod/src/v4/locales/ca.ts +3 -0
- package/node_modules/zod/src/v4/locales/ckb.ts +138 -0
- package/node_modules/zod/src/v4/locales/cs.ts +3 -0
- package/node_modules/zod/src/v4/locales/da.ts +5 -2
- package/node_modules/zod/src/v4/locales/de.ts +3 -0
- package/node_modules/zod/src/v4/locales/el.ts +1 -0
- package/node_modules/zod/src/v4/locales/en.ts +15 -4
- package/node_modules/zod/src/v4/locales/eo.ts +3 -0
- package/node_modules/zod/src/v4/locales/es.ts +2 -0
- package/node_modules/zod/src/v4/locales/fa.ts +3 -0
- package/node_modules/zod/src/v4/locales/fi.ts +3 -0
- package/node_modules/zod/src/v4/locales/fr-CA.ts +3 -0
- package/node_modules/zod/src/v4/locales/fr.ts +19 -14
- package/node_modules/zod/src/v4/locales/gu.ts +121 -0
- package/node_modules/zod/src/v4/locales/he.ts +6 -1
- package/node_modules/zod/src/v4/locales/hi.ts +124 -0
- package/node_modules/zod/src/v4/locales/hr.ts +2 -0
- package/node_modules/zod/src/v4/locales/hu.ts +3 -0
- package/node_modules/zod/src/v4/locales/hy.ts +9 -0
- package/node_modules/zod/src/v4/locales/id.ts +3 -0
- package/node_modules/zod/src/v4/locales/index.ts +10 -0
- package/node_modules/zod/src/v4/locales/is.ts +3 -0
- package/node_modules/zod/src/v4/locales/it.ts +3 -0
- package/node_modules/zod/src/v4/locales/ja.ts +3 -0
- package/node_modules/zod/src/v4/locales/ka.ts +3 -0
- package/node_modules/zod/src/v4/locales/km.ts +3 -0
- package/node_modules/zod/src/v4/locales/kn.ts +124 -0
- package/node_modules/zod/src/v4/locales/ko.ts +3 -0
- package/node_modules/zod/src/v4/locales/lt.ts +2 -0
- package/node_modules/zod/src/v4/locales/mk.ts +3 -0
- package/node_modules/zod/src/v4/locales/ms.ts +3 -0
- package/node_modules/zod/src/v4/locales/ne.ts +126 -0
- package/node_modules/zod/src/v4/locales/nl.ts +3 -0
- package/node_modules/zod/src/v4/locales/nn.ts +119 -0
- package/node_modules/zod/src/v4/locales/no.ts +5 -2
- package/node_modules/zod/src/v4/locales/ota.ts +3 -0
- package/node_modules/zod/src/v4/locales/pl.ts +3 -0
- package/node_modules/zod/src/v4/locales/ps.ts +3 -0
- package/node_modules/zod/src/v4/locales/pt-BR.ts +159 -0
- package/node_modules/zod/src/v4/locales/pt.ts +99 -58
- package/node_modules/zod/src/v4/locales/ro.ts +1 -0
- package/node_modules/zod/src/v4/locales/ru.ts +10 -0
- package/node_modules/zod/src/v4/locales/sk.ts +121 -0
- package/node_modules/zod/src/v4/locales/sl.ts +3 -0
- package/node_modules/zod/src/v4/locales/sv.ts +5 -2
- package/node_modules/zod/src/v4/locales/ta.ts +3 -0
- package/node_modules/zod/src/v4/locales/th.ts +3 -0
- package/node_modules/zod/src/v4/locales/tk.ts +111 -0
- package/node_modules/zod/src/v4/locales/tr.ts +3 -0
- package/node_modules/zod/src/v4/locales/uk.ts +3 -0
- package/node_modules/zod/src/v4/locales/ur.ts +3 -0
- package/node_modules/zod/src/v4/locales/uz.ts +1 -0
- package/node_modules/zod/src/v4/locales/vi.ts +3 -0
- package/node_modules/zod/src/v4/locales/yo.ts +3 -0
- package/node_modules/zod/src/v4/locales/zh-CN.ts +3 -0
- package/node_modules/zod/src/v4/locales/zh-TW.ts +3 -0
- package/node_modules/zod/src/v4/mini/checks.ts +1 -0
- package/node_modules/zod/src/v4/mini/deep-partial.ts +73 -0
- package/node_modules/zod/src/v4/mini/external.ts +10 -1
- package/node_modules/zod/src/v4/mini/in-out.ts +45 -0
- package/node_modules/zod/src/v4/mini/parse.ts +2 -0
- package/node_modules/zod/src/v4/mini/schemas.ts +135 -56
- package/node_modules/zod/src/v4/mini/tests/apply.test.ts +33 -0
- package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +62 -1
- package/node_modules/zod/src/v4/mini/tests/checks.test.ts +14 -0
- package/node_modules/zod/src/v4/mini/tests/codec.test.ts +35 -1
- package/node_modules/zod/src/v4/mini/tests/cyclic-data.test.ts +84 -0
- package/node_modules/zod/src/v4/mini/tests/deep-partial.test.ts +54 -0
- package/node_modules/zod/src/v4/mini/tests/error.test.ts +23 -4
- package/node_modules/zod/src/v4/mini/tests/functions.test.ts +9 -0
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +72 -5
- package/node_modules/zod/src/v4/mini/tests/number.test.ts +14 -0
- package/node_modules/zod/src/v4/mini/tests/object.test.ts +65 -0
- package/node_modules/zod/src/v4/mini/tests/string.test.ts +21 -0
- package/node_modules/zod/v3/ZodError.cjs +22 -12
- package/node_modules/zod/v3/ZodError.d.cts +1 -1
- package/node_modules/zod/v3/ZodError.d.ts +1 -1
- package/node_modules/zod/v3/ZodError.js +22 -12
- package/node_modules/zod/v3/types.cjs +7 -5
- package/node_modules/zod/v3/types.js +7 -5
- package/node_modules/zod/v4/classic/checks.cjs +2 -1
- package/node_modules/zod/v4/classic/checks.d.cts +1 -1
- package/node_modules/zod/v4/classic/checks.d.ts +1 -1
- package/node_modules/zod/v4/classic/checks.js +1 -1
- package/node_modules/zod/v4/classic/compat.d.cts +9 -11
- package/node_modules/zod/v4/classic/compat.d.ts +9 -11
- package/node_modules/zod/v4/classic/deep-partial.cjs +39 -0
- package/node_modules/zod/v4/classic/deep-partial.d.cts +14 -0
- package/node_modules/zod/v4/classic/deep-partial.d.ts +14 -0
- package/node_modules/zod/v4/classic/deep-partial.js +13 -0
- package/node_modules/zod/v4/classic/errors.cjs +43 -34
- package/node_modules/zod/v4/classic/errors.d.cts +3 -4
- package/node_modules/zod/v4/classic/errors.d.ts +3 -4
- package/node_modules/zod/v4/classic/errors.js +43 -34
- package/node_modules/zod/v4/classic/external.cjs +30 -27
- package/node_modules/zod/v4/classic/external.d.cts +5 -2
- package/node_modules/zod/v4/classic/external.d.ts +5 -2
- package/node_modules/zod/v4/classic/external.js +5 -8
- package/node_modules/zod/v4/classic/from-json-schema.cjs +136 -75
- package/node_modules/zod/v4/classic/from-json-schema.js +136 -75
- package/node_modules/zod/v4/classic/in-out.cjs +63 -0
- package/node_modules/zod/v4/classic/in-out.d.cts +8 -0
- package/node_modules/zod/v4/classic/in-out.d.ts +8 -0
- package/node_modules/zod/v4/classic/in-out.js +36 -0
- package/node_modules/zod/v4/classic/index.cjs +2 -2
- package/node_modules/zod/v4/classic/index.d.cts +1 -2
- package/node_modules/zod/v4/classic/index.d.ts +1 -2
- package/node_modules/zod/v4/classic/index.js +2 -2
- package/node_modules/zod/v4/classic/iso.cjs +11 -22
- package/node_modules/zod/v4/classic/iso.d.cts +2 -17
- package/node_modules/zod/v4/classic/iso.d.ts +2 -17
- package/node_modules/zod/v4/classic/iso.js +2 -17
- package/node_modules/zod/v4/classic/parse.cjs +4 -1
- package/node_modules/zod/v4/classic/parse.d.cts +17 -4
- package/node_modules/zod/v4/classic/parse.d.ts +17 -4
- package/node_modules/zod/v4/classic/parse.js +1 -0
- package/node_modules/zod/v4/classic/schemas.cjs +498 -398
- package/node_modules/zod/v4/classic/schemas.d.cts +53 -18
- package/node_modules/zod/v4/classic/schemas.d.ts +53 -18
- package/node_modules/zod/v4/classic/schemas.js +492 -396
- package/node_modules/zod/v4/core/api.cjs +23 -4
- package/node_modules/zod/v4/core/api.d.cts +13 -9
- package/node_modules/zod/v4/core/api.d.ts +13 -9
- package/node_modules/zod/v4/core/api.js +21 -4
- package/node_modules/zod/v4/core/checks.cjs +37 -31
- package/node_modules/zod/v4/core/checks.d.cts +13 -13
- package/node_modules/zod/v4/core/checks.d.ts +13 -13
- package/node_modules/zod/v4/core/checks.js +37 -31
- package/node_modules/zod/v4/core/compile.cjs +1813 -0
- package/node_modules/zod/v4/core/compile.d.cts +51 -0
- package/node_modules/zod/v4/core/compile.d.ts +51 -0
- package/node_modules/zod/v4/core/compile.js +1783 -0
- package/node_modules/zod/v4/core/core.cjs +81 -18
- package/node_modules/zod/v4/core/core.d.cts +16 -4
- package/node_modules/zod/v4/core/core.d.ts +16 -4
- package/node_modules/zod/v4/core/core.js +82 -19
- package/node_modules/zod/v4/core/doc.cjs +5 -7
- package/node_modules/zod/v4/core/doc.d.cts +3 -1
- package/node_modules/zod/v4/core/doc.d.ts +3 -1
- package/node_modules/zod/v4/core/doc.js +5 -7
- package/node_modules/zod/v4/core/errors.cjs +110 -25
- package/node_modules/zod/v4/core/errors.d.cts +4 -0
- package/node_modules/zod/v4/core/errors.d.ts +4 -0
- package/node_modules/zod/v4/core/errors.js +110 -25
- package/node_modules/zod/v4/core/index.cjs +5 -1
- package/node_modules/zod/v4/core/index.d.cts +3 -0
- package/node_modules/zod/v4/core/index.d.ts +3 -0
- package/node_modules/zod/v4/core/index.js +3 -0
- package/node_modules/zod/v4/core/json-schema-generator.cjs +4 -0
- package/node_modules/zod/v4/core/json-schema-generator.d.cts +2 -2
- package/node_modules/zod/v4/core/json-schema-generator.d.ts +2 -2
- package/node_modules/zod/v4/core/json-schema-generator.js +4 -0
- package/node_modules/zod/v4/core/json-schema-processors.cjs +264 -95
- package/node_modules/zod/v4/core/json-schema-processors.js +243 -97
- package/node_modules/zod/v4/core/json-schema.d.cts +2 -1
- package/node_modules/zod/v4/core/json-schema.d.ts +2 -1
- package/node_modules/zod/v4/core/memoizer.cjs +272 -0
- package/node_modules/zod/v4/core/memoizer.d.cts +15 -0
- package/node_modules/zod/v4/core/memoizer.d.ts +15 -0
- package/node_modules/zod/v4/core/memoizer.js +265 -0
- package/node_modules/zod/v4/core/parse.cjs +96 -34
- package/node_modules/zod/v4/core/parse.d.cts +14 -11
- package/node_modules/zod/v4/core/parse.d.ts +14 -11
- package/node_modules/zod/v4/core/parse.js +94 -33
- package/node_modules/zod/v4/core/regexes.cjs +27 -15
- package/node_modules/zod/v4/core/regexes.d.cts +2 -0
- package/node_modules/zod/v4/core/regexes.d.ts +2 -0
- package/node_modules/zod/v4/core/regexes.js +24 -13
- package/node_modules/zod/v4/core/registries.js +2 -2
- package/node_modules/zod/v4/core/schemas.cjs +537 -326
- package/node_modules/zod/v4/core/schemas.d.cts +100 -31
- package/node_modules/zod/v4/core/schemas.d.ts +100 -31
- package/node_modules/zod/v4/core/schemas.js +526 -325
- package/node_modules/zod/v4/core/to-json-schema.cjs +242 -39
- package/node_modules/zod/v4/core/to-json-schema.d.cts +42 -3
- package/node_modules/zod/v4/core/to-json-schema.d.ts +42 -3
- package/node_modules/zod/v4/core/to-json-schema.js +241 -39
- package/node_modules/zod/v4/core/util.cjs +212 -31
- package/node_modules/zod/v4/core/util.d.cts +58 -1
- package/node_modules/zod/v4/core/util.d.ts +58 -1
- package/node_modules/zod/v4/core/util.js +202 -30
- package/node_modules/zod/v4/core/versions.cjs +2 -2
- package/node_modules/zod/v4/core/versions.d.cts +1 -1
- package/node_modules/zod/v4/core/versions.d.ts +1 -1
- package/node_modules/zod/v4/core/versions.js +2 -2
- package/node_modules/zod/v4/core/visit.cjs +195 -0
- package/node_modules/zod/v4/core/visit.d.cts +30 -0
- package/node_modules/zod/v4/core/visit.d.ts +30 -0
- package/node_modules/zod/v4/core/visit.js +169 -0
- package/node_modules/zod/v4/index.cjs +15 -5
- package/node_modules/zod/v4/index.d.cts +2 -2
- package/node_modules/zod/v4/index.d.ts +2 -2
- package/node_modules/zod/v4/index.js +3 -2
- package/node_modules/zod/v4/locales/ar.cjs +3 -0
- package/node_modules/zod/v4/locales/ar.js +3 -0
- package/node_modules/zod/v4/locales/az.cjs +3 -0
- package/node_modules/zod/v4/locales/az.js +3 -0
- package/node_modules/zod/v4/locales/be.cjs +10 -0
- package/node_modules/zod/v4/locales/be.js +10 -0
- package/node_modules/zod/v4/locales/bg.cjs +3 -0
- package/node_modules/zod/v4/locales/bg.js +3 -0
- package/node_modules/zod/v4/locales/bn.cjs +138 -0
- package/node_modules/zod/v4/locales/bn.d.cts +5 -0
- package/node_modules/zod/v4/locales/bn.d.ts +4 -0
- package/node_modules/zod/v4/locales/bn.js +111 -0
- package/node_modules/zod/v4/locales/ca.cjs +3 -0
- package/node_modules/zod/v4/locales/ca.js +3 -0
- package/node_modules/zod/v4/locales/ckb.cjs +158 -0
- package/node_modules/zod/v4/locales/ckb.d.cts +5 -0
- package/node_modules/zod/v4/locales/ckb.d.ts +4 -0
- package/node_modules/zod/v4/locales/ckb.js +131 -0
- package/node_modules/zod/v4/locales/cs.cjs +3 -0
- package/node_modules/zod/v4/locales/cs.js +3 -0
- package/node_modules/zod/v4/locales/da.cjs +5 -2
- package/node_modules/zod/v4/locales/da.js +5 -2
- package/node_modules/zod/v4/locales/de.cjs +3 -0
- package/node_modules/zod/v4/locales/de.js +3 -0
- package/node_modules/zod/v4/locales/el.cjs +1 -0
- package/node_modules/zod/v4/locales/el.js +1 -0
- package/node_modules/zod/v4/locales/en.cjs +14 -4
- package/node_modules/zod/v4/locales/en.js +14 -4
- package/node_modules/zod/v4/locales/eo.cjs +3 -0
- package/node_modules/zod/v4/locales/eo.js +3 -0
- package/node_modules/zod/v4/locales/es.cjs +2 -0
- package/node_modules/zod/v4/locales/es.js +2 -0
- package/node_modules/zod/v4/locales/fa.cjs +3 -0
- package/node_modules/zod/v4/locales/fa.js +3 -0
- package/node_modules/zod/v4/locales/fi.cjs +3 -0
- package/node_modules/zod/v4/locales/fi.js +3 -0
- package/node_modules/zod/v4/locales/fr-CA.cjs +3 -0
- package/node_modules/zod/v4/locales/fr-CA.js +3 -0
- package/node_modules/zod/v4/locales/fr.cjs +16 -14
- package/node_modules/zod/v4/locales/fr.js +16 -14
- package/node_modules/zod/v4/locales/gu.cjs +138 -0
- package/node_modules/zod/v4/locales/gu.d.cts +5 -0
- package/node_modules/zod/v4/locales/gu.d.ts +4 -0
- package/node_modules/zod/v4/locales/gu.js +111 -0
- package/node_modules/zod/v4/locales/he.cjs +5 -0
- package/node_modules/zod/v4/locales/he.js +5 -0
- package/node_modules/zod/v4/locales/hi.cjs +136 -0
- package/node_modules/zod/v4/locales/hi.d.cts +5 -0
- package/node_modules/zod/v4/locales/hi.d.ts +4 -0
- package/node_modules/zod/v4/locales/hi.js +109 -0
- package/node_modules/zod/v4/locales/hr.cjs +2 -0
- package/node_modules/zod/v4/locales/hr.js +2 -0
- package/node_modules/zod/v4/locales/hu.cjs +3 -0
- package/node_modules/zod/v4/locales/hu.js +3 -0
- package/node_modules/zod/v4/locales/hy.cjs +9 -0
- package/node_modules/zod/v4/locales/hy.js +9 -0
- package/node_modules/zod/v4/locales/id.cjs +3 -0
- package/node_modules/zod/v4/locales/id.js +3 -0
- package/node_modules/zod/v4/locales/index.cjs +22 -2
- package/node_modules/zod/v4/locales/index.d.cts +10 -0
- package/node_modules/zod/v4/locales/index.d.ts +10 -0
- package/node_modules/zod/v4/locales/index.js +10 -0
- package/node_modules/zod/v4/locales/is.cjs +3 -0
- package/node_modules/zod/v4/locales/is.js +3 -0
- package/node_modules/zod/v4/locales/it.cjs +3 -0
- package/node_modules/zod/v4/locales/it.js +3 -0
- package/node_modules/zod/v4/locales/ja.cjs +3 -0
- package/node_modules/zod/v4/locales/ja.js +3 -0
- package/node_modules/zod/v4/locales/ka.cjs +3 -0
- package/node_modules/zod/v4/locales/ka.js +3 -0
- package/node_modules/zod/v4/locales/km.cjs +3 -0
- package/node_modules/zod/v4/locales/km.js +3 -0
- package/node_modules/zod/v4/locales/kn.cjs +141 -0
- package/node_modules/zod/v4/locales/kn.d.cts +5 -0
- package/node_modules/zod/v4/locales/kn.d.ts +4 -0
- package/node_modules/zod/v4/locales/kn.js +114 -0
- package/node_modules/zod/v4/locales/ko.cjs +3 -0
- package/node_modules/zod/v4/locales/ko.js +3 -0
- package/node_modules/zod/v4/locales/lt.cjs +2 -0
- package/node_modules/zod/v4/locales/lt.js +2 -0
- package/node_modules/zod/v4/locales/mk.cjs +3 -0
- package/node_modules/zod/v4/locales/mk.js +3 -0
- package/node_modules/zod/v4/locales/ms.cjs +3 -0
- package/node_modules/zod/v4/locales/ms.js +3 -0
- package/node_modules/zod/v4/locales/ne.cjs +136 -0
- package/node_modules/zod/v4/locales/ne.d.cts +5 -0
- package/node_modules/zod/v4/locales/ne.d.ts +4 -0
- package/node_modules/zod/v4/locales/ne.js +109 -0
- package/node_modules/zod/v4/locales/nl.cjs +3 -0
- package/node_modules/zod/v4/locales/nl.js +3 -0
- package/node_modules/zod/v4/locales/nn.cjs +138 -0
- package/node_modules/zod/v4/locales/nn.d.cts +5 -0
- package/node_modules/zod/v4/locales/nn.d.ts +4 -0
- package/node_modules/zod/v4/locales/nn.js +111 -0
- package/node_modules/zod/v4/locales/no.cjs +5 -2
- package/node_modules/zod/v4/locales/no.js +5 -2
- package/node_modules/zod/v4/locales/ota.cjs +3 -0
- package/node_modules/zod/v4/locales/ota.js +3 -0
- package/node_modules/zod/v4/locales/pl.cjs +3 -0
- package/node_modules/zod/v4/locales/pl.js +3 -0
- package/node_modules/zod/v4/locales/ps.cjs +3 -0
- package/node_modules/zod/v4/locales/ps.js +3 -0
- package/node_modules/zod/v4/locales/pt-BR.cjs +168 -0
- package/node_modules/zod/v4/locales/pt-BR.d.cts +5 -0
- package/node_modules/zod/v4/locales/pt-BR.d.ts +4 -0
- package/node_modules/zod/v4/locales/pt-BR.js +141 -0
- package/node_modules/zod/v4/locales/pt.cjs +87 -55
- package/node_modules/zod/v4/locales/pt.js +87 -55
- package/node_modules/zod/v4/locales/ro.cjs +1 -0
- package/node_modules/zod/v4/locales/ro.js +1 -0
- package/node_modules/zod/v4/locales/ru.cjs +10 -0
- package/node_modules/zod/v4/locales/ru.js +10 -0
- package/node_modules/zod/v4/locales/sk.cjs +141 -0
- package/node_modules/zod/v4/locales/sk.d.cts +5 -0
- package/node_modules/zod/v4/locales/sk.d.ts +4 -0
- package/node_modules/zod/v4/locales/sk.js +114 -0
- package/node_modules/zod/v4/locales/sl.cjs +3 -0
- package/node_modules/zod/v4/locales/sl.js +3 -0
- package/node_modules/zod/v4/locales/sv.cjs +5 -2
- package/node_modules/zod/v4/locales/sv.js +5 -2
- package/node_modules/zod/v4/locales/ta.cjs +3 -0
- package/node_modules/zod/v4/locales/ta.js +3 -0
- package/node_modules/zod/v4/locales/th.cjs +3 -0
- package/node_modules/zod/v4/locales/th.js +3 -0
- package/node_modules/zod/v4/locales/tk.cjs +132 -0
- package/node_modules/zod/v4/locales/tk.d.cts +5 -0
- package/node_modules/zod/v4/locales/tk.d.ts +4 -0
- package/node_modules/zod/v4/locales/tk.js +105 -0
- package/node_modules/zod/v4/locales/tr.cjs +3 -0
- package/node_modules/zod/v4/locales/tr.js +3 -0
- package/node_modules/zod/v4/locales/uk.cjs +3 -0
- package/node_modules/zod/v4/locales/uk.js +3 -0
- package/node_modules/zod/v4/locales/ur.cjs +3 -0
- package/node_modules/zod/v4/locales/ur.js +3 -0
- package/node_modules/zod/v4/locales/uz.cjs +1 -0
- package/node_modules/zod/v4/locales/uz.js +1 -0
- package/node_modules/zod/v4/locales/vi.cjs +3 -0
- package/node_modules/zod/v4/locales/vi.js +3 -0
- package/node_modules/zod/v4/locales/yo.cjs +3 -0
- package/node_modules/zod/v4/locales/yo.js +3 -0
- package/node_modules/zod/v4/locales/zh-CN.cjs +3 -0
- package/node_modules/zod/v4/locales/zh-CN.js +3 -0
- package/node_modules/zod/v4/locales/zh-TW.cjs +3 -0
- package/node_modules/zod/v4/locales/zh-TW.js +3 -0
- package/node_modules/zod/v4/mini/checks.cjs +2 -1
- package/node_modules/zod/v4/mini/checks.d.cts +1 -1
- package/node_modules/zod/v4/mini/checks.d.ts +1 -1
- package/node_modules/zod/v4/mini/checks.js +1 -1
- package/node_modules/zod/v4/mini/deep-partial.cjs +39 -0
- package/node_modules/zod/v4/mini/deep-partial.d.cts +14 -0
- package/node_modules/zod/v4/mini/deep-partial.d.ts +14 -0
- package/node_modules/zod/v4/mini/deep-partial.js +13 -0
- package/node_modules/zod/v4/mini/external.cjs +12 -1
- package/node_modules/zod/v4/mini/external.d.cts +5 -2
- package/node_modules/zod/v4/mini/external.d.ts +5 -2
- package/node_modules/zod/v4/mini/external.js +3 -1
- package/node_modules/zod/v4/mini/in-out.cjs +63 -0
- package/node_modules/zod/v4/mini/in-out.d.cts +8 -0
- package/node_modules/zod/v4/mini/in-out.d.ts +8 -0
- package/node_modules/zod/v4/mini/in-out.js +36 -0
- package/node_modules/zod/v4/mini/parse.cjs +3 -1
- package/node_modules/zod/v4/mini/parse.d.cts +1 -1
- package/node_modules/zod/v4/mini/parse.d.ts +1 -1
- package/node_modules/zod/v4/mini/parse.js +1 -1
- package/node_modules/zod/v4/mini/schemas.cjs +75 -47
- package/node_modules/zod/v4/mini/schemas.d.cts +43 -13
- package/node_modules/zod/v4/mini/schemas.d.ts +43 -13
- package/node_modules/zod/v4/mini/schemas.js +71 -45
- package/openclaw.plugin.json +21 -0
- package/package.json +11 -8
- package/node_modules/jszip/.github/workflows/pr.yaml +0 -58
- package/node_modules/jszip/.jekyll-metadata +0 -0
- package/node_modules/jszip/.travis.yml +0 -17
- package/node_modules/jszip/deps.js +0 -37
- package/node_modules/jszip/graph.svg +0 -601
- package/node_modules/zod/src/v4/core/config.ts +0 -15
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Atomic writes
|
|
2
2
|
|
|
3
|
-
`@openclaw/fs-safe/atomic` re-exports the lower-level helpers that `root()`'s write methods are built on. Reach for them when you have
|
|
3
|
+
`@openclaw/fs-safe/atomic` re-exports the lower-level helpers that `root()`'s write methods are built on. Reach for them when you have a path you trust and want sibling-temp + rename without setting up a `Root`, or when you need finer control over `fsync`, mode preservation, or pre-rename hooks.
|
|
4
4
|
|
|
5
5
|
```ts
|
|
6
6
|
import {
|
|
@@ -20,6 +20,14 @@ On POSIX, the parent is opened with no-follow and directory-only flags, checked
|
|
|
20
20
|
|
|
21
21
|
Async replacements to the same destination are serialized inside the current process, so two overlapping `replaceFileAtomic()` calls do not interleave their temp-write/rename phases. Use a sidecar lock when multiple processes may write the same target.
|
|
22
22
|
|
|
23
|
+
Relative paths retain their literal suffix so `.` and `..` keep Node's existing
|
|
24
|
+
filesystem semantics. On Windows, an ordinary drive-relative destination such
|
|
25
|
+
as `C:.\\state.json` is captured at entry by anchoring the drive's current
|
|
26
|
+
directory without normalizing that suffix. The anchored absolute spelling is
|
|
27
|
+
used for staging, locks, callbacks, publication, and cleanup. Any additional
|
|
28
|
+
colon remains visible and is rejected as a filesystem namespace alias before
|
|
29
|
+
I/O; malformed namespace-drive spellings remain rejected.
|
|
30
|
+
|
|
23
31
|
```ts
|
|
24
32
|
import { replaceFileAtomic } from "@openclaw/fs-safe/atomic";
|
|
25
33
|
|
|
@@ -40,7 +48,7 @@ type ReplaceFileAtomicOptions = {
|
|
|
40
48
|
content: string | Uint8Array;
|
|
41
49
|
dirMode?: number; // parent-directory mode (POSIX; default 0o700)
|
|
42
50
|
mode?: number; // new-file mode (default 0o600)
|
|
43
|
-
preserveExistingMode?: boolean; //
|
|
51
|
+
preserveExistingMode?: boolean; // inherit existing regular-file rwx bits; default false
|
|
44
52
|
tempPrefix?: string; // default ".fs-safe-replace"
|
|
45
53
|
renameMaxRetries?: number; // EBUSY retries; default 0
|
|
46
54
|
renameRetryBaseDelayMs?: number; // exponential base; default 50
|
|
@@ -57,6 +65,17 @@ type ReplaceFileAtomicOptions = {
|
|
|
57
65
|
};
|
|
58
66
|
```
|
|
59
67
|
|
|
68
|
+
`preserveExistingMode` snapshots only the ordinary rwx bits (`0o777`) from an
|
|
69
|
+
existing non-symlink regular destination. A final symlink fails with
|
|
70
|
+
`FsSafeError("symlink")`; a directory or other non-regular destination fails
|
|
71
|
+
with `FsSafeError("not-file")`. Set-user-ID, set-group-ID, and sticky bits are
|
|
72
|
+
never inherited. Mode inheritance does not copy ownership, ACLs, extended
|
|
73
|
+
attributes, or exact destination identity. Rename publication creates a new
|
|
74
|
+
inode; an in-place copy fallback can retain metadata already attached to its
|
|
75
|
+
pinned destination. The snapshot does not make replacement a compare-and-swap
|
|
76
|
+
operation, so the destination parent must still be protected from untrusted
|
|
77
|
+
concurrent namespace mutation.
|
|
78
|
+
|
|
60
79
|
### `beforeRename`
|
|
61
80
|
|
|
62
81
|
Runs after the temp file is fully written and before the rename. Use it to take a backup snapshot, capture the about-to-be-replaced contents, or notify an observer. The helper retains the staged descriptor and exact bigint identity across the hook; replacing, deleting, hardlinking, or changing the temp entry to a non-regular file is rejected before publication:
|
|
@@ -75,12 +94,37 @@ If `beforeRename` throws, the rename is skipped and the owned temp file is remov
|
|
|
75
94
|
|
|
76
95
|
Identity checks and pathname rename/unlink remain separate syscalls, not atomic conditional mutations. Use an approved writable parent plus cooperative locking or OS isolation when arbitrary concurrent namespace mutation is in scope.
|
|
77
96
|
|
|
78
|
-
### FUSE
|
|
97
|
+
### FUSE, Windows exFAT/FAT32, and unstable rename identity
|
|
79
98
|
|
|
80
99
|
Strict source-to-destination identity is the default. Some FUSE mounts assign a different inode to the destination during rename even without concurrency. Set `renameIdentity: "verify-content-with-lock"` to accept that boundary only when the re-opened no-follow destination has the exact requested SHA-256 content under an exclusive hashed sidecar lock in the destination parent. The newly accepted descriptor and identity remain pinned through parent sync and final verification. The synchronous helper provides the same policy with the synchronous lock implementation.
|
|
81
100
|
|
|
82
101
|
This is the same explicit weaker contract available on `Root` writes: cooperating writers are serialized, stale locks fail closed, and mismatched content is rejected after publication without rollback. A same-authority actor that ignores the advisory lock can still substitute another file with identical bytes, so do not use this compatibility policy in directories writable by untrusted same-UID processes.
|
|
83
102
|
|
|
103
|
+
Windows exFAT/FAT32 volumes can also change file identity during rename, depending
|
|
104
|
+
on the source and destination names. The destination may already contain the
|
|
105
|
+
requested bytes when strict verification reports `path-mismatch`. A short
|
|
106
|
+
temporary name alone does not guarantee stable identity for a longer destination.
|
|
107
|
+
For an application-controlled directory on such a volume, callers can explicitly
|
|
108
|
+
select `renameIdentity: "verify-content-with-lock"` on `replaceFileAtomic` or
|
|
109
|
+
`replaceFileAtomicSync`. Keep strict mode for directories that require the
|
|
110
|
+
stronger identity contract; do not automatically retry every `path-mismatch`
|
|
111
|
+
with the weaker policy. Staging names remain random, including custom prefixes.
|
|
112
|
+
|
|
113
|
+
To verify the built package against an actual volume, run
|
|
114
|
+
`node scripts/atomic-rename-compat-proof.mjs EXISTING_PARENT` after `pnpm build`.
|
|
115
|
+
Use a trusted parent directory that no other process can rename or modify during
|
|
116
|
+
the entire run, including cleanup; do not point the probe at a shared writable
|
|
117
|
+
volume root. Cleanup checks the created directory's identity before recursive
|
|
118
|
+
removal, but the check and removal are not atomic. The probe does not test safety
|
|
119
|
+
against hostile concurrent namespace mutation.
|
|
120
|
+
The probe creates and cleans up its own child directory and emits JSON without
|
|
121
|
+
local paths. It compares default, strict, and locked policies in both async and
|
|
122
|
+
sync calls, checks real rename identities and file contents, injects different-
|
|
123
|
+
and identical-content substitutions, checks lock cleanup, and exercises custom
|
|
124
|
+
prefix isolation and validation. Callback staging remains strict and can still
|
|
125
|
+
report identity drift; the probe records that result separately. Filesystem type
|
|
126
|
+
must be recorded independently; the probe does not infer it from a drive letter.
|
|
127
|
+
|
|
84
128
|
### `EPERM` and copy fallback
|
|
85
129
|
|
|
86
130
|
On systems where `rename` fails with `EPERM`/`EEXIST`, pass
|
|
@@ -110,6 +154,11 @@ than `maxRestoreBytes` fails with `too-large` before mutation. A missing
|
|
|
110
154
|
destination has no original to restore and follows the exclusive-create copy
|
|
111
155
|
fallback.
|
|
112
156
|
|
|
157
|
+
Restore snapshots use the pinned file's size as an allocation hint, with an
|
|
158
|
+
initial allocation capped at 16 MiB plus the overflow byte. Reads continue
|
|
159
|
+
through short reads and EOF, grow only as data arrives, and enforce the same
|
|
160
|
+
`maxRestoreBytes` budget even if the destination grows after its size was read.
|
|
161
|
+
|
|
113
162
|
### Sync variant
|
|
114
163
|
|
|
115
164
|
`replaceFileAtomicSync` accepts the same base options, a synchronous
|
|
@@ -133,6 +182,8 @@ await replaceDirectoryAtomic({
|
|
|
133
182
|
The helper renames `targetDir` to a generated backup path, renames `stagedDir → targetDir`, then removes the backup. If the second rename fails, it tries to restore the original target before rethrowing.
|
|
134
183
|
Concurrent replacements of the same resolved target are serialized inside the
|
|
135
184
|
current process so their backup, commit, and cleanup phases cannot interleave.
|
|
185
|
+
On Windows, ordinary drive-relative staged and target paths are anchored at
|
|
186
|
+
entry before namespace-alias admission and resolution.
|
|
136
187
|
`backupPrefix`, when supplied, is sanitized as one path prefix and cannot contain
|
|
137
188
|
path separators or NUL bytes; the generated backup tail is randomized.
|
|
138
189
|
|
|
@@ -182,6 +233,13 @@ directory mode. Staged file modes are applied through their still-open handles.
|
|
|
182
233
|
If descriptor-bound mode application fails, the staged path is removed and the
|
|
183
234
|
move fails before publication. A transient staged-path cleanup failure retains
|
|
184
235
|
an identity-bound process-exit cleanup retry.
|
|
236
|
+
The staging entry's initially admitted identity is checked before publication
|
|
237
|
+
and cleanup; a later substituted entry is preserved. Regular files are admitted
|
|
238
|
+
through their new descriptor. Node provides no creation descriptor for directories
|
|
239
|
+
or symlinks, so their first identity comes from an immediate pathname observation.
|
|
240
|
+
Replacement before that observation remains a best-effort detection gap: use a
|
|
241
|
+
parent protected from concurrent untrusted mutation or OS isolation. A copy write
|
|
242
|
+
that makes no progress rejects instead of looping indefinitely.
|
|
185
243
|
On POSIX, staged directory modes are applied through no-follow directory
|
|
186
244
|
descriptors; on Windows, Node cannot portably open those descriptors and no
|
|
187
245
|
pathname `chmod` fallback is attempted, so directory modes remain subject to
|
|
@@ -200,6 +258,8 @@ await movePathWithCopyFallback({
|
|
|
200
258
|
```
|
|
201
259
|
|
|
202
260
|
Use it when source and destination might live on different filesystems (containers, tmpfs, separate volumes).
|
|
261
|
+
On Windows, ordinary drive-relative `from` and `to` paths are anchored at entry;
|
|
262
|
+
publication receipts report the resulting absolute destination.
|
|
203
263
|
The hardlink policy is captured when the move starts. Changing or reusing the
|
|
204
264
|
options object later does not change the policy of an in-flight move.
|
|
205
265
|
`sourceHardlinks: "reject"` performs a recursive preflight capped at 50,000
|
|
@@ -212,7 +272,19 @@ the preflight cap fails with `FsSafeError("too-large")`.
|
|
|
212
272
|
If another writer changes source entries during the fallback, the staged copy
|
|
213
273
|
throws `ESTALE` before commit when possible. If the destination has already
|
|
214
274
|
been committed, cleanup still preserves the changed source entries and throws
|
|
215
|
-
`ESTALE`.
|
|
275
|
+
`ESTALE`. Directory manifests retain an exact bigint device/inode receipt from
|
|
276
|
+
copy admission. Each directory is rechecked after traversal, and the source root
|
|
277
|
+
is checked again before publication. Cleanup checks the same receipt before
|
|
278
|
+
removing children, then invokes mutation authority and rechecks the receipt and
|
|
279
|
+
directory type immediately before removal. Unknown Windows identity
|
|
280
|
+
components get at most one retry that retains known components; persistent
|
|
281
|
+
ambiguity fails closed before further removal. A directory that disappeared or
|
|
282
|
+
was replaced during child cleanup is reported as stale; an observed replacement
|
|
283
|
+
is preserved. Unrelated children
|
|
284
|
+
added to the original directory are preserved while unchanged copied children
|
|
285
|
+
are still removed. These pathname checks remain best-effort: they cannot make
|
|
286
|
+
the final identity check and removal atomic against another process.
|
|
287
|
+
When allowed source names are hardlinks to the same inode, each owned
|
|
216
288
|
unlink is verified through a remaining manifested alias and its exact resulting
|
|
217
289
|
identity becomes the next cleanup receipt. This accounts for the operation's
|
|
218
290
|
own link-count and ctime changes without suppressing unexpected external
|
|
@@ -289,7 +361,7 @@ preserves the existing move and source-identity behavior.
|
|
|
289
361
|
|
|
290
362
|
| `Root` methods | `atomic` helpers |
|
|
291
363
|
|---|---|
|
|
292
|
-
| Take relative paths, bound to a `rootDir`. | Take absolute paths, no boundary. |
|
|
364
|
+
| Take relative paths, bound to a `rootDir`. | Take trusted absolute or relative paths, no boundary. |
|
|
293
365
|
| Throw `FsSafeError` with `code`. | Throw `FsSafeError` *or* the underlying `NodeJS.ErrnoException`, depending on failure point. |
|
|
294
366
|
| Atomicity, mode, hooks, fsync are sane defaults. | Caller controls all of the above. |
|
|
295
367
|
| `mkdir`, identity check, hardlink reject built in. | No root boundary; `movePathWithCopyFallback` has explicit `sourceHardlinks` policy, while other helpers expose their own narrower checks. |
|
|
@@ -65,6 +65,7 @@ type FsSafeLockConfig = {
|
|
|
65
65
|
Set process-wide defaults for sidecar lock options. This does **not** turn locking on globally; callers still need to pass `lock: true` or a lock options object for the specific JSON store/resource that needs cross-process coordination.
|
|
66
66
|
|
|
67
67
|
`staleRecovery` defaults to `"fail-closed"`. The opt-in `"remove-if-unchanged"` mode requires caller approval and serializes the final snapshot check and unlink with an exclusive `.reclaim` guard. A reclaim guard left by a killed reclaimer fails closed and requires externally coordinated cleanup.
|
|
68
|
+
`staleMs` must be non-negative and not `NaN`; `Infinity` disables age-based staleness.
|
|
68
69
|
|
|
69
70
|
For a daemon that should wait briefly for normal contention but never delete a
|
|
70
71
|
stale owner without per-lock approval:
|
|
@@ -42,6 +42,32 @@ Vitest. Tests live in `test/` and follow `*.test.ts`. Run a single file with:
|
|
|
42
42
|
pnpm test test/archive.test.ts
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
+
Guest filesystem tests and package smoke also need `python3` on Linux and
|
|
46
|
+
macOS. They execute the exported source on synthetic files; Windows checks
|
|
47
|
+
the import surface and leaves POSIX execution to the Linux/macOS lanes.
|
|
48
|
+
After building on Linux, `node scripts/check-pack.mjs --guest-cross-device`
|
|
49
|
+
also proves an installed-package directory move from temporary storage to
|
|
50
|
+
`/dev/shm`; the command requires those locations to be different filesystems.
|
|
51
|
+
|
|
52
|
+
With Bun 1.4.2 installed, build the host addon and run the native compatibility
|
|
53
|
+
lane in real Bun workers, then exercise the built package with JIT disabled:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
pnpm native:build
|
|
57
|
+
pnpm test:bun:native
|
|
58
|
+
bun --jitless scripts/bun-native-proof.mjs
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Keep the Node/pnpm build toolchain above. CI runs the native compatibility lane
|
|
62
|
+
on Linux, macOS, and Windows. The built-package proof checks `auto`/`require`,
|
|
63
|
+
native-off loading policy, and a separate installation without the addon.
|
|
64
|
+
|
|
65
|
+
`pnpm test:bun` runs the entire Node-oriented suite as a diagnostic. On released
|
|
66
|
+
Bun, its explicit native-off and missing-helper cases include unsupported
|
|
67
|
+
permission/path behavior described in [install](install.md#bun-runtime); this
|
|
68
|
+
command is not a passing compatibility gate. Node CI retains every fallback
|
|
69
|
+
assertion. Neither lane rewrites `off` to `auto` or marks defects as expected passes.
|
|
70
|
+
|
|
45
71
|
Use `vi.mock` sparingly. Most tests should drive real disk operations in a `mkdtemp`-created scratch directory, asserting on observable behavior. The library has [test hooks](testing.md) for the rare cases where you need to inject a TOCTOU race deterministically.
|
|
46
72
|
|
|
47
73
|
Vitest timeouts do not cancel filesystem promises. Shared fixtures with expensive
|
|
@@ -50,7 +76,10 @@ setup use `useSuiteFixture` from `test/helpers/suite-fixture.ts`: setup has a se
|
|
|
50
76
|
removing directories. Run shared-state corpora sequentially with a deadline per
|
|
51
77
|
payload. Keep child-process liveness limits separate from fixture preparation.
|
|
52
78
|
The Windows CI slow-copy proof runs the real package-copy process-exit test with a
|
|
53
|
-
|
|
79
|
+
16-second copy delay, a 10-second child deadline, a 15-second test deadline, and
|
|
80
|
+
60-second setup and teardown hook budgets. Other hosts retain the ordinary
|
|
81
|
+
six-second delay, four-second child deadline, five-second test deadline, and
|
|
82
|
+
30-second hook budgets:
|
|
54
83
|
|
|
55
84
|
```bash
|
|
56
85
|
pnpm build
|
|
@@ -68,6 +97,13 @@ pnpm check
|
|
|
68
97
|
This runs the filesystem boundary checks, build, tests, and package
|
|
69
98
|
tarball/import validation.
|
|
70
99
|
|
|
100
|
+
### Method benchmarks
|
|
101
|
+
|
|
102
|
+
`pnpm benchmark:methods` measures the callable library surface against synthetic
|
|
103
|
+
fixtures and fails on uncovered exports or returned methods. See the
|
|
104
|
+
[benchmark guide](https://github.com/openclaw/fs-safe/tree/main/benchmarks) for native/fallback runs, per-call
|
|
105
|
+
timings, exclusions, and comparison methodology. Run `pnpm build` first.
|
|
106
|
+
|
|
71
107
|
### Real TAR producers
|
|
72
108
|
|
|
73
109
|
After installing the freshly packed root (and optionally its freshly built host
|
|
@@ -116,7 +152,9 @@ collection uses the actual seven collected native tarballs instead. Run it with
|
|
|
116
152
|
`pnpm package:collect` after assembling all seven real bindings; missing targets
|
|
117
153
|
fail collection. `pnpm package:collect --allow-host-only` exercises the same
|
|
118
154
|
lifecycle boundary locally but proves only the host. Both collection commands
|
|
119
|
-
require the pnpm lifecycle CLI path;
|
|
155
|
+
require the pnpm lifecycle CLI path; JavaScript CLIs run through Node and standalone
|
|
156
|
+
`@pnpm/exe` binaries run directly. Shell/cmd shims and PATH fallback are not used;
|
|
157
|
+
direct `node` invocation without lifecycle metadata is unsupported. Archive
|
|
120
158
|
codecs and their dependencies are packed from the installed dependency graph.
|
|
121
159
|
|
|
122
160
|
PR CI builds and executes four host targets: Linux x64 glibc, Linux x64 musl
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
# Directory copying and cloning
|
|
2
|
+
|
|
3
|
+
`@openclaw/fs-safe/copy` materializes independent, caller-owned directory trees. `copyTree` prefers native copy-on-write operations by default, can require cloning, or can copy regular file bytes without cloning or copy offload.
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
import { copyTree, createCloneSource, probeTreeClone } from "@openclaw/fs-safe/copy";
|
|
7
|
+
|
|
8
|
+
const parent = "/srv/worktrees";
|
|
9
|
+
const backend = probeTreeClone(parent);
|
|
10
|
+
if (backend) {
|
|
11
|
+
const template = `${parent}/template`;
|
|
12
|
+
await createCloneSource(template);
|
|
13
|
+
// Populate this caller-owned template, then keep its contents unchanged.
|
|
14
|
+
await copyTree(template, `${parent}/checkout`, {
|
|
15
|
+
clone: "always",
|
|
16
|
+
signal: AbortSignal.timeout(60_000),
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Filesystems
|
|
22
|
+
|
|
23
|
+
| Backend | Operation | Source preparation |
|
|
24
|
+
| ------- | ---------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
|
|
25
|
+
| `apfs` | Native bulk clone, then directory timestamp repair | `createCloneSource` creates an empty directory. |
|
|
26
|
+
| `btrfs` | One native writable subvolume snapshot | `createCloneSource` creates a subvolume; an ordinary directory is not a snapshot source. No `btrfs` executable is required. |
|
|
27
|
+
| `refs` | Native directory traversal with parallel file block clones | `createCloneSource` creates an empty directory on ReFS, including Dev Drive volumes. |
|
|
28
|
+
| `xfs` | Native directory traversal with parallel file reflinks | `createCloneSource` creates an empty directory. The XFS volume must support reflinks. |
|
|
29
|
+
| `zfs` | Native directory traversal with parallel file reflinks | `createCloneSource` creates an empty directory. Requires Linux OpenZFS file reflinks and the pool block-cloning feature. |
|
|
30
|
+
|
|
31
|
+
Native cloning requires source and destination filesystems that support cloning between them. Automatic and ordinary copying can cross filesystems. The source repository used to populate a template can live elsewhere. ReFS, XFS, and ZFS share file data rather than the whole directory metadata tree, so creating many small files still has a cost.
|
|
32
|
+
|
|
33
|
+
ZFS uses strict file reflinks within one dataset, not dataset snapshots. The installed Linux OpenZFS version must implement `FICLONE`, and the pool must enable `feature@block_cloning`. The probe identifies ZFS even when that feature is unavailable; `clone: "always"` then fails and `"auto"` can copy bytes. Native cloning was verified on OpenZFS 2.4.1 with POSIX ACLs. See the [OpenZFS block-cloning contract](https://openzfs.github.io/openzfs-docs/Basic%20Concepts/Data%20Storage/Block%20Cloning.html) for filesystem limits and pool sharing counters.
|
|
34
|
+
|
|
35
|
+
Btrfs preserves native subvolume snapshot semantics: nested subvolume contents are not included. Prepare source-only templates without nested subvolumes. This API does not recursively snapshot a hierarchy of subvolumes.
|
|
36
|
+
|
|
37
|
+
### APFS permissions
|
|
38
|
+
|
|
39
|
+
APFS directory cloning does not guarantee descendant ACL preservation. With the `CLONE_ACL` flag used here, live macOS testing preserved the source root's ACL but dropped an explicit ACL on a source descendant. Destination ACL inheritance was also omitted below the cloned root. `probeTreeClone` checks filesystem support only; neither it nor `copyTree` checks whether these ACL semantics meet the caller's permission policy. A successful clone is not proof of source ACL preservation or normal file-creation inheritance throughout the tree.
|
|
40
|
+
|
|
41
|
+
Callers that require source ACL preservation or destination ACL inheritance must use a creation path that preserves their permission policy. For example, a private Git template cache can prohibit custom descendant ACLs and decline cloning when the destination parent has inheritable ACL entries, the template root carries ACLs, or ACL inspection fails; it must also account for policy changes during cloning. Checking only the source root cannot establish that an arbitrary tree has no descendant ACLs. This library does not inspect or repair ACLs after a clone.
|
|
42
|
+
|
|
43
|
+
Apple [strongly discourages general directory cloning](https://github.com/apple-oss-distributions/xnu/blob/f6217f891ac0bb64f3d375211650a4c1ff8ca1ea/bsd/man/man2/clonefile.2). The [XNU directory-clone authorizer notes unfinished descendant ACL inheritance](https://github.com/apple-oss-distributions/xnu/blob/f6217f891ac0bb64f3d375211650a4c1ff8ca1ea/bsd/vfs/vfs_subr.c#L8879); this is one verified limitation, not Apple's stated complete rationale. The bulk operation remains useful for controlled, immutable templates whose callers accept its metadata semantics.
|
|
44
|
+
|
|
45
|
+
## API
|
|
46
|
+
|
|
47
|
+
`TreeCloneBackend` is the `"apfs" | "btrfs" | "refs" | "xfs" | "zfs"` union returned by the probe. `CopyTreeOptions` contains the optional `clone`, `signal`, and `concurrency` arguments. `CopyCloneMode` is the `"auto" | "always" | "never"` strategy shared with [`Root.copyIn`](root.md#writes); tree copies default to `"auto"`, while guarded file copies default to `"never"`.
|
|
48
|
+
|
|
49
|
+
`probeTreeClone(parentPath)` synchronously inspects an existing directory and returns its supported backend name or `undefined`. It creates no probe artifacts. A filesystem name identifies a candidate backend; for example, an older XFS volume may have reflinks disabled. The actual operation determines availability. An unavailable native binding produces `undefined` in automatic mode; the package's explicit native `require` mode still reports a missing binding as an error.
|
|
50
|
+
|
|
51
|
+
`createCloneSource(destination, { signal? })` creates an empty cloneable source. Its parent must already exist and the destination must be absent.
|
|
52
|
+
|
|
53
|
+
`copyTree(source, destination, { clone?, signal?, concurrency? })` copies a directory into an absent destination. Existing destinations are never merged or overwritten. The destination must be outside the source tree.
|
|
54
|
+
|
|
55
|
+
| `clone` policy | Behavior |
|
|
56
|
+
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
57
|
+
| `"auto"` (default) | Prefer native cloning; copy bytes when the binding or filesystem capability is unavailable, or cloning cannot cross the filesystem boundary. |
|
|
58
|
+
| `"always"` | Require native cloning. Unsupported operations fail without a byte-copy fallback. |
|
|
59
|
+
| `"never"` | Copy regular file bytes using reads and writes. No native cloning or copy-offload calls. Works without a native binding. |
|
|
60
|
+
|
|
61
|
+
Automatic copying does not recover from permission errors, I/O errors, cancellation, or rejected source contents such as ReFS named streams. A failed clone must leave the destination absent before fallback can create it; otherwise copying fails rather than merging into a partial tree.
|
|
62
|
+
|
|
63
|
+
`concurrency` accepts integers from 1 through 32 and bounds active file copies. ReFS, XFS, and ZFS cloning default to 16 workers. Byte copying defaults to four concurrent files on Windows and one elsewhere. Btrfs uses its bulk operation. APFS uses a bulk clone followed by native directory-entry enumeration to restore directory timestamps; known regular files and symbolic links need no additional stat or open.
|
|
64
|
+
|
|
65
|
+
On Windows, automatic byte copying uses the native binding when available to transfer data between the already-checked file handles in chunks of at most 1 MiB, with smaller buffers for small files. This accelerates NTFS and cross-volume copies without reopening source or destination pathnames. The native worker finishes before its descriptors are closed or cancellation is reported. `clone: "never"` and native-disabled copies use JavaScript read/write loops with reusable buffers: at most 1 MiB per active file on Windows, or 128 KiB elsewhere. Both paths share the file-worker budget across sibling directories, wait for all admitted writes after cancellation or failure, and restore directory timestamps after their descendants finish. Completed directory traversals awaiting writes or metadata are bounded by concurrency; ancestors remain pinned while traversing their children.
|
|
66
|
+
|
|
67
|
+
On Linux, automatic byte copying also uses the native binding when available. It reads in chunks up to 1 MiB, using smaller buffers for smaller source-size hints, and leaves leading and trailing zero-filled portions of each chunk unwritten in the new file, avoiding their allocation on filesystems that support sparse files. A final size update preserves trailing holes and all-zero files. This path uses reads and writes, without cloning or copy offload; it still reads the full logical contents and does not promise identical sparse extent layout. `clone: "never"` retains the JavaScript byte-copy path.
|
|
68
|
+
|
|
69
|
+
Clones preserve file contents, empty directories, timestamps, executable modes where supported, and literal symbolic links. Editing a clone does not modify its source. Unsupported filesystem operations fail; callers may choose their own copy or checkout fallback after the failed operation has settled.
|
|
70
|
+
|
|
71
|
+
Native Windows byte copies can store large zero-filled chunks as sparse ranges when the destination is initially empty and its filesystem supports sparse files. This still reads every source byte and creates an independent copy.
|
|
72
|
+
|
|
73
|
+
The ReFS backend rejects files with alternate data streams and unsupported reparse-point types instead of silently losing their contents. Symbolic links and junctions are preserved.
|
|
74
|
+
|
|
75
|
+
XFS and ZFS preserve regular-file and directory modes, timestamps, extended attributes, and ACLs. They reject special files, symlink extended attributes, non-UTF-8 names, and directory nesting deeper than 128 levels. Hardlinked source files become independent reflinked files. Portable byte copying preserves file contents, empty directories, modes where supported, file and directory timestamps, and literal symbolic links; it does not promise ownership, ACL, extended-attribute, alternate-stream, or sparse-layout preservation. On Windows, byte copying rejects unresolved symbolic links because Node does not expose their file/directory link type; resolved links keep their literal target and source type. POSIX dangling links are preserved. Choose a copying policy that meets the caller's metadata requirements; automatic copying can select either path.
|
|
76
|
+
|
|
77
|
+
`readCloneFileMetadata(files)` asynchronously reads APFS data-stream identities and file metadata in one native batch. Results correspond to input order; missing or unsupported entries return `undefined`. The returned `CloneFileMetadata` includes clone ID, device/inode, size, mode, ownership, and timestamps. These are point-in-time observations, not authorization or proof that later reads remain unchanged. Consumers such as Git index adapters must validate their own content and timestamp invariants. The reader does not follow leaf symbolic links.
|
|
78
|
+
|
|
79
|
+
## Borrowed FileHandle transfers
|
|
80
|
+
|
|
81
|
+
`copyFileHandle` from `@openclaw/fs-safe/advanced` copies bytes between two
|
|
82
|
+
already-open regular files. Use it when a snapshot or materialization owner
|
|
83
|
+
has admitted the source and opened its own destination:
|
|
84
|
+
|
|
85
|
+
```ts
|
|
86
|
+
import { createHash } from "node:crypto";
|
|
87
|
+
import { copyFileHandle } from "@openclaw/fs-safe/advanced";
|
|
88
|
+
|
|
89
|
+
const digest = createHash("sha256");
|
|
90
|
+
const bytes = await copyFileHandle(sourceHandle, targetHandle, {
|
|
91
|
+
maxBytes: expectedSize,
|
|
92
|
+
signal: AbortSignal.timeout(30_000),
|
|
93
|
+
onChunk: (chunk) => { digest.update(chunk); },
|
|
94
|
+
assertBeforeMutation: assertSnapshotOwnerCurrent,
|
|
95
|
+
});
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
`CopyFileHandleOptions` contains optional `maxBytes`, `signal`, `onChunk`, and
|
|
99
|
+
`assertBeforeMutation`. The result is the actual byte count copied through EOF.
|
|
100
|
+
The four options are selected once before descriptor inspection; later mutation
|
|
101
|
+
of the options object cannot replace the active budget, signal, observer, or
|
|
102
|
+
mutation-authority callback.
|
|
103
|
+
The byte limit is not a prefix length: excess data rejects with `too-large`,
|
|
104
|
+
including data added after admission. Omitted limits are unlimited; Root's
|
|
105
|
+
default read cap does not apply. Zero accepts only an empty source. Invalid
|
|
106
|
+
limits reject before descriptor inspection.
|
|
107
|
+
|
|
108
|
+
The source and target must be distinct regular files; exact device/inode
|
|
109
|
+
aliases, including two handles to hardlinked names, reject before writing.
|
|
110
|
+
Both reads and writes start at position zero and preserve the handles' current
|
|
111
|
+
cursors. Existing destination bytes beyond the copied prefix remain intact.
|
|
112
|
+
The target must have been opened **without append mode**: some platforms ignore
|
|
113
|
+
positional writes on append handles, and Node exposes no portable open-flags
|
|
114
|
+
query. Keep both handles open and free of concurrent I/O through settlement.
|
|
115
|
+
|
|
116
|
+
The synchronous `onChunk` observer sees each source chunk before any target
|
|
117
|
+
write for that chunk. It receives a borrowed view reused by later reads; consume
|
|
118
|
+
it immediately without retaining or mutating it. This supports source hashing;
|
|
119
|
+
it does not verify bytes persisted by the destination. Callers that require a
|
|
120
|
+
destination digest must still hash the destination handle afterward. Observer
|
|
121
|
+
and authority callbacks may throw; thenable returns reject with `TypeError`
|
|
122
|
+
before the affected write. `assertBeforeMutation` runs immediately before every
|
|
123
|
+
partial-write submission and must inspect current authority each time.
|
|
124
|
+
|
|
125
|
+
The helper reuses Root copying's bounded read buffer and completes positive
|
|
126
|
+
short reads and writes. JavaScript file transfers use at most 512 KiB of scratch
|
|
127
|
+
space, reduced for smaller source-size hints and capped by a finite byte budget
|
|
128
|
+
plus its one-byte overflow probe. A zero-progress write rejects with `helper-failed`.
|
|
129
|
+
Cancellation is checked before I/O, after source reads, and before each write;
|
|
130
|
+
admitted reads and writes settle before rejection. A rejected operation can
|
|
131
|
+
leave a copied prefix. There is no rollback or pathname cleanup.
|
|
132
|
+
|
|
133
|
+
This helper never opens or closes a file, truncates, chmods, syncs, renames, or
|
|
134
|
+
publishes it. Source admission, immutability checks, destination preparation,
|
|
135
|
+
durability, publication, and failure recovery stay with the caller. Initial
|
|
136
|
+
descriptor inspection does not prove that the source remained unchanged while
|
|
137
|
+
copying. Keep existing source-fingerprint and publication checks around the
|
|
138
|
+
transfer when building snapshot operations.
|
|
139
|
+
|
|
140
|
+
## Ownership and cancellation
|
|
141
|
+
|
|
142
|
+
These are low-level operations on caller-owned absolute paths, not Root-relative methods. The source and destination parent must be real directories. The library pins their descriptors and verifies their identities; it does not establish the caller's authorization to use them. Keep the source immutable for the operation, including writes through other aliases, and keep the destination namespace under the caller's control. Literal symlinks in the cloned contents are preserved rather than followed or sanitized.
|
|
143
|
+
|
|
144
|
+
An already aborted signal prevents dispatch. In-flight cancellation stops cancellable traversal and waits for admitted native writes to finish before rejecting. APFS and Btrfs bulk operations cannot be interrupted once dispatched. An aborted or failed call can therefore leave a destination, including a complete bulk clone. It remains caller-owned; after settlement, the caller decides whether to retain or remove it. Do not start cleanup by racing the cloning promise against an abort promise.
|
|
145
|
+
|
|
146
|
+
Completion is not a crash-durability guarantee. The API is suitable for reconstructible templates and checkouts; it does not sync every file or replace application-level publication and recovery rules.
|
|
147
|
+
|
|
148
|
+
Byte copying retains fractional file and directory access/modification timestamps to the precision supported by Node's timestamp APIs and the destination filesystem. This includes dates before 1970 on Unix. On Windows, [Node's unsigned stat seconds](https://github.com/nodejs/node/blob/v26.8.2/src/node_file-inl.h#L93-L104) can report pre-1970 timestamps as dates about 136 years later; byte copying inherits that upstream limitation.
|
|
149
|
+
|
|
150
|
+
## Platform tests and benchmarks
|
|
151
|
+
|
|
152
|
+
After building the host native binding, run `pnpm test test/clone.test.ts test/copy-tree.test.ts`. APFS tests can use the normal macOS temporary directory. For Btrfs, ReFS, XFS, or ZFS, set `FS_SAFE_CLONE_TEST_ROOT` to an existing writable directory on that filesystem. The test creates and cleans only its own temporary children. An explicitly configured unsupported directory fails the test rather than silently skipping platform proof. XFS and ZFS metadata tests require the `attr` and `acl` utilities.
|
|
153
|
+
|
|
154
|
+
Run `node scripts/clone-xfs-proof.mjs MOUNT` on a real XFS volume to verify the public API, hashes, independent writes, and shared physical extents. It requires `filefrag` from `e2fsprogs`. Add `no-reflink` for an XFS fixture formatted with reflinks disabled; strict copying must fail and automatic copying must succeed through byte copying.
|
|
155
|
+
|
|
156
|
+
Run `node scripts/clone-zfs-proof.mjs MOUNT POOL` on a dedicated, otherwise idle Linux ZFS pool with compression and deduplication disabled. It verifies both `copyTree` and `Root.copyIn` through hashes and changes in the documented `bclonesaved` pool counter. It requires `zfs`, `zpool`, and `findmnt`, including permission to run `zpool sync`. Add `no-reflink` for a pool without block cloning to verify strict refusal and automatic byte fallback. The script creates and removes only its temporary directory; it does not create pools or change their properties.
|
|
157
|
+
|
|
158
|
+
Run `node benchmarks/clone.mjs SOURCE DESTINATION_PARENT` after `pnpm build` to compare one, four, and 16 workers on the same immutable source. Add `3 auto` or `3 never` to measure three samples of ordinary copying, including NTFS destinations. It records copying time separately from fixture preparation and full file-hash verification, and retains its uniquely named output directory for inspection. Prepare Btrfs sources with `createCloneSource` first.
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Directory identity
|
|
3
|
+
description: "Exact directory observations and synchronous identity assertions for application-owned workflows."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Directory identity
|
|
7
|
+
|
|
8
|
+
Use `readDirectoryIdentity()` and `assertDirectoryIdentitySync()` from
|
|
9
|
+
`@openclaw/fs-safe/advanced` when an application owns a staging or recovery flow
|
|
10
|
+
and needs to verify that a pathname still identifies an observed directory.
|
|
11
|
+
|
|
12
|
+
```ts
|
|
13
|
+
import {
|
|
14
|
+
readDirectoryIdentity,
|
|
15
|
+
assertDirectoryIdentitySync,
|
|
16
|
+
} from "@openclaw/fs-safe/advanced";
|
|
17
|
+
|
|
18
|
+
const expected = await readDirectoryIdentity(directoryPath);
|
|
19
|
+
await prepareOutput();
|
|
20
|
+
assertDirectoryIdentitySync(directoryPath, expected);
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
`readDirectoryIdentity(path)` returns a frozen `DirectoryIdentity`:
|
|
24
|
+
|
|
25
|
+
```ts
|
|
26
|
+
type DirectoryIdentity = Readonly<{
|
|
27
|
+
dev: bigint;
|
|
28
|
+
ino: bigint;
|
|
29
|
+
realPath: string;
|
|
30
|
+
}>;
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Both operations reject a final symlink or a non-directory, including paths with
|
|
34
|
+
one or more trailing separators. Filesystem, drive, and UNC roots remain valid.
|
|
35
|
+
Parent aliases and `..` retain their filesystem traversal meaning; POSIX
|
|
36
|
+
backslashes and whitespace remain literal filename characters. These helpers do
|
|
37
|
+
not confine a path to a root or reject every symlink ancestor. Keep the
|
|
38
|
+
application's path policy, or use the [Root API](root.md) for paths that must
|
|
39
|
+
remain beneath a root.
|
|
40
|
+
|
|
41
|
+
## Checking the selected path
|
|
42
|
+
|
|
43
|
+
`assertDirectoryIdentitySync(observedPath, expected)` reads the supplied path
|
|
44
|
+
and compares its exact `dev` and `ino` against the expected bigint values. It
|
|
45
|
+
returns `undefined` on success and throws synchronously on failure.
|
|
46
|
+
|
|
47
|
+
If `expected.realPath` is present, the current canonical path must also match
|
|
48
|
+
that string exactly. Pass the complete observation to keep both checks:
|
|
49
|
+
|
|
50
|
+
```ts
|
|
51
|
+
assertDirectoryIdentitySync(newlyOpenedRootPath, expected);
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
For a directory intentionally moved to another name, omit `realPath` while
|
|
55
|
+
retaining the expected identity:
|
|
56
|
+
|
|
57
|
+
```ts
|
|
58
|
+
assertDirectoryIdentitySync(movedPath, { dev: expected.dev, ino: expected.ino });
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Only `dev`, `ino`, and optional `realPath` participate in the assertion. A
|
|
62
|
+
`MovePathPublicationReceipt` can supply the identity after a move; its `path`
|
|
63
|
+
does not implicitly require the previous pathname to remain current.
|
|
64
|
+
|
|
65
|
+
## Errors and ownership
|
|
66
|
+
|
|
67
|
+
| Condition | Result |
|
|
68
|
+
|---|---|
|
|
69
|
+
| Final symlink or non-directory | `FsSafeError("not-file")` |
|
|
70
|
+
| Different expected identity or supplied canonical path | `FsSafeError("path-mismatch")` |
|
|
71
|
+
| Numeric expected identity or persistently unknown Windows identity | `FsSafeError("path-mismatch")` |
|
|
72
|
+
| Filesystem failure such as `ENOENT` or `EACCES` | The original error, unchanged |
|
|
73
|
+
|
|
74
|
+
Windows can temporarily report a zero device or inode. The shared identity
|
|
75
|
+
owner permits one re-inspection, retaining every known component so a later
|
|
76
|
+
observation cannot erase a definite mismatch. It rejects identities that remain
|
|
77
|
+
unknown and does not retry operational filesystem errors.
|
|
78
|
+
|
|
79
|
+
These helpers observe directory identity. They do not open a retained handle,
|
|
80
|
+
hold a lock, create or remove directories, change permissions, or authorize
|
|
81
|
+
application work. A pathname can change after an assertion; continue to use
|
|
82
|
+
guarded mutation APIs and recheck application authority at the operation's
|
|
83
|
+
existing submission point. Keep publication, rollback, and cleanup decisions
|
|
84
|
+
with the caller. Use [pinned directories](durability.md#pinned-directories) when
|
|
85
|
+
the operation specifically needs the directory synchronization lifecycle.
|
|
@@ -53,6 +53,14 @@ propagate.
|
|
|
53
53
|
discard both unsupported outcomes and failures. Use them only when the primary
|
|
54
54
|
write remains useful without a crash-durability promise.
|
|
55
55
|
|
|
56
|
+
On Windows, pathname inputs and supplied directory receipts reject NTFS
|
|
57
|
+
alternate-stream and directory-index namespace spellings before opening,
|
|
58
|
+
creating, hashing, or publishing anything. This applies to directory
|
|
59
|
+
durability, `publishFileExclusive()`, and the pathname overloads of
|
|
60
|
+
`sha256File()` and `sha256FileSync()`; the already-open `FileHandle` and
|
|
61
|
+
borrowed numeric file-descriptor overloads are unchanged. Ordinary colon-bearing
|
|
62
|
+
POSIX paths remain valid.
|
|
63
|
+
|
|
56
64
|
## Pinned directories
|
|
57
65
|
|
|
58
66
|
`pinDirectory()` rejects final symlinks and non-directories. On POSIX it opens
|
|
@@ -94,6 +102,12 @@ target. It pins the source with nonblocking `O_NOFOLLOW`, optionally verifies
|
|
|
94
102
|
`expectedSourceIdentity`, tries a hardlink first, then synchronizes the target
|
|
95
103
|
parent directory.
|
|
96
104
|
|
|
105
|
+
Trusted relative source and target paths are resolved to absolute paths before
|
|
106
|
+
authority checks. On Windows, ordinary drive-relative operands are anchored at
|
|
107
|
+
entry before namespace-alias admission. A caller-supplied `parentReceipt` must
|
|
108
|
+
still name the resolved target parent and is not relaxed by this compatibility
|
|
109
|
+
rule.
|
|
110
|
+
|
|
97
111
|
For example, a backup archive is complete before publication. If directory
|
|
98
112
|
sync fails, keeping that complete file is more useful than conditionally
|
|
99
113
|
deleting it by pathname:
|
|
@@ -199,7 +213,7 @@ import { sha256File } from "@openclaw/fs-safe/durability";
|
|
|
199
213
|
const snapshot = await open(stagedArchive, "r");
|
|
200
214
|
try {
|
|
201
215
|
const before = await snapshot.stat();
|
|
202
|
-
const hash = await sha256File(snapshot);
|
|
216
|
+
const hash = await sha256File(snapshot, { maxBytes: before.size });
|
|
203
217
|
if (hash.bytes !== before.size || hash.digest !== manifest.sha256) {
|
|
204
218
|
throw new Error("staged backup does not match its manifest");
|
|
205
219
|
}
|
|
@@ -209,6 +223,21 @@ try {
|
|
|
209
223
|
```
|
|
210
224
|
|
|
211
225
|
The result is `{ bytes, digest }`, where `digest` is lowercase hexadecimal.
|
|
226
|
+
The optional `Sha256FileOptions` argument supports `maxBytes` and `signal`.
|
|
227
|
+
`maxBytes` accepts a non-negative safe integer (including zero), or
|
|
228
|
+
`Infinity` for no limit, which is also the default. Oversized files reject with
|
|
229
|
+
`FsSafeError("too-large")`; reads stay bounded to at most `maxBytes + 1` bytes,
|
|
230
|
+
even if the file grows after its initial size check. Hashing never silently
|
|
231
|
+
truncates to the limit.
|
|
232
|
+
|
|
233
|
+
Pass `signal` to cancel. A pre-aborted signal rejects before file I/O or native
|
|
234
|
+
loading. In-flight cancellation is cooperative between reads and rejects with
|
|
235
|
+
the signal's original reason only after the pending read or native task stops.
|
|
236
|
+
Callers may close their handle after awaiting rejection; do not close it while
|
|
237
|
+
the operation is pending. A signal can be shared by successive or concurrent
|
|
238
|
+
hashes. Neither mode provides a snapshot of concurrently modified contents;
|
|
239
|
+
callers requiring stable content must also fence identity and metadata.
|
|
240
|
+
|
|
212
241
|
The handle overload never closes the caller's descriptor and uses positioned
|
|
213
242
|
reads, so it does not alter the descriptor's current offset. The path overload
|
|
214
243
|
rejects symbolic links and non-regular files, compares lossless bigint identities
|
|
@@ -226,11 +255,48 @@ descriptor inspection rather than waiting for a writer.
|
|
|
226
255
|
When the optional binding is active, hashing runs as an async native task and
|
|
227
256
|
does not occupy the JavaScript event loop with digest updates. With native mode
|
|
228
257
|
`off`, or in `auto` when no binding loads, the fallback performs asynchronous
|
|
229
|
-
positioned reads in
|
|
230
|
-
thread. Both paths stream
|
|
231
|
-
|
|
258
|
+
positioned reads in chunks of up to 256 KiB but updates Node's `Hash` on the JavaScript
|
|
259
|
+
thread. Both paths stream bounded buffers rather than loading the file into memory.
|
|
260
|
+
The fallback sizes its scratch buffer to small files and grows it if a stale
|
|
261
|
+
size hint is exceeded, while still probing for actual EOF and byte-limit overflow.
|
|
262
|
+
Native mode `require` keeps its usual fail-closed loader semantics.
|
|
263
|
+
|
|
264
|
+
### Synchronous hashing
|
|
265
|
+
|
|
266
|
+
`sha256FileSync()` accepts a pathname or a borrowed numeric file descriptor and
|
|
267
|
+
returns the same `{ bytes, digest }` result. It shares `Sha256FileOptions`,
|
|
268
|
+
including the default unlimited byte budget and `too-large` errors for growth
|
|
269
|
+
beyond `maxBytes`. It always reads from offset zero with bounded positional
|
|
270
|
+
`readSync` calls and leaves a borrowed descriptor open at its original position.
|
|
271
|
+
Path inputs use the same regular-file, final-symlink, nonblocking-open, and exact
|
|
272
|
+
bigint admission checks described above, then close their owned descriptor.
|
|
273
|
+
These checks do not provide ancestor confinement or a snapshot of concurrent edits.
|
|
274
|
+
|
|
275
|
+
```ts
|
|
276
|
+
import { closeSync, openSync } from "node:fs";
|
|
277
|
+
import { sha256FileSync } from "@openclaw/fs-safe/durability";
|
|
278
|
+
|
|
279
|
+
const fd = openSync(stagedArchive, "r");
|
|
280
|
+
try {
|
|
281
|
+
const hash = sha256FileSync(fd, { maxBytes: manifest.sizeBytes });
|
|
282
|
+
if (hash.bytes !== manifest.sizeBytes || hash.digest !== manifest.sha256) {
|
|
283
|
+
throw new Error("staged backup does not match its manifest");
|
|
284
|
+
}
|
|
285
|
+
} finally {
|
|
286
|
+
closeSync(fd);
|
|
287
|
+
}
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
The synchronous API uses Node's crypto implementation in every native mode,
|
|
291
|
+
including `require`; it never loads a native binding. It blocks the calling
|
|
292
|
+
thread until hashing finishes or throws. A pre-aborted signal fails before I/O,
|
|
293
|
+
and synchronous signal changes are checked between operations with the original
|
|
294
|
+
reason preserved. Timers and other JavaScript callbacks cannot run while the
|
|
295
|
+
hash is executing; use `sha256File()` when responsive cancellation is needed.
|
|
296
|
+
|
|
297
|
+
## Publication failure receipts
|
|
232
298
|
|
|
233
|
-
If
|
|
299
|
+
If `publishFileExclusive()` fails after creating the target, it throws an
|
|
234
300
|
`FsSafeError` with a `details` receipt:
|
|
235
301
|
|
|
236
302
|
```ts
|