stitchkit 0.118.1 → 0.120.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 (180) hide show
  1. package/CHANGELOG.md +92 -0
  2. package/README.md +10 -7
  3. package/dist/browser/http.d.ts.map +1 -1
  4. package/dist/contract/client-types.d.ts +6 -3
  5. package/dist/contract/client-types.d.ts.map +1 -1
  6. package/dist/contract/define-validation.d.ts.map +1 -1
  7. package/dist/contract/define.d.ts +18 -12
  8. package/dist/contract/define.d.ts.map +1 -1
  9. package/dist/contract/endpoint-capabilities.d.ts +28 -0
  10. package/dist/contract/endpoint-capabilities.d.ts.map +1 -0
  11. package/dist/contract/factory.d.ts +49 -19
  12. package/dist/contract/factory.d.ts.map +1 -1
  13. package/dist/contract/tool-view.d.ts +1 -1
  14. package/dist/contract/tool-view.d.ts.map +1 -1
  15. package/dist/contract/transports.d.ts +5 -0
  16. package/dist/contract/transports.d.ts.map +1 -0
  17. package/dist/entrypoints/agent-runtime/coding-tools.js +9 -8
  18. package/dist/entrypoints/agent-runtime/harness.js +9 -8
  19. package/dist/entrypoints/agent-runtime/realtime.js +3 -3
  20. package/dist/entrypoints/agent-runtime/sandbox.js +10 -9
  21. package/dist/entrypoints/agent-runtime/sqlite/bun.js +12 -11
  22. package/dist/entrypoints/agent-runtime/sqlite/node.js +12 -11
  23. package/dist/entrypoints/agent-runtime/testing.js +12 -11
  24. package/dist/entrypoints/agent-runtime.js +22 -19
  25. package/dist/entrypoints/application/diagnostic-journal.js +3 -3
  26. package/dist/entrypoints/application/directory-inbox.js +4 -4
  27. package/dist/entrypoints/application/opentelemetry.js +1 -1
  28. package/dist/entrypoints/application.js +10 -10
  29. package/dist/entrypoints/cli/publish.js +4 -4
  30. package/dist/entrypoints/cli.js +13 -12
  31. package/dist/entrypoints/contract.d.ts +1 -1
  32. package/dist/entrypoints/contract.d.ts.map +1 -1
  33. package/dist/entrypoints/contract.js +6 -4
  34. package/dist/entrypoints/files.js +3 -3
  35. package/dist/entrypoints/geo/contract.d.ts +7 -0
  36. package/dist/entrypoints/geo/contract.d.ts.map +1 -0
  37. package/dist/entrypoints/geo/contract.js +6 -0
  38. package/dist/entrypoints/geo.js +60 -23
  39. package/dist/entrypoints/http.js +3 -3
  40. package/dist/entrypoints/index.js +9 -7
  41. package/dist/entrypoints/live.js +1 -1
  42. package/dist/entrypoints/node.js +7 -6
  43. package/dist/entrypoints/primitives.js +1 -1
  44. package/dist/entrypoints/process/owner-loss.js +1 -1
  45. package/dist/entrypoints/process.js +3 -3
  46. package/dist/entrypoints/react.js +1 -1
  47. package/dist/entrypoints/remote.js +4 -3
  48. package/dist/entrypoints/server.js +16 -15
  49. package/dist/entrypoints/telegram/screens.js +5 -5
  50. package/dist/entrypoints/telegram.js +7 -7
  51. package/dist/entrypoints/testing.js +7 -6
  52. package/dist/entrypoints/tools/agent.d.ts +9 -0
  53. package/dist/entrypoints/tools/agent.d.ts.map +1 -0
  54. package/dist/entrypoints/tools/agent.js +16 -0
  55. package/dist/entrypoints/tools/connections.js +7 -6
  56. package/dist/entrypoints/tools/contract.js +1 -1
  57. package/dist/entrypoints/tools/invoker.js +5 -4
  58. package/dist/entrypoints/tools/mcp.js +110 -9
  59. package/dist/entrypoints/tools/toolkit.d.ts +9 -0
  60. package/dist/entrypoints/tools/toolkit.d.ts.map +1 -0
  61. package/dist/entrypoints/tools/toolkit.js +40 -0
  62. package/dist/entrypoints/tools.d.ts +0 -10
  63. package/dist/entrypoints/tools.d.ts.map +1 -1
  64. package/dist/entrypoints/tools.js +38 -80
  65. package/dist/entrypoints/tracking/contract.js +5 -3
  66. package/dist/entrypoints/tracking/performance.js +3 -3
  67. package/dist/entrypoints/tracking.d.ts +1 -1
  68. package/dist/entrypoints/tracking.d.ts.map +1 -1
  69. package/dist/entrypoints/tracking.js +63 -83
  70. package/dist/entrypoints/xlsx.js +1 -1
  71. package/dist/geo/index.d.ts +2 -1
  72. package/dist/geo/index.d.ts.map +1 -1
  73. package/dist/geo/record.d.ts +8 -0
  74. package/dist/geo/record.d.ts.map +1 -0
  75. package/dist/geo/resolver.d.ts +1 -3
  76. package/dist/geo/resolver.d.ts.map +1 -1
  77. package/dist/geo/schema.d.ts +44 -0
  78. package/dist/geo/schema.d.ts.map +1 -0
  79. package/dist/geo/types.d.ts +2 -13
  80. package/dist/geo/types.d.ts.map +1 -1
  81. package/dist/{index-n5sv4z0w.js → index-0qyrcjfs.js} +16 -18
  82. package/dist/index-1psbyyhj.js +21 -0
  83. package/dist/{index-tsngj2b5.js → index-2fc1k9k2.js} +206 -206
  84. package/dist/index-3prvb42w.js +30 -0
  85. package/dist/{index-073nw9qr.js → index-3yb5kft5.js} +524 -522
  86. package/dist/{index-d9hq291n.js → index-4jpykzvw.js} +70 -81
  87. package/dist/index-568w258r.js +76 -0
  88. package/dist/index-69t14s4a.js +39 -0
  89. package/dist/{index-dky0dcmf.js → index-72r9k0av.js} +6 -2
  90. package/dist/{index-6p3frkv5.js → index-7zwtbak8.js} +9 -50
  91. package/dist/{index-90p34rts.js → index-8ryydawp.js} +7 -5
  92. package/dist/{index-vv1sch8a.js → index-8vzh5wpv.js} +13 -8
  93. package/dist/{index-75ns2ybj.js → index-8xyf8h2k.js} +1 -1
  94. package/dist/{index-xx1j310k.js → index-8yxgcyt6.js} +171 -169
  95. package/dist/{index-p6apg0jg.js → index-9frf01t9.js} +16 -9
  96. package/dist/{index-q0th8q0z.js → index-9mjrnqxs.js} +1 -3
  97. package/dist/{index-6f49krb5.js → index-aa50qwv4.js} +1 -1
  98. package/dist/{index-ega3yz4c.js → index-aqwg2dm5.js} +1 -1
  99. package/dist/{index-p0rf7sq9.js → index-bgcwxhxh.js} +225 -223
  100. package/dist/index-bph35vpy.js +77 -0
  101. package/dist/{index-tdpmfks8.js → index-bz479f0x.js} +1 -1
  102. package/dist/index-d3xdyjt6.js +38 -0
  103. package/dist/{index-q968hy6y.js → index-e452syyh.js} +1 -1
  104. package/dist/{index-86nbfysb.js → index-ff39f9dr.js} +3 -3
  105. package/dist/index-h1j71dr1.js +48 -0
  106. package/dist/{index-mgb7r8b8.js → index-jswst0h3.js} +1 -1
  107. package/dist/{index-095ya5hm.js → index-knmnj11j.js} +22 -191
  108. package/dist/{index-vwhrnp67.js → index-kz9734jc.js} +3 -3
  109. package/dist/{index-txg1npmg.js → index-mtwh9hyp.js} +1 -1
  110. package/dist/{index-dr3t5n1v.js → index-nn9qvkww.js} +46 -46
  111. package/dist/{index-ghtpfz4z.js → index-nyyam9ce.js} +2 -2
  112. package/dist/{index-qezhmp51.js → index-nz06qw5a.js} +3 -1
  113. package/dist/{index-1bx1xv1k.js → index-pfvde2fz.js} +5 -2
  114. package/dist/{index-w7jq3fz9.js → index-pq2m7t46.js} +1142 -1212
  115. package/dist/{index-yk4g8805.js → index-pq7rkwkk.js} +1 -30
  116. package/dist/{index-s80awwsw.js → index-qch1vcaa.js} +3 -1
  117. package/dist/{index-hdjmdwsj.js → index-qctbzmg9.js} +521 -511
  118. package/dist/{index-n8z3rvzw.js → index-qevqn3d3.js} +3 -5
  119. package/dist/{index-nqxrm176.js → index-r3db01kh.js} +1 -1
  120. package/dist/{index-v6vb5qx8.js → index-s3yxw6kt.js} +1 -1
  121. package/dist/{index-cqmqyjax.js → index-sa99p98w.js} +1 -1
  122. package/dist/index-sb9dr3tq.js +14 -0
  123. package/dist/{index-0gxvns6s.js → index-sba3e6m4.js} +1 -0
  124. package/dist/{index-f24bdt13.js → index-v1swr26p.js} +3 -1
  125. package/dist/{index-rhzkndr5.js → index-x4p3kw1p.js} +533 -530
  126. package/dist/{index-cycp3r3e.js → index-yb9n4pgj.js} +2 -2
  127. package/dist/{index-htxh46ej.js → index-ycqhyars.js} +2 -2
  128. package/dist/{index-9bwcthxw.js → index-yj6saztf.js} +31 -13
  129. package/dist/{index-f6m4c545.js → index-zrdcmg6j.js} +4 -6
  130. package/dist/{index-tvtacc9a.js → index-zyc64nbh.js} +1 -34
  131. package/dist/process/bun-child.d.ts +3 -2
  132. package/dist/process/bun-child.d.ts.map +1 -1
  133. package/dist/server/contract-method.d.ts.map +1 -1
  134. package/dist/tools/internal/surface-projector.d.ts.map +1 -1
  135. package/dist/tools/operations/async-operation-canonical-types.d.ts +1 -1
  136. package/dist/tracking/attribution.d.ts +21 -25
  137. package/dist/tracking/attribution.d.ts.map +1 -1
  138. package/dist/tracking/client-visit.d.ts +5 -7
  139. package/dist/tracking/client-visit.d.ts.map +1 -1
  140. package/dist/tracking/client.d.ts +2 -2
  141. package/dist/tracking/client.d.ts.map +1 -1
  142. package/dist/tracking/contract.d.ts +1 -1
  143. package/dist/tracking/host.d.ts +0 -1
  144. package/dist/tracking/host.d.ts.map +1 -1
  145. package/dist/tracking/privacy.d.ts +6 -0
  146. package/dist/tracking/privacy.d.ts.map +1 -1
  147. package/dist/tracking/schemas.d.ts +2 -2
  148. package/dist/tracking/schemas.d.ts.map +1 -1
  149. package/llms/agent-runtime-harness.txt +4 -3
  150. package/llms/agent-runtime-sandbox.txt +1 -1
  151. package/llms/agent-runtime.2.txt +3 -2
  152. package/llms/agent-runtime.3.txt +4 -46
  153. package/llms/agent-runtime.4.txt +113 -0
  154. package/llms/agent-runtime.txt +11 -13
  155. package/llms/cli.txt +1 -1
  156. package/llms/contract.txt +46 -24
  157. package/llms/geo-contract.txt +23 -0
  158. package/llms/geo.txt +40 -4
  159. package/llms/stitchkit.txt +16 -9
  160. package/llms/testing.txt +4 -6
  161. package/llms/tools-agent.txt +24 -0
  162. package/llms/tools-mcp.txt +71 -6
  163. package/llms/tools-toolkit.txt +23 -0
  164. package/llms/tools.2.txt +8 -5
  165. package/llms/tools.3.txt +9 -78
  166. package/llms/tools.txt +8 -8
  167. package/llms/tracking-contract.txt +1 -1
  168. package/llms/tracking.txt +27 -5
  169. package/llms/{upgrading-0.105.0-0.118.0.txt → upgrading-0.106.0-0.120.0.txt} +152 -410
  170. package/llms/upgrading-0.37.0-0.53.0.txt +969 -0
  171. package/llms/{upgrading-0.44.0-0.62.0.txt → upgrading-0.55.0-0.68.0.txt} +509 -528
  172. package/llms/{upgrading-0.63.0-0.83.0.txt → upgrading-0.69.0-0.95.0.txt} +506 -509
  173. package/llms/{upgrading-0.84.0-0.104.0.txt → upgrading-0.96.0-0.105.0.txt} +410 -506
  174. package/llms/upgrading.txt +5 -5
  175. package/llms-full.txt +475 -154
  176. package/llms.txt +17 -14
  177. package/package.json +32 -20
  178. package/llms/upgrading-0.37.0-0.44.0.txt +0 -444
  179. package/dist/{index-arjmb6de.js → index-1jwsfkfz.js} +0 -0
  180. package/dist/{index-qndsr7f0.js → index-5efrpfmj.js} +3 -3
