stitchkit 0.100.2 → 0.101.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (242) hide show
  1. package/CHANGELOG.md +153 -0
  2. package/README.md +2 -1
  3. package/dist/entrypoints/agent-runtime/browser.js +119 -119
  4. package/dist/entrypoints/agent-runtime/coding-tools.js +15 -20
  5. package/dist/entrypoints/agent-runtime/harness.js +55 -63
  6. package/dist/entrypoints/agent-runtime/openrouter.js +6 -6
  7. package/dist/entrypoints/agent-runtime/sandbox.js +20 -25
  8. package/dist/entrypoints/agent-runtime/sqlite/bun.js +11 -13
  9. package/dist/entrypoints/agent-runtime/sqlite/node.js +11 -13
  10. package/dist/entrypoints/agent-runtime/testing.js +32 -34
  11. package/dist/entrypoints/agent-runtime.js +395 -402
  12. package/dist/entrypoints/application/diagnostic-journal.js +26 -27
  13. package/dist/entrypoints/application/directory-inbox.js +16 -17
  14. package/dist/entrypoints/application/grammy.js +13 -13
  15. package/dist/entrypoints/application/opentelemetry.js +13 -13
  16. package/dist/entrypoints/application/schemas.js +24 -24
  17. package/dist/entrypoints/application.js +209 -210
  18. package/dist/entrypoints/bin/upgrade-cli.js +2 -2
  19. package/dist/entrypoints/cli.js +81 -84
  20. package/dist/entrypoints/contract.js +54 -57
  21. package/dist/entrypoints/declaration.js +22 -22
  22. package/dist/entrypoints/files.js +18 -21
  23. package/dist/entrypoints/geo.js +7 -8
  24. package/dist/entrypoints/google.js +2 -2
  25. package/dist/entrypoints/index.js +150 -154
  26. package/dist/entrypoints/live.js +45 -47
  27. package/dist/entrypoints/node.js +68 -74
  28. package/dist/entrypoints/oauth.js +6 -6
  29. package/dist/entrypoints/observability.d.ts +1 -0
  30. package/dist/entrypoints/observability.d.ts.map +1 -1
  31. package/dist/entrypoints/observability.js +116 -87
  32. package/dist/entrypoints/primitives.js +35 -35
  33. package/dist/entrypoints/react/keyboard.d.ts +4 -0
  34. package/dist/entrypoints/react/keyboard.d.ts.map +1 -0
  35. package/dist/entrypoints/react/keyboard.js +397 -0
  36. package/dist/entrypoints/react.js +10 -10
  37. package/dist/entrypoints/release.js +7 -7
  38. package/dist/entrypoints/remote.js +15 -17
  39. package/dist/entrypoints/server.js +198 -200
  40. package/dist/entrypoints/telegram/html.d.ts +5 -0
  41. package/dist/entrypoints/telegram/html.d.ts.map +1 -0
  42. package/dist/entrypoints/telegram/html.js +26 -0
  43. package/dist/entrypoints/telegram/screens.d.ts +14 -0
  44. package/dist/entrypoints/telegram/screens.d.ts.map +1 -0
  45. package/dist/entrypoints/telegram/screens.js +2028 -0
  46. package/dist/entrypoints/telegram.d.ts +11 -3
  47. package/dist/entrypoints/telegram.d.ts.map +1 -1
  48. package/dist/entrypoints/telegram.js +779 -159
  49. package/dist/entrypoints/testing.js +75 -79
  50. package/dist/entrypoints/tools/connections.js +30 -32
  51. package/dist/entrypoints/tools/contract.js +18 -20
  52. package/dist/entrypoints/tools/invoker.js +12 -17
  53. package/dist/entrypoints/tools.js +224 -229
  54. package/dist/entrypoints/tracking/server.js +6 -6
  55. package/dist/entrypoints/tracking.js +40 -42
  56. package/dist/entrypoints/voice.js +3 -3
  57. package/dist/{index-eaysmdtq.js → index-0ndk4555.js} +56 -56
  58. package/dist/{index-2bxbyab0.js → index-1bx1xv1k.js} +1 -1
  59. package/dist/{index-p5r7qpdd.js → index-1eeqpadm.js} +4 -4
  60. package/dist/{index-hadmp193.js → index-3ct7hhq6.js} +210 -210
  61. package/dist/{index-e01r054k.js → index-45tdvqa3.js} +26 -26
  62. package/dist/{index-dce5wxcq.js → index-4s0fep5q.js} +8 -8
  63. package/dist/index-50ejfz75.js +9 -0
  64. package/dist/{index-m9zn6cpq.js → index-5107q189.js} +12 -12
  65. package/dist/{index-sbdmyz75.js → index-5cc6r990.js} +3 -3
  66. package/dist/{index-c6bxbsnc.js → index-7kxw1awn.js} +2 -2
  67. package/dist/{index-0r0fbk7z.js → index-7z9ym7t8.js} +28 -28
  68. package/dist/{index-p7hgdyhb.js → index-814xpr6d.js} +2 -2
  69. package/dist/{index-gtj3zc53.js → index-8kzct1d6.js} +99 -99
  70. package/dist/{index-1zbbzgfh.js → index-9pw0a51a.js} +4 -4
  71. package/dist/{index-79z7m7dt.js → index-a9pd417t.js} +35 -35
  72. package/dist/{index-ham5sz8m.js → index-aaj97r4y.js} +45 -45
  73. package/dist/{index-s812ycat.js → index-aan6hqb9.js} +3 -3
  74. package/dist/{index-10x2hbx0.js → index-adhgd4pe.js} +44 -44
  75. package/dist/{index-2gxzjvyr.js → index-afjvjyck.js} +23 -23
  76. package/dist/{index-qmy6zq75.js → index-ahvsksw5.js} +16 -16
  77. package/dist/{index-hr4tzbwq.js → index-ap3gqe56.js} +3 -3
  78. package/dist/{index-znfs20ss.js → index-b2bz0kdm.js} +16 -16
  79. package/dist/{index-r066jx76.js → index-c6aagrbd.js} +148 -120
  80. package/dist/{index-k30h66yd.js → index-ck71tbcf.js} +9 -9
  81. package/dist/{index-eqqvgdb3.js → index-ct75c3at.js} +2 -2
  82. package/dist/{index-gw8bmyaj.js → index-djjhhgjk.js} +41 -41
  83. package/dist/{index-8qt2m66q.js → index-dvwj1f43.js} +43 -43
  84. package/dist/index-e05cjgtf.js +144 -0
  85. package/dist/{index-yw4fzmdz.js → index-e6c2spsd.js} +79 -30
  86. package/dist/{index-fhwqwxe0.js → index-ej331hah.js} +1 -1
  87. package/dist/{index-9t3dffv2.js → index-ewbaywk5.js} +5 -5
  88. package/dist/{index-7p1f0vp2.js → index-fyphpknh.js} +25 -25
  89. package/dist/{index-83bdg97s.js → index-g149e9pk.js} +1 -1
  90. package/dist/{index-ngfhvfpd.js → index-g6a3na27.js} +4 -4
  91. package/dist/{index-qwhynv6x.js → index-h124epcf.js} +20 -20
  92. package/dist/{index-h6eeys1v.js → index-h97tqqp1.js} +9 -9
  93. package/dist/{index-zcgf3gqf.js → index-hby4qhax.js} +10 -10
  94. package/dist/{index-5jrd0yng.js → index-j8aw2c0e.js} +4 -4
  95. package/dist/{index-d8m8zpd8.js → index-jzczzcsb.js} +14 -14
  96. package/dist/index-kqnd6a85.js +26 -0
  97. package/dist/{index-35mh5bhj.js → index-kw1ws0cs.js} +12 -12
  98. package/dist/{index-4gcnakhx.js → index-m38ej7e5.js} +2 -2
  99. package/dist/{index-ndddxtyx.js → index-m79yr938.js} +19 -19
  100. package/dist/{index-5p2m7we1.js → index-m9fndta6.js} +11 -11
  101. package/dist/index-mnkk1ffz.js +150 -0
  102. package/dist/index-n15jny5b.js +4 -0
  103. package/dist/{index-2vtcmrj9.js → index-n53mswt3.js} +20 -20
  104. package/dist/{index-bt14acb5.js → index-n5yqxd3d.js} +21 -21
  105. package/dist/{index-bm5rx7n6.js → index-n9tyz8z3.js} +12 -12
  106. package/dist/index-nmaqxdx7.js +463 -0
  107. package/dist/{index-mqv3b5rh.js → index-nx6eazt0.js} +30 -30
  108. package/dist/{index-3z73fh2c.js → index-q0th8q0z.js} +9 -9
  109. package/dist/{index-v260df89.js → index-qjeggp8w.js} +20 -20
  110. package/dist/{index-zfrhfn82.js → index-r1z0rd9c.js} +20 -20
  111. package/dist/{index-wqgjfstn.js → index-r5c4fedv.js} +3 -3
  112. package/dist/{index-cyktc4bp.js → index-r5hsgkz5.js} +118 -118
  113. package/dist/{index-0b1ess5e.js → index-r7a7r7ha.js} +1 -1
  114. package/dist/{index-1j8pm5t0.js → index-rfkh44ss.js} +15 -15
  115. package/dist/index-rz3z13e9.js +47 -0
  116. package/dist/{index-k6gpggb9.js → index-s80awwsw.js} +35 -35
  117. package/dist/{index-vqr7f7v8.js → index-ssmd41kh.js} +124 -124
  118. package/dist/index-sznqf8fx.js +20 -0
  119. package/dist/{index-ensd0r74.js → index-v14qqmys.js} +41 -41
  120. package/dist/{index-paz6sgdp.js → index-v4a2fjtk.js} +36 -36
  121. package/dist/{index-d9pk3td4.js → index-w0eqdhyd.js} +14 -14
  122. package/dist/{index-5qn1kx34.js → index-w575evhq.js} +29 -29
  123. package/dist/{index-3gye9wzb.js → index-w5s3xftz.js} +26 -26
  124. package/dist/{index-tm88avnj.js → index-wykebpn9.js} +3 -3
  125. package/dist/{index-sh3s86na.js → index-xkhk5d6g.js} +17 -17
  126. package/dist/{index-6k1937bx.js → index-xqhede6x.js} +4 -4
  127. package/dist/{index-f4fx2tza.js → index-zs4ms3th.js} +181 -181
  128. package/dist/{index-k5hsfc3j.js → index-zsvzhjtk.js} +1 -1
  129. package/dist/internal/secret-shapes.d.ts +21 -0
  130. package/dist/internal/secret-shapes.d.ts.map +1 -0
  131. package/dist/observability/bounded-logger.d.ts +2 -0
  132. package/dist/observability/bounded-logger.d.ts.map +1 -1
  133. package/dist/observability/sanitize.d.ts +6 -0
  134. package/dist/observability/sanitize.d.ts.map +1 -1
  135. package/dist/observability/secret-values.d.ts +25 -0
  136. package/dist/observability/secret-values.d.ts.map +1 -0
  137. package/dist/react/keyboard/hooks.d.ts +71 -0
  138. package/dist/react/keyboard/hooks.d.ts.map +1 -0
  139. package/dist/react/keyboard/layers.d.ts +98 -0
  140. package/dist/react/keyboard/layers.d.ts.map +1 -0
  141. package/dist/react/keyboard/zone.d.ts +139 -0
  142. package/dist/react/keyboard/zone.d.ts.map +1 -0
  143. package/dist/telegram/bot-api.d.ts +7 -4
  144. package/dist/telegram/bot-api.d.ts.map +1 -1
  145. package/dist/telegram/crypto.d.ts +16 -0
  146. package/dist/telegram/crypto.d.ts.map +1 -0
  147. package/dist/telegram/html/check.d.ts +26 -0
  148. package/dist/telegram/html/check.d.ts.map +1 -0
  149. package/dist/telegram/html/nodes.d.ts +70 -0
  150. package/dist/telegram/html/nodes.d.ts.map +1 -0
  151. package/dist/telegram/html/parse.d.ts +35 -0
  152. package/dist/telegram/html/parse.d.ts.map +1 -0
  153. package/dist/telegram/html/render.d.ts +39 -0
  154. package/dist/telegram/html/render.d.ts.map +1 -0
  155. package/dist/telegram/init-data.d.ts +3 -44
  156. package/dist/telegram/init-data.d.ts.map +1 -1
  157. package/dist/telegram/operator-channel.d.ts +19 -3
  158. package/dist/telegram/operator-channel.d.ts.map +1 -1
  159. package/dist/telegram/operator-dedupe.d.ts +44 -0
  160. package/dist/telegram/operator-dedupe.d.ts.map +1 -0
  161. package/dist/telegram/screens/callback-codec.d.ts +34 -0
  162. package/dist/telegram/screens/callback-codec.d.ts.map +1 -0
  163. package/dist/telegram/screens/dispatch.d.ts +22 -0
  164. package/dist/telegram/screens/dispatch.d.ts.map +1 -0
  165. package/dist/telegram/screens/display.d.ts +70 -0
  166. package/dist/telegram/screens/display.d.ts.map +1 -0
  167. package/dist/telegram/screens/execute.d.ts +57 -0
  168. package/dist/telegram/screens/execute.d.ts.map +1 -0
  169. package/dist/telegram/screens/html.d.ts +36 -0
  170. package/dist/telegram/screens/html.d.ts.map +1 -0
  171. package/dist/telegram/screens/outcome.d.ts +74 -0
  172. package/dist/telegram/screens/outcome.d.ts.map +1 -0
  173. package/dist/telegram/screens/path.d.ts +29 -0
  174. package/dist/telegram/screens/path.d.ts.map +1 -0
  175. package/dist/telegram/screens/reconcile.d.ts +67 -0
  176. package/dist/telegram/screens/reconcile.d.ts.map +1 -0
  177. package/dist/telegram/screens/registry.d.ts +23 -0
  178. package/dist/telegram/screens/registry.d.ts.map +1 -0
  179. package/dist/telegram/screens/render.d.ts +70 -0
  180. package/dist/telegram/screens/render.d.ts.map +1 -0
  181. package/dist/telegram/screens/runtime.d.ts +133 -0
  182. package/dist/telegram/screens/runtime.d.ts.map +1 -0
  183. package/dist/telegram/screens/screen-types.d.ts +130 -0
  184. package/dist/telegram/screens/screen-types.d.ts.map +1 -0
  185. package/dist/telegram/screens/screen.d.ts +138 -0
  186. package/dist/telegram/screens/screen.d.ts.map +1 -0
  187. package/dist/telegram/screens/state.d.ts +115 -0
  188. package/dist/telegram/screens/state.d.ts.map +1 -0
  189. package/dist/telegram/screens/telegram-screens.d.ts +18 -0
  190. package/dist/telegram/screens/telegram-screens.d.ts.map +1 -0
  191. package/dist/telegram/screens/test-chat-telegram.d.ts +47 -0
  192. package/dist/telegram/screens/test-chat-telegram.d.ts.map +1 -0
  193. package/dist/telegram/screens/test-chat.d.ts +66 -0
  194. package/dist/telegram/screens/test-chat.d.ts.map +1 -0
  195. package/dist/telegram/screens/view.d.ts +89 -0
  196. package/dist/telegram/screens/view.d.ts.map +1 -0
  197. package/dist/telegram/send-failure.d.ts +25 -0
  198. package/dist/telegram/send-failure.d.ts.map +1 -1
  199. package/dist/telegram/update-intake.d.ts +82 -0
  200. package/dist/telegram/update-intake.d.ts.map +1 -0
  201. package/dist/telegram/update-store-check.d.ts +22 -0
  202. package/dist/telegram/update-store-check.d.ts.map +1 -0
  203. package/dist/telegram/update-store-postgres.d.ts +33 -0
  204. package/dist/telegram/update-store-postgres.d.ts.map +1 -0
  205. package/dist/telegram/update-store-sqlite.d.ts +26 -0
  206. package/dist/telegram/update-store-sqlite.d.ts.map +1 -0
  207. package/dist/telegram/update-store.d.ts +67 -0
  208. package/dist/telegram/update-store.d.ts.map +1 -0
  209. package/dist/telegram/user.d.ts +51 -0
  210. package/dist/telegram/user.d.ts.map +1 -0
  211. package/dist/telegram/webhook.d.ts +105 -0
  212. package/dist/telegram/webhook.d.ts.map +1 -0
  213. package/dist/tools/cli/args-fields.d.ts +8 -0
  214. package/dist/tools/cli/args-fields.d.ts.map +1 -1
  215. package/dist/tools/cli/args-route.d.ts.map +1 -1
  216. package/dist/tools/cli/args.d.ts.map +1 -1
  217. package/dist/tools/cli/help.d.ts.map +1 -1
  218. package/llms/cli.txt +8 -2
  219. package/llms/observability.txt +15 -2
  220. package/llms/react-keyboard.txt +193 -0
  221. package/llms/server.4.txt +16 -0
  222. package/llms/stitchkit.txt +10 -4
  223. package/llms/telegram-html.txt +35 -0
  224. package/llms/telegram-screens.txt +365 -0
  225. package/llms/telegram.txt +245 -11
  226. package/llms/{upgrading-0.74.0-0.100.0.txt → upgrading-0.74.0-0.101.0.txt} +39 -3
  227. package/llms/upgrading.txt +1 -1
  228. package/llms-full.txt +889 -19
  229. package/llms.txt +12 -7
  230. package/package.json +17 -2
  231. package/dist/index-2k4yrqkc.js +0 -9
  232. package/dist/index-crykmqkr.js +0 -26
  233. package/dist/index-y64k3s0h.js +0 -150
  234. package/dist/index-y91ry9h2.js +0 -4
  235. /package/dist/{index-hffjpmq9.js → index-9jfdm5tg.js} +0 -0
  236. /package/dist/{index-zjjyynm3.js → index-d4pa2bgs.js} +0 -0
  237. /package/dist/{index-rxfy4cq7.js → index-dwfv9a85.js} +0 -0
  238. /package/dist/{index-5jm36zv1.js → index-gfk7nrht.js} +0 -0
  239. /package/dist/{index-b9aefrqd.js → index-n1dqr7gf.js} +0 -0
  240. /package/dist/{index-q3pyb9n0.js → index-sykb5ag7.js} +0 -0
  241. /package/dist/{index-48ffdxgk.js → index-xhzq2qvj.js} +0 -0
  242. /package/dist/{index-kzfs85xp.js → index-zsarb5xp.js} +0 -0
