stitchkit 0.122.1 → 0.123.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 (201) hide show
  1. package/CHANGELOG.md +93 -0
  2. package/dist/agent-runtime/deferred-tool-search.d.ts.map +1 -1
  3. package/dist/agent-runtime/deferred-tool-types.d.ts.map +1 -1
  4. package/dist/browser/client.d.ts.map +1 -1
  5. package/dist/browser/contract-identity.d.ts +21 -0
  6. package/dist/browser/contract-identity.d.ts.map +1 -0
  7. package/dist/browser/unknown-operation.d.ts +3 -0
  8. package/dist/browser/unknown-operation.d.ts.map +1 -0
  9. package/dist/contract/define.d.ts +6 -2
  10. package/dist/contract/define.d.ts.map +1 -1
  11. package/dist/contract/endpoint-capabilities.d.ts.map +1 -1
  12. package/dist/contract/errors.d.ts +4 -0
  13. package/dist/contract/errors.d.ts.map +1 -1
  14. package/dist/contract/fingerprint.d.ts +51 -0
  15. package/dist/contract/fingerprint.d.ts.map +1 -0
  16. package/dist/contract/identity.d.ts +21 -0
  17. package/dist/contract/identity.d.ts.map +1 -0
  18. package/dist/contract/stream.d.ts +32 -0
  19. package/dist/contract/stream.d.ts.map +1 -1
  20. package/dist/entrypoints/agent-runtime/browser.js +2 -2
  21. package/dist/entrypoints/agent-runtime/coding-tools.js +11 -11
  22. package/dist/entrypoints/agent-runtime/harness.js +12 -12
  23. package/dist/entrypoints/agent-runtime/openrouter.js +1 -1
  24. package/dist/entrypoints/agent-runtime/realtime.js +2 -2
  25. package/dist/entrypoints/agent-runtime/sandbox.js +11 -11
  26. package/dist/entrypoints/agent-runtime/sqlite/bun.js +15 -15
  27. package/dist/entrypoints/agent-runtime/sqlite/node.js +15 -15
  28. package/dist/entrypoints/agent-runtime/testing.js +15 -15
  29. package/dist/entrypoints/agent-runtime.js +26 -25
  30. package/dist/entrypoints/application/diagnostic-journal.js +5 -5
  31. package/dist/entrypoints/application/directory-inbox.js +5 -5
  32. package/dist/entrypoints/application/grammy.js +1 -1
  33. package/dist/entrypoints/application.js +7 -7
  34. package/dist/entrypoints/cli/publish.js +5 -5
  35. package/dist/entrypoints/cli.d.ts +1 -1
  36. package/dist/entrypoints/cli.d.ts.map +1 -1
  37. package/dist/entrypoints/cli.js +20 -17
  38. package/dist/entrypoints/contract.d.ts +2 -0
  39. package/dist/entrypoints/contract.d.ts.map +1 -1
  40. package/dist/entrypoints/contract.js +11 -5
  41. package/dist/entrypoints/files/packaging.d.ts +1 -0
  42. package/dist/entrypoints/files/packaging.d.ts.map +1 -1
  43. package/dist/entrypoints/files/packaging.js +230 -61
  44. package/dist/entrypoints/files.js +5 -5
  45. package/dist/entrypoints/geo.js +3 -3
  46. package/dist/entrypoints/http.js +3 -3
  47. package/dist/entrypoints/index.d.ts +1 -0
  48. package/dist/entrypoints/index.d.ts.map +1 -1
  49. package/dist/entrypoints/index.js +45 -24
  50. package/dist/entrypoints/live.js +2 -2
  51. package/dist/entrypoints/node.js +11 -11
  52. package/dist/entrypoints/observability.js +4 -4
  53. package/dist/entrypoints/primitives.js +1 -1
  54. package/dist/entrypoints/process/owner-loss.js +2 -2
  55. package/dist/entrypoints/process.d.ts +6 -1
  56. package/dist/entrypoints/process.d.ts.map +1 -1
  57. package/dist/entrypoints/process.js +370 -9
  58. package/dist/entrypoints/react.js +2 -2
  59. package/dist/entrypoints/realtime.js +3 -3
  60. package/dist/entrypoints/remote.js +20 -10
  61. package/dist/entrypoints/server.d.ts +1 -0
  62. package/dist/entrypoints/server.d.ts.map +1 -1
  63. package/dist/entrypoints/server.js +56 -20
  64. package/dist/entrypoints/telegram/screens.js +4 -4
  65. package/dist/entrypoints/telegram.js +6 -6
  66. package/dist/entrypoints/testing.js +10 -10
  67. package/dist/entrypoints/tools/agent.js +9 -9
  68. package/dist/entrypoints/tools/connections.js +7 -7
  69. package/dist/entrypoints/tools/contract.js +1 -1
  70. package/dist/entrypoints/tools/invoker.js +7 -7
  71. package/dist/entrypoints/tools/mcp.js +9 -9
  72. package/dist/entrypoints/tools/toolkit.js +15 -14
  73. package/dist/entrypoints/tools.js +17 -17
  74. package/dist/entrypoints/tracking/contract.js +2 -2
  75. package/dist/entrypoints/tracking.js +1 -1
  76. package/dist/files/client-artifact.d.ts +75 -0
  77. package/dist/files/client-artifact.d.ts.map +1 -0
  78. package/dist/{index-am1h8c9v.js → index-0d3sm0m9.js} +5 -5
  79. package/dist/{index-72xtvcvr.js → index-0ndz5r8z.js} +1 -1
  80. package/dist/index-0v9xb8pz.js +66 -0
  81. package/dist/{index-qcn84byh.js → index-0w0hxp7n.js} +4 -0
  82. package/dist/{index-3za04re9.js → index-1c945ten.js} +1 -1
  83. package/dist/{index-r6v4mc67.js → index-1d7s7da0.js} +1 -1
  84. package/dist/{index-zsvzhjtk.js → index-20hn8pbh.js} +1 -1
  85. package/dist/{index-f6pw75e1.js → index-2x2ch0bt.js} +2 -2
  86. package/dist/{index-61hve0ez.js → index-303qne11.js} +1 -1
  87. package/dist/{index-g149e9pk.js → index-3bzk2645.js} +1 -1
  88. package/dist/index-45dyex0j.js +119 -0
  89. package/dist/{index-nwm3ww60.js → index-64b2dxqz.js} +1 -1
  90. package/dist/{index-aqwg2dm5.js → index-6k47xdtt.js} +2 -2
  91. package/dist/index-7q05ag0z.js +10 -0
  92. package/dist/{index-kz9734jc.js → index-96yjwwgf.js} +6 -5
  93. package/dist/{index-ff39f9dr.js → index-993vtv1w.js} +3 -3
  94. package/dist/{index-4jpykzvw.js → index-99nnsz39.js} +2 -2
  95. package/dist/{index-pfvde2fz.js → index-9ypczvpj.js} +1 -1
  96. package/dist/{index-qch1vcaa.js → index-a7ebd769.js} +2 -2
  97. package/dist/{index-98hv3sba.js → index-aw6kx2e6.js} +1 -1
  98. package/dist/{index-yj6saztf.js → index-bz9cmnqq.js} +96 -14
  99. package/dist/{index-mtwh9hyp.js → index-cjzaj7ev.js} +1 -1
  100. package/dist/{index-gtx3eknx.js → index-dv7pa9w6.js} +2 -2
  101. package/dist/{index-sa99p98w.js → index-eabx6qjh.js} +3 -3
  102. package/dist/{index-8yxgcyt6.js → index-egg0yp2j.js} +1 -1
  103. package/dist/{index-h1j71dr1.js → index-enkc9pem.js} +1 -1
  104. package/dist/{index-aqmadanx.js → index-fa53vygr.js} +2 -2
  105. package/dist/{index-e6c2spsd.js → index-fpwbskp2.js} +1 -1
  106. package/dist/{index-m8a44e64.js → index-ftk3838x.js} +1 -1
  107. package/dist/{index-j95jp7ee.js → index-gdqawggb.js} +1 -1
  108. package/dist/{index-9dyd8xzf.js → index-hkw233vx.js} +2 -2
  109. package/dist/{index-9jfdm5tg.js → index-hkxgennw.js} +7 -1
  110. package/dist/{index-qaqxdbxf.js → index-j8rda9n6.js} +7 -7
  111. package/dist/{index-4tyt1qya.js → index-jc5xgkpk.js} +2 -2
  112. package/dist/{index-s9a0fjh3.js → index-kffm4r8w.js} +1 -1
  113. package/dist/{index-5w6t91ze.js → index-m8ddk770.js} +1 -1
  114. package/dist/{index-2fc1k9k2.js → index-mdyhr36s.js} +32 -122
  115. package/dist/{index-r7a7r7ha.js → index-mfntvj58.js} +6 -3
  116. package/dist/{index-gq3fnq3f.js → index-n90tkkcv.js} +2 -2
  117. package/dist/{index-k42ckyzx.js → index-ndjzbt2v.js} +2 -2
  118. package/dist/{index-ycqhyars.js → index-qc7tq0za.js} +3 -3
  119. package/dist/{index-9frf01t9.js → index-r0xr7y4m.js} +1 -1
  120. package/dist/{index-s3yxw6kt.js → index-s512scra.js} +9 -7
  121. package/dist/{index-1h2zv8rx.js → index-sqc6ezrb.js} +41 -1
  122. package/dist/{index-2bqf0a74.js → index-sqkttz7z.js} +1 -1
  123. package/dist/{index-rbzq0q16.js → index-t8jz0e20.js} +1 -1
  124. package/dist/{index-8ryydawp.js → index-tt3ej8r3.js} +1 -1
  125. package/dist/{index-x4p3kw1p.js → index-tynna0n4.js} +6 -6
  126. package/dist/{index-72r9k0av.js → index-v62cpkx3.js} +1 -1
  127. package/dist/{index-10rg78vf.js → index-v8xm2s9v.js} +2 -2
  128. package/dist/{index-y6ye582c.js → index-w0wy05gr.js} +10 -10
  129. package/dist/{index-kw1ws0cs.js → index-w3nv6kr8.js} +1 -1
  130. package/dist/{index-eeahxwvg.js → index-ww3gss55.js} +1 -1
  131. package/dist/{index-6j15ktag.js → index-wzqd6pen.js} +1 -1
  132. package/dist/{index-aswegq1r.js → index-xjb131sc.js} +367 -131
  133. package/dist/{index-1fyea34p.js → index-yebkpytc.js} +5 -5
  134. package/dist/{index-bgcwxhxh.js → index-yfpt7sxr.js} +24 -46
  135. package/dist/{index-69t14s4a.js → index-yt1gg11x.js} +3 -2
  136. package/dist/{index-jk29rwkr.js → index-zfncctjp.js} +1 -1
  137. package/dist/internal/stable-digest.d.ts +5 -0
  138. package/dist/internal/stable-digest.d.ts.map +1 -1
  139. package/dist/internal/typed.d.ts +2 -0
  140. package/dist/internal/typed.d.ts.map +1 -1
  141. package/dist/process/operation-child.d.ts +38 -0
  142. package/dist/process/operation-child.d.ts.map +1 -0
  143. package/dist/process/operation-wire.d.ts +68 -0
  144. package/dist/process/operation-wire.d.ts.map +1 -0
  145. package/dist/process/operation.d.ts +74 -0
  146. package/dist/process/operation.d.ts.map +1 -0
  147. package/dist/server/contract-identity.d.ts +10 -0
  148. package/dist/server/contract-identity.d.ts.map +1 -0
  149. package/dist/server/contract-stream.d.ts.map +1 -1
  150. package/dist/server/endpoint-response.d.ts.map +1 -1
  151. package/dist/server/error-hook.d.ts +1 -0
  152. package/dist/server/error-hook.d.ts.map +1 -1
  153. package/dist/tools/cli/args-route.d.ts.map +1 -1
  154. package/dist/tools/cli/args-tokens.d.ts.map +1 -1
  155. package/dist/tools/cli/command.d.ts +39 -18
  156. package/dist/tools/cli/command.d.ts.map +1 -1
  157. package/dist/tools/cli/format.d.ts.map +1 -1
  158. package/dist/tools/cli/help.d.ts.map +1 -1
  159. package/dist/tools/cli/invoke.d.ts +3 -1
  160. package/dist/tools/cli/invoke.d.ts.map +1 -1
  161. package/dist/tools/cli/io.d.ts +6 -0
  162. package/dist/tools/cli/io.d.ts.map +1 -1
  163. package/dist/tools/cli/managed-surface.d.ts +2 -0
  164. package/dist/tools/cli/managed-surface.d.ts.map +1 -1
  165. package/dist/tools/cli/policy.d.ts +14 -0
  166. package/dist/tools/cli/policy.d.ts.map +1 -1
  167. package/dist/tools/cli/run-managed.d.ts.map +1 -1
  168. package/dist/tools/cli/run-native.d.ts.map +1 -1
  169. package/dist/tools/cli/run-stream.d.ts +23 -0
  170. package/dist/tools/cli/run-stream.d.ts.map +1 -0
  171. package/dist/tools/cli/session.d.ts +8 -0
  172. package/dist/tools/cli/session.d.ts.map +1 -1
  173. package/dist/tools/cli/stream-surface.d.ts +17 -0
  174. package/dist/tools/cli/stream-surface.d.ts.map +1 -0
  175. package/dist/tools/execute.d.ts +7 -1
  176. package/dist/tools/execute.d.ts.map +1 -1
  177. package/dist/tools/invoker.d.ts.map +1 -1
  178. package/dist/tools/remote.d.ts.map +1 -1
  179. package/llms/agent-runtime.2.txt +632 -745
  180. package/llms/agent-runtime.3.txt +733 -492
  181. package/llms/agent-runtime.4.txt +521 -88
  182. package/llms/agent-runtime.5.txt +114 -0
  183. package/llms/agent-runtime.txt +4 -655
  184. package/llms/cli.2.txt +56 -1
  185. package/llms/cli.txt +68 -1
  186. package/llms/contract.txt +4 -1
  187. package/llms/files-packaging.txt +10 -0
  188. package/llms/process.2.txt +75 -1
  189. package/llms/process.txt +59 -25
  190. package/llms/server.4.txt +8 -4
  191. package/llms/server.5.txt +1 -0
  192. package/llms/stitchkit.2.txt +74 -0
  193. package/llms/stitchkit.txt +5 -5
  194. package/llms/tools.txt +1 -1
  195. package/llms/{upgrading-0.106.0-0.122.0.txt → upgrading-0.106.0-0.123.0.txt} +50 -3
  196. package/llms/upgrading.txt +1 -1
  197. package/llms-full.txt +384 -14
  198. package/llms.txt +8 -8
  199. package/package.json +1 -1
  200. package/dist/index-h2fhjqy7.js +0 -19
  201. package/dist/index-m5m9rmvt.js +0 -44