@@ -1,3 +1,7 @@
1
+ import {
2
+ GeoTextSchema,
3
+ GeoAttributionSchema2
4
+ } from "../index-d3xdyjt6.js";
1
5
  import {
2
6
  messageOf
3
7
  } from "../index-g149e9pk.js";
@@ -72,41 +76,74 @@ function createMaxMindGeoIpLoader(options = {}) {
72
76
  }
73
77
  };
74
78
  }
75
- // src/geo/resolver.ts
76
- function text(value) {
77
- return typeof value === "string" && value.length > 0 ? value : undefined;
78
- }
79
- function finite(value) {
80
- return typeof value === "number" && Number.isFinite(value) ? value : undefined;
81
- }
79
+ // src/geo/record.ts
80
+ var FIELDS = GeoAttributionSchema2.unwrap().shape;
82
81
  function record(value) {
83
82
  return isRecord(value) ? value : undefined;
84
83
  }
84
+ function field(schema, value) {
85
+ const parsed = schema.safeParse(value);
86
+ return parsed.success ? parsed.data : undefined;
87
+ }
88
+ function names(entry) {
89
+ const source = record(entry?.names);
90
+ if (!source)
91
+ return;
92
+ const entries = Object.entries(source).filter((pair) => GeoTextSchema.safeParse(pair[0]).success && GeoTextSchema.safeParse(pair[1]).success);
93
+ return entries.length > 0 ? Object.freeze(Object.fromEntries(entries)) : undefined;
94
+ }
95
+ function sparse(value) {
96
+ for (const key of Object.keys(value)) {
97
+ if (Reflect.get(value, key) === undefined)
98
+ Reflect.deleteProperty(value, key);
99
+ }
100
+ return Object.freeze(value);
101
+ }
85
102
  function mapGeoIpRecord(value) {
86
103
  const root = record(value);
87
104
  if (!root)
88
105
  return null;
106
+ const continent = record(root.continent);
89
107
  const country = record(root.country);
90
- const subdivisions = Array.isArray(root.subdivisions) ? record(root.subdivisions[0]) : undefined;
108
+ const registeredCountry = record(root.registered_country);
109
+ const region = Array.isArray(root.subdivisions) ? record(root.subdivisions[0]) : undefined;
91
110
  const city = record(root.city);
92
111
  const postal = record(root.postal);
93
112
  const location = record(root.location);
94
- const names = (entry) => record(entry?.names);
95
- const result = {
96
- countryCode: text(country?.iso_code),
97
- countryName: text(names(country)?.en),
98
- regionCode: text(subdivisions?.iso_code),
99
- regionName: text(names(subdivisions)?.en),
100
- city: text(names(city)?.en),
101
- postalCode: text(postal?.code),
102
- latitude: finite(location?.latitude),
103
- longitude: finite(location?.longitude),
104
- timezone: text(location?.time_zone),
105
- autonomousSystemNumber: finite(root.autonomous_system_number),
106
- autonomousSystemOrganization: text(root.autonomous_system_organization)
107
- };
108
- return Object.values(result).some((entry) => entry !== undefined) ? result : null;
113
+ const localizedNames = sparse({
114
+ continent: names(continent),
115
+ country: names(country),
116
+ registeredCountry: names(registeredCountry),
117
+ region: names(region),
118
+ city: names(city)
119
+ });
120
+ const result = sparse({
121
+ continentCode: field(FIELDS.continentCode, continent?.code),
122
+ continentName: field(FIELDS.continentName, localizedNames.continent?.en),
123
+ continentGeonameId: field(FIELDS.continentGeonameId, continent?.geoname_id),
124
+ countryCode: field(FIELDS.countryCode, country?.iso_code),
125
+ countryName: field(FIELDS.countryName, localizedNames.country?.en),
126
+ countryGeonameId: field(FIELDS.countryGeonameId, country?.geoname_id),
127
+ registeredCountryCode: field(FIELDS.registeredCountryCode, registeredCountry?.iso_code),
128
+ registeredCountryName: field(FIELDS.registeredCountryName, localizedNames.registeredCountry?.en),
129
+ registeredCountryGeonameId: field(FIELDS.registeredCountryGeonameId, registeredCountry?.geoname_id),
130
+ regionCode: field(FIELDS.regionCode, region?.iso_code),
131
+ regionName: field(FIELDS.regionName, localizedNames.region?.en),
132
+ regionGeonameId: field(FIELDS.regionGeonameId, region?.geoname_id),
133
+ city: field(FIELDS.city, localizedNames.city?.en),
134
+ cityGeonameId: field(FIELDS.cityGeonameId, city?.geoname_id),
135
+ postalCode: field(FIELDS.postalCode, postal?.code),
136
+ latitude: field(FIELDS.latitude, location?.latitude),
137
+ longitude: field(FIELDS.longitude, location?.longitude),
138
+ timezone: field(FIELDS.timezone, location?.time_zone),
139
+ accuracyRadiusKm: field(FIELDS.accuracyRadiusKm, location?.accuracy_radius),
140
+ autonomousSystemNumber: field(FIELDS.autonomousSystemNumber, root.autonomous_system_number),
141
+ autonomousSystemOrganization: field(FIELDS.autonomousSystemOrganization, root.autonomous_system_organization),
142
+ localizedNames: Object.keys(localizedNames).length > 0 ? localizedNames : undefined
143
+ });
144
+ return Object.keys(result).length > 0 ? result : null;
109
145
  }
