@introspection-ai/recipes 0.26.0 → 0.27.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/mcp.d.ts +3 -3
- package/dist/api/mcp.d.ts.map +1 -1
- package/dist/api/mcp.js +1 -1
- package/dist/api/mcp.js.map +1 -1
- package/dist/{child-agent-completions.d.ts → child/agent-completions.d.ts} +2 -2
- package/dist/child/agent-completions.d.ts.map +1 -0
- package/dist/{child-agent-completions.js → child/agent-completions.js} +1 -1
- package/dist/child/agent-completions.js.map +1 -0
- package/dist/{child-agent-store.d.ts → child/agent-store.d.ts} +1 -1
- package/dist/child/agent-store.d.ts.map +1 -0
- package/dist/{child-agent-store.js → child/agent-store.js} +1 -1
- package/dist/child/agent-store.js.map +1 -0
- package/dist/{child-agent.d.ts → child/agent.d.ts} +2 -2
- package/dist/child/agent.d.ts.map +1 -0
- package/dist/{child-agent.js → child/agent.js} +5 -5
- package/dist/child/agent.js.map +1 -0
- package/dist/{child-session.d.ts → child/session.d.ts} +4 -4
- package/dist/child/session.d.ts.map +1 -0
- package/dist/{child-session.js → child/session.js} +2 -2
- package/dist/child/session.js.map +1 -0
- package/dist/connector-tools.d.ts +1 -1
- package/dist/connector-tools.js +2 -2
- package/dist/inspect.d.ts +1 -1
- package/dist/inspect.js +1 -1
- package/dist/{mcp-catalog.d.ts → mcp/catalog.d.ts} +3 -3
- package/dist/mcp/catalog.d.ts.map +1 -0
- package/dist/{mcp-catalog.js → mcp/catalog.js} +2 -2
- package/dist/mcp/catalog.js.map +1 -0
- package/dist/{mcp-command-context.d.ts → mcp/cli/command-context.d.ts} +1 -1
- package/dist/mcp/cli/command-context.d.ts.map +1 -0
- package/dist/{mcp-command-context.js → mcp/cli/command-context.js} +1 -1
- package/dist/mcp/cli/command-context.js.map +1 -0
- package/dist/{mcp-cli-core.d.ts → mcp/cli/core.d.ts} +14 -8
- package/dist/mcp/cli/core.d.ts.map +1 -0
- package/dist/{mcp-cli-core.js → mcp/cli/core.js} +105 -146
- package/dist/mcp/cli/core.js.map +1 -0
- package/dist/mcp/cli/help.d.ts +6 -0
- package/dist/mcp/cli/help.d.ts.map +1 -0
- package/dist/mcp/cli/help.js +116 -0
- package/dist/mcp/cli/help.js.map +1 -0
- package/dist/mcp/cli/index.d.ts +3 -0
- package/dist/mcp/cli/index.d.ts.map +1 -0
- package/dist/{mcp-cli.js → mcp/cli/index.js} +4 -4
- package/dist/mcp/cli/index.js.map +1 -0
- package/dist/{mcp-cli-policy.d.ts → mcp/cli/policy.d.ts} +2 -2
- package/dist/mcp/cli/policy.d.ts.map +1 -0
- package/dist/{mcp-cli-policy.js → mcp/cli/policy.js} +2 -2
- package/dist/mcp/cli/policy.js.map +1 -0
- package/dist/mcp/cli/run-worker.d.ts +2 -0
- package/dist/mcp/cli/run-worker.d.ts.map +1 -0
- package/dist/mcp/cli/run-worker.js +54 -0
- package/dist/mcp/cli/run-worker.js.map +1 -0
- package/dist/mcp/client-entry.d.ts +3 -0
- package/dist/mcp/client-entry.d.ts.map +1 -0
- package/dist/{mcp-client.js → mcp/client-entry.js} +3 -3
- package/dist/mcp/client-entry.js.map +1 -0
- package/dist/{mcp-contract.d.ts → mcp/contract.d.ts} +2 -2
- package/dist/mcp/contract.d.ts.map +1 -0
- package/dist/{mcp-contract.js → mcp/contract.js} +1 -1
- package/dist/mcp/contract.js.map +1 -0
- package/dist/{mcp-daemon-client.d.ts → mcp/daemon/client.d.ts} +3 -2
- package/dist/mcp/daemon/client.d.ts.map +1 -0
- package/dist/{mcp-daemon-client.js → mcp/daemon/client.js} +12 -8
- package/dist/mcp/daemon/client.js.map +1 -0
- package/dist/mcp/daemon/index.d.ts +3 -0
- package/dist/mcp/daemon/index.d.ts.map +1 -0
- package/dist/mcp/daemon/index.js +453 -0
- package/dist/{mcp-daemon.js.map → mcp/daemon/index.js.map} +1 -1
- package/dist/{mcp-daemon-protocol.d.ts → mcp/daemon/protocol.d.ts} +2 -2
- package/dist/mcp/daemon/protocol.d.ts.map +1 -0
- package/dist/{mcp-daemon-protocol.js → mcp/daemon/protocol.js} +1 -1
- package/dist/mcp/daemon/protocol.js.map +1 -0
- package/dist/{mcp.d.ts → mcp/index.d.ts} +5 -5
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/{mcp.js → mcp/index.js} +16 -10
- package/dist/mcp/index.js.map +1 -0
- package/dist/{mcp-policy.d.ts → mcp/policy.d.ts} +3 -3
- package/dist/mcp/policy.d.ts.map +1 -0
- package/dist/{mcp-policy.js → mcp/policy.js} +1 -1
- package/dist/mcp/policy.js.map +1 -0
- package/dist/{mcp-tools.d.ts → mcp/tools.d.ts} +4 -4
- package/dist/mcp/tools.d.ts.map +1 -0
- package/dist/{mcp-tools.js → mcp/tools.js} +4 -4
- package/dist/mcp/tools.js.map +1 -0
- package/dist/{mcp-trace-context.d.ts → mcp/trace-context.d.ts} +2 -2
- package/dist/mcp/trace-context.d.ts.map +1 -0
- package/dist/{mcp-trace-context.js → mcp/trace-context.js} +1 -1
- package/dist/mcp/trace-context.js.map +1 -0
- package/dist/mcp-chunks/{auth-command-JBYNHHMV.js → auth-command-GQFV6QYP.js} +22 -21
- package/dist/mcp-chunks/call-arguments-VT7JLNJY.js +16 -0
- package/dist/mcp-chunks/{call-command-467BVXTE.js → call-command-LMAREWKD.js} +45 -44
- package/dist/mcp-chunks/{chunk-I7JR2GIC.js → chunk-2HOMVWSA.js} +2 -2
- package/dist/mcp-chunks/{chunk-CZ43ZITK.js → chunk-2P2HVZ3G.js} +1 -1
- package/dist/mcp-chunks/{chunk-SUNOYTQJ.js → chunk-34QXE62Y.js} +175 -147
- package/dist/mcp-chunks/{chunk-TFU4NKFJ.js → chunk-5B7GRMUK.js} +1 -1
- package/dist/mcp-chunks/{chunk-LG3GLOSA.js → chunk-5BMCVE2J.js} +14 -11
- package/dist/mcp-chunks/{chunk-MJHMXYMO.js → chunk-6QZQZXDJ.js} +3 -3
- package/dist/mcp-chunks/{chunk-DMBE47LM.js → chunk-6RG6AD5X.js} +6 -6
- package/dist/mcp-chunks/{chunk-UCJ7YDFN.js → chunk-77BZYP72.js} +1 -1
- package/dist/mcp-chunks/{chunk-NTABJCUL.js → chunk-7PFJCLXL.js} +10 -10
- package/dist/mcp-chunks/{chunk-66P5FXP3.js → chunk-7WL4TMON.js} +4 -4
- package/dist/mcp-chunks/{chunk-HKZZGSDV.js → chunk-C2VLY7ED.js} +4 -4
- package/dist/mcp-chunks/{chunk-XCNWICLD.js → chunk-CLR6DJV3.js} +1 -1
- package/dist/mcp-chunks/{chunk-REEFOL44.js → chunk-D6B2M5V7.js} +1 -1
- package/dist/mcp-chunks/{chunk-EP22XMWK.js → chunk-D6SVCPN6.js} +1 -1
- package/dist/mcp-chunks/{chunk-BTU34BUG.js → chunk-FBVRU4Y3.js} +43 -30
- package/dist/mcp-chunks/{chunk-TGPIW6F6.js → chunk-FONFU4G5.js} +1 -1
- package/dist/mcp-chunks/chunk-H4KL74PV.js +2073 -0
- package/dist/mcp-chunks/{chunk-QIBGY4IX.js → chunk-H7ARMBV7.js} +4 -9
- package/dist/mcp-chunks/{chunk-OABFKFSL.js → chunk-HZ2SX5U6.js} +39 -34
- package/dist/mcp-chunks/{chunk-HTXQPQPB.js → chunk-I6UMKX5E.js} +4 -4
- package/dist/mcp-chunks/{chunk-Z6QEOUMK.js → chunk-IF6LRV3J.js} +8 -14
- package/dist/mcp-chunks/{chunk-HBN3ESMH.js → chunk-JVYCENPP.js} +4 -4
- package/dist/mcp-chunks/{chunk-IO2IMWYS.js → chunk-KOWNVUL2.js} +34 -7
- package/dist/mcp-chunks/{chunk-AS27BTCS.js → chunk-KQCLM7R7.js} +4 -4
- package/dist/mcp-chunks/{chunk-AP5VHS73.js → chunk-L6OOGZVA.js} +2 -2
- package/dist/mcp-chunks/{chunk-BC2HDCYV.js → chunk-LCBDVFVA.js} +1 -1
- package/dist/mcp-chunks/{chunk-EUDC3ICZ.js → chunk-LIEFPSSB.js} +5 -5
- package/dist/mcp-chunks/{chunk-YPTN46JQ.js → chunk-LQIE4PKL.js} +2 -2
- package/dist/mcp-chunks/{chunk-GK4LA4E6.js → chunk-LXHPDKEF.js} +1 -1
- package/dist/mcp-chunks/{chunk-XFQSUC7T.js → chunk-MJFZM5EV.js} +5 -5
- package/dist/mcp-chunks/{chunk-WUEDIOR5.js → chunk-NQW3ES2G.js} +2 -8
- package/dist/mcp-chunks/{chunk-3Q2Q7SBU.js → chunk-O2VOMKAS.js} +13 -13
- package/dist/mcp-chunks/{chunk-GL4AA5QV.js → chunk-O4JIUOWF.js} +2 -2
- package/dist/mcp-chunks/{chunk-GEVQ2GJW.js → chunk-P3UVILEW.js} +2 -2
- package/dist/mcp-chunks/{chunk-N7ZWX3WW.js → chunk-P463YBJM.js} +1 -1
- package/dist/mcp-chunks/{chunk-Y3L5LWBY.js → chunk-PJCMJ65D.js} +277 -2110
- package/dist/mcp-chunks/{chunk-LTR626QF.js → chunk-QALB3DRW.js} +1 -1
- package/dist/mcp-chunks/{chunk-D2P2IV4H.js → chunk-QJNF3A3F.js} +1 -1
- package/dist/mcp-chunks/{chunk-KJNNO5Z6.js → chunk-RIHPVCGI.js} +1 -1
- package/dist/mcp-chunks/{chunk-J2WP6ERZ.js → chunk-RZIJUJGL.js} +44 -1055
- package/dist/mcp-chunks/{chunk-L2LGMX5P.js → chunk-S2YF442K.js} +2 -2
- package/dist/mcp-chunks/{chunk-CN5YF3IQ.js → chunk-S5F3HEZZ.js} +1848 -1046
- package/dist/mcp-chunks/{chunk-6DVS7RBO.js → chunk-S6GJ42I2.js} +1 -1
- package/dist/mcp-chunks/chunk-T4MQCFIK.js +982 -0
- package/dist/mcp-chunks/{chunk-OB256NMD.js → chunk-TUQGOYK6.js} +1 -1
- package/dist/mcp-chunks/{chunk-M62ESEOY.js → chunk-TYYSBILI.js} +10 -22
- package/dist/mcp-chunks/{chunk-LYWEATXZ.js → chunk-UHO6KIUJ.js} +2 -2
- package/dist/mcp-chunks/{chunk-BSCNF4NY.js → chunk-UIPG6W7N.js} +2 -2
- package/dist/mcp-chunks/{chunk-AK5ZEDEF.js → chunk-UKM35J67.js} +2 -2
- package/dist/mcp-chunks/{chunk-G4H535MI.js → chunk-UYJZJXC2.js} +21 -3
- package/dist/mcp-chunks/{chunk-GA4ZYSRX.js → chunk-VJIAHZZG.js} +4 -4
- package/dist/mcp-chunks/{chunk-OZQTZWW4.js → chunk-WHJUDBPR.js} +1 -1
- package/dist/mcp-chunks/{chunk-YI5SMRFH.js → chunk-XNHGMWN2.js} +7 -7
- package/dist/mcp-chunks/{cli-TN6JTLTS.js → cli-JI7MEAAX.js} +70 -69
- package/dist/mcp-chunks/client-QU7ABSNB.js +30 -0
- package/dist/mcp-chunks/{config-command-LICU56ZH.js → config-command-GRZLKD3R.js} +36 -28
- package/dist/mcp-chunks/daemon-command-3266CYHO.js +30 -0
- package/dist/mcp-chunks/{dist-MFAWSKGH.js → dist-USMCQ22V.js} +71 -47
- package/dist/mcp-chunks/{emit-ts-command-FVX3JMSN.js → emit-ts-command-7VLESP7H.js} +18 -17
- package/dist/mcp-chunks/{generate-cli-runner-L2L7VMCA.js → generate-cli-runner-SSW2B72K.js} +43 -42
- package/dist/mcp-chunks/generated-daemon-runtime-7CFVWLC7.js +30 -0
- package/dist/mcp-chunks/{inspect-cli-command-Y5D3GRE2.js → inspect-cli-command-NCGCMOIS.js} +9 -9
- package/dist/mcp-chunks/{launch-ZFY6CM2A.js → launch-NBONSPNK.js} +1 -1
- package/dist/mcp-chunks/{lifecycle-H7DIW5DM.js → lifecycle-CXAKUCN4.js} +1 -1
- package/dist/mcp-chunks/{list-command-55LCLW4S.js → list-command-5T4UF4PF.js} +56 -69
- package/dist/mcp-chunks/{output-utils-YYHI637S.js → output-utils-YFTWQZ5V.js} +3 -3
- package/dist/mcp-chunks/{prompt-CH6TK0bC-DZLFAAPK.js → prompt-CH6TK0bC-6DI4RA4E.js} +1 -1
- package/dist/mcp-chunks/{record-command-PWIBYC5J.js → record-command-TE5O7WBL.js} +5 -5
- package/dist/mcp-chunks/{replay-command-QHZZZMXF.js → replay-command-QCUL5ASR.js} +6 -6
- package/dist/mcp-chunks/{resource-command-HMR2KXWK.js → resource-command-XMGF7EAK.js} +9 -9
- package/dist/mcp-chunks/{result-utils-UGCQSRJ4.js → result-utils-HKB42M7Y.js} +3 -3
- package/dist/mcp-chunks/runtime-3X2XVS6X.js +37 -0
- package/dist/mcp-chunks/{runtime-wrapper-I4B3OROR.js → runtime-wrapper-MI3HF45J.js} +3 -3
- package/dist/mcp-chunks/{serve-command-NTDI3YPN.js → serve-command-5HV3ZE25.js} +25 -24
- package/dist/mcp-chunks/{timeouts-35UDWFA7.js → timeouts-YBFBTLV2.js} +8 -5
- package/dist/mcp-chunks/{vault-command-D5QZL4FI.js → vault-command-FC2PD5U6.js} +4 -4
- package/dist/mcp-chunks/webapi-IFUPO72B.js +2481 -0
- package/dist/mcp-daemon.js +35 -28
- package/dist/mcp-run-worker.js +28 -27
- package/dist/pi-extension.d.ts +1 -1
- package/dist/pi-extension.d.ts.map +1 -1
- package/dist/pi-extension.js +10 -9
- package/dist/pi-extension.js.map +1 -1
- package/dist/{recipe-agent.d.ts → recipe/agent.d.ts} +3 -3
- package/dist/recipe/agent.d.ts.map +1 -0
- package/dist/{recipe-agent.js → recipe/agent.js} +5 -5
- package/dist/recipe/agent.js.map +1 -0
- package/dist/{recipe-extensions.d.ts → recipe/extensions.d.ts} +1 -1
- package/dist/recipe/extensions.d.ts.map +1 -0
- package/dist/{recipe-extensions.js → recipe/extensions.js} +1 -1
- package/dist/recipe/extensions.js.map +1 -0
- package/dist/{recipe-mcp-config.d.ts → recipe/mcp-config.d.ts} +2 -2
- package/dist/recipe/mcp-config.d.ts.map +1 -0
- package/dist/{recipe-mcp-config.js → recipe/mcp-config.js} +1 -1
- package/dist/recipe/mcp-config.js.map +1 -0
- package/dist/{recipe-model.d.ts → recipe/model.d.ts} +1 -1
- package/dist/recipe/model.d.ts.map +1 -0
- package/dist/{recipe-model.js → recipe/model.js} +1 -1
- package/dist/recipe/model.js.map +1 -0
- package/dist/{recipe-package.d.ts → recipe/package.d.ts} +1 -1
- package/dist/recipe/package.d.ts.map +1 -0
- package/dist/{recipe-package.js → recipe/package.js} +1 -1
- package/dist/recipe/package.js.map +1 -0
- package/dist/recipe/resolve.d.ts +6 -6
- package/dist/recipe/resolve.d.ts.map +1 -1
- package/dist/recipe/resolve.js +4 -4
- package/dist/recipe/resolve.js.map +1 -1
- package/dist/{recipe-session.d.ts → recipe/session.d.ts} +1 -1
- package/dist/recipe/session.d.ts.map +1 -0
- package/dist/{recipe-session.js → recipe/session.js} +1 -1
- package/dist/recipe/session.js.map +1 -0
- package/dist/recipe/skills-prompt.d.ts +30 -0
- package/dist/recipe/skills-prompt.d.ts.map +1 -0
- package/dist/recipe/skills-prompt.js +28 -0
- package/dist/recipe/skills-prompt.js.map +1 -0
- package/dist/{recipe-skills.d.ts → recipe/skills.d.ts} +1 -1
- package/dist/recipe/skills.d.ts.map +1 -0
- package/dist/{recipe-skills.js → recipe/skills.js} +2 -2
- package/dist/recipe/skills.js.map +1 -0
- package/dist/run-controller.js +2 -2
- package/dist/session.d.ts +1 -1
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +5 -5
- package/dist/session.js.map +1 -1
- package/docs/agent-composition.md +4 -1
- package/docs/channels.md +1 -1
- package/docs/recipe-format.md +4 -2
- package/docs/slack.md +1 -1
- package/package.json +6 -6
- package/dist/child-agent-completions.d.ts.map +0 -1
- package/dist/child-agent-completions.js.map +0 -1
- package/dist/child-agent-store.d.ts.map +0 -1
- package/dist/child-agent-store.js.map +0 -1
- package/dist/child-agent.d.ts.map +0 -1
- package/dist/child-agent.js.map +0 -1
- package/dist/child-session.d.ts.map +0 -1
- package/dist/child-session.js.map +0 -1
- package/dist/mcp-catalog.d.ts.map +0 -1
- package/dist/mcp-catalog.js.map +0 -1
- package/dist/mcp-chunks/call-arguments-S4EGFKUQ.js +0 -15
- package/dist/mcp-chunks/chunk-YVH36MGQ.js +0 -92
- package/dist/mcp-chunks/client-G33HPQAC.js +0 -29
- package/dist/mcp-chunks/daemon-command-JLVHGWHB.js +0 -29
- package/dist/mcp-chunks/generated-daemon-runtime-DC6IL7E7.js +0 -29
- package/dist/mcp-chunks/runtime-ZNFPZXKE.js +0 -36
- package/dist/mcp-chunks/webapi-4GWO2UBA.js +0 -3508
- package/dist/mcp-cli-core.d.ts.map +0 -1
- package/dist/mcp-cli-core.js.map +0 -1
- package/dist/mcp-cli-help.d.ts +0 -2
- package/dist/mcp-cli-help.d.ts.map +0 -1
- package/dist/mcp-cli-help.js +0 -36
- package/dist/mcp-cli-help.js.map +0 -1
- package/dist/mcp-cli-policy.d.ts.map +0 -1
- package/dist/mcp-cli-policy.js.map +0 -1
- package/dist/mcp-cli.d.ts +0 -3
- package/dist/mcp-cli.d.ts.map +0 -1
- package/dist/mcp-cli.js.map +0 -1
- package/dist/mcp-client.d.ts +0 -3
- package/dist/mcp-client.d.ts.map +0 -1
- package/dist/mcp-client.js.map +0 -1
- package/dist/mcp-command-context.d.ts.map +0 -1
- package/dist/mcp-command-context.js.map +0 -1
- package/dist/mcp-contract.d.ts.map +0 -1
- package/dist/mcp-contract.js.map +0 -1
- package/dist/mcp-daemon-client.d.ts.map +0 -1
- package/dist/mcp-daemon-client.js.map +0 -1
- package/dist/mcp-daemon-protocol.d.ts.map +0 -1
- package/dist/mcp-daemon-protocol.js.map +0 -1
- package/dist/mcp-daemon.d.ts +0 -3
- package/dist/mcp-daemon.d.ts.map +0 -1
- package/dist/mcp-policy.d.ts.map +0 -1
- package/dist/mcp-policy.js.map +0 -1
- package/dist/mcp-run-worker.d.ts +0 -2
- package/dist/mcp-run-worker.d.ts.map +0 -1
- package/dist/mcp-run-worker.js.map +0 -1
- package/dist/mcp-tools.d.ts.map +0 -1
- package/dist/mcp-tools.js.map +0 -1
- package/dist/mcp-trace-context.d.ts.map +0 -1
- package/dist/mcp-trace-context.js.map +0 -1
- package/dist/mcp.d.ts.map +0 -1
- package/dist/mcp.js.map +0 -1
- package/dist/recipe-agent.d.ts.map +0 -1
- package/dist/recipe-agent.js.map +0 -1
- package/dist/recipe-extensions.d.ts.map +0 -1
- package/dist/recipe-extensions.js.map +0 -1
- package/dist/recipe-mcp-config.d.ts.map +0 -1
- package/dist/recipe-mcp-config.js.map +0 -1
- package/dist/recipe-model.d.ts.map +0 -1
- package/dist/recipe-model.js.map +0 -1
- package/dist/recipe-package.d.ts.map +0 -1
- package/dist/recipe-package.js.map +0 -1
- package/dist/recipe-session.d.ts.map +0 -1
- package/dist/recipe-session.js.map +0 -1
- package/dist/recipe-skills.d.ts.map +0 -1
- package/dist/recipe-skills.js.map +0 -1
|
@@ -2,10 +2,10 @@ import { createRequire as __createRequire } from "node:module"; const require =
|
|
|
2
2
|
import {
|
|
3
3
|
createCallResult,
|
|
4
4
|
describeConnectionIssue
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-S2YF442K.js";
|
|
6
6
|
import {
|
|
7
7
|
createRuntime
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-PJCMJ65D.js";
|
|
9
9
|
|
|
10
10
|
// node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/context/context.js
|
|
11
11
|
function createContextKey(description) {
|
|
@@ -808,7 +808,7 @@ var TraceAPI = class _TraceAPI {
|
|
|
808
808
|
// node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace-api.js
|
|
809
809
|
var trace = TraceAPI.getInstance();
|
|
810
810
|
|
|
811
|
-
// src/mcp
|
|
811
|
+
// src/mcp/cli/command-context.ts
|
|
812
812
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
813
813
|
var storage = new AsyncLocalStorage();
|
|
814
814
|
function currentMcpCommandContext() {
|
|
@@ -834,7 +834,7 @@ function installMcpCommandIoRouting() {
|
|
|
834
834
|
};
|
|
835
835
|
}
|
|
836
836
|
|
|
837
|
-
// src/mcp
|
|
837
|
+
// src/mcp/daemon/protocol.ts
|
|
838
838
|
var MCP_DAEMON_SOCKET_ENV = "PI_RECIPES_MCP_DAEMON_SOCKET";
|
|
839
839
|
var MCP_DAEMON_TOKEN_ENV = "PI_RECIPES_MCP_DAEMON_TOKEN";
|
|
840
840
|
var MCP_DAEMON_FINGERPRINT_ENV = "PI_RECIPES_MCP_DAEMON_FINGERPRINT";
|
|
@@ -867,7 +867,7 @@ function serializeMcpDaemonEnvelope(envelope, maxBytes = MCP_DAEMON_MAX_FRAME_BY
|
|
|
867
867
|
`;
|
|
868
868
|
}
|
|
869
869
|
|
|
870
|
-
// src/mcp
|
|
870
|
+
// src/mcp/trace-context.ts
|
|
871
871
|
var TRACEPARENT = /^([0-9a-f]{2})-([0-9a-f]{32})-([0-9a-f]{16})-([0-9a-f]{2})$/i;
|
|
872
872
|
function mcpDaemonRequestContext(carrier, base = ROOT_CONTEXT) {
|
|
873
873
|
const match = carrier?.traceparent.match(TRACEPARENT);
|
|
@@ -885,17 +885,17 @@ function mcpDaemonRequestContext(carrier, base = ROOT_CONTEXT) {
|
|
|
885
885
|
});
|
|
886
886
|
}
|
|
887
887
|
|
|
888
|
-
// src/mcp
|
|
888
|
+
// src/mcp/cli/core.ts
|
|
889
889
|
import { createHash, randomUUID } from "node:crypto";
|
|
890
890
|
import { existsSync } from "node:fs";
|
|
891
891
|
import { mkdir, open, readFile, rename, rm, stat, writeFile } from "node:fs/promises";
|
|
892
892
|
import { dirname as dirname2, join as join2 } from "node:path";
|
|
893
893
|
import { setTimeout as delay } from "node:timers/promises";
|
|
894
894
|
import { stdin as input, stderr, stdout } from "node:process";
|
|
895
|
-
import { inspect } from "node:util";
|
|
895
|
+
import { inspect, parseArgs } from "node:util";
|
|
896
896
|
import { isMainThread, Worker } from "node:worker_threads";
|
|
897
897
|
|
|
898
|
-
// src/mcp
|
|
898
|
+
// src/mcp/contract.ts
|
|
899
899
|
var MAX_EXAMPLE_ARRAY_ITEMS = 3;
|
|
900
900
|
var SAFE_CLI_KEY = /^[A-Za-z_][A-Za-z0-9_.-]*$/;
|
|
901
901
|
var SAFE_SHELL_TOKEN = /^[A-Za-z0-9_./:@+-]+$/;
|
|
@@ -1175,7 +1175,7 @@ function catalogOutputSchema(tool) {
|
|
|
1175
1175
|
return tool?.output_schema;
|
|
1176
1176
|
}
|
|
1177
1177
|
|
|
1178
|
-
// src/mcp
|
|
1178
|
+
// src/mcp/cli/help.ts
|
|
1179
1179
|
function mcpCliHelpText() {
|
|
1180
1180
|
return [
|
|
1181
1181
|
"mcp - use available MCP tools",
|
|
@@ -1211,11 +1211,91 @@ function mcpCliHelpText() {
|
|
|
1211
1211
|
" MCP resources and administrative or ad-hoc connection commands are not exposed."
|
|
1212
1212
|
].join("\n");
|
|
1213
1213
|
}
|
|
1214
|
+
function mcpListHelpText() {
|
|
1215
|
+
return [
|
|
1216
|
+
"Usage: mcp list [server | server.tool] [flags]",
|
|
1217
|
+
"",
|
|
1218
|
+
"Shows a compact view of tools materialized in this recipe session.",
|
|
1219
|
+
"",
|
|
1220
|
+
"Flags:",
|
|
1221
|
+
" --all-parameters Include every optional parameter.",
|
|
1222
|
+
" --schema Show a compact input/output contract for one exact tool.",
|
|
1223
|
+
" --verbose Include full tool and parameter descriptions.",
|
|
1224
|
+
" --status Show concise status for an exact server target.",
|
|
1225
|
+
" --quiet, --exit-code Health checks for an exact server target.",
|
|
1226
|
+
" --timeout <ms> Override discovery timeout for an exact target.",
|
|
1227
|
+
" JSON is reserved for actual tool results; metadata is compact text.",
|
|
1228
|
+
"",
|
|
1229
|
+
"URLs, ad-hoc transports, config overrides, and persistence are unavailable in recipe sessions."
|
|
1230
|
+
].join("\n");
|
|
1231
|
+
}
|
|
1232
|
+
function mcpCallHelpText() {
|
|
1233
|
+
return [
|
|
1234
|
+
"Usage: mcp call <server>.<tool> [arguments] [flags]",
|
|
1235
|
+
"",
|
|
1236
|
+
"Calls exact tools materialized in this recipe session.",
|
|
1237
|
+
"",
|
|
1238
|
+
"Arguments:",
|
|
1239
|
+
" key=value Named arguments with schema-aware coercion.",
|
|
1240
|
+
" key=@path Read an exact UTF-8 string; use @@ for a literal @.",
|
|
1241
|
+
" --json <json|-> Supply a structured JSON object directly or from stdin.",
|
|
1242
|
+
` Array example: mcp call server.tool --json '{"tags":["a","b"]}'.`,
|
|
1243
|
+
" Quote argument tokens containing shell operators such as |, <, >, &, or ;. JSON stdin avoids nested shell quoting.",
|
|
1244
|
+
"",
|
|
1245
|
+
"Output/runtime flags:",
|
|
1246
|
+
" --output text|markdown|json|raw",
|
|
1247
|
+
" --timeout <ms>",
|
|
1248
|
+
" Machine-readable output is forwarded unchanged.",
|
|
1249
|
+
" When parsing JSON, keep stderr separate and do not truncate stdout with head or sed.",
|
|
1250
|
+
"",
|
|
1251
|
+
"URLs, ad-hoc transports, config overrides, and persistence are unavailable in recipe sessions."
|
|
1252
|
+
].join("\n");
|
|
1253
|
+
}
|
|
1254
|
+
function mcpSearchHelpText() {
|
|
1255
|
+
return [
|
|
1256
|
+
'Usage: mcp search "what you need" [--limit N] [--regex]',
|
|
1257
|
+
"",
|
|
1258
|
+
"Searches only MCP tools available in this session.",
|
|
1259
|
+
"Results include the exact tool ref, description, and required fields.",
|
|
1260
|
+
"Try broader or alternate terms when no result matches.",
|
|
1261
|
+
"Use `mcp list <server>` only to identify exact tool names, then inspect one candidate with `mcp list <server.tool> --schema`."
|
|
1262
|
+
].join("\n");
|
|
1263
|
+
}
|
|
1264
|
+
function mcpRunHelpText() {
|
|
1265
|
+
return [
|
|
1266
|
+
"Usage: mcp run [--var KEY=value] [--json-errors] [file]",
|
|
1267
|
+
"",
|
|
1268
|
+
'Runs a short JavaScript workflow with available MCP tools such as `tools["server"]["tool"]`.',
|
|
1269
|
+
"With no file, code is read from stdin. Keep heredocs quoted and pass dynamic values with --var.",
|
|
1270
|
+
"Scripts are killed after 120s by default (override with PI_RECIPES_MCP_RUN_TIMEOUT_MS).",
|
|
1271
|
+
"Each tool call is capped at 60s; workflows allow at most 100 calls and run 16 at a time by default.",
|
|
1272
|
+
"Extra calls wait in a FIFO queue and inherit the remaining workflow deadline.",
|
|
1273
|
+
"Always await or return tool-call chains.",
|
|
1274
|
+
"Detached .then/.catch calls fail if still pending when the script exits.",
|
|
1275
|
+
"Structured MCP errors retain code, retryable, action, request_id, and outcome fields when supplied.",
|
|
1276
|
+
"Calls return decoded JSON by default, so read response fields directly from the awaited value.",
|
|
1277
|
+
"Only when a tool documents another response type, call the format on the tool itself: tool.text(args), tool.markdown(args), tool.images(args), tool.content(args), tool.structuredContent(args), or tool.raw(args).",
|
|
1278
|
+
"Use Promise.all for independent reads. Await dependent calls and mutations in order.",
|
|
1279
|
+
"Do not loop over mcp call in the shell. Use mcp run for repeated calls and print only the fields needed.",
|
|
1280
|
+
"Use --var/vars for dynamic input; process.argv is intentionally unavailable inside workflows.",
|
|
1281
|
+
"--json-errors emits a structured error object on stderr while preserving the nonzero exit code.",
|
|
1282
|
+
"MCP calls are always headless. If authentication is required, ask the user to authenticate the connection outside the agent session, then retry.",
|
|
1283
|
+
"A synchronous busy-loop is force-killed at the deadline.",
|
|
1284
|
+
"Code runs with the same OS privileges as the active shell sandbox; mcp run is not a separate security boundary.",
|
|
1285
|
+
"",
|
|
1286
|
+
"Example \u2014 batch or compose multiple calls:",
|
|
1287
|
+
" mcp run <<'JS'",
|
|
1288
|
+
' const ids = ["id-1", "id-2", "id-3"]',
|
|
1289
|
+
' const results = await Promise.all(ids.map(id => tools["server"]["tool"]({ id })))',
|
|
1290
|
+
" console.log(JSON.stringify(results.map(result => ({ id: result.id, name: result.name })), null, 2))",
|
|
1291
|
+
" JS"
|
|
1292
|
+
].join("\n");
|
|
1293
|
+
}
|
|
1214
1294
|
|
|
1215
|
-
// src/mcp.ts
|
|
1295
|
+
// src/mcp/index.ts
|
|
1216
1296
|
import { delimiter, dirname, join, resolve } from "node:path";
|
|
1217
1297
|
|
|
1218
|
-
// src/recipe
|
|
1298
|
+
// src/recipe/package.ts
|
|
1219
1299
|
var RESOURCE_KEYS = [
|
|
1220
1300
|
"agents",
|
|
1221
1301
|
"extensions",
|
|
@@ -1229,7 +1309,7 @@ var PI_KEYS = /* @__PURE__ */ new Set([
|
|
|
1229
1309
|
"runtime"
|
|
1230
1310
|
]);
|
|
1231
1311
|
|
|
1232
|
-
// src/mcp
|
|
1312
|
+
// src/mcp/policy.ts
|
|
1233
1313
|
function mcpSelectionAllowsTool(selection, toolName) {
|
|
1234
1314
|
const included = selection.include?.some((selector) => {
|
|
1235
1315
|
const trimmed = selector.trim();
|
|
@@ -1241,10 +1321,10 @@ function mcpSelectionAllowsTool(selection, toolName) {
|
|
|
1241
1321
|
);
|
|
1242
1322
|
}
|
|
1243
1323
|
|
|
1244
|
-
// src/mcp
|
|
1324
|
+
// src/mcp/daemon/client.ts
|
|
1245
1325
|
var MAX_DAEMON_FRAME_BYTES = 10 * 1024 * 1024;
|
|
1246
1326
|
|
|
1247
|
-
// src/mcp.ts
|
|
1327
|
+
// src/mcp/index.ts
|
|
1248
1328
|
var RECIPE_ENV_PREFIX = "PI_RECIPES_";
|
|
1249
1329
|
var MCP_SESSION_ENV = `${RECIPE_ENV_PREFIX}MCP_SESSION`;
|
|
1250
1330
|
var MCP_LOCAL_CONFIG_ENV = `${RECIPE_ENV_PREFIX}MCP_LOCAL_CONFIG`;
|
|
@@ -1286,7 +1366,7 @@ function filterMcpCatalog(server, catalog) {
|
|
|
1286
1366
|
}));
|
|
1287
1367
|
}
|
|
1288
1368
|
|
|
1289
|
-
// src/mcp
|
|
1369
|
+
// src/mcp/cli/policy.ts
|
|
1290
1370
|
var FORBIDDEN_DELEGATED_FLAGS = /* @__PURE__ */ new Set([
|
|
1291
1371
|
"--config",
|
|
1292
1372
|
"--root",
|
|
@@ -1494,7 +1574,7 @@ function validateDelegatedMcpCommand(args, policy) {
|
|
|
1494
1574
|
};
|
|
1495
1575
|
}
|
|
1496
1576
|
|
|
1497
|
-
// src/mcp
|
|
1577
|
+
// src/mcp/cli/core.ts
|
|
1498
1578
|
var DEFAULT_RUN_TIMEOUT_MS = 12e4;
|
|
1499
1579
|
var DEFAULT_TOOL_CALL_TIMEOUT_MS = 6e4;
|
|
1500
1580
|
var DEFAULT_LIST_TIMEOUT_MS = 3e4;
|
|
@@ -1510,7 +1590,7 @@ function loadMcporterCli() {
|
|
|
1510
1590
|
if (mcporterCliPromise) return mcporterCliPromise;
|
|
1511
1591
|
const previousDisableAutorun = process.env.MCPORTER_DISABLE_AUTORUN;
|
|
1512
1592
|
process.env.MCPORTER_DISABLE_AUTORUN = "1";
|
|
1513
|
-
mcporterCliPromise = import("./cli-
|
|
1593
|
+
mcporterCliPromise = import("./cli-JI7MEAAX.js").finally(() => {
|
|
1514
1594
|
if (previousDisableAutorun === void 0) {
|
|
1515
1595
|
delete process.env.MCPORTER_DISABLE_AUTORUN;
|
|
1516
1596
|
} else {
|
|
@@ -1564,86 +1644,6 @@ var McpRunToolError = class extends Error {
|
|
|
1564
1644
|
action;
|
|
1565
1645
|
outcome;
|
|
1566
1646
|
};
|
|
1567
|
-
function mcpListHelpText() {
|
|
1568
|
-
return [
|
|
1569
|
-
"Usage: mcp list [server | server.tool] [flags]",
|
|
1570
|
-
"",
|
|
1571
|
-
"Shows a compact view of tools materialized in this recipe session.",
|
|
1572
|
-
"",
|
|
1573
|
-
"Flags:",
|
|
1574
|
-
" --all-parameters Include every optional parameter.",
|
|
1575
|
-
" --schema Show a compact input/output contract for one exact tool.",
|
|
1576
|
-
" --verbose Include full tool and parameter descriptions.",
|
|
1577
|
-
" --status Show concise status for an exact server target.",
|
|
1578
|
-
" --quiet, --exit-code Health checks for an exact server target.",
|
|
1579
|
-
" --timeout <ms> Override discovery timeout for an exact target.",
|
|
1580
|
-
" JSON is reserved for actual tool results; metadata is compact text.",
|
|
1581
|
-
"",
|
|
1582
|
-
"URLs, ad-hoc transports, config overrides, and persistence are unavailable in recipe sessions."
|
|
1583
|
-
].join("\n");
|
|
1584
|
-
}
|
|
1585
|
-
function mcpCallHelpText() {
|
|
1586
|
-
return [
|
|
1587
|
-
"Usage: mcp call <server>.<tool> [arguments] [flags]",
|
|
1588
|
-
"",
|
|
1589
|
-
"Calls exact tools materialized in this recipe session.",
|
|
1590
|
-
"",
|
|
1591
|
-
"Arguments:",
|
|
1592
|
-
" key=value Named arguments with schema-aware coercion.",
|
|
1593
|
-
" key=@path Read an exact UTF-8 string; use @@ for a literal @.",
|
|
1594
|
-
" --json <json|-> Supply a structured JSON object directly or from stdin.",
|
|
1595
|
-
` Array example: mcp call server.tool --json '{"tags":["a","b"]}'.`,
|
|
1596
|
-
" Quote argument tokens containing shell operators such as |, <, >, &, or ;. JSON stdin avoids nested shell quoting.",
|
|
1597
|
-
"",
|
|
1598
|
-
"Output/runtime flags:",
|
|
1599
|
-
" --output text|markdown|json|raw",
|
|
1600
|
-
" --timeout <ms>",
|
|
1601
|
-
" Machine-readable output is forwarded unchanged.",
|
|
1602
|
-
" When parsing JSON, keep stderr separate and do not truncate stdout with head or sed.",
|
|
1603
|
-
"",
|
|
1604
|
-
"URLs, ad-hoc transports, config overrides, and persistence are unavailable in recipe sessions."
|
|
1605
|
-
].join("\n");
|
|
1606
|
-
}
|
|
1607
|
-
function mcpSearchHelpText() {
|
|
1608
|
-
return [
|
|
1609
|
-
'Usage: mcp search "what you need" [--limit N] [--regex]',
|
|
1610
|
-
"",
|
|
1611
|
-
"Searches only MCP tools available in this session.",
|
|
1612
|
-
"Results include the exact tool ref, description, and required fields.",
|
|
1613
|
-
"Try broader or alternate terms when no result matches.",
|
|
1614
|
-
"Use `mcp list <server>` only to identify exact tool names, then inspect one candidate with `mcp list <server.tool> --schema`."
|
|
1615
|
-
].join("\n");
|
|
1616
|
-
}
|
|
1617
|
-
function mcpRunHelpText() {
|
|
1618
|
-
return [
|
|
1619
|
-
"Usage: mcp run [--var KEY=value] [--json-errors] [file]",
|
|
1620
|
-
"",
|
|
1621
|
-
'Runs a short JavaScript workflow with available MCP tools such as `tools["server"]["tool"]`.',
|
|
1622
|
-
"With no file, code is read from stdin. Keep heredocs quoted and pass dynamic values with --var.",
|
|
1623
|
-
"Scripts are killed after 120s by default (override with PI_RECIPES_MCP_RUN_TIMEOUT_MS).",
|
|
1624
|
-
"Each tool call is capped at 60s; workflows allow at most 100 calls and run 16 at a time by default.",
|
|
1625
|
-
"Extra calls wait in a FIFO queue and inherit the remaining workflow deadline.",
|
|
1626
|
-
"Always await or return tool-call chains.",
|
|
1627
|
-
"Detached .then/.catch calls fail if still pending when the script exits.",
|
|
1628
|
-
"Structured MCP errors retain code, retryable, action, request_id, and outcome fields when supplied.",
|
|
1629
|
-
"Calls return decoded JSON by default, so read response fields directly from the awaited value.",
|
|
1630
|
-
"Only when a tool documents another response type, call the format on the tool itself: tool.text(args), tool.markdown(args), tool.images(args), tool.content(args), tool.structuredContent(args), or tool.raw(args).",
|
|
1631
|
-
"Use Promise.all for independent reads. Await dependent calls and mutations in order.",
|
|
1632
|
-
"Do not loop over mcp call in the shell. Use mcp run for repeated calls and print only the fields needed.",
|
|
1633
|
-
"Use --var/vars for dynamic input; process.argv is intentionally unavailable inside workflows.",
|
|
1634
|
-
"--json-errors emits a structured error object on stderr while preserving the nonzero exit code.",
|
|
1635
|
-
"MCP calls are always headless. If authentication is required, ask the user to authenticate the connection outside the agent session, then retry.",
|
|
1636
|
-
"A synchronous busy-loop is force-killed at the deadline.",
|
|
1637
|
-
"Code runs with the same OS privileges as the active shell sandbox; mcp run is not a separate security boundary.",
|
|
1638
|
-
"",
|
|
1639
|
-
"Example \u2014 batch or compose multiple calls:",
|
|
1640
|
-
" mcp run <<'JS'",
|
|
1641
|
-
' const ids = ["id-1", "id-2", "id-3"]',
|
|
1642
|
-
' const results = await Promise.all(ids.map(id => tools["server"]["tool"]({ id })))',
|
|
1643
|
-
" console.log(JSON.stringify(results.map(result => ({ id: result.id, name: result.name })), null, 2))",
|
|
1644
|
-
" JS"
|
|
1645
|
-
].join("\n");
|
|
1646
|
-
}
|
|
1647
1647
|
function isHelpArg(value) {
|
|
1648
1648
|
return value === "--help" || value === "-h" || value === "help";
|
|
1649
1649
|
}
|
|
@@ -2038,30 +2038,43 @@ async function discoverMcpCatalogs(runtime, timeoutMs) {
|
|
|
2038
2038
|
})
|
|
2039
2039
|
);
|
|
2040
2040
|
}
|
|
2041
|
+
var SEARCH_OPTIONS = {
|
|
2042
|
+
limit: { type: "string" },
|
|
2043
|
+
regex: { type: "boolean" }
|
|
2044
|
+
};
|
|
2045
|
+
function optionName(value) {
|
|
2046
|
+
const equals = value.indexOf("=");
|
|
2047
|
+
return equals === -1 ? value : value.slice(0, equals);
|
|
2048
|
+
}
|
|
2041
2049
|
function parseSearchArgs(args) {
|
|
2042
|
-
|
|
2050
|
+
if (args.some((arg) => optionName(arg) === "--json")) {
|
|
2051
|
+
return { error: "mcp search metadata is compact text; JSON is reserved for tool results." };
|
|
2052
|
+
}
|
|
2053
|
+
let parsed;
|
|
2054
|
+
try {
|
|
2055
|
+
parsed = parseArgs({ args, options: SEARCH_OPTIONS, allowPositionals: true });
|
|
2056
|
+
} catch (error) {
|
|
2057
|
+
if (error.code === "ERR_PARSE_ARGS_INVALID_OPTION_VALUE") {
|
|
2058
|
+
const index = args.findIndex((arg) => optionName(arg) === "--limit");
|
|
2059
|
+
const flag = args[index] ?? "";
|
|
2060
|
+
const raw = flag.includes("=") ? flag.slice(flag.indexOf("=") + 1) : args[index + 1] ?? "";
|
|
2061
|
+
return { error: `--limit expects a positive integer, got '${raw}'.` };
|
|
2062
|
+
}
|
|
2063
|
+
const unknown = args.find(
|
|
2064
|
+
(arg) => arg.startsWith("-") && !(optionName(arg).slice(2) in SEARCH_OPTIONS)
|
|
2065
|
+
);
|
|
2066
|
+
return { error: `Unknown mcp search option '${unknown}'.` };
|
|
2067
|
+
}
|
|
2068
|
+
const { values, positionals } = parsed;
|
|
2043
2069
|
let limit = 8;
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
if (arg === "--regex") {
|
|
2049
|
-
regex = true;
|
|
2050
|
-
continue;
|
|
2051
|
-
}
|
|
2052
|
-
if (arg === "--limit" || arg.startsWith("--limit=")) {
|
|
2053
|
-
const raw = arg === "--limit" ? args[++index] : arg.slice("--limit=".length);
|
|
2054
|
-
const value = Number(raw);
|
|
2055
|
-
if (!Number.isInteger(value) || value <= 0) {
|
|
2056
|
-
return { error: `--limit expects a positive integer, got '${raw ?? ""}'.` };
|
|
2057
|
-
}
|
|
2058
|
-
limit = Math.floor(value);
|
|
2059
|
-
continue;
|
|
2070
|
+
if (values.limit !== void 0) {
|
|
2071
|
+
const value = Number(values.limit);
|
|
2072
|
+
if (!Number.isInteger(value) || value <= 0) {
|
|
2073
|
+
return { error: `--limit expects a positive integer, got '${values.limit}'.` };
|
|
2060
2074
|
}
|
|
2061
|
-
|
|
2062
|
-
queryParts.push(arg);
|
|
2075
|
+
limit = value;
|
|
2063
2076
|
}
|
|
2064
|
-
return { query:
|
|
2077
|
+
return { query: positionals.join(" "), limit, regex: values.regex === true };
|
|
2065
2078
|
}
|
|
2066
2079
|
async function searchCatalog(args) {
|
|
2067
2080
|
const parsed = parseSearchArgs(args);
|
|
@@ -2154,18 +2167,17 @@ function toolCount(count) {
|
|
|
2154
2167
|
function parseListTimeoutMs(args) {
|
|
2155
2168
|
const configured = process.env.MCPORTER_LIST_TIMEOUT;
|
|
2156
2169
|
let raw = configured && /^[1-9]\d*$/.test(configured) ? configured : String(DEFAULT_LIST_TIMEOUT_MS);
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
raw = arg.slice("--timeout=".length);
|
|
2167
|
-
break;
|
|
2170
|
+
const { values } = parseArgs({
|
|
2171
|
+
args: [...args.slice(1)],
|
|
2172
|
+
options: { timeout: { type: "string" } },
|
|
2173
|
+
strict: false,
|
|
2174
|
+
allowPositionals: true
|
|
2175
|
+
});
|
|
2176
|
+
if (values.timeout !== void 0) {
|
|
2177
|
+
if (typeof values.timeout !== "string" || values.timeout === "") {
|
|
2178
|
+
return "mcp list: --timeout requires a value.";
|
|
2168
2179
|
}
|
|
2180
|
+
raw = values.timeout;
|
|
2169
2181
|
}
|
|
2170
2182
|
if (!/^[1-9]\d*$/.test(raw)) {
|
|
2171
2183
|
return "mcp list: --timeout must be a positive integer (milliseconds).";
|
|
@@ -2201,28 +2213,44 @@ function writeCompactListError(error) {
|
|
|
2201
2213
|
`}`);
|
|
2202
2214
|
filter.flush();
|
|
2203
2215
|
}
|
|
2216
|
+
var LIST_OPTIONS = {
|
|
2217
|
+
"all-parameters": { type: "boolean" },
|
|
2218
|
+
"exit-code": { type: "boolean" },
|
|
2219
|
+
"no-oauth": { type: "boolean" },
|
|
2220
|
+
quiet: { type: "boolean" },
|
|
2221
|
+
schema: { type: "boolean" },
|
|
2222
|
+
status: { type: "boolean" },
|
|
2223
|
+
timeout: { type: "string" },
|
|
2224
|
+
verbose: { type: "boolean" }
|
|
2225
|
+
};
|
|
2226
|
+
var LIST_BOOLEAN_FLAGS = new Set(
|
|
2227
|
+
Object.entries(LIST_OPTIONS).filter(([, spec]) => spec.type === "boolean").map(([name]) => name)
|
|
2228
|
+
);
|
|
2229
|
+
function isValidListOption(arg) {
|
|
2230
|
+
const name = optionName(arg).slice(2);
|
|
2231
|
+
if (!(name in LIST_OPTIONS)) return false;
|
|
2232
|
+
return !(arg.includes("=") && LIST_BOOLEAN_FLAGS.has(name));
|
|
2233
|
+
}
|
|
2204
2234
|
function compactListArgumentError(args) {
|
|
2205
|
-
const
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
const arg = args[index];
|
|
2217
|
-
if (arg === "--timeout") {
|
|
2218
|
-
index += 1;
|
|
2219
|
-
continue;
|
|
2235
|
+
const rest = args.slice(1);
|
|
2236
|
+
const target = rest[0] !== void 0 && !rest[0].startsWith("-");
|
|
2237
|
+
const options = target ? rest.slice(1) : rest;
|
|
2238
|
+
try {
|
|
2239
|
+
const { positionals } = parseArgs({
|
|
2240
|
+
args: [...options],
|
|
2241
|
+
options: LIST_OPTIONS,
|
|
2242
|
+
allowPositionals: true
|
|
2243
|
+
});
|
|
2244
|
+
if (positionals.length > 0) {
|
|
2245
|
+
return `Unexpected mcp list argument '${positionals[0]}'.`;
|
|
2220
2246
|
}
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2247
|
+
return void 0;
|
|
2248
|
+
} catch {
|
|
2249
|
+
const offending = options.find(
|
|
2250
|
+
(arg) => arg.startsWith("-") && !isValidListOption(arg)
|
|
2251
|
+
);
|
|
2252
|
+
return offending ? `Unknown mcp list option '${offending}'.` : void 0;
|
|
2224
2253
|
}
|
|
2225
|
-
return void 0;
|
|
2226
2254
|
}
|
|
2227
2255
|
async function compactList(args) {
|
|
2228
2256
|
if (args.includes("--json")) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
2
|
|
|
3
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
3
|
+
// node_modules/.pnpm/mcporter@0.13.13/node_modules/mcporter/dist/cli/output-format.js
|
|
4
4
|
function consumeOutputFormat(args, options = {}) {
|
|
5
5
|
const allowed = options.allowed ?? ["auto", "text", "markdown", "json", "raw"];
|
|
6
6
|
const defaultFormat = options.defaultFormat ?? "auto";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
launchDaemonDetached
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-LXHPDKEF.js";
|
|
5
5
|
import {
|
|
6
6
|
BrokerError,
|
|
7
7
|
DAEMON_PROTOCOL_VERSION,
|
|
@@ -19,30 +19,33 @@ import {
|
|
|
19
19
|
resolveProgressInterval,
|
|
20
20
|
stopVerifiedLegacyDaemons,
|
|
21
21
|
waitForDaemonReady
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-FBVRU4Y3.js";
|
|
23
23
|
import {
|
|
24
24
|
canonicalUserConfiguration,
|
|
25
25
|
getDaemonLogPath,
|
|
26
26
|
secureDaemonDirectory
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-PJCMJ65D.js";
|
|
28
|
+
import {
|
|
29
|
+
ChromeDevtoolsRelayDiscoveryError
|
|
30
|
+
} from "./chunk-H4KL74PV.js";
|
|
28
31
|
import {
|
|
29
32
|
withFileLock,
|
|
30
33
|
writeJsonFile
|
|
31
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-H7ARMBV7.js";
|
|
32
35
|
import {
|
|
33
36
|
expandHome
|
|
34
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-D6SVCPN6.js";
|
|
35
38
|
|
|
36
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
39
|
+
// node_modules/.pnpm/mcporter@0.13.13/node_modules/mcporter/dist/cli/daemon-command.js
|
|
37
40
|
import fsPromises from "node:fs/promises";
|
|
38
41
|
import path2 from "node:path";
|
|
39
42
|
|
|
40
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
43
|
+
// node_modules/.pnpm/mcporter@0.13.13/node_modules/mcporter/dist/daemon/host.js
|
|
41
44
|
import fs from "node:fs/promises";
|
|
42
45
|
import net from "node:net";
|
|
43
46
|
import { randomUUID } from "node:crypto";
|
|
44
47
|
|
|
45
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
48
|
+
// node_modules/.pnpm/mcporter@0.13.13/node_modules/mcporter/dist/daemon/log-context.js
|
|
46
49
|
import fsSync from "node:fs";
|
|
47
50
|
import path from "node:path";
|
|
48
51
|
function createLogContext(options) {
|
|
@@ -94,7 +97,7 @@ async function disposeLogContext(context) {
|
|
|
94
97
|
});
|
|
95
98
|
}
|
|
96
99
|
|
|
97
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
100
|
+
// node_modules/.pnpm/mcporter@0.13.13/node_modules/mcporter/dist/daemon/host.js
|
|
98
101
|
async function runDaemonHost(options) {
|
|
99
102
|
await secureDaemonDirectory();
|
|
100
103
|
await assertLegacyDrained();
|
|
@@ -213,7 +216,7 @@ async function runDaemonHost(options) {
|
|
|
213
216
|
socket.end();
|
|
214
217
|
} catch (error) {
|
|
215
218
|
const code = error && typeof error === "object" && "code" in error ? String(error.code) : "runtime_error";
|
|
216
|
-
const message = error instanceof BrokerError || error instanceof ProcessObservationError || code === "browser_owner_conflict" ? error.message : `MCP operation failed (${code}); the request was not replayed.`;
|
|
219
|
+
const message = error instanceof BrokerError || error instanceof ProcessObservationError || error instanceof ChromeDevtoolsRelayDiscoveryError || code === "browser_owner_conflict" ? error.message : `MCP operation failed (${code}); the request was not replayed.`;
|
|
217
220
|
frames.write({ id, ok: false, error: { code, message } });
|
|
218
221
|
socket.end();
|
|
219
222
|
} finally {
|
|
@@ -289,7 +292,7 @@ async function cleanupDaemonArtifactsIfOwned(paths, ownerPid) {
|
|
|
289
292
|
await fs.unlink(paths.metadataPath);
|
|
290
293
|
}
|
|
291
294
|
|
|
292
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
295
|
+
// node_modules/.pnpm/mcporter@0.13.13/node_modules/mcporter/dist/cli/daemon-command.js
|
|
293
296
|
async function handleDaemonCli(args, options) {
|
|
294
297
|
const subcommand = args.shift();
|
|
295
298
|
if (!subcommand || subcommand === "help" || subcommand === "--help") {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
MCPORTER_VERSION
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-7PFJCLXL.js";
|
|
5
5
|
import {
|
|
6
6
|
isKeepAliveServer
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-QJNF3A3F.js";
|
|
8
8
|
|
|
9
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
9
|
+
// node_modules/.pnpm/mcporter@0.13.13/node_modules/mcporter/dist/daemon/runtime-wrapper.js
|
|
10
10
|
function createKeepAliveRuntime(base, options) {
|
|
11
11
|
if (!options.daemonClient || options.keepAliveServers.size === 0) {
|
|
12
12
|
return base;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
__configInternals
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-RZIJUJGL.js";
|
|
5
5
|
import {
|
|
6
6
|
withFileLock,
|
|
7
7
|
writeTextFileAtomic
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-H7ARMBV7.js";
|
|
9
9
|
import {
|
|
10
10
|
expandHome
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-D6SVCPN6.js";
|
|
12
12
|
import {
|
|
13
13
|
canonicalKeepAliveName,
|
|
14
14
|
resolveLifecycle
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-QJNF3A3F.js";
|
|
16
16
|
|
|
17
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
17
|
+
// node_modules/.pnpm/mcporter@0.13.13/node_modules/mcporter/dist/cli/ascii-slug.js
|
|
18
18
|
function toAsciiSlug(value) {
|
|
19
19
|
let slug = "";
|
|
20
20
|
let pendingSeparator = false;
|
|
@@ -35,7 +35,7 @@ function toAsciiSlug(value) {
|
|
|
35
35
|
return slug;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
38
|
+
// node_modules/.pnpm/mcporter@0.13.13/node_modules/mcporter/dist/cli/adhoc-server.js
|
|
39
39
|
import fs from "node:fs/promises";
|
|
40
40
|
import path from "node:path";
|
|
41
41
|
var TEMP_SOURCE = { kind: "local", path: "<adhoc>" };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
2
|
|
|
3
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
3
|
+
// node_modules/.pnpm/mcporter@0.13.13/node_modules/mcporter/dist/cli/json-output.js
|
|
4
4
|
function buildConnectionIssueEnvelope(params) {
|
|
5
5
|
return {
|
|
6
6
|
server: params.server,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
2
|
|
|
3
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
3
|
+
// node_modules/.pnpm/mcporter@0.13.13/node_modules/mcporter/package.json
|
|
4
4
|
var package_default = {
|
|
5
5
|
name: "mcporter",
|
|
6
|
-
version: "0.13.
|
|
6
|
+
version: "0.13.13",
|
|
7
7
|
description: "TypeScript runtime and CLI for connecting to configured Model Context Protocol servers.",
|
|
8
8
|
keywords: [
|
|
9
9
|
"cli",
|
|
@@ -50,26 +50,26 @@ var package_default = {
|
|
|
50
50
|
"es-toolkit": "^1.52.0",
|
|
51
51
|
"jsonc-parser": "^3.3.1",
|
|
52
52
|
ora: "^9.4.1",
|
|
53
|
-
rolldown: "1.2.
|
|
54
|
-
zod: "^4.
|
|
53
|
+
rolldown: "1.2.8",
|
|
54
|
+
zod: "^4.6.2"
|
|
55
55
|
},
|
|
56
56
|
devDependencies: {
|
|
57
57
|
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
58
58
|
"@types/estree": "^1.0.9",
|
|
59
59
|
"@types/express": "^5.0.6",
|
|
60
|
-
"@types/node": "^26.
|
|
60
|
+
"@types/node": "^26.5.1",
|
|
61
61
|
"@typescript/native": "npm:typescript@^7.0.2",
|
|
62
62
|
"@vitest/coverage-v8": "^5.0.0",
|
|
63
|
-
"bun-types": "^1.4.
|
|
63
|
+
"bun-types": "^1.4.2",
|
|
64
64
|
"cross-env": "^10.1.0",
|
|
65
65
|
express: "^5.2.1",
|
|
66
|
-
oxfmt: "^0.
|
|
67
|
-
oxlint: "^1.
|
|
66
|
+
oxfmt: "^0.67.0",
|
|
67
|
+
oxlint: "^1.82.0",
|
|
68
68
|
"oxlint-tsgolint": "^7.0.2001",
|
|
69
69
|
rimraf: "^6.1.3",
|
|
70
70
|
tsx: "^4.23.13",
|
|
71
71
|
typescript: "npm:@typescript/typescript6@^6.0.2",
|
|
72
|
-
vite: "8.
|
|
72
|
+
vite: "8.3.0",
|
|
73
73
|
vitest: "^5.0.0"
|
|
74
74
|
},
|
|
75
75
|
devEngines: {
|
|
@@ -115,7 +115,7 @@ var package_default = {
|
|
|
115
115
|
}
|
|
116
116
|
};
|
|
117
117
|
|
|
118
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
118
|
+
// node_modules/.pnpm/mcporter@0.13.13/node_modules/mcporter/dist/version.js
|
|
119
119
|
var MCPORTER_VERSION = package_default.version;
|
|
120
120
|
|
|
121
121
|
export {
|