@@ -1,13 +1,13 @@
1
- import"../index-m5m9rmvt.js";
2
- import"../index-gq3fnq3f.js";
3
- import"../index-gtx3eknx.js";
1
+ import"../index-sqc6ezrb.js";
2
+ import"../index-n90tkkcv.js";
3
+ import"../index-dv7pa9w6.js";
4
4
  import {
5
5
  errorCode2,
6
6
  normalizeError2
7
- } from "../index-k42ckyzx.js";
7
+ } from "../index-ndjzbt2v.js";
8
8
  import {
9
9
  DEFAULT_CONTRACT_STREAM_FRAME_BYTES2
10
- } from "../index-h2fhjqy7.js";
10
+ } from "../index-0v9xb8pz.js";
11
11
  import {
12
12
  joinRoutePath,
13
13
  parseTrailingWildcard
@@ -19,15 +19,18 @@ import {
19
19
  ShutdownResultSchema2,
20
20
  createServerLifecycle
21
21
  } from "../index-9mjrnqxs.js";
22
- import"../index-69t14s4a.js";
22
+ import {
23
+ fingerprintOperations,
24
+ contractIdentityContract2
25
+ } from "../index-bz9cmnqq.js";
26
+ import"../index-yt1gg11x.js";
27
+ import"../index-99nnsz39.js";
23
28
  import {
24
29
  toJsonSchema,
25
30
  jsonSchemaFields
26
31
  } from "../index-ct75c3at.js";
27
- import"../index-3za04re9.js";
32
+ import"../index-1c945ten.js";
28
33
  import"../index-4s0fep5q.js";
29
- import"../index-4jpykzvw.js";
30
- import"../index-yj6saztf.js";
31
34
  import"../index-xqhede6x.js";
32
35
  import {
33
36
  contextContributionDelta,
@@ -50,14 +53,14 @@ import {
50
53
  socketIoLane2,
51
54
  UnixClientTransportError2,
52
55
  createUnixClientTransport2
53
- } from "../index-bgcwxhxh.js";
56
+ } from "../index-yfpt7sxr.js";
54
57
  import {
55
58
  createFileStateStore2
56
- } from "../index-6j15ktag.js";
59
+ } from "../index-wzqd6pen.js";
57
60
  import {
58
61
  bindRealtimeServer2
59
- } from "../index-2bqf0a74.js";
60
- import"../index-nwm3ww60.js";
62
+ } from "../index-sqkttz7z.js";
63
+ import"../index-64b2dxqz.js";
61
64
  import {
62
65
  withDeadline
63
66
  } from "../index-9tqbxv5p.js";
