toolcraft 0.0.749 → 0.0.751
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/composition.json +23 -3
- package/dist/composition.json +23 -3
- package/dist/human-in-loop/approvals-commands.d.ts +1 -1
- package/dist/index.d.ts +1 -262
- package/dist/index.js +1 -573
- package/dist/runtime-platform.d.ts +2 -0
- package/dist/runtime-platform.js +2 -0
- package/dist/runtime-platform.workerd.d.ts +3 -0
- package/dist/runtime-platform.workerd.js +10 -0
- package/dist/runtime.d.ts +262 -0
- package/dist/runtime.js +576 -0
- package/node_modules/@noble/hashes/LICENSE +21 -0
- package/node_modules/@noble/hashes/README.md +478 -0
- package/node_modules/@noble/hashes/_blake.d.ts +20 -0
- package/node_modules/@noble/hashes/_blake.js +59 -0
- package/node_modules/@noble/hashes/_md.d.ts +95 -0
- package/node_modules/@noble/hashes/_md.js +209 -0
- package/node_modules/@noble/hashes/_u64.d.ts +36 -0
- package/node_modules/@noble/hashes/_u64.js +77 -0
- package/node_modules/@noble/hashes/argon2.d.ts +148 -0
- package/node_modules/@noble/hashes/argon2.js +577 -0
- package/node_modules/@noble/hashes/blake1.d.ts +162 -0
- package/node_modules/@noble/hashes/blake1.js +630 -0
- package/node_modules/@noble/hashes/blake2.d.ts +203 -0
- package/node_modules/@noble/hashes/blake2.js +573 -0
- package/node_modules/@noble/hashes/blake3.d.ts +68 -0
- package/node_modules/@noble/hashes/blake3.js +310 -0
- package/node_modules/@noble/hashes/eskdf.d.ts +91 -0
- package/node_modules/@noble/hashes/eskdf.js +225 -0
- package/node_modules/@noble/hashes/hkdf.d.ts +70 -0
- package/node_modules/@noble/hashes/hkdf.js +152 -0
- package/node_modules/@noble/hashes/hmac.d.ts +50 -0
- package/node_modules/@noble/hashes/hmac.js +93 -0
- package/node_modules/@noble/hashes/index.d.ts +1 -0
- package/node_modules/@noble/hashes/index.js +34 -0
- package/node_modules/@noble/hashes/legacy.d.ts +107 -0
- package/node_modules/@noble/hashes/legacy.js +348 -0
- package/node_modules/@noble/hashes/package.json +91 -0
- package/node_modules/@noble/hashes/pbkdf2.d.ts +66 -0
- package/node_modules/@noble/hashes/pbkdf2.js +176 -0
- package/node_modules/@noble/hashes/scrypt.d.ts +98 -0
- package/node_modules/@noble/hashes/scrypt.js +304 -0
- package/node_modules/@noble/hashes/sha2.d.ts +176 -0
- package/node_modules/@noble/hashes/sha2.js +446 -0
- package/node_modules/@noble/hashes/sha3-addons.d.ts +533 -0
- package/node_modules/@noble/hashes/sha3-addons.js +973 -0
- package/node_modules/@noble/hashes/sha3.d.ts +208 -0
- package/node_modules/@noble/hashes/sha3.js +475 -0
- package/node_modules/@noble/hashes/src/_blake.ts +67 -0
- package/node_modules/@noble/hashes/src/_md.ts +227 -0
- package/node_modules/@noble/hashes/src/_u64.ts +111 -0
- package/node_modules/@noble/hashes/src/argon2.ts +693 -0
- package/node_modules/@noble/hashes/src/blake1.ts +677 -0
- package/node_modules/@noble/hashes/src/blake2.ts +648 -0
- package/node_modules/@noble/hashes/src/blake3.ts +344 -0
- package/node_modules/@noble/hashes/src/eskdf.ts +265 -0
- package/node_modules/@noble/hashes/src/hkdf.ts +161 -0
- package/node_modules/@noble/hashes/src/hmac.ts +130 -0
- package/node_modules/@noble/hashes/src/index.ts +33 -0
- package/node_modules/@noble/hashes/src/legacy.ts +361 -0
- package/node_modules/@noble/hashes/src/pbkdf2.ts +219 -0
- package/node_modules/@noble/hashes/src/scrypt.ts +375 -0
- package/node_modules/@noble/hashes/src/sha2.ts +486 -0
- package/node_modules/@noble/hashes/src/sha3-addons.ts +1157 -0
- package/node_modules/@noble/hashes/src/sha3.ts +525 -0
- package/node_modules/@noble/hashes/src/utils.ts +978 -0
- package/node_modules/@noble/hashes/src/webcrypto.ts +283 -0
- package/node_modules/@noble/hashes/utils.d.ts +560 -0
- package/node_modules/@noble/hashes/utils.js +687 -0
- package/node_modules/@noble/hashes/webcrypto.d.ts +121 -0
- package/node_modules/@noble/hashes/webcrypto.js +228 -0
- package/node_modules/@poe-code/agent-mcp-config/dist/apply.js +23 -9
- package/node_modules/@poe-code/config-mutations/README.md +2 -0
- package/node_modules/@poe-code/config-mutations/dist/execution/apply-mutation.js +4 -5
- package/node_modules/@poe-code/config-mutations/dist/execution/path-utils.d.ts +3 -4
- package/node_modules/@poe-code/config-mutations/dist/execution/path-utils.js +3 -3
- package/node_modules/@poe-code/config-mutations/dist/template/render.js +1 -1
- package/node_modules/@poe-code/config-mutations/dist/testing/mock-fs.d.ts +2 -2
- package/node_modules/@poe-code/config-mutations/dist/testing/mock-fs.js +3 -6
- package/node_modules/@poe-code/config-mutations/dist/types.d.ts +4 -2
- package/node_modules/@poe-code/process-runner/README.md +2 -1
- package/node_modules/@poe-code/process-runner/dist/transfer-filesystem.d.ts +1 -0
- package/node_modules/@poe-code/process-runner/dist/transfer-filesystem.js +1 -0
- package/node_modules/@poe-code/process-runner/dist/transfer-filesystem.workerd.d.ts +2 -0
- package/node_modules/@poe-code/process-runner/dist/transfer-filesystem.workerd.js +1 -0
- package/node_modules/@poe-code/process-runner/dist/types.d.ts +1 -1
- package/node_modules/@poe-code/process-runner/dist/workspace-transfer.d.ts +6 -5
- package/node_modules/@poe-code/process-runner/dist/workspace-transfer.js +67 -29
- package/node_modules/@poe-code/process-runner/package.json +13 -0
- package/node_modules/@poe-code/safe-fs/LICENSE +21 -0
- package/node_modules/@poe-code/safe-fs/PROVENANCE.json +428 -0
- package/node_modules/@poe-code/safe-fs/README.md +411 -0
- package/node_modules/@poe-code/safe-fs/dist/bridge/confinement.d.ts +3 -0
- package/node_modules/@poe-code/safe-fs/dist/bridge/confinement.js +171 -0
- package/node_modules/@poe-code/safe-fs/dist/bridge/filesystem.d.ts +93 -0
- package/node_modules/@poe-code/safe-fs/dist/bridge/filesystem.js +453 -0
- package/node_modules/@poe-code/safe-fs/dist/bridge/index.d.ts +7 -0
- package/node_modules/@poe-code/safe-fs/dist/bridge/index.js +19 -0
- package/node_modules/@poe-code/safe-fs/dist/bridge/stats.d.ts +4 -0
- package/node_modules/@poe-code/safe-fs/dist/bridge/stats.js +37 -0
- package/node_modules/@poe-code/safe-fs/dist/bridge/types.d.ts +81 -0
- package/node_modules/@poe-code/safe-fs/dist/bridge/types.js +1 -0
- package/node_modules/@poe-code/safe-fs/dist/bridge/values.d.ts +6 -0
- package/node_modules/@poe-code/safe-fs/dist/bridge/values.js +65 -0
- package/node_modules/@poe-code/safe-fs/dist/config/memory.d.ts +3 -0
- package/node_modules/@poe-code/safe-fs/dist/config/memory.js +7 -0
- package/node_modules/@poe-code/safe-fs/dist/config/real.d.ts +5 -0
- package/node_modules/@poe-code/safe-fs/dist/config/real.js +16 -0
- package/node_modules/@poe-code/safe-fs/dist/config/registry.d.ts +2 -0
- package/node_modules/@poe-code/safe-fs/dist/config/registry.js +15 -0
- package/node_modules/@poe-code/safe-fs/dist/config.d.ts +15 -0
- package/node_modules/@poe-code/safe-fs/dist/config.js +46 -0
- package/node_modules/@poe-code/safe-fs/dist/config.node.d.ts +2 -0
- package/node_modules/@poe-code/safe-fs/dist/config.node.js +11 -0
- package/node_modules/@poe-code/safe-fs/dist/config.portable.d.ts +3 -0
- package/node_modules/@poe-code/safe-fs/dist/config.portable.js +9 -0
- package/node_modules/@poe-code/safe-fs/dist/contracts/abort.d.ts +5 -0
- package/node_modules/@poe-code/safe-fs/dist/contracts/abort.js +34 -0
- package/node_modules/@poe-code/safe-fs/dist/contracts/cleanup.d.ts +1 -0
- package/node_modules/@poe-code/safe-fs/dist/contracts/cleanup.js +9 -0
- package/node_modules/@poe-code/safe-fs/dist/contracts/descriptor.d.ts +38 -0
- package/node_modules/@poe-code/safe-fs/dist/contracts/descriptor.js +1 -0
- package/node_modules/@poe-code/safe-fs/dist/contracts/errors.d.ts +53 -0
- package/node_modules/@poe-code/safe-fs/dist/contracts/errors.js +99 -0
- package/node_modules/@poe-code/safe-fs/dist/contracts/filesystem.d.ts +379 -0
- package/node_modules/@poe-code/safe-fs/dist/contracts/filesystem.js +1 -0
- package/node_modules/@poe-code/safe-fs/dist/contracts/index.d.ts +6 -0
- package/node_modules/@poe-code/safe-fs/dist/contracts/index.js +6 -0
- package/node_modules/@poe-code/safe-fs/dist/contracts/io.d.ts +12 -0
- package/node_modules/@poe-code/safe-fs/dist/contracts/io.js +321 -0
- package/node_modules/@poe-code/safe-fs/dist/contracts/object.d.ts +134 -0
- package/node_modules/@poe-code/safe-fs/dist/contracts/object.js +97 -0
- package/node_modules/@poe-code/safe-fs/dist/contracts/path.d.ts +3 -0
- package/node_modules/@poe-code/safe-fs/dist/contracts/path.js +2 -0
- package/node_modules/@poe-code/safe-fs/dist/contracts/portable-path.d.ts +21 -0
- package/node_modules/@poe-code/safe-fs/dist/contracts/portable-path.js +78 -0
- package/node_modules/@poe-code/safe-fs/dist/contracts/virtual-path.d.ts +15 -0
- package/node_modules/@poe-code/safe-fs/dist/contracts/virtual-path.js +162 -0
- package/node_modules/@poe-code/safe-fs/dist/core.d.ts +19 -0
- package/node_modules/@poe-code/safe-fs/dist/core.js +17 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/capabilities.d.ts +10 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/capabilities.js +216 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/conditional-chmod.d.ts +7 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/conditional-chmod.js +19 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/descriptor.d.ts +21 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/descriptor.js +279 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/devices/index.d.ts +59 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/devices/index.js +875 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/devices/path.d.ts +7 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/devices/path.js +250 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/devices/stream.d.ts +6 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/devices/stream.js +136 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/directory-admission.d.ts +3 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/directory-admission.js +14 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/memory/atomic-view.d.ts +11 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/memory/atomic-view.js +13 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/memory/index.d.ts +186 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/memory/index.js +3771 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/memory/ledger.d.ts +26 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/memory/ledger.js +96 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/memory/limits.d.ts +13 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/memory/limits.js +26 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/memory/missing-target.d.ts +15 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/memory/missing-target.js +144 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/mount/comparison.d.ts +19 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/mount/comparison.js +118 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/mount/identity.d.ts +6 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/mount/identity.js +29 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/mount/index.d.ts +74 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/mount/index.js +1291 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/object-authority.d.ts +27 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/object-authority.js +287 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/object-publication/index.d.ts +45 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/object-publication/index.js +531 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/overlay/index.d.ts +87 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/overlay/index.js +1185 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/overlay/memory-publication.d.ts +42 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/overlay/memory-publication.js +558 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/path-namespace.d.ts +4 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/path-namespace.js +63 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/quota/index.d.ts +12 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/quota/index.js +520 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/readonly/index.d.ts +37 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/readonly/index.js +208 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/real/allocation.d.ts +1 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/real/allocation.js +8 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/real/index.d.ts +105 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/real/index.js +1259 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/s3/authority.d.ts +7 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/s3/authority.js +38 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/s3/filesystem.d.ts +130 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/s3/filesystem.js +1137 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/s3/http/bytes.d.ts +1 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/s3/http/bytes.js +9 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/s3/http/index.d.ts +2 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/s3/http/index.js +1 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/s3/http/request-fetch.d.ts +15 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/s3/http/request-fetch.js +74 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/s3/http/request-node.d.ts +4 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/s3/http/request-node.js +111 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/s3/http/request.d.ts +17 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/s3/http/request.js +89 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/s3/http/signature.d.ts +20 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/s3/http/signature.js +76 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/s3/http/transport.d.ts +3 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/s3/http/transport.js +478 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/s3/http/types.d.ts +30 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/s3/http/types.js +1 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/s3/http/xml.d.ts +14 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/s3/http/xml.js +192 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/s3/index.d.ts +8 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/s3/index.js +4 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/s3/key-order.d.ts +2 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/s3/key-order.js +11 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/s3/manifest-admission.d.ts +8 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/s3/manifest-admission.js +167 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/s3/mock.d.ts +48 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/s3/mock.js +249 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/s3/namespace.d.ts +13 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/s3/namespace.js +400 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/s3/registry.d.ts +10 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/s3/registry.js +73 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/s3/transport.d.ts +103 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/s3/transport.js +28 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/scoped.d.ts +19 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/scoped.js +663 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/staging-ancestry.d.ts +8 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/staging-ancestry.js +115 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/staging-cleanup.d.ts +5 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/staging-cleanup.js +63 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/webdav/index.d.ts +2 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/webdav/index.js +1 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/webdav/resource-id.d.ts +18 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/webdav/resource-id.js +109 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/webdav/webdav.d.ts +141 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/webdav/webdav.js +1377 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/webdav/xml.d.ts +15 -0
- package/node_modules/@poe-code/safe-fs/dist/fs/webdav/xml.js +59 -0
- package/node_modules/@poe-code/safe-fs/dist/index.d.ts +25 -0
- package/node_modules/@poe-code/safe-fs/dist/index.js +21 -0
- package/node_modules/@poe-code/safe-fs/dist/native/fs-seek/linux-x64-glibc.node +0 -0
- package/node_modules/@poe-code/safe-fs/dist/native/fs-seek/loader.d.ts +5 -0
- package/node_modules/@poe-code/safe-fs/dist/native/fs-seek/loader.mjs +120 -0
- package/node_modules/@poe-code/safe-fs/dist/native/fs-seek/manifest.json +46 -0
- package/node_modules/@poe-code/safe-fs/dist/node/filesystem.d.ts +19 -0
- package/node_modules/@poe-code/safe-fs/dist/node/filesystem.js +30 -0
- package/node_modules/@poe-code/safe-fs/dist/node/host.d.ts +3 -0
- package/node_modules/@poe-code/safe-fs/dist/node/host.js +78 -0
- package/node_modules/@poe-code/safe-fs/dist/node/index.d.ts +3 -0
- package/node_modules/@poe-code/safe-fs/dist/node/index.js +2 -0
- package/node_modules/@poe-code/safe-fs/dist/node/native-seek-unavailable.d.ts +1 -0
- package/node_modules/@poe-code/safe-fs/dist/node/native-seek-unavailable.js +5 -0
- package/node_modules/@poe-code/safe-fs/dist/node/native-seek.d.ts +3 -0
- package/node_modules/@poe-code/safe-fs/dist/node/native-seek.js +54 -0
- package/node_modules/@poe-code/safe-fs/dist/node/stats.d.ts +1 -0
- package/node_modules/@poe-code/safe-fs/dist/node/stats.js +1 -0
- package/node_modules/@poe-code/safe-fs/dist/node/values.d.ts +1 -0
- package/node_modules/@poe-code/safe-fs/dist/node/values.js +1 -0
- package/node_modules/@poe-code/safe-fs/dist/node-host.d.ts +1 -0
- package/node_modules/@poe-code/safe-fs/dist/node-host.js +1 -0
- package/node_modules/@poe-code/safe-fs/dist/node-unavailable.d.ts +1 -0
- package/node_modules/@poe-code/safe-fs/dist/node-unavailable.js +1 -0
- package/node_modules/@poe-code/safe-fs/dist/package.json +29 -0
- package/node_modules/@poe-code/safe-fs/dist/platform/browser-path.d.ts +1 -0
- package/node_modules/@poe-code/safe-fs/dist/platform/browser-path.js +1 -0
- package/node_modules/@poe-code/safe-fs/dist/platform/browser.d.ts +26 -0
- package/node_modules/@poe-code/safe-fs/dist/platform/browser.js +58 -0
- package/node_modules/@poe-code/safe-fs/dist/platform/node-path.d.ts +1 -0
- package/node_modules/@poe-code/safe-fs/dist/platform/node-path.js +1 -0
- package/node_modules/@poe-code/safe-fs/dist/platform/node.d.ts +26 -0
- package/node_modules/@poe-code/safe-fs/dist/platform/node.js +64 -0
- package/node_modules/@poe-code/safe-fs/dist/platform/transport-budget.d.ts +9 -0
- package/node_modules/@poe-code/safe-fs/dist/platform/transport-budget.js +17 -0
- package/node_modules/@poe-code/safe-fs/dist/python/emscripten.d.ts +15 -0
- package/node_modules/@poe-code/safe-fs/dist/python/emscripten.js +357 -0
- package/node_modules/@poe-code/safe-fs/dist/python/filesystem.d.ts +51 -0
- package/node_modules/@poe-code/safe-fs/dist/python/filesystem.js +243 -0
- package/node_modules/@poe-code/safe-fs/dist/python/flags.d.ts +3 -0
- package/node_modules/@poe-code/safe-fs/dist/python/flags.js +14 -0
- package/node_modules/@poe-code/safe-fs/dist/python/index.d.ts +9 -0
- package/node_modules/@poe-code/safe-fs/dist/python/index.js +5 -0
- package/node_modules/@poe-code/safe-fs/dist/python/native.d.ts +18 -0
- package/node_modules/@poe-code/safe-fs/dist/python/native.js +446 -0
- package/node_modules/@poe-code/safe-fs/dist/python/request.d.ts +2 -0
- package/node_modules/@poe-code/safe-fs/dist/python/request.js +61 -0
- package/node_modules/@poe-code/safe-fs/dist/python/stat.d.ts +8 -0
- package/node_modules/@poe-code/safe-fs/dist/python/stat.js +34 -0
- package/node_modules/@poe-code/safe-fs/dist/runtime-core.d.ts +27 -0
- package/node_modules/@poe-code/safe-fs/dist/runtime-core.js +57 -0
- package/node_modules/@poe-code/safe-fs/dist/testing/atomic-filesystem.d.ts +16 -0
- package/node_modules/@poe-code/safe-fs/dist/testing/atomic-filesystem.js +496 -0
- package/node_modules/@poe-code/safe-fs/dist/testing/object-io-control.d.ts +23 -0
- package/node_modules/@poe-code/safe-fs/dist/testing/object-io-control.js +39 -0
- package/node_modules/@poe-code/safe-fs/dist/testing/object-io-metrics.d.ts +31 -0
- package/node_modules/@poe-code/safe-fs/dist/testing/object-io-metrics.js +143 -0
- package/node_modules/@poe-code/safe-fs/dist/testing/object-publication.d.ts +19 -0
- package/node_modules/@poe-code/safe-fs/dist/testing/object-publication.js +209 -0
- package/node_modules/@poe-code/safe-fs/dist/xml.d.ts +1 -0
- package/node_modules/@poe-code/safe-fs/dist/xml.js +1 -0
- package/node_modules/@poe-code/safe-fs/package.json +189 -0
- package/node_modules/@poe-code/task-list/README.md +2 -0
- package/node_modules/@poe-code/task-list/dist/backends/gh-issues-client.d.ts +1 -1
- package/node_modules/@poe-code/task-list/dist/backends/gh-issues-client.js +11 -4
- package/node_modules/@poe-code/task-list/dist/backends/markdown-dir.js +2 -2
- package/node_modules/@poe-code/task-list/dist/backends/utils.js +5 -7
- package/node_modules/@poe-code/task-list/dist/backends/yaml-file.js +1 -1
- package/node_modules/@poe-code/task-list/dist/default-host.d.ts +2 -0
- package/node_modules/@poe-code/task-list/dist/default-host.js +2 -0
- package/node_modules/@poe-code/task-list/dist/default-host.workerd.d.ts +4 -0
- package/node_modules/@poe-code/task-list/dist/default-host.workerd.js +6 -0
- package/node_modules/@poe-code/task-list/dist/filesystem.d.ts +3 -0
- package/node_modules/@poe-code/task-list/dist/filesystem.js +32 -0
- package/node_modules/@poe-code/task-list/dist/move.js +3 -3
- package/node_modules/@poe-code/task-list/dist/open.js +2 -5
- package/node_modules/@poe-code/task-list/dist/paths.d.ts +12 -0
- package/node_modules/@poe-code/task-list/dist/paths.js +7 -0
- package/node_modules/@poe-code/task-list/dist/types.d.ts +6 -5
- package/node_modules/@poe-code/task-list/package.json +9 -0
- package/node_modules/@poe-code/terminal-text/LICENSE +21 -0
- package/node_modules/@poe-code/terminal-text/README.md +12 -0
- package/node_modules/@poe-code/terminal-text/dist/index.d.ts +2 -0
- package/node_modules/@poe-code/terminal-text/dist/index.js +20 -0
- package/node_modules/@poe-code/terminal-text/package.json +22 -0
- package/node_modules/@poe-code/xml-ast/LICENSE +21 -0
- package/node_modules/@poe-code/xml-ast/README.md +28 -0
- package/node_modules/@poe-code/xml-ast/dist/index.d.ts +47 -0
- package/node_modules/@poe-code/xml-ast/dist/index.js +635 -0
- package/node_modules/@poe-code/xml-ast/package.json +25 -0
- package/node_modules/auth-store/README.md +35 -0
- package/node_modules/auth-store/dist/index.browser.d.ts +4 -0
- package/node_modules/auth-store/dist/index.browser.js +2 -0
- package/node_modules/auth-store/dist/provider-store.d.ts +1 -1
- package/node_modules/auth-store/dist/safe-fs-secret-store.d.ts +21 -0
- package/node_modules/auth-store/dist/safe-fs-secret-store.js +119 -0
- package/node_modules/auth-store/dist/secret-store.d.ts +12 -0
- package/node_modules/auth-store/dist/secret-store.js +1 -0
- package/node_modules/auth-store/dist/transaction-lock.d.ts +2 -4
- package/node_modules/auth-store/dist/types.d.ts +2 -9
- package/node_modules/auth-store/package.json +16 -2
- package/node_modules/tiny-http-mcp-server/dist/composition.json +16 -1
- package/node_modules/tiny-http-mcp-server/node_modules/mcp-oauth/README.md +25 -0
- package/node_modules/tiny-http-mcp-server/node_modules/mcp-oauth/dist/client/authorization-state.js +4 -4
- package/node_modules/tiny-http-mcp-server/node_modules/mcp-oauth/dist/client/default-oauth-client-provider.js +6 -40
- package/node_modules/tiny-http-mcp-server/node_modules/mcp-oauth/dist/client/oauth-form.d.ts +10 -0
- package/node_modules/tiny-http-mcp-server/node_modules/mcp-oauth/dist/client/oauth-form.js +20 -0
- package/node_modules/tiny-http-mcp-server/node_modules/mcp-oauth/dist/client/pkce.js +4 -3
- package/node_modules/tiny-http-mcp-server/node_modules/mcp-oauth/dist/client/register-client.d.ts +14 -0
- package/node_modules/tiny-http-mcp-server/node_modules/mcp-oauth/dist/client/register-client.js +53 -0
- package/node_modules/tiny-http-mcp-server/node_modules/mcp-oauth/dist/client/resumable.d.ts +16 -2
- package/node_modules/tiny-http-mcp-server/node_modules/mcp-oauth/dist/client/resumable.js +29 -9
- package/node_modules/tiny-http-mcp-server/node_modules/mcp-oauth/dist/client/revoke-token.d.ts +12 -0
- package/node_modules/tiny-http-mcp-server/node_modules/mcp-oauth/dist/client/revoke-token.js +23 -0
- package/node_modules/tiny-http-mcp-server/node_modules/mcp-oauth/dist/client/token-endpoint.js +6 -19
- package/node_modules/tiny-http-mcp-server/node_modules/mcp-oauth/dist/http-fetch.js +1 -1
- package/node_modules/tiny-http-mcp-server/node_modules/mcp-oauth/dist/index.browser.d.ts +6 -2
- package/node_modules/tiny-http-mcp-server/node_modules/mcp-oauth/dist/index.browser.js +5 -1
- package/node_modules/tiny-http-mcp-server/node_modules/mcp-oauth/dist/index.d.ts +5 -2
- package/node_modules/tiny-http-mcp-server/node_modules/mcp-oauth/dist/index.js +4 -1
- package/node_modules/tiny-http-mcp-server/package.json +4 -4
- package/node_modules/tiny-mcp-client/README.md +2 -0
- package/node_modules/tiny-mcp-client/dist/index.browser.d.ts +25 -23
- package/node_modules/tiny-mcp-client/dist/index.browser.js +116 -1
- package/node_modules/tiny-mcp-client/dist/index.d.ts +25 -23
- package/node_modules/tiny-mcp-client/dist/index.js +1034 -561
- package/node_modules/tiny-mcp-client/package.json +15 -0
- package/node_modules/tiny-stdio-mcp-server/dist/composition.json +1 -1
- package/node_modules/toolcraft-design/dist/components/table.js +6 -0
- package/node_modules/toolcraft-design/dist/escape-terminal-text.d.ts +1 -2
- package/node_modules/toolcraft-design/dist/escape-terminal-text.js +1 -20
- package/node_modules/toolcraft-design/dist/terminal-markdown/parser/frontmatter.js +2 -1
- package/node_modules/toolcraft-design/dist/terminal-markdown/parser.js +2 -1
- package/node_modules/toolcraft-schema/dist/json-schema/utils.js +3 -0
- package/node_modules/toolcraft-schema/package.json +1 -1
- package/package.json +32 -7
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { ConditionalWriteFileOptions, ConditionalRemoveFileOptions, RenameOptions, PrepareDirectoryOptions, CreateStagedFileOptions, FileStaging, FileStat, FileSystem, FsOptions, ChmodOptions, PublishStagedFileOptions, StagedFileContent } from "../../contracts/filesystem.js";
|
|
2
|
+
/** Stock Memory mutations commit before returning their promise. No user code or
|
|
3
|
+
* await is allowed between inspecting the two stores and invoking a mutation. */
|
|
4
|
+
export declare class OverlayMemoryPublication {
|
|
5
|
+
private readonly upper;
|
|
6
|
+
private readonly lower;
|
|
7
|
+
private readonly whiteouts;
|
|
8
|
+
private readonly opaque;
|
|
9
|
+
private readonly hidden;
|
|
10
|
+
private readonly receipts;
|
|
11
|
+
private readonly directories;
|
|
12
|
+
private readonly origins;
|
|
13
|
+
private readonly stages;
|
|
14
|
+
private readonly stagingAncestors;
|
|
15
|
+
constructor(upper: FileSystem, lower: FileSystem, whiteouts: Set<string>, opaque: Set<string>, hidden: Set<string>);
|
|
16
|
+
supported(): boolean;
|
|
17
|
+
private stores;
|
|
18
|
+
private path;
|
|
19
|
+
private physical;
|
|
20
|
+
private observation;
|
|
21
|
+
private visible;
|
|
22
|
+
copiedDirectory(path: string, lower: FileStat): void;
|
|
23
|
+
stat(path: string, physical: FileStat): FileStat;
|
|
24
|
+
private same;
|
|
25
|
+
private expect;
|
|
26
|
+
private ancestors;
|
|
27
|
+
private inspect;
|
|
28
|
+
private capture;
|
|
29
|
+
private check;
|
|
30
|
+
prepareChmod(path: string, options: ChmodOptions): (() => true) | undefined;
|
|
31
|
+
prepareWrite(path: string, options: ConditionalWriteFileOptions): () => true;
|
|
32
|
+
writeFile(path: string, data: Uint8Array, options: ConditionalWriteFileOptions, maxBytes: number, guard?: () => void): Promise<FileStat>;
|
|
33
|
+
removeFile(path: string, options: ConditionalRemoveFileOptions): Promise<void>;
|
|
34
|
+
prepareDirectory(path: string, options: PrepareDirectoryOptions, guard?: () => void): Promise<FileStat>;
|
|
35
|
+
prepareRename(source: string, destination: string): () => void;
|
|
36
|
+
rename(source: string, destination: string, options: RenameOptions, guard: () => void): Promise<void>;
|
|
37
|
+
private copyParents;
|
|
38
|
+
create(directory: string, name: string, content: StagedFileContent, options: CreateStagedFileOptions, guard?: () => void): Promise<FileStaging>;
|
|
39
|
+
publish(staging: FileStaging, path: string, options: PublishStagedFileOptions): Promise<void>;
|
|
40
|
+
cleanup(staging: FileStaging, options: FsOptions, retained?: boolean): Promise<void>;
|
|
41
|
+
confine(roots: readonly string[], options: FsOptions, run: <T>(options: FsOptions, operation: () => Promise<T>) => Promise<T>, fs: FileSystem, maxBytes: number): FileSystem;
|
|
42
|
+
}
|
|
@@ -0,0 +1,558 @@
|
|
|
1
|
+
import { FsError, isFsError } from "../../contracts/errors.js";
|
|
2
|
+
import { dirname, isPathWithin, validatePath } from "../../contracts/virtual-path.js";
|
|
3
|
+
import { memoryAtomicView } from "../memory/atomic-view.js";
|
|
4
|
+
import { compareIdentity } from "../mount/identity.js";
|
|
5
|
+
import { snapshotConditionalChmod } from "../conditional-chmod.js";
|
|
6
|
+
import { createStagingCleanup } from "../staging-cleanup.js";
|
|
7
|
+
import { runStagingGuard } from "../staging-ancestry.js";
|
|
8
|
+
// Enumerable ownership tokens survive caller snapshots without retaining stats forever.
|
|
9
|
+
const overlayReceipt = Symbol("overlay observation");
|
|
10
|
+
/** Stock Memory mutations commit before returning their promise. No user code or
|
|
11
|
+
* await is allowed between inspecting the two stores and invoking a mutation. */
|
|
12
|
+
export class OverlayMemoryPublication {
|
|
13
|
+
upper;
|
|
14
|
+
lower;
|
|
15
|
+
whiteouts;
|
|
16
|
+
opaque;
|
|
17
|
+
hidden;
|
|
18
|
+
receipts = new WeakMap();
|
|
19
|
+
directories = new Map();
|
|
20
|
+
origins = new Map();
|
|
21
|
+
stages = new WeakMap();
|
|
22
|
+
stagingAncestors = new WeakMap();
|
|
23
|
+
constructor(upper, lower, whiteouts, opaque, hidden) {
|
|
24
|
+
this.upper = upper;
|
|
25
|
+
this.lower = lower;
|
|
26
|
+
this.whiteouts = whiteouts;
|
|
27
|
+
this.opaque = opaque;
|
|
28
|
+
this.hidden = hidden;
|
|
29
|
+
}
|
|
30
|
+
supported() { return this.upper.capabilities.readOnly !== true && !!memoryAtomicView(this.upper) && !!memoryAtomicView(this.lower); }
|
|
31
|
+
stores() {
|
|
32
|
+
const upper = memoryAtomicView(this.upper), lower = memoryAtomicView(this.lower);
|
|
33
|
+
if (!upper || !lower || this.upper.capabilities.readOnly === true)
|
|
34
|
+
throw new FsError("ENOTSUP", { syscall: "overlayPublication" });
|
|
35
|
+
return { upper, lower };
|
|
36
|
+
}
|
|
37
|
+
path(path) {
|
|
38
|
+
validatePath(path);
|
|
39
|
+
if (!path.startsWith("/") || (path !== "/" && path.endsWith("/"))
|
|
40
|
+
|| path.split("/").some(component => component === "." || component === "..")) {
|
|
41
|
+
throw new FsError("EINVAL", { path });
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
physical(view, path) {
|
|
45
|
+
try {
|
|
46
|
+
return view.stat(path);
|
|
47
|
+
}
|
|
48
|
+
catch (error) {
|
|
49
|
+
if (isFsError(error, "ENOENT") || isFsError(error, "ENOTDIR"))
|
|
50
|
+
return undefined;
|
|
51
|
+
throw error;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
observation(path) {
|
|
55
|
+
const stores = this.stores();
|
|
56
|
+
const upper = this.physical(stores.upper, path);
|
|
57
|
+
const lowerHidden = [...this.whiteouts].some(root => isPathWithin(root, path))
|
|
58
|
+
|| [...this.opaque].some(root => root !== path && isPathWithin(root, path));
|
|
59
|
+
const lower = lowerHidden ? undefined : this.physical(stores.lower, path);
|
|
60
|
+
return { path, ...(upper ? { upper } : {}), ...(lower ? { lower } : {}) };
|
|
61
|
+
}
|
|
62
|
+
visible(observation) {
|
|
63
|
+
return observation.upper ?? observation.lower;
|
|
64
|
+
}
|
|
65
|
+
copiedDirectory(path, lower) {
|
|
66
|
+
if (!this.supported())
|
|
67
|
+
return;
|
|
68
|
+
const upper = this.physical(this.stores().upper, path);
|
|
69
|
+
if (upper?.type === "directory") {
|
|
70
|
+
this.origins.set(path, { upper, lower });
|
|
71
|
+
const directory = this.directories.get(path);
|
|
72
|
+
if (directory && !directory.upper && this.same(directory.lower, lower))
|
|
73
|
+
directory.upper = upper;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
stat(path, physical) {
|
|
77
|
+
if (!this.supported())
|
|
78
|
+
return physical;
|
|
79
|
+
const observation = this.observation(path);
|
|
80
|
+
if (!this.same(physical, this.visible(observation), physical.type === "file"))
|
|
81
|
+
throw new FsError("EAGAIN", { path });
|
|
82
|
+
let logical = { ...physical };
|
|
83
|
+
if (physical.type === "directory") {
|
|
84
|
+
let directory = this.directories.get(path);
|
|
85
|
+
if (!directory || !this.same(directory.upper, observation.upper) || !this.same(directory.lower, observation.lower)) {
|
|
86
|
+
directory = { ...observation, identityScope: Symbol("overlay directory"), ino: physical.ino, dev: physical.dev };
|
|
87
|
+
this.directories.set(path, directory);
|
|
88
|
+
}
|
|
89
|
+
logical = { ...physical, identityScope: directory.identityScope, dev: directory.dev, ino: directory.ino };
|
|
90
|
+
}
|
|
91
|
+
const token = {};
|
|
92
|
+
logical[overlayReceipt] = token;
|
|
93
|
+
this.receipts.set(token, observation);
|
|
94
|
+
return logical;
|
|
95
|
+
}
|
|
96
|
+
same(actual, expected, unchanged = false) {
|
|
97
|
+
if (!actual || !expected)
|
|
98
|
+
return actual === expected;
|
|
99
|
+
return compareIdentity(actual, expected) === "same" && actual.type === expected.type
|
|
100
|
+
&& (!unchanged || ["revision", "size", "mode", "nlink", "mtimeMs", "ctimeMs"].every(key => actual[key] === expected[key]));
|
|
101
|
+
}
|
|
102
|
+
expect(path, expected, unchanged = false) {
|
|
103
|
+
const receipt = this.receipts.get(expected[overlayReceipt] ?? expected);
|
|
104
|
+
if (!receipt || receipt.path !== path)
|
|
105
|
+
throw new FsError("ENOTSUP", { path, message: "unowned overlay publication receipt" });
|
|
106
|
+
const actual = this.observation(path);
|
|
107
|
+
const origin = this.origins.get(path);
|
|
108
|
+
const copied = !receipt.upper && receipt.lower?.type === "directory" && origin
|
|
109
|
+
&& this.same(origin.upper, actual.upper) && this.same(origin.lower, receipt.lower);
|
|
110
|
+
if ((!copied && !this.same(actual.upper, receipt.upper, unchanged))
|
|
111
|
+
|| !this.same(actual.lower, receipt.lower, unchanged))
|
|
112
|
+
throw new FsError("EAGAIN", { path });
|
|
113
|
+
}
|
|
114
|
+
ancestors(path) {
|
|
115
|
+
const paths = ["/"];
|
|
116
|
+
for (const component of dirname(path).split("/").filter(Boolean)) {
|
|
117
|
+
paths.push(`${paths.at(-1) === "/" ? "" : paths.at(-1)}/${component}`);
|
|
118
|
+
}
|
|
119
|
+
return paths;
|
|
120
|
+
}
|
|
121
|
+
inspect(path) {
|
|
122
|
+
this.path(path);
|
|
123
|
+
for (const parent of this.ancestors(path)) {
|
|
124
|
+
const stat = this.visible(this.observation(parent));
|
|
125
|
+
if (!stat)
|
|
126
|
+
throw new FsError("ENOENT", { path: parent });
|
|
127
|
+
if (stat.type !== "directory")
|
|
128
|
+
throw new FsError("ENOTDIR", { path: parent });
|
|
129
|
+
if (((stat.mode >> 6) & 1) !== 1)
|
|
130
|
+
throw new FsError("EACCES", { path: parent });
|
|
131
|
+
}
|
|
132
|
+
return this.visible(this.observation(path));
|
|
133
|
+
}
|
|
134
|
+
capture(path) {
|
|
135
|
+
return this.ancestors(path).map(parent => {
|
|
136
|
+
const physical = this.inspect(parent);
|
|
137
|
+
if (physical?.type !== "directory")
|
|
138
|
+
throw new FsError("ENOTDIR", { path: parent });
|
|
139
|
+
return { path: parent, stat: this.stat(parent, physical) };
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
check(entries) {
|
|
143
|
+
for (const entry of entries) {
|
|
144
|
+
this.expect(entry.path, entry.stat);
|
|
145
|
+
if (this.inspect(entry.path)?.type !== "directory")
|
|
146
|
+
throw new FsError("ENOTDIR", { path: entry.path });
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
prepareChmod(path, options) {
|
|
150
|
+
const { signal, parent, expected, ancestors, commitGuard } = options;
|
|
151
|
+
const sources = ancestors?.map(entry => ({ path: entry.path, stat: entry.stat }));
|
|
152
|
+
const captured = snapshotConditionalChmod(path, {
|
|
153
|
+
...(signal === undefined ? {} : { signal }), ...(parent === undefined ? {} : { parent }),
|
|
154
|
+
...(expected === undefined ? {} : { expected }), ...(sources === undefined ? {} : { ancestors: sources }),
|
|
155
|
+
...(commitGuard === undefined ? {} : { commitGuard }),
|
|
156
|
+
});
|
|
157
|
+
if (!captured)
|
|
158
|
+
return undefined;
|
|
159
|
+
this.stores();
|
|
160
|
+
this.path(path);
|
|
161
|
+
const retain = (source, snapshot) => {
|
|
162
|
+
const receipt = this.receipts.get(source[overlayReceipt] ?? source);
|
|
163
|
+
if (!receipt)
|
|
164
|
+
throw new FsError("ENOTSUP", { path, message: "unowned overlay chmod receipt" });
|
|
165
|
+
this.receipts.set(snapshot, receipt);
|
|
166
|
+
};
|
|
167
|
+
retain(parent, captured.parent);
|
|
168
|
+
retain(expected, captured.expected);
|
|
169
|
+
for (const [index, entry] of captured.ancestors.entries())
|
|
170
|
+
retain(sources[index].stat, entry.stat);
|
|
171
|
+
return () => {
|
|
172
|
+
signal?.throwIfAborted();
|
|
173
|
+
if (captured.commitGuard)
|
|
174
|
+
runStagingGuard(captured.commitGuard);
|
|
175
|
+
this.stores();
|
|
176
|
+
this.check(captured.ancestors);
|
|
177
|
+
this.expect(dirname(path), captured.parent);
|
|
178
|
+
this.expect(path, captured.expected, captured.expected.type !== "directory");
|
|
179
|
+
if (this.inspect(path)?.type !== captured.expected.type)
|
|
180
|
+
throw new FsError("EAGAIN", { path });
|
|
181
|
+
return true;
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
prepareWrite(path, options) {
|
|
185
|
+
this.stores();
|
|
186
|
+
this.path(path);
|
|
187
|
+
const ancestors = this.capture(path);
|
|
188
|
+
return () => {
|
|
189
|
+
options.signal?.throwIfAborted();
|
|
190
|
+
this.stores();
|
|
191
|
+
this.check(ancestors);
|
|
192
|
+
this.expect(dirname(path), options.parent);
|
|
193
|
+
const current = this.inspect(path);
|
|
194
|
+
if (options.expected === null) {
|
|
195
|
+
if (current)
|
|
196
|
+
throw new FsError("EAGAIN", { path });
|
|
197
|
+
}
|
|
198
|
+
else {
|
|
199
|
+
this.expect(path, options.expected, true);
|
|
200
|
+
if (current?.type !== "file")
|
|
201
|
+
throw new FsError("EINVAL", { path });
|
|
202
|
+
}
|
|
203
|
+
return true;
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
async writeFile(path, data, options, maxBytes, guard) {
|
|
207
|
+
const check = this.prepareWrite(path, options);
|
|
208
|
+
check();
|
|
209
|
+
const current = this.inspect(path);
|
|
210
|
+
if (current && ((current.mode >> 6) & 2) !== 2)
|
|
211
|
+
throw new FsError("EACCES", { path });
|
|
212
|
+
if (current && !this.observation(path).upper && current.nlink !== 1)
|
|
213
|
+
throw new FsError("ENOTSUP", { path, message: "ambiguous hardlink copy-up" });
|
|
214
|
+
const controls = options.signal ? { signal: options.signal } : {};
|
|
215
|
+
let bytes = data;
|
|
216
|
+
if (options.append && current && !this.observation(path).upper) {
|
|
217
|
+
const previous = await this.lower.readFile(path, { ...controls, ...(maxBytes === Infinity ? {} : { maxBytes }) });
|
|
218
|
+
if (previous.byteLength + data.byteLength > maxBytes)
|
|
219
|
+
throw new FsError("EFBIG", { path });
|
|
220
|
+
bytes = new Uint8Array(previous.byteLength + data.byteLength);
|
|
221
|
+
bytes.set(previous);
|
|
222
|
+
bytes.set(data, previous.byteLength);
|
|
223
|
+
}
|
|
224
|
+
const ancestors = this.capture(path);
|
|
225
|
+
await this.copyParents(ancestors, controls);
|
|
226
|
+
guard?.();
|
|
227
|
+
check();
|
|
228
|
+
const upper = this.observation(path).upper;
|
|
229
|
+
if (data.byteLength + (options.append ? current?.size ?? 0 : 0) > maxBytes)
|
|
230
|
+
throw new FsError("EFBIG", { path });
|
|
231
|
+
const pending = this.upper.writeFileConditional(path, bytes, {
|
|
232
|
+
...options, parent: this.observation(dirname(path)).upper, expected: upper ?? null,
|
|
233
|
+
append: options.append === true && upper !== undefined,
|
|
234
|
+
...(current ? { mode: current.mode & 0o7777 } : {}),
|
|
235
|
+
...(options.atimeMs === undefined && current ? { atimeMs: current.atimeMs } : {}),
|
|
236
|
+
});
|
|
237
|
+
// Retain the result before another caller can alter the upper store.
|
|
238
|
+
const result = this.inspect(path);
|
|
239
|
+
const receipt = result ? this.stat(path, result) : undefined;
|
|
240
|
+
await pending;
|
|
241
|
+
return receipt;
|
|
242
|
+
}
|
|
243
|
+
async removeFile(path, options) {
|
|
244
|
+
this.prepareWrite(path, options)();
|
|
245
|
+
const parent = this.inspect(dirname(path));
|
|
246
|
+
if (((parent.mode >> 6) & 3) !== 3)
|
|
247
|
+
throw new FsError("EACCES", { path });
|
|
248
|
+
const upper = this.observation(path).upper;
|
|
249
|
+
const removal = upper ? this.upper.removeFileConditional(path, {
|
|
250
|
+
...options, parent: this.observation(dirname(path)).upper, expected: upper,
|
|
251
|
+
}) : undefined;
|
|
252
|
+
if (!upper || !this.physical(this.stores().upper, path))
|
|
253
|
+
this.whiteouts.add(path);
|
|
254
|
+
await removal;
|
|
255
|
+
}
|
|
256
|
+
async prepareDirectory(path, options, guard) {
|
|
257
|
+
const ancestors = this.capture(path);
|
|
258
|
+
const check = () => {
|
|
259
|
+
options.signal?.throwIfAborted();
|
|
260
|
+
guard?.();
|
|
261
|
+
this.check(ancestors);
|
|
262
|
+
this.expect(dirname(path), options.parent);
|
|
263
|
+
const current = this.inspect(path);
|
|
264
|
+
if (options.expected === null) {
|
|
265
|
+
if (current)
|
|
266
|
+
throw new FsError("EAGAIN", { path });
|
|
267
|
+
}
|
|
268
|
+
else {
|
|
269
|
+
this.expect(path, options.expected);
|
|
270
|
+
if (current?.type !== "directory")
|
|
271
|
+
throw new FsError("ENOTDIR", { path });
|
|
272
|
+
}
|
|
273
|
+
};
|
|
274
|
+
check();
|
|
275
|
+
const current = this.inspect(path);
|
|
276
|
+
await this.copyParents(current ? [...ancestors, { path, stat: options.expected }] : ancestors, options);
|
|
277
|
+
check();
|
|
278
|
+
const pending = this.upper.prepareDirectory(path, {
|
|
279
|
+
...options, parent: this.observation(dirname(path)).upper, expected: this.observation(path).upper ?? null,
|
|
280
|
+
});
|
|
281
|
+
const physical = this.inspect(path);
|
|
282
|
+
if (physical && options.expected === null)
|
|
283
|
+
this.opaque.add(path);
|
|
284
|
+
const receipt = physical ? this.stat(path, physical) : undefined;
|
|
285
|
+
await pending;
|
|
286
|
+
return receipt;
|
|
287
|
+
}
|
|
288
|
+
prepareRename(source, destination) {
|
|
289
|
+
const ancestors = [...this.capture(source), ...this.capture(destination)];
|
|
290
|
+
const target = this.observation(destination);
|
|
291
|
+
const entries = [];
|
|
292
|
+
const pending = [source];
|
|
293
|
+
const stores = this.stores();
|
|
294
|
+
while (pending.length) {
|
|
295
|
+
const path = pending.pop();
|
|
296
|
+
const entry = this.observation(path);
|
|
297
|
+
const visible = this.visible(entry);
|
|
298
|
+
if (!visible)
|
|
299
|
+
continue;
|
|
300
|
+
entries.push(entry);
|
|
301
|
+
if (visible.type !== "directory")
|
|
302
|
+
continue;
|
|
303
|
+
const names = new Set([
|
|
304
|
+
...(entry.upper?.type === "directory" ? stores.upper.names(path) : []),
|
|
305
|
+
...(entry.lower?.type === "directory" && !this.opaque.has(path) ? stores.lower.names(path) : []),
|
|
306
|
+
]);
|
|
307
|
+
for (const name of names)
|
|
308
|
+
pending.push(`${path}/${name}`);
|
|
309
|
+
}
|
|
310
|
+
return () => {
|
|
311
|
+
this.stores();
|
|
312
|
+
this.check(ancestors);
|
|
313
|
+
const current = this.observation(destination);
|
|
314
|
+
if (!this.same(current.upper, target.upper, true) || !this.same(current.lower, target.lower, true)) {
|
|
315
|
+
throw new FsError("EAGAIN", { path: destination });
|
|
316
|
+
}
|
|
317
|
+
for (const entry of entries) {
|
|
318
|
+
const actual = this.observation(entry.path);
|
|
319
|
+
// Copy-up may add upper entries; it never changes the lower store.
|
|
320
|
+
if (!this.same(actual.lower, entry.lower, true)
|
|
321
|
+
|| (entry.upper && !this.same(actual.upper, entry.upper, entry.upper.type !== "directory"))) {
|
|
322
|
+
throw new FsError("EAGAIN", { path: entry.path });
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
};
|
|
326
|
+
}
|
|
327
|
+
async rename(source, destination, options, guard) {
|
|
328
|
+
options.signal?.throwIfAborted();
|
|
329
|
+
this.stores();
|
|
330
|
+
const current = this.inspect(destination);
|
|
331
|
+
if (options.noReplace && current)
|
|
332
|
+
throw new FsError("EEXIST", { path: destination });
|
|
333
|
+
guard();
|
|
334
|
+
if (!this.observation(source).upper)
|
|
335
|
+
throw new FsError("ENOENT", { path: source });
|
|
336
|
+
const moved = this.upper.rename(source, destination, options);
|
|
337
|
+
// Stock Memory commits synchronously; publish the whiteout in that same turn.
|
|
338
|
+
if (!this.physical(this.stores().upper, source))
|
|
339
|
+
this.whiteouts.add(source);
|
|
340
|
+
await moved;
|
|
341
|
+
}
|
|
342
|
+
async copyParents(entries, options) {
|
|
343
|
+
for (const entry of entries) {
|
|
344
|
+
options.signal?.throwIfAborted();
|
|
345
|
+
this.check(entries);
|
|
346
|
+
const observation = this.observation(entry.path);
|
|
347
|
+
if (observation.upper)
|
|
348
|
+
continue;
|
|
349
|
+
const lower = observation.lower;
|
|
350
|
+
// Stock mkdir performs its complete mutation synchronously.
|
|
351
|
+
const pending = this.upper.mkdir(entry.path, { ...options, mode: lower.mode & 0o7777 });
|
|
352
|
+
this.copiedDirectory(entry.path, lower);
|
|
353
|
+
await pending;
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
async create(directory, name, content, options, guard) {
|
|
357
|
+
options.signal?.throwIfAborted();
|
|
358
|
+
this.path(directory);
|
|
359
|
+
this.expect(dirname(directory), options.parent);
|
|
360
|
+
if (this.inspect(directory))
|
|
361
|
+
throw new FsError("EEXIST", { path: directory });
|
|
362
|
+
const ancestors = this.capture(directory);
|
|
363
|
+
await this.copyParents(ancestors, options);
|
|
364
|
+
options.signal?.throwIfAborted();
|
|
365
|
+
guard?.();
|
|
366
|
+
this.check(ancestors);
|
|
367
|
+
this.expect(dirname(directory), options.parent);
|
|
368
|
+
if (this.inspect(directory))
|
|
369
|
+
throw new FsError("EEXIST", { path: directory });
|
|
370
|
+
const parent = this.observation(dirname(directory)).upper;
|
|
371
|
+
const owned = await this.upper.createStagedFile(directory, name, content, { ...options, parent });
|
|
372
|
+
const staging = Object.freeze({
|
|
373
|
+
parent: owned.parent, directory: owned.directory, file: owned.file,
|
|
374
|
+
...(owned.cleanup ? { cleanup: createStagingCleanup(directory, controls => this.cleanup(staging, controls, true), () => owned.cleanup.close()) } : {}),
|
|
375
|
+
});
|
|
376
|
+
this.stages.set(staging.directory, owned);
|
|
377
|
+
this.stagingAncestors.set(staging.directory, ancestors);
|
|
378
|
+
this.hidden.add(directory);
|
|
379
|
+
return staging;
|
|
380
|
+
}
|
|
381
|
+
async publish(staging, path, options) {
|
|
382
|
+
options.signal?.throwIfAborted();
|
|
383
|
+
this.path(path);
|
|
384
|
+
const owned = this.stages.get(staging.directory);
|
|
385
|
+
if (!owned)
|
|
386
|
+
throw new FsError("ENOTSUP", { path });
|
|
387
|
+
const paths = this.ancestors(path);
|
|
388
|
+
const ancestors = options.ancestors ?? this.stagingAncestors.get(staging.directory);
|
|
389
|
+
if (!ancestors || ancestors.length !== paths.length || ancestors.some((entry, index) => entry.path !== paths[index])) {
|
|
390
|
+
throw new FsError("EINVAL", { path, message: "complete overlay ancestry is required" });
|
|
391
|
+
}
|
|
392
|
+
this.check(ancestors);
|
|
393
|
+
this.expect(dirname(path), options.parent);
|
|
394
|
+
const current = this.inspect(path);
|
|
395
|
+
if (options.destination === null) {
|
|
396
|
+
if (current)
|
|
397
|
+
throw new FsError("EAGAIN", { path });
|
|
398
|
+
}
|
|
399
|
+
else {
|
|
400
|
+
this.expect(path, options.destination, true);
|
|
401
|
+
if (current?.type !== "file" || current.nlink !== 1)
|
|
402
|
+
throw new FsError("EAGAIN", { path });
|
|
403
|
+
}
|
|
404
|
+
const translated = ancestors.map(entry => ({ path: entry.path, stat: this.observation(entry.path).upper }));
|
|
405
|
+
const target = this.observation(path).upper;
|
|
406
|
+
// No await between the logical checks above and the physical commit below.
|
|
407
|
+
await this.upper.publishStagedFile(owned, path, {
|
|
408
|
+
...options, ancestors: translated, parent: translated.at(-1).stat, destination: target ?? null,
|
|
409
|
+
});
|
|
410
|
+
}
|
|
411
|
+
async cleanup(staging, options, retained = false) {
|
|
412
|
+
this.stores();
|
|
413
|
+
const owned = this.stages.get(staging.directory);
|
|
414
|
+
if (!owned)
|
|
415
|
+
throw new FsError("ENOTSUP", { path: staging.directory.path });
|
|
416
|
+
if (retained && owned.cleanup)
|
|
417
|
+
await owned.cleanup.remove(options);
|
|
418
|
+
else {
|
|
419
|
+
await this.upper.removeStagedFile(owned, options);
|
|
420
|
+
await owned.cleanup?.close();
|
|
421
|
+
}
|
|
422
|
+
this.hidden.delete(owned.directory.path);
|
|
423
|
+
this.stages.delete(staging.directory);
|
|
424
|
+
this.stagingAncestors.delete(staging.directory);
|
|
425
|
+
}
|
|
426
|
+
confine(roots, options, run, fs, maxBytes) {
|
|
427
|
+
options.signal?.throwIfAborted();
|
|
428
|
+
const retained = new Map();
|
|
429
|
+
for (const root of roots) {
|
|
430
|
+
this.path(root);
|
|
431
|
+
const entries = [...this.capture(root), { path: root, stat: this.stat(root, this.inspect(root)) }];
|
|
432
|
+
for (const entry of entries) {
|
|
433
|
+
if (entry.stat.type !== "directory")
|
|
434
|
+
throw new FsError("ENOTDIR", { path: entry.path });
|
|
435
|
+
retained.set(entry.path, entry.stat);
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
const admittedStages = new WeakSet();
|
|
439
|
+
const guard = (path) => {
|
|
440
|
+
this.path(path);
|
|
441
|
+
if (!roots.some(root => isPathWithin(root, path)))
|
|
442
|
+
throw new FsError("EPERM", { path });
|
|
443
|
+
this.check([...retained].filter(([root]) => isPathWithin(root, path)).map(([path, stat]) => ({ path, stat })));
|
|
444
|
+
};
|
|
445
|
+
return new Proxy(fs, {
|
|
446
|
+
get: (target, property) => {
|
|
447
|
+
if (property === "confineExtraction" || property === "objects")
|
|
448
|
+
return undefined;
|
|
449
|
+
if (property === "prepareDirectory")
|
|
450
|
+
return (path, mutation) => run(mutation, () => this.prepareDirectory(path, { ...mutation }, () => guard(path)));
|
|
451
|
+
if (property === "createStagedFile")
|
|
452
|
+
return (path, name, content, mutation) => run(mutation, async () => {
|
|
453
|
+
guard(path);
|
|
454
|
+
if (content.type === "file" && content.data.byteLength > maxBytes)
|
|
455
|
+
throw new FsError("EFBIG", { path });
|
|
456
|
+
const stage = await this.create(path, name, content, mutation, () => guard(path));
|
|
457
|
+
admittedStages.add(stage.directory);
|
|
458
|
+
return stage;
|
|
459
|
+
});
|
|
460
|
+
if (property === "publishStagedFile")
|
|
461
|
+
return (stage, path, mutation) => run(mutation, async () => {
|
|
462
|
+
guard(path);
|
|
463
|
+
if (!admittedStages.has(stage.directory))
|
|
464
|
+
throw new FsError("ENOTSUP", { path });
|
|
465
|
+
await this.publish(stage, path, mutation);
|
|
466
|
+
});
|
|
467
|
+
if (property === "removeStagedFile")
|
|
468
|
+
return (stage, mutation = {}) => run(mutation, async () => {
|
|
469
|
+
if (!admittedStages.has(stage.directory))
|
|
470
|
+
throw new FsError("ENOTSUP", { path: stage.directory.path });
|
|
471
|
+
await this.cleanup(stage, mutation);
|
|
472
|
+
});
|
|
473
|
+
if (property === "writeFileConditional")
|
|
474
|
+
return async (path, data, mutation) => {
|
|
475
|
+
mutation.signal?.throwIfAborted();
|
|
476
|
+
if (!(data instanceof Uint8Array))
|
|
477
|
+
throw new TypeError("Overlay files require Uint8Array data");
|
|
478
|
+
if (data.byteLength > maxBytes)
|
|
479
|
+
throw new FsError("EFBIG", { path });
|
|
480
|
+
const bytes = new Uint8Array(data), captured = { ...mutation };
|
|
481
|
+
return run(captured, async () => {
|
|
482
|
+
const guard = () => {
|
|
483
|
+
this.path(path);
|
|
484
|
+
if (!roots.some(root => isPathWithin(root, path)))
|
|
485
|
+
throw new FsError("EPERM", { path });
|
|
486
|
+
this.check([...retained].filter(([root]) => isPathWithin(root, path)).map(([path, stat]) => ({ path, stat })));
|
|
487
|
+
};
|
|
488
|
+
guard();
|
|
489
|
+
return this.writeFile(path, bytes, captured, maxBytes, guard);
|
|
490
|
+
});
|
|
491
|
+
};
|
|
492
|
+
if (["mkdir", "rm", "rmdir"].includes(String(property)))
|
|
493
|
+
return (path, mutation = {}) => run(mutation, async () => {
|
|
494
|
+
mutation.signal?.throwIfAborted();
|
|
495
|
+
this.path(path);
|
|
496
|
+
if (!roots.some(root => isPathWithin(root, path)))
|
|
497
|
+
throw new FsError("EPERM", { path });
|
|
498
|
+
this.check([...retained].filter(([root]) => isPathWithin(root, path)).map(([path, stat]) => ({ path, stat })));
|
|
499
|
+
const current = this.inspect(path);
|
|
500
|
+
if (property === "mkdir") {
|
|
501
|
+
if (current) {
|
|
502
|
+
if (mutation.recursive && current.type === "directory")
|
|
503
|
+
return;
|
|
504
|
+
throw new FsError("EEXIST", { path });
|
|
505
|
+
}
|
|
506
|
+
const entries = this.capture(path);
|
|
507
|
+
await this.copyParents(entries, mutation);
|
|
508
|
+
this.check([...retained].filter(([root]) => isPathWithin(root, path)).map(([path, stat]) => ({ path, stat })));
|
|
509
|
+
this.check(entries);
|
|
510
|
+
if (this.inspect(path))
|
|
511
|
+
throw new FsError("EAGAIN", { path });
|
|
512
|
+
await this.upper.mkdir(path, mutation);
|
|
513
|
+
this.opaque.add(path);
|
|
514
|
+
return;
|
|
515
|
+
}
|
|
516
|
+
if (!current) {
|
|
517
|
+
if (property === "rm" && mutation.force)
|
|
518
|
+
return;
|
|
519
|
+
throw new FsError("ENOENT", { path });
|
|
520
|
+
}
|
|
521
|
+
if (path === "/")
|
|
522
|
+
throw new FsError("EBUSY", { path });
|
|
523
|
+
if (current.type === "directory") {
|
|
524
|
+
const stores = this.stores();
|
|
525
|
+
const observation = this.observation(path);
|
|
526
|
+
const names = new Set([
|
|
527
|
+
...(observation.upper ? stores.upper.names(path) : []),
|
|
528
|
+
...(observation.lower && !this.opaque.has(path) ? stores.lower.names(path) : []),
|
|
529
|
+
]);
|
|
530
|
+
if ([...names].some(name => this.inspect(`${path}/${name}`)))
|
|
531
|
+
throw new FsError("ENOTEMPTY", { path });
|
|
532
|
+
}
|
|
533
|
+
else if (property === "rmdir")
|
|
534
|
+
throw new FsError("ENOTDIR", { path });
|
|
535
|
+
const parent = this.inspect(dirname(path));
|
|
536
|
+
if (((parent.mode >> 6) & 3) !== 3)
|
|
537
|
+
throw new FsError("EACCES", { path });
|
|
538
|
+
const upper = this.observation(path).upper;
|
|
539
|
+
const removal = upper ? property === "rmdir"
|
|
540
|
+
? this.upper.rmdir(path, mutation) : this.upper.rm(path, mutation) : undefined;
|
|
541
|
+
// Bind the whiteout in the same turn as the stock upper removal.
|
|
542
|
+
// Rejected Memory mutations leave the entry present.
|
|
543
|
+
if (!upper || !this.physical(this.stores().upper, path)) {
|
|
544
|
+
this.whiteouts.add(path);
|
|
545
|
+
this.origins.delete(path);
|
|
546
|
+
}
|
|
547
|
+
await removal;
|
|
548
|
+
});
|
|
549
|
+
const value = Reflect.get(target, property, target);
|
|
550
|
+
if (typeof value !== "function")
|
|
551
|
+
return value;
|
|
552
|
+
if (["lstat", "stat", "readFile", "readStream", "openReadFile", "readdir", "realpath", "access", "capabilitiesFor", "readlink"].includes(String(property)))
|
|
553
|
+
return value.bind(target);
|
|
554
|
+
return () => { throw new FsError("ENOTSUP", { syscall: String(property) }); };
|
|
555
|
+
},
|
|
556
|
+
});
|
|
557
|
+
}
|
|
558
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { FileSystem, FsOptions } from "../contracts/filesystem.js";
|
|
2
|
+
export declare const pathNamespace: unique symbol;
|
|
3
|
+
export declare function capturePathNamespace(filesystem: FileSystem, options: FsOptions): ((path: string) => string) | undefined;
|
|
4
|
+
export declare function readOnlyPathNamespace(projection: unknown): object | undefined;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { FsError } from "../contracts/errors.js";
|
|
2
|
+
import { normalizePath, validatePath } from "../contracts/virtual-path.js";
|
|
3
|
+
export const pathNamespace = Symbol.for("@poe-code/safe-fs/path-namespace/v1");
|
|
4
|
+
const captureNamespace = Symbol.for("@poe-code/safe-fs/capture-path-namespace/v1");
|
|
5
|
+
export function capturePathNamespace(filesystem, options) {
|
|
6
|
+
options.signal?.throwIfAborted();
|
|
7
|
+
const projection = Reflect.get(filesystem, pathNamespace);
|
|
8
|
+
options.signal?.throwIfAborted();
|
|
9
|
+
if (projection === undefined)
|
|
10
|
+
return undefined;
|
|
11
|
+
return captureProjection(projection, options);
|
|
12
|
+
}
|
|
13
|
+
export function readOnlyPathNamespace(projection) {
|
|
14
|
+
if (projection === undefined)
|
|
15
|
+
return undefined;
|
|
16
|
+
const select = (path) => captureProjection(projection, {})(path);
|
|
17
|
+
Object.defineProperty(select, captureNamespace, {
|
|
18
|
+
value: Object.freeze((options) => captureProjection(projection, options)),
|
|
19
|
+
});
|
|
20
|
+
return Object.freeze({ select: Object.freeze(select) });
|
|
21
|
+
}
|
|
22
|
+
function captureProjection(projection, options) {
|
|
23
|
+
options.signal?.throwIfAborted();
|
|
24
|
+
if (projection === null || typeof projection !== "object")
|
|
25
|
+
throw new FsError("EIO");
|
|
26
|
+
const frozen = Object.isFrozen(projection);
|
|
27
|
+
options.signal?.throwIfAborted();
|
|
28
|
+
if (!frozen)
|
|
29
|
+
throw new FsError("EIO");
|
|
30
|
+
let select = Reflect.get(projection, "select");
|
|
31
|
+
options.signal?.throwIfAborted();
|
|
32
|
+
if (typeof select !== "function")
|
|
33
|
+
throw new FsError("EIO");
|
|
34
|
+
const capture = Reflect.get(select, captureNamespace);
|
|
35
|
+
options.signal?.throwIfAborted();
|
|
36
|
+
let receiver = projection;
|
|
37
|
+
if (capture !== undefined) {
|
|
38
|
+
if (typeof capture !== "function")
|
|
39
|
+
throw new FsError("EIO");
|
|
40
|
+
select = Reflect.apply(capture, select, [options]);
|
|
41
|
+
options.signal?.throwIfAborted();
|
|
42
|
+
if (typeof select !== "function")
|
|
43
|
+
throw new FsError("EIO");
|
|
44
|
+
receiver = undefined;
|
|
45
|
+
}
|
|
46
|
+
const selected = select;
|
|
47
|
+
return path => {
|
|
48
|
+
options.signal?.throwIfAborted();
|
|
49
|
+
const root = Reflect.apply(selected, receiver, [path]);
|
|
50
|
+
options.signal?.throwIfAborted();
|
|
51
|
+
if (typeof root !== "string" || !root.startsWith("/"))
|
|
52
|
+
throw new FsError("EIO", { path });
|
|
53
|
+
try {
|
|
54
|
+
validatePath(root);
|
|
55
|
+
}
|
|
56
|
+
catch (cause) {
|
|
57
|
+
throw new FsError("EIO", { path, cause });
|
|
58
|
+
}
|
|
59
|
+
if (normalizePath(root) !== root || root !== "/" && path !== root && !path.startsWith(`${root}/`))
|
|
60
|
+
throw new FsError("EIO", { path });
|
|
61
|
+
return root;
|
|
62
|
+
};
|
|
63
|
+
}
|