@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
|
@@ -0,0 +1,371 @@
|
|
|
1
|
+
import fs, {} from "node:fs";
|
|
2
|
+
import fsAsync from "node:fs/promises";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import { assertDirectoryIdentitySync, inspectDirectoryIdentitySync, } from "./directory-guard.js";
|
|
5
|
+
import { nodeDarwinDirectoryMetadataFlags, nodeDirectorySearchOnlyFlags } from "./directory-mode-node.js";
|
|
6
|
+
import { FsSafeError } from "./errors.js";
|
|
7
|
+
import { sameFileIdentityForCleanup } from "./file-identity.js";
|
|
8
|
+
import { assertSynchronousCallbackResult } from "./mutation-authority.js";
|
|
9
|
+
import { getNativeBinding } from "./native.js";
|
|
10
|
+
import { getFsSafeNativeConfig } from "./native-config.js";
|
|
11
|
+
import { warnNativeFallback } from "./native-fallback-warning.js";
|
|
12
|
+
import { assertNoNulPathInput } from "./path.js";
|
|
13
|
+
import { realpathSync } from "./realpath.js";
|
|
14
|
+
import { inspectFileIdentitySync } from "./strict-file-identity.js";
|
|
15
|
+
import { assertNoWindowsPathAlias, resolvePathPreservingWindowsRoot } from "./windows-path-alias.js";
|
|
16
|
+
import { inspectWindowsDirectoryCommand, inspectWindowsDirectoryCommandSync, protectPrivateWindowsFileCommand, protectPrivateWindowsFileCommandSync, verifyPrivateWindowsFileCommand, verifyPrivateWindowsFileCommandSync, hasUnsettledWindowsSecurityCommand, } from "./windows-security-command.js";
|
|
17
|
+
export function resolveCreationPermissions(options, directory) {
|
|
18
|
+
const privatePath = options.private;
|
|
19
|
+
const mode = options.mode;
|
|
20
|
+
if (privatePath !== undefined && typeof privatePath !== "boolean") {
|
|
21
|
+
throw new TypeError("private must be a boolean");
|
|
22
|
+
}
|
|
23
|
+
if (mode !== undefined && (!Number.isInteger(mode) || mode < 0 || mode > 0o7777)) {
|
|
24
|
+
throw new RangeError("mode must contain only permission bits");
|
|
25
|
+
}
|
|
26
|
+
if (privatePath && mode !== undefined && (mode & 0o7077) !== 0) {
|
|
27
|
+
throw new FsSafeError("insecure-permissions", "private creation requires owner-only permission bits");
|
|
28
|
+
}
|
|
29
|
+
if (privatePath)
|
|
30
|
+
assertDarwinPrivateCreationAvailable();
|
|
31
|
+
if (privatePath && directory)
|
|
32
|
+
assertDarwinPrivateDirectoryMode(mode ?? 0o700);
|
|
33
|
+
return { private: privatePath === true, mode: mode ?? (privatePath ? directory ? 0o700 : 0o600 : undefined) };
|
|
34
|
+
}
|
|
35
|
+
function assertPrivatePosixDirectory(stat) {
|
|
36
|
+
if (typeof process.getuid !== "function" || stat.uid !== BigInt(process.getuid())) {
|
|
37
|
+
throw new FsSafeError("not-owned", "private directory must belong to the current user");
|
|
38
|
+
}
|
|
39
|
+
if ((stat.mode & 3647n) !== 0n) {
|
|
40
|
+
throw new FsSafeError("insecure-permissions", "existing directory is not private");
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
function unavailable() {
|
|
44
|
+
throw new FsSafeError("helper-unavailable", "private Windows creation requires an up-to-date native helper");
|
|
45
|
+
}
|
|
46
|
+
export function assertPrivateFileCreationAvailable() {
|
|
47
|
+
const native = getNativeBinding();
|
|
48
|
+
if (process.platform !== "win32" || getFsSafeNativeConfig().mode !== "require")
|
|
49
|
+
return;
|
|
50
|
+
if (typeof native?.createPrivateDirectoryWithParentIdentity !== "function" ||
|
|
51
|
+
typeof native.inspectWindowsDirectory !== "function" ||
|
|
52
|
+
typeof native.protectPrivateWindowsFile !== "function" ||
|
|
53
|
+
typeof native.verifyPrivateWindowsFile !== "function")
|
|
54
|
+
unavailable();
|
|
55
|
+
}
|
|
56
|
+
function commandFallback() {
|
|
57
|
+
if (getFsSafeNativeConfig().mode === "require")
|
|
58
|
+
unavailable();
|
|
59
|
+
warnNativeFallback("windows-private-creation", "Private Windows creation uses a slower built-in system command.");
|
|
60
|
+
}
|
|
61
|
+
function creationOperation(name) {
|
|
62
|
+
const native = getNativeBinding();
|
|
63
|
+
const operation = native?.[name];
|
|
64
|
+
if (typeof operation === "function")
|
|
65
|
+
return operation.bind(native);
|
|
66
|
+
commandFallback();
|
|
67
|
+
return undefined;
|
|
68
|
+
}
|
|
69
|
+
/** Full Windows identity, with security validation when requested; no repairs. */
|
|
70
|
+
export function inspectCreationDirectorySync(targetPath, privatePath) {
|
|
71
|
+
assertNoWindowsPathAlias(targetPath, "filesystem");
|
|
72
|
+
const inspect = creationOperation("inspectWindowsDirectory");
|
|
73
|
+
return (inspect ? inspect(targetPath, privatePath) : inspectWindowsDirectoryCommandSync(targetPath, privatePath)).identity;
|
|
74
|
+
}
|
|
75
|
+
export async function inspectCreationDirectory(targetPath, privatePath) {
|
|
76
|
+
assertNoWindowsPathAlias(targetPath, "filesystem");
|
|
77
|
+
const inspect = creationOperation("inspectWindowsDirectory");
|
|
78
|
+
return (inspect ? inspect(targetPath, privatePath) : await inspectWindowsDirectoryCommand(targetPath, privatePath)).identity;
|
|
79
|
+
}
|
|
80
|
+
export function assertPrivateDirectorySync(targetPath) {
|
|
81
|
+
const stat = inspectDirectoryIdentitySync(targetPath);
|
|
82
|
+
if (process.platform === "win32")
|
|
83
|
+
inspectCreationDirectorySync(targetPath, true);
|
|
84
|
+
else {
|
|
85
|
+
assertPrivatePosixDirectory(stat);
|
|
86
|
+
assertDarwinCreationDirectoryAcl(targetPath, stat);
|
|
87
|
+
}
|
|
88
|
+
inspectDirectoryIdentitySync(targetPath, stat);
|
|
89
|
+
}
|
|
90
|
+
export async function assertPrivateDirectory(targetPath) {
|
|
91
|
+
const stat = inspectDirectoryIdentitySync(targetPath);
|
|
92
|
+
if (process.platform === "win32")
|
|
93
|
+
await inspectCreationDirectory(targetPath, true);
|
|
94
|
+
else {
|
|
95
|
+
assertPrivatePosixDirectory(stat);
|
|
96
|
+
assertDarwinCreationDirectoryAcl(targetPath, stat);
|
|
97
|
+
}
|
|
98
|
+
inspectDirectoryIdentitySync(targetPath, stat);
|
|
99
|
+
}
|
|
100
|
+
export function protectCreatedFileSync(fd, targetPath, parentIdentity) {
|
|
101
|
+
const protect = creationOperation("protectPrivateWindowsFile");
|
|
102
|
+
return (protect ? protect(fd, targetPath, parentIdentity)
|
|
103
|
+
: protectPrivateWindowsFileCommandSync(fd, targetPath, parentIdentity)).identity;
|
|
104
|
+
}
|
|
105
|
+
export async function protectCreatedFile(fd, targetPath, parentIdentity) {
|
|
106
|
+
const protect = creationOperation("protectPrivateWindowsFile");
|
|
107
|
+
return (protect ? protect(fd, targetPath, parentIdentity)
|
|
108
|
+
: await protectPrivateWindowsFileCommand(fd, targetPath, parentIdentity)).identity;
|
|
109
|
+
}
|
|
110
|
+
export function verifyCreatedFileSync(fd, targetPath, identity, parentIdentity, links = 1) {
|
|
111
|
+
const verify = creationOperation("verifyPrivateWindowsFile");
|
|
112
|
+
if (verify)
|
|
113
|
+
verify(fd, targetPath, identity, parentIdentity, links);
|
|
114
|
+
else
|
|
115
|
+
verifyPrivateWindowsFileCommandSync(fd, targetPath, identity, parentIdentity, links);
|
|
116
|
+
}
|
|
117
|
+
export async function verifyCreatedFile(fd, targetPath, identity, parentIdentity, links = 1) {
|
|
118
|
+
const verify = creationOperation("verifyPrivateWindowsFile");
|
|
119
|
+
if (verify)
|
|
120
|
+
verify(fd, targetPath, identity, parentIdentity, links);
|
|
121
|
+
else
|
|
122
|
+
await verifyPrivateWindowsFileCommand(fd, targetPath, identity, parentIdentity, links);
|
|
123
|
+
}
|
|
124
|
+
function inspector() {
|
|
125
|
+
const native = getNativeBinding();
|
|
126
|
+
if (typeof native?.inspectDarwinAcl !== "function") {
|
|
127
|
+
throw new FsSafeError("helper-unavailable", "private Darwin creation requires native descriptor ACL inspection");
|
|
128
|
+
}
|
|
129
|
+
return native.inspectDarwinAcl.bind(native);
|
|
130
|
+
}
|
|
131
|
+
export function assertDarwinPrivateCreationAvailable() {
|
|
132
|
+
if (process.platform === "darwin")
|
|
133
|
+
inspector();
|
|
134
|
+
}
|
|
135
|
+
export function assertDarwinPrivateDirectoryMode(mode) {
|
|
136
|
+
if (process.platform === "darwin" && ((mode & ~process.umask()) & 0o500) === 0) {
|
|
137
|
+
throw new FsSafeError("helper-unavailable", "private Darwin directory ACL inspection requires owner read or search permission");
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
export function assertDarwinCreationAcl(fd, inheritanceTarget) {
|
|
141
|
+
if (process.platform !== "darwin")
|
|
142
|
+
return;
|
|
143
|
+
const inspect = inspector();
|
|
144
|
+
const state = inspect(fd, inheritanceTarget)?.state;
|
|
145
|
+
if (state === "present") {
|
|
146
|
+
throw new FsSafeError("insecure-permissions", inheritanceTarget
|
|
147
|
+
? "private creation parent has inheritable Darwin ACL entries"
|
|
148
|
+
: "private creation object has Darwin ACL entries");
|
|
149
|
+
}
|
|
150
|
+
if (state !== "absent" && state !== "empty") {
|
|
151
|
+
throw new FsSafeError("helper-unavailable", "native Darwin ACL inspection returned incomplete facts");
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
export function assertDarwinCreationDirectoryAcl(pathname, expected, inheritanceTarget) {
|
|
155
|
+
if (process.platform !== "darwin")
|
|
156
|
+
return;
|
|
157
|
+
assertDarwinPrivateCreationAvailable();
|
|
158
|
+
let fd;
|
|
159
|
+
try {
|
|
160
|
+
fd = fs.openSync(pathname, nodeDarwinDirectoryMetadataFlags());
|
|
161
|
+
}
|
|
162
|
+
catch (error) {
|
|
163
|
+
if (error.code !== "EACCES")
|
|
164
|
+
throw error;
|
|
165
|
+
const search = nodeDirectorySearchOnlyFlags();
|
|
166
|
+
if (!search)
|
|
167
|
+
throw error;
|
|
168
|
+
try {
|
|
169
|
+
fd = fs.openSync(pathname, search.flags | fs.constants.O_DIRECTORY | fs.constants.O_NOFOLLOW | fs.constants.O_NONBLOCK);
|
|
170
|
+
}
|
|
171
|
+
catch (cause) {
|
|
172
|
+
if (cause.code !== "EACCES")
|
|
173
|
+
throw cause;
|
|
174
|
+
throw new FsSafeError("helper-unavailable", "private Darwin directory ACL inspection requires owner read or search permission", { cause });
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
try {
|
|
178
|
+
const opened = inspectFileIdentitySync(() => fs.fstatSync(fd, { bigint: true }), expected);
|
|
179
|
+
if (!opened.isDirectory())
|
|
180
|
+
throw new FsSafeError("path-mismatch", "ACL target is not the admitted directory");
|
|
181
|
+
assertDarwinCreationAcl(fd, inheritanceTarget);
|
|
182
|
+
inspectDirectoryIdentitySync(pathname, expected);
|
|
183
|
+
}
|
|
184
|
+
finally {
|
|
185
|
+
fs.closeSync(fd);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
export function assertCreationFile(fd, pathname, expected) {
|
|
189
|
+
const opened = inspectFileIdentitySync(() => fs.fstatSync(fd, { bigint: true }), expected);
|
|
190
|
+
const named = inspectFileIdentitySync(() => fs.lstatSync(pathname, { bigint: true }), opened);
|
|
191
|
+
if (!opened.isFile() || !named.isFile() || named.isSymbolicLink() || opened.nlink !== 1n || named.nlink !== 1n) {
|
|
192
|
+
throw new FsSafeError("path-mismatch", "created file is not the expected single-linked regular file");
|
|
193
|
+
}
|
|
194
|
+
return opened;
|
|
195
|
+
}
|
|
196
|
+
export function assertPrivateCreationFile(stat, fd) {
|
|
197
|
+
if (process.platform === "win32")
|
|
198
|
+
return;
|
|
199
|
+
if (typeof process.getuid !== "function" || stat.uid !== BigInt(process.getuid())) {
|
|
200
|
+
throw new FsSafeError("not-owned", "created private file must belong to the current user");
|
|
201
|
+
}
|
|
202
|
+
if ((stat.mode & 3647n) !== 0n) {
|
|
203
|
+
throw new FsSafeError("insecure-permissions", "created private file is not owner-only");
|
|
204
|
+
}
|
|
205
|
+
assertDarwinCreationAcl(fd);
|
|
206
|
+
}
|
|
207
|
+
function assertRecordedFile(current, identity) {
|
|
208
|
+
if (!current.isFile() || current.isSymbolicLink() || !sameFileIdentityForCleanup(current, identity)) {
|
|
209
|
+
throw new FsSafeError("path-mismatch", "created file cleanup preserved a replacement");
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
export function removeRecordedCreationFileSync(pathname, identity, assertParent) {
|
|
213
|
+
assertParent();
|
|
214
|
+
let current;
|
|
215
|
+
try {
|
|
216
|
+
current = fs.lstatSync(pathname, { bigint: true });
|
|
217
|
+
}
|
|
218
|
+
catch (error) {
|
|
219
|
+
if (error?.code === "ENOENT")
|
|
220
|
+
return;
|
|
221
|
+
throw error;
|
|
222
|
+
}
|
|
223
|
+
assertRecordedFile(current, identity);
|
|
224
|
+
fs.unlinkSync(pathname);
|
|
225
|
+
}
|
|
226
|
+
export async function removeRecordedCreationFile(pathname, identity, assertParent) {
|
|
227
|
+
assertParent();
|
|
228
|
+
let current;
|
|
229
|
+
try {
|
|
230
|
+
current = await fsAsync.lstat(pathname, { bigint: true });
|
|
231
|
+
}
|
|
232
|
+
catch (error) {
|
|
233
|
+
if (error?.code === "ENOENT")
|
|
234
|
+
return;
|
|
235
|
+
throw error;
|
|
236
|
+
}
|
|
237
|
+
assertParent();
|
|
238
|
+
assertRecordedFile(current, identity);
|
|
239
|
+
// Recheck after the awaited observation before dispatching the unlink.
|
|
240
|
+
assertRecordedFile(fs.lstatSync(pathname, { bigint: true }), identity);
|
|
241
|
+
await fsAsync.unlink(pathname);
|
|
242
|
+
}
|
|
243
|
+
export function creationPublicationAfterFailure(error, recorded) {
|
|
244
|
+
if (error instanceof FsSafeError) {
|
|
245
|
+
const publication = error.details?.publication;
|
|
246
|
+
if (publication && typeof publication === "object" && "status" in publication &&
|
|
247
|
+
publication.status === "indeterminate")
|
|
248
|
+
return "indeterminate";
|
|
249
|
+
}
|
|
250
|
+
return recorded;
|
|
251
|
+
}
|
|
252
|
+
export function hasPreservedCreationArtifacts(error) {
|
|
253
|
+
if (!(error instanceof FsSafeError))
|
|
254
|
+
return false;
|
|
255
|
+
if (error.details?.cleanup === "preserved" || error.details?.cleanup === "failed")
|
|
256
|
+
return true;
|
|
257
|
+
const publication = error.details?.publication;
|
|
258
|
+
return publication !== null && typeof publication === "object" && "status" in publication &&
|
|
259
|
+
(publication.status === "published" || publication.status === "indeterminate");
|
|
260
|
+
}
|
|
261
|
+
export function rethrowPrivateStageCreationFailure(error, path, stageDirectory) {
|
|
262
|
+
if (error instanceof FsSafeError && error.code === "already-exists") {
|
|
263
|
+
throw new FsSafeError("helper-failed", "private file staging path already exists", {
|
|
264
|
+
cause: error, details: { publication: { status: "not-published" }, path, stageDirectory },
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
const publication = error instanceof FsSafeError ? error.details?.publication : undefined;
|
|
268
|
+
const created = error instanceof FsSafeError && error.details?.path === stageDirectory &&
|
|
269
|
+
publication !== null && typeof publication === "object" && "status" in publication &&
|
|
270
|
+
publication.status === "published";
|
|
271
|
+
let unconfirmed = hasUnsettledWindowsSecurityCommand(error);
|
|
272
|
+
if (error !== null && (typeof error === "object" || typeof error === "function")) {
|
|
273
|
+
try {
|
|
274
|
+
const outcome = Object.getOwnPropertyDescriptor(error, "creationOutcome");
|
|
275
|
+
unconfirmed ||= Boolean(outcome && "value" in outcome && outcome.value === "unconfirmed");
|
|
276
|
+
}
|
|
277
|
+
catch {
|
|
278
|
+
unconfirmed = true;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
if (created || unconfirmed) {
|
|
282
|
+
throw privateFileSettlementFailure({
|
|
283
|
+
primary: error, cleanup: [], publication: "not-published", path, stageDirectory, preserved: true,
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
throw error;
|
|
287
|
+
}
|
|
288
|
+
export function privateFileSettlementFailure(params) {
|
|
289
|
+
return new FsSafeError("helper-failed", "file creation or staging settlement failed", {
|
|
290
|
+
cause: params.cleanup.length
|
|
291
|
+
? new AggregateError([params.primary, ...params.cleanup], "file creation and cleanup failed")
|
|
292
|
+
: params.primary,
|
|
293
|
+
details: {
|
|
294
|
+
publication: { status: params.publication }, path: params.path, stageDirectory: params.stageDirectory,
|
|
295
|
+
cleanup: params.preserved || params.publication === "indeterminate" ? "preserved" : params.cleanup.length ? "failed" : "removed",
|
|
296
|
+
},
|
|
297
|
+
});
|
|
298
|
+
}
|
|
299
|
+
export function assertBeforeCreation(selected, permissions, assertion, kind) {
|
|
300
|
+
if (permissions.private)
|
|
301
|
+
assertDarwinCreationDirectoryAcl(selected.parent.dir, selected.parent.stat, kind);
|
|
302
|
+
assertSynchronousCallbackResult(assertion?.(), "assertBeforeMutation");
|
|
303
|
+
selected.assertParent();
|
|
304
|
+
if (permissions.private && kind === "directory")
|
|
305
|
+
assertDarwinPrivateDirectoryMode(permissions.mode);
|
|
306
|
+
if (permissions.private)
|
|
307
|
+
assertDarwinCreationDirectoryAcl(selected.parent.dir, selected.parent.stat, kind);
|
|
308
|
+
}
|
|
309
|
+
export function creationAdmissionFromParent(parent) {
|
|
310
|
+
const { dev, ino } = parent.stat;
|
|
311
|
+
if (typeof dev !== "bigint" || typeof ino !== "bigint") {
|
|
312
|
+
throw new FsSafeError("path-mismatch", "private creation requires an exact parent identity");
|
|
313
|
+
}
|
|
314
|
+
const identity = inspectDirectoryIdentitySync(parent.dir, { dev, ino });
|
|
315
|
+
return { expectedParentIdentity: { dev: identity.dev, ino: identity.ino, realPath: parent.realPath } };
|
|
316
|
+
}
|
|
317
|
+
export function prepareCreationPath(input, expectedParent) {
|
|
318
|
+
expectedParent = expectedParent && { dev: expectedParent.dev, ino: expectedParent.ino, realPath: expectedParent.realPath };
|
|
319
|
+
assertNoNulPathInput(input);
|
|
320
|
+
assertNoWindowsPathAlias(input, "filesystem");
|
|
321
|
+
if (process.platform === "win32" && input.replaceAll("/", "\\").split("\\")
|
|
322
|
+
.some(component => component.endsWith(".") || component.endsWith(" "))) {
|
|
323
|
+
throw new FsSafeError("invalid-path", "creation path contains an ambiguous Windows component");
|
|
324
|
+
}
|
|
325
|
+
const target = resolvePathPreservingWindowsRoot(input);
|
|
326
|
+
const directory = path.dirname(target);
|
|
327
|
+
if (target === directory || input.length === 0) {
|
|
328
|
+
throw new FsSafeError("invalid-path", "creation requires a child name");
|
|
329
|
+
}
|
|
330
|
+
if (expectedParent)
|
|
331
|
+
assertDirectoryIdentitySync(directory, expectedParent);
|
|
332
|
+
const stat = inspectDirectoryIdentitySync(directory);
|
|
333
|
+
const realPath = realpathSync.native(directory);
|
|
334
|
+
const parent = { dir: directory, realPath, stat };
|
|
335
|
+
const assertParent = () => {
|
|
336
|
+
assertDirectoryIdentitySync(directory, { dev: stat.dev, ino: stat.ino, realPath });
|
|
337
|
+
if (expectedParent)
|
|
338
|
+
assertDirectoryIdentitySync(directory, expectedParent);
|
|
339
|
+
};
|
|
340
|
+
assertParent();
|
|
341
|
+
return { target, parent, assertParent };
|
|
342
|
+
}
|
|
343
|
+
export function creationCollision(error) {
|
|
344
|
+
if (error?.code === "EEXIST") {
|
|
345
|
+
return new FsSafeError("already-exists", "creation target already exists", { cause: error });
|
|
346
|
+
}
|
|
347
|
+
return error;
|
|
348
|
+
}
|
|
349
|
+
/** Remove only the recorded empty stage; never traverse a replaced directory. */
|
|
350
|
+
export function removeCreationDirectory(directory, identity, assertParent) {
|
|
351
|
+
assertParent();
|
|
352
|
+
try {
|
|
353
|
+
assertDirectoryIdentitySync(directory, identity);
|
|
354
|
+
fs.rmdirSync(directory);
|
|
355
|
+
}
|
|
356
|
+
catch (error) {
|
|
357
|
+
if (error?.code !== "ENOENT")
|
|
358
|
+
throw error;
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
export async function removeCreationDirectoryAsync(directory, identity, assertParent) {
|
|
362
|
+
assertParent();
|
|
363
|
+
try {
|
|
364
|
+
assertDirectoryIdentitySync(directory, identity);
|
|
365
|
+
await fsAsync.rmdir(directory);
|
|
366
|
+
}
|
|
367
|
+
catch (error) {
|
|
368
|
+
if (error?.code !== "ENOENT")
|
|
369
|
+
throw error;
|
|
370
|
+
}
|
|
371
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { isPathInside } from "./path.js";
|
|
3
|
+
import { probePathCaseInsensitiveSync } from "./path-case.js";
|
|
4
|
+
import { observeMutationPath } from "./pinned-mutation-observation.js";
|
|
5
|
+
function foldedName(name) {
|
|
6
|
+
// Decompose before folding so combining marks precede an expanded Greek subscript.
|
|
7
|
+
// Default folding preserves dotless i even though its uppercase mapping is I.
|
|
8
|
+
return name.normalize("NFD").replace(/[^\u0131]+/gu, part => part.toLowerCase().toUpperCase().toLowerCase()).normalize("NFC");
|
|
9
|
+
}
|
|
10
|
+
function asciiCasePair(left, right) {
|
|
11
|
+
return /^[\x00-\x7f]*$/.test(left) && /^[\x00-\x7f]*$/.test(right) &&
|
|
12
|
+
left.toLowerCase() === right.toLowerCase();
|
|
13
|
+
}
|
|
14
|
+
/** Cache observations only within one synchronous policy check, never across mutations or callbacks. */
|
|
15
|
+
export function createMutationDenyMatcher() {
|
|
16
|
+
const observations = new Map();
|
|
17
|
+
const caseObservations = new Map();
|
|
18
|
+
const observe = (pathname) => {
|
|
19
|
+
if (!observations.has(pathname))
|
|
20
|
+
observations.set(pathname, observeMutationPath(pathname));
|
|
21
|
+
return observations.get(pathname);
|
|
22
|
+
};
|
|
23
|
+
const prospectiveInside = (parent, child) => {
|
|
24
|
+
const root = path.parse(parent).root;
|
|
25
|
+
if (root !== path.parse(child).root)
|
|
26
|
+
return false;
|
|
27
|
+
const left = parent.slice(root.length).split(path.sep);
|
|
28
|
+
const right = child.slice(root.length).split(path.sep).slice(0, left.length);
|
|
29
|
+
if (left.length !== right.length || !left.every((name, i) => foldedName(name) === foldedName(right[i]))) {
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
// Byte-identical relations were already handled without any observations.
|
|
33
|
+
if (left.every((name, i) => name === right[i]))
|
|
34
|
+
return false;
|
|
35
|
+
const alignedChild = path.join(root, ...right);
|
|
36
|
+
const a = observe(parent);
|
|
37
|
+
const b = observe(alignedChild);
|
|
38
|
+
if (!a || !b)
|
|
39
|
+
return true;
|
|
40
|
+
// Distinct existing ancestors are real objects, not prospective aliases.
|
|
41
|
+
if (a.canonicalAncestor !== b.canonicalAncestor ||
|
|
42
|
+
a.missingSegments.length === 0 || a.missingSegments.length !== b.missingSegments.length)
|
|
43
|
+
return false;
|
|
44
|
+
const missingLeft = a.missingSegments;
|
|
45
|
+
const missingRight = b.missingSegments;
|
|
46
|
+
if (!missingLeft.every((name, i) => foldedName(name) === foldedName(missingRight[i])))
|
|
47
|
+
return false;
|
|
48
|
+
const difference = missingLeft.findIndex((name, i) => name !== missingRight[i]);
|
|
49
|
+
if (difference === -1)
|
|
50
|
+
return true;
|
|
51
|
+
// A read-only ASCII observation can disprove aliasing at this existing parent.
|
|
52
|
+
// It cannot prove Unicode sensitivity or the behavior of a future directory.
|
|
53
|
+
if (difference === 0 && asciiCasePair(missingLeft[0], missingRight[0])) {
|
|
54
|
+
if (!caseObservations.has(a.canonicalAncestor)) {
|
|
55
|
+
caseObservations.set(a.canonicalAncestor, probePathCaseInsensitiveSync(path.join(a.canonicalAncestor, missingLeft[0]), { allowTemporaryProbe: false }));
|
|
56
|
+
}
|
|
57
|
+
if (caseObservations.get(a.canonicalAncestor) === false)
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
// Suffix probing writes directories. Policy admission has no authority for
|
|
61
|
+
// those side effects, so unproven case/normalization equivalence fails closed.
|
|
62
|
+
return true;
|
|
63
|
+
};
|
|
64
|
+
return (target, denied, prefix, protectAncestors = false) => {
|
|
65
|
+
if ((isPathInside(denied, target) && (prefix || isPathInside(target, denied))) ||
|
|
66
|
+
(protectAncestors && isPathInside(target, denied)))
|
|
67
|
+
return true;
|
|
68
|
+
return ((prefix || target.split(path.sep).length === denied.split(path.sep).length) &&
|
|
69
|
+
prospectiveInside(denied, target)) || (protectAncestors && prospectiveInside(target, denied));
|
|
70
|
+
};
|
|
71
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare function resolveMutationComparablePaths(rawPath: string):
|
|
1
|
+
export declare function resolveMutationComparablePaths(rawPath: string): Set<string>;
|
|
2
2
|
export type DenyMutationPolicy = {
|
|
3
3
|
paths?: readonly string[];
|
|
4
4
|
prefixes?: readonly string[];
|
|
@@ -6,7 +6,6 @@ export type DenyMutationPolicy = {
|
|
|
6
6
|
type DenyMutationCheckOptions = {
|
|
7
7
|
protectAncestors?: boolean;
|
|
8
8
|
};
|
|
9
|
-
export declare function assertMutationNotDenied(filePath: string, policy: DenyMutationPolicy | undefined, options?: DenyMutationCheckOptions):
|
|
9
|
+
export declare function assertMutationNotDenied(filePath: string, policy: DenyMutationPolicy | undefined, options?: DenyMutationCheckOptions, mode?: "root" | "sync-root-lock"): void;
|
|
10
10
|
export declare function mergeDenyMutationPolicies(defaultPolicy: DenyMutationPolicy | undefined, callPolicy: DenyMutationPolicy | undefined): DenyMutationPolicy | undefined;
|
|
11
11
|
export {};
|
|
12
|
-
//# sourceMappingURL=deny-mutations.d.ts.map
|
|
@@ -1,61 +1,82 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
1
2
|
import path from "node:path";
|
|
3
|
+
import { createMutationDenyMatcher } from "./deny-mutation-match.js";
|
|
2
4
|
import { FsSafeError } from "./errors.js";
|
|
3
|
-
import { assertNoNulPathInput,
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
5
|
+
import { assertNoNulPathInput, isNotFoundPathError } from "./path.js";
|
|
6
|
+
import { realpathSync } from "./realpath.js";
|
|
7
|
+
import { resolveExistingAncestor } from "./root-path-existing.js";
|
|
8
|
+
import { assertNoWindowsPathAlias, pathForWindowsFilesystem, resolvePathPreservingWindowsRoot, } from "./windows-path-alias.js";
|
|
9
|
+
export function resolveMutationComparablePaths(rawPath) {
|
|
7
10
|
assertNoNulPathInput(rawPath, "path contains a NUL byte");
|
|
8
11
|
assertNoWindowsPathAlias(rawPath, "filesystem", "mutation path uses a Windows filesystem namespace alias");
|
|
9
12
|
const resolved = resolvePathPreservingWindowsRoot(rawPath);
|
|
10
13
|
assertNoWindowsPathAlias(resolved, "filesystem", "mutation path uses a Windows filesystem namespace alias");
|
|
11
|
-
const canonical =
|
|
14
|
+
const canonical = resolveExistingAncestor(resolved, "native");
|
|
12
15
|
assertNoWindowsPathAlias(canonical, "filesystem", "mutation path uses a Windows filesystem namespace alias");
|
|
13
16
|
return new Set([resolved, canonical]);
|
|
14
17
|
}
|
|
15
|
-
function
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
function strictMutationComparablePaths(pathname) {
|
|
19
|
+
const resolved = resolvePathPreservingWindowsRoot(pathname);
|
|
20
|
+
assertNoWindowsPathAlias(resolved, "filesystem", "mutation path uses a Windows filesystem namespace alias");
|
|
21
|
+
let cursor = resolved;
|
|
22
|
+
const filesystemRoot = path.parse(resolved).root;
|
|
23
|
+
while (cursor !== filesystemRoot) {
|
|
24
|
+
try {
|
|
25
|
+
fs.lstatSync(pathForWindowsFilesystem(cursor));
|
|
26
|
+
break;
|
|
27
|
+
}
|
|
28
|
+
catch (error) {
|
|
29
|
+
if (!isNotFoundPathError(error))
|
|
30
|
+
throw error;
|
|
31
|
+
cursor = path.dirname(cursor);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
// Synchronous Root locks require authority-grade canonicalization. Keep
|
|
35
|
+
// ambiguous existing ancestors distinct from Root's lexical fallback.
|
|
36
|
+
const canonicalAncestor = realpathSync.native(pathForWindowsFilesystem(cursor));
|
|
37
|
+
assertNoWindowsPathAlias(canonicalAncestor, "filesystem", "mutation path uses a Windows filesystem namespace alias");
|
|
38
|
+
const canonical = cursor === resolved
|
|
39
|
+
? canonicalAncestor
|
|
40
|
+
: path.resolve(canonicalAncestor, `.${path.sep}${resolved.slice(cursor.length)}`);
|
|
41
|
+
assertNoWindowsPathAlias(canonical, "filesystem", "mutation path uses a Windows filesystem namespace alias");
|
|
42
|
+
return path.relative(path.resolve(resolved), path.resolve(canonical)) === ""
|
|
43
|
+
? [resolved] : [resolved, canonical];
|
|
20
44
|
}
|
|
21
|
-
function policyPathEntries(entries) {
|
|
45
|
+
function policyPathEntries(entries, strict) {
|
|
22
46
|
const paths = [];
|
|
23
47
|
for (const entry of entries ?? []) {
|
|
48
|
+
if (strict && (!entry || !path.isAbsolute(entry))) {
|
|
49
|
+
throw new FsSafeError("invalid-path", "deny mutation paths must be non-empty absolute paths");
|
|
50
|
+
}
|
|
24
51
|
if (entry.length === 0) {
|
|
25
52
|
throw new FsSafeError("invalid-path", "deny mutation paths must be non-empty");
|
|
26
53
|
}
|
|
27
54
|
assertNoNulPathInput(entry, "deny mutation path contains a NUL byte");
|
|
28
55
|
assertNoWindowsPathAlias(entry, "filesystem", "deny mutation path uses a Windows filesystem namespace alias");
|
|
29
|
-
if (!path.isAbsolute(entry)) {
|
|
56
|
+
if (!strict && !path.isAbsolute(entry)) {
|
|
30
57
|
throw new FsSafeError("invalid-path", "deny mutation paths must be absolute");
|
|
31
58
|
}
|
|
32
|
-
paths.push(entry);
|
|
59
|
+
paths.push(strict ? resolvePathPreservingWindowsRoot(entry) : entry);
|
|
33
60
|
}
|
|
34
61
|
return paths;
|
|
35
62
|
}
|
|
36
|
-
export
|
|
37
|
-
if (!
|
|
63
|
+
export function assertMutationNotDenied(filePath, policy, options = {}, mode = "root") {
|
|
64
|
+
if (!policy?.paths?.length && !policy?.prefixes?.length)
|
|
38
65
|
return;
|
|
39
|
-
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
const deniedPaths = await resolveMutationComparablePaths(deniedPrefix);
|
|
54
|
-
for (const target of targetPaths) {
|
|
55
|
-
for (const denied of deniedPaths) {
|
|
56
|
-
if (isPathInside(denied, target) ||
|
|
57
|
-
(options.protectAncestors === true && isPathInside(target, denied))) {
|
|
58
|
-
throw new FsSafeError("denied-path", "path is denied by denyMutations policy");
|
|
66
|
+
const strict = mode === "sync-root-lock";
|
|
67
|
+
const comparablePaths = strict ? strictMutationComparablePaths : resolveMutationComparablePaths;
|
|
68
|
+
const targets = comparablePaths(filePath);
|
|
69
|
+
const matches = createMutationDenyMatcher();
|
|
70
|
+
// Validate one complete phase at a time. A paths denial must not read or
|
|
71
|
+
// canonicalize prefixes, and invalid later paths retain validation precedence.
|
|
72
|
+
for (const kind of ["paths", "prefixes"]) {
|
|
73
|
+
for (const entry of policyPathEntries(policy[kind], strict)) {
|
|
74
|
+
const deniedPaths = comparablePaths(entry);
|
|
75
|
+
for (const target of targets) {
|
|
76
|
+
for (const denied of deniedPaths) {
|
|
77
|
+
if (matches(target, denied, kind === "prefixes", options.protectAncestors)) {
|
|
78
|
+
throw new FsSafeError("denied-path", "path is denied by denyMutations policy");
|
|
79
|
+
}
|
|
59
80
|
}
|
|
60
81
|
}
|
|
61
82
|
}
|
|
@@ -12,4 +12,3 @@ export declare function isWindowsReservedDeviceName(name: string): boolean;
|
|
|
12
12
|
export declare function matchUnsafeDeviceReadPath(filePath: string, options?: UnsafeDeviceReadPathOptions): UnsafeDeviceReadPathMatch | undefined;
|
|
13
13
|
export declare function isUnsafeDeviceReadPath(filePath: string, options?: UnsafeDeviceReadPathOptions): boolean;
|
|
14
14
|
export declare function assertNoUnsafeDeviceReadPath(filePath: string, options?: UnsafeDeviceReadPathOptions): void;
|
|
15
|
-
//# sourceMappingURL=device-path.d.ts.map
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { type Stats } from "node:fs";
|
|
2
|
-
import {
|
|
1
|
+
import { type BigIntStats, type Stats } from "node:fs";
|
|
2
|
+
import type { FileIdentityStat } from "./file-identity.js";
|
|
3
3
|
export type DirectorySyncOutcome = {
|
|
4
4
|
status: "synced";
|
|
5
5
|
} | {
|
|
6
6
|
status: "unsupported";
|
|
7
7
|
code?: string;
|
|
8
8
|
};
|
|
9
|
-
export type DirectoryReceipt = {
|
|
9
|
+
export type DirectoryReceipt<T extends Stats | BigIntStats = Stats> = {
|
|
10
10
|
path: string;
|
|
11
11
|
realPath: string;
|
|
12
|
-
identity:
|
|
12
|
+
identity: T;
|
|
13
13
|
};
|
|
14
14
|
export type DurableDirectoryReceipt = DirectoryReceipt & {
|
|
15
15
|
parentSync: DirectorySyncOutcome | {
|
|
@@ -29,16 +29,15 @@ export type EnsureDurableDirectoryOptions = {
|
|
|
29
29
|
expectedExistingIdentity?: FileIdentityStat;
|
|
30
30
|
create?: (directoryPath: string) => Promise<void>;
|
|
31
31
|
};
|
|
32
|
-
export declare function pinDirectory(directory: string | DirectoryReceipt
|
|
32
|
+
export declare function pinDirectory(directory: string | DirectoryReceipt<Stats | BigIntStats>, options?: {
|
|
33
33
|
label?: string;
|
|
34
34
|
}): Promise<PinnedDirectory>;
|
|
35
|
-
export declare function syncDirectory(directory: string | DirectoryReceipt
|
|
35
|
+
export declare function syncDirectory(directory: string | DirectoryReceipt<Stats | BigIntStats>, options?: {
|
|
36
36
|
label?: string;
|
|
37
37
|
}): Promise<DirectorySyncOutcome>;
|
|
38
|
-
export declare function syncDirectorySync(directory: string | DirectoryReceipt
|
|
38
|
+
export declare function syncDirectorySync(directory: string | DirectoryReceipt<Stats | BigIntStats>, options?: {
|
|
39
39
|
label?: string;
|
|
40
40
|
}): DirectorySyncOutcome;
|
|
41
41
|
export declare function syncDirectoryBestEffort(directoryPath: string): Promise<void>;
|
|
42
42
|
export declare function syncDirectoryBestEffortSync(directoryPath: string): void;
|
|
43
43
|
export declare function ensureDurableDirectory(options: EnsureDurableDirectoryOptions): Promise<DurableDirectoryReceipt>;
|
|
44
|
-
//# sourceMappingURL=directory-durability.d.ts.map
|