@@ -68,18 +71,18 @@ import {
68
71
  verifyJwt2,
69
72
  signJwt2,
70
73
  verifyPkce2
71
- } from "../index-9dyd8xzf.js";
74
+ } from "../index-hkw233vx.js";
72
75
  import {
73
76
  defineMultipartStream2,
74
77
  createMultipartStream2,
75
78
  implement2,
76
79
  createImplement2,
77
80
  createScopedImplement2
78
- } from "../index-sa99p98w.js";
81
+ } from "../index-eabx6qjh.js";
79
82
  import {
80
83
  deriveCodeChallenge2
81
84
  } from "../index-ap3gqe56.js";
82
- import"../index-pfvde2fz.js";
85
+ import"../index-9ypczvpj.js";
83
86
  import {
84
87
  DEFAULT_CORS_ALLOW_HEADERS2,
85
88
  DEFAULT_CORS_EXPOSE_HEADERS2,
@@ -88,7 +91,7 @@ import {
88
91
  } from "../index-pq7rkwkk.js";
89
92
  import {
90
93
  getTraceId2
91
- } from "../index-r6v4mc67.js";
94
+ } from "../index-1d7s7da0.js";
92
95
  import {
93
96
  generateTraceId2,
94
97
  resolveTraceId2,
@@ -96,7 +99,7 @@ import {
96
99
  extractIp2,
97
100
  getClientInfo2,
98
101
  isPublicIp2
99
- } from "../index-kw1ws0cs.js";
102
+ } from "../index-w3nv6kr8.js";
100
103
  import {
101
104
  isWithinDir2,
102
105
  realPathWithinDir
@@ -126,10 +129,10 @@ import {
126
129
  STITCH_ERROR_STATUS2,
127
130
  isStitchErrorCode2,
128
131
  appError2
129
- } from "../index-qcn84byh.js";
132
+ } from "../index-0w0hxp7n.js";
130
133
  import {
131
134
  isRecord
132
- } from "../index-9jfdm5tg.js";
135
+ } from "../index-hkxgennw.js";
133
136
  // src/realtime/registry.ts
