@openclaw/openshell-sandbox 2026.9.4 → 2026.9.6
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 +49 -75
- package/node_modules/@openclaw/fs-safe/CHANGELOG.md +487 -0
- package/node_modules/@openclaw/fs-safe/LICENSE +1 -0
- package/node_modules/@openclaw/fs-safe/README.md +106 -16
- package/node_modules/@openclaw/fs-safe/dist/absolute-path.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/absolute-path.js +30 -14
- package/node_modules/@openclaw/fs-safe/dist/advanced.d.ts +13 -3
- package/node_modules/@openclaw/fs-safe/dist/advanced.js +11 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-crc32.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-crc32.js +6 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-deadline.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-deadline.js +23 -25
- package/node_modules/@openclaw/fs-safe/dist/archive-durability.d.ts +23 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-durability.js +180 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-entry.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-entry.js +8 -8
- package/node_modules/@openclaw/fs-safe/dist/archive-errors.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-gzip-tail.d.ts +3 -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 +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-input.js +14 -8
- package/node_modules/@openclaw/fs-safe/dist/archive-kind.d.ts +0 -2
- package/node_modules/@openclaw/fs-safe/dist/archive-kind.js +8 -19
- package/node_modules/@openclaw/fs-safe/dist/archive-limits.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-merge.d.ts +8 -4
- package/node_modules/@openclaw/fs-safe/dist/archive-merge.js +185 -59
- package/node_modules/@openclaw/fs-safe/dist/archive-parser-errors.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-parser.wasm +0 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-plan.d.ts +72 -2
- package/node_modules/@openclaw/fs-safe/dist/archive-plan.js +86 -22
- package/node_modules/@openclaw/fs-safe/dist/archive-read.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-read.js +132 -114
- package/node_modules/@openclaw/fs-safe/dist/archive-staging.d.ts +6 -4
- package/node_modules/@openclaw/fs-safe/dist/archive-staging.js +100 -42
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-stream.d.ts +14 -5
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-stream.js +68 -36
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-wasm.d.ts +17 -6
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-wasm.js +129 -25
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-admission.d.ts +2 -3
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-admission.js +50 -14
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-count.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-count.js +21 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-directory.d.ts +7 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-directory.js +38 -3
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-entry.d.ts +6 -3
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-entry.js +24 -9
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-integrity.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-integrity.js +3 -4
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-loader.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-loader.js +147 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-manifest.d.ts +4 -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 +7 -2
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-names.js +67 -18
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-preflight.d.ts +2 -4
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-preflight.js +4 -35
- package/node_modules/@openclaw/fs-safe/dist/archive.d.ts +8 -6
- package/node_modules/@openclaw/fs-safe/dist/archive.js +225 -171
- package/node_modules/@openclaw/fs-safe/dist/async-lock.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/atomic.d.ts +3 -2
- package/node_modules/@openclaw/fs-safe/dist/bounded-read-stream.d.ts +0 -2
- package/node_modules/@openclaw/fs-safe/dist/bounded-read-stream.js +0 -6
- package/node_modules/@openclaw/fs-safe/dist/bounded-read.d.ts +12 -1
- package/node_modules/@openclaw/fs-safe/dist/bounded-read.js +83 -46
- package/node_modules/@openclaw/fs-safe/dist/byte-budget.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/byte-view.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/byte-view.js +13 -0
- package/node_modules/@openclaw/fs-safe/dist/clone-metadata.d.ts +19 -0
- package/node_modules/@openclaw/fs-safe/dist/clone-metadata.js +36 -0
- package/node_modules/@openclaw/fs-safe/dist/config.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/containment.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/copy-file-input.d.ts +21 -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 +2 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-policy.js +8 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-publication.d.ts +20 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-publication.js +33 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-tree-portable.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-tree-portable.js +245 -0
- package/node_modules/@openclaw/fs-safe/dist/copy.d.ts +15 -0
- package/node_modules/@openclaw/fs-safe/dist/copy.js +143 -0
- package/node_modules/@openclaw/fs-safe/dist/create-owned-file.d.ts +7 -0
- package/node_modules/@openclaw/fs-safe/dist/create-owned-file.js +16 -0
- package/node_modules/@openclaw/fs-safe/dist/create.d.ts +17 -0
- package/node_modules/@openclaw/fs-safe/dist/create.js +388 -0
- package/node_modules/@openclaw/fs-safe/dist/creation-boundary.d.ts +60 -0
- package/node_modules/@openclaw/fs-safe/dist/creation-boundary.js +371 -0
- package/node_modules/@openclaw/fs-safe/dist/deny-mutations.d.ts +2 -3
- package/node_modules/@openclaw/fs-safe/dist/deny-mutations.js +61 -35
- package/node_modules/@openclaw/fs-safe/dist/device-path.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/device-path.js +5 -3
- package/node_modules/@openclaw/fs-safe/dist/directory-durability.d.ts +7 -8
- package/node_modules/@openclaw/fs-safe/dist/directory-durability.js +48 -61
- package/node_modules/@openclaw/fs-safe/dist/directory-entry-path.d.ts +2 -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 +31 -7
- package/node_modules/@openclaw/fs-safe/dist/directory-guard.js +136 -39
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-node.d.ts +14 -1
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-node.js +125 -9
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-owner.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-owner.js +5 -5
- package/node_modules/@openclaw/fs-safe/dist/directory-receipt.d.ts +23 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-receipt.js +123 -0
- package/node_modules/@openclaw/fs-safe/dist/durability.d.ts +3 -3
- package/node_modules/@openclaw/fs-safe/dist/durability.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/effective-uid.d.ts +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 +0 -1
- package/node_modules/@openclaw/fs-safe/dist/error-detail.js +4 -1
- package/node_modules/@openclaw/fs-safe/dist/errors.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/file-cleanup.d.ts +19 -0
- package/node_modules/@openclaw/fs-safe/dist/file-cleanup.js +81 -0
- package/node_modules/@openclaw/fs-safe/dist/file-contents.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/file-contents.js +40 -0
- package/node_modules/@openclaw/fs-safe/dist/file-handle-transfer.d.ts +15 -0
- package/node_modules/@openclaw/fs-safe/dist/file-handle-transfer.js +190 -0
- package/node_modules/@openclaw/fs-safe/dist/file-hash.d.ts +9 -3
- package/node_modules/@openclaw/fs-safe/dist/file-hash.js +273 -50
- package/node_modules/@openclaw/fs-safe/dist/file-identity.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/file-identity.js +18 -4
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-acquisition.d.ts +22 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-acquisition.js +98 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-admission.d.ts +17 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-admission.js +54 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-acquire.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-acquire.js +303 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-arbitration.d.ts +17 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-arbitration.js +66 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-held.d.ts +32 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-held.js +395 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-io.d.ts +43 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-io.js +209 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-mutation.d.ts +16 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-mutation.js +275 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-options.d.ts +19 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-options.js +58 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-registration.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-registration.js +90 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root.d.ts +36 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root.js +288 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-stale-admission.d.ts +19 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-stale-admission.js +199 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync.d.ts +4 -22
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync.js +226 -234
- package/node_modules/@openclaw/fs-safe/dist/file-lock.d.ts +0 -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 -2
- package/node_modules/@openclaw/fs-safe/dist/file-store-boundary.d.ts +9 -4
- package/node_modules/@openclaw/fs-safe/dist/file-store-boundary.js +69 -81
- package/node_modules/@openclaw/fs-safe/dist/file-store-prune.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/file-store-prune.js +20 -6
- package/node_modules/@openclaw/fs-safe/dist/file-store-sync-directory.d.ts +15 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-sync-directory.js +319 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-sync-write.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/file-store-sync-write.js +74 -73
- package/node_modules/@openclaw/fs-safe/dist/file-store.d.ts +4 -1
- package/node_modules/@openclaw/fs-safe/dist/file-store.js +71 -66
- package/node_modules/@openclaw/fs-safe/dist/file-sync.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/filename.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/filename.js +83 -36
- package/node_modules/@openclaw/fs-safe/dist/fs.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/fs.js +3 -3
- package/node_modules/@openclaw/fs-safe/dist/guarded-mkdir.d.ts +12 -1
- package/node_modules/@openclaw/fs-safe/dist/guarded-mkdir.js +227 -33
- package/node_modules/@openclaw/fs-safe/dist/guarded-mutation.d.ts +2 -7
- package/node_modules/@openclaw/fs-safe/dist/guarded-mutation.js +15 -16
- package/node_modules/@openclaw/fs-safe/dist/guest-dispatch-python.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/guest-dispatch-python.js +68 -0
- package/node_modules/@openclaw/fs-safe/dist/guest-native-python.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/guest-native-python.js +135 -0
- package/node_modules/@openclaw/fs-safe/dist/guest.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/guest.js +424 -0
- package/node_modules/@openclaw/fs-safe/dist/home-dir.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/home-dir.js +81 -16
- package/node_modules/@openclaw/fs-safe/dist/index.d.ts +9 -7
- package/node_modules/@openclaw/fs-safe/dist/install-path.d.ts +6 -1
- package/node_modules/@openclaw/fs-safe/dist/install-path.js +73 -31
- package/node_modules/@openclaw/fs-safe/dist/json-document-store.d.ts +3 -1
- package/node_modules/@openclaw/fs-safe/dist/json-document-store.js +23 -15
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-directory.d.ts +13 -1
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-directory.js +137 -3
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-ownership.d.ts +8 -2
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-ownership.js +153 -90
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-read.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-read.js +65 -0
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue.d.ts +1 -2
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue.js +93 -261
- package/node_modules/@openclaw/fs-safe/dist/json-store.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/json-store.js +4 -1
- package/node_modules/@openclaw/fs-safe/dist/json-stringify.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/json.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/json.js +90 -110
- package/node_modules/@openclaw/fs-safe/dist/local-file-access.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/local-file-access.js +7 -10
- package/node_modules/@openclaw/fs-safe/dist/local-file-descriptor.d.ts +16 -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 +0 -1
- package/node_modules/@openclaw/fs-safe/dist/local-roots.js +63 -38
- package/node_modules/@openclaw/fs-safe/dist/lock-config.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/move-path-cleanup.d.ts +7 -20
- package/node_modules/@openclaw/fs-safe/dist/move-path-cleanup.js +100 -37
- package/node_modules/@openclaw/fs-safe/dist/move-path-stage.d.ts +7 -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 +0 -1
- package/node_modules/@openclaw/fs-safe/dist/move-path.js +120 -64
- package/node_modules/@openclaw/fs-safe/dist/mutation-authority.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/mutation-authority.js +36 -0
- package/node_modules/@openclaw/fs-safe/dist/native-binding.d.ts +71 -2
- package/node_modules/@openclaw/fs-safe/dist/native-binding.js +8 -1
- package/node_modules/@openclaw/fs-safe/dist/native-config.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/native-directory-observation.d.ts +16 -0
- package/node_modules/@openclaw/fs-safe/dist/native-directory-observation.js +37 -0
- package/node_modules/@openclaw/fs-safe/dist/native-fallback-warning.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/native-fallback-warning.js +11 -0
- package/node_modules/@openclaw/fs-safe/dist/native-operations.d.ts +1 -7
- package/node_modules/@openclaw/fs-safe/dist/native-operations.js +6 -27
- package/node_modules/@openclaw/fs-safe/dist/native-parent-admission.d.ts +34 -0
- package/node_modules/@openclaw/fs-safe/dist/native-parent-admission.js +147 -0
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write-windows.d.ts +2 -4
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write-windows.js +194 -38
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write.d.ts +1 -2
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write.js +360 -49
- package/node_modules/@openclaw/fs-safe/dist/native-policy-directory-observation.d.ts +11 -0
- package/node_modules/@openclaw/fs-safe/dist/native-policy-directory-observation.js +61 -0
- package/node_modules/@openclaw/fs-safe/dist/native-policy-parent-windows.d.ts +13 -0
- package/node_modules/@openclaw/fs-safe/dist/native-policy-parent-windows.js +209 -0
- package/node_modules/@openclaw/fs-safe/dist/native-rename-outcome.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/native-rename-outcome.js +8 -0
- package/node_modules/@openclaw/fs-safe/dist/native-staged-file.d.ts +23 -9
- package/node_modules/@openclaw/fs-safe/dist/native-staged-file.js +180 -100
- package/node_modules/@openclaw/fs-safe/dist/native.d.ts +1 -2
- package/node_modules/@openclaw/fs-safe/dist/native.js +9 -4
- package/node_modules/@openclaw/fs-safe/dist/opened-file-failure.d.ts +1 -2
- package/node_modules/@openclaw/fs-safe/dist/opened-file-failure.js +3 -2
- package/node_modules/@openclaw/fs-safe/dist/opened-realpath.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/opened-realpath.js +16 -6
- package/node_modules/@openclaw/fs-safe/dist/output.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/output.js +28 -12
- package/node_modules/@openclaw/fs-safe/dist/overwrite-file-handle.d.ts +7 -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 +0 -1
- package/node_modules/@openclaw/fs-safe/dist/owner-dacl.js +12 -4
- package/node_modules/@openclaw/fs-safe/dist/path-case.d.ts +6 -0
- package/node_modules/@openclaw/fs-safe/dist/path-case.js +136 -0
- package/node_modules/@openclaw/fs-safe/dist/path-policy.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/path-policy.js +7 -2
- package/node_modules/@openclaw/fs-safe/dist/path-prefix.d.ts +6 -0
- package/node_modules/@openclaw/fs-safe/dist/path-prefix.js +104 -0
- package/node_modules/@openclaw/fs-safe/dist/path-scope-lexical.d.ts +13 -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 +6 -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 +11 -0
- package/node_modules/@openclaw/fs-safe/dist/path-suffix-aliases.js +394 -0
- package/node_modules/@openclaw/fs-safe/dist/path.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/path.js +40 -7
- package/node_modules/@openclaw/fs-safe/dist/permission-exec.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/permission-exec.js +144 -21
- package/node_modules/@openclaw/fs-safe/dist/permissions-public.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/permissions-windows.d.ts +2 -10
- package/node_modules/@openclaw/fs-safe/dist/permissions-windows.js +106 -83
- package/node_modules/@openclaw/fs-safe/dist/permissions.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/permissions.js +37 -30
- package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-admission.d.ts +24 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-admission.js +419 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-observation.d.ts +38 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-observation.js +205 -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.js +70 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-open.d.ts +7 -1
- package/node_modules/@openclaw/fs-safe/dist/pinned-open.js +35 -10
- package/node_modules/@openclaw/fs-safe/dist/pinned-operation.d.ts +1 -2
- package/node_modules/@openclaw/fs-safe/dist/pinned-operation.js +4 -17
- package/node_modules/@openclaw/fs-safe/dist/pinned-write-input.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-write-input.js +35 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-write-mode.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-write-mode.js +31 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-write-staged.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-write-staged.js +185 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-write-types.d.ts +68 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-write.d.ts +6 -30
- package/node_modules/@openclaw/fs-safe/dist/pinned-write.js +202 -154
- package/node_modules/@openclaw/fs-safe/dist/positional-read.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/positional-read.js +36 -0
- package/node_modules/@openclaw/fs-safe/dist/private-directory.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/private-directory.js +20 -4
- package/node_modules/@openclaw/fs-safe/dist/private-producer-handoff-sync.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/private-producer-handoff-sync.js +72 -0
- package/node_modules/@openclaw/fs-safe/dist/private-producer-handoff.d.ts +53 -0
- package/node_modules/@openclaw/fs-safe/dist/private-producer-handoff.js +358 -0
- package/node_modules/@openclaw/fs-safe/dist/private-temp-workspace.d.ts +2 -40
- package/node_modules/@openclaw/fs-safe/dist/private-temp-workspace.js +145 -103
- package/node_modules/@openclaw/fs-safe/dist/publish-copy-stage.d.ts +13 -0
- package/node_modules/@openclaw/fs-safe/dist/publish-copy-stage.js +56 -0
- package/node_modules/@openclaw/fs-safe/dist/publish-file-failure.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/publish-file.d.ts +2 -4
- package/node_modules/@openclaw/fs-safe/dist/publish-file.js +110 -144
- package/node_modules/@openclaw/fs-safe/dist/read-open-flags.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/read-opened-file.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/realpath.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/realpath.js +43 -0
- package/node_modules/@openclaw/fs-safe/dist/recursive-mkdir-path.d.ts +2 -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 +0 -1
- package/node_modules/@openclaw/fs-safe/dist/regular-file.js +127 -201
- package/node_modules/@openclaw/fs-safe/dist/replace-directory.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/replace-directory.js +269 -24
- package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-fallback.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-fallback.js +130 -120
- package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-source.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-source.js +36 -42
- package/node_modules/@openclaw/fs-safe/dist/replace-file-descriptor.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/replace-file-descriptor.js +16 -17
- package/node_modules/@openclaw/fs-safe/dist/replace-file-mode.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-mode.js +10 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-rename-policy.d.ts +1 -3
- package/node_modules/@openclaw/fs-safe/dist/replace-file-temp-owner.d.ts +18 -22
- package/node_modules/@openclaw/fs-safe/dist/replace-file-temp-owner.js +123 -143
- package/node_modules/@openclaw/fs-safe/dist/replace-file.d.ts +4 -4
- package/node_modules/@openclaw/fs-safe/dist/replace-file.js +58 -51
- package/node_modules/@openclaw/fs-safe/dist/retained-directory-replacement.d.ts +25 -0
- package/node_modules/@openclaw/fs-safe/dist/retained-directory-replacement.js +193 -0
- package/node_modules/@openclaw/fs-safe/dist/root-boundary.d.ts +29 -0
- package/node_modules/@openclaw/fs-safe/dist/root-boundary.js +186 -0
- package/node_modules/@openclaw/fs-safe/dist/root-context.d.ts +15 -10
- package/node_modules/@openclaw/fs-safe/dist/root-context.js +133 -42
- package/node_modules/@openclaw/fs-safe/dist/root-create-input.d.ts +16 -0
- package/node_modules/@openclaw/fs-safe/dist/root-create-input.js +93 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory-creation.d.ts +12 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory-creation.js +225 -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.js +382 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory.d.ts +22 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory.js +141 -0
- package/node_modules/@openclaw/fs-safe/dist/root-entries.d.ts +10 -0
- package/node_modules/@openclaw/fs-safe/dist/root-entries.js +61 -0
- package/node_modules/@openclaw/fs-safe/dist/root-errors.d.ts +10 -6
- package/node_modules/@openclaw/fs-safe/dist/root-errors.js +32 -15
- package/node_modules/@openclaw/fs-safe/dist/root-file-final-admission.d.ts +20 -0
- package/node_modules/@openclaw/fs-safe/dist/root-file-final-admission.js +86 -0
- package/node_modules/@openclaw/fs-safe/dist/root-file.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/root-file.js +113 -25
- package/node_modules/@openclaw/fs-safe/dist/root-impl.d.ts +17 -63
- package/node_modules/@openclaw/fs-safe/dist/root-impl.js +803 -590
- package/node_modules/@openclaw/fs-safe/dist/root-move-noreplace.d.ts +15 -0
- package/node_modules/@openclaw/fs-safe/dist/root-move-noreplace.js +205 -0
- package/node_modules/@openclaw/fs-safe/dist/root-move-preflight.d.ts +7 -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 +8 -0
- package/node_modules/@openclaw/fs-safe/dist/root-observed-path.js +93 -0
- package/node_modules/@openclaw/fs-safe/dist/root-options.d.ts +84 -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.js +22 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path-existing.d.ts +10 -1
- package/node_modules/@openclaw/fs-safe/dist/root-path-existing.js +133 -41
- package/node_modules/@openclaw/fs-safe/dist/root-path-observation.d.ts +62 -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 +4 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path-stat.js +151 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path.d.ts +14 -1
- package/node_modules/@openclaw/fs-safe/dist/root-path.js +292 -330
- package/node_modules/@openclaw/fs-safe/dist/root-paths-lexical.d.ts +8 -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 -30
- package/node_modules/@openclaw/fs-safe/dist/root-paths.js +89 -174
- package/node_modules/@openclaw/fs-safe/dist/root-public-types.d.ts +11 -0
- package/node_modules/@openclaw/fs-safe/dist/root-public-types.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-read-admission.d.ts +25 -0
- package/node_modules/@openclaw/fs-safe/dist/root-read-admission.js +86 -0
- package/node_modules/@openclaw/fs-safe/dist/root-remove-identity.d.ts +14 -0
- package/node_modules/@openclaw/fs-safe/dist/root-remove-identity.js +87 -0
- package/node_modules/@openclaw/fs-safe/dist/root-remove-receipt.d.ts +16 -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.js +464 -0
- package/node_modules/@openclaw/fs-safe/dist/root-symlink-policy.d.ts +13 -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 +6 -6
- package/node_modules/@openclaw/fs-safe/dist/root-walk.js +116 -51
- package/node_modules/@openclaw/fs-safe/dist/root-write-admission.d.ts +65 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-admission.js +304 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-compatibility.d.ts +11 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-compatibility.js +23 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-complete-parent.d.ts +41 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-complete-parent.js +180 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-lock-binding.d.ts +14 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-lock-binding.js +162 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-mode.d.ts +2 -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 +23 -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 +1 -2
- package/node_modules/@openclaw/fs-safe/dist/root-write-verification.js +35 -37
- package/node_modules/@openclaw/fs-safe/dist/root.d.ts +2 -4
- package/node_modules/@openclaw/fs-safe/dist/safe-path-segment.d.ts +1 -2
- package/node_modules/@openclaw/fs-safe/dist/safe-path-segment.js +5 -6
- package/node_modules/@openclaw/fs-safe/dist/secret-file.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/secret-file.js +60 -52
- package/node_modules/@openclaw/fs-safe/dist/secret-read-async.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/secret-read-async.js +13 -28
- package/node_modules/@openclaw/fs-safe/dist/secret-read-policy.d.ts +6 -3
- package/node_modules/@openclaw/fs-safe/dist/secret-read-policy.js +31 -3
- package/node_modules/@openclaw/fs-safe/dist/secret.d.ts +0 -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.js +88 -0
- package/node_modules/@openclaw/fs-safe/dist/secure-file.d.ts +1 -2
- package/node_modules/@openclaw/fs-safe/dist/secure-file.js +143 -28
- package/node_modules/@openclaw/fs-safe/dist/secure-temp-dir.d.ts +6 -4
- 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 +34 -0
- package/node_modules/@openclaw/fs-safe/dist/secure-temp-repair.js +110 -0
- package/node_modules/@openclaw/fs-safe/dist/sibling-staged-file.d.ts +4 -2
- package/node_modules/@openclaw/fs-safe/dist/sibling-staged-file.js +215 -57
- package/node_modules/@openclaw/fs-safe/dist/sibling-temp.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/sibling-temp.js +64 -27
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-acquire.d.ts +2 -29
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-acquire.js +298 -192
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-admission-context.d.ts +18 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-admission-context.js +60 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-admission-parser.d.ts +42 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-admission-parser.js +113 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-admission.d.ts +31 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-admission.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-handle.d.ts +3 -1
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-handle.js +6 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-policy.d.ts +6 -1
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-policy.js +45 -3
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-reclaim.d.ts +10 -6
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-reclaim.js +106 -36
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-registration.d.ts +13 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-registration.js +47 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-root.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-root.js +5 -2
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-stale-admission.d.ts +38 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-stale-admission.js +228 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-target.d.ts +7 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-target.js +55 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-types.d.ts +22 -17
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock.js +47 -32
- package/node_modules/@openclaw/fs-safe/dist/staged-directory.d.ts +18 -7
- package/node_modules/@openclaw/fs-safe/dist/staged-directory.js +98 -10
- package/node_modules/@openclaw/fs-safe/dist/staged-file-settlement.d.ts +16 -0
- package/node_modules/@openclaw/fs-safe/dist/staged-file-settlement.js +57 -0
- package/node_modules/@openclaw/fs-safe/dist/staged-file-types.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/stat-observation.d.ts +10 -0
- package/node_modules/@openclaw/fs-safe/dist/stat-observation.js +64 -0
- package/node_modules/@openclaw/fs-safe/dist/store.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/strict-file-identity.d.ts +1 -2
- package/node_modules/@openclaw/fs-safe/dist/strict-file-identity.js +41 -4
- package/node_modules/@openclaw/fs-safe/dist/string-coerce.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/suppressed-error.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/symlink-parents.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/symlink-parents.js +9 -29
- package/node_modules/@openclaw/fs-safe/dist/temp-cleanup.d.ts +0 -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 -13
- package/node_modules/@openclaw/fs-safe/dist/temp-target.js +120 -19
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-admission.d.ts +14 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-admission.js +392 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-child-admission.d.ts +23 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-child-admission.js +151 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-descriptor.d.ts +42 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-descriptor.js +342 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-owner.d.ts +8 -7
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-owner.js +156 -73
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-types.d.ts +39 -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 -2
- package/node_modules/@openclaw/fs-safe/dist/temp.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/test-hooks.d.ts +7 -1
- package/node_modules/@openclaw/fs-safe/dist/text-atomic.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/text-atomic.js +3 -1
- package/node_modules/@openclaw/fs-safe/dist/timing.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/timing.js +25 -6
- package/node_modules/@openclaw/fs-safe/dist/trash.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/trash.js +61 -13
- package/node_modules/@openclaw/fs-safe/dist/types.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/unicode-path.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/unicode-path.js +16 -0
- package/node_modules/@openclaw/fs-safe/dist/walk.d.ts +5 -2
- package/node_modules/@openclaw/fs-safe/dist/walk.js +47 -47
- package/node_modules/@openclaw/fs-safe/dist/windows-command.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/windows-owner.d.ts +9 -13
- package/node_modules/@openclaw/fs-safe/dist/windows-owner.js +36 -61
- package/node_modules/@openclaw/fs-safe/dist/windows-path-alias.d.ts +39 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-path-alias.js +122 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-path-syntax.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-path-syntax.js +21 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-security-bridge.cs +336 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-security-bridge.ps1 +15 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-security-command.d.ts +25 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-security-command.js +363 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-security-facts.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-security-facts.js +108 -0
- package/node_modules/@openclaw/fs-safe/dist/write-file-handle.d.ts +13 -0
- package/node_modules/@openclaw/fs-safe/dist/write-file-handle.js +49 -0
- package/node_modules/@openclaw/fs-safe/dist/write-open-flags.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/write-open-flags.js +1 -9
- package/node_modules/@openclaw/fs-safe/dist/write-queue.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/write-queue.js +1 -4
- package/node_modules/@openclaw/fs-safe/docs/advanced.md +123 -7
- package/node_modules/@openclaw/fs-safe/docs/archive.md +227 -42
- package/node_modules/@openclaw/fs-safe/docs/atomic.md +199 -12
- package/node_modules/@openclaw/fs-safe/docs/config.md +7 -2
- package/node_modules/@openclaw/fs-safe/docs/contributing.md +88 -6
- package/node_modules/@openclaw/fs-safe/docs/copy.md +197 -0
- package/node_modules/@openclaw/fs-safe/docs/creation.md +132 -0
- package/node_modules/@openclaw/fs-safe/docs/directory-identity.md +85 -0
- package/node_modules/@openclaw/fs-safe/docs/durability.md +130 -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-contents.md +68 -0
- package/node_modules/@openclaw/fs-safe/docs/file-store.md +112 -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 +69 -10
- package/node_modules/@openclaw/fs-safe/docs/json-store.md +20 -1
- package/node_modules/@openclaw/fs-safe/docs/json.md +16 -4
- package/node_modules/@openclaw/fs-safe/docs/local-roots.md +10 -1
- package/node_modules/@openclaw/fs-safe/docs/migrating-to-0.5.md +15 -6
- package/node_modules/@openclaw/fs-safe/docs/migrating-to-0.6.md +9 -4
- package/node_modules/@openclaw/fs-safe/docs/mutation-policy-proof.md +69 -0
- package/node_modules/@openclaw/fs-safe/docs/native-helper.md +75 -16
- package/node_modules/@openclaw/fs-safe/docs/native.md +108 -15
- package/node_modules/@openclaw/fs-safe/docs/output.md +61 -7
- package/node_modules/@openclaw/fs-safe/docs/path-case.md +64 -0
- package/node_modules/@openclaw/fs-safe/docs/path-prefix.md +74 -0
- package/node_modules/@openclaw/fs-safe/docs/path-scope.md +1 -1
- package/node_modules/@openclaw/fs-safe/docs/path-suffix-aliases.md +204 -0
- package/node_modules/@openclaw/fs-safe/docs/path.md +16 -5
- package/node_modules/@openclaw/fs-safe/docs/permissions.md +106 -20
- 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 +51 -2
- package/node_modules/@openclaw/fs-safe/docs/quickstart.md +1 -1
- package/node_modules/@openclaw/fs-safe/docs/reading.md +16 -3
- package/node_modules/@openclaw/fs-safe/docs/regular-file.md +3 -0
- package/node_modules/@openclaw/fs-safe/docs/root.md +294 -15
- package/node_modules/@openclaw/fs-safe/docs/secret-file.md +28 -2
- package/node_modules/@openclaw/fs-safe/docs/secure-file.md +28 -16
- package/node_modules/@openclaw/fs-safe/docs/security-model.md +90 -9
- package/node_modules/@openclaw/fs-safe/docs/sidecar-lock.md +163 -7
- package/node_modules/@openclaw/fs-safe/docs/staged-file.md +16 -6
- package/node_modules/@openclaw/fs-safe/docs/store.md +35 -2
- package/node_modules/@openclaw/fs-safe/docs/temp.md +313 -29
- 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 +35 -12
- package/node_modules/@openclaw/fs-safe/docs/walk.md +128 -6
- package/node_modules/@openclaw/fs-safe/docs/writing.md +314 -20
- package/node_modules/@openclaw/fs-safe/package.json +33 -20
- 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 +29 -2
- package/node_modules/zod/compile.cjs +96 -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 +21 -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/locales/index.cjs +19 -0
- package/node_modules/zod/mini/index.cjs +19 -0
- package/node_modules/zod/package.json +20 -8
- 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/helpers/errorUtil.ts +1 -1
- 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 +14 -9
- package/node_modules/zod/src/v4/classic/from-json-schema.ts +363 -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 +640 -375
- 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 +186 -0
- package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +36 -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 +3 -3
- 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 +985 -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 +261 -13
- package/node_modules/zod/src/v4/classic/tests/enum.test.ts +20 -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 +403 -6
- package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +582 -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/iban.test.ts +81 -0
- 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 +319 -0
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +67 -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 +215 -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 +85 -9
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +301 -12
- package/node_modules/zod/src/v4/classic/tests/optin-ladder.test.ts +235 -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/prefault.test.ts +70 -0
- package/node_modules/zod/src/v4/classic/tests/preprocess-types.test.ts +20 -2
- package/node_modules/zod/src/v4/classic/tests/properties.test.ts +141 -0
- 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 +79 -3
- 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/standard-schema.test.ts +19 -0
- package/node_modules/zod/src/v4/classic/tests/string.test.ts +222 -6
- 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 +44 -3
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +1812 -204
- 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 +645 -0
- package/node_modules/zod/src/v4/classic/tests/validations.test.ts +2 -2
- package/node_modules/zod/src/v4/core/api.ts +87 -35
- package/node_modules/zod/src/v4/core/checks.ts +119 -146
- package/node_modules/zod/src/v4/core/compile.ts +2313 -0
- package/node_modules/zod/src/v4/core/core.ts +99 -22
- package/node_modules/zod/src/v4/core/doc.ts +17 -9
- package/node_modules/zod/src/v4/core/errors.ts +113 -25
- package/node_modules/zod/src/v4/core/index.ts +3 -0
- package/node_modules/zod/src/v4/core/json-schema-generator.ts +8 -3
- package/node_modules/zod/src/v4/core/json-schema-processors.ts +424 -156
- package/node_modules/zod/src/v4/core/json-schema.ts +2 -1
- package/node_modules/zod/src/v4/core/memoizer.ts +331 -0
- package/node_modules/zod/src/v4/core/parse.ts +164 -50
- package/node_modules/zod/src/v4/core/regexes.ts +42 -15
- package/node_modules/zod/src/v4/core/registries.ts +2 -2
- package/node_modules/zod/src/v4/core/schemas.ts +1000 -538
- package/node_modules/zod/src/v4/core/tests/cached.test.ts +54 -0
- package/node_modules/zod/src/v4/core/tests/compile-differential.test.ts +1004 -0
- package/node_modules/zod/src/v4/core/tests/compile-generative.test.ts +445 -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 +2036 -0
- package/node_modules/zod/src/v4/core/tests/email-regex.test.ts +140 -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/tg.test.ts +85 -0
- package/node_modules/zod/src/v4/core/tests/locales/tk.test.ts +69 -0
- package/node_modules/zod/src/v4/core/tests/polyfill-collision.test.ts +46 -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 +133 -0
- package/node_modules/zod/src/v4/core/to-json-schema.ts +283 -48
- package/node_modules/zod/src/v4/core/util.ts +454 -157
- 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 +5 -0
- package/node_modules/zod/src/v4/locales/az.ts +5 -0
- package/node_modules/zod/src/v4/locales/be.ts +12 -0
- package/node_modules/zod/src/v4/locales/bg.ts +5 -0
- package/node_modules/zod/src/v4/locales/bn.ts +123 -0
- package/node_modules/zod/src/v4/locales/ca.ts +5 -0
- package/node_modules/zod/src/v4/locales/ckb.ts +140 -0
- package/node_modules/zod/src/v4/locales/cs.ts +5 -0
- package/node_modules/zod/src/v4/locales/da.ts +7 -2
- package/node_modules/zod/src/v4/locales/de.ts +5 -0
- package/node_modules/zod/src/v4/locales/el.ts +3 -0
- package/node_modules/zod/src/v4/locales/en.ts +17 -4
- package/node_modules/zod/src/v4/locales/eo.ts +5 -0
- package/node_modules/zod/src/v4/locales/es.ts +4 -0
- package/node_modules/zod/src/v4/locales/fa.ts +5 -0
- package/node_modules/zod/src/v4/locales/fi.ts +5 -0
- package/node_modules/zod/src/v4/locales/fr-CA.ts +5 -0
- package/node_modules/zod/src/v4/locales/fr.ts +21 -14
- package/node_modules/zod/src/v4/locales/gu.ts +123 -0
- package/node_modules/zod/src/v4/locales/he.ts +8 -1
- package/node_modules/zod/src/v4/locales/hi.ts +126 -0
- package/node_modules/zod/src/v4/locales/hr.ts +4 -0
- package/node_modules/zod/src/v4/locales/hu.ts +5 -0
- package/node_modules/zod/src/v4/locales/hy.ts +11 -0
- package/node_modules/zod/src/v4/locales/id.ts +5 -0
- package/node_modules/zod/src/v4/locales/index.ts +11 -0
- package/node_modules/zod/src/v4/locales/is.ts +5 -0
- package/node_modules/zod/src/v4/locales/it.ts +5 -0
- package/node_modules/zod/src/v4/locales/ja.ts +5 -0
- package/node_modules/zod/src/v4/locales/ka.ts +5 -0
- package/node_modules/zod/src/v4/locales/km.ts +5 -0
- package/node_modules/zod/src/v4/locales/kn.ts +126 -0
- package/node_modules/zod/src/v4/locales/ko.ts +5 -0
- package/node_modules/zod/src/v4/locales/lt.ts +4 -0
- package/node_modules/zod/src/v4/locales/mk.ts +5 -0
- package/node_modules/zod/src/v4/locales/ms.ts +5 -0
- package/node_modules/zod/src/v4/locales/ne.ts +128 -0
- package/node_modules/zod/src/v4/locales/nl.ts +5 -0
- package/node_modules/zod/src/v4/locales/nn.ts +121 -0
- package/node_modules/zod/src/v4/locales/no.ts +7 -2
- package/node_modules/zod/src/v4/locales/ota.ts +5 -0
- package/node_modules/zod/src/v4/locales/pl.ts +5 -0
- package/node_modules/zod/src/v4/locales/ps.ts +5 -0
- package/node_modules/zod/src/v4/locales/pt-BR.ts +161 -0
- package/node_modules/zod/src/v4/locales/pt.ts +101 -58
- package/node_modules/zod/src/v4/locales/ro.ts +3 -0
- package/node_modules/zod/src/v4/locales/ru.ts +12 -0
- package/node_modules/zod/src/v4/locales/sk.ts +123 -0
- package/node_modules/zod/src/v4/locales/sl.ts +5 -0
- package/node_modules/zod/src/v4/locales/sv.ts +7 -2
- package/node_modules/zod/src/v4/locales/ta.ts +5 -0
- package/node_modules/zod/src/v4/locales/tg.ts +135 -0
- package/node_modules/zod/src/v4/locales/th.ts +5 -0
- package/node_modules/zod/src/v4/locales/tk.ts +113 -0
- package/node_modules/zod/src/v4/locales/tr.ts +5 -0
- package/node_modules/zod/src/v4/locales/uk.ts +5 -0
- package/node_modules/zod/src/v4/locales/ur.ts +5 -0
- package/node_modules/zod/src/v4/locales/uz.ts +3 -0
- package/node_modules/zod/src/v4/locales/vi.ts +5 -0
- package/node_modules/zod/src/v4/locales/yo.ts +5 -0
- package/node_modules/zod/src/v4/locales/zh-CN.ts +5 -0
- package/node_modules/zod/src/v4/locales/zh-TW.ts +5 -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 +12 -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 +167 -63
- 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/computed.test.ts +11 -17
- 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 +158 -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/recursive-types.test.ts +16 -0
- package/node_modules/zod/src/v4/mini/tests/string.test.ts +44 -0
- package/node_modules/zod/v3/ZodError.cjs +41 -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/errors.cjs +19 -0
- package/node_modules/zod/v3/external.cjs +19 -0
- package/node_modules/zod/v3/helpers/enumUtil.cjs +19 -0
- package/node_modules/zod/v3/helpers/errorUtil.cjs +20 -1
- package/node_modules/zod/v3/helpers/errorUtil.js +1 -1
- package/node_modules/zod/v3/helpers/parseUtil.cjs +19 -0
- package/node_modules/zod/v3/helpers/partialUtil.cjs +19 -0
- package/node_modules/zod/v3/helpers/typeAliases.cjs +19 -0
- package/node_modules/zod/v3/helpers/util.cjs +19 -0
- package/node_modules/zod/v3/index.cjs +19 -0
- package/node_modules/zod/v3/standard-schema.cjs +19 -0
- package/node_modules/zod/v3/types.cjs +26 -5
- package/node_modules/zod/v3/types.js +7 -5
- package/node_modules/zod/v4/classic/checks.cjs +21 -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/coerce.cjs +19 -0
- package/node_modules/zod/v4/classic/compat.cjs +19 -0
- 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 +58 -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 +62 -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 +51 -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 +376 -75
- package/node_modules/zod/v4/classic/from-json-schema.js +357 -75
- package/node_modules/zod/v4/classic/in-out.cjs +82 -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 +21 -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 +30 -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 +23 -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 +591 -426
- package/node_modules/zod/v4/classic/schemas.d.cts +68 -19
- package/node_modules/zod/v4/classic/schemas.d.ts +68 -19
- package/node_modules/zod/v4/classic/schemas.js +564 -424
- package/node_modules/zod/v4/core/api.cjs +66 -24
- package/node_modules/zod/v4/core/api.d.cts +22 -12
- package/node_modules/zod/v4/core/api.d.ts +22 -12
- package/node_modules/zod/v4/core/api.js +44 -24
- package/node_modules/zod/v4/core/checks.cjs +88 -128
- package/node_modules/zod/v4/core/checks.d.cts +29 -13
- package/node_modules/zod/v4/core/checks.d.ts +29 -13
- package/node_modules/zod/v4/core/checks.js +68 -127
- package/node_modules/zod/v4/core/compile.cjs +1908 -0
- package/node_modules/zod/v4/core/compile.d.cts +65 -0
- package/node_modules/zod/v4/core/compile.d.ts +65 -0
- package/node_modules/zod/v4/core/compile.js +1858 -0
- package/node_modules/zod/v4/core/core.cjs +101 -19
- 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 +83 -20
- package/node_modules/zod/v4/core/doc.cjs +31 -9
- 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 +12 -9
- package/node_modules/zod/v4/core/errors.cjs +126 -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 +107 -25
- package/node_modules/zod/v4/core/index.cjs +24 -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 +24 -1
- 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 +6 -2
- package/node_modules/zod/v4/core/json-schema-processors.cjs +441 -156
- package/node_modules/zod/v4/core/json-schema-processors.d.cts +16 -0
- package/node_modules/zod/v4/core/json-schema-processors.d.ts +16 -0
- package/node_modules/zod/v4/core/json-schema-processors.js +400 -158
- package/node_modules/zod/v4/core/json-schema.cjs +19 -0
- 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 +360 -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 +311 -0
- package/node_modules/zod/v4/core/parse.cjs +148 -46
- 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 +127 -45
- package/node_modules/zod/v4/core/regexes.cjs +54 -17
- package/node_modules/zod/v4/core/regexes.d.cts +5 -0
- package/node_modules/zod/v4/core/regexes.d.ts +5 -0
- package/node_modules/zod/v4/core/regexes.js +32 -15
- package/node_modules/zod/v4/core/registries.cjs +19 -0
- package/node_modules/zod/v4/core/registries.js +2 -2
- package/node_modules/zod/v4/core/schemas.cjs +785 -386
- package/node_modules/zod/v4/core/schemas.d.cts +123 -34
- package/node_modules/zod/v4/core/schemas.d.ts +123 -34
- package/node_modules/zod/v4/core/schemas.js +753 -386
- package/node_modules/zod/v4/core/standard-schema.cjs +19 -0
- package/node_modules/zod/v4/core/to-json-schema.cjs +269 -45
- package/node_modules/zod/v4/core/to-json-schema.d.cts +45 -5
- package/node_modules/zod/v4/core/to-json-schema.d.ts +45 -5
- package/node_modules/zod/v4/core/to-json-schema.js +247 -44
- package/node_modules/zod/v4/core/util.cjs +372 -157
- package/node_modules/zod/v4/core/util.d.cts +79 -1
- package/node_modules/zod/v4/core/util.d.ts +79 -1
- package/node_modules/zod/v4/core/util.js +341 -156
- package/node_modules/zod/v4/core/versions.cjs +21 -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 +214 -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 +34 -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 +5 -0
- package/node_modules/zod/v4/locales/ar.js +5 -0
- package/node_modules/zod/v4/locales/az.cjs +5 -0
- package/node_modules/zod/v4/locales/az.js +5 -0
- package/node_modules/zod/v4/locales/be.cjs +12 -0
- package/node_modules/zod/v4/locales/be.js +12 -0
- package/node_modules/zod/v4/locales/bg.cjs +5 -0
- package/node_modules/zod/v4/locales/bg.js +5 -0
- package/node_modules/zod/v4/locales/bn.cjs +140 -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 +113 -0
- package/node_modules/zod/v4/locales/ca.cjs +5 -0
- package/node_modules/zod/v4/locales/ca.js +5 -0
- package/node_modules/zod/v4/locales/ckb.cjs +160 -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 +133 -0
- package/node_modules/zod/v4/locales/cs.cjs +5 -0
- package/node_modules/zod/v4/locales/cs.js +5 -0
- package/node_modules/zod/v4/locales/da.cjs +7 -2
- package/node_modules/zod/v4/locales/da.js +7 -2
- package/node_modules/zod/v4/locales/de.cjs +5 -0
- package/node_modules/zod/v4/locales/de.js +5 -0
- package/node_modules/zod/v4/locales/el.cjs +3 -0
- package/node_modules/zod/v4/locales/el.js +3 -0
- package/node_modules/zod/v4/locales/en.cjs +16 -4
- package/node_modules/zod/v4/locales/en.js +16 -4
- package/node_modules/zod/v4/locales/eo.cjs +5 -0
- package/node_modules/zod/v4/locales/eo.js +5 -0
- package/node_modules/zod/v4/locales/es.cjs +4 -0
- package/node_modules/zod/v4/locales/es.js +4 -0
- package/node_modules/zod/v4/locales/fa.cjs +5 -0
- package/node_modules/zod/v4/locales/fa.js +5 -0
- package/node_modules/zod/v4/locales/fi.cjs +5 -0
- package/node_modules/zod/v4/locales/fi.js +5 -0
- package/node_modules/zod/v4/locales/fr-CA.cjs +5 -0
- package/node_modules/zod/v4/locales/fr-CA.js +5 -0
- package/node_modules/zod/v4/locales/fr.cjs +18 -14
- package/node_modules/zod/v4/locales/fr.js +18 -14
- package/node_modules/zod/v4/locales/gu.cjs +140 -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 +113 -0
- package/node_modules/zod/v4/locales/he.cjs +7 -0
- package/node_modules/zod/v4/locales/he.js +7 -0
- package/node_modules/zod/v4/locales/hi.cjs +138 -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 +111 -0
- package/node_modules/zod/v4/locales/hr.cjs +4 -0
- package/node_modules/zod/v4/locales/hr.js +4 -0
- package/node_modules/zod/v4/locales/hu.cjs +5 -0
- package/node_modules/zod/v4/locales/hu.js +5 -0
- package/node_modules/zod/v4/locales/hy.cjs +11 -0
- package/node_modules/zod/v4/locales/hy.js +11 -0
- package/node_modules/zod/v4/locales/id.cjs +5 -0
- package/node_modules/zod/v4/locales/id.js +5 -0
- package/node_modules/zod/v4/locales/index.cjs +43 -2
- package/node_modules/zod/v4/locales/index.d.cts +11 -0
- package/node_modules/zod/v4/locales/index.d.ts +11 -0
- package/node_modules/zod/v4/locales/index.js +11 -0
- package/node_modules/zod/v4/locales/is.cjs +5 -0
- package/node_modules/zod/v4/locales/is.js +5 -0
- package/node_modules/zod/v4/locales/it.cjs +5 -0
- package/node_modules/zod/v4/locales/it.js +5 -0
- package/node_modules/zod/v4/locales/ja.cjs +5 -0
- package/node_modules/zod/v4/locales/ja.js +5 -0
- package/node_modules/zod/v4/locales/ka.cjs +5 -0
- package/node_modules/zod/v4/locales/ka.js +5 -0
- package/node_modules/zod/v4/locales/km.cjs +5 -0
- package/node_modules/zod/v4/locales/km.js +5 -0
- package/node_modules/zod/v4/locales/kn.cjs +143 -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 +116 -0
- package/node_modules/zod/v4/locales/ko.cjs +5 -0
- package/node_modules/zod/v4/locales/ko.js +5 -0
- package/node_modules/zod/v4/locales/lt.cjs +4 -0
- package/node_modules/zod/v4/locales/lt.js +4 -0
- package/node_modules/zod/v4/locales/mk.cjs +5 -0
- package/node_modules/zod/v4/locales/mk.js +5 -0
- package/node_modules/zod/v4/locales/ms.cjs +5 -0
- package/node_modules/zod/v4/locales/ms.js +5 -0
- package/node_modules/zod/v4/locales/ne.cjs +138 -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 +111 -0
- package/node_modules/zod/v4/locales/nl.cjs +5 -0
- package/node_modules/zod/v4/locales/nl.js +5 -0
- package/node_modules/zod/v4/locales/nn.cjs +140 -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 +113 -0
- package/node_modules/zod/v4/locales/no.cjs +7 -2
- package/node_modules/zod/v4/locales/no.js +7 -2
- package/node_modules/zod/v4/locales/ota.cjs +5 -0
- package/node_modules/zod/v4/locales/ota.js +5 -0
- package/node_modules/zod/v4/locales/pl.cjs +5 -0
- package/node_modules/zod/v4/locales/pl.js +5 -0
- package/node_modules/zod/v4/locales/ps.cjs +5 -0
- package/node_modules/zod/v4/locales/ps.js +5 -0
- package/node_modules/zod/v4/locales/pt-BR.cjs +170 -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 +143 -0
- package/node_modules/zod/v4/locales/pt.cjs +89 -55
- package/node_modules/zod/v4/locales/pt.js +89 -55
- package/node_modules/zod/v4/locales/ro.cjs +3 -0
- package/node_modules/zod/v4/locales/ro.js +3 -0
- package/node_modules/zod/v4/locales/ru.cjs +12 -0
- package/node_modules/zod/v4/locales/ru.js +12 -0
- package/node_modules/zod/v4/locales/sk.cjs +143 -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 +116 -0
- package/node_modules/zod/v4/locales/sl.cjs +5 -0
- package/node_modules/zod/v4/locales/sl.js +5 -0
- package/node_modules/zod/v4/locales/sv.cjs +7 -2
- package/node_modules/zod/v4/locales/sv.js +7 -2
- package/node_modules/zod/v4/locales/ta.cjs +5 -0
- package/node_modules/zod/v4/locales/ta.js +5 -0
- package/node_modules/zod/v4/locales/tg.cjs +144 -0
- package/node_modules/zod/v4/locales/tg.d.cts +5 -0
- package/node_modules/zod/v4/locales/tg.d.ts +4 -0
- package/node_modules/zod/v4/locales/tg.js +117 -0
- package/node_modules/zod/v4/locales/th.cjs +5 -0
- package/node_modules/zod/v4/locales/th.js +5 -0
- package/node_modules/zod/v4/locales/tk.cjs +134 -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 +107 -0
- package/node_modules/zod/v4/locales/tr.cjs +5 -0
- package/node_modules/zod/v4/locales/tr.js +5 -0
- package/node_modules/zod/v4/locales/uk.cjs +5 -0
- package/node_modules/zod/v4/locales/uk.js +5 -0
- package/node_modules/zod/v4/locales/ur.cjs +5 -0
- package/node_modules/zod/v4/locales/ur.js +5 -0
- package/node_modules/zod/v4/locales/uz.cjs +3 -0
- package/node_modules/zod/v4/locales/uz.js +3 -0
- package/node_modules/zod/v4/locales/vi.cjs +5 -0
- package/node_modules/zod/v4/locales/vi.js +5 -0
- package/node_modules/zod/v4/locales/yo.cjs +5 -0
- package/node_modules/zod/v4/locales/yo.js +5 -0
- package/node_modules/zod/v4/locales/zh-CN.cjs +5 -0
- package/node_modules/zod/v4/locales/zh-CN.js +5 -0
- package/node_modules/zod/v4/locales/zh-TW.cjs +5 -0
- package/node_modules/zod/v4/locales/zh-TW.js +5 -0
- package/node_modules/zod/v4/mini/checks.cjs +21 -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/coerce.cjs +19 -0
- package/node_modules/zod/v4/mini/deep-partial.cjs +58 -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 +33 -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 +82 -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/index.cjs +19 -0
- package/node_modules/zod/v4/mini/iso.cjs +19 -0
- package/node_modules/zod/v4/mini/parse.cjs +22 -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 +117 -53
- package/node_modules/zod/v4/mini/schemas.d.cts +49 -14
- package/node_modules/zod/v4/mini/schemas.d.ts +49 -14
- package/node_modules/zod/v4/mini/schemas.js +92 -51
- package/node_modules/zod/v4-mini/index.cjs +19 -0
- package/openclaw.plugin.json +21 -1
- package/package.json +10 -8
- package/node_modules/@openclaw/fs-safe/dist/absolute-path.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/advanced.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-crc32.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-deadline.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-entry.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-errors.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-gzip-tail.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-input.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-kind.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-limits.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-merge.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-native.d.ts +0 -20
- package/node_modules/@openclaw/fs-safe/dist/archive-native.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-native.js +0 -107
- package/node_modules/@openclaw/fs-safe/dist/archive-options.d.ts +0 -21
- package/node_modules/@openclaw/fs-safe/dist/archive-options.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-parser-errors.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-plan.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-policy.d.ts +0 -22
- package/node_modules/@openclaw/fs-safe/dist/archive-policy.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-policy.js +0 -38
- package/node_modules/@openclaw/fs-safe/dist/archive-read.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-staging.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-inspect.d.ts +0 -7
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-inspect.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-inspect.js +0 -59
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-stream.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-wasm.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-tar.d.ts +0 -19
- package/node_modules/@openclaw/fs-safe/dist/archive-tar.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-tar.js +0 -21
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-admission.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-count.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-directory.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-entry.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-integrity.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-names.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-preflight.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/async-lock.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/atomic.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/bounded-read-stream.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/bounded-read.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/byte-budget.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/config.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/containment.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/deny-mutations.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/device-path.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/directory-durability.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/directory-guard.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-node.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-owner.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/durability.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/error-detail.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/errors.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/file-hash.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/file-identity.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/file-lock.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/file-observation.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/file-store-boundary.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/file-store-limit.d.ts +0 -2
- package/node_modules/@openclaw/fs-safe/dist/file-store-limit.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/file-store-limit.js +0 -8
- package/node_modules/@openclaw/fs-safe/dist/file-store-prune.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/file-store-sync-write.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/file-store.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/file-sync.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/filename.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/fs.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/guarded-mkdir.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/guarded-mutation.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/home-dir.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/index.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/install-path.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/json-document-store.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-directory.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-ownership.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/json-store.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/json-stringify.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/json.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/local-file-access.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/local-roots.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/lock-config.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/move-path-cleanup.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/move-path.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/native-binding.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/native-config.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/native-operations.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write-windows.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/native-staged-file.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/native.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/opened-file-failure.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/opened-realpath.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/output.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/owner-dacl.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/path-policy.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/path.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/permission-exec.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/permissions-public.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/permissions-windows.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/permissions.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/pinned-open.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/pinned-operation.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/pinned-write.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/private-directory.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/private-temp-workspace.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/publish-file-failure.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/publish-file.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/read-open-flags.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/read-opened-file.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/regular-file.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/replace-directory.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-fallback.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-source.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/replace-file-descriptor.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/replace-file-rename-policy.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/replace-file-temp-owner.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/replace-file.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-context.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-errors.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-file.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-impl.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-path-existing.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-path-symlink.d.ts +0 -7
- package/node_modules/@openclaw/fs-safe/dist/root-path-symlink.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-path-symlink.js +0 -35
- package/node_modules/@openclaw/fs-safe/dist/root-path.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-paths.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-walk.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-write-mode.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-write-verification.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/safe-path-segment.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/secret-file.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/secret-read-async.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/secret-read-policy.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/secret.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/secure-file.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/secure-temp-dir.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/sibling-staged-file.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/sibling-temp.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-acquire.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-handle.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-policy.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-reclaim.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-root.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-types.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/staged-directory.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/staged-file-types.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/store.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/strict-file-identity.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/string-coerce.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/suppressed-error.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/symlink-parents.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/temp-cleanup.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/temp-target.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-owner.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/temp.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/test-hooks.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/text-atomic.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/timing.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/trash.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/types.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/walk.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/windows-command.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/windows-owner.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/write-open-flags.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/write-queue.d.ts.map +0 -1
- 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
- /package/node_modules/@openclaw/fs-safe/dist/{archive-options.js → pinned-write-types.js} +0 -0
|
@@ -0,0 +1,197 @@
|
|
|
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
|
+
Tree-copy cleanup attempts every acquired close once, even when another close fails. Portable file handles close output before input; completed directories close their pinned source before target; the public wrapper then closes its source before the destination parent. A copy, identity, metadata, native-clone, or cancellation failure already observed at one of those scopes remains the reported value instead of being replaced by cleanup. If that scope otherwise succeeded, its first close failure is reported unchanged. Concurrent siblings have no global structural close order: the first observed sibling failure stops new work while admitted work settles. Portable copying records caller cancellation when it occurs, so a later abort during cleanup cannot replace an earlier copy failure.
|
|
70
|
+
|
|
71
|
+
Clones preserve file contents, empty directories, timestamps, executable modes where supported, and literal symbolic links. Editing a clone does not modify its source. Unsupported filesystem operations fail; callers may choose their own copy or checkout fallback after the failed operation has settled.
|
|
72
|
+
|
|
73
|
+
Native Windows byte copies can store large zero-filled chunks as sparse ranges when the destination is initially empty and its filesystem supports sparse files. This still reads every source byte and creates an independent copy.
|
|
74
|
+
|
|
75
|
+
The ReFS backend rejects files with alternate data streams and unsupported reparse-point types instead of silently losing their contents. Symbolic links and junctions are preserved.
|
|
76
|
+
|
|
77
|
+
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.
|
|
78
|
+
|
|
79
|
+
`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.
|
|
80
|
+
|
|
81
|
+
All input paths must be absolute and valid before native availability is checked. On platforms other than macOS, `auto` and `off` can return one `undefined` per path without the addon, matching native's unsupported result. On macOS, `off` or an unavailable addon still rejects with `helper-unavailable`; JavaScript cannot supply APFS clone IDs. Explicit `require` mode rejects an unavailable addon on every platform, including for an empty batch. Errors from a loaded native helper remain terminal.
|
|
82
|
+
|
|
83
|
+
## Borrowed FileHandle transfers
|
|
84
|
+
|
|
85
|
+
`copyFileHandle` from `@openclaw/fs-safe/advanced` copies bytes between two
|
|
86
|
+
already-open regular files. Use it when a snapshot or materialization owner
|
|
87
|
+
has admitted the source and opened its own destination:
|
|
88
|
+
|
|
89
|
+
```ts
|
|
90
|
+
import { createHash } from "node:crypto";
|
|
91
|
+
import { copyFileHandle } from "@openclaw/fs-safe/advanced";
|
|
92
|
+
|
|
93
|
+
const digest = createHash("sha256");
|
|
94
|
+
const bytes = await copyFileHandle(sourceHandle, targetHandle, {
|
|
95
|
+
maxBytes: expectedSize,
|
|
96
|
+
signal: AbortSignal.timeout(30_000),
|
|
97
|
+
onChunk: (chunk) => { digest.update(chunk); },
|
|
98
|
+
assertBeforeMutation: assertSnapshotOwnerCurrent,
|
|
99
|
+
});
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
`CopyFileHandleOptions` contains optional `maxBytes`, `signal`, `onChunk`, and
|
|
103
|
+
`assertBeforeMutation`. The result is the actual byte count copied through EOF.
|
|
104
|
+
The four options are selected once before descriptor inspection; later mutation
|
|
105
|
+
of the options object cannot replace the active budget, signal, observer, or
|
|
106
|
+
mutation-authority callback.
|
|
107
|
+
The byte limit is not a prefix length: excess data rejects with `too-large`,
|
|
108
|
+
including data added after admission. Omitted limits are unlimited; Root's
|
|
109
|
+
default read cap does not apply. Zero accepts only an empty source. Invalid
|
|
110
|
+
limits reject before descriptor inspection.
|
|
111
|
+
|
|
112
|
+
The source and target must be distinct regular files; exact device/inode
|
|
113
|
+
aliases, including two handles to hardlinked names, reject before writing.
|
|
114
|
+
Both reads and writes start at position zero and preserve the handles' current
|
|
115
|
+
cursors. Existing destination bytes beyond the copied prefix remain intact.
|
|
116
|
+
The target must have been opened **without append mode**: some platforms ignore
|
|
117
|
+
positional writes on append handles, and Node exposes no portable open-flags
|
|
118
|
+
query. Keep both handles open and free of concurrent I/O through settlement.
|
|
119
|
+
|
|
120
|
+
The synchronous `onChunk` observer sees each source chunk before any target
|
|
121
|
+
write for that chunk. It receives a borrowed view reused by later reads; consume
|
|
122
|
+
it immediately without retaining or mutating it. This supports source hashing;
|
|
123
|
+
it does not verify bytes persisted by the destination. Callers that require a
|
|
124
|
+
destination digest must still hash the destination handle afterward. Observer
|
|
125
|
+
and authority callbacks may throw; thenable returns reject with `TypeError`
|
|
126
|
+
before the affected write. `assertBeforeMutation` runs immediately before every
|
|
127
|
+
partial-write submission and must inspect current authority each time.
|
|
128
|
+
|
|
129
|
+
The helper reuses Root copying's bounded read buffer and completes positive
|
|
130
|
+
short reads and writes. JavaScript file transfers use at most 512 KiB of scratch
|
|
131
|
+
space, reduced for smaller source-size hints and capped by a finite byte budget
|
|
132
|
+
plus its one-byte overflow probe. A zero-progress write rejects with `helper-failed`.
|
|
133
|
+
Cancellation is checked before I/O, after source reads, and before each write;
|
|
134
|
+
admitted reads and writes settle before rejection. A rejected operation can
|
|
135
|
+
leave a copied prefix. There is no rollback or pathname cleanup.
|
|
136
|
+
|
|
137
|
+
This helper never opens or closes a file, truncates, chmods, syncs, renames, or
|
|
138
|
+
publishes it. Source admission, immutability checks, destination preparation,
|
|
139
|
+
durability, publication, and failure recovery stay with the caller. Initial
|
|
140
|
+
descriptor inspection does not prove that the source remained unchanged while
|
|
141
|
+
copying. Keep existing source-fingerprint and publication checks around the
|
|
142
|
+
transfer when building snapshot operations.
|
|
143
|
+
|
|
144
|
+
### Synchronous descriptor transfers
|
|
145
|
+
|
|
146
|
+
`copyFileDescriptorSync(sourceFd, targetFd, options?)` provides the same
|
|
147
|
+
zero-origin byte transfer for borrowed numeric descriptors. It shares
|
|
148
|
+
`CopyFileHandleOptions` and returns the copied byte count synchronously:
|
|
149
|
+
|
|
150
|
+
```ts
|
|
151
|
+
import { copyFileDescriptorSync } from "@openclaw/fs-safe/advanced";
|
|
152
|
+
|
|
153
|
+
const bytes = copyFileDescriptorSync(sourceFd, targetFd, {
|
|
154
|
+
maxBytes: expectedSize,
|
|
155
|
+
assertBeforeMutation: assertSnapshotOwnerCurrent,
|
|
156
|
+
});
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
The same regular-file and exact-identity admission, byte limits, short-I/O
|
|
160
|
+
handling, cursor preservation, and caller-owned cleanup apply. The target must
|
|
161
|
+
be opened without append mode, and both descriptors must remain open and free
|
|
162
|
+
of concurrent I/O, including inside callbacks. Neither helper makes a mutable
|
|
163
|
+
source into a consistent snapshot or truncates an existing destination suffix.
|
|
164
|
+
|
|
165
|
+
The synchronous helper snapshots the four options once and invokes both
|
|
166
|
+
callbacks with no receiver (`this` is `undefined` in strict callbacks).
|
|
167
|
+
`onChunk` receives a borrowed view that must be consumed immediately without
|
|
168
|
+
retaining or mutating it. Both callbacks must finish synchronously; thenables
|
|
169
|
+
throw `TypeError` before the current write. Cancellation is cooperative: a
|
|
170
|
+
pre-aborted signal or an abort triggered by a callback stops the transfer before
|
|
171
|
+
the next write. Timers cannot interrupt synchronous filesystem calls while the
|
|
172
|
+
event loop is blocked. Authority runs before every partial write; an abort
|
|
173
|
+
triggered by that assertion prevents the same write.
|
|
174
|
+
|
|
175
|
+
## Ownership and cancellation
|
|
176
|
+
|
|
177
|
+
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.
|
|
178
|
+
|
|
179
|
+
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.
|
|
180
|
+
|
|
181
|
+
Tree copying preserves caller abort handlers and receives cancellation even when a caller handler stops event propagation, including native cloning and byte-copy fallbacks.
|
|
182
|
+
|
|
183
|
+
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.
|
|
184
|
+
|
|
185
|
+
A close-only rejection reports descriptor settlement, not whether bytes reached stable storage. The destination can already be complete when a close fails, just as other failed or cancelled calls can leave caller-owned output. Inspect or remove that output only after the copying promise settles and under the same source and destination authority assumptions.
|
|
186
|
+
|
|
187
|
+
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.
|
|
188
|
+
|
|
189
|
+
## Platform tests and benchmarks
|
|
190
|
+
|
|
191
|
+
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.
|
|
192
|
+
|
|
193
|
+
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.
|
|
194
|
+
|
|
195
|
+
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.
|
|
196
|
+
|
|
197
|
+
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,132 @@
|
|
|
1
|
+
# Exclusive leaf creation
|
|
2
|
+
|
|
3
|
+
The creation-policy work is tracked in [#482](https://github.com/openclaw/fs-safe/issues/482).
|
|
4
|
+
|
|
5
|
+
Use `createDirectory()`, `createDirectorySync()`, and `createFileSync()` from
|
|
6
|
+
`@openclaw/fs-safe/advanced` when an existing, trusted parent should receive
|
|
7
|
+
one new entry. These operations are exclusive and nonrecursive: an existing
|
|
8
|
+
entry throws `FsSafeError("already-exists")`, and missing parents are not
|
|
9
|
+
created. They do not repair or adopt an existing destination. `Root.mkdir()`
|
|
10
|
+
continues to own recursive, idempotent directory creation within a Root.
|
|
11
|
+
|
|
12
|
+
```ts
|
|
13
|
+
import {
|
|
14
|
+
createDirectorySync,
|
|
15
|
+
createFileSync,
|
|
16
|
+
} from "@openclaw/fs-safe/advanced";
|
|
17
|
+
import fs from "node:fs";
|
|
18
|
+
|
|
19
|
+
createDirectorySync("/trusted/application/new-state", { private: true });
|
|
20
|
+
using file = createFileSync("/trusted/application/new-state/initial.db", {
|
|
21
|
+
private: true,
|
|
22
|
+
});
|
|
23
|
+
fs.fsyncSync(file.fd);
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Both directory variants return `void`; `createFileSync()` returns an empty,
|
|
27
|
+
read/write descriptor owned by `OwnedFileDescriptorSync`, with
|
|
28
|
+
`{ fd, close(), [Symbol.dispose]() }`. Use the
|
|
29
|
+
owner to close it, rather than calling `fs.closeSync()` yourself. Closing and
|
|
30
|
+
disposal are idempotent; a failed close is not retried through a descriptor
|
|
31
|
+
number that might already have been reused. File creation does not write
|
|
32
|
+
payload data or request file or parent-directory synchronization.
|
|
33
|
+
|
|
34
|
+
## Permission options
|
|
35
|
+
|
|
36
|
+
`CreateDirectoryOptions` and `CreateFileOptions` both support `private?: boolean`
|
|
37
|
+
for private creation. `mode?: number` selects permission
|
|
38
|
+
bits; invalid values and private requests with group/world or special bits
|
|
39
|
+
reject before mutation. Restrictive owner-only modes remain restrictive.
|
|
40
|
+
Without `private`, ordinary Node defaults and the process umask apply. Private
|
|
41
|
+
POSIX creation requests `0700` for directories and `0600` for files by default;
|
|
42
|
+
the umask may restrict those permissions further. Existing directory privacy
|
|
43
|
+
checks never broaden permissions.
|
|
44
|
+
|
|
45
|
+
Private POSIX `Root.create()` and `createJson()` writes check the retained descriptor's actual owner and
|
|
46
|
+
permissions before writing payload bytes, after producer and authority callbacks,
|
|
47
|
+
and at publication, including JavaScript fallback writes. Payload writes require
|
|
48
|
+
the temporary `0600` mode even when the requested final mode differs.
|
|
49
|
+
Private ownership, permissions and ACLs are checked before preparing that mode,
|
|
50
|
+
including after authority callbacks; valid restrictive initial modes remain supported.
|
|
51
|
+
A successful `chmod` is insufficient: filesystems that do not
|
|
52
|
+
enforce owner-only permissions reject before payload writes. The requested final
|
|
53
|
+
mode is verified too; a failure after publication preserves the completed file
|
|
54
|
+
and staged creation reports its published outcome.
|
|
55
|
+
|
|
56
|
+
On macOS (Darwin), private creation also requires an ACL-free result. The native
|
|
57
|
+
helper must provide `inspectDarwinAcl`; native `off`, a missing helper, or an
|
|
58
|
+
older helper without that capability rejects with `helper-unavailable` before
|
|
59
|
+
creating parents or staging entries. There is no system-command fallback for
|
|
60
|
+
Darwin private creation. Operations without `private: true` keep their existing
|
|
61
|
+
native-mode behavior.
|
|
62
|
+
|
|
63
|
+
Private Darwin directories must retain owner-read or owner-search permission
|
|
64
|
+
after applying the umask so their ACL can be inspected. Modes `0000` and `0200`
|
|
65
|
+
reject with `helper-unavailable` before directory creation. Existing private
|
|
66
|
+
directories with neither permission also reject with `helper-unavailable`;
|
|
67
|
+
permissions are never broadened to inspect them. Modes `0100`, `0300`, and `0400`
|
|
68
|
+
remain supported, as does the default `0700`. Private files with mode `0000`
|
|
69
|
+
remain supported because inspection uses the owned creation descriptor.
|
|
70
|
+
|
|
71
|
+
Before creation, the parent ACL is inspected for entries that could be inherited
|
|
72
|
+
by the new directory or file, as applicable. Relevant inheritable entries reject
|
|
73
|
+
creation. Noninheriting parent ACLs, such as the usual macOS home-directory
|
|
74
|
+
deny-delete entry, do not reject child creation. Created directories and files
|
|
75
|
+
are checked for owner-only permissions and no ACL before admitting the directory
|
|
76
|
+
or allowing payload writes. An existing directory requested with `private: true`
|
|
77
|
+
must also be owned by the current user, have owner-only permissions, and have no
|
|
78
|
+
ACL. These checks never clear an ACL after creation or repair an existing entry.
|
|
79
|
+
|
|
80
|
+
On Windows, mode bits alone do not establish privacy. Private creation uses a
|
|
81
|
+
protected current-user, LocalSystem and Administrators DACL. A private staging
|
|
82
|
+
directory supplies trusted-only inheritable permissions before Node creates
|
|
83
|
+
the file. The original Node descriptor stays pinned while its full Windows
|
|
84
|
+
identity is compared with a security handle before the file DACL is protected.
|
|
85
|
+
An already broadly accessible file is rejected, not repaired. Keep the trusted
|
|
86
|
+
parent ancestry and staging directory ACL protected from untrusted changes;
|
|
87
|
+
post-operation checks do not make pathname-based fallback operations atomic
|
|
88
|
+
against an adversary who can change that namespace.
|
|
89
|
+
|
|
90
|
+
The internal async writer awaits system commands, file opens and closes, and
|
|
91
|
+
security verification. It does not wrap the synchronous creator in a promise.
|
|
92
|
+
Short identity checks and the existing guarded link/unlink critical sections
|
|
93
|
+
remain synchronous.
|
|
94
|
+
|
|
95
|
+
Private Windows file publication retains the same inode and never overwrites
|
|
96
|
+
an existing destination. The current implementation requires hardlinks on the same
|
|
97
|
+
local filesystem. Unsupported filesystems reject with `helper-unavailable`;
|
|
98
|
+
there is no copy-to-destination fallback. On Windows the owner overlaps a
|
|
99
|
+
verified destination descriptor with the creation descriptor before removing
|
|
100
|
+
the temporary name. Requested read-only attributes are finalized through the
|
|
101
|
+
retained destination descriptor after that handoff.
|
|
102
|
+
|
|
103
|
+
On Windows, native `auto` uses available capabilities; native `off` and
|
|
104
|
+
missing-capability `auto` use the packaged system-command security bridge. Native `require`
|
|
105
|
+
rejects unavailable required capabilities instead of starting a command. The
|
|
106
|
+
private-file capability check runs before creating parents or staging entries;
|
|
107
|
+
directory-only operations require only their directory capabilities. The
|
|
108
|
+
[Windows security fallback prerequisites](install.md#windows-security-fallback)
|
|
109
|
+
apply. All command mutations report unconfirmed outcomes when their reply or
|
|
110
|
+
termination cannot establish completion.
|
|
111
|
+
|
|
112
|
+
## Authority and failure outcomes
|
|
113
|
+
|
|
114
|
+
`assertBeforeMutation?: () => void` is a synchronous current-authority check.
|
|
115
|
+
It runs after preparation and immediately before creation or publication;
|
|
116
|
+
thenables reject before mutation. Parent and file identity checks are repeated
|
|
117
|
+
after the callback. Final permission checks, descriptor settlement and cleanup
|
|
118
|
+
retain the operation's cleanup ownership after publication.
|
|
119
|
+
|
|
120
|
+
Failure does not always mean the final path is absent. Staged private-file errors
|
|
121
|
+
after publication or ambiguous publication preserve the destination and carry
|
|
122
|
+
`details.publication.status` (`published` or `indeterminate`), the target path and
|
|
123
|
+
staging cleanup outcome. Cleanup and close failures retain the original error
|
|
124
|
+
in the cause chain. When `stageDirectory` is present, `cleanup` describes that
|
|
125
|
+
stage's settlement; it does not mean the published destination was removed.
|
|
126
|
+
If a directory is created but its subsequent admission fails, the error records
|
|
127
|
+
its published path and preserves it. A private file whose staging directory
|
|
128
|
+
cannot be admitted reports `not-published` and identifies the preserved stage.
|
|
129
|
+
Observed replacement paths are preserved. Existing
|
|
130
|
+
`createPrivateDirectory()` retains its Windows-only compatibility contract;
|
|
131
|
+
new portable callers should use the ordinary creation operations with
|
|
132
|
+
`private: true`.
|
|
@@ -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
|
|
@@ -61,6 +69,49 @@ descriptor, pathname identity, and canonical path. `assertCurrent()` repeats
|
|
|
61
69
|
those checks. This prevents a pathname replacement from turning a later sync
|
|
62
70
|
into proof for a different directory.
|
|
63
71
|
|
|
72
|
+
Pathname and descriptor checks compare exact bigint device and inode values.
|
|
73
|
+
Each inspection allows one retry for unknown Windows identity components,
|
|
74
|
+
retaining known components and rejecting definite mismatches immediately.
|
|
75
|
+
Persistent unknown identity fails closed with `path-mismatch`, including on an
|
|
76
|
+
otherwise usable directory. A failed preflight identity check never syncs the
|
|
77
|
+
descriptor; a replacement discovered after sync still rejects the operation.
|
|
78
|
+
|
|
79
|
+
`DirectoryReceipt.identity` remains a numeric Node `Stats` object for metadata
|
|
80
|
+
compatibility, projected from the same exact observation as the private
|
|
81
|
+
identity. Library-created receipts and their identity objects retain a
|
|
82
|
+
private exact snapshot; mutating their public fields cannot change the
|
|
83
|
+
directory authorized by that snapshot. Each returned receipt owns a mutable
|
|
84
|
+
numeric metadata copy. Later admissions retain the original metadata snapshot
|
|
85
|
+
even if advisory fields such as mode or timestamps were edited; changed paths
|
|
86
|
+
or identity components reject. Pass the receipt or its original
|
|
87
|
+
identity object through to later operations to retain this evidence. A copied
|
|
88
|
+
or reconstructed numeric identity is accepted only when both components are
|
|
89
|
+
safe integers and, on Windows, nonzero. Rounded or unknown caller identities
|
|
90
|
+
fail with `path-mismatch` rather than authorizing a different directory.
|
|
91
|
+
|
|
92
|
+
Caller-supplied receipts may use `DirectoryReceipt<BigIntStats>` with the result
|
|
93
|
+
of `lstat(path, { bigint: true })`. `pinDirectory()`, `syncDirectory()`,
|
|
94
|
+
`syncDirectorySync()`, `publishFileExclusive()`'s `parentReceipt`, and
|
|
95
|
+
`stageFileInDirectory()` accept both numeric and bigint receipt inputs.
|
|
96
|
+
`DirectoryReceipt` without a type argument and all returned durability receipts
|
|
97
|
+
still expose numeric `Stats`, including working type predicates and Date
|
|
98
|
+
properties. Bigint metadata is projected from the supplied observation, retaining
|
|
99
|
+
fractional timestamps and the private exact device/inode identity.
|
|
100
|
+
|
|
101
|
+
```ts
|
|
102
|
+
import { lstatSync, realpathSync, type BigIntStats } from "node:fs";
|
|
103
|
+
import { syncDirectorySync, type DirectoryReceipt } from "@openclaw/fs-safe/durability";
|
|
104
|
+
|
|
105
|
+
const directoryPath = "/srv/backups/sqlite";
|
|
106
|
+
const receipt: DirectoryReceipt<BigIntStats> = {
|
|
107
|
+
path: directoryPath,
|
|
108
|
+
realPath: realpathSync(directoryPath),
|
|
109
|
+
identity: lstatSync(directoryPath, { bigint: true }),
|
|
110
|
+
};
|
|
111
|
+
// Keep this receipt across the application's publication operation.
|
|
112
|
+
const outcome = syncDirectorySync(receipt);
|
|
113
|
+
```
|
|
114
|
+
|
|
64
115
|
Call `close()` in `finally`. Closing is idempotent; using a closed pin fails.
|
|
65
116
|
|
|
66
117
|
These checks intentionally reject a moved or replaced pathname. For one file's
|
|
@@ -86,6 +137,10 @@ accepted.
|
|
|
86
137
|
`expectedExistingIdentity` binds an existing target to an identity observed by
|
|
87
138
|
the caller before a separate permission or policy check. A missing or replaced
|
|
88
139
|
target fails with `FsSafeError("path-mismatch")`.
|
|
140
|
+
Use bigint `dev` and `ino` from `lstat(path, { bigint: true })` or
|
|
141
|
+
[`readDirectoryIdentity()`](directory-identity.md) for caller-owned observations
|
|
142
|
+
that may exceed the numeric safe-integer range. An original library receipt's
|
|
143
|
+
`identity` object also retains its private exact identity for this option.
|
|
89
144
|
|
|
90
145
|
## Exclusive file publication
|
|
91
146
|
|
|
@@ -94,6 +149,12 @@ target. It pins the source with nonblocking `O_NOFOLLOW`, optionally verifies
|
|
|
94
149
|
`expectedSourceIdentity`, tries a hardlink first, then synchronizes the target
|
|
95
150
|
parent directory.
|
|
96
151
|
|
|
152
|
+
Trusted relative source and target paths are resolved to absolute paths before
|
|
153
|
+
authority checks. On Windows, ordinary drive-relative operands are anchored at
|
|
154
|
+
entry before namespace-alias admission. A caller-supplied `parentReceipt` must
|
|
155
|
+
still name the resolved target parent and is not relaxed by this compatibility
|
|
156
|
+
rule.
|
|
157
|
+
|
|
97
158
|
For example, a backup archive is complete before publication. If directory
|
|
98
159
|
sync fails, keeping that complete file is more useful than conditionally
|
|
99
160
|
deleting it by pathname:
|
|
@@ -199,7 +260,7 @@ import { sha256File } from "@openclaw/fs-safe/durability";
|
|
|
199
260
|
const snapshot = await open(stagedArchive, "r");
|
|
200
261
|
try {
|
|
201
262
|
const before = await snapshot.stat();
|
|
202
|
-
const hash = await sha256File(snapshot);
|
|
263
|
+
const hash = await sha256File(snapshot, { maxBytes: before.size });
|
|
203
264
|
if (hash.bytes !== before.size || hash.digest !== manifest.sha256) {
|
|
204
265
|
throw new Error("staged backup does not match its manifest");
|
|
205
266
|
}
|
|
@@ -209,6 +270,21 @@ try {
|
|
|
209
270
|
```
|
|
210
271
|
|
|
211
272
|
The result is `{ bytes, digest }`, where `digest` is lowercase hexadecimal.
|
|
273
|
+
The optional `Sha256FileOptions` argument supports `maxBytes` and `signal`.
|
|
274
|
+
`maxBytes` accepts a non-negative safe integer (including zero), or
|
|
275
|
+
`Infinity` for no limit, which is also the default. Oversized files reject with
|
|
276
|
+
`FsSafeError("too-large")`; reads stay bounded to at most `maxBytes + 1` bytes,
|
|
277
|
+
even if the file grows after its initial size check. Hashing never silently
|
|
278
|
+
truncates to the limit.
|
|
279
|
+
|
|
280
|
+
Pass `signal` to cancel. A pre-aborted signal rejects before file I/O or native
|
|
281
|
+
loading. In-flight cancellation is cooperative between reads and rejects with
|
|
282
|
+
the signal's original reason only after the pending read or native task stops.
|
|
283
|
+
Callers may close their handle after awaiting rejection; do not close it while
|
|
284
|
+
the operation is pending. A signal can be shared by successive or concurrent
|
|
285
|
+
hashes. Neither mode provides a snapshot of concurrently modified contents;
|
|
286
|
+
callers requiring stable content must also fence identity and metadata.
|
|
287
|
+
|
|
212
288
|
The handle overload never closes the caller's descriptor and uses positioned
|
|
213
289
|
reads, so it does not alter the descriptor's current offset. The path overload
|
|
214
290
|
rejects symbolic links and non-regular files, compares lossless bigint identities
|
|
@@ -223,14 +299,56 @@ pathname without reopening the file and repeat the symlink and file-type checks.
|
|
|
223
299
|
POSIX opens are nonblocking, so a raced FIFO or device is rejected after
|
|
224
300
|
descriptor inspection rather than waiting for a writer.
|
|
225
301
|
|
|
302
|
+
A pathname hash reports failure to close its owned descriptor after successful
|
|
303
|
+
hashing. If hashing, admission, or cancellation already failed, that original
|
|
304
|
+
failure remains primary even when close also fails. This also applies to
|
|
305
|
+
`sha256FileSync()`; borrowed handles and descriptors remain caller-owned.
|
|
306
|
+
|
|
226
307
|
When the optional binding is active, hashing runs as an async native task and
|
|
227
308
|
does not occupy the JavaScript event loop with digest updates. With native mode
|
|
228
309
|
`off`, or in `auto` when no binding loads, the fallback performs asynchronous
|
|
229
|
-
positioned reads in
|
|
230
|
-
thread. Both paths stream
|
|
231
|
-
|
|
310
|
+
positioned reads in chunks of up to 256 KiB but updates Node's `Hash` on the JavaScript
|
|
311
|
+
thread. Both paths stream bounded buffers rather than loading the file into memory.
|
|
312
|
+
The fallback sizes its scratch buffer to small files and grows it if a stale
|
|
313
|
+
size hint is exceeded, while still probing for actual EOF and byte-limit overflow.
|
|
314
|
+
Native mode `require` keeps its usual fail-closed loader semantics.
|
|
315
|
+
|
|
316
|
+
### Synchronous hashing
|
|
317
|
+
|
|
318
|
+
`sha256FileSync()` accepts a pathname or a borrowed numeric file descriptor and
|
|
319
|
+
returns the same `{ bytes, digest }` result. It shares `Sha256FileOptions`,
|
|
320
|
+
including the default unlimited byte budget and `too-large` errors for growth
|
|
321
|
+
beyond `maxBytes`. It always reads from offset zero with bounded positional
|
|
322
|
+
`readSync` calls and leaves a borrowed descriptor open at its original position.
|
|
323
|
+
Path inputs use the same regular-file, final-symlink, nonblocking-open, and exact
|
|
324
|
+
bigint admission checks described above, then close their owned descriptor.
|
|
325
|
+
These checks do not provide ancestor confinement or a snapshot of concurrent edits.
|
|
326
|
+
|
|
327
|
+
```ts
|
|
328
|
+
import { closeSync, openSync } from "node:fs";
|
|
329
|
+
import { sha256FileSync } from "@openclaw/fs-safe/durability";
|
|
232
330
|
|
|
233
|
-
|
|
331
|
+
const fd = openSync(stagedArchive, "r");
|
|
332
|
+
try {
|
|
333
|
+
const hash = sha256FileSync(fd, { maxBytes: manifest.sizeBytes });
|
|
334
|
+
if (hash.bytes !== manifest.sizeBytes || hash.digest !== manifest.sha256) {
|
|
335
|
+
throw new Error("staged backup does not match its manifest");
|
|
336
|
+
}
|
|
337
|
+
} finally {
|
|
338
|
+
closeSync(fd);
|
|
339
|
+
}
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
The synchronous API uses Node's crypto implementation in every native mode,
|
|
343
|
+
including `require`; it never loads a native binding. It blocks the calling
|
|
344
|
+
thread until hashing finishes or throws. A pre-aborted signal fails before I/O,
|
|
345
|
+
and synchronous signal changes are checked between operations with the original
|
|
346
|
+
reason preserved. Timers and other JavaScript callbacks cannot run while the
|
|
347
|
+
hash is executing; use `sha256File()` when responsive cancellation is needed.
|
|
348
|
+
|
|
349
|
+
## Publication failure receipts
|
|
350
|
+
|
|
351
|
+
If `publishFileExclusive()` fails after creating the target, it throws an
|
|
234
352
|
`FsSafeError` with a `details` receipt:
|
|
235
353
|
|
|
236
354
|
```ts
|
|
@@ -257,6 +375,13 @@ this receipt instead of inferring ownership from path existence. The original
|
|
|
257
375
|
failure remains available as `cause`. Failures before target creation retain
|
|
258
376
|
their existing error shape and do not claim a cleanup result.
|
|
259
377
|
|
|
378
|
+
Source and target identities are checked again after successful or unsupported
|
|
379
|
+
directory synchronization, while their descriptors remain owned. A late
|
|
380
|
+
verification failure retains its strategy's verification phase and is not a
|
|
381
|
+
directory-sync failure. Completed copied targets stay pinned during conditional
|
|
382
|
+
cleanup; substituted entries remain untouched. Returned numeric metadata comes
|
|
383
|
+
from the retained target descriptor and grants no continuing pathname authority.
|
|
384
|
+
|
|
260
385
|
### Directory-sync failure policy
|
|
261
386
|
|
|
262
387
|
`onSyncFailure` applies only after target creation and content/identity fencing
|