stitchkit 0.100.2 → 0.101.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 (242) hide show
  1. package/CHANGELOG.md +153 -0
  2. package/README.md +2 -1
  3. package/dist/entrypoints/agent-runtime/browser.js +119 -119
  4. package/dist/entrypoints/agent-runtime/coding-tools.js +15 -20
  5. package/dist/entrypoints/agent-runtime/harness.js +55 -63
  6. package/dist/entrypoints/agent-runtime/openrouter.js +6 -6
  7. package/dist/entrypoints/agent-runtime/sandbox.js +20 -25
  8. package/dist/entrypoints/agent-runtime/sqlite/bun.js +11 -13
  9. package/dist/entrypoints/agent-runtime/sqlite/node.js +11 -13
  10. package/dist/entrypoints/agent-runtime/testing.js +32 -34
  11. package/dist/entrypoints/agent-runtime.js +395 -402
  12. package/dist/entrypoints/application/diagnostic-journal.js +26 -27
  13. package/dist/entrypoints/application/directory-inbox.js +16 -17
  14. package/dist/entrypoints/application/grammy.js +13 -13
  15. package/dist/entrypoints/application/opentelemetry.js +13 -13
  16. package/dist/entrypoints/application/schemas.js +24 -24
  17. package/dist/entrypoints/application.js +209 -210
  18. package/dist/entrypoints/bin/upgrade-cli.js +2 -2
  19. package/dist/entrypoints/cli.js +81 -84
  20. package/dist/entrypoints/contract.js +54 -57
  21. package/dist/entrypoints/declaration.js +22 -22
  22. package/dist/entrypoints/files.js +18 -21
  23. package/dist/entrypoints/geo.js +7 -8
  24. package/dist/entrypoints/google.js +2 -2
  25. package/dist/entrypoints/index.js +150 -154
  26. package/dist/entrypoints/live.js +45 -47
  27. package/dist/entrypoints/node.js +68 -74
  28. package/dist/entrypoints/oauth.js +6 -6
  29. package/dist/entrypoints/observability.d.ts +1 -0
  30. package/dist/entrypoints/observability.d.ts.map +1 -1
  31. package/dist/entrypoints/observability.js +116 -87
  32. package/dist/entrypoints/primitives.js +35 -35
  33. package/dist/entrypoints/react/keyboard.d.ts +4 -0
  34. package/dist/entrypoints/react/keyboard.d.ts.map +1 -0
  35. package/dist/entrypoints/react/keyboard.js +397 -0
  36. package/dist/entrypoints/react.js +10 -10
  37. package/dist/entrypoints/release.js +7 -7
  38. package/dist/entrypoints/remote.js +15 -17
  39. package/dist/entrypoints/server.js +198 -200
  40. package/dist/entrypoints/telegram/html.d.ts +5 -0
  41. package/dist/entrypoints/telegram/html.d.ts.map +1 -0
  42. package/dist/entrypoints/telegram/html.js +26 -0
  43. package/dist/entrypoints/telegram/screens.d.ts +14 -0
  44. package/dist/entrypoints/telegram/screens.d.ts.map +1 -0
  45. package/dist/entrypoints/telegram/screens.js +2028 -0
  46. package/dist/entrypoints/telegram.d.ts +11 -3
  47. package/dist/entrypoints/telegram.d.ts.map +1 -1
  48. package/dist/entrypoints/telegram.js +779 -159
  49. package/dist/entrypoints/testing.js +75 -79
  50. package/dist/entrypoints/tools/connections.js +30 -32
  51. package/dist/entrypoints/tools/contract.js +18 -20
  52. package/dist/entrypoints/tools/invoker.js +12 -17
  53. package/dist/entrypoints/tools.js +224 -229
  54. package/dist/entrypoints/tracking/server.js +6 -6
  55. package/dist/entrypoints/tracking.js +40 -42
  56. package/dist/entrypoints/voice.js +3 -3
  57. package/dist/{index-eaysmdtq.js → index-0ndk4555.js} +56 -56
  58. package/dist/{index-2bxbyab0.js → index-1bx1xv1k.js} +1 -1
  59. package/dist/{index-p5r7qpdd.js → index-1eeqpadm.js} +4 -4
  60. package/dist/{index-hadmp193.js → index-3ct7hhq6.js} +210 -210
  61. package/dist/{index-e01r054k.js → index-45tdvqa3.js} +26 -26
  62. package/dist/{index-dce5wxcq.js → index-4s0fep5q.js} +8 -8
  63. package/dist/index-50ejfz75.js +9 -0
  64. package/dist/{index-m9zn6cpq.js → index-5107q189.js} +12 -12
  65. package/dist/{index-sbdmyz75.js → index-5cc6r990.js} +3 -3
  66. package/dist/{index-c6bxbsnc.js → index-7kxw1awn.js} +2 -2
  67. package/dist/{index-0r0fbk7z.js → index-7z9ym7t8.js} +28 -28
  68. package/dist/{index-p7hgdyhb.js → index-814xpr6d.js} +2 -2
  69. package/dist/{index-gtj3zc53.js → index-8kzct1d6.js} +99 -99
  70. package/dist/{index-1zbbzgfh.js → index-9pw0a51a.js} +4 -4
  71. package/dist/{index-79z7m7dt.js → index-a9pd417t.js} +35 -35
  72. package/dist/{index-ham5sz8m.js → index-aaj97r4y.js} +45 -45
  73. package/dist/{index-s812ycat.js → index-aan6hqb9.js} +3 -3
  74. package/dist/{index-10x2hbx0.js → index-adhgd4pe.js} +44 -44
  75. package/dist/{index-2gxzjvyr.js → index-afjvjyck.js} +23 -23
  76. package/dist/{index-qmy6zq75.js → index-ahvsksw5.js} +16 -16
  77. package/dist/{index-hr4tzbwq.js → index-ap3gqe56.js} +3 -3
  78. package/dist/{index-znfs20ss.js → index-b2bz0kdm.js} +16 -16
  79. package/dist/{index-r066jx76.js → index-c6aagrbd.js} +148 -120
  80. package/dist/{index-k30h66yd.js → index-ck71tbcf.js} +9 -9
  81. package/dist/{index-eqqvgdb3.js → index-ct75c3at.js} +2 -2
  82. package/dist/{index-gw8bmyaj.js → index-djjhhgjk.js} +41 -41
  83. package/dist/{index-8qt2m66q.js → index-dvwj1f43.js} +43 -43
  84. package/dist/index-e05cjgtf.js +144 -0
  85. package/dist/{index-yw4fzmdz.js → index-e6c2spsd.js} +79 -30
  86. package/dist/{index-fhwqwxe0.js → index-ej331hah.js} +1 -1
  87. package/dist/{index-9t3dffv2.js → index-ewbaywk5.js} +5 -5
  88. package/dist/{index-7p1f0vp2.js → index-fyphpknh.js} +25 -25
  89. package/dist/{index-83bdg97s.js → index-g149e9pk.js} +1 -1
  90. package/dist/{index-ngfhvfpd.js → index-g6a3na27.js} +4 -4
  91. package/dist/{index-qwhynv6x.js → index-h124epcf.js} +20 -20
  92. package/dist/{index-h6eeys1v.js → index-h97tqqp1.js} +9 -9
  93. package/dist/{index-zcgf3gqf.js → index-hby4qhax.js} +10 -10
  94. package/dist/{index-5jrd0yng.js → index-j8aw2c0e.js} +4 -4
  95. package/dist/{index-d8m8zpd8.js → index-jzczzcsb.js} +14 -14
  96. package/dist/index-kqnd6a85.js +26 -0
  97. package/dist/{index-35mh5bhj.js → index-kw1ws0cs.js} +12 -12
  98. package/dist/{index-4gcnakhx.js → index-m38ej7e5.js} +2 -2
  99. package/dist/{index-ndddxtyx.js → index-m79yr938.js} +19 -19
  100. package/dist/{index-5p2m7we1.js → index-m9fndta6.js} +11 -11
  101. package/dist/index-mnkk1ffz.js +150 -0
  102. package/dist/index-n15jny5b.js +4 -0
  103. package/dist/{index-2vtcmrj9.js → index-n53mswt3.js} +20 -20
  104. package/dist/{index-bt14acb5.js → index-n5yqxd3d.js} +21 -21
  105. package/dist/{index-bm5rx7n6.js → index-n9tyz8z3.js} +12 -12
  106. package/dist/index-nmaqxdx7.js +463 -0
  107. package/dist/{index-mqv3b5rh.js → index-nx6eazt0.js} +30 -30
  108. package/dist/{index-3z73fh2c.js → index-q0th8q0z.js} +9 -9
  109. package/dist/{index-v260df89.js → index-qjeggp8w.js} +20 -20
  110. package/dist/{index-zfrhfn82.js → index-r1z0rd9c.js} +20 -20
  111. package/dist/{index-wqgjfstn.js → index-r5c4fedv.js} +3 -3
  112. package/dist/{index-cyktc4bp.js → index-r5hsgkz5.js} +118 -118
  113. package/dist/{index-0b1ess5e.js → index-r7a7r7ha.js} +1 -1
  114. package/dist/{index-1j8pm5t0.js → index-rfkh44ss.js} +15 -15
  115. package/dist/index-rz3z13e9.js +47 -0
  116. package/dist/{index-k6gpggb9.js → index-s80awwsw.js} +35 -35
  117. package/dist/{index-vqr7f7v8.js → index-ssmd41kh.js} +124 -124
  118. package/dist/index-sznqf8fx.js +20 -0
  119. package/dist/{index-ensd0r74.js → index-v14qqmys.js} +41 -41
  120. package/dist/{index-paz6sgdp.js → index-v4a2fjtk.js} +36 -36
  121. package/dist/{index-d9pk3td4.js → index-w0eqdhyd.js} +14 -14
  122. package/dist/{index-5qn1kx34.js → index-w575evhq.js} +29 -29
  123. package/dist/{index-3gye9wzb.js → index-w5s3xftz.js} +26 -26
  124. package/dist/{index-tm88avnj.js → index-wykebpn9.js} +3 -3
  125. package/dist/{index-sh3s86na.js → index-xkhk5d6g.js} +17 -17
  126. package/dist/{index-6k1937bx.js → index-xqhede6x.js} +4 -4
  127. package/dist/{index-f4fx2tza.js → index-zs4ms3th.js} +181 -181
  128. package/dist/{index-k5hsfc3j.js → index-zsvzhjtk.js} +1 -1
  129. package/dist/internal/secret-shapes.d.ts +21 -0
  130. package/dist/internal/secret-shapes.d.ts.map +1 -0
  131. package/dist/observability/bounded-logger.d.ts +2 -0
  132. package/dist/observability/bounded-logger.d.ts.map +1 -1
  133. package/dist/observability/sanitize.d.ts +6 -0
  134. package/dist/observability/sanitize.d.ts.map +1 -1
  135. package/dist/observability/secret-values.d.ts +25 -0
  136. package/dist/observability/secret-values.d.ts.map +1 -0
  137. package/dist/react/keyboard/hooks.d.ts +71 -0
  138. package/dist/react/keyboard/hooks.d.ts.map +1 -0
  139. package/dist/react/keyboard/layers.d.ts +98 -0
  140. package/dist/react/keyboard/layers.d.ts.map +1 -0
  141. package/dist/react/keyboard/zone.d.ts +139 -0
  142. package/dist/react/keyboard/zone.d.ts.map +1 -0
  143. package/dist/telegram/bot-api.d.ts +7 -4
  144. package/dist/telegram/bot-api.d.ts.map +1 -1
  145. package/dist/telegram/crypto.d.ts +16 -0
  146. package/dist/telegram/crypto.d.ts.map +1 -0
  147. package/dist/telegram/html/check.d.ts +26 -0
  148. package/dist/telegram/html/check.d.ts.map +1 -0
  149. package/dist/telegram/html/nodes.d.ts +70 -0
  150. package/dist/telegram/html/nodes.d.ts.map +1 -0
  151. package/dist/telegram/html/parse.d.ts +35 -0
  152. package/dist/telegram/html/parse.d.ts.map +1 -0
  153. package/dist/telegram/html/render.d.ts +39 -0
  154. package/dist/telegram/html/render.d.ts.map +1 -0
  155. package/dist/telegram/init-data.d.ts +3 -44
  156. package/dist/telegram/init-data.d.ts.map +1 -1
  157. package/dist/telegram/operator-channel.d.ts +19 -3
  158. package/dist/telegram/operator-channel.d.ts.map +1 -1
  159. package/dist/telegram/operator-dedupe.d.ts +44 -0
  160. package/dist/telegram/operator-dedupe.d.ts.map +1 -0
  161. package/dist/telegram/screens/callback-codec.d.ts +34 -0
  162. package/dist/telegram/screens/callback-codec.d.ts.map +1 -0
  163. package/dist/telegram/screens/dispatch.d.ts +22 -0
  164. package/dist/telegram/screens/dispatch.d.ts.map +1 -0
  165. package/dist/telegram/screens/display.d.ts +70 -0
  166. package/dist/telegram/screens/display.d.ts.map +1 -0
  167. package/dist/telegram/screens/execute.d.ts +57 -0
  168. package/dist/telegram/screens/execute.d.ts.map +1 -0
  169. package/dist/telegram/screens/html.d.ts +36 -0
  170. package/dist/telegram/screens/html.d.ts.map +1 -0
  171. package/dist/telegram/screens/outcome.d.ts +74 -0
  172. package/dist/telegram/screens/outcome.d.ts.map +1 -0
  173. package/dist/telegram/screens/path.d.ts +29 -0
  174. package/dist/telegram/screens/path.d.ts.map +1 -0
  175. package/dist/telegram/screens/reconcile.d.ts +67 -0
  176. package/dist/telegram/screens/reconcile.d.ts.map +1 -0
  177. package/dist/telegram/screens/registry.d.ts +23 -0
  178. package/dist/telegram/screens/registry.d.ts.map +1 -0
  179. package/dist/telegram/screens/render.d.ts +70 -0
  180. package/dist/telegram/screens/render.d.ts.map +1 -0
  181. package/dist/telegram/screens/runtime.d.ts +133 -0
  182. package/dist/telegram/screens/runtime.d.ts.map +1 -0
  183. package/dist/telegram/screens/screen-types.d.ts +130 -0
  184. package/dist/telegram/screens/screen-types.d.ts.map +1 -0
  185. package/dist/telegram/screens/screen.d.ts +138 -0
  186. package/dist/telegram/screens/screen.d.ts.map +1 -0
  187. package/dist/telegram/screens/state.d.ts +115 -0
  188. package/dist/telegram/screens/state.d.ts.map +1 -0
  189. package/dist/telegram/screens/telegram-screens.d.ts +18 -0
  190. package/dist/telegram/screens/telegram-screens.d.ts.map +1 -0
  191. package/dist/telegram/screens/test-chat-telegram.d.ts +47 -0
  192. package/dist/telegram/screens/test-chat-telegram.d.ts.map +1 -0
  193. package/dist/telegram/screens/test-chat.d.ts +66 -0
  194. package/dist/telegram/screens/test-chat.d.ts.map +1 -0
  195. package/dist/telegram/screens/view.d.ts +89 -0
  196. package/dist/telegram/screens/view.d.ts.map +1 -0
  197. package/dist/telegram/send-failure.d.ts +25 -0
  198. package/dist/telegram/send-failure.d.ts.map +1 -1
  199. package/dist/telegram/update-intake.d.ts +82 -0
  200. package/dist/telegram/update-intake.d.ts.map +1 -0
  201. package/dist/telegram/update-store-check.d.ts +22 -0
  202. package/dist/telegram/update-store-check.d.ts.map +1 -0
  203. package/dist/telegram/update-store-postgres.d.ts +33 -0
  204. package/dist/telegram/update-store-postgres.d.ts.map +1 -0
  205. package/dist/telegram/update-store-sqlite.d.ts +26 -0
  206. package/dist/telegram/update-store-sqlite.d.ts.map +1 -0
  207. package/dist/telegram/update-store.d.ts +67 -0
  208. package/dist/telegram/update-store.d.ts.map +1 -0
  209. package/dist/telegram/user.d.ts +51 -0
  210. package/dist/telegram/user.d.ts.map +1 -0
  211. package/dist/telegram/webhook.d.ts +105 -0
  212. package/dist/telegram/webhook.d.ts.map +1 -0
  213. package/dist/tools/cli/args-fields.d.ts +8 -0
  214. package/dist/tools/cli/args-fields.d.ts.map +1 -1
  215. package/dist/tools/cli/args-route.d.ts.map +1 -1
  216. package/dist/tools/cli/args.d.ts.map +1 -1
  217. package/dist/tools/cli/help.d.ts.map +1 -1
  218. package/llms/cli.txt +8 -2
  219. package/llms/observability.txt +15 -2
  220. package/llms/react-keyboard.txt +193 -0
  221. package/llms/server.4.txt +16 -0
  222. package/llms/stitchkit.txt +10 -4
  223. package/llms/telegram-html.txt +35 -0
  224. package/llms/telegram-screens.txt +365 -0
  225. package/llms/telegram.txt +245 -11
  226. package/llms/{upgrading-0.74.0-0.100.0.txt → upgrading-0.74.0-0.101.0.txt} +39 -3
  227. package/llms/upgrading.txt +1 -1
  228. package/llms-full.txt +889 -19
  229. package/llms.txt +12 -7
  230. package/package.json +17 -2
  231. package/dist/index-2k4yrqkc.js +0 -9
  232. package/dist/index-crykmqkr.js +0 -26
  233. package/dist/index-y64k3s0h.js +0 -150
  234. package/dist/index-y91ry9h2.js +0 -4
  235. /package/dist/{index-hffjpmq9.js → index-9jfdm5tg.js} +0 -0
  236. /package/dist/{index-zjjyynm3.js → index-d4pa2bgs.js} +0 -0
  237. /package/dist/{index-rxfy4cq7.js → index-dwfv9a85.js} +0 -0
  238. /package/dist/{index-5jm36zv1.js → index-gfk7nrht.js} +0 -0
  239. /package/dist/{index-b9aefrqd.js → index-n1dqr7gf.js} +0 -0
  240. /package/dist/{index-q3pyb9n0.js → index-sykb5ag7.js} +0 -0
  241. /package/dist/{index-48ffdxgk.js → index-xhzq2qvj.js} +0 -0
  242. /package/dist/{index-kzfs85xp.js → index-zsarb5xp.js} +0 -0
