@introspection-ai/recipes 0.27.4 → 0.29.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 (119) hide show
  1. package/dist/agents.d.ts +34 -0
  2. package/dist/agents.d.ts.map +1 -1
  3. package/dist/agents.js +87 -0
  4. package/dist/agents.js.map +1 -1
  5. package/dist/child/agent.d.ts +5 -0
  6. package/dist/child/agent.d.ts.map +1 -1
  7. package/dist/child/agent.js +19 -8
  8. package/dist/child/agent.js.map +1 -1
  9. package/dist/child/session.d.ts +31 -4
  10. package/dist/child/session.d.ts.map +1 -1
  11. package/dist/child/session.js +65 -3
  12. package/dist/child/session.js.map +1 -1
  13. package/dist/mcp-chunks/{auth-command-GQFV6QYP.js → auth-command-SDTBVC2R.js} +22 -21
  14. package/dist/mcp-chunks/call-arguments-ER7NWEPS.js +16 -0
  15. package/dist/mcp-chunks/{call-command-LMAREWKD.js → call-command-WOZT2DLX.js} +33 -32
  16. package/dist/mcp-chunks/{chunk-5B7GRMUK.js → chunk-27XDYSXJ.js} +1 -1
  17. package/dist/mcp-chunks/{chunk-FONFU4G5.js → chunk-2IO3FXZJ.js} +1 -1
  18. package/dist/mcp-chunks/{chunk-O4JIUOWF.js → chunk-35JUFDQI.js} +2 -2
  19. package/dist/mcp-chunks/{chunk-UYJZJXC2.js → chunk-43QNQO5C.js} +3 -3
  20. package/dist/mcp-chunks/{chunk-LIEFPSSB.js → chunk-4IXQQER3.js} +5 -5
  21. package/dist/mcp-chunks/{chunk-O2VOMKAS.js → chunk-6XBQDCGX.js} +10 -10
  22. package/dist/mcp-chunks/{chunk-S2YF442K.js → chunk-7CI6DKEP.js} +2 -2
  23. package/dist/mcp-chunks/{chunk-H7ARMBV7.js → chunk-7OQUF6V6.js} +26 -10
  24. package/dist/mcp-chunks/{chunk-S6GJ42I2.js → chunk-7X3JHUMH.js} +1 -1
  25. package/dist/mcp-chunks/{chunk-D6B2M5V7.js → chunk-7ZZZ7MR2.js} +1 -1
  26. package/dist/mcp-chunks/{chunk-WHJUDBPR.js → chunk-AHDUZPNI.js} +2 -1
  27. package/dist/mcp-chunks/{chunk-QALB3DRW.js → chunk-ALLS7CUV.js} +1 -1
  28. package/dist/mcp-chunks/{chunk-6RG6AD5X.js → chunk-ASFI5AJK.js} +17 -11
  29. package/dist/mcp-chunks/{chunk-LQIE4PKL.js → chunk-CMDB57MS.js} +2 -2
  30. package/dist/mcp-chunks/{chunk-HZ2SX5U6.js → chunk-CO4CYU5W.js} +11 -11
  31. package/dist/mcp-chunks/{chunk-TUQGOYK6.js → chunk-CRX2G22W.js} +1 -1
  32. package/dist/mcp-chunks/{chunk-UKM35J67.js → chunk-DUJ5WAHC.js} +2 -2
  33. package/dist/mcp-chunks/{chunk-RIHPVCGI.js → chunk-EIF7GALA.js} +1 -1
  34. package/dist/mcp-chunks/{chunk-QJNF3A3F.js → chunk-EIXFNLU6.js} +1 -1
  35. package/dist/mcp-chunks/{chunk-77BZYP72.js → chunk-FMYP6JXX.js} +1 -1
  36. package/dist/mcp-chunks/{chunk-LXHPDKEF.js → chunk-FQAJT6U2.js} +1 -1
  37. package/dist/mcp-chunks/{chunk-7WL4TMON.js → chunk-FUKRLUU7.js} +4 -4
  38. package/dist/mcp-chunks/{chunk-L6OOGZVA.js → chunk-FVZKQMZS.js} +21 -7
  39. package/dist/mcp-chunks/{chunk-RZIJUJGL.js → chunk-FWWPRZ37.js} +31 -40
  40. package/dist/mcp-chunks/{chunk-KQCLM7R7.js → chunk-GJ7DWMRT.js} +1 -1
  41. package/dist/mcp-chunks/{chunk-LCBDVFVA.js → chunk-HM26TIPK.js} +1 -1
  42. package/dist/mcp-chunks/{chunk-JVYCENPP.js → chunk-IJTZ2ZRM.js} +4 -4
  43. package/dist/mcp-chunks/{chunk-S5F3HEZZ.js → chunk-IR5SMKTP.js} +425 -445
  44. package/dist/mcp-chunks/{chunk-7PFJCLXL.js → chunk-IWXEOLJL.js} +20 -16
  45. package/dist/mcp-chunks/{chunk-D6SVCPN6.js → chunk-JQCSGX6E.js} +1 -1
  46. package/dist/mcp-chunks/{chunk-P463YBJM.js → chunk-JRU5LZJQ.js} +1 -1
  47. package/dist/mcp-chunks/{chunk-XNHGMWN2.js → chunk-M7VINGHY.js} +9 -7
  48. package/dist/mcp-chunks/{chunk-IF6LRV3J.js → chunk-OURSGEZX.js} +8 -8
  49. package/dist/mcp-chunks/{chunk-H4KL74PV.js → chunk-P3S4OJPI.js} +9 -9
  50. package/dist/mcp-chunks/{chunk-P3UVILEW.js → chunk-POYT6GCW.js} +29 -5
  51. package/dist/mcp-chunks/{chunk-5BMCVE2J.js → chunk-R636HUNL.js} +17 -13
  52. package/dist/mcp-chunks/{chunk-TYYSBILI.js → chunk-SONMFI3S.js} +70 -28
  53. package/dist/mcp-chunks/{chunk-I6UMKX5E.js → chunk-SVCKS5MW.js} +4 -4
  54. package/dist/mcp-chunks/{chunk-NQW3ES2G.js → chunk-TDBM2UIR.js} +1 -1
  55. package/dist/mcp-chunks/{chunk-VJIAHZZG.js → chunk-TKZA4MPW.js} +4 -4
  56. package/dist/mcp-chunks/{chunk-2P2HVZ3G.js → chunk-UHXTAPEC.js} +1 -1
  57. package/dist/mcp-chunks/{chunk-CLR6DJV3.js → chunk-UXI26V4F.js} +1 -1
  58. package/dist/mcp-chunks/{chunk-UIPG6W7N.js → chunk-UYG7PAN2.js} +2 -2
  59. package/dist/mcp-chunks/{chunk-2HOMVWSA.js → chunk-VCPUZFU7.js} +2 -2
  60. package/dist/mcp-chunks/{chunk-FBVRU4Y3.js → chunk-VRTH73R5.js} +40 -33
  61. package/dist/mcp-chunks/{chunk-KOWNVUL2.js → chunk-VWNF5PIF.js} +2 -2
  62. package/dist/mcp-chunks/{chunk-MJFZM5EV.js → chunk-WQBESOWG.js} +22 -5
  63. package/dist/mcp-chunks/chunk-XDARNDP3.js +25 -0
  64. package/dist/mcp-chunks/{chunk-OSYB5GNF.js → chunk-XUJQ6U6M.js} +3 -3
  65. package/dist/mcp-chunks/{chunk-PJCMJ65D.js → chunk-YGRORKGT.js} +226 -101
  66. package/dist/mcp-chunks/{chunk-C2VLY7ED.js → chunk-YM7ZVYI2.js} +4 -4
  67. package/dist/mcp-chunks/{chunk-6QZQZXDJ.js → chunk-YTO7DITJ.js} +3 -3
  68. package/dist/mcp-chunks/{chunk-UHO6KIUJ.js → chunk-ZLV5S5UP.js} +2 -2
  69. package/dist/mcp-chunks/{cli-JI7MEAAX.js → cli-67GWFF4R.js} +69 -68
  70. package/dist/mcp-chunks/client-MQMNAYYW.js +31 -0
  71. package/dist/mcp-chunks/{config-command-GRZLKD3R.js → config-command-3IKIRWMW.js} +41 -27
  72. package/dist/mcp-chunks/daemon-command-OMOZ5MP7.js +31 -0
  73. package/dist/mcp-chunks/{dist-USMCQ22V.js → dist-YL3LFKVP.js} +219 -202
  74. package/dist/mcp-chunks/{emit-ts-command-7VLESP7H.js → emit-ts-command-YWKROLL2.js} +84 -70
  75. package/dist/mcp-chunks/{generate-cli-runner-SSW2B72K.js → generate-cli-runner-CZEVY2Y7.js} +51 -48
  76. package/dist/mcp-chunks/generated-daemon-runtime-SRFULTIT.js +31 -0
  77. package/dist/mcp-chunks/{inspect-cli-command-NCGCMOIS.js → inspect-cli-command-5Y2LORK5.js} +9 -9
  78. package/dist/mcp-chunks/{launch-NBONSPNK.js → launch-43TA3HYF.js} +1 -1
  79. package/dist/mcp-chunks/{lifecycle-CXAKUCN4.js → lifecycle-BY2ILXTB.js} +1 -1
  80. package/dist/mcp-chunks/{list-command-5T4UF4PF.js → list-command-7RU7NNAV.js} +56 -43
  81. package/dist/mcp-chunks/{output-utils-YFTWQZ5V.js → output-utils-2R3SA6KR.js} +3 -3
  82. package/dist/mcp-chunks/{prompt-CH6TK0bC-6DI4RA4E.js → prompt-CH6TK0bC-GKQOEUY4.js} +1 -1
  83. package/dist/mcp-chunks/{record-command-TE5O7WBL.js → record-command-ROIRRNFS.js} +5 -5
  84. package/dist/mcp-chunks/{replay-command-QCUL5ASR.js → replay-command-Y2MYVQTL.js} +6 -6
  85. package/dist/mcp-chunks/{resource-command-XMGF7EAK.js → resource-command-VUV7AYYQ.js} +9 -9
  86. package/dist/mcp-chunks/{result-utils-HKB42M7Y.js → result-utils-5U7NVXDZ.js} +3 -3
  87. package/dist/mcp-chunks/runtime-Q4SCCOQE.js +38 -0
  88. package/dist/mcp-chunks/{runtime-wrapper-MI3HF45J.js → runtime-wrapper-3BVFTSWJ.js} +3 -3
  89. package/dist/mcp-chunks/{serve-command-5HV3ZE25.js → serve-command-BXLQWHFW.js} +8969 -1147
  90. package/dist/mcp-chunks/{timeouts-YBFBTLV2.js → timeouts-6GL2F44N.js} +3 -3
  91. package/dist/mcp-chunks/{vault-command-FC2PD5U6.js → vault-command-JCMW3DQA.js} +4 -4
  92. package/dist/mcp-chunks/{webapi-IFUPO72B.js → webapi-UMWFGMQV.js} +46 -46
  93. package/dist/mcp-daemon.js +27 -26
  94. package/dist/mcp-run-worker.js +27 -26
  95. package/dist/pi-extension.d.ts.map +1 -1
  96. package/dist/pi-extension.js +22 -19
  97. package/dist/pi-extension.js.map +1 -1
  98. package/dist/recipe/model.d.ts.map +1 -1
  99. package/dist/recipe/model.js +25 -1
  100. package/dist/recipe/model.js.map +1 -1
  101. package/dist/run-controller.d.ts +10 -3
  102. package/dist/run-controller.d.ts.map +1 -1
  103. package/dist/run-controller.js +23 -11
  104. package/dist/run-controller.js.map +1 -1
  105. package/dist/session.d.ts +13 -0
  106. package/dist/session.d.ts.map +1 -1
  107. package/dist/session.js +15 -9
  108. package/dist/session.js.map +1 -1
  109. package/docs/agent-composition.md +27 -6
  110. package/docs/host-api.md +32 -4
  111. package/docs/mcp-configuration.md +12 -3
  112. package/docs/pi-extension.md +7 -4
  113. package/docs/recipe-format.md +14 -5
  114. package/package.json +11 -11
  115. package/dist/mcp-chunks/call-arguments-VT7JLNJY.js +0 -16
  116. package/dist/mcp-chunks/client-QU7ABSNB.js +0 -30
  117. package/dist/mcp-chunks/daemon-command-3266CYHO.js +0 -30
  118. package/dist/mcp-chunks/generated-daemon-runtime-7CFVWLC7.js +0 -30
  119. package/dist/mcp-chunks/runtime-3X2XVS6X.js +0 -37
