@openclaw/openshell-sandbox 2026.9.5 → 2026.9.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/icon.png +0 -0
- package/dist/index.js +85 -271
- package/node_modules/@openclaw/fs-safe/CHANGELOG.md +304 -0
- package/node_modules/@openclaw/fs-safe/README.md +68 -15
- package/node_modules/@openclaw/fs-safe/dist/absolute-path.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/absolute-path.js +2 -8
- package/node_modules/@openclaw/fs-safe/dist/advanced.d.ts +12 -4
- package/node_modules/@openclaw/fs-safe/dist/advanced.js +7 -2
- package/node_modules/@openclaw/fs-safe/dist/archive-crc32.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-deadline.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-deadline.js +22 -23
- package/node_modules/@openclaw/fs-safe/dist/archive-durability.d.ts +1 -2
- package/node_modules/@openclaw/fs-safe/dist/archive-durability.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-entry.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-errors.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-gzip-tail.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-input.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-kind.d.ts +0 -2
- package/node_modules/@openclaw/fs-safe/dist/archive-kind.js +5 -17
- package/node_modules/@openclaw/fs-safe/dist/archive-limits.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-merge.d.ts +3 -4
- package/node_modules/@openclaw/fs-safe/dist/archive-merge.js +130 -54
- package/node_modules/@openclaw/fs-safe/dist/archive-parser-errors.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-parser.wasm +0 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-plan.d.ts +67 -2
- package/node_modules/@openclaw/fs-safe/dist/archive-plan.js +86 -22
- package/node_modules/@openclaw/fs-safe/dist/archive-read.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-read.js +16 -26
- package/node_modules/@openclaw/fs-safe/dist/archive-staging.d.ts +1 -3
- package/node_modules/@openclaw/fs-safe/dist/archive-staging.js +3 -3
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-stream.d.ts +3 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-stream.js +56 -37
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-wasm.d.ts +17 -6
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-wasm.js +134 -34
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-admission.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-count.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-count.js +21 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-directory.d.ts +5 -2
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-directory.js +29 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-entry.d.ts +13 -10
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-entry.js +9 -26
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-integrity.d.ts +2 -3
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-integrity.js +2 -13
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-loader.d.ts +7 -2
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-loader.js +119 -33
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-manifest.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-manifest.js +3 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-names.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-names.js +13 -2
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-preflight.d.ts +2 -4
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-preflight.js +16 -8
- package/node_modules/@openclaw/fs-safe/dist/archive.d.ts +14 -9
- package/node_modules/@openclaw/fs-safe/dist/archive.js +223 -178
- package/node_modules/@openclaw/fs-safe/dist/async-lock.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/atomic.d.ts +3 -2
- package/node_modules/@openclaw/fs-safe/dist/bounded-read-stream.d.ts +0 -2
- package/node_modules/@openclaw/fs-safe/dist/bounded-read-stream.js +0 -6
- package/node_modules/@openclaw/fs-safe/dist/bounded-read.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/byte-budget.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/byte-view.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/byte-view.js +13 -0
- package/node_modules/@openclaw/fs-safe/dist/clone-metadata.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/clone-metadata.js +6 -2
- package/node_modules/@openclaw/fs-safe/dist/config.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/containment.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/copy-file-input.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/copy-policy.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/copy-publication.d.ts +8 -5
- package/node_modules/@openclaw/fs-safe/dist/copy-publication.js +5 -6
- package/node_modules/@openclaw/fs-safe/dist/copy-tree-portable.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/copy-tree-portable.js +51 -28
- package/node_modules/@openclaw/fs-safe/dist/copy.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/copy.js +34 -16
- package/node_modules/@openclaw/fs-safe/dist/create-owned-file.d.ts +7 -0
- package/node_modules/@openclaw/fs-safe/dist/create-owned-file.js +16 -0
- package/node_modules/@openclaw/fs-safe/dist/create.d.ts +17 -0
- package/node_modules/@openclaw/fs-safe/dist/create.js +388 -0
- package/node_modules/@openclaw/fs-safe/dist/creation-boundary.d.ts +60 -0
- package/node_modules/@openclaw/fs-safe/dist/creation-boundary.js +371 -0
- package/node_modules/@openclaw/fs-safe/dist/deny-mutation-match.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/deny-mutation-match.js +71 -0
- package/node_modules/@openclaw/fs-safe/dist/deny-mutations.d.ts +2 -3
- package/node_modules/@openclaw/fs-safe/dist/deny-mutations.js +56 -35
- package/node_modules/@openclaw/fs-safe/dist/device-path.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/directory-durability.d.ts +7 -8
- package/node_modules/@openclaw/fs-safe/dist/directory-durability.js +22 -80
- package/node_modules/@openclaw/fs-safe/dist/directory-entry-path.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/directory-guard.d.ts +5 -8
- package/node_modules/@openclaw/fs-safe/dist/directory-guard.js +23 -57
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-node.d.ts +22 -3
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-node.js +97 -3
- package/node_modules/@openclaw/fs-safe/dist/directory-receipt.d.ts +23 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-receipt.js +121 -0
- package/node_modules/@openclaw/fs-safe/dist/durability.d.ts +2 -2
- package/node_modules/@openclaw/fs-safe/dist/effective-uid.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/effective-uid.js +1 -4
- package/node_modules/@openclaw/fs-safe/dist/error-detail.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/errors.d.ts +3 -2
- package/node_modules/@openclaw/fs-safe/dist/errors.js +3 -2
- package/node_modules/@openclaw/fs-safe/dist/file-cleanup.d.ts +19 -0
- package/node_modules/@openclaw/fs-safe/dist/file-cleanup.js +81 -0
- package/node_modules/@openclaw/fs-safe/dist/file-contents.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/file-contents.js +40 -0
- package/node_modules/@openclaw/fs-safe/dist/file-handle-transfer.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/file-handle-transfer.js +57 -2
- package/node_modules/@openclaw/fs-safe/dist/file-hash.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/file-hash.js +186 -70
- package/node_modules/@openclaw/fs-safe/dist/file-identity.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/file-identity.js +26 -4
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-acquisition.d.ts +22 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-acquisition.js +98 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-admission.d.ts +17 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-admission.js +58 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-acquire.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-acquire.js +303 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-arbitration.d.ts +17 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-arbitration.js +66 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-held.d.ts +25 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-held.js +392 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-io.d.ts +40 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-io.js +209 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-mutation.d.ts +16 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-mutation.js +275 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-options.d.ts +11 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-options.js +58 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-registration.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-registration.js +90 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root.d.ts +34 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root.js +288 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-stale-admission.d.ts +19 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-stale-admission.js +199 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync.d.ts +4 -22
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync.js +207 -249
- package/node_modules/@openclaw/fs-safe/dist/file-lock.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/file-observation.d.ts +1 -2
- package/node_modules/@openclaw/fs-safe/dist/file-store-boundary.d.ts +11 -14
- package/node_modules/@openclaw/fs-safe/dist/file-store-boundary.js +73 -45
- package/node_modules/@openclaw/fs-safe/dist/file-store-prune.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/file-store-prune.js +11 -6
- package/node_modules/@openclaw/fs-safe/dist/file-store-sync-directory.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/file-store-sync-directory.js +197 -227
- package/node_modules/@openclaw/fs-safe/dist/file-store-sync-write.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/file-store-sync-write.js +22 -36
- package/node_modules/@openclaw/fs-safe/dist/file-store.d.ts +4 -8
- package/node_modules/@openclaw/fs-safe/dist/file-store.js +72 -45
- package/node_modules/@openclaw/fs-safe/dist/file-sync.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/filename.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/filename.js +1 -7
- package/node_modules/@openclaw/fs-safe/dist/fs.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/guarded-mkdir.d.ts +2 -2
- package/node_modules/@openclaw/fs-safe/dist/guarded-mkdir.js +27 -19
- package/node_modules/@openclaw/fs-safe/dist/guarded-mutation.d.ts +0 -7
- package/node_modules/@openclaw/fs-safe/dist/guarded-mutation.js +6 -11
- package/node_modules/@openclaw/fs-safe/dist/guest-dispatch-python.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/guest-dispatch-python.js +41 -90
- package/node_modules/@openclaw/fs-safe/dist/guest-native-python.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/guest-native-python.js +23 -31
- package/node_modules/@openclaw/fs-safe/dist/guest.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/guest.js +21 -12
- package/node_modules/@openclaw/fs-safe/dist/home-dir.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/index.d.ts +9 -7
- package/node_modules/@openclaw/fs-safe/dist/install-path.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/install-path.js +2 -5
- package/node_modules/@openclaw/fs-safe/dist/json-document-store.d.ts +4 -10
- package/node_modules/@openclaw/fs-safe/dist/json-document-store.js +22 -15
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-directory.d.ts +13 -1
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-directory.js +134 -0
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-ownership.d.ts +1 -7
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-ownership.js +43 -72
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-read.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-read.js +13 -9
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue.d.ts +0 -2
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue.js +20 -148
- package/node_modules/@openclaw/fs-safe/dist/json-store.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/json-store.js +1 -2
- package/node_modules/@openclaw/fs-safe/dist/json-stringify.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/json.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/json.js +39 -92
- package/node_modules/@openclaw/fs-safe/dist/local-file-access.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/local-file-access.js +5 -15
- package/node_modules/@openclaw/fs-safe/dist/local-file-descriptor.d.ts +2 -6
- package/node_modules/@openclaw/fs-safe/dist/local-roots.d.ts +2 -8
- package/node_modules/@openclaw/fs-safe/dist/local-roots.js +19 -21
- package/node_modules/@openclaw/fs-safe/dist/lock-config.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/move-path-cleanup.d.ts +5 -20
- package/node_modules/@openclaw/fs-safe/dist/move-path-cleanup.js +60 -24
- package/node_modules/@openclaw/fs-safe/dist/move-path-stage.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/move-path.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/move-path.js +64 -42
- package/node_modules/@openclaw/fs-safe/dist/mutation-authority.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/mutation-authority.js +5 -0
- package/node_modules/@openclaw/fs-safe/dist/native-binding.d.ts +69 -15
- package/node_modules/@openclaw/fs-safe/dist/native-config.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/native-directory-observation.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/native-fallback-warning.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/native-fallback-warning.js +11 -0
- package/node_modules/@openclaw/fs-safe/dist/native-operations.d.ts +1 -7
- package/node_modules/@openclaw/fs-safe/dist/native-operations.js +2 -31
- package/node_modules/@openclaw/fs-safe/dist/native-parent-admission.d.ts +5 -3
- package/node_modules/@openclaw/fs-safe/dist/native-parent-admission.js +27 -7
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write-windows.d.ts +2 -3
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write-windows.js +174 -29
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write.d.ts +1 -2
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write.js +230 -187
- package/node_modules/@openclaw/fs-safe/dist/native-policy-directory-observation.d.ts +11 -0
- package/node_modules/@openclaw/fs-safe/dist/native-policy-directory-observation.js +61 -0
- package/node_modules/@openclaw/fs-safe/dist/native-policy-parent-windows.d.ts +13 -0
- package/node_modules/@openclaw/fs-safe/dist/native-policy-parent-windows.js +209 -0
- package/node_modules/@openclaw/fs-safe/dist/native-rename-outcome.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/native-rename-outcome.js +8 -0
- package/node_modules/@openclaw/fs-safe/dist/native-staged-file.d.ts +20 -6
- package/node_modules/@openclaw/fs-safe/dist/native-staged-file.js +149 -106
- package/node_modules/@openclaw/fs-safe/dist/native-staged-symlink.d.ts +13 -0
- package/node_modules/@openclaw/fs-safe/dist/native-staged-symlink.js +303 -0
- package/node_modules/@openclaw/fs-safe/dist/native.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/native.js +2 -2
- package/node_modules/@openclaw/fs-safe/dist/opened-file-failure.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/opened-realpath.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/opened-realpath.js +11 -2
- package/node_modules/@openclaw/fs-safe/dist/output.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/output.js +12 -8
- package/node_modules/@openclaw/fs-safe/dist/overwrite-file-handle.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/owner-dacl-batch-worker.js +54 -0
- package/node_modules/@openclaw/fs-safe/dist/owner-dacl-batch.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/owner-dacl-batch.js +64 -0
- package/node_modules/@openclaw/fs-safe/dist/owner-dacl.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/owner-dacl.js +13 -4
- package/node_modules/@openclaw/fs-safe/dist/path-case.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/path-policy.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/path-prefix.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/path-prefix.js +30 -8
- package/node_modules/@openclaw/fs-safe/dist/path-scope-lexical.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/path-segment-route.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/path-suffix-aliases.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/path-suffix-aliases.js +25 -17
- package/node_modules/@openclaw/fs-safe/dist/path.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/path.js +19 -2
- package/node_modules/@openclaw/fs-safe/dist/permission-exec.d.ts +8 -1
- package/node_modules/@openclaw/fs-safe/dist/permission-exec.js +141 -21
- package/node_modules/@openclaw/fs-safe/dist/permissions-public.d.ts +3 -2
- package/node_modules/@openclaw/fs-safe/dist/permissions-public.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/permissions-windows.d.ts +5 -16
- package/node_modules/@openclaw/fs-safe/dist/permissions-windows.js +11 -31
- package/node_modules/@openclaw/fs-safe/dist/permissions.d.ts +3 -11
- package/node_modules/@openclaw/fs-safe/dist/permissions.js +11 -34
- package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-admission.d.ts +1 -3
- package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-admission.js +27 -31
- package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-observation.d.ts +7 -3
- package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-observation.js +81 -18
- package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-shared-route.d.ts +3 -9
- package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-shared-route.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/pinned-open.d.ts +2 -2
- package/node_modules/@openclaw/fs-safe/dist/pinned-open.js +9 -5
- package/node_modules/@openclaw/fs-safe/dist/pinned-operation.d.ts +1 -2
- package/node_modules/@openclaw/fs-safe/dist/pinned-operation.js +3 -16
- package/node_modules/@openclaw/fs-safe/dist/pinned-write-input.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-write-input.js +35 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-write-mode.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-write-mode.js +31 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-write-staged.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-write-staged.js +185 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-write-types.d.ts +14 -21
- package/node_modules/@openclaw/fs-safe/dist/pinned-write.d.ts +0 -2
- package/node_modules/@openclaw/fs-safe/dist/pinned-write.js +43 -151
- package/node_modules/@openclaw/fs-safe/dist/positional-read.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/private-directory.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/private-directory.js +18 -4
- package/node_modules/@openclaw/fs-safe/dist/private-producer-handoff-sync.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/private-producer-handoff-sync.js +72 -0
- package/node_modules/@openclaw/fs-safe/dist/private-producer-handoff.d.ts +42 -5
- package/node_modules/@openclaw/fs-safe/dist/private-producer-handoff.js +166 -80
- package/node_modules/@openclaw/fs-safe/dist/private-temp-workspace.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/private-temp-workspace.js +56 -128
- package/node_modules/@openclaw/fs-safe/dist/publish-copy-stage.d.ts +3 -3
- package/node_modules/@openclaw/fs-safe/dist/publish-copy-stage.js +20 -7
- package/node_modules/@openclaw/fs-safe/dist/publish-file-failure.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/publish-file.d.ts +2 -4
- package/node_modules/@openclaw/fs-safe/dist/publish-file.js +59 -100
- package/node_modules/@openclaw/fs-safe/dist/read-open-flags.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/read-opened-file.d.ts +2 -6
- package/node_modules/@openclaw/fs-safe/dist/realpath.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/recursive-mkdir-path.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/regular-file.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/regular-file.js +111 -196
- package/node_modules/@openclaw/fs-safe/dist/replace-directory.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/replace-directory.js +245 -20
- package/node_modules/@openclaw/fs-safe/dist/replace-file-buffer.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-buffer.js +36 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-fallback.d.ts +4 -11
- package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-fallback.js +150 -117
- package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-source.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-source.js +27 -33
- package/node_modules/@openclaw/fs-safe/dist/replace-file-descriptor.d.ts +7 -12
- package/node_modules/@openclaw/fs-safe/dist/replace-file-descriptor.js +25 -18
- package/node_modules/@openclaw/fs-safe/dist/replace-file-destination.d.ts +21 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-destination.js +123 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-mode.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/replace-file-mutation.d.ts +26 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-mutation.js +47 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-rename-policy.d.ts +1 -3
- package/node_modules/@openclaw/fs-safe/dist/replace-file-temp-owner.d.ts +19 -24
- package/node_modules/@openclaw/fs-safe/dist/replace-file-temp-owner.js +126 -149
- package/node_modules/@openclaw/fs-safe/dist/replace-file-types.d.ts +55 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-types.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file.d.ts +3 -56
- package/node_modules/@openclaw/fs-safe/dist/replace-file.js +47 -31
- package/node_modules/@openclaw/fs-safe/dist/retained-directory-replacement.d.ts +26 -0
- package/node_modules/@openclaw/fs-safe/dist/retained-directory-replacement.js +193 -0
- package/node_modules/@openclaw/fs-safe/dist/retained-file-types.d.ts +50 -0
- package/node_modules/@openclaw/fs-safe/dist/retained-file-types.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/retained-file.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/retained-file.js +121 -0
- package/node_modules/@openclaw/fs-safe/dist/root-boundary.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/root-boundary.js +4 -0
- package/node_modules/@openclaw/fs-safe/dist/root-context.d.ts +0 -9
- package/node_modules/@openclaw/fs-safe/dist/root-context.js +6 -12
- package/node_modules/@openclaw/fs-safe/dist/root-create-input.d.ts +9 -3
- package/node_modules/@openclaw/fs-safe/dist/root-create-input.js +17 -4
- package/node_modules/@openclaw/fs-safe/dist/root-directory-creation.d.ts +4 -5
- package/node_modules/@openclaw/fs-safe/dist/root-directory-creation.js +20 -7
- package/node_modules/@openclaw/fs-safe/dist/root-directory-entry.d.ts +9 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory-entry.js +28 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory-list.d.ts +10 -2
- package/node_modules/@openclaw/fs-safe/dist/root-directory-list.js +105 -40
- package/node_modules/@openclaw/fs-safe/dist/root-directory.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-entries.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-entries.js +2 -2
- package/node_modules/@openclaw/fs-safe/dist/root-errors.d.ts +4 -1
- package/node_modules/@openclaw/fs-safe/dist/root-errors.js +5 -3
- package/node_modules/@openclaw/fs-safe/dist/root-file-final-admission.d.ts +2 -3
- package/node_modules/@openclaw/fs-safe/dist/root-file-final-admission.js +6 -8
- package/node_modules/@openclaw/fs-safe/dist/root-file.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-file.js +5 -7
- package/node_modules/@openclaw/fs-safe/dist/root-handle-context.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/root-handle-context.js +12 -0
- package/node_modules/@openclaw/fs-safe/dist/root-impl.d.ts +5 -18
- package/node_modules/@openclaw/fs-safe/dist/root-impl.js +239 -152
- package/node_modules/@openclaw/fs-safe/dist/root-move-noreplace.d.ts +4 -8
- package/node_modules/@openclaw/fs-safe/dist/root-move-noreplace.js +31 -28
- package/node_modules/@openclaw/fs-safe/dist/root-move-preflight.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-observed-path.d.ts +0 -2
- package/node_modules/@openclaw/fs-safe/dist/root-observed-path.js +2 -7
- package/node_modules/@openclaw/fs-safe/dist/root-options.d.ts +13 -6
- package/node_modules/@openclaw/fs-safe/dist/root-path-errors.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/root-path-errors.js +11 -2
- package/node_modules/@openclaw/fs-safe/dist/root-path-existing.d.ts +3 -1
- package/node_modules/@openclaw/fs-safe/dist/root-path-existing.js +45 -50
- package/node_modules/@openclaw/fs-safe/dist/root-path-observation.d.ts +4 -12
- package/node_modules/@openclaw/fs-safe/dist/root-path-stat.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-path-stat.js +61 -11
- package/node_modules/@openclaw/fs-safe/dist/root-path.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-path.js +64 -207
- package/node_modules/@openclaw/fs-safe/dist/root-paths-lexical.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-paths.d.ts +2 -7
- package/node_modules/@openclaw/fs-safe/dist/root-public-types.d.ts +11 -0
- package/node_modules/@openclaw/fs-safe/dist/root-public-types.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-read-admission.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-read-admission.js +31 -39
- package/node_modules/@openclaw/fs-safe/dist/root-remove-identity.d.ts +1 -4
- package/node_modules/@openclaw/fs-safe/dist/root-remove-identity.js +2 -4
- package/node_modules/@openclaw/fs-safe/dist/root-remove-receipt.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-remove.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/root-remove.js +21 -5
- package/node_modules/@openclaw/fs-safe/dist/root-symlink-policy.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-walk.d.ts +19 -13
- package/node_modules/@openclaw/fs-safe/dist/root-walk.js +67 -16
- package/node_modules/@openclaw/fs-safe/dist/root-write-admission.d.ts +1 -4
- package/node_modules/@openclaw/fs-safe/dist/root-write-admission.js +4 -27
- package/node_modules/@openclaw/fs-safe/dist/root-write-compatibility.d.ts +1 -3
- package/node_modules/@openclaw/fs-safe/dist/root-write-compatibility.js +17 -68
- package/node_modules/@openclaw/fs-safe/dist/root-write-complete-parent.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/root-write-complete-parent.js +13 -28
- package/node_modules/@openclaw/fs-safe/dist/root-write-lock-binding.d.ts +14 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-lock-binding.js +162 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-mode.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-write-publication.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-write-publication.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/root-write-verification.d.ts +1 -2
- package/node_modules/@openclaw/fs-safe/dist/root-write-verification.js +29 -42
- package/node_modules/@openclaw/fs-safe/dist/root.d.ts +2 -7
- package/node_modules/@openclaw/fs-safe/dist/safe-path-segment.d.ts +2 -2
- package/node_modules/@openclaw/fs-safe/dist/safe-path-segment.js +9 -6
- package/node_modules/@openclaw/fs-safe/dist/secret-file.d.ts +6 -3
- package/node_modules/@openclaw/fs-safe/dist/secret-file.js +22 -58
- package/node_modules/@openclaw/fs-safe/dist/secret-read-async.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/secret-read-async.js +6 -27
- package/node_modules/@openclaw/fs-safe/dist/secret-read-policy.d.ts +6 -3
- package/node_modules/@openclaw/fs-safe/dist/secret-read-policy.js +27 -3
- package/node_modules/@openclaw/fs-safe/dist/secret.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/secure-file-windows.d.ts +3 -3
- package/node_modules/@openclaw/fs-safe/dist/secure-file-windows.js +42 -149
- package/node_modules/@openclaw/fs-safe/dist/secure-file.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/secure-file.js +14 -13
- package/node_modules/@openclaw/fs-safe/dist/secure-temp-dir.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/secure-temp-dir.js +2 -7
- package/node_modules/@openclaw/fs-safe/dist/secure-temp-repair.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/secure-temp-repair.js +5 -1
- package/node_modules/@openclaw/fs-safe/dist/sibling-staged-file.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/sibling-staged-file.js +32 -39
- package/node_modules/@openclaw/fs-safe/dist/sibling-temp.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/sibling-temp.js +23 -12
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-acquire.d.ts +2 -29
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-acquire.js +283 -220
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-admission-context.d.ts +18 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-admission-context.js +60 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-admission-parser.d.ts +41 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-admission-parser.js +113 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-admission.d.ts +31 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-admission.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-handle.d.ts +5 -9
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-handle.js +6 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-policy.d.ts +6 -8
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-policy.js +23 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-reclaim.d.ts +12 -8
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-reclaim.js +101 -44
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-registration.d.ts +13 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-registration.js +47 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-root.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-root.js +2 -1
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-stale-admission.d.ts +34 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-stale-admission.js +228 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-target.d.ts +7 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-target.js +55 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-types.d.ts +22 -17
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock.js +52 -35
- package/node_modules/@openclaw/fs-safe/dist/staged-directory.d.ts +7 -5
- package/node_modules/@openclaw/fs-safe/dist/staged-directory.js +43 -7
- package/node_modules/@openclaw/fs-safe/dist/staged-file-settlement.d.ts +16 -0
- package/node_modules/@openclaw/fs-safe/dist/staged-file-settlement.js +57 -0
- package/node_modules/@openclaw/fs-safe/dist/staged-file-types.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/staged-symlink-types.d.ts +39 -0
- package/node_modules/@openclaw/fs-safe/dist/staged-symlink-types.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/stat-observation.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/stat-observation.js +3 -10
- package/node_modules/@openclaw/fs-safe/dist/store.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/strict-file-identity.d.ts +3 -2
- package/node_modules/@openclaw/fs-safe/dist/strict-file-identity.js +14 -14
- package/node_modules/@openclaw/fs-safe/dist/string-coerce.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/suppressed-error.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/symlink-parents.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/symlink-parents.js +58 -32
- package/node_modules/@openclaw/fs-safe/dist/temp-cleanup.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/temp-target.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/temp-target.js +14 -55
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-admission.d.ts +0 -8
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-admission.js +50 -37
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-child-admission.d.ts +16 -6
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-child-admission.js +70 -15
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-descriptor.d.ts +1 -7
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-descriptor.js +11 -33
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-owner.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-owner.js +53 -35
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-ownership.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-ownership.js +52 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-types.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/temp.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/test-hooks.d.ts +5 -2
- package/node_modules/@openclaw/fs-safe/dist/text-atomic.d.ts +2 -2
- package/node_modules/@openclaw/fs-safe/dist/text-atomic.js +3 -1
- package/node_modules/@openclaw/fs-safe/dist/timing.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/trash.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/trash.js +27 -1
- package/node_modules/@openclaw/fs-safe/dist/types.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/unicode-path.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/unicode-path.js +3 -0
- package/node_modules/@openclaw/fs-safe/dist/walk.d.ts +7 -7
- package/node_modules/@openclaw/fs-safe/dist/walk.js +23 -8
- package/node_modules/@openclaw/fs-safe/dist/watch-alias.d.ts +6 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-alias.js +88 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-hints.d.ts +9 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-hints.js +93 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-native.d.ts +36 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-native.js +73 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-scan.d.ts +28 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-scan.js +300 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-stream.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-stream.js +32 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-types.d.ts +60 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-types.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/watch.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/watch.js +530 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-command.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/windows-owner.d.ts +3 -8
- package/node_modules/@openclaw/fs-safe/dist/windows-owner.js +8 -5
- package/node_modules/@openclaw/fs-safe/dist/windows-path-alias.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/windows-path-alias.js +12 -43
- package/node_modules/@openclaw/fs-safe/dist/windows-path-syntax.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-path-syntax.js +21 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-security-bridge.cs +336 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-security-bridge.ps1 +90 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-security-command.d.ts +33 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-security-command.js +414 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-security-facts.d.ts +9 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-security-facts.js +112 -0
- package/node_modules/@openclaw/fs-safe/dist/write-file-handle.d.ts +7 -1
- package/node_modules/@openclaw/fs-safe/dist/write-file-handle.js +23 -0
- package/node_modules/@openclaw/fs-safe/dist/write-open-flags.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/write-open-flags.js +1 -8
- package/node_modules/@openclaw/fs-safe/dist/write-queue.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/write-queue.js +1 -4
- package/node_modules/@openclaw/fs-safe/docs/advanced.md +79 -6
- package/node_modules/@openclaw/fs-safe/docs/archive.md +154 -48
- package/node_modules/@openclaw/fs-safe/docs/atomic.md +218 -13
- package/node_modules/@openclaw/fs-safe/docs/config.md +6 -2
- package/node_modules/@openclaw/fs-safe/docs/contributing.md +150 -8
- package/node_modules/@openclaw/fs-safe/docs/copy.md +41 -0
- package/node_modules/@openclaw/fs-safe/docs/creation.md +132 -0
- package/node_modules/@openclaw/fs-safe/docs/durability.md +66 -0
- package/node_modules/@openclaw/fs-safe/docs/file-contents.md +68 -0
- package/node_modules/@openclaw/fs-safe/docs/file-store.md +24 -0
- package/node_modules/@openclaw/fs-safe/docs/guest.md +8 -2
- package/node_modules/@openclaw/fs-safe/docs/index.md +1 -0
- package/node_modules/@openclaw/fs-safe/docs/install.md +61 -7
- package/node_modules/@openclaw/fs-safe/docs/json-store.md +5 -0
- package/node_modules/@openclaw/fs-safe/docs/json.md +5 -4
- package/node_modules/@openclaw/fs-safe/docs/local-roots.md +2 -0
- package/node_modules/@openclaw/fs-safe/docs/migrating-to-0.5.md +15 -6
- package/node_modules/@openclaw/fs-safe/docs/migrating-to-0.6.md +9 -4
- package/node_modules/@openclaw/fs-safe/docs/mutation-policy-proof.md +11 -7
- package/node_modules/@openclaw/fs-safe/docs/native-helper.md +51 -15
- package/node_modules/@openclaw/fs-safe/docs/native.md +117 -15
- package/node_modules/@openclaw/fs-safe/docs/output.md +6 -0
- package/node_modules/@openclaw/fs-safe/docs/path-prefix.md +10 -0
- package/node_modules/@openclaw/fs-safe/docs/path-suffix-aliases.md +51 -6
- package/node_modules/@openclaw/fs-safe/docs/path.md +4 -4
- package/node_modules/@openclaw/fs-safe/docs/permissions.md +122 -14
- package/node_modules/@openclaw/fs-safe/docs/public-api.md +38 -5
- package/node_modules/@openclaw/fs-safe/docs/quickstart.md +1 -1
- package/node_modules/@openclaw/fs-safe/docs/reading.md +2 -2
- package/node_modules/@openclaw/fs-safe/docs/regular-file.md +3 -0
- package/node_modules/@openclaw/fs-safe/docs/retained-file.md +115 -0
- package/node_modules/@openclaw/fs-safe/docs/root.md +110 -12
- package/node_modules/@openclaw/fs-safe/docs/secret-file.md +38 -2
- package/node_modules/@openclaw/fs-safe/docs/secure-file.md +9 -4
- package/node_modules/@openclaw/fs-safe/docs/security-model.md +4 -1
- package/node_modules/@openclaw/fs-safe/docs/sidecar-lock.md +131 -9
- package/node_modules/@openclaw/fs-safe/docs/staged-file.md +16 -6
- package/node_modules/@openclaw/fs-safe/docs/staged-symlink.md +124 -0
- package/node_modules/@openclaw/fs-safe/docs/store.md +12 -2
- package/node_modules/@openclaw/fs-safe/docs/temp.md +56 -9
- package/node_modules/@openclaw/fs-safe/docs/testing.md +210 -0
- package/node_modules/@openclaw/fs-safe/docs/types.md +24 -2
- package/node_modules/@openclaw/fs-safe/docs/walk.md +108 -2
- package/node_modules/@openclaw/fs-safe/docs/watch.md +251 -0
- package/node_modules/@openclaw/fs-safe/docs/writing.md +126 -11
- package/node_modules/@openclaw/fs-safe/package.json +23 -17
- package/node_modules/@openclaw/fs-safe-darwin-arm64/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-darwin-arm64/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-darwin-x64/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-darwin-x64/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-linux-arm64-gnu/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-linux-arm64-gnu/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-linux-arm64-musl/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-linux-arm64-musl/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-linux-x64-gnu/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-linux-x64-gnu/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-linux-x64-musl/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-linux-x64-musl/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-win32-x64-msvc/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-win32-x64-msvc/package.json +1 -1
- package/node_modules/p-limit/index.d.ts +2 -0
- package/node_modules/p-limit/index.js +17 -1
- package/node_modules/p-limit/package.json +1 -1
- package/node_modules/p-limit/readme.md +2 -0
- package/node_modules/zod/README.md +2 -2
- package/node_modules/zod/compile.cjs +19 -0
- package/node_modules/zod/index.cjs +19 -0
- package/node_modules/zod/locales/index.cjs +19 -0
- package/node_modules/zod/mini/index.cjs +19 -0
- package/node_modules/zod/package.json +8 -7
- package/node_modules/zod/src/v3/helpers/errorUtil.ts +1 -1
- package/node_modules/zod/src/v4/classic/external.ts +2 -0
- package/node_modules/zod/src/v4/classic/from-json-schema.ts +248 -25
- package/node_modules/zod/src/v4/classic/schemas.ts +243 -168
- package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +60 -9
- package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +6 -0
- package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +2 -2
- package/node_modules/zod/src/v4/classic/tests/cyclic-data.test.ts +265 -0
- package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +112 -6
- package/node_modules/zod/src/v4/classic/tests/enum.test.ts +9 -0
- package/node_modules/zod/src/v4/classic/tests/error.test.ts +130 -1
- package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +157 -0
- package/node_modules/zod/src/v4/classic/tests/iban.test.ts +81 -0
- package/node_modules/zod/src/v4/classic/tests/instance-footprint.test.ts +40 -2
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +27 -7
- package/node_modules/zod/src/v4/classic/tests/issue-schema.test.ts +88 -56
- package/node_modules/zod/src/v4/classic/tests/number.test.ts +39 -0
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +56 -0
- package/node_modules/zod/src/v4/classic/tests/optin-ladder.test.ts +3 -2
- package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +70 -0
- package/node_modules/zod/src/v4/classic/tests/properties.test.ts +141 -0
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +46 -1
- package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +19 -0
- package/node_modules/zod/src/v4/classic/tests/string.test.ts +95 -1
- package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +33 -1
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +234 -38
- package/node_modules/zod/src/v4/classic/tests/validate.test.ts +569 -0
- package/node_modules/zod/src/v4/core/api.ts +44 -28
- package/node_modules/zod/src/v4/core/checks.ts +62 -102
- package/node_modules/zod/src/v4/core/compile.ts +218 -93
- package/node_modules/zod/src/v4/core/core.ts +1 -3
- package/node_modules/zod/src/v4/core/doc.ts +6 -2
- package/node_modules/zod/src/v4/core/errors.ts +3 -6
- package/node_modules/zod/src/v4/core/json-schema-generator.ts +2 -2
- package/node_modules/zod/src/v4/core/json-schema-processors.ts +185 -81
- package/node_modules/zod/src/v4/core/memoizer.ts +75 -28
- package/node_modules/zod/src/v4/core/parse.ts +37 -16
- package/node_modules/zod/src/v4/core/regexes.ts +14 -4
- package/node_modules/zod/src/v4/core/schemas.ts +296 -132
- package/node_modules/zod/src/v4/core/tests/cached.test.ts +54 -0
- package/node_modules/zod/src/v4/core/tests/compile-differential.test.ts +35 -0
- package/node_modules/zod/src/v4/core/tests/compile-generative.test.ts +445 -0
- package/node_modules/zod/src/v4/core/tests/compile.test.ts +399 -2
- package/node_modules/zod/src/v4/core/tests/email-regex.test.ts +140 -0
- package/node_modules/zod/src/v4/core/tests/locales/tg.test.ts +85 -0
- package/node_modules/zod/src/v4/core/tests/polyfill-collision.test.ts +46 -0
- package/node_modules/zod/src/v4/core/tests/url-no-canparse.test.ts +118 -16
- package/node_modules/zod/src/v4/core/to-json-schema.ts +9 -7
- package/node_modules/zod/src/v4/core/util.ts +218 -147
- package/node_modules/zod/src/v4/core/versions.ts +2 -2
- package/node_modules/zod/src/v4/locales/ar.ts +2 -0
- package/node_modules/zod/src/v4/locales/az.ts +2 -0
- package/node_modules/zod/src/v4/locales/be.ts +2 -0
- package/node_modules/zod/src/v4/locales/bg.ts +2 -0
- package/node_modules/zod/src/v4/locales/bn.ts +2 -0
- package/node_modules/zod/src/v4/locales/ca.ts +2 -0
- package/node_modules/zod/src/v4/locales/ckb.ts +2 -0
- package/node_modules/zod/src/v4/locales/cs.ts +2 -0
- package/node_modules/zod/src/v4/locales/da.ts +2 -0
- package/node_modules/zod/src/v4/locales/de.ts +2 -0
- package/node_modules/zod/src/v4/locales/el.ts +2 -0
- package/node_modules/zod/src/v4/locales/en.ts +2 -0
- package/node_modules/zod/src/v4/locales/eo.ts +2 -0
- package/node_modules/zod/src/v4/locales/es.ts +2 -0
- package/node_modules/zod/src/v4/locales/fa.ts +2 -0
- package/node_modules/zod/src/v4/locales/fi.ts +2 -0
- package/node_modules/zod/src/v4/locales/fr-CA.ts +2 -0
- package/node_modules/zod/src/v4/locales/fr.ts +2 -0
- package/node_modules/zod/src/v4/locales/gu.ts +2 -0
- package/node_modules/zod/src/v4/locales/he.ts +2 -0
- package/node_modules/zod/src/v4/locales/hi.ts +2 -0
- package/node_modules/zod/src/v4/locales/hr.ts +2 -0
- package/node_modules/zod/src/v4/locales/hu.ts +2 -0
- package/node_modules/zod/src/v4/locales/hy.ts +2 -0
- package/node_modules/zod/src/v4/locales/id.ts +2 -0
- package/node_modules/zod/src/v4/locales/index.ts +1 -0
- package/node_modules/zod/src/v4/locales/is.ts +2 -0
- package/node_modules/zod/src/v4/locales/it.ts +2 -0
- package/node_modules/zod/src/v4/locales/ja.ts +2 -0
- package/node_modules/zod/src/v4/locales/ka.ts +2 -0
- package/node_modules/zod/src/v4/locales/km.ts +2 -0
- package/node_modules/zod/src/v4/locales/kn.ts +2 -0
- package/node_modules/zod/src/v4/locales/ko.ts +2 -0
- package/node_modules/zod/src/v4/locales/lt.ts +2 -0
- package/node_modules/zod/src/v4/locales/mk.ts +2 -0
- package/node_modules/zod/src/v4/locales/ms.ts +2 -0
- package/node_modules/zod/src/v4/locales/ne.ts +2 -0
- package/node_modules/zod/src/v4/locales/nl.ts +2 -0
- package/node_modules/zod/src/v4/locales/nn.ts +2 -0
- package/node_modules/zod/src/v4/locales/no.ts +2 -0
- package/node_modules/zod/src/v4/locales/ota.ts +2 -0
- package/node_modules/zod/src/v4/locales/pl.ts +2 -0
- package/node_modules/zod/src/v4/locales/ps.ts +2 -0
- package/node_modules/zod/src/v4/locales/pt-BR.ts +2 -0
- package/node_modules/zod/src/v4/locales/pt.ts +2 -0
- package/node_modules/zod/src/v4/locales/ro.ts +2 -0
- package/node_modules/zod/src/v4/locales/ru.ts +2 -0
- package/node_modules/zod/src/v4/locales/sk.ts +2 -0
- package/node_modules/zod/src/v4/locales/sl.ts +2 -0
- package/node_modules/zod/src/v4/locales/sv.ts +2 -0
- package/node_modules/zod/src/v4/locales/ta.ts +2 -0
- package/node_modules/zod/src/v4/locales/tg.ts +135 -0
- package/node_modules/zod/src/v4/locales/th.ts +2 -0
- package/node_modules/zod/src/v4/locales/tk.ts +2 -0
- package/node_modules/zod/src/v4/locales/tr.ts +2 -0
- package/node_modules/zod/src/v4/locales/uk.ts +2 -0
- package/node_modules/zod/src/v4/locales/ur.ts +2 -0
- package/node_modules/zod/src/v4/locales/uz.ts +2 -0
- package/node_modules/zod/src/v4/locales/vi.ts +2 -0
- package/node_modules/zod/src/v4/locales/yo.ts +2 -0
- package/node_modules/zod/src/v4/locales/zh-CN.ts +2 -0
- package/node_modules/zod/src/v4/locales/zh-TW.ts +2 -0
- package/node_modules/zod/src/v4/mini/external.ts +2 -0
- package/node_modules/zod/src/v4/mini/schemas.ts +32 -7
- package/node_modules/zod/src/v4/mini/tests/checks.test.ts +1 -1
- package/node_modules/zod/src/v4/mini/tests/computed.test.ts +11 -17
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +86 -0
- package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +16 -0
- package/node_modules/zod/src/v4/mini/tests/string.test.ts +23 -0
- package/node_modules/zod/v3/ZodError.cjs +19 -0
- package/node_modules/zod/v3/errors.cjs +19 -0
- package/node_modules/zod/v3/external.cjs +19 -0
- package/node_modules/zod/v3/helpers/enumUtil.cjs +19 -0
- package/node_modules/zod/v3/helpers/errorUtil.cjs +20 -1
- package/node_modules/zod/v3/helpers/errorUtil.js +1 -1
- package/node_modules/zod/v3/helpers/parseUtil.cjs +19 -0
- package/node_modules/zod/v3/helpers/partialUtil.cjs +19 -0
- package/node_modules/zod/v3/helpers/typeAliases.cjs +19 -0
- package/node_modules/zod/v3/helpers/util.cjs +19 -0
- package/node_modules/zod/v3/index.cjs +19 -0
- package/node_modules/zod/v3/standard-schema.cjs +19 -0
- package/node_modules/zod/v3/types.cjs +19 -0
- package/node_modules/zod/v4/classic/checks.cjs +19 -0
- package/node_modules/zod/v4/classic/coerce.cjs +19 -0
- package/node_modules/zod/v4/classic/compat.cjs +19 -0
- package/node_modules/zod/v4/classic/deep-partial.cjs +19 -0
- package/node_modules/zod/v4/classic/errors.cjs +19 -0
- package/node_modules/zod/v4/classic/external.cjs +22 -1
- package/node_modules/zod/v4/classic/external.d.cts +1 -1
- package/node_modules/zod/v4/classic/external.d.ts +1 -1
- package/node_modules/zod/v4/classic/external.js +1 -1
- package/node_modules/zod/v4/classic/from-json-schema.cjs +264 -24
- package/node_modules/zod/v4/classic/from-json-schema.js +245 -24
- package/node_modules/zod/v4/classic/in-out.cjs +19 -0
- package/node_modules/zod/v4/classic/index.cjs +19 -0
- package/node_modules/zod/v4/classic/iso.cjs +19 -0
- package/node_modules/zod/v4/classic/parse.cjs +19 -0
- package/node_modules/zod/v4/classic/schemas.cjs +100 -35
- package/node_modules/zod/v4/classic/schemas.d.cts +15 -1
- package/node_modules/zod/v4/classic/schemas.d.ts +15 -1
- package/node_modules/zod/v4/classic/schemas.js +77 -33
- package/node_modules/zod/v4/core/api.cjs +45 -22
- package/node_modules/zod/v4/core/api.d.cts +12 -6
- package/node_modules/zod/v4/core/api.d.ts +12 -6
- package/node_modules/zod/v4/core/api.js +25 -22
- package/node_modules/zod/v4/core/checks.cjs +51 -97
- package/node_modules/zod/v4/core/checks.d.cts +17 -1
- package/node_modules/zod/v4/core/checks.d.ts +17 -1
- package/node_modules/zod/v4/core/checks.js +31 -96
- package/node_modules/zod/v4/core/compile.cjs +173 -78
- package/node_modules/zod/v4/core/compile.d.cts +18 -4
- package/node_modules/zod/v4/core/compile.d.ts +18 -4
- package/node_modules/zod/v4/core/compile.js +154 -79
- package/node_modules/zod/v4/core/core.cjs +20 -1
- package/node_modules/zod/v4/core/core.js +1 -1
- package/node_modules/zod/v4/core/doc.cjs +26 -2
- package/node_modules/zod/v4/core/doc.js +7 -2
- package/node_modules/zod/v4/core/errors.cjs +21 -5
- package/node_modules/zod/v4/core/errors.js +2 -5
- package/node_modules/zod/v4/core/index.cjs +19 -0
- package/node_modules/zod/v4/core/json-schema-generator.cjs +20 -1
- package/node_modules/zod/v4/core/json-schema-generator.js +2 -2
- package/node_modules/zod/v4/core/json-schema-processors.cjs +188 -72
- package/node_modules/zod/v4/core/json-schema-processors.d.cts +16 -0
- package/node_modules/zod/v4/core/json-schema-processors.d.ts +16 -0
- package/node_modules/zod/v4/core/json-schema-processors.js +170 -74
- package/node_modules/zod/v4/core/json-schema.cjs +19 -0
- package/node_modules/zod/v4/core/memoizer.cjs +111 -23
- package/node_modules/zod/v4/core/memoizer.js +69 -23
- package/node_modules/zod/v4/core/parse.cjs +56 -16
- package/node_modules/zod/v4/core/parse.js +37 -16
- package/node_modules/zod/v4/core/regexes.cjs +31 -6
- package/node_modules/zod/v4/core/regexes.d.cts +3 -0
- package/node_modules/zod/v4/core/regexes.d.ts +3 -0
- package/node_modules/zod/v4/core/regexes.js +10 -4
- package/node_modules/zod/v4/core/registries.cjs +19 -0
- package/node_modules/zod/v4/core/schemas.cjs +302 -114
- package/node_modules/zod/v4/core/schemas.d.cts +28 -8
- package/node_modules/zod/v4/core/schemas.d.ts +28 -8
- package/node_modules/zod/v4/core/schemas.js +279 -113
- package/node_modules/zod/v4/core/standard-schema.cjs +19 -0
- package/node_modules/zod/v4/core/to-json-schema.cjs +28 -7
- package/node_modules/zod/v4/core/to-json-schema.d.cts +4 -3
- package/node_modules/zod/v4/core/to-json-schema.d.ts +4 -3
- package/node_modules/zod/v4/core/to-json-schema.js +7 -6
- package/node_modules/zod/v4/core/util.cjs +177 -143
- package/node_modules/zod/v4/core/util.d.cts +25 -4
- package/node_modules/zod/v4/core/util.d.ts +25 -4
- package/node_modules/zod/v4/core/util.js +156 -143
- package/node_modules/zod/v4/core/versions.cjs +21 -2
- package/node_modules/zod/v4/core/versions.d.cts +1 -1
- package/node_modules/zod/v4/core/versions.d.ts +1 -1
- package/node_modules/zod/v4/core/versions.js +2 -2
- package/node_modules/zod/v4/core/visit.cjs +19 -0
- package/node_modules/zod/v4/index.cjs +19 -0
- package/node_modules/zod/v4/locales/ar.cjs +2 -0
- package/node_modules/zod/v4/locales/ar.js +2 -0
- package/node_modules/zod/v4/locales/az.cjs +2 -0
- package/node_modules/zod/v4/locales/az.js +2 -0
- package/node_modules/zod/v4/locales/be.cjs +2 -0
- package/node_modules/zod/v4/locales/be.js +2 -0
- package/node_modules/zod/v4/locales/bg.cjs +2 -0
- package/node_modules/zod/v4/locales/bg.js +2 -0
- package/node_modules/zod/v4/locales/bn.cjs +2 -0
- package/node_modules/zod/v4/locales/bn.js +2 -0
- package/node_modules/zod/v4/locales/ca.cjs +2 -0
- package/node_modules/zod/v4/locales/ca.js +2 -0
- package/node_modules/zod/v4/locales/ckb.cjs +2 -0
- package/node_modules/zod/v4/locales/ckb.js +2 -0
- package/node_modules/zod/v4/locales/cs.cjs +2 -0
- package/node_modules/zod/v4/locales/cs.js +2 -0
- package/node_modules/zod/v4/locales/da.cjs +2 -0
- package/node_modules/zod/v4/locales/da.js +2 -0
- package/node_modules/zod/v4/locales/de.cjs +2 -0
- package/node_modules/zod/v4/locales/de.js +2 -0
- package/node_modules/zod/v4/locales/el.cjs +2 -0
- package/node_modules/zod/v4/locales/el.js +2 -0
- package/node_modules/zod/v4/locales/en.cjs +2 -0
- package/node_modules/zod/v4/locales/en.js +2 -0
- package/node_modules/zod/v4/locales/eo.cjs +2 -0
- package/node_modules/zod/v4/locales/eo.js +2 -0
- package/node_modules/zod/v4/locales/es.cjs +2 -0
- package/node_modules/zod/v4/locales/es.js +2 -0
- package/node_modules/zod/v4/locales/fa.cjs +2 -0
- package/node_modules/zod/v4/locales/fa.js +2 -0
- package/node_modules/zod/v4/locales/fi.cjs +2 -0
- package/node_modules/zod/v4/locales/fi.js +2 -0
- package/node_modules/zod/v4/locales/fr-CA.cjs +2 -0
- package/node_modules/zod/v4/locales/fr-CA.js +2 -0
- package/node_modules/zod/v4/locales/fr.cjs +2 -0
- package/node_modules/zod/v4/locales/fr.js +2 -0
- package/node_modules/zod/v4/locales/gu.cjs +2 -0
- package/node_modules/zod/v4/locales/gu.js +2 -0
- package/node_modules/zod/v4/locales/he.cjs +2 -0
- package/node_modules/zod/v4/locales/he.js +2 -0
- package/node_modules/zod/v4/locales/hi.cjs +2 -0
- package/node_modules/zod/v4/locales/hi.js +2 -0
- package/node_modules/zod/v4/locales/hr.cjs +2 -0
- package/node_modules/zod/v4/locales/hr.js +2 -0
- package/node_modules/zod/v4/locales/hu.cjs +2 -0
- package/node_modules/zod/v4/locales/hu.js +2 -0
- package/node_modules/zod/v4/locales/hy.cjs +2 -0
- package/node_modules/zod/v4/locales/hy.js +2 -0
- package/node_modules/zod/v4/locales/id.cjs +2 -0
- package/node_modules/zod/v4/locales/id.js +2 -0
- package/node_modules/zod/v4/locales/index.cjs +22 -1
- package/node_modules/zod/v4/locales/index.d.cts +1 -0
- package/node_modules/zod/v4/locales/index.d.ts +1 -0
- package/node_modules/zod/v4/locales/index.js +1 -0
- package/node_modules/zod/v4/locales/is.cjs +2 -0
- package/node_modules/zod/v4/locales/is.js +2 -0
- package/node_modules/zod/v4/locales/it.cjs +2 -0
- package/node_modules/zod/v4/locales/it.js +2 -0
- package/node_modules/zod/v4/locales/ja.cjs +2 -0
- package/node_modules/zod/v4/locales/ja.js +2 -0
- package/node_modules/zod/v4/locales/ka.cjs +2 -0
- package/node_modules/zod/v4/locales/ka.js +2 -0
- package/node_modules/zod/v4/locales/km.cjs +2 -0
- package/node_modules/zod/v4/locales/km.js +2 -0
- package/node_modules/zod/v4/locales/kn.cjs +2 -0
- package/node_modules/zod/v4/locales/kn.js +2 -0
- package/node_modules/zod/v4/locales/ko.cjs +2 -0
- package/node_modules/zod/v4/locales/ko.js +2 -0
- package/node_modules/zod/v4/locales/lt.cjs +2 -0
- package/node_modules/zod/v4/locales/lt.js +2 -0
- package/node_modules/zod/v4/locales/mk.cjs +2 -0
- package/node_modules/zod/v4/locales/mk.js +2 -0
- package/node_modules/zod/v4/locales/ms.cjs +2 -0
- package/node_modules/zod/v4/locales/ms.js +2 -0
- package/node_modules/zod/v4/locales/ne.cjs +2 -0
- package/node_modules/zod/v4/locales/ne.js +2 -0
- package/node_modules/zod/v4/locales/nl.cjs +2 -0
- package/node_modules/zod/v4/locales/nl.js +2 -0
- package/node_modules/zod/v4/locales/nn.cjs +2 -0
- package/node_modules/zod/v4/locales/nn.js +2 -0
- package/node_modules/zod/v4/locales/no.cjs +2 -0
- package/node_modules/zod/v4/locales/no.js +2 -0
- package/node_modules/zod/v4/locales/ota.cjs +2 -0
- package/node_modules/zod/v4/locales/ota.js +2 -0
- package/node_modules/zod/v4/locales/pl.cjs +2 -0
- package/node_modules/zod/v4/locales/pl.js +2 -0
- package/node_modules/zod/v4/locales/ps.cjs +2 -0
- package/node_modules/zod/v4/locales/ps.js +2 -0
- package/node_modules/zod/v4/locales/pt-BR.cjs +2 -0
- package/node_modules/zod/v4/locales/pt-BR.js +2 -0
- package/node_modules/zod/v4/locales/pt.cjs +2 -0
- package/node_modules/zod/v4/locales/pt.js +2 -0
- package/node_modules/zod/v4/locales/ro.cjs +2 -0
- package/node_modules/zod/v4/locales/ro.js +2 -0
- package/node_modules/zod/v4/locales/ru.cjs +2 -0
- package/node_modules/zod/v4/locales/ru.js +2 -0
- package/node_modules/zod/v4/locales/sk.cjs +2 -0
- package/node_modules/zod/v4/locales/sk.js +2 -0
- package/node_modules/zod/v4/locales/sl.cjs +2 -0
- package/node_modules/zod/v4/locales/sl.js +2 -0
- package/node_modules/zod/v4/locales/sv.cjs +2 -0
- package/node_modules/zod/v4/locales/sv.js +2 -0
- package/node_modules/zod/v4/locales/ta.cjs +2 -0
- package/node_modules/zod/v4/locales/ta.js +2 -0
- package/node_modules/zod/v4/locales/tg.cjs +144 -0
- package/node_modules/zod/v4/locales/tg.d.cts +5 -0
- package/node_modules/zod/v4/locales/tg.d.ts +4 -0
- package/node_modules/zod/v4/locales/tg.js +117 -0
- package/node_modules/zod/v4/locales/th.cjs +2 -0
- package/node_modules/zod/v4/locales/th.js +2 -0
- package/node_modules/zod/v4/locales/tk.cjs +2 -0
- package/node_modules/zod/v4/locales/tk.js +2 -0
- package/node_modules/zod/v4/locales/tr.cjs +2 -0
- package/node_modules/zod/v4/locales/tr.js +2 -0
- package/node_modules/zod/v4/locales/uk.cjs +2 -0
- package/node_modules/zod/v4/locales/uk.js +2 -0
- package/node_modules/zod/v4/locales/ur.cjs +2 -0
- package/node_modules/zod/v4/locales/ur.js +2 -0
- package/node_modules/zod/v4/locales/uz.cjs +2 -0
- package/node_modules/zod/v4/locales/uz.js +2 -0
- package/node_modules/zod/v4/locales/vi.cjs +2 -0
- package/node_modules/zod/v4/locales/vi.js +2 -0
- package/node_modules/zod/v4/locales/yo.cjs +2 -0
- package/node_modules/zod/v4/locales/yo.js +2 -0
- package/node_modules/zod/v4/locales/zh-CN.cjs +2 -0
- package/node_modules/zod/v4/locales/zh-CN.js +2 -0
- package/node_modules/zod/v4/locales/zh-TW.cjs +2 -0
- package/node_modules/zod/v4/locales/zh-TW.js +2 -0
- package/node_modules/zod/v4/mini/checks.cjs +19 -0
- package/node_modules/zod/v4/mini/coerce.cjs +19 -0
- package/node_modules/zod/v4/mini/deep-partial.cjs +19 -0
- package/node_modules/zod/v4/mini/external.cjs +22 -1
- package/node_modules/zod/v4/mini/external.d.cts +1 -1
- package/node_modules/zod/v4/mini/external.d.ts +1 -1
- package/node_modules/zod/v4/mini/external.js +1 -1
- package/node_modules/zod/v4/mini/in-out.cjs +19 -0
- package/node_modules/zod/v4/mini/index.cjs +19 -0
- package/node_modules/zod/v4/mini/iso.cjs +19 -0
- package/node_modules/zod/v4/mini/parse.cjs +19 -0
- package/node_modules/zod/v4/mini/schemas.cjs +44 -8
- package/node_modules/zod/v4/mini/schemas.d.cts +6 -1
- package/node_modules/zod/v4/mini/schemas.d.ts +6 -1
- package/node_modules/zod/v4/mini/schemas.js +21 -6
- package/node_modules/zod/v4-mini/index.cjs +19 -0
- package/package.json +7 -7
- package/node_modules/@openclaw/fs-safe/dist/absolute-path.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/advanced.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-crc32.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-deadline.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-durability.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-entry.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-errors.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-gzip-tail.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-input.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-kind.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-limits.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-merge.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-native.d.ts +0 -21
- package/node_modules/@openclaw/fs-safe/dist/archive-native.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-native.js +0 -97
- package/node_modules/@openclaw/fs-safe/dist/archive-options.d.ts +0 -23
- package/node_modules/@openclaw/fs-safe/dist/archive-options.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-parser-errors.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-plan.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-policy.d.ts +0 -22
- package/node_modules/@openclaw/fs-safe/dist/archive-policy.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-policy.js +0 -38
- package/node_modules/@openclaw/fs-safe/dist/archive-read.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-staging.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-inspect.d.ts +0 -7
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-inspect.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-inspect.js +0 -62
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-stream.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-wasm.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-tar.d.ts +0 -19
- package/node_modules/@openclaw/fs-safe/dist/archive-tar.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-tar.js +0 -21
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-admission.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-count.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-directory.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-entry.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-integrity.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-loader.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-manifest.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-names.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-preflight.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/async-lock.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/atomic.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/bounded-read-stream.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/bounded-read.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/byte-budget.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/clone-metadata.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/config.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/containment.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/copy-file-input.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/copy-policy.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/copy-publication.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/copy-tree-portable.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/copy.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/darwin-acl.d.ts +0 -4
- package/node_modules/@openclaw/fs-safe/dist/darwin-acl.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/darwin-acl.js +0 -24
- package/node_modules/@openclaw/fs-safe/dist/deny-mutations.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/device-path.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/directory-durability.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/directory-entry-path.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/directory-guard.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-node.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-owner.d.ts +0 -21
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-owner.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-owner.js +0 -78
- package/node_modules/@openclaw/fs-safe/dist/durability.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/effective-uid.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/error-detail.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/errors.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/file-handle-transfer.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/file-hash.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/file-identity.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/file-lock.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/file-observation.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/file-store-boundary.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/file-store-copy-source.d.ts +0 -5
- package/node_modules/@openclaw/fs-safe/dist/file-store-copy-source.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/file-store-copy-source.js +0 -31
- package/node_modules/@openclaw/fs-safe/dist/file-store-limit.d.ts +0 -2
- package/node_modules/@openclaw/fs-safe/dist/file-store-limit.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/file-store-limit.js +0 -8
- package/node_modules/@openclaw/fs-safe/dist/file-store-path.d.ts +0 -3
- package/node_modules/@openclaw/fs-safe/dist/file-store-path.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/file-store-path.js +0 -30
- package/node_modules/@openclaw/fs-safe/dist/file-store-prune.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/file-store-sync-directory.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/file-store-sync-write.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/file-store.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/file-sync.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/filename.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/fs.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/guarded-mkdir.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/guarded-mutation.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/guest-dispatch-python.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/guest-native-python.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/guest.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/home-dir.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/index.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/install-path.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/json-document-store.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-directory.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-ownership.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-paths.d.ts +0 -11
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-paths.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-paths.js +0 -42
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-read.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/json-store.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/json-stringify.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/json.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/local-file-access.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/local-file-descriptor.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/local-roots.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/lock-config.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/move-path-cleanup.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/move-path-stage.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/move-path.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/mutation-authority.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/native-binding.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/native-config.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/native-directory-observation.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/native-operations.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/native-parent-admission.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write-windows.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/native-staged-file.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/native.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/opened-file-failure.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/opened-realpath.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/output.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/overwrite-file-handle.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/owner-dacl.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/path-case.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/path-policy.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/path-prefix.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/path-scope-lexical.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/path-segment-route.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/path-suffix-aliases.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/path.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/permission-exec.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/permissions-public.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/permissions-windows.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/permissions.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-admission.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-observation.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-shared-route.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/pinned-open.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/pinned-operation.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/pinned-write-types.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/pinned-write.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/positional-read.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/private-directory.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/private-producer-handoff.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/private-temp-workspace.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/publish-copy-stage.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/publish-file-failure.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/publish-file.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/read-open-flags.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/read-opened-file.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/realpath.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/recursive-mkdir-path.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/regular-file.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/replace-directory.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-fallback.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-source.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/replace-file-descriptor.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/replace-file-mode.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/replace-file-rename-policy.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/replace-file-temp-owner.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/replace-file.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-boundary.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-context.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-create-input.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-directory-creation.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-directory-list.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-directory.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-entries.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-errors.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-file-final-admission.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-file.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-impl.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-move-noreplace.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-move-preflight.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-observed-path.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-options.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-path-errors.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-path-existing.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-path-observation.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-path-stat.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-path-symlink.d.ts +0 -7
- package/node_modules/@openclaw/fs-safe/dist/root-path-symlink.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-path-symlink.js +0 -55
- package/node_modules/@openclaw/fs-safe/dist/root-path.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-paths-lexical.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-paths.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-read-admission.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-remove-identity.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-remove-receipt.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-remove.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-symlink-policy.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-walk.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-write-admission.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-write-compatibility.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-write-complete-parent.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-write-mode.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-write-publication.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-write-verification.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/safe-path-segment.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/secret-file.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/secret-read-async.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/secret-read-policy.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/secret.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/secure-file-windows.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/secure-file.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/secure-temp-dir.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/secure-temp-repair.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/sibling-staged-file.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/sibling-temp.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-acquire.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-handle.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-policy.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-reclaim.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-root.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-types.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/staged-directory.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/staged-file-types.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/standalone-publication-path.d.ts +0 -2
- package/node_modules/@openclaw/fs-safe/dist/standalone-publication-path.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/standalone-publication-path.js +0 -6
- package/node_modules/@openclaw/fs-safe/dist/stat-observation.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/store.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/strict-file-identity.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/string-coerce.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/suppressed-error.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/symlink-parents.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/temp-cleanup.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/temp-target.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-admission.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-child-admission.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-descriptor.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-identity.d.ts +0 -15
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-identity.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-identity.js +0 -41
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-owner.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-permissions.d.ts +0 -4
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-permissions.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-permissions.js +0 -32
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-types.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/temp.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/test-hooks.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/text-atomic.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/timing.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/trash.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/types.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/unicode-path.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/walk.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/windows-command.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/windows-owner.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/windows-path-alias.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/write-file-handle.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/write-open-flags.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/write-queue.d.ts.map +0 -1
- /package/node_modules/@openclaw/fs-safe/dist/{archive-options.js → owner-dacl-batch-worker.d.ts} +0 -0
|
@@ -1,43 +1,9 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
import { FsSafeError } from "./errors.js";
|
|
3
|
-
|
|
4
|
-
const FORWARD_SLASH = 0x2f;
|
|
5
|
-
const BACKSLASH = 0x5c;
|
|
6
|
-
const DOT = 0x2e;
|
|
7
|
-
const QUESTION_MARK = 0x3f;
|
|
8
|
-
function isAsciiLetter(code) {
|
|
9
|
-
return (code >= 0x41 && code <= 0x5a) || (code >= 0x61 && code <= 0x7a);
|
|
10
|
-
}
|
|
11
|
-
function isSeparator(code) {
|
|
12
|
-
return code === FORWARD_SLASH || code === BACKSLASH;
|
|
13
|
-
}
|
|
14
|
-
function rootedDriveColonIndex(value) {
|
|
15
|
-
if (value.length >= 3 &&
|
|
16
|
-
isAsciiLetter(value.charCodeAt(0)) &&
|
|
17
|
-
value.charCodeAt(1) === COLON &&
|
|
18
|
-
isSeparator(value.charCodeAt(2))) {
|
|
19
|
-
return 1;
|
|
20
|
-
}
|
|
21
|
-
if (value.length >= 7 &&
|
|
22
|
-
isSeparator(value.charCodeAt(0)) &&
|
|
23
|
-
isSeparator(value.charCodeAt(1)) &&
|
|
24
|
-
(value.charCodeAt(2) === QUESTION_MARK || value.charCodeAt(2) === DOT) &&
|
|
25
|
-
isSeparator(value.charCodeAt(3)) &&
|
|
26
|
-
isAsciiLetter(value.charCodeAt(4)) &&
|
|
27
|
-
value.charCodeAt(5) === COLON &&
|
|
28
|
-
isSeparator(value.charCodeAt(6))) {
|
|
29
|
-
return 5;
|
|
30
|
-
}
|
|
31
|
-
return -1;
|
|
32
|
-
}
|
|
3
|
+
import { hasWindowsDrivePrefix, rootedWindowsDriveColonIndex, windowsNamespaceMarker, } from "./windows-path-syntax.js";
|
|
33
4
|
function isBareWindowsNamespaceDrive(value) {
|
|
34
|
-
return
|
|
35
|
-
|
|
36
|
-
isSeparator(value.charCodeAt(1)) &&
|
|
37
|
-
(value.charCodeAt(2) === QUESTION_MARK || value.charCodeAt(2) === DOT) &&
|
|
38
|
-
isSeparator(value.charCodeAt(3)) &&
|
|
39
|
-
isAsciiLetter(value.charCodeAt(4)) &&
|
|
40
|
-
value.charCodeAt(5) === COLON);
|
|
5
|
+
return value.length === 6 && windowsNamespaceMarker(value) !== undefined &&
|
|
6
|
+
hasWindowsDrivePrefix(value, 4);
|
|
41
7
|
}
|
|
42
8
|
/**
|
|
43
9
|
* Capture an ordinary Windows drive-relative path without normalizing its raw
|
|
@@ -47,9 +13,7 @@ function isBareWindowsNamespaceDrive(value) {
|
|
|
47
13
|
export function anchorWindowsDriveRelativePath(value) {
|
|
48
14
|
if (process.platform !== "win32" || path.isAbsolute(value))
|
|
49
15
|
return value;
|
|
50
|
-
if (value
|
|
51
|
-
!isAsciiLetter(value.charCodeAt(0)) ||
|
|
52
|
-
value.charCodeAt(1) !== COLON) {
|
|
16
|
+
if (!hasWindowsDrivePrefix(value)) {
|
|
53
17
|
return value;
|
|
54
18
|
}
|
|
55
19
|
const drive = value.slice(0, 2);
|
|
@@ -64,7 +28,7 @@ export function anchorWindowsDriveRelativePath(value) {
|
|
|
64
28
|
export function resolvePathPreservingWindowsRoot(value) {
|
|
65
29
|
if (value.length === 7 &&
|
|
66
30
|
process.platform === "win32" &&
|
|
67
|
-
|
|
31
|
+
rootedWindowsDriveColonIndex(value) === 5) {
|
|
68
32
|
return value.includes("/") ? value.replaceAll("/", "\\") : value;
|
|
69
33
|
}
|
|
70
34
|
const resolved = path.resolve(value);
|
|
@@ -110,7 +74,7 @@ export function resolvePathFromBasePreservingWindowsRoot(base, ...segments) {
|
|
|
110
74
|
*/
|
|
111
75
|
export function pathForWindowsFilesystem(value) {
|
|
112
76
|
if (process.platform !== "win32" ||
|
|
113
|
-
|
|
77
|
+
rootedWindowsDriveColonIndex(value) !== 5) {
|
|
114
78
|
return value;
|
|
115
79
|
}
|
|
116
80
|
if (value.length === 7) {
|
|
@@ -132,7 +96,7 @@ export function hasWindowsPathAlias(value, kind, platform = process.platform) {
|
|
|
132
96
|
return false;
|
|
133
97
|
if (kind === "relative")
|
|
134
98
|
return true;
|
|
135
|
-
return firstColon !==
|
|
99
|
+
return firstColon !== rootedWindowsDriveColonIndex(value) || value.indexOf(":", firstColon + 1) !== -1;
|
|
136
100
|
}
|
|
137
101
|
export function assertNoWindowsPathAliasForPlatform(value, kind, message, platform) {
|
|
138
102
|
if (hasWindowsPathAlias(value, kind, platform)) {
|
|
@@ -151,3 +115,8 @@ export function assertNoWindowsPathAlias(value, kind = "filesystem", message = "
|
|
|
151
115
|
export function isWindowsPathAliasError(error) {
|
|
152
116
|
return error instanceof FsSafeError && error.details?.reason === "windows-path-alias";
|
|
153
117
|
}
|
|
118
|
+
export function admitStandalonePublicationPath(value, message) {
|
|
119
|
+
const admittedPath = anchorWindowsDriveRelativePath(value);
|
|
120
|
+
assertNoWindowsPathAlias(admittedPath, "filesystem", message);
|
|
121
|
+
return admittedPath;
|
|
122
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare function isWindowsSeparator(value: string, offset: number): boolean;
|
|
2
|
+
export declare function hasWindowsDrivePrefix(value: string, offset?: number): boolean;
|
|
3
|
+
/** Classify a raw prefix without normalizing any path components. */
|
|
4
|
+
export declare function windowsNamespaceMarker(value: string): "." | "?" | undefined;
|
|
5
|
+
export declare function rootedWindowsDriveColonIndex(value: string): number;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export function isWindowsSeparator(value, offset) {
|
|
2
|
+
const code = value.charCodeAt(offset);
|
|
3
|
+
return code === 0x2f || code === 0x5c;
|
|
4
|
+
}
|
|
5
|
+
export function hasWindowsDrivePrefix(value, offset = 0) {
|
|
6
|
+
const letter = value.charCodeAt(offset) | 0x20;
|
|
7
|
+
return letter >= 0x61 && letter <= 0x7a && value.charCodeAt(offset + 1) === 0x3a;
|
|
8
|
+
}
|
|
9
|
+
/** Classify a raw prefix without normalizing any path components. */
|
|
10
|
+
export function windowsNamespaceMarker(value) {
|
|
11
|
+
const marker = value[2];
|
|
12
|
+
return (marker === "." || marker === "?") &&
|
|
13
|
+
isWindowsSeparator(value, 0) && isWindowsSeparator(value, 1) &&
|
|
14
|
+
isWindowsSeparator(value, 3) ? marker : undefined;
|
|
15
|
+
}
|
|
16
|
+
export function rootedWindowsDriveColonIndex(value) {
|
|
17
|
+
const colon = hasWindowsDrivePrefix(value)
|
|
18
|
+
? 1
|
|
19
|
+
: windowsNamespaceMarker(value) !== undefined && hasWindowsDrivePrefix(value, 4) ? 5 : -1;
|
|
20
|
+
return colon >= 0 && isWindowsSeparator(value, colon + 1) ? colon : -1;
|
|
21
|
+
}
|
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
// Executed only by the built-in Windows PowerShell/.NET host. The raw security
|
|
2
|
+
// descriptor never passes through CommonSecurityDescriptor's ACE normalization.
|
|
3
|
+
using System;
|
|
4
|
+
using System.Collections.Generic;
|
|
5
|
+
using System.Runtime.InteropServices;
|
|
6
|
+
using System.Security.AccessControl;
|
|
7
|
+
using System.Security.Principal;
|
|
8
|
+
using System.Text;
|
|
9
|
+
using Microsoft.Win32.SafeHandles;
|
|
10
|
+
|
|
11
|
+
public static partial class FsSafeWindowsBridge {
|
|
12
|
+
[StructLayout(LayoutKind.Sequential)] struct IoStatus { public IntPtr Status; public UIntPtr Information; }
|
|
13
|
+
[StructLayout(LayoutKind.Sequential)] struct UnicodeString { public ushort Length, MaximumLength; public IntPtr Buffer; }
|
|
14
|
+
[StructLayout(LayoutKind.Sequential)] struct ObjectAttributes {
|
|
15
|
+
public uint Length; public IntPtr RootDirectory, ObjectName; public uint Attributes;
|
|
16
|
+
public IntPtr SecurityDescriptor, SecurityQualityOfService;
|
|
17
|
+
}
|
|
18
|
+
[StructLayout(LayoutKind.Sequential)] struct FileInfo {
|
|
19
|
+
public uint Attributes, CreationLow, CreationHigh, AccessLow, AccessHigh, WriteLow, WriteHigh;
|
|
20
|
+
public uint Volume, SizeHigh, SizeLow, Links, IndexHigh, IndexLow;
|
|
21
|
+
}
|
|
22
|
+
[StructLayout(LayoutKind.Sequential)] struct FileId {
|
|
23
|
+
public ulong Volume; [MarshalAs(UnmanagedType.ByValArray, SizeConst=16)] public byte[] Id;
|
|
24
|
+
}
|
|
25
|
+
[DllImport("kernel32.dll", SetLastError=true, CharSet=CharSet.Unicode, ExactSpelling=true)] static extern SafeFileHandle CreateFileW(string path, uint access, uint share, IntPtr security, uint disposition, uint flags, IntPtr template);
|
|
26
|
+
[DllImport("kernel32.dll", SetLastError=true)] static extern IntPtr GetStdHandle(int standard);
|
|
27
|
+
[DllImport("kernel32.dll", SetLastError=true)] static extern uint GetFileType(SafeFileHandle handle);
|
|
28
|
+
[DllImport("kernel32.dll", SetLastError=true)] static extern bool GetFileInformationByHandle(SafeFileHandle handle, out FileInfo information);
|
|
29
|
+
[DllImport("kernel32.dll", SetLastError=true)] static extern bool GetFileInformationByHandleEx(SafeFileHandle handle, int kind, out FileId information, uint size);
|
|
30
|
+
[DllImport("kernel32.dll", SetLastError=true)] static extern bool SetFileInformationByHandle(SafeFileHandle handle, int kind, ref uint information, uint size);
|
|
31
|
+
[DllImport("kernel32.dll", SetLastError=true, CharSet=CharSet.Unicode, ExactSpelling=true)] static extern uint GetFinalPathNameByHandleW(SafeFileHandle handle, StringBuilder path, uint capacity, uint flags);
|
|
32
|
+
[DllImport("kernel32.dll")] static extern IntPtr LocalFree(IntPtr memory);
|
|
33
|
+
[DllImport("advapi32.dll")] static extern uint GetSecurityInfo(SafeFileHandle handle, int kind, uint sections, out IntPtr owner, out IntPtr group, out IntPtr dacl, out IntPtr sacl, out IntPtr descriptor);
|
|
34
|
+
[DllImport("advapi32.dll")] static extern uint GetSecurityDescriptorLength(IntPtr descriptor);
|
|
35
|
+
[DllImport("advapi32.dll", SetLastError=true)] static extern bool GetSecurityDescriptorDacl(IntPtr descriptor, out bool present, out IntPtr dacl, out bool defaulted);
|
|
36
|
+
[DllImport("advapi32.dll", SetLastError=true)] static extern bool GetSecurityDescriptorOwner(IntPtr descriptor, out IntPtr owner, out bool defaulted);
|
|
37
|
+
[DllImport("advapi32.dll")] static extern uint SetSecurityInfo(SafeFileHandle handle, int kind, uint sections, IntPtr owner, IntPtr group, IntPtr dacl, IntPtr sacl);
|
|
38
|
+
[DllImport("ntdll.dll")] static extern int NtQueryInformationFile(SafeFileHandle handle, out IoStatus io, [Out] byte[] information, uint length, int kind);
|
|
39
|
+
[DllImport("ntdll.dll")] static extern int NtCreateFile(out SafeFileHandle handle, uint access, ref ObjectAttributes attributes, out IoStatus io, IntPtr allocation, uint flags, uint share, uint disposition, uint options, IntPtr ea, uint eaLength);
|
|
40
|
+
[DllImport("ntdll.dll")] static extern uint RtlNtStatusToDosError(int status);
|
|
41
|
+
|
|
42
|
+
sealed class Failure : Exception {
|
|
43
|
+
public readonly string Code;
|
|
44
|
+
public Failure(string code, string message) : base(message) { Code=code; }
|
|
45
|
+
}
|
|
46
|
+
static Failure OsFailure(uint error, string operation, bool identity=false, bool fullIdentity=false) {
|
|
47
|
+
// Native security calls retain EACCES; shared handle identity calls use EPERM.
|
|
48
|
+
string code=error==5 ? (identity ? "EPERM" : "EACCES") : error==80 || error==183 ? "EEXIST" : error==2 || error==3 ? "ENOENT" :
|
|
49
|
+
identity && (error==112 || error==39) ? "ENOSPC" : identity && (error==32 || error==33) ? "EBUSY" :
|
|
50
|
+
fullIdentity && (error==1 || error==50 || error==87) ? "ENOTSUP" : "EIO";
|
|
51
|
+
return new Failure(code, operation+" failed with Windows error "+error);
|
|
52
|
+
}
|
|
53
|
+
static Failure CreateFailure(uint error) {
|
|
54
|
+
var failure=OsFailure(error,"create private directory",true);
|
|
55
|
+
return failure.Code=="EPERM" ? new Failure("EACCES",failure.Message) : failure;
|
|
56
|
+
}
|
|
57
|
+
static void Require(bool condition, string code, string message) {
|
|
58
|
+
if (!condition) throw new Failure(code,message);
|
|
59
|
+
}
|
|
60
|
+
static Dictionary<string,object> Row(params object[] fields) {
|
|
61
|
+
var result=new Dictionary<string,object>();
|
|
62
|
+
for(int i=0;i<fields.Length;i+=2) result.Add((string)fields[i],fields[i+1]);
|
|
63
|
+
return result;
|
|
64
|
+
}
|
|
65
|
+
static SafeFileHandle Open(string path, uint access, bool noFollow) {
|
|
66
|
+
var handle=CreateFileW(path,access,7,IntPtr.Zero,3,0x02000000u | (noFollow ? 0x00200000u : 0),IntPtr.Zero);
|
|
67
|
+
if(handle.IsInvalid) { uint error=(uint)Marshal.GetLastWin32Error(); handle.Dispose(); throw OsFailure(error,"open security handle"); }
|
|
68
|
+
return handle;
|
|
69
|
+
}
|
|
70
|
+
static FileInfo Information(SafeFileHandle handle) {
|
|
71
|
+
FileInfo info;
|
|
72
|
+
if(!GetFileInformationByHandle(handle,out info)) throw OsFailure((uint)Marshal.GetLastWin32Error(),"inspect handle identity",true);
|
|
73
|
+
return info;
|
|
74
|
+
}
|
|
75
|
+
static string Identity(SafeFileHandle handle) {
|
|
76
|
+
var info=Information(handle);
|
|
77
|
+
return info.Volume.ToString("x8")+":"+(((ulong)info.IndexHigh<<32)|info.IndexLow).ToString("x16");
|
|
78
|
+
}
|
|
79
|
+
static string DirectoryIdentity(SafeFileHandle handle, bool requireLocal=false) {
|
|
80
|
+
var info=Information(handle);
|
|
81
|
+
Require((info.Attributes&0x400)==0,"ELOOP","private directory must not be a reparse point");
|
|
82
|
+
Require((info.Attributes&0x10)!=0,"ENOTDIR","private directory handle must name a directory");
|
|
83
|
+
if(requireLocal) Require(IsLocal(handle),"ENOTSUP","private directories require a local filesystem");
|
|
84
|
+
return FullIdentity(handle);
|
|
85
|
+
}
|
|
86
|
+
static string FullIdentity(SafeFileHandle handle) {
|
|
87
|
+
FileId id;
|
|
88
|
+
if(!GetFileInformationByHandleEx(handle,18,out id,24)) throw OsFailure((uint)Marshal.GetLastWin32Error(),"inspect 128-bit file identity",true,true);
|
|
89
|
+
Require(id.Id!=null && id.Id.Length==16,"EIO","file identity is incomplete");
|
|
90
|
+
return id.Volume.ToString("x16")+":"+BitConverter.ToString(id.Id).Replace("-","").ToLowerInvariant();
|
|
91
|
+
}
|
|
92
|
+
static string FileIdentity(SafeFileHandle handle, uint expectedLinks) {
|
|
93
|
+
var info=Information(handle);
|
|
94
|
+
Require((info.Attributes&0x400)==0,"ELOOP","private file must not be a reparse point");
|
|
95
|
+
Require((info.Attributes&0x10)==0 && GetFileType(handle)==1,"EINVAL","private file must be a regular disk file");
|
|
96
|
+
Require(info.Links==expectedLinks,"EIO","private file link count changed");
|
|
97
|
+
return FullIdentity(handle);
|
|
98
|
+
}
|
|
99
|
+
static string FinalPath(SafeFileHandle handle, uint flags) {
|
|
100
|
+
int capacity=512;
|
|
101
|
+
for(int attempt=0;attempt<4;attempt++) {
|
|
102
|
+
var path=new StringBuilder(capacity);
|
|
103
|
+
uint length=GetFinalPathNameByHandleW(handle,path,(uint)capacity,flags);
|
|
104
|
+
if(length==0) throw OsFailure((uint)Marshal.GetLastWin32Error(),"inspect handle locality");
|
|
105
|
+
if(length<capacity) return path.ToString();
|
|
106
|
+
Require(length<32768,"EIO","final handle path exceeds the inspection budget");
|
|
107
|
+
capacity=(int)length+1;
|
|
108
|
+
}
|
|
109
|
+
throw new Failure("EIO","final handle path changed during inspection");
|
|
110
|
+
}
|
|
111
|
+
static bool IsVolumeGuidPath(string path) {
|
|
112
|
+
return path.Length>=49 && path.StartsWith(@"\\?\Volume{",StringComparison.OrdinalIgnoreCase) &&
|
|
113
|
+
path[47]=='}' && path[48]=='\\' &&
|
|
114
|
+
System.Text.RegularExpressions.Regex.IsMatch(path.Substring(11,36),@"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$");
|
|
115
|
+
}
|
|
116
|
+
static bool IsLocalFinalPath(string path) {
|
|
117
|
+
return !path.StartsWith(@"\\?\UNC\",StringComparison.Ordinal) &&
|
|
118
|
+
(!path.StartsWith(@"\\",StringComparison.Ordinal) || path.StartsWith(@"\\?\",StringComparison.Ordinal));
|
|
119
|
+
}
|
|
120
|
+
static bool IsLocal(SafeFileHandle handle) {
|
|
121
|
+
IoStatus io; var remote=new byte[]{255};
|
|
122
|
+
int status=NtQueryInformationFile(handle,out io,remote,1,51);
|
|
123
|
+
if(status==0 && io.Information.ToUInt64()==1 && remote[0]<=1) return remote[0]==0;
|
|
124
|
+
try {
|
|
125
|
+
if(IsVolumeGuidPath(FinalPath(handle,9))) return true;
|
|
126
|
+
} catch(Failure) { }
|
|
127
|
+
return IsLocalFinalPath(FinalPath(handle,0));
|
|
128
|
+
}
|
|
129
|
+
static string Sid(SecurityIdentifier sid) {
|
|
130
|
+
Require(sid!=null,"EIO","security descriptor SID is missing");
|
|
131
|
+
return sid.Value.ToLowerInvariant();
|
|
132
|
+
}
|
|
133
|
+
static Dictionary<string,object> Security(SafeFileHandle handle, bool requireLocality=true) {
|
|
134
|
+
IntPtr owner,group,dacl,sacl,descriptor;
|
|
135
|
+
uint error=GetSecurityInfo(handle,1,5,out owner,out group,out dacl,out sacl,out descriptor);
|
|
136
|
+
if(error!=0) throw OsFailure(error,"read owner and DACL");
|
|
137
|
+
try {
|
|
138
|
+
Require(descriptor!=IntPtr.Zero && owner!=IntPtr.Zero,"EIO","security descriptor is incomplete");
|
|
139
|
+
uint length=GetSecurityDescriptorLength(descriptor);
|
|
140
|
+
Require(length>=20 && length<=1024*1024,"EIO","security descriptor exceeds the inspection budget");
|
|
141
|
+
var bytes=new byte[length]; Marshal.Copy(descriptor,bytes,0,(int)length);
|
|
142
|
+
var raw=new RawSecurityDescriptor(bytes,0);
|
|
143
|
+
string ownerSid=Sid(raw.Owner), currentSid;
|
|
144
|
+
using(var current=WindowsIdentity.GetCurrent()) currentSid=Sid(current.User);
|
|
145
|
+
var aces=new List<object>(); var unsupported=new List<int>();
|
|
146
|
+
if(raw.DiscretionaryAcl!=null) foreach(GenericAce ace in raw.DiscretionaryAcl) {
|
|
147
|
+
var basic=ace as CommonAce;
|
|
148
|
+
if(basic==null || basic.IsCallback || (ace.AceType!=AceType.AccessAllowed && ace.AceType!=AceType.AccessDenied)) {
|
|
149
|
+
unsupported.Add((int)ace.AceType); continue;
|
|
150
|
+
}
|
|
151
|
+
byte flags=(byte)ace.AceFlags;
|
|
152
|
+
aces.Add(Row("sid",Sid(basic.SecurityIdentifier),"mask",unchecked((uint)basic.AccessMask),
|
|
153
|
+
"aceType",ace.AceType==AceType.AccessAllowed ? "allow" : "deny",
|
|
154
|
+
"flags",Row("raw",flags,"objectInherit",(flags&1)!=0,"containerInherit",(flags&2)!=0,
|
|
155
|
+
"noPropagateInherit",(flags&4)!=0,"inheritOnly",(flags&8)!=0,"inherited",(flags&16)!=0,
|
|
156
|
+
"successfulAccess",(flags&64)!=0,"failedAccess",(flags&128)!=0)));
|
|
157
|
+
}
|
|
158
|
+
bool isLocal;
|
|
159
|
+
try { isLocal=IsLocal(handle); }
|
|
160
|
+
catch(Failure) { if(requireLocality) throw; isLocal=false; }
|
|
161
|
+
return Row("ownerSid",ownerSid,"currentUserSid",currentSid,"daclPresent",raw.DiscretionaryAcl!=null,
|
|
162
|
+
"daclProtected",(raw.ControlFlags&ControlFlags.DiscretionaryAclProtected)!=0,
|
|
163
|
+
"isLocal",isLocal,"aceListComplete",unsupported.Count==0,"unsupportedAceTypes",unsupported.ToArray(),"aces",aces.ToArray());
|
|
164
|
+
} finally { if(descriptor!=IntPtr.Zero) LocalFree(descriptor); }
|
|
165
|
+
}
|
|
166
|
+
static byte[] PrivateSecurity(bool inherit=true) {
|
|
167
|
+
SecurityIdentifier current;
|
|
168
|
+
using(var identity=WindowsIdentity.GetCurrent()) current=identity.User;
|
|
169
|
+
var acl=new RawAcl(2,3);
|
|
170
|
+
var principals=new[]{current,new SecurityIdentifier("S-1-5-18"),new SecurityIdentifier("S-1-5-32-544")};
|
|
171
|
+
var flags=inherit ? AceFlags.ObjectInherit|AceFlags.ContainerInherit : AceFlags.None;
|
|
172
|
+
foreach(var principal in principals) acl.InsertAce(acl.Count,new CommonAce(flags,AceQualifier.AccessAllowed,0x1f01ff,principal,false,null));
|
|
173
|
+
var descriptor=new RawSecurityDescriptor(ControlFlags.DiscretionaryAclPresent|ControlFlags.DiscretionaryAclProtected|ControlFlags.SelfRelative,current,null,null,acl);
|
|
174
|
+
var bytes=new byte[descriptor.BinaryLength]; descriptor.GetBinaryForm(bytes,0); return bytes;
|
|
175
|
+
}
|
|
176
|
+
static SafeFileHandle CreateRelative(SafeFileHandle parent,string name) {
|
|
177
|
+
byte[] security=PrivateSecurity();
|
|
178
|
+
var pin=GCHandle.Alloc(security,GCHandleType.Pinned);
|
|
179
|
+
IntPtr nameBuffer=Marshal.StringToHGlobalUni(name), unicodeBuffer=IntPtr.Zero;
|
|
180
|
+
try {
|
|
181
|
+
int byteLength=checked(name.Length*2);
|
|
182
|
+
Require(byteLength>0 && byteLength<=65532,"EINVAL","private directory name is invalid");
|
|
183
|
+
var unicode=new UnicodeString { Length=(ushort)byteLength, MaximumLength=(ushort)(byteLength+2), Buffer=nameBuffer };
|
|
184
|
+
unicodeBuffer=Marshal.AllocHGlobal(Marshal.SizeOf(typeof(UnicodeString))); Marshal.StructureToPtr(unicode,unicodeBuffer,false);
|
|
185
|
+
var attributes=new ObjectAttributes { Length=(uint)Marshal.SizeOf(typeof(ObjectAttributes)),RootDirectory=parent.DangerousGetHandle(),
|
|
186
|
+
ObjectName=unicodeBuffer,Attributes=0x40|0x1000,SecurityDescriptor=pin.AddrOfPinnedObject() };
|
|
187
|
+
IoStatus io; SafeFileHandle created;
|
|
188
|
+
int status=NtCreateFile(out created,0x00130180,ref attributes,out io,IntPtr.Zero,0,7,2,0x00200021,IntPtr.Zero,0);
|
|
189
|
+
if(status<0) { if(created!=null) created.Dispose(); throw CreateFailure(RtlNtStatusToDosError(status)); }
|
|
190
|
+
return created;
|
|
191
|
+
} finally { if(unicodeBuffer!=IntPtr.Zero) Marshal.FreeHGlobal(unicodeBuffer); Marshal.FreeHGlobal(nameBuffer); pin.Free(); }
|
|
192
|
+
}
|
|
193
|
+
static void RequirePrivate(Dictionary<string,object> facts, bool requireProtected=true, bool requirePrivateChildren=false, bool allowAdministratorsOwner=false) {
|
|
194
|
+
string current=(string)facts["currentUserSid"], owner=(string)facts["ownerSid"];
|
|
195
|
+
Require((bool)facts["isLocal"] && (bool)facts["daclPresent"] && (!requireProtected || (bool)facts["daclProtected"]) &&
|
|
196
|
+
(bool)facts["aceListComplete"] && (owner==current || (allowAdministratorsOwner && owner=="s-1-5-32-544")),
|
|
197
|
+
"EACCES","private object security was not enforced");
|
|
198
|
+
foreach(Dictionary<string,object> ace in (object[])facts["aces"]) {
|
|
199
|
+
var flags=(Dictionary<string,object>)ace["flags"];
|
|
200
|
+
string sid=(string)ace["sid"];
|
|
201
|
+
if((string)ace["aceType"]=="deny" || sid==current || sid=="s-1-5-18" || sid=="s-1-5-32-544") continue;
|
|
202
|
+
if((bool)flags["inheritOnly"] && (!requirePrivateChildren || (!(bool)flags["objectInherit"] && !(bool)flags["containerInherit"]))) continue;
|
|
203
|
+
uint mask=(uint)ace["mask"];
|
|
204
|
+
Require((mask&0xd00d01dfu)==0,"EACCES","private object permits untrusted access");
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
static void SplitParent(string path, out string parentPath, out string name) {
|
|
208
|
+
// JavaScript has already admitted and resolved this spelling. Keep extended
|
|
209
|
+
// Win32 paths out of .NET Framework's separate pathname normalization.
|
|
210
|
+
int separator=path.LastIndexOf('\\');
|
|
211
|
+
Require(separator>0 && separator<path.Length-1,"EINVAL","private object must name a child");
|
|
212
|
+
parentPath=path.Substring(0,separator); name=path.Substring(separator+1);
|
|
213
|
+
if(parentPath.EndsWith(":")) parentPath+="\\";
|
|
214
|
+
}
|
|
215
|
+
static string ExpectedIdentity(string variable, bool required=true) {
|
|
216
|
+
string identity=Environment.GetEnvironmentVariable(variable) ?? "";
|
|
217
|
+
Require((!required && identity.Length==0) || System.Text.RegularExpressions.Regex.IsMatch(identity,@"\A[0-9a-f]{16}:[0-9a-f]{32}\z"),
|
|
218
|
+
"EINVAL","complete expected Windows identity is required");
|
|
219
|
+
return identity;
|
|
220
|
+
}
|
|
221
|
+
static void CheckParent(SafeFileHandle parent, string path, string identity) {
|
|
222
|
+
Require(DirectoryIdentity(parent,true)==identity,"EIO","retained private parent changed");
|
|
223
|
+
using(var named=Open(path,0x80,true)) Require(DirectoryIdentity(named,true)==identity,"EIO","private parent pathname changed");
|
|
224
|
+
}
|
|
225
|
+
static object InspectDirectory(string path) {
|
|
226
|
+
bool requirePrivate=Environment.GetEnvironmentVariable("FS_SAFE_WINDOWS_SECURITY_REQUIRE_PRIVATE")=="1";
|
|
227
|
+
using(var handle=Open(path,requirePrivate ? 0x00020080u : 0x80u,true)) {
|
|
228
|
+
string identity=DirectoryIdentity(handle,true);
|
|
229
|
+
if(requirePrivate) RequirePrivate(Security(handle),true,true);
|
|
230
|
+
return Row("identity",identity);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
static void ProtectFileSecurity(SafeFileHandle handle) {
|
|
234
|
+
byte[] security=PrivateSecurity(false);
|
|
235
|
+
var pin=GCHandle.Alloc(security,GCHandleType.Pinned);
|
|
236
|
+
try {
|
|
237
|
+
bool present,defaulted; IntPtr dacl,owner;
|
|
238
|
+
if(!GetSecurityDescriptorDacl(pin.AddrOfPinnedObject(),out present,out dacl,out defaulted)) {
|
|
239
|
+
throw OsFailure((uint)Marshal.GetLastWin32Error(),"inspect private file DACL");
|
|
240
|
+
}
|
|
241
|
+
Require(present && dacl!=IntPtr.Zero,"EIO","private file DACL is incomplete");
|
|
242
|
+
if(!GetSecurityDescriptorOwner(pin.AddrOfPinnedObject(),out owner,out defaulted)) {
|
|
243
|
+
throw OsFailure((uint)Marshal.GetLastWin32Error(),"inspect private file owner");
|
|
244
|
+
}
|
|
245
|
+
Require(owner!=IntPtr.Zero,"EIO","private file owner is incomplete");
|
|
246
|
+
uint error=SetSecurityInfo(handle,1,0x80000005u,owner,IntPtr.Zero,dacl,IntPtr.Zero);
|
|
247
|
+
if(error!=0) throw OsFailure(error,"protect private file owner and DACL");
|
|
248
|
+
} finally { pin.Free(); }
|
|
249
|
+
}
|
|
250
|
+
static void CheckFileAssociation(SafeFileHandle held, string path, string identity, uint links, SafeFileHandle parent, string parentPath, string parentIdentity) {
|
|
251
|
+
Require(FileIdentity(held,links)==identity,"EIO","retained private file changed");
|
|
252
|
+
using(var named=Open(path,0x80,true)) Require(FileIdentity(named,links)==identity,"EIO","private file pathname changed");
|
|
253
|
+
CheckParent(parent,parentPath,parentIdentity);
|
|
254
|
+
}
|
|
255
|
+
static object PrivateFile(string path, bool protect) {
|
|
256
|
+
string expectedParent=ExpectedIdentity("FS_SAFE_WINDOWS_SECURITY_PARENT_IDENTITY");
|
|
257
|
+
string expectedFile=protect ? "" : ExpectedIdentity("FS_SAFE_WINDOWS_SECURITY_FILE_IDENTITY");
|
|
258
|
+
uint links=1;
|
|
259
|
+
if(!protect) Require(uint.TryParse(Environment.GetEnvironmentVariable("FS_SAFE_WINDOWS_SECURITY_EXPECTED_LINKS"),
|
|
260
|
+
System.Globalization.NumberStyles.None,System.Globalization.CultureInfo.InvariantCulture,out links) && links>0,
|
|
261
|
+
"EINVAL","private file expected link count is invalid");
|
|
262
|
+
string parentPath,name; SplitParent(path,out parentPath,out name);
|
|
263
|
+
using(var held=new SafeFileHandle(GetStdHandle(-10),false)) {
|
|
264
|
+
Require(!held.IsInvalid,"EBADF","inherited file handle is unavailable");
|
|
265
|
+
string identity=FileIdentity(held,links);
|
|
266
|
+
if(!protect) Require(identity==expectedFile,"EIO","private file identity changed");
|
|
267
|
+
// Windows can use Administrators as the creating token's default owner.
|
|
268
|
+
// The inherited ACL must already be private: later changes cannot revoke
|
|
269
|
+
// an earlier reader handle.
|
|
270
|
+
RequirePrivate(Security(held),requireProtected:!protect,allowAdministratorsOwner:protect);
|
|
271
|
+
using(var parent=Open(parentPath,0x80,true)) {
|
|
272
|
+
CheckFileAssociation(held,path,identity,links,parent,parentPath,expectedParent);
|
|
273
|
+
if(protect) using(var writable=Open(path,0x000e0080,true)) {
|
|
274
|
+
Require(FileIdentity(writable,links)==identity,"EIO","private file changed before owner and DACL protection");
|
|
275
|
+
RequirePrivate(Security(writable),requireProtected:false,allowAdministratorsOwner:true);
|
|
276
|
+
CheckParent(parent,parentPath,expectedParent);
|
|
277
|
+
ProtectFileSecurity(writable);
|
|
278
|
+
RequirePrivate(Security(writable));
|
|
279
|
+
}
|
|
280
|
+
RequirePrivate(Security(held));
|
|
281
|
+
CheckFileAssociation(held,path,identity,links,parent,parentPath,expectedParent);
|
|
282
|
+
return Row("identity",identity);
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
static object CreatePrivate(string path) {
|
|
287
|
+
string parentPath,name; SplitParent(path,out parentPath,out name);
|
|
288
|
+
string expectedParent=ExpectedIdentity("FS_SAFE_WINDOWS_SECURITY_PARENT_IDENTITY",false);
|
|
289
|
+
using(var parent=Open(parentPath,0xa4,true)) {
|
|
290
|
+
string parentId=DirectoryIdentity(parent,true);
|
|
291
|
+
if(expectedParent.Length!=0) Require(parentId==expectedParent,"EIO","private parent changed before creation");
|
|
292
|
+
using(var created=CreateRelative(parent,name)) {
|
|
293
|
+
try {
|
|
294
|
+
string createdId=DirectoryIdentity(created);
|
|
295
|
+
RequirePrivate(Security(created));
|
|
296
|
+
Require(DirectoryIdentity(parent)==parentId,"EIO","retained private parent changed");
|
|
297
|
+
using(var namedParent=Open(parentPath,0x80,true)) Require(DirectoryIdentity(namedParent,true)==parentId,"EIO","private parent pathname changed");
|
|
298
|
+
using(var named=Open(path,0x80,true)) {
|
|
299
|
+
Require(DirectoryIdentity(named,true)==createdId,"EIO","private directory pathname changed");
|
|
300
|
+
}
|
|
301
|
+
return Row("created",true,"identity",createdId);
|
|
302
|
+
} catch(Exception primary) {
|
|
303
|
+
uint flags=0x13;
|
|
304
|
+
if(!SetFileInformationByHandle(created,21,ref flags,4)) {
|
|
305
|
+
var failure=primary as Failure;
|
|
306
|
+
throw new Failure(failure==null ? "EIO" : failure.Code,
|
|
307
|
+
(failure==null ? "private directory validation failed" : failure.Message)+
|
|
308
|
+
"; owned-handle cleanup failed with Windows error "+Marshal.GetLastWin32Error());
|
|
309
|
+
}
|
|
310
|
+
throw;
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
static object InspectPath(string path) {
|
|
316
|
+
// Raw reporting retains ACL facts when locality is unknown; admission remains strict.
|
|
317
|
+
using(var handle=Open(path,0x00020080,false)) return Security(handle,false);
|
|
318
|
+
}
|
|
319
|
+
public static object Execute(string operation,string path) {
|
|
320
|
+
try {
|
|
321
|
+
object result;
|
|
322
|
+
if(operation=="create") result=CreatePrivate(path);
|
|
323
|
+
else if(operation=="directory") result=InspectDirectory(path);
|
|
324
|
+
else if(operation=="protect-file" || operation=="verify-file") result=PrivateFile(path,operation=="protect-file");
|
|
325
|
+
else if(operation=="descriptor") {
|
|
326
|
+
using(var handle=new SafeFileHandle(GetStdHandle(-10),false)) {
|
|
327
|
+
Require(!handle.IsInvalid,"EBADF","inherited file handle is unavailable");
|
|
328
|
+
result=Row("identity",Identity(handle),"security",Security(handle));
|
|
329
|
+
}
|
|
330
|
+
} else if(operation=="path") result=InspectPath(path);
|
|
331
|
+
else throw new Failure("EINVAL","unknown Windows security operation");
|
|
332
|
+
return Row("ok",true,"result",result);
|
|
333
|
+
} catch(Failure error) { return Row("ok",false,"code",error.Code,"message",error.Message); }
|
|
334
|
+
catch(Exception) { return Row("ok",false,"code","EIO","message","Windows security descriptor processing failed"); }
|
|
335
|
+
}
|
|
336
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
param(
|
|
2
|
+
[Parameter(Mandatory = $true)]
|
|
3
|
+
[ValidateSet('path', 'paths', 'descriptor', 'create', 'directory', 'protect-file', 'verify-file')]
|
|
4
|
+
[string] $Operation
|
|
5
|
+
)
|
|
6
|
+
|
|
7
|
+
$ErrorActionPreference = 'Stop'
|
|
8
|
+
$ProgressPreference = 'SilentlyContinue'
|
|
9
|
+
# Avoid scanning unrelated installed modules before loading system cmdlets.
|
|
10
|
+
$env:PSModulePath = [IO.Path]::Combine($PSHOME, 'Modules')
|
|
11
|
+
[Console]::OutputEncoding = [Text.UTF8Encoding]::new($false)
|
|
12
|
+
|
|
13
|
+
Microsoft.PowerShell.Utility\Add-Type -LiteralPath ([IO.Path]::Combine($PSScriptRoot, 'windows-security-bridge.cs'))
|
|
14
|
+
if ($Operation -eq 'paths') {
|
|
15
|
+
$reply = $null
|
|
16
|
+
$limit = 16 * 1024 * 1024
|
|
17
|
+
try {
|
|
18
|
+
$inputStream = [Console]::OpenStandardInput()
|
|
19
|
+
$inputBytes = [IO.MemoryStream]::new()
|
|
20
|
+
try {
|
|
21
|
+
$buffer = [byte[]]::new(8192)
|
|
22
|
+
while (($read = $inputStream.Read($buffer, 0, $buffer.Length)) -gt 0) {
|
|
23
|
+
if ($inputBytes.Length + $read -gt $limit) {
|
|
24
|
+
throw 'Windows security path batch exceeds the input budget'
|
|
25
|
+
}
|
|
26
|
+
$inputBytes.Write($buffer, 0, $read)
|
|
27
|
+
}
|
|
28
|
+
$inputJson = [Text.UTF8Encoding]::new($false, $true).GetString($inputBytes.ToArray())
|
|
29
|
+
} finally {
|
|
30
|
+
$inputBytes.Dispose()
|
|
31
|
+
$inputStream.Dispose()
|
|
32
|
+
}
|
|
33
|
+
if (-not $inputJson.TrimStart().StartsWith('[')) {
|
|
34
|
+
throw 'Windows security paths must be a JSON array'
|
|
35
|
+
}
|
|
36
|
+
# Validate the whole document before wrapping it; the wrapper keeps empty,
|
|
37
|
+
# singleton, and nested arrays intact on Windows PowerShell 5.1.
|
|
38
|
+
$null = Microsoft.PowerShell.Utility\ConvertFrom-Json -InputObject $inputJson
|
|
39
|
+
$request = Microsoft.PowerShell.Utility\ConvertFrom-Json -InputObject ('{"paths":' + $inputJson + '}')
|
|
40
|
+
if ($request.paths -isnot [array]) {
|
|
41
|
+
throw 'Windows security paths must be a JSON array'
|
|
42
|
+
}
|
|
43
|
+
for ($index = 0; $index -lt $request.paths.Length; $index++) {
|
|
44
|
+
$value = $request.paths[$index]
|
|
45
|
+
if ($value -isnot [string] -or $value.Length -eq 0 -or $value.IndexOf([char]0) -ge 0) {
|
|
46
|
+
throw 'Windows security paths must be nonempty strings without NUL bytes'
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
} catch {
|
|
50
|
+
$reply = @{ ok = $false; code = 'EINVAL'; message = 'Invalid Windows security path batch' }
|
|
51
|
+
}
|
|
52
|
+
if ($null -eq $reply) {
|
|
53
|
+
$utf8 = [Console]::OutputEncoding
|
|
54
|
+
$prefix = '{"ok":true,"result":['
|
|
55
|
+
$suffix = ']}'
|
|
56
|
+
$bytes = $utf8.GetByteCount($prefix) + $utf8.GetByteCount($suffix)
|
|
57
|
+
$encoded = [Text.StringBuilder]::new($prefix)
|
|
58
|
+
$separator = ''
|
|
59
|
+
foreach ($pathname in $request.paths) {
|
|
60
|
+
try {
|
|
61
|
+
$reply = [FsSafeWindowsBridge]::Execute('path', $pathname)
|
|
62
|
+
} catch {
|
|
63
|
+
$reply = @{ ok = $false; code = 'EINVAL'; message = 'Invalid Windows security path batch' }
|
|
64
|
+
}
|
|
65
|
+
if (-not $reply.ok) { break }
|
|
66
|
+
$rowJson = Microsoft.PowerShell.Utility\ConvertTo-Json -InputObject ([ordered]@{ path = $pathname; security = $reply.result }) -Depth 8 -Compress
|
|
67
|
+
$reply = $null
|
|
68
|
+
$nextBytes = $bytes + $separator.Length + $utf8.GetByteCount($rowJson)
|
|
69
|
+
if ($nextBytes -gt $limit) {
|
|
70
|
+
$rowJson = $null
|
|
71
|
+
$reply = @{ ok = $false; code = 'too-large'; message = 'Windows security batch exceeded its output budget' }
|
|
72
|
+
break
|
|
73
|
+
}
|
|
74
|
+
[void]$encoded.Append($separator).Append($rowJson)
|
|
75
|
+
$bytes = $nextBytes
|
|
76
|
+
$separator = ','
|
|
77
|
+
$rowJson = $null
|
|
78
|
+
}
|
|
79
|
+
if ($null -eq $reply) {
|
|
80
|
+
[void]$encoded.Append($suffix)
|
|
81
|
+
[Console]::Write($encoded.ToString())
|
|
82
|
+
return
|
|
83
|
+
}
|
|
84
|
+
$encoded = $null
|
|
85
|
+
}
|
|
86
|
+
} else {
|
|
87
|
+
$targetPath = [Environment]::GetEnvironmentVariable('FS_SAFE_WINDOWS_SECURITY_PATH')
|
|
88
|
+
$reply = [FsSafeWindowsBridge]::Execute($Operation, $targetPath)
|
|
89
|
+
}
|
|
90
|
+
$reply | Microsoft.PowerShell.Utility\ConvertTo-Json -Depth 8 -Compress
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { NativeWindowsDescriptorSecurityFacts, NativeWindowsSecurityFacts } from "./native-binding.js";
|
|
2
|
+
import type { FsSafeNativeMode } from "./native-config.js";
|
|
3
|
+
import { type DescriptorFacts } from "./windows-security-facts.js";
|
|
4
|
+
export declare const WINDOWS_SECURITY_BATCH_MAX_BYTES: number;
|
|
5
|
+
/** Cleanup must preserve stages still reachable by an unsettled command. */
|
|
6
|
+
export declare function hasUnsettledWindowsSecurityCommand(error: unknown): boolean;
|
|
7
|
+
export declare function readWindowsSecurityFactsBatch(paths: readonly string[], options: {
|
|
8
|
+
timeoutMs: number;
|
|
9
|
+
native: boolean;
|
|
10
|
+
mode: FsSafeNativeMode;
|
|
11
|
+
}): Promise<DescriptorFacts[]>;
|
|
12
|
+
export declare function readWindowsSecurityFactsCommand(targetPath: string): NativeWindowsSecurityFacts;
|
|
13
|
+
export declare function inspectWindowsDescriptorCommand(fd: number): Promise<NativeWindowsDescriptorSecurityFacts>;
|
|
14
|
+
export declare function createPrivateWindowsDirectoryCommand(targetPath: string, expectedParentIdentity?: string): Promise<{
|
|
15
|
+
identity: string;
|
|
16
|
+
}>;
|
|
17
|
+
export declare function createPrivateWindowsDirectoryCommandSync(targetPath: string, expectedParentIdentity?: string): {
|
|
18
|
+
identity: string;
|
|
19
|
+
};
|
|
20
|
+
export declare function inspectWindowsDirectoryCommandSync(targetPath: string, requirePrivate: boolean): {
|
|
21
|
+
identity: string;
|
|
22
|
+
};
|
|
23
|
+
export declare function inspectWindowsDirectoryCommand(targetPath: string, requirePrivate: boolean): Promise<{
|
|
24
|
+
identity: string;
|
|
25
|
+
}>;
|
|
26
|
+
export declare function protectPrivateWindowsFileCommandSync(fd: number, targetPath: string, expectedParentIdentity: string): {
|
|
27
|
+
identity: string;
|
|
28
|
+
};
|
|
29
|
+
export declare function protectPrivateWindowsFileCommand(fd: number, targetPath: string, expectedParentIdentity: string): Promise<{
|
|
30
|
+
identity: string;
|
|
31
|
+
}>;
|
|
32
|
+
export declare function verifyPrivateWindowsFileCommandSync(fd: number, targetPath: string, expectedFileIdentity: string, expectedParentIdentity: string, expectedLinks?: number): void;
|
|
33
|
+
export declare function verifyPrivateWindowsFileCommand(fd: number, targetPath: string, expectedFileIdentity: string, expectedParentIdentity: string, expectedLinks?: number): Promise<void>;
|