@introspection-ai/recipes 0.61.1 → 0.62.0

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.
Files changed (118) hide show
  1. package/dist/mcp-chunks/{auth-command-WE7QY6RH.js → auth-command-ENP2QQ5Z.js} +67 -27
  2. package/dist/mcp-chunks/call-arguments-Z5REZUAX.js +16 -0
  3. package/dist/mcp-chunks/{call-command-OOBUGVTM.js → call-command-LOWTMLJD.js} +59 -43
  4. package/dist/mcp-chunks/{chunk-32UZRZIL.js → chunk-27PQUO34.js} +1 -1
  5. package/dist/mcp-chunks/{chunk-NJR33E7V.js → chunk-2OSM5WUI.js} +4 -4
  6. package/dist/mcp-chunks/{chunk-BI6L3SYV.js → chunk-33P3PYCH.js} +28 -20
  7. package/dist/mcp-chunks/{chunk-2PTK6KBV.js → chunk-3MELXKB4.js} +12 -9
  8. package/dist/mcp-chunks/{chunk-Z5XOB522.js → chunk-3P3Z5PKQ.js} +1 -1
  9. package/dist/mcp-chunks/{chunk-ZEMVGFKG.js → chunk-3TZZPKQP.js} +2 -2
  10. package/dist/mcp-chunks/{chunk-73TMUGJL.js → chunk-3UONQ24E.js} +3 -3
  11. package/dist/mcp-chunks/{chunk-W47YAN6W.js → chunk-5AVROWKC.js} +3 -3
  12. package/dist/mcp-chunks/{chunk-SYBDN4SV.js → chunk-6HA2S26Q.js} +5 -5
  13. package/dist/mcp-chunks/{chunk-MG6EVYIM.js → chunk-6IKBK334.js} +13 -13
  14. package/dist/mcp-chunks/{chunk-7SQZWTDU.js → chunk-6VAFZAST.js} +1 -1
  15. package/dist/mcp-chunks/{chunk-2R7UGABC.js → chunk-6WTCG4OR.js} +113 -89
  16. package/dist/mcp-chunks/{chunk-ZJZ53NIB.js → chunk-7JRVQRQ4.js} +10 -7
  17. package/dist/mcp-chunks/{chunk-AIUZOMBB.js → chunk-7LKVFBEL.js} +12 -12
  18. package/dist/mcp-chunks/{chunk-44KI6DPL.js → chunk-ACSE24O5.js} +15 -18
  19. package/dist/mcp-chunks/{chunk-5ZQKSEUN.js → chunk-B6YFFSTP.js} +6 -3
  20. package/dist/mcp-chunks/{chunk-3KSDZBUJ.js → chunk-BA3QLN3P.js} +5 -5
  21. package/dist/mcp-chunks/{chunk-MSPGQEWX.js → chunk-BMOK7SQE.js} +12 -12
  22. package/dist/mcp-chunks/{chunk-H44A4G2O.js → chunk-CPAQ4API.js} +2 -2
  23. package/dist/mcp-chunks/{chunk-Y7JQJ352.js → chunk-CSUDITHP.js} +16 -16
  24. package/dist/mcp-chunks/{chunk-UY2QWZB3.js → chunk-DSBXRWGJ.js} +64 -65
  25. package/dist/mcp-chunks/{chunk-DEYGZRBD.js → chunk-EUT2CVFE.js} +8 -5
  26. package/dist/mcp-chunks/{chunk-HPFIAALB.js → chunk-F4UVQBNV.js} +16 -13
  27. package/dist/mcp-chunks/{chunk-VLJQSE6L.js → chunk-F5XGHRRC.js} +9 -9
  28. package/dist/mcp-chunks/{chunk-YFPPHEDE.js → chunk-FMLYITVD.js} +1 -1
  29. package/dist/mcp-chunks/{chunk-37VJZIFW.js → chunk-FYRRJZPO.js} +8 -8
  30. package/dist/mcp-chunks/{chunk-2R2HWX2E.js → chunk-GJKH5KNE.js} +1 -1
  31. package/dist/mcp-chunks/{chunk-HGEKP2E5.js → chunk-H4TU7J5F.js} +9 -6
  32. package/dist/mcp-chunks/{chunk-4ACA5GWL.js → chunk-IX6HNQSH.js} +1 -1
  33. package/dist/mcp-chunks/{chunk-FJNWUAGR.js → chunk-KKM3M3F7.js} +13 -10
  34. package/dist/mcp-chunks/{chunk-Z43KJRXY.js → chunk-KUP2GHFE.js} +1 -1
  35. package/dist/mcp-chunks/{chunk-CWM4RO33.js → chunk-L3BBHB3E.js} +1 -1
  36. package/dist/mcp-chunks/{chunk-XU4D5QN2.js → chunk-M4RI6BN4.js} +1 -1
  37. package/dist/mcp-chunks/{chunk-EUHXZKP2.js → chunk-N53HQB4G.js} +108 -108
  38. package/dist/mcp-chunks/{chunk-HKMH4N3Z.js → chunk-NAGTWK62.js} +1 -1
  39. package/dist/mcp-chunks/{chunk-ABPXAKP7.js → chunk-OH3HVZE7.js} +40 -32
  40. package/dist/mcp-chunks/{chunk-4SO2DY7F.js → chunk-OHAXEQ22.js} +2 -2
  41. package/dist/mcp-chunks/{chunk-OSK2JGFH.js → chunk-PBYZ5QZW.js} +1 -1
  42. package/dist/mcp-chunks/{chunk-QYR3UKJS.js → chunk-PJH2FNYO.js} +3 -3
  43. package/dist/mcp-chunks/{chunk-FDVES4CU.js → chunk-PJSLJ3YK.js} +2 -2
  44. package/dist/mcp-chunks/{chunk-MW3YO24Q.js → chunk-PPJWHK7M.js} +3 -3
  45. package/dist/mcp-chunks/{chunk-4NABHXDS.js → chunk-QA6AKKCT.js} +11 -8
  46. package/dist/mcp-chunks/{chunk-DL3GVI4M.js → chunk-QDLNI6YU.js} +2 -2
  47. package/dist/mcp-chunks/{chunk-TTVO6RCP.js → chunk-QRC4AH7I.js} +2 -2
  48. package/dist/mcp-chunks/{chunk-Y7UTXETL.js → chunk-QRD3PAVF.js} +1 -1
  49. package/dist/mcp-chunks/{chunk-G5DK4L6M.js → chunk-RAUI7O2B.js} +2 -2
  50. package/dist/mcp-chunks/{chunk-VJ45Y5IO.js → chunk-RF3HIBXO.js} +1 -1
  51. package/dist/mcp-chunks/{chunk-CIQX62WO.js → chunk-RFQCNCWI.js} +2 -2
  52. package/dist/mcp-chunks/{chunk-GQM53HF7.js → chunk-SL74CLNX.js} +1 -1
  53. package/dist/mcp-chunks/{chunk-EVEVCVYR.js → chunk-TAEXC3CS.js} +5 -5
  54. package/dist/mcp-chunks/{chunk-QHD5RXW4.js → chunk-U4NDKPOH.js} +24 -17
  55. package/dist/mcp-chunks/{chunk-CFRA424Y.js → chunk-UP3I6WR3.js} +4 -4
  56. package/dist/mcp-chunks/{chunk-VJ5VDK6D.js → chunk-UZ5WW52A.js} +1 -1
  57. package/dist/mcp-chunks/{chunk-TT3LOCMN.js → chunk-V65N6VX7.js} +2 -2
  58. package/dist/mcp-chunks/{chunk-7KOGD2JK.js → chunk-VKRJV2OQ.js} +2 -2
  59. package/dist/mcp-chunks/{chunk-YGT57XUN.js → chunk-VNQIAJ4I.js} +2 -2
  60. package/dist/mcp-chunks/{chunk-EV3SP7ME.js → chunk-W3HK334E.js} +1 -1
  61. package/dist/mcp-chunks/{chunk-KUJUYFDC.js → chunk-XCAIV2CS.js} +4 -4
  62. package/dist/mcp-chunks/{chunk-TQ5T5VO7.js → chunk-YINZMSAI.js} +2 -2
  63. package/dist/mcp-chunks/{cli-TJFAYJO4.js → cli-QNVUCDJE.js} +70 -70
  64. package/dist/mcp-chunks/client-VL2MU7HF.js +32 -0
  65. package/dist/mcp-chunks/{config-command-YGNK2VVL.js → config-command-NMIYA3HF.js} +31 -31
  66. package/dist/mcp-chunks/daemon-command-SLRKTEMY.js +36 -0
  67. package/dist/mcp-chunks/dist-GMDBFGJD.js +69 -0
  68. package/dist/mcp-chunks/{dist-IFOLXE2R.js → dist-P7P5T6YZ.js} +1362 -1231
  69. package/dist/mcp-chunks/{emit-ts-command-4EVF6CIG.js → emit-ts-command-CH34ZIJL.js} +18 -18
  70. package/dist/mcp-chunks/{generate-cli-runner-UFVSXJVK.js → generate-cli-runner-3X2GEPPY.js} +57 -55
  71. package/dist/mcp-chunks/generated-daemon-runtime-BL7IYY6T.js +32 -0
  72. package/dist/mcp-chunks/{inspect-cli-command-L3JGLLTG.js → inspect-cli-command-JCKHV5GL.js} +16 -13
  73. package/dist/mcp-chunks/{launch-LUKDWKH4.js → launch-YFY4X7YJ.js} +1 -1
  74. package/dist/mcp-chunks/{lifecycle-H57PYAZ5.js → lifecycle-UUTEE5WE.js} +1 -1
  75. package/dist/mcp-chunks/{list-command-QBO4LK5Q.js → list-command-VDZVNILR.js} +36 -36
  76. package/dist/mcp-chunks/{logger-LvdykevT-BQ5B4N5O.js → logger-CpvFcLaq-27JFRZ4G.js} +3 -3
  77. package/dist/mcp-chunks/{output-utils-MB3PEV2M.js → output-utils-SYVU3XAD.js} +3 -3
  78. package/dist/mcp-chunks/{pi-mcp-runtime-OIMIJV5A.js → pi-mcp-runtime-V2OMZAIR.js} +1 -1
  79. package/dist/mcp-chunks/{prompt-DkftHXS7-TE2LNPAM.js → prompt-DkftHXS7-6LABGWLG.js} +1 -1
  80. package/dist/mcp-chunks/{record-command-RYDP3Y2A.js → record-command-U7L3OGJZ.js} +6 -5
  81. package/dist/mcp-chunks/{replay-command-QDJCQ5JU.js → replay-command-4AZZBGXO.js} +7 -6
  82. package/dist/mcp-chunks/{resource-command-RKHHQBFP.js → resource-command-BZZBELBM.js} +14 -11
  83. package/dist/mcp-chunks/{result-utils-ZD5GFX7P.js → result-utils-XNXSDC6N.js} +3 -3
  84. package/dist/mcp-chunks/runtime-OVVVPYHO.js +39 -0
  85. package/dist/mcp-chunks/{runtime-wrapper-AV4JCNRF.js → runtime-wrapper-6BUJRMQL.js} +3 -3
  86. package/dist/mcp-chunks/{serve-command-MRPTK4XX.js → serve-command-ZY3PLYNM.js} +39 -36
  87. package/dist/mcp-chunks/server-6DQUPUFW.js +43 -0
  88. package/dist/mcp-chunks/{timeouts-2SQIDYBE.js → timeouts-EEXKP36K.js} +4 -4
  89. package/dist/mcp-chunks/{vault-command-6JVDCFWU.js → vault-command-PRTY3B4I.js} +5 -5
  90. package/dist/mcp-chunks/{webapi-CI4O7AUX.js → webapi-SSFFKLRR.js} +1 -1
  91. package/dist/mcp-daemon.js +35 -35
  92. package/dist/mcp-run-worker.js +34 -34
  93. package/dist/memory-context.d.ts +16 -0
  94. package/dist/memory-context.d.ts.map +1 -0
  95. package/dist/memory-context.js +100 -0
  96. package/dist/memory-context.js.map +1 -0
  97. package/dist/memory.d.ts +2 -0
  98. package/dist/memory.d.ts.map +1 -1
  99. package/dist/memory.js +13 -0
  100. package/dist/memory.js.map +1 -1
  101. package/dist/pi-extension.d.ts.map +1 -1
  102. package/dist/pi-extension.js +6 -0
  103. package/dist/pi-extension.js.map +1 -1
  104. package/dist/recipe/manifest.generated.d.ts +1 -1
  105. package/dist/recipe/manifest.generated.js +1 -1
  106. package/dist/session.d.ts.map +1 -1
  107. package/dist/session.js +27 -9
  108. package/dist/session.js.map +1 -1
  109. package/docs/host-api.md +18 -10
  110. package/docs/pi-extension.md +11 -0
  111. package/package.json +8 -8
  112. package/dist/mcp-chunks/call-arguments-2ABANGLE.js +0 -16
  113. package/dist/mcp-chunks/client-LDKUW5K5.js +0 -32
  114. package/dist/mcp-chunks/daemon-command-UYAYRHVD.js +0 -36
  115. package/dist/mcp-chunks/dist-5JNZD3JV.js +0 -69
  116. package/dist/mcp-chunks/generated-daemon-runtime-LTH36X2R.js +0 -32
  117. package/dist/mcp-chunks/runtime-F7PP4V25.js +0 -39
  118. package/dist/mcp-chunks/server-2WSYXDII.js +0 -43
