@openclaw/openshell-sandbox 2026.9.2 → 2026.9.4
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/openclaw.plugin.json +1 -0
- package/package.json +7 -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,196 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Native architecture
|
|
3
|
+
description: "The platform-specific native bindings, fd-relative beneath model, platform mechanisms, loader security, and JavaScript fallback contract."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Native architecture
|
|
7
|
+
|
|
8
|
+
`@openclaw/fs-safe` uses native bindings that supply mechanisms Node does
|
|
9
|
+
not expose directly. The Rust layer is deliberately not a second policy engine.
|
|
10
|
+
TypeScript owns trusted-root selection, path validation, archive filtering,
|
|
11
|
+
budgets, modes, identity fencing, cleanup decisions, and error normalization.
|
|
12
|
+
Rust receives already-decided relative operations and performs the smallest
|
|
13
|
+
platform syscall sequence that can preserve the boundary.
|
|
14
|
+
|
|
15
|
+
Every operation that has an equivalent safe Node implementation keeps that
|
|
16
|
+
guarded JavaScript path. Native loading is lazy; installs do not compile Rust,
|
|
17
|
+
run postinstall code, or fetch binaries at runtime. Seven exact-version optional
|
|
18
|
+
packages are filtered by OS, CPU, and Linux libc, so an installation receives
|
|
19
|
+
only its matching prebuilt binding.
|
|
20
|
+
Native-only formats and creation-time Windows DACL guarantees fail explicitly
|
|
21
|
+
instead of substituting a weaker implementation.
|
|
22
|
+
|
|
23
|
+
## The beneath model
|
|
24
|
+
|
|
25
|
+
A trusted directory descriptor is the capability. Native operations accept
|
|
26
|
+
that descriptor plus a validated relative path and never reconstruct authority
|
|
27
|
+
from a process working directory. Newly created files use exclusive creation,
|
|
28
|
+
and TypeScript compares descriptor, pathname, and expected identities before
|
|
29
|
+
accepting results.
|
|
30
|
+
|
|
31
|
+
Conceptually, a caller grants authority to an already-open root—not to a path
|
|
32
|
+
string that can be reinterpreted later:
|
|
33
|
+
|
|
34
|
+
```text
|
|
35
|
+
validated Root handle
|
|
36
|
+
└─ relative components (untrusted)
|
|
37
|
+
└─ open/link/mkdir beneath the handle
|
|
38
|
+
└─ compare descriptor + pathname + expected identity
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
The TypeScript layer validates and decides. The native layer never decides
|
|
42
|
+
whether a path, archive entry, mode, owner, or cleanup policy is acceptable.
|
|
43
|
+
|
|
44
|
+
- Linux uses `openat2(RESOLVE_BENEATH | RESOLVE_NO_MAGICLINKS)`, fd-relative
|
|
45
|
+
`mkdirat`/`linkat`/`renameat`/`renameat2`, `FICLONE`, and `copy_file_range`.
|
|
46
|
+
- macOS 15.4 and newer first use `openat(O_RESOLVE_BENEATH)`; older kernels walk
|
|
47
|
+
components with `openat(O_NOFOLLOW)` and restart in-root symlinks from the
|
|
48
|
+
pinned root. Both routes apply an `F_GETPATH` post-open containment detector,
|
|
49
|
+
but directory rename races mean the result remains `best-effort`, not
|
|
50
|
+
race-atomic. macOS uses `renameatx_np(RENAME_EXCL)` and permits
|
|
51
|
+
`fclonefileat` in an owned, non-shared parent. The clone is normalized inside
|
|
52
|
+
a private staging directory: flags, ACLs, extended attributes, and broad mode
|
|
53
|
+
bits are cleared before no-replace publication.
|
|
54
|
+
- Windows uses handle-relative `NtCreateFile` with `OBJ_DONT_REPARSE` and
|
|
55
|
+
`FILE_OPEN_REPARSE_POINT`, then explicitly rejects reparse points. Rename and
|
|
56
|
+
hardlink operations stay rooted in already-open handles. Owner/DACL reads
|
|
57
|
+
use `GetSecurityInfo`; private directories receive their protected DACL in
|
|
58
|
+
the `CreateDirectoryW` call itself.
|
|
59
|
+
|
|
60
|
+
## Archives
|
|
61
|
+
|
|
62
|
+
Rust streams ZIP and TAR payloads, including gzip, zstd, and bzip2. It first
|
|
63
|
+
returns a bounded manifest. TypeScript applies the shared path, filter, strip,
|
|
64
|
+
mode, and byte policies and returns an index-bound extraction plan. Rust then
|
|
65
|
+
creates only those planned entries beneath a private staging descriptor.
|
|
66
|
+
|
|
67
|
+
The `fs-safe-archive-core` Rust workspace crate owns TAR framing, paths, types,
|
|
68
|
+
mode decoding, GNU metadata, and byte-counted local PAX records. The native
|
|
69
|
+
binding and bundled WASM module compile the same source. No `tar::Archive` or
|
|
70
|
+
Node TAR parser reinterprets admitted identities or sizes. Executors replay
|
|
71
|
+
admitted payload ranges after complete bounded admission; native writes retain
|
|
72
|
+
the platform's descriptor-relative primitives, while fallback writes retain
|
|
73
|
+
the guarded Node staging/publication boundary. ZIP behavior is unchanged.
|
|
74
|
+
`maxMetaEntryBytes` bounds bodies before allocation; unsupported global/old
|
|
75
|
+
metadata and sparse forms fail closed. See [bounded local PAX support](archive.md#bounded-local-pax-support).
|
|
76
|
+
|
|
77
|
+
Every raw pass receives only TypeScript's resolved `maxEntries`,
|
|
78
|
+
`maxMetaEntryBytes`, and `maxDecodedBytes`. Shared resolution caps metadata and
|
|
79
|
+
decoded byte fields at JavaScript's safe-integer maximum and entry counts at
|
|
80
|
+
`2^32 - 1` before backend selection. Large finite limits remain accepted;
|
|
81
|
+
native conversion mirrors those caps and rejects malformed non-finite or
|
|
82
|
+
negative direct-call values before casting. Logical member headers count
|
|
83
|
+
before filtering/stripping; metadata records do not. `maxEntryBytes` and
|
|
84
|
+
`maxExtractedBytes` remain exclusively in TypeScript's accepted-plan builder,
|
|
85
|
+
after strip/filter policy, and are absent from the raw meter's interface.
|
|
86
|
+
Bounded reads use the default count/metadata/decoded bounds; public `maxBytes`
|
|
87
|
+
bounds only the requested output. TypeScript derives the internal decoded cap
|
|
88
|
+
by safely adding `maxExtractedBytes` and `maxArchiveBytes`, clamped to the safe
|
|
89
|
+
integer maximum. Every native pass receives that same cap and charges headers,
|
|
90
|
+
metadata, bodies, padding, EOF blocks, and trailing zeros. It rejects overflow
|
|
91
|
+
with `archive-decoded-size-exceeds-limit`; no ratio policy is implied.
|
|
92
|
+
Extraction and entry reads drain the metered reader through physical EOF after
|
|
93
|
+
admitted-range replay. Trailing framing or decoded-limit failures propagate before
|
|
94
|
+
directory modes are finalized, staging is published, or selected bytes return.
|
|
95
|
+
Native gzip uses the existing flate2 member decoder with an explicit bounded
|
|
96
|
+
member/padding transition; JavaScript retains Node gunzip and validates its
|
|
97
|
+
unconsumed compressed suffix. Only all-zero physical padding after a complete
|
|
98
|
+
validated trailer is accepted, still within the original archive-byte budget.
|
|
99
|
+
Native reads stop at framing boundaries so a rejected header does not request
|
|
100
|
+
its body from the decoder; codec buffering can still read ahead internally.
|
|
101
|
+
Inspection finishes the complete bounded framing pass before returning its manifest. Directory
|
|
102
|
+
and link bodies, missing two-block EOF, and nonzero trailers reject on both
|
|
103
|
+
backends, as detailed in [raw TAR framing](archive.md#raw-tar-framing). Raw and
|
|
104
|
+
padded sizes above JavaScript's safe-integer maximum reject as invalid framing
|
|
105
|
+
before applying member budgets, including when local PAX overrides the size.
|
|
106
|
+
|
|
107
|
+
## Publication and hashing
|
|
108
|
+
|
|
109
|
+
Exclusive publication tries a hardlink, then a copy-on-write clone, Linux
|
|
110
|
+
`copy_file_range`, and finally the existing asynchronous JavaScript byte loop.
|
|
111
|
+
All routes preserve `wx` semantics and the same source/target identity and
|
|
112
|
+
SHA-256 fencing. Native hashing and Linux whole-file copying run on N-API async
|
|
113
|
+
workers rather than the JavaScript event loop.
|
|
114
|
+
|
|
115
|
+
## Mode semantics
|
|
116
|
+
|
|
117
|
+
| Mode | Native loading | Fallback |
|
|
118
|
+
|---|---|---|
|
|
119
|
+
| `auto` | Try once, cache the result | Use guarded JavaScript when unavailable |
|
|
120
|
+
| `require` | Try once, cache the result | Throw `FsSafeError("helper-unavailable")` |
|
|
121
|
+
| `off` | Never attempt a binding load | Always use guarded JavaScript |
|
|
122
|
+
|
|
123
|
+
Features without a safe JavaScript implementation, including zstd/bzip2 TAR,
|
|
124
|
+
Windows private-directory creation, and [retained-directory staging](staged-file.md),
|
|
125
|
+
fail with `helper-unavailable` when native support is absent or off. Staging
|
|
126
|
+
is currently Linux/macOS only and rejects Windows with `unsupported-platform`.
|
|
127
|
+
|
|
128
|
+
The staged-file owner also serves POSIX native pinned writes, including streaming.
|
|
129
|
+
Unpublished files remain at `0600`; requested modes are applied through the
|
|
130
|
+
owned file descriptor only after rename and published-entry identity validation.
|
|
131
|
+
Post-rename chmod or sync failures retain the publication receipt and final name.
|
|
132
|
+
Its direct-child exclusive `openat` hands off the descriptor before any fallible
|
|
133
|
+
post-open checks; non-following `statat` compares against that descriptor with
|
|
134
|
+
exact native identities, and cleanup uses `unlinkat` in the retained parent.
|
|
135
|
+
The separate checks and unlink are not atomic conditional deletion. Windows
|
|
136
|
+
pinned writes and other fallback-capable APIs retain their existing mechanisms.
|
|
137
|
+
Native writers share root and parent admission, but keep their platform identity
|
|
138
|
+
checks and leaf ownership. POSIX coordinator disposal uses `SuppressedError` to
|
|
139
|
+
retain both an operation failure and a disposal failure, including their receipts;
|
|
140
|
+
stage preparation and cleanup keep their documented error mappings.
|
|
141
|
+
Root replacement verification borrows the published descriptor after final mode
|
|
142
|
+
application, while a private coordinator retains the staged owner until the
|
|
143
|
+
asynchronous check finishes. The owner never escapes that coordinator; public
|
|
144
|
+
staging methods and receipts expose no descriptor or verification callback.
|
|
145
|
+
Verification failures preserve the published name, and disposal still retains
|
|
146
|
+
both verification and cleanup errors when both fail.
|
|
147
|
+
The private verification channel carries exact bigint identity from the original
|
|
148
|
+
owned descriptor (or the content-accepted FUSE descriptor). Root compares it
|
|
149
|
+
against exact fd and pathname metadata; legacy helper return facts and public
|
|
150
|
+
read metadata behavior are unchanged. Missing Windows pathname identity still
|
|
151
|
+
requires a guarded path reopen and comparison with the original retained file;
|
|
152
|
+
that fallback does not apply to POSIX no-read modes.
|
|
153
|
+
|
|
154
|
+
## JavaScript fallback guarantees and delta
|
|
155
|
+
|
|
156
|
+
Public policy does not change with the selected mechanism: traversal and link
|
|
157
|
+
rejection, archive filters/limits/modes, exclusive target creation, source and
|
|
158
|
+
target identity fencing, publication cleanup receipts, and secret/lock policy
|
|
159
|
+
remain TypeScript-owned. What changes is the syscall strength or availability:
|
|
160
|
+
|
|
161
|
+
| Capability | Native path | Guarded JavaScript path |
|
|
162
|
+
|---|---|---|
|
|
163
|
+
| Root-relative opens/mutations | Descriptor-relative beneath operations. Pinned writes create parents and publish both replacement and no-replace targets relative to open directory descriptors. Linux reports `kernel-atomic`; macOS and Windows report `best-effort`. macOS uses `O_RESOLVE_BENEATH` when available plus an `F_GETPATH` detector, while Windows rejects reparse traversal in the object-manager call. | Reports `best-effort`: component-wise alias checks, no-follow opens where Node exposes them, private temp/rename, and post-operation identity verification. A same-privilege peer can replace a writable parent after a guard assertion but before Node resolves the pathname mutation; the mutation may land outside the intended root before the post-check detects it. |
|
|
164
|
+
| ZIP/TAR/gzip | Rust streaming decode and fd-relative output creation. | Optional JSZip or bundled WASM TAR into guarded private staging, then the same guarded merge policy. |
|
|
165
|
+
| Zstd/bzip2 TAR | Supported. | Unsupported; typed `helper-unavailable`. |
|
|
166
|
+
| Publication copy | Clone, Linux `copy_file_range`, async native SHA-256. | Exclusive `wx` byte loop and Node SHA-256 with the same content/identity fences. |
|
|
167
|
+
| `rename-noreplace` | Atomic platform no-replace rename. | Unsupported; no emulation by check-then-rename. |
|
|
168
|
+
| Windows DACL read | Direct `GetSecurityInfo`; the public facts API exposes ordered basic allow/deny ACE SIDs, masks, and decoded flags without trust policy. | Established .NET/`icacls` inspection fallback for coarse permission checks; raw ACE facts are native-only. |
|
|
169
|
+
| Windows private directory | Creation-time protected DACL. | Unsupported; no weaker pathname-only substitute. |
|
|
170
|
+
|
|
171
|
+
Use `off` in CI to keep the fallback contract exercised. Use `require` when a
|
|
172
|
+
deployment depends on the stronger mechanism or a native-only feature; do not
|
|
173
|
+
infer native loading from timing.
|
|
174
|
+
|
|
175
|
+
## Loader security
|
|
176
|
+
|
|
177
|
+
Importing fs-safe never executes a child process. Linux libc selection uses
|
|
178
|
+
the Node process report, conventional musl library filenames, and the ELF
|
|
179
|
+
`PT_INTERP` field of `process.execPath`. If all probes are inconclusive, the
|
|
180
|
+
loader conservatively attempts the glibc package and lets normal module loading
|
|
181
|
+
fail into `auto` fallback. The loader requires only the package selected from
|
|
182
|
+
the detected target; it never probes unrelated packages, downloads code, or
|
|
183
|
+
runs a postinstall step. A missing or incompatible binary
|
|
184
|
+
silently selects the JavaScript fallback in `auto`, throws typed
|
|
185
|
+
`helper-unavailable` in `require`, and is never inspected in `off`. Tests reject
|
|
186
|
+
`child_process`, `exec`, or `spawn` usage in the loader.
|
|
187
|
+
|
|
188
|
+
## Related pages
|
|
189
|
+
|
|
190
|
+
- [Native helper policy](native-helper.md)
|
|
191
|
+
- [Security model](security-model.md)
|
|
192
|
+
- [Archive extraction](archive.md)
|
|
193
|
+
- [Durability](durability.md)
|
|
194
|
+
- [Permissions](permissions.md)
|
|
195
|
+
- [Migrating to 0.5](migrating-to-0.5.md)
|
|
196
|
+
- [Migrating to 0.6](migrating-to-0.6.md)
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
# External outputs
|
|
2
|
+
|
|
3
|
+
`@openclaw/fs-safe/output` covers the case where another library insists on
|
|
4
|
+
writing to an absolute path you give it. Browser downloads, renderers, media
|
|
5
|
+
tools, and native libraries often have this shape:
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import { writeExternalFileWithinRoot } from "@openclaw/fs-safe/output";
|
|
9
|
+
|
|
10
|
+
await writeExternalFileWithinRoot({
|
|
11
|
+
rootDir: "/srv/workspace/downloads",
|
|
12
|
+
path: "reports/today.pdf",
|
|
13
|
+
write: async (filePath) => {
|
|
14
|
+
await download.saveAs(filePath);
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
The external writer receives a staged path instead of the final destination.
|
|
20
|
+
The default private-workspace mode finalizes through `Root.copyIn()`. An
|
|
21
|
+
opt-in sibling mode stages in the destination directory and atomically renames
|
|
22
|
+
the completed file over the target.
|
|
23
|
+
|
|
24
|
+
## Signature
|
|
25
|
+
|
|
26
|
+
```ts
|
|
27
|
+
function writeExternalFileWithinRoot<T = void>(
|
|
28
|
+
options: ExternalFileWriteOptions<T>,
|
|
29
|
+
): Promise<ExternalFileWriteResult<T>>;
|
|
30
|
+
|
|
31
|
+
type ExternalFileWriteOptions<T = void> = {
|
|
32
|
+
rootDir: string;
|
|
33
|
+
path: string; // relative or absolute, but must stay under rootDir
|
|
34
|
+
write: (filePath: string) => Promise<T>;
|
|
35
|
+
maxBytes?: number;
|
|
36
|
+
mode?: number;
|
|
37
|
+
staging?: "workspace" | "sibling"; // default: "workspace"
|
|
38
|
+
fallbackFileName?: string; // safe staged-name fallback
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
type ExternalFileWriteResult<T = void> = {
|
|
42
|
+
path: string; // final absolute path under the canonical root
|
|
43
|
+
result: T; // value returned by write()
|
|
44
|
+
};
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
The requested `path` must name a file. Missing destination parents are created
|
|
48
|
+
by the helper because the operation is "produce this output file under the
|
|
49
|
+
root"; callers should choose the filename before calling this API.
|
|
50
|
+
|
|
51
|
+
`maxBytes` must be a non-negative safe integer or positive `Infinity`; zero is an active cap and `Infinity` disables it. Invalid values reject before the producer or filesystem staging runs.
|
|
52
|
+
|
|
53
|
+
Use `maxBytes` when the external producer can create arbitrarily large files,
|
|
54
|
+
and `mode` when the finalized file needs a specific POSIX mode. Both staging
|
|
55
|
+
modes enforce them after the producer returns and before committing the target.
|
|
56
|
+
Requested basenames containing C0/C1 controls or Windows-invalid characters go
|
|
57
|
+
through the package's filename sanitizer; `fallbackFileName` supplies the name
|
|
58
|
+
when nothing remains. This removes traversal, device-name, and invalid-character
|
|
59
|
+
hazards but does not trim Windows-normalized trailing dots or spaces; reject or
|
|
60
|
+
rewrite those when cross-platform filename uniqueness matters.
|
|
61
|
+
`staging: "workspace"` passes the sanitized basename to the producer.
|
|
62
|
+
`staging: "sibling"` embeds that basename in its randomized temporary name.
|
|
63
|
+
When the complete temporary component would exceed 255 bytes under NFC or NFD,
|
|
64
|
+
only the embedded tail is shortened, preserving its extension when possible;
|
|
65
|
+
short callback paths remain unchanged. The final target and returned `path` use
|
|
66
|
+
the destination basename, sanitized
|
|
67
|
+
when needed as described above. Guarded temporary files used only inside
|
|
68
|
+
fs-safe have independent names so their length does not grow with the
|
|
69
|
+
destination basename.
|
|
70
|
+
|
|
71
|
+
## Choosing a staging mode
|
|
72
|
+
|
|
73
|
+
`staging: "workspace"` is the default. The producer writes in private temp
|
|
74
|
+
storage, then fs-safe copies through the guarded root boundary. Choose it when
|
|
75
|
+
the temp and destination filesystems may differ, or when an externally produced
|
|
76
|
+
partial file must never appear in the destination directory. The final target
|
|
77
|
+
still appears only after guarded finalization.
|
|
78
|
+
|
|
79
|
+
`staging: "sibling"` gives the producer a randomized temp path in the target
|
|
80
|
+
directory. Choose it only when that directory itself is the approved writable
|
|
81
|
+
boundary and same-filesystem atomic replacement is required. After the callback
|
|
82
|
+
returns, fs-safe pins and validates the staged regular file, rejects hardlinks
|
|
83
|
+
and size-limit violations, applies `mode`, fsyncs it, and atomically renames it
|
|
84
|
+
over the target. Existing files and symlink entries are replaced without
|
|
85
|
+
following their contents or referents. The parent identity is guarded across
|
|
86
|
+
the operation and the parent directory is synchronized best-effort after
|
|
87
|
+
rename. If an error leaves the sibling temp in place and immediate cleanup
|
|
88
|
+
fails, its verified identity remains registered for a best-effort process-exit
|
|
89
|
+
cleanup retry.
|
|
90
|
+
|
|
91
|
+
Sibling staging shares the [callback sibling owner](temp.md#sibling-temp-writes):
|
|
92
|
+
it checks exact pre-open, descriptor, and current-path identities, retains the
|
|
93
|
+
descriptor through publication, and never chmods or reads a replacement by path.
|
|
94
|
+
Cleanup preserves unverified paths, including partial output when the callback
|
|
95
|
+
throws before admission. Native-off and Windows operation remain supported with
|
|
96
|
+
the platform limits and non-atomic rename/unlink identity checks described there.
|
|
97
|
+
When `mode` is omitted, output-sibling staging preserves the producer's mode.
|
|
98
|
+
|
|
99
|
+
## Why not pass the final path to the library?
|
|
100
|
+
|
|
101
|
+
If a target parent can be swapped after validation, handing an external library
|
|
102
|
+
the final path can make the library write outside the intended root before
|
|
103
|
+
fs-safe has a chance to finalize or reject the operation. Workspace staging
|
|
104
|
+
keeps the trust-boundary write inside fs-safe's root-aware copy/atomic-write
|
|
105
|
+
path. Sibling staging intentionally shifts the writable boundary to the
|
|
106
|
+
destination directory, while keeping pathname validation, staged-file identity
|
|
107
|
+
checks, and the final rename under fs-safe's control.
|
|
108
|
+
|
|
109
|
+
## Browser download example
|
|
110
|
+
|
|
111
|
+
```ts
|
|
112
|
+
const outputPath = requestedOutputPath || sanitizeBrowserSuggestedName(suggestedFilename);
|
|
113
|
+
|
|
114
|
+
await writeExternalFileWithinRoot({
|
|
115
|
+
rootDir: downloadsRoot,
|
|
116
|
+
path: outputPath,
|
|
117
|
+
maxBytes: 512 * 1024 * 1024,
|
|
118
|
+
write: async (filePath) => {
|
|
119
|
+
await download.saveAs(filePath);
|
|
120
|
+
},
|
|
121
|
+
});
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
The chosen path may be absolute if it is already inside `downloadsRoot`, or
|
|
125
|
+
relative to `downloadsRoot`. Traversal, symlink parent escapes, hardlinked final
|
|
126
|
+
targets, over-large staged files, and missing temp files surface as
|
|
127
|
+
`FsSafeError`s.
|
|
128
|
+
|
|
129
|
+
This helper is not the right fit when the final filename depends on inspecting
|
|
130
|
+
the produced bytes. In that case, write to a private temp workspace, sniff or
|
|
131
|
+
validate the file, choose the final name, then copy or write into the root with
|
|
132
|
+
the normal root APIs.
|
|
133
|
+
|
|
134
|
+
## See also
|
|
135
|
+
|
|
136
|
+
- [Root writes](writing.md) — `write`, `copyIn`, `move`, and `mkdir`.
|
|
137
|
+
- [Temp workspaces](temp.md) — private scratch directories for longer workflows.
|
|
138
|
+
- [`pathScope()`](path-scope.md) — validation-only helper when you must pass an
|
|
139
|
+
absolute path directly to another library.
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
# pathScope()
|
|
2
|
+
|
|
3
|
+
`pathScope()` is an advanced helper with the same boundary semantics as `root()`, but it operates on **absolute paths** the caller already trusts and returns plain `{ ok, path }` results instead of throwing. Use it when you want the boundary check up front before handing an absolute path to another library.
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
import { pathScope } from "@openclaw/fs-safe/advanced";
|
|
7
|
+
|
|
8
|
+
const uploads = pathScope("/srv/uploads", { label: "uploads directory" });
|
|
9
|
+
|
|
10
|
+
const photo = uploads.resolve("user/photo.jpg");
|
|
11
|
+
if (!photo.ok) throw new Error(photo.error);
|
|
12
|
+
|
|
13
|
+
await sharp(photo.path).resize(800).toFile(/* … */);
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## When to reach for it
|
|
17
|
+
|
|
18
|
+
`root()` is the right answer when you want method-style I/O (`fs.write`, `fs.readText`). `pathScope()` is the right answer when:
|
|
19
|
+
|
|
20
|
+
- You're handing absolute paths to **other libraries** that take absolute path strings (Sharp, FFmpeg, `tar`, native modules) and just want the boundary check up front.
|
|
21
|
+
- You want to validate user-supplied paths in bulk and return a typed `Result` rather than catching exceptions.
|
|
22
|
+
- You want the scope's `label` to appear in the error message: `"Invalid path: must stay within uploads directory"`.
|
|
23
|
+
|
|
24
|
+
## Signature
|
|
25
|
+
|
|
26
|
+
```ts
|
|
27
|
+
import type { FsSafeError } from "@openclaw/fs-safe/errors";
|
|
28
|
+
|
|
29
|
+
function pathScope(rootDir: string, options: PathScopeOptions): PathScope;
|
|
30
|
+
|
|
31
|
+
type PathScopeOptions = {
|
|
32
|
+
label: string; // appears in error messages
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
type PathScopeResolveOptions = {
|
|
36
|
+
defaultName?: string; // used when the requested path is empty
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
type PathResult = { ok: true; path: string } | { ok: false; error: string };
|
|
40
|
+
type PathsResult = { ok: true; paths: string[] } | { ok: false; error: string };
|
|
41
|
+
// Illustrative result alias, not a named package export.
|
|
42
|
+
type DirectoryResult =
|
|
43
|
+
| { ok: true; path: string }
|
|
44
|
+
| { ok: false; error: string; diagnostic?: FsSafeError };
|
|
45
|
+
|
|
46
|
+
type PathScope = {
|
|
47
|
+
rootDir: string;
|
|
48
|
+
label: string;
|
|
49
|
+
resolve(requestedPath: string, options?: PathScopeResolveOptions): PathResult;
|
|
50
|
+
resolveAll(requestedPaths: string[]): PathsResult;
|
|
51
|
+
existing(requestedPaths: string[]): Promise<PathsResult>;
|
|
52
|
+
files(requestedPaths: string[]): Promise<PathsResult>;
|
|
53
|
+
writable(requestedPath: string, options?: PathScopeResolveOptions): Promise<PathResult>;
|
|
54
|
+
ensureDir(requestedPath: string, options?: PathScopeResolveOptions & { mode?: number }): Promise<DirectoryResult>;
|
|
55
|
+
};
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Methods
|
|
59
|
+
|
|
60
|
+
### `resolve(rel, options?)`
|
|
61
|
+
|
|
62
|
+
Synchronous, lexical only — no filesystem touch. Resolves the relative path against `rootDir` and verifies the result stays inside the scope. Use when you only need the path string:
|
|
63
|
+
|
|
64
|
+
```ts
|
|
65
|
+
const r = uploads.resolve("user/photo.jpg");
|
|
66
|
+
if (!r.ok) return reply(400, r.error);
|
|
67
|
+
console.log(r.path); // /srv/uploads/user/photo.jpg
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
If the requested path is empty, `defaultName` (when set) is used.
|
|
71
|
+
|
|
72
|
+
### `resolveAll(rels)`
|
|
73
|
+
|
|
74
|
+
Synchronous bulk resolve. Returns `{ ok: true, paths }` if every input is in scope, or `{ ok: false, error }` on the first failure.
|
|
75
|
+
|
|
76
|
+
### `existing(rels)`
|
|
77
|
+
|
|
78
|
+
Async. Like `resolveAll`, but additionally allows trusted absolute paths whose `realpath` is inside the scope. Useful when callers pass either a relative path or an absolute path you've already validated.
|
|
79
|
+
|
|
80
|
+
### `files(rels)`
|
|
81
|
+
|
|
82
|
+
Async. Strict variant: every input must already exist as a regular file inside the scope, with `nlink === 1`. Symlinked entries are rejected.
|
|
83
|
+
|
|
84
|
+
### `writable(rel, options?)`
|
|
85
|
+
|
|
86
|
+
Async. Resolves a writable target: requires the parent directory to already
|
|
87
|
+
exist canonically inside the scope, refuses targets whose existing inode is a
|
|
88
|
+
symlink or hardlinked, and returns the absolute path to use for the write. Use
|
|
89
|
+
`ensureDir()` first when the parent needs to be created.
|
|
90
|
+
|
|
91
|
+
```ts
|
|
92
|
+
const t = await uploads.writable("reports/2026/05/report.pdf");
|
|
93
|
+
if (!t.ok) return reply(400, t.error);
|
|
94
|
+
await fs.writeFile(t.path, body);
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### `ensureDir(rel, options?)`
|
|
98
|
+
|
|
99
|
+
Async. `mkdir -p` inside the scope. Walks each segment, refuses any symlink in the path, creates missing directories. Optional `mode` sets the directory mode.
|
|
100
|
+
|
|
101
|
+
Failures remain nonthrowing results with `error: string`. Policy rejections
|
|
102
|
+
(including traversal, NUL input, symlinks and non-directory segments) omit
|
|
103
|
+
`diagnostic`. Operational failures from `lstat`, `realpath` or `mkdir` include
|
|
104
|
+
an `FsSafeError` with `code: "helper-failed"`, `category: "operational"`, and
|
|
105
|
+
the exact original error in `cause`, including its native `code`, `errno` and
|
|
106
|
+
`syscall` when available. Only `ensureDir()` adds this diagnostic; other scope
|
|
107
|
+
methods retain their existing result shapes.
|
|
108
|
+
|
|
109
|
+
`error` equals `diagnostic.message` for operational failures, for example
|
|
110
|
+
`"Could not prepare uploads directory: ENAMETOOLONG during lstat"`. Display
|
|
111
|
+
text bounds and escapes the label and native code/syscall, without copying
|
|
112
|
+
the requested path or native error message. Treat the raw cause as sensitive
|
|
113
|
+
local diagnostic data, not as text to return to an untrusted caller. A failure
|
|
114
|
+
can leave already-created parent directories; it does not roll them back or
|
|
115
|
+
retry through an unchecked filesystem path.
|
|
116
|
+
|
|
117
|
+
```ts
|
|
118
|
+
const dir = await uploads.ensureDir("inbox", { mode: 0o755 });
|
|
119
|
+
if (!dir.ok) {
|
|
120
|
+
// Pass the cause only to an appropriately restricted local diagnostic sink.
|
|
121
|
+
if (dir.diagnostic) recordLocalFailure(dir.diagnostic.cause);
|
|
122
|
+
return reply(dir.diagnostic ? 500 : 400, dir.error);
|
|
123
|
+
}
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## Result type vs throwing
|
|
127
|
+
|
|
128
|
+
`pathScope` returns `{ ok: true, path }` / `{ ok: false, error }` instead of throwing. This makes it pleasant to use at validation boundaries:
|
|
129
|
+
|
|
130
|
+
```ts
|
|
131
|
+
function handle(req: Req, res: Res) {
|
|
132
|
+
const r = uploads.resolve(req.body.path);
|
|
133
|
+
if (!r.ok) return res.status(400).json({ error: r.error });
|
|
134
|
+
return doWork(r.path);
|
|
135
|
+
}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
For exception-flavored APIs, use `root()` instead — it throws `FsSafeError` with a typed `code`.
|
|
139
|
+
|
|
140
|
+
## Combine with `root()`
|
|
141
|
+
|
|
142
|
+
A common pattern at the edge of an HTTP handler: validate the input with `pathScope`, do the I/O with `root()`:
|
|
143
|
+
|
|
144
|
+
```ts
|
|
145
|
+
const uploads = pathScope("/srv/uploads", { label: "uploads" });
|
|
146
|
+
const fs = await root("/srv/uploads", { hardlinks: "reject" });
|
|
147
|
+
|
|
148
|
+
const r = uploads.resolve(req.body.path);
|
|
149
|
+
if (!r.ok) return reply(400, r.error);
|
|
150
|
+
const rel = path.relative(fs.rootReal, r.path);
|
|
151
|
+
|
|
152
|
+
const text = await fs.readText(rel);
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## See also
|
|
156
|
+
|
|
157
|
+
- [`root()`](root.md) — method-style boundary that throws on failure.
|
|
158
|
+
- [Path helpers](path.md) — `isPathInside`, `safeRealpathSync`, `isWithinDir` for ad-hoc checks.
|
|
159
|
+
- [Errors](errors.md) — error semantics (note: `pathScope` returns errors, doesn't throw).
|