stitchkit 0.100.1 → 0.100.3

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 (233) hide show
  1. package/CHANGELOG.md +99 -0
  2. package/README.md +2 -1
  3. package/dist/application/process-lifecycle-transitions.d.ts +13 -2
  4. package/dist/application/process-lifecycle-transitions.d.ts.map +1 -1
  5. package/dist/application/process-lifecycle.d.ts +2 -1
  6. package/dist/application/process-lifecycle.d.ts.map +1 -1
  7. package/dist/entrypoints/agent-runtime/browser.js +119 -119
  8. package/dist/entrypoints/agent-runtime/coding-tools.js +15 -20
  9. package/dist/entrypoints/agent-runtime/harness.js +55 -63
  10. package/dist/entrypoints/agent-runtime/openrouter.js +6 -6
  11. package/dist/entrypoints/agent-runtime/sandbox.js +20 -25
  12. package/dist/entrypoints/agent-runtime/sqlite/bun.js +11 -13
  13. package/dist/entrypoints/agent-runtime/sqlite/node.js +11 -13
  14. package/dist/entrypoints/agent-runtime/testing.js +32 -34
  15. package/dist/entrypoints/agent-runtime.js +395 -402
  16. package/dist/entrypoints/application/diagnostic-journal.js +26 -27
  17. package/dist/entrypoints/application/directory-inbox.js +16 -17
  18. package/dist/entrypoints/application/grammy.js +13 -13
  19. package/dist/entrypoints/application/opentelemetry.js +13 -13
  20. package/dist/entrypoints/application/schemas.js +24 -24
  21. package/dist/entrypoints/application.d.ts +1 -1
  22. package/dist/entrypoints/application.d.ts.map +1 -1
  23. package/dist/entrypoints/application.js +218 -214
  24. package/dist/entrypoints/bin/upgrade-cli.js +2 -2
  25. package/dist/entrypoints/cli.js +81 -84
  26. package/dist/entrypoints/contract.js +54 -57
  27. package/dist/entrypoints/declaration.js +22 -22
  28. package/dist/entrypoints/files.js +18 -21
  29. package/dist/entrypoints/geo.js +7 -8
  30. package/dist/entrypoints/google.js +2 -2
  31. package/dist/entrypoints/index.js +150 -154
  32. package/dist/entrypoints/live.js +45 -47
  33. package/dist/entrypoints/node.js +68 -74
  34. package/dist/entrypoints/oauth.js +6 -6
  35. package/dist/entrypoints/observability.d.ts +1 -0
  36. package/dist/entrypoints/observability.d.ts.map +1 -1
  37. package/dist/entrypoints/observability.js +115 -87
  38. package/dist/entrypoints/primitives.js +35 -35
  39. package/dist/entrypoints/react/keyboard.d.ts +4 -0
  40. package/dist/entrypoints/react/keyboard.d.ts.map +1 -0
  41. package/dist/entrypoints/react/keyboard.js +397 -0
  42. package/dist/entrypoints/react.js +10 -10
  43. package/dist/entrypoints/release.js +7 -7
  44. package/dist/entrypoints/remote.js +15 -17
  45. package/dist/entrypoints/server.js +198 -200
  46. package/dist/entrypoints/telegram/html.d.ts +5 -0
  47. package/dist/entrypoints/telegram/html.d.ts.map +1 -0
  48. package/dist/entrypoints/telegram/html.js +26 -0
  49. package/dist/entrypoints/telegram/screens.d.ts +14 -0
  50. package/dist/entrypoints/telegram/screens.d.ts.map +1 -0
  51. package/dist/entrypoints/telegram/screens.js +2028 -0
  52. package/dist/entrypoints/telegram.d.ts +5 -1
  53. package/dist/entrypoints/telegram.d.ts.map +1 -1
  54. package/dist/entrypoints/telegram.js +548 -156
  55. package/dist/entrypoints/testing.js +75 -79
  56. package/dist/entrypoints/tools/connections.js +30 -32
  57. package/dist/entrypoints/tools/contract.js +18 -20
  58. package/dist/entrypoints/tools/invoker.js +12 -17
  59. package/dist/entrypoints/tools.js +223 -229
  60. package/dist/entrypoints/tracking/server.js +6 -6
  61. package/dist/entrypoints/tracking.js +40 -42
  62. package/dist/entrypoints/voice.js +3 -3
  63. package/dist/{index-eaysmdtq.js → index-0ndk4555.js} +56 -56
  64. package/dist/{index-2bxbyab0.js → index-1bx1xv1k.js} +1 -1
  65. package/dist/{index-p5r7qpdd.js → index-1eeqpadm.js} +4 -4
  66. package/dist/{index-hadmp193.js → index-3ct7hhq6.js} +210 -210
  67. package/dist/{index-e01r054k.js → index-45tdvqa3.js} +26 -26
  68. package/dist/{index-dce5wxcq.js → index-4s0fep5q.js} +8 -8
  69. package/dist/index-50ejfz75.js +9 -0
  70. package/dist/{index-m9zn6cpq.js → index-5107q189.js} +12 -12
  71. package/dist/{index-sbdmyz75.js → index-5cc6r990.js} +3 -3
  72. package/dist/index-6k1svmjh.js +141 -0
  73. package/dist/{index-c6bxbsnc.js → index-7kxw1awn.js} +2 -2
  74. package/dist/{index-0r0fbk7z.js → index-7z9ym7t8.js} +28 -28
  75. package/dist/{index-p7hgdyhb.js → index-814xpr6d.js} +2 -2
  76. package/dist/{index-gtj3zc53.js → index-8kzct1d6.js} +99 -99
  77. package/dist/{index-1zbbzgfh.js → index-9pw0a51a.js} +4 -4
  78. package/dist/{index-79z7m7dt.js → index-a9pd417t.js} +35 -35
  79. package/dist/{index-ham5sz8m.js → index-aaj97r4y.js} +45 -45
  80. package/dist/{index-s812ycat.js → index-aan6hqb9.js} +3 -3
  81. package/dist/{index-10x2hbx0.js → index-adhgd4pe.js} +44 -44
  82. package/dist/{index-2gxzjvyr.js → index-afjvjyck.js} +23 -23
  83. package/dist/{index-qmy6zq75.js → index-ahvsksw5.js} +16 -16
  84. package/dist/{index-hr4tzbwq.js → index-ap3gqe56.js} +3 -3
  85. package/dist/{index-znfs20ss.js → index-b2bz0kdm.js} +16 -16
  86. package/dist/{index-r066jx76.js → index-c6aagrbd.js} +148 -120
  87. package/dist/{index-k30h66yd.js → index-ck71tbcf.js} +9 -9
  88. package/dist/{index-eqqvgdb3.js → index-ct75c3at.js} +2 -2
  89. package/dist/{index-gw8bmyaj.js → index-djjhhgjk.js} +41 -41
  90. package/dist/{index-8qt2m66q.js → index-dvwj1f43.js} +43 -43
  91. package/dist/{index-fhwqwxe0.js → index-ej331hah.js} +1 -1
  92. package/dist/{index-9t3dffv2.js → index-ewbaywk5.js} +5 -5
  93. package/dist/{index-7p1f0vp2.js → index-fyphpknh.js} +25 -25
  94. package/dist/{index-83bdg97s.js → index-g149e9pk.js} +1 -1
  95. package/dist/{index-ngfhvfpd.js → index-g6a3na27.js} +4 -4
  96. package/dist/{index-qwhynv6x.js → index-h124epcf.js} +20 -20
  97. package/dist/{index-h6eeys1v.js → index-h97tqqp1.js} +9 -9
  98. package/dist/{index-zcgf3gqf.js → index-hby4qhax.js} +10 -10
  99. package/dist/{index-5jrd0yng.js → index-j8aw2c0e.js} +4 -4
  100. package/dist/{index-d8m8zpd8.js → index-jzczzcsb.js} +14 -14
  101. package/dist/index-kqnd6a85.js +26 -0
  102. package/dist/{index-35mh5bhj.js → index-kw1ws0cs.js} +12 -12
  103. package/dist/{index-yw4fzmdz.js → index-kzz6rq0w.js} +28 -17
  104. package/dist/{index-4gcnakhx.js → index-m38ej7e5.js} +2 -2
  105. package/dist/{index-ndddxtyx.js → index-m79yr938.js} +19 -19
  106. package/dist/{index-5p2m7we1.js → index-m9fndta6.js} +11 -11
  107. package/dist/index-mnkk1ffz.js +150 -0
  108. package/dist/index-n15jny5b.js +4 -0
  109. package/dist/{index-2vtcmrj9.js → index-n53mswt3.js} +20 -20
  110. package/dist/{index-bt14acb5.js → index-n5yqxd3d.js} +21 -21
  111. package/dist/{index-bm5rx7n6.js → index-n9tyz8z3.js} +12 -12
  112. package/dist/index-nmaqxdx7.js +463 -0
  113. package/dist/{index-mqv3b5rh.js → index-nx6eazt0.js} +30 -30
  114. package/dist/{index-3z73fh2c.js → index-q0th8q0z.js} +9 -9
  115. package/dist/{index-v260df89.js → index-qjeggp8w.js} +20 -20
  116. package/dist/{index-zfrhfn82.js → index-r1z0rd9c.js} +20 -20
  117. package/dist/{index-wqgjfstn.js → index-r5c4fedv.js} +3 -3
  118. package/dist/{index-cyktc4bp.js → index-r5hsgkz5.js} +118 -118
  119. package/dist/{index-0b1ess5e.js → index-r7a7r7ha.js} +1 -1
  120. package/dist/{index-1j8pm5t0.js → index-rfkh44ss.js} +15 -15
  121. package/dist/index-rz3z13e9.js +47 -0
  122. package/dist/{index-k6gpggb9.js → index-s80awwsw.js} +35 -35
  123. package/dist/{index-vqr7f7v8.js → index-ssmd41kh.js} +124 -124
  124. package/dist/{index-ensd0r74.js → index-v14qqmys.js} +41 -41
  125. package/dist/{index-paz6sgdp.js → index-v4a2fjtk.js} +36 -36
  126. package/dist/{index-d9pk3td4.js → index-w0eqdhyd.js} +14 -14
  127. package/dist/{index-5qn1kx34.js → index-w575evhq.js} +29 -29
  128. package/dist/{index-3gye9wzb.js → index-w5s3xftz.js} +26 -26
  129. package/dist/{index-tm88avnj.js → index-wykebpn9.js} +3 -3
  130. package/dist/{index-sh3s86na.js → index-xkhk5d6g.js} +17 -17
  131. package/dist/{index-6k1937bx.js → index-xqhede6x.js} +4 -4
  132. package/dist/{index-f4fx2tza.js → index-zs4ms3th.js} +181 -181
  133. package/dist/{index-k5hsfc3j.js → index-zsvzhjtk.js} +1 -1
  134. package/dist/observability/bounded-logger.d.ts +2 -0
  135. package/dist/observability/bounded-logger.d.ts.map +1 -1
  136. package/dist/observability/sanitize.d.ts +6 -0
  137. package/dist/observability/sanitize.d.ts.map +1 -1
  138. package/dist/observability/secret-values.d.ts +25 -0
  139. package/dist/observability/secret-values.d.ts.map +1 -0
  140. package/dist/react/keyboard/hooks.d.ts +71 -0
  141. package/dist/react/keyboard/hooks.d.ts.map +1 -0
  142. package/dist/react/keyboard/layers.d.ts +98 -0
  143. package/dist/react/keyboard/layers.d.ts.map +1 -0
  144. package/dist/react/keyboard/zone.d.ts +139 -0
  145. package/dist/react/keyboard/zone.d.ts.map +1 -0
  146. package/dist/telegram/crypto.d.ts +16 -0
  147. package/dist/telegram/crypto.d.ts.map +1 -0
  148. package/dist/telegram/html/check.d.ts +26 -0
  149. package/dist/telegram/html/check.d.ts.map +1 -0
  150. package/dist/telegram/html/nodes.d.ts +70 -0
  151. package/dist/telegram/html/nodes.d.ts.map +1 -0
  152. package/dist/telegram/html/parse.d.ts +35 -0
  153. package/dist/telegram/html/parse.d.ts.map +1 -0
  154. package/dist/telegram/html/render.d.ts +39 -0
  155. package/dist/telegram/html/render.d.ts.map +1 -0
  156. package/dist/telegram/init-data.d.ts.map +1 -1
  157. package/dist/telegram/operator-channel.d.ts +36 -3
  158. package/dist/telegram/operator-channel.d.ts.map +1 -1
  159. package/dist/telegram/screens/callback-codec.d.ts +34 -0
  160. package/dist/telegram/screens/callback-codec.d.ts.map +1 -0
  161. package/dist/telegram/screens/dispatch.d.ts +22 -0
  162. package/dist/telegram/screens/dispatch.d.ts.map +1 -0
  163. package/dist/telegram/screens/display.d.ts +70 -0
  164. package/dist/telegram/screens/display.d.ts.map +1 -0
  165. package/dist/telegram/screens/execute.d.ts +57 -0
  166. package/dist/telegram/screens/execute.d.ts.map +1 -0
  167. package/dist/telegram/screens/html.d.ts +36 -0
  168. package/dist/telegram/screens/html.d.ts.map +1 -0
  169. package/dist/telegram/screens/outcome.d.ts +74 -0
  170. package/dist/telegram/screens/outcome.d.ts.map +1 -0
  171. package/dist/telegram/screens/path.d.ts +29 -0
  172. package/dist/telegram/screens/path.d.ts.map +1 -0
  173. package/dist/telegram/screens/reconcile.d.ts +67 -0
  174. package/dist/telegram/screens/reconcile.d.ts.map +1 -0
  175. package/dist/telegram/screens/registry.d.ts +23 -0
  176. package/dist/telegram/screens/registry.d.ts.map +1 -0
  177. package/dist/telegram/screens/render.d.ts +70 -0
  178. package/dist/telegram/screens/render.d.ts.map +1 -0
  179. package/dist/telegram/screens/runtime.d.ts +133 -0
  180. package/dist/telegram/screens/runtime.d.ts.map +1 -0
  181. package/dist/telegram/screens/screen-types.d.ts +130 -0
  182. package/dist/telegram/screens/screen-types.d.ts.map +1 -0
  183. package/dist/telegram/screens/screen.d.ts +138 -0
  184. package/dist/telegram/screens/screen.d.ts.map +1 -0
  185. package/dist/telegram/screens/state.d.ts +115 -0
  186. package/dist/telegram/screens/state.d.ts.map +1 -0
  187. package/dist/telegram/screens/telegram-screens.d.ts +18 -0
  188. package/dist/telegram/screens/telegram-screens.d.ts.map +1 -0
  189. package/dist/telegram/screens/test-chat-telegram.d.ts +47 -0
  190. package/dist/telegram/screens/test-chat-telegram.d.ts.map +1 -0
  191. package/dist/telegram/screens/test-chat.d.ts +66 -0
  192. package/dist/telegram/screens/test-chat.d.ts.map +1 -0
  193. package/dist/telegram/screens/view.d.ts +89 -0
  194. package/dist/telegram/screens/view.d.ts.map +1 -0
  195. package/dist/telegram/send-failure.d.ts +19 -0
  196. package/dist/telegram/send-failure.d.ts.map +1 -1
  197. package/dist/telegram/update-intake.d.ts +78 -0
  198. package/dist/telegram/update-intake.d.ts.map +1 -0
  199. package/dist/telegram/update-store-sqlite.d.ts +26 -0
  200. package/dist/telegram/update-store-sqlite.d.ts.map +1 -0
  201. package/dist/telegram/update-store.d.ts +67 -0
  202. package/dist/telegram/update-store.d.ts.map +1 -0
  203. package/dist/telegram/webhook.d.ts +105 -0
  204. package/dist/telegram/webhook.d.ts.map +1 -0
  205. package/dist/tools/cli/args-fields.d.ts +8 -0
  206. package/dist/tools/cli/args-fields.d.ts.map +1 -1
  207. package/dist/tools/cli/args-route.d.ts.map +1 -1
  208. package/dist/tools/cli/args.d.ts.map +1 -1
  209. package/dist/tools/cli/help.d.ts.map +1 -1
  210. package/llms/application.2.txt +26 -1
  211. package/llms/application.txt +18 -27
  212. package/llms/cli.txt +8 -2
  213. package/llms/observability.txt +2 -1
  214. package/llms/react-keyboard.txt +193 -0
  215. package/llms/stitchkit.txt +7 -1
  216. package/llms/telegram-html.txt +35 -0
  217. package/llms/telegram-screens.txt +365 -0
  218. package/llms/telegram.txt +160 -4
  219. package/llms-full.txt +755 -11
  220. package/llms.txt +11 -6
  221. package/package.json +17 -2
  222. package/dist/index-2k4yrqkc.js +0 -9
  223. package/dist/index-crykmqkr.js +0 -26
  224. package/dist/index-y64k3s0h.js +0 -150
  225. package/dist/index-y91ry9h2.js +0 -4
  226. /package/dist/{index-hffjpmq9.js → index-9jfdm5tg.js} +0 -0
  227. /package/dist/{index-zjjyynm3.js → index-d4pa2bgs.js} +0 -0
  228. /package/dist/{index-rxfy4cq7.js → index-dwfv9a85.js} +0 -0
  229. /package/dist/{index-5jm36zv1.js → index-gfk7nrht.js} +0 -0
  230. /package/dist/{index-b9aefrqd.js → index-n1dqr7gf.js} +0 -0
  231. /package/dist/{index-q3pyb9n0.js → index-sykb5ag7.js} +0 -0
  232. /package/dist/{index-48ffdxgk.js → index-xhzq2qvj.js} +0 -0
  233. /package/dist/{index-kzfs85xp.js → index-zsarb5xp.js} +0 -0
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  resolveRouteParamsSchema
3
- } from "./index-4gcnakhx.js";
3
+ } from "./index-m38ej7e5.js";
4
4
  import {
5
5
  isUnsafeKey
6
- } from "./index-kzfs85xp.js";
6
+ } from "./index-zsarb5xp.js";
7
7
  import {
8
8
  isRecord
9
- } from "./index-hffjpmq9.js";
9
+ } from "./index-9jfdm5tg.js";
10
10
 
