@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
|
@@ -51,11 +51,13 @@ var __disposeResources = (this && this.__disposeResources) || (function (Suppres
|
|
|
51
51
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
52
52
|
});
|
|
53
53
|
import { randomUUID } from "node:crypto";
|
|
54
|
+
import { registerRootHandleContext } from "./root-handle-context.js";
|
|
54
55
|
import fsSync, { constants as fsConstants } from "node:fs";
|
|
55
56
|
import fs from "node:fs/promises";
|
|
56
57
|
import path from "node:path";
|
|
57
58
|
import { normalizeMaxBytes } from "./byte-budget.js";
|
|
58
59
|
import { assertCopySourceCurrent, resolveFileCopyCloneMode } from "./copy-file-input.js";
|
|
60
|
+
import { assertPrivateFileCreationAvailable, resolveCreationPermissions } from "./creation-boundary.js";
|
|
59
61
|
import { assertAsyncDirectoryGuard, assertSyncDirectoryGuard, createAsyncDirectoryGuard, createNearestExistingDirectoryGuard } from "./directory-guard.js";
|
|
60
62
|
import { FsSafeError } from "./errors.js";
|
|
61
63
|
import { syncDirectoryBestEffort } from "./directory-durability.js";
|
|
@@ -67,23 +69,25 @@ import { openedPathResolutionError, recordExclusiveCreateFailure, recordOpenedFi
|
|
|
67
69
|
import { runPinnedWriteHelper, runPinnedWriteWithRenamePolicy } from "./pinned-write.js";
|
|
68
70
|
import { preparePinnedWriteMutationAdmission, snapshotPinnedMutationPolicy } from "./pinned-mutation-admission.js";
|
|
69
71
|
import { getNativeBinding } from "./native.js";
|
|
70
|
-
import {
|
|
72
|
+
import { validatePinnedRelativePath } from "./pinned-operation.js";
|
|
71
73
|
import { PATH_ALIAS_POLICIES } from "./path-policy.js";
|
|
72
74
|
import { assertNoNulPathInput, hasNodeErrorCode, isNotFoundPathError, isSymlinkOpenError, } from "./path.js";
|
|
73
75
|
import { readOpenedFileSafely } from "./read-opened-file.js";
|
|
74
|
-
import { cleanupPinnedFilePath
|
|
76
|
+
import { cleanupPinnedFilePath } from "./file-cleanup.js";
|
|
77
|
+
import { sameFileIdentity } from "./file-identity.js";
|
|
78
|
+
import { removePathIfIdentityUnchanged } from "./replace-file-temp-owner.js";
|
|
75
79
|
import { realpathSync } from "./realpath.js";
|
|
76
80
|
import { mkdirPathFallback, prepareRootWriteTarget, tryMkdirAtExactParent } from "./root-directory-creation.js";
|
|
77
81
|
import { isNonRegularWriteOpenError, resolveNonblockingWriteFlag } from "./write-open-flags.js";
|
|
78
|
-
import { resolveRootPath, resolveRootPathForRemoval } from "./root-path.js";
|
|
82
|
+
import { resolveRootPath, resolveRootPathSync, resolveRootPathForRemoval } from "./root-path.js";
|
|
79
83
|
import { RemovalPathReceipts } from "./root-remove-receipt.js";
|
|
80
84
|
import { admitPathInsideRoot } from "./root-boundary.js";
|
|
81
85
|
import { listDirectoryPath, openRootDirectoryListing } from "./root-directory-list.js";
|
|
82
86
|
import { statResolvedPathInRoot } from "./root-path-stat.js";
|
|
83
87
|
import { entriesInRoot } from "./root-entries.js";
|
|
84
88
|
import { assertMoveMutationAllowed } from "./root-move-preflight.js";
|
|
85
|
-
import { assertRootIdentityCurrent, assertValidRootDestinationPath, assertValidRootRelativePath, ensureTrailingSep, expandRelativePathWithHome, resolvePathInRoot, resolveRootContext, rootRelativeReadPath, } from "./root-context.js";
|
|
86
|
-
import { fileNotFoundError, hardlinkedPathNotAllowedError, isAlreadyExistsError, normalizePinnedPathError, normalizePinnedWriteError, outsideWorkspaceError, } from "./root-errors.js";
|
|
89
|
+
import { assertRootIdentityCurrent, assertRootIdentityCurrentSync, assertValidRootDestinationPath, assertValidRootRelativePath, createRootObservationGuard, ensureTrailingSep, expandRelativePathWithHome, resolvePathInRoot, resolveRootContext, rootRelativeReadPath, } from "./root-context.js";
|
|
90
|
+
import { errorCauseOptions, fileNotFoundError, hardlinkedPathNotAllowedError, isAlreadyExistsError, normalizePinnedPathError, normalizePinnedWriteError, outsideWorkspaceError, } from "./root-errors.js";
|
|
87
91
|
import { getFsSafeTestHooks } from "./test-hooks.js";
|
|
88
92
|
import { stringifyJsonDocument } from "./json-stringify.js";
|
|
89
93
|
import { walkRoot } from "./root-walk.js";
|
|
@@ -91,19 +95,21 @@ import { registerTempPathForExit } from "./temp-cleanup.js";
|
|
|
91
95
|
import { removePathInRootFallback, validateRemoveOptions } from "./root-remove.js";
|
|
92
96
|
import { serializePathWrite } from "./write-queue.js";
|
|
93
97
|
import { verifyAtomicWriteResult } from "./root-write-verification.js";
|
|
94
|
-
import { assertRootWritePathSelectionSync, assertRootWriteSelectionSync, createRootWriteSelectionForFd, prepareGuardedRootWritePathSelection, resolveGuardedWritePathInRoot, resolveGuardedWriteTargetInRoot, resolvePinnedWriteTargetInRoot, refreshRetainedRootWriteAdmission, refreshRootWritePathSelection,
|
|
98
|
+
import { assertRootWritePathSelectionSync, assertRootWriteSelectionSync, createRootWriteSelectionForFd, prepareGuardedRootWritePathSelection, resolveGuardedWritePathInRoot, resolveGuardedWriteTargetInRoot, resolvePinnedWriteTargetInRoot, refreshRetainedRootWriteAdmission, refreshRootWritePathSelection, } from "./root-write-admission.js";
|
|
95
99
|
import { prepareSharedRootWriteTarget } from "./root-write-complete-parent.js";
|
|
96
100
|
import { finishRootFallbackWrite } from "./root-write-publication.js";
|
|
97
|
-
import {
|
|
101
|
+
import { withRootFallbackCompatibilityLock } from "./root-write-compatibility.js";
|
|
102
|
+
import { assertRootFallbackWritePath } from "./root-write-lock-binding.js";
|
|
98
103
|
import { inspectFileIdentity, inspectFileIdentitySync } from "./strict-file-identity.js";
|
|
99
|
-
import { movePathNoReplaceNative } from "./root-move-noreplace.js";
|
|
104
|
+
import { admitMoveSourceStat, movePathNoReplaceNative } from "./root-move-noreplace.js";
|
|
100
105
|
import { admitRootReadHandle, inspectOpenedPathIdentitySync } from "./root-read-admission.js";
|
|
101
|
-
import { createCopyPublicationObserver, onCopyPublication } from "./copy-publication.js";
|
|
106
|
+
import { createCopyPublicationObserver, onCopyPublication, onCopySourceAdmission } from "./copy-publication.js";
|
|
102
107
|
import { writeAllToFile } from "./write-file-handle.js";
|
|
103
108
|
import { createInputOptions, rethrowCreateInputError, rootWriteInput } from "./root-create-input.js";
|
|
104
109
|
import { assertFinalSymlinkRejected, mutationSymlinkResolution, readSymlinkResolution } from "./root-symlink-policy.js";
|
|
105
110
|
import { assertNoWindowsPathAlias, resolvePathPreservingWindowsRoot } from "./windows-path-alias.js";
|
|
106
111
|
import { resolvePinnedObservedPathInRoot } from "./root-observed-path.js";
|
|
112
|
+
import { registerFileLockSyncRootAdapter } from "./file-lock-sync-root.js";
|
|
107
113
|
import { mergeReadOptions, readDefaults, } from "./root-options.js";
|
|
108
114
|
import { composeMutationAssertions, MutationAuthorityError, rethrowMutationAuthorityError } from "./mutation-authority.js";
|
|
109
115
|
export { DEFAULT_ROOT_MAX_BYTES } from "./root-options.js";
|
|
@@ -182,28 +188,19 @@ async function openVerifiedLocalFile(filePath, options) {
|
|
|
182
188
|
}
|
|
183
189
|
}
|
|
184
190
|
export class RootHandle {
|
|
185
|
-
|
|
186
|
-
rootIdentity;
|
|
191
|
+
context;
|
|
187
192
|
rootDir;
|
|
188
193
|
rootReal;
|
|
189
194
|
rootWithSep;
|
|
190
195
|
defaults;
|
|
191
196
|
constructor(context, defaults = {}) {
|
|
192
|
-
this.
|
|
193
|
-
this.rootIdentity = context.rootIdentity;
|
|
197
|
+
this.context = context;
|
|
194
198
|
this.rootDir = context.rootDir;
|
|
195
199
|
this.rootReal = context.rootReal;
|
|
196
200
|
this.rootWithSep = context.rootWithSep;
|
|
197
201
|
this.defaults = defaults;
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
return {
|
|
201
|
-
rootDir: this.rootDir,
|
|
202
|
-
rootGuard: this.rootGuard,
|
|
203
|
-
rootIdentity: this.rootIdentity,
|
|
204
|
-
rootReal: this.rootReal,
|
|
205
|
-
rootWithSep: this.rootWithSep,
|
|
206
|
-
};
|
|
202
|
+
registerFileLockSyncRootAdapter(this, context, defaults);
|
|
203
|
+
registerRootHandleContext(this, context);
|
|
207
204
|
}
|
|
208
205
|
mutationOptions(options) {
|
|
209
206
|
return {
|
|
@@ -219,9 +216,9 @@ export class RootHandle {
|
|
|
219
216
|
}
|
|
220
217
|
async open(relativePath, options = {}) {
|
|
221
218
|
return await openFileInRoot(this.context, {
|
|
222
|
-
relativePath,
|
|
223
219
|
...readDefaults(this.defaults),
|
|
224
220
|
...options,
|
|
221
|
+
relativePath,
|
|
225
222
|
});
|
|
226
223
|
}
|
|
227
224
|
async read(relativePath, options = {}) {
|
|
@@ -241,9 +238,11 @@ export class RootHandle {
|
|
|
241
238
|
return JSON.parse(await this.readText(relativePath, options));
|
|
242
239
|
}
|
|
243
240
|
async readAbsolute(filePath, options = {}) {
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
241
|
+
const context = this.context;
|
|
242
|
+
const readOptions = mergeReadOptions(this.defaults, options);
|
|
243
|
+
return await readFileInRoot(context, {
|
|
244
|
+
relativePath: rootRelativeReadPath(context, filePath),
|
|
245
|
+
...readOptions,
|
|
247
246
|
});
|
|
248
247
|
}
|
|
249
248
|
reader(options = {}) {
|
|
@@ -255,10 +254,11 @@ export class RootHandle {
|
|
|
255
254
|
assertValidRootDestinationPath(relativePath);
|
|
256
255
|
const writeMode = options.writeMode ?? "replace";
|
|
257
256
|
const target = await openWritableFileInRoot(this.context, {
|
|
258
|
-
relativePath,
|
|
259
257
|
mkdir: this.defaults.mkdir,
|
|
260
258
|
mode: this.defaults.mode,
|
|
261
259
|
...this.mutationOptions(options),
|
|
260
|
+
relativePath,
|
|
261
|
+
expectedWritePath: undefined,
|
|
262
262
|
append: writeMode === "append",
|
|
263
263
|
truncateExisting: writeMode === "replace",
|
|
264
264
|
}).catch(rethrowMutationAuthorityError);
|
|
@@ -267,11 +267,11 @@ export class RootHandle {
|
|
|
267
267
|
async append(relativePath, data, options = {}) {
|
|
268
268
|
assertValidRootDestinationPath(relativePath);
|
|
269
269
|
await appendFileInRoot(this.context, {
|
|
270
|
-
relativePath,
|
|
271
|
-
data,
|
|
272
270
|
mkdir: this.defaults.mkdir,
|
|
273
271
|
mode: this.defaults.mode,
|
|
274
272
|
...this.mutationOptions(options),
|
|
273
|
+
relativePath,
|
|
274
|
+
data,
|
|
275
275
|
durable: options.durable ?? this.defaults.durable ?? true,
|
|
276
276
|
}).catch(rethrowMutationAuthorityError);
|
|
277
277
|
}
|
|
@@ -280,45 +280,51 @@ export class RootHandle {
|
|
|
280
280
|
validateRemoveOptions(options);
|
|
281
281
|
options.signal?.throwIfAborted();
|
|
282
282
|
await removePathInRoot(this.context, {
|
|
283
|
-
relativePath,
|
|
284
283
|
...this.mutationOptions(options),
|
|
284
|
+
relativePath,
|
|
285
285
|
}).catch(rethrowMutationAuthorityError);
|
|
286
286
|
}
|
|
287
287
|
async mkdir(relativePath, options = {}) {
|
|
288
288
|
assertValidRootDestinationPath(relativePath);
|
|
289
289
|
await mkdirPathInRoot(this.context, {
|
|
290
|
-
relativePath,
|
|
291
290
|
...this.mutationOptions(options),
|
|
291
|
+
relativePath,
|
|
292
|
+
allowRoot: false,
|
|
292
293
|
}).catch(rethrowMutationAuthorityError);
|
|
293
294
|
}
|
|
294
295
|
async ensureRoot(options = {}) {
|
|
295
296
|
await mkdirPathInRoot(this.context, {
|
|
297
|
+
...this.mutationOptions(options),
|
|
296
298
|
relativePath: "",
|
|
297
299
|
allowRoot: true,
|
|
298
|
-
...this.mutationOptions(options),
|
|
299
300
|
}).catch(rethrowMutationAuthorityError);
|
|
300
301
|
}
|
|
301
302
|
async write(relativePath, data, options = {}) {
|
|
302
303
|
assertValidRootDestinationPath(relativePath);
|
|
303
304
|
await writeFileInRoot(this.context, {
|
|
304
|
-
relativePath,
|
|
305
|
-
data,
|
|
306
305
|
mkdir: this.defaults.mkdir,
|
|
307
306
|
mode: this.defaults.mode,
|
|
308
307
|
renameIdentity: this.defaults.renameIdentity,
|
|
309
308
|
...this.mutationOptions(options),
|
|
309
|
+
atomic: undefined,
|
|
310
|
+
private: undefined,
|
|
311
|
+
strictFileSync: undefined,
|
|
312
|
+
relativePath,
|
|
313
|
+
data,
|
|
310
314
|
durable: options.durable ?? this.defaults.durable ?? true,
|
|
311
315
|
}).catch(rethrowMutationAuthorityError);
|
|
312
316
|
}
|
|
313
317
|
async create(relativePath, data, options = {}) {
|
|
314
318
|
assertValidRootDestinationPath(relativePath);
|
|
319
|
+
const durable = options.durable ?? this.defaults.durable ?? true;
|
|
315
320
|
await writeFileInRoot(this.context, {
|
|
316
|
-
relativePath,
|
|
317
|
-
data,
|
|
318
321
|
mkdir: this.defaults.mkdir,
|
|
319
322
|
mode: this.defaults.mode,
|
|
320
323
|
...this.mutationOptions(createInputOptions(data, options, this.defaults.maxBytes)),
|
|
321
|
-
|
|
324
|
+
relativePath,
|
|
325
|
+
data,
|
|
326
|
+
durable: durable !== false,
|
|
327
|
+
strictFileSync: durable === "file",
|
|
322
328
|
overwrite: false,
|
|
323
329
|
}).catch(rethrowMutationAuthorityError).catch(rethrowCreateInputError);
|
|
324
330
|
}
|
|
@@ -336,15 +342,17 @@ export class RootHandle {
|
|
|
336
342
|
options.signal?.throwIfAborted();
|
|
337
343
|
assertValidRootDestinationPath(relativePath);
|
|
338
344
|
const { maxBytes, ...copyOptions } = this.mutationOptions(options);
|
|
345
|
+
const copySource = typeof source === "string" ? source : { root: source.root, relativePath: source.relativePath };
|
|
339
346
|
await copyFileInRoot(this.context, {
|
|
340
|
-
source: typeof source === "string" ? source : { root: source.root, relativePath: source.relativePath },
|
|
341
|
-
relativePath,
|
|
342
347
|
maxBytes: normalizeMaxBytes(maxBytes, { defaultValue: this.defaults.maxBytes }),
|
|
343
348
|
mkdir: this.defaults.mkdir,
|
|
344
349
|
...copyOptions,
|
|
350
|
+
source: copySource,
|
|
351
|
+
relativePath,
|
|
345
352
|
mode: options.mode ?? this.defaults.mode,
|
|
346
353
|
durable: options.durable ?? this.defaults.durable ?? true,
|
|
347
354
|
verifyPublished: options[onCopyPublication],
|
|
355
|
+
admitSource: options[onCopySourceAdmission],
|
|
348
356
|
}).catch(rethrowMutationAuthorityError);
|
|
349
357
|
}
|
|
350
358
|
async exists(relativePath) {
|
|
@@ -361,19 +369,22 @@ export class RootHandle {
|
|
|
361
369
|
}
|
|
362
370
|
async stat(relativePath) {
|
|
363
371
|
assertValidRootRelativePath(relativePath);
|
|
364
|
-
|
|
372
|
+
validatePinnedRelativePath(relativePath);
|
|
365
373
|
return await statPathFallback(this.context, relativePath);
|
|
366
374
|
}
|
|
367
375
|
async list(relativePath, options = {}) {
|
|
368
376
|
assertValidRootRelativePath(relativePath);
|
|
369
|
-
|
|
377
|
+
validatePinnedRelativePath(relativePath);
|
|
370
378
|
return await listPathFallback(this.context, relativePath, options.withFileTypes === true);
|
|
371
379
|
}
|
|
372
380
|
async move(fromRelative, toRelative, options = {}) {
|
|
373
381
|
assertValidRootRelativePath(fromRelative);
|
|
374
382
|
assertValidRootDestinationPath(toRelative);
|
|
375
|
-
|
|
376
|
-
|
|
383
|
+
validatePinnedRelativePath(fromRelative);
|
|
384
|
+
validatePinnedRelativePath(toRelative);
|
|
385
|
+
const mutationOptions = this.mutationOptions(options);
|
|
386
|
+
const { assertBeforeMutation } = mutationOptions;
|
|
387
|
+
const { denyMutations, mutationSymlinks } = snapshotPinnedMutationPolicy(mutationOptions.denyMutations, mutationOptions.mutationSymlinks) ?? {};
|
|
377
388
|
const overwrite = options.overwrite ?? false;
|
|
378
389
|
await assertMoveMutationAllowed(this.context, {
|
|
379
390
|
fromRelative,
|
|
@@ -399,10 +410,14 @@ export class RootHandle {
|
|
|
399
410
|
walk(relativePath, options) {
|
|
400
411
|
assertValidRootRelativePath(relativePath);
|
|
401
412
|
return walkRoot({
|
|
402
|
-
rootReal: this.rootReal,
|
|
413
|
+
rootReal: this.context.rootReal,
|
|
414
|
+
observeRoot: () => createRootObservationGuard(this.context),
|
|
403
415
|
stat: relative => this.stat(relative),
|
|
404
|
-
list: async (relative, listingOptions) => {
|
|
405
|
-
|
|
416
|
+
list: async (relative, listingOptions, receipt) => {
|
|
417
|
+
validatePinnedRelativePath(relative);
|
|
418
|
+
if (receipt) {
|
|
419
|
+
return await openRootDirectoryListing(this.context, receipt.targetPath, listingOptions, receipt);
|
|
420
|
+
}
|
|
406
421
|
const resolved = await resolvePinnedPathInRoot(this.context, { relativePath: relative, allowRoot: true });
|
|
407
422
|
return await openRootDirectoryListing(this.context, resolved.resolved, listingOptions);
|
|
408
423
|
},
|
|
@@ -458,15 +473,6 @@ async function readFileInRoot(root, params) {
|
|
|
458
473
|
await opened.handle.close().catch(() => { });
|
|
459
474
|
}
|
|
460
475
|
}
|
|
461
|
-
async function readPathInRoot(root, params) {
|
|
462
|
-
const relativePath = rootRelativeReadPath(root, params.filePath);
|
|
463
|
-
return await readFileInRoot(root, {
|
|
464
|
-
relativePath,
|
|
465
|
-
hardlinks: params.hardlinks,
|
|
466
|
-
maxBytes: params.maxBytes,
|
|
467
|
-
symlinks: params.symlinks,
|
|
468
|
-
});
|
|
469
|
-
}
|
|
470
476
|
export async function readLocalFileSafely(params) {
|
|
471
477
|
const maxBytes = normalizeMaxBytes(params.maxBytes);
|
|
472
478
|
const opened = await openLocalFileSafely({ filePath: params.filePath });
|
|
@@ -492,7 +498,7 @@ function buildAtomicWriteTempPath(targetPath) {
|
|
|
492
498
|
function rootWriteQueueKey(root, relativePath) {
|
|
493
499
|
return `${root.rootReal}\0${relativePath}`;
|
|
494
500
|
}
|
|
495
|
-
async function openWritableFileInRoot(root, params) {
|
|
501
|
+
async function openWritableFileInRoot(root, params, options) {
|
|
496
502
|
const guardedTarget = params.denyMutations === undefined && params.mutationSymlinks === undefined
|
|
497
503
|
? undefined
|
|
498
504
|
: await resolveGuardedWriteTargetInRoot(root, {
|
|
@@ -507,7 +513,6 @@ async function openWritableFileInRoot(root, params) {
|
|
|
507
513
|
relativePath: params.relativePath, guardedTarget, mkdir: params.mkdir,
|
|
508
514
|
assertBeforeMutation: params.assertBeforeMutation,
|
|
509
515
|
}) : undefined;
|
|
510
|
-
const mutationAdmission = prepared?.mutationAdmission;
|
|
511
516
|
const preparedParent = prepared?.preparedParent;
|
|
512
517
|
let ioPath = prepared?.targetPath ?? (params.mkdir === false ? resolved :
|
|
513
518
|
await prepareRootWriteTarget(root, resolved, params.assertBeforeMutation));
|
|
@@ -556,6 +561,17 @@ async function openWritableFileInRoot(root, params) {
|
|
|
556
561
|
if (!isNotFoundPathError(err)) {
|
|
557
562
|
throw err;
|
|
558
563
|
}
|
|
564
|
+
if (options?.createIfMissing === false) {
|
|
565
|
+
const parentGuard = writePathSelection?.parentGuard ??
|
|
566
|
+
await createAsyncDirectoryGuard(path.dirname(ioPath), { bigint: true });
|
|
567
|
+
assertRootIdentityCurrentSync(root);
|
|
568
|
+
if (!admitPathInsideRoot({
|
|
569
|
+
rootPath: root.rootReal, candidatePath: parentGuard.realPath, rootIdentity: root.rootIdentity,
|
|
570
|
+
}))
|
|
571
|
+
throw outsideWorkspaceError();
|
|
572
|
+
assertSyncDirectoryGuard(parentGuard);
|
|
573
|
+
return { missing: true, targetPath: ioPath, parentGuard, writeSelection: writePathSelection };
|
|
574
|
+
}
|
|
559
575
|
if (writePathSelection)
|
|
560
576
|
await refreshRootWritePathSelection(writePathSelection);
|
|
561
577
|
params.assertBeforeMutation?.();
|
|
@@ -673,9 +689,7 @@ async function openWritableFileInRoot(root, params) {
|
|
|
673
689
|
stat,
|
|
674
690
|
[Symbol.asyncDispose]: () => handle.close().catch(() => undefined),
|
|
675
691
|
};
|
|
676
|
-
|
|
677
|
-
retainRootWriteSelection(result, writeSelection);
|
|
678
|
-
return { opened: result, identity };
|
|
692
|
+
return { opened: result, identity, writeSelection };
|
|
679
693
|
}
|
|
680
694
|
catch (err) {
|
|
681
695
|
const cleanupCreatedPath = createdForWrite && err instanceof FsSafeError;
|
|
@@ -715,8 +729,9 @@ async function appendFileInRoot(root, params) {
|
|
|
715
729
|
if (params.prependNewlineIfNeeded === true &&
|
|
716
730
|
!target.createdForWrite &&
|
|
717
731
|
target.stat.size > 0 &&
|
|
732
|
+
params.data.length > 0 &&
|
|
718
733
|
((typeof params.data === "string" && !params.data.startsWith("\n")) ||
|
|
719
|
-
(Buffer.isBuffer(params.data) && params.data
|
|
734
|
+
(Buffer.isBuffer(params.data) && params.data[0] !== 0x0a))) {
|
|
720
735
|
const newline = Buffer.from("\n", typeof params.data === "string" ? params.encoding : "utf8");
|
|
721
736
|
const tail = Buffer.alloc(newline.length);
|
|
722
737
|
const { bytesRead } = await target.handle.read(tail, 0, tail.length, Math.max(0, target.stat.size - tail.length));
|
|
@@ -757,7 +772,7 @@ async function appendFileInRoot(root, params) {
|
|
|
757
772
|
}
|
|
758
773
|
}
|
|
759
774
|
async function removePathInRoot(root, params) {
|
|
760
|
-
|
|
775
|
+
validatePinnedRelativePath(params.relativePath);
|
|
761
776
|
const removalReceipts = params.recursive ? undefined : new RemovalPathReceipts();
|
|
762
777
|
const resolved = await resolvePinnedPathInRoot(root, {
|
|
763
778
|
relativePath: params.relativePath,
|
|
@@ -776,24 +791,19 @@ async function removePathInRoot(root, params) {
|
|
|
776
791
|
}
|
|
777
792
|
}
|
|
778
793
|
async function mkdirPathInRoot(root, params) {
|
|
779
|
-
|
|
794
|
+
const privateMode = resolveCreationPermissions(params, true).private;
|
|
795
|
+
validatePinnedRelativePath(params.relativePath);
|
|
780
796
|
const policy = params.denyMutations === undefined && params.mutationSymlinks === undefined
|
|
781
797
|
? undefined
|
|
782
798
|
: snapshotPinnedMutationPolicy(params.denyMutations, params.mutationSymlinks);
|
|
799
|
+
const resolution = { relativePath: params.relativePath, allowRoot: params.allowRoot, ...policy };
|
|
783
800
|
const resolveCurrent = policy
|
|
784
|
-
? async () => await resolvePinnedPathInRoot(root,
|
|
785
|
-
...params,
|
|
786
|
-
denyMutations: policy.denyMutations,
|
|
787
|
-
mutationSymlinks: policy.mutationSymlinks,
|
|
788
|
-
})
|
|
801
|
+
? async () => await resolvePinnedPathInRoot(root, resolution)
|
|
789
802
|
: undefined;
|
|
790
|
-
const resolved =
|
|
791
|
-
? await resolveCurrent()
|
|
792
|
-
: await resolvePinnedPathInRoot(root, params);
|
|
803
|
+
const resolved = await resolvePinnedPathInRoot(root, resolution);
|
|
793
804
|
const prepared = policy && resolved.relativePosix !== ""
|
|
794
805
|
? await preparePinnedWriteMutationAdmission({
|
|
795
806
|
rootReal: resolved.rootReal,
|
|
796
|
-
rootWithSep: ensureTrailingSep(resolved.rootReal),
|
|
797
807
|
rootIdentity: root.rootIdentity,
|
|
798
808
|
resolvedTargetPath: resolved.resolved,
|
|
799
809
|
originalPath: params.relativePath,
|
|
@@ -808,19 +818,23 @@ async function mkdirPathInRoot(root, params) {
|
|
|
808
818
|
await getFsSafeTestHooks()?.beforePinnedWriteParentAdmission?.(resolved.resolved);
|
|
809
819
|
}
|
|
810
820
|
try {
|
|
811
|
-
if (prepared?.mutationAdmission && params.assertBeforeMutation === undefined &&
|
|
821
|
+
if (!privateMode && prepared?.mutationAdmission && params.assertBeforeMutation === undefined &&
|
|
812
822
|
await tryMkdirAtExactParent(root, resolved.resolved, prepared.mutationAdmission))
|
|
813
823
|
return;
|
|
814
|
-
await mkdirPathFallback(root, resolved, params.assertBeforeMutation, policy?.mutationSymlinks !== undefined, prepared?.mutationAdmission);
|
|
824
|
+
await mkdirPathFallback(root, resolved, params.assertBeforeMutation, policy?.mutationSymlinks !== undefined, prepared?.mutationAdmission, privateMode);
|
|
815
825
|
}
|
|
816
826
|
catch (error) {
|
|
817
827
|
throw normalizePinnedPathError(error);
|
|
818
828
|
}
|
|
819
829
|
}
|
|
820
830
|
async function writeFileInRoot(root, params) {
|
|
831
|
+
if (params.private !== undefined) {
|
|
832
|
+
const permissions = resolveCreationPermissions(params, false);
|
|
833
|
+
params = { ...params, private: permissions.private, mode: permissions.mode };
|
|
834
|
+
}
|
|
821
835
|
const input = rootWriteInput(params);
|
|
822
836
|
await serializePathWrite(rootWriteQueueKey(root, params.relativePath), async () => {
|
|
823
|
-
if (input.kind === "buffer" && process.platform === "win32" &&
|
|
837
|
+
if (!params.private && input.kind === "buffer" && !input.stageBeforePublish && process.platform === "win32" &&
|
|
824
838
|
(params.renameIdentity === "verify-content-with-lock" || !getNativeBinding())) {
|
|
825
839
|
await writeFileFallback(root, { ...params, data: input.data });
|
|
826
840
|
return;
|
|
@@ -834,19 +848,29 @@ async function writeFileInRoot(root, params) {
|
|
|
834
848
|
async function commitPinnedWriteInRoot(root, pinned, params, input) {
|
|
835
849
|
let verifyingPublication = false;
|
|
836
850
|
try {
|
|
851
|
+
if (params.private)
|
|
852
|
+
assertPrivateFileCreationAvailable();
|
|
853
|
+
if (params.private && params.mkdir !== false) {
|
|
854
|
+
const target = await prepareRootWriteTarget(root, pinned.targetPath, params.assertBeforeMutation, pinned.mutationAdmission, true);
|
|
855
|
+
if (target !== pinned.targetPath) {
|
|
856
|
+
throw new FsSafeError("path-mismatch", "private creation parent changed during admission");
|
|
857
|
+
}
|
|
858
|
+
}
|
|
837
859
|
await runPinnedWriteWithRenamePolicy({
|
|
838
860
|
rootPath: pinned.rootReal,
|
|
839
861
|
relativeParentPath: pinned.relativeParentPath,
|
|
840
862
|
basename: pinned.basename,
|
|
841
863
|
targetPath: pinned.targetPath,
|
|
842
864
|
renameIdentity: params.renameIdentity,
|
|
843
|
-
mkdir: params.mkdir !== false,
|
|
865
|
+
mkdir: !params.private && params.mkdir !== false,
|
|
866
|
+
private: params.private,
|
|
844
867
|
mode: params.mode ?? pinned.mode,
|
|
845
868
|
sync: params.durable !== false,
|
|
869
|
+
strictFileSync: params.strictFileSync,
|
|
846
870
|
overwrite: params.overwrite,
|
|
847
871
|
rejectFinalSymlink: params.mutationSymlinks !== undefined,
|
|
848
872
|
input,
|
|
849
|
-
maxBytes: params.maxBytes,
|
|
873
|
+
maxBytes: input.kind === "buffer" ? undefined : params.maxBytes,
|
|
850
874
|
rootIdentity: root.rootIdentity,
|
|
851
875
|
mutationAdmission: pinned.mutationAdmission,
|
|
852
876
|
assertBeforeMutation: params.assertBeforeMutation,
|
|
@@ -876,9 +900,7 @@ async function commitPinnedWriteInRoot(root, pinned, params, input) {
|
|
|
876
900
|
throw error;
|
|
877
901
|
}
|
|
878
902
|
if (params.overwrite === false && isAlreadyExistsError(error)) {
|
|
879
|
-
throw new FsSafeError("already-exists", "file already exists",
|
|
880
|
-
cause: error instanceof Error ? error : undefined,
|
|
881
|
-
});
|
|
903
|
+
throw new FsSafeError("already-exists", "file already exists", errorCauseOptions(error));
|
|
882
904
|
}
|
|
883
905
|
throw normalizePinnedWriteError(error);
|
|
884
906
|
}
|
|
@@ -910,12 +932,20 @@ async function copyFileInRoot(root, params) {
|
|
|
910
932
|
throw new FsSafeError("too-large", `file exceeds limit of ${params.maxBytes} bytes (got ${source.stat.size})`);
|
|
911
933
|
}
|
|
912
934
|
try {
|
|
935
|
+
const sourceAdmission = params.admitSource?.(sourceIdentity, source.realPath);
|
|
936
|
+
const mode = sourceAdmission?.mode ?? params.mode;
|
|
913
937
|
await serializePathWrite(rootWriteQueueKey(root, params.relativePath), async () => {
|
|
914
|
-
const pinned = await resolvePinnedWriteTargetInRoot(root, params.relativePath,
|
|
938
|
+
const pinned = await resolvePinnedWriteTargetInRoot(root, params.relativePath, mode ?? (params.preserveSourceMode ? Number(sourceIdentity.mode & 4095n) : undefined), params.denyMutations, params.overwrite !== false, params.mutationSymlinks);
|
|
915
939
|
await serializePathWrite(pinned.targetPath, async () => {
|
|
916
940
|
await assertCopySourceCurrent(source, sourceIdentity);
|
|
917
941
|
const verifySource = async () => {
|
|
918
942
|
params.signal?.throwIfAborted();
|
|
943
|
+
try {
|
|
944
|
+
sourceAdmission?.verify();
|
|
945
|
+
}
|
|
946
|
+
catch (error) {
|
|
947
|
+
throw new MutationAuthorityError(error);
|
|
948
|
+
}
|
|
919
949
|
if (typeof params.source !== "string") {
|
|
920
950
|
await params.source.root.stat(".");
|
|
921
951
|
}
|
|
@@ -933,11 +963,11 @@ async function copyFileInRoot(root, params) {
|
|
|
933
963
|
rejectFinalSymlink: params.mutationSymlinks !== undefined,
|
|
934
964
|
maxBytes: params.maxBytes,
|
|
935
965
|
sync: params.durable !== false,
|
|
936
|
-
assertBeforeMutation: () => {
|
|
966
|
+
assertBeforeMutation: params.signal || params.assertBeforeMutation ? () => {
|
|
937
967
|
if (params.signal?.aborted)
|
|
938
968
|
throw new MutationAuthorityError(params.signal.reason);
|
|
939
969
|
params.assertBeforeMutation?.();
|
|
940
|
-
},
|
|
970
|
+
} : undefined,
|
|
941
971
|
verifyPublished: params.verifyPublished,
|
|
942
972
|
onPublished: observer.onPublished,
|
|
943
973
|
input: { kind: "file", handle: source.handle, size: source.stat.size, clone, signal: params.signal, verifySource },
|
|
@@ -963,20 +993,9 @@ async function copyFileInRoot(root, params) {
|
|
|
963
993
|
}
|
|
964
994
|
}
|
|
965
995
|
async function resolvePinnedPathInRoot(root, params) {
|
|
966
|
-
return await resolvePinnedOperationPathInRoot(root, {
|
|
967
|
-
allowRoot: params.allowRoot,
|
|
968
|
-
denyMutations: params.denyMutations,
|
|
969
|
-
mutationSymlinks: params.mutationSymlinks,
|
|
970
|
-
protectDenyMutationAncestors: params.remove === true,
|
|
971
|
-
relativePath: params.relativePath,
|
|
972
|
-
policy: params.remove ? PATH_ALIAS_POLICIES.unlinkTarget : PATH_ALIAS_POLICIES.strict,
|
|
973
|
-
removalReceipts: params.removalReceipts,
|
|
974
|
-
});
|
|
975
|
-
}
|
|
976
|
-
async function resolvePinnedOperationPathInRoot(root, params) {
|
|
977
996
|
const resolved = await resolvePinnedRootPathInRoot(root, {
|
|
978
997
|
relativePath: params.relativePath,
|
|
979
|
-
policy: params.
|
|
998
|
+
policy: params.remove ? PATH_ALIAS_POLICIES.unlinkTarget : PATH_ALIAS_POLICIES.strict,
|
|
980
999
|
mutationSymlinks: params.mutationSymlinks,
|
|
981
1000
|
removalReceipts: params.removalReceipts,
|
|
982
1001
|
});
|
|
@@ -1003,7 +1022,7 @@ async function resolvePinnedOperationPathInRoot(root, params) {
|
|
|
1003
1022
|
}
|
|
1004
1023
|
resolved.canonicalPath = admittedCanonicalPath.path;
|
|
1005
1024
|
await assertMutationNotDenied(resolved.canonicalPath, params.denyMutations, {
|
|
1006
|
-
protectAncestors: params.
|
|
1025
|
+
protectAncestors: params.remove === true,
|
|
1007
1026
|
});
|
|
1008
1027
|
return { rootReal: resolved.rootReal, resolved: resolved.canonicalPath, relativePosix };
|
|
1009
1028
|
}
|
|
@@ -1031,10 +1050,8 @@ async function resolvePinnedRootPathInRoot(root, params) {
|
|
|
1031
1050
|
throw err;
|
|
1032
1051
|
throw new FsSafeError("path-alias", "path alias escape blocked", { cause: err });
|
|
1033
1052
|
}
|
|
1034
|
-
const rootWithSep = ensureTrailingSep(resolved.rootCanonicalPath);
|
|
1035
1053
|
return {
|
|
1036
1054
|
rootReal: resolved.rootCanonicalPath,
|
|
1037
|
-
rootWithSep,
|
|
1038
1055
|
canonicalPath: resolved.canonicalPath,
|
|
1039
1056
|
};
|
|
1040
1057
|
}
|
|
@@ -1054,6 +1071,8 @@ async function listPathFallback(root, relativePath, withFileTypes) {
|
|
|
1054
1071
|
return await listDirectoryPath(root, resolved.resolved, withFileTypes, resolved.receipt);
|
|
1055
1072
|
}
|
|
1056
1073
|
async function movePathFallback(root, params) {
|
|
1074
|
+
const originalRoutes = params.overwrite && params.assertBeforeMutation
|
|
1075
|
+
? await Promise.all([params.fromRelative, params.toRelative].map(expandRelativePathWithHome)) : undefined;
|
|
1057
1076
|
const source = await resolvePathInRoot(root, params.fromRelative, {
|
|
1058
1077
|
aliasErrorCode: "path-alias",
|
|
1059
1078
|
allowFinalSymlink: true,
|
|
@@ -1089,9 +1108,14 @@ async function movePathFallback(root, params) {
|
|
|
1089
1108
|
targetStat?.isSymbolicLink() === true);
|
|
1090
1109
|
},
|
|
1091
1110
|
});
|
|
1092
|
-
let
|
|
1111
|
+
let sourceIdentity;
|
|
1093
1112
|
try {
|
|
1094
|
-
|
|
1113
|
+
if (params.overwrite && params.assertBeforeMutation) {
|
|
1114
|
+
sourceIdentity = inspectFileIdentitySync(() => admitMoveSourceStat(fsSync.lstatSync(source.resolved, { bigint: true }), true));
|
|
1115
|
+
}
|
|
1116
|
+
else {
|
|
1117
|
+
admitMoveSourceStat(fsSync.lstatSync(source.resolved), params.overwrite);
|
|
1118
|
+
}
|
|
1095
1119
|
}
|
|
1096
1120
|
catch (error) {
|
|
1097
1121
|
if (isNotFoundPathError(error)) {
|
|
@@ -1099,19 +1123,10 @@ async function movePathFallback(root, params) {
|
|
|
1099
1123
|
}
|
|
1100
1124
|
throw error;
|
|
1101
1125
|
}
|
|
1102
|
-
if (
|
|
1103
|
-
throw new FsSafeError("
|
|
1104
|
-
}
|
|
1105
|
-
if (sourceStat.isFile() && sourceStat.nlink > 1) {
|
|
1106
|
-
throw hardlinkedPathNotAllowedError();
|
|
1107
|
-
}
|
|
1108
|
-
if (!params.overwrite && sourceStat.isDirectory()) {
|
|
1109
|
-
throw new FsSafeError("invalid-path", "directory moves require overwrite: true");
|
|
1126
|
+
if (!pinnedTarget) {
|
|
1127
|
+
throw new FsSafeError("path-mismatch", "destination admission was not completed");
|
|
1110
1128
|
}
|
|
1111
1129
|
if (!params.overwrite) {
|
|
1112
|
-
if (!pinnedTarget) {
|
|
1113
|
-
throw new FsSafeError("path-mismatch", "destination admission was not completed");
|
|
1114
|
-
}
|
|
1115
1130
|
await movePathNoReplaceNative(root, params, {
|
|
1116
1131
|
sourcePath: source.resolved,
|
|
1117
1132
|
sourceParentPath: path.dirname(pinnedSource.canonicalPath),
|
|
@@ -1120,8 +1135,9 @@ async function movePathFallback(root, params) {
|
|
|
1120
1135
|
});
|
|
1121
1136
|
return;
|
|
1122
1137
|
}
|
|
1123
|
-
const
|
|
1124
|
-
const
|
|
1138
|
+
const guardOptions = { bigint: sourceIdentity !== undefined };
|
|
1139
|
+
const sourceParentGuard = await createAsyncDirectoryGuard(path.dirname(source.resolved), guardOptions);
|
|
1140
|
+
const targetParentGuard = await createNearestExistingDirectoryGuard(target.rootReal, path.dirname(target.resolved), guardOptions);
|
|
1125
1141
|
await getFsSafeTestHooks()?.beforeRootFallbackMutation?.("move", target.resolved);
|
|
1126
1142
|
await assertAsyncDirectoryGuard(sourceParentGuard);
|
|
1127
1143
|
await assertAsyncDirectoryGuard(targetParentGuard);
|
|
@@ -1129,6 +1145,31 @@ async function movePathFallback(root, params) {
|
|
|
1129
1145
|
assertFinalSymlinkRejected(source.resolved, params.mutationSymlinks !== undefined);
|
|
1130
1146
|
assertFinalSymlinkRejected(target.resolved, params.mutationSymlinks !== undefined);
|
|
1131
1147
|
params.assertBeforeMutation?.();
|
|
1148
|
+
if (sourceIdentity) {
|
|
1149
|
+
assertRootIdentityCurrentSync(root);
|
|
1150
|
+
assertSyncDirectoryGuard(sourceParentGuard);
|
|
1151
|
+
assertSyncDirectoryGuard(targetParentGuard);
|
|
1152
|
+
for (const [route, selected, expected, policy] of [
|
|
1153
|
+
[originalRoutes[0], source.resolved, pinnedSource.canonicalPath, PATH_ALIAS_POLICIES.strict],
|
|
1154
|
+
[originalRoutes[1], target.resolved, pinnedTarget.canonicalPath, PATH_ALIAS_POLICIES.unlinkTarget],
|
|
1155
|
+
]) {
|
|
1156
|
+
for (const absolutePath of new Set([path.isAbsolute(route) ? route : `${root.rootWithSep}${route}`, selected])) {
|
|
1157
|
+
try {
|
|
1158
|
+
const current = resolveRootPathSync({
|
|
1159
|
+
absolutePath, rootPath: root.rootReal, rootCanonicalPath: root.rootReal,
|
|
1160
|
+
rootIdentity: root.rootIdentity, boundaryLabel: "root", policy,
|
|
1161
|
+
...mutationSymlinkResolution(params.mutationSymlinks),
|
|
1162
|
+
});
|
|
1163
|
+
if (current.canonicalPath !== expected)
|
|
1164
|
+
throw new FsSafeError("path-mismatch", "move route changed during authorization");
|
|
1165
|
+
}
|
|
1166
|
+
catch (error) {
|
|
1167
|
+
throw normalizePinnedPathError(error);
|
|
1168
|
+
}
|
|
1169
|
+
}
|
|
1170
|
+
}
|
|
1171
|
+
inspectFileIdentitySync(() => admitMoveSourceStat(fsSync.lstatSync(source.resolved, { bigint: true }), true), sourceIdentity);
|
|
1172
|
+
}
|
|
1132
1173
|
await fs.rename(source.resolved, target.resolved);
|
|
1133
1174
|
}
|
|
1134
1175
|
catch (error) {
|
|
@@ -1136,9 +1177,7 @@ async function movePathFallback(root, params) {
|
|
|
1136
1177
|
throw fileNotFoundError(error instanceof Error ? error : undefined);
|
|
1137
1178
|
}
|
|
1138
1179
|
if (hasNodeErrorCode(error, "EEXIST")) {
|
|
1139
|
-
throw new FsSafeError("already-exists", "destination exists",
|
|
1140
|
-
cause: error instanceof Error ? error : undefined,
|
|
1141
|
-
});
|
|
1180
|
+
throw new FsSafeError("already-exists", "destination exists", errorCauseOptions(error));
|
|
1142
1181
|
}
|
|
1143
1182
|
throw error;
|
|
1144
1183
|
}
|
|
@@ -1156,7 +1195,11 @@ async function writeFileFallback(root, params) {
|
|
|
1156
1195
|
const policy = snapshotPinnedMutationPolicy(params.denyMutations, params.mutationSymlinks);
|
|
1157
1196
|
if (policy)
|
|
1158
1197
|
params = { ...params, ...policy };
|
|
1159
|
-
const { rootReal, resolved } = await resolveGuardedWritePathInRoot(root,
|
|
1198
|
+
const { rootReal, resolved } = await resolveGuardedWritePathInRoot(root, {
|
|
1199
|
+
relativePath: params.relativePath,
|
|
1200
|
+
denyMutations: params.denyMutations,
|
|
1201
|
+
mutationSymlinks: params.mutationSymlinks,
|
|
1202
|
+
});
|
|
1160
1203
|
await withRootFallbackCompatibilityLock({
|
|
1161
1204
|
rootPath: rootReal, rootIdentity: root.rootIdentity, targetPath: resolved, assertBeforeMutation: params.assertBeforeMutation,
|
|
1162
1205
|
}, async ({ targetPath, ...binding }) => await writeFileFallbackUnlocked(root, { ...params, ...binding }, targetPath));
|
|
@@ -1166,49 +1209,59 @@ async function writeFileFallbackUnlocked(root, params, expectedWritePath) {
|
|
|
1166
1209
|
await writeMissingFileFallback(root, params, expectedWritePath);
|
|
1167
1210
|
return;
|
|
1168
1211
|
}
|
|
1169
|
-
const
|
|
1212
|
+
const admissionParams = {
|
|
1170
1213
|
relativePath: params.relativePath,
|
|
1171
1214
|
mkdir: params.mkdir,
|
|
1172
|
-
// Private, writable placeholder: Windows cannot rename over a read-only file.
|
|
1173
|
-
mode: 0o600,
|
|
1174
1215
|
denyMutations: params.denyMutations,
|
|
1175
1216
|
assertBeforeMutation: params.assertBeforeMutation,
|
|
1176
1217
|
mutationSymlinks: params.mutationSymlinks,
|
|
1177
1218
|
truncateExisting: false,
|
|
1178
1219
|
expectedWritePath,
|
|
1179
|
-
}
|
|
1220
|
+
};
|
|
1221
|
+
const admission = await openWritableFileInRoot(root, admissionParams, { createIfMissing: false });
|
|
1222
|
+
const existing = "missing" in admission ? undefined : admission;
|
|
1223
|
+
const target = existing?.opened;
|
|
1224
|
+
const retainedSelection = existing?.writeSelection;
|
|
1225
|
+
const missingSelection = "missing" in admission ? admission.writeSelection : undefined;
|
|
1180
1226
|
const policyEnabled = params.denyMutations !== undefined || params.mutationSymlinks !== undefined;
|
|
1181
|
-
const
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
if (policyEnabled && !retainedSelection) {
|
|
1185
|
-
await target
|
|
1227
|
+
const destinationPath = "missing" in admission ? admission.targetPath
|
|
1228
|
+
: retainedSelection?.selectedPath ?? admission.opened.realPath;
|
|
1229
|
+
let mode = params.mode ?? (target ? target.stat.mode & 0o777 : undefined);
|
|
1230
|
+
if (policyEnabled && !retainedSelection && !missingSelection) {
|
|
1231
|
+
await target?.handle.close().catch(() => undefined);
|
|
1186
1232
|
throw new FsSafeError("path-mismatch", "write admission state was not retained");
|
|
1187
1233
|
}
|
|
1188
|
-
const destinationGuard = retainedSelection?.parentGuard ??
|
|
1234
|
+
const destinationGuard = "missing" in admission ? admission.parentGuard : retainedSelection?.parentGuard ??
|
|
1189
1235
|
await createAsyncDirectoryGuard(path.dirname(destinationPath), { bigint: true }).catch(async (error) => {
|
|
1190
|
-
await target
|
|
1236
|
+
await target?.handle.close().catch(() => undefined);
|
|
1191
1237
|
throw error;
|
|
1192
1238
|
});
|
|
1193
1239
|
let tempPath = null;
|
|
1194
1240
|
let unregisterTempPath = null;
|
|
1195
1241
|
let writtenHandle;
|
|
1196
1242
|
let writtenIdentity;
|
|
1197
|
-
let
|
|
1198
|
-
let published = false;
|
|
1243
|
+
let lateTargetHandle;
|
|
1199
1244
|
try {
|
|
1200
|
-
if (target.createdForWrite)
|
|
1201
|
-
placeholderIdentity = targetIdentity;
|
|
1202
1245
|
tempPath = buildAtomicWriteTempPath(destinationPath);
|
|
1203
1246
|
if (retainedSelection) {
|
|
1204
|
-
await refreshRetainedRootWriteAdmission(root, retainedSelection, true, target
|
|
1247
|
+
await refreshRetainedRootWriteAdmission(root, retainedSelection, true, target?.handle.fd);
|
|
1248
|
+
}
|
|
1249
|
+
else if (missingSelection) {
|
|
1250
|
+
await refreshRootWritePathSelection(missingSelection);
|
|
1205
1251
|
}
|
|
1206
1252
|
params.assertBeforeMutation?.();
|
|
1207
1253
|
if (retainedSelection) {
|
|
1208
|
-
assertRootWriteSelectionSync(root, retainedSelection, true, target
|
|
1254
|
+
assertRootWriteSelectionSync(root, retainedSelection, true, target?.handle.fd);
|
|
1255
|
+
}
|
|
1256
|
+
else if (missingSelection) {
|
|
1257
|
+
assertRootWritePathSelectionSync(root, missingSelection);
|
|
1209
1258
|
}
|
|
1259
|
+
assertRootIdentityCurrentSync(root);
|
|
1260
|
+
assertSyncDirectoryGuard(destinationGuard);
|
|
1210
1261
|
writtenHandle = await fs.open(tempPath, OPEN_WRITE_CREATE_FLAGS, 0o600);
|
|
1211
1262
|
writtenIdentity = fsSync.fstatSync(writtenHandle.fd, { bigint: true });
|
|
1263
|
+
// Preserve the creation mask when no existing destination supplies a mode.
|
|
1264
|
+
mode ??= Number(writtenIdentity.mode & 511n);
|
|
1212
1265
|
unregisterTempPath = registerTempPathForExit(tempPath, { identity: writtenIdentity, singleLinkFile: true });
|
|
1213
1266
|
await writeAllToFile(writtenHandle, params.data, {
|
|
1214
1267
|
encoding: params.encoding, assertBeforeMutation: params.assertBeforeMutation,
|
|
@@ -1223,24 +1276,42 @@ async function writeFileFallbackUnlocked(root, params, expectedWritePath) {
|
|
|
1223
1276
|
root, targetPath: commitTempPath, fd: commitHandle.fd,
|
|
1224
1277
|
expectedIdentity: commitIdentity, parentGuard: destinationGuard,
|
|
1225
1278
|
});
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1279
|
+
assertRootIdentityCurrentSync(root);
|
|
1280
|
+
assertSyncDirectoryGuard(destinationGuard);
|
|
1281
|
+
let publicationIdentity = inspectFallbackReplacementDestination(destinationPath);
|
|
1282
|
+
// A raced file needs its own access admission, not the old handle's rights.
|
|
1283
|
+
if (publicationIdentity && (!existing || !sameFileIdentity(publicationIdentity, existing.identity))) {
|
|
1284
|
+
const admitted = await openWritableFileInRoot(root, {
|
|
1285
|
+
...admissionParams, mkdir: false, expectedWritePath: destinationPath,
|
|
1286
|
+
}, { createIfMissing: false });
|
|
1287
|
+
lateTargetHandle = "missing" in admitted ? undefined : admitted.opened.handle;
|
|
1288
|
+
publicationIdentity = "missing" in admitted ? undefined : admitted.identity;
|
|
1289
|
+
await lateTargetHandle?.close();
|
|
1230
1290
|
}
|
|
1231
1291
|
// Windows cannot replace a destination while its old handle remains open.
|
|
1232
|
-
await target
|
|
1292
|
+
await target?.handle.close();
|
|
1233
1293
|
if (retainedSelection) {
|
|
1234
|
-
await refreshRetainedRootWriteAdmission(root, retainedSelection,
|
|
1294
|
+
await refreshRetainedRootWriteAdmission(root, retainedSelection, true);
|
|
1295
|
+
}
|
|
1296
|
+
else if (missingSelection) {
|
|
1297
|
+
await refreshRootWritePathSelection(missingSelection);
|
|
1235
1298
|
}
|
|
1236
1299
|
assertFinalSymlinkRejected(destinationPath, params.mutationSymlinks !== undefined);
|
|
1237
1300
|
params.assertBeforeMutation?.();
|
|
1238
1301
|
if (retainedSelection) {
|
|
1239
|
-
assertRootWriteSelectionSync(root, retainedSelection,
|
|
1302
|
+
assertRootWriteSelectionSync(root, retainedSelection, true);
|
|
1303
|
+
}
|
|
1304
|
+
else if (missingSelection) {
|
|
1305
|
+
assertRootWritePathSelectionSync(root, missingSelection);
|
|
1306
|
+
}
|
|
1307
|
+
assertRootIdentityCurrentSync(root);
|
|
1308
|
+
assertSyncDirectoryGuard(destinationGuard);
|
|
1309
|
+
const current = inspectFallbackReplacementDestination(destinationPath);
|
|
1310
|
+
if (publicationIdentity ? !current || !sameFileIdentity(current, publicationIdentity) : current) {
|
|
1311
|
+
throw new FsSafeError("path-mismatch", "write destination changed before publication");
|
|
1240
1312
|
}
|
|
1241
1313
|
await fs.rename(commitTempPath, destinationPath);
|
|
1242
1314
|
tempPath = null;
|
|
1243
|
-
published = true;
|
|
1244
1315
|
});
|
|
1245
1316
|
unregisterTempPath();
|
|
1246
1317
|
unregisterTempPath = null;
|
|
@@ -1253,12 +1324,8 @@ async function writeFileFallbackUnlocked(root, params, expectedWritePath) {
|
|
|
1253
1324
|
});
|
|
1254
1325
|
}
|
|
1255
1326
|
finally {
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
pathname: destinationPath, handle: target.handle, identity: placeholderIdentity, parentGuard: destinationGuard,
|
|
1259
|
-
});
|
|
1260
|
-
}
|
|
1261
|
-
await target.handle.close().catch(() => undefined);
|
|
1327
|
+
await target?.handle.close().catch(() => undefined);
|
|
1328
|
+
await lateTargetHandle?.close().catch(() => undefined);
|
|
1262
1329
|
if (tempPath && writtenHandle) {
|
|
1263
1330
|
await cleanupPinnedFilePath({
|
|
1264
1331
|
pathname: tempPath, handle: writtenHandle, identity: writtenIdentity, parentGuard: destinationGuard,
|
|
@@ -1268,6 +1335,23 @@ async function writeFileFallbackUnlocked(root, params, expectedWritePath) {
|
|
|
1268
1335
|
unregisterTempPath?.();
|
|
1269
1336
|
}
|
|
1270
1337
|
}
|
|
1338
|
+
function inspectFallbackReplacementDestination(targetPath) {
|
|
1339
|
+
let current;
|
|
1340
|
+
try {
|
|
1341
|
+
current = inspectFileIdentitySync(() => fsSync.lstatSync(targetPath, { bigint: true }));
|
|
1342
|
+
}
|
|
1343
|
+
catch (error) {
|
|
1344
|
+
if (isNotFoundPathError(error))
|
|
1345
|
+
return;
|
|
1346
|
+
throw error;
|
|
1347
|
+
}
|
|
1348
|
+
if (current.isSymbolicLink() || !current.isFile()) {
|
|
1349
|
+
throw new FsSafeError("path-mismatch", "write destination changed before publication");
|
|
1350
|
+
}
|
|
1351
|
+
if (current.nlink > 1n)
|
|
1352
|
+
throw hardlinkedPathNotAllowedError();
|
|
1353
|
+
return current;
|
|
1354
|
+
}
|
|
1271
1355
|
async function writeMissingFileFallback(root, params, expectedWritePath) {
|
|
1272
1356
|
const guardedTarget = params.denyMutations === undefined && params.mutationSymlinks === undefined
|
|
1273
1357
|
? undefined
|
|
@@ -1294,6 +1378,7 @@ async function writeMissingFileFallback(root, params, expectedWritePath) {
|
|
|
1294
1378
|
const parentGuard = pathSelection?.parentGuard ??
|
|
1295
1379
|
await createAsyncDirectoryGuard(path.dirname(targetPath), { bigint: true });
|
|
1296
1380
|
let created = false;
|
|
1381
|
+
let completed = false;
|
|
1297
1382
|
let createdIdentity;
|
|
1298
1383
|
let writtenHandle;
|
|
1299
1384
|
let verifyingPublication = false;
|
|
@@ -1337,14 +1422,13 @@ async function writeMissingFileFallback(root, params, expectedWritePath) {
|
|
|
1337
1422
|
});
|
|
1338
1423
|
if (params.durable !== false)
|
|
1339
1424
|
await syncDirectoryBestEffort(path.dirname(targetPath));
|
|
1425
|
+
completed = true;
|
|
1340
1426
|
}
|
|
1341
1427
|
catch (err) {
|
|
1342
1428
|
if (verifyingPublication)
|
|
1343
1429
|
throw err;
|
|
1344
1430
|
if (hasNodeErrorCode(err, "EEXIST")) {
|
|
1345
|
-
throw new FsSafeError("already-exists", "file already exists",
|
|
1346
|
-
cause: err instanceof Error ? err : undefined,
|
|
1347
|
-
});
|
|
1431
|
+
throw new FsSafeError("already-exists", "file already exists", errorCauseOptions(err));
|
|
1348
1432
|
}
|
|
1349
1433
|
throw err;
|
|
1350
1434
|
}
|
|
@@ -1354,6 +1438,9 @@ async function writeMissingFileFallback(root, params, expectedWritePath) {
|
|
|
1354
1438
|
pathname: targetPath, handle: writtenHandle, identity: createdIdentity, parentGuard,
|
|
1355
1439
|
});
|
|
1356
1440
|
}
|
|
1357
|
-
|
|
1441
|
+
if (completed)
|
|
1442
|
+
await writtenHandle?.close();
|
|
1443
|
+
else
|
|
1444
|
+
await writtenHandle?.close().catch(() => undefined);
|
|
1358
1445
|
}
|
|
1359
1446
|
}
|