@@ -3,54 +3,66 @@ import {
3
3
  getActiveLogger,
4
4
  logInfo,
5
5
  logWarn
6
- } from "./chunk-CIQX62WO.js";
6
+ } from "./chunk-RFQCNCWI.js";
7
7
  import {
8
8
  persistPreparedEphemeralServer,
9
9
  prepareEphemeralServerTarget,
10
10
  renderAdhocServerHelpLines
11
- } from "./chunk-SYBDN4SV.js";
11
+ } from "./chunk-6HA2S26Q.js";
12
12
  import {
13
13
  buildConnectionIssueEnvelope
14
- } from "./chunk-Y7UTXETL.js";
15
- import "./chunk-ZEMVGFKG.js";
16
- import "./chunk-QHD5RXW4.js";
14
+ } from "./chunk-QRD3PAVF.js";
15
+ import "./chunk-3TZZPKQP.js";
16
+ import {
17
+ chooseClosestIdentifier,
18
+ normalizeIdentifier,
19
+ renderIdentifierResolutionMessages
20
+ } from "./chunk-M4RI6BN4.js";
21
+ import "./chunk-U4NDKPOH.js";
17
22
  import {
18
23
  extractEphemeralServerFlags
19
- } from "./chunk-FJNWUAGR.js";
24
+ } from "./chunk-KKM3M3F7.js";
20
25
  import {
21
26
  looksLikeHttpUrl
22
- } from "./chunk-32UZRZIL.js";
27
+ } from "./chunk-27PQUO34.js";
23
28
  import {
24
29
  consumeOutputFormat
25
- } from "./chunk-ZJZ53NIB.js";
30
+ } from "./chunk-7JRVQRQ4.js";
31
+ import {
32
+ dimText,
33
+ yellowText
34
+ } from "./chunk-UZ5WW52A.js";
35
+ import {
36
+ CliUsageError
37
+ } from "./chunk-W3HK334E.js";
26
38
  import {
27
39
  isOAuthFlowError,
28
40
  resolveOAuthTimeoutFromEnv,
29
41
  suppressBrowserLaunchFromEnv
30
- } from "./chunk-AIUZOMBB.js";
42
+ } from "./chunk-7LKVFBEL.js";
31
43
  import {
32
44
  clearOAuthCaches
33
- } from "./chunk-37VJZIFW.js";
45
+ } from "./chunk-FYRRJZPO.js";
34
46
  import {
35
47
  childEnvWithoutVaultSecrets
36
- } from "./chunk-BI6L3SYV.js";
37
- import "./chunk-YFPPHEDE.js";
38
- import "./chunk-Y7JQJ352.js";
39
- import "./chunk-OSK2JGFH.js";
40
- import "./chunk-TTVO6RCP.js";
41
- import "./chunk-MW3YO24Q.js";
42
- import "./chunk-G5DK4L6M.js";
48
+ } from "./chunk-33P3PYCH.js";
49
+ import "./chunk-FMLYITVD.js";
50
+ import "./chunk-CSUDITHP.js";
51
+ import "./chunk-PBYZ5QZW.js";
52
+ import "./chunk-QRC4AH7I.js";
53
+ import "./chunk-PPJWHK7M.js";
54
+ import "./chunk-RAUI7O2B.js";
43
55
  import "./chunk-T4MQCFIK.js";