@@ -1,9 +1,12 @@
1
+ import {
2
+ maskSecretShapes
3
+ } from "./index-sznqf8fx.js";
1
4
  import {
2
5
  isUnsafeKey
3
- } from "./index-kzfs85xp.js";
6
+ } from "./index-zsarb5xp.js";
4
7
  import {
5
8
  isRecord
6
- } from "./index-hffjpmq9.js";
9
+ } from "./index-9jfdm5tg.js";
7
10
 
8
11
  // src/observability/sanitize.ts
9
12
  var SENSITIVE_WORDS = new Set([
@@ -53,17 +56,40 @@ var DEFAULT_MAX_BYTES = 16000;
53
56
  var DEFAULT_MAX_DEPTH = 20;
54
57
  var DEFAULT_MAX_NODES = 20000;
55
58
  var MASK = "[redacted]";
56
- function redact(value, options = {}) {
57
- const custom = options.sensitiveKeys;
58
- const isSensitive = custom === undefined ? isSensitiveKeyDefault : (key) => {
59
- custom.lastIndex = 0;
60
- return custom.test(key) || options.includeDefaultSensitiveKeys === true && isSensitiveKeyDefault(key);
59
+ function secretMasker(options, isSecretName) {
60
+ const values = [...options.sensitiveValues ?? []].filter((value) => value !== "").sort((left, right) => right.length - left.length);
61
+ const patterns = options.sensitiveUrlPatterns ?? [];
62
+ return (input) => {
63
+ let output = input;
64
+ for (const value of values)
65
+ output = output.replaceAll(value, MASK);
66
+ for (const pattern of patterns) {
67
+ try {
68
+ const global = new RegExp(pattern.source, `${pattern.flags.replace(/[gy]/g, "")}g`);
69
+ output = output.replace(global, MASK);
70
+ } catch {}
71
+ }
72
+ return maskSecretShapes(output, MASK, isSecretName);
61
73
  };
62
- const maxDepth = options.maxDepth ?? DEFAULT_MAX_DEPTH;
63
- const maxStringLength = options.maxStringLength ?? Number.POSITIVE_INFINITY;
64
- const maxCollectionLength = options.maxCollectionLength ?? Number.POSITIVE_INFINITY;
65
- const pathMatchers = (options.sensitivePaths ?? []).map((pattern) => pattern.split("."));
66
- const matchesPath = (matcher, path, patternIndex = 0, pathIndex = 0) => {
74
+ }
75
+ var ERROR_CORE = new Set(["_type", "name", "message", "stack", "cause"]);
76
+ function isErrorFact(value) {
77
+ if (value === null || typeof value !== "object")
78
+ return typeof value !== "function";
79
+ if (Array.isArray(value) || value instanceof Error || value instanceof Date)
80
+ return true;
81
+ const prototype = Object.getPrototypeOf(value);
82
+ return prototype === Object.prototype || prototype === null;
83
+ }
84
+ function kindOf(value) {
85
+ if (typeof value === "function")
86
+ return "function";
87
+ const maker = isRecord(value) ? value.constructor : undefined;
88
+ return typeof maker === "function" && maker.name !== "" ? maker.name : "object";
89
+ }
90
+ function pathMatcher(patterns) {
91
+ const matchers = patterns.map((pattern) => pattern.split("."));
92
+ const matches = (matcher, path, patternIndex = 0, pathIndex = 0) => {
67
93
  if (patternIndex === matcher.length)
68
94
  return pathIndex === path.length;
69
95
  const segment = matcher[patternIndex];
@@ -71,29 +97,35 @@ function redact(value, options = {}) {
71
97
  if (patternIndex + 1 === matcher.length)
72
98
  return true;
73
99
  for (let next = pathIndex;next <= path.length; next += 1) {
74
- if (matchesPath(matcher, path, patternIndex + 1, next))
100
+ if (matches(matcher, path, patternIndex + 1, next))
75
101
  return true;
76
102
  }
77
103
  return false;
78
104
  }
79
105
  if (pathIndex === path.length || segment !== "*" && segment !== path[pathIndex])
80
106
  return false;
81
- return matchesPath(matcher, path, patternIndex + 1, pathIndex + 1);
107
+ return matches(matcher, path, patternIndex + 1, pathIndex + 1);
82
108
  };
83
- const isSensitivePath = (path) => pathMatchers.some((matcher) => matchesPath(matcher, path));
109
+ return (path) => matchers.some((matcher) => matches(matcher, path));
110
+ }
111
+ function redact2(value, options = {}) {
112
+ const custom = options.sensitiveKeys;
113
+ const isSensitive = custom === undefined ? isSensitiveKeyDefault : (key) => {
114
+ custom.lastIndex = 0;
115
+ return custom.test(key) || options.includeDefaultSensitiveKeys === true && isSensitiveKeyDefault(key);
116
+ };
117
+ const maxDepth = options.maxDepth ?? DEFAULT_MAX_DEPTH;
118
+ const maxStringLength = options.maxStringLength ?? Number.POSITIVE_INFINITY;
119
+ const maxCollectionLength = options.maxCollectionLength ?? Number.POSITIVE_INFINITY;
120
+ const isSensitivePath = pathMatcher(options.sensitivePaths ?? []);
84
121
  const stringBoundFor = (key) => {
85
122
  const byKey = key === undefined ? undefined : options.maxStringLengthByKey?.[key];
86
123
  return byKey ?? maxStringLength;
87
124
  };
125
+ const mask = secretMasker(options, isSensitive);
88
126
  const safeString = (input, key) => {
89
127
  const bound = stringBoundFor(key);
90
- let output = input;
91
- for (const pattern of options.sensitiveUrlPatterns ?? []) {
92
- try {
93
- const global = new RegExp(pattern.source, `${pattern.flags.replace(/[gy]/g, "")}g`);
94
- output = output.replace(global, MASK);
95
- } catch {}
96
- }
128
+ const output = mask(input);
97
129
  if (output.length <= bound)
98
130
  return output;
99
131
  return `${output.slice(0, Math.max(0, bound))}…[truncated]`;
@@ -128,12 +160,12 @@ function redact(value, options = {}) {
128
160
  return "[circular]";
129
161
  ancestors.add(input);
130
162
  const entries = [...input.entries()];
131
- const result = entries.slice(0, maxCollectionLength).map(([key, value2]) => {
163
+ const result = entries.slice(0, maxCollectionLength).map(([key, value]) => {
132
164
  const segment = typeof key === "string" ? key : String(key);
133
165
  const childPath = [...path, segment];
134
166
  return [
135
167
  walk(key, depth + 1, [...path, "[key]"]),
136
- typeof key === "string" && isSensitive(key) || isSensitivePath(childPath) ? MASK : walk(value2, depth + 1, childPath)
168
+ typeof key === "string" && isSensitive(key) || isSensitivePath(childPath) ? MASK : walk(value, depth + 1, childPath)
137
169
  ];
138
170
  });
139
171
  if (entries.length > maxCollectionLength)
@@ -165,14 +197,31 @@ function redact(value, options = {}) {
165
197
  return "[unreadable]";
166
198
  }
167
199
  };
200
+ if (ancestors.has(input))
201
+ return "[circular]";
202
+ ancestors.add(input);
168
203
  const stack = property("stack");
169
204
  const cause = property("cause");
205
+ const own = {};
206
+ for (const key of Object.keys(input)) {
207
+ if (isUnsafeKey(key) || ERROR_CORE.has(key))
208
+ continue;
209
+ const childPath = [...path, key];
210
+ try {
211
+ const field = Reflect.get(input, key);
212
+ own[key] = isSensitive(key) || isSensitivePath(childPath) ? MASK : isErrorFact(field) ? walk(field, depth + 1, childPath) : `[${kindOf(field)}]`;
213
+ } catch {
214
+ own[key] = "[unreadable]";
215
+ }
216
+ }
217
+ ancestors.delete(input);
170
218
  return {
171
219
  _type: "error",
172
220
  name: safeString(String(property("name")), "name"),
173
221
  message: safeString(String(property("message")), "message"),
174
222
  ...stack !== undefined && { stack: safeString(String(stack), "stack") },
175
- ...cause !== undefined && { cause: walk(cause, depth + 1, [...path, "cause"]) }
223
+ ...cause !== undefined && { cause: walk(cause, depth + 1, [...path, "cause"]) },
224
+ ...own
176
225
  };
177
226
  }
178
227
  if (Array.isArray(input)) {
@@ -222,7 +271,7 @@ function redact(value, options = {}) {
222
271
  };
223
272
  return walk(value, 0);
224
273
  }
225
- function truncatePreview(value, maxBytes = DEFAULT_MAX_BYTES) {
274
+ function truncatePreview2(value, maxBytes = DEFAULT_MAX_BYTES) {
226
275
  const json = JSON.stringify(value);
227
276
  const bytes = new TextEncoder().encode(json);
228
277
  if (bytes.byteLength <= maxBytes)
@@ -237,16 +286,16 @@ function truncatePreview(value, maxBytes = DEFAULT_MAX_BYTES) {
237
286
  preview: `${preview}…`
238
287
  };
239
288
  }
240
- function sanitizePayload(value, options = {}) {
289
+ function sanitizePayload2(value, options = {}) {
241
290
  if (value === undefined || value === null)
242
291
  return null;
243
292
  try {
244
- return truncatePreview(redact(value, options), options.maxBytes ?? DEFAULT_MAX_BYTES);
293
+ return truncatePreview2(redact2(value, options), options.maxBytes ?? DEFAULT_MAX_BYTES);
245
294
  } catch {
246
295
  return "[unserializable]";
247
296
  }
248
297
  }
249
- function measureSize(value) {
298
+ function measureSize2(value) {
250
299
  if (value === undefined || value === null) {
251
300
  return { resultSize: null, responseBytes: 0 };
252
301
  }
@@ -265,4 +314,4 @@ function measureSize(value) {
265
314
  return { resultSize: null, responseBytes };
266
315
  }
267
316
 
268
- export { redact, truncatePreview, sanitizePayload, measureSize };
317
+ export { redact2, truncatePreview2, sanitizePayload2, measureSize2 };
@@ -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 };
@@ -1,21 +1,21 @@
1
1
  import {
2
2
  isRecord
3
- } from "./index-hffjpmq9.js";
3
+ } from "./index-9jfdm5tg.js";
4
4
 
5
5
  // src/application/diagnostic-journal-contract.ts
6
6
  import { z } from "zod";
7
7
  var PositiveSafeIntegerSchema = z.number().int().positive().safe();
8
8
  var FileModeSchema = z.number().int().min(0).max(511);
9
- var DiagnosticJournalLimitsSchema = z.object({
9
+ var DiagnosticJournalLimitsSchema2 = z.object({
10
10
  maxEventBytes: PositiveSafeIntegerSchema,
11
11
  maxPendingItems: PositiveSafeIntegerSchema,
12
12
  maxPendingBytes: PositiveSafeIntegerSchema,
13
13
  maxFileBytes: PositiveSafeIntegerSchema,
14
14
  maxFiles: PositiveSafeIntegerSchema
15
15
  }).strict().readonly();
16
- var DiagnosticJournalLockPolicySchema = z.enum(["refuse", "reclaim-stale"]);
17
- var DiagnosticJournalStateSchema = z.enum(["open", "draining", "closed", "failed"]);
18
- var DiagnosticJournalRefusalReasonSchema = z.enum([
16
+ var DiagnosticJournalLockPolicySchema2 = z.enum(["refuse", "reclaim-stale"]);
17
+ var DiagnosticJournalStateSchema2 = z.enum(["open", "draining", "closed", "failed"]);
18
+ var DiagnosticJournalRefusalReasonSchema2 = z.enum([
19
19
  "closed",
20
20
  "failed",
21
21
  "invalid",
@@ -31,13 +31,13 @@ var DiagnosticJournalRefusalCountersSchema = z.object({
31
31
  "item-capacity": z.number().int().nonnegative(),
32
32
  "byte-capacity": z.number().int().nonnegative()
33
33
  }).strict().readonly();
34
- var DiagnosticJournalFailurePhaseSchema = z.enum(["write", "rotation", "close"]);
35
- var DiagnosticJournalStatusSchema = z.object({
36
- state: DiagnosticJournalStateSchema,
34
+ var DiagnosticJournalFailurePhaseSchema2 = z.enum(["write", "rotation", "close"]);
35
+ var DiagnosticJournalStatusSchema2 = z.object({
36
+ state: DiagnosticJournalStateSchema2,
37
37
  epoch: z.uuid(),
38
- limits: DiagnosticJournalLimitsSchema,
38
+ limits: DiagnosticJournalLimitsSchema2,
39
39
  lock: z.object({
40
- policy: DiagnosticJournalLockPolicySchema,
40
+ policy: DiagnosticJournalLockPolicySchema2,
41
41
  reclaimedStale: z.boolean()
42
42
  }).strict().readonly(),
43
43
  received: z.number().int().nonnegative(),
@@ -58,11 +58,11 @@ var DiagnosticJournalStatusSchema = z.object({
58
58
  lastWrittenSequence: z.number().int().positive().optional(),
59
59
  lastSettledSequence: z.number().int().positive().optional(),
60
60
  lastFailure: z.object({
61
- phase: DiagnosticJournalFailurePhaseSchema,
61
+ phase: DiagnosticJournalFailurePhaseSchema2,
62
62
  sequence: z.number().int().positive().optional()
63
63
  }).strict().readonly().optional()
64
64
  }).strict().readonly();
65
- var DiagnosticJournalSubmitResultSchema = z.discriminatedUnion("outcome", [
65
+ var DiagnosticJournalSubmitResultSchema2 = z.discriminatedUnion("outcome", [
66
66
  z.object({
67
67
  outcome: z.literal("accepted"),
68
68
  epoch: z.uuid(),
@@ -70,21 +70,21 @@ var DiagnosticJournalSubmitResultSchema = z.discriminatedUnion("outcome", [
70
70
  }).strict().readonly(),
71
71
  z.object({
72
72
  outcome: z.literal("refused"),
73
- reason: DiagnosticJournalRefusalReasonSchema
73
+ reason: DiagnosticJournalRefusalReasonSchema2
74
74
  }).strict().readonly()
75
75
  ]);
76
- var DiagnosticJournalWaitResultSchema = z.object({
76
+ var DiagnosticJournalWaitResultSchema2 = z.object({
77
77
  outcome: z.enum(["settled", "timed-out", "cancelled"]),
78
- state: DiagnosticJournalStateSchema,
78
+ state: DiagnosticJournalStateSchema2,
79
79
  throughSequence: z.number().int().nonnegative(),
80
80
  settledSequence: z.number().int().nonnegative()
81
81
  }).strict().readonly();
82
- var DiagnosticJournalCloseResultSchema = z.object({
82
+ var DiagnosticJournalCloseResultSchema2 = z.object({
83
83
  outcome: z.enum(["closed", "timed-out", "cancelled"]),
84
- state: DiagnosticJournalStateSchema,
84
+ state: DiagnosticJournalStateSchema2,
85
85
  pendingItems: z.number().int().nonnegative()
86
86
  }).strict().readonly();
87
- var DiagnosticJournalFrameSchema = z.object({
87
+ var DiagnosticJournalFrameSchema2 = z.object({
88
88
  schemaVersion: z.literal(1),
89
89
  epoch: z.uuid(),
90
90
  sequence: z.number().int().positive(),
@@ -93,11 +93,11 @@ var DiagnosticJournalFrameSchema = z.object({
93
93
  function parseDiagnosticJournalMode(mode) {
94
94
  return FileModeSchema.parse(mode ?? 384);
95
95
  }
96
- function readDiagnosticJournalLockDiagnosis(error) {
96
+ function readDiagnosticJournalLockDiagnosis2(error) {
97
97
  if (!isRecord(error))
98
98
  return;
99
99
  const diagnosis = error.journalLock;
100
100
  return isRecord(diagnosis) ? diagnosis : undefined;
101
101
  }
102
102
 
103
- export { DiagnosticJournalLimitsSchema, DiagnosticJournalLockPolicySchema, DiagnosticJournalStateSchema, DiagnosticJournalRefusalReasonSchema, DiagnosticJournalFailurePhaseSchema, DiagnosticJournalStatusSchema, DiagnosticJournalSubmitResultSchema, DiagnosticJournalWaitResultSchema, DiagnosticJournalCloseResultSchema, DiagnosticJournalFrameSchema, parseDiagnosticJournalMode, readDiagnosticJournalLockDiagnosis };
103
+ export { DiagnosticJournalLimitsSchema2, DiagnosticJournalLockPolicySchema2, DiagnosticJournalStateSchema2, DiagnosticJournalRefusalReasonSchema2, DiagnosticJournalFailurePhaseSchema2, DiagnosticJournalStatusSchema2, DiagnosticJournalSubmitResultSchema2, DiagnosticJournalWaitResultSchema2, DiagnosticJournalCloseResultSchema2, DiagnosticJournalFrameSchema2, parseDiagnosticJournalMode, readDiagnosticJournalLockDiagnosis2 };
@@ -1,7 +1,7 @@
1
1
  // src/observability/status.ts
2
2
  import { z } from "zod";
3
3
  var NonNegativeIntegerSchema = z.number().int().nonnegative();
4
- var ObservabilitySinkStatusSchema = z.object({
4
+ var ObservabilitySinkStatusSchema2 = z.object({
5
5
  capacity: NonNegativeIntegerSchema,
6
6
  received: NonNegativeIntegerSchema,
7
7
  accepted: NonNegativeIntegerSchema,
@@ -15,12 +15,12 @@ var ObservabilitySinkStatusSchema = z.object({
15
15
  closed: z.boolean()
16
16
  }).readonly();
17
17
  var ObservabilityStatusObjectSchema = z.object({
18
- request: ObservabilitySinkStatusSchema.optional(),
19
- tools: ObservabilitySinkStatusSchema.optional(),
20
- total: ObservabilitySinkStatusSchema
18
+ request: ObservabilitySinkStatusSchema2.optional(),
19
+ tools: ObservabilitySinkStatusSchema2.optional(),
20
+ total: ObservabilitySinkStatusSchema2
21
21
  });
22
- var ObservabilityStatusSchema = ObservabilityStatusObjectSchema.readonly();
23
- var ObservabilityDrainReportSchema = ObservabilityStatusObjectSchema.extend({
22
+ var ObservabilityStatusSchema2 = ObservabilityStatusObjectSchema.readonly();
23
+ var ObservabilityDrainReportSchema2 = ObservabilityStatusObjectSchema.extend({
24
24
  durationMs: z.number().nonnegative(),
25
25
  drained: z.boolean()
26
26
  }).readonly();
@@ -53,7 +53,7 @@ function aggregateObservabilityStatus(surfaces, closed) {
53
53
  for (const key of SUMMED_STATUS_KEYS)
54
54
  totals[key] += surface[key];
55
55
  }
56
- return ObservabilitySinkStatusSchema.parse({ ...totals, closed });
56
+ return ObservabilitySinkStatusSchema2.parse({ ...totals, closed });
57
57
  }
58
58
 
59
59
  // src/observability/bounded-sink.ts
@@ -192,7 +192,7 @@ function createBoundedSinkManager(config) {
192
192
  }
193
193
  };
194
194
  function getStatus() {
195
- return ObservabilitySinkStatusSchema.parse({
195
+ return ObservabilitySinkStatusSchema2.parse({
196
196
  capacity: maxPending,
197
197
  received,
198
198
  accepted,
@@ -208,4 +208,4 @@ function createBoundedSinkManager(config) {
208
208
  }
209
209
  }
210
210
 
211
- export { ObservabilitySinkStatusSchema, ObservabilityStatusSchema, ObservabilityDrainReportSchema, aggregateObservabilityStatus, assertDrainBound, withinBound, createBoundedSinkManager };
211
+ export { ObservabilitySinkStatusSchema2, ObservabilityStatusSchema2, ObservabilityDrainReportSchema2, aggregateObservabilityStatus, assertDrainBound, withinBound, createBoundedSinkManager };
@@ -10,10 +10,10 @@ function randomHex(bytes) {
10
10
 
11
11
  // src/observability/trace.ts
12
12
  var TRACEPARENT_RE = /^([0-9a-f]{2})-([0-9a-f]{32})-([0-9a-f]{16})-([0-9a-f]{2})(.*)$/i;
13
- function createTraceContext() {
13
+ function createTraceContext2() {
14
14
  return { traceId: randomHex(16), spanId: randomHex(8) };
15
15
  }
16
- function parseTraceparent(header) {
16
+ function parseTraceparent2(header) {
17
17
  if (!header)
18
18
  return null;
19
19
  const match = TRACEPARENT_RE.exec(header.trim());
@@ -33,13 +33,13 @@ function parseTraceparent(header) {
33
33
  return null;
34
34
  return { traceId, spanId: randomHex(8), parentSpanId, traceFlags };
35
35
  }
36
- function formatTraceparent(ctx) {
36
+ function formatTraceparent2(ctx) {
37
37
  return `00-${ctx.traceId}-${ctx.spanId}-${ctx.traceFlags ?? "01"}`;
38
38
  }
39
- function resolveTraceContext(req) {
40
- return parseTraceparent(req.headers.get("traceparent")) ?? createTraceContext();
39
+ function resolveTraceContext2(req) {
40
+ return parseTraceparent2(req.headers.get("traceparent")) ?? createTraceContext2();
41
41
  }
42
- function childSpan(parent) {
42
+ function childSpan2(parent) {
43
43
  return {
44
44
  traceId: parent.traceId,
45
45
  spanId: randomHex(8),
@@ -67,10 +67,10 @@ function boundedPropagationValue(value, maxBytes, maxMembers) {
67
67
  }
68
68
  return trimmed;
69
69
  }
70
- function resolvePropagationContext(metadata, fallback) {
70
+ function resolvePropagationContext2(metadata, fallback) {
71
71
  const traceparent = metadata?.traceparent;
72
- const parsed = typeof traceparent === "string" ? parseTraceparent(traceparent) : null;
73
- const trace = traceparent === undefined ? fallback ?? createTraceContext() : parsed ?? createTraceContext();
72
+ const parsed = typeof traceparent === "string" ? parseTraceparent2(traceparent) : null;
73
+ const trace = traceparent === undefined ? fallback ?? createTraceContext2() : parsed ?? createTraceContext2();
74
74
  const tracestate = parsed ? boundedPropagationValue(metadata?.tracestate, 512, 32) : undefined;
75
75
  const baggage = boundedPropagationValue(metadata?.baggage, 8192, 180);
76
76
  return {
@@ -80,4 +80,4 @@ function resolvePropagationContext(metadata, fallback) {
80
80
  };
81
81
  }
82
82
 
83
- export { randomHex, createTraceContext, parseTraceparent, formatTraceparent, resolveTraceContext, childSpan, resolvePropagationContext };
83
+ export { randomHex, createTraceContext2, parseTraceparent2, formatTraceparent2, resolveTraceContext2, childSpan2, resolvePropagationContext2 };
@@ -2,12 +2,12 @@
2
2
  import { z } from "zod";
3
3
  var timestamp = z.string().datetime({ offset: true });
4
4
  var key = z.string().min(1).max(255);
5
- var DirectoryInboxRejectionReasonSchema = z.enum([
5
+ var DirectoryInboxRejectionReasonSchema2 = z.enum([
6
6
  "invalid",
7
7
  "too-large",
8
8
  "attempt-limit"
9
9
  ]);
10
- var DirectoryInboxStateSchema = z.object({
10
+ var DirectoryInboxStateSchema2 = z.object({
11
11
  schemaVersion: z.literal(1),
12
12
  claims: z.array(z.object({
13
13
  key,
@@ -19,7 +19,7 @@ var DirectoryInboxStateSchema = z.object({
19
19
  receipts: z.array(z.object({ key, completedAt: timestamp }).strict()),
20
20
  rejected: z.array(z.object({
21
21
  key,
22
- reason: DirectoryInboxRejectionReasonSchema,
22
+ reason: DirectoryInboxRejectionReasonSchema2,
23
23
  detail: z.string().max(1000),
24
24
  rejectedAt: timestamp
25
25
  }).strict())
@@ -111,4 +111,4 @@ function forgetMissing(state, present, now) {
111
111
  };
112
112
  }
113
113
 
114
- export { DirectoryInboxRejectionReasonSchema, DirectoryInboxStateSchema, emptyDirectoryInboxState, withRejection, claimEntry, completeEntry, releaseEntry, forgetMissing };
114
+ export { DirectoryInboxRejectionReasonSchema2, DirectoryInboxStateSchema2, emptyDirectoryInboxState, withRejection, claimEntry, completeEntry, releaseEntry, forgetMissing };