146
+ // src/geo/resolver.ts
110
147
  var errorMessage = (error) => messageOf(error) || "unknown reload error";
111
148
  function createGeoIpResolver(options) {
112
149
  const clock = options.clock ?? Date.now;
@@ -2,7 +2,7 @@ import"../index-m38ej7e5.js";
2
2
  import"../index-h2fhjqy7.js";
3
3
  import {
4
4
  createHttpClient2
5
- } from "../index-p6apg0jg.js";
5
+ } from "../index-9frf01t9.js";
6
6
  import {
7
7
  uploadInChunks2
8
8
  } from "../index-hqsbtvta.js";
@@ -14,13 +14,13 @@ import {
14
14
  createUrlBuilder2,
15
15
  createUrlBuilders2,
16
16
  createScopedUrlBuilders2
17
- } from "../index-tsngj2b5.js";
17
+ } from "../index-2fc1k9k2.js";
18
18
  import {
19
19
  ApiError2
20
20
  } from "../index-kfjkb396.js";
21
21
  import {
22
22
  readBoundedBody2
23
- } from "../index-qndsr7f0.js";
23
+ } from "../index-5efrpfmj.js";
24
24
  export {
25
25
  ApiError2 as ApiError,
26
26
  contractEndpointMatchers2 as contractEndpointMatchers,
@@ -5,7 +5,7 @@ import {
5
5
  } from "../index-h2fhjqy7.js";
6
6
  import {
7
7
  createHttpClient2
8
- } from "../index-p6apg0jg.js";
8
+ } from "../index-9frf01t9.js";
9
9
  import"../index-w0eqdhyd.js";