134
137
  var authorizedRoom = Symbol("stitchkit.authorized-room");
135
138
  function freezeRoom(name) {
@@ -680,6 +683,38 @@ function cacheHeaders(maxAge, scope = "public") {
680
683
  "Cache-Control": `${scope}, max-age=${maxAge}`
681
684
  };
682
685
  }
686
+ // src/server/contract-identity.ts
687
+ function serviceOperations(services) {
688
+ const operations = [];
689
+ for (const service of services) {
690
+ for (const method of Object.values(service.methods)) {
691
+ if (method.expose && !method.expose.includes("HTTP"))
692
+ continue;
693
+ operations.push({
694
+ name: `${method.serviceName}.${method.key}`,
695
+ method: method.method,
696
+ path: method.path,
697
+ params: method.paramsSchema,
698
+ input: method.inputSchema,
699
+ output: method.outputSchema,
700
+ item: method.stream?.item
701
+ });
702
+ }
703
+ }
704
+ return operations;
705
+ }
706
+ function withContractIdentity(services) {
707
+ let fingerprint;
708
+ return [
709
+ ...services,
710
+ implement2(contractIdentityContract2, {
711
+ read: () => {
712
+ fingerprint ??= fingerprintOperations(serviceOperations(services));
713
+ return fingerprint;
714
+ }
715
+ })
716
+ ];
717
+ }
683
718
  // src/server/error-hook.ts
684
719
  function createErrorHook(config) {
685
720
  if (config.vocabulary && (config.codeMap !== undefined || config.unmappedCode !== undefined)) {
@@ -1950,5 +1985,6 @@ export {
1950
1985
  verifyPkce2 as verifyPkce,
1951
1986
  weakETag,
1952
1987
  webSocketLane2 as webSocketLane,
1988
+ withContractIdentity,
1953
1989
  zodIssues2 as zodIssues
1954
1990
  };
@@ -4,7 +4,7 @@ import {
4
4
  } from "../../index-m38ej7e5.js";
5
5
  import {
6
6
  classifyTelegramEditRefusal
7
- } from "../../index-61hve0ez.js";
7
+ } from "../../index-303qne11.js";
8
8
  import {
9
9
  checkTelegramHtml2
10
10
  } from "../../index-rz3z13e9.js";
@@ -18,7 +18,7 @@ import {
18
18
  } from "../../index-sykb5ag7.js";
19
19
  import {
20
20
  argumentsDigest
21
- } from "../../index-r7a7r7ha.js";
21
+ } from "../../index-mfntvj58.js";
22
22
  import {
23
23
  bytesToBase64Url,
24
24
  base64UrlToBytes
@@ -31,11 +31,11 @@ import {
31
31
  } from "../../index-eemvahkc.js";
32
32
  import {
33
33
  compareCodeUnits
34
- } from "../../index-zsvzhjtk.js";
34
+ } from "../../index-20hn8pbh.js";
35
35
  import {
36
36
  isRecord,
37
37
  transportResult
38
- } from "../../index-9jfdm5tg.js";
38
+ } from "../../index-hkxgennw.js";
39
39
 