44
- import "./chunk-4ACA5GWL.js";
45
- import "./chunk-CWM4RO33.js";
46
- import "./chunk-UY2QWZB3.js";
56
+ import "./chunk-IX6HNQSH.js";
57
+ import "./chunk-L3BBHB3E.js";
58
+ import "./chunk-DSBXRWGJ.js";
47
59
  import {
48
60
  analyzeConnectionError
49
- } from "./chunk-7KOGD2JK.js";
50
- import "./chunk-EUHXZKP2.js";
61
+ } from "./chunk-VKRJV2OQ.js";
62
+ import "./chunk-N53HQB4G.js";
51
63
  import "./chunk-LRKZP7DJ.js";
52
64
 
53
- // node_modules/.pnpm/mcporter@0.17.0/node_modules/mcporter/dist/cli/auth-command.js
65
+ // node_modules/.pnpm/mcporter@0.17.1/node_modules/mcporter/dist/cli/auth-command.js
54
66
  import { spawn } from "node:child_process";
55
67
  async function handleAuth(runtime, args, options = {}) {
56
68
  const browserSuppression = consumeBrowserSuppression(args, process.env);
@@ -86,9 +98,11 @@ async function handleAuth(runtime, args, options = {}) {
86
98
  });
87
99
  target = prepared.target;
