@openclaw/openshell-sandbox 2026.9.3 → 2026.9.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/activity.svg +3 -0
- package/assets/icon.png +0 -0
- package/dist/index.js +32 -26
- package/node_modules/@openclaw/fs-safe/CHANGELOG.md +285 -0
- package/node_modules/@openclaw/fs-safe/LICENSE +1 -0
- package/node_modules/@openclaw/fs-safe/README.md +65 -10
- package/node_modules/@openclaw/fs-safe/dist/absolute-path.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/absolute-path.js +33 -11
- package/node_modules/@openclaw/fs-safe/dist/advanced.d.ts +8 -1
- package/node_modules/@openclaw/fs-safe/dist/advanced.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/advanced.js +8 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-crc32.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-crc32.js +6 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-deadline.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-deadline.js +3 -4
- package/node_modules/@openclaw/fs-safe/dist/archive-durability.d.ts +24 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-durability.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-durability.js +180 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-entry.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-entry.js +8 -8
- package/node_modules/@openclaw/fs-safe/dist/archive-gzip-tail.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-gzip-tail.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-gzip-tail.js +33 -8
- package/node_modules/@openclaw/fs-safe/dist/archive-input.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-input.js +14 -8
- package/node_modules/@openclaw/fs-safe/dist/archive-kind.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-kind.js +3 -2
- package/node_modules/@openclaw/fs-safe/dist/archive-merge.d.ts +6 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-merge.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-merge.js +68 -19
- package/node_modules/@openclaw/fs-safe/dist/archive-native.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-native.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-native.js +15 -25
- package/node_modules/@openclaw/fs-safe/dist/archive-options.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-options.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-parser.wasm +0 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-plan.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-read.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-read.js +128 -109
- package/node_modules/@openclaw/fs-safe/dist/archive-staging.d.ts +6 -3
- package/node_modules/@openclaw/fs-safe/dist/archive-staging.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-staging.js +100 -42
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-inspect.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-inspect.js +4 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-stream.d.ts +11 -4
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-stream.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-stream.js +23 -10
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-wasm.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-wasm.js +18 -14
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-admission.d.ts +2 -2
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-admission.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-admission.js +50 -14
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-directory.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-directory.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-directory.js +13 -2
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-loader.d.ts +7 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-loader.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-loader.js +64 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-manifest.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-manifest.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-manifest.js +22 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-names.d.ts +6 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-names.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-names.js +56 -18
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-preflight.d.ts +2 -3
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-preflight.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-preflight.js +4 -35
- package/node_modules/@openclaw/fs-safe/dist/archive.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/archive.js +25 -13
- package/node_modules/@openclaw/fs-safe/dist/bounded-read.d.ts +12 -0
- package/node_modules/@openclaw/fs-safe/dist/bounded-read.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/bounded-read.js +83 -46
- package/node_modules/@openclaw/fs-safe/dist/clone-metadata.d.ts +19 -0
- package/node_modules/@openclaw/fs-safe/dist/clone-metadata.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/clone-metadata.js +32 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-file-input.d.ts +22 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-file-input.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-file-input.js +71 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-policy.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-policy.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-policy.js +8 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-publication.d.ts +15 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-publication.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-publication.js +30 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-tree-portable.d.ts +9 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-tree-portable.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-tree-portable.js +222 -0
- package/node_modules/@openclaw/fs-safe/dist/copy.d.ts +16 -0
- package/node_modules/@openclaw/fs-safe/dist/copy.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/copy.js +125 -0
- package/node_modules/@openclaw/fs-safe/dist/darwin-acl.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/darwin-acl.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/darwin-acl.js +24 -0
- package/node_modules/@openclaw/fs-safe/dist/deny-mutations.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/deny-mutations.js +8 -2
- package/node_modules/@openclaw/fs-safe/dist/device-path.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/device-path.js +5 -3
- package/node_modules/@openclaw/fs-safe/dist/directory-durability.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/directory-durability.js +68 -23
- package/node_modules/@openclaw/fs-safe/dist/directory-entry-path.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-entry-path.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-entry-path.js +21 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-guard.d.ts +27 -1
- package/node_modules/@openclaw/fs-safe/dist/directory-guard.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/directory-guard.js +145 -17
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-node.d.ts +12 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-node.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-node.js +106 -8
- package/node_modules/@openclaw/fs-safe/dist/durability.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/durability.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/durability.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/effective-uid.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/effective-uid.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/effective-uid.js +25 -0
- package/node_modules/@openclaw/fs-safe/dist/error-detail.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/error-detail.js +4 -1
- package/node_modules/@openclaw/fs-safe/dist/file-handle-transfer.d.ts +14 -0
- package/node_modules/@openclaw/fs-safe/dist/file-handle-transfer.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/file-handle-transfer.js +135 -0
- package/node_modules/@openclaw/fs-safe/dist/file-hash.d.ts +9 -2
- package/node_modules/@openclaw/fs-safe/dist/file-hash.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/file-hash.js +147 -40
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync.js +44 -10
- package/node_modules/@openclaw/fs-safe/dist/file-lock.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/file-lock.js +29 -9
- package/node_modules/@openclaw/fs-safe/dist/file-observation.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/file-observation.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/file-store-boundary.d.ts +6 -2
- package/node_modules/@openclaw/fs-safe/dist/file-store-boundary.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/file-store-boundary.js +22 -65
- package/node_modules/@openclaw/fs-safe/dist/file-store-copy-source.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-copy-source.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-copy-source.js +31 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-path.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-path.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-path.js +30 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-prune.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/file-store-prune.js +15 -5
- package/node_modules/@openclaw/fs-safe/dist/file-store-sync-directory.d.ts +16 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-sync-directory.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-sync-directory.js +349 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-sync-write.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-sync-write.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/file-store-sync-write.js +63 -48
- package/node_modules/@openclaw/fs-safe/dist/file-store.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/file-store.js +23 -47
- package/node_modules/@openclaw/fs-safe/dist/filename.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/filename.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/filename.js +89 -36
- package/node_modules/@openclaw/fs-safe/dist/fs.js +3 -3
- package/node_modules/@openclaw/fs-safe/dist/guarded-mkdir.d.ts +11 -0
- package/node_modules/@openclaw/fs-safe/dist/guarded-mkdir.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/guarded-mkdir.js +218 -32
- package/node_modules/@openclaw/fs-safe/dist/guarded-mutation.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/guarded-mutation.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/guarded-mutation.js +9 -5
- package/node_modules/@openclaw/fs-safe/dist/guest-dispatch-python.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/guest-dispatch-python.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/guest-dispatch-python.js +117 -0
- package/node_modules/@openclaw/fs-safe/dist/guest-native-python.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/guest-native-python.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/guest-native-python.js +135 -0
- package/node_modules/@openclaw/fs-safe/dist/guest.d.ts +9 -0
- package/node_modules/@openclaw/fs-safe/dist/guest.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/guest.js +424 -0
- package/node_modules/@openclaw/fs-safe/dist/home-dir.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/home-dir.js +81 -16
- package/node_modules/@openclaw/fs-safe/dist/index.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/index.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/install-path.d.ts +6 -0
- package/node_modules/@openclaw/fs-safe/dist/install-path.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/install-path.js +71 -26
- package/node_modules/@openclaw/fs-safe/dist/json-document-store.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/json-document-store.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/json-document-store.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-directory.js +3 -3
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-ownership.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-ownership.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-ownership.js +137 -45
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-paths.d.ts +11 -0
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-paths.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-paths.js +42 -0
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-read.d.ts +6 -0
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-read.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-read.js +61 -0
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue.js +107 -152
- package/node_modules/@openclaw/fs-safe/dist/json-store.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/json-store.js +5 -1
- package/node_modules/@openclaw/fs-safe/dist/json.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/json.js +55 -22
- package/node_modules/@openclaw/fs-safe/dist/local-file-access.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/local-file-access.js +4 -0
- package/node_modules/@openclaw/fs-safe/dist/local-file-descriptor.d.ts +17 -0
- package/node_modules/@openclaw/fs-safe/dist/local-file-descriptor.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/local-file-descriptor.js +84 -0
- package/node_modules/@openclaw/fs-safe/dist/local-roots.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/local-roots.js +54 -27
- package/node_modules/@openclaw/fs-safe/dist/move-path-cleanup.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/move-path-cleanup.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/move-path-cleanup.js +47 -20
- package/node_modules/@openclaw/fs-safe/dist/move-path-stage.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/move-path-stage.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/move-path-stage.js +56 -0
- package/node_modules/@openclaw/fs-safe/dist/move-path.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/move-path.js +84 -50
- package/node_modules/@openclaw/fs-safe/dist/mutation-authority.d.ts +9 -0
- package/node_modules/@openclaw/fs-safe/dist/mutation-authority.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/mutation-authority.js +36 -0
- package/node_modules/@openclaw/fs-safe/dist/native-binding.d.ts +53 -1
- package/node_modules/@openclaw/fs-safe/dist/native-binding.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/native-binding.js +8 -1
- package/node_modules/@openclaw/fs-safe/dist/native-directory-observation.d.ts +17 -0
- package/node_modules/@openclaw/fs-safe/dist/native-directory-observation.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/native-directory-observation.js +37 -0
- package/node_modules/@openclaw/fs-safe/dist/native-operations.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/native-operations.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/native-operations.js +17 -9
- package/node_modules/@openclaw/fs-safe/dist/native-parent-admission.d.ts +32 -0
- package/node_modules/@openclaw/fs-safe/dist/native-parent-admission.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/native-parent-admission.js +127 -0
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write-windows.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write-windows.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write-windows.js +27 -16
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write.js +315 -41
- package/node_modules/@openclaw/fs-safe/dist/native-staged-file.d.ts +5 -5
- package/node_modules/@openclaw/fs-safe/dist/native-staged-file.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/native-staged-file.js +52 -15
- package/node_modules/@openclaw/fs-safe/dist/native.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/native.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/native.js +7 -2
- package/node_modules/@openclaw/fs-safe/dist/opened-file-failure.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/opened-file-failure.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/opened-file-failure.js +3 -2
- package/node_modules/@openclaw/fs-safe/dist/opened-realpath.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/opened-realpath.js +5 -4
- package/node_modules/@openclaw/fs-safe/dist/output.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/output.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/output.js +16 -4
- package/node_modules/@openclaw/fs-safe/dist/overwrite-file-handle.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/overwrite-file-handle.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/overwrite-file-handle.js +46 -0
- package/node_modules/@openclaw/fs-safe/dist/owner-dacl.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/owner-dacl.js +2 -0
- package/node_modules/@openclaw/fs-safe/dist/path-case.d.ts +7 -0
- package/node_modules/@openclaw/fs-safe/dist/path-case.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/path-case.js +136 -0
- package/node_modules/@openclaw/fs-safe/dist/path-policy.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/path-policy.js +7 -2
- package/node_modules/@openclaw/fs-safe/dist/path-prefix.d.ts +7 -0
- package/node_modules/@openclaw/fs-safe/dist/path-prefix.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/path-prefix.js +82 -0
- package/node_modules/@openclaw/fs-safe/dist/path-scope-lexical.d.ts +14 -0
- package/node_modules/@openclaw/fs-safe/dist/path-scope-lexical.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/path-scope-lexical.js +37 -0
- package/node_modules/@openclaw/fs-safe/dist/path-segment-route.d.ts +7 -0
- package/node_modules/@openclaw/fs-safe/dist/path-segment-route.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/path-segment-route.js +24 -0
- package/node_modules/@openclaw/fs-safe/dist/path-suffix-aliases.d.ts +10 -0
- package/node_modules/@openclaw/fs-safe/dist/path-suffix-aliases.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/path-suffix-aliases.js +386 -0
- package/node_modules/@openclaw/fs-safe/dist/path.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/path.js +39 -7
- package/node_modules/@openclaw/fs-safe/dist/permissions-windows.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/permissions-windows.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/permissions-windows.js +99 -56
- package/node_modules/@openclaw/fs-safe/dist/permissions.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/permissions.js +39 -10
- package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-admission.d.ts +25 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-admission.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-admission.js +425 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-observation.d.ts +34 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-observation.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-observation.js +142 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-shared-route.d.ts +24 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-shared-route.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-shared-route.js +70 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-open.d.ts +6 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-open.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/pinned-open.js +29 -9
- package/node_modules/@openclaw/fs-safe/dist/pinned-operation.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/pinned-write-types.d.ts +75 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-write-types.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-write-types.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-write.d.ts +7 -29
- package/node_modules/@openclaw/fs-safe/dist/pinned-write.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/pinned-write.js +203 -47
- package/node_modules/@openclaw/fs-safe/dist/positional-read.d.ts +9 -0
- package/node_modules/@openclaw/fs-safe/dist/positional-read.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/positional-read.js +36 -0
- package/node_modules/@openclaw/fs-safe/dist/private-directory.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/private-directory.js +2 -0
- package/node_modules/@openclaw/fs-safe/dist/private-producer-handoff.d.ts +16 -0
- package/node_modules/@openclaw/fs-safe/dist/private-producer-handoff.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/private-producer-handoff.js +272 -0
- package/node_modules/@openclaw/fs-safe/dist/private-temp-workspace.d.ts +2 -39
- package/node_modules/@openclaw/fs-safe/dist/private-temp-workspace.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/private-temp-workspace.js +183 -69
- package/node_modules/@openclaw/fs-safe/dist/publish-copy-stage.d.ts +13 -0
- package/node_modules/@openclaw/fs-safe/dist/publish-copy-stage.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/publish-copy-stage.js +47 -0
- package/node_modules/@openclaw/fs-safe/dist/publish-file.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/publish-file.js +63 -56
- package/node_modules/@openclaw/fs-safe/dist/realpath.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/realpath.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/realpath.js +43 -0
- package/node_modules/@openclaw/fs-safe/dist/recursive-mkdir-path.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/recursive-mkdir-path.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/recursive-mkdir-path.js +8 -0
- package/node_modules/@openclaw/fs-safe/dist/regular-file.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/regular-file.js +56 -45
- package/node_modules/@openclaw/fs-safe/dist/replace-directory.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/replace-directory.js +14 -6
- package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-fallback.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-fallback.js +52 -47
- package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-source.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-source.js +17 -17
- package/node_modules/@openclaw/fs-safe/dist/replace-file-mode.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-mode.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-mode.js +10 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-temp-owner.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-temp-owner.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/replace-file-temp-owner.js +18 -3
- package/node_modules/@openclaw/fs-safe/dist/replace-file.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/replace-file.js +43 -32
- package/node_modules/@openclaw/fs-safe/dist/root-boundary.d.ts +29 -0
- package/node_modules/@openclaw/fs-safe/dist/root-boundary.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-boundary.js +182 -0
- package/node_modules/@openclaw/fs-safe/dist/root-context.d.ts +15 -1
- package/node_modules/@openclaw/fs-safe/dist/root-context.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/root-context.js +131 -33
- package/node_modules/@openclaw/fs-safe/dist/root-create-input.d.ts +10 -0
- package/node_modules/@openclaw/fs-safe/dist/root-create-input.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-create-input.js +80 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory-creation.d.ts +13 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory-creation.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory-creation.js +212 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory-list.d.ts +38 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory-list.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory-list.js +368 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory.d.ts +23 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory.js +141 -0
- package/node_modules/@openclaw/fs-safe/dist/root-entries.d.ts +11 -0
- package/node_modules/@openclaw/fs-safe/dist/root-entries.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-entries.js +61 -0
- package/node_modules/@openclaw/fs-safe/dist/root-errors.d.ts +6 -5
- package/node_modules/@openclaw/fs-safe/dist/root-errors.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/root-errors.js +28 -13
- package/node_modules/@openclaw/fs-safe/dist/root-file-final-admission.d.ts +21 -0
- package/node_modules/@openclaw/fs-safe/dist/root-file-final-admission.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-file-final-admission.js +83 -0
- package/node_modules/@openclaw/fs-safe/dist/root-file.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/root-file.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/root-file.js +111 -24
- package/node_modules/@openclaw/fs-safe/dist/root-impl.d.ts +18 -51
- package/node_modules/@openclaw/fs-safe/dist/root-impl.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/root-impl.js +639 -510
- package/node_modules/@openclaw/fs-safe/dist/root-move-noreplace.d.ts +14 -0
- package/node_modules/@openclaw/fs-safe/dist/root-move-noreplace.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-move-noreplace.js +202 -0
- package/node_modules/@openclaw/fs-safe/dist/root-move-preflight.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/root-move-preflight.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-move-preflight.js +16 -0
- package/node_modules/@openclaw/fs-safe/dist/root-observed-path.d.ts +9 -0
- package/node_modules/@openclaw/fs-safe/dist/root-observed-path.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-observed-path.js +95 -0
- package/node_modules/@openclaw/fs-safe/dist/root-options.d.ts +77 -0
- package/node_modules/@openclaw/fs-safe/dist/root-options.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-options.js +18 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path-errors.d.ts +12 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path-errors.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path-errors.js +13 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path-existing.d.ts +7 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path-existing.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/root-path-existing.js +111 -14
- package/node_modules/@openclaw/fs-safe/dist/root-path-observation.d.ts +63 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path-observation.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path-observation.js +180 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path-stat.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path-stat.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path-stat.js +101 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path-symlink.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/root-path-symlink.js +24 -4
- package/node_modules/@openclaw/fs-safe/dist/root-path.d.ts +14 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/root-path.js +322 -220
- package/node_modules/@openclaw/fs-safe/dist/root-paths-lexical.d.ts +9 -0
- package/node_modules/@openclaw/fs-safe/dist/root-paths-lexical.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-paths-lexical.js +22 -0
- package/node_modules/@openclaw/fs-safe/dist/root-paths.d.ts +3 -29
- package/node_modules/@openclaw/fs-safe/dist/root-paths.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/root-paths.js +89 -174
- package/node_modules/@openclaw/fs-safe/dist/root-read-admission.d.ts +26 -0
- package/node_modules/@openclaw/fs-safe/dist/root-read-admission.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-read-admission.js +94 -0
- package/node_modules/@openclaw/fs-safe/dist/root-remove-identity.d.ts +15 -0
- package/node_modules/@openclaw/fs-safe/dist/root-remove-identity.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-remove-identity.js +89 -0
- package/node_modules/@openclaw/fs-safe/dist/root-remove-receipt.d.ts +17 -0
- package/node_modules/@openclaw/fs-safe/dist/root-remove-receipt.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-remove-receipt.js +37 -0
- package/node_modules/@openclaw/fs-safe/dist/root-remove.d.ts +6 -0
- package/node_modules/@openclaw/fs-safe/dist/root-remove.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-remove.js +448 -0
- package/node_modules/@openclaw/fs-safe/dist/root-symlink-policy.d.ts +14 -0
- package/node_modules/@openclaw/fs-safe/dist/root-symlink-policy.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-symlink-policy.js +34 -0
- package/node_modules/@openclaw/fs-safe/dist/root-walk.d.ts +5 -4
- package/node_modules/@openclaw/fs-safe/dist/root-walk.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/root-walk.js +100 -50
- package/node_modules/@openclaw/fs-safe/dist/root-write-admission.d.ts +68 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-admission.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-admission.js +322 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-compatibility.d.ts +13 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-compatibility.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-compatibility.js +74 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-complete-parent.d.ts +42 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-complete-parent.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-complete-parent.js +195 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-mode.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-mode.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/root-write-mode.js +22 -11
- package/node_modules/@openclaw/fs-safe/dist/root-write-publication.d.ts +24 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-publication.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-publication.js +85 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-verification.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/root-write-verification.js +18 -7
- package/node_modules/@openclaw/fs-safe/dist/root.d.ts +4 -1
- package/node_modules/@openclaw/fs-safe/dist/root.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/safe-path-segment.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/safe-path-segment.js +3 -1
- package/node_modules/@openclaw/fs-safe/dist/secret-file.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/secret-file.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/secret-file.js +65 -25
- package/node_modules/@openclaw/fs-safe/dist/secret-read-async.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/secret-read-async.js +22 -16
- package/node_modules/@openclaw/fs-safe/dist/secret-read-policy.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/secret-read-policy.js +5 -1
- package/node_modules/@openclaw/fs-safe/dist/secure-file-windows.d.ts +10 -0
- package/node_modules/@openclaw/fs-safe/dist/secure-file-windows.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/secure-file-windows.js +186 -0
- package/node_modules/@openclaw/fs-safe/dist/secure-file.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/secure-file.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/secure-file.js +137 -22
- package/node_modules/@openclaw/fs-safe/dist/secure-temp-dir.d.ts +6 -3
- package/node_modules/@openclaw/fs-safe/dist/secure-temp-dir.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/secure-temp-dir.js +122 -101
- package/node_modules/@openclaw/fs-safe/dist/secure-temp-repair.d.ts +35 -0
- package/node_modules/@openclaw/fs-safe/dist/secure-temp-repair.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/secure-temp-repair.js +106 -0
- package/node_modules/@openclaw/fs-safe/dist/sibling-staged-file.d.ts +4 -1
- package/node_modules/@openclaw/fs-safe/dist/sibling-staged-file.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/sibling-staged-file.js +210 -45
- package/node_modules/@openclaw/fs-safe/dist/sibling-temp.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/sibling-temp.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/sibling-temp.js +43 -17
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-acquire.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-acquire.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-acquire.js +64 -21
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-policy.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-policy.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-policy.js +22 -3
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-reclaim.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-reclaim.js +16 -4
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-root.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-root.js +4 -2
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock.js +4 -4
- package/node_modules/@openclaw/fs-safe/dist/staged-directory.d.ts +14 -5
- package/node_modules/@openclaw/fs-safe/dist/staged-directory.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/staged-directory.js +58 -6
- package/node_modules/@openclaw/fs-safe/dist/standalone-publication-path.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/standalone-publication-path.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/standalone-publication-path.js +6 -0
- package/node_modules/@openclaw/fs-safe/dist/stat-observation.d.ts +11 -0
- package/node_modules/@openclaw/fs-safe/dist/stat-observation.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/stat-observation.js +64 -0
- package/node_modules/@openclaw/fs-safe/dist/strict-file-identity.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/strict-file-identity.js +39 -2
- package/node_modules/@openclaw/fs-safe/dist/symlink-parents.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/symlink-parents.js +7 -2
- package/node_modules/@openclaw/fs-safe/dist/temp-cleanup.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/temp-cleanup.js +3 -2
- package/node_modules/@openclaw/fs-safe/dist/temp-target.d.ts +16 -12
- package/node_modules/@openclaw/fs-safe/dist/temp-target.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/temp-target.js +154 -14
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-admission.d.ts +22 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-admission.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-admission.js +374 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-child-admission.d.ts +13 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-child-admission.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-child-admission.js +95 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-descriptor.d.ts +48 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-descriptor.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-descriptor.js +363 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-identity.d.ts +15 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-identity.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-identity.js +41 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-owner.d.ts +7 -6
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-owner.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-owner.js +121 -61
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-permissions.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-permissions.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-permissions.js +32 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-types.d.ts +40 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-types.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-types.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/temp.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/temp.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/temp.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/test-hooks.d.ts +7 -0
- package/node_modules/@openclaw/fs-safe/dist/test-hooks.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/text-atomic.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/text-atomic.js +3 -1
- package/node_modules/@openclaw/fs-safe/dist/timing.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/timing.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/timing.js +25 -6
- package/node_modules/@openclaw/fs-safe/dist/trash.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/trash.js +61 -13
- package/node_modules/@openclaw/fs-safe/dist/unicode-path.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/unicode-path.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/unicode-path.js +13 -0
- package/node_modules/@openclaw/fs-safe/dist/walk.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/walk.js +25 -40
- package/node_modules/@openclaw/fs-safe/dist/windows-owner.d.ts +9 -12
- package/node_modules/@openclaw/fs-safe/dist/windows-owner.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/windows-owner.js +29 -58
- package/node_modules/@openclaw/fs-safe/dist/windows-path-alias.d.ts +39 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-path-alias.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-path-alias.js +153 -0
- package/node_modules/@openclaw/fs-safe/dist/write-file-handle.d.ts +7 -0
- package/node_modules/@openclaw/fs-safe/dist/write-file-handle.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/write-file-handle.js +26 -0
- package/node_modules/@openclaw/fs-safe/dist/write-open-flags.d.ts.map +1 -1
- package/node_modules/@openclaw/fs-safe/dist/write-open-flags.js +1 -2
- package/node_modules/@openclaw/fs-safe/docs/advanced.md +50 -5
- package/node_modules/@openclaw/fs-safe/docs/archive.md +107 -12
- package/node_modules/@openclaw/fs-safe/docs/atomic.md +77 -5
- package/node_modules/@openclaw/fs-safe/docs/config.md +1 -0
- package/node_modules/@openclaw/fs-safe/docs/contributing.md +40 -2
- package/node_modules/@openclaw/fs-safe/docs/copy.md +158 -0
- package/node_modules/@openclaw/fs-safe/docs/directory-identity.md +85 -0
- package/node_modules/@openclaw/fs-safe/docs/durability.md +71 -5
- package/node_modules/@openclaw/fs-safe/docs/entries.md +109 -0
- package/node_modules/@openclaw/fs-safe/docs/errors.md +18 -10
- package/node_modules/@openclaw/fs-safe/docs/file-store.md +93 -6
- package/node_modules/@openclaw/fs-safe/docs/filename.md +21 -7
- package/node_modules/@openclaw/fs-safe/docs/guest.md +146 -0
- package/node_modules/@openclaw/fs-safe/docs/in-place-write.md +81 -0
- package/node_modules/@openclaw/fs-safe/docs/index.md +2 -0
- package/node_modules/@openclaw/fs-safe/docs/install-path.md +61 -15
- package/node_modules/@openclaw/fs-safe/docs/install.md +42 -7
- package/node_modules/@openclaw/fs-safe/docs/json-store.md +15 -1
- package/node_modules/@openclaw/fs-safe/docs/json.md +11 -0
- package/node_modules/@openclaw/fs-safe/docs/local-roots.md +8 -1
- package/node_modules/@openclaw/fs-safe/docs/mutation-policy-proof.md +65 -0
- package/node_modules/@openclaw/fs-safe/docs/native-helper.md +51 -12
- package/node_modules/@openclaw/fs-safe/docs/native.md +63 -10
- package/node_modules/@openclaw/fs-safe/docs/output.md +55 -7
- package/node_modules/@openclaw/fs-safe/docs/path-case.md +64 -0
- package/node_modules/@openclaw/fs-safe/docs/path-prefix.md +64 -0
- package/node_modules/@openclaw/fs-safe/docs/path-scope.md +1 -1
- package/node_modules/@openclaw/fs-safe/docs/path-suffix-aliases.md +159 -0
- package/node_modules/@openclaw/fs-safe/docs/path.md +12 -1
- package/node_modules/@openclaw/fs-safe/docs/permissions.md +55 -11
- package/node_modules/@openclaw/fs-safe/docs/positional-read.md +63 -0
- package/node_modules/@openclaw/fs-safe/docs/private-file-store.md +14 -0
- package/node_modules/@openclaw/fs-safe/docs/public-api.md +45 -2
- package/node_modules/@openclaw/fs-safe/docs/quickstart.md +1 -1
- package/node_modules/@openclaw/fs-safe/docs/reading.md +14 -1
- package/node_modules/@openclaw/fs-safe/docs/root.md +219 -12
- package/node_modules/@openclaw/fs-safe/docs/secret-file.md +9 -0
- package/node_modules/@openclaw/fs-safe/docs/secure-file.md +23 -16
- package/node_modules/@openclaw/fs-safe/docs/security-model.md +90 -9
- package/node_modules/@openclaw/fs-safe/docs/sidecar-lock.md +42 -4
- package/node_modules/@openclaw/fs-safe/docs/store.md +27 -2
- package/node_modules/@openclaw/fs-safe/docs/temp.md +283 -26
- package/node_modules/@openclaw/fs-safe/docs/test-hooks.md +14 -0
- package/node_modules/@openclaw/fs-safe/docs/timing.md +2 -0
- package/node_modules/@openclaw/fs-safe/docs/types.md +19 -12
- package/node_modules/@openclaw/fs-safe/docs/walk.md +54 -5
- package/node_modules/@openclaw/fs-safe/docs/writing.md +211 -11
- package/node_modules/@openclaw/fs-safe/package.json +24 -13
- package/node_modules/@openclaw/fs-safe-darwin-arm64/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-darwin-arm64/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-darwin-x64/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-darwin-x64/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-linux-arm64-gnu/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-linux-arm64-gnu/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-linux-arm64-musl/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-linux-arm64-musl/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-linux-x64-gnu/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-linux-x64-gnu/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-linux-x64-musl/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-linux-x64-musl/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-win32-x64-msvc/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-win32-x64-msvc/package.json +1 -1
- package/node_modules/jszip/.github/FUNDING.yml +1 -0
- package/node_modules/jszip/.github/actions/setup/action.yml +23 -0
- package/node_modules/jszip/.github/workflows/benchmark.yml +38 -0
- package/node_modules/jszip/.github/workflows/main.yml +55 -0
- package/node_modules/jszip/CHANGES.md +6 -0
- package/node_modules/jszip/dist/jszip.js +28 -19
- package/node_modules/jszip/dist/jszip.min.js +2 -2
- package/node_modules/jszip/index.d.ts +14 -0
- package/node_modules/jszip/lib/index.js +1 -1
- package/node_modules/jszip/lib/utils.js +26 -17
- package/node_modules/jszip/package.json +2 -2
- package/node_modules/p-limit/index.d.ts +1 -1
- package/node_modules/p-limit/index.js +6 -1
- package/node_modules/p-limit/package.json +1 -1
- package/node_modules/p-limit/readme.md +8 -0
- package/node_modules/zod/README.md +27 -0
- package/node_modules/zod/compile.cjs +77 -0
- package/node_modules/zod/compile.d.cts +1 -0
- package/node_modules/zod/compile.d.ts +1 -0
- package/node_modules/zod/compile.js +52 -0
- package/node_modules/zod/index.cjs +2 -2
- package/node_modules/zod/index.d.cts +1 -2
- package/node_modules/zod/index.d.ts +1 -2
- package/node_modules/zod/index.js +5 -2
- package/node_modules/zod/package.json +13 -2
- package/node_modules/zod/src/compile.ts +56 -0
- package/node_modules/zod/src/index.ts +5 -2
- package/node_modules/zod/src/v3/ZodError.ts +22 -12
- package/node_modules/zod/src/v3/tests/error.test.ts +35 -0
- package/node_modules/zod/src/v3/tests/intersection.test.ts +18 -0
- package/node_modules/zod/src/v3/tests/language-server.test.ts +1 -2
- package/node_modules/zod/src/v3/tests/object.test.ts +3 -6
- package/node_modules/zod/src/v3/tests/readonly.test.ts +0 -80
- package/node_modules/zod/src/v3/tests/string.test.ts +6 -0
- package/node_modules/zod/src/v3/types.ts +5 -5
- package/node_modules/zod/src/v4/classic/checks.ts +1 -0
- package/node_modules/zod/src/v4/classic/compat.ts +26 -18
- package/node_modules/zod/src/v4/classic/deep-partial.ts +76 -0
- package/node_modules/zod/src/v4/classic/errors.ts +59 -44
- package/node_modules/zod/src/v4/classic/external.ts +12 -9
- package/node_modules/zod/src/v4/classic/from-json-schema.ts +140 -78
- package/node_modules/zod/src/v4/classic/in-out.ts +45 -0
- package/node_modules/zod/src/v4/classic/index.ts +2 -2
- package/node_modules/zod/src/v4/classic/iso.ts +2 -72
- package/node_modules/zod/src/v4/classic/parse.ts +10 -4
- package/node_modules/zod/src/v4/classic/schemas.ts +452 -262
- package/node_modules/zod/src/v4/classic/tests/apply.test.ts +27 -0
- package/node_modules/zod/src/v4/classic/tests/array.test.ts +2 -2
- package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +135 -0
- package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +30 -1
- package/node_modules/zod/src/v4/classic/tests/catch.test.ts +278 -0
- package/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +1 -2
- package/node_modules/zod/src/v4/classic/tests/codec.test.ts +2 -1
- package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +2 -2
- package/node_modules/zod/src/v4/classic/tests/credit-card.test.ts +76 -0
- package/node_modules/zod/src/v4/classic/tests/cyclic-data.test.ts +720 -0
- package/node_modules/zod/src/v4/classic/tests/date.test.ts +30 -0
- package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +32 -18
- package/node_modules/zod/src/v4/classic/tests/deep-partial.test.ts +380 -0
- package/node_modules/zod/src/v4/classic/tests/default-locale.test.ts +32 -0
- package/node_modules/zod/src/v4/classic/tests/default.test.ts +46 -0
- package/node_modules/zod/src/v4/classic/tests/detached-methods.test.ts +31 -7
- package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +155 -13
- package/node_modules/zod/src/v4/classic/tests/enum.test.ts +11 -0
- package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +112 -2
- package/node_modules/zod/src/v4/classic/tests/error.test.ts +274 -6
- package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +425 -10
- package/node_modules/zod/src/v4/classic/tests/function.test.ts +31 -0
- package/node_modules/zod/src/v4/classic/tests/global-config.test.ts +2 -9
- package/node_modules/zod/src/v4/classic/tests/hash.test.ts +1 -2
- package/node_modules/zod/src/v4/classic/tests/in-out.test.ts +159 -0
- package/node_modules/zod/src/v4/classic/tests/index.test.ts +21 -2
- package/node_modules/zod/src/v4/classic/tests/instance-footprint.test.ts +281 -0
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +47 -0
- package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +136 -0
- package/node_modules/zod/src/v4/classic/tests/issue-schema.test.ts +183 -0
- package/node_modules/zod/src/v4/classic/tests/jitless-allows-eval.test.ts +3 -10
- package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +36 -1
- package/node_modules/zod/src/v4/classic/tests/literal.test.ts +12 -1
- package/node_modules/zod/src/v4/classic/tests/map.test.ts +12 -0
- package/node_modules/zod/src/v4/classic/tests/number.test.ts +46 -9
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +245 -12
- package/node_modules/zod/src/v4/classic/tests/optin-ladder.test.ts +234 -0
- package/node_modules/zod/src/v4/classic/tests/optional.test.ts +49 -16
- package/node_modules/zod/src/v4/classic/tests/partial.test.ts +51 -4
- package/node_modules/zod/src/v4/classic/tests/preprocess-types.test.ts +20 -2
- package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +0 -68
- package/node_modules/zod/src/v4/classic/tests/record.test.ts +186 -18
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +33 -2
- package/node_modules/zod/src/v4/classic/tests/redos.test.ts +68 -0
- package/node_modules/zod/src/v4/classic/tests/refine.test.ts +60 -0
- package/node_modules/zod/src/v4/classic/tests/set.test.ts +9 -0
- package/node_modules/zod/src/v4/classic/tests/string.test.ts +127 -5
- package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +18 -0
- package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +11 -2
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +1585 -173
- package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +45 -30
- package/node_modules/zod/src/v4/classic/tests/union.test.ts +39 -2
- package/node_modules/zod/src/v4/classic/tests/validate.test.ts +76 -0
- package/node_modules/zod/src/v4/classic/tests/validations.test.ts +2 -2
- package/node_modules/zod/src/v4/core/api.ts +48 -12
- package/node_modules/zod/src/v4/core/checks.ts +57 -44
- package/node_modules/zod/src/v4/core/compile.ts +2188 -0
- package/node_modules/zod/src/v4/core/core.ts +98 -19
- package/node_modules/zod/src/v4/core/doc.ts +11 -7
- package/node_modules/zod/src/v4/core/errors.ts +115 -24
- package/node_modules/zod/src/v4/core/index.ts +3 -0
- package/node_modules/zod/src/v4/core/json-schema-generator.ts +6 -1
- package/node_modules/zod/src/v4/core/json-schema-processors.ts +257 -93
- package/node_modules/zod/src/v4/core/json-schema.ts +2 -1
- package/node_modules/zod/src/v4/core/memoizer.ts +284 -0
- package/node_modules/zod/src/v4/core/parse.ts +131 -38
- package/node_modules/zod/src/v4/core/regexes.ts +30 -13
- package/node_modules/zod/src/v4/core/registries.ts +2 -2
- package/node_modules/zod/src/v4/core/schemas.ts +759 -461
- package/node_modules/zod/src/v4/core/tests/compile-differential.test.ts +969 -0
- package/node_modules/zod/src/v4/core/tests/compile-global.test.ts +89 -0
- package/node_modules/zod/src/v4/core/tests/compile-off-by-default.test.ts +26 -0
- package/node_modules/zod/src/v4/core/tests/compile-stats.test.ts +34 -0
- package/node_modules/zod/src/v4/core/tests/compile.test.ts +1639 -0
- package/node_modules/zod/src/v4/core/tests/locales/el.test.ts +1 -2
- package/node_modules/zod/src/v4/core/tests/locales/es.test.ts +1 -2
- package/node_modules/zod/src/v4/core/tests/locales/fr.test.ts +3 -3
- package/node_modules/zod/src/v4/core/tests/locales/parity.test.ts +42 -0
- package/node_modules/zod/src/v4/core/tests/locales/tk.test.ts +69 -0
- package/node_modules/zod/src/v4/core/tests/treeshake.test.ts +51 -0
- package/node_modules/zod/src/v4/core/tests/url-no-canparse.test.ts +31 -0
- package/node_modules/zod/src/v4/core/to-json-schema.ts +275 -42
- package/node_modules/zod/src/v4/core/util.ts +268 -42
- package/node_modules/zod/src/v4/core/versions.ts +2 -2
- package/node_modules/zod/src/v4/core/visit.ts +193 -0
- package/node_modules/zod/src/v4/index.ts +3 -3
- package/node_modules/zod/src/v4/locales/ar.ts +3 -0
- package/node_modules/zod/src/v4/locales/az.ts +3 -0
- package/node_modules/zod/src/v4/locales/be.ts +10 -0
- package/node_modules/zod/src/v4/locales/bg.ts +3 -0
- package/node_modules/zod/src/v4/locales/bn.ts +121 -0
- package/node_modules/zod/src/v4/locales/ca.ts +3 -0
- package/node_modules/zod/src/v4/locales/ckb.ts +138 -0
- package/node_modules/zod/src/v4/locales/cs.ts +3 -0
- package/node_modules/zod/src/v4/locales/da.ts +5 -2
- package/node_modules/zod/src/v4/locales/de.ts +3 -0
- package/node_modules/zod/src/v4/locales/el.ts +1 -0
- package/node_modules/zod/src/v4/locales/en.ts +15 -4
- package/node_modules/zod/src/v4/locales/eo.ts +3 -0
- package/node_modules/zod/src/v4/locales/es.ts +2 -0
- package/node_modules/zod/src/v4/locales/fa.ts +3 -0
- package/node_modules/zod/src/v4/locales/fi.ts +3 -0
- package/node_modules/zod/src/v4/locales/fr-CA.ts +3 -0
- package/node_modules/zod/src/v4/locales/fr.ts +19 -14
- package/node_modules/zod/src/v4/locales/gu.ts +121 -0
- package/node_modules/zod/src/v4/locales/he.ts +6 -1
- package/node_modules/zod/src/v4/locales/hi.ts +124 -0
- package/node_modules/zod/src/v4/locales/hr.ts +2 -0
- package/node_modules/zod/src/v4/locales/hu.ts +3 -0
- package/node_modules/zod/src/v4/locales/hy.ts +9 -0
- package/node_modules/zod/src/v4/locales/id.ts +3 -0
- package/node_modules/zod/src/v4/locales/index.ts +10 -0
- package/node_modules/zod/src/v4/locales/is.ts +3 -0
- package/node_modules/zod/src/v4/locales/it.ts +3 -0
- package/node_modules/zod/src/v4/locales/ja.ts +3 -0
- package/node_modules/zod/src/v4/locales/ka.ts +3 -0
- package/node_modules/zod/src/v4/locales/km.ts +3 -0
- package/node_modules/zod/src/v4/locales/kn.ts +124 -0
- package/node_modules/zod/src/v4/locales/ko.ts +3 -0
- package/node_modules/zod/src/v4/locales/lt.ts +2 -0
- package/node_modules/zod/src/v4/locales/mk.ts +3 -0
- package/node_modules/zod/src/v4/locales/ms.ts +3 -0
- package/node_modules/zod/src/v4/locales/ne.ts +126 -0
- package/node_modules/zod/src/v4/locales/nl.ts +3 -0
- package/node_modules/zod/src/v4/locales/nn.ts +119 -0
- package/node_modules/zod/src/v4/locales/no.ts +5 -2
- package/node_modules/zod/src/v4/locales/ota.ts +3 -0
- package/node_modules/zod/src/v4/locales/pl.ts +3 -0
- package/node_modules/zod/src/v4/locales/ps.ts +3 -0
- package/node_modules/zod/src/v4/locales/pt-BR.ts +159 -0
- package/node_modules/zod/src/v4/locales/pt.ts +99 -58
- package/node_modules/zod/src/v4/locales/ro.ts +1 -0
- package/node_modules/zod/src/v4/locales/ru.ts +10 -0
- package/node_modules/zod/src/v4/locales/sk.ts +121 -0
- package/node_modules/zod/src/v4/locales/sl.ts +3 -0
- package/node_modules/zod/src/v4/locales/sv.ts +5 -2
- package/node_modules/zod/src/v4/locales/ta.ts +3 -0
- package/node_modules/zod/src/v4/locales/th.ts +3 -0
- package/node_modules/zod/src/v4/locales/tk.ts +111 -0
- package/node_modules/zod/src/v4/locales/tr.ts +3 -0
- package/node_modules/zod/src/v4/locales/uk.ts +3 -0
- package/node_modules/zod/src/v4/locales/ur.ts +3 -0
- package/node_modules/zod/src/v4/locales/uz.ts +1 -0
- package/node_modules/zod/src/v4/locales/vi.ts +3 -0
- package/node_modules/zod/src/v4/locales/yo.ts +3 -0
- package/node_modules/zod/src/v4/locales/zh-CN.ts +3 -0
- package/node_modules/zod/src/v4/locales/zh-TW.ts +3 -0
- package/node_modules/zod/src/v4/mini/checks.ts +1 -0
- package/node_modules/zod/src/v4/mini/deep-partial.ts +73 -0
- package/node_modules/zod/src/v4/mini/external.ts +10 -1
- package/node_modules/zod/src/v4/mini/in-out.ts +45 -0
- package/node_modules/zod/src/v4/mini/parse.ts +2 -0
- package/node_modules/zod/src/v4/mini/schemas.ts +135 -56
- package/node_modules/zod/src/v4/mini/tests/apply.test.ts +33 -0
- package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +62 -1
- package/node_modules/zod/src/v4/mini/tests/checks.test.ts +14 -0
- package/node_modules/zod/src/v4/mini/tests/codec.test.ts +35 -1
- package/node_modules/zod/src/v4/mini/tests/cyclic-data.test.ts +84 -0
- package/node_modules/zod/src/v4/mini/tests/deep-partial.test.ts +54 -0
- package/node_modules/zod/src/v4/mini/tests/error.test.ts +23 -4
- package/node_modules/zod/src/v4/mini/tests/functions.test.ts +9 -0
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +72 -5
- package/node_modules/zod/src/v4/mini/tests/number.test.ts +14 -0
- package/node_modules/zod/src/v4/mini/tests/object.test.ts +65 -0
- package/node_modules/zod/src/v4/mini/tests/string.test.ts +21 -0
- package/node_modules/zod/v3/ZodError.cjs +22 -12
- package/node_modules/zod/v3/ZodError.d.cts +1 -1
- package/node_modules/zod/v3/ZodError.d.ts +1 -1
- package/node_modules/zod/v3/ZodError.js +22 -12
- package/node_modules/zod/v3/types.cjs +7 -5
- package/node_modules/zod/v3/types.js +7 -5
- package/node_modules/zod/v4/classic/checks.cjs +2 -1
- package/node_modules/zod/v4/classic/checks.d.cts +1 -1
- package/node_modules/zod/v4/classic/checks.d.ts +1 -1
- package/node_modules/zod/v4/classic/checks.js +1 -1
- package/node_modules/zod/v4/classic/compat.d.cts +9 -11
- package/node_modules/zod/v4/classic/compat.d.ts +9 -11
- package/node_modules/zod/v4/classic/deep-partial.cjs +39 -0
- package/node_modules/zod/v4/classic/deep-partial.d.cts +14 -0
- package/node_modules/zod/v4/classic/deep-partial.d.ts +14 -0
- package/node_modules/zod/v4/classic/deep-partial.js +13 -0
- package/node_modules/zod/v4/classic/errors.cjs +43 -34
- package/node_modules/zod/v4/classic/errors.d.cts +3 -4
- package/node_modules/zod/v4/classic/errors.d.ts +3 -4
- package/node_modules/zod/v4/classic/errors.js +43 -34
- package/node_modules/zod/v4/classic/external.cjs +30 -27
- package/node_modules/zod/v4/classic/external.d.cts +5 -2
- package/node_modules/zod/v4/classic/external.d.ts +5 -2
- package/node_modules/zod/v4/classic/external.js +5 -8
- package/node_modules/zod/v4/classic/from-json-schema.cjs +136 -75
- package/node_modules/zod/v4/classic/from-json-schema.js +136 -75
- package/node_modules/zod/v4/classic/in-out.cjs +63 -0
- package/node_modules/zod/v4/classic/in-out.d.cts +8 -0
- package/node_modules/zod/v4/classic/in-out.d.ts +8 -0
- package/node_modules/zod/v4/classic/in-out.js +36 -0
- package/node_modules/zod/v4/classic/index.cjs +2 -2
- package/node_modules/zod/v4/classic/index.d.cts +1 -2
- package/node_modules/zod/v4/classic/index.d.ts +1 -2
- package/node_modules/zod/v4/classic/index.js +2 -2
- package/node_modules/zod/v4/classic/iso.cjs +11 -22
- package/node_modules/zod/v4/classic/iso.d.cts +2 -17
- package/node_modules/zod/v4/classic/iso.d.ts +2 -17
- package/node_modules/zod/v4/classic/iso.js +2 -17
- package/node_modules/zod/v4/classic/parse.cjs +4 -1
- package/node_modules/zod/v4/classic/parse.d.cts +17 -4
- package/node_modules/zod/v4/classic/parse.d.ts +17 -4
- package/node_modules/zod/v4/classic/parse.js +1 -0
- package/node_modules/zod/v4/classic/schemas.cjs +498 -398
- package/node_modules/zod/v4/classic/schemas.d.cts +53 -18
- package/node_modules/zod/v4/classic/schemas.d.ts +53 -18
- package/node_modules/zod/v4/classic/schemas.js +492 -396
- package/node_modules/zod/v4/core/api.cjs +23 -4
- package/node_modules/zod/v4/core/api.d.cts +13 -9
- package/node_modules/zod/v4/core/api.d.ts +13 -9
- package/node_modules/zod/v4/core/api.js +21 -4
- package/node_modules/zod/v4/core/checks.cjs +37 -31
- package/node_modules/zod/v4/core/checks.d.cts +13 -13
- package/node_modules/zod/v4/core/checks.d.ts +13 -13
- package/node_modules/zod/v4/core/checks.js +37 -31
- package/node_modules/zod/v4/core/compile.cjs +1813 -0
- package/node_modules/zod/v4/core/compile.d.cts +51 -0
- package/node_modules/zod/v4/core/compile.d.ts +51 -0
- package/node_modules/zod/v4/core/compile.js +1783 -0
- package/node_modules/zod/v4/core/core.cjs +81 -18
- package/node_modules/zod/v4/core/core.d.cts +16 -4
- package/node_modules/zod/v4/core/core.d.ts +16 -4
- package/node_modules/zod/v4/core/core.js +82 -19
- package/node_modules/zod/v4/core/doc.cjs +5 -7
- package/node_modules/zod/v4/core/doc.d.cts +3 -1
- package/node_modules/zod/v4/core/doc.d.ts +3 -1
- package/node_modules/zod/v4/core/doc.js +5 -7
- package/node_modules/zod/v4/core/errors.cjs +110 -25
- package/node_modules/zod/v4/core/errors.d.cts +4 -0
- package/node_modules/zod/v4/core/errors.d.ts +4 -0
- package/node_modules/zod/v4/core/errors.js +110 -25
- package/node_modules/zod/v4/core/index.cjs +5 -1
- package/node_modules/zod/v4/core/index.d.cts +3 -0
- package/node_modules/zod/v4/core/index.d.ts +3 -0
- package/node_modules/zod/v4/core/index.js +3 -0
- package/node_modules/zod/v4/core/json-schema-generator.cjs +4 -0
- package/node_modules/zod/v4/core/json-schema-generator.d.cts +2 -2
- package/node_modules/zod/v4/core/json-schema-generator.d.ts +2 -2
- package/node_modules/zod/v4/core/json-schema-generator.js +4 -0
- package/node_modules/zod/v4/core/json-schema-processors.cjs +264 -95
- package/node_modules/zod/v4/core/json-schema-processors.js +243 -97
- package/node_modules/zod/v4/core/json-schema.d.cts +2 -1
- package/node_modules/zod/v4/core/json-schema.d.ts +2 -1
- package/node_modules/zod/v4/core/memoizer.cjs +272 -0
- package/node_modules/zod/v4/core/memoizer.d.cts +15 -0
- package/node_modules/zod/v4/core/memoizer.d.ts +15 -0
- package/node_modules/zod/v4/core/memoizer.js +265 -0
- package/node_modules/zod/v4/core/parse.cjs +96 -34
- package/node_modules/zod/v4/core/parse.d.cts +14 -11
- package/node_modules/zod/v4/core/parse.d.ts +14 -11
- package/node_modules/zod/v4/core/parse.js +94 -33
- package/node_modules/zod/v4/core/regexes.cjs +27 -15
- package/node_modules/zod/v4/core/regexes.d.cts +2 -0
- package/node_modules/zod/v4/core/regexes.d.ts +2 -0
- package/node_modules/zod/v4/core/regexes.js +24 -13
- package/node_modules/zod/v4/core/registries.js +2 -2
- package/node_modules/zod/v4/core/schemas.cjs +537 -326
- package/node_modules/zod/v4/core/schemas.d.cts +100 -31
- package/node_modules/zod/v4/core/schemas.d.ts +100 -31
- package/node_modules/zod/v4/core/schemas.js +526 -325
- package/node_modules/zod/v4/core/to-json-schema.cjs +242 -39
- package/node_modules/zod/v4/core/to-json-schema.d.cts +42 -3
- package/node_modules/zod/v4/core/to-json-schema.d.ts +42 -3
- package/node_modules/zod/v4/core/to-json-schema.js +241 -39
- package/node_modules/zod/v4/core/util.cjs +212 -31
- package/node_modules/zod/v4/core/util.d.cts +58 -1
- package/node_modules/zod/v4/core/util.d.ts +58 -1
- package/node_modules/zod/v4/core/util.js +202 -30
- package/node_modules/zod/v4/core/versions.cjs +2 -2
- package/node_modules/zod/v4/core/versions.d.cts +1 -1
- package/node_modules/zod/v4/core/versions.d.ts +1 -1
- package/node_modules/zod/v4/core/versions.js +2 -2
- package/node_modules/zod/v4/core/visit.cjs +195 -0
- package/node_modules/zod/v4/core/visit.d.cts +30 -0
- package/node_modules/zod/v4/core/visit.d.ts +30 -0
- package/node_modules/zod/v4/core/visit.js +169 -0
- package/node_modules/zod/v4/index.cjs +15 -5
- package/node_modules/zod/v4/index.d.cts +2 -2
- package/node_modules/zod/v4/index.d.ts +2 -2
- package/node_modules/zod/v4/index.js +3 -2
- package/node_modules/zod/v4/locales/ar.cjs +3 -0
- package/node_modules/zod/v4/locales/ar.js +3 -0
- package/node_modules/zod/v4/locales/az.cjs +3 -0
- package/node_modules/zod/v4/locales/az.js +3 -0
- package/node_modules/zod/v4/locales/be.cjs +10 -0
- package/node_modules/zod/v4/locales/be.js +10 -0
- package/node_modules/zod/v4/locales/bg.cjs +3 -0
- package/node_modules/zod/v4/locales/bg.js +3 -0
- package/node_modules/zod/v4/locales/bn.cjs +138 -0
- package/node_modules/zod/v4/locales/bn.d.cts +5 -0
- package/node_modules/zod/v4/locales/bn.d.ts +4 -0
- package/node_modules/zod/v4/locales/bn.js +111 -0
- package/node_modules/zod/v4/locales/ca.cjs +3 -0
- package/node_modules/zod/v4/locales/ca.js +3 -0
- package/node_modules/zod/v4/locales/ckb.cjs +158 -0
- package/node_modules/zod/v4/locales/ckb.d.cts +5 -0
- package/node_modules/zod/v4/locales/ckb.d.ts +4 -0
- package/node_modules/zod/v4/locales/ckb.js +131 -0
- package/node_modules/zod/v4/locales/cs.cjs +3 -0
- package/node_modules/zod/v4/locales/cs.js +3 -0
- package/node_modules/zod/v4/locales/da.cjs +5 -2
- package/node_modules/zod/v4/locales/da.js +5 -2
- package/node_modules/zod/v4/locales/de.cjs +3 -0
- package/node_modules/zod/v4/locales/de.js +3 -0
- package/node_modules/zod/v4/locales/el.cjs +1 -0
- package/node_modules/zod/v4/locales/el.js +1 -0
- package/node_modules/zod/v4/locales/en.cjs +14 -4
- package/node_modules/zod/v4/locales/en.js +14 -4
- package/node_modules/zod/v4/locales/eo.cjs +3 -0
- package/node_modules/zod/v4/locales/eo.js +3 -0
- package/node_modules/zod/v4/locales/es.cjs +2 -0
- package/node_modules/zod/v4/locales/es.js +2 -0
- package/node_modules/zod/v4/locales/fa.cjs +3 -0
- package/node_modules/zod/v4/locales/fa.js +3 -0
- package/node_modules/zod/v4/locales/fi.cjs +3 -0
- package/node_modules/zod/v4/locales/fi.js +3 -0
- package/node_modules/zod/v4/locales/fr-CA.cjs +3 -0
- package/node_modules/zod/v4/locales/fr-CA.js +3 -0
- package/node_modules/zod/v4/locales/fr.cjs +16 -14
- package/node_modules/zod/v4/locales/fr.js +16 -14
- package/node_modules/zod/v4/locales/gu.cjs +138 -0
- package/node_modules/zod/v4/locales/gu.d.cts +5 -0
- package/node_modules/zod/v4/locales/gu.d.ts +4 -0
- package/node_modules/zod/v4/locales/gu.js +111 -0
- package/node_modules/zod/v4/locales/he.cjs +5 -0
- package/node_modules/zod/v4/locales/he.js +5 -0
- package/node_modules/zod/v4/locales/hi.cjs +136 -0
- package/node_modules/zod/v4/locales/hi.d.cts +5 -0
- package/node_modules/zod/v4/locales/hi.d.ts +4 -0
- package/node_modules/zod/v4/locales/hi.js +109 -0
- package/node_modules/zod/v4/locales/hr.cjs +2 -0
- package/node_modules/zod/v4/locales/hr.js +2 -0
- package/node_modules/zod/v4/locales/hu.cjs +3 -0
- package/node_modules/zod/v4/locales/hu.js +3 -0
- package/node_modules/zod/v4/locales/hy.cjs +9 -0
- package/node_modules/zod/v4/locales/hy.js +9 -0
- package/node_modules/zod/v4/locales/id.cjs +3 -0
- package/node_modules/zod/v4/locales/id.js +3 -0
- package/node_modules/zod/v4/locales/index.cjs +22 -2
- package/node_modules/zod/v4/locales/index.d.cts +10 -0
- package/node_modules/zod/v4/locales/index.d.ts +10 -0
- package/node_modules/zod/v4/locales/index.js +10 -0
- package/node_modules/zod/v4/locales/is.cjs +3 -0
- package/node_modules/zod/v4/locales/is.js +3 -0
- package/node_modules/zod/v4/locales/it.cjs +3 -0
- package/node_modules/zod/v4/locales/it.js +3 -0
- package/node_modules/zod/v4/locales/ja.cjs +3 -0
- package/node_modules/zod/v4/locales/ja.js +3 -0
- package/node_modules/zod/v4/locales/ka.cjs +3 -0
- package/node_modules/zod/v4/locales/ka.js +3 -0
- package/node_modules/zod/v4/locales/km.cjs +3 -0
- package/node_modules/zod/v4/locales/km.js +3 -0
- package/node_modules/zod/v4/locales/kn.cjs +141 -0
- package/node_modules/zod/v4/locales/kn.d.cts +5 -0
- package/node_modules/zod/v4/locales/kn.d.ts +4 -0
- package/node_modules/zod/v4/locales/kn.js +114 -0
- package/node_modules/zod/v4/locales/ko.cjs +3 -0
- package/node_modules/zod/v4/locales/ko.js +3 -0
- package/node_modules/zod/v4/locales/lt.cjs +2 -0
- package/node_modules/zod/v4/locales/lt.js +2 -0
- package/node_modules/zod/v4/locales/mk.cjs +3 -0
- package/node_modules/zod/v4/locales/mk.js +3 -0
- package/node_modules/zod/v4/locales/ms.cjs +3 -0
- package/node_modules/zod/v4/locales/ms.js +3 -0
- package/node_modules/zod/v4/locales/ne.cjs +136 -0
- package/node_modules/zod/v4/locales/ne.d.cts +5 -0
- package/node_modules/zod/v4/locales/ne.d.ts +4 -0
- package/node_modules/zod/v4/locales/ne.js +109 -0
- package/node_modules/zod/v4/locales/nl.cjs +3 -0
- package/node_modules/zod/v4/locales/nl.js +3 -0
- package/node_modules/zod/v4/locales/nn.cjs +138 -0
- package/node_modules/zod/v4/locales/nn.d.cts +5 -0
- package/node_modules/zod/v4/locales/nn.d.ts +4 -0
- package/node_modules/zod/v4/locales/nn.js +111 -0
- package/node_modules/zod/v4/locales/no.cjs +5 -2
- package/node_modules/zod/v4/locales/no.js +5 -2
- package/node_modules/zod/v4/locales/ota.cjs +3 -0
- package/node_modules/zod/v4/locales/ota.js +3 -0
- package/node_modules/zod/v4/locales/pl.cjs +3 -0
- package/node_modules/zod/v4/locales/pl.js +3 -0
- package/node_modules/zod/v4/locales/ps.cjs +3 -0
- package/node_modules/zod/v4/locales/ps.js +3 -0
- package/node_modules/zod/v4/locales/pt-BR.cjs +168 -0
- package/node_modules/zod/v4/locales/pt-BR.d.cts +5 -0
- package/node_modules/zod/v4/locales/pt-BR.d.ts +4 -0
- package/node_modules/zod/v4/locales/pt-BR.js +141 -0
- package/node_modules/zod/v4/locales/pt.cjs +87 -55
- package/node_modules/zod/v4/locales/pt.js +87 -55
- package/node_modules/zod/v4/locales/ro.cjs +1 -0
- package/node_modules/zod/v4/locales/ro.js +1 -0
- package/node_modules/zod/v4/locales/ru.cjs +10 -0
- package/node_modules/zod/v4/locales/ru.js +10 -0
- package/node_modules/zod/v4/locales/sk.cjs +141 -0
- package/node_modules/zod/v4/locales/sk.d.cts +5 -0
- package/node_modules/zod/v4/locales/sk.d.ts +4 -0
- package/node_modules/zod/v4/locales/sk.js +114 -0
- package/node_modules/zod/v4/locales/sl.cjs +3 -0
- package/node_modules/zod/v4/locales/sl.js +3 -0
- package/node_modules/zod/v4/locales/sv.cjs +5 -2
- package/node_modules/zod/v4/locales/sv.js +5 -2
- package/node_modules/zod/v4/locales/ta.cjs +3 -0
- package/node_modules/zod/v4/locales/ta.js +3 -0
- package/node_modules/zod/v4/locales/th.cjs +3 -0
- package/node_modules/zod/v4/locales/th.js +3 -0
- package/node_modules/zod/v4/locales/tk.cjs +132 -0
- package/node_modules/zod/v4/locales/tk.d.cts +5 -0
- package/node_modules/zod/v4/locales/tk.d.ts +4 -0
- package/node_modules/zod/v4/locales/tk.js +105 -0
- package/node_modules/zod/v4/locales/tr.cjs +3 -0
- package/node_modules/zod/v4/locales/tr.js +3 -0
- package/node_modules/zod/v4/locales/uk.cjs +3 -0
- package/node_modules/zod/v4/locales/uk.js +3 -0
- package/node_modules/zod/v4/locales/ur.cjs +3 -0
- package/node_modules/zod/v4/locales/ur.js +3 -0
- package/node_modules/zod/v4/locales/uz.cjs +1 -0
- package/node_modules/zod/v4/locales/uz.js +1 -0
- package/node_modules/zod/v4/locales/vi.cjs +3 -0
- package/node_modules/zod/v4/locales/vi.js +3 -0
- package/node_modules/zod/v4/locales/yo.cjs +3 -0
- package/node_modules/zod/v4/locales/yo.js +3 -0
- package/node_modules/zod/v4/locales/zh-CN.cjs +3 -0
- package/node_modules/zod/v4/locales/zh-CN.js +3 -0
- package/node_modules/zod/v4/locales/zh-TW.cjs +3 -0
- package/node_modules/zod/v4/locales/zh-TW.js +3 -0
- package/node_modules/zod/v4/mini/checks.cjs +2 -1
- package/node_modules/zod/v4/mini/checks.d.cts +1 -1
- package/node_modules/zod/v4/mini/checks.d.ts +1 -1
- package/node_modules/zod/v4/mini/checks.js +1 -1
- package/node_modules/zod/v4/mini/deep-partial.cjs +39 -0
- package/node_modules/zod/v4/mini/deep-partial.d.cts +14 -0
- package/node_modules/zod/v4/mini/deep-partial.d.ts +14 -0
- package/node_modules/zod/v4/mini/deep-partial.js +13 -0
- package/node_modules/zod/v4/mini/external.cjs +12 -1
- package/node_modules/zod/v4/mini/external.d.cts +5 -2
- package/node_modules/zod/v4/mini/external.d.ts +5 -2
- package/node_modules/zod/v4/mini/external.js +3 -1
- package/node_modules/zod/v4/mini/in-out.cjs +63 -0
- package/node_modules/zod/v4/mini/in-out.d.cts +8 -0
- package/node_modules/zod/v4/mini/in-out.d.ts +8 -0
- package/node_modules/zod/v4/mini/in-out.js +36 -0
- package/node_modules/zod/v4/mini/parse.cjs +3 -1
- package/node_modules/zod/v4/mini/parse.d.cts +1 -1
- package/node_modules/zod/v4/mini/parse.d.ts +1 -1
- package/node_modules/zod/v4/mini/parse.js +1 -1
- package/node_modules/zod/v4/mini/schemas.cjs +75 -47
- package/node_modules/zod/v4/mini/schemas.d.cts +43 -13
- package/node_modules/zod/v4/mini/schemas.d.ts +43 -13
- package/node_modules/zod/v4/mini/schemas.js +71 -45
- package/openclaw.plugin.json +21 -0
- package/package.json +11 -8
- package/node_modules/jszip/.github/workflows/pr.yaml +0 -58
- package/node_modules/jszip/.jekyll-metadata +0 -0
- package/node_modules/jszip/.travis.yml +0 -17
- package/node_modules/jszip/deps.js +0 -37
- package/node_modules/jszip/graph.svg +0 -601
- package/node_modules/zod/src/v4/core/config.ts +0 -15
|
@@ -1,12 +1,92 @@
|
|
|
1
1
|
import fs from "node:fs";
|
|
2
2
|
import path from "node:path";
|
|
3
|
-
import {
|
|
3
|
+
import { FsSafeError } from "./errors.js";
|
|
4
|
+
import { formatErrorDetail } from "./error-detail.js";
|
|
5
|
+
import { isNotFoundPathError, isPathInside } from "./path.js";
|
|
6
|
+
import { realpathSync } from "./realpath.js";
|
|
7
|
+
import { assertNoWindowsPathAlias, pathForWindowsFilesystem, resolvePathPreservingWindowsRoot, } from "./windows-path-alias.js";
|
|
8
|
+
import { admitPathInsideRoot } from "./root-boundary.js";
|
|
9
|
+
export function absolutePathWithRawSegments(candidate) {
|
|
10
|
+
if (path.sep !== "\\") {
|
|
11
|
+
if (path.isAbsolute(candidate))
|
|
12
|
+
return candidate;
|
|
13
|
+
const base = process.cwd();
|
|
14
|
+
return `${base}${base.endsWith(path.sep) ? "" : path.sep}${candidate}`;
|
|
15
|
+
}
|
|
16
|
+
const raw = path.sep === "\\" ? candidate.replaceAll("/", "\\") : candidate;
|
|
17
|
+
const absolute = path.isAbsolute(raw);
|
|
18
|
+
if (absolute && raw[0] !== "\\")
|
|
19
|
+
return raw;
|
|
20
|
+
const drive = path.parse(raw).root;
|
|
21
|
+
if (absolute && drive !== "\\")
|
|
22
|
+
return raw;
|
|
23
|
+
const base = drive ? path.resolve(drive) : process.cwd();
|
|
24
|
+
return `${base}${base.endsWith(path.sep) ? "" : path.sep}${raw.slice(drive.length)}`;
|
|
25
|
+
}
|
|
26
|
+
export function rawPathRelativeToCanonicalRoot(candidate, rootCanonicalPath, options = {}) {
|
|
27
|
+
assertNoWindowsPathAlias(candidate);
|
|
28
|
+
assertNoWindowsPathAlias(rootCanonicalPath);
|
|
29
|
+
const absolute = absolutePathWithRawSegments(candidate);
|
|
30
|
+
const raw = process.platform === "win32" ? absolute.replaceAll("/", path.sep) : absolute;
|
|
31
|
+
const filesystemRoot = path.parse(raw).root;
|
|
32
|
+
const segments = raw.slice(filesystemRoot.length).split(path.sep);
|
|
33
|
+
const finalComponentIndex = segments.findLastIndex(segment => segment !== "" && segment !== ".");
|
|
34
|
+
let prefix = filesystemRoot;
|
|
35
|
+
let traversedSymlink = false;
|
|
36
|
+
const identityCache = process.platform === "win32" ? new Map() : undefined;
|
|
37
|
+
for (let index = 0; index < segments.length; index += 1) {
|
|
38
|
+
prefix += `${prefix.endsWith(path.sep) ? "" : path.sep}${segments[index]}`;
|
|
39
|
+
let canonical;
|
|
40
|
+
let isSymlink = false;
|
|
41
|
+
try {
|
|
42
|
+
const operationPath = pathForWindowsFilesystem(prefix);
|
|
43
|
+
const stat = fs.lstatSync(operationPath);
|
|
44
|
+
isSymlink = stat.isSymbolicLink();
|
|
45
|
+
// Check the original leaf before canonicalization can erase an entry alias.
|
|
46
|
+
if (isSymlink && options.rejectFinalSymlink && index === finalComponentIndex) {
|
|
47
|
+
throw new FsSafeError("symlink", "final symlink not allowed");
|
|
48
|
+
}
|
|
49
|
+
if (!isSymlink && !stat.isDirectory() && index < segments.length - 1)
|
|
50
|
+
return undefined;
|
|
51
|
+
traversedSymlink ||= isSymlink;
|
|
52
|
+
canonical = realpathSync.native(operationPath);
|
|
53
|
+
assertNoWindowsPathAlias(canonical);
|
|
54
|
+
if (isSymlink && index < segments.length - 1 &&
|
|
55
|
+
!fs.statSync(pathForWindowsFilesystem(canonical)).isDirectory())
|
|
56
|
+
return undefined;
|
|
57
|
+
if (isSymlink && !isPathInside(rootCanonicalPath, canonical) && !isPathInside(canonical, rootCanonicalPath)) {
|
|
58
|
+
throw new FsSafeError("outside-workspace", `symlink prefix resolves outside the root ancestry: ${formatErrorDetail(candidate)}`);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
catch (error) {
|
|
62
|
+
if (error instanceof FsSafeError)
|
|
63
|
+
throw error;
|
|
64
|
+
if (isSymlink)
|
|
65
|
+
return undefined;
|
|
66
|
+
continue;
|
|
67
|
+
}
|
|
68
|
+
const admitted = admitPathInsideRoot({
|
|
69
|
+
rootPath: rootCanonicalPath,
|
|
70
|
+
candidatePath: canonical,
|
|
71
|
+
rootIdentity: options.rootIdentity,
|
|
72
|
+
identityCache,
|
|
73
|
+
});
|
|
74
|
+
if (!admitted)
|
|
75
|
+
continue;
|
|
76
|
+
if (options.rejectSymlinks && traversedSymlink) {
|
|
77
|
+
throw new FsSafeError("symlink", "symlink path component not allowed");
|
|
78
|
+
}
|
|
79
|
+
return [admitted.relativePath, ...segments.slice(index + 1)]
|
|
80
|
+
.filter(Boolean).join(path.sep);
|
|
81
|
+
}
|
|
82
|
+
return undefined;
|
|
83
|
+
}
|
|
4
84
|
function isFilesystemRoot(candidate) {
|
|
5
85
|
return path.parse(candidate).root === candidate;
|
|
6
86
|
}
|
|
7
87
|
async function pathExists(targetPath) {
|
|
8
88
|
try {
|
|
9
|
-
fs.lstatSync(targetPath);
|
|
89
|
+
fs.lstatSync(pathForWindowsFilesystem(targetPath));
|
|
10
90
|
return true;
|
|
11
91
|
}
|
|
12
92
|
catch (error) {
|
|
@@ -17,7 +97,9 @@ async function pathExists(targetPath) {
|
|
|
17
97
|
}
|
|
18
98
|
}
|
|
19
99
|
export async function resolvePathViaExistingAncestor(targetPath) {
|
|
20
|
-
|
|
100
|
+
assertNoWindowsPathAlias(targetPath);
|
|
101
|
+
const normalized = resolvePathPreservingWindowsRoot(targetPath);
|
|
102
|
+
assertNoWindowsPathAlias(normalized);
|
|
21
103
|
let cursor = normalized;
|
|
22
104
|
const missingSuffix = [];
|
|
23
105
|
while (!isFilesystemRoot(cursor) && !(await pathExists(cursor))) {
|
|
@@ -31,21 +113,30 @@ export async function resolvePathViaExistingAncestor(targetPath) {
|
|
|
31
113
|
if (!(await pathExists(cursor))) {
|
|
32
114
|
return normalized;
|
|
33
115
|
}
|
|
116
|
+
let rawResolvedAncestor;
|
|
34
117
|
try {
|
|
35
|
-
|
|
36
|
-
return missingSuffix.length === 0
|
|
37
|
-
? resolvedAncestor
|
|
38
|
-
: path.resolve(resolvedAncestor, ...missingSuffix);
|
|
118
|
+
rawResolvedAncestor = realpathSync.native(pathForWindowsFilesystem(cursor));
|
|
39
119
|
}
|
|
40
120
|
catch {
|
|
41
121
|
return normalized;
|
|
42
122
|
}
|
|
123
|
+
assertNoWindowsPathAlias(rawResolvedAncestor);
|
|
124
|
+
const resolvedAncestor = resolvePathPreservingWindowsRoot(rawResolvedAncestor);
|
|
125
|
+
assertNoWindowsPathAlias(resolvedAncestor);
|
|
126
|
+
const resolved = missingSuffix.length === 0
|
|
127
|
+
? resolvedAncestor
|
|
128
|
+
: path.resolve(resolvedAncestor, ...missingSuffix);
|
|
129
|
+
assertNoWindowsPathAlias(resolved);
|
|
130
|
+
return resolved;
|
|
43
131
|
}
|
|
44
132
|
export function resolvePathViaExistingAncestorSync(targetPath) {
|
|
45
|
-
|
|
133
|
+
assertNoWindowsPathAlias(targetPath);
|
|
134
|
+
const normalized = resolvePathPreservingWindowsRoot(targetPath);
|
|
135
|
+
assertNoWindowsPathAlias(normalized);
|
|
46
136
|
let cursor = normalized;
|
|
47
137
|
const missingSuffix = [];
|
|
48
|
-
while (!isFilesystemRoot(cursor) &&
|
|
138
|
+
while (!isFilesystemRoot(cursor) &&
|
|
139
|
+
!fs.existsSync(pathForWindowsFilesystem(cursor))) {
|
|
49
140
|
missingSuffix.unshift(path.basename(cursor));
|
|
50
141
|
const parent = path.dirname(cursor);
|
|
51
142
|
if (parent === cursor) {
|
|
@@ -53,16 +144,22 @@ export function resolvePathViaExistingAncestorSync(targetPath) {
|
|
|
53
144
|
}
|
|
54
145
|
cursor = parent;
|
|
55
146
|
}
|
|
56
|
-
if (!fs.existsSync(cursor)) {
|
|
147
|
+
if (!fs.existsSync(pathForWindowsFilesystem(cursor))) {
|
|
57
148
|
return normalized;
|
|
58
149
|
}
|
|
150
|
+
let rawResolvedAncestor;
|
|
59
151
|
try {
|
|
60
|
-
|
|
61
|
-
return missingSuffix.length === 0
|
|
62
|
-
? resolvedAncestor
|
|
63
|
-
: path.resolve(resolvedAncestor, ...missingSuffix);
|
|
152
|
+
rawResolvedAncestor = realpathSync(pathForWindowsFilesystem(cursor));
|
|
64
153
|
}
|
|
65
154
|
catch {
|
|
66
155
|
return normalized;
|
|
67
156
|
}
|
|
157
|
+
assertNoWindowsPathAlias(rawResolvedAncestor);
|
|
158
|
+
const resolvedAncestor = resolvePathPreservingWindowsRoot(rawResolvedAncestor);
|
|
159
|
+
assertNoWindowsPathAlias(resolvedAncestor);
|
|
160
|
+
const resolved = missingSuffix.length === 0
|
|
161
|
+
? resolvedAncestor
|
|
162
|
+
: path.resolve(resolvedAncestor, ...missingSuffix);
|
|
163
|
+
assertNoWindowsPathAlias(resolved);
|
|
164
|
+
return resolved;
|
|
68
165
|
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import fs, { type BigIntStats } from "node:fs";
|
|
2
|
+
import { type DirectoryObservationGuard } from "./directory-guard.js";
|
|
3
|
+
import { type NativeDirectoryObservationBackend, type NativeDirectoryObservationGuard } from "./native-directory-observation.js";
|
|
4
|
+
import { type RootBoundaryIdentity } from "./root-boundary.js";
|
|
5
|
+
import { type StatObservationReceipt } from "./stat-observation.js";
|
|
6
|
+
export type RootPathObservationKind = "stat" | "directory";
|
|
7
|
+
export type RootPathDirectoryObservationGuard = DirectoryObservationGuard | NativeDirectoryObservationGuard;
|
|
8
|
+
export type RootPathTargetObservation = StatObservationReceipt | NativeDirectoryObservationGuard;
|
|
9
|
+
/** An exact receipt owned by one stat/list operation. Never cache it. */
|
|
10
|
+
export type RootPathObservationReceipt = {
|
|
11
|
+
kind: RootPathObservationKind;
|
|
12
|
+
rootGuard: DirectoryObservationGuard;
|
|
13
|
+
directoryGuard: RootPathDirectoryObservationGuard;
|
|
14
|
+
directoryObserver?: NativeDirectoryObservationBackend;
|
|
15
|
+
targetPath: string;
|
|
16
|
+
target: RootPathTargetObservation;
|
|
17
|
+
};
|
|
18
|
+
/** A failed initial target lookup must not discard its already admitted parent. */
|
|
19
|
+
export type RootPathParentObservationReceipt = Omit<RootPathObservationReceipt, "kind" | "target"> & {
|
|
20
|
+
kind: "stat-parent";
|
|
21
|
+
};
|
|
22
|
+
export type RootPathObservationRequest = {
|
|
23
|
+
kind: RootPathObservationKind;
|
|
24
|
+
rootGuard: DirectoryObservationGuard;
|
|
25
|
+
directoryObserver?: NativeDirectoryObservationBackend;
|
|
26
|
+
};
|
|
27
|
+
export type RootPathTraversalObservation = {
|
|
28
|
+
enabled: boolean;
|
|
29
|
+
request: RootPathObservationRequest;
|
|
30
|
+
targetIndex: number;
|
|
31
|
+
directoryIndex: number;
|
|
32
|
+
directoryGuard?: RootPathDirectoryObservationGuard;
|
|
33
|
+
directoryObserver?: NativeDirectoryObservationBackend;
|
|
34
|
+
targetPath?: string;
|
|
35
|
+
target?: RootPathTargetObservation;
|
|
36
|
+
};
|
|
37
|
+
export type RootPathObservedTraversalEntry = StatObservationReceipt | {
|
|
38
|
+
stat: fs.Stats | BigIntStats;
|
|
39
|
+
identity?: undefined;
|
|
40
|
+
} | NativeDirectoryObservationGuard;
|
|
41
|
+
export declare class RootPathObservationError extends Error {
|
|
42
|
+
readonly error: unknown;
|
|
43
|
+
readonly parentReceipt?: RootPathParentObservationReceipt | undefined;
|
|
44
|
+
readonly traversalFailure: boolean;
|
|
45
|
+
constructor(error: unknown, parentReceipt?: RootPathParentObservationReceipt | undefined, traversalFailure?: boolean);
|
|
46
|
+
}
|
|
47
|
+
export type RootPathTraversalContext = {
|
|
48
|
+
observationEligible: boolean;
|
|
49
|
+
rootPath: string;
|
|
50
|
+
rootCanonicalPath: string;
|
|
51
|
+
resolveParams: {
|
|
52
|
+
rootIdentity?: RootBoundaryIdentity;
|
|
53
|
+
};
|
|
54
|
+
state: {
|
|
55
|
+
finalComponentIndex: number;
|
|
56
|
+
relativePath: string;
|
|
57
|
+
segments: string[];
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
export declare function createRootPathTraversalObservation(context: RootPathTraversalContext, request?: RootPathObservationRequest): RootPathTraversalObservation | undefined;
|
|
61
|
+
export declare function inspectRootPathTraversalEntry(pathname: string, directorySlot: boolean, observation: RootPathTraversalObservation): RootPathObservedTraversalEntry;
|
|
62
|
+
export declare function captureRootPathObservedDirectory(observation: RootPathTraversalObservation, observed: RootPathObservedTraversalEntry, publicPath: string, canonicalPath: string, rootCanonicalPath: string, rootIdentity?: RootBoundaryIdentity): boolean;
|
|
63
|
+
//# sourceMappingURL=root-path-observation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"root-path-observation.d.ts","sourceRoot":"","sources":["../src/root-path-observation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAEL,KAAK,yBAAyB,EAC/B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAIL,KAAK,iCAAiC,EACtC,KAAK,+BAA+B,EACrC,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAA8B,KAAK,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAEhG,MAAM,MAAM,uBAAuB,GAAG,MAAM,GAAG,WAAW,CAAC;AAE3D,MAAM,MAAM,iCAAiC,GACzC,yBAAyB,GACzB,+BAA+B,CAAC;AAEpC,MAAM,MAAM,yBAAyB,GACjC,sBAAsB,GACtB,+BAA+B,CAAC;AAEpC,yEAAyE;AACzE,MAAM,MAAM,0BAA0B,GAAG;IACvC,IAAI,EAAE,uBAAuB,CAAC;IAC9B,SAAS,EAAE,yBAAyB,CAAC;IACrC,cAAc,EAAE,iCAAiC,CAAC;IAClD,iBAAiB,CAAC,EAAE,iCAAiC,CAAC;IACtD,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,yBAAyB,CAAC;CACnC,CAAC;AAEF,mFAAmF;AACnF,MAAM,MAAM,gCAAgC,GAAG,IAAI,CAAC,0BAA0B,EAAE,MAAM,GAAG,QAAQ,CAAC,GAAG;IACnG,IAAI,EAAE,aAAa,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACvC,IAAI,EAAE,uBAAuB,CAAC;IAC9B,SAAS,EAAE,yBAAyB,CAAC;IACrC,iBAAiB,CAAC,EAAE,iCAAiC,CAAC;CACvD,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG;IACzC,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,0BAA0B,CAAC;IACpC,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,iCAAiC,CAAC;IACnD,iBAAiB,CAAC,EAAE,iCAAiC,CAAC;IACtD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,yBAAyB,CAAC;CACpC,CAAC;AAEF,MAAM,MAAM,8BAA8B,GACtC,sBAAsB,GACtB;IAAE,IAAI,EAAE,EAAE,CAAC,KAAK,GAAG,WAAW,CAAC;IAAC,QAAQ,CAAC,EAAE,SAAS,CAAA;CAAE,GACtD,+BAA+B,CAAC;AAIpC,qBAAa,wBAAyB,SAAQ,KAAK;IAE/C,QAAQ,CAAC,KAAK,EAAE,OAAO;IACvB,QAAQ,CAAC,aAAa,CAAC,EAAE,gCAAgC;IACzD,QAAQ,CAAC,gBAAgB;IAH3B,YACW,KAAK,EAAE,OAAO,EACd,aAAa,CAAC,EAAE,gCAAgC,YAAA,EAChD,gBAAgB,UAAQ,EAIlC;CACF;AAoBD,MAAM,MAAM,wBAAwB,GAAG;IACrC,mBAAmB,EAAE,OAAO,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,aAAa,EAAE;QAAE,YAAY,CAAC,EAAE,oBAAoB,CAAA;KAAE,CAAC;IACvD,KAAK,EAAE;QACL,mBAAmB,EAAE,MAAM,CAAC;QAC5B,YAAY,EAAE,MAAM,CAAC;QACrB,QAAQ,EAAE,MAAM,EAAE,CAAC;KACpB,CAAC;CACH,CAAC;AAEF,wBAAgB,kCAAkC,CAChD,OAAO,EAAE,wBAAwB,EACjC,OAAO,CAAC,EAAE,0BAA0B,GACnC,4BAA4B,GAAG,SAAS,CAkF1C;AAED,wBAAgB,6BAA6B,CAC3C,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,OAAO,EACtB,WAAW,EAAE,4BAA4B,GACxC,8BAA8B,CAyBhC;AAED,wBAAgB,gCAAgC,CAC9C,WAAW,EAAE,4BAA4B,EACzC,QAAQ,EAAE,8BAA8B,EACxC,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,MAAM,EACrB,iBAAiB,EAAE,MAAM,EACzB,YAAY,CAAC,EAAE,oBAAoB,GAClC,OAAO,CAgCT"}
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import fs, {} from "node:fs";
|
|
2
|
+
import { extendDirectoryObservationGuard, } from "./directory-guard.js";
|
|
3
|
+
import { FsSafeError } from "./errors.js";
|
|
4
|
+
import { extendNativeDirectoryObservationGuard, inspectNativeDirectoryObservation, isNativeDirectoryObservationGuard, } from "./native-directory-observation.js";
|
|
5
|
+
import { admitPathInsideRoot, } from "./root-boundary.js";
|
|
6
|
+
import { realpathSync } from "./realpath.js";
|
|
7
|
+
import { inspectStatObservationSync } from "./stat-observation.js";
|
|
8
|
+
// Observation-only failures happen after ordinary traversal has admitted the
|
|
9
|
+
// name. Keep them distinguishable so Root preserves existing error precedence.
|
|
10
|
+
export class RootPathObservationError extends Error {
|
|
11
|
+
error;
|
|
12
|
+
parentReceipt;
|
|
13
|
+
traversalFailure;
|
|
14
|
+
constructor(error, parentReceipt, traversalFailure = false) {
|
|
15
|
+
super("root path observation failed", { cause: error });
|
|
16
|
+
this.error = error;
|
|
17
|
+
this.parentReceipt = parentReceipt;
|
|
18
|
+
this.traversalFailure = traversalFailure;
|
|
19
|
+
this.name = "RootPathObservationError";
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
function straightTraversalPath(value) {
|
|
23
|
+
if (value.length === 0)
|
|
24
|
+
return false;
|
|
25
|
+
const windows = process.platform === "win32";
|
|
26
|
+
let segmentStart = 0;
|
|
27
|
+
for (let index = 0; index <= value.length; index += 1) {
|
|
28
|
+
const separator = index === value.length || value[index] === "/" ||
|
|
29
|
+
(windows && value[index] === "\\");
|
|
30
|
+
if (!separator)
|
|
31
|
+
continue;
|
|
32
|
+
const segmentLength = index - segmentStart;
|
|
33
|
+
if (segmentLength === 0 ||
|
|
34
|
+
(segmentLength === 1 && value.charCodeAt(segmentStart) === 0x2e) ||
|
|
35
|
+
(segmentLength === 2 && value.charCodeAt(segmentStart) === 0x2e &&
|
|
36
|
+
value.charCodeAt(segmentStart + 1) === 0x2e))
|
|
37
|
+
return false;
|
|
38
|
+
segmentStart = index + 1;
|
|
39
|
+
}
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
42
|
+
export function createRootPathTraversalObservation(context, request) {
|
|
43
|
+
const { state } = context;
|
|
44
|
+
const rootTraversal = state.finalComponentIndex < 0 &&
|
|
45
|
+
(state.relativePath === "" || state.relativePath === ".");
|
|
46
|
+
if (!request || !context.observationEligible ||
|
|
47
|
+
request.rootGuard.dir !== context.rootCanonicalPath ||
|
|
48
|
+
request.rootGuard.realPath !== context.rootCanonicalPath ||
|
|
49
|
+
context.rootPath !== context.rootCanonicalPath ||
|
|
50
|
+
(!rootTraversal && !straightTraversalPath(state.relativePath)) ||
|
|
51
|
+
(!rootTraversal && state.finalComponentIndex !== state.segments.length - 1))
|
|
52
|
+
return undefined;
|
|
53
|
+
if (state.finalComponentIndex >= 0) {
|
|
54
|
+
const directoryIndex = request.kind === "stat"
|
|
55
|
+
? state.finalComponentIndex - 1
|
|
56
|
+
: state.finalComponentIndex;
|
|
57
|
+
return {
|
|
58
|
+
enabled: true,
|
|
59
|
+
request,
|
|
60
|
+
targetIndex: state.finalComponentIndex,
|
|
61
|
+
directoryIndex,
|
|
62
|
+
directoryGuard: directoryIndex < 0 ? request.rootGuard : undefined,
|
|
63
|
+
// A direct-child stat has no selected-directory slot at which the
|
|
64
|
+
// optional helper can establish a receipt. Keep its final Root fence on
|
|
65
|
+
// the established JavaScript path so helper unavailability cannot first
|
|
66
|
+
// appear after the target has been admitted.
|
|
67
|
+
directoryObserver: directoryIndex < 0 ? undefined : request.directoryObserver,
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
if (!rootTraversal)
|
|
71
|
+
return undefined;
|
|
72
|
+
let directoryGuard = request.rootGuard;
|
|
73
|
+
// Root-only stat likewise has no pre-admission helper observation. Root
|
|
74
|
+
// listing below does establish one and may safely retain the backend.
|
|
75
|
+
let directoryObserver = request.kind === "stat" ? undefined : request.directoryObserver;
|
|
76
|
+
if (request.kind === "directory") {
|
|
77
|
+
if (directoryObserver) {
|
|
78
|
+
try {
|
|
79
|
+
const observed = inspectNativeDirectoryObservation(directoryObserver, request.rootGuard.dir, request.rootGuard.identity);
|
|
80
|
+
const admitted = admitPathInsideRoot({
|
|
81
|
+
rootPath: context.rootCanonicalPath,
|
|
82
|
+
candidatePath: observed.realPath,
|
|
83
|
+
rootIdentity: context.resolveParams.rootIdentity,
|
|
84
|
+
});
|
|
85
|
+
if (!admitted || admitted.relativePath !== "") {
|
|
86
|
+
throw new FsSafeError("path-mismatch", "root path changed during operation");
|
|
87
|
+
}
|
|
88
|
+
observed.realPath = admitted.path;
|
|
89
|
+
directoryGuard = extendNativeDirectoryObservationGuard(observed, request.rootGuard.dir);
|
|
90
|
+
}
|
|
91
|
+
catch (error) {
|
|
92
|
+
if (error instanceof FsSafeError && error.code === "path-mismatch") {
|
|
93
|
+
throw new RootPathObservationError(error);
|
|
94
|
+
}
|
|
95
|
+
directoryObserver = undefined;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
if (!directoryObserver) {
|
|
99
|
+
try {
|
|
100
|
+
const admitted = admitPathInsideRoot({
|
|
101
|
+
rootPath: context.rootCanonicalPath,
|
|
102
|
+
candidatePath: realpathSync.native(request.rootGuard.dir),
|
|
103
|
+
rootIdentity: context.resolveParams.rootIdentity,
|
|
104
|
+
});
|
|
105
|
+
if (!admitted || admitted.relativePath !== "") {
|
|
106
|
+
throw new FsSafeError("path-mismatch", "root path changed during operation");
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
catch (error) {
|
|
110
|
+
throw new RootPathObservationError(error);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
return {
|
|
115
|
+
enabled: true,
|
|
116
|
+
request,
|
|
117
|
+
targetIndex: -1,
|
|
118
|
+
directoryIndex: -1,
|
|
119
|
+
directoryGuard,
|
|
120
|
+
directoryObserver,
|
|
121
|
+
targetPath: context.rootCanonicalPath,
|
|
122
|
+
target: directoryGuard,
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
export function inspectRootPathTraversalEntry(pathname, directorySlot, observation) {
|
|
126
|
+
if (directorySlot && observation.directoryObserver) {
|
|
127
|
+
try {
|
|
128
|
+
return extendNativeDirectoryObservationGuard(inspectNativeDirectoryObservation(observation.directoryObserver, pathname), pathname);
|
|
129
|
+
}
|
|
130
|
+
catch {
|
|
131
|
+
// This directory has not been admitted yet. Preserve the established
|
|
132
|
+
// resolver and error ordering when the optional observation is unusable.
|
|
133
|
+
observation.directoryObserver = undefined;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
const first = process.platform === "win32"
|
|
137
|
+
? fs.lstatSync(pathname, { bigint: true }) : fs.lstatSync(pathname);
|
|
138
|
+
if (first.isSymbolicLink() || (directorySlot && !first.isDirectory()))
|
|
139
|
+
return { stat: first };
|
|
140
|
+
try {
|
|
141
|
+
return inspectStatObservationSync(bigint => bigint
|
|
142
|
+
? fs.lstatSync(pathname, { bigint: true }) : fs.lstatSync(pathname), undefined, first);
|
|
143
|
+
}
|
|
144
|
+
catch (error) {
|
|
145
|
+
if (error instanceof FsSafeError && error.code === "path-mismatch") {
|
|
146
|
+
throw new RootPathObservationError(error);
|
|
147
|
+
}
|
|
148
|
+
throw error;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
export function captureRootPathObservedDirectory(observation, observed, publicPath, canonicalPath, rootCanonicalPath, rootIdentity) {
|
|
152
|
+
if (!isNativeDirectoryObservationGuard(observed) && !observed.stat.isDirectory())
|
|
153
|
+
return false;
|
|
154
|
+
let realPath;
|
|
155
|
+
try {
|
|
156
|
+
realPath = isNativeDirectoryObservationGuard(observed)
|
|
157
|
+
? observed.realPath
|
|
158
|
+
: realpathSync.native(canonicalPath);
|
|
159
|
+
}
|
|
160
|
+
catch (error) {
|
|
161
|
+
throw new RootPathObservationError(error);
|
|
162
|
+
}
|
|
163
|
+
const admitted = admitPathInsideRoot({
|
|
164
|
+
rootPath: rootCanonicalPath,
|
|
165
|
+
candidatePath: realPath,
|
|
166
|
+
rootIdentity,
|
|
167
|
+
});
|
|
168
|
+
if (!admitted) {
|
|
169
|
+
throw new RootPathObservationError(new FsSafeError("outside-workspace", "directory is outside workspace root"));
|
|
170
|
+
}
|
|
171
|
+
if (isNativeDirectoryObservationGuard(observed)) {
|
|
172
|
+
observed.dir = publicPath;
|
|
173
|
+
observed.realPath = admitted.path;
|
|
174
|
+
observation.directoryGuard = observed;
|
|
175
|
+
}
|
|
176
|
+
else {
|
|
177
|
+
observation.directoryGuard = extendDirectoryObservationGuard(observed, publicPath, admitted.path);
|
|
178
|
+
}
|
|
179
|
+
return true;
|
|
180
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { RootContext } from "./root-context.js";
|
|
2
|
+
import type { RootPathObservationReceipt } from "./root-path.js";
|
|
3
|
+
import type { PathStat } from "./types.js";
|
|
4
|
+
export declare function statResolvedPathInRoot(root: RootContext, resolvedPath: string, receipt?: RootPathObservationReceipt): Promise<PathStat>;
|
|
5
|
+
//# sourceMappingURL=root-path-stat.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"root-path-stat.d.ts","sourceRoot":"","sources":["../src/root-path-stat.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AAIjE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAwB3C,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,WAAW,EACjB,YAAY,EAAE,MAAM,EACpB,OAAO,CAAC,EAAE,0BAA0B,GACnC,OAAO,CAAC,QAAQ,CAAC,CA8EnB"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import fsSync from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { FsSafeError } from "./errors.js";
|
|
4
|
+
import { recordFileObservationFailure } from "./file-observation.js";
|
|
5
|
+
import { hasNodeErrorCode, isNotFoundPathError } from "./path.js";
|
|
6
|
+
import { assertRootDirectoryObservationGuard, assertRootPathObservationReceiptCurrent, createRootDirectoryObservationGuard, pathStatFromStats, } from "./root-directory-list.js";
|
|
7
|
+
import { fileNotFoundError } from "./root-errors.js";
|
|
8
|
+
import { inspectFileIdentitySync } from "./strict-file-identity.js";
|
|
9
|
+
import { assertStatObservationSync } from "./stat-observation.js";
|
|
10
|
+
import { getFsSafeTestHooks } from "./test-hooks.js";
|
|
11
|
+
async function missingObservedFileError(cause, pathname, before, assertParents) {
|
|
12
|
+
const failure = new FsSafeError("path-mismatch", "file changed during operation", {
|
|
13
|
+
cause: cause instanceof Error ? cause : undefined,
|
|
14
|
+
});
|
|
15
|
+
if (hasNodeErrorCode(cause, "ENOENT") && before?.isFile() && !before.isSymbolicLink() &&
|
|
16
|
+
(before.nlink === 1 || before.nlink === 1n)) {
|
|
17
|
+
try {
|
|
18
|
+
await assertParents();
|
|
19
|
+
// Metadata loss permits discarding a probe, never reading or owning a file.
|
|
20
|
+
recordFileObservationFailure(failure, `stat-leaf-missing:${pathname}`);
|
|
21
|
+
}
|
|
22
|
+
catch {
|
|
23
|
+
// Keep the public mismatch and withhold provenance when ancestry changed.
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
return failure;
|
|
27
|
+
}
|
|
28
|
+
export async function statResolvedPathInRoot(root, resolvedPath, receipt) {
|
|
29
|
+
let admittedTarget = false;
|
|
30
|
+
try {
|
|
31
|
+
if (receipt) {
|
|
32
|
+
if (receipt.kind !== "stat" || receipt.targetPath !== resolvedPath) {
|
|
33
|
+
throw new FsSafeError("path-mismatch", "file observation receipt does not match target");
|
|
34
|
+
}
|
|
35
|
+
admittedTarget = true;
|
|
36
|
+
const beforeObservation = getFsSafeTestHooks()?.beforeRootStatObservation;
|
|
37
|
+
if (beforeObservation)
|
|
38
|
+
await beforeObservation(resolvedPath);
|
|
39
|
+
let observed;
|
|
40
|
+
try {
|
|
41
|
+
observed = assertStatObservationSync(bigint => bigint ? fsSync.lstatSync(resolvedPath, { bigint: true }) : fsSync.lstatSync(resolvedPath), receipt.target.identity);
|
|
42
|
+
}
|
|
43
|
+
catch (error) {
|
|
44
|
+
if (isNotFoundPathError(error)) {
|
|
45
|
+
throw await missingObservedFileError(error, resolvedPath, "stat" in receipt.target ? receipt.target.stat : undefined, () => assertRootPathObservationReceiptCurrent(root, receipt));
|
|
46
|
+
}
|
|
47
|
+
throw error;
|
|
48
|
+
}
|
|
49
|
+
if (observed.isSymbolicLink()) {
|
|
50
|
+
throw new FsSafeError("path-mismatch", "file changed during operation");
|
|
51
|
+
}
|
|
52
|
+
assertRootPathObservationReceiptCurrent(root, receipt, observed);
|
|
53
|
+
return pathStatFromStats(observed);
|
|
54
|
+
}
|
|
55
|
+
const guardPath = resolvedPath === root.rootReal ? root.rootReal : path.dirname(resolvedPath);
|
|
56
|
+
const parentGuard = guardPath === root.rootReal && root.rootGuard
|
|
57
|
+
? root.rootGuard
|
|
58
|
+
: await createRootDirectoryObservationGuard(root, guardPath);
|
|
59
|
+
let expected;
|
|
60
|
+
try {
|
|
61
|
+
const beforeInitialObservation = getFsSafeTestHooks()?.beforeRootStatInitialObservation;
|
|
62
|
+
if (beforeInitialObservation)
|
|
63
|
+
await beforeInitialObservation(resolvedPath);
|
|
64
|
+
expected = inspectFileIdentitySync(() => fsSync.lstatSync(resolvedPath, { bigint: true }));
|
|
65
|
+
if (expected.isSymbolicLink()) {
|
|
66
|
+
throw new FsSafeError("path-mismatch", "file changed during operation");
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
catch (error) {
|
|
70
|
+
// No initial target error is safe to expose until the admitted parent is
|
|
71
|
+
// proven current; a redirect must win over an ordinary lookup failure.
|
|
72
|
+
await assertRootDirectoryObservationGuard(root, parentGuard);
|
|
73
|
+
throw error;
|
|
74
|
+
}
|
|
75
|
+
admittedTarget = true;
|
|
76
|
+
const beforeObservation = getFsSafeTestHooks()?.beforeRootStatObservation;
|
|
77
|
+
if (beforeObservation)
|
|
78
|
+
await beforeObservation(resolvedPath);
|
|
79
|
+
let observed;
|
|
80
|
+
try {
|
|
81
|
+
observed = inspectFileIdentitySync(() => fsSync.lstatSync(resolvedPath, { bigint: true }), expected);
|
|
82
|
+
}
|
|
83
|
+
catch (error) {
|
|
84
|
+
if (isNotFoundPathError(error)) {
|
|
85
|
+
throw await missingObservedFileError(error, resolvedPath, expected, () => assertRootDirectoryObservationGuard(root, parentGuard));
|
|
86
|
+
}
|
|
87
|
+
throw error;
|
|
88
|
+
}
|
|
89
|
+
if (observed.isSymbolicLink()) {
|
|
90
|
+
throw new FsSafeError("path-mismatch", "file changed during operation");
|
|
91
|
+
}
|
|
92
|
+
await assertRootDirectoryObservationGuard(root, parentGuard);
|
|
93
|
+
return pathStatFromStats(observed);
|
|
94
|
+
}
|
|
95
|
+
catch (error) {
|
|
96
|
+
if (!admittedTarget && isNotFoundPathError(error)) {
|
|
97
|
+
throw fileNotFoundError(error instanceof Error ? error : undefined);
|
|
98
|
+
}
|
|
99
|
+
throw error;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"root-path-symlink.d.ts","sourceRoot":"","sources":["../src/root-path-symlink.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"root-path-symlink.d.ts","sourceRoot":"","sources":["../src/root-path-symlink.ts"],"names":[],"mappings":"AAeA,KAAK,wBAAwB,GAAG;IAC9B,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC;AAsBF,wBAAsB,qBAAqB,CACzC,WAAW,EAAE,MAAM,EACnB,OAAO,GAAE,wBAA6B,GACrC,OAAO,CAAC,MAAM,CAAC,CAejB;AAED,wBAAgB,yBAAyB,CACvC,WAAW,EAAE,MAAM,EACnB,OAAO,GAAE,wBAA6B,GACrC,MAAM,CAeR"}
|
|
@@ -2,7 +2,9 @@ import fs from "node:fs";
|
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { FsSafeError } from "./errors.js";
|
|
4
4
|
import { isNotFoundPathError, isSymlinkOpenError } from "./path.js";
|
|
5
|
+
import { realpathSync } from "./realpath.js";
|
|
5
6
|
import { resolvePathViaExistingAncestor, resolvePathViaExistingAncestorSync, } from "./root-path-existing.js";
|
|
7
|
+
import { assertNoWindowsPathAlias, resolvePathFromBasePreservingWindowsRoot, resolvePathPreservingWindowsRoot, } from "./windows-path-alias.js";
|
|
6
8
|
function normalizeSymlinkResolutionError(error, options) {
|
|
7
9
|
if (isSymlinkOpenError(error) ||
|
|
8
10
|
(options.rejectUnresolved && isNotFoundPathError(error))) {
|
|
@@ -13,23 +15,41 @@ function normalizeSymlinkResolutionError(error, options) {
|
|
|
13
15
|
if (!isNotFoundPathError(error))
|
|
14
16
|
throw error;
|
|
15
17
|
}
|
|
18
|
+
function resolveSymlinkTargetPath(symlinkPath, linkTarget) {
|
|
19
|
+
const linkDir = resolvePathPreservingWindowsRoot(path.dirname(symlinkPath));
|
|
20
|
+
return resolvePathFromBasePreservingWindowsRoot(linkDir, linkTarget);
|
|
21
|
+
}
|
|
16
22
|
export async function resolveSymlinkHopPath(symlinkPath, options = {}) {
|
|
17
23
|
try {
|
|
18
|
-
|
|
24
|
+
const rawRealPath = realpathSync.native(symlinkPath);
|
|
25
|
+
assertNoWindowsPathAlias(rawRealPath, "filesystem", "resolved symlink path uses a Windows filesystem namespace alias");
|
|
26
|
+
const realPath = resolvePathPreservingWindowsRoot(rawRealPath);
|
|
27
|
+
assertNoWindowsPathAlias(realPath, "filesystem", "resolved symlink path uses a Windows filesystem namespace alias");
|
|
28
|
+
return realPath;
|
|
19
29
|
}
|
|
20
30
|
catch (error) {
|
|
21
31
|
normalizeSymlinkResolutionError(error, options);
|
|
22
32
|
const linkTarget = fs.readlinkSync(symlinkPath);
|
|
23
|
-
|
|
33
|
+
assertNoWindowsPathAlias(linkTarget, "filesystem", "symlink target uses a Windows filesystem namespace alias");
|
|
34
|
+
const resolved = await resolvePathViaExistingAncestor(resolveSymlinkTargetPath(symlinkPath, linkTarget));
|
|
35
|
+
assertNoWindowsPathAlias(resolved, "filesystem", "resolved symlink path uses a Windows filesystem namespace alias");
|
|
36
|
+
return resolved;
|
|
24
37
|
}
|
|
25
38
|
}
|
|
26
39
|
export function resolveSymlinkHopPathSync(symlinkPath, options = {}) {
|
|
27
40
|
try {
|
|
28
|
-
|
|
41
|
+
const rawRealPath = realpathSync(symlinkPath);
|
|
42
|
+
assertNoWindowsPathAlias(rawRealPath, "filesystem", "resolved symlink path uses a Windows filesystem namespace alias");
|
|
43
|
+
const realPath = resolvePathPreservingWindowsRoot(rawRealPath);
|
|
44
|
+
assertNoWindowsPathAlias(realPath, "filesystem", "resolved symlink path uses a Windows filesystem namespace alias");
|
|
45
|
+
return realPath;
|
|
29
46
|
}
|
|
30
47
|
catch (error) {
|
|
31
48
|
normalizeSymlinkResolutionError(error, options);
|
|
32
49
|
const linkTarget = fs.readlinkSync(symlinkPath);
|
|
33
|
-
|
|
50
|
+
assertNoWindowsPathAlias(linkTarget, "filesystem", "symlink target uses a Windows filesystem namespace alias");
|
|
51
|
+
const resolved = resolvePathViaExistingAncestorSync(resolveSymlinkTargetPath(symlinkPath, linkTarget));
|
|
52
|
+
assertNoWindowsPathAlias(resolved, "filesystem", "resolved symlink path uses a Windows filesystem namespace alias");
|
|
53
|
+
return resolved;
|
|
34
54
|
}
|
|
35
55
|
}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
+
import { type RootBoundaryIdentity } from "./root-boundary.js";
|
|
2
|
+
import { type RootPathObservationReceipt, type RootPathObservationRequest } from "./root-path-observation.js";
|
|
3
|
+
import type { RemovalPathReceipts } from "./root-remove-receipt.js";
|
|
1
4
|
export { resolvePathViaExistingAncestorSync } from "./root-path-existing.js";
|
|
5
|
+
export { RootPathObservationError, type RootPathDirectoryObservationGuard, type RootPathObservationKind, type RootPathObservationReceipt, type RootPathParentObservationReceipt, type RootPathObservationRequest, type RootPathTargetObservation, } from "./root-path-observation.js";
|
|
2
6
|
type RootPathIntent = "read" | "write" | "create" | "delete" | "stat";
|
|
3
7
|
export type RootPathAliasPolicy = {
|
|
4
8
|
allowFinalSymlinkForUnlink?: boolean;
|
|
@@ -21,9 +25,11 @@ type ResolveRootPathParams = {
|
|
|
21
25
|
intent?: RootPathIntent;
|
|
22
26
|
policy?: RootPathAliasPolicy;
|
|
23
27
|
rejectSymlinks?: boolean;
|
|
28
|
+
rejectFinalSymlink?: boolean;
|
|
24
29
|
rejectUnresolvedSymlinks?: boolean;
|
|
25
30
|
skipLexicalRootCheck?: boolean;
|
|
26
31
|
rootCanonicalPath?: string;
|
|
32
|
+
rootIdentity?: RootBoundaryIdentity;
|
|
27
33
|
};
|
|
28
34
|
type ResolvedRootPathKind = "missing" | "file" | "directory" | "symlink" | "other";
|
|
29
35
|
export type ResolvedRootPath = {
|
|
@@ -35,6 +41,14 @@ export type ResolvedRootPath = {
|
|
|
35
41
|
exists: boolean;
|
|
36
42
|
kind: ResolvedRootPathKind;
|
|
37
43
|
};
|
|
44
|
+
export type ObservedRootPath = {
|
|
45
|
+
resolved: ResolvedRootPath;
|
|
46
|
+
receipt?: RootPathObservationReceipt;
|
|
47
|
+
};
|
|
38
48
|
export declare function resolveRootPath(params: ResolveRootPathParams): Promise<ResolvedRootPath>;
|
|
49
|
+
export declare function resolveRootPathWithCanonicalRootObservation(params: ResolveRootPathParams, observeRoot: (rootCanonicalPath: string) => void): Promise<ResolvedRootPath>;
|
|
50
|
+
export declare function resolveRootPathWithObservation(params: ResolveRootPathParams, request: RootPathObservationRequest): Promise<ObservedRootPath>;
|
|
51
|
+
export declare function resolveRootPathForRemoval(params: ResolveRootPathParams, receipts: RemovalPathReceipts): Promise<ResolvedRootPath>;
|
|
39
52
|
export declare function resolveRootPathSync(params: ResolveRootPathParams): ResolvedRootPath;
|
|
53
|
+
export declare function resolveRootPathSyncWithCanonicalRootObservation(params: ResolveRootPathParams, observeRoot: (rootCanonicalPath: string) => void): ResolvedRootPath;
|
|
40
54
|
//# sourceMappingURL=root-path.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"root-path.d.ts","sourceRoot":"","sources":["../src/root-path.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,kCAAkC,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"root-path.d.ts","sourceRoot":"","sources":["../src/root-path.ts"],"names":[],"mappings":"AAiBA,OAAO,EAGL,KAAK,oBAAoB,EAC1B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAKL,KAAK,0BAA0B,EAE/B,KAAK,0BAA0B,EAEhC,MAAM,4BAA4B,CAAC;AAGpC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAQpE,OAAO,EAAE,kCAAkC,EAAE,MAAM,yBAAyB,CAAC;AAC7E,OAAO,EACL,wBAAwB,EACxB,KAAK,iCAAiC,EACtC,KAAK,uBAAuB,EAC5B,KAAK,0BAA0B,EAC/B,KAAK,gCAAgC,EACrC,KAAK,0BAA0B,EAC/B,KAAK,yBAAyB,GAC/B,MAAM,4BAA4B,CAAC;AAEpC,KAAK,cAAc,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAAC;AAEtE,MAAM,MAAM,mBAAmB,GAAG;IAChC,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC,2BAA2B,CAAC,EAAE,OAAO,CAAC;CACvC,CAAC;AAEF,eAAO,MAAM,wBAAwB;aACnC,MAAM;;;;aAIN,YAAY;;;;CAIJ,CAAC;AAEX,KAAK,qBAAqB,GAAG;IAC3B,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAC7B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,YAAY,CAAC,EAAE,oBAAoB,CAAC;CACrC,CAAC;AAEF,KAAK,oBAAoB,GAAG,SAAS,GAAG,MAAM,GAAG,WAAW,GAAG,SAAS,GAAG,OAAO,CAAC;AAEnF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,oBAAoB,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,OAAO,CAAC,EAAE,0BAA0B,CAAC;CACtC,CAAC;AAEF,wBAAsB,eAAe,CACnC,MAAM,EAAE,qBAAqB,GAC5B,OAAO,CAAC,gBAAgB,CAAC,CAM3B;AAED,wBAAsB,2CAA2C,CAC/D,MAAM,EAAE,qBAAqB,EAC7B,WAAW,EAAE,CAAC,iBAAiB,EAAE,MAAM,KAAK,IAAI,GAC/C,OAAO,CAAC,gBAAgB,CAAC,CAM3B;AA4BD,wBAAsB,8BAA8B,CAClD,MAAM,EAAE,qBAAqB,EAC7B,OAAO,EAAE,0BAA0B,GAClC,OAAO,CAAC,gBAAgB,CAAC,CAQ3B;AAID,wBAAsB,yBAAyB,CAC7C,MAAM,EAAE,qBAAqB,EAC7B,QAAQ,EAAE,mBAAmB,GAC5B,OAAO,CAAC,gBAAgB,CAAC,CAM3B;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,qBAAqB,GAAG,gBAAgB,CAMnF;AAED,wBAAgB,+CAA+C,CAC7D,MAAM,EAAE,qBAAqB,EAC7B,WAAW,EAAE,CAAC,iBAAiB,EAAE,MAAM,KAAK,IAAI,GAC/C,gBAAgB,CAMlB"}
|