10
10
  import {
11
11
  LiveStatePhaseSchema2,
@@ -33,18 +33,20 @@ import {
33
33
  defineRealtimeContract2
34
34
  } from "../index-814xpr6d.js";
35
35
  import {
36
- withToolView2,
37
36
  ALL_TRANSPORTS2,
38
- TOOL_TRANSPORTS2,
37
+ TOOL_TRANSPORTS2
38
+ } from "../index-69t14s4a.js";
39
+ import {
40
+ withToolView2,
39
41
  defineContract2
40
- } from "../index-d9hq291n.js";
42
+ } from "../index-4jpykzvw.js";
41
43
  import {
42
44
  defineErrors2,
43
45
  createContractFactory2,
44
46
  paginatedSchema2,
45
47
  encodeCursor2,
46
48
  decodeCursor2
47
- } from "../index-9bwcthxw.js";
49
+ } from "../index-yj6saztf.js";
48
50
  import {
49
51
  ManagedFilePathSchema2,
50
52
  ManagedFileRefSchema2
@@ -71,7 +73,7 @@ import {
71
73
  createUrlBuilder2,
72
74
  createUrlBuilders2,
73
75
  createScopedUrlBuilders2
74
- } from "../index-tsngj2b5.js";
76
+ } from "../index-2fc1k9k2.js";
75
77
  import {
76
78
  createRetainedTopics2,
77
79
  createRealtimeClientWithPeer,
@@ -85,7 +87,7 @@ import {
85
87
  } from "../index-kfjkb396.js";
86
88
  import {
87
89
  readBoundedBody2
88
- } from "../index-qndsr7f0.js";
90
+ } from "../index-5efrpfmj.js";
89
91
  import {
90
92
  sleep
91
93
  } from "../index-eemvahkc.js";
