@openclaw/openshell-sandbox 2026.9.5 → 2026.9.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/icon.png +0 -0
- package/dist/index.js +85 -271
- package/node_modules/@openclaw/fs-safe/CHANGELOG.md +304 -0
- package/node_modules/@openclaw/fs-safe/README.md +68 -15
- package/node_modules/@openclaw/fs-safe/dist/absolute-path.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/absolute-path.js +2 -8
- package/node_modules/@openclaw/fs-safe/dist/advanced.d.ts +12 -4
- package/node_modules/@openclaw/fs-safe/dist/advanced.js +7 -2
- package/node_modules/@openclaw/fs-safe/dist/archive-crc32.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-deadline.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-deadline.js +22 -23
- package/node_modules/@openclaw/fs-safe/dist/archive-durability.d.ts +1 -2
- package/node_modules/@openclaw/fs-safe/dist/archive-durability.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-entry.d.ts +0 -1
- 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 +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-input.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-kind.d.ts +0 -2
- package/node_modules/@openclaw/fs-safe/dist/archive-kind.js +5 -17
- package/node_modules/@openclaw/fs-safe/dist/archive-limits.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-merge.d.ts +3 -4
- package/node_modules/@openclaw/fs-safe/dist/archive-merge.js +130 -54
- 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 +67 -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 +16 -26
- package/node_modules/@openclaw/fs-safe/dist/archive-staging.d.ts +1 -3
- package/node_modules/@openclaw/fs-safe/dist/archive-staging.js +3 -3
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-stream.d.ts +3 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-stream.js +56 -37
- 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 +134 -34
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-admission.d.ts +0 -1
- 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 +5 -2
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-directory.js +29 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-entry.d.ts +13 -10
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-entry.js +9 -26
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-integrity.d.ts +2 -3
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-integrity.js +2 -13
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-loader.d.ts +7 -2
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-loader.js +119 -33
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-manifest.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-manifest.js +3 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-names.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-names.js +13 -2
- 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 +16 -8
- package/node_modules/@openclaw/fs-safe/dist/archive.d.ts +14 -9
- package/node_modules/@openclaw/fs-safe/dist/archive.js +223 -178
- 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 +0 -1
- 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 +1 -1
- package/node_modules/@openclaw/fs-safe/dist/clone-metadata.js +6 -2
- 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 +0 -1
- package/node_modules/@openclaw/fs-safe/dist/copy-policy.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/copy-publication.d.ts +8 -5
- package/node_modules/@openclaw/fs-safe/dist/copy-publication.js +5 -6
- package/node_modules/@openclaw/fs-safe/dist/copy-tree-portable.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/copy-tree-portable.js +51 -28
- package/node_modules/@openclaw/fs-safe/dist/copy.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/copy.js +34 -16
- 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-mutation-match.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/deny-mutation-match.js +71 -0
- package/node_modules/@openclaw/fs-safe/dist/deny-mutations.d.ts +2 -3
- package/node_modules/@openclaw/fs-safe/dist/deny-mutations.js +56 -35
- package/node_modules/@openclaw/fs-safe/dist/device-path.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/directory-durability.d.ts +7 -8
- package/node_modules/@openclaw/fs-safe/dist/directory-durability.js +22 -80
- package/node_modules/@openclaw/fs-safe/dist/directory-entry-path.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/directory-guard.d.ts +5 -8
- package/node_modules/@openclaw/fs-safe/dist/directory-guard.js +23 -57
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-node.d.ts +22 -3
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-node.js +97 -3
- package/node_modules/@openclaw/fs-safe/dist/directory-receipt.d.ts +23 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-receipt.js +121 -0
- package/node_modules/@openclaw/fs-safe/dist/durability.d.ts +2 -2
- package/node_modules/@openclaw/fs-safe/dist/effective-uid.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/effective-uid.js +1 -4
- package/node_modules/@openclaw/fs-safe/dist/error-detail.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/errors.d.ts +3 -2
- package/node_modules/@openclaw/fs-safe/dist/errors.js +3 -2
- 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 +2 -1
- package/node_modules/@openclaw/fs-safe/dist/file-handle-transfer.js +57 -2
- package/node_modules/@openclaw/fs-safe/dist/file-hash.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/file-hash.js +186 -70
- package/node_modules/@openclaw/fs-safe/dist/file-identity.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/file-identity.js +26 -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 +58 -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 +25 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-held.js +392 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-io.d.ts +40 -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 +11 -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 +34 -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 +207 -249
- package/node_modules/@openclaw/fs-safe/dist/file-lock.d.ts +0 -1
- 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 +11 -14
- package/node_modules/@openclaw/fs-safe/dist/file-store-boundary.js +73 -45
- 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 +11 -6
- package/node_modules/@openclaw/fs-safe/dist/file-store-sync-directory.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/file-store-sync-directory.js +197 -227
- package/node_modules/@openclaw/fs-safe/dist/file-store-sync-write.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/file-store-sync-write.js +22 -36
- package/node_modules/@openclaw/fs-safe/dist/file-store.d.ts +4 -8
- package/node_modules/@openclaw/fs-safe/dist/file-store.js +72 -45
- package/node_modules/@openclaw/fs-safe/dist/file-sync.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/filename.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/filename.js +1 -7
- package/node_modules/@openclaw/fs-safe/dist/fs.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/guarded-mkdir.d.ts +2 -2
- package/node_modules/@openclaw/fs-safe/dist/guarded-mkdir.js +27 -19
- package/node_modules/@openclaw/fs-safe/dist/guarded-mutation.d.ts +0 -7
- package/node_modules/@openclaw/fs-safe/dist/guarded-mutation.js +6 -11
- package/node_modules/@openclaw/fs-safe/dist/guest-dispatch-python.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/guest-dispatch-python.js +41 -90
- package/node_modules/@openclaw/fs-safe/dist/guest-native-python.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/guest-native-python.js +23 -31
- package/node_modules/@openclaw/fs-safe/dist/guest.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/guest.js +21 -12
- package/node_modules/@openclaw/fs-safe/dist/home-dir.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/index.d.ts +9 -7
- package/node_modules/@openclaw/fs-safe/dist/install-path.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/install-path.js +2 -5
- package/node_modules/@openclaw/fs-safe/dist/json-document-store.d.ts +4 -10
- package/node_modules/@openclaw/fs-safe/dist/json-document-store.js +22 -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 +134 -0
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-ownership.d.ts +1 -7
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-ownership.js +43 -72
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-read.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-read.js +13 -9
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue.d.ts +0 -2
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue.js +20 -148
- package/node_modules/@openclaw/fs-safe/dist/json-store.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/json-store.js +1 -2
- 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 +39 -92
- 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 +5 -15
- package/node_modules/@openclaw/fs-safe/dist/local-file-descriptor.d.ts +2 -6
- package/node_modules/@openclaw/fs-safe/dist/local-roots.d.ts +2 -8
- package/node_modules/@openclaw/fs-safe/dist/local-roots.js +19 -21
- 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 +5 -20
- package/node_modules/@openclaw/fs-safe/dist/move-path-cleanup.js +60 -24
- package/node_modules/@openclaw/fs-safe/dist/move-path-stage.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/move-path.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/move-path.js +64 -42
- package/node_modules/@openclaw/fs-safe/dist/mutation-authority.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/mutation-authority.js +5 -0
- package/node_modules/@openclaw/fs-safe/dist/native-binding.d.ts +69 -15
- 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 +0 -1
- 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 +2 -31
- package/node_modules/@openclaw/fs-safe/dist/native-parent-admission.d.ts +5 -3
- package/node_modules/@openclaw/fs-safe/dist/native-parent-admission.js +27 -7
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write-windows.d.ts +2 -3
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write-windows.js +174 -29
- 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 +230 -187
- 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 +20 -6
- package/node_modules/@openclaw/fs-safe/dist/native-staged-file.js +149 -106
- package/node_modules/@openclaw/fs-safe/dist/native-staged-symlink.d.ts +13 -0
- package/node_modules/@openclaw/fs-safe/dist/native-staged-symlink.js +303 -0
- package/node_modules/@openclaw/fs-safe/dist/native.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/native.js +2 -2
- package/node_modules/@openclaw/fs-safe/dist/opened-file-failure.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/opened-realpath.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/opened-realpath.js +11 -2
- package/node_modules/@openclaw/fs-safe/dist/output.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/output.js +12 -8
- package/node_modules/@openclaw/fs-safe/dist/overwrite-file-handle.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/owner-dacl-batch-worker.js +54 -0
- package/node_modules/@openclaw/fs-safe/dist/owner-dacl-batch.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/owner-dacl-batch.js +64 -0
- package/node_modules/@openclaw/fs-safe/dist/owner-dacl.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/owner-dacl.js +13 -4
- package/node_modules/@openclaw/fs-safe/dist/path-case.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/path-policy.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/path-prefix.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/path-prefix.js +30 -8
- package/node_modules/@openclaw/fs-safe/dist/path-scope-lexical.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/path-segment-route.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/path-suffix-aliases.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/path-suffix-aliases.js +25 -17
- package/node_modules/@openclaw/fs-safe/dist/path.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/path.js +19 -2
- package/node_modules/@openclaw/fs-safe/dist/permission-exec.d.ts +8 -1
- package/node_modules/@openclaw/fs-safe/dist/permission-exec.js +141 -21
- package/node_modules/@openclaw/fs-safe/dist/permissions-public.d.ts +3 -2
- package/node_modules/@openclaw/fs-safe/dist/permissions-public.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/permissions-windows.d.ts +5 -16
- package/node_modules/@openclaw/fs-safe/dist/permissions-windows.js +11 -31
- package/node_modules/@openclaw/fs-safe/dist/permissions.d.ts +3 -11
- package/node_modules/@openclaw/fs-safe/dist/permissions.js +11 -34
- package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-admission.d.ts +1 -3
- package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-admission.js +27 -31
- package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-observation.d.ts +7 -3
- package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-observation.js +81 -18
- package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-shared-route.d.ts +3 -9
- package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-shared-route.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/pinned-open.d.ts +2 -2
- package/node_modules/@openclaw/fs-safe/dist/pinned-open.js +9 -5
- package/node_modules/@openclaw/fs-safe/dist/pinned-operation.d.ts +1 -2
- package/node_modules/@openclaw/fs-safe/dist/pinned-operation.js +3 -16
- 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 +14 -21
- package/node_modules/@openclaw/fs-safe/dist/pinned-write.d.ts +0 -2
- package/node_modules/@openclaw/fs-safe/dist/pinned-write.js +43 -151
- package/node_modules/@openclaw/fs-safe/dist/positional-read.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/private-directory.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/private-directory.js +18 -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 +42 -5
- package/node_modules/@openclaw/fs-safe/dist/private-producer-handoff.js +166 -80
- package/node_modules/@openclaw/fs-safe/dist/private-temp-workspace.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/private-temp-workspace.js +56 -128
- package/node_modules/@openclaw/fs-safe/dist/publish-copy-stage.d.ts +3 -3
- package/node_modules/@openclaw/fs-safe/dist/publish-copy-stage.js +20 -7
- 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 +59 -100
- 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 +2 -6
- package/node_modules/@openclaw/fs-safe/dist/realpath.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/recursive-mkdir-path.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/regular-file.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/regular-file.js +111 -196
- package/node_modules/@openclaw/fs-safe/dist/replace-directory.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/replace-directory.js +245 -20
- package/node_modules/@openclaw/fs-safe/dist/replace-file-buffer.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-buffer.js +36 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-fallback.d.ts +4 -11
- package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-fallback.js +150 -117
- 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 +27 -33
- package/node_modules/@openclaw/fs-safe/dist/replace-file-descriptor.d.ts +7 -12
- package/node_modules/@openclaw/fs-safe/dist/replace-file-descriptor.js +25 -18
- package/node_modules/@openclaw/fs-safe/dist/replace-file-destination.d.ts +21 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-destination.js +123 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-mode.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/replace-file-mutation.d.ts +26 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-mutation.js +47 -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 +19 -24
- package/node_modules/@openclaw/fs-safe/dist/replace-file-temp-owner.js +126 -149
- package/node_modules/@openclaw/fs-safe/dist/replace-file-types.d.ts +55 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-types.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file.d.ts +3 -56
- package/node_modules/@openclaw/fs-safe/dist/replace-file.js +47 -31
- package/node_modules/@openclaw/fs-safe/dist/retained-directory-replacement.d.ts +26 -0
- package/node_modules/@openclaw/fs-safe/dist/retained-directory-replacement.js +193 -0
- package/node_modules/@openclaw/fs-safe/dist/retained-file-types.d.ts +50 -0
- package/node_modules/@openclaw/fs-safe/dist/retained-file-types.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/retained-file.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/retained-file.js +121 -0
- package/node_modules/@openclaw/fs-safe/dist/root-boundary.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/root-boundary.js +4 -0
- package/node_modules/@openclaw/fs-safe/dist/root-context.d.ts +0 -9
- package/node_modules/@openclaw/fs-safe/dist/root-context.js +6 -12
- package/node_modules/@openclaw/fs-safe/dist/root-create-input.d.ts +9 -3
- package/node_modules/@openclaw/fs-safe/dist/root-create-input.js +17 -4
- package/node_modules/@openclaw/fs-safe/dist/root-directory-creation.d.ts +4 -5
- package/node_modules/@openclaw/fs-safe/dist/root-directory-creation.js +20 -7
- package/node_modules/@openclaw/fs-safe/dist/root-directory-entry.d.ts +9 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory-entry.js +28 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory-list.d.ts +10 -2
- package/node_modules/@openclaw/fs-safe/dist/root-directory-list.js +105 -40
- package/node_modules/@openclaw/fs-safe/dist/root-directory.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-entries.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-entries.js +2 -2
- package/node_modules/@openclaw/fs-safe/dist/root-errors.d.ts +4 -1
- package/node_modules/@openclaw/fs-safe/dist/root-errors.js +5 -3
- package/node_modules/@openclaw/fs-safe/dist/root-file-final-admission.d.ts +2 -3
- package/node_modules/@openclaw/fs-safe/dist/root-file-final-admission.js +6 -8
- package/node_modules/@openclaw/fs-safe/dist/root-file.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-file.js +5 -7
- package/node_modules/@openclaw/fs-safe/dist/root-handle-context.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/root-handle-context.js +12 -0
- package/node_modules/@openclaw/fs-safe/dist/root-impl.d.ts +5 -18
- package/node_modules/@openclaw/fs-safe/dist/root-impl.js +239 -152
- package/node_modules/@openclaw/fs-safe/dist/root-move-noreplace.d.ts +4 -8
- package/node_modules/@openclaw/fs-safe/dist/root-move-noreplace.js +31 -28
- package/node_modules/@openclaw/fs-safe/dist/root-move-preflight.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-observed-path.d.ts +0 -2
- package/node_modules/@openclaw/fs-safe/dist/root-observed-path.js +2 -7
- package/node_modules/@openclaw/fs-safe/dist/root-options.d.ts +13 -6
- package/node_modules/@openclaw/fs-safe/dist/root-path-errors.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/root-path-errors.js +11 -2
- package/node_modules/@openclaw/fs-safe/dist/root-path-existing.d.ts +3 -1
- package/node_modules/@openclaw/fs-safe/dist/root-path-existing.js +45 -50
- package/node_modules/@openclaw/fs-safe/dist/root-path-observation.d.ts +4 -12
- package/node_modules/@openclaw/fs-safe/dist/root-path-stat.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-path-stat.js +61 -11
- package/node_modules/@openclaw/fs-safe/dist/root-path.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-path.js +64 -207
- package/node_modules/@openclaw/fs-safe/dist/root-paths-lexical.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-paths.d.ts +2 -7
- 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 +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-read-admission.js +31 -39
- package/node_modules/@openclaw/fs-safe/dist/root-remove-identity.d.ts +1 -4
- package/node_modules/@openclaw/fs-safe/dist/root-remove-identity.js +2 -4
- package/node_modules/@openclaw/fs-safe/dist/root-remove-receipt.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-remove.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/root-remove.js +21 -5
- package/node_modules/@openclaw/fs-safe/dist/root-symlink-policy.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-walk.d.ts +19 -13
- package/node_modules/@openclaw/fs-safe/dist/root-walk.js +67 -16
- package/node_modules/@openclaw/fs-safe/dist/root-write-admission.d.ts +1 -4
- package/node_modules/@openclaw/fs-safe/dist/root-write-admission.js +4 -27
- package/node_modules/@openclaw/fs-safe/dist/root-write-compatibility.d.ts +1 -3
- package/node_modules/@openclaw/fs-safe/dist/root-write-compatibility.js +17 -68
- package/node_modules/@openclaw/fs-safe/dist/root-write-complete-parent.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/root-write-complete-parent.js +13 -28
- 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 +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-write-publication.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-write-publication.js +1 -1
- 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 +29 -42
- package/node_modules/@openclaw/fs-safe/dist/root.d.ts +2 -7
- package/node_modules/@openclaw/fs-safe/dist/safe-path-segment.d.ts +2 -2
- package/node_modules/@openclaw/fs-safe/dist/safe-path-segment.js +9 -6
- package/node_modules/@openclaw/fs-safe/dist/secret-file.d.ts +6 -3
- package/node_modules/@openclaw/fs-safe/dist/secret-file.js +22 -58
- 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 +6 -27
- 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 +27 -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 +3 -3
- package/node_modules/@openclaw/fs-safe/dist/secure-file-windows.js +42 -149
- package/node_modules/@openclaw/fs-safe/dist/secure-file.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/secure-file.js +14 -13
- package/node_modules/@openclaw/fs-safe/dist/secure-temp-dir.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/secure-temp-dir.js +2 -7
- package/node_modules/@openclaw/fs-safe/dist/secure-temp-repair.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/secure-temp-repair.js +5 -1
- package/node_modules/@openclaw/fs-safe/dist/sibling-staged-file.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/sibling-staged-file.js +32 -39
- package/node_modules/@openclaw/fs-safe/dist/sibling-temp.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/sibling-temp.js +23 -12
- 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 +283 -220
- 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 +41 -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 +5 -9
- 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 -8
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-policy.js +23 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-reclaim.d.ts +12 -8
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-reclaim.js +101 -44
- 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 +2 -1
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-stale-admission.d.ts +34 -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 +52 -35
- package/node_modules/@openclaw/fs-safe/dist/staged-directory.d.ts +7 -5
- package/node_modules/@openclaw/fs-safe/dist/staged-directory.js +43 -7
- 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/staged-symlink-types.d.ts +39 -0
- package/node_modules/@openclaw/fs-safe/dist/staged-symlink-types.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/stat-observation.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/stat-observation.js +3 -10
- package/node_modules/@openclaw/fs-safe/dist/store.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/strict-file-identity.d.ts +3 -2
- package/node_modules/@openclaw/fs-safe/dist/strict-file-identity.js +14 -14
- 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 +58 -32
- package/node_modules/@openclaw/fs-safe/dist/temp-cleanup.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/temp-target.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/temp-target.js +14 -55
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-admission.d.ts +0 -8
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-admission.js +50 -37
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-child-admission.d.ts +16 -6
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-child-admission.js +70 -15
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-descriptor.d.ts +1 -7
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-descriptor.js +11 -33
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-owner.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-owner.js +53 -35
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-ownership.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-ownership.js +52 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-types.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/temp.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/test-hooks.d.ts +5 -2
- package/node_modules/@openclaw/fs-safe/dist/text-atomic.d.ts +2 -2
- package/node_modules/@openclaw/fs-safe/dist/text-atomic.js +3 -1
- package/node_modules/@openclaw/fs-safe/dist/timing.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/trash.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/trash.js +27 -1
- package/node_modules/@openclaw/fs-safe/dist/types.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/unicode-path.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/unicode-path.js +3 -0
- package/node_modules/@openclaw/fs-safe/dist/walk.d.ts +7 -7
- package/node_modules/@openclaw/fs-safe/dist/walk.js +23 -8
- package/node_modules/@openclaw/fs-safe/dist/watch-alias.d.ts +6 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-alias.js +88 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-hints.d.ts +9 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-hints.js +93 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-native.d.ts +36 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-native.js +73 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-scan.d.ts +28 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-scan.js +300 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-stream.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-stream.js +32 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-types.d.ts +60 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-types.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/watch.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/watch.js +530 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-command.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/windows-owner.d.ts +3 -8
- package/node_modules/@openclaw/fs-safe/dist/windows-owner.js +8 -5
- package/node_modules/@openclaw/fs-safe/dist/windows-path-alias.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/windows-path-alias.js +12 -43
- 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 +90 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-security-command.d.ts +33 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-security-command.js +414 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-security-facts.d.ts +9 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-security-facts.js +112 -0
- package/node_modules/@openclaw/fs-safe/dist/write-file-handle.d.ts +7 -1
- package/node_modules/@openclaw/fs-safe/dist/write-file-handle.js +23 -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 -8
- 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 +79 -6
- package/node_modules/@openclaw/fs-safe/docs/archive.md +154 -48
- package/node_modules/@openclaw/fs-safe/docs/atomic.md +218 -13
- package/node_modules/@openclaw/fs-safe/docs/config.md +6 -2
- package/node_modules/@openclaw/fs-safe/docs/contributing.md +150 -8
- package/node_modules/@openclaw/fs-safe/docs/copy.md +41 -0
- package/node_modules/@openclaw/fs-safe/docs/creation.md +132 -0
- package/node_modules/@openclaw/fs-safe/docs/durability.md +66 -0
- package/node_modules/@openclaw/fs-safe/docs/file-contents.md +68 -0
- package/node_modules/@openclaw/fs-safe/docs/file-store.md +24 -0
- package/node_modules/@openclaw/fs-safe/docs/guest.md +8 -2
- package/node_modules/@openclaw/fs-safe/docs/index.md +1 -0
- package/node_modules/@openclaw/fs-safe/docs/install.md +61 -7
- package/node_modules/@openclaw/fs-safe/docs/json-store.md +5 -0
- package/node_modules/@openclaw/fs-safe/docs/json.md +5 -4
- package/node_modules/@openclaw/fs-safe/docs/local-roots.md +2 -0
- 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 +11 -7
- package/node_modules/@openclaw/fs-safe/docs/native-helper.md +51 -15
- package/node_modules/@openclaw/fs-safe/docs/native.md +117 -15
- package/node_modules/@openclaw/fs-safe/docs/output.md +6 -0
- package/node_modules/@openclaw/fs-safe/docs/path-prefix.md +10 -0
- package/node_modules/@openclaw/fs-safe/docs/path-suffix-aliases.md +51 -6
- package/node_modules/@openclaw/fs-safe/docs/path.md +4 -4
- package/node_modules/@openclaw/fs-safe/docs/permissions.md +122 -14
- package/node_modules/@openclaw/fs-safe/docs/public-api.md +38 -5
- package/node_modules/@openclaw/fs-safe/docs/quickstart.md +1 -1
- package/node_modules/@openclaw/fs-safe/docs/reading.md +2 -2
- package/node_modules/@openclaw/fs-safe/docs/regular-file.md +3 -0
- package/node_modules/@openclaw/fs-safe/docs/retained-file.md +115 -0
- package/node_modules/@openclaw/fs-safe/docs/root.md +110 -12
- package/node_modules/@openclaw/fs-safe/docs/secret-file.md +38 -2
- package/node_modules/@openclaw/fs-safe/docs/secure-file.md +9 -4
- package/node_modules/@openclaw/fs-safe/docs/security-model.md +4 -1
- package/node_modules/@openclaw/fs-safe/docs/sidecar-lock.md +131 -9
- package/node_modules/@openclaw/fs-safe/docs/staged-file.md +16 -6
- package/node_modules/@openclaw/fs-safe/docs/staged-symlink.md +124 -0
- package/node_modules/@openclaw/fs-safe/docs/store.md +12 -2
- package/node_modules/@openclaw/fs-safe/docs/temp.md +56 -9
- package/node_modules/@openclaw/fs-safe/docs/testing.md +210 -0
- package/node_modules/@openclaw/fs-safe/docs/types.md +24 -2
- package/node_modules/@openclaw/fs-safe/docs/walk.md +108 -2
- package/node_modules/@openclaw/fs-safe/docs/watch.md +251 -0
- package/node_modules/@openclaw/fs-safe/docs/writing.md +126 -11
- package/node_modules/@openclaw/fs-safe/package.json +23 -17
- 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/p-limit/index.d.ts +2 -0
- package/node_modules/p-limit/index.js +17 -1
- package/node_modules/p-limit/package.json +1 -1
- package/node_modules/p-limit/readme.md +2 -0
- package/node_modules/zod/README.md +2 -2
- package/node_modules/zod/compile.cjs +19 -0
- package/node_modules/zod/index.cjs +19 -0
- package/node_modules/zod/locales/index.cjs +19 -0
- package/node_modules/zod/mini/index.cjs +19 -0
- package/node_modules/zod/package.json +8 -7
- package/node_modules/zod/src/v3/helpers/errorUtil.ts +1 -1
- package/node_modules/zod/src/v4/classic/external.ts +2 -0
- package/node_modules/zod/src/v4/classic/from-json-schema.ts +248 -25
- package/node_modules/zod/src/v4/classic/schemas.ts +243 -168
- package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +60 -9
- package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +6 -0
- package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +2 -2
- package/node_modules/zod/src/v4/classic/tests/cyclic-data.test.ts +265 -0
- package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +112 -6
- package/node_modules/zod/src/v4/classic/tests/enum.test.ts +9 -0
- package/node_modules/zod/src/v4/classic/tests/error.test.ts +130 -1
- package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +157 -0
- package/node_modules/zod/src/v4/classic/tests/iban.test.ts +81 -0
- package/node_modules/zod/src/v4/classic/tests/instance-footprint.test.ts +40 -2
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +27 -7
- package/node_modules/zod/src/v4/classic/tests/issue-schema.test.ts +88 -56
- package/node_modules/zod/src/v4/classic/tests/number.test.ts +39 -0
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +56 -0
- package/node_modules/zod/src/v4/classic/tests/optin-ladder.test.ts +3 -2
- package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +70 -0
- package/node_modules/zod/src/v4/classic/tests/properties.test.ts +141 -0
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +46 -1
- 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 +95 -1
- package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +33 -1
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +234 -38
- package/node_modules/zod/src/v4/classic/tests/validate.test.ts +569 -0
- package/node_modules/zod/src/v4/core/api.ts +44 -28
- package/node_modules/zod/src/v4/core/checks.ts +62 -102
- package/node_modules/zod/src/v4/core/compile.ts +218 -93
- package/node_modules/zod/src/v4/core/core.ts +1 -3
- package/node_modules/zod/src/v4/core/doc.ts +6 -2
- package/node_modules/zod/src/v4/core/errors.ts +3 -6
- package/node_modules/zod/src/v4/core/json-schema-generator.ts +2 -2
- package/node_modules/zod/src/v4/core/json-schema-processors.ts +185 -81
- package/node_modules/zod/src/v4/core/memoizer.ts +75 -28
- package/node_modules/zod/src/v4/core/parse.ts +37 -16
- package/node_modules/zod/src/v4/core/regexes.ts +14 -4
- package/node_modules/zod/src/v4/core/schemas.ts +296 -132
- 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 +35 -0
- package/node_modules/zod/src/v4/core/tests/compile-generative.test.ts +445 -0
- package/node_modules/zod/src/v4/core/tests/compile.test.ts +399 -2
- package/node_modules/zod/src/v4/core/tests/email-regex.test.ts +140 -0
- package/node_modules/zod/src/v4/core/tests/locales/tg.test.ts +85 -0
- package/node_modules/zod/src/v4/core/tests/polyfill-collision.test.ts +46 -0
- package/node_modules/zod/src/v4/core/tests/url-no-canparse.test.ts +118 -16
- package/node_modules/zod/src/v4/core/to-json-schema.ts +9 -7
- package/node_modules/zod/src/v4/core/util.ts +218 -147
- package/node_modules/zod/src/v4/core/versions.ts +2 -2
- package/node_modules/zod/src/v4/locales/ar.ts +2 -0
- package/node_modules/zod/src/v4/locales/az.ts +2 -0
- package/node_modules/zod/src/v4/locales/be.ts +2 -0
- package/node_modules/zod/src/v4/locales/bg.ts +2 -0
- package/node_modules/zod/src/v4/locales/bn.ts +2 -0
- package/node_modules/zod/src/v4/locales/ca.ts +2 -0
- package/node_modules/zod/src/v4/locales/ckb.ts +2 -0
- package/node_modules/zod/src/v4/locales/cs.ts +2 -0
- package/node_modules/zod/src/v4/locales/da.ts +2 -0
- package/node_modules/zod/src/v4/locales/de.ts +2 -0
- package/node_modules/zod/src/v4/locales/el.ts +2 -0
- package/node_modules/zod/src/v4/locales/en.ts +2 -0
- package/node_modules/zod/src/v4/locales/eo.ts +2 -0
- package/node_modules/zod/src/v4/locales/es.ts +2 -0
- package/node_modules/zod/src/v4/locales/fa.ts +2 -0
- package/node_modules/zod/src/v4/locales/fi.ts +2 -0
- package/node_modules/zod/src/v4/locales/fr-CA.ts +2 -0
- package/node_modules/zod/src/v4/locales/fr.ts +2 -0
- package/node_modules/zod/src/v4/locales/gu.ts +2 -0
- package/node_modules/zod/src/v4/locales/he.ts +2 -0
- package/node_modules/zod/src/v4/locales/hi.ts +2 -0
- package/node_modules/zod/src/v4/locales/hr.ts +2 -0
- package/node_modules/zod/src/v4/locales/hu.ts +2 -0
- package/node_modules/zod/src/v4/locales/hy.ts +2 -0
- package/node_modules/zod/src/v4/locales/id.ts +2 -0
- package/node_modules/zod/src/v4/locales/index.ts +1 -0
- package/node_modules/zod/src/v4/locales/is.ts +2 -0
- package/node_modules/zod/src/v4/locales/it.ts +2 -0
- package/node_modules/zod/src/v4/locales/ja.ts +2 -0
- package/node_modules/zod/src/v4/locales/ka.ts +2 -0
- package/node_modules/zod/src/v4/locales/km.ts +2 -0
- package/node_modules/zod/src/v4/locales/kn.ts +2 -0
- package/node_modules/zod/src/v4/locales/ko.ts +2 -0
- package/node_modules/zod/src/v4/locales/lt.ts +2 -0
- package/node_modules/zod/src/v4/locales/mk.ts +2 -0
- package/node_modules/zod/src/v4/locales/ms.ts +2 -0
- package/node_modules/zod/src/v4/locales/ne.ts +2 -0
- package/node_modules/zod/src/v4/locales/nl.ts +2 -0
- package/node_modules/zod/src/v4/locales/nn.ts +2 -0
- package/node_modules/zod/src/v4/locales/no.ts +2 -0
- package/node_modules/zod/src/v4/locales/ota.ts +2 -0
- package/node_modules/zod/src/v4/locales/pl.ts +2 -0
- package/node_modules/zod/src/v4/locales/ps.ts +2 -0
- package/node_modules/zod/src/v4/locales/pt-BR.ts +2 -0
- package/node_modules/zod/src/v4/locales/pt.ts +2 -0
- package/node_modules/zod/src/v4/locales/ro.ts +2 -0
- package/node_modules/zod/src/v4/locales/ru.ts +2 -0
- package/node_modules/zod/src/v4/locales/sk.ts +2 -0
- package/node_modules/zod/src/v4/locales/sl.ts +2 -0
- package/node_modules/zod/src/v4/locales/sv.ts +2 -0
- package/node_modules/zod/src/v4/locales/ta.ts +2 -0
- package/node_modules/zod/src/v4/locales/tg.ts +135 -0
- package/node_modules/zod/src/v4/locales/th.ts +2 -0
- package/node_modules/zod/src/v4/locales/tk.ts +2 -0
- package/node_modules/zod/src/v4/locales/tr.ts +2 -0
- package/node_modules/zod/src/v4/locales/uk.ts +2 -0
- package/node_modules/zod/src/v4/locales/ur.ts +2 -0
- package/node_modules/zod/src/v4/locales/uz.ts +2 -0
- package/node_modules/zod/src/v4/locales/vi.ts +2 -0
- package/node_modules/zod/src/v4/locales/yo.ts +2 -0
- package/node_modules/zod/src/v4/locales/zh-CN.ts +2 -0
- package/node_modules/zod/src/v4/locales/zh-TW.ts +2 -0
- package/node_modules/zod/src/v4/mini/external.ts +2 -0
- package/node_modules/zod/src/v4/mini/schemas.ts +32 -7
- package/node_modules/zod/src/v4/mini/tests/checks.test.ts +1 -1
- package/node_modules/zod/src/v4/mini/tests/computed.test.ts +11 -17
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +86 -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 +23 -0
- package/node_modules/zod/v3/ZodError.cjs +19 -0
- 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 +19 -0
- package/node_modules/zod/v4/classic/checks.cjs +19 -0
- 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/deep-partial.cjs +19 -0
- package/node_modules/zod/v4/classic/errors.cjs +19 -0
- package/node_modules/zod/v4/classic/external.cjs +22 -1
- package/node_modules/zod/v4/classic/external.d.cts +1 -1
- package/node_modules/zod/v4/classic/external.d.ts +1 -1
- package/node_modules/zod/v4/classic/external.js +1 -1
- package/node_modules/zod/v4/classic/from-json-schema.cjs +264 -24
- package/node_modules/zod/v4/classic/from-json-schema.js +245 -24
- package/node_modules/zod/v4/classic/in-out.cjs +19 -0
- package/node_modules/zod/v4/classic/index.cjs +19 -0
- package/node_modules/zod/v4/classic/iso.cjs +19 -0
- package/node_modules/zod/v4/classic/parse.cjs +19 -0
- package/node_modules/zod/v4/classic/schemas.cjs +100 -35
- package/node_modules/zod/v4/classic/schemas.d.cts +15 -1
- package/node_modules/zod/v4/classic/schemas.d.ts +15 -1
- package/node_modules/zod/v4/classic/schemas.js +77 -33
- package/node_modules/zod/v4/core/api.cjs +45 -22
- package/node_modules/zod/v4/core/api.d.cts +12 -6
- package/node_modules/zod/v4/core/api.d.ts +12 -6
- package/node_modules/zod/v4/core/api.js +25 -22
- package/node_modules/zod/v4/core/checks.cjs +51 -97
- package/node_modules/zod/v4/core/checks.d.cts +17 -1
- package/node_modules/zod/v4/core/checks.d.ts +17 -1
- package/node_modules/zod/v4/core/checks.js +31 -96
- package/node_modules/zod/v4/core/compile.cjs +173 -78
- package/node_modules/zod/v4/core/compile.d.cts +18 -4
- package/node_modules/zod/v4/core/compile.d.ts +18 -4
- package/node_modules/zod/v4/core/compile.js +154 -79
- package/node_modules/zod/v4/core/core.cjs +20 -1
- package/node_modules/zod/v4/core/core.js +1 -1
- package/node_modules/zod/v4/core/doc.cjs +26 -2
- package/node_modules/zod/v4/core/doc.js +7 -2
- package/node_modules/zod/v4/core/errors.cjs +21 -5
- package/node_modules/zod/v4/core/errors.js +2 -5
- package/node_modules/zod/v4/core/index.cjs +19 -0
- package/node_modules/zod/v4/core/json-schema-generator.cjs +20 -1
- package/node_modules/zod/v4/core/json-schema-generator.js +2 -2
- package/node_modules/zod/v4/core/json-schema-processors.cjs +188 -72
- 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 +170 -74
- package/node_modules/zod/v4/core/json-schema.cjs +19 -0
- package/node_modules/zod/v4/core/memoizer.cjs +111 -23
- package/node_modules/zod/v4/core/memoizer.js +69 -23
- package/node_modules/zod/v4/core/parse.cjs +56 -16
- package/node_modules/zod/v4/core/parse.js +37 -16
- package/node_modules/zod/v4/core/regexes.cjs +31 -6
- package/node_modules/zod/v4/core/regexes.d.cts +3 -0
- package/node_modules/zod/v4/core/regexes.d.ts +3 -0
- package/node_modules/zod/v4/core/regexes.js +10 -4
- package/node_modules/zod/v4/core/registries.cjs +19 -0
- package/node_modules/zod/v4/core/schemas.cjs +302 -114
- package/node_modules/zod/v4/core/schemas.d.cts +28 -8
- package/node_modules/zod/v4/core/schemas.d.ts +28 -8
- package/node_modules/zod/v4/core/schemas.js +279 -113
- package/node_modules/zod/v4/core/standard-schema.cjs +19 -0
- package/node_modules/zod/v4/core/to-json-schema.cjs +28 -7
- package/node_modules/zod/v4/core/to-json-schema.d.cts +4 -3
- package/node_modules/zod/v4/core/to-json-schema.d.ts +4 -3
- package/node_modules/zod/v4/core/to-json-schema.js +7 -6
- package/node_modules/zod/v4/core/util.cjs +177 -143
- package/node_modules/zod/v4/core/util.d.cts +25 -4
- package/node_modules/zod/v4/core/util.d.ts +25 -4
- package/node_modules/zod/v4/core/util.js +156 -143
- 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 +19 -0
- package/node_modules/zod/v4/index.cjs +19 -0
- package/node_modules/zod/v4/locales/ar.cjs +2 -0
- package/node_modules/zod/v4/locales/ar.js +2 -0
- package/node_modules/zod/v4/locales/az.cjs +2 -0
- package/node_modules/zod/v4/locales/az.js +2 -0
- package/node_modules/zod/v4/locales/be.cjs +2 -0
- package/node_modules/zod/v4/locales/be.js +2 -0
- package/node_modules/zod/v4/locales/bg.cjs +2 -0
- package/node_modules/zod/v4/locales/bg.js +2 -0
- package/node_modules/zod/v4/locales/bn.cjs +2 -0
- package/node_modules/zod/v4/locales/bn.js +2 -0
- package/node_modules/zod/v4/locales/ca.cjs +2 -0
- package/node_modules/zod/v4/locales/ca.js +2 -0
- package/node_modules/zod/v4/locales/ckb.cjs +2 -0
- package/node_modules/zod/v4/locales/ckb.js +2 -0
- package/node_modules/zod/v4/locales/cs.cjs +2 -0
- package/node_modules/zod/v4/locales/cs.js +2 -0
- package/node_modules/zod/v4/locales/da.cjs +2 -0
- package/node_modules/zod/v4/locales/da.js +2 -0
- package/node_modules/zod/v4/locales/de.cjs +2 -0
- package/node_modules/zod/v4/locales/de.js +2 -0
- package/node_modules/zod/v4/locales/el.cjs +2 -0
- package/node_modules/zod/v4/locales/el.js +2 -0
- package/node_modules/zod/v4/locales/en.cjs +2 -0
- package/node_modules/zod/v4/locales/en.js +2 -0
- package/node_modules/zod/v4/locales/eo.cjs +2 -0
- package/node_modules/zod/v4/locales/eo.js +2 -0
- package/node_modules/zod/v4/locales/es.cjs +2 -0
- package/node_modules/zod/v4/locales/es.js +2 -0
- package/node_modules/zod/v4/locales/fa.cjs +2 -0
- package/node_modules/zod/v4/locales/fa.js +2 -0
- package/node_modules/zod/v4/locales/fi.cjs +2 -0
- package/node_modules/zod/v4/locales/fi.js +2 -0
- package/node_modules/zod/v4/locales/fr-CA.cjs +2 -0
- package/node_modules/zod/v4/locales/fr-CA.js +2 -0
- package/node_modules/zod/v4/locales/fr.cjs +2 -0
- package/node_modules/zod/v4/locales/fr.js +2 -0
- package/node_modules/zod/v4/locales/gu.cjs +2 -0
- package/node_modules/zod/v4/locales/gu.js +2 -0
- package/node_modules/zod/v4/locales/he.cjs +2 -0
- package/node_modules/zod/v4/locales/he.js +2 -0
- package/node_modules/zod/v4/locales/hi.cjs +2 -0
- package/node_modules/zod/v4/locales/hi.js +2 -0
- package/node_modules/zod/v4/locales/hr.cjs +2 -0
- package/node_modules/zod/v4/locales/hr.js +2 -0
- package/node_modules/zod/v4/locales/hu.cjs +2 -0
- package/node_modules/zod/v4/locales/hu.js +2 -0
- package/node_modules/zod/v4/locales/hy.cjs +2 -0
- package/node_modules/zod/v4/locales/hy.js +2 -0
- package/node_modules/zod/v4/locales/id.cjs +2 -0
- package/node_modules/zod/v4/locales/id.js +2 -0
- package/node_modules/zod/v4/locales/index.cjs +22 -1
- package/node_modules/zod/v4/locales/index.d.cts +1 -0
- package/node_modules/zod/v4/locales/index.d.ts +1 -0
- package/node_modules/zod/v4/locales/index.js +1 -0
- package/node_modules/zod/v4/locales/is.cjs +2 -0
- package/node_modules/zod/v4/locales/is.js +2 -0
- package/node_modules/zod/v4/locales/it.cjs +2 -0
- package/node_modules/zod/v4/locales/it.js +2 -0
- package/node_modules/zod/v4/locales/ja.cjs +2 -0
- package/node_modules/zod/v4/locales/ja.js +2 -0
- package/node_modules/zod/v4/locales/ka.cjs +2 -0
- package/node_modules/zod/v4/locales/ka.js +2 -0
- package/node_modules/zod/v4/locales/km.cjs +2 -0
- package/node_modules/zod/v4/locales/km.js +2 -0
- package/node_modules/zod/v4/locales/kn.cjs +2 -0
- package/node_modules/zod/v4/locales/kn.js +2 -0
- package/node_modules/zod/v4/locales/ko.cjs +2 -0
- package/node_modules/zod/v4/locales/ko.js +2 -0
- package/node_modules/zod/v4/locales/lt.cjs +2 -0
- package/node_modules/zod/v4/locales/lt.js +2 -0
- package/node_modules/zod/v4/locales/mk.cjs +2 -0
- package/node_modules/zod/v4/locales/mk.js +2 -0
- package/node_modules/zod/v4/locales/ms.cjs +2 -0
- package/node_modules/zod/v4/locales/ms.js +2 -0
- package/node_modules/zod/v4/locales/ne.cjs +2 -0
- package/node_modules/zod/v4/locales/ne.js +2 -0
- package/node_modules/zod/v4/locales/nl.cjs +2 -0
- package/node_modules/zod/v4/locales/nl.js +2 -0
- package/node_modules/zod/v4/locales/nn.cjs +2 -0
- package/node_modules/zod/v4/locales/nn.js +2 -0
- package/node_modules/zod/v4/locales/no.cjs +2 -0
- package/node_modules/zod/v4/locales/no.js +2 -0
- package/node_modules/zod/v4/locales/ota.cjs +2 -0
- package/node_modules/zod/v4/locales/ota.js +2 -0
- package/node_modules/zod/v4/locales/pl.cjs +2 -0
- package/node_modules/zod/v4/locales/pl.js +2 -0
- package/node_modules/zod/v4/locales/ps.cjs +2 -0
- package/node_modules/zod/v4/locales/ps.js +2 -0
- package/node_modules/zod/v4/locales/pt-BR.cjs +2 -0
- package/node_modules/zod/v4/locales/pt-BR.js +2 -0
- package/node_modules/zod/v4/locales/pt.cjs +2 -0
- package/node_modules/zod/v4/locales/pt.js +2 -0
- package/node_modules/zod/v4/locales/ro.cjs +2 -0
- package/node_modules/zod/v4/locales/ro.js +2 -0
- package/node_modules/zod/v4/locales/ru.cjs +2 -0
- package/node_modules/zod/v4/locales/ru.js +2 -0
- package/node_modules/zod/v4/locales/sk.cjs +2 -0
- package/node_modules/zod/v4/locales/sk.js +2 -0
- package/node_modules/zod/v4/locales/sl.cjs +2 -0
- package/node_modules/zod/v4/locales/sl.js +2 -0
- package/node_modules/zod/v4/locales/sv.cjs +2 -0
- package/node_modules/zod/v4/locales/sv.js +2 -0
- package/node_modules/zod/v4/locales/ta.cjs +2 -0
- package/node_modules/zod/v4/locales/ta.js +2 -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 +2 -0
- package/node_modules/zod/v4/locales/th.js +2 -0
- package/node_modules/zod/v4/locales/tk.cjs +2 -0
- package/node_modules/zod/v4/locales/tk.js +2 -0
- package/node_modules/zod/v4/locales/tr.cjs +2 -0
- package/node_modules/zod/v4/locales/tr.js +2 -0
- package/node_modules/zod/v4/locales/uk.cjs +2 -0
- package/node_modules/zod/v4/locales/uk.js +2 -0
- package/node_modules/zod/v4/locales/ur.cjs +2 -0
- package/node_modules/zod/v4/locales/ur.js +2 -0
- package/node_modules/zod/v4/locales/uz.cjs +2 -0
- package/node_modules/zod/v4/locales/uz.js +2 -0
- package/node_modules/zod/v4/locales/vi.cjs +2 -0
- package/node_modules/zod/v4/locales/vi.js +2 -0
- package/node_modules/zod/v4/locales/yo.cjs +2 -0
- package/node_modules/zod/v4/locales/yo.js +2 -0
- package/node_modules/zod/v4/locales/zh-CN.cjs +2 -0
- package/node_modules/zod/v4/locales/zh-CN.js +2 -0
- package/node_modules/zod/v4/locales/zh-TW.cjs +2 -0
- package/node_modules/zod/v4/locales/zh-TW.js +2 -0
- package/node_modules/zod/v4/mini/checks.cjs +19 -0
- package/node_modules/zod/v4/mini/coerce.cjs +19 -0
- package/node_modules/zod/v4/mini/deep-partial.cjs +19 -0
- package/node_modules/zod/v4/mini/external.cjs +22 -1
- package/node_modules/zod/v4/mini/external.d.cts +1 -1
- package/node_modules/zod/v4/mini/external.d.ts +1 -1
- package/node_modules/zod/v4/mini/external.js +1 -1
- package/node_modules/zod/v4/mini/in-out.cjs +19 -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 +19 -0
- package/node_modules/zod/v4/mini/schemas.cjs +44 -8
- package/node_modules/zod/v4/mini/schemas.d.cts +6 -1
- package/node_modules/zod/v4/mini/schemas.d.ts +6 -1
- package/node_modules/zod/v4/mini/schemas.js +21 -6
- package/node_modules/zod/v4-mini/index.cjs +19 -0
- package/package.json +7 -7
- 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-durability.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 -21
- 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 -97
- package/node_modules/@openclaw/fs-safe/dist/archive-options.d.ts +0 -23
- 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 -62
- 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-loader.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-manifest.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/clone-metadata.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/copy-file-input.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/copy-policy.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/copy-publication.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/copy-tree-portable.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/copy.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/darwin-acl.d.ts +0 -4
- package/node_modules/@openclaw/fs-safe/dist/darwin-acl.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/darwin-acl.js +0 -24
- 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-entry-path.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 +0 -21
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-owner.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-owner.js +0 -78
- package/node_modules/@openclaw/fs-safe/dist/durability.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/effective-uid.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-handle-transfer.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-copy-source.d.ts +0 -5
- package/node_modules/@openclaw/fs-safe/dist/file-store-copy-source.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/file-store-copy-source.js +0 -31
- 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-path.d.ts +0 -3
- package/node_modules/@openclaw/fs-safe/dist/file-store-path.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/file-store-path.js +0 -30
- 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-directory.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/guest-dispatch-python.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/guest-native-python.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/guest.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-paths.d.ts +0 -11
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-paths.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-paths.js +0 -42
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-read.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-file-descriptor.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-stage.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/mutation-authority.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-directory-observation.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-parent-admission.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/overwrite-file-handle.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-case.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-prefix.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/path-scope-lexical.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/path-segment-route.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/path-suffix-aliases.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-mutation-admission.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-observation.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-shared-route.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-types.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/positional-read.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-producer-handoff.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-copy-stage.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/realpath.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/recursive-mkdir-path.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-mode.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-boundary.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-create-input.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-directory-creation.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-directory-list.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-directory.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-entries.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-final-admission.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-move-noreplace.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-move-preflight.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-observed-path.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-options.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-path-errors.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-observation.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-path-stat.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 -55
- package/node_modules/@openclaw/fs-safe/dist/root-path.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-paths-lexical.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-read-admission.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-remove-identity.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-remove-receipt.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-remove.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-symlink-policy.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-admission.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-write-compatibility.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-write-complete-parent.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-publication.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-windows.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/secure-temp-repair.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/standalone-publication-path.d.ts +0 -2
- package/node_modules/@openclaw/fs-safe/dist/standalone-publication-path.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/standalone-publication-path.js +0 -6
- package/node_modules/@openclaw/fs-safe/dist/stat-observation.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-admission.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-child-admission.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-descriptor.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-identity.d.ts +0 -15
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-identity.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-identity.js +0 -41
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-owner.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-permissions.d.ts +0 -4
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-permissions.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-permissions.js +0 -32
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-types.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/unicode-path.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/windows-path-alias.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/write-file-handle.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/@openclaw/fs-safe/dist/{archive-options.js → owner-dacl-batch-worker.d.ts} +0 -0
|
@@ -2,139 +2,134 @@ import syncFs, {} from "node:fs";
|
|
|
2
2
|
import fs, {} from "node:fs/promises";
|
|
3
3
|
import { readBoundedAsync, readBoundedSync } from "./bounded-read.js";
|
|
4
4
|
import { FsSafeError } from "./errors.js";
|
|
5
|
-
import {
|
|
5
|
+
import { inspectFileIdentity, inspectFileIdentitySync } from "./strict-file-identity.js";
|
|
6
6
|
import { readOwnedCopySource, readOwnedCopySourceSync } from "./replace-file-copy-source.js";
|
|
7
7
|
import { resolveReadOpenFlags } from "./read-open-flags.js";
|
|
8
|
+
import { hasErrorCode } from "./file-cleanup.js";
|
|
9
|
+
import { writeAtomicDestination, writeAtomicDestinationSync } from "./replace-file-buffer.js";
|
|
10
|
+
import { AtomicMutation } from "./replace-file-mutation.js";
|
|
11
|
+
import { captureAtomicDestination, captureAtomicDestinationSync } from "./replace-file-destination.js";
|
|
8
12
|
const SUPPORTS_NOFOLLOW = process.platform !== "win32" && "O_NOFOLLOW" in syncFs.constants;
|
|
9
13
|
const NOFOLLOW = SUPPORTS_NOFOLLOW ? syncFs.constants.O_NOFOLLOW : 0;
|
|
10
14
|
const OPEN_READ_FLAGS = resolveReadOpenFlags();
|
|
11
15
|
const OPEN_READ_WRITE_FLAGS = syncFs.constants.O_RDWR | NOFOLLOW;
|
|
12
16
|
const OPEN_WRITE_EXCLUSIVE_FLAGS = syncFs.constants.O_WRONLY | syncFs.constants.O_CREAT | syncFs.constants.O_EXCL | NOFOLLOW;
|
|
13
|
-
function
|
|
14
|
-
|
|
17
|
+
function closeSyncAfterAdmissionFailure(fsModule, fd, error) {
|
|
18
|
+
try {
|
|
19
|
+
fsModule.closeSync(fd);
|
|
20
|
+
}
|
|
21
|
+
catch {
|
|
22
|
+
// Preserve the already-selected admission failure.
|
|
23
|
+
}
|
|
24
|
+
throw error;
|
|
15
25
|
}
|
|
16
|
-
function
|
|
17
|
-
if (
|
|
26
|
+
function admitDestinationKind(pathname, opened, dest, admission) {
|
|
27
|
+
if (admission === "hardlinks") {
|
|
28
|
+
if (pathname.isSymbolicLink() || !pathname.isFile()) {
|
|
29
|
+
throw new FsSafeError("path-mismatch", `Atomic replace destination changed while opening: ${dest}`);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
else if (pathname.isSymbolicLink()) {
|
|
18
33
|
throw new FsSafeError("symlink", `Refusing copy fallback through symlink destination: ${dest}`);
|
|
19
34
|
}
|
|
20
|
-
if (!pathname.isFile() || !opened.isFile()) {
|
|
35
|
+
else if (!pathname.isFile() || !opened.isFile()) {
|
|
21
36
|
throw new FsSafeError("not-file", `Copy fallback destination must be a regular file: ${dest}`);
|
|
22
37
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
if (hardlinks === "reject" && opened.nlink >
|
|
27
|
-
throw new FsSafeError("hardlink", `Hardlinked copy fallback destination not allowed: ${dest}`);
|
|
38
|
+
return pathname;
|
|
39
|
+
}
|
|
40
|
+
function assertDestinationLinks(opened, dest, admission, hardlinks) {
|
|
41
|
+
if ((admission === "hardlinks" || hardlinks === "reject") && opened.nlink > 1n) {
|
|
42
|
+
throw new FsSafeError("hardlink", `Hardlinked ${admission === "hardlinks" ? "atomic replace" : "copy fallback"} destination not allowed: ${dest}`);
|
|
28
43
|
}
|
|
29
44
|
}
|
|
30
|
-
|
|
45
|
+
function inspectPinnedDestinationSync(fsModule, fd, dest, admission, hardlinks) {
|
|
46
|
+
const opened = inspectFileIdentitySync(() => fsModule.fstatSync(fd, { bigint: true }));
|
|
47
|
+
inspectFileIdentitySync(() => admitDestinationKind(fsModule.lstatSync(dest, { bigint: true }), opened, dest, admission), opened);
|
|
48
|
+
assertDestinationLinks(opened, dest, admission, hardlinks);
|
|
49
|
+
}
|
|
50
|
+
async function openPinnedDestination(fsModule, dest, admission, hardlinks, mutation) {
|
|
31
51
|
let preview;
|
|
32
52
|
try {
|
|
33
53
|
preview = fsModule === fs ? syncFs.lstatSync(dest) : await fsModule.lstat(dest);
|
|
34
54
|
}
|
|
35
55
|
catch (error) {
|
|
36
|
-
if (
|
|
56
|
+
if (hasErrorCode(error, "ENOENT"))
|
|
37
57
|
return null;
|
|
38
58
|
throw error;
|
|
39
59
|
}
|
|
40
60
|
if (!preview)
|
|
41
61
|
return null;
|
|
42
|
-
if (preview.isSymbolicLink())
|
|
62
|
+
if (admission === "hardlinks" && (preview.isSymbolicLink() || !preview.isFile()))
|
|
63
|
+
return null;
|
|
64
|
+
if (admission === "restore" && preview.isSymbolicLink()) {
|
|
43
65
|
throw new FsSafeError("symlink", `Refusing copy fallback through symlink destination: ${dest}`);
|
|
44
66
|
}
|
|
45
|
-
|
|
67
|
+
mutation?.assert();
|
|
68
|
+
const handle = await fsModule.open(dest, admission === "restore" ? OPEN_READ_WRITE_FLAGS : OPEN_READ_FLAGS);
|
|
46
69
|
try {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
70
|
+
if (fsModule === fs)
|
|
71
|
+
inspectPinnedDestinationSync(syncFs, handle.fd, dest, admission, hardlinks);
|
|
72
|
+
else {
|
|
73
|
+
const opened = await inspectFileIdentity(() => handle.stat({ bigint: true }));
|
|
74
|
+
await inspectFileIdentity(async () => admitDestinationKind(await fsModule.lstat(dest, { bigint: true }), opened, dest, admission), opened);
|
|
75
|
+
assertDestinationLinks(opened, dest, admission, hardlinks);
|
|
76
|
+
}
|
|
77
|
+
return handle;
|
|
51
78
|
}
|
|
52
79
|
catch (error) {
|
|
53
|
-
|
|
80
|
+
try {
|
|
81
|
+
await handle.close();
|
|
82
|
+
}
|
|
83
|
+
catch {
|
|
84
|
+
// Preserve the already-selected admission failure.
|
|
85
|
+
}
|
|
54
86
|
throw error;
|
|
55
87
|
}
|
|
56
88
|
}
|
|
57
|
-
function openPinnedDestinationSync(fsModule, dest, hardlinks) {
|
|
89
|
+
function openPinnedDestinationSync(fsModule, dest, admission, hardlinks, mutation) {
|
|
58
90
|
let preview;
|
|
59
91
|
try {
|
|
60
92
|
preview = fsModule.lstatSync(dest);
|
|
61
93
|
}
|
|
62
94
|
catch (error) {
|
|
63
|
-
if (
|
|
95
|
+
if (hasErrorCode(error, "ENOENT"))
|
|
64
96
|
return null;
|
|
65
97
|
throw error;
|
|
66
98
|
}
|
|
67
|
-
if (preview.isSymbolicLink())
|
|
99
|
+
if (admission === "hardlinks" && (preview.isSymbolicLink() || !preview.isFile()))
|
|
100
|
+
return null;
|
|
101
|
+
if (admission === "restore" && preview.isSymbolicLink()) {
|
|
68
102
|
throw new FsSafeError("symlink", `Refusing copy fallback through symlink destination: ${dest}`);
|
|
69
103
|
}
|
|
70
|
-
|
|
104
|
+
mutation?.assert();
|
|
105
|
+
const fd = fsModule.openSync(dest, admission === "restore" ? OPEN_READ_WRITE_FLAGS : OPEN_READ_FLAGS);
|
|
71
106
|
try {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
return { fd, stat: opened };
|
|
107
|
+
inspectPinnedDestinationSync(fsModule, fd, dest, admission, hardlinks);
|
|
108
|
+
return fd;
|
|
75
109
|
}
|
|
76
110
|
catch (error) {
|
|
77
|
-
fsModule
|
|
78
|
-
throw error;
|
|
111
|
+
closeSyncAfterAdmissionFailure(fsModule, fd, error);
|
|
79
112
|
}
|
|
80
113
|
}
|
|
81
114
|
export async function assertDestinationHardlinkPolicy(fsModule, dest, policy) {
|
|
82
115
|
if (policy !== "reject")
|
|
83
116
|
return;
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
preview = fsModule === fs ? syncFs.lstatSync(dest) : await fsModule.lstat(dest);
|
|
87
|
-
}
|
|
88
|
-
catch (error) {
|
|
89
|
-
if (notFound(error))
|
|
90
|
-
return;
|
|
91
|
-
throw error;
|
|
92
|
-
}
|
|
93
|
-
if (!preview || preview.isSymbolicLink() || !preview.isFile())
|
|
117
|
+
const handle = await openPinnedDestination(fsModule, dest, "hardlinks");
|
|
118
|
+
if (!handle)
|
|
94
119
|
return;
|
|
95
|
-
const handle = await fsModule.open(dest, OPEN_READ_FLAGS);
|
|
96
120
|
try {
|
|
97
|
-
|
|
98
|
-
const current = fsModule === fs ? syncFs.lstatSync(dest) : await fsModule.lstat(dest);
|
|
99
|
-
if (current.isSymbolicLink() || !current.isFile() || !sameFileIdentity(current, opened)) {
|
|
100
|
-
throw new FsSafeError("path-mismatch", `Atomic replace destination changed while opening: ${dest}`);
|
|
101
|
-
}
|
|
102
|
-
if (opened.nlink > 1) {
|
|
103
|
-
throw new FsSafeError("hardlink", `Hardlinked atomic replace destination not allowed: ${dest}`);
|
|
104
|
-
}
|
|
121
|
+
await handle.close();
|
|
105
122
|
}
|
|
106
|
-
|
|
107
|
-
|
|
123
|
+
catch {
|
|
124
|
+
// The asynchronous admission pin has best-effort close semantics.
|
|
108
125
|
}
|
|
109
126
|
}
|
|
110
127
|
export function assertDestinationHardlinkPolicySync(fsModule, dest, policy) {
|
|
111
128
|
if (policy !== "reject")
|
|
112
129
|
return;
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
preview = fsModule.lstatSync(dest);
|
|
116
|
-
}
|
|
117
|
-
catch (error) {
|
|
118
|
-
if (notFound(error))
|
|
119
|
-
return;
|
|
120
|
-
throw error;
|
|
121
|
-
}
|
|
122
|
-
if (preview.isSymbolicLink() || !preview.isFile())
|
|
123
|
-
return;
|
|
124
|
-
const fd = fsModule.openSync(dest, OPEN_READ_FLAGS);
|
|
125
|
-
try {
|
|
126
|
-
const opened = fsModule.fstatSync(fd);
|
|
127
|
-
const current = fsModule.lstatSync(dest);
|
|
128
|
-
if (current.isSymbolicLink() || !current.isFile() || !sameFileIdentity(current, opened)) {
|
|
129
|
-
throw new FsSafeError("path-mismatch", `Atomic replace destination changed while opening: ${dest}`);
|
|
130
|
-
}
|
|
131
|
-
if (opened.nlink > 1) {
|
|
132
|
-
throw new FsSafeError("hardlink", `Hardlinked atomic replace destination not allowed: ${dest}`);
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
finally {
|
|
130
|
+
const fd = openPinnedDestinationSync(fsModule, dest, "hardlinks");
|
|
131
|
+
if (fd !== null)
|
|
136
132
|
fsModule.closeSync(fd);
|
|
137
|
-
}
|
|
138
133
|
}
|
|
139
134
|
function restoreReadOptions(stat, maxBytes) {
|
|
140
135
|
return {
|
|
@@ -158,55 +153,39 @@ function readRestoreSnapshotSync(fsModule, fd, maxBytes, stat) {
|
|
|
158
153
|
return bytesRead;
|
|
159
154
|
}, restoreReadOptions(stat, maxBytes));
|
|
160
155
|
}
|
|
161
|
-
async function writeAll(handle, data) {
|
|
162
|
-
await handle.truncate(0);
|
|
163
|
-
let written = 0;
|
|
164
|
-
while (written < data.length) {
|
|
165
|
-
const result = await handle.write(data, written, data.length - written, written);
|
|
166
|
-
if (result.bytesWritten === 0)
|
|
167
|
-
throw new Error("Copy fallback write made no progress");
|
|
168
|
-
written += result.bytesWritten;
|
|
169
|
-
}
|
|
170
|
-
await handle.truncate(data.length);
|
|
171
|
-
}
|
|
172
|
-
function writeAllSync(fsModule, fd, data) {
|
|
173
|
-
fsModule.ftruncateSync(fd, 0);
|
|
174
|
-
let written = 0;
|
|
175
|
-
while (written < data.length) {
|
|
176
|
-
const bytesWritten = fsModule.writeSync(fd, data, written, data.length - written, written);
|
|
177
|
-
if (bytesWritten === 0)
|
|
178
|
-
throw new Error("Copy fallback write made no progress");
|
|
179
|
-
written += bytesWritten;
|
|
180
|
-
}
|
|
181
|
-
fsModule.ftruncateSync(fd, data.length);
|
|
182
|
-
}
|
|
183
156
|
function restoreFailure(writeError, cleanup, restoreError) {
|
|
184
157
|
const primary = writeError instanceof Error ? writeError : new Error(String(writeError));
|
|
185
158
|
const details = { cleanup };
|
|
186
|
-
const cause =
|
|
159
|
+
const cause = cleanup === "restore-failed"
|
|
187
160
|
? new AggregateError([primary, restoreError], "copy fallback and original restoration both failed")
|
|
188
161
|
: primary;
|
|
189
162
|
return new FsSafeError("helper-failed", cleanup === "restored"
|
|
190
163
|
? `Atomic copy fallback failed; original destination restored: ${primary.message}`
|
|
191
164
|
: `Atomic copy fallback failed and original restoration failed: ${primary.message}`, { cause, details });
|
|
192
165
|
}
|
|
193
|
-
async function replacePinnedWithRestore(fsModule, handle, replacement, maxRestoreBytes, replacementMode) {
|
|
166
|
+
async function replacePinnedWithRestore(fsModule, handle, replacement, maxRestoreBytes, replacementMode, destination, mutation) {
|
|
194
167
|
const originalStat = fsModule === fs ? syncFs.fstatSync(handle.fd) : await handle.stat();
|
|
195
168
|
const originalMode = originalStat.mode;
|
|
196
169
|
const original = await readRestoreSnapshot(handle, maxRestoreBytes, originalStat);
|
|
197
170
|
try {
|
|
198
|
-
await
|
|
171
|
+
await writeAtomicDestination(handle, replacement, destination?.beforeWrite, destination?.assertBeforeMutation, destination?.writing);
|
|
172
|
+
if (destination)
|
|
173
|
+
await destination.verify();
|
|
199
174
|
await handle.chmod(replacementMode);
|
|
200
175
|
await handle.sync();
|
|
201
176
|
}
|
|
202
177
|
catch (writeError) {
|
|
178
|
+
mutation.rethrowRefusal();
|
|
203
179
|
try {
|
|
204
|
-
await
|
|
180
|
+
await writeAtomicDestination(handle, original, destination?.beforeRestore, destination?.assertBeforeMutation, destination?.writing);
|
|
181
|
+
if (destination)
|
|
182
|
+
await destination.verifyRestore();
|
|
205
183
|
await handle.chmod(originalMode);
|
|
206
184
|
await handle.sync();
|
|
207
185
|
throw restoreFailure(writeError, "restored");
|
|
208
186
|
}
|
|
209
187
|
catch (restoreError) {
|
|
188
|
+
mutation.rethrowRefusal();
|
|
210
189
|
if (restoreError instanceof FsSafeError && restoreError.details?.cleanup === "restored") {
|
|
211
190
|
throw restoreError;
|
|
212
191
|
}
|
|
@@ -214,23 +193,27 @@ async function replacePinnedWithRestore(fsModule, handle, replacement, maxRestor
|
|
|
214
193
|
}
|
|
215
194
|
}
|
|
216
195
|
}
|
|
217
|
-
function replacePinnedWithRestoreSync(fsModule, fd, replacement, maxRestoreBytes, replacementMode, fchmodSync) {
|
|
196
|
+
function replacePinnedWithRestoreSync(fsModule, fd, replacement, maxRestoreBytes, replacementMode, fchmodSync, destination, mutation) {
|
|
218
197
|
const originalStat = fsModule.fstatSync(fd);
|
|
219
198
|
const originalMode = originalStat.mode;
|
|
220
199
|
const original = readRestoreSnapshotSync(fsModule, fd, maxRestoreBytes, originalStat);
|
|
221
200
|
try {
|
|
222
|
-
|
|
201
|
+
writeAtomicDestinationSync(fsModule, fd, replacement, destination?.beforeWrite, destination?.writing);
|
|
202
|
+
destination?.verify();
|
|
223
203
|
fchmodSync?.(fd, replacementMode);
|
|
224
204
|
fsModule.fsyncSync(fd);
|
|
225
205
|
}
|
|
226
206
|
catch (writeError) {
|
|
207
|
+
mutation?.rethrowRefusal();
|
|
227
208
|
try {
|
|
228
|
-
|
|
209
|
+
writeAtomicDestinationSync(fsModule, fd, original, destination?.beforeRestore, destination?.writing);
|
|
210
|
+
destination?.verifyRestore();
|
|
229
211
|
fchmodSync?.(fd, originalMode);
|
|
230
212
|
fsModule.fsyncSync(fd);
|
|
231
213
|
throw restoreFailure(writeError, "restored");
|
|
232
214
|
}
|
|
233
215
|
catch (restoreError) {
|
|
216
|
+
mutation?.rethrowRefusal();
|
|
234
217
|
if (restoreError instanceof FsSafeError && restoreError.details?.cleanup === "restored") {
|
|
235
218
|
throw restoreError;
|
|
236
219
|
}
|
|
@@ -239,6 +222,7 @@ function replacePinnedWithRestoreSync(fsModule, fd, replacement, maxRestoreBytes
|
|
|
239
222
|
}
|
|
240
223
|
}
|
|
241
224
|
export async function copyFallbackReplace(params) {
|
|
225
|
+
const mutation = params.mutation ?? new AtomicMutation({});
|
|
242
226
|
const source = await readOwnedCopySource({
|
|
243
227
|
fsModule: params.fsModule,
|
|
244
228
|
src: params.src,
|
|
@@ -246,12 +230,17 @@ export async function copyFallbackReplace(params) {
|
|
|
246
230
|
});
|
|
247
231
|
const { replacement } = source;
|
|
248
232
|
let destHandle = null;
|
|
233
|
+
let closeRequiredForSuccess = false;
|
|
234
|
+
let completed = false;
|
|
235
|
+
let destination;
|
|
249
236
|
try {
|
|
250
237
|
if (params.restore === "restore-original") {
|
|
251
|
-
const pinned = await openPinnedDestination(params.fsModule, params.dest, params.destinationHardlinks);
|
|
238
|
+
const pinned = await openPinnedDestination(params.fsModule, params.dest, "restore", params.destinationHardlinks, mutation);
|
|
252
239
|
if (pinned) {
|
|
253
|
-
destHandle = pinned
|
|
254
|
-
|
|
240
|
+
destHandle = pinned;
|
|
241
|
+
if (mutation.active)
|
|
242
|
+
destination = await captureAtomicDestination(params.fsModule, pinned, params.dest, mutation, params.destinationHardlinks === "reject");
|
|
243
|
+
await replacePinnedWithRestore(params.fsModule, destHandle, replacement, params.maxRestoreBytes, source.mode, destination, mutation);
|
|
255
244
|
}
|
|
256
245
|
}
|
|
257
246
|
if (!destHandle) {
|
|
@@ -261,7 +250,7 @@ export async function copyFallbackReplace(params) {
|
|
|
261
250
|
? syncFs.lstatSync(params.dest) : await params.fsModule.lstat(params.dest);
|
|
262
251
|
}
|
|
263
252
|
catch (error) {
|
|
264
|
-
if (!
|
|
253
|
+
if (!hasErrorCode(error, "ENOENT"))
|
|
265
254
|
throw error;
|
|
266
255
|
}
|
|
267
256
|
if (destStat?.isSymbolicLink()) {
|
|
@@ -269,21 +258,47 @@ export async function copyFallbackReplace(params) {
|
|
|
269
258
|
}
|
|
270
259
|
if (destStat) {
|
|
271
260
|
await assertDestinationHardlinkPolicy(params.fsModule, params.dest, params.destinationHardlinks);
|
|
261
|
+
mutation.assert();
|
|
272
262
|
await params.fsModule.rm(params.dest, { force: true });
|
|
263
|
+
mutation.removed(params.dest);
|
|
273
264
|
}
|
|
265
|
+
mutation.assert();
|
|
274
266
|
destHandle = await params.fsModule.open(params.dest, OPEN_WRITE_EXCLUSIVE_FLAGS, source.mode & 0o777);
|
|
275
|
-
|
|
267
|
+
if (mutation.active) {
|
|
268
|
+
destination = await captureAtomicDestination(params.fsModule, destHandle, params.dest, mutation, params.destinationHardlinks === "reject");
|
|
269
|
+
destination.writing();
|
|
270
|
+
await writeAtomicDestination(destHandle, replacement, destination.beforeWrite, destination.assertBeforeMutation);
|
|
271
|
+
await destination.verify();
|
|
272
|
+
}
|
|
273
|
+
else {
|
|
274
|
+
await destHandle.writeFile(replacement);
|
|
275
|
+
}
|
|
276
276
|
await destHandle.chmod(source.mode);
|
|
277
277
|
if (params.sync) {
|
|
278
278
|
await destHandle.sync();
|
|
279
279
|
}
|
|
280
|
+
closeRequiredForSuccess = !params.sync;
|
|
280
281
|
}
|
|
282
|
+
if (destination)
|
|
283
|
+
await destination.verify();
|
|
284
|
+
destination?.published();
|
|
285
|
+
completed = true;
|
|
281
286
|
}
|
|
282
287
|
finally {
|
|
283
|
-
|
|
288
|
+
if (destHandle) {
|
|
289
|
+
try {
|
|
290
|
+
await destHandle.close();
|
|
291
|
+
}
|
|
292
|
+
catch (closeError) {
|
|
293
|
+
if (closeRequiredForSuccess && completed) {
|
|
294
|
+
throw closeError;
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
}
|
|
284
298
|
}
|
|
285
299
|
}
|
|
286
300
|
export function copyFallbackReplaceSync(params) {
|
|
301
|
+
const mutation = params.mutation ?? new AtomicMutation({});
|
|
287
302
|
const source = readOwnedCopySourceSync({
|
|
288
303
|
fsModule: params.fsModule,
|
|
289
304
|
src: params.src,
|
|
@@ -291,12 +306,17 @@ export function copyFallbackReplaceSync(params) {
|
|
|
291
306
|
});
|
|
292
307
|
const { replacement } = source;
|
|
293
308
|
let destFd;
|
|
309
|
+
let closeRequiredForSuccess = false;
|
|
310
|
+
let completed = false;
|
|
311
|
+
let destination;
|
|
294
312
|
try {
|
|
295
313
|
if (params.restore === "restore-original") {
|
|
296
|
-
const pinned = openPinnedDestinationSync(params.fsModule, params.dest, params.destinationHardlinks);
|
|
297
|
-
if (pinned) {
|
|
298
|
-
destFd = pinned
|
|
299
|
-
|
|
314
|
+
const pinned = openPinnedDestinationSync(params.fsModule, params.dest, "restore", params.destinationHardlinks, mutation);
|
|
315
|
+
if (pinned !== null) {
|
|
316
|
+
destFd = pinned;
|
|
317
|
+
if (mutation.active)
|
|
318
|
+
destination = captureAtomicDestinationSync(params.fsModule, pinned, params.dest, mutation, params.destinationHardlinks === "reject");
|
|
319
|
+
replacePinnedWithRestoreSync(params.fsModule, destFd, replacement, params.maxRestoreBytes, source.mode, params.fchmodSync, destination, mutation);
|
|
300
320
|
}
|
|
301
321
|
}
|
|
302
322
|
if (destFd === undefined) {
|
|
@@ -305,7 +325,7 @@ export function copyFallbackReplaceSync(params) {
|
|
|
305
325
|
destStat = params.fsModule.lstatSync(params.dest);
|
|
306
326
|
}
|
|
307
327
|
catch (error) {
|
|
308
|
-
if (!
|
|
328
|
+
if (!hasErrorCode(error, "ENOENT"))
|
|
309
329
|
throw error;
|
|
310
330
|
}
|
|
311
331
|
if (destStat?.isSymbolicLink()) {
|
|
@@ -313,23 +333,36 @@ export function copyFallbackReplaceSync(params) {
|
|
|
313
333
|
}
|
|
314
334
|
if (destStat) {
|
|
315
335
|
assertDestinationHardlinkPolicySync(params.fsModule, params.dest, params.destinationHardlinks);
|
|
336
|
+
mutation.assert();
|
|
316
337
|
params.fsModule.rmSync(params.dest, { force: true });
|
|
338
|
+
mutation.removed(params.dest);
|
|
317
339
|
}
|
|
340
|
+
mutation.assert();
|
|
318
341
|
destFd = params.fsModule.openSync(params.dest, OPEN_WRITE_EXCLUSIVE_FLAGS, source.mode & 0o777);
|
|
319
|
-
|
|
342
|
+
if (mutation.active)
|
|
343
|
+
destination = captureAtomicDestinationSync(params.fsModule, destFd, params.dest, mutation, params.destinationHardlinks === "reject");
|
|
344
|
+
destination?.writing();
|
|
345
|
+
writeAtomicDestinationSync(params.fsModule, destFd, replacement, destination?.beforeWrite);
|
|
346
|
+
destination?.verify();
|
|
320
347
|
params.fchmodSync?.(destFd, source.mode);
|
|
321
348
|
if (params.sync) {
|
|
322
349
|
params.fsModule.fsyncSync(destFd);
|
|
323
350
|
}
|
|
351
|
+
closeRequiredForSuccess = !params.sync;
|
|
324
352
|
}
|
|
353
|
+
destination?.verify();
|
|
354
|
+
destination?.published();
|
|
355
|
+
completed = true;
|
|
325
356
|
}
|
|
326
357
|
finally {
|
|
327
358
|
if (destFd !== undefined) {
|
|
328
359
|
try {
|
|
329
360
|
params.fsModule.closeSync(destFd);
|
|
330
361
|
}
|
|
331
|
-
catch {
|
|
332
|
-
|
|
362
|
+
catch (closeError) {
|
|
363
|
+
if (closeRequiredForSuccess && completed) {
|
|
364
|
+
throw closeError;
|
|
365
|
+
}
|
|
333
366
|
}
|
|
334
367
|
}
|
|
335
368
|
}
|
|
@@ -3,8 +3,8 @@ import fs, {} from "node:fs/promises";
|
|
|
3
3
|
import { readBoundedSync } from "./bounded-read.js";
|
|
4
4
|
import { resolveReadOpenFlags } from "./read-open-flags.js";
|
|
5
5
|
import { FsSafeError } from "./errors.js";
|
|
6
|
-
import { sameFileIdentity } from "./file-identity.js";
|
|
7
6
|
import { inspectFileIdentity, inspectFileIdentitySync } from "./strict-file-identity.js";
|
|
7
|
+
import { hasErrorCode } from "./file-cleanup.js";
|
|
8
8
|
const OPEN_READ_FLAGS = resolveReadOpenFlags();
|
|
9
9
|
function assertSourcePreview(source, src) {
|
|
10
10
|
if (source.isSymbolicLink()) {
|
|
@@ -17,6 +17,14 @@ function assertSourcePreview(source, src) {
|
|
|
17
17
|
throw new FsSafeError("hardlink", `Hardlinked copy fallback source not allowed: ${src}`);
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
+
function assertOpenedSource(opened, current, src) {
|
|
21
|
+
if (!opened.isFile() || current.isSymbolicLink()) {
|
|
22
|
+
throw new FsSafeError("path-mismatch", `Copy fallback source changed while opening: ${src}`);
|
|
23
|
+
}
|
|
24
|
+
if (opened.nlink !== 1n) {
|
|
25
|
+
throw new FsSafeError("hardlink", `Hardlinked copy fallback source not allowed: ${src}`);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
20
28
|
function sourceSymlinkError(src, cause) {
|
|
21
29
|
return new FsSafeError("symlink", `Refusing copy fallback from non-file source: ${src}`, {
|
|
22
30
|
cause,
|
|
@@ -27,7 +35,7 @@ async function openSource(fsModule, src) {
|
|
|
27
35
|
return await fsModule.open(src, OPEN_READ_FLAGS);
|
|
28
36
|
}
|
|
29
37
|
catch (error) {
|
|
30
|
-
if (error
|
|
38
|
+
if (hasErrorCode(error, "ELOOP")) {
|
|
31
39
|
throw sourceSymlinkError(src, error);
|
|
32
40
|
}
|
|
33
41
|
throw error;
|
|
@@ -38,7 +46,7 @@ function openSourceSync(fsModule, src) {
|
|
|
38
46
|
return fsModule.openSync(src, OPEN_READ_FLAGS);
|
|
39
47
|
}
|
|
40
48
|
catch (error) {
|
|
41
|
-
if (error
|
|
49
|
+
if (hasErrorCode(error, "ELOOP")) {
|
|
42
50
|
throw sourceSymlinkError(src, error);
|
|
43
51
|
}
|
|
44
52
|
throw error;
|
|
@@ -57,44 +65,30 @@ export async function readOwnedCopySource(params) {
|
|
|
57
65
|
? syncFs.lstatSync(params.src) : await params.fsModule.lstat(params.src), params.src);
|
|
58
66
|
const handle = await openSource(params.fsModule, params.src);
|
|
59
67
|
try {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
const opened = params.fsModule === fs ? syncFs.fstatSync(handle.fd) : await handle.stat();
|
|
67
|
-
const current = params.fsModule === fs
|
|
68
|
-
? syncFs.lstatSync(params.src) : await params.fsModule.lstat(params.src);
|
|
69
|
-
if (!opened.isFile() || current.isSymbolicLink() || !sameFileIdentity(opened, current)) {
|
|
70
|
-
throw new FsSafeError("path-mismatch", `Copy fallback source changed while opening: ${params.src}`);
|
|
71
|
-
}
|
|
72
|
-
if (opened.nlink !== 1) {
|
|
73
|
-
throw new FsSafeError("hardlink", `Hardlinked copy fallback source not allowed: ${params.src}`);
|
|
74
|
-
}
|
|
75
|
-
return { replacement: await handle.readFile(), mode: opened.mode };
|
|
68
|
+
const opened = await inspectFileIdentity(() => params.fsModule === fs
|
|
69
|
+
? syncFs.fstatSync(handle.fd, { bigint: true }) : handle.stat({ bigint: true }), params.expectedIdentity);
|
|
70
|
+
const current = await inspectFileIdentity(() => params.fsModule === fs
|
|
71
|
+
? syncFs.lstatSync(params.src, { bigint: true }) : params.fsModule.lstat(params.src, { bigint: true }), opened);
|
|
72
|
+
assertOpenedSource(opened, current, params.src);
|
|
73
|
+
return { replacement: await handle.readFile(), mode: Number(opened.mode) };
|
|
76
74
|
}
|
|
77
75
|
finally {
|
|
78
|
-
|
|
76
|
+
try {
|
|
77
|
+
await handle.close();
|
|
78
|
+
}
|
|
79
|
+
catch {
|
|
80
|
+
// Best-effort close includes synchronous adapter throws.
|
|
81
|
+
}
|
|
79
82
|
}
|
|
80
83
|
}
|
|
81
84
|
export function readOwnedCopySourceSync(params) {
|
|
82
85
|
assertSourcePreview(params.fsModule.lstatSync(params.src), params.src);
|
|
83
86
|
const fd = openSourceSync(params.fsModule, params.src);
|
|
84
87
|
try {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}
|
|
89
|
-
const opened = params.fsModule.fstatSync(fd);
|
|
90
|
-
const current = params.fsModule.lstatSync(params.src);
|
|
91
|
-
if (!opened.isFile() || current.isSymbolicLink() || !sameFileIdentity(opened, current)) {
|
|
92
|
-
throw new FsSafeError("path-mismatch", `Copy fallback source changed while opening: ${params.src}`);
|
|
93
|
-
}
|
|
94
|
-
if (opened.nlink !== 1) {
|
|
95
|
-
throw new FsSafeError("hardlink", `Hardlinked copy fallback source not allowed: ${params.src}`);
|
|
96
|
-
}
|
|
97
|
-
return { replacement: readAllSync(params.fsModule, fd, opened.size), mode: opened.mode };
|
|
88
|
+
const opened = inspectFileIdentitySync(() => params.fsModule.fstatSync(fd, { bigint: true }), params.expectedIdentity);
|
|
89
|
+
const current = inspectFileIdentitySync(() => params.fsModule.lstatSync(params.src, { bigint: true }), opened);
|
|
90
|
+
assertOpenedSource(opened, current, params.src);
|
|
91
|
+
return { replacement: readAllSync(params.fsModule, fd, Number(opened.size)), mode: Number(opened.mode) };
|
|
98
92
|
}
|
|
99
93
|
finally {
|
|
100
94
|
try {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import syncFs, { type BigIntStats } from "node:fs";
|
|
2
2
|
import fs, { type FileHandle } from "node:fs/promises";
|
|
3
|
-
import { type DirectoryModeOwner } from "./directory-mode-
|
|
3
|
+
import { type DirectoryModeOwner } from "./directory-mode-node.js";
|
|
4
|
+
import type { AtomicMutation } from "./replace-file-mutation.js";
|
|
4
5
|
type AsyncTempFileSystem = Pick<typeof fs, "lstat" | "open" | "writeFile">;
|
|
5
6
|
type SyncTempFileSystem = Pick<typeof syncFs, "closeSync" | "fstatSync" | "fsyncSync" | "lstatSync" | "openSync" | "writeFileSync">;
|
|
6
7
|
export type SyncFchmod = (fd: number, mode: number) => void;
|
|
@@ -11,18 +12,17 @@ export declare function pinDirectoryForMode(params: {
|
|
|
11
12
|
dirPath: string;
|
|
12
13
|
/** Compatibility for best-effort directory modes; admission and close still fail closed. */
|
|
13
14
|
ignoreChmodError?: boolean;
|
|
15
|
+
mutation?: AtomicMutation;
|
|
14
16
|
}): Promise<DirectoryModeOwner | undefined>;
|
|
15
|
-
export declare function applyDirectoryMode(params: {
|
|
16
|
-
fsModule: AsyncTempFileSystem;
|
|
17
|
-
dirPath: string;
|
|
17
|
+
export declare function applyDirectoryMode(params: Parameters<typeof pinDirectoryForMode>[0] & {
|
|
18
18
|
mode: number;
|
|
19
|
-
ignoreChmodError?: boolean;
|
|
20
19
|
}): Promise<void>;
|
|
21
20
|
export declare function applyDirectoryModeSync(params: {
|
|
22
21
|
fsModule: SyncTempFileSystem;
|
|
23
22
|
dirPath: string;
|
|
24
23
|
mode: number;
|
|
25
24
|
fchmodSync?: SyncFchmod;
|
|
25
|
+
mutation?: AtomicMutation;
|
|
26
26
|
}): void;
|
|
27
27
|
export declare function writeTempFile(params: {
|
|
28
28
|
fsModule: AsyncTempFileSystem;
|
|
@@ -31,21 +31,16 @@ export declare function writeTempFile(params: {
|
|
|
31
31
|
mode: number;
|
|
32
32
|
sync: boolean;
|
|
33
33
|
onIdentity?: (identity: BigIntStats) => void;
|
|
34
|
+
mutation?: AtomicMutation;
|
|
34
35
|
}): Promise<{
|
|
35
36
|
handle: FileHandle;
|
|
36
37
|
identity: BigIntStats;
|
|
37
38
|
}>;
|
|
38
|
-
export declare function writeTempFileSync(params: {
|
|
39
|
+
export declare function writeTempFileSync(params: Omit<Parameters<typeof writeTempFile>[0], "fsModule"> & {
|
|
39
40
|
fsModule: SyncTempFileSystem;
|
|
40
|
-
tempPath: string;
|
|
41
|
-
content: string | Uint8Array;
|
|
42
|
-
mode: number;
|
|
43
41
|
fchmodSync?: SyncFchmod;
|
|
44
|
-
sync: boolean;
|
|
45
|
-
onIdentity?: (identity: BigIntStats) => void;
|
|
46
42
|
}): {
|
|
47
43
|
fd: number;
|
|
48
44
|
identity: BigIntStats;
|
|
49
45
|
};
|
|
50
46
|
export {};
|
|
51
|
-
//# sourceMappingURL=replace-file-descriptor.d.ts.map
|