@@ -1,54 +1,50 @@
1
+ import"../index-hby4qhax.js";
2
+ import"../index-qjeggp8w.js";
1
3
  import {
2
- createApplication
3
- } from "../index-5qn1kx34.js";
4
- import"../index-3gye9wzb.js";
5
- import"../index-2k4yrqkc.js";
6
- import"../index-3z73fh2c.js";
7
- import {
8
- RealtimeRejectDirectionSchema,
9
- RealtimeRejectFaultSchema,
10
- RealtimeRejectPhaseSchema,
11
- RealtimeRejectReasonSchema
12
- } from "../index-p7hgdyhb.js";
4
+ joinRoutePath
5
+ } from "../index-m38ej7e5.js";
6
+ import"../index-r5c4fedv.js";
13
7
  import {
14
- createClient,
15
- createClients
16
- } from "../index-ham5sz8m.js";
8
+ createClient2,
9
+ createClients2
10
+ } from "../index-aaj97r4y.js";
11
+ import"../index-n53mswt3.js";
12
+ import"../index-q0th8q0z.js";
17
13
  import {
18
- RealtimeRequestDisconnectedError,
19
- RealtimeRequestInvalidAcknowledgementError,
20
- RealtimeRequestTimeoutError
21
- } from "../index-dce5wxcq.js";
22
- import"../index-48ffdxgk.js";
23
- import"../index-wqgjfstn.js";
24
- import"../index-v260df89.js";
14
+ createApplication2
15
+ } from "../index-w575evhq.js";
16
+ import"../index-w5s3xftz.js";
25
17
  import {
26
- TOOL_TRANSPORTS
27
- } from "../index-k30h66yd.js";
18
+ RealtimeRequestTimeoutError2,
19
+ RealtimeRequestDisconnectedError2,
20
+ RealtimeRequestInvalidAcknowledgementError2
21
+ } from "../index-4s0fep5q.js";
28
22
  import {
29
- joinRoutePath
30
- } from "../index-4gcnakhx.js";
31
- import"../index-zcgf3gqf.js";
23
+ TOOL_TRANSPORTS2
24
+ } from "../index-ck71tbcf.js";
32
25
  import {
33
- mcpProjectionCandidate,
34
- prepareProjectedMcpTools,
35
- projectToolSurface,
36
- staticInputRounds
37
- } from "../index-0r0fbk7z.js";
26
+ RealtimeRejectDirectionSchema,
27
+ RealtimeRejectPhaseSchema,
28
+ RealtimeRejectReasonSchema,
29
+ RealtimeRejectFaultSchema
30
+ } from "../index-814xpr6d.js";
38
31
  import {
39
32
  toJsonSchema
40
- } from "../index-eqqvgdb3.js";
41
- import"../index-znfs20ss.js";
42
- import"../index-p5r7qpdd.js";
43
- import"../index-2vtcmrj9.js";
33
+ } from "../index-ct75c3at.js";
34
+ import {
35
+ staticInputRounds,
36
+ projectToolSurface,
37
+ mcpProjectionCandidate,
38
+ prepareProjectedMcpTools
39
+ } from "../index-7z9ym7t8.js";
40
+ import"../index-b2bz0kdm.js";
44
41
  import {
45
42
  compareCodeUnits,
46
43
  serializeCanonicalJson
47
- } from "../index-k5hsfc3j.js";
48
- import"../index-kzfs85xp.js";
44
+ } from "../index-zsvzhjtk.js";
49
45
  import {
50
46
  isRecord
51
- } from "../index-hffjpmq9.js";
47
+ } from "../index-9jfdm5tg.js";
52
48
 