40
40
  // src/telegram/screens/html.ts
41
41
  var MINT = Symbol("TelegramHtml");
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  backoffDelay
3
3
  } from "../index-g6a3na27.js";
4
- import"../index-m5m9rmvt.js";
5
- import"../index-gq3fnq3f.js";
4
+ import"../index-sqc6ezrb.js";
5
+ import"../index-n90tkkcv.js";
6
6
  import {
7
7
  attemptExclusiveLock
8
- } from "../index-gtx3eknx.js";
8
+ } from "../index-dv7pa9w6.js";
9
9
  import {
10
10
  TELEGRAM_SEND_FAILURE_REASONS2,
11
11
  classifyTelegramSendFailure2
12
- } from "../index-61hve0ez.js";
12
+ } from "../index-303qne11.js";
13
13
  import {
14
14
  TelegramNotDispatchedError2,
15
15
  isTelegramNotDispatchedError
@@ -23,7 +23,7 @@ import {
23
23
  } from "../index-sznqf8fx.js";
24
24
  import {
25
25
  argumentsDigest
26
- } from "../index-r7a7r7ha.js";
26
+ } from "../index-mfntvj58.js";
27
27
  import {
28
28
  writeFileAtomic2
29
29
  } from "../index-ac6vvm30.js";
@@ -46,7 +46,7 @@ import {
46
46
  import {
47
47
  isRecord,
48
48
  transportResult
49
- } from "../index-9jfdm5tg.js";
49
+ } from "../index-hkxgennw.js";
50
50
 
51
51
  // src/telegram/bot-api.ts
52
52
  var TELEGRAM_BOT_TOKEN_PATTERN = BOT_TOKEN_SECRET;
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  joinRoutePath
3
3
  } from "../index-m38ej7e5.js";
4
- import"../index-h2fhjqy7.js";
5
- import"../index-9frf01t9.js";
4
+ import"../index-0v9xb8pz.js";
5
+ import"../index-r0xr7y4m.js";
6
6
  import"../index-9mjrnqxs.js";
7
7
  import {
8
8
  createApplication2
9
- } from "../index-mtwh9hyp.js";
9
+ } from "../index-cjzaj7ev.js";
10
10
  import"../index-w5s3xftz.js";
11
11
  import {
12
12
  RealtimeRequestTimeoutError2,
@@ -15,8 +15,8 @@ import {
15
15
  } from "../index-4s0fep5q.js";
16
16
  import {
17
17
  TOOL_TRANSPORTS2
18
- } from "../index-69t14s4a.js";
19
- import"../index-4jpykzvw.js";
18
+ } from "../index-yt1gg11x.js";
19
+ import"../index-99nnsz39.js";
20
20
  import {
21
21
  RealtimeRejectDirectionSchema,
22
22
  RealtimeRejectPhaseSchema,
@@ -31,22 +31,22 @@ import {
31
31
  projectToolSurface,
32
32
  mcpProjectionCandidate,
33
33
  prepareProjectedMcpTools
34
- } from "../index-x4p3kw1p.js";
35
- import"../index-k42ckyzx.js";
34
+ } from "../index-tynna0n4.js";
35
+ import"../index-ndjzbt2v.js";
36
36
  import {
37
37
  createClient2,
38
38
  createClients2
39
- } from "../index-2fc1k9k2.js";
39
+ } from "../index-mdyhr36s.js";
40
40
  import {
41
41
  assertPositiveSafeInteger
42
42
  } from "../index-0s4xebbg.js";
43
43
  import {
44
44
  compareCodeUnits,
45
45
  serializeCanonicalJson
46
- } from "../index-zsvzhjtk.js";
46
+ } from "../index-20hn8pbh.js";
47
47
  import {
48
48
  isRecord
49
- } from "../index-9jfdm5tg.js";
49
+ } from "../index-hkxgennw.js";
50
50
 
51
51
  // src/testing/handler-clients.ts
52
52
  function resolveTestBaseUrl(origin, pathPrefix) {
@@ -1,16 +1,16 @@
1
- import"../../index-k42ckyzx.js";
1
+ import"../../index-ndjzbt2v.js";
2
2
  import"../../index-dsa676h8.js";
3
- import"../../index-rbzq0q16.js";
3
+ import"../../index-t8jz0e20.js";
4
4
  import"../../index-ct75c3at.js";
5
- import"../../index-x4p3kw1p.js";
6
- import"../../index-s3yxw6kt.js";
7
- import"../../index-69t14s4a.js";
8
- import"../../index-ycqhyars.js";
5
+ import"../../index-tynna0n4.js";
6
+ import"../../index-s512scra.js";
7
+ import"../../index-yt1gg11x.js";
8
+ import"../../index-qc7tq0za.js";
9
9
  import {
10
10
  mountAgent2
11
- } from "../../index-1fyea34p.js";
12
- import"../../index-ff39f9dr.js";
13
- import"../../index-aqwg2dm5.js";
11
+ } from "../../index-yebkpytc.js";
12
+ import"../../index-993vtv1w.js";
13
+ import"../../index-6k47xdtt.js";
14
14
  export {
15
15
  mountAgent2 as mountAgent
16
16
  };
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  readDiscoveredToolAnnotations
3
3
  } from "../../index-332d0m9g.js";
4
- import"../../index-69t14s4a.js";
4
+ import"../../index-yt1gg11x.js";
5
5
  import"../../index-ct75c3at.js";