@@ -1,7 +1,7 @@
1
1
  import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
2
2
  import {
3
3
  dumpActiveHandles
4
- } from "./chunk-2HOMVWSA.js";
4
+ } from "./chunk-VCPUZFU7.js";
5
5
  import {
6
6
  CALL_HELP_ARGUMENT_LINES,
7
7
  CALL_HELP_EXAMPLE_LINES,
@@ -9,68 +9,69 @@ import {
9
9
  buildUnknownCallFlagMessage,
10
10
  buildUnvalidatedCallFlagMessage,
11
11
  parseCallArguments
12
- } from "./chunk-HZ2SX5U6.js";
12
+ } from "./chunk-CO4CYU5W.js";
13
13
  import {
14
14
  CliUsageError
15
- } from "./chunk-QALB3DRW.js";
15
+ } from "./chunk-ALLS7CUV.js";
16
16
  import {
17
17
  printCallOutput,
18
18
  tailLogIfRequested
19
- } from "./chunk-P3UVILEW.js";
20
- import "./chunk-LQIE4PKL.js";
19
+ } from "./chunk-POYT6GCW.js";
20
+ import "./chunk-CMDB57MS.js";
21
21
  import {
22
22
  loadToolMetadata
23
- } from "./chunk-UIPG6W7N.js";
23
+ } from "./chunk-UYG7PAN2.js";
24
24
  import {
25
25
  chooseClosestIdentifier,
26
26
  normalizeIdentifier,
27
27
  renderIdentifierResolutionMessages
28
- } from "./chunk-RIHPVCGI.js";
29
- import "./chunk-NQW3ES2G.js";
28
+ } from "./chunk-EIF7GALA.js";
29
+ import "./chunk-TDBM2UIR.js";
30
30
  import {
31
31
  dimText,
32
32
  redText,
33
33
  yellowText
34
- } from "./chunk-TUQGOYK6.js";
34
+ } from "./chunk-CRX2G22W.js";
35
35
  import {
36
36
  resolveServerCallTimeout,
37
37
  withTimeout
38
- } from "./chunk-KOWNVUL2.js";
38
+ } from "./chunk-VWNF5PIF.js";
39
39
  import {
40
40
  persistPreparedEphemeralServer,
41
41
  prepareEphemeralServerTarget,
42
42
  renderAdhocServerHelpLines
43
- } from "./chunk-LIEFPSSB.js";
44
- import "./chunk-UKM35J67.js";
45
- import "./chunk-6RG6AD5X.js";
43
+ } from "./chunk-4IXQQER3.js";
44
+ import "./chunk-DUJ5WAHC.js";
45
+ import "./chunk-ASFI5AJK.js";
46
46
  import {
47
47
  buildConnectionIssueEnvelope
48
- } from "./chunk-77BZYP72.js";
49
- import "./chunk-LCBDVFVA.js";
48
+ } from "./chunk-FMYP6JXX.js";
49
+ import "./chunk-HM26TIPK.js";
50
50
  import {
51
51
  looksLikeHttpUrl,
52
52
  normalizeHttpUrlCandidate
53
- } from "./chunk-2P2HVZ3G.js";
54
- import "./chunk-5B7GRMUK.js";
53
+ } from "./chunk-UHXTAPEC.js";
54
+ import "./chunk-27XDYSXJ.js";
55
55
  import {
56
56
  wrapCallResult
57
- } from "./chunk-S2YF442K.js";
58
- import "./chunk-P463YBJM.js";
59
- import "./chunk-H4KL74PV.js";
60
- import "./chunk-RZIJUJGL.js";
61
- import "./chunk-H7ARMBV7.js";
62
- import "./chunk-UYJZJXC2.js";
63
- import "./chunk-UHO6KIUJ.js";
57
+ } from "./chunk-7CI6DKEP.js";
58
+ import "./chunk-JRU5LZJQ.js";
59
+ import "./chunk-P3S4OJPI.js";
60
+ import "./chunk-FWWPRZ37.js";
61
+ import "./chunk-XDARNDP3.js";
62
+ import "./chunk-7OQUF6V6.js";
63
+ import "./chunk-43QNQO5C.js";
64
+ import "./chunk-ZLV5S5UP.js";
64
65
  import "./chunk-T4MQCFIK.js";
