@humain/ui 2.1.62 → 2.1.65

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 (160) hide show
  1. package/dist/components/organisms/ai/AIToolCall/AIToolCall.d.ts +9 -3
  2. package/dist/components/organisms/ai/AIToolRun/index.d.ts +1 -1
  3. package/dist/components/organisms/ai/AIToolRun/validation.d.ts +24 -3
  4. package/dist/components/organisms/ai/_shared/format-ai-duration.d.ts +1 -0
  5. package/dist/components/organisms/ai/_shared/workflow-step-renderer.d.ts +1 -0
  6. package/dist/index.js +52 -52
  7. package/dist/index151.js +1 -1
  8. package/dist/index174.js +10 -333
  9. package/dist/index174.js.map +1 -1
  10. package/dist/index175.js +310 -137
  11. package/dist/index175.js.map +1 -1
  12. package/dist/index176.js +148 -174
  13. package/dist/index176.js.map +1 -1
  14. package/dist/index177.js +186 -78
  15. package/dist/index177.js.map +1 -1
  16. package/dist/index178.js +74 -124
  17. package/dist/index178.js.map +1 -1
  18. package/dist/index179.js +133 -1
  19. package/dist/index179.js.map +1 -0
  20. package/dist/index180.js +2 -201
  21. package/dist/index181.js +201 -0
  22. package/dist/{index180.js.map → index181.js.map} +1 -1
  23. package/dist/index183.js +130 -166
  24. package/dist/index183.js.map +1 -1
  25. package/dist/index184.js +195 -983
  26. package/dist/index184.js.map +1 -1
  27. package/dist/index185.js +1069 -369
  28. package/dist/index185.js.map +1 -1
  29. package/dist/index186.js +395 -197
  30. package/dist/index186.js.map +1 -1
  31. package/dist/index187.js +198 -243
  32. package/dist/index187.js.map +1 -1
  33. package/dist/index188.js +263 -3
  34. package/dist/index188.js.map +1 -1
  35. package/dist/index189.js +3 -209
  36. package/dist/index189.js.map +1 -1
  37. package/dist/index190.js +190 -777
  38. package/dist/index190.js.map +1 -1
  39. package/dist/index191.js +771 -252
  40. package/dist/index191.js.map +1 -1
  41. package/dist/index192.js +250 -65
  42. package/dist/index192.js.map +1 -1
  43. package/dist/index193.js +72 -523
  44. package/dist/index193.js.map +1 -1
  45. package/dist/index194.js +537 -144
  46. package/dist/index194.js.map +1 -1
  47. package/dist/index195.js +139 -720
  48. package/dist/index195.js.map +1 -1
  49. package/dist/index196.js +707 -167
  50. package/dist/index196.js.map +1 -1
  51. package/dist/index197.js +175 -151
  52. package/dist/index197.js.map +1 -1
  53. package/dist/index198.js +152 -487
  54. package/dist/index198.js.map +1 -1
  55. package/dist/index199.js +472 -225
  56. package/dist/index199.js.map +1 -1
  57. package/dist/index200.js +236 -260
  58. package/dist/index200.js.map +1 -1
  59. package/dist/index201.js +265 -215
  60. package/dist/index201.js.map +1 -1
  61. package/dist/index202.js +207 -307
  62. package/dist/index202.js.map +1 -1
  63. package/dist/index203.js +302 -135
  64. package/dist/index203.js.map +1 -1
  65. package/dist/index204.js +140 -271
  66. package/dist/index204.js.map +1 -1
  67. package/dist/index205.js +263 -253
  68. package/dist/index205.js.map +1 -1
  69. package/dist/index206.js +244 -137
  70. package/dist/index206.js.map +1 -1
  71. package/dist/index207.js +100 -238
  72. package/dist/index207.js.map +1 -1
  73. package/dist/index208.js +278 -74
  74. package/dist/index208.js.map +1 -1
  75. package/dist/index209.js +56 -97
  76. package/dist/index209.js.map +1 -1
  77. package/dist/index210.js +142 -47
  78. package/dist/index210.js.map +1 -1
  79. package/dist/index211.js +38 -84
  80. package/dist/index211.js.map +1 -1
  81. package/dist/index212.js +72 -252
  82. package/dist/index212.js.map +1 -1
  83. package/dist/index213.js +274 -26
  84. package/dist/index213.js.map +1 -1
  85. package/dist/index214.js +29 -94
  86. package/dist/index214.js.map +1 -1
  87. package/dist/index215.js +98 -25
  88. package/dist/index215.js.map +1 -1
  89. package/dist/index216.js +20 -565
  90. package/dist/index216.js.map +1 -1
  91. package/dist/index217.js +564 -17
  92. package/dist/index217.js.map +1 -1
  93. package/dist/index218.js +20 -23
  94. package/dist/index218.js.map +1 -1
  95. package/dist/index219.js +20 -95
  96. package/dist/index219.js.map +1 -1
  97. package/dist/index220.js +92 -88
  98. package/dist/index220.js.map +1 -1
  99. package/dist/index221.js +97 -29
  100. package/dist/index221.js.map +1 -1
  101. package/dist/index222.js +24 -470
  102. package/dist/index222.js.map +1 -1
  103. package/dist/index223.js +446 -196
  104. package/dist/index223.js.map +1 -1
  105. package/dist/index224.js +199 -729
  106. package/dist/index224.js.map +1 -1
  107. package/dist/index225.js +750 -61
  108. package/dist/index225.js.map +1 -1
  109. package/dist/index226.js +58 -181
  110. package/dist/index226.js.map +1 -1
  111. package/dist/index227.js +175 -259
  112. package/dist/index227.js.map +1 -1
  113. package/dist/index228.js +246 -172
  114. package/dist/index228.js.map +1 -1
  115. package/dist/index229.js +195 -32
  116. package/dist/index229.js.map +1 -1
  117. package/dist/index230.js +12 -40
  118. package/dist/index230.js.map +1 -1
  119. package/dist/index231.js +23 -26
  120. package/dist/index231.js.map +1 -1
  121. package/dist/index232.js +45 -22
  122. package/dist/index232.js.map +1 -1
  123. package/dist/index233.js +27 -48
  124. package/dist/index233.js.map +1 -1
  125. package/dist/index234.js +52 -26
  126. package/dist/index234.js.map +1 -1
  127. package/dist/index235.js +40 -225
  128. package/dist/index235.js.map +1 -1
  129. package/dist/index236.js +217 -39
  130. package/dist/index236.js.map +1 -1
  131. package/dist/index237.js +50 -0
  132. package/dist/index237.js.map +1 -0
  133. package/dist/styles.css +1 -1
  134. package/dist/wc/AIToolCall.js +218 -0
  135. package/dist/wc/AIToolCall.js.map +1 -0
  136. package/dist/wc/hf-ai-tool-call.js +34 -219
  137. package/dist/wc/hf-ai-tool-call.js.map +1 -1
  138. package/dist/wc/hf-ai-tool-run.js +673 -576
  139. package/dist/wc/hf-ai-tool-run.js.map +1 -1
  140. package/dist/wc/workflow-step-renderer.js +94 -86
  141. package/dist/wc/workflow-step-renderer.js.map +1 -1
  142. package/dist/wc-react/AIToolCall.js +218 -0
  143. package/dist/wc-react/AIToolCall.js.map +1 -0
  144. package/dist/wc-react/hf-ai-tool-call.js +32 -217
  145. package/dist/wc-react/hf-ai-tool-call.js.map +1 -1
  146. package/dist/wc-react/hf-ai-tool-run.js +698 -601
  147. package/dist/wc-react/hf-ai-tool-run.js.map +1 -1
  148. package/dist/wc-react/workflow-step-renderer.js +76 -68
  149. package/dist/wc-react/workflow-step-renderer.js.map +1 -1
  150. package/package.json +1 -1
  151. package/skills/humain-ui/SKILL.md +1 -1
  152. package/skills/humain-ui-wc/SKILL.md +1 -1
  153. package/skills/humain-ui-wc.skill +0 -0
  154. package/skills/humain-ui.skill +0 -0
  155. package/dist/index182.js +0 -143
  156. package/dist/index182.js.map +0 -1
  157. package/dist/wc/wrench.js +0 -10
  158. package/dist/wc/wrench.js.map +0 -1
  159. package/dist/wc-react/wrench.js +0 -10
  160. package/dist/wc-react/wrench.js.map +0 -1