@@ -16,7 +16,7 @@ import {
16
16
  WATCH_STATE2,
17
17
  watchContract2,
18
18
  watchKeyString2
19
- } from "../index-s80awwsw.js";
19
+ } from "../index-qch1vcaa.js";
20
20
  import {
21
21
  argumentsDigest
22
22
  } from "../index-r7a7r7ha.js";
@@ -1,17 +1,18 @@
1
1
  import"../index-k42ckyzx.js";
2
2
  import"../index-h2fhjqy7.js";
3
3
  import"../index-m38ej7e5.js";
4
+ import"../index-69t14s4a.js";
4
5
  import {
5
6
  ShutdownStateSchema2,
6
7
  ShutdownOptionsSchema2,
7
8
  ShutdownStatusSchema2,
8
9
  ShutdownResultSchema2,
9
10
  createServerLifecycle
10
- } from "../index-q0th8q0z.js";
11
+ } from "../index-9mjrnqxs.js";
11
12
  import"../index-3za04re9.js";
12
13
  import"../index-4s0fep5q.js";
13
- import"../index-d9hq291n.js";
14
- import"../index-9bwcthxw.js";
14
+ import"../index-4jpykzvw.js";
15
+ import"../index-yj6saztf.js";
15
16
  import"../index-xqhede6x.js";
16
17
  import {
17
18
  createHandler2,
@@ -23,7 +24,7 @@ import {
23
24
  createSocketIOServer2,
24
25
  UnixClientTransportError2,
25
26
  createUnixClientTransport2
26
- } from "../index-p0rf7sq9.js";
27
+ } from "../index-bgcwxhxh.js";
27
28
  import {
28
29
  bindRealtimeServer2
29
30
  } from "../index-2bqf0a74.js";