88
100
  if (!target) {
89
- throw new Error("Usage: mcporter auth <server | url> [--http-url <url> | --stdio <command>]");
101
+ throw new CliUsageError("Usage: mcporter auth <server | url> [--http-url <url> | --stdio <command>]");
90
102
  }
91
- const definition = runtime.getDefinition(target);
103
+ const resolved = resolveAuthDefinition(runtime, target);
104
+ target = resolved.name;
105
+ const definition = resolved.definition;
92
106
  if (shouldReset) {
93
107
  await clearOAuthCaches(definition);
94
108
  if (!noBrowser) {
@@ -199,6 +213,32 @@ function buildNoBrowserOAuthOptions(format, markAuthorizationOutputEmitted) {
199
213
  }
200
214
  };
201
215
  }
216
+ function resolveAuthDefinition(runtime, name) {
217
+ try {
218
+ return { definition: runtime.getDefinition(name), name };
219
+ } catch (error) {
220
+ if (!(error instanceof Error) || !/Unknown MCP server/i.test(error.message)) {
221
+ throw error;
222
+ }
223
+ const resolution = chooseClosestIdentifier(name, runtime.getDefinitions().map((entry) => entry.name));
224
+ if (resolution) {
225
+ const autoCorrect = resolution.kind === "auto" && normalizeIdentifier(name) !== "" && normalizeIdentifier(resolution.value) !== "";
226
+ const messages = renderIdentifierResolutionMessages({
227
+ entity: "server",
228
+ attempted: name,
229
+ resolution: autoCorrect ? resolution : { kind: "suggest", value: resolution.value }
230
+ });
231
+ if (autoCorrect && messages.auto) {
232
+ console.error(dimText(messages.auto));
233
+ return { definition: runtime.getDefinition(resolution.value), name: resolution.value };
234
+ }
235
+ if (messages.suggest) {
236
+ console.error(yellowText(messages.suggest));
237
+ }
238
+ }
239
+ throw new CliUsageError(error.message);
240
+ }
241
+ }
202
242
  function consumeBrowserSuppression(args, env) {
203
243
  let mode = suppressBrowserLaunchFromEnv(env) ? "no-browser" : "default";
204
244
  const noBrowserIndex = args.indexOf("--no-browser");
@@ -210,10 +250,10 @@ function consumeBrowserSuppression(args, env) {
210
250
  if (browserIndex !== -1) {
211
251
  const value = args[browserIndex + 1];
212
252
  if (!value) {
213
- throw new Error("Flag '--browser' requires a value.");
253
+ throw new CliUsageError("Flag '--browser' requires a value.");
214
254
  }
215
255
  if (value !== "none") {
216
- throw new Error("--browser must be 'none' when provided to mcporter auth.");
256
+ throw new CliUsageError("--browser must be 'none' when provided to mcporter auth.");
217
257
  }
218
258
  args.splice(browserIndex, 2);
219
259
  mode = "no-browser";
@@ -0,0 +1,16 @@
1
+ import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
2
+ import {
3
+ parseCallArguments
4
+ } from "./chunk-ACSE24O5.js";
5
+ import "./chunk-PJH2FNYO.js";
6
+ import "./chunk-KKM3M3F7.js";
7
+ import "./chunk-27PQUO34.js";
8
+ import "./chunk-7JRVQRQ4.js";
9
+ import "./chunk-W3HK334E.js";
10
+ import "./chunk-F5XGHRRC.js";
11
+ import "./chunk-T4MQCFIK.js";
12
+ import "./chunk-IX6HNQSH.js";
13
+ import "./chunk-LRKZP7DJ.js";
14
+ export {
15
+ parseCallArguments
16
+ };
@@ -1,20 +1,15 @@
1
1
  import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
2
2
  import {
3
3
  dumpActiveHandles
4
- } from "./chunk-YGT57XUN.js";
4
+ } from "./chunk-VNQIAJ4I.js";
5
5
  import {
6
6
  printCallOutput,
7
7
  tailLogIfRequested
8
- } from "./chunk-FDVES4CU.js";
8
+ } from "./chunk-PJSLJ3YK.js";
9
9
  import {
10
10
  loadToolMetadata
11
- } from "./chunk-TQ5T5VO7.js";
12
- import {
13
- chooseClosestIdentifier,
14
- normalizeIdentifier,
15
- renderIdentifierResolutionMessages
16
- } from "./chunk-XU4D5QN2.js";
17
- import "./chunk-7SQZWTDU.js";
11
+ } from "./chunk-YINZMSAI.js";
12
+ import "./chunk-6VAFZAST.js";
18
13
  import {
19
14
  CALL_HELP_ARGUMENT_LINES,
20
15
  CALL_HELP_EXAMPLE_LINES,
@@ -22,56 +17,61 @@ import {
22
17
  buildUnknownCallFlagMessage,
23
18
  buildUnvalidatedCallFlagMessage,
24
19
  parseCallArguments
25
- } from "./chunk-44KI6DPL.js";
20
+ } from "./chunk-ACSE24O5.js";
26
21
  import {
27
22
  resolveServerCallTimeout,
28
23
  withTimeout
29
- } from "./chunk-QYR3UKJS.js";
30
- import "./chunk-CIQX62WO.js";
24
+ } from "./chunk-PJH2FNYO.js";
25
+ import "./chunk-RFQCNCWI.js";
31
26
  import {
32
27
  persistPreparedEphemeralServer,
33
28
  prepareEphemeralServerTarget,
34
29
  renderAdhocServerHelpLines
35
- } from "./chunk-SYBDN4SV.js";
30
+ } from "./chunk-6HA2S26Q.js";
36
31
  import {
37
32
  buildConnectionIssueEnvelope
38
- } from "./chunk-Y7UTXETL.js";
39
- import "./chunk-ZEMVGFKG.js";
40
- import "./chunk-QHD5RXW4.js";
41
- import "./chunk-FJNWUAGR.js";
33
+ } from "./chunk-QRD3PAVF.js";
34
+ import "./chunk-3TZZPKQP.js";
35
+ import {
36
+ chooseClosestIdentifier,
37
+ normalizeIdentifier,
38
+ renderIdentifierResolutionMessages
39
+ } from "./chunk-M4RI6BN4.js";
40
+ import "./chunk-U4NDKPOH.js";
41
+ import "./chunk-KKM3M3F7.js";
42
42
  import {
43
43
  looksLikeHttpUrl,
44
44
  normalizeHttpUrlCandidate
45
- } from "./chunk-32UZRZIL.js";
46
- import "./chunk-ZJZ53NIB.js";
45
+ } from "./chunk-27PQUO34.js";
46
+ import "./chunk-7JRVQRQ4.js";
47
47
  import {
48
48
  dimText,
49
49
  redText,
50
50
  yellowText
51
- } from "./chunk-VJ5VDK6D.js";
51
+ } from "./chunk-UZ5WW52A.js";
52
52
  import {
53
53
  CliUsageError
54
- } from "./chunk-EV3SP7ME.js";
54
+ } from "./chunk-W3HK334E.js";
55
55
  import {
56
56
  wrapCallResult
57
- } from "./chunk-DL3GVI4M.js";
58
- import "./chunk-VLJQSE6L.js";
59
- import "./chunk-YFPPHEDE.js";
60
- import "./chunk-Y7JQJ352.js";
61
- import "./chunk-OSK2JGFH.js";
62
- import "./chunk-TTVO6RCP.js";
63
- import "./chunk-MW3YO24Q.js";
64
- import "./chunk-G5DK4L6M.js";
57
+ } from "./chunk-QDLNI6YU.js";
58
+ import "./chunk-F5XGHRRC.js";
59
+ import "./chunk-FMLYITVD.js";
60
+ import "./chunk-CSUDITHP.js";
61
+ import "./chunk-PBYZ5QZW.js";
62
+ import "./chunk-QRC4AH7I.js";
63
+ import "./chunk-PPJWHK7M.js";
64
+ import "./chunk-RAUI7O2B.js";
65
65
  import "./chunk-T4MQCFIK.js";
