@openclaw/openshell-sandbox 2026.9.1 → 2026.9.3
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/index.js +87 -47
- package/node_modules/@openclaw/fs-safe/CHANGELOG.md +700 -0
- package/node_modules/@openclaw/fs-safe/LICENSE +21 -0
- package/node_modules/@openclaw/fs-safe/README.md +564 -0
- package/node_modules/@openclaw/fs-safe/SECURITY.md +45 -0
- package/node_modules/@openclaw/fs-safe/dist/absolute-path.d.ts +33 -0
- package/node_modules/@openclaw/fs-safe/dist/absolute-path.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/absolute-path.js +307 -0
- package/node_modules/@openclaw/fs-safe/dist/advanced.d.ts +26 -0
- package/node_modules/@openclaw/fs-safe/dist/advanced.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/advanced.js +28 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-crc32.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-crc32.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-crc32.js +14 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-deadline.d.ts +12 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-deadline.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-deadline.js +103 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-entry.d.ts +14 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-entry.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-entry.js +85 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-errors.d.ts +13 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-errors.d.ts.map +1 -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 +18 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-gzip-tail.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-gzip-tail.js +74 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-input.d.ts +19 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-input.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-input.js +92 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-kind.d.ts +9 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-kind.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-kind.js +82 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-limits.d.ts +57 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-limits.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-limits.js +131 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-merge.d.ts +18 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-merge.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-merge.js +157 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-native.d.ts +20 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-native.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-native.js +107 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-options.d.ts +21 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-options.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-options.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-parser-errors.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-parser-errors.d.ts.map +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 +20 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-plan.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-plan.js +55 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-policy.d.ts +22 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-policy.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-policy.js +38 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-read.d.ts +6 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-read.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-read.js +225 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-staging.d.ts +31 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-staging.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-staging.js +250 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-inspect.d.ts +7 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-inspect.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-inspect.js +59 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-stream.d.ts +18 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-stream.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-stream.js +95 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-wasm.d.ts +18 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-wasm.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-wasm.js +99 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-tar.d.ts +19 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-tar.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-tar.js +21 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-admission.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-admission.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-admission.js +60 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-count.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-count.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-count.js +140 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-directory.d.ts +15 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-directory.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-directory.js +228 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-entry.d.ts +21 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-entry.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-entry.js +27 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-integrity.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-integrity.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-integrity.js +41 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-names.d.ts +12 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-names.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-names.js +100 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-preflight.d.ts +7 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-preflight.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-preflight.js +44 -0
- package/node_modules/@openclaw/fs-safe/dist/archive.d.ts +15 -0
- package/node_modules/@openclaw/fs-safe/dist/archive.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive.js +275 -0
- package/node_modules/@openclaw/fs-safe/dist/async-lock.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/async-lock.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/async-lock.js +17 -0
- package/node_modules/@openclaw/fs-safe/dist/atomic.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/atomic.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/atomic.js +4 -0
- package/node_modules/@openclaw/fs-safe/dist/bounded-read-stream.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/bounded-read-stream.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/bounded-read-stream.js +21 -0
- package/node_modules/@openclaw/fs-safe/dist/bounded-read.d.ts +14 -0
- package/node_modules/@openclaw/fs-safe/dist/bounded-read.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/bounded-read.js +106 -0
- package/node_modules/@openclaw/fs-safe/dist/byte-budget.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/byte-budget.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/byte-budget.js +9 -0
- package/node_modules/@openclaw/fs-safe/dist/config.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/config.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/config.js +2 -0
- package/node_modules/@openclaw/fs-safe/dist/containment.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/containment.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/containment.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/deny-mutations.d.ts +12 -0
- package/node_modules/@openclaw/fs-safe/dist/deny-mutations.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/deny-mutations.js +69 -0
- package/node_modules/@openclaw/fs-safe/dist/device-path.d.ts +15 -0
- package/node_modules/@openclaw/fs-safe/dist/device-path.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/device-path.js +137 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-durability.d.ts +44 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-durability.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-durability.js +299 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-guard.d.ts +31 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-guard.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-guard.js +82 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-node.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-node.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-node.js +93 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-owner.d.ts +21 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-owner.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-owner.js +78 -0
- package/node_modules/@openclaw/fs-safe/dist/durability.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/durability.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/durability.js +3 -0
- package/node_modules/@openclaw/fs-safe/dist/error-detail.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/error-detail.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/error-detail.js +10 -0
- package/node_modules/@openclaw/fs-safe/dist/errors.d.ts +14 -0
- package/node_modules/@openclaw/fs-safe/dist/errors.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/errors.js +26 -0
- package/node_modules/@openclaw/fs-safe/dist/file-hash.d.ts +10 -0
- package/node_modules/@openclaw/fs-safe/dist/file-hash.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/file-hash.js +73 -0
- package/node_modules/@openclaw/fs-safe/dist/file-identity.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/file-identity.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/file-identity.js +34 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync.d.ts +35 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync.js +349 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock.d.ts +24 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock.js +46 -0
- package/node_modules/@openclaw/fs-safe/dist/file-observation.d.ts +9 -0
- package/node_modules/@openclaw/fs-safe/dist/file-observation.d.ts.map +1 -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 +33 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-boundary.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-boundary.js +189 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-limit.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-limit.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-limit.js +8 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-prune.d.ts +12 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-prune.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-prune.js +95 -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.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-sync-write.js +127 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store.d.ts +62 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store.js +357 -0
- package/node_modules/@openclaw/fs-safe/dist/file-sync.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/file-sync.d.ts.map +1 -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.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/filename.js +91 -0
- package/node_modules/@openclaw/fs-safe/dist/fs.d.ts +13 -0
- package/node_modules/@openclaw/fs-safe/dist/fs.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/fs.js +30 -0
- package/node_modules/@openclaw/fs-safe/dist/guarded-mkdir.d.ts +14 -0
- package/node_modules/@openclaw/fs-safe/dist/guarded-mkdir.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/guarded-mkdir.js +87 -0
- package/node_modules/@openclaw/fs-safe/dist/guarded-mutation.d.ts +37 -0
- package/node_modules/@openclaw/fs-safe/dist/guarded-mutation.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/guarded-mutation.js +82 -0
- package/node_modules/@openclaw/fs-safe/dist/home-dir.d.ts +12 -0
- package/node_modules/@openclaw/fs-safe/dist/home-dir.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/home-dir.js +84 -0
- package/node_modules/@openclaw/fs-safe/dist/index.d.ts +7 -0
- package/node_modules/@openclaw/fs-safe/dist/index.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/index.js +5 -0
- package/node_modules/@openclaw/fs-safe/dist/install-path.d.ts +20 -0
- package/node_modules/@openclaw/fs-safe/dist/install-path.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/install-path.js +94 -0
- package/node_modules/@openclaw/fs-safe/dist/json-document-store.d.ts +35 -0
- package/node_modules/@openclaw/fs-safe/dist/json-document-store.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/json-document-store.js +97 -0
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-directory.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-directory.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-directory.js +20 -0
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-ownership.d.ts +17 -0
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-ownership.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-ownership.js +292 -0
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue.d.ts +46 -0
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue.js +383 -0
- package/node_modules/@openclaw/fs-safe/dist/json-store.d.ts +9 -0
- package/node_modules/@openclaw/fs-safe/dist/json-store.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/json-store.js +12 -0
- package/node_modules/@openclaw/fs-safe/dist/json-stringify.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/json-stringify.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/json-stringify.js +7 -0
- package/node_modules/@openclaw/fs-safe/dist/json.d.ts +50 -0
- package/node_modules/@openclaw/fs-safe/dist/json.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/json.js +343 -0
- package/node_modules/@openclaw/fs-safe/dist/local-file-access.d.ts +9 -0
- package/node_modules/@openclaw/fs-safe/dist/local-file-access.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/local-file-access.js +87 -0
- package/node_modules/@openclaw/fs-safe/dist/local-roots.d.ts +26 -0
- package/node_modules/@openclaw/fs-safe/dist/local-roots.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/local-roots.js +135 -0
- package/node_modules/@openclaw/fs-safe/dist/lock-config.d.ts +10 -0
- package/node_modules/@openclaw/fs-safe/dist/lock-config.d.ts.map +1 -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 +43 -0
- package/node_modules/@openclaw/fs-safe/dist/move-path-cleanup.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/move-path-cleanup.js +161 -0
- package/node_modules/@openclaw/fs-safe/dist/move-path.d.ts +21 -0
- package/node_modules/@openclaw/fs-safe/dist/move-path.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/move-path.js +334 -0
- package/node_modules/@openclaw/fs-safe/dist/native-binding.d.ts +93 -0
- package/node_modules/@openclaw/fs-safe/dist/native-binding.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/native-binding.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/native-config.d.ts +17 -0
- package/node_modules/@openclaw/fs-safe/dist/native-config.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/native-config.js +71 -0
- package/node_modules/@openclaw/fs-safe/dist/native-operations.d.ts +21 -0
- package/node_modules/@openclaw/fs-safe/dist/native-operations.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/native-operations.js +132 -0
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write-windows.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write-windows.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write-windows.js +96 -0
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write.js +161 -0
- package/node_modules/@openclaw/fs-safe/dist/native-staged-file.d.ts +31 -0
- package/node_modules/@openclaw/fs-safe/dist/native-staged-file.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/native-staged-file.js +362 -0
- package/node_modules/@openclaw/fs-safe/dist/native.d.ts +14 -0
- package/node_modules/@openclaw/fs-safe/dist/native.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/native.js +204 -0
- package/node_modules/@openclaw/fs-safe/dist/opened-file-failure.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/opened-file-failure.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/opened-file-failure.js +45 -0
- package/node_modules/@openclaw/fs-safe/dist/opened-realpath.d.ts +16 -0
- package/node_modules/@openclaw/fs-safe/dist/opened-realpath.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/opened-realpath.js +92 -0
- package/node_modules/@openclaw/fs-safe/dist/output.d.ts +15 -0
- package/node_modules/@openclaw/fs-safe/dist/output.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/output.js +123 -0
- package/node_modules/@openclaw/fs-safe/dist/owner-dacl.d.ts +31 -0
- package/node_modules/@openclaw/fs-safe/dist/owner-dacl.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/owner-dacl.js +28 -0
- package/node_modules/@openclaw/fs-safe/dist/path-policy.d.ts +25 -0
- package/node_modules/@openclaw/fs-safe/dist/path-policy.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/path-policy.js +44 -0
- package/node_modules/@openclaw/fs-safe/dist/path.d.ts +21 -0
- package/node_modules/@openclaw/fs-safe/dist/path.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/path.js +136 -0
- package/node_modules/@openclaw/fs-safe/dist/permission-exec.d.ts +25 -0
- package/node_modules/@openclaw/fs-safe/dist/permission-exec.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/permission-exec.js +74 -0
- package/node_modules/@openclaw/fs-safe/dist/permissions-public.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/permissions-public.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/permissions-public.js +3 -0
- package/node_modules/@openclaw/fs-safe/dist/permissions-windows.d.ts +59 -0
- package/node_modules/@openclaw/fs-safe/dist/permissions-windows.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/permissions-windows.js +296 -0
- package/node_modules/@openclaw/fs-safe/dist/permissions.d.ts +60 -0
- package/node_modules/@openclaw/fs-safe/dist/permissions.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/permissions.js +125 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-open.d.ts +24 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-open.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-open.js +74 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-operation.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-operation.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-operation.js +35 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-write.d.ts +36 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-write.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-write.js +252 -0
- package/node_modules/@openclaw/fs-safe/dist/private-directory.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/private-directory.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/private-directory.js +14 -0
- package/node_modules/@openclaw/fs-safe/dist/private-temp-workspace.d.ts +45 -0
- package/node_modules/@openclaw/fs-safe/dist/private-temp-workspace.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/private-temp-workspace.js +299 -0
- package/node_modules/@openclaw/fs-safe/dist/publish-file-failure.d.ts +28 -0
- package/node_modules/@openclaw/fs-safe/dist/publish-file-failure.d.ts.map +1 -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 +21 -0
- package/node_modules/@openclaw/fs-safe/dist/publish-file.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/publish-file.js +366 -0
- package/node_modules/@openclaw/fs-safe/dist/read-open-flags.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/read-open-flags.d.ts.map +1 -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 +21 -0
- package/node_modules/@openclaw/fs-safe/dist/read-opened-file.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/read-opened-file.js +18 -0
- package/node_modules/@openclaw/fs-safe/dist/regular-file.d.ts +38 -0
- package/node_modules/@openclaw/fs-safe/dist/regular-file.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/regular-file.js +391 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-directory.d.ts +7 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-directory.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-directory.js +42 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-fallback.d.ts +39 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-fallback.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-fallback.js +331 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-source.d.ts +21 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-source.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-source.js +107 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-descriptor.d.ts +51 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-descriptor.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-descriptor.js +161 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-rename-policy.d.ts +7 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-rename-policy.d.ts.map +1 -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 +53 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-temp-owner.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-temp-owner.js +376 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file.d.ts +58 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file.js +329 -0
- package/node_modules/@openclaw/fs-safe/dist/root-context.d.ts +38 -0
- package/node_modules/@openclaw/fs-safe/dist/root-context.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-context.js +141 -0
- package/node_modules/@openclaw/fs-safe/dist/root-errors.d.ts +12 -0
- package/node_modules/@openclaw/fs-safe/dist/root-errors.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-errors.js +75 -0
- package/node_modules/@openclaw/fs-safe/dist/root-file.d.ts +45 -0
- package/node_modules/@openclaw/fs-safe/dist/root-file.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-file.js +120 -0
- package/node_modules/@openclaw/fs-safe/dist/root-impl.d.ts +163 -0
- package/node_modules/@openclaw/fs-safe/dist/root-impl.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-impl.js +1230 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path-existing.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path-existing.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path-existing.js +68 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path-symlink.d.ts +7 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path-symlink.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path-symlink.js +35 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path.d.ts +40 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path.js +481 -0
- package/node_modules/@openclaw/fs-safe/dist/root-paths.d.ts +89 -0
- package/node_modules/@openclaw/fs-safe/dist/root-paths.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-paths.js +381 -0
- package/node_modules/@openclaw/fs-safe/dist/root-walk.d.ts +41 -0
- package/node_modules/@openclaw/fs-safe/dist/root-walk.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-walk.js +133 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-mode.d.ts +6 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-mode.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-mode.js +61 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-verification.d.ts +12 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-verification.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-verification.js +97 -0
- package/node_modules/@openclaw/fs-safe/dist/root.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/root.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/safe-path-segment.d.ts +12 -0
- package/node_modules/@openclaw/fs-safe/dist/safe-path-segment.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/safe-path-segment.js +75 -0
- package/node_modules/@openclaw/fs-safe/dist/secret-file.d.ts +25 -0
- package/node_modules/@openclaw/fs-safe/dist/secret-file.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/secret-file.js +329 -0
- package/node_modules/@openclaw/fs-safe/dist/secret-read-async.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/secret-read-async.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/secret-read-async.js +73 -0
- package/node_modules/@openclaw/fs-safe/dist/secret-read-policy.d.ts +17 -0
- package/node_modules/@openclaw/fs-safe/dist/secret-read-policy.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/secret-read-policy.js +40 -0
- package/node_modules/@openclaw/fs-safe/dist/secret.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/secret.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/secret.js +3 -0
- package/node_modules/@openclaw/fs-safe/dist/secure-file.d.ts +32 -0
- package/node_modules/@openclaw/fs-safe/dist/secure-file.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/secure-file.js +182 -0
- package/node_modules/@openclaw/fs-safe/dist/secure-temp-dir.d.ts +27 -0
- package/node_modules/@openclaw/fs-safe/dist/secure-temp-dir.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/secure-temp-dir.js +160 -0
- package/node_modules/@openclaw/fs-safe/dist/sibling-staged-file.d.ts +15 -0
- package/node_modules/@openclaw/fs-safe/dist/sibling-staged-file.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/sibling-staged-file.js +143 -0
- package/node_modules/@openclaw/fs-safe/dist/sibling-temp.d.ts +27 -0
- package/node_modules/@openclaw/fs-safe/dist/sibling-temp.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/sibling-temp.js +95 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-acquire.d.ts +31 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-acquire.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-acquire.js +336 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-handle.d.ts +24 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-handle.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-handle.js +42 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-policy.d.ts +14 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-policy.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-policy.js +71 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-reclaim.d.ts +63 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-reclaim.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-reclaim.js +305 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-root.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-root.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-root.js +76 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-types.d.ts +63 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-types.d.ts.map +1 -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 +14 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock.js +265 -0
- package/node_modules/@openclaw/fs-safe/dist/staged-directory.d.ts +16 -0
- package/node_modules/@openclaw/fs-safe/dist/staged-directory.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/staged-directory.js +60 -0
- package/node_modules/@openclaw/fs-safe/dist/staged-file-types.d.ts +56 -0
- package/node_modules/@openclaw/fs-safe/dist/staged-file-types.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/staged-file-types.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/store.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/store.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/store.js +3 -0
- package/node_modules/@openclaw/fs-safe/dist/strict-file-identity.d.ts +6 -0
- package/node_modules/@openclaw/fs-safe/dist/strict-file-identity.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/strict-file-identity.js +51 -0
- package/node_modules/@openclaw/fs-safe/dist/string-coerce.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/string-coerce.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/string-coerce.js +16 -0
- package/node_modules/@openclaw/fs-safe/dist/suppressed-error.d.ts +6 -0
- package/node_modules/@openclaw/fs-safe/dist/suppressed-error.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/suppressed-error.js +15 -0
- package/node_modules/@openclaw/fs-safe/dist/symlink-parents.d.ts +12 -0
- package/node_modules/@openclaw/fs-safe/dist/symlink-parents.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/symlink-parents.js +78 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-cleanup.d.ts +14 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-cleanup.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-cleanup.js +87 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-target.d.ts +28 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-target.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-target.js +137 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-owner.d.ts +23 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-owner.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-owner.js +320 -0
- package/node_modules/@openclaw/fs-safe/dist/temp.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/temp.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/temp.js +2 -0
- package/node_modules/@openclaw/fs-safe/dist/test-hooks.d.ts +25 -0
- package/node_modules/@openclaw/fs-safe/dist/test-hooks.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/test-hooks.js +13 -0
- package/node_modules/@openclaw/fs-safe/dist/text-atomic.d.ts +14 -0
- package/node_modules/@openclaw/fs-safe/dist/text-atomic.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/text-atomic.js +14 -0
- package/node_modules/@openclaw/fs-safe/dist/timing.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/timing.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/timing.js +40 -0
- package/node_modules/@openclaw/fs-safe/dist/trash.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/trash.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/trash.js +171 -0
- package/node_modules/@openclaw/fs-safe/dist/types.d.ts +23 -0
- package/node_modules/@openclaw/fs-safe/dist/types.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/types.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/walk.d.ts +37 -0
- package/node_modules/@openclaw/fs-safe/dist/walk.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/walk.js +207 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-command.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-command.d.ts.map +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 +32 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-owner.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-owner.js +126 -0
- package/node_modules/@openclaw/fs-safe/dist/write-open-flags.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/write-open-flags.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/write-open-flags.js +35 -0
- package/node_modules/@openclaw/fs-safe/dist/write-queue.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/write-queue.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/write-queue.js +18 -0
- package/node_modules/@openclaw/fs-safe/docs/advanced.md +153 -0
- package/node_modules/@openclaw/fs-safe/docs/archive.md +658 -0
- package/node_modules/@openclaw/fs-safe/docs/assets/readme-banner.jpg +0 -0
- package/node_modules/@openclaw/fs-safe/docs/atomic.md +334 -0
- package/node_modules/@openclaw/fs-safe/docs/config.md +131 -0
- package/node_modules/@openclaw/fs-safe/docs/contributing.md +180 -0
- package/node_modules/@openclaw/fs-safe/docs/durability.md +313 -0
- package/node_modules/@openclaw/fs-safe/docs/errors.md +232 -0
- package/node_modules/@openclaw/fs-safe/docs/file-store.md +258 -0
- package/node_modules/@openclaw/fs-safe/docs/filename.md +96 -0
- package/node_modules/@openclaw/fs-safe/docs/index.md +84 -0
- package/node_modules/@openclaw/fs-safe/docs/install-path.md +170 -0
- package/node_modules/@openclaw/fs-safe/docs/install.md +163 -0
- package/node_modules/@openclaw/fs-safe/docs/json-store.md +221 -0
- package/node_modules/@openclaw/fs-safe/docs/json.md +213 -0
- package/node_modules/@openclaw/fs-safe/docs/local-roots.md +141 -0
- package/node_modules/@openclaw/fs-safe/docs/migrating-to-0.5.md +196 -0
- package/node_modules/@openclaw/fs-safe/docs/migrating-to-0.6.md +43 -0
- package/node_modules/@openclaw/fs-safe/docs/native-helper.md +118 -0
- package/node_modules/@openclaw/fs-safe/docs/native.md +196 -0
- package/node_modules/@openclaw/fs-safe/docs/output.md +139 -0
- package/node_modules/@openclaw/fs-safe/docs/path-scope.md +159 -0
- package/node_modules/@openclaw/fs-safe/docs/path.md +208 -0
- package/node_modules/@openclaw/fs-safe/docs/permissions.md +200 -0
- package/node_modules/@openclaw/fs-safe/docs/private-file-store.md +54 -0
- package/node_modules/@openclaw/fs-safe/docs/public-api.md +112 -0
- package/node_modules/@openclaw/fs-safe/docs/quickstart.md +154 -0
- package/node_modules/@openclaw/fs-safe/docs/reading.md +183 -0
- package/node_modules/@openclaw/fs-safe/docs/regular-file.md +190 -0
- package/node_modules/@openclaw/fs-safe/docs/root.md +266 -0
- package/node_modules/@openclaw/fs-safe/docs/secret-file.md +273 -0
- package/node_modules/@openclaw/fs-safe/docs/secure-file.md +100 -0
- package/node_modules/@openclaw/fs-safe/docs/security-model.md +188 -0
- package/node_modules/@openclaw/fs-safe/docs/sidecar-lock.md +439 -0
- package/node_modules/@openclaw/fs-safe/docs/staged-file.md +182 -0
- package/node_modules/@openclaw/fs-safe/docs/store.md +94 -0
- package/node_modules/@openclaw/fs-safe/docs/temp.md +476 -0
- package/node_modules/@openclaw/fs-safe/docs/test-hooks.md +96 -0
- package/node_modules/@openclaw/fs-safe/docs/testing.md +189 -0
- package/node_modules/@openclaw/fs-safe/docs/timing.md +121 -0
- package/node_modules/@openclaw/fs-safe/docs/types.md +188 -0
- package/node_modules/@openclaw/fs-safe/docs/walk.md +128 -0
- package/node_modules/@openclaw/fs-safe/docs/writing.md +347 -0
- package/node_modules/@openclaw/fs-safe/package.json +187 -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/workflows/pr.yaml +58 -0
- package/node_modules/jszip/.jekyll-metadata +0 -0
- package/node_modules/jszip/.travis.yml +17 -0
- package/node_modules/jszip/CHANGES.md +204 -0
- package/node_modules/jszip/LICENSE.markdown +651 -0
- package/node_modules/jszip/README.markdown +33 -0
- package/node_modules/jszip/deps.js +37 -0
- package/node_modules/jszip/dist/jszip.js +11577 -0
- package/node_modules/jszip/dist/jszip.min.js +13 -0
- package/node_modules/jszip/graph.svg +601 -0
- package/node_modules/jszip/index.d.ts +330 -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 +501 -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/package.json +6 -4
- /package/node_modules/{p-limit/node_modules/yocto-queue → yocto-queue}/index.d.ts +0 -0
- /package/node_modules/{p-limit/node_modules/yocto-queue → yocto-queue}/index.js +0 -0
- /package/node_modules/{p-limit/node_modules/yocto-queue → yocto-queue}/license +0 -0
- /package/node_modules/{p-limit/node_modules/yocto-queue → yocto-queue}/package.json +0 -0
- /package/node_modules/{p-limit/node_modules/yocto-queue → yocto-queue}/readme.md +0 -0
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
# Path helpers
|
|
2
|
+
|
|
3
|
+
`@openclaw/fs-safe/path` is the lower-level lexical and canonical path surface — useful when you have your own logic that needs to know "is this path inside that directory" without going through `root()` or `pathScope()`.
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
import {
|
|
7
|
+
isPathInside,
|
|
8
|
+
isPathInsideWithRealpath,
|
|
9
|
+
isWithinDir,
|
|
10
|
+
resolveSafeBaseDir,
|
|
11
|
+
safeRealpathSync,
|
|
12
|
+
safeStatSync,
|
|
13
|
+
assertNoNulPathInput,
|
|
14
|
+
assertNoUnsafeDeviceReadPath,
|
|
15
|
+
isUnsafeDeviceReadPath,
|
|
16
|
+
isNotFoundPathError,
|
|
17
|
+
isSymlinkOpenError,
|
|
18
|
+
hasNodeErrorCode,
|
|
19
|
+
} from "@openclaw/fs-safe/path";
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Path helpers are deliberately a subpath import so the main entry stays focused
|
|
23
|
+
on the root capability, its shared configuration, errors, and external-output
|
|
24
|
+
helper.
|
|
25
|
+
|
|
26
|
+
## Boundary checks
|
|
27
|
+
|
|
28
|
+
### `isPathInside(rootDir, target)`
|
|
29
|
+
|
|
30
|
+
Pure lexical check. Returns `true` if `target` is `rootDir` itself or a descendant, after normalizing both inputs. **Does not** touch the filesystem — does not follow symlinks.
|
|
31
|
+
|
|
32
|
+
```ts
|
|
33
|
+
isPathInside("/srv/uploads", "/srv/uploads/photo.jpg"); // true
|
|
34
|
+
isPathInside("/srv/uploads", "/srv/uploads/../escape.txt"); // false
|
|
35
|
+
isPathInside("/srv/uploads", "/srv/uploads-other/x"); // false
|
|
36
|
+
isPathInside("/srv/uploads", "/srv/uploads"); // true (root itself counts)
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
The check is platform-aware: on Windows, paths are normalized for case and separator before comparison.
|
|
40
|
+
|
|
41
|
+
### `isPathInsideWithRealpath(rootDir, target, opts?)`
|
|
42
|
+
|
|
43
|
+
Synchronous. Same as `isPathInside`, but resolves both inputs through `realpath` first. Use this when you want the canonical answer and either input might be a symlink.
|
|
44
|
+
|
|
45
|
+
```ts
|
|
46
|
+
isPathInsideWithRealpath("/srv/uploads", "/srv/symlink-to-elsewhere"); // false
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
```ts
|
|
50
|
+
type Options = {
|
|
51
|
+
requireRealpath?: boolean; // default true
|
|
52
|
+
cache?: Map<string, string>;
|
|
53
|
+
};
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Does not throw on missing inputs — `realpath` failures are absorbed by the underlying `safeRealpathSync`. By default (`requireRealpath: true`) the function returns `false` when either input cannot be resolved. Pass `{ requireRealpath: false }` to fall back to the lexical answer from `isPathInside` instead.
|
|
57
|
+
|
|
58
|
+
### `isWithinDir(rootDir, targetPath)`
|
|
59
|
+
|
|
60
|
+
Convenience wrapper around `isPathInside`. Same semantics, different name kept for callers that prefer the noun phrase.
|
|
61
|
+
|
|
62
|
+
### `resolveSafeBaseDir(rootDir)`
|
|
63
|
+
|
|
64
|
+
Resolve a base directory to an absolute, normalized form ready for prefix comparison. Pre-normalized directories make subsequent `isPathInside` checks unambiguous.
|
|
65
|
+
|
|
66
|
+
```ts
|
|
67
|
+
const base = resolveSafeBaseDir("/srv/uploads/."); // "/srv/uploads/"
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Realpath and stat
|
|
71
|
+
|
|
72
|
+
### `safeRealpathSync(targetPath, cache?)`
|
|
73
|
+
|
|
74
|
+
Synchronous `realpath` that returns `null` instead of throwing on any error. Pass an optional `Map<string, string>` to cache results across calls within a single operation.
|
|
75
|
+
|
|
76
|
+
```ts
|
|
77
|
+
const real = safeRealpathSync("/srv/uploads/photo.jpg");
|
|
78
|
+
if (real === null) return notFound();
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
All `realpath` failures collapse to `null` — there is no distinction between `ENOENT`, `EACCES`, and other I/O errors. Use `fs.realpathSync` directly if you need to branch on the error code.
|
|
82
|
+
|
|
83
|
+
### `safeStatSync(targetPath)`
|
|
84
|
+
|
|
85
|
+
Synchronous `stat` that returns `Stats` on success and `null` on any failure,
|
|
86
|
+
including missing paths and permission errors. Use `fs.statSync` directly when
|
|
87
|
+
the distinction matters.
|
|
88
|
+
|
|
89
|
+
```ts
|
|
90
|
+
const stat = safeStatSync("/srv/uploads/photo.jpg");
|
|
91
|
+
if (!stat?.isFile()) return notFound();
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### `assertNoNulPathInput(filePath, message?)`
|
|
95
|
+
|
|
96
|
+
Throws `FsSafeError` with code `invalid-path` when a path string contains an embedded NUL byte. Use it before calling Node `fs` APIs directly; Node's native error can include raw path text in the message.
|
|
97
|
+
|
|
98
|
+
### `assertNoUnsafeDeviceReadPath(filePath, options?)`
|
|
99
|
+
|
|
100
|
+
Throws `FsSafeError` with code `device-path` when a read target is a known unsafe device or process-fd path. The built-in read/open helpers call this automatically before opening files; use it only when you are building your own read primitive.
|
|
101
|
+
|
|
102
|
+
```ts
|
|
103
|
+
assertNoUnsafeDeviceReadPath("/dev/zero"); // throws on POSIX
|
|
104
|
+
isUnsafeDeviceReadPath("/dev/fd/0"); // true on POSIX
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
The check is intentionally not a normal consumer policy knob. Safe read APIs reject these targets by default because they can block forever, stream indefinitely, or alias process file descriptors.
|
|
108
|
+
|
|
109
|
+
## Error inspection
|
|
110
|
+
|
|
111
|
+
### `isNotFoundPathError(err)`
|
|
112
|
+
|
|
113
|
+
`true` if the error is a `NodeJS.ErrnoException` with code `ENOENT` (file or directory missing).
|
|
114
|
+
|
|
115
|
+
```ts
|
|
116
|
+
try {
|
|
117
|
+
await fs.readFile(p);
|
|
118
|
+
} catch (err) {
|
|
119
|
+
if (isNotFoundPathError(err)) return null;
|
|
120
|
+
throw err;
|
|
121
|
+
}
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### `isSymlinkOpenError(err)`
|
|
125
|
+
|
|
126
|
+
`true` if the error indicates a symlink-related open failure (typically `ELOOP` or platform-specific symlink rejections from `O_NOFOLLOW`).
|
|
127
|
+
|
|
128
|
+
### `hasNodeErrorCode(err, code)`
|
|
129
|
+
|
|
130
|
+
Generic helper. `true` if `err` is a `NodeJS.ErrnoException` with the matching `code` string.
|
|
131
|
+
|
|
132
|
+
```ts
|
|
133
|
+
if (hasNodeErrorCode(err, "EACCES")) return reply(403);
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
## When to use these vs `root()`
|
|
137
|
+
|
|
138
|
+
| Path helpers | `root()` |
|
|
139
|
+
|---|---|
|
|
140
|
+
| Pure functions over absolute path strings. | Boundary handle with method-style I/O. |
|
|
141
|
+
| No I/O performed (except `safeRealpathSync`/`safeStatSync`). | Every method goes to disk. |
|
|
142
|
+
| Fits inside other helpers / validation pipelines. | Standalone consumer of caller-supplied paths. |
|
|
143
|
+
|
|
144
|
+
If you're writing a validator that says "is this safe?" without performing the operation, the path helpers are the right tool. If you're going to perform the read or write, use `root()` so the boundary check is fused with the operation.
|
|
145
|
+
|
|
146
|
+
## Common patterns
|
|
147
|
+
|
|
148
|
+
### "Resolve, then assert it's inside my dir"
|
|
149
|
+
|
|
150
|
+
```ts
|
|
151
|
+
import { isPathInsideWithRealpath, isNotFoundPathError } from "@openclaw/fs-safe/path";
|
|
152
|
+
|
|
153
|
+
let canonical: string;
|
|
154
|
+
try {
|
|
155
|
+
canonical = await fs.realpath(input);
|
|
156
|
+
} catch (err) {
|
|
157
|
+
if (isNotFoundPathError(err)) return reply(404);
|
|
158
|
+
throw err;
|
|
159
|
+
}
|
|
160
|
+
if (!isPathInsideWithRealpath("/srv/uploads", canonical)) {
|
|
161
|
+
return reply(403);
|
|
162
|
+
}
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### Cache realpaths in a request scope
|
|
166
|
+
|
|
167
|
+
```ts
|
|
168
|
+
const cache = new Map<string, string>();
|
|
169
|
+
for (const p of inputs) {
|
|
170
|
+
const real = safeRealpathSync(p, cache);
|
|
171
|
+
if (real && isPathInside(root, real)) keep.push(real);
|
|
172
|
+
}
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### Branch on `ENOENT` vs other errors
|
|
176
|
+
|
|
177
|
+
```ts
|
|
178
|
+
try {
|
|
179
|
+
return await fs.readFile(p);
|
|
180
|
+
} catch (err) {
|
|
181
|
+
if (isNotFoundPathError(err)) return null;
|
|
182
|
+
if (hasNodeErrorCode(err, "EACCES")) return null;
|
|
183
|
+
throw err;
|
|
184
|
+
}
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
## Path-policy helpers
|
|
188
|
+
|
|
189
|
+
`path-policy.ts` exposes two assertions used by `root()` internally; they are exported for callers building their own helpers:
|
|
190
|
+
|
|
191
|
+
```ts
|
|
192
|
+
import {
|
|
193
|
+
assertNoPathAliasEscape,
|
|
194
|
+
assertNoHardlinkedFinalPath,
|
|
195
|
+
PATH_ALIAS_POLICIES,
|
|
196
|
+
} from "@openclaw/fs-safe/advanced";
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
- `assertNoPathAliasEscape({ rootRealPath, candidatePath, policy })` — async. Asserts the candidate's resolved real path is inside the root. Configurable via `PATH_ALIAS_POLICIES` (which currently ships only the default `"strict"` policy).
|
|
200
|
+
- `assertNoHardlinkedFinalPath({ filePath })` — async. Throws if the file at `filePath` has `nlink > 1`.
|
|
201
|
+
|
|
202
|
+
Use these when writing a custom helper that wants the same guards `root()` uses but with different surrounding logic.
|
|
203
|
+
|
|
204
|
+
## See also
|
|
205
|
+
|
|
206
|
+
- [`root()`](root.md) — the high-level boundary that uses these checks internally.
|
|
207
|
+
- [`pathScope()`](path-scope.md) — `Result`-style scope checks.
|
|
208
|
+
- [Reading](reading.md) — `Root.read()` and friends use `isPathInside` + identity checks.
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
# Permissions
|
|
2
|
+
|
|
3
|
+
`@openclaw/fs-safe/permissions` contains the curated mode and permission inspection helpers used by secure file reads and by applications that want to report actionable permission problems.
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
import {
|
|
7
|
+
formatPermissionDetail,
|
|
8
|
+
formatPermissionRemediation,
|
|
9
|
+
inspectPathPermissions,
|
|
10
|
+
} from "@openclaw/fs-safe/permissions";
|
|
11
|
+
|
|
12
|
+
const perms = await inspectPathPermissions("/var/lib/app/auth.token");
|
|
13
|
+
console.log(formatPermissionDetail("/var/lib/app/auth.token", perms));
|
|
14
|
+
if (perms.ok && (perms.groupReadable || perms.worldReadable)) {
|
|
15
|
+
console.log(
|
|
16
|
+
formatPermissionRemediation({
|
|
17
|
+
targetPath: "/var/lib/app/auth.token",
|
|
18
|
+
perms,
|
|
19
|
+
isDir: false,
|
|
20
|
+
posixMode: 0o600,
|
|
21
|
+
}),
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## POSIX helpers
|
|
27
|
+
|
|
28
|
+
```ts
|
|
29
|
+
safeStat(path);
|
|
30
|
+
inspectPathPermissions(path, options?);
|
|
31
|
+
formatPermissionDetail(path, check);
|
|
32
|
+
formatPermissionRemediation({ targetPath, perms, isDir, posixMode });
|
|
33
|
+
modeBits(mode);
|
|
34
|
+
formatOctal(bits);
|
|
35
|
+
isWorldWritable(bits);
|
|
36
|
+
isGroupWritable(bits);
|
|
37
|
+
isWorldReadable(bits);
|
|
38
|
+
isGroupReadable(bits);
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
POSIX remediation strings shell-quote paths with whitespace or metacharacters
|
|
42
|
+
and protect option-like paths with `--`, so they can be presented as commands
|
|
43
|
+
without letting the inspected pathname add shell syntax.
|
|
44
|
+
|
|
45
|
+
`inspectPathPermissions()` follows symlink targets for the effective mode but tells you whether the original path was a symlink. On POSIX it reports owner/group/world bits. On Windows it delegates to the ACL helpers below and also reports `ownerSid` plus `ownerTrusted` when ownership can be verified. `ownerTrusted` is true only for a local volume owned by the current user, LocalSystem, or built-in Administrators; remote filesystems fail closed. Secure reads and callers that protect credential-bearing execution require `ownerTrusted === true`.
|
|
46
|
+
|
|
47
|
+
## Advanced Windows ACL helpers
|
|
48
|
+
|
|
49
|
+
The low-level Windows ACL parser and `icacls` command builders live in `@openclaw/fs-safe/advanced`:
|
|
50
|
+
|
|
51
|
+
```ts
|
|
52
|
+
import {
|
|
53
|
+
createIcaclsResetCommand,
|
|
54
|
+
formatIcaclsResetCommand,
|
|
55
|
+
formatWindowsAclSummary,
|
|
56
|
+
inspectWindowsAcl,
|
|
57
|
+
parseIcaclsOutput,
|
|
58
|
+
resolveWindowsUserPrincipal,
|
|
59
|
+
summarizeWindowsAcl,
|
|
60
|
+
} from "@openclaw/fs-safe/advanced";
|
|
61
|
+
|
|
62
|
+
inspectWindowsAcl(path, { env, exec });
|
|
63
|
+
parseIcaclsOutput(output, targetPath);
|
|
64
|
+
summarizeWindowsAcl(entries, env);
|
|
65
|
+
formatWindowsAclSummary(summary);
|
|
66
|
+
formatIcaclsResetCommand(targetPath, { isDir, env });
|
|
67
|
+
createIcaclsResetCommand(targetPath, { isDir, env });
|
|
68
|
+
resolveWindowsUserPrincipal(env);
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
The fallback Windows inspector calls `icacls.exe <path>` using its supported
|
|
72
|
+
path-only inspection syntax and classifies principals as trusted, world, or
|
|
73
|
+
group. Trusted defaults include the current user, SYSTEM, and Administrators.
|
|
74
|
+
Built-in PowerShell, `icacls.exe`, and `whoami.exe` invocations have a fixed
|
|
75
|
+
30-second per-process deadline. A command failure or timeout returns an
|
|
76
|
+
unverified result (`source: "unknown"`) so callers fail closed. Advanced callers
|
|
77
|
+
that inject a custom `exec` implementation own that executor's deadline.
|
|
78
|
+
Failed owner and ACL inspections retain `error` text and an optional
|
|
79
|
+
`errorDetail: PermissionCommandFailure` with `command`, integer `durationMs`,
|
|
80
|
+
`timedOut`, `exitCode`, `signal`, and `stderr`. The type is exported from both
|
|
81
|
+
`@openclaw/fs-safe/permissions` and `@openclaw/fs-safe/advanced`. Built-in
|
|
82
|
+
execution measures elapsed time; injected execFile-shaped failures receive
|
|
83
|
+
best-effort command diagnostics. Plain errors have no `errorDetail`.
|
|
84
|
+
Display reasons and stderr escape control characters and are limited to 400
|
|
85
|
+
characters, including a trailing `…` when truncated. Diagnostics do not copy
|
|
86
|
+
stdout or read target file contents. The separate `errorCause` retains the
|
|
87
|
+
original exception for restricted local diagnosis; do not serialize or expose
|
|
88
|
+
it as display text.
|
|
89
|
+
The parser is on the advanced surface so tests and CLIs can process captured
|
|
90
|
+
`icacls` output without spawning a process.
|
|
91
|
+
|
|
92
|
+
When the native binding is available, `inspectPathPermissions()`
|
|
93
|
+
reads the owner and DACL directly with Windows security APIs. It classifies the
|
|
94
|
+
current user, LocalSystem, and built-in Administrators as trusted and reports
|
|
95
|
+
the world/group read/write facts consumed by secure reads. Descriptor forms it
|
|
96
|
+
cannot classify equivalently fall back to the established owner/.NET and
|
|
97
|
+
`icacls` path; `mode: "off"` exercises that fallback deterministically.
|
|
98
|
+
|
|
99
|
+
## Policy-free owner and DACL facts
|
|
100
|
+
|
|
101
|
+
`readOwnerAndDacl()` exposes the direct Windows descriptor facts needed by a
|
|
102
|
+
consumer that owns a principal allowlist. It deliberately does not decide
|
|
103
|
+
which SID is trusted or calculate effective access. For example, snapshot
|
|
104
|
+
staging can reject an incomplete descriptor and ignore inherit-only ACEs before
|
|
105
|
+
applying its own exact SID policy:
|
|
106
|
+
|
|
107
|
+
```ts
|
|
108
|
+
import { readOwnerAndDacl } from "@openclaw/fs-safe/permissions";
|
|
109
|
+
|
|
110
|
+
const facts = readOwnerAndDacl(stagingDirectory);
|
|
111
|
+
if (facts.status === "unsupported-platform") {
|
|
112
|
+
throw new Error(`Windows ACL facts unavailable on ${facts.platform}`);
|
|
113
|
+
}
|
|
114
|
+
if (!facts.isLocal || !facts.daclPresent || !facts.complete) {
|
|
115
|
+
throw new Error("staging DACL cannot be evaluated completely");
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
for (const ace of facts.aces) {
|
|
119
|
+
if (ace.flags.inheritOnly) continue;
|
|
120
|
+
if (!trustedSids.has(ace.sid)) {
|
|
121
|
+
throw new Error(`unexpected staging principal: ${ace.sid}`);
|
|
122
|
+
}
|
|
123
|
+
evaluateMaskAndDenyOrder(ace.aceType, ace.mask);
|
|
124
|
+
}
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
On Windows the supported result contains `ownerSid`, `currentUserSid`,
|
|
128
|
+
`daclPresent`, `isLocal`, `complete`, `unsupportedAceTypes`, and ordered basic
|
|
129
|
+
allow/deny `aces`. `currentUserSid` is the process token's `TokenUser` SID, so
|
|
130
|
+
callers can compare it with the owner or their own allowlist without fs-safe
|
|
131
|
+
applying trust policy. Each ACE has `{ sid, mask, aceType, flags }`; `flags`
|
|
132
|
+
retains the raw byte and decoded
|
|
133
|
+
`objectInherit`, `containerInherit`, `noPropagateInherit`, `inheritOnly`,
|
|
134
|
+
`inherited`, `successfulAccess`, and `failedAccess` facts. SID strings are
|
|
135
|
+
lowercase Windows SID notation. `daclPresent: false` represents a null DACL,
|
|
136
|
+
which grants unrestricted access; it must not be mistaken for an empty DACL.
|
|
137
|
+
|
|
138
|
+
Object-specific and other ACE layouts are not guessed: they are omitted,
|
|
139
|
+
`complete` becomes false, and their numeric types appear in
|
|
140
|
+
`unsupportedAceTypes`, allowing a security-sensitive caller to fail closed.
|
|
141
|
+
Non-Windows systems return `{ status: "unsupported-platform", platform }`.
|
|
142
|
+
Windows requires the native binding; if it is unavailable or forced
|
|
143
|
+
off, the call throws `FsSafeError("helper-unavailable")`. The existing coarse
|
|
144
|
+
`inspectPathPermissions()` API still owns its compatibility fallback and trust
|
|
145
|
+
classification.
|
|
146
|
+
|
|
147
|
+
## Private directories
|
|
148
|
+
|
|
149
|
+
```ts
|
|
150
|
+
import path from "node:path";
|
|
151
|
+
import { createPrivateDirectory } from "@openclaw/fs-safe/permissions";
|
|
152
|
+
|
|
153
|
+
const sqliteDirectory =
|
|
154
|
+
"C:\\Users\\me\\AppData\\Local\\OpenClaw\\private-databases";
|
|
155
|
+
await createPrivateDirectory(sqliteDirectory);
|
|
156
|
+
await openSqlite(path.join(sqliteDirectory, "sessions.sqlite"));
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
On Windows with native support, this creates the directory and applies a
|
|
160
|
+
protected owner + LocalSystem + Administrators full-control DACL directly with
|
|
161
|
+
an atomic security descriptor; no PowerShell or `icacls` process is launched.
|
|
162
|
+
This API is Windows-only and native-only; it fails closed with
|
|
163
|
+
`FsSafeError("helper-unavailable")` on other platforms, when native mode is off,
|
|
164
|
+
or when the binding is unavailable. POSIX callers should create private
|
|
165
|
+
directories through their existing trusted-root creation policy rather than a
|
|
166
|
+
pathname-only compatibility shim. Existing Windows permission inspection still
|
|
167
|
+
retains its .NET/`icacls` compatibility fallback.
|
|
168
|
+
|
|
169
|
+
Use `createIcaclsResetCommand()` when you need a structured command and argv pair. Use `formatIcaclsResetCommand()` when you only need a remediation string for a user-facing message.
|
|
170
|
+
|
|
171
|
+
## Types
|
|
172
|
+
|
|
173
|
+
```ts
|
|
174
|
+
type PermissionCheck = {
|
|
175
|
+
ok: boolean;
|
|
176
|
+
isSymlink: boolean;
|
|
177
|
+
isDir: boolean;
|
|
178
|
+
mode: number | null;
|
|
179
|
+
bits: number | null;
|
|
180
|
+
source: "posix" | "windows-acl" | "unknown";
|
|
181
|
+
worldWritable: boolean;
|
|
182
|
+
groupWritable: boolean;
|
|
183
|
+
worldReadable: boolean;
|
|
184
|
+
groupReadable: boolean;
|
|
185
|
+
ownerSid?: string;
|
|
186
|
+
ownerTrusted?: boolean;
|
|
187
|
+
ownerError?: string;
|
|
188
|
+
aclSummary?: string;
|
|
189
|
+
error?: string;
|
|
190
|
+
};
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
`ok: false` means the path itself could not be inspected. `ok: true` with `source: "unknown"` means basic stat information was available, but the platform-specific permission source could not be verified.
|
|
194
|
+
|
|
195
|
+
## See also
|
|
196
|
+
|
|
197
|
+
- [Secure file reads](secure-file.md) — fd-pinned reads that enforce these checks.
|
|
198
|
+
- [Errors](errors.md) — permission-related `FsSafeError` codes.
|
|
199
|
+
- [Native architecture](native.md) — direct Windows security descriptor mechanisms.
|
|
200
|
+
- [Migrating to 0.5](migrating-to-0.5.md) — native-only feature checklist.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Private file-store mode
|
|
2
|
+
|
|
3
|
+
Private state is not a separate store family. Use `fileStore({ private: true })`
|
|
4
|
+
when a directory holds credentials, tokens, auth profiles, or other private
|
|
5
|
+
JSON/text state.
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import { fileStore } from "@openclaw/fs-safe/store";
|
|
9
|
+
|
|
10
|
+
const store = fileStore({ rootDir: "/var/lib/app", private: true });
|
|
11
|
+
|
|
12
|
+
await store.writeJson("state.json", state);
|
|
13
|
+
const loaded = await store.readJsonIfExists<State>("state.json");
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Behavior
|
|
17
|
+
|
|
18
|
+
- Writes create parent directories at `0o700` and files at `0o600` unless you
|
|
19
|
+
pass stricter `dirMode` / `mode` options.
|
|
20
|
+
- Async private-mode writes route through the secret-file atomic path, which refuses
|
|
21
|
+
symlink parent components and re-asserts mode after rename. Existing directories
|
|
22
|
+
must already have the requested mode; writes do not repair their permissions.
|
|
23
|
+
New-directory initialization requires guarded descriptor authority and may
|
|
24
|
+
fail closed under restrictive platform/umask combinations; see the
|
|
25
|
+
[secret-directory policy](secret-file.md#parameters).
|
|
26
|
+
- Locked JSON mutations prepare private directories before acquiring their
|
|
27
|
+
sidecar and bind the lock to the admitted parent identity. Lock normalization
|
|
28
|
+
is read-only: a deleted or replaced admitted parent is rejected, not recreated.
|
|
29
|
+
The writer still revalidates directory admission afterward; reads do not create
|
|
30
|
+
directories.
|
|
31
|
+
- `readText()` and `readJson()` are strict and throw on missing files.
|
|
32
|
+
- `readTextIfExists()` and `readJsonIfExists()` return `null` on missing files.
|
|
33
|
+
- `write()`, `writeText()`, `writeJson()`, `writeStream()`, and `copyIn()` all
|
|
34
|
+
keep the same root-relative `FileStore` shape.
|
|
35
|
+
|
|
36
|
+
## Sync writes
|
|
37
|
+
|
|
38
|
+
Use `fileStoreSync({ private: true })` for boot paths or sync-only integration
|
|
39
|
+
points:
|
|
40
|
+
|
|
41
|
+
```ts
|
|
42
|
+
import { fileStoreSync } from "@openclaw/fs-safe/store";
|
|
43
|
+
|
|
44
|
+
fileStoreSync({ rootDir: "/var/lib/app", private: true }).writeJson("config.json", config);
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
The sync store intentionally exposes a smaller surface: path resolution,
|
|
48
|
+
lenient reads, and atomic text/JSON writes.
|
|
49
|
+
|
|
50
|
+
## See also
|
|
51
|
+
|
|
52
|
+
- [`fileStore`](file-store.md) — full store API.
|
|
53
|
+
- [Secret files](secret-file.md) — standalone credential file reads and writes.
|
|
54
|
+
- [JSON files](json.md) — strict/lenient JSON helpers without a bound store.
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# Public API inventory
|
|
2
|
+
|
|
3
|
+
This page closes the gap between the narrative guides and the complete package
|
|
4
|
+
surface. The generated declarations define the exact signatures; the lists
|
|
5
|
+
below name the lower-frequency exports that are easy to miss when reading only
|
|
6
|
+
the focused guides. `test/public-api.json` guards the same inventory during
|
|
7
|
+
pack checks.
|
|
8
|
+
|
|
9
|
+
## Main entry and `root`
|
|
10
|
+
|
|
11
|
+
The main entry and `@openclaw/fs-safe/root` expose the root capability types,
|
|
12
|
+
including `ContainmentGuarantee`, `RootOpenOptions`, `RootCreateOptions`,
|
|
13
|
+
`RootCreateJsonOptions`, and `WritableOpenMode`. The root-bounded iterator uses
|
|
14
|
+
`RootWalkOptions`, `RootWalkEntry`, `RootWalkDataEntry`, `RootWalkEntryKind`,
|
|
15
|
+
`RootWalkDataEntryKind`, `RootWalkSymlinkPolicy`, `RootWalkLimitBehavior`,
|
|
16
|
+
`RootWalkDirectoryErrorBehavior`, `RootWalkEntryFilter`, and
|
|
17
|
+
`RootWalkEntryFilterResult`.
|
|
18
|
+
|
|
19
|
+
The root subpath also exports `openLocalFileSafely`, `readLocalFileSafely`, and
|
|
20
|
+
`resolveOpenedFileRealPathForHandle` for trusted absolute-file composition.
|
|
21
|
+
They do not create a root boundary around arbitrary caller input; prefer
|
|
22
|
+
`root()` for untrusted paths.
|
|
23
|
+
|
|
24
|
+
The error helpers are `categorizeFsSafeError` and `FsSafeErrorDetails`. The
|
|
25
|
+
deprecated native-configuration bridge retains the `FsSafePythonConfig` type.
|
|
26
|
+
|
|
27
|
+
## `path` and `advanced`
|
|
28
|
+
|
|
29
|
+
The lexical path surface additionally exports `isNodeError`,
|
|
30
|
+
`isPathRelativeEscape`, `normalizeWindowsPathForComparison`,
|
|
31
|
+
`resolveSafeRelativePath`, `splitSafeRelativePath`, and
|
|
32
|
+
`matchUnsafeDeviceReadPath`. The device matcher is described by
|
|
33
|
+
`UnsafeDeviceReadPathMatch`, `UnsafeDeviceReadPathOptions`, and
|
|
34
|
+
`UnsafeDeviceReadPathReason`.
|
|
35
|
+
|
|
36
|
+
The advanced root-file primitive exports `OpenRootFileParams`,
|
|
37
|
+
`OpenRootFileSyncParams`, `RootFileOpenResult`, and
|
|
38
|
+
`RootFileOpenFailureReason`. These are composition types for callers building
|
|
39
|
+
their own pinned-open flow, not substitutes for the higher-level `Root` verbs.
|
|
40
|
+
|
|
41
|
+
## `json` and `store`
|
|
42
|
+
|
|
43
|
+
Standalone structured reads use `ReadJsonOptions`, `ReadRootJsonSyncOptions`,
|
|
44
|
+
`ReadRootStructuredFileSyncOptions`, and `RootStructuredFileReadResult`.
|
|
45
|
+
|
|
46
|
+
The store surface additionally exports `FileStoreReadOptions` and
|
|
47
|
+
`JsonFileStoreOptions`. Durable-queue inspection and recovery use
|
|
48
|
+
`jsonDurableQueueEntryExists`, `loadJsonDurableQueueEntry`,
|
|
49
|
+
`readJsonDurableQueueEntry`, and the `JsonDurableQueueLoadOptions` and
|
|
50
|
+
`JsonDurableQueueReadResult` types. `unlinkBestEffort` is the explicitly
|
|
51
|
+
best-effort cleanup helper used by those queue flows.
|
|
52
|
+
|
|
53
|
+
## Permissions and secure files
|
|
54
|
+
|
|
55
|
+
Permission inspection exposes `PermissionCheckOptions` and `SafeStatResult`.
|
|
56
|
+
Private-directory creation uses `CreatePrivateDirectoryOptions`. Raw Windows
|
|
57
|
+
descriptor facts use `OwnerAndDaclResult`, `WindowsAccessControlEntry`, and
|
|
58
|
+
`WindowsAceFlags`.
|
|
59
|
+
|
|
60
|
+
Secure reads split their option and result shapes into
|
|
61
|
+
`SecureFileTrustOptions`, `SecureFilePermissionOptions`,
|
|
62
|
+
`SecureFileInjectOptions`, `SecureFileIoOptions`, and `SecureFileReadResult`.
|
|
63
|
+
|
|
64
|
+
## Locks, walking, and temp workspaces
|
|
65
|
+
|
|
66
|
+
The file-lock diagnostics surface includes `FileLockHeldEntry`,
|
|
67
|
+
`FileLockStaleRecovery`, and `SidecarLockCompromisedInfo`.
|
|
68
|
+
`drainFileLockManagerForTest` and `resetFileLockManagerForTest` are test-only
|
|
69
|
+
manager controls; production code should not use them as lock recovery.
|
|
70
|
+
|
|
71
|
+
Standalone walkers use the `WalkEntryKind` and `WalkSymlinkPolicy` unions.
|
|
72
|
+
Private workspaces expose `TempPathIdentityReceipt`,
|
|
73
|
+
`TempWorkspaceCleanupResult`, and `TempWorkspaceCleanupSafety` so callers can
|
|
74
|
+
distinguish outcomes and select compatible or required bounded-tree cleanup.
|
|
75
|
+
Strict workspace creation requires native no-replace quarantine plus retained
|
|
76
|
+
parent/workspace descriptors; see the
|
|
77
|
+
[creation and cleanup contract](temp.md#private-temp-workspaces).
|
|
78
|
+
|
|
79
|
+
## Atomic replacement and durability
|
|
80
|
+
|
|
81
|
+
Atomic helper option and receipt types include
|
|
82
|
+
`MovePathWithCopyFallbackOptions`, `ReplaceDirectoryAtomicOptions`,
|
|
83
|
+
`ReplaceFileAtomicSyncOptions`, `ReplaceFileAtomicResult`,
|
|
84
|
+
`ReplaceFileAtomicRestoreCleanup`, `ReplaceFileCopyFallbackRestorePolicy`, and
|
|
85
|
+
`ReplaceFileDestinationHardlinkPolicy`.
|
|
86
|
+
|
|
87
|
+
The durability surface also exports the synchronous strict
|
|
88
|
+
`syncDirectorySync`, plus `DirectoryReceipt`, `DurableDirectoryReceipt`,
|
|
89
|
+
`EnsureDurableDirectoryOptions`, `PublishFileExclusiveResult`,
|
|
90
|
+
`PublishFileExclusiveStrategy`, `PublishFileExclusiveCleanup`,
|
|
91
|
+
`PublishFileExclusiveFailurePhase`,
|
|
92
|
+
`PublishFileExclusiveDirectorySyncFailure`, `Sha256FileInput`, and
|
|
93
|
+
`Sha256FileResult`.
|
|
94
|
+
|
|
95
|
+
## Archives
|
|
96
|
+
|
|
97
|
+
Archive option and policy types are `ExtractArchiveOptions`,
|
|
98
|
+
`ArchiveEntryFilter`, `ArchiveEntryModePolicy`, and
|
|
99
|
+
`ArchiveFilteredEntryPolicy`. Typed error-code unions are
|
|
100
|
+
`ArchiveFormatErrorCode`, `ArchiveLimitErrorCode`, and
|
|
101
|
+
`ArchiveSecurityErrorCode`. TAR and ZIP preflight composition uses
|
|
102
|
+
`TarEntryInfo` and `ZipArchiveWithFiles`.
|
|
103
|
+
|
|
104
|
+
`createArchiveSymlinkTraversalError` constructs the typed traversal failure
|
|
105
|
+
used by extractors. `resolvePackedRootDir` finds the single packed root when an
|
|
106
|
+
archive layout permits it; neither helper weakens entry validation.
|
|
107
|
+
|
|
108
|
+
## Keeping this list honest
|
|
109
|
+
|
|
110
|
+
Every runtime and type name in `test/public-api.json` must appear somewhere in
|
|
111
|
+
`README.md` or `docs/`. Documentation examples are also checked so a named
|
|
112
|
+
import cannot silently move to another package subpath.
|