@@ -32,8 +33,8 @@ import {
32
33
  implement2,
33
34
  createImplement2,
34
35
  createScopedImplement2
35
- } from "../index-cqmqyjax.js";
36
- import"../index-1bx1xv1k.js";
36
+ } from "../index-sa99p98w.js";
37
+ import"../index-pfvde2fz.js";
37
38
  import {
38
39
  AppError2,
39
40
  notFound2,
@@ -24,7 +24,7 @@ import {
24
24
  shareMoney2,
25
25
  splitMoney2,
26
26
  defineMoney2
27
- } from "../index-qezhmp51.js";
27
+ } from "../index-nz06qw5a.js";
28
28
  import {
29
29
  ManagedFileRefSchema2
30
30
  } from "../index-xqhede6x.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  bootstrapNativeCommandOwnerLoss2
3
- } from "../../index-f6m4c545.js";
3
+ } from "../../index-zrdcmg6j.js";
4
4
  export {
5
5
  bootstrapNativeCommandOwnerLoss2 as bootstrapNativeCommandOwnerLoss
6
6
  };
@@ -3,13 +3,13 @@ import {
3
3
  ProcessInstanceSchema2,
4
4
  observeProcessInstance2,
5
5
  probeProcessOwner2
6
- } from "../index-n8z3rvzw.js";
6
+ } from "../index-qevqn3d3.js";
7
7
  import {
8
8
  NativeCommandError2
9
- } from "../index-f6m4c545.js";
9
+ } from "../index-zrdcmg6j.js";
10
10
  import {
11
11
  startNativeCommand
12
- } from "../index-dr3t5n1v.js";
12
+ } from "../index-nn9qvkww.js";
13
13
  import {
14
14
  untilAborted
15
15
  } from "../index-a5qr2rj6.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  isAbortLikeError
3
- } from "../index-p6apg0jg.js";
3
+ } from "../index-9frf01t9.js";
4
4
  import {
5
5
  ApiError2
6
6
  } from "../index-kfjkb396.js";
@@ -1,16 +1,17 @@
1
1
  import"../index-m38ej7e5.js";
2
2
  import"../index-h2fhjqy7.js";
3
- import"../index-p6apg0jg.js";
3
+ import"../index-9frf01t9.js";
4
+ import"../index-69t14s4a.js";
4
5
  import {
5
6
  endpointHasArguments,
6
7
  createClient2
7
- } from "../index-tsngj2b5.js";
8
+ } from "../index-2fc1k9k2.js";
8
9
  import {
9
10
  ApiError2
10
11
  } from "../index-kfjkb396.js";
11
12
  import {
12
13
  contractMethodFields
13
- } from "../index-1bx1xv1k.js";
14
+ } from "../index-pfvde2fz.js";
14
15
  import {
15
16
  AppError2,
16
17
  STITCH_ERROR_STATUS2
@@ -1,6 +1,6 @@
1
1
  import"../index-2kbysk9s.js";
2
- import"../index-n8z3rvzw.js";
3
- import"../index-tdpmfks8.js";
2
+ import"../index-qevqn3d3.js";
3
+ import"../index-bz479f0x.js";
4
4
  import {
5
5
  errorCode2,
6
6
  normalizeError2
@@ -18,15 +18,16 @@ import {
18
18
  ShutdownStatusSchema2,
19
19
  ShutdownResultSchema2,
20
20
  createServerLifecycle
21
- } from "../index-q0th8q0z.js";
21
+ } from "../index-9mjrnqxs.js";
22
+ import"../index-69t14s4a.js";
22
23
  import {
23
24
  toJsonSchema,
24
25
  jsonSchemaFields
25
26
  } from "../index-ct75c3at.js";
26
27
  import"../index-3za04re9.js";
27
28
  import"../index-4s0fep5q.js";
28
- import"../index-d9hq291n.js";
29
- import"../index-9bwcthxw.js";
29
+ import"../index-4jpykzvw.js";
30
+ import"../index-yj6saztf.js";
30
31
  import"../index-xqhede6x.js";
31
32
  import {
32
33
  contextContributionDelta,
@@ -49,14 +50,14 @@ import {
49
50
  socketIoLane2,
50
51
  UnixClientTransportError2,
51
52
  createUnixClientTransport2
52
- } from "../index-p0rf7sq9.js";
53
+ } from "../index-bgcwxhxh.js";
53
54
  import {
54
55
  createFileStateStore2
55
- } from "../index-75ns2ybj.js";
56
+ } from "../index-8xyf8h2k.js";
56
57
  import {
57
58
  bindRealtimeServer2
58
59
  } from "../index-2bqf0a74.js";
59
- import"../index-nqxrm176.js";
60
+ import"../index-r3db01kh.js";
60
61
  import {
61
62
  withDeadline
62
63
  } from "../index-9tqbxv5p.js";
@@ -74,16 +75,17 @@ import {
74
75
  implement2,
75
76
  createImplement2,
76
77
  createScopedImplement2
77
- } from "../index-cqmqyjax.js";
78
+ } from "../index-sa99p98w.js";
78
79
  import {
79
80
  deriveCodeChallenge2
80
81
  } from "../index-ap3gqe56.js";
