toolcraft 0.0.749 → 0.0.750
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
|
@@ -17,10 +17,14 @@ function timestamp(now) {
|
|
|
17
17
|
throw new Error();
|
|
18
18
|
return value;
|
|
19
19
|
}
|
|
20
|
-
/**
|
|
21
|
-
|
|
20
|
+
/** Prepare consent for a host that owns a durable issuance journal.
|
|
21
|
+
* The transaction contains secrets: persist privately before exposing the URL.
|
|
22
|
+
* The host must consume state once, validate callback issuer/redirect/expiry,
|
|
23
|
+
* and fence token persistence against reset or superseding grants.
|
|
24
|
+
*/
|
|
25
|
+
export async function prepareRemoteMcpAuthorization(options) {
|
|
22
26
|
try {
|
|
23
|
-
const {
|
|
27
|
+
const { signal, discover } = options;
|
|
24
28
|
const now = options.now?.bind(options) ?? Date.now;
|
|
25
29
|
const resource = httpsUrl(options.resource).href;
|
|
26
30
|
const redirect = httpsUrl(options.redirectUri);
|
|
@@ -32,8 +36,6 @@ export async function beginRemoteMcpAuthorization(options) {
|
|
|
32
36
|
const method = normalizeOAuthTokenEndpointAuthMethod(client.tokenEndpointAuthMethod) ?? (client.clientSecret === undefined ? "none" : "client_secret_post");
|
|
33
37
|
if (client.clientSecret !== undefined && (typeof client.clientSecret !== "string" || !client.clientSecret.trim()))
|
|
34
38
|
throw new Error();
|
|
35
|
-
if (method !== "none" && client.clientSecret === undefined)
|
|
36
|
-
throw new Error();
|
|
37
39
|
if (client.registration !== undefined && (client.registration.client_id !== client.clientId ||
|
|
38
40
|
(client.registration.client_secret != null && client.registration.client_secret !== client.clientSecret) ||
|
|
39
41
|
(client.registration.token_endpoint_auth_method != null && client.registration.token_endpoint_auth_method !== method)))
|
|
@@ -43,6 +45,9 @@ export async function beginRemoteMcpAuthorization(options) {
|
|
|
43
45
|
throw new Error();
|
|
44
46
|
if (client.registration?.redirect_uris != null && !client.registration.redirect_uris.includes(redirect.href))
|
|
45
47
|
throw new Error();
|
|
48
|
+
const statePrefix = options.statePrefix ?? "";
|
|
49
|
+
if (typeof statePrefix !== "string" || statePrefix.length > 32 || [...statePrefix].some(c => !(c >= "a" && c <= "z") && !(c >= "A" && c <= "Z") && !(c >= "0" && c <= "9") && c !== "_" && c !== "-"))
|
|
50
|
+
throw new Error();
|
|
46
51
|
const scope = normalizeOAuthScope(options.scope);
|
|
47
52
|
const ttl = options.ttlMs ?? 600_000;
|
|
48
53
|
if (!Number.isSafeInteger(ttl) || ttl < 1 || ttl > 600_000)
|
|
@@ -58,7 +63,7 @@ export async function beginRemoteMcpAuthorization(options) {
|
|
|
58
63
|
httpsUrl(server.issuer);
|
|
59
64
|
httpsUrl(server.token_endpoint);
|
|
60
65
|
const authorization = httpsUrl(server.authorization_endpoint);
|
|
61
|
-
const state = base64url(crypto.getRandomValues(new Uint8Array(32)));
|
|
66
|
+
const state = statePrefix + base64url(crypto.getRandomValues(new Uint8Array(32)));
|
|
62
67
|
const codeVerifier = base64url(crypto.getRandomValues(new Uint8Array(32)));
|
|
63
68
|
const challenge = base64url(new Uint8Array(await crypto.subtle.digest("SHA-256", new TextEncoder().encode(codeVerifier))));
|
|
64
69
|
const expiresAt = timestamp(now) + ttl;
|
|
@@ -73,10 +78,25 @@ export async function beginRemoteMcpAuthorization(options) {
|
|
|
73
78
|
if (scope !== undefined)
|
|
74
79
|
authorization.searchParams.set("scope", scope);
|
|
75
80
|
signal?.throwIfAborted();
|
|
76
|
-
|
|
77
|
-
|
|
81
|
+
return { authorizationUrl: authorization.href, transaction: { state, expiresAt, redirectUri: redirect.href, codeVerifier,
|
|
82
|
+
requireIssuer: server.authorization_response_iss_parameter_supported === true, session } };
|
|
83
|
+
}
|
|
84
|
+
catch {
|
|
85
|
+
throw new Error("Unable to prepare MCP authorization");
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
/** Start consent without a listener or a pending callback promise. Only the URL leaves private storage. */
|
|
89
|
+
export async function beginRemoteMcpAuthorization(options) {
|
|
90
|
+
try {
|
|
91
|
+
const { store, signal } = options;
|
|
92
|
+
const method = normalizeOAuthTokenEndpointAuthMethod(options.client.tokenEndpointAuthMethod);
|
|
93
|
+
if (method !== undefined && method !== "none" && options.client.clientSecret === undefined)
|
|
94
|
+
throw new Error();
|
|
95
|
+
const { authorizationUrl, transaction } = await prepareRemoteMcpAuthorization(options);
|
|
96
|
+
signal?.throwIfAborted();
|
|
97
|
+
await store.create(transaction);
|
|
78
98
|
signal?.throwIfAborted();
|
|
79
|
-
return { authorizationUrl:
|
|
99
|
+
return { authorizationUrl, expiresAt: transaction.expiresAt };
|
|
80
100
|
}
|
|
81
101
|
catch {
|
|
82
102
|
throw new Error("Unable to begin MCP authorization");
|
package/node_modules/tiny-http-mcp-server/node_modules/mcp-oauth/dist/client/revoke-token.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { OAuthMetadataFetch, OAuthTokenEndpointAuthMethod } from "./types.js";
|
|
2
|
+
/** RFC 7009 revocation; no retries or host persistence changes. */
|
|
3
|
+
export declare function revokeOAuthToken(input: {
|
|
4
|
+
revocationEndpoint: string;
|
|
5
|
+
clientId: string;
|
|
6
|
+
clientSecret?: string;
|
|
7
|
+
tokenEndpointAuthMethod?: OAuthTokenEndpointAuthMethod;
|
|
8
|
+
token: string;
|
|
9
|
+
tokenTypeHint?: "access_token" | "refresh_token";
|
|
10
|
+
fetch: OAuthMetadataFetch;
|
|
11
|
+
signal?: AbortSignal;
|
|
12
|
+
}): Promise<void>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { fetchMcpResponse } from "../http-fetch.js";
|
|
2
|
+
import { readBoundedResponseText } from "../http-response.js";
|
|
3
|
+
import { createOAuthFormRequest } from "./oauth-form.js";
|
|
4
|
+
import { readOAuthJsonObjectResponse } from "./token-endpoint.js";
|
|
5
|
+
/** RFC 7009 revocation; no retries or host persistence changes. */
|
|
6
|
+
export async function revokeOAuthToken(input) {
|
|
7
|
+
if (typeof input.token !== "string" || input.token.trim() === "")
|
|
8
|
+
throw new Error("OAuth revocation requires a token");
|
|
9
|
+
const { body, headers } = createOAuthFormRequest({
|
|
10
|
+
...input,
|
|
11
|
+
params: { token: input.token, ...(input.tokenTypeHint === undefined ? {} : { token_type_hint: input.tokenTypeHint }) }
|
|
12
|
+
});
|
|
13
|
+
input.signal?.throwIfAborted();
|
|
14
|
+
const deadline = AbortSignal.timeout(30_000);
|
|
15
|
+
const signal = input.signal === undefined ? deadline : AbortSignal.any([input.signal, deadline]);
|
|
16
|
+
const response = await fetchMcpResponse(input.fetch, input.revocationEndpoint, {
|
|
17
|
+
method: "POST", headers, body: body.toString(), signal
|
|
18
|
+
});
|
|
19
|
+
if (!response.ok)
|
|
20
|
+
await readOAuthJsonObjectResponse(response, signal);
|
|
21
|
+
// RFC 7009 intentionally permits an empty body, including for an invalid token.
|
|
22
|
+
await readBoundedResponseText(response, 1024 * 1024, undefined, signal);
|
|
23
|
+
}
|
package/node_modules/tiny-http-mcp-server/node_modules/mcp-oauth/dist/client/token-endpoint.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createOAuthFormRequest } from "./oauth-form.js";
|
|
2
2
|
import { canonicalizeResourceIndicator } from "../resource-indicator.js";
|
|
3
3
|
import { readBoundedResponseText } from "../http-response.js";
|
|
4
4
|
import { fetchMcpResponse } from "../http-fetch.js";
|
|
@@ -64,38 +64,25 @@ export async function exchangeAuthorizationCode(input) {
|
|
|
64
64
|
}
|
|
65
65
|
export async function refreshAccessToken(input) {
|
|
66
66
|
const resource = canonicalizeResourceIndicator(input.resource);
|
|
67
|
-
|
|
67
|
+
const refreshToken = input.refreshToken;
|
|
68
|
+
const tokens = await requestTokens({
|
|
68
69
|
tokenEndpoint: input.tokenEndpoint,
|
|
69
70
|
clientId: input.clientId,
|
|
70
71
|
clientSecret: input.clientSecret,
|
|
71
72
|
tokenEndpointAuthMethod: input.tokenEndpointAuthMethod,
|
|
72
73
|
params: {
|
|
73
74
|
grant_type: "refresh_token",
|
|
74
|
-
refresh_token:
|
|
75
|
+
refresh_token: refreshToken,
|
|
75
76
|
resource
|
|
76
77
|
},
|
|
77
78
|
fetch: input.fetch,
|
|
78
79
|
signal: input.signal,
|
|
79
80
|
now: input.now
|
|
80
81
|
});
|
|
82
|
+
return { ...tokens, refreshToken: tokens.refreshToken ?? refreshToken };
|
|
81
83
|
}
|
|
82
84
|
async function requestTokens(input) {
|
|
83
|
-
const
|
|
84
|
-
(input.clientSecret === undefined ? "none" : "client_secret_post");
|
|
85
|
-
if (method !== "none" && (input.clientSecret === undefined || input.clientSecret.trim() === ""))
|
|
86
|
-
throw new Error("OAuth token endpoint authentication requires a client secret");
|
|
87
|
-
const body = new URLSearchParams(input.params);
|
|
88
|
-
const headers = new Headers({ Accept: "application/json", "Content-Type": "application/x-www-form-urlencoded" });
|
|
89
|
-
if (method === "client_secret_basic") {
|
|
90
|
-
const encoded = new URLSearchParams({ credential: input.clientId }).toString().slice("credential=".length);
|
|
91
|
-
const encodedSecret = new URLSearchParams({ credential: input.clientSecret }).toString().slice("credential=".length);
|
|
92
|
-
headers.set("Authorization", `Basic ${btoa(`${encoded}:${encodedSecret}`)}`);
|
|
93
|
-
}
|
|
94
|
-
else {
|
|
95
|
-
body.set("client_id", input.clientId);
|
|
96
|
-
if (method === "client_secret_post")
|
|
97
|
-
body.set("client_secret", input.clientSecret);
|
|
98
|
-
}
|
|
85
|
+
const { body, headers } = createOAuthFormRequest(input);
|
|
99
86
|
input.signal?.throwIfAborted();
|
|
100
87
|
const deadline = AbortSignal.timeout(30_000);
|
|
101
88
|
const signal = input.signal === undefined ? deadline : AbortSignal.any([input.signal, deadline]);
|
|
@@ -34,7 +34,7 @@ export async function fetchMcpResponse(fetchImplementation, input, init = {}) {
|
|
|
34
34
|
abort();
|
|
35
35
|
return;
|
|
36
36
|
}
|
|
37
|
-
if (response.redirected || response.type === "opaqueredirect") {
|
|
37
|
+
if (response.redirected || response.type === "opaqueredirect" || (response.status >= 300 && response.status < 400)) {
|
|
38
38
|
void response.body?.cancel().catch(() => undefined);
|
|
39
39
|
finish(new Error("MCP HTTP redirects are not allowed"));
|
|
40
40
|
}
|
|
@@ -10,11 +10,15 @@ import type { OAuthClientProvider, OAuthClientProviderOptions } from "./client/t
|
|
|
10
10
|
export declare function createOAuthClientProvider(options: OAuthClientProviderOptions): OAuthClientProvider;
|
|
11
11
|
export declare function createDefaultOAuthClientProvider(): never;
|
|
12
12
|
export declare function createAuthStoreSessionStore(): never;
|
|
13
|
-
export { beginRemoteMcpAuthorization, completeRemoteMcpAuthorization } from "./client/resumable.js";
|
|
14
|
-
export type { RemoteMcpAuthorizationTransaction, RemoteMcpAuthorizationStore, BeginRemoteMcpAuthorizationOptions, CompleteRemoteMcpAuthorizationOptions } from "./client/resumable.js";
|
|
13
|
+
export { prepareRemoteMcpAuthorization, beginRemoteMcpAuthorization, completeRemoteMcpAuthorization } from "./client/resumable.js";
|
|
14
|
+
export type { RemoteMcpAuthorizationTransaction, RemoteMcpAuthorizationStore, PrepareRemoteMcpAuthorizationOptions, BeginRemoteMcpAuthorizationOptions, CompleteRemoteMcpAuthorizationOptions } from "./client/resumable.js";
|
|
15
15
|
export { normalizeOAuthScope } from "./client/scope.js";
|
|
16
16
|
export { waitForOAuthOperation } from "./client/cancellable-operation.js";
|
|
17
17
|
export { parseOAuthTokenGrant } from "./client/token-grant.js";
|
|
18
18
|
export { parseOAuthClientRegistration, normalizeStoredOAuthClient } from "./client/client-registration.js";
|
|
19
19
|
/** Native persistence needs a desktop host; portable callers provide atomic hooks. */
|
|
20
20
|
export declare function createResourceBoundOAuthStores(): never;
|
|
21
|
+
export { generateCodeChallenge, generateCodeVerifier } from "./client/pkce.js";
|
|
22
|
+
export { exchangeAuthorizationCode, refreshAccessToken } from "./client/token-endpoint.js";
|
|
23
|
+
export { revokeOAuthToken } from "./client/revoke-token.js";
|
|
24
|
+
export { registerOAuthClient, type RegisterOAuthClientOptions } from "./client/register-client.js";
|
|
@@ -16,7 +16,7 @@ export function createDefaultOAuthClientProvider() {
|
|
|
16
16
|
export function createAuthStoreSessionStore() {
|
|
17
17
|
throw new Error("Desktop OAuth persistence is unavailable in Worker MCP");
|
|
18
18
|
}
|
|
19
|
-
export { beginRemoteMcpAuthorization, completeRemoteMcpAuthorization } from "./client/resumable.js";
|
|
19
|
+
export { prepareRemoteMcpAuthorization, beginRemoteMcpAuthorization, completeRemoteMcpAuthorization } from "./client/resumable.js";
|
|
20
20
|
export { normalizeOAuthScope } from "./client/scope.js";
|
|
21
21
|
export { waitForOAuthOperation } from "./client/cancellable-operation.js";
|
|
22
22
|
export { parseOAuthTokenGrant } from "./client/token-grant.js";
|
|
@@ -25,3 +25,7 @@ export { parseOAuthClientRegistration, normalizeStoredOAuthClient } from "./clie
|
|
|
25
25
|
export function createResourceBoundOAuthStores() {
|
|
26
26
|
throw new Error("Desktop OAuth persistence is unavailable in Worker MCP; provide host-owned import/reset hooks");
|
|
27
27
|
}
|
|
28
|
+
export { generateCodeChallenge, generateCodeVerifier } from "./client/pkce.js";
|
|
29
|
+
export { exchangeAuthorizationCode, refreshAccessToken } from "./client/token-endpoint.js";
|
|
30
|
+
export { revokeOAuthToken } from "./client/revoke-token.js";
|
|
31
|
+
export { registerOAuthClient } from "./client/register-client.js";
|
|
@@ -18,5 +18,8 @@ export type { JwksTokenVerifier, JwksTokenVerifierOptions, JwksVerifiedAccessTok
|
|
|
18
18
|
export type { LoopbackAuthorizationOptions, LoopbackAuthorizationSession, OAuthLandingPage, } from "./client/loopback-authorization.js";
|
|
19
19
|
export { readBoundedResponseText } from "./http-response.js";
|
|
20
20
|
export { fetchMcpResponse } from "./http-fetch.js";
|
|
21
|
-
export { beginRemoteMcpAuthorization, completeRemoteMcpAuthorization } from "./client/resumable.js";
|
|
22
|
-
export type { RemoteMcpAuthorizationTransaction, RemoteMcpAuthorizationStore, BeginRemoteMcpAuthorizationOptions, CompleteRemoteMcpAuthorizationOptions } from "./client/resumable.js";
|
|
21
|
+
export { prepareRemoteMcpAuthorization, beginRemoteMcpAuthorization, completeRemoteMcpAuthorization } from "./client/resumable.js";
|
|
22
|
+
export type { RemoteMcpAuthorizationTransaction, RemoteMcpAuthorizationStore, PrepareRemoteMcpAuthorizationOptions, BeginRemoteMcpAuthorizationOptions, CompleteRemoteMcpAuthorizationOptions } from "./client/resumable.js";
|
|
23
|
+
export { exchangeAuthorizationCode, refreshAccessToken } from "./client/token-endpoint.js";
|
|
24
|
+
export { revokeOAuthToken } from "./client/revoke-token.js";
|
|
25
|
+
export { registerOAuthClient, type RegisterOAuthClientOptions } from "./client/register-client.js";
|
|
@@ -13,4 +13,7 @@ export { canonicalizeResourceIndicator, } from "./resource-indicator.js";
|
|
|
13
13
|
export { createJwksTokenVerifier, } from "./server/jwks-token-verifier.js";
|
|
14
14
|
export { readBoundedResponseText } from "./http-response.js";
|
|
15
15
|
export { fetchMcpResponse } from "./http-fetch.js";
|
|
16
|
-
export { beginRemoteMcpAuthorization, completeRemoteMcpAuthorization } from "./client/resumable.js";
|
|
16
|
+
export { prepareRemoteMcpAuthorization, beginRemoteMcpAuthorization, completeRemoteMcpAuthorization } from "./client/resumable.js";
|
|
17
|
+
export { exchangeAuthorizationCode, refreshAccessToken } from "./client/token-endpoint.js";
|
|
18
|
+
export { revokeOAuthToken } from "./client/revoke-token.js";
|
|
19
|
+
export { registerOAuthClient } from "./client/register-client.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tiny-http-mcp-server",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.124",
|
|
4
4
|
"description": "Minimal MCP server over HTTP built on tiny-stdio-mcp-server",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -32,10 +32,10 @@
|
|
|
32
32
|
},
|
|
33
33
|
"scripts": {
|
|
34
34
|
"build": "node ../../scripts/guard-package-dist.mjs && tsc",
|
|
35
|
-
"prepack": "node ../../scripts/set-bin-executable.mjs && node ../../scripts/manage-bundled-workspace-deps.mjs prepare-local . mcp-oauth auth-store tiny-mcp-client jose",
|
|
36
|
-
"postpack": "node ../../scripts/manage-bundled-workspace-deps.mjs cleanup-after-pack . mcp-oauth auth-store tiny-mcp-client jose",
|
|
35
|
+
"prepack": "node ../../scripts/set-bin-executable.mjs && node ../../scripts/manage-bundled-workspace-deps.mjs prepare-local . mcp-oauth auth-store tiny-mcp-client jose @poe-code/safe-fs @poe-code/xml-ast @noble/hashes",
|
|
36
|
+
"postpack": "node ../../scripts/manage-bundled-workspace-deps.mjs cleanup-after-pack . mcp-oauth auth-store tiny-mcp-client jose @poe-code/safe-fs @poe-code/xml-ast @noble/hashes",
|
|
37
37
|
"prepublishOnly": "tsc",
|
|
38
|
-
"postpublish": "node ../../scripts/manage-bundled-workspace-deps.mjs cleanup . mcp-oauth auth-store tiny-mcp-client jose",
|
|
38
|
+
"postpublish": "node ../../scripts/manage-bundled-workspace-deps.mjs cleanup . mcp-oauth auth-store tiny-mcp-client jose @poe-code/safe-fs @poe-code/xml-ast @noble/hashes",
|
|
39
39
|
"test:unit": "cd ../.. && vitest run packages/tiny-http-mcp-server/src"
|
|
40
40
|
},
|
|
41
41
|
"files": [
|
|
@@ -53,6 +53,8 @@ timer; a timeout releases request capacity so later operations can proceed.
|
|
|
53
53
|
|
|
54
54
|
## Transports
|
|
55
55
|
|
|
56
|
+
The `workerd` and `browser` exports provide HTTP transport without Node built-ins or polyfills. Supply authenticated `fetch` or a host-owned OAuth provider. `StdioTransport` can use an explicitly supplied `spawn` adapter on portable hosts; its default process launcher remains Node-only.
|
|
57
|
+
|
|
56
58
|
| Transport | Description |
|
|
57
59
|
| ------------------------------- | ----------------------------------------------------------------------------------------------------------- |
|
|
58
60
|
| `StdioTransport` | Spawns an MCP server process and communicates over stdio. |
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { SpawnOptions, ChildProcessWithoutNullStreams } from 'node:child_process';
|
|
2
1
|
import { Readable, Writable } from 'node:stream';
|
|
3
2
|
import http from 'node:http';
|
|
4
3
|
import { ContentItem as ContentItem$1, ResourceContents as ResourceContents$1, Implementation, Tool as Tool$1, Resource, ResourceTemplate, Prompt, Server } from 'tiny-stdio-mcp-server';
|
|
5
4
|
export { ContentAnnotations, Icon, Implementation, Prompt, PromptArgument, Resource, ResourceLink, ResourceTemplate, ToolAnnotations, ToolExecution } from 'tiny-stdio-mcp-server';
|
|
5
|
+
import { SpawnOptions, ChildProcessWithoutNullStreams } from 'node:child_process';
|
|
6
6
|
|
|
7
7
|
interface NotificationFilter {
|
|
8
8
|
toolsListChanged?: boolean;
|
|
@@ -701,14 +701,6 @@ interface SdkTestPair<TClient extends McpClientConnection> {
|
|
|
701
701
|
}
|
|
702
702
|
declare function createSdkTestPair<TClient extends McpClientConnection>(server: SdkServerConnection, createClient: () => TClient): Promise<SdkTestPair<TClient>>;
|
|
703
703
|
declare function createTestPair<TClient extends McpClientConnection>(server: Server, createClient: () => TClient): Promise<SdkTestPair<TClient>>;
|
|
704
|
-
type StdioSpawn = (command: string, args: ReadonlyArray<string>, options: SpawnOptions) => ChildProcessWithoutNullStreams;
|
|
705
|
-
interface StdioTransportOptions {
|
|
706
|
-
command: string;
|
|
707
|
-
args?: string[];
|
|
708
|
-
cwd?: string;
|
|
709
|
-
env?: NodeJS.ProcessEnv;
|
|
710
|
-
spawn?: StdioSpawn;
|
|
711
|
-
}
|
|
712
704
|
type HttpTransportFetch = (input: string | URL, init?: RequestInit) => Promise<Response>;
|
|
713
705
|
declare class HttpTransportError extends Error {
|
|
714
706
|
readonly status: number;
|
|
@@ -728,19 +720,6 @@ interface HttpTransportOptions {
|
|
|
728
720
|
/** Maximum JSON response bytes or individual SSE event bytes; not a stream lifetime cap. */
|
|
729
721
|
maxResponseBytes?: number;
|
|
730
722
|
}
|
|
731
|
-
declare class StdioTransport implements McpTransport {
|
|
732
|
-
readonly readable: Readable;
|
|
733
|
-
readonly writable: Writable;
|
|
734
|
-
readonly closed: Promise<McpTransportClosedEvent>;
|
|
735
|
-
private readonly child;
|
|
736
|
-
private disposed;
|
|
737
|
-
private stderrOutput;
|
|
738
|
-
private static readonly STDERR_MAX_LENGTH;
|
|
739
|
-
constructor({ command, args, cwd, env, spawn: spawnProcess, }: StdioTransportOptions);
|
|
740
|
-
getStderrOutput(): string;
|
|
741
|
-
private appendStderrOutput;
|
|
742
|
-
dispose(reason?: Error): void;
|
|
743
|
-
}
|
|
744
723
|
/** Own and validate static HTTP headers without reflecting malformed values. */
|
|
745
724
|
declare function snapshotHttpTransportHeaders(headers?: RequestInit["headers"]): Headers;
|
|
746
725
|
declare class HttpTransport implements McpTransport {
|
|
@@ -890,5 +869,28 @@ declare class JsonRpcMessageLayer {
|
|
|
890
869
|
private handleCancellationNotification;
|
|
891
870
|
}
|
|
892
871
|
|
|
893
|
-
|
|
872
|
+
type StdioSpawn = (command: string, args: ReadonlyArray<string>, options: SpawnOptions) => ChildProcessWithoutNullStreams;
|
|
873
|
+
interface StdioTransportOptions {
|
|
874
|
+
command: string;
|
|
875
|
+
args?: string[];
|
|
876
|
+
cwd?: string;
|
|
877
|
+
env?: NodeJS.ProcessEnv;
|
|
878
|
+
spawn?: StdioSpawn;
|
|
879
|
+
}
|
|
880
|
+
declare function defaultStdioSpawn(command: string, args: ReadonlyArray<string>, options: SpawnOptions): ChildProcessWithoutNullStreams;
|
|
881
|
+
declare class StdioTransport implements McpTransport {
|
|
882
|
+
readonly readable: Readable;
|
|
883
|
+
readonly writable: Writable;
|
|
884
|
+
readonly closed: Promise<McpTransportClosedEvent>;
|
|
885
|
+
private readonly child;
|
|
886
|
+
private disposed;
|
|
887
|
+
private stderrOutput;
|
|
888
|
+
private static readonly STDERR_MAX_LENGTH;
|
|
889
|
+
constructor({ command, args, cwd, env, spawn: spawnProcess, }: StdioTransportOptions);
|
|
890
|
+
getStderrOutput(): string;
|
|
891
|
+
private appendStderrOutput;
|
|
892
|
+
dispose(reason?: Error): void;
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
export { ERROR_INTERNAL, ERROR_INVALID_PARAMS, ERROR_INVALID_REQUEST, ERROR_METHOD_NOT_FOUND, ERROR_PARSE, HttpTransport, HttpTransportError, JsonRpcMessageLayer, MCP_PROTOCOL_VERSIONS, McpClient, McpError, OAuthMetadataDiscovery, OAuthMetadataError, StdioTransport, createInMemoryTransportPair, createSdkTestPair, createTestPair, defaultStdioSpawn, discoverOAuthMetadata, fetchMcpResponse, snapshotHttpTransportHeaders };
|
|
894
896
|
export type { AudioContent, BlobResourceContents, CacheableResultMetadata, CallToolOptions, CallToolParams, CallToolResult, ClientCapabilities, CompleteArgument, CompleteParams, CompleteResult, Completion, ConnectResult, ContentItem, CreateMessageParams, CreateMessageResult, ElicitationParams, ElicitationResult, EmbeddedResource, GetPromptParams, GetPromptResult, HttpTransportFetch, HttpTransportOptions, ImageContent, InMemoryTransportPair, IncludeContext, InitializeParams, InitializeResult, JsonRpcErrorObject, JsonRpcErrorResponse, JsonRpcMessage, JsonRpcNotification, JsonRpcRequest, JsonRpcRequestOptions, JsonRpcResponse, JsonRpcSuccessResponse, LogLevel, LogMessage, McpClientConnection, McpClientOptions, McpProtocolVersion, McpRequestContext, McpSubscription, McpTransport, McpTransportClosedEvent, ModelHint, ModelPreferences, NotificationFilter, OAuthAuthorizationServerMetadata, OAuthClientProvider, OAuthClientProviderOptions, OAuthDiscoveryCache, OAuthDiscoveryResult, OAuthMetadataFetch, OAuthProtectedResourceMetadata, OAuthSessionStore, OAuthUnauthorizedChallenge, PaginatedParams, PaginatedResult, ProgressParams, ProgressToken, PromptMessage, PromptReference, ReadResourceParams, RequestId, ResourceContents, ResourceReference, ResultMetadata, Root, SamplingContent, SamplingMessage, SdkTestPair, ServerCapabilities, StdioSpawn, StdioTransportOptions, StoredOAuthSession, SubscriptionOptions, TextContent, TextResourceContents, Tool, ToolResultContent, ToolUseContent };
|
|
@@ -291,6 +291,9 @@ function dialectFor(schema, inherited) {
|
|
|
291
291
|
return inherited;
|
|
292
292
|
}
|
|
293
293
|
function resolveUri(reference, baseUri) {
|
|
294
|
+
if (typeof URL === "undefined" && (reference === "" || reference.startsWith("#"))) {
|
|
295
|
+
return `${withoutFragment(baseUri)}${reference}`;
|
|
296
|
+
}
|
|
294
297
|
try {
|
|
295
298
|
return new URL(reference, baseUri).href;
|
|
296
299
|
} catch {
|
|
@@ -3552,7 +3555,7 @@ async function fetchMcpResponse(fetchImplementation, input, init = {}) {
|
|
|
3552
3555
|
abort();
|
|
3553
3556
|
return;
|
|
3554
3557
|
}
|
|
3555
|
-
if (response.redirected || response.type === "opaqueredirect") {
|
|
3558
|
+
if (response.redirected || response.type === "opaqueredirect" || response.status >= 300 && response.status < 400) {
|
|
3556
3559
|
void response.body?.cancel().catch(() => void 0);
|
|
3557
3560
|
finish(new Error("MCP HTTP redirects are not allowed"));
|
|
3558
3561
|
} else
|
|
@@ -6521,6 +6524,115 @@ function parseJsonRpcPayload(parsed) {
|
|
|
6521
6524
|
}
|
|
6522
6525
|
};
|
|
6523
6526
|
}
|
|
6527
|
+
|
|
6528
|
+
// src/spawn.browser.ts
|
|
6529
|
+
var spawn = () => {
|
|
6530
|
+
throw new TypeError("This host requires an explicit MCP process adapter; use HTTP or supply spawn.");
|
|
6531
|
+
};
|
|
6532
|
+
|
|
6533
|
+
// src/stdio-transport.ts
|
|
6534
|
+
function defaultStdioSpawn(command, args, options) {
|
|
6535
|
+
return spawn(command, args, options);
|
|
6536
|
+
}
|
|
6537
|
+
var StdioTransport = class _StdioTransport {
|
|
6538
|
+
readable;
|
|
6539
|
+
writable;
|
|
6540
|
+
closed;
|
|
6541
|
+
child;
|
|
6542
|
+
disposed = false;
|
|
6543
|
+
stderrOutput = "";
|
|
6544
|
+
static STDERR_MAX_LENGTH = 65536;
|
|
6545
|
+
constructor({
|
|
6546
|
+
command,
|
|
6547
|
+
args = [],
|
|
6548
|
+
cwd,
|
|
6549
|
+
env,
|
|
6550
|
+
spawn: spawnProcess = defaultStdioSpawn
|
|
6551
|
+
}) {
|
|
6552
|
+
this.child = spawnProcess(command, args, {
|
|
6553
|
+
cwd,
|
|
6554
|
+
env,
|
|
6555
|
+
stdio: ["pipe", "pipe", "pipe"]
|
|
6556
|
+
});
|
|
6557
|
+
const child = this.child;
|
|
6558
|
+
this.readable = child.stdout;
|
|
6559
|
+
this.writable = child.stdin;
|
|
6560
|
+
const stderrDecoder = new TextDecoder();
|
|
6561
|
+
child.stderr.on("data", (chunk) => {
|
|
6562
|
+
const decoded = chunk instanceof Uint8Array ? stderrDecoder.decode(chunk, { stream: true }) : `${stderrDecoder.decode()}${String(chunk)}`;
|
|
6563
|
+
this.appendStderrOutput(decoded);
|
|
6564
|
+
});
|
|
6565
|
+
child.stderr.once("end", () => {
|
|
6566
|
+
this.appendStderrOutput(stderrDecoder.decode());
|
|
6567
|
+
});
|
|
6568
|
+
this.closed = new Promise((resolve) => {
|
|
6569
|
+
let settled = false;
|
|
6570
|
+
let streamError;
|
|
6571
|
+
const resolveClosed = (event) => {
|
|
6572
|
+
if (settled) {
|
|
6573
|
+
return;
|
|
6574
|
+
}
|
|
6575
|
+
settled = true;
|
|
6576
|
+
resolve(event);
|
|
6577
|
+
};
|
|
6578
|
+
for (const stream of [child.stdin, child.stdout, child.stderr]) {
|
|
6579
|
+
stream.once("error", (reason) => {
|
|
6580
|
+
streamError ??= reason;
|
|
6581
|
+
this.dispose(reason);
|
|
6582
|
+
});
|
|
6583
|
+
}
|
|
6584
|
+
child.once("exit", (code, signal) => {
|
|
6585
|
+
const closedEvent = {
|
|
6586
|
+
reason: streamError ?? new Error("Stdio transport process exited")
|
|
6587
|
+
};
|
|
6588
|
+
if (code !== null) {
|
|
6589
|
+
closedEvent.code = code;
|
|
6590
|
+
}
|
|
6591
|
+
if (signal !== null) {
|
|
6592
|
+
closedEvent.signal = signal;
|
|
6593
|
+
}
|
|
6594
|
+
resolveClosed(closedEvent);
|
|
6595
|
+
});
|
|
6596
|
+
child.once("error", (error) => {
|
|
6597
|
+
const closedEvent = {
|
|
6598
|
+
reason: error instanceof Error ? error : new Error(String(error))
|
|
6599
|
+
};
|
|
6600
|
+
if (child.exitCode !== null) {
|
|
6601
|
+
closedEvent.code = child.exitCode;
|
|
6602
|
+
}
|
|
6603
|
+
if (child.signalCode !== null) {
|
|
6604
|
+
closedEvent.signal = child.signalCode;
|
|
6605
|
+
}
|
|
6606
|
+
resolveClosed(closedEvent);
|
|
6607
|
+
});
|
|
6608
|
+
});
|
|
6609
|
+
}
|
|
6610
|
+
getStderrOutput() {
|
|
6611
|
+
return this.stderrOutput;
|
|
6612
|
+
}
|
|
6613
|
+
appendStderrOutput(chunk) {
|
|
6614
|
+
if (chunk.length === 0) {
|
|
6615
|
+
return;
|
|
6616
|
+
}
|
|
6617
|
+
this.stderrOutput += chunk;
|
|
6618
|
+
if (this.stderrOutput.length > _StdioTransport.STDERR_MAX_LENGTH) {
|
|
6619
|
+
this.stderrOutput = this.stderrOutput.slice(-_StdioTransport.STDERR_MAX_LENGTH);
|
|
6620
|
+
}
|
|
6621
|
+
}
|
|
6622
|
+
dispose(reason = new Error("Stdio transport disposed")) {
|
|
6623
|
+
void reason;
|
|
6624
|
+
if (this.disposed) {
|
|
6625
|
+
return;
|
|
6626
|
+
}
|
|
6627
|
+
this.disposed = true;
|
|
6628
|
+
if (!this.child.stdin.destroyed && !this.child.stdin.writableEnded) {
|
|
6629
|
+
this.child.stdin.end();
|
|
6630
|
+
}
|
|
6631
|
+
if (this.child.exitCode === null && this.child.signalCode === null && !this.child.killed) {
|
|
6632
|
+
this.child.kill("SIGTERM");
|
|
6633
|
+
}
|
|
6634
|
+
}
|
|
6635
|
+
};
|
|
6524
6636
|
export {
|
|
6525
6637
|
HttpTransport,
|
|
6526
6638
|
HttpTransportError,
|
|
@@ -6529,7 +6641,10 @@ export {
|
|
|
6529
6641
|
McpError,
|
|
6530
6642
|
OAuthMetadataDiscovery,
|
|
6531
6643
|
OAuthMetadataError,
|
|
6644
|
+
StdioTransport,
|
|
6645
|
+
defaultStdioSpawn,
|
|
6532
6646
|
discoverOAuthMetadata,
|
|
6647
|
+
fetchMcpResponse,
|
|
6533
6648
|
snapshotHttpTransportHeaders
|
|
6534
6649
|
};
|
|
6535
6650
|
/*!
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { SpawnOptions, ChildProcessWithoutNullStreams } from 'node:child_process';
|
|
2
1
|
import { Readable, Writable } from 'node:stream';
|
|
3
2
|
import http from 'node:http';
|
|
4
3
|
import { ContentItem as ContentItem$1, ResourceContents as ResourceContents$1, Implementation, Tool as Tool$1, Resource, ResourceTemplate, Prompt, Server } from 'tiny-stdio-mcp-server';
|
|
5
4
|
export { ContentAnnotations, Icon, Implementation, Prompt, PromptArgument, Resource, ResourceLink, ResourceTemplate, ToolAnnotations, ToolExecution } from 'tiny-stdio-mcp-server';
|
|
5
|
+
import { SpawnOptions, ChildProcessWithoutNullStreams } from 'node:child_process';
|
|
6
6
|
|
|
7
7
|
interface NotificationFilter {
|
|
8
8
|
toolsListChanged?: boolean;
|
|
@@ -701,14 +701,6 @@ interface SdkTestPair<TClient extends McpClientConnection> {
|
|
|
701
701
|
}
|
|
702
702
|
declare function createSdkTestPair<TClient extends McpClientConnection>(server: SdkServerConnection, createClient: () => TClient): Promise<SdkTestPair<TClient>>;
|
|
703
703
|
declare function createTestPair<TClient extends McpClientConnection>(server: Server, createClient: () => TClient): Promise<SdkTestPair<TClient>>;
|
|
704
|
-
type StdioSpawn = (command: string, args: ReadonlyArray<string>, options: SpawnOptions) => ChildProcessWithoutNullStreams;
|
|
705
|
-
interface StdioTransportOptions {
|
|
706
|
-
command: string;
|
|
707
|
-
args?: string[];
|
|
708
|
-
cwd?: string;
|
|
709
|
-
env?: NodeJS.ProcessEnv;
|
|
710
|
-
spawn?: StdioSpawn;
|
|
711
|
-
}
|
|
712
704
|
type HttpTransportFetch = (input: string | URL, init?: RequestInit) => Promise<Response>;
|
|
713
705
|
declare class HttpTransportError extends Error {
|
|
714
706
|
readonly status: number;
|
|
@@ -728,19 +720,6 @@ interface HttpTransportOptions {
|
|
|
728
720
|
/** Maximum JSON response bytes or individual SSE event bytes; not a stream lifetime cap. */
|
|
729
721
|
maxResponseBytes?: number;
|
|
730
722
|
}
|
|
731
|
-
declare class StdioTransport implements McpTransport {
|
|
732
|
-
readonly readable: Readable;
|
|
733
|
-
readonly writable: Writable;
|
|
734
|
-
readonly closed: Promise<McpTransportClosedEvent>;
|
|
735
|
-
private readonly child;
|
|
736
|
-
private disposed;
|
|
737
|
-
private stderrOutput;
|
|
738
|
-
private static readonly STDERR_MAX_LENGTH;
|
|
739
|
-
constructor({ command, args, cwd, env, spawn: spawnProcess, }: StdioTransportOptions);
|
|
740
|
-
getStderrOutput(): string;
|
|
741
|
-
private appendStderrOutput;
|
|
742
|
-
dispose(reason?: Error): void;
|
|
743
|
-
}
|
|
744
723
|
/** Own and validate static HTTP headers without reflecting malformed values. */
|
|
745
724
|
declare function snapshotHttpTransportHeaders(headers?: RequestInit["headers"]): Headers;
|
|
746
725
|
declare class HttpTransport implements McpTransport {
|
|
@@ -890,5 +869,28 @@ declare class JsonRpcMessageLayer {
|
|
|
890
869
|
private handleCancellationNotification;
|
|
891
870
|
}
|
|
892
871
|
|
|
893
|
-
|
|
872
|
+
type StdioSpawn = (command: string, args: ReadonlyArray<string>, options: SpawnOptions) => ChildProcessWithoutNullStreams;
|
|
873
|
+
interface StdioTransportOptions {
|
|
874
|
+
command: string;
|
|
875
|
+
args?: string[];
|
|
876
|
+
cwd?: string;
|
|
877
|
+
env?: NodeJS.ProcessEnv;
|
|
878
|
+
spawn?: StdioSpawn;
|
|
879
|
+
}
|
|
880
|
+
declare function defaultStdioSpawn(command: string, args: ReadonlyArray<string>, options: SpawnOptions): ChildProcessWithoutNullStreams;
|
|
881
|
+
declare class StdioTransport implements McpTransport {
|
|
882
|
+
readonly readable: Readable;
|
|
883
|
+
readonly writable: Writable;
|
|
884
|
+
readonly closed: Promise<McpTransportClosedEvent>;
|
|
885
|
+
private readonly child;
|
|
886
|
+
private disposed;
|
|
887
|
+
private stderrOutput;
|
|
888
|
+
private static readonly STDERR_MAX_LENGTH;
|
|
889
|
+
constructor({ command, args, cwd, env, spawn: spawnProcess, }: StdioTransportOptions);
|
|
890
|
+
getStderrOutput(): string;
|
|
891
|
+
private appendStderrOutput;
|
|
892
|
+
dispose(reason?: Error): void;
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
export { ERROR_INTERNAL, ERROR_INVALID_PARAMS, ERROR_INVALID_REQUEST, ERROR_METHOD_NOT_FOUND, ERROR_PARSE, HttpTransport, HttpTransportError, JsonRpcMessageLayer, MCP_PROTOCOL_VERSIONS, McpClient, McpError, OAuthMetadataDiscovery, OAuthMetadataError, StdioTransport, createInMemoryTransportPair, createSdkTestPair, createTestPair, defaultStdioSpawn, discoverOAuthMetadata, fetchMcpResponse, snapshotHttpTransportHeaders };
|
|
894
896
|
export type { AudioContent, BlobResourceContents, CacheableResultMetadata, CallToolOptions, CallToolParams, CallToolResult, ClientCapabilities, CompleteArgument, CompleteParams, CompleteResult, Completion, ConnectResult, ContentItem, CreateMessageParams, CreateMessageResult, ElicitationParams, ElicitationResult, EmbeddedResource, GetPromptParams, GetPromptResult, HttpTransportFetch, HttpTransportOptions, ImageContent, InMemoryTransportPair, IncludeContext, InitializeParams, InitializeResult, JsonRpcErrorObject, JsonRpcErrorResponse, JsonRpcMessage, JsonRpcNotification, JsonRpcRequest, JsonRpcRequestOptions, JsonRpcResponse, JsonRpcSuccessResponse, LogLevel, LogMessage, McpClientConnection, McpClientOptions, McpProtocolVersion, McpRequestContext, McpSubscription, McpTransport, McpTransportClosedEvent, ModelHint, ModelPreferences, NotificationFilter, OAuthAuthorizationServerMetadata, OAuthClientProvider, OAuthClientProviderOptions, OAuthDiscoveryCache, OAuthDiscoveryResult, OAuthMetadataFetch, OAuthProtectedResourceMetadata, OAuthSessionStore, OAuthUnauthorizedChallenge, PaginatedParams, PaginatedResult, ProgressParams, ProgressToken, PromptMessage, PromptReference, ReadResourceParams, RequestId, ResourceContents, ResourceReference, ResultMetadata, Root, SamplingContent, SamplingMessage, SdkTestPair, ServerCapabilities, StdioSpawn, StdioTransportOptions, StoredOAuthSession, SubscriptionOptions, TextContent, TextResourceContents, Tool, ToolResultContent, ToolUseContent };
|