@@ -1,20 +1,20 @@
1
- import { a as B, d as M, f as ce, i as ne, o as Re, t as _e, u as Te } from "./_shared.js";
2
- import { t as ke } from "./createLucideIcon.js";
3
- import { t as Ee } from "./check.js";
4
- import { t as Ve } from "./chevron-down.js";
5
- import { t as De } from "./chevron-right.js";
6
- import { t as se } from "./circle-alert.js";
7
- import { t as Pe } from "./clock.js";
8
- import { t as je } from "./AISource.js";
9
- import { n as Ke } from "./workflow-step-renderer.js";
10
- import { t as Le } from "./wrench.js";
11
- import { t as re } from "./button.js";
12
- import { t as H } from "./Progress.js";
13
- import { t as D } from "./Card.js";
14
- import * as w from "react";
15
- import Me from "react";
16
- import { jsx as f, jsxs as x } from "react/jsx-runtime";
17
- var Je = [
1
+ import { a as H, d as U, f as fe, i as oe, o as Ee, t as De, u as Ve } from "./_shared.js";
2
+ import { t as Me } from "./createLucideIcon.js";
3
+ import { t as Le } from "./check.js";
4
+ import { t as Pe } from "./chevron-down.js";
5
+ import { t as Ke } from "./chevron-right.js";
6
+ import { t as me } from "./circle-alert.js";
7
+ import { t as je } from "./clock.js";
8
+ import { n as Je, r as Ue } from "./AIToolCall.js";
9
+ import { t as Ye } from "./AISource.js";
10
+ import { i as Fe, n as qe } from "./workflow-step-renderer.js";
11
+ import { t as ie } from "./button.js";
12
+ import { t as W } from "./Progress.js";
13
+ import { t as L } from "./Card.js";
14
+ import * as N from "react";
15
+ import Be from "react";
16
+ import { jsx as m, jsxs as O } from "react/jsx-runtime";
17
+ var He = [
18
18
  ["circle", {
19
19
  cx: "12",
20
20
  cy: "12",
@@ -35,7 +35,7 @@ var Je = [
35
35
  y2: "9",
36
36
  key: "h65svq"
37
37
  }]
38
- ], Ue = ke("circle-pause", Je), Ye = /* @__PURE__ */ new Set([
38
+ ], ze = Me("circle-pause", He), We = /* @__PURE__ */ new Set([
39
39
  "runId",
40
40
  "status",
41
41
  "header",
@@ -44,60 +44,76 @@ var Je = [
44
44
  "actions",
45
45
  "progress",
46
46
  "activeStepId",
47
- "error"
48
- ]), Fe = /* @__PURE__ */ new Set([
47
+ "error",
48
+ "durationMs"
49
+ ]), Xe = /* @__PURE__ */ new Set([
49
50
  "title",
50
51
  "description",
51
52
  "metadata"
52
- ]), qe = /* @__PURE__ */ new Set(["label", "value"]), Be = /* @__PURE__ */ new Set([
53
+ ]), Ge = /* @__PURE__ */ new Set(["label", "value"]), Qe = /* @__PURE__ */ new Set([
53
54
  "value",
54
55
  "label",
55
56
  "meta"
56
- ]), ze = /* @__PURE__ */ new Set(["message"]), He = /* @__PURE__ */ new Set([
57
+ ]), Ze = /* @__PURE__ */ new Set(["message"]), ae = /* @__PURE__ */ new Set([
57
58
  "id",
58
59
  "url",
59
60
  "title",
60
61
  "description",
61
62
  "favicon",
62
- "siteName"
63
- ]), We = /* @__PURE__ */ new Set([
63
+ "siteName",
64
+ "kind"
65
+ ]), et = /* @__PURE__ */ new Set([
64
66
  "id",
65
67
  "kind",
66
68
  "label",
67
69
  "disabled",
68
70
  "loading"
69
- ]), oe = /* @__PURE__ */ new Set([
71
+ ]), le = /* @__PURE__ */ new Set([
70
72
  "toolCall",
71
73
  "title",
72
74
  "description",
73
75
  "progress",
74
76
  "sourceIds",
75
77
  "currentSourceId",
76
- "durationMs"
77
- ]), ie = /* @__PURE__ */ new Set([
78
+ "durationMs",
79
+ "context",
80
+ "technicalDetails"
81
+ ]), de = /* @__PURE__ */ new Set([
78
82
  "toolCallId",
79
83
  "toolName",
80
84
  "status",
81
85
  "error"
82
- ]), Xe = {
86
+ ]), tt = /* @__PURE__ */ new Set(["id", "label"]), nt = /* @__PURE__ */ new Set(["label", "toolCalls"]), rt = /* @__PURE__ */ new Set([
87
+ "toolCallId",
88
+ "toolName",
89
+ "args",
90
+ "result",
91
+ "status",
92
+ "error"
93
+ ]), ot = /* @__PURE__ */ new Set([
94
+ "id",
95
+ "kind",
96
+ "title",
97
+ "description"
98
+ ]), it = {
83
99
  error: !0,
84
100
  pending: !0,
85
101
  running: !0,
86
102
  success: !0
87
- }, Ge = {
103
+ }, at = {
88
104
  completed: !0,
89
105
  error: !0,
90
106
  paused: !0,
91
107
  ready: !0,
92
108
  running: !0
93
- }, Qe = {
109
+ }, lt = {
94
110
  custom: !0,
95
111
  dismiss: !0,
96
112
  pause: !0,
97
113
  resume: !0,
98
114
  retry: !0,
99
115
  start: !0
100
- }, Ze = {
116
+ }, dt = {
101
117
  ready: [
102
118
  "start",
103
119
  "dismiss",
@@ -119,24 +135,31 @@ var Je = [
119
135
  "dismiss",
120
136
  "custom"
121
137
  ]
122
- }, et = {
138
+ }, ct = {
123
139
  pending: /* @__PURE__ */ new Set([
124
140
  "toolCall",
125
141
  "title",
126
- "description"
142
+ "description",
143
+ "context",
144
+ "technicalDetails"
127
145
  ]),
128
146
  running: /* @__PURE__ */ new Set([
129
147
  "toolCall",
130
148
  "title",
131
149
  "description",
150
+ "context",
151
+ "technicalDetails",
132
152
  "progress",
133
153
  "sourceIds",
134
- "currentSourceId"
154
+ "currentSourceId",
155
+ "durationMs"
135
156
  ]),
136
157
  success: /* @__PURE__ */ new Set([
137
158
  "toolCall",
138
159
  "title",
139
160
  "description",
161
+ "context",
162
+ "technicalDetails",
140
163
  "durationMs",
141
164
  "sourceIds"
142
165
  ]),
@@ -144,9 +167,12 @@ var Je = [
144
167
  "toolCall",
145
168
  "title",
146
169
  "description",
147
- "sourceIds"
170
+ "context",
171
+ "technicalDetails",
172
+ "sourceIds",
173
+ "durationMs"
148
174
  ])
149
- }, tt = {
175
+ }, st = {
150
176
  pending: /* @__PURE__ */ new Set([
151
177
  "toolCallId",
152
178
  "toolName",
@@ -168,586 +194,626 @@ var Je = [
168
194
  "status",
169
195
  "error"
170
196
  ])
171
- }, ue = 100, P = 1e4, J = 100, W = "Value could not be inspected safely", L = /* @__PURE__ */ Symbol("invalid-shape-field");
172
- function c(n, e, t) {
173
- n.length < J && n.push({
197
+ }, ve = 100, P = 1e4, Y = 100, X = "Value could not be inspected safely", J = /* @__PURE__ */ Symbol("invalid-shape-field");
198
+ function s(n, e, t) {
199
+ n.length < Y && n.push({
174
200
  path: e,
175
201
  message: t
176
202
  });
177
203
  }
178
- function _(n, e) {
179
- return n.length > e || n.length >= J;
204
+ function T(n, e) {
205
+ return n.length > e || n.length >= Y;
180
206
  }
181
- function N(n, e) {
182
- c(n, e, W);
207
+ function R(n, e) {
208
+ s(n, e, X);
183
209
  }
184
- function Z(n, e, t) {
210
+ function ee(n, e, t) {
185
211
  if (n === null || typeof n != "object") return "other";
186
212
  try {
187
213
  const r = Reflect.getPrototypeOf(n);
188
214
  return Array.isArray(n) ? r === Array.prototype ? "array" : "other" : r === Object.prototype || r === null ? "record" : "other";
189
215
  } catch {
190
- return N(t, e), "uninspectable";
216
+ return R(t, e), "uninspectable";
191
217
  }
192
218
  }
193
- function U(n, e, t) {
219
+ function F(n, e, t) {
194
220
  try {
195
221
  return Reflect.ownKeys(n);
196
222
  } catch {
197
- N(t, e);
223
+ R(t, e);
198
224
  return;
199
225
  }
200
226
  }
201
- function Y(n, e, t, r) {
227
+ function q(n, e, t, r) {
202
228
  try {
203
229
  return Reflect.getOwnPropertyDescriptor(n, e);
204
230
  } catch {
205
- return N(r, t), null;
231
+ return R(r, t), null;
206
232
  }
207
233
  }
208
- function F(n, e, t, r, o) {
209
- return !t.enumerable || !Object.hasOwn(t, "value") ? (c(o, r, "Value must be an own enumerable data property"), { valid: !1 }) : {
234
+ function B(n, e, t, r, o) {
235
+ return !t.enumerable || !Object.hasOwn(t, "value") ? (s(o, r, "Value must be an own enumerable data property"), { valid: !1 }) : {
210
236
  valid: !0,
211
237
  value: t.value
212
238
  };
213
239
  }
214
- function fe(n, e, t, r) {
240
+ function pe(n, e, t, r) {
215
241
  const o = /* @__PURE__ */ new Set();
216
- let i = n, l = !0;
217
- for (; i !== null; ) {
218
- if (o.has(i))
219
- return N(r, t), null;
220
- o.add(i);
221
- const a = Y(i, e, t, r);
222
- if (a === null) return null;
223
- if (a !== void 0) {
224
- if (l) {
225
- const d = U(n, t, r);
242
+ let a = n, i = !0;
243
+ for (; a !== null; ) {
244
+ if (o.has(a))
245
+ return R(r, t), null;
246
+ o.add(a);
247
+ const l = q(a, e, t, r);
248
+ if (l === null) return null;
249
+ if (l !== void 0) {
250
+ if (i) {
251
+ const d = F(n, t, r);
226
252
  if (!d) return null;
227
253
  if (!d.includes(e))
228
- return c(r, t, "Own property must be exposed by Reflect.ownKeys"), null;
254
+ return s(r, t, "Own property must be exposed by Reflect.ownKeys"), null;
229
255
  }
230
256
  return {
231
- descriptor: a,
232
- isOwn: l
257
+ descriptor: l,
258
+ isOwn: i
233
259
  };
234
260
  }
235
261
  try {
236
- i = Reflect.getPrototypeOf(i);
262
+ a = Reflect.getPrototypeOf(a);
237
263
  } catch {
238
- return N(r, t), null;
264
+ return R(r, t), null;
239
265
  }
240
- l = !1;
266
+ i = !1;
241
267
  }
242
268
  }
243
- function ee(n, e, t, r) {
244
- const o = fe(n, e, t, r);
269
+ function te(n, e, t, r) {
270
+ const o = pe(n, e, t, r);
245
271
  if (o === null) return;
246
272
  if (o !== void 0) return {
247
273
  kind: "descriptor",
248
274
  ...o
249
275
  };
250
- let i;
276
+ let a;
251
277
  try {
252
- i = Reflect.has(n, e);
278
+ a = Reflect.has(n, e);
253
279
  } catch {
254
- N(r, t);
280
+ R(r, t);
255
281
  return;
256
282
  }
257
- if (i) return { kind: "synthetic" };
258
- let l;
283
+ if (a) return { kind: "synthetic" };
284
+ let i;
259
285
  try {
260
- l = Reflect.get(n, e);
286
+ i = Reflect.get(n, e);
261
287
  } catch {
262
- N(r, t);
288
+ R(r, t);
263
289
  return;
264
290
  }
265
- return i || l !== void 0 ? { kind: "synthetic" } : { kind: "absent" };
291
+ return a || i !== void 0 ? { kind: "synthetic" } : { kind: "absent" };
266
292
  }
267
- function me(n, e, t, r) {
268
- const o = ee(n, e, t, r);
269
- if (!o) return L;
293
+ function ge(n, e, t, r) {
294
+ const o = te(n, e, t, r);
295
+ if (!o) return J;
270
296
  if (o.kind === "absent") return;
271
297
  if (o.kind === "synthetic" || !o.isOwn)
272
- return c(r, t, "Value must be an own enumerable data property"), L;
273
- const i = F(n, e, o.descriptor, t, r);
274
- return i.valid ? i.value : L;
298
+ return s(r, t, "Value must be an own enumerable data property"), J;
299
+ const a = B(n, e, o.descriptor, t, r);
300
+ return a.valid ? a.value : J;
275
301
  }
276
- function S(n, e, t, r) {
277
- return me(n, e, t, r);
302
+ function p(n, e, t, r) {
303
+ return ge(n, e, t, r);
278
304
  }
279
- function b(n, e, t, r) {
280
- return me(n, e, t, r);
305
+ function v(n, e, t, r) {
306
+ return ge(n, e, t, r);
281
307
  }
282
- function m(n) {
283
- return n === L;
308
+ function f(n) {
309
+ return n === J;
284
310
  }
285
- function nt(n, e, t) {
286
- const r = U(n, e, t);
311
+ function ut(n, e, t) {
312
+ const r = F(n, e, t);
287
313
  if (!r) return;
288
314
  if (r.length > P) {
289
- c(t, e, "Value exceeds the maximum JSON node limit");
315
+ s(t, e, "Value exceeds the maximum JSON node limit");
290
316
  return;
291
317
  }
292
318
  const o = [];
293
- for (const i of r) {
294
- const l = typeof i == "string" ? `${e}.${i}` : e, a = Y(n, i, l, t);
295
- if (a === null) return;
296
- if (a === void 0) {
297
- N(t, l);
319
+ for (const a of r) {
320
+ const i = typeof a == "string" ? `${e}.${a}` : e, l = q(n, a, i, t);
321
+ if (l === null) return;
322
+ if (l === void 0) {
323
+ R(t, i);
298
324
  return;
299
325
  }
300
- if (typeof i != "string") {
301
- c(t, e, "Symbol keys are not JSON-safe");
326
+ if (typeof a != "string") {
327
+ s(t, e, "Symbol keys are not JSON-safe");
302
328
  continue;
303
329
  }
304
- F(n, i, a, l, t).valid && o.push(i);
330
+ B(n, a, l, i, t).valid && o.push(a);
305
331
  }
306
332
  return o;
307
333
  }
308
- function rt(n) {
334
+ function ft(n) {
309
335
  const e = Number(n);
310
336
  if (!(!Number.isInteger(e) || e < 0 || e >= 2 ** 32 - 1 || String(e) !== n))
311
337
  return e;
312
338
  }
313
- function ot(n, e, t, r) {
339
+ function mt(n, e, t, r) {
314
340
  if (e.enumerable || !Object.hasOwn(e, "value") || typeof e.value != "number" || !Number.isInteger(e.value) || e.value < 0 || e.value > 2 ** 32 - 1) {
315
- c(r, t, "Array length must be a valid data property");
341
+ s(r, t, "Array length must be a valid data property");
316
342
  return;
317
343
  }
318
344
  return e.value;
319
345
  }
320
- function E(n, e, t) {
321
- const r = t.length, o = U(n, e, t);
346
+ function k(n, e, t) {
347
+ const r = t.length, o = F(n, e, t);
322
348
  if (!o) return;
323
349
  if (o.length > 10001) {
324
- c(t, e, "Value exceeds the maximum JSON node limit");
350
+ s(t, e, "Value exceeds the maximum JSON node limit");
325
351
  return;
326
352
  }
327
- let i;
328
- const l = /* @__PURE__ */ new Map();
329
- for (const s of o) {
330
- const u = typeof s == "string" ? `${e}.${s}` : e, p = Y(n, s, u, t);
331
- if (p === null) return;
332
- if (p === void 0) {
333
- N(t, u);
353
+ let a;
354
+ const i = /* @__PURE__ */ new Map();
355
+ for (const c of o) {
356
+ const u = typeof c == "string" ? `${e}.${c}` : e, g = q(n, c, u, t);
357
+ if (g === null) return;
358
+ if (g === void 0) {
359
+ R(t, u);
334
360
  return;
335
361
  }
336
- if (typeof s != "string") {
337
- c(t, e, "Symbol keys are not JSON-safe");
362
+ if (typeof c != "string") {
363
+ s(t, e, "Symbol keys are not JSON-safe");
338
364
  continue;
339
365
  }
340
- if (s === "length") {
341
- i = ot(n, p, e, t);
366
+ if (c === "length") {
367
+ a = mt(n, g, e, t);
342
368
  continue;
343
369
  }
344
- const v = rt(s);
345
- if (v === void 0) {
346
- c(t, u, "Arrays must not contain custom properties");
370
+ const $ = ft(c);
371
+ if ($ === void 0) {
372
+ s(t, u, "Arrays must not contain custom properties");
347
373
  continue;
348
374
  }
349
- const $ = F(n, s, p, `${e}[${v}]`, t);
350
- $.valid && l.set(v, $.value);
375
+ const b = B(n, c, g, `${e}[${$}]`, t);
376
+ b.valid && i.set($, b.value);
351
377
  }
352
- if (i === void 0) {
353
- _(t, r) || N(t, e);
378
+ if (a === void 0) {
379
+ T(t, r) || R(t, e);
354
380
  return;
355
381
  }
356
- if (i > P) {
357
- c(t, e, "Array length exceeds the maximum JSON node limit");
382
+ if (a > P) {
383
+ s(t, e, "Array length exceeds the maximum JSON node limit");
358
384
  return;
359
385
  }
360
- const a = [...l.entries()].sort(([s], [u]) => s - u);
386
+ const l = [...i.entries()].sort(([c], [u]) => c - u);
361
387
  let d = 0;
362
- for (const [s] of a) {
363
- if (s !== d) {
364
- c(t, `${e}[${d}]`, "Array holes are not JSON-safe");
388
+ for (const [c] of l) {
389
+ if (c !== d) {
390
+ s(t, `${e}[${d}]`, "Array holes are not JSON-safe");
365
391
  return;
366
392
  }
367
393
  d += 1;
368
394
  }
369
- if (d !== i) {
370
- c(t, `${e}[${d}]`, "Array holes are not JSON-safe");
395
+ if (d !== a) {
396
+ s(t, `${e}[${d}]`, "Array holes are not JSON-safe");
371
397
  return;
372
398
  }
373
- if (!_(t, r))
374
- return a.map(([s, u]) => ({
375
- index: s,
399
+ if (!T(t, r))
400
+ return l.map(([c, u]) => ({
401
+ index: c,
376
402
  value: u
377
403
  }));
378
404
  }
379
- function pe(n, e, t) {
380
- const r = t.length, o = U(n, e, t);
405
+ function $e(n, e, t) {
406
+ const r = t.length, o = F(n, e, t);
381
407
  if (!o) return;
382
408
  if (o.length > P) {
383
- c(t, e, "Value exceeds the maximum JSON node limit");
409
+ s(t, e, "Value exceeds the maximum JSON node limit");
384
410
  return;
385
411
  }
386
- const i = [];
387
- for (const l of o) {
388
- const a = typeof l == "string" ? `${e}.${l}` : e, d = Y(n, l, a, t);
412
+ const a = [];
413
+ for (const i of o) {
414
+ const l = typeof i == "string" ? `${e}.${i}` : e, d = q(n, i, l, t);
389
415
  if (d === null) return;
390
416
  if (d === void 0) {
391
- N(t, a);
417
+ R(t, l);
392
418
  return;
393
419
  }
394
- if (typeof l != "string") {
395
- c(t, e, "Symbol keys are not JSON-safe");
420
+ if (typeof i != "string") {
421
+ s(t, e, "Symbol keys are not JSON-safe");
396
422
  continue;
397
423
  }
398
- const s = F(n, l, d, a, t);
399
- s.valid && i.push({
400
- path: a,
401
- value: s.value
424
+ const c = B(n, i, d, l, t);
425
+ c.valid && a.push({
426
+ path: l,
427
+ value: c.value
402
428
  });
403
429
  }
404
- return _(t, r) ? void 0 : i;
430
+ return T(t, r) ? void 0 : a;
405
431
  }
406
- function O(n, e, t, r) {
407
- const o = nt(n, t, r);
432
+ function _(n, e, t, r) {
433
+ const o = ut(n, t, r);
408
434
  if (o)
409
- for (const i of o) e.has(i) || c(r, `${t}.${i}`, `Unknown key "${i}"`);
435
+ for (const a of o) e.has(a) || s(r, `${t}.${a}`, `Unknown key "${a}"`);
410
436
  }
411
- function ve(n, e, t, r, o) {
412
- for (const i of e) if (!t.has(i)) {
413
- const l = ee(n, i, `${r}.${i}`, o);
414
- if (!l) return;
415
- if (l.kind === "absent") continue;
416
- c(o, `${r}.${i}`, "Field is not allowed for this status");
437
+ function ne(n, e, t, r, o) {
438
+ for (const a of e) if (!t.has(a)) {
439
+ const i = te(n, a, `${r}.${a}`, o);
440
+ if (!i) return;
441
+ if (i.kind === "absent") continue;
442
+ s(o, `${r}.${a}`, "Field is not allowed for this status");
417
443
  }
418
444
  }
419
445
  function z(n, e, t, r) {
420
446
  for (const o of e) {
421
- const i = ee(n, o, `${t}.${o}`, r);
422
- if (!i) return;
423
- i.kind !== "absent" && c(r, `${t}.${o}`, "Field is not allowed for this status");
447
+ const a = te(n, o, `${t}.${o}`, r);
448
+ if (!a) return;
449
+ a.kind !== "absent" && s(r, `${t}.${o}`, "Field is not allowed for this status");
424
450
  }
425
451
  }
426
- function ge(n) {
452
+ function Se(n) {
427
453
  return typeof n == "number" && Number.isFinite(n);
428
454
  }
429
455
  function ye(n, e, t) {
430
- const r = fe(n, "toJSON", e, t);
431
- return r === null ? !1 : r !== void 0 ? (c(t, e, "Value must not define toJSON"), !1) : !0;
456
+ const r = pe(n, "toJSON", e, t);
457
+ return r === null ? !1 : r !== void 0 ? (s(t, e, "Value must not define toJSON"), !1) : !0;
432
458
  }
433
- function it(n, e, t) {
459
+ function vt(n, e, t) {
434
460
  const r = /* @__PURE__ */ new Set(), o = [{
435
461
  kind: "visit",
436
462
  value: n,
437
463
  path: e,
438
464
  depth: 0
439
465
  }];
440
- let i = 0;
441
- for (; o.length > 0 && t.length < J; ) {
442
- const l = o.pop();
443
- if (!l) break;
444
- if (l.kind === "leave") {
445
- r.delete(l.value);
466
+ let a = 0;
467
+ for (; o.length > 0 && t.length < Y; ) {
468
+ const i = o.pop();
469
+ if (!i) break;
470
+ if (i.kind === "leave") {
471
+ r.delete(i.value);
446
472
  continue;
447
473
  }
448
- if (l.depth > ue) {
449
- c(t, l.path, "Value exceeds the maximum JSON depth limit");
474
+ if (i.depth > ve) {
475
+ s(t, i.path, "Value exceeds the maximum JSON depth limit");
450
476
  continue;
451
477
  }
452
- if (i += 1, i > P) {
453
- c(t, l.path, "Value exceeds the maximum JSON node limit");
478
+ if (a += 1, a > P) {
479
+ s(t, i.path, "Value exceeds the maximum JSON node limit");
454
480
  break;
455
481
  }
456
- const a = l.value;
457
- if (a === void 0 || typeof a == "function" || typeof a == "symbol" || typeof a == "bigint") {
458
- c(t, l.path, "Value must be JSON-safe");
482
+ const l = i.value;
483
+ if (l === void 0 || typeof l == "function" || typeof l == "symbol" || typeof l == "bigint") {
484
+ s(t, i.path, "Value must be JSON-safe");
459
485
  continue;
460
486
  }
461
- if (typeof a == "number" && !ge(a)) {
462
- c(t, l.path, "Number must be finite");
487
+ if (typeof l == "number" && !Se(l)) {
488
+ s(t, i.path, "Number must be finite");
463
489
  continue;
464
490
  }
465
- if (a === null || typeof a != "object") continue;
466
- if (r.has(a)) {
467
- c(t, l.path, "Value must not contain cycles");
491
+ if (l === null || typeof l != "object") continue;
492
+ if (r.has(l)) {
493
+ s(t, i.path, "Value must not contain cycles");
468
494
  continue;
469
495
  }
470
- const d = Z(a, l.path, t);
496
+ const d = ee(l, i.path, t);
471
497
  if (d === "uninspectable") continue;
472
498
  if (d === "other") {
473
- c(t, l.path, "Value must contain only plain objects and arrays");
499
+ s(t, i.path, "Value must contain only plain objects and arrays");
474
500
  continue;
475
501
  }
476
- if (!ye(a, l.path, t)) continue;
477
- if (r.add(a), o.push({
502
+ if (!ye(l, i.path, t)) continue;
503
+ if (r.add(l), o.push({
478
504
  kind: "leave",
479
- value: a
505
+ value: l
480
506
  }), d === "array") {
481
- const u = E(a, l.path, t);
507
+ const u = k(l, i.path, t);
482
508
  if (!u) continue;
483
- for (let p = u.length - 1; p >= 0; p -= 1) {
484
- const v = u[p];
509
+ for (let g = u.length - 1; g >= 0; g -= 1) {
510
+ const $ = u[g];
485
511
  o.push({
486
512
  kind: "visit",
487
- value: v.value,
488
- path: `${l.path}[${v.index}]`,
489
- depth: l.depth + 1
513
+ value: $.value,
514
+ path: `${i.path}[${$.index}]`,
515
+ depth: i.depth + 1
490
516
  });
491
517
  }
492
518
  continue;
493
519
  }
494
- const s = pe(a, l.path, t);
495
- if (s)
496
- for (let u = s.length - 1; u >= 0; u -= 1) {
497
- const p = s[u];
520
+ const c = $e(l, i.path, t);
521
+ if (c)
522
+ for (let u = c.length - 1; u >= 0; u -= 1) {
523
+ const g = c[u];
498
524
  o.push({
499
525
  kind: "visit",
500
- value: p.value,
501
- path: p.path,
502
- depth: l.depth + 1
526
+ value: g.value,
527
+ path: g.path,
528
+ depth: i.depth + 1
503
529
  });
504
530
  }
505
531
  }
506
532
  }
507
- var h = /* @__PURE__ */ Symbol("invalid-json-snapshot");
508
- function at(n, e, t) {
533
+ var w = /* @__PURE__ */ Symbol("invalid-json-snapshot");
534
+ function pt(n, e, t) {
509
535
  const r = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Map();
510
- let i = 0;
511
- function l(a, d, s) {
512
- if (t.length >= J) return h;
513
- if (s > ue)
514
- return c(t, d, "Value exceeds the maximum JSON depth limit"), h;
515
- if (i += 1, i > P)
516
- return c(t, d, "Value exceeds the maximum JSON node limit"), h;
517
- if (a === void 0 || typeof a == "function" || typeof a == "symbol" || typeof a == "bigint")
518
- return c(t, d, "Value must be JSON-safe"), h;
519
- if (typeof a == "number" && !ge(a))
520
- return c(t, d, "Number must be finite"), h;
521
- if (a === null || typeof a != "object") return a;
522
- if (r.has(a))
523
- return c(t, d, "Value must not contain cycles"), h;
524
- const u = Z(a, d, t);
525
- if (u === "uninspectable") return h;
536
+ let a = 0;
537
+ function i(l, d, c) {
538
+ if (t.length >= Y) return w;
539
+ if (c > ve)
540
+ return s(t, d, "Value exceeds the maximum JSON depth limit"), w;
541
+ if (a += 1, a > P)
542
+ return s(t, d, "Value exceeds the maximum JSON node limit"), w;
543
+ if (l === void 0 || typeof l == "function" || typeof l == "symbol" || typeof l == "bigint")
544
+ return s(t, d, "Value must be JSON-safe"), w;
545
+ if (typeof l == "number" && !Se(l))
546
+ return s(t, d, "Number must be finite"), w;
547
+ if (l === null || typeof l != "object") return l;
548
+ if (r.has(l))
549
+ return s(t, d, "Value must not contain cycles"), w;
550
+ const u = ee(l, d, t);
551
+ if (u === "uninspectable") return w;
526
552
  if (u === "other")
527
- return c(t, d, "Value must contain only plain objects and arrays"), h;
528
- if (!ye(a, d, t)) return h;
529
- const p = o.get(a);
530
- if (p !== void 0) return p;
531
- r.add(a);
553
+ return s(t, d, "Value must contain only plain objects and arrays"), w;
554
+ if (!ye(l, d, t)) return w;
555
+ const g = o.get(l);
556
+ if (g !== void 0) return g;
557
+ r.add(l);
532
558
  try {
533
559
  if (u === "array") {
534
- const y = E(a, d, t);
535
- if (!y) return h;
536
- const g = new Array(y.length);
537
- o.set(a, g);
538
- for (const R of y) {
539
- const V = l(R.value, `${d}[${R.index}]`, s + 1);
540
- if (V === h) return h;
541
- g[R.index] = V;
560
+ const I = k(l, d, t);
561
+ if (!I) return w;
562
+ const y = new Array(I.length);
563
+ o.set(l, y);
564
+ for (const C of I) {
565
+ const M = i(C.value, `${d}[${C.index}]`, c + 1);
566
+ if (M === w) return w;
567
+ y[C.index] = M;
542
568
  }
543
- return g;
569
+ return y;
544
570
  }
545
- const v = pe(a, d, t);
546
- if (!v) return h;
547
- const $ = /* @__PURE__ */ Object.create(null);
548
- o.set(a, $);
549
- for (const y of v) {
550
- const g = y.path.slice(d.length + 1), R = l(y.value, y.path, s + 1);
551
- if (R === h) return h;
552
- Object.defineProperty($, g, {
571
+ const $ = $e(l, d, t);
572
+ if (!$) return w;
573
+ const b = /* @__PURE__ */ Object.create(null);
574
+ o.set(l, b);
575
+ for (const I of $) {
576
+ const y = I.path.slice(d.length + 1), C = i(I.value, I.path, c + 1);
577
+ if (C === w) return w;
578
+ Object.defineProperty(b, y, {
553
579
  configurable: !0,
554
580
  enumerable: !0,
555
- value: R,
581
+ value: C,
556
582
  writable: !0
557
583
  });
558
584
  }
559
- return $;
585
+ return b;
560
586
  } finally {
561
- r.delete(a);
587
+ r.delete(l);
562
588
  }
563
589
  }
564
- return l(n, e, 0);
590
+ return i(n, e, 0);
565
591
  }
566
- function C(n, e, t) {
567
- if (m(n)) return;
568
- const r = Z(n, e, t);
592
+ function A(n, e, t) {
593
+ if (f(n)) return;
594
+ const r = ee(n, e, t);
569
595
  if (r !== "record") {
570
- r !== "uninspectable" && c(t, e, "Value must be a plain object");
596
+ r !== "uninspectable" && s(t, e, "Value must be a plain object");
571
597
  return;
572
598
  }
573
599
  return n;
574
600
  }
575
- function A(n, e, t) {
576
- if (!m(n)) {
601
+ function x(n, e, t) {
602
+ if (!f(n)) {
577
603
  if (typeof n != "string") {
578
- c(t, e, "Value must be a string");
604
+ s(t, e, "Value must be a string");
579
605
  return;
580
606
  }
581
607
  return n;
582
608
  }
583
609
  }
584
- function q(n, e, t) {
585
- const r = A(n, e, t);
610
+ function K(n, e, t) {
611
+ const r = x(n, e, t);
586
612
  if (r !== void 0 && r.length === 0) {
587
- c(t, e, "Value must not be empty");
613
+ s(t, e, "Value must not be empty");
588
614
  return;
589
615
  }
590
616
  return r;
591
617
  }
592
- function T(n, e, t) {
593
- const r = A(n, e, t);
618
+ function h(n, e, t) {
619
+ const r = x(n, e, t);
594
620
  if (r !== void 0 && r.trim().length === 0) {
595
- c(t, e, "Value must be non-whitespace");
621
+ s(t, e, "Value must be non-whitespace");
596
622
  return;
597
623
  }
598
624
  return r;
599
625
  }
600
- function ae(n, e, t) {
601
- if (!m(n)) {
626
+ function ce(n, e, t) {
627
+ if (!f(n)) {
602
628
  if (typeof n != "boolean") {
603
- c(t, e, "Value must be a boolean");
629
+ s(t, e, "Value must be a boolean");
604
630
  return;
605
631
  }
606
632
  return n;
607
633
  }
608
634
  }
609
- function Se(n, e, t) {
610
- if (!m(n)) {
635
+ function be(n, e, t) {
636
+ if (!f(n)) {
611
637
  if (typeof n != "number") {
612
- c(t, e, "Value must be a number");
638
+ s(t, e, "Value must be a number");
613
639
  return;
614
640
  }
615
641
  return n;
616
642
  }
617
643
  }
618
- function j(n, e, t) {
619
- if (!m(n)) {
644
+ function V(n, e, t) {
645
+ if (!f(n)) {
620
646
  try {
621
647
  if (Array.isArray(n)) return n;
622
648
  } catch {
623
- N(t, e);
649
+ R(t, e);
624
650
  return;
625
651
  }
626
- c(t, e, "Value must be an array");
652
+ s(t, e, "Value must be an array");
627
653
  }
628
654
  }
629
- function lt(n, e, t) {
630
- if (!m(n)) {
631
- if (typeof n != "string" || !Object.hasOwn(Ge, n)) {
632
- c(t, e, "Value must be a supported run status");
655
+ function gt(n, e, t) {
656
+ if (!f(n)) {
657
+ if (typeof n != "string" || !Object.hasOwn(at, n)) {
658
+ s(t, e, "Value must be a supported run status");
633
659
  return;
634
660
  }
635
661
  return n;
636
662
  }
637
663
  }
638
- function dt(n, e, t) {
639
- if (!m(n)) {
640
- if (typeof n != "string" || !Object.hasOwn(Xe, n)) {
641
- c(t, e, "Value is not allowed as a tool status");
664
+ function Ie(n, e, t) {
665
+ if (!f(n)) {
666
+ if (typeof n != "string" || !Object.hasOwn(it, n)) {
667
+ s(t, e, "Value is not allowed as a tool status");
642
668
  return;
643
669
  }
644
670
  return n;
645
671
  }
646
672
  }
647
- function ct(n, e, t) {
648
- if (!m(n)) {
649
- if (typeof n != "string" || !Object.hasOwn(Qe, n)) {
650
- c(t, e, "Value must be an allowed action kind");
673
+ function $t(n, e, t) {
674
+ if (!f(n)) {
675
+ if (typeof n != "string" || !Object.hasOwn(lt, n)) {
676
+ s(t, e, "Value must be an allowed action kind");
651
677
  return;
652
678
  }
653
679
  return n;
654
680
  }
655
681
  }
656
- function X(n, e, t) {
657
- const r = C(n, e, t);
682
+ function G(n, e, t) {
683
+ const r = A(n, e, t);
658
684
  if (!r) return;
659
- O(r, Be, e, t);
660
- const o = Se(S(r, "value", `${e}.value`, t), `${e}.value`, t);
661
- o !== void 0 && (o < 0 || o > 100) && c(t, `${e}.value`, "Value must be between 0 and 100");
662
- const i = b(r, "label", `${e}.label`, t);
663
- i !== void 0 && !m(i) && T(i, `${e}.label`, t);
664
- const l = b(r, "meta", `${e}.meta`, t);
665
- l !== void 0 && !m(l) && A(l, `${e}.meta`, t);
685
+ _(r, Qe, e, t);
686
+ const o = be(p(r, "value", `${e}.value`, t), `${e}.value`, t);
687
+ o !== void 0 && (o < 0 || o > 100) && s(t, `${e}.value`, "Value must be between 0 and 100");
688
+ const a = v(r, "label", `${e}.label`, t);
689
+ a !== void 0 && !f(a) && h(a, `${e}.label`, t);
690
+ const i = v(r, "meta", `${e}.meta`, t);
691
+ i !== void 0 && !f(i) && x(i, `${e}.meta`, t);
666
692
  }
667
- function st(n, e, t) {
668
- const r = t.length, o = j(n, e, t);
693
+ function St(n, e, t) {
694
+ const r = t.length, o = V(n, e, t);
669
695
  if (!o) return;
670
- const i = E(o, e, t);
671
- if (!i) return;
672
- const l = [];
673
- for (const a of i) {
674
- const d = A(a.value, `${e}[${a.index}]`, t);
675
- d !== void 0 && l.push(d);
696
+ const a = k(o, e, t);
697
+ if (!a) return;
698
+ const i = [];
699
+ for (const l of a) {
700
+ const d = x(l.value, `${e}[${l.index}]`, t);
701
+ d !== void 0 && i.push(d);
676
702
  }
677
- return _(t, r) ? void 0 : l;
703
+ return T(t, r) ? void 0 : i;
678
704
  }
679
- function ut(n, e, t) {
680
- const r = t.length, o = C(n, e, t);
705
+ function yt(n, e, t) {
706
+ const r = t.length, o = A(n, e, t);
681
707
  if (!o) return;
682
- O(o, ie, e, t);
683
- const i = q(S(o, "toolCallId", `${e}.toolCallId`, t), `${e}.toolCallId`, t);
684
- T(S(o, "toolName", `${e}.toolName`, t), `${e}.toolName`, t);
685
- const l = dt(S(o, "status", `${e}.status`, t), `${e}.status`, t);
686
- if (l) {
687
- if (ve(o, ie, tt[l], e, t), l === "error") {
688
- const a = S(o, "error", `${e}.error`, t);
689
- a === void 0 ? c(t, `${e}.error`, "Value is required for error tool calls") : m(a) || T(a, `${e}.error`, t);
708
+ _(o, de, e, t);
709
+ const a = K(p(o, "toolCallId", `${e}.toolCallId`, t), `${e}.toolCallId`, t);
710
+ h(p(o, "toolName", `${e}.toolName`, t), `${e}.toolName`, t);
711
+ const i = Ie(p(o, "status", `${e}.status`, t), `${e}.status`, t);
712
+ if (i) {
713
+ if (ne(o, de, st[i], e, t), i === "error") {
714
+ const l = p(o, "error", `${e}.error`, t);
715
+ l === void 0 ? s(t, `${e}.error`, "Value is required for error tool calls") : f(l) || h(l, `${e}.error`, t);
690
716
  }
691
- if (!(_(t, r) || !i))
717
+ if (!(T(t, r) || !a))
692
718
  return {
693
- toolCallId: i,
694
- status: l
719
+ toolCallId: a,
720
+ status: i
695
721
  };
696
722
  }
697
723
  }
698
- function ft(n, e, t) {
699
- const r = t.length, o = C(n, e, t);
724
+ function bt(n, e, t) {
725
+ const r = A(n, e, t);
726
+ r && (_(r, tt, e, t), h(p(r, "id", `${e}.id`, t), `${e}.id`, t), h(p(r, "label", `${e}.label`, t), `${e}.label`, t));
727
+ }
728
+ function It(n, e, t) {
729
+ const r = t.length, o = A(n, e, t);
700
730
  if (!o) return;
701
- O(o, oe, e, t);
702
- const i = b(o, "title", `${e}.title`, t);
703
- i !== void 0 && !m(i) && A(i, `${e}.title`, t);
704
- const l = b(o, "description", `${e}.description`, t);
705
- l !== void 0 && !m(l) && A(l, `${e}.description`, t);
706
- const a = ut(S(o, "toolCall", `${e}.toolCall`, t), `${e}.toolCall`, t);
731
+ _(o, rt, e, t);
732
+ const a = K(p(o, "toolCallId", `${e}.toolCallId`, t), `${e}.toolCallId`, t);
733
+ h(p(o, "toolName", `${e}.toolName`, t), `${e}.toolName`, t);
734
+ const i = v(o, "status", `${e}.status`, t), l = i === void 0 || f(i) ? void 0 : Ie(i, `${e}.status`, t), d = v(o, "args", `${e}.args`, t);
735
+ d !== void 0 && !f(d) && A(d, `${e}.args`, t), v(o, "result", `${e}.result`, t);
736
+ const c = v(o, "error", `${e}.error`, t);
737
+ return l === "error" ? c === void 0 ? s(t, `${e}.error`, "Value is required for error tool calls") : f(c) || h(c, `${e}.error`, t) : c !== void 0 && s(t, `${e}.error`, "Field is allowed for error tool calls only"), T(t, r) ? void 0 : a;
738
+ }
739
+ function Ct(n, e, t) {
740
+ const r = A(n, e, t);
741
+ if (!r) return;
742
+ _(r, nt, e, t);
743
+ const o = v(r, "label", `${e}.label`, t);
744
+ o !== void 0 && !f(o) && h(o, `${e}.label`, t);
745
+ const a = V(p(r, "toolCalls", `${e}.toolCalls`, t), `${e}.toolCalls`, t);
707
746
  if (!a) return;
708
- const { status: d } = a;
709
- ve(o, oe, et[d], e, t);
710
- const s = b(o, "progress", `${e}.progress`, t);
711
- s !== void 0 && !m(s) && X(s, `${e}.progress`, t);
712
- const u = b(o, "sourceIds", `${e}.sourceIds`, t), p = u === void 0 || m(u) ? void 0 : st(u, `${e}.sourceIds`, t), v = b(o, "currentSourceId", `${e}.currentSourceId`, t), $ = v === void 0 || m(v) ? void 0 : A(v, `${e}.currentSourceId`, t), y = b(o, "durationMs", `${e}.durationMs`, t);
713
- if (y !== void 0 && !m(y)) {
714
- const g = Se(y, `${e}.durationMs`, t);
715
- g !== void 0 && g < 0 && c(t, `${e}.durationMs`, "Value must be non-negative");
747
+ const i = k(a, `${e}.toolCalls`, t);
748
+ if (!i) return;
749
+ const l = /* @__PURE__ */ new Set();
750
+ for (const d of i) {
751
+ const c = `${e}.toolCalls[${d.index}]`, u = It(d.value, c, t);
752
+ u && (l.has(u) ? s(t, `${c}.toolCallId`, "duplicate tool-call ID") : l.add(u));
716
753
  }
717
- if (!_(t, r))
754
+ }
755
+ function Ce(n, e, t) {
756
+ const r = be(n, e, t);
757
+ r !== void 0 && r < 0 && s(t, e, "Value must be non-negative");
758
+ }
759
+ function wt(n, e, t) {
760
+ const r = t.length, o = A(n, e, t);
761
+ if (!o) return;
762
+ _(o, le, e, t);
763
+ const a = v(o, "title", `${e}.title`, t);
764
+ a !== void 0 && !f(a) && x(a, `${e}.title`, t);
765
+ const i = v(o, "description", `${e}.description`, t);
766
+ i !== void 0 && !f(i) && x(i, `${e}.description`, t);
767
+ const l = v(o, "context", `${e}.context`, t);
768
+ l !== void 0 && !f(l) && bt(l, `${e}.context`, t);
769
+ const d = v(o, "technicalDetails", `${e}.technicalDetails`, t);
770
+ d !== void 0 && !f(d) && Ct(d, `${e}.technicalDetails`, t);
771
+ const c = yt(p(o, "toolCall", `${e}.toolCall`, t), `${e}.toolCall`, t);
772
+ if (!c) return;
773
+ const { status: u } = c;
774
+ ne(o, le, ct[u], e, t);
775
+ const g = v(o, "progress", `${e}.progress`, t);
776
+ g !== void 0 && !f(g) && G(g, `${e}.progress`, t);
777
+ const $ = v(o, "sourceIds", `${e}.sourceIds`, t), b = $ === void 0 || f($) ? void 0 : St($, `${e}.sourceIds`, t), I = v(o, "currentSourceId", `${e}.currentSourceId`, t), y = I === void 0 || f(I) ? void 0 : x(I, `${e}.currentSourceId`, t), C = v(o, "durationMs", `${e}.durationMs`, t);
778
+ if (C !== void 0 && !f(C) && Ce(C, `${e}.durationMs`, t), !T(t, r))
718
779
  return {
719
- toolCall: a,
720
- ...p === void 0 ? {} : { sourceIds: p },
721
- ...$ === void 0 ? {} : { currentSourceId: $ }
780
+ toolCall: c,
781
+ ...b === void 0 ? {} : { sourceIds: b },
782
+ ...y === void 0 ? {} : { currentSourceId: y }
722
783
  };
723
784
  }
724
- function mt(n, e, t) {
725
- const r = t.length, o = C(n, e, t);
785
+ function Nt(n, e, t) {
786
+ const r = t.length, o = A(n, e, t);
726
787
  if (!o) return;
727
- O(o, He, e, t);
728
- const i = q(S(o, "id", `${e}.id`, t), `${e}.id`, t);
729
- T(S(o, "url", `${e}.url`, t), `${e}.url`, t);
730
- for (const l of [
788
+ _(o, ae, e, t);
789
+ const a = K(p(o, "id", `${e}.id`, t), `${e}.id`, t), i = v(o, "kind", `${e}.kind`, t), l = i === void 0 || f(i) ? void 0 : x(i, `${e}.kind`, t);
790
+ if (l !== void 0 && l !== "link" && l !== "reference" && s(t, `${e}.kind`, 'Value must be "link" or "reference"'), l === "reference") {
791
+ ne(o, ae, ot, e, t), h(p(o, "title", `${e}.title`, t), `${e}.title`, t);
792
+ const d = v(o, "description", `${e}.description`, t);
793
+ return d !== void 0 && !f(d) && x(d, `${e}.description`, t), T(t, r) || !a ? void 0 : a;
794
+ }
795
+ h(p(o, "url", `${e}.url`, t), `${e}.url`, t);
796
+ for (const d of [
731
797
  "title",
732
798
  "description",
733
799
  "favicon",
734
800
  "siteName"
735
801
  ]) {
736
- const a = b(o, l, `${e}.${l}`, t);
737
- a !== void 0 && !m(a) && A(a, `${e}.${l}`, t);
802
+ const c = v(o, d, `${e}.${d}`, t);
803
+ c !== void 0 && !f(c) && x(c, `${e}.${d}`, t);
738
804
  }
739
- return _(t, r) || !i ? void 0 : i;
805
+ return T(t, r) || !a ? void 0 : a;
740
806
  }
741
- function pt(n, e, t) {
742
- const r = /* @__PURE__ */ new Set(), o = j(n, e, t);
807
+ function ht(n, e, t) {
808
+ const r = /* @__PURE__ */ new Set(), o = V(n, e, t);
743
809
  if (!o) return r;
744
- const i = E(o, e, t);
745
- if (!i) return r;
746
- for (const l of i) {
747
- const a = `${e}[${l.index}]`, d = mt(l.value, a, t);
810
+ const a = k(o, e, t);
811
+ if (!a) return r;
812
+ for (const i of a) {
813
+ const l = `${e}[${i.index}]`, d = Nt(i.value, l, t);
748
814
  if (d) {
749
815
  if (r.has(d)) {
750
- c(t, `${a}.id`, "duplicate source ID");
816
+ s(t, `${l}.id`, "duplicate source ID");
751
817
  continue;
752
818
  }
753
819
  r.add(d);
@@ -755,87 +821,87 @@ function pt(n, e, t) {
755
821
  }
756
822
  return r;
757
823
  }
758
- function vt(n, e, t) {
759
- const r = t.length, o = C(n, e, t);
824
+ function xt(n, e, t) {
825
+ const r = t.length, o = A(n, e, t);
760
826
  if (!o) return;
761
- O(o, We, e, t);
762
- const i = q(S(o, "id", `${e}.id`, t), `${e}.id`, t), l = ct(S(o, "kind", `${e}.kind`, t), `${e}.kind`, t);
763
- if (!l) return;
764
- const a = l === "custom" ? S(o, "label", `${e}.label`, t) : b(o, "label", `${e}.label`, t);
765
- l === "custom" && a === void 0 ? c(t, `${e}.label`, "Value is required for custom actions") : a !== void 0 && !m(a) && T(a, `${e}.label`, t);
766
- const d = b(o, "disabled", `${e}.disabled`, t);
767
- d !== void 0 && !m(d) && ae(d, `${e}.disabled`, t);
768
- const s = b(o, "loading", `${e}.loading`, t);
769
- return s !== void 0 && !m(s) && ae(s, `${e}.loading`, t), _(t, r) || !i ? void 0 : {
770
- id: i,
771
- kind: l
827
+ _(o, et, e, t);
828
+ const a = K(p(o, "id", `${e}.id`, t), `${e}.id`, t), i = $t(p(o, "kind", `${e}.kind`, t), `${e}.kind`, t);
829
+ if (!i) return;
830
+ const l = i === "custom" ? p(o, "label", `${e}.label`, t) : v(o, "label", `${e}.label`, t);
831
+ i === "custom" && l === void 0 ? s(t, `${e}.label`, "Value is required for custom actions") : l !== void 0 && !f(l) && h(l, `${e}.label`, t);
832
+ const d = v(o, "disabled", `${e}.disabled`, t);
833
+ d !== void 0 && !f(d) && ce(d, `${e}.disabled`, t);
834
+ const c = v(o, "loading", `${e}.loading`, t);
835
+ return c !== void 0 && !f(c) && ce(c, `${e}.loading`, t), T(t, r) || !a ? void 0 : {
836
+ id: a,
837
+ kind: i
772
838
  };
773
839
  }
774
- function gt(n, e, t, r) {
775
- const o = j(n, e, r);
840
+ function At(n, e, t, r) {
841
+ const o = V(n, e, r);
776
842
  if (!o) return;
777
- const i = E(o, e, r);
778
- if (!i) return;
779
- const l = /* @__PURE__ */ new Set();
780
- for (const a of i) {
781
- const d = `${e}[${a.index}]`, s = vt(a.value, d, r);
782
- s && (l.has(s.id) ? c(r, `${d}.id`, "duplicate action ID") : l.add(s.id), t && !Ze[t].includes(s.kind) && c(r, `${d}.kind`, `Action kind "${s.kind}" is not allowed for ${t} runs`));
843
+ const a = k(o, e, r);
844
+ if (!a) return;
845
+ const i = /* @__PURE__ */ new Set();
846
+ for (const l of a) {
847
+ const d = `${e}[${l.index}]`, c = xt(l.value, d, r);
848
+ c && (i.has(c.id) ? s(r, `${d}.id`, "duplicate action ID") : i.add(c.id), t && !dt[t].includes(c.kind) && s(r, `${d}.kind`, `Action kind "${c.kind}" is not allowed for ${t} runs`));
783
849
  }
784
850
  }
785
- function yt(n, e, t) {
851
+ function Ot(n, e, t) {
786
852
  const r = e.map((o) => o.toolCall.status);
787
853
  switch (n) {
788
854
  case "ready":
789
- r.some((o) => o !== "pending") && c(t, "$.steps", "Ready runs allow pending steps only");
855
+ r.some((o) => o !== "pending") && s(t, "$.steps", "Ready runs allow pending steps only");
790
856
  return;
791
857
  case "running":
792
858
  case "paused":
793
- (r.some((o) => o !== "pending" && o !== "running" && o !== "success") || !r.includes("running")) && c(t, "$.steps", `${n} runs require at least one running step and allow pending, running, or success only`);
859
+ (r.some((o) => o !== "pending" && o !== "running" && o !== "success") || !r.includes("running")) && s(t, "$.steps", `${n} runs require at least one running step and allow pending, running, or success only`);
794
860
  return;
795
861
  case "completed":
796
- (e.length === 0 || r.some((o) => o !== "success")) && c(t, "$.steps", "Completed runs require a non-empty all-success step list");
862
+ (e.length === 0 || r.some((o) => o !== "success")) && s(t, "$.steps", "Completed runs require a non-empty all-success step list");
797
863
  return;
798
864
  case "error":
799
- r.some((o) => o !== "pending" && o !== "success" && o !== "error") && c(t, "$.steps", "Error runs allow pending, success, or error steps only");
865
+ r.some((o) => o !== "pending" && o !== "success" && o !== "error") && s(t, "$.steps", "Error runs allow pending, success, or error steps only");
800
866
  return;
801
867
  default:
802
- M(n);
868
+ U(n);
803
869
  }
804
870
  }
805
- function St(n, e, t) {
871
+ function Rt(n, e, t) {
806
872
  for (const [r, o] of n.entries()) {
807
- const i = `$.steps[${r}].sourceIds`, l = o.sourceIds;
808
- if (l)
809
- for (const [s, u] of l.entries()) e.has(u) || c(t, `${i}[${s}]`, "Unknown source reference");
810
- const a = o.currentSourceId;
811
- if (a === void 0) continue;
873
+ const a = `$.steps[${r}].sourceIds`, i = o.sourceIds;
874
+ if (i)
875
+ for (const [c, u] of i.entries()) e.has(u) || s(t, `${a}[${c}]`, "Unknown source reference");
876
+ const l = o.currentSourceId;
877
+ if (l === void 0) continue;
812
878
  const d = `$.steps[${r}].currentSourceId`;
813
- e.has(a) ? l?.includes(a) || c(t, d, "Current source ID must be included in sourceIds") : c(t, d, "Unknown current source reference");
879
+ e.has(l) ? i?.includes(l) || s(t, d, "Current source ID must be included in sourceIds") : s(t, d, "Unknown current source reference");
814
880
  }
815
881
  }
816
- function bt(n, e, t, r) {
817
- n !== "running" && n !== "paused" || e === void 0 || t.some((o) => o.toolCall.status === "running" && o.toolCall.toolCallId === e) || c(r, "$.activeStepId", "Active step ID must reference a running step");
882
+ function _t(n, e, t, r) {
883
+ n !== "running" && n !== "paused" || e === void 0 || t.some((o) => o.toolCall.status === "running" && o.toolCall.toolCallId === e) || s(r, "$.activeStepId", "Active step ID must reference a running step");
818
884
  }
819
- function $t(n, e, t) {
820
- const r = j(n, e, t);
885
+ function Tt(n, e, t) {
886
+ const r = V(n, e, t);
821
887
  if (!r) return;
822
- const o = E(r, e, t);
888
+ const o = k(r, e, t);
823
889
  if (o)
824
- for (const i of o) {
825
- const l = `${e}[${i.index}]`, a = C(i.value, l, t);
826
- a && (O(a, qe, l, t), T(S(a, "label", `${l}.label`, t), `${l}.label`, t), A(S(a, "value", `${l}.value`, t), `${l}.value`, t));
890
+ for (const a of o) {
891
+ const i = `${e}[${a.index}]`, l = A(a.value, i, t);
892
+ l && (_(l, Ge, i, t), h(p(l, "label", `${i}.label`, t), `${i}.label`, t), x(p(l, "value", `${i}.value`, t), `${i}.value`, t));
827
893
  }
828
894
  }
829
- function It(n, e, t) {
830
- const r = C(n, e, t);
895
+ function kt(n, e, t) {
896
+ const r = A(n, e, t);
831
897
  if (!r) return;
832
- O(r, Fe, e, t), T(S(r, "title", `${e}.title`, t), `${e}.title`, t);
833
- const o = b(r, "description", `${e}.description`, t);
834
- o !== void 0 && !m(o) && A(o, `${e}.description`, t);
835
- const i = b(r, "metadata", `${e}.metadata`, t);
836
- i !== void 0 && !m(i) && $t(i, `${e}.metadata`, t);
898
+ _(r, Xe, e, t), h(p(r, "title", `${e}.title`, t), `${e}.title`, t);
899
+ const o = v(r, "description", `${e}.description`, t);
900
+ o !== void 0 && !f(o) && x(o, `${e}.description`, t);
901
+ const a = v(r, "metadata", `${e}.metadata`, t);
902
+ a !== void 0 && !f(a) && Tt(a, `${e}.metadata`, t);
837
903
  }
838
- function ht(n, e, t) {
904
+ function Et(n, e, t) {
839
905
  switch (n) {
840
906
  case "ready":
841
907
  case "completed":
@@ -848,68 +914,70 @@ function ht(n, e, t) {
848
914
  case "running":
849
915
  case "paused": {
850
916
  z(e, ["error"], "$", t);
851
- const r = b(e, "progress", "$.progress", t);
852
- r !== void 0 && !m(r) && X(r, "$.progress", t);
853
- const o = b(e, "activeStepId", "$.activeStepId", t);
854
- return o === void 0 || m(o) ? void 0 : A(o, "$.activeStepId", t);
917
+ const r = v(e, "progress", "$.progress", t);
918
+ r !== void 0 && !f(r) && G(r, "$.progress", t);
919
+ const o = v(e, "activeStepId", "$.activeStepId", t);
920
+ return o === void 0 || f(o) ? void 0 : x(o, "$.activeStepId", t);
855
921
  }
856
922
  case "error": {
857
923
  z(e, ["activeStepId"], "$", t);
858
- const r = b(e, "progress", "$.progress", t);
859
- r !== void 0 && !m(r) && X(r, "$.progress", t);
860
- const o = C(S(e, "error", "$.error", t), "$.error", t);
924
+ const r = v(e, "progress", "$.progress", t);
925
+ r !== void 0 && !f(r) && G(r, "$.progress", t);
926
+ const o = A(p(e, "error", "$.error", t), "$.error", t);
861
927
  if (!o) return;
862
- O(o, ze, "$.error", t), T(S(o, "message", "$.error.message", t), "$.error.message", t);
928
+ _(o, Ze, "$.error", t), h(p(o, "message", "$.error.message", t), "$.error.message", t);
863
929
  return;
864
930
  }
865
931
  default:
866
- M(n);
932
+ U(n);
867
933
  }
868
934
  }
869
- function wt(n) {
935
+ function Dt(n) {
870
936
  const e = [];
871
937
  try {
872
- const t = at(n, "$", e);
938
+ const t = pt(n, "$", e);
873
939
  if (e.length > 0) return {
874
940
  valid: !1,
875
941
  issues: e
876
942
  };
877
- if (t === h) return {
943
+ if (t === w) return {
878
944
  valid: !1,
879
945
  issues: [{
880
946
  path: "$",
881
- message: W
947
+ message: X
882
948
  }]
883
949
  };
884
- if (it(t, "$", e), e.length > 0) return {
950
+ if (vt(t, "$", e), e.length > 0) return {
885
951
  valid: !1,
886
952
  issues: e
887
953
  };
888
- const r = C(t, "$", e);
954
+ const r = A(t, "$", e);
889
955
  if (!r) return {
890
956
  valid: !1,
891
957
  issues: e
892
958
  };
893
- O(r, Ye, "$", e);
894
- const o = lt(S(r, "status", "$.status", e), "$.status", e), i = o ? ht(o, r, e) : void 0;
895
- q(S(r, "runId", "$.runId", e), "$.runId", e), It(S(r, "header", "$.header", e), "$.header", e);
896
- const l = j(S(r, "steps", "$.steps", e), "$.steps", e), a = [];
897
- let d = !1;
959
+ _(r, We, "$", e);
960
+ const o = gt(p(r, "status", "$.status", e), "$.status", e), a = o ? Et(o, r, e) : void 0;
961
+ K(p(r, "runId", "$.runId", e), "$.runId", e), kt(p(r, "header", "$.header", e), "$.header", e);
962
+ const i = v(r, "durationMs", "$.durationMs", e);
963
+ i !== void 0 && !f(i) && Ce(i, "$.durationMs", e);
964
+ const l = V(p(r, "steps", "$.steps", e), "$.steps", e), d = [];
965
+ let c = !1;
898
966
  if (l) {
899
- const v = E(l, "$.steps", e);
900
- if (v) {
901
- const $ = /* @__PURE__ */ new Set();
902
- for (const y of v) {
903
- const g = ft(y.value, `$.steps[${y.index}]`, e);
904
- g && ($.has(g.toolCall.toolCallId) ? c(e, `$.steps[${y.index}].toolCall.toolCallId`, "duplicate tool-call ID") : $.add(g.toolCall.toolCallId), a.push(g));
967
+ const b = k(l, "$.steps", e);
968
+ if (b) {
969
+ const I = /* @__PURE__ */ new Set();
970
+ for (const y of b) {
971
+ const C = wt(y.value, `$.steps[${y.index}]`, e);
972
+ C && (I.has(C.toolCall.toolCallId) ? s(e, `$.steps[${y.index}].toolCall.toolCallId`, "duplicate tool-call ID") : I.add(C.toolCall.toolCallId), d.push(C));
905
973
  }
906
- d = a.length === v.length, o && d && yt(o, a, e);
974
+ c = d.length === b.length, o && c && Ot(o, d, e);
907
975
  }
908
976
  }
909
- const s = b(r, "sources", "$.sources", e), u = s === void 0 || m(s) ? /* @__PURE__ */ new Set() : pt(s, "$.sources", e);
910
- d && (St(a, u, e), bt(o, i, a, e));
911
- const p = b(r, "actions", "$.actions", e);
912
- return p !== void 0 && !m(p) && gt(p, "$.actions", o, e), e.length > 0 ? {
977
+ const u = v(r, "sources", "$.sources", e), g = u === void 0 || f(u) ? /* @__PURE__ */ new Set() : ht(u, "$.sources", e);
978
+ c && (Rt(d, g, e), _t(o, a, d, e));
979
+ const $ = v(r, "actions", "$.actions", e);
980
+ return $ !== void 0 && !f($) && At($, "$.actions", o, e), e.length > 0 ? {
913
981
  valid: !1,
914
982
  issues: e
915
983
  } : {
@@ -921,118 +989,118 @@ function wt(n) {
921
989
  valid: !1,
922
990
  issues: [{
923
991
  path: "$",
924
- message: W
992
+ message: X
925
993
  }]
926
994
  };
927
995
  }
928
996
  }
929
- var Nt = 1e4, k = /* @__PURE__ */ Symbol("invalid-runtime-string-array"), xt = Reflect.ownKeys(Array.prototype).filter((n) => n !== "length");
930
- function le(n) {
997
+ var Vt = 1e4, D = /* @__PURE__ */ Symbol("invalid-runtime-string-array"), Mt = Reflect.ownKeys(Array.prototype).filter((n) => n !== "length");
998
+ function se(n) {
931
999
  try {
932
- if (!Array.isArray(n)) return k;
1000
+ if (!Array.isArray(n)) return D;
933
1001
  const e = Reflect.getOwnPropertyDescriptor(n, "length");
934
- if (e === void 0 || e.enumerable || !Object.hasOwn(e, "value") || typeof e.value != "number" || !Number.isInteger(e.value) || e.value < 0 || e.value > Nt || !Object.is(Reflect.get(n, "length"), e.value)) return k;
935
- for (const r of xt) if (Reflect.getOwnPropertyDescriptor(n, r) !== void 0) return k;
1002
+ if (e === void 0 || e.enumerable || !Object.hasOwn(e, "value") || typeof e.value != "number" || !Number.isInteger(e.value) || e.value < 0 || e.value > Vt || !Object.is(Reflect.get(n, "length"), e.value)) return D;
1003
+ for (const r of Mt) if (Reflect.getOwnPropertyDescriptor(n, r) !== void 0) return D;
936
1004
  const t = [];
937
1005
  for (let r = 0; r < e.value; r += 1) {
938
- const o = String(r), i = Reflect.getOwnPropertyDescriptor(n, o);
939
- if (i === void 0 || i.enumerable !== !0 || !Object.hasOwn(i, "value") || typeof i.value != "string" || !Object.is(Reflect.get(n, o), i.value)) return k;
940
- t.push(i.value);
1006
+ const o = String(r), a = Reflect.getOwnPropertyDescriptor(n, o);
1007
+ if (a === void 0 || a.enumerable !== !0 || !Object.hasOwn(a, "value") || typeof a.value != "string" || !Object.is(Reflect.get(n, o), a.value)) return D;
1008
+ t.push(a.value);
941
1009
  }
942
1010
  return t;
943
1011
  } catch {
944
- return k;
1012
+ return D;
945
1013
  }
946
1014
  }
947
- function At({ headingLevel: n, open: e, defaultOpen: t, expandedStepIds: r, defaultExpandedStepIds: o }) {
948
- const i = [];
949
- let l, a;
950
- if (n !== void 0 && (typeof n != "number" || !Number.isInteger(n) || n < 2 || n > 6) && i.push("headingLevel must be an integer from 2 through 6"), e !== void 0 && typeof e != "boolean" && i.push("open must be a boolean"), t !== void 0 && typeof t != "boolean" && i.push("defaultOpen must be a boolean"), r !== void 0) {
951
- const d = le(r);
952
- d === k ? i.push("expandedStepIds must be an array of strings") : l = d;
1015
+ function Lt({ headingLevel: n, open: e, defaultOpen: t, expandedStepIds: r, defaultExpandedStepIds: o }) {
1016
+ const a = [];
1017
+ let i, l;
1018
+ if (n !== void 0 && (typeof n != "number" || !Number.isInteger(n) || n < 2 || n > 6) && a.push("headingLevel must be an integer from 2 through 6"), e !== void 0 && typeof e != "boolean" && a.push("open must be a boolean"), t !== void 0 && typeof t != "boolean" && a.push("defaultOpen must be a boolean"), r !== void 0) {
1019
+ const d = se(r);
1020
+ d === D ? a.push("expandedStepIds must be an array of strings") : i = d;
953
1021
  }
954
1022
  if (o !== void 0) {
955
- const d = le(o);
956
- d === k ? i.push("defaultExpandedStepIds must be an array of strings") : a = d;
1023
+ const d = se(o);
1024
+ d === D ? a.push("defaultExpandedStepIds must be an array of strings") : l = d;
957
1025
  }
958
- return i.length > 0 ? {
1026
+ return a.length > 0 ? {
959
1027
  valid: !1,
960
- issues: i
1028
+ issues: a
961
1029
  } : {
962
1030
  valid: !0,
963
1031
  value: {
964
1032
  ...n === void 0 ? {} : { headingLevel: n },
965
1033
  ...e === void 0 ? {} : { open: e },
966
1034
  ...t === void 0 ? {} : { defaultOpen: t },
967
- ...r === void 0 ? {} : { expandedStepIds: l },
968
- ...o === void 0 ? {} : { defaultExpandedStepIds: a }
1035
+ ...r === void 0 ? {} : { expandedStepIds: i },
1036
+ ...o === void 0 ? {} : { defaultExpandedStepIds: l }
969
1037
  }
970
1038
  };
971
1039
  }
972
- var be = w.forwardRef(({ className: n, ...e }, t) => /* @__PURE__ */ f("section", {
1040
+ var we = N.forwardRef(({ className: n, ...e }, t) => /* @__PURE__ */ m("section", {
973
1041
  ...e,
974
1042
  ref: t,
975
1043
  "data-slot": "ai-tool-run",
976
1044
  role: "alert",
977
1045
  "aria-label": "Tool run",
978
- className: ce("w-full min-w-0", n),
1046
+ className: fe("w-full min-w-0", n),
979
1047
  children: "Unable to display tool run."
980
1048
  }));
981
- be.displayName = "InvalidAIToolRun";
982
- var $e = {
1049
+ we.displayName = "InvalidAIToolRun";
1050
+ var Ne = {
983
1051
  ready: "Ready",
984
1052
  running: "Running",
985
1053
  paused: "Paused",
986
1054
  completed: "Completed",
987
1055
  error: "Failed"
988
- }, Ot = {
1056
+ }, Pt = {
989
1057
  start: "Start",
990
1058
  pause: "Pause",
991
1059
  resume: "Resume",
992
1060
  retry: "Retry",
993
1061
  dismiss: "Dismiss"
994
- }, G = "[&_[data-slot=progress-indicator]]:!transition-none [&_[data-slot=progress-indicator]]:!animate-none";
995
- function Ie({ status: n }) {
1062
+ }, Q = "[&_[data-slot=progress-indicator]]:!transition-none [&_[data-slot=progress-indicator]]:!animate-none";
1063
+ function he({ status: n }) {
996
1064
  switch (n) {
997
1065
  case "ready":
998
- return /* @__PURE__ */ f(Le, {
1066
+ return /* @__PURE__ */ m(Ue, {
999
1067
  "aria-hidden": "true",
1000
1068
  className: "size-4 text-muted-foreground"
1001
1069
  });
1002
1070
  case "running":
1003
- return /* @__PURE__ */ f(Pe, {
1071
+ return /* @__PURE__ */ m(je, {
1004
1072
  "aria-hidden": "true",
1005
1073
  className: "size-4 text-primary animate-pulse motion-reduce:animate-none"
1006
1074
  });
1007
1075
  case "paused":
1008
- return /* @__PURE__ */ f(Ue, {
1076
+ return /* @__PURE__ */ m(ze, {
1009
1077
  "aria-hidden": "true",
1010
1078
  className: "size-4 text-warning"
1011
1079
  });
1012
1080
  case "completed":
1013
- return /* @__PURE__ */ f(Ee, {
1081
+ return /* @__PURE__ */ m(Le, {
1014
1082
  "aria-hidden": "true",
1015
1083
  className: "size-4 text-success"
1016
1084
  });
1017
1085
  case "error":
1018
- return /* @__PURE__ */ f(se, {
1086
+ return /* @__PURE__ */ m(me, {
1019
1087
  "aria-hidden": "true",
1020
1088
  className: "size-4 text-destructive"
1021
1089
  });
1022
1090
  default:
1023
- return M(n);
1091
+ return U(n);
1024
1092
  }
1025
1093
  }
1026
- Ie.displayName = "RunStatusIcon";
1027
- function de(n) {
1028
- return n.kind === "custom" ? n.label : n.label ?? Ot[n.kind];
1094
+ he.displayName = "RunStatusIcon";
1095
+ function ue(n) {
1096
+ return n.kind === "custom" ? n.label : n.label ?? Pt[n.kind];
1029
1097
  }
1030
- function Ct(n) {
1098
+ function Kt(n) {
1031
1099
  if (n.status === "error") return "";
1032
- const e = n.activeStepId === void 0 ? void 0 : n.steps.find((r) => r.toolCall.toolCallId === n.activeStepId), t = $e[n.status];
1100
+ const e = n.activeStepId === void 0 ? void 0 : n.steps.find((r) => r.toolCall.toolCallId === n.activeStepId), t = Ne[n.status];
1033
1101
  return e ? `${t}. Current step: ${e.title ?? e.toolCall.toolName}.` : `${t}.`;
1034
1102
  }
1035
- function Rt(n, e) {
1103
+ function jt(n, e) {
1036
1104
  const t = e.toolCall.status;
1037
1105
  switch (t) {
1038
1106
  case "pending":
@@ -1044,268 +1112,297 @@ function Rt(n, e) {
1044
1112
  case "error":
1045
1113
  return "error";
1046
1114
  default:
1047
- return M(t);
1115
+ return U(t);
1048
1116
  }
1049
1117
  }
1050
- function he({ progress: n, sources: e, title: t, paused: r }) {
1051
- return /* @__PURE__ */ x("div", {
1118
+ function xe({ progress: n, sources: e, title: t, paused: r, technicalDetails: o }) {
1119
+ const a = o?.toolCalls.flatMap((i) => i.status === "error" ? [i.toolCallId] : []) ?? [];
1120
+ return /* @__PURE__ */ O("div", {
1052
1121
  className: "grid min-w-0 gap-3",
1053
- children: [n && /* @__PURE__ */ f(H, {
1054
- value: n.value,
1055
- label: n.label,
1056
- subLabel: n.meta,
1057
- className: r ? G : void 0
1058
- }), e.length > 0 && /* @__PURE__ */ f("ul", {
1059
- "aria-label": `Sources for ${t}`,
1060
- className: "grid min-w-0 gap-2",
1061
- children: e.map((o, i) => /* @__PURE__ */ f("li", {
1062
- className: "flex min-w-0 items-center gap-2",
1063
- children: /* @__PURE__ */ f(je, {
1064
- source: o,
1065
- variant: "minimal",
1066
- showTooltip: !1,
1067
- className: "min-w-0 max-w-none"
1068
- })
1069
- }, `${o.id}-${i}`))
1070
- })]
1122
+ children: [
1123
+ n && /* @__PURE__ */ m(W, {
1124
+ value: n.value,
1125
+ label: n.label,
1126
+ subLabel: n.meta,
1127
+ className: r ? Q : void 0
1128
+ }),
1129
+ e.length > 0 && /* @__PURE__ */ m("ul", {
1130
+ "aria-label": `Sources for ${t}`,
1131
+ className: "grid min-w-0 gap-2",
1132
+ children: e.map((i, l) => /* @__PURE__ */ m("li", {
1133
+ className: "flex min-w-0 items-center gap-2",
1134
+ children: i.kind === "reference" ? /* @__PURE__ */ m("span", {
1135
+ "data-slot": "ai-tool-run-reference",
1136
+ className: "min-w-0 truncate text-sm text-secondary-foreground",
1137
+ title: i.description,
1138
+ children: i.title
1139
+ }) : /* @__PURE__ */ m(Ye, {
1140
+ source: i,
1141
+ variant: "minimal",
1142
+ showTooltip: !1,
1143
+ className: "min-w-0 max-w-none"
1144
+ })
1145
+ }, `${i.id}-${l}`))
1146
+ }),
1147
+ o && o.toolCalls.length > 0 && /* @__PURE__ */ O("div", {
1148
+ className: "grid min-w-0 gap-2",
1149
+ children: [o.label && /* @__PURE__ */ m("p", {
1150
+ className: "text-xs font-medium text-secondary-foreground",
1151
+ children: o.label
1152
+ }), /* @__PURE__ */ m(Je, {
1153
+ toolCalls: o.toolCalls,
1154
+ defaultOpenToolCallIds: a
1155
+ })]
1156
+ })
1157
+ ]
1071
1158
  });
1072
1159
  }
1073
- he.displayName = "AIToolRunStepContent";
1074
- function _t(n, e, t) {
1075
- const r = e.title ?? e.toolCall.toolName, o = (e.sourceIds ?? []).flatMap((l) => {
1076
- const a = t.get(l);
1077
- return a === void 0 ? [] : [a];
1078
- }), i = e.progress !== void 0 || o.length > 0;
1160
+ xe.displayName = "AIToolRunStepContent";
1161
+ function Jt(n, e, t) {
1162
+ const r = e.title ?? e.toolCall.toolName, o = (e.sourceIds ?? []).flatMap((i) => {
1163
+ const l = t.get(i);
1164
+ return l === void 0 ? [] : [l];
1165
+ }), a = e.progress !== void 0 || o.length > 0 || e.technicalDetails !== void 0;
1079
1166
  return {
1080
1167
  id: e.toolCall.toolCallId,
1081
1168
  title: r,
1082
1169
  description: e.description,
1083
- status: Rt(n, e),
1084
- content: i ? /* @__PURE__ */ f(he, {
1170
+ contextLabel: e.context?.label,
1171
+ status: jt(n, e),
1172
+ content: a ? /* @__PURE__ */ m(xe, {
1085
1173
  progress: e.progress,
1086
1174
  sources: o,
1087
1175
  title: r,
1088
- paused: n === "paused"
1176
+ paused: n === "paused",
1177
+ technicalDetails: e.technicalDetails
1089
1178
  }) : void 0,
1090
1179
  durationMs: e.durationMs,
1091
1180
  error: e.toolCall.status === "error" ? e.toolCall.error : void 0
1092
1181
  };
1093
1182
  }
1094
- function Tt({ open: n, defaultOpen: e, onOpenChange: t }) {
1095
- const r = n !== void 0, [o, i] = w.useState(e ?? !0), l = w.useRef(n ?? o), a = w.useRef(r);
1096
- w.useLayoutEffect(() => {
1097
- n !== void 0 && (l.current = n);
1098
- }, [n]), w.useLayoutEffect(() => {
1099
- const s = a.current;
1100
- a.current = r, !(r || !s) && i((u) => u === l.current ? u : l.current);
1183
+ function Ut({ open: n, defaultOpen: e, onOpenChange: t }) {
1184
+ const r = n !== void 0, [o, a] = N.useState(e ?? !0), i = N.useRef(n ?? o), l = N.useRef(r);
1185
+ N.useLayoutEffect(() => {
1186
+ n !== void 0 && (i.current = n);
1187
+ }, [n]), N.useLayoutEffect(() => {
1188
+ const c = l.current;
1189
+ l.current = r, !(r || !c) && a((u) => u === i.current ? u : i.current);
1101
1190
  }, [r]);
1102
- const d = w.useCallback((s) => {
1103
- r || i(s), t?.(s);
1191
+ const d = N.useCallback((c) => {
1192
+ r || a(c), t?.(c);
1104
1193
  }, [r, t]);
1105
1194
  return [r ? n : o, d];
1106
1195
  }
1107
- var we = w.forwardRef(({ run: n, headingLevel: e = 2, open: t, defaultOpen: r, onOpenChange: o, expandedStepIds: i, defaultExpandedStepIds: l, onExpandedStepIdsChange: a, onAction: d, className: s, ...u }, p) => {
1108
- const v = w.useId(), $ = w.useId(), y = `h${e}`, [g, R] = Tt({
1196
+ var Ae = N.forwardRef(({ run: n, headingLevel: e = 2, open: t, defaultOpen: r, onOpenChange: o, expandedStepIds: a, defaultExpandedStepIds: i, onExpandedStepIdsChange: l, onAction: d, className: c, ...u }, g) => {
1197
+ const $ = N.useId(), b = N.useId(), I = `h${e}`, [y, C] = Ut({
1109
1198
  open: t,
1110
1199
  defaultOpen: r,
1111
1200
  onOpenChange: o
1112
- }), V = w.useMemo(() => new Map((n.sources ?? []).map((I) => [I.id, I])), [n.sources]), xe = w.useMemo(() => n.steps.map((I) => _t(n.status, I, V)), [
1201
+ }), M = N.useMemo(() => new Map((n.sources ?? []).map((S) => [S.id, S])), [n.sources]), Re = N.useMemo(() => n.steps.map((S) => Jt(n.status, S, M)), [
1113
1202
  n.status,
1114
1203
  n.steps,
1115
- V
1116
- ]), K = n.status === "error" ? n.error.message : void 0, Ae = Ct(n), { "aria-busy": Vt, ...Oe } = u;
1117
- return /* @__PURE__ */ x("section", {
1118
- ...Oe,
1119
- ref: p,
1204
+ M
1205
+ ]), _e = N.useMemo(() => {
1206
+ const S = new Set(i);
1207
+ for (const E of n.steps) E.toolCall.status === "error" && S.add(E.toolCall.toolCallId);
1208
+ return n.steps.flatMap((E) => S.has(E.toolCall.toolCallId) ? [E.toolCall.toolCallId] : []);
1209
+ }, [i, n.steps]), j = n.status === "error" ? n.error.message : void 0, Te = Kt(n), { "aria-busy": qt, ...ke } = u;
1210
+ return /* @__PURE__ */ O("section", {
1211
+ ...ke,
1212
+ ref: g,
1120
1213
  "data-slot": "ai-tool-run",
1121
- "aria-labelledby": v,
1122
- className: ce("relative w-full min-w-0", s),
1123
- children: [/* @__PURE__ */ x(D, {
1214
+ "aria-labelledby": $,
1215
+ className: fe("relative w-full min-w-0", c),
1216
+ children: [/* @__PURE__ */ O(L, {
1124
1217
  "aria-busy": n.status === "running" ? !0 : void 0,
1125
1218
  className: "rounded-2xl",
1126
1219
  children: [
1127
- /* @__PURE__ */ x(D.Header, { children: [/* @__PURE__ */ x("div", {
1220
+ /* @__PURE__ */ O(L.Header, { children: [/* @__PURE__ */ O("div", {
1128
1221
  className: "grid min-w-0 gap-1",
1129
1222
  children: [
1130
- /* @__PURE__ */ x("div", {
1223
+ /* @__PURE__ */ O("div", {
1131
1224
  className: "flex min-w-0 items-center gap-2 text-xs font-medium text-secondary-foreground",
1132
- children: [/* @__PURE__ */ f(Ie, { status: n.status }), /* @__PURE__ */ x("span", { children: ["Status: ", $e[n.status]] })]
1225
+ children: [
1226
+ /* @__PURE__ */ m(he, { status: n.status }),
1227
+ /* @__PURE__ */ O("span", { children: ["Status: ", Ne[n.status]] }),
1228
+ n.durationMs !== void 0 && /* @__PURE__ */ m("span", { children: Fe(n.durationMs) })
1229
+ ]
1133
1230
  }),
1134
- /* @__PURE__ */ f(y, {
1135
- id: v,
1231
+ /* @__PURE__ */ m(I, {
1232
+ id: $,
1136
1233
  className: "min-w-0 truncate text-base font-semibold text-foreground",
1137
1234
  children: n.header.title
1138
1235
  }),
1139
- n.header.description && /* @__PURE__ */ f("p", {
1236
+ n.header.description && /* @__PURE__ */ m("p", {
1140
1237
  className: "line-clamp-2 text-sm text-secondary-foreground",
1141
1238
  children: n.header.description
1142
1239
  }),
1143
- n.header.metadata && n.header.metadata.length > 0 && /* @__PURE__ */ f("dl", {
1240
+ n.header.metadata && n.header.metadata.length > 0 && /* @__PURE__ */ m("dl", {
1144
1241
  className: "flex flex-wrap gap-x-3 gap-y-1 text-xs text-secondary-foreground",
1145
- children: n.header.metadata.map((I, Ce) => /* @__PURE__ */ x("div", {
1242
+ children: n.header.metadata.map((S, E) => /* @__PURE__ */ O("div", {
1146
1243
  className: "flex min-w-0 items-center gap-1",
1147
- children: [/* @__PURE__ */ x("dt", {
1244
+ children: [/* @__PURE__ */ O("dt", {
1148
1245
  className: "text-muted-foreground",
1149
- children: [I.label, ":"]
1150
- }), /* @__PURE__ */ f("dd", {
1246
+ children: [S.label, ":"]
1247
+ }), /* @__PURE__ */ m("dd", {
1151
1248
  className: "min-w-0 truncate",
1152
- children: I.value
1249
+ children: S.value
1153
1250
  })]
1154
- }, `${I.label}-${Ce}`))
1251
+ }, `${S.label}-${E}`))
1155
1252
  }),
1156
- !g && n.progress && /* @__PURE__ */ f(H, {
1253
+ !y && n.progress && /* @__PURE__ */ m(W, {
1157
1254
  value: n.progress.value,
1158
1255
  label: n.progress.label,
1159
1256
  subLabel: n.progress.meta,
1160
- className: n.status === "paused" ? G : void 0
1257
+ className: n.status === "paused" ? Q : void 0
1161
1258
  })
1162
1259
  ]
1163
- }), /* @__PURE__ */ f(D.Action, { children: /* @__PURE__ */ f(re, {
1260
+ }), /* @__PURE__ */ m(L.Action, { children: /* @__PURE__ */ m(ie, {
1164
1261
  appearance: "ghost",
1165
1262
  variant: "secondary",
1166
1263
  size: "icon-xl",
1167
1264
  iconOnly: !0,
1168
- "aria-label": g ? "Collapse tool run" : "Expand tool run",
1169
- "aria-expanded": g,
1170
- "aria-controls": $,
1171
- onClick: () => R(!g),
1172
- children: g ? /* @__PURE__ */ f(Ve, { "aria-hidden": "true" }) : /* @__PURE__ */ f(De, {
1265
+ "aria-label": y ? "Collapse tool run" : "Expand tool run",
1266
+ "aria-expanded": y,
1267
+ "aria-controls": b,
1268
+ onClick: () => C(!y),
1269
+ children: y ? /* @__PURE__ */ m(Pe, { "aria-hidden": "true" }) : /* @__PURE__ */ m(Ke, {
1173
1270
  "aria-hidden": "true",
1174
1271
  className: "rtl:rotate-180"
1175
1272
  })
1176
1273
  }) })] }),
1177
- /* @__PURE__ */ x(D.Content, {
1178
- id: $,
1179
- hidden: !g,
1274
+ /* @__PURE__ */ O(L.Content, {
1275
+ id: b,
1276
+ hidden: !y,
1180
1277
  className: "grid min-w-0 gap-4",
1181
1278
  children: [
1182
- n.progress && /* @__PURE__ */ f(H, {
1279
+ n.progress && /* @__PURE__ */ m(W, {
1183
1280
  value: n.progress.value,
1184
1281
  label: n.progress.label,
1185
1282
  subLabel: n.progress.meta,
1186
- className: n.status === "paused" ? G : void 0
1283
+ className: n.status === "paused" ? Q : void 0
1187
1284
  }),
1188
- K && /* @__PURE__ */ x("div", {
1285
+ j && /* @__PURE__ */ O("div", {
1189
1286
  className: "flex min-w-0 items-start gap-2 rounded-lg border border-destructive/50 bg-destructive/10 p-3",
1190
- children: [/* @__PURE__ */ f(se, {
1287
+ children: [/* @__PURE__ */ m(me, {
1191
1288
  "aria-hidden": "true",
1192
1289
  className: "mt-0.5 size-4 shrink-0 text-destructive"
1193
- }), /* @__PURE__ */ f("p", {
1290
+ }), /* @__PURE__ */ m("p", {
1194
1291
  className: "min-w-0 text-sm text-destructive",
1195
- children: K
1292
+ children: j
1196
1293
  })]
1197
1294
  }),
1198
- /* @__PURE__ */ f(Ke, {
1295
+ /* @__PURE__ */ m(qe, {
1199
1296
  appearance: "timeline",
1200
- steps: xe,
1297
+ steps: Re,
1201
1298
  activeStepId: n.activeStepId,
1202
- expandedStepIds: i,
1203
- defaultExpandedStepIds: l,
1204
- onExpandedStepIdsChange: a,
1205
- renderItems: g
1299
+ expandedStepIds: a,
1300
+ defaultExpandedStepIds: _e,
1301
+ onExpandedStepIdsChange: l,
1302
+ renderItems: y
1206
1303
  }, n.runId)
1207
1304
  ]
1208
1305
  }),
1209
- n.actions && n.actions.length > 0 && /* @__PURE__ */ f(D.Footer, {
1306
+ n.actions && n.actions.length > 0 && /* @__PURE__ */ m(L.Footer, {
1210
1307
  className: "flex flex-wrap gap-2",
1211
- children: n.actions.map((I) => /* @__PURE__ */ f(re, {
1308
+ children: n.actions.map((S) => /* @__PURE__ */ m(ie, {
1212
1309
  appearance: "outline",
1213
1310
  variant: "secondary",
1214
- disabled: I.disabled,
1215
- loading: I.loading,
1216
- "aria-label": de(I),
1311
+ disabled: S.disabled,
1312
+ loading: S.loading,
1313
+ "aria-label": ue(S),
1217
1314
  className: "min-w-0 w-full max-w-full min-[480px]:w-auto h-auto min-h-9 whitespace-normal break-words [overflow-wrap:anywhere] [&>span]:min-w-0",
1218
1315
  onClick: () => {
1219
- I.disabled || I.loading || d?.({
1316
+ S.disabled || S.loading || d?.({
1220
1317
  runId: n.runId,
1221
- actionId: I.id,
1222
- kind: I.kind
1318
+ actionId: S.id,
1319
+ kind: S.kind
1223
1320
  });
1224
1321
  },
1225
- children: de(I)
1226
- }, I.id))
1322
+ children: ue(S)
1323
+ }, S.id))
1227
1324
  })
1228
1325
  ]
1229
- }), K ? /* @__PURE__ */ f("div", {
1326
+ }), j ? /* @__PURE__ */ m("div", {
1230
1327
  role: "alert",
1231
1328
  "aria-live": "assertive",
1232
1329
  className: "sr-only left-0 top-0",
1233
- children: K
1234
- }) : /* @__PURE__ */ f("div", {
1330
+ children: j
1331
+ }) : /* @__PURE__ */ m("div", {
1235
1332
  role: "status",
1236
1333
  "aria-live": "polite",
1237
1334
  className: "sr-only left-0 top-0",
1238
- children: Ae
1335
+ children: Te
1239
1336
  })]
1240
1337
  });
1241
1338
  });
1242
- we.displayName = "AIToolRunPresentation";
1243
- var te = w.forwardRef((n, e) => {
1244
- const { run: t, headingLevel: r, open: o, defaultOpen: i, expandedStepIds: l, defaultExpandedStepIds: a, dangerouslySetInnerHTML: d, onOpenChange: s, onExpandedStepIdsChange: u, onAction: p, ...v } = n, $ = wt(t), y = At({
1339
+ Ae.displayName = "AIToolRunPresentation";
1340
+ var re = N.forwardRef((n, e) => {
1341
+ const { run: t, headingLevel: r, open: o, defaultOpen: a, expandedStepIds: i, defaultExpandedStepIds: l, dangerouslySetInnerHTML: d, onOpenChange: c, onExpandedStepIdsChange: u, onAction: g, ...$ } = n, b = Dt(t), I = Lt({
1245
1342
  headingLevel: r,
1246
1343
  open: o,
1247
- defaultOpen: i,
1248
- expandedStepIds: l,
1249
- defaultExpandedStepIds: a
1344
+ defaultOpen: a,
1345
+ expandedStepIds: i,
1346
+ defaultExpandedStepIds: l
1250
1347
  });
1251
- return !$.valid || !y.valid ? /* @__PURE__ */ f(be, {
1252
- ...v,
1348
+ return !b.valid || !I.valid ? /* @__PURE__ */ m(we, {
1349
+ ...$,
1253
1350
  ref: e
1254
- }) : /* @__PURE__ */ f(we, {
1255
- ...v,
1256
- ...y.value,
1257
- onOpenChange: s,
1351
+ }) : /* @__PURE__ */ m(Ae, {
1352
+ ...$,
1353
+ ...I.value,
1354
+ onOpenChange: c,
1258
1355
  onExpandedStepIdsChange: u,
1259
- onAction: p,
1356
+ onAction: g,
1260
1357
  ref: e,
1261
- run: $.value
1358
+ run: b.value
1262
1359
  });
1263
- }), kt = w.forwardRef((n, e) => /* @__PURE__ */ f(te, {
1360
+ }), Yt = N.forwardRef((n, e) => /* @__PURE__ */ m(re, {
1264
1361
  ...n,
1265
1362
  ref: e
1266
1363
  }));
1267
- te.displayName = "AIToolRunRuntimeBoundary";
1268
- kt.displayName = "AIToolRun";
1269
- var Q = {
1364
+ re.displayName = "AIToolRunRuntimeBoundary";
1365
+ Yt.displayName = "AIToolRun";
1366
+ var Z = {
1270
1367
  run: "json",
1271
1368
  headingLevel: "number",
1272
1369
  open: "boolean",
1273
1370
  defaultOpen: "boolean",
1274
1371
  expandedStepIds: "json",
1275
1372
  defaultExpandedStepIds: "json"
1276
- }, Et = Object.freeze({ invalidAIToolRunTransportValue: !0 }), Ne = class extends _e {
1373
+ }, Ft = Object.freeze({ invalidAIToolRunTransportValue: !0 }), Oe = class extends De {
1277
1374
  get propDefs() {
1278
- return Q;
1375
+ return Z;
1279
1376
  }
1280
1377
  static get observedAttributes() {
1281
- return Object.keys(Q).map(ne);
1378
+ return Object.keys(Z).map(oe);
1282
1379
  }
1283
1380
  _hasTransportValue(n) {
1284
- return Object.hasOwn(this._props, n) || this.hasAttribute(ne(n));
1381
+ return Object.hasOwn(this._props, n) || this.hasAttribute(oe(n));
1285
1382
  }
1286
1383
  _readTransportValue(n, e, t) {
1287
- return this._hasTransportValue(e) ? n[e] === void 0 ? Et : n[e] : t;
1384
+ return this._hasTransportValue(e) ? n[e] === void 0 ? Ft : n[e] : t;
1288
1385
  }
1289
1386
  _renderReact() {
1290
1387
  const n = this._readAllProps(), e = this._hasTransportValue("open"), t = this._hasTransportValue("expandedStepIds");
1291
- return Me.createElement(te, {
1388
+ return Be.createElement(re, {
1292
1389
  run: this._readTransportValue(n, "run"),
1293
1390
  headingLevel: this._readTransportValue(n, "headingLevel", 2),
1294
1391
  defaultOpen: this._readTransportValue(n, "defaultOpen", !0),
1295
1392
  defaultExpandedStepIds: this._readTransportValue(n, "defaultExpandedStepIds", []),
1296
1393
  ...e ? { open: this._readTransportValue(n, "open") } : {},
1297
1394
  ...t ? { expandedStepIds: this._readTransportValue(n, "expandedStepIds") } : {},
1298
- onAction: (r) => B(this, "action", r),
1299
- onOpenChange: (r) => B(this, "open-change", r),
1300
- onExpandedStepIdsChange: (r) => B(this, "expanded-step-ids-change", [...r])
1395
+ onAction: (r) => H(this, "action", r),
1396
+ onOpenChange: (r) => H(this, "open-change", r),
1397
+ onExpandedStepIdsChange: (r) => H(this, "expanded-step-ids-change", [...r])
1301
1398
  });
1302
1399
  }
1303
1400
  };
1304
- Re(Ne, Q);
1305
- Te("hf-ai-tool-run", Ne);
1401
+ Ee(Oe, Z);
1402
+ Ve("hf-ai-tool-run", Oe);
1306
1403
  export {
1307
- Ne as AIToolRunWC,
1308
- Ne as default
1404
+ Oe as AIToolRunWC,
1405
+ Oe as default
1309
1406
  };
1310
1407
 
1311
1408
  //# sourceMappingURL=hf-ai-tool-run.js.map