6
6
  import {
7
7
  declaresDraft07,
8
8
  withDraft2020Keywords
9
- } from "../../index-x4p3kw1p.js";
10
- import"../../index-k42ckyzx.js";
9
+ } from "../../index-tynna0n4.js";
10
+ import"../../index-ndjzbt2v.js";
11
11
  import {
12
12
  markJsonSchemaObjectGuards,
13
13
  markRemoteSchemaVerdict
@@ -17,10 +17,10 @@ import {
17
17
  } from "../../index-9tqbxv5p.js";
18
18
  import {
19
19
  defineRuntimeTool2
20
- } from "../../index-aqwg2dm5.js";
20
+ } from "../../index-6k47xdtt.js";
21
21
  import {
22
22
  TOOL_ERROR_PROJECTION
23
- } from "../../index-98hv3sba.js";
23
+ } from "../../index-aw6kx2e6.js";
24
24
  import {
25
25
  raceAbort
26
26
  } from "../../index-b0kddvzw.js";
@@ -41,10 +41,10 @@ import {
41
41
  AppError2,
42
42
  STITCH_ERROR_STATUS2,
43
43
  isRetryableStatus2
44
- } from "../../index-qcn84byh.js";
44
+ } from "../../index-0w0hxp7n.js";
45
45
  import {
46
46
  isRecord
47
- } from "../../index-9jfdm5tg.js";
47
+ } from "../../index-hkxgennw.js";
48
48
 
49
49
  // src/tools/connections/errors.ts
50
50
  class ConnectionAuthorizationRequiredError extends Error {
@@ -9,7 +9,7 @@ import {
9
9
  } from "../../index-sba3e6m4.js";
10
10
  import {
11
11
  coerceJsonArgs2
12
- } from "../../index-rbzq0q16.js";
12
+ } from "../../index-t8jz0e20.js";
13
13
  import"../../index-dsa676h8.js";
14
14
  export {
15
15
  AsyncOperationCancelResultSchema2 as AsyncOperationCancelResultSchema,
@@ -1,14 +1,14 @@
1
- import"../../index-k42ckyzx.js";
1
+ import"../../index-ndjzbt2v.js";
2
2
  import"../../index-dsa676h8.js";
3
- import"../../index-rbzq0q16.js";
3
+ import"../../index-t8jz0e20.js";
4
4
  import"../../index-ct75c3at.js";
5
- import"../../index-x4p3kw1p.js";
6
- import"../../index-s3yxw6kt.js";
7
- import"../../index-69t14s4a.js";
8
- import"../../index-ycqhyars.js";
5
+ import"../../index-tynna0n4.js";
6
+ import"../../index-s512scra.js";
7
+ import"../../index-yt1gg11x.js";
8
+ import"../../index-qc7tq0za.js";
9
9
  import {
10
10
  createToolInvoker2
11
- } from "../../index-kz9734jc.js";
11
+ } from "../../index-96yjwwgf.js";
12
12
  export {
13
13
  createToolInvoker2 as createToolInvoker
14
14
  };
@@ -1,12 +1,12 @@
1
1
  import"../../index-ct75c3at.js";
2
2
  import"../../index-332d0m9g.js";
3
- import"../../index-k42ckyzx.js";
3
+ import"../../index-ndjzbt2v.js";
4
4
  import"../../index-dsa676h8.js";
5
- import"../../index-rbzq0q16.js";
6
- import"../../index-x4p3kw1p.js";
7
- import"../../index-s3yxw6kt.js";
8
- import"../../index-69t14s4a.js";
9
- import"../../index-ycqhyars.js";
5
+ import"../../index-t8jz0e20.js";
6
+ import"../../index-tynna0n4.js";
7
+ import"../../index-s512scra.js";
8
+ import"../../index-yt1gg11x.js";
9
+ import"../../index-qc7tq0za.js";
10
10
  import {
11
11
  RESOURCE_MIME_TYPE2,
12
12
  EXT_APPS_BUNDLE_PLACEHOLDER2,
@@ -21,15 +21,15 @@ import {
21
21
  createMcpHandler2,
22
22
  createMcpHttpRoute2,
23
23
  createStdioMcpServer2
24
- } from "../../index-y6ye582c.js";
24
+ } from "../../index-w0wy05gr.js";
25
25
  import {
26
26
  DEFAULT_PROCESS_SIGNALS,
27
27
  defaultSignalSource,
28
28
  reportSignalError,
29
29
  guardSignalCallback
30
30
  } from "../../index-3prvb42w.js";
31
- import"../../index-ff39f9dr.js";
32
- import"../../index-aqwg2dm5.js";
31
+ import"../../index-993vtv1w.js";
32
+ import"../../index-6k47xdtt.js";
33
33
  // src/tools/mcp/stdio-signals.ts
34
34
  var bound = new WeakSet;
35
35
  function bindStdioProcessSignals(handle, options = {}) {
@@ -1,29 +1,30 @@
1
- import"../../index-k42ckyzx.js";
1
+ import"../../index-ndjzbt2v.js";
2
2
  import"../../index-dsa676h8.js";
3
- import"../../index-rbzq0q16.js";
3
+ import"../../index-t8jz0e20.js";
4
4
  import"../../index-ct75c3at.js";
5
- import"../../index-x4p3kw1p.js";
6
- import"../../index-s3yxw6kt.js";
7
- import"../../index-69t14s4a.js";
8
- import"../../index-ycqhyars.js";
5
+ import"../../index-tynna0n4.js";
6
+ import"../../index-s512scra.js";
7
+ import"../../index-yt1gg11x.js";
8
+ import"../../index-qc7tq0za.js";
9
9
  import {
10
10
  mountAgent2
11
- } from "../../index-1fyea34p.js";
11
+ } from "../../index-yebkpytc.js";
12
12
  import {
13
13
  createCli2
14
- } from "../../index-aswegq1r.js";
14
+ } from "../../index-xjb131sc.js";
15
15
  import"../../index-332d0m9g.js";