53
49
  // src/testing/handler-clients.ts
54
50
  function resolveTestBaseUrl(origin, pathPrefix) {
@@ -70,10 +66,10 @@ function createTestClientConfig(config) {
70
66
  };
71
67
  }
72
68
  function createHandlerTestClient(config) {
73
- return createClient(config.contract, createTestClientConfig(config), config.contractConfig);
69
+ return createClient2(config.contract, createTestClientConfig(config), config.contractConfig);
74
70
  }
75
71
  function createHandlerTestClients(config) {
76
- return createClients(config.contracts, createTestClientConfig(config), config.contractConfig);
72
+ return createClients2(config.contracts, createTestClientConfig(config), config.contractConfig);
77
73
  }
78
74
  // src/testing/managed-resource-conformance-contract.ts
79
75
  import { z } from "zod";
@@ -462,7 +458,7 @@ async function completionBeforeReady(runtime) {
462
458
  async function lateCompletion(runtime) {
463
459
  await startSuccessfully(runtime);
464
460
  const expectedHealth = runtime.scenario.required ? "unhealthy" : "degraded";
465
- const changed = waitForSnapshot(runtime.application, (snapshot2) => snapshot2.health === expectedHealth);
461
+ const changed = waitForSnapshot(runtime.application, (snapshot) => snapshot.health === expectedHealth);
466
462
  runtime.gates.reject("completion", new Error("controlled late completion rejection"));
467
463
  const snapshot = await changed;
468
464
  requireCondition(snapshot.lifecycle === "ready", "late completion changed lifecycle ownership");
@@ -521,7 +517,7 @@ function expectedManagedResourceConformanceTrace(scenarioId) {
521
517
  return EXPECTED_TRACE[scenarioId];
522
518
  }
523
519
  async function executeManagedResourceConformanceScenario(scenario, resource, gates, trace) {
524
- const application = createApplication({
520
+ const application = createApplication2({
525
521
  id: `conformance-${scenario.id}`,
526
522
  resources: [observeManagedResource(resource, scenario.required, trace)]
527
523
  });
@@ -790,7 +786,7 @@ function runtimeOperationSource(source) {
790
786
  // src/testing/surface-manifest.ts
791
787
  var SURFACE_MANIFEST_VERSION = 3;
792
788
  var HttpMethodSchema = z2.enum(["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD"]);
793
- var ToolTransportSchema = z2.enum(TOOL_TRANSPORTS);
789
+ var ToolTransportSchema = z2.enum(TOOL_TRANSPORTS2);
794
790
  var SurfaceTransportSchema = z2.enum(["HTTP", "MCP", "AGENT", "CLI", "REALTIME"]);
795
791
  var SurfaceSchemaDigestsSchema = z2.object({
796
792
  params: z2.string().nullable(),
@@ -1081,7 +1077,7 @@ function assertSurfaceDiscovery(manifest, observed) {
1081
1077
  if (observed.openApi) {
1082
1078
  assertSameSet("HTTP/OpenAPI", manifest.operations.flatMap((operation) => operation.http.map((entry) => `${entry.method}:${entry.path.replace(/:([^/]+)/g, "{$1}")}`)), openApiOperations(observed.openApi));
1083
1079
  }
1084
- for (const transport of TOOL_TRANSPORTS) {
1080
+ for (const transport of TOOL_TRANSPORTS2) {
1085
1081
  const names = observed[transport];
1086
1082
  if (names) {
1087
1083
  assertSameSet(`${transport} discovery`, expectedToolNames(manifest, transport, null), names);
@@ -1291,11 +1287,11 @@ function createRealtimeProbeDriver({
1291
1287
  if (observedRejection) {
1292
1288
  return withCalls({
1293
1289
  outcome: "realtime_rejected",
1294
- code: error instanceof RealtimeRequestInvalidAcknowledgementError ? error.code : observedRejection.error.code,
1290
+ code: error instanceof RealtimeRequestInvalidAcknowledgementError2 ? error.code : observedRejection.error.code,
1295
1291
  rejection: rejectionObservation(observedRejection)
1296
1292
  });
1297
1293
  }
1298
- if (error instanceof RealtimeRequestInvalidAcknowledgementError) {
1294
+ if (error instanceof RealtimeRequestInvalidAcknowledgementError2) {
1299
1295
  return withCalls({
1300
1296
  outcome: "realtime_rejected",
1301
1297
  code: error.code,
@@ -1307,7 +1303,7 @@ function createRealtimeProbeDriver({
1307
1303
  }
1308
1304
  });
1309
1305
  }
1310
- if (error instanceof RealtimeRequestDisconnectedError) {
1306
+ if (error instanceof RealtimeRequestDisconnectedError2) {
1311
1307
  return withCalls({
1312
1308
  outcome: "disconnected",
1313
1309
  code: error.code,
@@ -1316,7 +1312,7 @@ function createRealtimeProbeDriver({
1316
1312
  }
1317
1313
  });
1318
1314
  }
1319
- if (error instanceof RealtimeRequestTimeoutError) {
1315
+ if (error instanceof RealtimeRequestTimeoutError2) {
1320
1316
  return withCalls({ outcome: "timeout", code: error.code });
1321
1317
  }
1322
1318
  if (signal.aborted && error === signal.reason) {
@@ -1324,10 +1320,10 @@ function createRealtimeProbeDriver({
1324
1320
  }
1325
1321
  const parsedRejection = RealtimeRejectionObservationSchema.safeParse(typeof error === "object" && error !== null && "details" in error ? error.details : undefined);
1326
1322
  if (parsedRejection.success) {
1327
- const code2 = typeof error === "object" && error !== null && "code" in error ? String(error.code) : "REALTIME_CONTRACT_VIOLATION";
1323
+ const code = typeof error === "object" && error !== null && "code" in error ? String(error.code) : "REALTIME_CONTRACT_VIOLATION";
1328
1324
  return withCalls({
1329
1325
  outcome: "realtime_rejected",
1330
- code: code2,
1326
+ code,
1331
1327
  rejection: parsedRejection.data
1332
1328
  });
1333
1329
  }
@@ -1344,34 +1340,34 @@ function createRealtimeProbeDriver({
1344
1340
  };
1345
1341
  }
1346
1342
  export {
1347
- serializeSurfaceValue,
1348
- runSurfaceProbes,
1349
- runManagedResourceConformance,
1350
- defineRealtimeProbe,
1351
- createRealtimeProbeDriver,
1352
- createHandlerTestClients,
1353
- createHandlerTestClient,
1354
- buildSurfaceManifest,
1355
- assertSurfaceManifestSnapshot,
1356
- assertSurfaceDiscovery,
1357
- TransportObservationSchema,
1358
- SurfaceSchemaDigestsSchema,
1359
- SurfaceRealtimeSchemaPairSchema,
1360
- SurfaceManifestToolSurfaceSchema,
1361
- SurfaceManifestToolSchema,
1362
- SurfaceManifestSchema,
1363
- SurfaceManifestRealtimeEventSchema,
1364
- SurfaceManifestOperationToolViewSchema,
1365
- SurfaceManifestOperationSchema,
1366
- SurfaceManifestOperationMcpSchema,
1367
- SurfaceManifestExtensionSchema,
1368
- SURFACE_MANIFEST_VERSION,
1369
- RealtimeRejectionObservationSchema,
1370
- RealtimeDisconnectObservationSchema,
1371
- ManagedResourceConformanceTraceOutcomeSchema,
1372
- ManagedResourceConformanceTraceEntrySchema,
1373
- ManagedResourceConformanceScenarioSchema,
1374
- ManagedResourceConformanceScenarioIdSchema,
1343
+ ManagedResourceConformanceError,
1375
1344
  ManagedResourceConformancePhaseSchema,
1376
- ManagedResourceConformanceError
1345
+ ManagedResourceConformanceScenarioIdSchema,
1346
+ ManagedResourceConformanceScenarioSchema,
1347
+ ManagedResourceConformanceTraceEntrySchema,
1348
+ ManagedResourceConformanceTraceOutcomeSchema,
1349
+ RealtimeDisconnectObservationSchema,
1350
+ RealtimeRejectionObservationSchema,
1351
+ SURFACE_MANIFEST_VERSION,
1352
+ SurfaceManifestExtensionSchema,
1353
+ SurfaceManifestOperationMcpSchema,
1354
+ SurfaceManifestOperationSchema,
1355
+ SurfaceManifestOperationToolViewSchema,
1356
+ SurfaceManifestRealtimeEventSchema,
1357
+ SurfaceManifestSchema,
1358
+ SurfaceManifestToolSchema,
1359
+ SurfaceManifestToolSurfaceSchema,
1360
+ SurfaceRealtimeSchemaPairSchema,
1361
+ SurfaceSchemaDigestsSchema,
1362
+ TransportObservationSchema,
1363
+ assertSurfaceDiscovery,
1364
+ assertSurfaceManifestSnapshot,
1365
+ buildSurfaceManifest,
1366
+ createHandlerTestClient,
1367
+ createHandlerTestClients,
1368
+ createRealtimeProbeDriver,
1369
+ defineRealtimeProbe,
1370
+ runManagedResourceConformance,
1371
+ runSurfaceProbes,
1372
+ serializeSurfaceValue
1377
1373
  };
@@ -1,23 +1,21 @@
1
- import {
2
- defineRuntimeTool
3
- } from "../../index-d8m8zpd8.js";
1
+ import"../../index-ct75c3at.js";
4
2
  import {
5
3
  declaresDraft07,
6
4
  withDefsDialect
7
- } from "../../index-0r0fbk7z.js";
8
- import"../../index-eqqvgdb3.js";
9
- import"../../index-znfs20ss.js";
10
- import"../../index-p5r7qpdd.js";
5
+ } from "../../index-7z9ym7t8.js";
6
+ import {
7
+ AppError2
8
+ } from "../../index-n53mswt3.js";
9
+ import"../../index-b2bz0kdm.js";
11
10
  import {
12
- AppError
13
- } from "../../index-2vtcmrj9.js";
14
- import"../../index-k5hsfc3j.js";
11
+ defineRuntimeTool2
12
+ } from "../../index-jzczzcsb.js";
15
13
  import {
16
14
  safeJsonParse
17
- } from "../../index-kzfs85xp.js";
15
+ } from "../../index-zsarb5xp.js";
18
16
  import {
19
17
  isRecord
20
- } from "../../index-hffjpmq9.js";
18
+ } from "../../index-9jfdm5tg.js";
21
19
 
22
20
  // src/tools/connections/errors.ts
23
21
  class ConnectionAuthorizationRequiredError extends Error {
@@ -465,9 +463,9 @@ class McpHttpClient {
465
463
  for await (const frame of readSseFrames(response, this.options.maxResponseBytes, this.connectionName, true)) {
466
464
  if (!frame.data)
467
465
  continue;
468
- const payload2 = JSON.parse(frame.data);
469
- if (isRecord(payload2) && payload2.id === message.id)
470
- return unwrap(payload2, message.id, this.connectionName);
466
+ const payload = JSON.parse(frame.data);
467
+ if (isRecord(payload) && payload.id === message.id)
468
+ return unwrap(payload, message.id, this.connectionName);
471
469
  }
472
470
  throw new Error("MCP stream ended without a response");
473
471
  }
@@ -546,9 +544,9 @@ function mcpToolFailure(toolName, result) {
546
544
  if (isRecord(payload) && typeof payload.error === "string") {
547
545
  const details = isRecord(payload.details) ? payload.details : undefined;
548
546
  const message = typeof details?.message === "string" ? details.message : payload.error;
549
- return new AppError(payload.error, message, 502, details, typeof payload._hint === "string" ? payload._hint : undefined, undefined, typeof payload.retryable === "boolean" ? payload.retryable : undefined);
547
+ return new AppError2(payload.error, message, 502, details, typeof payload._hint === "string" ? payload._hint : undefined, undefined, typeof payload.retryable === "boolean" ? payload.retryable : undefined);
550
548
  }
551
- return new AppError(UPSTREAM_TOOL_ERROR, `External MCP tool "${toolName}" returned an error`, 502, payload === undefined ? undefined : { upstream: payload });
549
+ return new AppError2(UPSTREAM_TOOL_ERROR, `External MCP tool "${toolName}" returned an error`, 502, payload === undefined ? undefined : { upstream: payload });
552
550
  }
553
551
 
554
552
  // src/tools/connections/runtime.ts
@@ -633,7 +631,7 @@ async function mountMcpConnection(connection, instanceId, onSkipped) {
633
631
  const name = tool.name;
634
632
  const description = tool.description ?? `External MCP tool "${name}"`;
635
633
  const input = zodObjectFromJsonSchema(tool.inputSchema);
636
- const definition = defineRuntimeTool({
634
+ const definition = defineRuntimeTool2({
637
635
  name,
638
636
  description,
639
637
  identity: { serviceName: connection.name, action: name, method: "POST" },
@@ -697,7 +695,7 @@ function resolveOpenApiDocument(document) {
697
695
  if (refs.includes(ref))
698
696
  throw new TypeError("OpenAPI recursive references are unsupported");
699
697
  let target = document;
700
- for (const part of ref.slice(2).split("/").map((part2) => part2.replace(/~1/g, "/").replace(/~0/g, "~"))) {
698
+ for (const part of ref.slice(2).split("/").map((part) => part.replace(/~1/g, "/").replace(/~0/g, "~"))) {
701
699
  if (!isRecord(target) || !Object.hasOwn(target, part))
702
700
  throw new TypeError("OpenAPI reference does not resolve");
703
701
  target = target[part];
@@ -764,7 +762,7 @@ async function mountOpenApiConnection(connection, instanceId, onSkipped) {
764
762
  const schema = operationInputSchema(document, entry);
765
763
  const input = zodObjectFromJsonSchema(schema);
766
764
  const auth = resolveAuth(document, entry.operation);
767
- const definition = defineRuntimeTool({
765
+ const definition = defineRuntimeTool2({
768
766
  name,
769
767
  description,
770
768
  identity: {
@@ -826,10 +824,10 @@ async function loadOpenApiDocument(connection, timeoutMs, maxResponseBytes) {
826
824
  }
827
825
  const text = connection.spec.trim();
828
826
  if (text.startsWith("{")) {
829
- const parsed2 = JSON.parse(text);
830
- if (!isRecord(parsed2))
827
+ const parsed = JSON.parse(text);
828
+ if (!isRecord(parsed))
831
829
  throw new Error(`OpenAPI spec of "${connection.name}" is not an object`);
832
- return { document: parsed2 };
830
+ return { document: parsed };
833
831
  }
834
832
  const url = assertConnectionUrl(text, connection.name);
835
833
  const parsed = await withConnectionDeadline(connection.name, timeoutMs, undefined, async (signal) => {
@@ -1079,9 +1077,9 @@ async function mountConnections(connections, options = {}) {
1079
1077
  }
1080
1078
  const schemaLimit = options.budget?.maxSchemaBytes;
1081
1079
  if (schemaLimit !== undefined) {
1082
- const schemaBytes2 = tools.reduce((total, tool) => total + foreignSchemaBytes(tool), 0);
1083
- if (schemaBytes2 > schemaLimit) {
1084
- throw new ConnectionBudgetExceededError(schemaLimit, schemaBytes2, "schema bytes");
1080
+ const schemaBytes = tools.reduce((total, tool) => total + foreignSchemaBytes(tool), 0);
1081
+ if (schemaBytes > schemaLimit) {
1082
+ throw new ConnectionBudgetExceededError(schemaLimit, schemaBytes, "schema bytes");
1085
1083
  }
1086
1084
  }
1087
1085
  return tools;
@@ -1100,11 +1098,11 @@ function instanceIdOf(connection) {
1100
1098
  return connectionInstanceId(connection.name, url, connection.instanceKey);
1101
1099
  }
1102
1100
  export {
1103
- mountConnections,
1104
- defineOpenApiConnection,
1105
- defineMcpClientConnection,
1106
- ConnectionUrlError,
1107
- ConnectionRequestError,
1101
+ ConnectionAuthorizationRequiredError,
1108
1102
  ConnectionBudgetExceededError,
1109
- ConnectionAuthorizationRequiredError
1103
+ ConnectionRequestError,
1104
+ ConnectionUrlError,
1105
+ defineMcpClientConnection,
1106
+ defineOpenApiConnection,
1107
+ mountConnections
1110
1108
  };
@@ -1,24 +1,22 @@
1
1
  import {
2
- AsyncOperationCancelResultSchema,
3
- McpAnnotationsSchema,
4
- McpMediaContentSchema,
5
- ViewFileErrorSchema,
6
- ViewFileInputSchema,
7
- ViewFileOutputSchema,
8
- createAsyncOperationSnapshotSchema
9
- } from "../../index-m9zn6cpq.js";
2
+ AsyncOperationCancelResultSchema2,
3
+ createAsyncOperationSnapshotSchema2,
4
+ McpAnnotationsSchema2,
5
+ McpMediaContentSchema2,
6
+ ViewFileErrorSchema2,
7
+ ViewFileOutputSchema2,
8
+ ViewFileInputSchema2
9
+ } from "../../index-5107q189.js";
10
10
  import {
11
- coerceJsonArgs
12
- } from "../../index-1zbbzgfh.js";
13
- import"../../index-kzfs85xp.js";
14
- import"../../index-hffjpmq9.js";
11
+ coerceJsonArgs2
12
+ } from "../../index-9pw0a51a.js";
15
13
  export {
16
- createAsyncOperationSnapshotSchema,
17
- coerceJsonArgs,
18
- ViewFileOutputSchema,
19
- ViewFileInputSchema,
20
- ViewFileErrorSchema,
21
- McpMediaContentSchema,
22
- McpAnnotationsSchema,
23
- AsyncOperationCancelResultSchema
14
+ AsyncOperationCancelResultSchema2 as AsyncOperationCancelResultSchema,
15
+ McpAnnotationsSchema2 as McpAnnotationsSchema,
16
+ McpMediaContentSchema2 as McpMediaContentSchema,
17
+ ViewFileErrorSchema2 as ViewFileErrorSchema,
18
+ ViewFileInputSchema2 as ViewFileInputSchema,
19
+ ViewFileOutputSchema2 as ViewFileOutputSchema,
20
+ coerceJsonArgs2 as coerceJsonArgs,
21
+ createAsyncOperationSnapshotSchema2 as createAsyncOperationSnapshotSchema
24
22
  };
@@ -1,20 +1,15 @@
1
+ import"../../index-n53mswt3.js";
2
+ import"../../index-b2bz0kdm.js";
3
+ import"../../index-dvwj1f43.js";
4
+ import"../../index-hby4qhax.js";
5
+ import"../../index-9pw0a51a.js";
6
+ import"../../index-ct75c3at.js";
7
+ import"../../index-7z9ym7t8.js";
8
+ import"../../index-n9tyz8z3.js";
1
9
  import {
2
- createToolInvoker
3
- } from "../../index-5p2m7we1.js";
4
- import"../../index-bm5rx7n6.js";
5
- import"../../index-8qt2m66q.js";
6
- import"../../index-zfrhfn82.js";
7
- import"../../index-35mh5bhj.js";
8
- import"../../index-zcgf3gqf.js";
9
- import"../../index-1zbbzgfh.js";
10
- import"../../index-0r0fbk7z.js";
11
- import"../../index-eqqvgdb3.js";
12
- import"../../index-znfs20ss.js";
13
- import"../../index-p5r7qpdd.js";
14
- import"../../index-2vtcmrj9.js";
15
- import"../../index-k5hsfc3j.js";
16
- import"../../index-kzfs85xp.js";
17
- import"../../index-hffjpmq9.js";
10
+ createToolInvoker2
11
+ } from "../../index-m9fndta6.js";
12
+ import"../../index-r1z0rd9c.js";
18
13
  export {
19
- createToolInvoker
14
+ createToolInvoker2 as createToolInvoker
20
15
  };