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