11
11
  // src/contract/tool-view.ts
12
12
  import { z } from "zod";
13
13
  var DECLARED_TOOL_VIEW = Symbol.for("stitchkit.toolView");
14
- function withToolView(endpoint, view) {
14
+ function withToolView2(endpoint, view) {
15
15
  const declared = { ...view, [DECLARED_TOOL_VIEW]: true };
16
16
  return { ...endpoint, tool: { ...endpoint.tool, view: declared } };
17
17
  }
@@ -254,9 +254,9 @@ function assertResponseMetaEndpoint(prefix, key, ep) {
254
254
  }
255
255
 
256
256
  // src/contract/define.ts
257
- var ALL_TRANSPORTS = ["HTTP", "MCP", "AGENT", "CLI"];
258
- var TOOL_TRANSPORTS = ["MCP", "AGENT", "CLI"];
259
- function defineContract(meta, endpoints) {
257
+ var ALL_TRANSPORTS2 = ["HTTP", "MCP", "AGENT", "CLI"];
258
+ var TOOL_TRANSPORTS2 = ["MCP", "AGENT", "CLI"];
259
+ function defineContract2(meta, endpoints) {
260
260
  const materializedEndpoints = {};
261
261
  for (const [key, endpoint] of Object.entries(endpoints)) {
262
262
  const params = resolveRouteParamsSchema(endpoint.path, endpoint.params);
@@ -293,7 +293,7 @@ function defineContract(meta, endpoints) {
293
293
  }
294
294
  const transports = new Set(ep.expose ? ep.expose.filter((t) => t !== "HTTP") : ["MCP", "AGENT"]);
295
295
  if (transports.size === 0) {
296
- throw new Error(`Contract "${meta.prefix}": endpoint "${key}" sets tool options but is not exposed on any tool transport (${TOOL_TRANSPORTS.join(" / ")}) — a contract factory with toolExposure 'explicit' makes an omitted expose HTTP-only`);
296
+ throw new Error(`Contract "${meta.prefix}": endpoint "${key}" sets tool options but is not exposed on any tool transport (${TOOL_TRANSPORTS2.join(" / ")}) — a contract factory with toolExposure 'explicit' makes an omitted expose HTTP-only`);
297
297
  }
298
298
  if (tool.view !== undefined)
299
299
  assertToolView(meta.prefix, key, ep);
@@ -314,4 +314,4 @@ function defineContract(meta, endpoints) {
314
314
  return { meta, endpoints: materializedEndpoints };
315
315
  }
316
316
 
317
- export { withToolView, ALL_TRANSPORTS, TOOL_TRANSPORTS, defineContract };
317
+ export { withToolView2, ALL_TRANSPORTS2, TOOL_TRANSPORTS2, defineContract2 };
@@ -22,8 +22,8 @@ function jsonSchemaFields(jsonSchema) {
22
22
  continue;
23
23
  for (const field of jsonSchemaFields(member)) {
24
24
  const existing = byName.get(field.name);
25
- const required2 = existing ? conjunctive ? existing.required || field.required : existing.required && field.required : field.required;
26
- byName.set(field.name, existing ? { ...field, required: required2 } : field);
25
+ const required = existing ? conjunctive ? existing.required || field.required : existing.required && field.required : field.required;
26
+ byName.set(field.name, existing ? { ...field, required } : field);
27
27
  }
28
28
  }
29
29
  return [...byName.values()];
@@ -1,38 +1,38 @@
1
+ import {
2
+ forbidden2,
3
+ conflict2
4
+ } from "./index-n53mswt3.js";
5
+ import {
6
+ probeAgentProcessSandbox2,
7
+ missingSandboxRestrictions2,
8
+ codingRefusal,
9
+ codingPathRefusal,
10
+ refuseMissingCodingPath
11
+ } from "./index-ahvsksw5.js";
1
12
  import {
2
13
  NumericFileHandle,
3
- assertContainedFileCurrent,
4
- assertContainedParentCurrent,
5
- containedEntryMetadata,
6
14
  descriptorPath,
7
15
  listContainedDirectory,
8
16
  missingContainedDirectories,
9
- openContainedFile,
10
17
  openContainedParent,
18
+ openContainedFile,
19
+ assertContainedFileCurrent,
20
+ assertContainedParentCurrent,
21
+ containedEntryMetadata,
11
22
  openContainedParentFile,
12
23
  readContainedUtf8Handle,
13
24
  scanContainedFiles
14
- } from "./index-fhwqwxe0.js";
25
+ } from "./index-ej331hah.js";
15
26
  import {
16
27
  loadDarwinBinding
17
- } from "./index-zjjyynm3.js";
18
- import {
19
- codingPathRefusal,
20
- codingRefusal,
21
- missingSandboxRestrictions,
22
- probeAgentProcessSandbox,
23
- refuseMissingCodingPath
24
- } from "./index-qmy6zq75.js";
25
- import {
26
- defineRuntimeTool
27
- } from "./index-d8m8zpd8.js";
28
+ } from "./index-d4pa2bgs.js";
28
29
  import {
29
- conflict,
30
- forbidden
31
- } from "./index-2vtcmrj9.js";
30
+ defineRuntimeTool2
31
+ } from "./index-jzczzcsb.js";
32
32
 
33
33
  // src/agent-runtime/coding-tool-contract.ts
34
34
  import { z } from "zod";
35
- var AgentCodingToolLimitsSchema = z.object({
35
+ var AgentCodingToolLimitsSchema2 = z.object({
36
36
  maxPathBytes: z.int().positive(),
37
37
  maxReadBytes: z.int().positive(),
38
38
  maxWriteBytes: z.int().positive(),
@@ -47,7 +47,7 @@ var AgentCodingToolLimitsSchema = z.object({
47
47
  shellTimeoutMs: z.int().positive(),
48
48
  shellTerminationGraceMs: z.int().positive()
49
49
  }).strict();
50
- var AgentCodingToolAuthorizationSchema = z.discriminatedUnion("operation", [
50
+ var AgentCodingToolAuthorizationSchema2 = z.discriminatedUnion("operation", [
51
51
  z.object({ operation: z.literal("read"), path: z.string().min(1) }).strict(),
52
52
  z.object({
53
53
  operation: z.literal("write"),
@@ -95,7 +95,7 @@ var AgentCodingToolAuthorizationSchema = z.discriminatedUnion("operation", [
95
95
  cwd: z.string().min(1)
96
96
  }).strict()
97
97
  ]);
98
- var AgentCodingToolPathAuthorizationSchema = z.object({ path: z.string().min(1) }).strict();
98
+ var AgentCodingToolPathAuthorizationSchema2 = z.object({ path: z.string().min(1) }).strict();
99
99
  var CodingDeniedEntrySchema = z.object({
100
100
  path: z.string().min(1),
101
101
  kind: z.enum(["file", "directory", "symlink", "other"])
@@ -170,7 +170,7 @@ var DEFAULT_LIMITS = {
170
170
  shellTerminationGraceMs: 250
171
171
  };
172
172
  function resolveCodingToolLimits(input) {
173
- return AgentCodingToolLimitsSchema.parse({ ...DEFAULT_LIMITS, ...input });
173
+ return AgentCodingToolLimitsSchema2.parse({ ...DEFAULT_LIMITS, ...input });
174
174
  }
175
175
 
176
176
  // src/agent-runtime/coding-tools.ts
@@ -238,14 +238,14 @@ async function existingCodingPath(root, requested, maxPathBytes) {
238
238
  return { absolute: resolved, relative: path.relative(root, resolved) || "." };
239
239
  }
240
240
  async function authorizeCodingTool(config, request) {
241
- const parsed = AgentCodingToolAuthorizationSchema.parse(request);
241
+ const parsed = AgentCodingToolAuthorizationSchema2.parse(request);
242
242
  if (!await config.authorize(parsed))
243
- forbidden("Coding tool permission denied");
243
+ forbidden2("Coding tool permission denied");
244
244
  }
245
245
  async function isCodingPathAuthorized(config, path2) {
246
246
  if (!config.authorizePath)
247
247
  return true;
248
- const parsed = AgentCodingToolPathAuthorizationSchema.parse({ path: path2 });
248
+ const parsed = AgentCodingToolPathAuthorizationSchema2.parse({ path: path2 });
249
249
  return await config.authorizePath(parsed);
250
250
  }
251
251
  async function authorizeCodingPath(config, path2) {
@@ -427,7 +427,7 @@ async function digestFile(handle, size) {
427
427
  return hash.digest("hex");
428
428
  }
429
429
  function createFileCodingTools(config, limits) {
430
- const read = defineRuntimeTool({
430
+ const read = defineRuntimeTool2({
431
431
  name: "read_file",
432
432
  description: "Read a bounded UTF-8 slice from a host-authorized workspace file.",
433
433
  identity: { serviceName: "coding", action: "read-file", method: "POST" },
@@ -491,7 +491,7 @@ function createFileCodingTools(config, limits) {
491
491
  };
492
492
  }
493
493
  });
494
- const write = defineRuntimeTool({
494
+ const write = defineRuntimeTool2({
495
495
  name: "write_file",
496
496
  description: "Write bounded UTF-8 content to a host-authorized workspace file.",
497
497
  identity: { serviceName: "coding", action: "write-file", method: "POST" },
@@ -630,7 +630,7 @@ function compileWorkspaceGlob(pattern) {
630
630
  }
631
631
  function createListingCodingTools(config, limits) {
632
632
  const excluded = new Set(config.search?.excludeDirectories ?? DEFAULT_EXCLUDED_DIRECTORIES);
633
- const list = defineRuntimeTool({
633
+ const list = defineRuntimeTool2({
634
634
  name: "list_directory",
635
635
  description: "List the direct entries of one workspace directory.",
636
636
  identity: { serviceName: "coding", action: "list-directory", method: "POST" },
@@ -672,7 +672,7 @@ function createListingCodingTools(config, limits) {
672
672
  };
673
673
  }
674
674
  });
675
- const glob = defineRuntimeTool({
675
+ const glob = defineRuntimeTool2({
676
676
  name: "glob",
677
677
  description: "List workspace files matching a `**`/`*`/`?` pattern.",
678
678
  identity: { serviceName: "coding", action: "glob", method: "POST" },
@@ -894,7 +894,7 @@ async function editFile(config, limits, input) {
894
894
  const source = read.text;
895
895
  const baseSha256 = sha256(source);
896
896
  if (input.expectedSha256 !== undefined && baseSha256 !== input.expectedSha256) {
897
- conflict("The file changed since it was read", {
897
+ conflict2("The file changed since it was read", {
898
898
  message: "The file changed since it was read",
899
899
  path: relative,
900
900
  expectedSha256: input.expectedSha256,
@@ -956,7 +956,7 @@ async function editFile(config, limits, input) {
956
956
  }
957
957
  }
958
958
  function createSearchAndPatchCodingTools(config, limits) {
959
- const search = defineRuntimeTool({
959
+ const search = defineRuntimeTool2({
960
960
  name: "search_files",
961
961
  description: "Search bounded relative paths or UTF-8 file content under the workspace root.",
962
962
  identity: { serviceName: "coding", action: "search", method: "POST" },
@@ -965,7 +965,7 @@ function createSearchAndPatchCodingTools(config, limits) {
965
965
  transports: ["AGENT"],
966
966
  handler: ({ input }) => searchFiles(config, limits, input)
967
967
  });
968
- const edit = defineRuntimeTool({
968
+ const edit = defineRuntimeTool2({
969
969
  name: "edit_file",
970
970
  description: "Replace an exact snippet in one workspace file.",
971
971
  identity: { serviceName: "coding", action: "edit-file", method: "POST" },
@@ -1165,7 +1165,7 @@ async function runCodingShell(input) {
1165
1165
  function createShellCodingTool(config, limits) {
1166
1166
  const executables = config.executables ?? {};
1167
1167
  const executableNames = Object.keys(executables).sort();
1168
- return defineRuntimeTool({
1168
+ return defineRuntimeTool2({
1169
1169
  name: "run_command",
1170
1170
  description: "Run a finite host-declared executable with bounded arguments, time and output.",
1171
1171
  identity: { serviceName: "coding", action: "shell", method: "POST" },
@@ -1199,13 +1199,13 @@ function createShellCodingTool(config, limits) {
1199
1199
  let executableArgs = input.args;
1200
1200
  let environment = config.environment ?? {};
1201
1201
  if (config.sandbox) {
1202
- const grade = await probeAgentProcessSandbox(config.sandbox.adapter);
1202
+ const grade = await probeAgentProcessSandbox2(config.sandbox.adapter);
1203
1203
  if (grade.grade === "unavailable") {
1204
1204
  codingRefusal("SANDBOX_UNAVAILABLE", "The configured process sandbox is unavailable", {
1205
1205
  details: { reason: grade.reason }
1206
1206
  });
1207
1207
  }
1208
- const missing = missingSandboxRestrictions(grade, config.sandbox.required);
1208
+ const missing = missingSandboxRestrictions2(grade, config.sandbox.required);
1209
1209
  if (missing.length > 0) {
1210
1210
  codingRefusal("SANDBOX_INSUFFICIENT", "The process sandbox lacks required restrictions", {
1211
1211
  details: { missing, grade: grade.grade }
@@ -1223,7 +1223,7 @@ function createShellCodingTool(config, limits) {
1223
1223
  executableArgs = [...prepared.args];
1224
1224
  environment = prepared.environment ?? environment;
1225
1225
  } catch (error) {
1226
- const refreshed = await probeAgentProcessSandbox(config.sandbox.adapter, {
1226
+ const refreshed = await probeAgentProcessSandbox2(config.sandbox.adapter, {
1227
1227
  refresh: true
1228
1228
  });
1229
1229
  codingRefusal("SANDBOX_UNAVAILABLE", "The process sandbox failed while preparing a command", {
@@ -1277,7 +1277,7 @@ var AGENT_CODING_TOOL_NAMES = {
1277
1277
  searchFiles: "search_files",
1278
1278
  writeFile: "write_file"
1279
1279
  };
1280
- function createAgentCodingTools(config) {
1280
+ function createAgentCodingTools2(config) {
1281
1281
  if (!path5.isAbsolute(config.root))
1282
1282
  throw new Error("Coding tool root must be absolute");
1283
1283
  for (const executable of Object.values(config.executables ?? {})) {
@@ -1289,7 +1289,7 @@ function createAgentCodingTools(config) {
1289
1289
  const artifactTools = [];
1290
1290
  if (config.artifacts) {
1291
1291
  const artifacts = config.artifacts;
1292
- artifactTools.push(defineRuntimeTool({
1292
+ artifactTools.push(defineRuntimeTool2({
1293
1293
  name: AGENT_CODING_TOOL_NAMES.readOutput,
1294
1294
  description: "Read a bounded byte slice from one opaque coding output artifact.",
1295
1295
  identity: { serviceName: "coding", action: "read-artifact", method: "POST" },
@@ -1338,7 +1338,7 @@ function createAgentCodingTools(config) {
1338
1338
  }));
1339
1339
  if (artifacts.search) {
1340
1340
  const search = artifacts.search;
1341
- artifactTools.push(defineRuntimeTool({
1341
+ artifactTools.push(defineRuntimeTool2({
1342
1342
  name: AGENT_CODING_TOOL_NAMES.searchOutput,
1343
1343
  description: "Search a durable spilled output without loading it into context.",
1344
1344
  identity: { serviceName: "coding", action: "search-artifact", method: "POST" },
@@ -1386,4 +1386,4 @@ function createAgentCodingTools(config) {
1386
1386
  ];
1387
1387
  }
1388
1388
 
1389
- export { AgentCodingToolLimitsSchema, AgentCodingToolAuthorizationSchema, AgentCodingToolPathAuthorizationSchema, createAgentCodingTools };
1389
+ export { AgentCodingToolLimitsSchema2, AgentCodingToolAuthorizationSchema2, AgentCodingToolPathAuthorizationSchema2, createAgentCodingTools2 };
@@ -1,34 +1,34 @@
1
1
  import {
2
- getRequestContext,
3
- runWithRequestContext
4
- } from "./index-zfrhfn82.js";
2
+ AppError2,
3
+ STITCH_ERROR_STATUS2,
4
+ isRetryableStatus2,
5
+ isStitchErrorCode2
6
+ } from "./index-n53mswt3.js";
5
7
  import {
6
- coerceJsonArgs
7
- } from "./index-1zbbzgfh.js";
8
+ normalizeError2,
9
+ validateDeclaredOutput
10
+ } from "./index-b2bz0kdm.js";
8
11
  import {
9
- applyToolViewDefaults,
10
- objectShapeKeys,
11
- projectToolView
12
- } from "./index-0r0fbk7z.js";
12
+ coerceJsonArgs2
13
+ } from "./index-9pw0a51a.js";
13
14
  import {
14
- normalizeError,
15
- validateDeclaredOutput
16
- } from "./index-znfs20ss.js";
15
+ applyToolViewDefaults,
16
+ projectToolView,
17
+ objectShapeKeys
18
+ } from "./index-7z9ym7t8.js";
17
19
  import {
18
- formatZodError
19
- } from "./index-p5r7qpdd.js";
20
+ runWithRequestContext2,
21
+ getRequestContext2
22
+ } from "./index-r1z0rd9c.js";
20
23
  import {
21
- AppError,
22
- STITCH_ERROR_STATUS,
23
- isRetryableStatus,
24
- isStitchErrorCode
25
- } from "./index-2vtcmrj9.js";
24
+ formatZodError2
25
+ } from "./index-1eeqpadm.js";
26
26
  import {
27
27
  isUnsafeKey
28
- } from "./index-kzfs85xp.js";
28
+ } from "./index-zsarb5xp.js";
29
29
  import {
30
30
  isRecord
31
- } from "./index-hffjpmq9.js";
31
+ } from "./index-9jfdm5tg.js";
32
32
 
33
33
  // src/tools/execute-args.ts
34
34
  function parseToolCallArguments(method, callArgs, {
@@ -47,8 +47,8 @@ function parseToolCallArguments(method, callArgs, {
47
47
  inputArgs[key] = value;
48
48
  }
49
49
  if (coerceJson) {
50
- paramArgs = coerceJsonArgs(paramArgs, method.paramsSchema);
51
- inputArgs = coerceJsonArgs(inputArgs, method.inputSchema);
50
+ paramArgs = coerceJsonArgs2(paramArgs, method.paramsSchema);
51
+ inputArgs = coerceJsonArgs2(inputArgs, method.inputSchema);
52
52
  }
53
53
  if (toolSurface)
54
54
  inputArgs = applyToolViewDefaults(inputArgs, method.toolView?.defaults);
@@ -61,7 +61,7 @@ function parseToolCallArguments(method, callArgs, {
61
61
  return { ok: false, message: "Invalid params", thrown: err };
62
62
  }
63
63
  if (!result.success) {
64
- return { ok: false, message: `Invalid params: ${formatZodError(result.error)}` };
64
+ return { ok: false, message: `Invalid params: ${formatZodError2(result.error)}` };
65
65
  }
66
66
  params = result.data;
67
67
  }
@@ -74,7 +74,7 @@ function parseToolCallArguments(method, callArgs, {
74
74
  return { ok: false, message: "Invalid input", thrown: err };
75
75
  }
76
76
  if (!result.success) {
77
- return { ok: false, message: `Invalid input: ${formatZodError(result.error)}` };
77
+ return { ok: false, message: `Invalid input: ${formatZodError2(result.error)}` };
78
78
  }
79
79
  input = result.data;
80
80
  }
@@ -84,13 +84,13 @@ function parseToolCallArguments(method, callArgs, {
84
84
  // src/tools/execute-result.ts
85
85
  var normalizedToolErrors = new WeakMap;
86
86
  function toolResultFromError(err) {
87
- const appErr = normalizeError(err);
87
+ const appErr = normalizeError2(err);
88
88
  const result = {
89
89
  ok: false,
90
90
  code: appErr.code,
91
91
  details: appErr.details ?? { message: appErr.message },
92
92
  ...appErr.hint && { hint: appErr.hint },
93
- retryable: appErr.retryable ?? isRetryableStatus(appErr.status)
93
+ retryable: appErr.retryable ?? isRetryableStatus2(appErr.status)
94
94
  };
95
95
  normalizedToolErrors.set(result, { normalized: appErr, cause: err });
96
96
  return result;
@@ -101,15 +101,15 @@ function toolErrorFromResult(result) {
101
101
  return retained.normalized;
102
102
  const details = isRecord(result.details) ? result.details : undefined;
103
103
  const message = typeof details?.message === "string" ? details.message : result.code;
104
- const status = isStitchErrorCode(result.code) ? STITCH_ERROR_STATUS[result.code] : 500;
105
- return new AppError(result.code, message, status, details, result.hint, undefined, result.retryable);
104
+ const status = isStitchErrorCode2(result.code) ? STITCH_ERROR_STATUS2[result.code] : 500;
105
+ return new AppError2(result.code, message, status, details, result.hint, undefined, result.retryable);
106
106
  }
107
107
  function toolCauseFromResult(result) {
108
108
  return normalizedToolErrors.get(result)?.cause;
109
109
  }
110
110
 
111
111
  // src/tools/execute.ts
112
- class ToolExecutionControlError extends Error {
112
+ class ToolExecutionControlError2 extends Error {
113
113
  reason;
114
114
  constructor(reason) {
115
115
  super(`Agent tool execution stopped: ${reason}`);
@@ -123,8 +123,8 @@ function isPlainObject(value) {
123
123
  const proto = Object.getPrototypeOf(value);
124
124
  return proto === Object.prototype || proto === null;
125
125
  }
126
- function isToolExecutionControlError(value) {
127
- return value instanceof ToolExecutionControlError;
126
+ function isToolExecutionControlError2(value) {
127
+ return value instanceof ToolExecutionControlError2;
128
128
  }
129
129
  var noProgress = async () => {
130
130
  return;
@@ -134,10 +134,10 @@ async function executeToolMethod(method, call, options = {}) {
134
134
  return inToolCallContext({ source: context.source, toolName, method }, () => runToolMethod(method, call, options));
135
135
  }
136
136
  function inToolCallContext(call, body) {
137
- const parent = getRequestContext();
137
+ const parent = getRequestContext2();
138
138
  if (!parent)
139
139
  return body();
140
- return runWithRequestContext({
140
+ return runWithRequestContext2({
141
141
  ...parent,
142
142
  trace: parent.trace,
143
143
  dimensions: parent.dimensions ? { ...parent.dimensions } : undefined,
@@ -205,7 +205,7 @@ async function resolveToolExtension(extension, keys, rawArgs, context) {
205
205
  return { thrown: err };
206
206
  }
207
207
  if (!parsed.success)
208
- return { invalid: formatZodError(parsed.error) };
208
+ return { invalid: formatZodError2(parsed.error) };
209
209
  try {
210
210
  const resolved = await extension.resolve({ ...rawArgs, ...parsed.data });
211
211
  return {
@@ -279,9 +279,9 @@ async function runToolMethod(method, { toolName, rawArgs, context }, {
279
279
  return { kind: "args" };
280
280
  };
281
281
  const finishThrown = async (err) => {
282
- const before2 = await runBefore();
283
- if (before2?.kind === "failure")
284
- return before2.result;
282
+ const before = await runBefore();
283
+ if (before?.kind === "failure")
284
+ return before.result;
285
285
  await observed("onToolError", () => hooks?.onToolError?.({ toolName, error: err, context: hookContext, endpoint: method }));
286
286
  return finish(toolResultFromError(err), err);
287
287
  };
@@ -294,9 +294,9 @@ async function runToolMethod(method, { toolName, rawArgs, context }, {
294
294
  if ("thrown" in resolved)
295
295
  return finishThrown(resolved.thrown);
296
296
  if ("invalid" in resolved) {
297
- const before2 = await runBefore();
298
- if (before2?.kind === "failure")
299
- return before2.result;
297
+ const before = await runBefore();
298
+ if (before?.kind === "failure")
299
+ return before.result;
300
300
  return finish({
301
301
  ok: false,
302
302
  code: "VALIDATION_ERROR",
@@ -334,10 +334,10 @@ async function runToolMethod(method, { toolName, rawArgs, context }, {
334
334
  toolSurface
335
335
  }));
336
336
  } catch (err) {
337
- if (isToolExecutionControlError(err))
337
+ if (isToolExecutionControlError2(err))
338
338
  throw err;
339
339
  return finishThrown(err);
340
340
  }
341
341
  }
342
342
 
343
- export { parseToolCallArguments, toolResultFromError, toolErrorFromResult, toolCauseFromResult, ToolExecutionControlError, isToolExecutionControlError, executeToolMethod };
343
+ export { parseToolCallArguments, toolResultFromError, toolErrorFromResult, toolCauseFromResult, ToolExecutionControlError2, isToolExecutionControlError2, executeToolMethod };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  loadDarwinBinding
3
- } from "./index-zjjyynm3.js";
3
+ } from "./index-d4pa2bgs.js";
4
4
 
5
5
  // src/agent-runtime/contained-scan.ts
6
6
  import path2 from "node:path";
@@ -1,12 +1,12 @@
1
+ import {
2
+ projectToolSurface
3
+ } from "./index-7z9ym7t8.js";
1
4
  import {
2
5
  contractToolMountable
3
- } from "./index-bm5rx7n6.js";
6
+ } from "./index-n9tyz8z3.js";
4
7
  import {
5
8
  runtimeToolMountable
6
- } from "./index-d8m8zpd8.js";
7
- import {
8
- projectToolSurface
9
- } from "./index-0r0fbk7z.js";
9
+ } from "./index-jzczzcsb.js";
10
10
 
11
11
  // src/tools/surface.ts
12
12
  function collectToolSurface({
@@ -1,20 +1,20 @@
1
1
  import {
2
- base64UrlToBytes,
3
- bytesToBase64Url
4
- } from "./index-rxfy4cq7.js";
2
+ defineContract2
3
+ } from "./index-ck71tbcf.js";
5
4
  import {
6
- defineContract
7
- } from "./index-k30h66yd.js";
5
+ AppError2,
6
+ STITCH_ERROR_STATUS2,
7
+ isStitchErrorCode2
8
+ } from "./index-n53mswt3.js";
8
9
  import {
9
- AppError,
10
- STITCH_ERROR_STATUS,
11
- isStitchErrorCode
12
- } from "./index-2vtcmrj9.js";
10
+ bytesToBase64Url,
11
+ base64UrlToBytes
12
+ } from "./index-dwfv9a85.js";
13
13
  import {
14
- mapObjectTypeBoundary,
14
+ typedEntries,
15
15
  transportResult,
16
- typedEntries
17
- } from "./index-hffjpmq9.js";
16
+ mapObjectTypeBoundary
17
+ } from "./index-9jfdm5tg.js";
18
18
  // src/contract/errors-factory.ts
19
19
  import { z } from "zod";
20
20
  function isErrorDetailsSchema(value) {
@@ -31,7 +31,7 @@ function validateDefinition(code, definition) {
31
31
  throw new Error(`[stitchkit] Error "${code}" message must be a non-empty string`);
32
32
  }
33
33
  }
34
- function defineErrors(source, mapping) {
34
+ function defineErrors2(source, mapping) {
35
35
  const definitions = mapObjectTypeBoundary(source, (code, definition) => {
36
36
  const name = String(code);
37
37
  validateDefinition(name, definition);
@@ -46,10 +46,10 @@ function defineErrors(source, mapping) {
46
46
  if ("details" in options) {
47
47
  throw new Error(`[stitchkit] Error "${name}" does not declare details`);
48
48
  }
49
- return new AppError(name, message, definition.status, undefined, options.hint, undefined, definition.retryable);
49
+ return new AppError2(name, message, definition.status, undefined, options.hint, undefined, definition.retryable);
50
50
  }
51
51
  const details = definition.details.parse(options.details);
52
- return new AppError(name, message, definition.status, details, options.hint, undefined, definition.retryable);
52
+ return new AppError2(name, message, definition.status, details, options.hint, undefined, definition.retryable);
53
53
  };
54
54
  });
55
55
  Object.freeze(errors);
@@ -57,13 +57,13 @@ function defineErrors(source, mapping) {
57
57
  Object.freeze(codes);
58
58
  const known = new Set(Object.keys(definitions));
59
59
  for (const [code, target] of Object.entries(mapping?.map ?? {})) {
60
- if (!isStitchErrorCode(code)) {
60
+ if (!isStitchErrorCode2(code)) {
61
61
  throw new Error(`[stitchkit] Error vocabulary contains unknown framework code "${code}"`);
62
62
  }
63
63
  if (typeof target !== "string" || !known.has(target)) {
64
64
  throw new Error(`[stitchkit] Error vocabulary maps "${code}" to undeclared code "${String(target)}"`);
65
65
  }
66
- const status = STITCH_ERROR_STATUS[code];
66
+ const status = STITCH_ERROR_STATUS2[code];
67
67
  if (definitions[target]?.status !== status) {
68
68
  throw new Error(`[stitchkit] Error vocabulary maps "${code}" (${status}) to "${target}", declared with status ${String(definitions[target]?.status)}`);
69
69
  }
@@ -81,14 +81,14 @@ function defineErrors(source, mapping) {
81
81
  }
82
82
  }
83
83
  if (mapping?.exhaustive === true) {
84
- for (const code of Object.keys(STITCH_ERROR_STATUS)) {
84
+ for (const code of Object.keys(STITCH_ERROR_STATUS2)) {
85
85
  if (!Object.hasOwn(mapping.map, code)) {
86
86
  throw new Error(`[stitchkit] Exhaustive error vocabulary is missing "${code}"`);
87
87
  }
88
88
  }
89
89
  }
90
90
  const codeMap = {};
91
- for (const [stitchCode, status] of typedEntries(STITCH_ERROR_STATUS)) {
91
+ for (const [stitchCode, status] of typedEntries(STITCH_ERROR_STATUS2)) {
92
92
  const code = mapping?.map?.[stitchCode] ?? mapping?.fallback?.[status];
93
93
  if (code === undefined)
94
94
  continue;
@@ -108,9 +108,9 @@ function defineErrors(source, mapping) {
108
108
  });
109
109
  }
110
110
  // src/contract/factory.ts
111
- function createContractFactory(config) {
111
+ function createContractFactory2(config) {
112
112
  const scoped = (meta, endpoints) => {
113
- const validated = defineContract({ prefix: meta.prefix }, endpoints);
113
+ const validated = defineContract2({ prefix: meta.prefix }, endpoints);
114
114
  return {
115
115
  endpoints: validated.endpoints,
116
116
  meta: { ...meta, prefix: meta.prefix, scope: meta.scope }
@@ -126,7 +126,7 @@ function createContractFactory(config) {
126
126
  }
127
127
  // src/contract/pagination.ts
128
128
  import { z as z2 } from "zod";
129
- function paginatedSchema(itemSchema) {
129
+ function paginatedSchema2(itemSchema) {
130
130
  return z2.object({
131
131
  items: z2.array(itemSchema),
132
132
  nextCursor: z2.string().nullable()
@@ -138,10 +138,10 @@ function toBase64Url(str) {
138
138
  function fromBase64Url(value) {
139
139
  return new TextDecoder().decode(base64UrlToBytes(value));
140
140
  }
141
- function encodeCursor(value) {
141
+ function encodeCursor2(value) {
142
142
  return toBase64Url(JSON.stringify(value));
143
143
  }
144
- function decodeCursor(cursor, schema) {
144
+ function decodeCursor2(cursor, schema) {
145
145
  if (!cursor)
146
146
  return null;
147
147
  try {
@@ -151,4 +151,4 @@ function decodeCursor(cursor, schema) {
151
151
  return null;
152
152
  }
153
153
  }
154
- export { defineErrors, createContractFactory, paginatedSchema, encodeCursor, decodeCursor };
154
+ export { defineErrors2, createContractFactory2, paginatedSchema2, encodeCursor2, decodeCursor2 };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  isRecord
3
- } from "./index-hffjpmq9.js";
3
+ } from "./index-9jfdm5tg.js";
4
4
 
5
5
  // src/internal/error-message.ts
6
6
  function messageOf(value) {
@@ -1,7 +1,7 @@
1
1
  // src/internal/backoff.ts
2
2
  import { z } from "zod";
3
3
  var PositiveSafeIntegerSchema = z.number().int().positive().safe();
4
- var BackoffPolicySchema = z.object({
4
+ var BackoffPolicySchema2 = z.object({
5
5
  minDelayMs: PositiveSafeIntegerSchema,
6
6
  maxDelayMs: PositiveSafeIntegerSchema,
7
7
  jitter: z.number().min(0).max(1)
@@ -13,8 +13,8 @@ function backoffDelay(policy, attempt, random = Math.random) {
13
13
  const spread = exponential * policy.jitter * random();
14
14
  return Math.max(1, Math.round(exponential - spread));
15
15
  }
16
- function createBackoff(policy, random = Math.random) {
17
- const parsed = BackoffPolicySchema.parse(policy);
16
+ function createBackoff2(policy, random = Math.random) {
17
+ const parsed = BackoffPolicySchema2.parse(policy);
18
18
  let attempt = 0;
19
19
  return {
20
20
  next() {
@@ -27,4 +27,4 @@ function createBackoff(policy, random = Math.random) {
27
27
  };
28
28
  }
29
29
 
30
- export { BackoffPolicySchema, backoffDelay, createBackoff };
30
+ export { BackoffPolicySchema2, backoffDelay, createBackoff2 };