82
+ import"../index-pfvde2fz.js";
81
83
  import {
82
84
  DEFAULT_CORS_ALLOW_HEADERS2,
83
85
  DEFAULT_CORS_EXPOSE_HEADERS2,
84
86
  corsHeaders2,
85
87
  corsPreflightResponse2
86
- } from "../index-yk4g8805.js";
88
+ } from "../index-pq7rkwkk.js";
87
89
  import {
88
90
  getTraceId2
89
91
  } from "../index-r6v4mc67.js";
@@ -99,14 +101,13 @@ import {
99
101
  isWithinDir2,
100
102
  realPathWithinDir
101
103
  } from "../index-5cc6r990.js";
102
- import"../index-1bx1xv1k.js";
103
- import {
104
- readBoundedChunks,
105
- concatChunks
106
- } from "../index-qndsr7f0.js";
107
104
  import {
108
105
  isUnsafeKey
109
106
  } from "../index-zsarb5xp.js";
107
+ import {
108
+ readBoundedChunks,
109
+ concatChunks
110
+ } from "../index-5efrpfmj.js";
110
111
  import {
111
112
  assertPositiveSafeInteger
112
113
  } from "../index-0s4xebbg.js";
@@ -16,19 +16,19 @@ import {
16
16
  import {
17
17
  createMutationQueue
18
18
  } from "../../index-sykb5ag7.js";
19
+ import {
20
+ argumentsDigest
21
+ } from "../../index-r7a7r7ha.js";
19
22
  import {
20
23
  bytesToBase64Url,
21
24
  base64UrlToBytes
22
25
  } from "../../index-dwfv9a85.js";
23
- import {
24
- MAX_TIMER_MS
25
- } from "../../index-eemvahkc.js";
26
26
  import {
27
27
  isUnsafeKey
28
28
  } from "../../index-zsarb5xp.js";
29
29
  import {
30
- argumentsDigest
31
- } from "../../index-r7a7r7ha.js";
30
+ MAX_TIMER_MS
31
+ } from "../../index-eemvahkc.js";
32
32
  import {
33
33
  compareCodeUnits
34
34
  } from "../../index-zsvzhjtk.js";
@@ -2,10 +2,10 @@ import {
2
2
  backoffDelay
3
3
  } from "../index-g6a3na27.js";
4
4
  import"../index-2kbysk9s.js";
5
- import"../index-n8z3rvzw.js";
5
+ import"../index-qevqn3d3.js";
6
6
  import {
7
7
  attemptExclusiveLock
8
- } from "../index-tdpmfks8.js";
8
+ } from "../index-bz479f0x.js";
9
9
  import {
10
10
  TELEGRAM_SEND_FAILURE_REASONS2,
11
11
  classifyTelegramSendFailure2
@@ -21,6 +21,9 @@ import {
21
21
  import {
22
22
  BOT_TOKEN_SECRET
23
23
  } from "../index-sznqf8fx.js";
24
+ import {
25
+ argumentsDigest
26
+ } from "../index-r7a7r7ha.js";
24
27
  import {
25
28
  writeFileAtomic2
26
29
  } from "../index-ac6vvm30.js";
@@ -34,15 +37,12 @@ import {
34
37
  MAX_TIMER_MS,
35
38
  sleep
36
39
  } from "../index-eemvahkc.js";
37
- import {
38
- untilAborted
39
- } from "../index-a5qr2rj6.js";
40
40
  import {
41
41
  assertPositiveSafeInteger
42
42
  } from "../index-0s4xebbg.js";
43
43
  import {
44
- argumentsDigest
45
- } from "../index-r7a7r7ha.js";
44
+ untilAborted
45
+ } from "../index-a5qr2rj6.js";
46
46
  import {
47
47
  isRecord,
48
48
  transportResult
@@ -2,11 +2,11 @@ import {
2
2
  joinRoutePath
3
3
  } from "../index-m38ej7e5.js";
4
4
  import"../index-h2fhjqy7.js";
5
- import"../index-p6apg0jg.js";
6
- import"../index-q0th8q0z.js";
5
+ import"../index-9frf01t9.js";
6
+ import"../index-9mjrnqxs.js";
7
7
  import {
8
8
  createApplication2
9
- } from "../index-txg1npmg.js";
9
+ } from "../index-mtwh9hyp.js";
10
10
  import"../index-w5s3xftz.js";
11
11
  import {
12
12
  RealtimeRequestTimeoutError2,
@@ -15,7 +15,8 @@ import {
15
15
  } from "../index-4s0fep5q.js";
16
16
  import {
17
17
  TOOL_TRANSPORTS2
18
- } from "../index-d9hq291n.js";
18
+ } from "../index-69t14s4a.js";
19
+ import"../index-4jpykzvw.js";
19
20
  import {
20
21
  RealtimeRejectDirectionSchema,
21
22
  RealtimeRejectPhaseSchema,
@@ -30,12 +31,12 @@ import {
30
31
  projectToolSurface,
31
32
  mcpProjectionCandidate,
32
33
  prepareProjectedMcpTools
33
- } from "../index-rhzkndr5.js";
34
+ } from "../index-x4p3kw1p.js";
34
35
  import"../index-k42ckyzx.js";
35
36
  import {
36
37
  createClient2,
37
38
  createClients2
38
- } from "../index-tsngj2b5.js";
39
+ } from "../index-2fc1k9k2.js";
39
40
  import {
40
41
  assertPositiveSafeInteger
41
42
  } from "../index-0s4xebbg.js";