65
- import "./chunk-D6SVCPN6.js";
66
- import "./chunk-QJNF3A3F.js";
66
+ import "./chunk-JQCSGX6E.js";
67
+ import "./chunk-EIXFNLU6.js";
67
68
  import {
68
69
  analyzeConnectionError
69
- } from "./chunk-O4JIUOWF.js";
70
- import "./chunk-S5F3HEZZ.js";
70
+ } from "./chunk-35JUFDQI.js";
71
+ import "./chunk-IR5SMKTP.js";
71
72
  import "./chunk-LRKZP7DJ.js";
72
73
 
73
- // node_modules/.pnpm/mcporter@0.13.13/node_modules/mcporter/dist/cli/image-output.js
74
+ // node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/dist/cli/image-output.js
74
75
  import fs from "node:fs";
75
76
  import path from "node:path";
76
77
  function saveCallImagesIfRequested(wrapped, outputDir) {
@@ -128,7 +129,7 @@ function resolveImageOutputPath(outputDir, baseName, extension) {
128
129
  }
129
130
  }
130
131
 
131
- // node_modules/.pnpm/mcporter@0.13.13/node_modules/mcporter/dist/cli/call-command.js
132
+ // node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/dist/cli/call-command.js
132
133
  async function handleCall(runtime, args) {
133
134
  let prepared;
134
135
  try {
@@ -300,7 +301,7 @@ async function maybeDescribeServer(runtime, server, tool, outputFormat, disableO
300
301
  if (outputFormat === "json") {
301
302
  listArgs2.push("--json");
302
303
  }
303
- const { handleList: handleList2 } = await import("./list-command-5T4UF4PF.js");
304
+ const { handleList: handleList2 } = await import("./list-command-7RU7NNAV.js");
304
305
  await handleList2(runtime, listArgs2);
305
306
  return true;
306
307
  }
@@ -323,7 +324,7 @@ async function maybeDescribeServer(runtime, server, tool, outputFormat, disableO
323
324
  if (outputFormat === "json") {
324
325
  listArgs.push("--json");
325
326
  }
326
- const { handleList } = await import("./list-command-5T4UF4PF.js");
327
+ const { handleList } = await import("./list-command-7RU7NNAV.js");
327
328
  await handleList(runtime, listArgs);
328
329
  return true;
329
330
  }
@@ -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.13/node_modules/mcporter/dist/cli/output-format.js
3
+ // node_modules/.pnpm/mcporter@0.14.2/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,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.13/node_modules/mcporter/dist/sdk-stdio-logging.js
3
+ // node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/dist/sdk-stdio-logging.js
4
4
  var STDIO_LOGS_FORCED = process.env.MCPORTER_STDIO_LOGS === "1";
5
5
  var STDIO_TRACE_ENABLED = process.env.MCPORTER_STDIO_TRACE === "1";
6
6
  var stdioLogMode = STDIO_LOGS_FORCED ? "always" : "auto";
@@ -3,9 +3,9 @@ import {
3
3
  SdkHttpError,
4
4
  SseError,
5
5
  UnauthorizedError
6
- } from "./chunk-S5F3HEZZ.js";
6
+ } from "./chunk-IR5SMKTP.js";
7
7
 
8
- // node_modules/.pnpm/mcporter@0.13.13/node_modules/mcporter/dist/error-classifier.js
8
+ // node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/dist/error-classifier.js
9
9
  var AUTH_STATUSES = /* @__PURE__ */ new Set([401, 403]);
10
10
  var KEYWORD_AUTH_PATTERNS = [/unauthorized/, /invalid_token/, /forbidden/];
11
11
  var NUMERIC_AUTH_PATTERNS = [/(?<![0-9a-z_])401(?![0-9a-z_])/i];
@@ -1,12 +1,12 @@
1
1
  import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
2
2
  import {
3
3
  mcporterConfigCandidates
4
- } from "./chunk-UHO6KIUJ.js";
4
+ } from "./chunk-ZLV5S5UP.js";
5
5
  import {
6
6
  expandHome
7
- } from "./chunk-D6SVCPN6.js";
7
+ } from "./chunk-JQCSGX6E.js";
8
8
 
