@openclaw/signal 2026.9.5 → 2026.9.6
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/dist/.setup/{api-DbdeJVQ8.mjs → api-B9-B1L7Q.mjs} +6 -6
- package/dist/.setup/{api-Cu01dJRP.mjs → api-CGh4eWR8.mjs} +7 -7
- package/dist/.setup/{approval-handler.runtime-Clf_1IZj.mjs → approval-handler.runtime-C3vN5OWd.mjs} +2 -2
- package/dist/.setup/{approval-reactions-B25QoVJc.mjs → approval-reactions-DDQvPP_z.mjs} +1 -1
- package/dist/.setup/{channel-gMpZmqLx.mjs → channel-DhzTcFsK.mjs} +8 -8
- package/dist/.setup/{channel.runtime-Dqc18A1e.mjs → channel.runtime-CG79z_Vy.mjs} +2 -2
- package/dist/.setup/{install-signal-cli-bXeTrTyL.mjs → install-signal-cli-BDbzFcU2.mjs} +27 -57
- package/dist/.setup/{monitor-DAMQw1pZ.mjs → monitor-Dnz6Ygz5.mjs} +11 -10
- package/dist/.setup/{probe-IKCS9D-z.mjs → probe-DXT2eLnw.mjs} +1 -1
- package/dist/.setup/{question-reactions-DSNAD0cd.mjs → question-reactions-C8cSEjVf.mjs} +1 -1
- package/dist/.setup/{send-CcetN4rk.mjs → send-B78M_eFp.mjs} +1 -1
- package/dist/.setup/{send.runtime-B7C4IP23.mjs → send.runtime-CLnCWvrM.mjs} +1 -1
- package/dist/.setup/{transport-detection-CqyR2vG8.mjs → transport-detection-CoiRl7Gx.mjs} +11 -6
- package/dist/.setup/{transport-detection.runtime-CW1lp2d9.mjs → transport-detection.runtime-Tlhuv3T_.mjs} +1 -1
- package/dist/api.js +7 -7
- package/dist/channel-plugin-api.js +1 -1
- package/dist/contract-api.js +1 -1
- package/dist/runtime-api.js +5 -5
- package/dist/setup-entry.js +1 -1
- package/node_modules/@openclaw/fs-safe/CHANGELOG.md +1187 -0
- package/node_modules/@openclaw/fs-safe/LICENSE +22 -0
- package/node_modules/@openclaw/fs-safe/README.md +654 -0
- package/node_modules/@openclaw/fs-safe/SECURITY.md +45 -0
- package/node_modules/@openclaw/fs-safe/dist/absolute-path.d.ts +32 -0
- package/node_modules/@openclaw/fs-safe/dist/absolute-path.js +323 -0
- package/node_modules/@openclaw/fs-safe/dist/advanced.d.ts +36 -0
- package/node_modules/@openclaw/fs-safe/dist/advanced.js +38 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-crc32.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-crc32.js +19 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-deadline.d.ts +11 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-deadline.js +101 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-durability.d.ts +23 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-durability.js +180 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-entry.d.ts +13 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-entry.js +85 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-errors.d.ts +12 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-errors.js +23 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-gzip-tail.d.ts +20 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-gzip-tail.js +99 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-input.d.ts +18 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-input.js +98 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-kind.d.ts +7 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-kind.js +71 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-limits.d.ts +56 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-limits.js +131 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-merge.d.ts +22 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-merge.js +283 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-parser-errors.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-parser-errors.js +12 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-parser.wasm +0 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-plan.d.ts +90 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-plan.js +119 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-read.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-read.js +243 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-staging.d.ts +33 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-staging.js +308 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-stream.d.ts +27 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-stream.js +127 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-wasm.d.ts +29 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-wasm.js +203 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-admission.d.ts +7 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-admission.js +96 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-count.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-count.js +160 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-directory.d.ts +21 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-directory.js +263 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-entry.d.ts +24 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-entry.js +42 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-integrity.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-integrity.js +40 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-loader.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-loader.js +147 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-manifest.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-manifest.js +22 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-names.d.ts +17 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-names.js +149 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-preflight.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-preflight.js +13 -0
- package/node_modules/@openclaw/fs-safe/dist/archive.d.ts +17 -0
- package/node_modules/@openclaw/fs-safe/dist/archive.js +329 -0
- package/node_modules/@openclaw/fs-safe/dist/async-lock.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/async-lock.js +17 -0
- package/node_modules/@openclaw/fs-safe/dist/atomic.d.ts +6 -0
- package/node_modules/@openclaw/fs-safe/dist/atomic.js +4 -0
- package/node_modules/@openclaw/fs-safe/dist/bounded-read-stream.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/bounded-read-stream.js +15 -0
- package/node_modules/@openclaw/fs-safe/dist/bounded-read.d.ts +25 -0
- package/node_modules/@openclaw/fs-safe/dist/bounded-read.js +143 -0
- package/node_modules/@openclaw/fs-safe/dist/byte-budget.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/byte-budget.js +9 -0
- 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 +19 -0
- package/node_modules/@openclaw/fs-safe/dist/clone-metadata.js +36 -0
- package/node_modules/@openclaw/fs-safe/dist/config.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/config.js +2 -0
- package/node_modules/@openclaw/fs-safe/dist/containment.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/containment.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-file-input.d.ts +21 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-file-input.js +71 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-policy.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-policy.js +8 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-publication.d.ts +20 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-publication.js +33 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-tree-portable.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-tree-portable.js +245 -0
- package/node_modules/@openclaw/fs-safe/dist/copy.d.ts +15 -0
- package/node_modules/@openclaw/fs-safe/dist/copy.js +143 -0
- 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-mutations.d.ts +11 -0
- package/node_modules/@openclaw/fs-safe/dist/deny-mutations.js +95 -0
- package/node_modules/@openclaw/fs-safe/dist/device-path.d.ts +14 -0
- package/node_modules/@openclaw/fs-safe/dist/device-path.js +139 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-durability.d.ts +43 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-durability.js +286 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-entry-path.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-entry-path.js +21 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-guard.d.ts +55 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-guard.js +179 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-node.d.ts +21 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-node.js +209 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-owner.d.ts +20 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-owner.js +78 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-receipt.d.ts +23 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-receipt.js +123 -0
- package/node_modules/@openclaw/fs-safe/dist/durability.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/durability.js +3 -0
- package/node_modules/@openclaw/fs-safe/dist/effective-uid.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/effective-uid.js +25 -0
- package/node_modules/@openclaw/fs-safe/dist/error-detail.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/error-detail.js +13 -0
- package/node_modules/@openclaw/fs-safe/dist/errors.d.ts +13 -0
- package/node_modules/@openclaw/fs-safe/dist/errors.js +26 -0
- 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 +15 -0
- package/node_modules/@openclaw/fs-safe/dist/file-handle-transfer.js +190 -0
- package/node_modules/@openclaw/fs-safe/dist/file-hash.d.ts +16 -0
- package/node_modules/@openclaw/fs-safe/dist/file-hash.js +296 -0
- package/node_modules/@openclaw/fs-safe/dist/file-identity.d.ts +7 -0
- package/node_modules/@openclaw/fs-safe/dist/file-identity.js +48 -0
- 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 +54 -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 +32 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-held.js +395 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-io.d.ts +43 -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 +19 -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 +36 -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 +17 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync.js +341 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock.d.ts +23 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock.js +66 -0
- package/node_modules/@openclaw/fs-safe/dist/file-observation.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/file-observation.js +22 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-boundary.d.ts +38 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-boundary.js +177 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-prune.d.ts +11 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-prune.js +109 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-sync-directory.d.ts +15 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-sync-directory.js +319 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-sync-write.d.ts +9 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-sync-write.js +128 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store.d.ts +65 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store.js +362 -0
- package/node_modules/@openclaw/fs-safe/dist/file-sync.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/file-sync.js +19 -0
- package/node_modules/@openclaw/fs-safe/dist/filename.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/filename.js +138 -0
- package/node_modules/@openclaw/fs-safe/dist/fs.d.ts +12 -0
- package/node_modules/@openclaw/fs-safe/dist/fs.js +30 -0
- package/node_modules/@openclaw/fs-safe/dist/guarded-mkdir.d.ts +25 -0
- package/node_modules/@openclaw/fs-safe/dist/guarded-mkdir.js +281 -0
- package/node_modules/@openclaw/fs-safe/dist/guarded-mutation.d.ts +32 -0
- package/node_modules/@openclaw/fs-safe/dist/guarded-mutation.js +81 -0
- package/node_modules/@openclaw/fs-safe/dist/guest-dispatch-python.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/guest-dispatch-python.js +68 -0
- package/node_modules/@openclaw/fs-safe/dist/guest-native-python.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/guest-native-python.js +135 -0
- package/node_modules/@openclaw/fs-safe/dist/guest.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/guest.js +424 -0
- package/node_modules/@openclaw/fs-safe/dist/home-dir.d.ts +11 -0
- package/node_modules/@openclaw/fs-safe/dist/home-dir.js +149 -0
- package/node_modules/@openclaw/fs-safe/dist/index.d.ts +9 -0
- package/node_modules/@openclaw/fs-safe/dist/index.js +5 -0
- package/node_modules/@openclaw/fs-safe/dist/install-path.d.ts +25 -0
- package/node_modules/@openclaw/fs-safe/dist/install-path.js +136 -0
- package/node_modules/@openclaw/fs-safe/dist/json-document-store.d.ts +37 -0
- package/node_modules/@openclaw/fs-safe/dist/json-document-store.js +105 -0
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-directory.d.ts +14 -0
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-directory.js +154 -0
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-ownership.d.ts +23 -0
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-ownership.js +355 -0
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-read.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-read.js +65 -0
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue.d.ts +45 -0
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue.js +215 -0
- package/node_modules/@openclaw/fs-safe/dist/json-store.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/json-store.js +15 -0
- package/node_modules/@openclaw/fs-safe/dist/json-stringify.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/json-stringify.js +7 -0
- package/node_modules/@openclaw/fs-safe/dist/json.d.ts +49 -0
- package/node_modules/@openclaw/fs-safe/dist/json.js +323 -0
- package/node_modules/@openclaw/fs-safe/dist/local-file-access.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/local-file-access.js +84 -0
- package/node_modules/@openclaw/fs-safe/dist/local-file-descriptor.d.ts +16 -0
- package/node_modules/@openclaw/fs-safe/dist/local-file-descriptor.js +84 -0
- package/node_modules/@openclaw/fs-safe/dist/local-roots.d.ts +25 -0
- package/node_modules/@openclaw/fs-safe/dist/local-roots.js +160 -0
- package/node_modules/@openclaw/fs-safe/dist/lock-config.d.ts +9 -0
- package/node_modules/@openclaw/fs-safe/dist/lock-config.js +12 -0
- package/node_modules/@openclaw/fs-safe/dist/move-path-cleanup.d.ts +30 -0
- package/node_modules/@openclaw/fs-safe/dist/move-path-cleanup.js +224 -0
- package/node_modules/@openclaw/fs-safe/dist/move-path-stage.d.ts +7 -0
- package/node_modules/@openclaw/fs-safe/dist/move-path-stage.js +56 -0
- package/node_modules/@openclaw/fs-safe/dist/move-path.d.ts +20 -0
- package/node_modules/@openclaw/fs-safe/dist/move-path.js +390 -0
- package/node_modules/@openclaw/fs-safe/dist/mutation-authority.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/mutation-authority.js +36 -0
- package/node_modules/@openclaw/fs-safe/dist/native-binding.d.ts +162 -0
- package/node_modules/@openclaw/fs-safe/dist/native-binding.js +8 -0
- package/node_modules/@openclaw/fs-safe/dist/native-config.d.ts +16 -0
- package/node_modules/@openclaw/fs-safe/dist/native-config.js +71 -0
- package/node_modules/@openclaw/fs-safe/dist/native-directory-observation.d.ts +16 -0
- package/node_modules/@openclaw/fs-safe/dist/native-directory-observation.js +37 -0
- 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 +15 -0
- package/node_modules/@openclaw/fs-safe/dist/native-operations.js +111 -0
- package/node_modules/@openclaw/fs-safe/dist/native-parent-admission.d.ts +34 -0
- package/node_modules/@openclaw/fs-safe/dist/native-parent-admission.js +147 -0
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write-windows.d.ts +6 -0
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write-windows.js +252 -0
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write.js +472 -0
- 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 +45 -0
- package/node_modules/@openclaw/fs-safe/dist/native-staged-file.js +442 -0
- package/node_modules/@openclaw/fs-safe/dist/native.d.ts +13 -0
- package/node_modules/@openclaw/fs-safe/dist/native.js +209 -0
- package/node_modules/@openclaw/fs-safe/dist/opened-file-failure.d.ts +7 -0
- package/node_modules/@openclaw/fs-safe/dist/opened-file-failure.js +46 -0
- package/node_modules/@openclaw/fs-safe/dist/opened-realpath.d.ts +15 -0
- package/node_modules/@openclaw/fs-safe/dist/opened-realpath.js +102 -0
- package/node_modules/@openclaw/fs-safe/dist/output.d.ts +16 -0
- package/node_modules/@openclaw/fs-safe/dist/output.js +139 -0
- package/node_modules/@openclaw/fs-safe/dist/overwrite-file-handle.d.ts +7 -0
- package/node_modules/@openclaw/fs-safe/dist/overwrite-file-handle.js +46 -0
- package/node_modules/@openclaw/fs-safe/dist/owner-dacl.d.ts +30 -0
- package/node_modules/@openclaw/fs-safe/dist/owner-dacl.js +36 -0
- package/node_modules/@openclaw/fs-safe/dist/path-case.d.ts +6 -0
- package/node_modules/@openclaw/fs-safe/dist/path-case.js +136 -0
- package/node_modules/@openclaw/fs-safe/dist/path-policy.d.ts +24 -0
- package/node_modules/@openclaw/fs-safe/dist/path-policy.js +49 -0
- package/node_modules/@openclaw/fs-safe/dist/path-prefix.d.ts +6 -0
- package/node_modules/@openclaw/fs-safe/dist/path-prefix.js +104 -0
- package/node_modules/@openclaw/fs-safe/dist/path-scope-lexical.d.ts +13 -0
- package/node_modules/@openclaw/fs-safe/dist/path-scope-lexical.js +37 -0
- package/node_modules/@openclaw/fs-safe/dist/path-segment-route.d.ts +6 -0
- package/node_modules/@openclaw/fs-safe/dist/path-segment-route.js +24 -0
- package/node_modules/@openclaw/fs-safe/dist/path-suffix-aliases.d.ts +11 -0
- package/node_modules/@openclaw/fs-safe/dist/path-suffix-aliases.js +394 -0
- package/node_modules/@openclaw/fs-safe/dist/path.d.ts +20 -0
- package/node_modules/@openclaw/fs-safe/dist/path.js +169 -0
- package/node_modules/@openclaw/fs-safe/dist/permission-exec.d.ts +26 -0
- package/node_modules/@openclaw/fs-safe/dist/permission-exec.js +197 -0
- package/node_modules/@openclaw/fs-safe/dist/permissions-public.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/permissions-public.js +3 -0
- package/node_modules/@openclaw/fs-safe/dist/permissions-windows.d.ts +51 -0
- package/node_modules/@openclaw/fs-safe/dist/permissions-windows.js +319 -0
- package/node_modules/@openclaw/fs-safe/dist/permissions.d.ts +59 -0
- package/node_modules/@openclaw/fs-safe/dist/permissions.js +132 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-admission.d.ts +24 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-admission.js +419 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-observation.d.ts +38 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-observation.js +205 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-shared-route.d.ts +24 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-shared-route.js +70 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-open.d.ts +30 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-open.js +99 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-operation.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-operation.js +22 -0
- 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 +68 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-write-types.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-write.d.ts +12 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-write.js +300 -0
- package/node_modules/@openclaw/fs-safe/dist/positional-read.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/positional-read.js +36 -0
- package/node_modules/@openclaw/fs-safe/dist/private-directory.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/private-directory.js +30 -0
- 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 +53 -0
- package/node_modules/@openclaw/fs-safe/dist/private-producer-handoff.js +358 -0
- package/node_modules/@openclaw/fs-safe/dist/private-temp-workspace.d.ts +7 -0
- package/node_modules/@openclaw/fs-safe/dist/private-temp-workspace.js +341 -0
- package/node_modules/@openclaw/fs-safe/dist/publish-copy-stage.d.ts +13 -0
- package/node_modules/@openclaw/fs-safe/dist/publish-copy-stage.js +56 -0
- package/node_modules/@openclaw/fs-safe/dist/publish-file-failure.d.ts +27 -0
- package/node_modules/@openclaw/fs-safe/dist/publish-file-failure.js +22 -0
- package/node_modules/@openclaw/fs-safe/dist/publish-file.d.ts +19 -0
- package/node_modules/@openclaw/fs-safe/dist/publish-file.js +332 -0
- package/node_modules/@openclaw/fs-safe/dist/read-open-flags.d.ts +7 -0
- package/node_modules/@openclaw/fs-safe/dist/read-open-flags.js +13 -0
- package/node_modules/@openclaw/fs-safe/dist/read-opened-file.d.ts +20 -0
- package/node_modules/@openclaw/fs-safe/dist/read-opened-file.js +18 -0
- package/node_modules/@openclaw/fs-safe/dist/realpath.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/realpath.js +43 -0
- package/node_modules/@openclaw/fs-safe/dist/recursive-mkdir-path.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/recursive-mkdir-path.js +8 -0
- package/node_modules/@openclaw/fs-safe/dist/regular-file.d.ts +37 -0
- package/node_modules/@openclaw/fs-safe/dist/regular-file.js +317 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-directory.d.ts +6 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-directory.js +287 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-fallback.d.ts +38 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-fallback.js +341 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-source.d.ts +20 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-source.js +101 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-descriptor.d.ts +50 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-descriptor.js +160 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-mode.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-mode.js +10 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-rename-policy.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-rename-policy.js +30 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-temp-owner.d.ts +49 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-temp-owner.js +356 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file.d.ts +58 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file.js +336 -0
- package/node_modules/@openclaw/fs-safe/dist/retained-directory-replacement.d.ts +25 -0
- package/node_modules/@openclaw/fs-safe/dist/retained-directory-replacement.js +193 -0
- package/node_modules/@openclaw/fs-safe/dist/root-boundary.d.ts +29 -0
- package/node_modules/@openclaw/fs-safe/dist/root-boundary.js +186 -0
- package/node_modules/@openclaw/fs-safe/dist/root-context.d.ts +43 -0
- package/node_modules/@openclaw/fs-safe/dist/root-context.js +232 -0
- package/node_modules/@openclaw/fs-safe/dist/root-create-input.d.ts +16 -0
- package/node_modules/@openclaw/fs-safe/dist/root-create-input.js +93 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory-creation.d.ts +12 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory-creation.js +225 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory-list.d.ts +38 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory-list.js +382 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory.d.ts +22 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory.js +141 -0
- package/node_modules/@openclaw/fs-safe/dist/root-entries.d.ts +10 -0
- package/node_modules/@openclaw/fs-safe/dist/root-entries.js +61 -0
- package/node_modules/@openclaw/fs-safe/dist/root-errors.d.ts +16 -0
- package/node_modules/@openclaw/fs-safe/dist/root-errors.js +92 -0
- package/node_modules/@openclaw/fs-safe/dist/root-file-final-admission.d.ts +20 -0
- package/node_modules/@openclaw/fs-safe/dist/root-file-final-admission.js +86 -0
- package/node_modules/@openclaw/fs-safe/dist/root-file.d.ts +46 -0
- package/node_modules/@openclaw/fs-safe/dist/root-file.js +208 -0
- package/node_modules/@openclaw/fs-safe/dist/root-impl.d.ts +117 -0
- package/node_modules/@openclaw/fs-safe/dist/root-impl.js +1443 -0
- package/node_modules/@openclaw/fs-safe/dist/root-move-noreplace.d.ts +15 -0
- package/node_modules/@openclaw/fs-safe/dist/root-move-noreplace.js +205 -0
- package/node_modules/@openclaw/fs-safe/dist/root-move-preflight.d.ts +7 -0
- package/node_modules/@openclaw/fs-safe/dist/root-move-preflight.js +16 -0
- package/node_modules/@openclaw/fs-safe/dist/root-observed-path.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/root-observed-path.js +93 -0
- package/node_modules/@openclaw/fs-safe/dist/root-options.d.ts +84 -0
- package/node_modules/@openclaw/fs-safe/dist/root-options.js +18 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path-errors.d.ts +12 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path-errors.js +22 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path-existing.d.ts +12 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path-existing.js +160 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path-observation.d.ts +62 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path-observation.js +180 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path-stat.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path-stat.js +151 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path.d.ts +53 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path.js +443 -0
- package/node_modules/@openclaw/fs-safe/dist/root-paths-lexical.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/root-paths-lexical.js +22 -0
- package/node_modules/@openclaw/fs-safe/dist/root-paths.d.ts +62 -0
- package/node_modules/@openclaw/fs-safe/dist/root-paths.js +296 -0
- 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 +25 -0
- package/node_modules/@openclaw/fs-safe/dist/root-read-admission.js +86 -0
- package/node_modules/@openclaw/fs-safe/dist/root-remove-identity.d.ts +14 -0
- package/node_modules/@openclaw/fs-safe/dist/root-remove-identity.js +87 -0
- package/node_modules/@openclaw/fs-safe/dist/root-remove-receipt.d.ts +16 -0
- package/node_modules/@openclaw/fs-safe/dist/root-remove-receipt.js +37 -0
- package/node_modules/@openclaw/fs-safe/dist/root-remove.d.ts +6 -0
- package/node_modules/@openclaw/fs-safe/dist/root-remove.js +464 -0
- package/node_modules/@openclaw/fs-safe/dist/root-symlink-policy.d.ts +13 -0
- package/node_modules/@openclaw/fs-safe/dist/root-symlink-policy.js +34 -0
- package/node_modules/@openclaw/fs-safe/dist/root-walk.d.ts +41 -0
- package/node_modules/@openclaw/fs-safe/dist/root-walk.js +198 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-admission.d.ts +65 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-admission.js +304 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-compatibility.d.ts +11 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-compatibility.js +23 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-complete-parent.d.ts +41 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-complete-parent.js +180 -0
- 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 +7 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-mode.js +72 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-publication.d.ts +23 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-publication.js +85 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-verification.d.ts +11 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-verification.js +95 -0
- package/node_modules/@openclaw/fs-safe/dist/root.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/root.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/safe-path-segment.d.ts +11 -0
- package/node_modules/@openclaw/fs-safe/dist/safe-path-segment.js +74 -0
- package/node_modules/@openclaw/fs-safe/dist/secret-file.d.ts +25 -0
- package/node_modules/@openclaw/fs-safe/dist/secret-file.js +337 -0
- package/node_modules/@openclaw/fs-safe/dist/secret-read-async.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/secret-read-async.js +58 -0
- package/node_modules/@openclaw/fs-safe/dist/secret-read-policy.d.ts +20 -0
- package/node_modules/@openclaw/fs-safe/dist/secret-read-policy.js +68 -0
- package/node_modules/@openclaw/fs-safe/dist/secret.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/secret.js +3 -0
- package/node_modules/@openclaw/fs-safe/dist/secure-file-windows.d.ts +10 -0
- package/node_modules/@openclaw/fs-safe/dist/secure-file-windows.js +88 -0
- package/node_modules/@openclaw/fs-safe/dist/secure-file.d.ts +31 -0
- package/node_modules/@openclaw/fs-safe/dist/secure-file.js +297 -0
- package/node_modules/@openclaw/fs-safe/dist/secure-temp-dir.d.ts +29 -0
- package/node_modules/@openclaw/fs-safe/dist/secure-temp-dir.js +181 -0
- package/node_modules/@openclaw/fs-safe/dist/secure-temp-repair.d.ts +34 -0
- package/node_modules/@openclaw/fs-safe/dist/secure-temp-repair.js +110 -0
- package/node_modules/@openclaw/fs-safe/dist/sibling-staged-file.d.ts +17 -0
- package/node_modules/@openclaw/fs-safe/dist/sibling-staged-file.js +301 -0
- package/node_modules/@openclaw/fs-safe/dist/sibling-temp.d.ts +28 -0
- package/node_modules/@openclaw/fs-safe/dist/sibling-temp.js +132 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-acquire.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-acquire.js +442 -0
- 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 +42 -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 +26 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-handle.js +48 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-policy.d.ts +19 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-policy.js +113 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-reclaim.d.ts +67 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-reclaim.js +375 -0
- 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 +2 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-root.js +79 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-stale-admission.d.ts +38 -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 +68 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-types.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock.d.ts +13 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock.js +280 -0
- package/node_modules/@openclaw/fs-safe/dist/staged-directory.d.ts +27 -0
- package/node_modules/@openclaw/fs-safe/dist/staged-directory.js +148 -0
- 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 +55 -0
- package/node_modules/@openclaw/fs-safe/dist/staged-file-types.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/stat-observation.d.ts +10 -0
- package/node_modules/@openclaw/fs-safe/dist/stat-observation.js +64 -0
- package/node_modules/@openclaw/fs-safe/dist/store.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/store.js +3 -0
- package/node_modules/@openclaw/fs-safe/dist/strict-file-identity.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/strict-file-identity.js +88 -0
- package/node_modules/@openclaw/fs-safe/dist/string-coerce.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/string-coerce.js +16 -0
- package/node_modules/@openclaw/fs-safe/dist/suppressed-error.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/suppressed-error.js +15 -0
- package/node_modules/@openclaw/fs-safe/dist/symlink-parents.d.ts +11 -0
- package/node_modules/@openclaw/fs-safe/dist/symlink-parents.js +58 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-cleanup.d.ts +13 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-cleanup.js +88 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-target.d.ts +31 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-target.js +238 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-admission.d.ts +14 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-admission.js +392 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-child-admission.d.ts +23 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-child-admission.js +151 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-descriptor.d.ts +42 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-descriptor.js +342 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-owner.d.ts +24 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-owner.js +403 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-types.d.ts +39 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-types.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/temp.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/temp.js +2 -0
- package/node_modules/@openclaw/fs-safe/dist/test-hooks.d.ts +31 -0
- package/node_modules/@openclaw/fs-safe/dist/test-hooks.js +13 -0
- package/node_modules/@openclaw/fs-safe/dist/text-atomic.d.ts +13 -0
- package/node_modules/@openclaw/fs-safe/dist/text-atomic.js +16 -0
- package/node_modules/@openclaw/fs-safe/dist/timing.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/timing.js +59 -0
- package/node_modules/@openclaw/fs-safe/dist/trash.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/trash.js +219 -0
- package/node_modules/@openclaw/fs-safe/dist/types.d.ts +22 -0
- package/node_modules/@openclaw/fs-safe/dist/types.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/unicode-path.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/unicode-path.js +16 -0
- package/node_modules/@openclaw/fs-safe/dist/walk.d.ts +40 -0
- package/node_modules/@openclaw/fs-safe/dist/walk.js +207 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-command.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-command.js +34 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-owner.d.ts +28 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-owner.js +101 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-path-alias.d.ts +39 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-path-alias.js +122 -0
- 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 +15 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-security-command.d.ts +25 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-security-command.js +363 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-security-facts.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-security-facts.js +108 -0
- package/node_modules/@openclaw/fs-safe/dist/write-file-handle.d.ts +13 -0
- package/node_modules/@openclaw/fs-safe/dist/write-file-handle.js +49 -0
- package/node_modules/@openclaw/fs-safe/dist/write-open-flags.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/write-open-flags.js +27 -0
- package/node_modules/@openclaw/fs-safe/dist/write-queue.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/write-queue.js +15 -0
- package/node_modules/@openclaw/fs-safe/docs/advanced.md +269 -0
- package/node_modules/@openclaw/fs-safe/docs/archive.md +843 -0
- package/node_modules/@openclaw/fs-safe/docs/assets/readme-banner.jpg +0 -0
- package/node_modules/@openclaw/fs-safe/docs/atomic.md +521 -0
- package/node_modules/@openclaw/fs-safe/docs/config.md +136 -0
- package/node_modules/@openclaw/fs-safe/docs/contributing.md +262 -0
- package/node_modules/@openclaw/fs-safe/docs/copy.md +197 -0
- package/node_modules/@openclaw/fs-safe/docs/creation.md +132 -0
- package/node_modules/@openclaw/fs-safe/docs/directory-identity.md +85 -0
- package/node_modules/@openclaw/fs-safe/docs/durability.md +438 -0
- package/node_modules/@openclaw/fs-safe/docs/entries.md +109 -0
- package/node_modules/@openclaw/fs-safe/docs/errors.md +240 -0
- package/node_modules/@openclaw/fs-safe/docs/file-contents.md +68 -0
- package/node_modules/@openclaw/fs-safe/docs/file-store.md +364 -0
- package/node_modules/@openclaw/fs-safe/docs/filename.md +110 -0
- package/node_modules/@openclaw/fs-safe/docs/guest.md +146 -0
- package/node_modules/@openclaw/fs-safe/docs/in-place-write.md +81 -0
- package/node_modules/@openclaw/fs-safe/docs/index.md +86 -0
- package/node_modules/@openclaw/fs-safe/docs/install-path.md +216 -0
- package/node_modules/@openclaw/fs-safe/docs/install.md +222 -0
- package/node_modules/@openclaw/fs-safe/docs/json-store.md +240 -0
- package/node_modules/@openclaw/fs-safe/docs/json.md +225 -0
- package/node_modules/@openclaw/fs-safe/docs/local-roots.md +150 -0
- package/node_modules/@openclaw/fs-safe/docs/migrating-to-0.5.md +205 -0
- package/node_modules/@openclaw/fs-safe/docs/migrating-to-0.6.md +48 -0
- package/node_modules/@openclaw/fs-safe/docs/mutation-policy-proof.md +69 -0
- package/node_modules/@openclaw/fs-safe/docs/native-helper.md +177 -0
- package/node_modules/@openclaw/fs-safe/docs/native.md +289 -0
- package/node_modules/@openclaw/fs-safe/docs/output.md +193 -0
- package/node_modules/@openclaw/fs-safe/docs/path-case.md +64 -0
- package/node_modules/@openclaw/fs-safe/docs/path-prefix.md +74 -0
- package/node_modules/@openclaw/fs-safe/docs/path-scope.md +159 -0
- package/node_modules/@openclaw/fs-safe/docs/path-suffix-aliases.md +204 -0
- package/node_modules/@openclaw/fs-safe/docs/path.md +219 -0
- package/node_modules/@openclaw/fs-safe/docs/permissions.md +286 -0
- package/node_modules/@openclaw/fs-safe/docs/positional-read.md +63 -0
- package/node_modules/@openclaw/fs-safe/docs/private-file-store.md +68 -0
- package/node_modules/@openclaw/fs-safe/docs/public-api.md +161 -0
- package/node_modules/@openclaw/fs-safe/docs/quickstart.md +154 -0
- package/node_modules/@openclaw/fs-safe/docs/reading.md +196 -0
- package/node_modules/@openclaw/fs-safe/docs/regular-file.md +193 -0
- package/node_modules/@openclaw/fs-safe/docs/root.md +545 -0
- package/node_modules/@openclaw/fs-safe/docs/secret-file.md +299 -0
- package/node_modules/@openclaw/fs-safe/docs/secure-file.md +112 -0
- package/node_modules/@openclaw/fs-safe/docs/security-model.md +269 -0
- package/node_modules/@openclaw/fs-safe/docs/sidecar-lock.md +595 -0
- package/node_modules/@openclaw/fs-safe/docs/staged-file.md +192 -0
- package/node_modules/@openclaw/fs-safe/docs/store.md +127 -0
- package/node_modules/@openclaw/fs-safe/docs/temp.md +760 -0
- package/node_modules/@openclaw/fs-safe/docs/test-hooks.md +110 -0
- package/node_modules/@openclaw/fs-safe/docs/testing.md +189 -0
- package/node_modules/@openclaw/fs-safe/docs/timing.md +123 -0
- package/node_modules/@openclaw/fs-safe/docs/types.md +211 -0
- package/node_modules/@openclaw/fs-safe/docs/walk.md +250 -0
- package/node_modules/@openclaw/fs-safe/docs/writing.md +641 -0
- package/node_modules/@openclaw/fs-safe/package.json +200 -0
- package/node_modules/@openclaw/fs-safe-darwin-arm64/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-darwin-arm64/package.json +29 -0
- package/node_modules/@openclaw/fs-safe-darwin-x64/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-darwin-x64/package.json +29 -0
- 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 +32 -0
- 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 +32 -0
- 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 +32 -0
- 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 +32 -0
- 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 +29 -0
- package/node_modules/core-util-is/LICENSE +19 -0
- package/node_modules/core-util-is/README.md +3 -0
- package/node_modules/core-util-is/lib/util.js +107 -0
- package/node_modules/core-util-is/package.json +38 -0
- package/node_modules/immediate/LICENSE.txt +20 -0
- package/node_modules/immediate/README.md +93 -0
- package/node_modules/immediate/dist/immediate.js +75 -0
- package/node_modules/immediate/dist/immediate.min.js +1 -0
- package/node_modules/immediate/lib/browser.js +69 -0
- package/node_modules/immediate/lib/index.js +73 -0
- package/node_modules/immediate/package.json +42 -0
- package/node_modules/inherits/LICENSE +16 -0
- package/node_modules/inherits/README.md +42 -0
- package/node_modules/inherits/inherits.js +9 -0
- package/node_modules/inherits/inherits_browser.js +27 -0
- package/node_modules/inherits/package.json +29 -0
- package/node_modules/isarray/.npmignore +1 -0
- package/node_modules/isarray/.travis.yml +4 -0
- package/node_modules/isarray/Makefile +6 -0
- package/node_modules/isarray/README.md +60 -0
- package/node_modules/isarray/component.json +19 -0
- package/node_modules/isarray/index.js +5 -0
- package/node_modules/isarray/package.json +45 -0
- package/node_modules/isarray/test.js +20 -0
- package/node_modules/jszip/.codeclimate.yml +16 -0
- package/node_modules/jszip/.editorconfig +8 -0
- package/node_modules/jszip/.eslintrc.js +43 -0
- package/node_modules/jszip/.github/FUNDING.yml +1 -0
- package/node_modules/jszip/.github/actions/setup/action.yml +23 -0
- package/node_modules/jszip/.github/workflows/benchmark.yml +38 -0
- package/node_modules/jszip/.github/workflows/main.yml +55 -0
- package/node_modules/jszip/CHANGES.md +210 -0
- package/node_modules/jszip/LICENSE.markdown +651 -0
- package/node_modules/jszip/README.markdown +33 -0
- package/node_modules/jszip/dist/jszip.js +11586 -0
- package/node_modules/jszip/dist/jszip.min.js +13 -0
- package/node_modules/jszip/index.d.ts +344 -0
- package/node_modules/jszip/lib/base64.js +106 -0
- package/node_modules/jszip/lib/compressedObject.js +74 -0
- package/node_modules/jszip/lib/compressions.js +14 -0
- package/node_modules/jszip/lib/crc32.js +77 -0
- package/node_modules/jszip/lib/defaults.js +11 -0
- package/node_modules/jszip/lib/external.js +18 -0
- package/node_modules/jszip/lib/flate.js +85 -0
- package/node_modules/jszip/lib/generate/ZipFileWorker.js +539 -0
- package/node_modules/jszip/lib/generate/index.js +57 -0
- package/node_modules/jszip/lib/index.js +55 -0
- package/node_modules/jszip/lib/license_header.js +11 -0
- package/node_modules/jszip/lib/load.js +88 -0
- package/node_modules/jszip/lib/nodejs/NodejsStreamInputAdapter.js +74 -0
- package/node_modules/jszip/lib/nodejs/NodejsStreamOutputAdapter.js +42 -0
- package/node_modules/jszip/lib/nodejsUtils.js +57 -0
- package/node_modules/jszip/lib/object.js +384 -0
- package/node_modules/jszip/lib/readable-stream-browser.js +10 -0
- package/node_modules/jszip/lib/reader/ArrayReader.js +57 -0
- package/node_modules/jszip/lib/reader/DataReader.js +116 -0
- package/node_modules/jszip/lib/reader/NodeBufferReader.js +19 -0
- package/node_modules/jszip/lib/reader/StringReader.js +38 -0
- package/node_modules/jszip/lib/reader/Uint8ArrayReader.js +22 -0
- package/node_modules/jszip/lib/reader/readerFor.js +28 -0
- package/node_modules/jszip/lib/signature.js +7 -0
- package/node_modules/jszip/lib/stream/ConvertWorker.js +26 -0
- package/node_modules/jszip/lib/stream/Crc32Probe.js +24 -0
- package/node_modules/jszip/lib/stream/DataLengthProbe.js +29 -0
- package/node_modules/jszip/lib/stream/DataWorker.js +116 -0
- package/node_modules/jszip/lib/stream/GenericWorker.js +263 -0
- package/node_modules/jszip/lib/stream/StreamHelper.js +214 -0
- package/node_modules/jszip/lib/support.js +38 -0
- package/node_modules/jszip/lib/utf8.js +275 -0
- package/node_modules/jszip/lib/utils.js +510 -0
- package/node_modules/jszip/lib/zipEntries.js +261 -0
- package/node_modules/jszip/lib/zipEntry.js +293 -0
- package/node_modules/jszip/lib/zipObject.js +133 -0
- package/node_modules/jszip/package.json +67 -0
- package/node_modules/jszip/sponsors.md +21 -0
- package/node_modules/jszip/tsconfig.json +101 -0
- package/node_modules/jszip/vendor/FileSaver.js +247 -0
- package/node_modules/lie/README.md +62 -0
- package/node_modules/lie/dist/lie.js +350 -0
- package/node_modules/lie/dist/lie.min.js +1 -0
- package/node_modules/lie/dist/lie.polyfill.js +358 -0
- package/node_modules/lie/dist/lie.polyfill.min.js +1 -0
- package/node_modules/lie/lib/browser.js +273 -0
- package/node_modules/lie/lib/index.js +298 -0
- package/node_modules/lie/license.md +7 -0
- package/node_modules/lie/lie.d.ts +244 -0
- package/node_modules/lie/package.json +69 -0
- package/node_modules/lie/polyfill.js +4 -0
- package/node_modules/pako/CHANGELOG.md +164 -0
- package/node_modules/pako/LICENSE +21 -0
- package/node_modules/pako/README.md +191 -0
- package/node_modules/pako/dist/pako.js +6818 -0
- package/node_modules/pako/dist/pako.min.js +1 -0
- package/node_modules/pako/dist/pako_deflate.js +3997 -0
- package/node_modules/pako/dist/pako_deflate.min.js +1 -0
- package/node_modules/pako/dist/pako_inflate.js +3300 -0
- package/node_modules/pako/dist/pako_inflate.min.js +1 -0
- package/node_modules/pako/index.js +14 -0
- package/node_modules/pako/lib/deflate.js +400 -0
- package/node_modules/pako/lib/inflate.js +423 -0
- package/node_modules/pako/lib/utils/common.js +105 -0
- package/node_modules/pako/lib/utils/strings.js +187 -0
- package/node_modules/pako/lib/zlib/README +59 -0
- package/node_modules/pako/lib/zlib/adler32.js +51 -0
- package/node_modules/pako/lib/zlib/constants.js +68 -0
- package/node_modules/pako/lib/zlib/crc32.js +59 -0
- package/node_modules/pako/lib/zlib/deflate.js +1874 -0
- package/node_modules/pako/lib/zlib/gzheader.js +58 -0
- package/node_modules/pako/lib/zlib/inffast.js +345 -0
- package/node_modules/pako/lib/zlib/inflate.js +1556 -0
- package/node_modules/pako/lib/zlib/inftrees.js +343 -0
- package/node_modules/pako/lib/zlib/messages.js +32 -0
- package/node_modules/pako/lib/zlib/trees.js +1222 -0
- package/node_modules/pako/lib/zlib/zstream.js +47 -0
- package/node_modules/pako/package.json +44 -0
- package/node_modules/process-nextick-args/index.js +45 -0
- package/node_modules/process-nextick-args/license.md +19 -0
- package/node_modules/process-nextick-args/package.json +25 -0
- package/node_modules/process-nextick-args/readme.md +18 -0
- package/node_modules/readable-stream/.travis.yml +34 -0
- package/node_modules/readable-stream/CONTRIBUTING.md +38 -0
- package/node_modules/readable-stream/GOVERNANCE.md +136 -0
- package/node_modules/readable-stream/LICENSE +47 -0
- package/node_modules/readable-stream/README.md +58 -0
- package/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +60 -0
- package/node_modules/readable-stream/duplex-browser.js +1 -0
- package/node_modules/readable-stream/duplex.js +1 -0
- package/node_modules/readable-stream/lib/_stream_duplex.js +131 -0
- package/node_modules/readable-stream/lib/_stream_passthrough.js +47 -0
- package/node_modules/readable-stream/lib/_stream_readable.js +1019 -0
- package/node_modules/readable-stream/lib/_stream_transform.js +214 -0
- package/node_modules/readable-stream/lib/_stream_writable.js +685 -0
- package/node_modules/readable-stream/lib/internal/streams/BufferList.js +78 -0
- package/node_modules/readable-stream/lib/internal/streams/destroy.js +84 -0
- package/node_modules/readable-stream/lib/internal/streams/stream-browser.js +1 -0
- package/node_modules/readable-stream/lib/internal/streams/stream.js +1 -0
- package/node_modules/readable-stream/package.json +52 -0
- package/node_modules/readable-stream/passthrough.js +1 -0
- package/node_modules/readable-stream/readable-browser.js +7 -0
- package/node_modules/readable-stream/readable.js +19 -0
- package/node_modules/readable-stream/transform.js +1 -0
- package/node_modules/readable-stream/writable-browser.js +1 -0
- package/node_modules/readable-stream/writable.js +8 -0
- package/node_modules/safe-buffer/LICENSE +21 -0
- package/node_modules/safe-buffer/README.md +584 -0
- package/node_modules/safe-buffer/index.d.ts +187 -0
- package/node_modules/safe-buffer/index.js +62 -0
- package/node_modules/safe-buffer/package.json +37 -0
- package/node_modules/setimmediate/LICENSE.txt +20 -0
- package/node_modules/setimmediate/package.json +30 -0
- package/node_modules/setimmediate/setImmediate.js +186 -0
- package/node_modules/string_decoder/.travis.yml +50 -0
- package/node_modules/string_decoder/LICENSE +48 -0
- package/node_modules/string_decoder/README.md +47 -0
- package/node_modules/string_decoder/lib/string_decoder.js +296 -0
- package/node_modules/string_decoder/package.json +31 -0
- package/node_modules/util-deprecate/History.md +16 -0
- package/node_modules/util-deprecate/LICENSE +24 -0
- package/node_modules/util-deprecate/README.md +53 -0
- package/node_modules/util-deprecate/browser.js +67 -0
- package/node_modules/util-deprecate/node.js +6 -0
- package/node_modules/util-deprecate/package.json +27 -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 -5
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
import os from "node:os";
|
|
2
|
+
import { getNativeBinding } from "./native.js";
|
|
3
|
+
import { executePermissionCommand } from "./permission-exec.js";
|
|
4
|
+
import { safeStat } from "./permissions.js";
|
|
5
|
+
import { normalizeLowercaseStringOrEmpty } from "./string-coerce.js";
|
|
6
|
+
import { resolveWindowsSystemCommand } from "./windows-command.js";
|
|
7
|
+
import { inspectWindowsOwner } from "./windows-owner.js";
|
|
8
|
+
import { hasWindowsPathAlias } from "./windows-path-alias.js";
|
|
9
|
+
const INHERIT_FLAGS = new Set(["I", "OI", "CI", "IO", "NP"]);
|
|
10
|
+
const WORLD_PRINCIPALS = new Set(["everyone", "users", "builtin\\users", "authenticated users", "nt authority\\authenticated users", "anonymous logon", "nt authority\\anonymous logon", "guests", "builtin\\guests", "interactive", "nt authority\\interactive", "network", "nt authority\\network", "local"]);
|
|
11
|
+
const TRUSTED_BASE = new Set([
|
|
12
|
+
"nt authority\\system",
|
|
13
|
+
"system",
|
|
14
|
+
"builtin\\administrators",
|
|
15
|
+
"creator owner",
|
|
16
|
+
"autorite nt\\système",
|
|
17
|
+
"nt-autorität\\system",
|
|
18
|
+
"autoridad nt\\system",
|
|
19
|
+
"autoridade nt\\system",
|
|
20
|
+
]);
|
|
21
|
+
const WORLD_SUFFIXES = ["\\users", "\\authenticated users"];
|
|
22
|
+
const SID_RE = /^\*?s-\d+-\d+(-\d+)+$/i;
|
|
23
|
+
const TRUSTED_SIDS = new Set([
|
|
24
|
+
"s-1-5-18",
|
|
25
|
+
"s-1-5-32-544",
|
|
26
|
+
"s-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464",
|
|
27
|
+
]);
|
|
28
|
+
const WORLD_SIDS = new Set(["s-1-1-0", "s-1-5-11", "s-1-5-32-545", "s-1-5-7", "s-1-5-32-546", "s-1-5-4", "s-1-2-0", "s-1-5-2"]);
|
|
29
|
+
const STATUS_PREFIXES = [
|
|
30
|
+
"successfully processed",
|
|
31
|
+
"processed",
|
|
32
|
+
"failed processing",
|
|
33
|
+
"no mapping between account names",
|
|
34
|
+
];
|
|
35
|
+
function stripDiacritics(value) {
|
|
36
|
+
return value.normalize("NFD").replace(/[\u0300-\u036f]/g, "");
|
|
37
|
+
}
|
|
38
|
+
const TRUSTED_BASE_ASCII = new Set([...TRUSTED_BASE].map(stripDiacritics));
|
|
39
|
+
const normalize = (value) => normalizeLowercaseStringOrEmpty(value);
|
|
40
|
+
const defaultWindowsUserInfo = () => os.userInfo();
|
|
41
|
+
const defaultPermissionExec = executePermissionCommand;
|
|
42
|
+
function inspectWindowsPermissionsNative(targetPath, unverified) {
|
|
43
|
+
const native = getNativeBinding();
|
|
44
|
+
if (!native)
|
|
45
|
+
return undefined;
|
|
46
|
+
try {
|
|
47
|
+
const facts = native.readOwnerAndDacl(targetPath);
|
|
48
|
+
if (facts.fallbackRequired)
|
|
49
|
+
return undefined;
|
|
50
|
+
return {
|
|
51
|
+
...unverified,
|
|
52
|
+
source: "windows-acl",
|
|
53
|
+
worldWritable: facts.worldWritable,
|
|
54
|
+
groupWritable: facts.groupWritable,
|
|
55
|
+
worldReadable: facts.worldReadable,
|
|
56
|
+
groupReadable: facts.groupReadable,
|
|
57
|
+
ownerSid: facts.ownerSid,
|
|
58
|
+
ownerTrusted: facts.ownerClass !== "foreign",
|
|
59
|
+
aclSummary: `native owner=${facts.ownerClass} world=` +
|
|
60
|
+
`${facts.worldReadable ? "r" : "-"}${facts.worldWritable ? "w" : "-"} ` +
|
|
61
|
+
`group=${facts.groupReadable ? "r" : "-"}${facts.groupWritable ? "w" : "-"}`,
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
catch {
|
|
65
|
+
return undefined;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
export async function inspectWindowsPermissions(targetPath, unverified, opts) {
|
|
69
|
+
if (hasWindowsPathAlias(targetPath, "filesystem", "win32")) {
|
|
70
|
+
return {
|
|
71
|
+
...unverified,
|
|
72
|
+
error: "Path uses a Windows filesystem namespace alias",
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
const native = inspectWindowsPermissionsNative(targetPath, unverified);
|
|
76
|
+
if (native)
|
|
77
|
+
return native;
|
|
78
|
+
const owner = await inspectWindowsOwner({
|
|
79
|
+
targetPath,
|
|
80
|
+
env: opts?.env,
|
|
81
|
+
exec: opts?.exec ?? defaultPermissionExec,
|
|
82
|
+
});
|
|
83
|
+
if (owner.error !== undefined) {
|
|
84
|
+
const error = `Windows owner inspection failed: ${owner.error}`;
|
|
85
|
+
return { ...unverified, ownerError: owner.error, error, errorDetail: owner.errorDetail, errorCause: owner.errorCause };
|
|
86
|
+
}
|
|
87
|
+
const acl = summarizeWindowsOwnerAcl(owner);
|
|
88
|
+
const ownerFields = {
|
|
89
|
+
...(owner.sid ? { ownerSid: owner.sid } : {}),
|
|
90
|
+
...(owner.trusted !== undefined ? { ownerTrusted: owner.trusted } : {}),
|
|
91
|
+
...(owner.error ? { ownerError: owner.error } : {}),
|
|
92
|
+
};
|
|
93
|
+
if (!acl.ok)
|
|
94
|
+
return { ...unverified, ...ownerFields, error: acl.error, errorDetail: acl.errorDetail, errorCause: acl.errorCause };
|
|
95
|
+
return {
|
|
96
|
+
...unverified,
|
|
97
|
+
source: "windows-acl",
|
|
98
|
+
worldWritable: acl.untrustedWorld.some((entry) => entry.canWrite),
|
|
99
|
+
groupWritable: acl.untrustedGroup.some((entry) => entry.canWrite),
|
|
100
|
+
worldReadable: acl.untrustedWorld.some((entry) => entry.canRead),
|
|
101
|
+
groupReadable: acl.untrustedGroup.some((entry) => entry.canRead),
|
|
102
|
+
...ownerFields,
|
|
103
|
+
aclSummary: formatWindowsAclSummary(acl),
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
function normalizeSid(value) {
|
|
107
|
+
const normalized = normalize(value);
|
|
108
|
+
return normalized.startsWith("*") ? normalized.slice(1) : normalized;
|
|
109
|
+
}
|
|
110
|
+
export function resolveWindowsUserPrincipal(env, userInfo = defaultWindowsUserInfo) {
|
|
111
|
+
const username = env?.USERNAME?.trim() || userInfo().username?.trim();
|
|
112
|
+
if (!username)
|
|
113
|
+
return null;
|
|
114
|
+
const domain = env?.USERDOMAIN?.trim();
|
|
115
|
+
return domain ? `${domain}\\${username}` : username;
|
|
116
|
+
}
|
|
117
|
+
function buildTrustedSidPrincipals(env) {
|
|
118
|
+
const trusted = new Set();
|
|
119
|
+
const userSid = normalizeSid(env?.USERSID ?? "");
|
|
120
|
+
if (userSid && SID_RE.test(userSid) && !WORLD_SIDS.has(userSid))
|
|
121
|
+
trusted.add(userSid);
|
|
122
|
+
return trusted;
|
|
123
|
+
}
|
|
124
|
+
function buildTrustedPrincipals(env) {
|
|
125
|
+
const trusted = new Set([
|
|
126
|
+
...TRUSTED_BASE,
|
|
127
|
+
...buildTrustedSidPrincipals(env),
|
|
128
|
+
]);
|
|
129
|
+
const principal = resolveWindowsUserPrincipal(env);
|
|
130
|
+
if (principal) {
|
|
131
|
+
trusted.add(normalize(principal));
|
|
132
|
+
const userOnly = principal.split("\\").at(-1);
|
|
133
|
+
if (userOnly)
|
|
134
|
+
trusted.add(normalize(userOnly));
|
|
135
|
+
}
|
|
136
|
+
return trusted;
|
|
137
|
+
}
|
|
138
|
+
function classifyPrincipal(principal, trustedPrincipals) {
|
|
139
|
+
const normalized = normalize(principal);
|
|
140
|
+
if (SID_RE.test(normalized)) {
|
|
141
|
+
const sid = normalizeSid(normalized);
|
|
142
|
+
if (WORLD_SIDS.has(sid))
|
|
143
|
+
return "world";
|
|
144
|
+
if (TRUSTED_SIDS.has(sid) || trustedPrincipals.has(sid))
|
|
145
|
+
return "trusted";
|
|
146
|
+
return "group";
|
|
147
|
+
}
|
|
148
|
+
if (trustedPrincipals.has(normalized) || TRUSTED_BASE.has(normalized))
|
|
149
|
+
return "trusted";
|
|
150
|
+
if (WORLD_PRINCIPALS.has(normalized) || WORLD_SUFFIXES.some((suffix) => normalized.endsWith(suffix)))
|
|
151
|
+
return "world";
|
|
152
|
+
const stripped = stripDiacritics(normalized);
|
|
153
|
+
return stripped !== normalized && TRUSTED_BASE_ASCII.has(stripped) ? "trusted" : "group";
|
|
154
|
+
}
|
|
155
|
+
function rightsFromTokens(tokens) {
|
|
156
|
+
const upper = tokens.join("").toUpperCase();
|
|
157
|
+
return {
|
|
158
|
+
canWrite: upper.includes("F") || upper.includes("M") || upper.includes("W") || upper.includes("D"),
|
|
159
|
+
canRead: upper.includes("F") || upper.includes("M") || upper.includes("R"),
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
function stripTargetPrefix(params) {
|
|
163
|
+
if (params.lowerLine.startsWith(params.lowerTarget))
|
|
164
|
+
return params.trimmedLine.slice(params.normalizedTarget.length).trim();
|
|
165
|
+
if (params.lowerLine.startsWith(params.quotedLower))
|
|
166
|
+
return params.trimmedLine.slice(params.quotedTarget.length).trim();
|
|
167
|
+
return params.trimmedLine;
|
|
168
|
+
}
|
|
169
|
+
function parseAceEntry(entry) {
|
|
170
|
+
if (!entry.includes("("))
|
|
171
|
+
return null;
|
|
172
|
+
const idx = entry.indexOf(":");
|
|
173
|
+
if (idx === -1)
|
|
174
|
+
return null;
|
|
175
|
+
const principal = entry.slice(0, idx).trim();
|
|
176
|
+
const rawRights = entry.slice(idx + 1).trim();
|
|
177
|
+
const tokens = rawRights.match(/\(([^)]+)\)/g)?.map((token) => token.slice(1, -1).trim()).filter(Boolean) ?? [];
|
|
178
|
+
if (tokens.some((token) => token.toUpperCase() === "DENY"))
|
|
179
|
+
return null;
|
|
180
|
+
const rights = tokens.filter((token) => !INHERIT_FLAGS.has(token.toUpperCase()));
|
|
181
|
+
if (rights.length === 0)
|
|
182
|
+
return null;
|
|
183
|
+
const normalizedPrincipal = normalizeSid(principal);
|
|
184
|
+
return { principal, ...(SID_RE.test(normalizedPrincipal) ? { sid: normalizedPrincipal } : {}), rights, rawRights, ...rightsFromTokens(rights) };
|
|
185
|
+
}
|
|
186
|
+
export function parseIcaclsOutput(output, targetPath) {
|
|
187
|
+
const entries = [];
|
|
188
|
+
const normalizedTarget = targetPath.trim();
|
|
189
|
+
const lowerTarget = normalizedTarget.toLowerCase();
|
|
190
|
+
const quotedTarget = `"${normalizedTarget}"`;
|
|
191
|
+
const quotedLower = quotedTarget.toLowerCase();
|
|
192
|
+
for (const rawLine of output.split(/\r?\n/)) {
|
|
193
|
+
const line = rawLine.trimEnd();
|
|
194
|
+
if (!line.trim())
|
|
195
|
+
continue;
|
|
196
|
+
const trimmed = line.trim();
|
|
197
|
+
const lowerLine = trimmed.toLowerCase();
|
|
198
|
+
if (STATUS_PREFIXES.some((prefix) => lowerLine.startsWith(prefix)))
|
|
199
|
+
continue;
|
|
200
|
+
const parsed = parseAceEntry(stripTargetPrefix({ trimmedLine: trimmed, lowerLine, normalizedTarget, lowerTarget, quotedTarget, quotedLower }));
|
|
201
|
+
if (parsed)
|
|
202
|
+
entries.push(parsed);
|
|
203
|
+
}
|
|
204
|
+
return entries;
|
|
205
|
+
}
|
|
206
|
+
export function summarizeWindowsAcl(entries, env) {
|
|
207
|
+
// Canonical SID entries cannot match account names. Classify them directly
|
|
208
|
+
// so structured descriptor facts do not depend on a separate user lookup.
|
|
209
|
+
const trustedPrincipals = entries.every((entry) => SID_RE.test(normalize(entry.sid ?? entry.principal)))
|
|
210
|
+
? buildTrustedSidPrincipals(env)
|
|
211
|
+
: buildTrustedPrincipals(env);
|
|
212
|
+
const trusted = [];
|
|
213
|
+
const untrustedWorld = [];
|
|
214
|
+
const untrustedGroup = [];
|
|
215
|
+
for (const entry of entries) {
|
|
216
|
+
const classification = classifyPrincipal(entry.sid ?? entry.principal, trustedPrincipals);
|
|
217
|
+
if (classification === "trusted")
|
|
218
|
+
trusted.push(entry);
|
|
219
|
+
else if (classification === "world")
|
|
220
|
+
untrustedWorld.push(entry);
|
|
221
|
+
else
|
|
222
|
+
untrustedGroup.push(entry);
|
|
223
|
+
}
|
|
224
|
+
return { trusted, untrustedWorld, untrustedGroup };
|
|
225
|
+
}
|
|
226
|
+
const MASK_RIGHTS = [
|
|
227
|
+
[0x1000_0000, "GA"], [0x8000_0000, "GR"], [0x4000_0000, "GW"], [0x2000_0000, "GE"],
|
|
228
|
+
[0x0001_0000, "D"], [0x0002_0000, "RC"], [0x0004_0000, "WDAC"], [0x0008_0000, "WO"],
|
|
229
|
+
[0x0010_0000, "S"], [0x0001, "RD"], [0x0002, "WD"], [0x0004, "AD"],
|
|
230
|
+
[0x0008, "REA"], [0x0010, "WEA"], [0x0020, "X"], [0x0040, "DC"], [0x0080, "RA"], [0x0100, "WA"],
|
|
231
|
+
];
|
|
232
|
+
function summarizeWindowsOwnerAcl(owner) {
|
|
233
|
+
const error = owner.error ?? owner.aclError;
|
|
234
|
+
if (error || owner.daclPresent === undefined || !owner.aces || !owner.currentUserSid) {
|
|
235
|
+
return {
|
|
236
|
+
ok: false, entries: [], trusted: [], untrustedWorld: [], untrustedGroup: [],
|
|
237
|
+
error: error ?? "Windows ACL query returned incomplete descriptor data",
|
|
238
|
+
errorDetail: owner.errorDetail, errorCause: owner.errorCause,
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
// A null DACL grants everyone full access; an empty DACL grants nothing.
|
|
242
|
+
const grants = owner.daclPresent ? owner.aces : [{ sid: "s-1-1-0", mask: 0x001f_01ff, deny: false, inheritOnly: false }];
|
|
243
|
+
const entries = grants.filter(ace => !ace.deny && !ace.inheritOnly).map(ace => {
|
|
244
|
+
const rights = ace.mask === 0x001f_01ff ? ["F"] : MASK_RIGHTS.filter(([mask]) => (ace.mask & mask) !== 0).map(([, name]) => name);
|
|
245
|
+
return {
|
|
246
|
+
principal: ace.sid, sid: ace.sid, rights, rawRights: "(" + rights.join(",") + ")",
|
|
247
|
+
// Retain the coarse policy's conservative treatment of read-control and
|
|
248
|
+
// mutation rights. Denies do not subtract grants or claim effective access.
|
|
249
|
+
canRead: (ace.mask & 0x9002_0089) !== 0,
|
|
250
|
+
canWrite: (ace.mask & 0x500d_0156) !== 0,
|
|
251
|
+
};
|
|
252
|
+
});
|
|
253
|
+
return { ok: true, entries, ...summarizeWindowsAcl(entries, { USERSID: owner.currentUserSid }) };
|
|
254
|
+
}
|
|
255
|
+
export async function inspectWindowsAcl(targetPath, opts) {
|
|
256
|
+
if (opts?.principalTranslationFailed) {
|
|
257
|
+
const error = new Error("Windows ACL principal SID translation failed");
|
|
258
|
+
return summarizeWindowsOwnerAcl({ error: String(error), errorCause: error });
|
|
259
|
+
}
|
|
260
|
+
if (hasWindowsPathAlias(targetPath, "filesystem", "win32")) {
|
|
261
|
+
const error = new Error("Path uses a Windows filesystem namespace alias");
|
|
262
|
+
return summarizeWindowsOwnerAcl({ error: String(error), errorCause: error });
|
|
263
|
+
}
|
|
264
|
+
let owner;
|
|
265
|
+
if (process.platform === "win32" && opts?.env === undefined && opts?.exec === undefined) {
|
|
266
|
+
try {
|
|
267
|
+
const native = getNativeBinding();
|
|
268
|
+
const stat = native && await safeStat(targetPath);
|
|
269
|
+
// Keep the named-query behavior for leaf links; the native reader follows them.
|
|
270
|
+
const facts = stat?.ok && !stat.isSymlink ? native?.readOwnerAndDacl(targetPath) : undefined;
|
|
271
|
+
if (facts && !facts.fallbackRequired && facts.isLocal && facts.aceListComplete && facts.unsupportedAceTypes.length === 0 &&
|
|
272
|
+
facts.aces.every(ace => ace.flags.inherited && ace.mask !== 0)) {
|
|
273
|
+
// .NET normalizes explicit ACEs, but retains nonzero inherited ACEs in
|
|
274
|
+
// their original order without merging them. Other forms keep its query.
|
|
275
|
+
// Adapt descriptor facts only: the public summary owns its SID and rights
|
|
276
|
+
// classification, which differs from the native secure-read policy.
|
|
277
|
+
owner = {
|
|
278
|
+
daclPresent: facts.daclPresent,
|
|
279
|
+
currentUserSid: facts.currentUserSid,
|
|
280
|
+
aces: facts.aces.map(ace => ({
|
|
281
|
+
sid: ace.sid,
|
|
282
|
+
mask: ace.mask,
|
|
283
|
+
deny: ace.aceType === "deny",
|
|
284
|
+
inheritOnly: ace.flags.inheritOnly,
|
|
285
|
+
})),
|
|
286
|
+
};
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
catch {
|
|
290
|
+
// Preserve this inspector's structured fallback and command diagnostics
|
|
291
|
+
// when the optional helper or native descriptor query is unavailable.
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
owner ??= await inspectWindowsOwner({ targetPath, env: opts?.env, exec: opts?.exec ?? defaultPermissionExec });
|
|
295
|
+
return summarizeWindowsOwnerAcl({
|
|
296
|
+
...owner,
|
|
297
|
+
currentUserSid: normalizeSid(opts?.currentUserSid ?? "") || owner.currentUserSid,
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
export function formatWindowsAclSummary(summary) {
|
|
301
|
+
if (!summary.ok)
|
|
302
|
+
return "unknown";
|
|
303
|
+
const untrusted = [...summary.untrustedWorld, ...summary.untrustedGroup];
|
|
304
|
+
return untrusted.length === 0 ? "trusted-only" : untrusted.map((entry) => `${entry.principal}:${entry.rawRights}`).join(", ");
|
|
305
|
+
}
|
|
306
|
+
export function formatIcaclsResetCommand(targetPath, opts) {
|
|
307
|
+
const command = resolveWindowsSystemCommand("icacls.exe", opts.env);
|
|
308
|
+
const user = resolveWindowsUserPrincipal(opts.env, opts.userInfo) ?? "%USERNAME%";
|
|
309
|
+
const grant = opts.isDir ? "(OI)(CI)F" : "F";
|
|
310
|
+
return [command, `"${targetPath}"`, "/inheritance:r", "/grant:r", `"${user}:${grant}"`, "/grant:r", `"*S-1-5-18:${grant}"`].join(" ");
|
|
311
|
+
}
|
|
312
|
+
export function createIcaclsResetCommand(targetPath, opts) {
|
|
313
|
+
const user = resolveWindowsUserPrincipal(opts.env, opts.userInfo);
|
|
314
|
+
if (!user)
|
|
315
|
+
return null;
|
|
316
|
+
const grant = opts.isDir ? "(OI)(CI)F" : "F";
|
|
317
|
+
const args = [targetPath, "/inheritance:r", "/grant:r", `${user}:${grant}`, "/grant:r", `*S-1-5-18:${grant}`];
|
|
318
|
+
return { command: resolveWindowsSystemCommand("icacls.exe", opts.env), args, display: formatIcaclsResetCommand(targetPath, opts) };
|
|
319
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { PermissionCommandFailure } from "./permission-exec.js";
|
|
2
|
+
import { type PermissionExec } from "./permissions-windows.js";
|
|
3
|
+
export type { PermissionCommandFailure } from "./permission-exec.js";
|
|
4
|
+
export { createIcaclsResetCommand, formatIcaclsResetCommand, formatWindowsAclSummary, inspectWindowsAcl, parseIcaclsOutput, resolveWindowsUserPrincipal, summarizeWindowsAcl, } from "./permissions-windows.js";
|
|
5
|
+
export type { IcaclsResetCommandOptions, PermissionExec, WindowsAclEntry, WindowsAclSummary, WindowsUserInfoProvider, } from "./permissions-windows.js";
|
|
6
|
+
export type PermissionCheck = {
|
|
7
|
+
ok: boolean;
|
|
8
|
+
isSymlink: boolean;
|
|
9
|
+
isDir: boolean;
|
|
10
|
+
mode: number | null;
|
|
11
|
+
bits: number | null;
|
|
12
|
+
source: "posix" | "windows-acl" | "unknown";
|
|
13
|
+
worldWritable: boolean;
|
|
14
|
+
groupWritable: boolean;
|
|
15
|
+
worldReadable: boolean;
|
|
16
|
+
groupReadable: boolean;
|
|
17
|
+
/** Canonical Windows owner SID when the owner query succeeds. */
|
|
18
|
+
ownerSid?: string;
|
|
19
|
+
/** Whether the Windows owner is the current user, LocalSystem, or Administrators. */
|
|
20
|
+
ownerTrusted?: boolean;
|
|
21
|
+
/** Owner-query failure detail when Windows ownership could not be verified. */
|
|
22
|
+
ownerError?: string;
|
|
23
|
+
aclSummary?: string;
|
|
24
|
+
error?: string;
|
|
25
|
+
errorDetail?: PermissionCommandFailure;
|
|
26
|
+
/** Original inspection failure, retained separately from serializable diagnostics. */
|
|
27
|
+
errorCause?: unknown;
|
|
28
|
+
};
|
|
29
|
+
export type PermissionCheckOptions = {
|
|
30
|
+
platform?: NodeJS.Platform;
|
|
31
|
+
env?: NodeJS.ProcessEnv;
|
|
32
|
+
exec?: PermissionExec;
|
|
33
|
+
};
|
|
34
|
+
export type SafeStatResult = {
|
|
35
|
+
ok: boolean;
|
|
36
|
+
isSymlink: boolean;
|
|
37
|
+
isDir: boolean;
|
|
38
|
+
mode: number | null;
|
|
39
|
+
uid: number | null;
|
|
40
|
+
gid: number | null;
|
|
41
|
+
error?: string;
|
|
42
|
+
};
|
|
43
|
+
export declare function safeStat(targetPath: string): Promise<SafeStatResult>;
|
|
44
|
+
export declare function inspectPathPermissions(targetPath: string, opts?: PermissionCheckOptions): Promise<PermissionCheck>;
|
|
45
|
+
export declare function formatPermissionDetail(targetPath: string, perms: PermissionCheck): string;
|
|
46
|
+
export declare function formatPermissionRemediation(params: {
|
|
47
|
+
targetPath: string;
|
|
48
|
+
perms: PermissionCheck;
|
|
49
|
+
isDir: boolean;
|
|
50
|
+
posixMode: number;
|
|
51
|
+
env?: NodeJS.ProcessEnv;
|
|
52
|
+
}): string;
|
|
53
|
+
export declare function modeBits(mode: number | null): number | null;
|
|
54
|
+
export declare function formatOctal(bits: number | null): string;
|
|
55
|
+
export declare function isWorldWritable(bits: number | null): boolean;
|
|
56
|
+
export declare function isGroupWritable(bits: number | null): boolean;
|
|
57
|
+
export declare function isWorldReadable(bits: number | null): boolean;
|
|
58
|
+
export declare function isGroupReadable(bits: number | null): boolean;
|
|
59
|
+
export declare function formatPosixMode(mode: number): string;
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import fsSync from "node:fs";
|
|
2
|
+
import { formatIcaclsResetCommand, inspectWindowsPermissions, } from "./permissions-windows.js";
|
|
3
|
+
import { hasWindowsPathAlias, pathForWindowsFilesystem, } from "./windows-path-alias.js";
|
|
4
|
+
export { createIcaclsResetCommand, formatIcaclsResetCommand, formatWindowsAclSummary, inspectWindowsAcl, parseIcaclsOutput, resolveWindowsUserPrincipal, summarizeWindowsAcl, } from "./permissions-windows.js";
|
|
5
|
+
function failedSafeStat(error) {
|
|
6
|
+
return {
|
|
7
|
+
ok: false,
|
|
8
|
+
isSymlink: false,
|
|
9
|
+
isDir: false,
|
|
10
|
+
mode: null,
|
|
11
|
+
uid: null,
|
|
12
|
+
gid: null,
|
|
13
|
+
error,
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
async function safeStatAdmitted(targetPath) {
|
|
17
|
+
try {
|
|
18
|
+
const lst = fsSync.lstatSync(pathForWindowsFilesystem(targetPath));
|
|
19
|
+
return {
|
|
20
|
+
ok: true,
|
|
21
|
+
isSymlink: lst.isSymbolicLink(),
|
|
22
|
+
isDir: lst.isDirectory(),
|
|
23
|
+
mode: typeof lst.mode === "number" ? lst.mode : null,
|
|
24
|
+
uid: typeof lst.uid === "number" ? lst.uid : null,
|
|
25
|
+
gid: typeof lst.gid === "number" ? lst.gid : null,
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
catch (err) {
|
|
29
|
+
return failedSafeStat(String(err));
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
export async function safeStat(targetPath) {
|
|
33
|
+
if (hasWindowsPathAlias(targetPath, "filesystem")) {
|
|
34
|
+
return failedSafeStat("Path uses a Windows filesystem namespace alias");
|
|
35
|
+
}
|
|
36
|
+
return await safeStatAdmitted(targetPath);
|
|
37
|
+
}
|
|
38
|
+
export async function inspectPathPermissions(targetPath, opts) {
|
|
39
|
+
const admissionPlatform = process.platform === "win32"
|
|
40
|
+
? process.platform
|
|
41
|
+
: (opts?.platform ?? process.platform);
|
|
42
|
+
const st = hasWindowsPathAlias(targetPath, "filesystem", admissionPlatform)
|
|
43
|
+
? failedSafeStat("Path uses a Windows filesystem namespace alias")
|
|
44
|
+
: await safeStatAdmitted(targetPath);
|
|
45
|
+
if (!st.ok) {
|
|
46
|
+
return {
|
|
47
|
+
ok: false,
|
|
48
|
+
isSymlink: false,
|
|
49
|
+
isDir: false,
|
|
50
|
+
mode: null,
|
|
51
|
+
bits: null,
|
|
52
|
+
source: "unknown",
|
|
53
|
+
worldWritable: false,
|
|
54
|
+
groupWritable: false,
|
|
55
|
+
worldReadable: false,
|
|
56
|
+
groupReadable: false,
|
|
57
|
+
error: st.error,
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
let effectiveMode = st.mode;
|
|
61
|
+
let effectiveIsDir = st.isDir;
|
|
62
|
+
if (st.isSymlink) {
|
|
63
|
+
try {
|
|
64
|
+
const target = fsSync.statSync(targetPath);
|
|
65
|
+
effectiveMode = typeof target.mode === "number" ? target.mode : st.mode;
|
|
66
|
+
effectiveIsDir = target.isDirectory();
|
|
67
|
+
}
|
|
68
|
+
catch {
|
|
69
|
+
// Keep lstat metadata when the symlink target cannot be inspected.
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
const bits = modeBits(effectiveMode);
|
|
73
|
+
const platform = opts?.platform ?? process.platform;
|
|
74
|
+
const windows = platform === "win32";
|
|
75
|
+
const permissions = {
|
|
76
|
+
ok: true,
|
|
77
|
+
isSymlink: st.isSymlink,
|
|
78
|
+
isDir: effectiveIsDir,
|
|
79
|
+
mode: effectiveMode,
|
|
80
|
+
bits,
|
|
81
|
+
source: windows ? "unknown" : "posix",
|
|
82
|
+
worldWritable: !windows && isWorldWritable(bits),
|
|
83
|
+
groupWritable: !windows && isGroupWritable(bits),
|
|
84
|
+
worldReadable: !windows && isWorldReadable(bits),
|
|
85
|
+
groupReadable: !windows && isGroupReadable(bits),
|
|
86
|
+
};
|
|
87
|
+
return windows ? await inspectWindowsPermissions(targetPath, permissions, opts) : permissions;
|
|
88
|
+
}
|
|
89
|
+
export function formatPermissionDetail(targetPath, perms) {
|
|
90
|
+
if (perms.source === "windows-acl") {
|
|
91
|
+
return `${targetPath} acl=${perms.aclSummary ?? "unknown"}`;
|
|
92
|
+
}
|
|
93
|
+
return `${targetPath} mode=${formatOctal(perms.bits)}`;
|
|
94
|
+
}
|
|
95
|
+
export function formatPermissionRemediation(params) {
|
|
96
|
+
if (params.perms.source === "windows-acl") {
|
|
97
|
+
return formatIcaclsResetCommand(params.targetPath, {
|
|
98
|
+
isDir: params.isDir,
|
|
99
|
+
env: params.env,
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
const optionSeparator = params.targetPath.startsWith("-") ? "-- " : "";
|
|
103
|
+
return (`chmod ${params.posixMode.toString(8).padStart(3, "0")} ${optionSeparator}` +
|
|
104
|
+
formatPosixShellArgument(params.targetPath));
|
|
105
|
+
}
|
|
106
|
+
function formatPosixShellArgument(value) {
|
|
107
|
+
if (value && /^[A-Za-z0-9_@%+=:,./-]+$/.test(value)) {
|
|
108
|
+
return value;
|
|
109
|
+
}
|
|
110
|
+
return `'${value.replaceAll("'", `'\\''`)}'`;
|
|
111
|
+
}
|
|
112
|
+
export function modeBits(mode) {
|
|
113
|
+
return mode == null ? null : mode & 0o777;
|
|
114
|
+
}
|
|
115
|
+
export function formatOctal(bits) {
|
|
116
|
+
return bits == null ? "unknown" : bits.toString(8).padStart(3, "0");
|
|
117
|
+
}
|
|
118
|
+
export function isWorldWritable(bits) {
|
|
119
|
+
return bits != null && (bits & 0o002) !== 0;
|
|
120
|
+
}
|
|
121
|
+
export function isGroupWritable(bits) {
|
|
122
|
+
return bits != null && (bits & 0o020) !== 0;
|
|
123
|
+
}
|
|
124
|
+
export function isWorldReadable(bits) {
|
|
125
|
+
return bits != null && (bits & 0o004) !== 0;
|
|
126
|
+
}
|
|
127
|
+
export function isGroupReadable(bits) {
|
|
128
|
+
return bits != null && (bits & 0o040) !== 0;
|
|
129
|
+
}
|
|
130
|
+
export function formatPosixMode(mode) {
|
|
131
|
+
return (mode & 0o777).toString(8).padStart(3, "0");
|
|
132
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type DenyMutationPolicy } from "./deny-mutations.js";
|
|
2
|
+
import { type RootBoundaryIdentity } from "./root-boundary.js";
|
|
3
|
+
import type { PinnedWriteMutationAdmission } from "./pinned-write-types.js";
|
|
4
|
+
import type { MutationSymlinkPolicy } from "./root-symlink-policy.js";
|
|
5
|
+
export type PinnedMutationPolicySnapshot = Readonly<{
|
|
6
|
+
denyMutations?: DenyMutationPolicy;
|
|
7
|
+
mutationSymlinks?: MutationSymlinkPolicy;
|
|
8
|
+
}>;
|
|
9
|
+
export declare function snapshotPinnedMutationPolicy(denyMutations: DenyMutationPolicy | undefined, mutationSymlinks: MutationSymlinkPolicy | undefined): PinnedMutationPolicySnapshot | undefined;
|
|
10
|
+
export declare function preparePinnedWriteMutationAdmission(params: {
|
|
11
|
+
rootReal: string;
|
|
12
|
+
rootWithSep: string;
|
|
13
|
+
rootIdentity?: RootBoundaryIdentity;
|
|
14
|
+
resolvedTargetPath: string;
|
|
15
|
+
defaultRelativeParentPath: string;
|
|
16
|
+
originalPath?: string;
|
|
17
|
+
policy: PinnedMutationPolicySnapshot | undefined;
|
|
18
|
+
resolveCurrent(): Promise<{
|
|
19
|
+
resolved: string;
|
|
20
|
+
}>;
|
|
21
|
+
}): Promise<{
|
|
22
|
+
relativeParentPath: string;
|
|
23
|
+
mutationAdmission?: PinnedWriteMutationAdmission;
|
|
24
|
+
}>;
|