66
- import "./chunk-4ACA5GWL.js";
67
- import "./chunk-CWM4RO33.js";
66
+ import "./chunk-IX6HNQSH.js";
67
+ import "./chunk-L3BBHB3E.js";
68
68
  import {
69
69
  analyzeConnectionError
70
- } from "./chunk-7KOGD2JK.js";
71
- import "./chunk-EUHXZKP2.js";
70
+ } from "./chunk-VKRJV2OQ.js";
71
+ import "./chunk-N53HQB4G.js";
72
72
  import "./chunk-LRKZP7DJ.js";
73
73
 
74
- // node_modules/.pnpm/mcporter@0.17.0/node_modules/mcporter/dist/cli/image-output.js
74
+ // node_modules/.pnpm/mcporter@0.17.1/node_modules/mcporter/dist/cli/image-output.js
75
75
  import fs from "node:fs";
76
76
  import path from "node:path";
77
77
  function saveCallImagesIfRequested(wrapped, outputDir) {
@@ -129,7 +129,7 @@ function resolveImageOutputPath(outputDir, baseName, extension) {
129
129
  }
130
130
  }
131
131
 
132
- // node_modules/.pnpm/mcporter@0.17.0/node_modules/mcporter/dist/cli/call-command.js
132
+ // node_modules/.pnpm/mcporter@0.17.1/node_modules/mcporter/dist/cli/call-command.js
133
133
  async function handleCall(runtime, args) {
134
134
  let prepared;
135
135
  try {
@@ -301,7 +301,7 @@ async function maybeDescribeServer(runtime, server, tool, outputFormat, disableO
301
301
  if (outputFormat === "json") {
302
302
  listArgs2.push("--json");
303
303
  }
304
- const { handleList: handleList2 } = await import("./list-command-QBO4LK5Q.js");
304
+ const { handleList: handleList2 } = await import("./list-command-VDZVNILR.js");
305
305
  await handleList2(runtime, listArgs2);
306
306
  return true;
307
307
  }
@@ -324,7 +324,7 @@ async function maybeDescribeServer(runtime, server, tool, outputFormat, disableO
324
324
  if (outputFormat === "json") {
325
325
  listArgs.push("--json");
326
326
  }
327
- const { handleList } = await import("./list-command-QBO4LK5Q.js");
327
+ const { handleList } = await import("./list-command-VDZVNILR.js");
328
328
  await handleList(runtime, listArgs);
329
329
  return true;
330
330
  }
@@ -404,7 +404,7 @@ async function enforceSchemaAwareArgumentTypes(runtime, server, tool, args, stri
404
404
  continue;
405
405
  }
406
406
  const coercedType = value === null ? "null" : Array.isArray(value) ? "array" : typeof value;
407
- if (coercedType !== "number" && schemaAllowsType(descriptor, coercedType)) {
407
+ if (coercedType !== "number" && schemaAllowsType(descriptor, coercedType) !== false) {
408
408
  continue;
409
409
  }
410
410
  corrected ??= { ...args };
@@ -415,7 +415,7 @@ async function enforceSchemaAwareArgumentTypes(runtime, server, tool, args, stri
415
415
  continue;
416
416
  }
417
417
  const descriptor = schemaProperties[key];
418
- if (!schemaAllowsType(descriptor, "array") || schemaAllowsType(descriptor, "string")) {
418
+ if (!schemaAllowsType(descriptor, "array") || schemaAllowsType(descriptor, "string") !== false) {
419
419
  continue;
420
420
  }
421
421
  corrected ??= { ...args };
@@ -434,9 +434,12 @@ function readSchemaProperties(schema) {
434
434
  return properties;
435
435
  }
436
436
  function schemaAllowsType(descriptor, expected) {
437
- if (!descriptor || typeof descriptor !== "object") {
437
+ if (descriptor === false) {
438
438
  return false;
439
439
  }
440
+ if (!descriptor || typeof descriptor !== "object") {
441
+ return void 0;
442
+ }
440
443
  const record = descriptor;
441
444
  const type = record.type;
442
445
  if (type === expected) {
@@ -445,13 +448,26 @@ function schemaAllowsType(descriptor, expected) {
445
448
  if (Array.isArray(type) && type.includes(expected)) {
446
449
  return true;
447
450
  }
451
+ if (typeof type === "string" || Array.isArray(type)) {
452
+ return false;
453
+ }
454
+ let unknown = typeof record.$ref === "string";
455
+ let hasComposition = false;
448
456
  for (const key of ["anyOf", "oneOf", "allOf"]) {
449
457
  const variants = record[key];
450
- if (Array.isArray(variants) && variants.some((variant) => schemaAllowsType(variant, expected))) {
451
- return true;
458
+ if (Array.isArray(variants)) {
459
+ hasComposition = true;
460
+ const allowed = new Set(variants.map((variant) => schemaAllowsType(variant, expected)));
461
+ if (key === "allOf" && allowed.has(false)) {
462
+ return false;
463
+ }
464
+ if (allowed.has(true)) {
465
+ return true;
466
+ }
467
+ unknown ||= allowed.has(void 0);
452
468
  }
453
469
  }
454
- return false;
470
+ return unknown || type === void 0 && !hasComposition ? void 0 : false;
455
471
  }
456
472
  async function hydratePositionalArguments(runtime, server, tool, namedArgs, positionalArgs, disableOAuth) {
457
473
  if (!positionalArgs || positionalArgs.length === 0) {
@@ -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.17.0/node_modules/mcporter/dist/cli/http-utils.js
3
+ // node_modules/.pnpm/mcporter@0.17.1/node_modules/mcporter/dist/cli/http-utils.js
4
4
  var DOMAIN_WITH_PATH_PATTERN = /^[A-Za-z0-9](?:[A-Za-z0-9.-]*)(?::\d+)?\//;
5
5
  function normalizeHttpUrlCandidate(value) {
6
6
  if (!value) {
@@ -4,12 +4,12 @@ import {
4
4
  extraDimText,
5
5
  redText,
6
6
  yellowText
7
- } from "./chunk-VJ5VDK6D.js";
7
+ } from "./chunk-UZ5WW52A.js";
8
8
  import {
9
9
  analyzeConnectionError
10
- } from "./chunk-7KOGD2JK.js";
10
+ } from "./chunk-VKRJV2OQ.js";
11
11
 
12
- // node_modules/.pnpm/mcporter@0.17.0/node_modules/mcporter/dist/cli/path-utils.js
12
+ // node_modules/.pnpm/mcporter@0.17.1/node_modules/mcporter/dist/cli/path-utils.js
13
13
  import os from "node:os";
14
14
  import path from "node:path";
15
15
  function formatPathForDisplay(filePath) {
@@ -19,7 +19,7 @@ function formatPathForDisplay(filePath) {
19
19
  return displayPath;
20
20
  }
21
21
 
22
- // node_modules/.pnpm/mcporter@0.17.0/node_modules/mcporter/dist/cli/list-format.js
22
+ // node_modules/.pnpm/mcporter@0.17.1/node_modules/mcporter/dist/cli/list-format.js
23
23
  function renderServerListRow(result, timeoutMs, options = {}) {
24
24
  const description = result.server.description ? dimText(` \u2014 ${result.server.description}`) : "";
25
25
  const durationLabel = dimText(`${(result.durationMs / 1e3).toFixed(1)}s`);
@@ -4,15 +4,15 @@ import {
4
4
  withFileLock,
5
5
  writeJsonFile,
6
6
  writeTextFileAtomic
7
- } from "./chunk-TTVO6RCP.js";
7
+ } from "./chunk-QRC4AH7I.js";
8
8
  import {
9
9
  CompactEncrypt,
10
10
  compactDecrypt,
11
11
  decodeProtectedHeader,
12
12
  errors_exports
13
- } from "./chunk-UY2QWZB3.js";
13
+ } from "./chunk-DSBXRWGJ.js";
14
14
 
15
- // node_modules/.pnpm/mcporter@0.17.0/node_modules/mcporter/dist/oauth-vault-encryption.js
15
+ // node_modules/.pnpm/mcporter@0.17.1/node_modules/mcporter/dist/oauth-vault-encryption.js
16
16
  var VAULT_PASSWORD_ENV = "MCPORTER_VAULT_PASSWORD";
17
17
  var VAULT_ENCRYPTION_POLICY_ENV = "MCPORTER_VAULT_ENCRYPTION";
18
18
  var VAULT_SECRET_ENV_NAMES = [VAULT_PASSWORD_ENV, VAULT_ENCRYPTION_POLICY_ENV];
@@ -153,11 +153,11 @@ function describeVaultSecrets(entries) {
153
153
  return stats;
154
154
  }
155
155
 
156
- // node_modules/.pnpm/mcporter@0.17.0/node_modules/mcporter/dist/oauth-vault.js
156
+ // node_modules/.pnpm/mcporter@0.17.1/node_modules/mcporter/dist/oauth-vault.js
157
157
  import crypto from "node:crypto";
158
158
  import path2 from "node:path";
159
159
 
160
- // node_modules/.pnpm/mcporter@0.17.0/node_modules/mcporter/dist/oauth-credential-validation.js
160
+ // node_modules/.pnpm/mcporter@0.17.1/node_modules/mcporter/dist/oauth-credential-validation.js
161
161
  function isRecord(value) {
162
162
  return Boolean(value && typeof value === "object" && !Array.isArray(value));
163
163
  }
@@ -178,7 +178,7 @@ function isStoredOAuthClientInformation(value) {
178
178
  return isOptionalString(value, "issuer");
179
179
  }
180
180
 
181
- // node_modules/.pnpm/mcporter@0.17.0/node_modules/mcporter/dist/oauth-token-generation.js
181
+ // node_modules/.pnpm/mcporter@0.17.1/node_modules/mcporter/dist/oauth-token-generation.js
182
182
  import { randomUUID } from "node:crypto";
183
183
  import { isDeepStrictEqual } from "node:util";
184
184
  var TOKEN_GENERATION_FIELD = "__mcporter_generation";
@@ -258,7 +258,7 @@ function sameOAuthClientValue(left, right) {
258
258
  return isDeepStrictEqual(withoutClientGeneration(left), withoutClientGeneration(right));
259
259
  }
260
260
 
261
- // node_modules/.pnpm/mcporter@0.17.0/node_modules/mcporter/dist/runtime/environment.js
261
+ // node_modules/.pnpm/mcporter@0.17.1/node_modules/mcporter/dist/runtime/environment.js
262
262
  import { AsyncLocalStorage } from "node:async_hooks";
263
263
  import os from "node:os";
264
264
  import path from "node:path";
@@ -281,7 +281,7 @@ function runtimeStateDir(kind) {
281
281
  return root && path.isAbsolute(root) ? path.join(root, "mcporter") : path.join(runtimeHome(), ".mcporter");
282
282
  }
283
283
 
284
- // node_modules/.pnpm/mcporter@0.17.0/node_modules/mcporter/dist/oauth-vault.js
284
+ // node_modules/.pnpm/mcporter@0.17.1/node_modules/mcporter/dist/oauth-vault.js
285
285
  function getOAuthVaultPath() {
286
286
  return path2.join(runtimeStateDir("data"), "credentials.json");
287
287
  }
@@ -631,7 +631,7 @@ async function clearVaultEntry(definition, scope) {
631
631
  });
632
632
  }
633
633
 
634
- // node_modules/.pnpm/mcporter@0.17.0/node_modules/mcporter/dist/oauth-persistence-stores.js
634
+ // node_modules/.pnpm/mcporter@0.17.1/node_modules/mcporter/dist/oauth-persistence-stores.js
635
635
  import fs from "node:fs/promises";
636
636
  import path3 from "node:path";
637
637
  function withStoredExpiry(tokens) {
@@ -1176,8 +1176,16 @@ var CompositePersistence = class {
1176
1176
  describe() {
1177
1177
  return this.stores.map((store) => store.describe()).join(" + ");
1178
1178
  }
1179
+ async settleAll(operations) {
1180
+ const results = await Promise.allSettled(operations);
1181
+ return results.map((result) => {
1182
+ if (result.status === "rejected")
1183
+ throw result.reason;
1184
+ return result.value;
1185
+ });
1186
+ }
1179
1187
  async readSnapshot() {
1180
- const snapshots = await Promise.all(this.stores.map((store) => store.readSnapshot()));
1188
+ const snapshots = await this.settleAll(this.stores.map((store) => store.readSnapshot()));
1181
1189
  const tokens = this.firstSnapshotValue(snapshots, "tokens");
1182
1190
  const clientInfo = this.firstSnapshotValue(snapshots, "clientInfo");
1183
1191
  this.recoveryTokenSnapshots.clear();
@@ -1213,15 +1221,15 @@ var CompositePersistence = class {
1213
1221
  return result.value;
1214
1222
  }
1215
1223
  async readTokensPerStore() {
1216
- const perStore = await Promise.all(this.stores.map((store) => store.readTokens()));
1224
+ const perStore = await this.settleAll(this.stores.map((store) => store.readTokens()));
1217
1225
  return perStore.filter((tokens) => tokens !== void 0);
1218
1226
  }
1219
1227
  async saveTokens(tokens) {
1220
1228
  const stored = prepareStoredTokens(tokens);
1221
- await Promise.all(this.stores.map((store) => store.saveTokens(stored)));
1229
+ await this.settleAll(this.stores.map((store) => store.saveTokens(stored)));
1222
1230
  }
1223
1231
  async clearRejectedCredentials(expectedTokens, expectedClientInfo) {
1224
- await Promise.all(this.stores.map((store) => {
1232
+ await this.settleAll(this.stores.map((store) => {
1225
1233
  const storedTokenSnapshot = expectedTokens ? this.recoveryTokenSnapshots.get(store) : void 0;
1226
1234
  const tokenSnapshot = expectedTokens && storedTokenSnapshot && (store === this.recoveryTokenSource || sameOAuthTokenValue(storedTokenSnapshot, expectedTokens)) ? storedTokenSnapshot : void 0;
1227
1235
  const storedClientSnapshot = expectedClientInfo ? this.recoveryClientSnapshots.get(store) : void 0;
@@ -1261,7 +1269,7 @@ var CompositePersistence = class {
1261
1269
  }
1262
1270
  async saveClientInfo(info) {
1263
1271
  const stored = withOAuthClientGeneration(info);
1264
- await Promise.all(this.stores.map((store) => store.saveClientInfo(stored)));
1272
+ await this.settleAll(this.stores.map((store) => store.saveClientInfo(stored)));
1265
1273
  }
1266
1274
  async readCodeVerifier() {
1267
1275
  for (const store of this.stores) {
@@ -1273,7 +1281,7 @@ var CompositePersistence = class {
1273
1281
  return void 0;
1274
1282
  }
1275
1283
  async saveCodeVerifier(value) {
1276
- await Promise.all(this.stores.map((store) => store.saveCodeVerifier(value)));
1284
+ await this.settleAll(this.stores.map((store) => store.saveCodeVerifier(value)));
1277
1285
  }
1278
1286
  async readState() {
1279
1287
  for (const store of this.stores) {
@@ -1285,25 +1293,25 @@ var CompositePersistence = class {
1285
1293
  return void 0;
1286
1294
  }
1287
1295
  async saveState(value) {
1288
- await Promise.all(this.stores.map((store) => store.saveState(value)));
1296
+ await this.settleAll(this.stores.map((store) => store.saveState(value)));
1289
1297
  }
1290
1298
  async readDiscoveryState() {
1291
1299
  return this.readFirst((store) => store.readDiscoveryState());
1292
1300
  }
1293
1301
  async saveDiscoveryState(value) {
1294
- await Promise.all(this.stores.map((store) => store.saveDiscoveryState(value)));
1302
+ await this.settleAll(this.stores.map((store) => store.saveDiscoveryState(value)));
1295
1303
  }
1296
1304
  async readAuthorizationServerUrl() {
1297
1305
  return this.readFirst((store) => store.readAuthorizationServerUrl());
1298
1306
  }
1299
1307
  async saveAuthorizationServerUrl(value) {
1300
- await Promise.all(this.stores.map((store) => store.saveAuthorizationServerUrl(value)));
1308
+ await this.settleAll(this.stores.map((store) => store.saveAuthorizationServerUrl(value)));
1301
1309
  }
1302
1310
  async readResourceUrl() {
1303
1311
  return this.readFirst((store) => store.readResourceUrl());
1304
1312
  }
1305
1313
  async saveResourceUrl(value) {
1306
- await Promise.all(this.stores.map((store) => store.saveResourceUrl(value)));
1314
+ await this.settleAll(this.stores.map((store) => store.saveResourceUrl(value)));
1307
1315
  }
1308
1316
  async readFirst(read) {
1309
1317
  for (const store of this.stores) {
@@ -1314,7 +1322,7 @@ var CompositePersistence = class {
1314
1322
  return void 0;
1315
1323
  }
1316
1324
  async clear(scope) {
1317
- await Promise.all(this.stores.map((store) => store.clear(scope)));
1325
+ await this.settleAll(this.stores.map((store) => store.clear(scope)));
1318
1326
  }
1319
1327
  };
1320
1328
  async function createOAuthPersistenceStores(definition, logger) {
@@ -1,15 +1,18 @@
1
1
  import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
2
2
  import {
3
3
  buildRecordCommandEnv
4
- } from "./chunk-HKMH4N3Z.js";
4
+ } from "./chunk-NAGTWK62.js";
5
+ import {
6
+ CliUsageError
7
+ } from "./chunk-W3HK334E.js";
5
8
  import {
6
9
  PRIVATE_RECORDING_FILE_MODE,
7
10
  ensurePrivateRecordingDir,
8
11
  resolveRecordingConfigPath,
9
12
  resolveRecordingPath
10
- } from "./chunk-H44A4G2O.js";
13
+ } from "./chunk-CPAQ4API.js";
11
14
 
12
- // node_modules/.pnpm/mcporter@0.17.0/node_modules/mcporter/dist/cli/record-replay-command.js
15
+ // node_modules/.pnpm/mcporter@0.17.1/node_modules/mcporter/dist/cli/record-replay-command.js
13
16
  import { spawn } from "node:child_process";
14
17
  import fs from "node:fs/promises";
15
18
  async function writeRecordReplayConfig(parsed, mode) {
@@ -63,7 +66,7 @@ function buildRecordReplayInstructionEnv(mode, sessionName, server) {
63
66
  };
64
67
  }
65
68
 
66
- // node_modules/.pnpm/mcporter@0.17.0/node_modules/mcporter/dist/cli/record-command.js
69
+ // node_modules/.pnpm/mcporter@0.17.1/node_modules/mcporter/dist/cli/record-command.js
67
70
  async function handleRecordCli(args) {
68
71
  const parsed = parseRecordArgs(args);
69
72
  const recordPath = resolveRecordingPath(parsed.sessionName);
@@ -107,7 +110,7 @@ function parseSessionCommandArgs(args, commandName) {
107
110
  if (token === "--server") {
108
111
  const value = tokens[index + 1];
109
112
  if (!value) {
110
- throw new Error("Flag '--server' requires a server name.");
113
+ throw new CliUsageError("Flag '--server' requires a server name.");
111
114
  }
112
115
  server = value;
113
116
  index += 1;
@@ -116,21 +119,21 @@ function parseSessionCommandArgs(args, commandName) {
116
119
  if (token.startsWith("--server=")) {
117
120
  server = token.slice("--server=".length);
118
121
  if (!server) {
119
- throw new Error("Flag '--server' requires a server name.");
122
+ throw new CliUsageError("Flag '--server' requires a server name.");
120
123
  }
121
124
  continue;
122
125
  }
123
126
  if (token.startsWith("-")) {
124
- throw new Error(`Unknown ${commandName} flag '${token}'.`);
127
+ throw new CliUsageError(`Unknown ${commandName} flag '${token}'.`);
125
128
  }
126
129
  remaining.push(token);
127
130
  }
128
131
  const sessionName = remaining[0];
129
132
  if (!sessionName) {
130
- throw new Error(`Usage: mcporter ${commandName} <session-name> [--server <name>] [-- <command-to-run>]`);
133
+ throw new CliUsageError(`Usage: mcporter ${commandName} <session-name> [--server <name>] [-- <command-to-run>]`);
131
134
  }
132
135
  if (remaining.length > 1) {
133
- throw new Error(`Unexpected ${commandName} argument '${remaining[1]}'. Put commands after '--'.`);
136
+ throw new CliUsageError(`Unexpected ${commandName} argument '${remaining[1]}'. Put commands after '--'.`);
134
137
  }
135
138
  return { sessionName, server, command };
136
139
  }
@@ -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.17.0/node_modules/mcporter/dist/stable-json.js
3
+ // node_modules/.pnpm/mcporter@0.17.1/node_modules/mcporter/dist/stable-json.js
4
4
  function stableJsonStringify(value, space) {
5
5
  const json = JSON.stringify(sortJsonValue(value), void 0, space);
6
6
  if (json === void 0) {
@@ -1,9 +1,9 @@
1
1
  import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
2
2
  import {
3
3
  normalizeHttpUrl
4
- } from "./chunk-32UZRZIL.js";
4
+ } from "./chunk-27PQUO34.js";
5
5
 
6
- // node_modules/.pnpm/mcporter@0.17.0/node_modules/mcporter/dist/cli/server-lookup.js
6
+ // node_modules/.pnpm/mcporter@0.17.1/node_modules/mcporter/dist/cli/server-lookup.js
7
7
  function findServerByHttpUrl(definitions, urlString) {
8
8
  const normalizedTarget = normalizeHttpUrl(urlString);
9
9
  if (!normalizedTarget) {