9
- // node_modules/.pnpm/mcporter@0.13.13/node_modules/mcporter/dist/config/path-discovery.js
9
+ // node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/dist/config/path-discovery.js
10
10
  import fsSync from "node:fs";
11
11
  import fs from "node:fs/promises";
12
12
  import path from "node:path";
@@ -1,18 +1,18 @@
1
1
  import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
2
2
  import {
3
3
  findServerByHttpUrl
4
- } from "./chunk-UKM35J67.js";
4
+ } from "./chunk-DUJ5WAHC.js";
5
5
  import {
6
6
  persistEphemeralServer,
7
7
  resolveEphemeralServer,
8
8
  splitCommandLine
9
- } from "./chunk-6RG6AD5X.js";
9
+ } from "./chunk-ASFI5AJK.js";
10
10
  import {
11
11
  looksLikeHttpUrl,
12
12
  normalizeHttpUrlCandidate
13
- } from "./chunk-2P2HVZ3G.js";
13
+ } from "./chunk-UHXTAPEC.js";
14
14
 
15
- // node_modules/.pnpm/mcporter@0.13.13/node_modules/mcporter/dist/cli/adhoc-help.js
15
+ // node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/dist/cli/adhoc-help.js
16
16
  var ADHOC_SERVER_HELP_ENTRIES = [
17
17
  { flag: "--http-url <url>", description: "Register an HTTP server for this run." },
18
18
  { flag: "--allow-http", description: "Permit plain http:// URLs with --http-url." },
@@ -36,7 +36,7 @@ function renderAdhocServerHelpLines(width = 23) {
36
36
  return ADHOC_SERVER_HELP_ENTRIES.map((entry) => ` ${entry.flag.padEnd(width)}${entry.description}`);
37
37
  }
38
38
 
39
- // node_modules/.pnpm/mcporter@0.13.13/node_modules/mcporter/dist/cli/ephemeral-target.js
39
+ // node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/dist/cli/ephemeral-target.js
40
40
  async function prepareEphemeralServerTarget(options) {
41
41
  let target = options.target;
42
42
  let spec = options.ephemeral ? { ...options.ephemeral } : void 0;
@@ -1,22 +1,22 @@
1
1
  import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
2
2
  import {
3
3
  buildToolDoc
4
- } from "./chunk-MJFZM5EV.js";
4
+ } from "./chunk-WQBESOWG.js";
5
5
  import {
6
6
  buildEmbeddedSchemaMap,
7
7
  toCliOptionKey
8
- } from "./chunk-NQW3ES2G.js";
8
+ } from "./chunk-TDBM2UIR.js";
9
9
  import {
10
10
  parsePositiveInteger
11
- } from "./chunk-KOWNVUL2.js";
11
+ } from "./chunk-VWNF5PIF.js";
12
12
  import {
13
13
  stableJsonStringify
14
- } from "./chunk-KQCLM7R7.js";
14
+ } from "./chunk-GJ7DWMRT.js";
15
15
  import {
16
16
  MCPORTER_VERSION
17
- } from "./chunk-7PFJCLXL.js";
17
+ } from "./chunk-IWXEOLJL.js";
18
18
 