16
- import"../../index-m5m9rmvt.js";
16
+ import"../../index-sqc6ezrb.js";
17
+ import"../../index-0v9xb8pz.js";
17
18
  import {
18
19
  mountMcp2,
19
20
  buildMcpServer2,
20
21
  createMcpHandler2,
21
22
  createStdioMcpServer2
22
- } from "../../index-y6ye582c.js";
23
- import"../../index-aqmadanx.js";
24
- import"../../index-eeahxwvg.js";
25
- import"../../index-ff39f9dr.js";
26
- import"../../index-aqwg2dm5.js";
23
+ } from "../../index-w0wy05gr.js";
24
+ import"../../index-fa53vygr.js";
25
+ import"../../index-ww3gss55.js";
26
+ import"../../index-993vtv1w.js";
27
+ import"../../index-6k47xdtt.js";
27
28
 
28
29
  // src/tools/toolkit.ts
29
30
  function createToolkit() {
@@ -6,11 +6,11 @@ import {
6
6
  } from "../index-zyc64nbh.js";
7
7
  import {
8
8
  normalizeError2
9
- } from "../index-k42ckyzx.js";
9
+ } from "../index-ndjzbt2v.js";
10
10
  import"../index-dsa676h8.js";
11
11
  import {
12
12
  coerceJsonArgs2
13
- } from "../index-rbzq0q16.js";
13
+ } from "../index-t8jz0e20.js";
14
14
  import"../index-ct75c3at.js";
15
15
  import {
16
16
  assertToolName,
@@ -19,22 +19,22 @@ import {
19
19
  findNonPortableFormats2,
20
20
  flattenToolJsonSchema2,
21
21
  findUntypedProperties2
22
- } from "../index-x4p3kw1p.js";
22
+ } from "../index-tynna0n4.js";
23
23
  import {
24
24
  ToolExecutionControlError2,
25
25
  isToolExecutionControlError2
26
- } from "../index-s3yxw6kt.js";
26
+ } from "../index-s512scra.js";
27
27
  import {
28
28
  ALL_TRANSPORTS2,
29
29
  TOOL_TRANSPORTS2
30
- } from "../index-69t14s4a.js";
30
+ } from "../index-yt1gg11x.js";
31
31
  import {
32
32
  collectTools2
33
- } from "../index-ycqhyars.js";
33
+ } from "../index-qc7tq0za.js";
34
34
  import"../index-m38ej7e5.js";
35
35
  import {
36
36
  defineContract2
37
- } from "../index-4jpykzvw.js";
37
+ } from "../index-99nnsz39.js";
38
38
  import {
39
39
  AsyncOperationCancelResultSchema2,
40
40
  createAsyncOperationSnapshotSchema2,
@@ -51,16 +51,16 @@ import {
51
51
  import {
52
52
  signJwt2,
53
53
  verifyPkce2
54
- } from "../index-9dyd8xzf.js";
54
+ } from "../index-hkw233vx.js";
55
55
  import {
56
56
  contractOnlyService,
57
57
  mediaTypeEssence
58
- } from "../index-sa99p98w.js";
59
- import"../index-pfvde2fz.js";
58
+ } from "../index-eabx6qjh.js";
59
+ import"../index-9ypczvpj.js";
60
60
  import {
61
61
  describeToolCatalog2,
62
62
  buildToolManifest2
63
- } from "../index-h1j71dr1.js";
63
+ } from "../index-enkc9pem.js";
64
64
  import {
65
65
  PROTECTED_RESOURCE_PATH2,
66
66
  protectedResourceMetadataUrl2,
@@ -77,21 +77,21 @@ import {
77
77
  } from "../index-1psbyyhj.js";
78
78
  import {
79
79
  createToolInvoker2
80
- } from "../index-kz9734jc.js";
80
+ } from "../index-96yjwwgf.js";
81
81
  import {
82
82
  WaitTimeoutError,
83
83
  runWaitOperation
84
84
  } from "../index-bph35vpy.js";
85
85
  import {
86
86
  collectToolSurface
87
- } from "../index-ff39f9dr.js";
87
+ } from "../index-993vtv1w.js";
88
88
  import {
89
89
  getTraceId2
90
- } from "../index-r6v4mc67.js";
90
+ } from "../index-1d7s7da0.js";
91
91
  import {
92
92
  defineRuntimeTool2,
93
93
  createRuntimeToolFactory2
94
- } from "../index-aqwg2dm5.js";
94
+ } from "../index-6k47xdtt.js";
95
95
  import {
96
96
  ManagedFileError2
97
97
  } from "../index-364k2zwa.js";
@@ -113,10 +113,10 @@ import {
113
113
  import {
114
114
  AppError2,
115
115
  STITCH_ERROR_STATUS2
116
- } from "../index-qcn84byh.js";
116
+ } from "../index-0w0hxp7n.js";
117
117
  import {
118
118
  isRecord
119
- } from "../index-9jfdm5tg.js";
119
+ } from "../index-hkxgennw.js";
120
120
  // src/server/oauth/cimd.ts
121
121
  import { z } from "zod";
122
122
  function isPlainDisplayCharacter(character) {
@@ -1,8 +1,8 @@
1
1
  import"../../index-m38ej7e5.js";
2
- import"../../index-69t14s4a.js";
2
+ import"../../index-yt1gg11x.js";
3
3
  import {
4
4
  defineContract2
5
- } from "../../index-4jpykzvw.js";
5
+ } from "../../index-99nnsz39.js";
6
6
 
7
7
  // src/tracking/schemas.ts
8
8
  import { z } from "zod";
@@ -9,7 +9,7 @@ import {
9
9
  } from "../index-kfjkb396.js";
