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,208 @@
|
|
|
1
|
+
import { ACCESS_MODES } from "../../contracts/filesystem.js";
|
|
2
|
+
import { FsError } from "../../contracts/errors.js";
|
|
3
|
+
import { readBytes } from "../../contracts/io.js";
|
|
4
|
+
import { finishCleanup } from "../../contracts/cleanup.js";
|
|
5
|
+
import { compareEntries, registerEntryView } from "../mount/comparison.js";
|
|
6
|
+
import { openRetainedReadFile, readOnlyCapabilities, retainedReadCapabilities } from "../capabilities.js";
|
|
7
|
+
import { admitDirectoryEntries, directoryEntryLimit } from "../directory-admission.js";
|
|
8
|
+
import { forwardFileDescriptor, openFileDescriptor } from "../descriptor.js";
|
|
9
|
+
import { pathNamespace, readOnlyPathNamespace } from "../path-namespace.js";
|
|
10
|
+
import { memoryAtomicView, registerMemoryAtomicView } from "../memory/atomic-view.js";
|
|
11
|
+
function readOnly(syscall, path, dest) {
|
|
12
|
+
throw new FsError("EROFS", { syscall, path, ...(dest === undefined ? {} : { dest }) });
|
|
13
|
+
}
|
|
14
|
+
function snapshotStat(stat) {
|
|
15
|
+
const { type, filesystemType, size, allocatedBytes, ioBlockSize, preferredIoBlockSize, mode, mtimeMs, atimeMs, ctimeMs, birthtimeMs, revision, identityScope, opaqueIdentity, opaqueVersion, ino, dev, rdevMajor, rdevMinor, nlink, uid, gid } = stat;
|
|
16
|
+
return {
|
|
17
|
+
type, size, mode, mtimeMs, atimeMs, ctimeMs,
|
|
18
|
+
...(filesystemType === undefined ? {} : { filesystemType }),
|
|
19
|
+
...(revision === undefined ? {} : { revision }),
|
|
20
|
+
...(allocatedBytes === undefined ? {} : { allocatedBytes }),
|
|
21
|
+
...(ioBlockSize === undefined ? {} : { ioBlockSize }),
|
|
22
|
+
...(preferredIoBlockSize === undefined ? {} : { preferredIoBlockSize }),
|
|
23
|
+
...(birthtimeMs === undefined ? {} : { birthtimeMs }),
|
|
24
|
+
...(identityScope === undefined ? {} : { identityScope }),
|
|
25
|
+
...(opaqueIdentity === undefined ? {} : { opaqueIdentity }),
|
|
26
|
+
...(opaqueVersion === undefined ? {} : { opaqueVersion }),
|
|
27
|
+
...(ino === undefined ? {} : { ino }),
|
|
28
|
+
...(dev === undefined ? {} : { dev }),
|
|
29
|
+
...(rdevMajor === undefined ? {} : { rdevMajor }),
|
|
30
|
+
...(rdevMinor === undefined ? {} : { rdevMinor }),
|
|
31
|
+
...(nlink === undefined ? {} : { nlink }),
|
|
32
|
+
...(uid === undefined ? {} : { uid }),
|
|
33
|
+
...(gid === undefined ? {} : { gid }),
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export class ReadOnlyFileSystem {
|
|
37
|
+
#filesystem;
|
|
38
|
+
#capabilities;
|
|
39
|
+
constructor(filesystem) {
|
|
40
|
+
this.#filesystem = filesystem;
|
|
41
|
+
const atomic = memoryAtomicView(filesystem);
|
|
42
|
+
if (atomic)
|
|
43
|
+
registerMemoryAtomicView(this, atomic, () => {
|
|
44
|
+
if (Object.getPrototypeOf(this) !== ReadOnlyFileSystem.prototype || memoryAtomicView(filesystem) !== atomic)
|
|
45
|
+
return false;
|
|
46
|
+
return Object.entries(readOnlyImplementation).every(([name, expected]) => {
|
|
47
|
+
const actual = Object.getOwnPropertyDescriptor(this, name)
|
|
48
|
+
?? Object.getOwnPropertyDescriptor(ReadOnlyFileSystem.prototype, name);
|
|
49
|
+
return actual?.value === expected.value && actual?.get === expected.get && actual?.set === expected.set;
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
if (Reflect.has(filesystem, pathNamespace))
|
|
53
|
+
Object.defineProperty(this, pathNamespace, {
|
|
54
|
+
get: () => readOnlyPathNamespace(Reflect.get(filesystem, pathNamespace)),
|
|
55
|
+
});
|
|
56
|
+
registerEntryView(this, async (path) => ({ filesystem: this.#filesystem, path, readOnly: true }));
|
|
57
|
+
const streamingRead = typeof filesystem.readStream === "function" ? filesystem.capabilities.streamingRead : false;
|
|
58
|
+
this.#capabilities = readOnlyCapabilities({
|
|
59
|
+
...retainedReadCapabilities(filesystem),
|
|
60
|
+
...(typeof filesystem.open === "function" ? {} : { open: false }),
|
|
61
|
+
readOnly: true,
|
|
62
|
+
append: false,
|
|
63
|
+
symlinks: filesystem.capabilities.symlinks === true && typeof filesystem.readlink === "function",
|
|
64
|
+
hardlinks: false,
|
|
65
|
+
permissions: false,
|
|
66
|
+
timestamps: false,
|
|
67
|
+
atomicRename: false,
|
|
68
|
+
...(streamingRead === undefined ? {} : { streamingRead }),
|
|
69
|
+
streamingWrite: false,
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
get capabilities() {
|
|
73
|
+
return this.#capabilities;
|
|
74
|
+
}
|
|
75
|
+
async capabilitiesFor(path, options) {
|
|
76
|
+
options?.signal?.throwIfAborted();
|
|
77
|
+
if (options?.create !== undefined)
|
|
78
|
+
readOnly("capabilitiesFor", path);
|
|
79
|
+
const capabilities = await this.#filesystem.capabilitiesFor?.(path, options) ?? this.#filesystem.capabilities;
|
|
80
|
+
return readOnlyCapabilities({ ...retainedReadCapabilities(this.#filesystem, capabilities), ...(typeof this.#filesystem.open === "function" ? {} : { open: false }) });
|
|
81
|
+
}
|
|
82
|
+
async open(path, options) {
|
|
83
|
+
options?.signal?.throwIfAborted();
|
|
84
|
+
if (options && (options.access === "write" || options.access === "readwrite" || options.truncate === true || options.append === true
|
|
85
|
+
|| options.creation === "ifMissing" || options.creation === "exclusive"))
|
|
86
|
+
readOnly("open", path);
|
|
87
|
+
return openFileDescriptor(path, options, {
|
|
88
|
+
noFollow: true, positionedRead: true, positionedWrite: false, truncate: false, synchronization: "none",
|
|
89
|
+
}, async (admitted) => {
|
|
90
|
+
const capabilities = admitted.noFollow ? this.#filesystem.capabilities
|
|
91
|
+
: await this.#filesystem.capabilitiesFor?.(path, admitted) ?? this.#filesystem.capabilities;
|
|
92
|
+
if (!this.#filesystem.open || capabilities.open === false)
|
|
93
|
+
throw new FsError("ENOTSUP", { syscall: "open", path });
|
|
94
|
+
admitted.signal?.throwIfAborted();
|
|
95
|
+
const descriptor = await this.#filesystem.open(path, admitted);
|
|
96
|
+
try {
|
|
97
|
+
return forwardFileDescriptor(descriptor, async (_syscall, forwarded, action) => {
|
|
98
|
+
forwarded.signal?.throwIfAborted();
|
|
99
|
+
return action();
|
|
100
|
+
}, { ...descriptor.capabilities,
|
|
101
|
+
...(descriptor.capabilities.openTruncate === undefined ? {} : { openTruncate: false }),
|
|
102
|
+
positionedWrite: false, truncate: false, synchronization: "none" }, snapshotStat);
|
|
103
|
+
}
|
|
104
|
+
catch (error) {
|
|
105
|
+
await finishCleanup(() => descriptor.close(), true);
|
|
106
|
+
throw error;
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
openReadFile(path, options = {}) {
|
|
111
|
+
return openRetainedReadFile(this.#filesystem, path, options);
|
|
112
|
+
}
|
|
113
|
+
async readFile(path, options) {
|
|
114
|
+
return new Uint8Array(await this.#filesystem.readFile(path, options));
|
|
115
|
+
}
|
|
116
|
+
async stat(path, options) {
|
|
117
|
+
return snapshotStat(await this.#filesystem.stat(path, options));
|
|
118
|
+
}
|
|
119
|
+
async lstat(path, options) {
|
|
120
|
+
return snapshotStat(await this.#filesystem.lstat(path, options));
|
|
121
|
+
}
|
|
122
|
+
compareEntry(path, peer, peerPath, options = {}) {
|
|
123
|
+
return compareEntries(this, path, peer, peerPath, options);
|
|
124
|
+
}
|
|
125
|
+
async readdir(path, options) {
|
|
126
|
+
const limit = options?.maxEntries === undefined ? undefined : directoryEntryLimit(options, path);
|
|
127
|
+
const entries = await this.#filesystem.readdir(path, options);
|
|
128
|
+
if (limit !== undefined)
|
|
129
|
+
options?.signal?.throwIfAborted();
|
|
130
|
+
admitDirectoryEntries(entries.length, limit, path);
|
|
131
|
+
return entries.map((entry) => ({ name: entry.name, type: entry.type }));
|
|
132
|
+
}
|
|
133
|
+
async realpath(path, options) {
|
|
134
|
+
return this.#filesystem.realpath(path, options);
|
|
135
|
+
}
|
|
136
|
+
async access(path, mode = ACCESS_MODES.F_OK, options) {
|
|
137
|
+
if (!Number.isInteger(mode) || mode < 0 || mode > 7) {
|
|
138
|
+
throw new FsError("EINVAL", { syscall: "access", path });
|
|
139
|
+
}
|
|
140
|
+
if ((mode & ACCESS_MODES.W_OK) !== 0)
|
|
141
|
+
readOnly("access", path);
|
|
142
|
+
return this.#filesystem.access(path, mode, options);
|
|
143
|
+
}
|
|
144
|
+
async readlink(path, options) {
|
|
145
|
+
if (typeof this.#filesystem.readlink !== "function") {
|
|
146
|
+
throw new FsError("ENOTSUP", { syscall: "readlink", path });
|
|
147
|
+
}
|
|
148
|
+
return this.#filesystem.readlink(path, options);
|
|
149
|
+
}
|
|
150
|
+
async *readStream(path, options) {
|
|
151
|
+
if (typeof this.#filesystem.readStream !== "function") {
|
|
152
|
+
throw new FsError("ENOTSUP", { syscall: "readStream", path });
|
|
153
|
+
}
|
|
154
|
+
for await (const chunk of readBytes(this.#filesystem.readStream(path, options), options?.signal)) {
|
|
155
|
+
yield new Uint8Array(chunk);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
async writeFile(path, _data, _options) {
|
|
159
|
+
readOnly("writeFile", path);
|
|
160
|
+
}
|
|
161
|
+
async appendFile(path, _data, _options) {
|
|
162
|
+
readOnly("appendFile", path);
|
|
163
|
+
}
|
|
164
|
+
async writeStream(path, _source, _options) {
|
|
165
|
+
readOnly("writeStream", path);
|
|
166
|
+
}
|
|
167
|
+
async mkdir(path, _options) {
|
|
168
|
+
readOnly("mkdir", path);
|
|
169
|
+
}
|
|
170
|
+
async rm(path, _options) {
|
|
171
|
+
readOnly("rm", path);
|
|
172
|
+
}
|
|
173
|
+
async unlink(path, _options) {
|
|
174
|
+
readOnly("unlink", path);
|
|
175
|
+
}
|
|
176
|
+
async rmdir(path, _options) {
|
|
177
|
+
readOnly("rmdir", path);
|
|
178
|
+
}
|
|
179
|
+
async rename(source, destination, _options) {
|
|
180
|
+
readOnly("rename", source, destination);
|
|
181
|
+
}
|
|
182
|
+
async copyFile(source, destination, _options) {
|
|
183
|
+
readOnly("copyFile", source, destination);
|
|
184
|
+
}
|
|
185
|
+
async symlink(target, path, _options) {
|
|
186
|
+
readOnly("symlink", target, path);
|
|
187
|
+
}
|
|
188
|
+
async link(existingPath, newPath, _options) {
|
|
189
|
+
readOnly("link", existingPath, newPath);
|
|
190
|
+
}
|
|
191
|
+
async chmod(path, _mode, _options) {
|
|
192
|
+
readOnly("chmod", path);
|
|
193
|
+
}
|
|
194
|
+
async utimes(path, _atimeMs, _mtimeMs, _options) {
|
|
195
|
+
readOnly("utimes", path);
|
|
196
|
+
}
|
|
197
|
+
async truncate(path, _length, _options) {
|
|
198
|
+
readOnly("truncate", path);
|
|
199
|
+
}
|
|
200
|
+
async openResizeFile(path, options = {}) {
|
|
201
|
+
options.signal?.throwIfAborted();
|
|
202
|
+
readOnly("openResizeFile", path);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
const readOnlyImplementation = /* @__PURE__ */ Object.getOwnPropertyDescriptors(ReadOnlyFileSystem.prototype);
|
|
206
|
+
export function createReadOnlyFileSystem(filesystem) {
|
|
207
|
+
return new ReadOnlyFileSystem(filesystem);
|
|
208
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function nativeAllocatedBytes(blocks: unknown, platform: string): number | undefined;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export function nativeAllocatedBytes(blocks, platform) {
|
|
2
|
+
if (platform !== "darwin" && platform !== "linux")
|
|
3
|
+
return undefined;
|
|
4
|
+
if (typeof blocks !== "number" || !Number.isSafeInteger(blocks) || blocks < 0)
|
|
5
|
+
return undefined;
|
|
6
|
+
const bytes = blocks * 512;
|
|
7
|
+
return Number.isSafeInteger(bytes) ? bytes : undefined;
|
|
8
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import type { FileDescriptor, OpenFileOptions } from "../../contracts/descriptor.js";
|
|
2
|
+
import type { AppendFileOptions, ByteSource, CopyFileOptions, DirectoryEntry, FileReadHandle, FileResizeHandle, FileStat, FileSystem, FileSystemCapabilities, FsOptions, RenameOptions, MkdirOptions, ChmodOptions, FileStagingEntry, ConditionalWriteFileOptions, ConditionalRemoveFileOptions, CreateStagedFileOptions, FileStaging, PublishStagedFileOptions, PrepareDirectoryOptions, StagedFileContent, OpenReadFileOptions, OpenResizeFileOptions, ReadDirectoryOptions, ReadFileOptions, ReadStreamOptions, RemoveOptions, WriteFileOptions } from "../../contracts/index.js";
|
|
3
|
+
export interface RealFileSystemOptions {
|
|
4
|
+
/** An existing, absolute host directory. It is never created implicitly. */
|
|
5
|
+
readonly root: string;
|
|
6
|
+
/**
|
|
7
|
+
* Trusted host primitive for an atomic no-replace move (e.g. renameat2 with
|
|
8
|
+
* RENAME_NOREPLACE). Receives resolved absolute host paths. Must reject EEXIST
|
|
9
|
+
* for any existing entry, including dangling symlinks, without mutation.
|
|
10
|
+
* Never implement with an existence check, ordinary rename, or copy/delete.
|
|
11
|
+
* Unsupported filesystems must reject ENOTSUP; cross-device moves reject EXDEV.
|
|
12
|
+
*/
|
|
13
|
+
readonly renameNoReplace?: (source: string, destination: string, options: FsOptions) => Promise<void>;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Async byte filesystem for trusted POSIX hosts (Windows is unsupported).
|
|
17
|
+
* Both relative and absolute input paths are virtual POSIX paths rooted at `/`;
|
|
18
|
+
* components resolve in order, following symlinks before subsequent `..` and
|
|
19
|
+
* preserving trailing directory requirements. Empty paths are ENOENT. Excess
|
|
20
|
+
* input `..` clamps at the virtual root; symlink targets may never cross it.
|
|
21
|
+
* There is no process cwd dependency. The configured host root must already
|
|
22
|
+
* exist; its canonical location is pinned on first use or by the async factory.
|
|
23
|
+
*
|
|
24
|
+
* Absolute symlink targets created here are virtual paths, stored as rooted
|
|
25
|
+
* host targets without lexical normalization. Relative targets retain their
|
|
26
|
+
* text; safe dangling, non-directory, and looping targets may be created.
|
|
27
|
+
* Existing host symlinks are
|
|
28
|
+
* followed only when every traversed component remains beneath the root, with
|
|
29
|
+
* a 40-link traversal limit. Existing absolute host targets must start with the
|
|
30
|
+
* canonical root, not a different host alias of that root. lstat, removal, and
|
|
31
|
+
* rename inspect or modify a final symlink itself rather than its target. Absolute readlink results are
|
|
32
|
+
* translated back into virtual paths; external absolute targets are refused.
|
|
33
|
+
*
|
|
34
|
+
* SECURITY LIMIT: containment checks and subsequent Node path operations are
|
|
35
|
+
* not atomic. O_NOFOLLOW narrows final-file open races, but ancestor swaps,
|
|
36
|
+
* concurrent renames, mount changes, and preexisting hardlinks cannot be made
|
|
37
|
+
* safe by these APIs. This is NOT a race-proof sandbox or an isolation boundary
|
|
38
|
+
* against another process modifying the tree. Use an OS sandbox for that.
|
|
39
|
+
* Conditional chmod and synchronous ancestry validation use the same trusted,
|
|
40
|
+
* externally isolated tree boundary as owned staging. Their final checks and
|
|
41
|
+
* metadata commit do not yield to JavaScript; they do not prevent OS races.
|
|
42
|
+
*
|
|
43
|
+
* Only regular files, directories, and symlinks are represented. Permissions,
|
|
44
|
+
* ownership, timestamp precision, case sensitivity, umask, and rename behavior
|
|
45
|
+
* are those of the host filesystem. Copy is not atomic; rename can fail EXDEV.
|
|
46
|
+
* Cancellation is cooperative between operations/chunks, not rollback: failed
|
|
47
|
+
* or canceled writes/copies may leave partial data. No native commands execute.
|
|
48
|
+
* Destructive rm/rename operands ending in `.` or `..` are refused with EINVAL,
|
|
49
|
+
* including native recursive-rm edge cases that could otherwise delete content.
|
|
50
|
+
* Public filesystem errors carry only virtual operands; native causes are
|
|
51
|
+
* intentionally omitted so host paths cannot escape through nested errors.
|
|
52
|
+
*/
|
|
53
|
+
export declare class RealFileSystem implements FileSystem {
|
|
54
|
+
readonly capabilities: FileSystemCapabilities;
|
|
55
|
+
private readonly configuredRoot;
|
|
56
|
+
private readonly renameNoReplace;
|
|
57
|
+
private rootPromise;
|
|
58
|
+
constructor(options: RealFileSystemOptions | string);
|
|
59
|
+
private root;
|
|
60
|
+
private absoluteTarget;
|
|
61
|
+
private walk;
|
|
62
|
+
private path;
|
|
63
|
+
private operation;
|
|
64
|
+
private protectRoot;
|
|
65
|
+
private stagingSnapshot;
|
|
66
|
+
private expectStaging;
|
|
67
|
+
private stagingMetadata;
|
|
68
|
+
prepareDirectoryAncestry(ancestors: readonly FileStagingEntry[], options?: FsOptions): Promise<() => true>;
|
|
69
|
+
createStagedFile(directoryPath: string, name: string, content: StagedFileContent, options: CreateStagedFileOptions): Promise<FileStaging>;
|
|
70
|
+
private stagingPaths;
|
|
71
|
+
private checkStaging;
|
|
72
|
+
publishStagedFile(staging: FileStaging, destination: string, options: PublishStagedFileOptions): Promise<void>;
|
|
73
|
+
removeStagedFile(staging: FileStaging, options?: FsOptions): Promise<void>;
|
|
74
|
+
writeFileConditional(path: string, data: Uint8Array, options: ConditionalWriteFileOptions): Promise<FileStat>;
|
|
75
|
+
removeFileConditional(path: string, options: ConditionalRemoveFileOptions): Promise<void>;
|
|
76
|
+
prepareDirectory(path: string, options: PrepareDirectoryOptions): Promise<FileStat>;
|
|
77
|
+
open(path: string, options: OpenFileOptions): Promise<FileDescriptor>;
|
|
78
|
+
private protectTerminal;
|
|
79
|
+
readFile(path: string, options?: ReadFileOptions): Promise<Uint8Array>;
|
|
80
|
+
writeFile(path: string, data: Uint8Array, options?: WriteFileOptions): Promise<void>;
|
|
81
|
+
appendFile(path: string, data: Uint8Array, options?: AppendFileOptions): Promise<void>;
|
|
82
|
+
stat(path: string, options?: FsOptions): Promise<FileStat>;
|
|
83
|
+
lstat(path: string, options?: FsOptions): Promise<FileStat>;
|
|
84
|
+
readdir(path: string, options?: ReadDirectoryOptions): Promise<DirectoryEntry[]>;
|
|
85
|
+
mkdir(path: string, options?: MkdirOptions): Promise<void>;
|
|
86
|
+
rmdir(path: string, options?: FsOptions): Promise<void>;
|
|
87
|
+
rm(path: string, options?: RemoveOptions): Promise<void>;
|
|
88
|
+
unlink(path: string, options?: FsOptions): Promise<void>;
|
|
89
|
+
rename(source: string, destination: string, options?: RenameOptions): Promise<void>;
|
|
90
|
+
copyFile(source: string, destination: string, options?: CopyFileOptions): Promise<void>;
|
|
91
|
+
realpath(path: string, options?: FsOptions): Promise<string>;
|
|
92
|
+
access(path: string, mode?: number, options?: FsOptions): Promise<void>;
|
|
93
|
+
readlink(path: string, options?: FsOptions): Promise<string>;
|
|
94
|
+
symlink(target: string, path: string, options?: FsOptions): Promise<void>;
|
|
95
|
+
link(existingPath: string, newPath: string, options?: FsOptions): Promise<void>;
|
|
96
|
+
chmod(path: string, mode: number, options?: ChmodOptions): Promise<void>;
|
|
97
|
+
utimes(path: string, atimeMs: number, mtimeMs: number, options?: FsOptions): Promise<void>;
|
|
98
|
+
truncate(path: string, length?: number, options?: FsOptions): Promise<void>;
|
|
99
|
+
openResizeFile(path: string, options?: OpenResizeFileOptions): Promise<FileResizeHandle>;
|
|
100
|
+
openReadFile(path: string, options?: OpenReadFileOptions): Promise<FileReadHandle>;
|
|
101
|
+
readStream(path: string, options?: ReadStreamOptions): ByteSource;
|
|
102
|
+
writeStream(path: string, source: ByteSource, options?: WriteFileOptions): Promise<void>;
|
|
103
|
+
}
|
|
104
|
+
/** Construct and validate an existing root before returning the backend. */
|
|
105
|
+
export declare function createRealFileSystem(options: RealFileSystemOptions | string): Promise<RealFileSystem>;
|