@@ -0,0 +1,9 @@
1
+ /**
2
+ * `stitchkit/tools/agent` — mount a contract's operations as AI SDK tools.
3
+ *
4
+ * Its own subpath because the AI SDK (`ai`) is an optional peer: an application
5
+ * that exposes its operations over HTTP and CLI imports `stitchkit/tools` and
6
+ * installs neither the AI SDK nor the MCP server SDK. → ADR 0284.
7
+ */
8
+ export { type AgentContext, type AgentMountConfig, mountAgent } from '../../tools/agent.js';
9
+ //# sourceMappingURL=agent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../../src/entrypoints/tools/agent.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,gBAAgB,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,16 @@
1
+ import"../../index-k42ckyzx.js";
2
+ import"../../index-dsa676h8.js";
3
+ import"../../index-rbzq0q16.js";
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";
9
+ import {
10
+ mountAgent2
11
+ } from "../../index-7zwtbak8.js";
12
+ import"../../index-ff39f9dr.js";
13
+ import"../../index-aqwg2dm5.js";
14
+ export {
15
+ mountAgent2 as mountAgent
16
+ };
@@ -1,8 +1,9 @@
1
+ import"../../index-69t14s4a.js";
1
2
  import"../../index-ct75c3at.js";
2
3
  import {
3
4
  declaresDraft07,
4
5
  withDraft2020Keywords
5
- } from "../../index-rhzkndr5.js";
6
+ } from "../../index-x4p3kw1p.js";
6
7
  import"../../index-k42ckyzx.js";
7
8
  import {
8
9
  markJsonSchemaObjectGuards,
@@ -13,23 +14,23 @@ import {
13
14
  } from "../../index-9tqbxv5p.js";
14
15
  import {
15
16
  defineRuntimeTool2
16
- } from "../../index-ega3yz4c.js";
17
+ } from "../../index-aqwg2dm5.js";
17
18
  import {
18
19
  TOOL_ERROR_PROJECTION
19
20
  } from "../../index-98hv3sba.js";
20
21
  import {
21
22
  raceAbort
22
23
  } from "../../index-b0kddvzw.js";
24
+ import {
25
+ safeJsonParse
26
+ } from "../../index-zsarb5xp.js";
23
27
  import {
24
28
  readBoundedChunks,
25
29
  concatChunks
26
- } from "../../index-qndsr7f0.js";
30
+ } from "../../index-5efrpfmj.js";
27
31
  import {
28
32
  MAX_TIMER_MS
29
33
  } from "../../index-eemvahkc.js";
30
- import {
31
- safeJsonParse
32
- } from "../../index-zsarb5xp.js";
33
34
  import {
34
35
  assertPositiveSafeInteger
35
36
  } from "../../index-0s4xebbg.js";
@@ -6,7 +6,7 @@ import {
6
6
  ViewFileErrorSchema2,
7
7
  ViewFileOutputSchema2,
8
8
  ViewFileInputSchema2
9
- } from "../../index-0gxvns6s.js";
9
+ } from "../../index-sba3e6m4.js";
10
10
  import {
11
11
  coerceJsonArgs2
12
12
  } from "../../index-rbzq0q16.js";
@@ -2,12 +2,13 @@ import"../../index-k42ckyzx.js";
2
2
  import"../../index-dsa676h8.js";
3
3
  import"../../index-rbzq0q16.js";
4
4
  import"../../index-ct75c3at.js";
5
- import"../../index-rhzkndr5.js";
6
- import"../../index-v6vb5qx8.js";
7
- import"../../index-htxh46ej.js";
5
+ import"../../index-x4p3kw1p.js";
6
+ import"../../index-s3yxw6kt.js";
7
+ import"../../index-69t14s4a.js";
8
+ import"../../index-ycqhyars.js";
8
9
  import {
9
10
  createToolInvoker2
10
- } from "../../index-vwhrnp67.js";
11
+ } from "../../index-kz9734jc.js";
11
12
  export {
12
13
  createToolInvoker2 as createToolInvoker
13
14
  };