19
- // node_modules/.pnpm/mcporter@0.13.13/node_modules/mcporter/dist/cli/generate/flag-parser.js
19
+ // node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/dist/cli/generate/flag-parser.js
20
20
  function extractGeneratorFlags(args, options = {}) {
21
21
  const result = {};
22
22
  let index = 0;
@@ -58,12 +58,12 @@ function extractGeneratorFlags(args, options = {}) {
58
58
  return result;
59
59
  }
60
60
 
61
- // node_modules/.pnpm/mcporter@0.13.13/node_modules/mcporter/dist/cli/generate/template.js
61
+ // node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/dist/cli/generate/template.js
62
62
  import { realpathSync } from "node:fs";
63
63
  import fs2 from "node:fs/promises";
64
64
  import path from "node:path";
65
65
 
66
- // node_modules/.pnpm/mcporter@0.13.13/node_modules/mcporter/dist/cli/generate/fs-helpers.js
66
+ // node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/dist/cli/generate/fs-helpers.js
67
67
  import fs from "node:fs/promises";
68
68
  async function markExecutable(filePath) {
69
69
  try {
@@ -94,7 +94,7 @@ function shouldIgnorePosixPermissionError(error) {
94
94
  return code === "EPERM" || code === "EINVAL" || code === "ENOSYS" || code === "EACCES";
95
95
  }
96
96
 
97
- // node_modules/.pnpm/mcporter@0.13.13/node_modules/mcporter/dist/cli/generate/template-help.js
97
+ // node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/dist/cli/generate/template-help.js
98
98
  function renderEmbeddedHelpSource() {
99
99
  return `function configureGeneratedCommandHelp(command: Command): void {
100
100
  command.configureHelp({
@@ -208,7 +208,7 @@ function quickStartExamples(): Array<[string, string]> {
208
208
  `;
209
209
  }
210
210
 
211
- // node_modules/.pnpm/mcporter@0.13.13/node_modules/mcporter/dist/cli/generate/template.js
211
+ // node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/dist/cli/generate/template.js
212
212
  async function writeTemplate(input) {
213
213
  const resolvedOutput = input.outputPath ? path.resolve(input.outputPath) : path.resolve(process.cwd(), `${input.serverName}.ts`);
214
214
  const runtimeScriptPath = input.runtimeScriptPath ? path.resolve(input.runtimeScriptPath) : resolvedOutput;
@@ -1,9 +1,9 @@
1
1
  import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
2
2
  import {
3
3
  analyzeConnectionError
4
- } from "./chunk-O4JIUOWF.js";
4
+ } from "./chunk-35JUFDQI.js";
5
5
 
6
- // node_modules/.pnpm/mcporter@0.13.13/node_modules/mcporter/dist/result-utils.js
6
+ // node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/dist/result-utils.js
7
7
  function extractEnvelope(raw) {
8
8
  return collectEnvelopeFields(raw, { content: null, structuredContent: null }, 0);
9
9
  }
@@ -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.13/node_modules/mcporter/dist/process-utils.js
3
+ // node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/dist/process-utils.js
4
4
  function isProcessRunning(pid) {
5
5
  if (!Number.isInteger(pid) || pid <= 0) {
6
6
  return false;
@@ -13,7 +13,7 @@ function isProcessRunning(pid) {
13
13
  }
14
14
  }
15
15
 
16
- // node_modules/.pnpm/mcporter@0.13.13/node_modules/mcporter/dist/fs-json.js
16
+ // node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/dist/fs-json.js
17
17
  import crypto from "node:crypto";
18
18
  import { constants } from "node:fs";
19
19
  import fs from "node:fs/promises";
@@ -21,6 +21,7 @@ import path from "node:path";
21
21
  import { setTimeout as sleep } from "node:timers/promises";
22
22
  var DEFAULT_LOCK_TIMEOUT_MS = 3e4;
23
23
  var LOCK_POLL_MS = 25;
24
+ var WINDOWS_LOCK_RELEASE_RETRIES = 20;
24
25
  var MALFORMED_LOCK_STALE_MS = 1e3;
25
26
  var MAX_SYMLINK_DEPTH = 40;
26
27
  var DEFAULT_ATOMIC_FILE_MODE = 384;
@@ -85,12 +86,14 @@ async function withFileLock(filePath, task, options = {}) {
85
86
  await fs.mkdir(path.dirname(lockTargetPath), { recursive: true });
86
87
  let lockPath = `${lockTargetPath}.lock`;
87
88
  const fallbackLockPath = lockTargetPath !== filePath ? `${filePath}.lock` : void 0;
89
+ const lockContents = `${process.pid}
90
+ ${(/* @__PURE__ */ new Date()).toISOString()}
91
+ ${crypto.randomUUID()}
92
+ `;
88
93
  let acquired = false;
89
94
  while (!acquired) {
90
95
  try {
91
- await fs.writeFile(lockPath, `${process.pid}
92
- ${(/* @__PURE__ */ new Date()).toISOString()}
93
- `, {
96
+ await fs.writeFile(lockPath, lockContents, {
94
97
  encoding: "utf8",
95
98
  flag: "wx"
96
99
  });
@@ -117,14 +120,27 @@ ${(/* @__PURE__ */ new Date()).toISOString()}
117
120
  try {
118
121
  return await task();
119
122
  } finally {
120
- await fs.unlink(lockPath).catch((error) => {
121
- if (error.code !== "ENOENT") {
122
- throw error;
123
- }
124
- });
123
+ await releaseFileLock(lockPath, lockContents);
125
124
  }
126
125
  });
127
126
  }
127
+ async function releaseFileLock(lockPath, expectedContents) {
128
+ for (let attempt = 0; ; attempt++) {
129
+ try {
130
+ if (attempt > 0 && await fs.readFile(lockPath, "utf8") !== expectedContents)
131
+ return;
132
+ await fs.unlink(lockPath);
133
+ return;
134
+ } catch (error) {
135
+ const code = error.code;
136
+ if (code === "ENOENT")
137
+ return;
138
+ if (process.platform !== "win32" || code !== "EPERM" && code !== "EBUSY" || attempt >= WINDOWS_LOCK_RELEASE_RETRIES)
139
+ throw error;
140
+ await sleep(LOCK_POLL_MS);
141
+ }
142
+ }
143
+ }
128
144
  function isPermissionError(error) {
129
145
  const code = error.code;
130
146
  return code === "EACCES" || code === "EPERM";
@@ -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.13/node_modules/mcporter/dist/cli/flag-utils.js
3
+ // node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/dist/cli/flag-utils.js
4
4
  function extractFlags(args, keys) {
5
5
  const flags = {};
6
6
  let index = 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.13.13/node_modules/mcporter/dist/runtime/elicitation.js
3
+ // node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/dist/runtime/elicitation.js
4
4
  import readline from "node:readline";
5
5
  var NON_INTERACTIVE_ELICITATION_HINT = "Server requested interactive input; run mcporter in a terminal.";
6
6
  function createInteractiveElicitationResponder(options = {}) {
@@ -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.13/node_modules/mcporter/dist/definition-fields.js
3
+ // node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/dist/definition-fields.js
4
4
  var SHARED_DEFINITION_FIELDS = [
5
5
  "auth",
6
6
  "tokenCacheDir",
@@ -13,6 +13,7 @@ var SHARED_DEFINITION_FIELDS = [
13
13
  "oauthRedirectUrl",
14
14
  "oauthClientMetadataUrl",
15
15
  "oauthScope",
16
+ "oauthRequestedScope",
16
17
  "refresh",
17
18
  "httpFetch",
18
19
  "allowedTools",
@@ -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.13/node_modules/mcporter/dist/cli/errors.js
3
+ // node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/dist/cli/errors.js
4
4
  var CliUsageError = class extends Error {
5
5
  constructor(message) {
6
6
  super(message);
@@ -1,20 +1,23 @@
1
1
  import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
2
2
  import {
3
3
  __configInternals
4
- } from "./chunk-RZIJUJGL.js";
4
+ } from "./chunk-FWWPRZ37.js";
5
+ import {
6
+ isRecord
7
+ } from "./chunk-XDARNDP3.js";
5
8
  import {
6
9
  withFileLock,
7
10
  writeTextFileAtomic
8
- } from "./chunk-H7ARMBV7.js";
11
+ } from "./chunk-7OQUF6V6.js";
9
12
  import {
10
13
  expandHome
11
- } from "./chunk-D6SVCPN6.js";
14
+ } from "./chunk-JQCSGX6E.js";
12
15
  import {
13
16
  canonicalKeepAliveName,
14
17
  resolveLifecycle
15
- } from "./chunk-QJNF3A3F.js";
18
+ } from "./chunk-EIXFNLU6.js";
16
19
 
17
- // node_modules/.pnpm/mcporter@0.13.13/node_modules/mcporter/dist/cli/ascii-slug.js
20
+ // node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/dist/cli/ascii-slug.js
18
21
  function toAsciiSlug(value) {
19
22
  let slug = "";
20
23
  let pendingSeparator = false;
@@ -35,7 +38,7 @@ function toAsciiSlug(value) {
35
38
  return slug;
36
39
  }
37
40
 
38
- // node_modules/.pnpm/mcporter@0.13.13/node_modules/mcporter/dist/cli/adhoc-server.js
41
+ // node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/dist/cli/adhoc-server.js
39
42
  import fs from "node:fs/promises";
40
43
  import path from "node:path";
41
44
  var TEMP_SOURCE = { kind: "local", path: "<adhoc>" };
@@ -122,17 +125,20 @@ async function persistEphemeralServer(resolution, rawPath) {
122
125
  let existing;
123
126
  try {
124
127
  const buffer = await fs.readFile(resolvedPath, "utf8");
125
- existing = JSON.parse(buffer);
128
+ const parsed = JSON.parse(buffer);
129
+ if (!isRecord(parsed))
130
+ throw new Error("Persistence destination must be a JSON object.");
131
+ existing = parsed;
126
132
  } catch (error) {
127
133
  if (error.code !== "ENOENT") {
128
134
  throw error;
129
135
  }
130
136
  existing = { mcpServers: {} };
131
137
  }
132
- if (typeof existing.mcpServers !== "object" || existing.mcpServers === null) {
133
- existing.mcpServers = {};
134
- }
135
- const servers = existing.mcpServers;
138
+ const servers = existing.mcpServers === void 0 ? {} : existing.mcpServers;
139
+ if (!isRecord(servers))
140
+ throw new Error("Persistence destination mcpServers must be a JSON object.");
141
+ existing.mcpServers = servers;
136
142
  servers[resolution.name] = resolution.persistedEntry;
137
143
  const serialized = `${JSON.stringify(existing, null, 2)}
138
144
  `;
@@ -2,9 +2,9 @@ import { createRequire as __createRequire } from "node:module"; const require =
2
2
  import {
3
3
  createPrefixedConsoleLogger,
4
4
  resolveLogLevelFromEnv
5
- } from "./chunk-P463YBJM.js";
5
+ } from "./chunk-JRU5LZJQ.js";
6
6
 
7
- // node_modules/.pnpm/mcporter@0.13.13/node_modules/mcporter/dist/cli/logger-context.js
7
+ // node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/dist/cli/logger-context.js
8
8
  var activeLogLevel = resolveLogLevelFromEnv();
9
9
  var activeLogger = createPrefixedConsoleLogger("mcporter", activeLogLevel);
10
10
  function getActiveLogLevel() {
@@ -1,21 +1,21 @@
1
1
  import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
2
2
  import {
3
3
  CliUsageError
4
- } from "./chunk-QALB3DRW.js";
4
+ } from "./chunk-ALLS7CUV.js";
5
5
  import {
6
6
  consumeTimeoutFlag
7
- } from "./chunk-KOWNVUL2.js";
7
+ } from "./chunk-VWNF5PIF.js";
8
8
  import {
9
9
  extractEphemeralServerFlags
10
- } from "./chunk-LCBDVFVA.js";
10
+ } from "./chunk-HM26TIPK.js";
11
11
  import {
12
12
  splitHttpToolSelector
13
- } from "./chunk-2P2HVZ3G.js";
13
+ } from "./chunk-UHXTAPEC.js";
14
14
  import {
15
15
  consumeOutputFormat
16
- } from "./chunk-5B7GRMUK.js";
16
+ } from "./chunk-27XDYSXJ.js";
17
17
 
18
- // node_modules/.pnpm/mcporter@0.13.13/node_modules/mcporter/dist/cli/call-arguments.js
18
+ // node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/dist/cli/call-arguments.js
19
19
  import fs from "node:fs";
20
20
 
21
21
  // node_modules/.pnpm/acorn@8.18.0/node_modules/acorn/dist/acorn.mjs
@@ -5715,7 +5715,7 @@ function parseExpressionAt2(input, pos, options) {
5715
5715
  return Parser.parseExpressionAt(input, pos, options);
5716
5716
  }
5717
5717
 
5718
- // node_modules/.pnpm/mcporter@0.13.13/node_modules/mcporter/dist/cli/call-expression-parser.js
5718
+ // node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/dist/cli/call-expression-parser.js
5719
5719
  var ACORN_OPTIONS = {
5720
5720
  ecmaVersion: "latest",
5721
5721
  sourceType: "module"
@@ -5885,7 +5885,7 @@ function isSupportedValue(node) {
5885
5885
  return type === "Literal" || type === "ArrayExpression" || type === "ObjectExpression" || type === "UnaryExpression";
5886
5886
  }
5887
5887
 
5888
- // node_modules/.pnpm/mcporter@0.13.13/node_modules/mcporter/dist/cli/call-argument-expression.js
5888
+ // node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/dist/cli/call-argument-expression.js
5889
5889
  function parseLeadingCallExpression(rawToken) {
5890
5890
  try {
5891
5891
  return extractHttpCallExpression(rawToken) ?? parseCallExpressionFragment(rawToken);
@@ -5935,7 +5935,7 @@ function buildCallExpressionUsageError(error) {
5935
5935
  return new CliUsageError(lines.join("\n"));
5936
5936
  }
5937
5937
 
5938
- // node_modules/.pnpm/mcporter@0.13.13/node_modules/mcporter/dist/cli/call-argument-values.js
5938
+ // node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/dist/cli/call-argument-values.js
5939
5939
  function parseKeyValueToken(token, nextToken) {
5940
5940
  const eqIndex = token.indexOf("=");
5941
5941
  if (eqIndex !== -1) {
@@ -6019,7 +6019,7 @@ function warnMissingNamedArgumentValue(key) {
6019
6019
  console.warn(lines.join(" "));
6020
6020
  }
6021
6021
 
6022
- // node_modules/.pnpm/mcporter@0.13.13/node_modules/mcporter/dist/cli/call-help.js
6022
+ // node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/dist/cli/call-help.js
6023
6023
  var CALL_HELP_ARGUMENT_LINES = [
6024
6024
  " key=value / key:value Flag-style named arguments.",
6025
6025
  " key=@path Read a UTF-8 string value from a file; use @@ for a literal @.",
@@ -6062,7 +6062,7 @@ function buildUnvalidatedCallFlagMessage(token, server, tool) {
6062
6062
  ].join("\n");
6063
6063
  }
6064
6064
 
6065
- // node_modules/.pnpm/mcporter@0.13.13/node_modules/mcporter/dist/cli/call-arguments.js
6065
+ // node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/dist/cli/call-arguments.js
6066
6066
  var FLAG_HANDLERS = /* @__PURE__ */ new Map([
6067
6067
  ["--server", handleServerFlag],
6068
6068
  ["--mcp", handleServerFlag],
@@ -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.13/node_modules/mcporter/dist/cli/terminal.js
3
+ // node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/dist/cli/terminal.js
4
4
  var forceColorRaw = process.env.FORCE_COLOR?.toLowerCase();
5
5
  var forceDisableColor = forceColorRaw === "0" || forceColorRaw === "false";
6
6
  var forceEnableColor = forceColorRaw === "1" || forceColorRaw === "true" || forceColorRaw === "2" || forceColorRaw === "3";
@@ -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-2P2HVZ3G.js";
4
+ } from "./chunk-UHXTAPEC.js";
5
5
 
6
- // node_modules/.pnpm/mcporter@0.13.13/node_modules/mcporter/dist/cli/server-lookup.js
6
+ // node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/dist/cli/server-lookup.js
7
7
  function findServerByHttpUrl(definitions, urlString) {
8
8
  const normalizedTarget = normalizeHttpUrl(urlString);
9
9
  if (!normalizedTarget) {
@@ -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.13/node_modules/mcporter/dist/cli/identifier-helpers.js
3
+ // node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/dist/cli/identifier-helpers.js
4
4
  var AUTO_THRESHOLD_RATIO = 0.3;
5
5
  var AUTO_THRESHOLD_MIN = 2;
6
6
  function chooseClosestIdentifier(input, candidates) {
@@ -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.13/node_modules/mcporter/dist/lifecycle.js
3
+ // node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/dist/lifecycle.js
4
4
  var DEFAULT_KEEP_ALIVE = /* @__PURE__ */ new Set(["chrome-devtools", "mobile-mcp", "playwright", "cloudbase"]);
5
5
  var includeOverride = parseList(process.env.MCPORTER_KEEPALIVE);
6
6
  var excludeOverride = parseList(process.env.MCPORTER_DISABLE_KEEPALIVE ?? process.env.MCPORTER_NO_KEEPALIVE);
@@ -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.13/node_modules/mcporter/dist/cli/json-output.js
3
+ // node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/dist/cli/json-output.js
4
4
  function buildConnectionIssueEnvelope(params) {
5
5
  return {
6
6
  server: params.server,
@@ -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.13/node_modules/mcporter/dist/daemon/launch.js
3
+ // node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/dist/daemon/launch.js
4
4
  import { spawn } from "node:child_process";
5
5
  import path from "node:path";
6
6
  import { existsSync } from "node:fs";
@@ -1,15 +1,15 @@
1
1
  import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
2
2
  import {
3
3
  createKeepAliveRuntime
4
- } from "./chunk-6QZQZXDJ.js";
4
+ } from "./chunk-YTO7DITJ.js";
5
5
  import {
6
6
  DaemonClient
7
- } from "./chunk-FBVRU4Y3.js";
7
+ } from "./chunk-VRTH73R5.js";
8
8
  import {
9
9
  isKeepAliveServer
10
- } from "./chunk-QJNF3A3F.js";
10
+ } from "./chunk-EIXFNLU6.js";
11
11
 
12
- // node_modules/.pnpm/mcporter@0.13.13/node_modules/mcporter/dist/generated-daemon-runtime.js
12
+ // node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/dist/generated-daemon-runtime.js
13
13
  async function createGeneratedKeepAliveRuntime(base, server) {
14
14
  if (!isKeepAliveServer(server)) {
15
15
  return {