10
10
  import {
11
11
  isRecord
12
- } from "../index-9jfdm5tg.js";
12
+ } from "../index-hkxgennw.js";
13
13
 
14
14
  // src/tracking/attribution.ts
15
15
  function isOptionalText(value) {
@@ -0,0 +1,75 @@
1
+ /** A module the artifact must not contain: a package name, or a pattern over the module path. */
2
+ export type ForbiddenModule = string | RegExp;
3
+ /** What `buildClientArtifact` builds from, where it writes and what it must refuse or prove. */
4
+ export interface ClientArtifactOptions {
5
+ /** The client's entry module. */
6
+ entry: string;
7
+ /** Where the self-contained file is written; `<outFile>.sha256` is written beside it. */
8
+ outFile: string;
9
+ /** The runtime the file is built for. Default `node`, which Bun also runs. */
10
+ runtime?: 'node' | 'bun' | 'browser';
11
+ /**
12
+ * Modules that must not be in the bundle. A bare or scoped name
13
+ * (`'chalk'`, `'@scope/name'`) is a package, matched by the specifier that
14
+ * imports it and by its installed path; a string with a slash is a fragment
15
+ * of the project's own source path (`'src/terminal/'`); a `RegExp` is tested
16
+ * against each module's absolute path.
17
+ */
18
+ forbiddenModules?: readonly ForbiddenModule[];
19
+ /**
20
+ * Also pack an npm archive and prove it: installed into an empty directory,
21
+ * imported by name, and exporting every name in `exports`.
22
+ */
23
+ package?: {
24
+ name: string;
25
+ version: string;
26
+ /** Directory the `.tgz` is written to. */
27
+ outDir: string;
28
+ /** Names the installed package must export. */
29
+ exports?: readonly string[];
30
+ };
31
+ /** The Bun executable that builds, packs and verifies. Default `bun` on `PATH`. */
32
+ executable?: string;
33
+ /** Deadline of each build, pack and verification step. Default 120 000 ms. */
34
+ timeoutMs?: number;
35
+ signal?: AbortSignal;
36
+ }
37
+ /** A built client: the file, its SHA-256, the modules inside it and the verified archive. */
38
+ export interface ClientArtifact {
39
+ /** Absolute path of the self-contained file. */
40
+ file: string;
41
+ /** Lowercase hex SHA-256 of the file. */
42
+ sha256: string;
43
+ bytes: number;
44
+ /** Absolute path of the `<sha256> <name>` file beside it. */
45
+ sha256File: string;
46
+ /** Absolute path of every module bundled into the file. */
47
+ modules: string[];
48
+ /** The verified npm archive, when `package` was asked for. */
49
+ package?: {
50
+ tarball: string;
51
+ sha256: string;
52
+ };
53
+ }
54
+ /** The refusal of a bundle that reaches a forbidden module. */
55
+ export declare class ForbiddenModuleError extends Error {
56
+ /** The forbidden module found in the bundle. */
57
+ readonly module: string;
58
+ /** A module that imports it, when the graph names one. */
59
+ readonly importedBy: string | undefined;
60
+ constructor(
61
+ /** The forbidden module found in the bundle. */
62
+ module: string,
63
+ /** A module that imports it, when the graph names one. */
64
+ importedBy: string | undefined);
65
+ }
66
+ /**
67
+ * Build one self-contained client file with its SHA-256, and optionally a
68
+ * verified npm archive of it.
69
+ *
70
+ * Nothing is left at `outFile` when the build is refused: a file from an
71
+ * earlier build is removed first, so a failed build cannot be mistaken for a
72
+ * fresh artifact.
73
+ */
74
+ export declare function buildClientArtifact(options: ClientArtifactOptions): Promise<ClientArtifact>;
75
+ //# sourceMappingURL=client-artifact.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client-artifact.d.ts","sourceRoot":"","sources":["../../src/files/client-artifact.ts"],"names":[],"mappings":"AAoBA,iGAAiG;AACjG,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,MAAM,CAAC;AAE9C,gGAAgG;AAChG,MAAM,WAAW,qBAAqB;IACpC,iCAAiC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,yFAAyF;IACzF,OAAO,EAAE,MAAM,CAAC;IAChB,8EAA8E;IAC9E,OAAO,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,SAAS,CAAC;IACrC;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,SAAS,eAAe,EAAE,CAAC;IAC9C;;;OAGG;IACH,OAAO,CAAC,EAAE;QACR,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;QAChB,0CAA0C;QAC1C,MAAM,EAAE,MAAM,CAAC;QACf,+CAA+C;QAC/C,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;KAC7B,CAAC;IACF,mFAAmF;IACnF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8EAA8E;IAC9E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED,6FAA6F;AAC7F,MAAM,WAAW,cAAc;IAC7B,gDAAgD;IAChD,IAAI,EAAE,MAAM,CAAC;IACb,yCAAyC;IACzC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,8DAA8D;IAC9D,UAAU,EAAE,MAAM,CAAC;IACnB,2DAA2D;IAC3D,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,8DAA8D;IAC9D,OAAO,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;CAC/C;AAED,+DAA+D;AAC/D,qBAAa,oBAAqB,SAAQ,KAAK;IAE3C,gDAAgD;IAChD,QAAQ,CAAC,MAAM,EAAE,MAAM;IACvB,0DAA0D;IAC1D,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS;IAJzC;IACE,gDAAgD;IACvC,MAAM,EAAE,MAAM;IACvB,0DAA0D;IACjD,UAAU,EAAE,MAAM,GAAG,SAAS,EAOxC;CACF;AAuGD;;;;;;;GAOG;AACH,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,qBAAqB,GAC7B,OAAO,CAAC,cAAc,CAAC,CA0DzB"}