@tung-engineering/agent-platform-web-sdk 0.0.53 → 0.0.55
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/web-sdk.cjs +12 -12
- package/dist/web-sdk.cjs.map +1 -1
- package/dist/web-sdk.min.js +18 -18
- package/dist/web-sdk.min.js.map +1 -1
- package/dist/web-sdk.mjs +151 -150
- package/dist/web-sdk.mjs.map +1 -1
- package/package.json +1 -1
package/dist/web-sdk.mjs
CHANGED
|
@@ -2306,7 +2306,7 @@ const vd = {
|
|
|
2306
2306
|
major: 4,
|
|
2307
2307
|
minor: 3,
|
|
2308
2308
|
patch: 5
|
|
2309
|
-
},
|
|
2309
|
+
}, pe = /* @__PURE__ */ v("$ZodType", (e, t) => {
|
|
2310
2310
|
var o;
|
|
2311
2311
|
var n;
|
|
2312
2312
|
e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = vd;
|
|
@@ -2387,7 +2387,7 @@ const vd = {
|
|
|
2387
2387
|
}));
|
|
2388
2388
|
}), vi = /* @__PURE__ */ v("$ZodString", (e, t) => {
|
|
2389
2389
|
var n;
|
|
2390
|
-
|
|
2390
|
+
pe.init(e, t), e._zod.pattern = [...((n = e == null ? void 0 : e._zod.bag) == null ? void 0 : n.patterns) ?? []].pop() ?? nd(e._zod.bag), e._zod.parse = (r, o) => {
|
|
2391
2391
|
if (t.coerce)
|
|
2392
2392
|
try {
|
|
2393
2393
|
r.value = String(r.value);
|
|
@@ -2400,10 +2400,10 @@ const vd = {
|
|
|
2400
2400
|
inst: e
|
|
2401
2401
|
}), r;
|
|
2402
2402
|
};
|
|
2403
|
-
}),
|
|
2403
|
+
}), he = /* @__PURE__ */ v("$ZodStringFormat", (e, t) => {
|
|
2404
2404
|
zo.init(e, t), vi.init(e, t);
|
|
2405
2405
|
}), yd = /* @__PURE__ */ v("$ZodGUID", (e, t) => {
|
|
2406
|
-
t.pattern ?? (t.pattern = Fu),
|
|
2406
|
+
t.pattern ?? (t.pattern = Fu), he.init(e, t);
|
|
2407
2407
|
}), wd = /* @__PURE__ */ v("$ZodUUID", (e, t) => {
|
|
2408
2408
|
if (t.version) {
|
|
2409
2409
|
const r = {
|
|
@@ -2421,11 +2421,11 @@ const vd = {
|
|
|
2421
2421
|
t.pattern ?? (t.pattern = ps(r));
|
|
2422
2422
|
} else
|
|
2423
2423
|
t.pattern ?? (t.pattern = ps());
|
|
2424
|
-
|
|
2424
|
+
he.init(e, t);
|
|
2425
2425
|
}), xd = /* @__PURE__ */ v("$ZodEmail", (e, t) => {
|
|
2426
|
-
t.pattern ?? (t.pattern = Hu),
|
|
2426
|
+
t.pattern ?? (t.pattern = Hu), he.init(e, t);
|
|
2427
2427
|
}), Sd = /* @__PURE__ */ v("$ZodURL", (e, t) => {
|
|
2428
|
-
|
|
2428
|
+
he.init(e, t), e._zod.check = (n) => {
|
|
2429
2429
|
try {
|
|
2430
2430
|
const r = n.value.trim(), o = new URL(r);
|
|
2431
2431
|
t.hostname && (t.hostname.lastIndex = 0, t.hostname.test(o.hostname) || n.issues.push({
|
|
@@ -2457,31 +2457,31 @@ const vd = {
|
|
|
2457
2457
|
}
|
|
2458
2458
|
};
|
|
2459
2459
|
}), Td = /* @__PURE__ */ v("$ZodEmoji", (e, t) => {
|
|
2460
|
-
t.pattern ?? (t.pattern = Gu()),
|
|
2460
|
+
t.pattern ?? (t.pattern = Gu()), he.init(e, t);
|
|
2461
2461
|
}), Ed = /* @__PURE__ */ v("$ZodNanoID", (e, t) => {
|
|
2462
|
-
t.pattern ?? (t.pattern = Zu),
|
|
2462
|
+
t.pattern ?? (t.pattern = Zu), he.init(e, t);
|
|
2463
2463
|
}), Ad = /* @__PURE__ */ v("$ZodCUID", (e, t) => {
|
|
2464
|
-
t.pattern ?? (t.pattern = Ou),
|
|
2464
|
+
t.pattern ?? (t.pattern = Ou), he.init(e, t);
|
|
2465
2465
|
}), Cd = /* @__PURE__ */ v("$ZodCUID2", (e, t) => {
|
|
2466
|
-
t.pattern ?? (t.pattern = Du),
|
|
2466
|
+
t.pattern ?? (t.pattern = Du), he.init(e, t);
|
|
2467
2467
|
}), Pd = /* @__PURE__ */ v("$ZodULID", (e, t) => {
|
|
2468
|
-
t.pattern ?? (t.pattern = Mu),
|
|
2468
|
+
t.pattern ?? (t.pattern = Mu), he.init(e, t);
|
|
2469
2469
|
}), Rd = /* @__PURE__ */ v("$ZodXID", (e, t) => {
|
|
2470
|
-
t.pattern ?? (t.pattern = Uu),
|
|
2470
|
+
t.pattern ?? (t.pattern = Uu), he.init(e, t);
|
|
2471
2471
|
}), zd = /* @__PURE__ */ v("$ZodKSUID", (e, t) => {
|
|
2472
|
-
t.pattern ?? (t.pattern = ju),
|
|
2472
|
+
t.pattern ?? (t.pattern = ju), he.init(e, t);
|
|
2473
2473
|
}), Ld = /* @__PURE__ */ v("$ZodISODateTime", (e, t) => {
|
|
2474
|
-
t.pattern ?? (t.pattern = td(t)),
|
|
2474
|
+
t.pattern ?? (t.pattern = td(t)), he.init(e, t);
|
|
2475
2475
|
}), Id = /* @__PURE__ */ v("$ZodISODate", (e, t) => {
|
|
2476
|
-
t.pattern ?? (t.pattern = Qu),
|
|
2476
|
+
t.pattern ?? (t.pattern = Qu), he.init(e, t);
|
|
2477
2477
|
}), $d = /* @__PURE__ */ v("$ZodISOTime", (e, t) => {
|
|
2478
|
-
t.pattern ?? (t.pattern = ed(t)),
|
|
2478
|
+
t.pattern ?? (t.pattern = ed(t)), he.init(e, t);
|
|
2479
2479
|
}), Nd = /* @__PURE__ */ v("$ZodISODuration", (e, t) => {
|
|
2480
|
-
t.pattern ?? (t.pattern = qu),
|
|
2480
|
+
t.pattern ?? (t.pattern = qu), he.init(e, t);
|
|
2481
2481
|
}), Od = /* @__PURE__ */ v("$ZodIPv4", (e, t) => {
|
|
2482
|
-
t.pattern ?? (t.pattern = Wu),
|
|
2482
|
+
t.pattern ?? (t.pattern = Wu), he.init(e, t), e._zod.bag.format = "ipv4";
|
|
2483
2483
|
}), Dd = /* @__PURE__ */ v("$ZodIPv6", (e, t) => {
|
|
2484
|
-
t.pattern ?? (t.pattern = Ju),
|
|
2484
|
+
t.pattern ?? (t.pattern = Ju), he.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (n) => {
|
|
2485
2485
|
try {
|
|
2486
2486
|
new URL(`http://[${n.value}]`);
|
|
2487
2487
|
} catch {
|
|
@@ -2495,9 +2495,9 @@ const vd = {
|
|
|
2495
2495
|
}
|
|
2496
2496
|
};
|
|
2497
2497
|
}), Md = /* @__PURE__ */ v("$ZodCIDRv4", (e, t) => {
|
|
2498
|
-
t.pattern ?? (t.pattern = Xu),
|
|
2498
|
+
t.pattern ?? (t.pattern = Xu), he.init(e, t);
|
|
2499
2499
|
}), Ud = /* @__PURE__ */ v("$ZodCIDRv6", (e, t) => {
|
|
2500
|
-
t.pattern ?? (t.pattern = Vu),
|
|
2500
|
+
t.pattern ?? (t.pattern = Vu), he.init(e, t), e._zod.check = (n) => {
|
|
2501
2501
|
const r = n.value.split("/");
|
|
2502
2502
|
try {
|
|
2503
2503
|
if (r.length !== 2)
|
|
@@ -2534,7 +2534,7 @@ function Ea(e) {
|
|
|
2534
2534
|
}
|
|
2535
2535
|
}
|
|
2536
2536
|
const jd = /* @__PURE__ */ v("$ZodBase64", (e, t) => {
|
|
2537
|
-
t.pattern ?? (t.pattern = Yu),
|
|
2537
|
+
t.pattern ?? (t.pattern = Yu), he.init(e, t), e._zod.bag.contentEncoding = "base64", e._zod.check = (n) => {
|
|
2538
2538
|
Ea(n.value) || n.issues.push({
|
|
2539
2539
|
code: "invalid_format",
|
|
2540
2540
|
format: "base64",
|
|
@@ -2551,7 +2551,7 @@ function Zd(e) {
|
|
|
2551
2551
|
return Ea(n);
|
|
2552
2552
|
}
|
|
2553
2553
|
const qd = /* @__PURE__ */ v("$ZodBase64URL", (e, t) => {
|
|
2554
|
-
t.pattern ?? (t.pattern = _a),
|
|
2554
|
+
t.pattern ?? (t.pattern = _a), he.init(e, t), e._zod.bag.contentEncoding = "base64url", e._zod.check = (n) => {
|
|
2555
2555
|
Zd(n.value) || n.issues.push({
|
|
2556
2556
|
code: "invalid_format",
|
|
2557
2557
|
format: "base64url",
|
|
@@ -2561,7 +2561,7 @@ const qd = /* @__PURE__ */ v("$ZodBase64URL", (e, t) => {
|
|
|
2561
2561
|
});
|
|
2562
2562
|
};
|
|
2563
2563
|
}), Fd = /* @__PURE__ */ v("$ZodE164", (e, t) => {
|
|
2564
|
-
t.pattern ?? (t.pattern = Ku),
|
|
2564
|
+
t.pattern ?? (t.pattern = Ku), he.init(e, t);
|
|
2565
2565
|
});
|
|
2566
2566
|
function Hd(e, t = null) {
|
|
2567
2567
|
try {
|
|
@@ -2578,7 +2578,7 @@ function Hd(e, t = null) {
|
|
|
2578
2578
|
}
|
|
2579
2579
|
}
|
|
2580
2580
|
const Bd = /* @__PURE__ */ v("$ZodJWT", (e, t) => {
|
|
2581
|
-
|
|
2581
|
+
he.init(e, t), e._zod.check = (n) => {
|
|
2582
2582
|
Hd(n.value, t.alg) || n.issues.push({
|
|
2583
2583
|
code: "invalid_format",
|
|
2584
2584
|
format: "jwt",
|
|
@@ -2588,7 +2588,7 @@ const Bd = /* @__PURE__ */ v("$ZodJWT", (e, t) => {
|
|
|
2588
2588
|
});
|
|
2589
2589
|
};
|
|
2590
2590
|
}), Aa = /* @__PURE__ */ v("$ZodNumber", (e, t) => {
|
|
2591
|
-
|
|
2591
|
+
pe.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? wa, e._zod.parse = (n, r) => {
|
|
2592
2592
|
if (t.coerce)
|
|
2593
2593
|
try {
|
|
2594
2594
|
n.value = Number(n.value);
|
|
@@ -2609,7 +2609,7 @@ const Bd = /* @__PURE__ */ v("$ZodJWT", (e, t) => {
|
|
|
2609
2609
|
}), Gd = /* @__PURE__ */ v("$ZodNumberFormat", (e, t) => {
|
|
2610
2610
|
cd.init(e, t), Aa.init(e, t);
|
|
2611
2611
|
}), Wd = /* @__PURE__ */ v("$ZodBoolean", (e, t) => {
|
|
2612
|
-
|
|
2612
|
+
pe.init(e, t), e._zod.pattern = od, e._zod.parse = (n, r) => {
|
|
2613
2613
|
if (t.coerce)
|
|
2614
2614
|
try {
|
|
2615
2615
|
n.value = !!n.value;
|
|
@@ -2624,11 +2624,11 @@ const Bd = /* @__PURE__ */ v("$ZodJWT", (e, t) => {
|
|
|
2624
2624
|
}), n;
|
|
2625
2625
|
};
|
|
2626
2626
|
}), Jd = /* @__PURE__ */ v("$ZodAny", (e, t) => {
|
|
2627
|
-
|
|
2627
|
+
pe.init(e, t), e._zod.parse = (n) => n;
|
|
2628
2628
|
}), Xd = /* @__PURE__ */ v("$ZodUnknown", (e, t) => {
|
|
2629
|
-
|
|
2629
|
+
pe.init(e, t), e._zod.parse = (n) => n;
|
|
2630
2630
|
}), Vd = /* @__PURE__ */ v("$ZodNever", (e, t) => {
|
|
2631
|
-
|
|
2631
|
+
pe.init(e, t), e._zod.parse = (n, r) => (n.issues.push({
|
|
2632
2632
|
expected: "never",
|
|
2633
2633
|
code: "invalid_type",
|
|
2634
2634
|
input: n.value,
|
|
@@ -2639,7 +2639,7 @@ function hs(e, t, n) {
|
|
|
2639
2639
|
e.issues.length && t.issues.push(...Rn(n, e.issues)), t.value[n] = e.value;
|
|
2640
2640
|
}
|
|
2641
2641
|
const Yd = /* @__PURE__ */ v("$ZodArray", (e, t) => {
|
|
2642
|
-
|
|
2642
|
+
pe.init(e, t), e._zod.parse = (n, r) => {
|
|
2643
2643
|
const o = n.value;
|
|
2644
2644
|
if (!Array.isArray(o))
|
|
2645
2645
|
return n.issues.push({
|
|
@@ -2703,7 +2703,7 @@ function Pa(e, t, n, r, o, s) {
|
|
|
2703
2703
|
}), e.length ? Promise.all(e).then(() => n) : n;
|
|
2704
2704
|
}
|
|
2705
2705
|
const Kd = /* @__PURE__ */ v("$ZodObject", (e, t) => {
|
|
2706
|
-
|
|
2706
|
+
pe.init(e, t);
|
|
2707
2707
|
const n = Object.getOwnPropertyDescriptor(t, "shape");
|
|
2708
2708
|
if (!(n != null && n.get)) {
|
|
2709
2709
|
const u = t.shape;
|
|
@@ -2832,7 +2832,7 @@ function fs(e, t, n, r) {
|
|
|
2832
2832
|
}), t);
|
|
2833
2833
|
}
|
|
2834
2834
|
const Ra = /* @__PURE__ */ v("$ZodUnion", (e, t) => {
|
|
2835
|
-
|
|
2835
|
+
pe.init(e, t), K(e._zod, "optin", () => t.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0), K(e._zod, "optout", () => t.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0), K(e._zod, "values", () => {
|
|
2836
2836
|
if (t.options.every((o) => o._zod.values))
|
|
2837
2837
|
return new Set(t.options.flatMap((o) => Array.from(o._zod.values)));
|
|
2838
2838
|
}), K(e._zod, "pattern", () => {
|
|
@@ -2915,7 +2915,7 @@ const Ra = /* @__PURE__ */ v("$ZodUnion", (e, t) => {
|
|
|
2915
2915
|
}), o);
|
|
2916
2916
|
};
|
|
2917
2917
|
}), tp = /* @__PURE__ */ v("$ZodIntersection", (e, t) => {
|
|
2918
|
-
|
|
2918
|
+
pe.init(e, t), e._zod.parse = (n, r) => {
|
|
2919
2919
|
const o = n.value, s = t.left._zod.run({ value: o, issues: [] }, r), c = t.right._zod.run({ value: o, issues: [] }, r);
|
|
2920
2920
|
return s instanceof Promise || c instanceof Promise ? Promise.all([s, c]).then(([d, p]) => gs(n, d, p)) : gs(n, s, c);
|
|
2921
2921
|
};
|
|
@@ -2980,7 +2980,7 @@ function gs(e, t, n) {
|
|
|
2980
2980
|
return e.value = c.data, e;
|
|
2981
2981
|
}
|
|
2982
2982
|
const np = /* @__PURE__ */ v("$ZodRecord", (e, t) => {
|
|
2983
|
-
|
|
2983
|
+
pe.init(e, t), e._zod.parse = (n, r) => {
|
|
2984
2984
|
const o = n.value;
|
|
2985
2985
|
if (!Mn(o))
|
|
2986
2986
|
return n.issues.push({
|
|
@@ -3044,7 +3044,7 @@ const np = /* @__PURE__ */ v("$ZodRecord", (e, t) => {
|
|
|
3044
3044
|
return s.length ? Promise.all(s).then(() => n) : n;
|
|
3045
3045
|
};
|
|
3046
3046
|
}), rp = /* @__PURE__ */ v("$ZodEnum", (e, t) => {
|
|
3047
|
-
|
|
3047
|
+
pe.init(e, t);
|
|
3048
3048
|
const n = ha(t.entries), r = new Set(n);
|
|
3049
3049
|
e._zod.values = r, e._zod.pattern = new RegExp(`^(${n.filter((o) => fu.has(typeof o)).map((o) => typeof o == "string" ? Un(o) : o.toString()).join("|")})$`), e._zod.parse = (o, s) => {
|
|
3050
3050
|
const c = o.value;
|
|
@@ -3056,7 +3056,7 @@ const np = /* @__PURE__ */ v("$ZodRecord", (e, t) => {
|
|
|
3056
3056
|
}), o;
|
|
3057
3057
|
};
|
|
3058
3058
|
}), op = /* @__PURE__ */ v("$ZodLiteral", (e, t) => {
|
|
3059
|
-
if (
|
|
3059
|
+
if (pe.init(e, t), t.values.length === 0)
|
|
3060
3060
|
throw new Error("Cannot create literal schema with no valid values");
|
|
3061
3061
|
const n = new Set(t.values);
|
|
3062
3062
|
e._zod.values = n, e._zod.pattern = new RegExp(`^(${t.values.map((r) => typeof r == "string" ? Un(r) : r ? Un(r.toString()) : String(r)).join("|")})$`), e._zod.parse = (r, o) => {
|
|
@@ -3069,7 +3069,7 @@ const np = /* @__PURE__ */ v("$ZodRecord", (e, t) => {
|
|
|
3069
3069
|
}), r;
|
|
3070
3070
|
};
|
|
3071
3071
|
}), ip = /* @__PURE__ */ v("$ZodTransform", (e, t) => {
|
|
3072
|
-
|
|
3072
|
+
pe.init(e, t), e._zod.parse = (n, r) => {
|
|
3073
3073
|
if (r.direction === "backward")
|
|
3074
3074
|
throw new da(e.constructor.name);
|
|
3075
3075
|
const o = t.transform(n.value, n);
|
|
@@ -3084,7 +3084,7 @@ function ms(e, t) {
|
|
|
3084
3084
|
return e.issues.length && t === void 0 ? { issues: [], value: void 0 } : e;
|
|
3085
3085
|
}
|
|
3086
3086
|
const za = /* @__PURE__ */ v("$ZodOptional", (e, t) => {
|
|
3087
|
-
|
|
3087
|
+
pe.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", K(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), K(e._zod, "pattern", () => {
|
|
3088
3088
|
const n = t.innerType._zod.pattern;
|
|
3089
3089
|
return n ? new RegExp(`^(${mi(n.source)})?$`) : void 0;
|
|
3090
3090
|
}), e._zod.parse = (n, r) => {
|
|
@@ -3097,12 +3097,12 @@ const za = /* @__PURE__ */ v("$ZodOptional", (e, t) => {
|
|
|
3097
3097
|
}), sp = /* @__PURE__ */ v("$ZodExactOptional", (e, t) => {
|
|
3098
3098
|
za.init(e, t), K(e._zod, "values", () => t.innerType._zod.values), K(e._zod, "pattern", () => t.innerType._zod.pattern), e._zod.parse = (n, r) => t.innerType._zod.run(n, r);
|
|
3099
3099
|
}), ap = /* @__PURE__ */ v("$ZodNullable", (e, t) => {
|
|
3100
|
-
|
|
3100
|
+
pe.init(e, t), K(e._zod, "optin", () => t.innerType._zod.optin), K(e._zod, "optout", () => t.innerType._zod.optout), K(e._zod, "pattern", () => {
|
|
3101
3101
|
const n = t.innerType._zod.pattern;
|
|
3102
3102
|
return n ? new RegExp(`^(${mi(n.source)}|null)$`) : void 0;
|
|
3103
3103
|
}), K(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, null]) : void 0), e._zod.parse = (n, r) => n.value === null ? n : t.innerType._zod.run(n, r);
|
|
3104
3104
|
}), cp = /* @__PURE__ */ v("$ZodDefault", (e, t) => {
|
|
3105
|
-
|
|
3105
|
+
pe.init(e, t), e._zod.optin = "optional", K(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
|
|
3106
3106
|
if (r.direction === "backward")
|
|
3107
3107
|
return t.innerType._zod.run(n, r);
|
|
3108
3108
|
if (n.value === void 0)
|
|
@@ -3115,9 +3115,9 @@ function bs(e, t) {
|
|
|
3115
3115
|
return e.value === void 0 && (e.value = t.defaultValue), e;
|
|
3116
3116
|
}
|
|
3117
3117
|
const lp = /* @__PURE__ */ v("$ZodPrefault", (e, t) => {
|
|
3118
|
-
|
|
3118
|
+
pe.init(e, t), e._zod.optin = "optional", K(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => (r.direction === "backward" || n.value === void 0 && (n.value = t.defaultValue), t.innerType._zod.run(n, r));
|
|
3119
3119
|
}), up = /* @__PURE__ */ v("$ZodNonOptional", (e, t) => {
|
|
3120
|
-
|
|
3120
|
+
pe.init(e, t), K(e._zod, "values", () => {
|
|
3121
3121
|
const n = t.innerType._zod.values;
|
|
3122
3122
|
return n ? new Set([...n].filter((r) => r !== void 0)) : void 0;
|
|
3123
3123
|
}), e._zod.parse = (n, r) => {
|
|
@@ -3134,7 +3134,7 @@ function ks(e, t) {
|
|
|
3134
3134
|
}), e;
|
|
3135
3135
|
}
|
|
3136
3136
|
const dp = /* @__PURE__ */ v("$ZodCatch", (e, t) => {
|
|
3137
|
-
|
|
3137
|
+
pe.init(e, t), K(e._zod, "optin", () => t.innerType._zod.optin), K(e._zod, "optout", () => t.innerType._zod.optout), K(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
|
|
3138
3138
|
if (r.direction === "backward")
|
|
3139
3139
|
return t.innerType._zod.run(n, r);
|
|
3140
3140
|
const o = t.innerType._zod.run(n, r);
|
|
@@ -3153,7 +3153,7 @@ const dp = /* @__PURE__ */ v("$ZodCatch", (e, t) => {
|
|
|
3153
3153
|
}), n.issues = []), n);
|
|
3154
3154
|
};
|
|
3155
3155
|
}), pp = /* @__PURE__ */ v("$ZodPipe", (e, t) => {
|
|
3156
|
-
|
|
3156
|
+
pe.init(e, t), K(e._zod, "values", () => t.in._zod.values), K(e._zod, "optin", () => t.in._zod.optin), K(e._zod, "optout", () => t.out._zod.optout), K(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (n, r) => {
|
|
3157
3157
|
if (r.direction === "backward") {
|
|
3158
3158
|
const s = t.out._zod.run(n, r);
|
|
3159
3159
|
return s instanceof Promise ? s.then((c) => Jr(c, t.in, r)) : Jr(s, t.in, r);
|
|
@@ -3166,7 +3166,7 @@ function Jr(e, t, n) {
|
|
|
3166
3166
|
return e.issues.length ? (e.aborted = !0, e) : t._zod.run({ value: e.value, issues: e.issues }, n);
|
|
3167
3167
|
}
|
|
3168
3168
|
const hp = /* @__PURE__ */ v("$ZodReadonly", (e, t) => {
|
|
3169
|
-
|
|
3169
|
+
pe.init(e, t), K(e._zod, "propValues", () => t.innerType._zod.propValues), K(e._zod, "values", () => t.innerType._zod.values), K(e._zod, "optin", () => {
|
|
3170
3170
|
var n, r;
|
|
3171
3171
|
return (r = (n = t.innerType) == null ? void 0 : n._zod) == null ? void 0 : r.optin;
|
|
3172
3172
|
}), K(e._zod, "optout", () => {
|
|
@@ -3183,7 +3183,7 @@ function _s(e) {
|
|
|
3183
3183
|
return e.value = Object.freeze(e.value), e;
|
|
3184
3184
|
}
|
|
3185
3185
|
const fp = /* @__PURE__ */ v("$ZodCustom", (e, t) => {
|
|
3186
|
-
Ke.init(e, t),
|
|
3186
|
+
Ke.init(e, t), pe.init(e, t), e._zod.parse = (n, r) => n, e._zod.check = (n) => {
|
|
3187
3187
|
const r = n.value, o = t.fn(r);
|
|
3188
3188
|
if (o instanceof Promise)
|
|
3189
3189
|
return o.then((s) => vs(s, n, r, e));
|
|
@@ -4197,7 +4197,7 @@ const qh = (e, t) => {
|
|
|
4197
4197
|
});
|
|
4198
4198
|
}, at = v("ZodError", qh, {
|
|
4199
4199
|
Parent: Error
|
|
4200
|
-
}), Fh = /* @__PURE__ */ ki(at), Hh = /* @__PURE__ */ _i(at), Bh = /* @__PURE__ */ Po(at), Gh = /* @__PURE__ */ Ro(at), Wh = /* @__PURE__ */ Cu(at), Jh = /* @__PURE__ */ Pu(at), Xh = /* @__PURE__ */ Ru(at), Vh = /* @__PURE__ */ zu(at), Yh = /* @__PURE__ */ Lu(at), Kh = /* @__PURE__ */ Iu(at), Qh = /* @__PURE__ */ $u(at), ef = /* @__PURE__ */ Nu(at),
|
|
4200
|
+
}), Fh = /* @__PURE__ */ ki(at), Hh = /* @__PURE__ */ _i(at), Bh = /* @__PURE__ */ Po(at), Gh = /* @__PURE__ */ Ro(at), Wh = /* @__PURE__ */ Cu(at), Jh = /* @__PURE__ */ Pu(at), Xh = /* @__PURE__ */ Ru(at), Vh = /* @__PURE__ */ zu(at), Yh = /* @__PURE__ */ Lu(at), Kh = /* @__PURE__ */ Iu(at), Qh = /* @__PURE__ */ $u(at), ef = /* @__PURE__ */ Nu(at), fe = /* @__PURE__ */ v("ZodType", (e, t) => (pe.init(e, t), Object.assign(e["~standard"], {
|
|
4201
4201
|
jsonSchema: {
|
|
4202
4202
|
input: mo(e, "input"),
|
|
4203
4203
|
output: mo(e, "output")
|
|
@@ -4224,7 +4224,7 @@ const qh = (e, t) => {
|
|
|
4224
4224
|
const r = e.clone();
|
|
4225
4225
|
return pr.add(r, n[0]), r;
|
|
4226
4226
|
}, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e.apply = (n) => n(e), e)), Ma = /* @__PURE__ */ v("_ZodString", (e, t) => {
|
|
4227
|
-
vi.init(e, t),
|
|
4227
|
+
vi.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (r, o, s) => ph(e, r, o);
|
|
4228
4228
|
const n = e._zod.bag;
|
|
4229
4229
|
e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...r) => e.check(/* @__PURE__ */ Xp(...r)), e.includes = (...r) => e.check(/* @__PURE__ */ Kp(...r)), e.startsWith = (...r) => e.check(/* @__PURE__ */ Qp(...r)), e.endsWith = (...r) => e.check(/* @__PURE__ */ eh(...r)), e.min = (...r) => e.check(/* @__PURE__ */ go(...r)), e.max = (...r) => e.check(/* @__PURE__ */ La(...r)), e.length = (...r) => e.check(/* @__PURE__ */ Ia(...r)), e.nonempty = (...r) => e.check(/* @__PURE__ */ go(1, ...r)), e.lowercase = (r) => e.check(/* @__PURE__ */ Vp(r)), e.uppercase = (r) => e.check(/* @__PURE__ */ Yp(r)), e.trim = () => e.check(/* @__PURE__ */ nh()), e.normalize = (...r) => e.check(/* @__PURE__ */ th(...r)), e.toLowerCase = () => e.check(/* @__PURE__ */ rh()), e.toUpperCase = () => e.check(/* @__PURE__ */ oh()), e.slugify = () => e.check(/* @__PURE__ */ ih());
|
|
4230
4230
|
}), tf = /* @__PURE__ */ v("ZodString", (e, t) => {
|
|
@@ -4234,7 +4234,7 @@ function A(e) {
|
|
|
4234
4234
|
return /* @__PURE__ */ bp(tf, e);
|
|
4235
4235
|
}
|
|
4236
4236
|
const be = /* @__PURE__ */ v("ZodStringFormat", (e, t) => {
|
|
4237
|
-
|
|
4237
|
+
he.init(e, t), Ma.init(e, t);
|
|
4238
4238
|
}), nf = /* @__PURE__ */ v("ZodEmail", (e, t) => {
|
|
4239
4239
|
xd.init(e, t), be.init(e, t);
|
|
4240
4240
|
}), Es = /* @__PURE__ */ v("ZodGUID", (e, t) => {
|
|
@@ -4274,7 +4274,7 @@ const be = /* @__PURE__ */ v("ZodStringFormat", (e, t) => {
|
|
|
4274
4274
|
}), _f = /* @__PURE__ */ v("ZodJWT", (e, t) => {
|
|
4275
4275
|
Bd.init(e, t), be.init(e, t);
|
|
4276
4276
|
}), Ua = /* @__PURE__ */ v("ZodNumber", (e, t) => {
|
|
4277
|
-
Aa.init(e, t),
|
|
4277
|
+
Aa.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (r, o, s) => hh(e, r, o), e.gt = (r, o) => e.check(/* @__PURE__ */ Ss(r, o)), e.gte = (r, o) => e.check(/* @__PURE__ */ Bo(r, o)), e.min = (r, o) => e.check(/* @__PURE__ */ Bo(r, o)), e.lt = (r, o) => e.check(/* @__PURE__ */ xs(r, o)), e.lte = (r, o) => e.check(/* @__PURE__ */ Ho(r, o)), e.max = (r, o) => e.check(/* @__PURE__ */ Ho(r, o)), e.int = (r) => e.check(As(r)), e.safe = (r) => e.check(As(r)), e.positive = (r) => e.check(/* @__PURE__ */ Ss(0, r)), e.nonnegative = (r) => e.check(/* @__PURE__ */ Bo(0, r)), e.negative = (r) => e.check(/* @__PURE__ */ xs(0, r)), e.nonpositive = (r) => e.check(/* @__PURE__ */ Ho(0, r)), e.multipleOf = (r, o) => e.check(/* @__PURE__ */ Ts(r, o)), e.step = (r, o) => e.check(/* @__PURE__ */ Ts(r, o)), e.finite = () => e;
|
|
4278
4278
|
const n = e._zod.bag;
|
|
4279
4279
|
e.minValue = Math.max(n.minimum ?? Number.NEGATIVE_INFINITY, n.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null, e.maxValue = Math.min(n.maximum ?? Number.POSITIVE_INFINITY, n.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null, e.isInt = (n.format ?? "").includes("int") || Number.isSafeInteger(n.multipleOf ?? 0.5), e.isFinite = !0, e.format = n.format ?? null;
|
|
4280
4280
|
});
|
|
@@ -4288,37 +4288,37 @@ function As(e) {
|
|
|
4288
4288
|
return /* @__PURE__ */ Hp(vf, e);
|
|
4289
4289
|
}
|
|
4290
4290
|
const yf = /* @__PURE__ */ v("ZodBoolean", (e, t) => {
|
|
4291
|
-
Wd.init(e, t),
|
|
4291
|
+
Wd.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (n, r, o) => fh(e, n, r);
|
|
4292
4292
|
});
|
|
4293
|
-
function
|
|
4293
|
+
function ue(e) {
|
|
4294
4294
|
return /* @__PURE__ */ Bp(yf, e);
|
|
4295
4295
|
}
|
|
4296
4296
|
const wf = /* @__PURE__ */ v("ZodAny", (e, t) => {
|
|
4297
|
-
Jd.init(e, t),
|
|
4297
|
+
Jd.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (n, r, o) => mh();
|
|
4298
4298
|
});
|
|
4299
4299
|
function ja() {
|
|
4300
4300
|
return /* @__PURE__ */ Gp(wf);
|
|
4301
4301
|
}
|
|
4302
4302
|
const xf = /* @__PURE__ */ v("ZodUnknown", (e, t) => {
|
|
4303
|
-
Xd.init(e, t),
|
|
4303
|
+
Xd.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (n, r, o) => bh();
|
|
4304
4304
|
});
|
|
4305
4305
|
function Cs() {
|
|
4306
4306
|
return /* @__PURE__ */ Wp(xf);
|
|
4307
4307
|
}
|
|
4308
4308
|
const Sf = /* @__PURE__ */ v("ZodNever", (e, t) => {
|
|
4309
|
-
Vd.init(e, t),
|
|
4309
|
+
Vd.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (n, r, o) => gh(e, n, r);
|
|
4310
4310
|
});
|
|
4311
4311
|
function Tf(e) {
|
|
4312
4312
|
return /* @__PURE__ */ Jp(Sf, e);
|
|
4313
4313
|
}
|
|
4314
4314
|
const Ef = /* @__PURE__ */ v("ZodArray", (e, t) => {
|
|
4315
|
-
Yd.init(e, t),
|
|
4315
|
+
Yd.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (n, r, o) => wh(e, n, r, o), e.element = t.element, e.min = (n, r) => e.check(/* @__PURE__ */ go(n, r)), e.nonempty = (n) => e.check(/* @__PURE__ */ go(1, n)), e.max = (n, r) => e.check(/* @__PURE__ */ La(n, r)), e.length = (n, r) => e.check(/* @__PURE__ */ Ia(n, r)), e.unwrap = () => e.element;
|
|
4316
4316
|
});
|
|
4317
4317
|
function yt(e, t) {
|
|
4318
4318
|
return /* @__PURE__ */ sh(Ef, e, t);
|
|
4319
4319
|
}
|
|
4320
4320
|
const Af = /* @__PURE__ */ v("ZodObject", (e, t) => {
|
|
4321
|
-
Qd.init(e, t),
|
|
4321
|
+
Qd.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (n, r, o) => xh(e, n, r, o), K(e, "shape", () => t.shape), e.keyof = () => rt(Object.keys(e._zod.def.shape)), e.catchall = (n) => e.clone({ ...e._zod.def, catchall: n }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: Cs() }), e.loose = () => e.clone({ ...e._zod.def, catchall: Cs() }), e.strict = () => e.clone({ ...e._zod.def, catchall: Tf() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (n) => _u(e, n), e.safeExtend = (n) => vu(e, n), e.merge = (n) => yu(e, n), e.pick = (n) => bu(e, n), e.omit = (n) => ku(e, n), e.partial = (...n) => wu(Fa, e, n[0]), e.required = (...n) => xu(Ha, e, n[0]);
|
|
4322
4322
|
});
|
|
4323
4323
|
function le(e, t) {
|
|
4324
4324
|
const n = {
|
|
@@ -4329,7 +4329,7 @@ function le(e, t) {
|
|
|
4329
4329
|
return new Af(n);
|
|
4330
4330
|
}
|
|
4331
4331
|
const Za = /* @__PURE__ */ v("ZodUnion", (e, t) => {
|
|
4332
|
-
Ra.init(e, t),
|
|
4332
|
+
Ra.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (n, r, o) => Sh(e, n, r, o), e.options = t.options;
|
|
4333
4333
|
});
|
|
4334
4334
|
function Cf(e, t) {
|
|
4335
4335
|
return new Za({
|
|
@@ -4350,7 +4350,7 @@ function qa(e, t, n) {
|
|
|
4350
4350
|
});
|
|
4351
4351
|
}
|
|
4352
4352
|
const Rf = /* @__PURE__ */ v("ZodIntersection", (e, t) => {
|
|
4353
|
-
tp.init(e, t),
|
|
4353
|
+
tp.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (n, r, o) => Th(e, n, r, o);
|
|
4354
4354
|
});
|
|
4355
4355
|
function zf(e, t) {
|
|
4356
4356
|
return new Rf({
|
|
@@ -4360,7 +4360,7 @@ function zf(e, t) {
|
|
|
4360
4360
|
});
|
|
4361
4361
|
}
|
|
4362
4362
|
const Lf = /* @__PURE__ */ v("ZodRecord", (e, t) => {
|
|
4363
|
-
np.init(e, t),
|
|
4363
|
+
np.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (n, r, o) => Eh(e, n, r, o), e.keyType = t.keyType, e.valueType = t.valueType;
|
|
4364
4364
|
});
|
|
4365
4365
|
function wt(e, t, n) {
|
|
4366
4366
|
return new Lf({
|
|
@@ -4371,7 +4371,7 @@ function wt(e, t, n) {
|
|
|
4371
4371
|
});
|
|
4372
4372
|
}
|
|
4373
4373
|
const oi = /* @__PURE__ */ v("ZodEnum", (e, t) => {
|
|
4374
|
-
rp.init(e, t),
|
|
4374
|
+
rp.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (r, o, s) => kh(e, r, o), e.enum = t.entries, e.options = Object.values(t.entries);
|
|
4375
4375
|
const n = new Set(Object.keys(t.entries));
|
|
4376
4376
|
e.extract = (r, o) => {
|
|
4377
4377
|
const s = {};
|
|
@@ -4410,7 +4410,7 @@ function rt(e, t) {
|
|
|
4410
4410
|
});
|
|
4411
4411
|
}
|
|
4412
4412
|
const If = /* @__PURE__ */ v("ZodLiteral", (e, t) => {
|
|
4413
|
-
op.init(e, t),
|
|
4413
|
+
op.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (n, r, o) => _h(e, n, r), e.values = new Set(t.values), Object.defineProperty(e, "value", {
|
|
4414
4414
|
get() {
|
|
4415
4415
|
if (t.values.length > 1)
|
|
4416
4416
|
throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");
|
|
@@ -4426,7 +4426,7 @@ function nt(e, t) {
|
|
|
4426
4426
|
});
|
|
4427
4427
|
}
|
|
4428
4428
|
const $f = /* @__PURE__ */ v("ZodTransform", (e, t) => {
|
|
4429
|
-
ip.init(e, t),
|
|
4429
|
+
ip.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (n, r, o) => yh(e, n), e._zod.parse = (n, r) => {
|
|
4430
4430
|
if (r.direction === "backward")
|
|
4431
4431
|
throw new da(e.constructor.name);
|
|
4432
4432
|
n.addIssue = (s) => {
|
|
@@ -4448,7 +4448,7 @@ function Nf(e) {
|
|
|
4448
4448
|
});
|
|
4449
4449
|
}
|
|
4450
4450
|
const Fa = /* @__PURE__ */ v("ZodOptional", (e, t) => {
|
|
4451
|
-
za.init(e, t),
|
|
4451
|
+
za.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (n, r, o) => Da(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
4452
4452
|
});
|
|
4453
4453
|
function Ps(e) {
|
|
4454
4454
|
return new Fa({
|
|
@@ -4457,7 +4457,7 @@ function Ps(e) {
|
|
|
4457
4457
|
});
|
|
4458
4458
|
}
|
|
4459
4459
|
const Of = /* @__PURE__ */ v("ZodExactOptional", (e, t) => {
|
|
4460
|
-
sp.init(e, t),
|
|
4460
|
+
sp.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (n, r, o) => Da(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
4461
4461
|
});
|
|
4462
4462
|
function Df(e) {
|
|
4463
4463
|
return new Of({
|
|
@@ -4466,7 +4466,7 @@ function Df(e) {
|
|
|
4466
4466
|
});
|
|
4467
4467
|
}
|
|
4468
4468
|
const Mf = /* @__PURE__ */ v("ZodNullable", (e, t) => {
|
|
4469
|
-
ap.init(e, t),
|
|
4469
|
+
ap.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (n, r, o) => Ah(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
4470
4470
|
});
|
|
4471
4471
|
function Rs(e) {
|
|
4472
4472
|
return new Mf({
|
|
@@ -4475,7 +4475,7 @@ function Rs(e) {
|
|
|
4475
4475
|
});
|
|
4476
4476
|
}
|
|
4477
4477
|
const Uf = /* @__PURE__ */ v("ZodDefault", (e, t) => {
|
|
4478
|
-
cp.init(e, t),
|
|
4478
|
+
cp.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (n, r, o) => Ph(e, n, r, o), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
|
|
4479
4479
|
});
|
|
4480
4480
|
function jf(e, t) {
|
|
4481
4481
|
return new Uf({
|
|
@@ -4487,7 +4487,7 @@ function jf(e, t) {
|
|
|
4487
4487
|
});
|
|
4488
4488
|
}
|
|
4489
4489
|
const Zf = /* @__PURE__ */ v("ZodPrefault", (e, t) => {
|
|
4490
|
-
lp.init(e, t),
|
|
4490
|
+
lp.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (n, r, o) => Rh(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
4491
4491
|
});
|
|
4492
4492
|
function qf(e, t) {
|
|
4493
4493
|
return new Zf({
|
|
@@ -4499,7 +4499,7 @@ function qf(e, t) {
|
|
|
4499
4499
|
});
|
|
4500
4500
|
}
|
|
4501
4501
|
const Ha = /* @__PURE__ */ v("ZodNonOptional", (e, t) => {
|
|
4502
|
-
up.init(e, t),
|
|
4502
|
+
up.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (n, r, o) => Ch(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
4503
4503
|
});
|
|
4504
4504
|
function Ff(e, t) {
|
|
4505
4505
|
return new Ha({
|
|
@@ -4509,7 +4509,7 @@ function Ff(e, t) {
|
|
|
4509
4509
|
});
|
|
4510
4510
|
}
|
|
4511
4511
|
const Hf = /* @__PURE__ */ v("ZodCatch", (e, t) => {
|
|
4512
|
-
dp.init(e, t),
|
|
4512
|
+
dp.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (n, r, o) => zh(e, n, r, o), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
|
|
4513
4513
|
});
|
|
4514
4514
|
function Bf(e, t) {
|
|
4515
4515
|
return new Hf({
|
|
@@ -4519,7 +4519,7 @@ function Bf(e, t) {
|
|
|
4519
4519
|
});
|
|
4520
4520
|
}
|
|
4521
4521
|
const Gf = /* @__PURE__ */ v("ZodPipe", (e, t) => {
|
|
4522
|
-
pp.init(e, t),
|
|
4522
|
+
pp.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (n, r, o) => Lh(e, n, r, o), e.in = t.in, e.out = t.out;
|
|
4523
4523
|
});
|
|
4524
4524
|
function zs(e, t) {
|
|
4525
4525
|
return new Gf({
|
|
@@ -4530,7 +4530,7 @@ function zs(e, t) {
|
|
|
4530
4530
|
});
|
|
4531
4531
|
}
|
|
4532
4532
|
const Wf = /* @__PURE__ */ v("ZodReadonly", (e, t) => {
|
|
4533
|
-
hp.init(e, t),
|
|
4533
|
+
hp.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (n, r, o) => Ih(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
4534
4534
|
});
|
|
4535
4535
|
function Jf(e) {
|
|
4536
4536
|
return new Wf({
|
|
@@ -4539,7 +4539,7 @@ function Jf(e) {
|
|
|
4539
4539
|
});
|
|
4540
4540
|
}
|
|
4541
4541
|
const Xf = /* @__PURE__ */ v("ZodCustom", (e, t) => {
|
|
4542
|
-
fp.init(e, t),
|
|
4542
|
+
fp.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (n, r, o) => vh(e, n);
|
|
4543
4543
|
});
|
|
4544
4544
|
function Vf(e, t = {}) {
|
|
4545
4545
|
return /* @__PURE__ */ ah(Xf, e, t);
|
|
@@ -4551,22 +4551,22 @@ const Kf = le({
|
|
|
4551
4551
|
name: A().min(1).max(100).optional(),
|
|
4552
4552
|
command: A().min(1).max(500),
|
|
4553
4553
|
args: yt(A()).optional(),
|
|
4554
|
-
failOnError:
|
|
4554
|
+
failOnError: ue().default(!0).optional(),
|
|
4555
4555
|
timeout: xt().int().min(1e3).max(3e5).default(3e4).optional(),
|
|
4556
4556
|
workingDirectory: A().optional(),
|
|
4557
4557
|
env: wt(A(), A()).optional(),
|
|
4558
|
-
runOnBackground:
|
|
4558
|
+
runOnBackground: ue().optional()
|
|
4559
4559
|
});
|
|
4560
4560
|
le({
|
|
4561
4561
|
name: A(),
|
|
4562
4562
|
command: A(),
|
|
4563
|
-
success:
|
|
4563
|
+
success: ue(),
|
|
4564
4564
|
exitCode: xt().optional(),
|
|
4565
4565
|
stdout: A().optional(),
|
|
4566
4566
|
stderr: A().optional(),
|
|
4567
4567
|
error: A().optional(),
|
|
4568
4568
|
duration: xt(),
|
|
4569
|
-
failOnError:
|
|
4569
|
+
failOnError: ue()
|
|
4570
4570
|
});
|
|
4571
4571
|
const rn = le({
|
|
4572
4572
|
path: A(),
|
|
@@ -4591,17 +4591,17 @@ const rn = le({
|
|
|
4591
4591
|
operation: nt("modify"),
|
|
4592
4592
|
content: A().optional(),
|
|
4593
4593
|
contentPath: A().optional(),
|
|
4594
|
-
createIfMissing:
|
|
4594
|
+
createIfMissing: ue().optional()
|
|
4595
4595
|
}),
|
|
4596
4596
|
rn.extend({
|
|
4597
4597
|
operation: nt("delete"),
|
|
4598
|
-
ignoreIfMissing:
|
|
4598
|
+
ignoreIfMissing: ue().optional()
|
|
4599
4599
|
}),
|
|
4600
4600
|
rn.extend({
|
|
4601
4601
|
operation: nt("createDirectory"),
|
|
4602
4602
|
contentPath: A().optional(),
|
|
4603
4603
|
mode: xt().optional(),
|
|
4604
|
-
ignoreIfExists:
|
|
4604
|
+
ignoreIfExists: ue().optional()
|
|
4605
4605
|
}),
|
|
4606
4606
|
rn.extend({
|
|
4607
4607
|
operation: nt("download"),
|
|
@@ -4647,26 +4647,26 @@ le({
|
|
|
4647
4647
|
model: A(),
|
|
4648
4648
|
permissionMode: rt(["plan", "acceptEdits", "bypassPermissions", "ask"]),
|
|
4649
4649
|
settingSources: yt(A()),
|
|
4650
|
-
allowDangerouslySkipPermissions:
|
|
4651
|
-
persistSession:
|
|
4652
|
-
streamSdkEvents:
|
|
4650
|
+
allowDangerouslySkipPermissions: ue(),
|
|
4651
|
+
persistSession: ue(),
|
|
4652
|
+
streamSdkEvents: ue().optional(),
|
|
4653
4653
|
allowedTools: yt(A()).optional(),
|
|
4654
|
-
settings: le({ enabledPlugins: wt(A(),
|
|
4654
|
+
settings: le({ enabledPlugins: wt(A(), ue()) }),
|
|
4655
4655
|
env: wt(A(), A()).optional()
|
|
4656
4656
|
}),
|
|
4657
|
-
resume: le({ sessionId: A().optional(), continue:
|
|
4657
|
+
resume: le({ sessionId: A().optional(), continue: ue() }).optional()
|
|
4658
4658
|
}),
|
|
4659
4659
|
le({
|
|
4660
4660
|
executionMode: nt("opencodeSdk"),
|
|
4661
4661
|
promptText: A(),
|
|
4662
4662
|
sdkOptions: le({ provider: A(), model: A(), env: wt(A(), A()).optional() }),
|
|
4663
|
-
resume: le({ sessionId: A().optional(), continue:
|
|
4663
|
+
resume: le({ sessionId: A().optional(), continue: ue() }).optional()
|
|
4664
4664
|
}),
|
|
4665
4665
|
le({
|
|
4666
4666
|
executionMode: nt("openaiAgentSdk"),
|
|
4667
4667
|
promptText: A(),
|
|
4668
4668
|
sdkOptions: le({ model: A(), env: wt(A(), A()).optional() }),
|
|
4669
|
-
resume: le({ sessionId: A().optional(), continue:
|
|
4669
|
+
resume: le({ sessionId: A().optional(), continue: ue() }).optional()
|
|
4670
4670
|
}),
|
|
4671
4671
|
le({
|
|
4672
4672
|
executionMode: nt("codexSdk"),
|
|
@@ -4677,20 +4677,20 @@ le({
|
|
|
4677
4677
|
approvalPolicy: rt(["never", "on-request", "on-failure", "untrusted"]).optional(),
|
|
4678
4678
|
env: wt(A(), A()).optional()
|
|
4679
4679
|
}),
|
|
4680
|
-
resume: le({ sessionId: A().optional(), continue:
|
|
4680
|
+
resume: le({ sessionId: A().optional(), continue: ue() }).optional()
|
|
4681
4681
|
}),
|
|
4682
4682
|
le({
|
|
4683
4683
|
executionMode: nt("cursorSdk"),
|
|
4684
4684
|
promptText: A(),
|
|
4685
4685
|
sdkOptions: le({ model: A(), env: wt(A(), A()).optional() }),
|
|
4686
|
-
resume: le({ sessionId: A().optional(), continue:
|
|
4686
|
+
resume: le({ sessionId: A().optional(), continue: ue() }).optional()
|
|
4687
4687
|
})
|
|
4688
4688
|
]).optional().describe("Backend-built prompt + resolved SDK options for this phase"),
|
|
4689
|
-
planEnabled:
|
|
4689
|
+
planEnabled: ue().optional().default(!1).describe("Enable planning phase (computed at runtime for agent)"),
|
|
4690
4690
|
planContent: A().optional().describe("Final approved plan content"),
|
|
4691
|
-
planApproved:
|
|
4691
|
+
planApproved: ue().optional().describe("Plan approval status"),
|
|
4692
4692
|
planApprovedAt: A().optional().describe("ISO timestamp of approval"),
|
|
4693
|
-
planRejected:
|
|
4693
|
+
planRejected: ue().optional().describe("Plan rejection flag"),
|
|
4694
4694
|
planRejectionFeedback: A().optional().describe("User rejection feedback"),
|
|
4695
4695
|
rejectedPlanContent: A().optional().describe("Previously rejected plan content"),
|
|
4696
4696
|
planCompletedAt: A().optional().describe("ISO timestamp when plan was generated"),
|
|
@@ -4702,9 +4702,9 @@ le({
|
|
|
4702
4702
|
notificationChannelPlanMessageSentAt: A().optional(),
|
|
4703
4703
|
notificationChannelCompletedMessageId: xt().optional(),
|
|
4704
4704
|
notificationChannelFailedMessageId: xt().optional(),
|
|
4705
|
-
streamSdkEvents:
|
|
4705
|
+
streamSdkEvents: ue().optional().describe("Stream SDK messages (thinking, tool calls, etc.) as sdk_event chunks"),
|
|
4706
4706
|
originalTaskSummary: A().optional().describe("Summary from the original task run (passed to retry for historical context)"),
|
|
4707
|
-
planWasApproved:
|
|
4707
|
+
planWasApproved: ue().optional().describe("True when planApproved was cleared for rePlan=true retry — indicates the plan had been approved before"),
|
|
4708
4708
|
planComments: yt(le({
|
|
4709
4709
|
id: A(),
|
|
4710
4710
|
selectedText: A(),
|
|
@@ -4713,9 +4713,10 @@ le({
|
|
|
4713
4713
|
commentText: A(),
|
|
4714
4714
|
createdAt: A()
|
|
4715
4715
|
})).optional().describe("Inline review comments attached to the plan"),
|
|
4716
|
-
hasAiConfigSecrets:
|
|
4717
|
-
hasCredentials:
|
|
4718
|
-
mcpServersMode: rt(["all", "agentPlatformOnly"]).optional().describe("MCP server strategy for this run; 'agentPlatformOnly' strips every other MCP server and keeps only the agent-platform server")
|
|
4716
|
+
hasAiConfigSecrets: ue().optional().describe("True when AI Config has secret-backed env vars; agent must fetch resolved values via /tasks/:id/resolve-secrets"),
|
|
4717
|
+
hasCredentials: ue().optional().describe("True when the task has credentials attached; agent must fetch resolved values via /tasks/:id/resolve-credentials"),
|
|
4718
|
+
mcpServersMode: rt(["all", "agentPlatformOnly"]).optional().describe("MCP server strategy for this run; 'agentPlatformOnly' strips every other MCP server and keeps only the agent-platform server"),
|
|
4719
|
+
enableBrowserTools: ue().optional().describe("When true, the MCP server registers browser_interact and browser_get_context (browser_automate tasks only)")
|
|
4719
4720
|
});
|
|
4720
4721
|
ye.PENDING + "", ye.CANCELLED, ye.ASSIGNED + "", ye.CANCELLED, ye.IN_PROGRESS + "", ye.CANCELLED, ye.FAILED, ye.WAITING_FOR_INPUT + "", ye.CANCELLED, ye.WAITING_FOR_PLAN_APPROVAL + "", ye.CANCELLED, ye.PLAN_APPROVED + "", ye.CANCELLED, ye.PLAN_REJECTED + "", ye.CANCELLED, ye.COMPLETED + "", ye.RESULT_REJECTED + "", ye.CANCELLED, ye.FAILED + "", ye.CANCELLED + "";
|
|
4721
4722
|
const ng = "browser_capture", rg = "browser_automate";
|
|
@@ -4920,9 +4921,9 @@ var Ja = { exports: {} };
|
|
|
4920
4921
|
}, R.prototype.decode = function(x) {
|
|
4921
4922
|
if (x.length === 0)
|
|
4922
4923
|
return new Uint8Array(0);
|
|
4923
|
-
for (var S = this._getPaddingLength(x), C = x.length - S, M = new Uint8Array(this.maxDecodedLength(C)), se = 0, ke = 0, Pe = 0, We = 0, V = 0,
|
|
4924
|
-
We = this._decodeChar(x.charCodeAt(ke + 0)), V = this._decodeChar(x.charCodeAt(ke + 1)),
|
|
4925
|
-
if (ke < C - 1 && (We = this._decodeChar(x.charCodeAt(ke)), V = this._decodeChar(x.charCodeAt(ke + 1)), M[se++] = We << 2 | V >>> 4, Pe |= We & p, Pe |= V & p), ke < C - 2 && (
|
|
4924
|
+
for (var S = this._getPaddingLength(x), C = x.length - S, M = new Uint8Array(this.maxDecodedLength(C)), se = 0, ke = 0, Pe = 0, We = 0, V = 0, ge = 0, Je = 0; ke < C - 4; ke += 4)
|
|
4925
|
+
We = this._decodeChar(x.charCodeAt(ke + 0)), V = this._decodeChar(x.charCodeAt(ke + 1)), ge = this._decodeChar(x.charCodeAt(ke + 2)), Je = this._decodeChar(x.charCodeAt(ke + 3)), M[se++] = We << 2 | V >>> 4, M[se++] = V << 4 | ge >>> 2, M[se++] = ge << 6 | Je, Pe |= We & p, Pe |= V & p, Pe |= ge & p, Pe |= Je & p;
|
|
4926
|
+
if (ke < C - 1 && (We = this._decodeChar(x.charCodeAt(ke)), V = this._decodeChar(x.charCodeAt(ke + 1)), M[se++] = We << 2 | V >>> 4, Pe |= We & p, Pe |= V & p), ke < C - 2 && (ge = this._decodeChar(x.charCodeAt(ke + 2)), M[se++] = V << 4 | ge >>> 2, Pe |= ge & p), ke < C - 3 && (Je = this._decodeChar(x.charCodeAt(ke + 3)), M[se++] = ge << 6 | Je, Pe |= Je & p), Pe !== 0)
|
|
4926
4927
|
throw new Error("Base64Coder: incorrect characters for decoding");
|
|
4927
4928
|
return M;
|
|
4928
4929
|
}, R.prototype._encodeByte = function(x) {
|
|
@@ -5195,7 +5196,7 @@ var Ja = { exports: {} };
|
|
|
5195
5196
|
super(i), Object.setPrototypeOf(this, new.target.prototype);
|
|
5196
5197
|
}
|
|
5197
5198
|
}
|
|
5198
|
-
class
|
|
5199
|
+
class ge extends Error {
|
|
5199
5200
|
constructor(i, a) {
|
|
5200
5201
|
super(a), this.status = i, Object.setPrototypeOf(this, new.target.prototype);
|
|
5201
5202
|
}
|
|
@@ -5217,7 +5218,7 @@ var Ja = { exports: {} };
|
|
|
5217
5218
|
try {
|
|
5218
5219
|
$ = JSON.parse(y.responseText), Z = !0;
|
|
5219
5220
|
} catch {
|
|
5220
|
-
g(new
|
|
5221
|
+
g(new ge(200, `JSON returned from ${f.toString()} endpoint was invalid, yet status code was 200. Data was: ${y.responseText}`), null);
|
|
5221
5222
|
}
|
|
5222
5223
|
Z && g(null, $);
|
|
5223
5224
|
} else {
|
|
@@ -5230,12 +5231,12 @@ var Ja = { exports: {} };
|
|
|
5230
5231
|
$ = `Clients must be authorized to join private or presence channels. ${R.buildLogSuffix("authorizationEndpoint")}`;
|
|
5231
5232
|
break;
|
|
5232
5233
|
}
|
|
5233
|
-
g(new
|
|
5234
|
+
g(new ge(y.status, `Unable to retrieve auth string from ${f.toString()} endpoint - received status: ${y.status} from ${a.endpoint}. ${$}`), null);
|
|
5234
5235
|
}
|
|
5235
5236
|
}, y.send(i), y;
|
|
5236
5237
|
};
|
|
5237
5238
|
function j(l) {
|
|
5238
|
-
return
|
|
5239
|
+
return me(bt(l));
|
|
5239
5240
|
}
|
|
5240
5241
|
var Q = String.fromCharCode, Re = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", Ie = function(l) {
|
|
5241
5242
|
var i = l.charCodeAt(0);
|
|
@@ -5250,7 +5251,7 @@ var Ja = { exports: {} };
|
|
|
5250
5251
|
i >= 1 ? "=" : Re.charAt(a & 63)
|
|
5251
5252
|
];
|
|
5252
5253
|
return f.join("");
|
|
5253
|
-
},
|
|
5254
|
+
}, me = window.btoa || function(l) {
|
|
5254
5255
|
return l.replace(/[\s\S]{1,3}/g, ct);
|
|
5255
5256
|
};
|
|
5256
5257
|
class Se {
|
|
@@ -6027,7 +6028,7 @@ var Ja = { exports: {} };
|
|
|
6027
6028
|
i ? (this.subscriptionPending = !1, ae.error(i.toString()), this.emit("pusher:subscription_error", Object.assign({}, {
|
|
6028
6029
|
type: "AuthError",
|
|
6029
6030
|
error: i.message
|
|
6030
|
-
}, i instanceof
|
|
6031
|
+
}, i instanceof ge ? { status: i.status } : {}))) : this.pusher.send_event("pusher:subscribe", {
|
|
6031
6032
|
auth: a.auth,
|
|
6032
6033
|
channel_data: a.channel_data,
|
|
6033
6034
|
channel: this.name
|
|
@@ -9041,7 +9042,7 @@ function dc() {
|
|
|
9041
9042
|
let V = Ks();
|
|
9042
9043
|
t.isSupported = typeof cc == "function" && typeof x == "function" && M && M.createHTMLDocument !== void 0;
|
|
9043
9044
|
const {
|
|
9044
|
-
MUSTACHE_EXPR:
|
|
9045
|
+
MUSTACHE_EXPR: ge,
|
|
9045
9046
|
ERB_EXPR: Je,
|
|
9046
9047
|
TMPLIT_EXPR: Nt,
|
|
9047
9048
|
DATA_ATTR: j,
|
|
@@ -9052,7 +9053,7 @@ function dc() {
|
|
|
9052
9053
|
} = Ys;
|
|
9053
9054
|
let {
|
|
9054
9055
|
IS_ALLOWED_URI: ct
|
|
9055
|
-
} = Ys,
|
|
9056
|
+
} = Ys, me = null;
|
|
9056
9057
|
const Se = B({}, [...Ws, ...Xo, ...Vo, ...Yo, ...Js]);
|
|
9057
9058
|
let W = null;
|
|
9058
9059
|
const Me = B({}, [...Xs, ...Ko, ...Vs, ...eo]);
|
|
@@ -9111,7 +9112,7 @@ function dc() {
|
|
|
9111
9112
|
let b = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
9112
9113
|
if (!(Ut && Ut === b)) {
|
|
9113
9114
|
if ((!b || typeof b != "object") && (b = {}), b = vt(b), At = // eslint-disable-next-line unicorn/prefer-includes
|
|
9114
|
-
ut.indexOf(b.PARSER_MEDIA_TYPE) === -1 ? Oo : b.PARSER_MEDIA_TYPE, ce = At === "application/xhtml+xml" ? Wo : oo,
|
|
9115
|
+
ut.indexOf(b.PARSER_MEDIA_TYPE) === -1 ? Oo : b.PARSER_MEDIA_TYPE, ce = At === "application/xhtml+xml" ? Wo : oo, me = ht(b, "ALLOWED_TAGS") ? B({}, b.ALLOWED_TAGS, ce) : Se, W = ht(b, "ALLOWED_ATTR") ? B({}, b.ALLOWED_ATTR, ce) : Me, en = ht(b, "ALLOWED_NAMESPACES") ? B({}, b.ALLOWED_NAMESPACES, Wo) : $o, Xn = ht(b, "ADD_URI_SAFE_ATTR") ? B(vt(Lr), b.ADD_URI_SAFE_ATTR, ce) : Lr, ae = ht(b, "ADD_DATA_URI_TAGS") ? B(vt(zr), b.ADD_DATA_URI_TAGS, ce) : zr, Ze = ht(b, "FORBID_CONTENTS") ? B({}, b.FORBID_CONTENTS, ce) : Jn, Ue = ht(b, "FORBID_TAGS") ? B({}, b.FORBID_TAGS, ce) : vt({}), Xe = ht(b, "FORBID_ATTR") ? B({}, b.FORBID_ATTR, ce) : vt({}), Dt = ht(b, "USE_PROFILES") ? b.USE_PROFILES : !1, _e = b.ALLOW_ARIA_ATTR !== !1, Ee = b.ALLOW_DATA_ATTR !== !1, Pr = b.ALLOW_UNKNOWN_PROTOCOLS || !1, Bn = b.ALLOW_SELF_CLOSE_IN_ATTR !== !1, $e = b.SAFE_FOR_TEMPLATES || !1, Xt = b.SAFE_FOR_XML !== !1, Tt = b.WHOLE_DOCUMENT || !1, Ot = b.RETURN_DOM || !1, Vt = b.RETURN_DOM_FRAGMENT || !1, Yt = b.RETURN_TRUSTED_TYPE || !1, bn = b.FORCE_BODY || !1, Rr = b.SANITIZE_DOM !== !1, Gn = b.SANITIZE_NAMED_PROPS || !1, Wn = b.KEEP_CONTENT !== !1, Kt = b.IN_PLACE || !1, ct = b.ALLOWED_URI_REGEXP || lc, Mt = b.NAMESPACE || lt, vn = b.MATHML_TEXT_INTEGRATION_POINTS || vn, yn = b.HTML_INTEGRATION_POINTS || yn, J = b.CUSTOM_ELEMENT_HANDLING || {}, b.CUSTOM_ELEMENT_HANDLING && Vn(b.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (J.tagNameCheck = b.CUSTOM_ELEMENT_HANDLING.tagNameCheck), b.CUSTOM_ELEMENT_HANDLING && Vn(b.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (J.attributeNameCheck = b.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), b.CUSTOM_ELEMENT_HANDLING && typeof b.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (J.allowCustomizedBuiltInElements = b.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), $e && (Ee = !1), Vt && (Ot = !0), Dt && (me = B({}, Js), W = [], Dt.html === !0 && (B(me, Ws), B(W, Xs)), Dt.svg === !0 && (B(me, Xo), B(W, Ko), B(W, eo)), Dt.svgFilters === !0 && (B(me, Vo), B(W, Ko), B(W, eo)), Dt.mathMl === !0 && (B(me, Yo), B(W, Vs), B(W, eo))), b.ADD_TAGS && (typeof b.ADD_TAGS == "function" ? je.tagCheck = b.ADD_TAGS : (me === Se && (me = vt(me)), B(me, b.ADD_TAGS, ce))), b.ADD_ATTR && (typeof b.ADD_ATTR == "function" ? je.attributeCheck = b.ADD_ATTR : (W === Me && (W = vt(W)), B(W, b.ADD_ATTR, ce))), b.ADD_URI_SAFE_ATTR && B(Xn, b.ADD_URI_SAFE_ATTR, ce), b.FORBID_CONTENTS && (Ze === Jn && (Ze = vt(Ze)), B(Ze, b.FORBID_CONTENTS, ce)), b.ADD_FORBID_CONTENTS && (Ze === Jn && (Ze = vt(Ze)), B(Ze, b.ADD_FORBID_CONTENTS, ce)), Wn && (me["#text"] = !0), Tt && B(me, ["html", "head", "body"]), me.table && (B(me, ["tbody"]), delete Ue.tbody), b.TRUSTED_TYPES_POLICY) {
|
|
9115
9116
|
if (typeof b.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
9116
9117
|
throw cr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
9117
9118
|
if (typeof b.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
@@ -9210,10 +9211,10 @@ function dc() {
|
|
|
9210
9211
|
const z = ce(b.nodeName);
|
|
9211
9212
|
if (dt(V.uponSanitizeElement, b, {
|
|
9212
9213
|
tagName: z,
|
|
9213
|
-
allowedTags:
|
|
9214
|
+
allowedTags: me
|
|
9214
9215
|
}), Xt && b.hasChildNodes() && !Or(b.firstElementChild) && qe(/<[/\w!]/g, b.innerHTML) && qe(/<[/\w!]/g, b.textContent) || b.nodeType === ur.progressingInstruction || Xt && b.nodeType === ur.comment && qe(/<[/\w]/g, b.data))
|
|
9215
9216
|
return Qe(b), !0;
|
|
9216
|
-
if (!(je.tagCheck instanceof Function && je.tagCheck(z)) && (!
|
|
9217
|
+
if (!(je.tagCheck instanceof Function && je.tagCheck(z)) && (!me[z] || Ue[z])) {
|
|
9217
9218
|
if (!Ue[z] && Ur(z) && (J.tagNameCheck instanceof RegExp && qe(J.tagNameCheck, z) || J.tagNameCheck instanceof Function && J.tagNameCheck(z)))
|
|
9218
9219
|
return !1;
|
|
9219
9220
|
if (Wn && !Ze[z]) {
|
|
@@ -9228,7 +9229,7 @@ function dc() {
|
|
|
9228
9229
|
}
|
|
9229
9230
|
return Qe(b), !0;
|
|
9230
9231
|
}
|
|
9231
|
-
return b instanceof d && !Do(b) || (z === "noscript" || z === "noembed" || z === "noframes") && qe(/<\/no(script|embed|frames)/i, b.innerHTML) ? (Qe(b), !0) : ($e && b.nodeType === ur.text && (T = b.textContent, Qr([
|
|
9232
|
+
return b instanceof d && !Do(b) || (z === "noscript" || z === "noembed" || z === "noframes") && qe(/<\/no(script|embed|frames)/i, b.innerHTML) ? (Qe(b), !0) : ($e && b.nodeType === ur.text && (T = b.textContent, Qr([ge, Je, Nt], (ne) => {
|
|
9232
9233
|
T = ar(T, ne, " ");
|
|
9233
9234
|
}), b.textContent !== T && (sr(t.removed, {
|
|
9234
9235
|
element: b.cloneNode()
|
|
@@ -9304,7 +9305,7 @@ function dc() {
|
|
|
9304
9305
|
et(ve, b);
|
|
9305
9306
|
continue;
|
|
9306
9307
|
}
|
|
9307
|
-
$e && Qr([
|
|
9308
|
+
$e && Qr([ge, Je, Nt], (Zr) => {
|
|
9308
9309
|
Te = ar(Te, Zr, " ");
|
|
9309
9310
|
});
|
|
9310
9311
|
const jr = ce(b.nodeName);
|
|
@@ -9351,7 +9352,7 @@ function dc() {
|
|
|
9351
9352
|
if (Et || wn(b), t.removed = [], typeof O == "string" && (Kt = !1), Kt) {
|
|
9352
9353
|
if (O.nodeName) {
|
|
9353
9354
|
const pt = ce(O.nodeName);
|
|
9354
|
-
if (!
|
|
9355
|
+
if (!me[pt] || Ue[pt])
|
|
9355
9356
|
throw cr("root node is forbidden and cannot be sanitized in-place");
|
|
9356
9357
|
}
|
|
9357
9358
|
} else if (O instanceof u)
|
|
@@ -9378,8 +9379,8 @@ function dc() {
|
|
|
9378
9379
|
return (W.shadowroot || W.shadowrootmode) && (Ae = We.call(r, Ae, !0)), Ae;
|
|
9379
9380
|
}
|
|
9380
9381
|
let Ne = Tt ? T.outerHTML : T.innerHTML;
|
|
9381
|
-
return Tt &&
|
|
9382
|
-
` + Ne), $e && Qr([
|
|
9382
|
+
return Tt && me["!doctype"] && T.ownerDocument && T.ownerDocument.doctype && T.ownerDocument.doctype.name && qe(uc, T.ownerDocument.doctype.name) && (Ne = "<!DOCTYPE " + T.ownerDocument.doctype.name + `>
|
|
9383
|
+
` + Ne), $e && Qr([ge, Je, Nt], (pt) => {
|
|
9383
9384
|
Ne = ar(Ne, pt, " ");
|
|
9384
9385
|
}), S && Yt ? S.createHTML(Ne) : Ne;
|
|
9385
9386
|
}, t.setConfig = function() {
|
|
@@ -9411,12 +9412,12 @@ function pc(e) {
|
|
|
9411
9412
|
return Gm.sanitize(t);
|
|
9412
9413
|
}
|
|
9413
9414
|
const hc = 1e3, fc = 32, Qs = 15e3, Wm = /* @__PURE__ */ new Set(["completed", "failed", "cancelled"]), Jm = 4e3;
|
|
9414
|
-
let L = null, St = null, Le = null, Li = null, fr = null, yo = null, pi = !1, io = null, br = null, U = { kind: "connecting" }, Nn = [], jn = null,
|
|
9415
|
+
let L = null, St = null, Le = null, Li = null, fr = null, yo = null, pi = !1, io = null, br = null, U = { kind: "connecting" }, Nn = [], jn = null, de = null, Zn = null, zt = null, kr = -1, He = null, It = !1, Lt = null, an = /* @__PURE__ */ new Set();
|
|
9415
9416
|
function so() {
|
|
9416
|
-
ao(), Va(), St && clearInterval(St), St = null, Lt == null || Lt(), Lt = null, Le == null || Le.destroy(), Le = null, fr == null || fr(), fr = null, L && fn(L), L == null || L.remove(), L = null, Li = null, U = { kind: "connecting" }, Nn = [], jn = null,
|
|
9417
|
+
ao(), Va(), St && clearInterval(St), St = null, Lt == null || Lt(), Lt = null, Le == null || Le.destroy(), Le = null, fr == null || fr(), fr = null, L && fn(L), L == null || L.remove(), L = null, Li = null, U = { kind: "connecting" }, Nn = [], jn = null, de = null, Zn = null, zt = null, yo = null, kr = -1, He = null, It = !1, an = /* @__PURE__ */ new Set();
|
|
9417
9418
|
}
|
|
9418
9419
|
function Ii(e, t, n, r, o) {
|
|
9419
|
-
L && so(), Li = o ?? null, U = { kind: "connecting" }, Nn = [], jn = null, kr = -1, He = null, It = !1, an = /* @__PURE__ */ new Set(),
|
|
9420
|
+
L && so(), Li = o ?? null, U = { kind: "connecting" }, Nn = [], jn = null, kr = -1, He = null, It = !1, an = /* @__PURE__ */ new Set(), de = e, Zn = n, zt = t, yo = r, Xa({ taskId: e, backendUrl: n, title: r }), L = document.createElement("div"), L.className = "ap-sdk-panel", L.setAttribute("data-ap-sdk", "1"), L.setAttribute("role", "dialog"), L.setAttribute("aria-modal", "true"), L.setAttribute("aria-label", "Automation in progress");
|
|
9420
9421
|
const s = r.length > 55 ? `${r.slice(0, 52)}…` : r;
|
|
9421
9422
|
L.innerHTML = `
|
|
9422
9423
|
<div class="ap-sdk-panel__header">
|
|
@@ -9483,7 +9484,7 @@ function Ii(e, t, n, r, o) {
|
|
|
9483
9484
|
}
|
|
9484
9485
|
function gc(e, t) {
|
|
9485
9486
|
const n = async (u) => {
|
|
9486
|
-
if (
|
|
9487
|
+
if (de !== e || !L || U.kind !== "idle" && U.kind !== "connecting" || an.has(u.commandId)) return;
|
|
9487
9488
|
an.add(u.commandId);
|
|
9488
9489
|
const d = {
|
|
9489
9490
|
id: u.commandId,
|
|
@@ -9497,7 +9498,7 @@ function gc(e, t) {
|
|
|
9497
9498
|
};
|
|
9498
9499
|
sn({ kind: "executing", command: d, actionsRun: U.kind === "idle" ? U.actionsRun : 0 }), await ea(d, t, e);
|
|
9499
9500
|
}, r = (u) => {
|
|
9500
|
-
if (!(
|
|
9501
|
+
if (!(de !== e || !L) && Wm.has(u)) {
|
|
9501
9502
|
if (U.kind === "executing")
|
|
9502
9503
|
sn({ kind: "finishing", status: u, actionsRun: U.actionsRun });
|
|
9503
9504
|
else if (U.kind === "connecting" || U.kind === "idle") {
|
|
@@ -9506,12 +9507,12 @@ function gc(e, t) {
|
|
|
9506
9507
|
}
|
|
9507
9508
|
}
|
|
9508
9509
|
}, o = (u) => {
|
|
9509
|
-
|
|
9510
|
+
de !== e || !L || (u.outputChunk && ta([u.outputChunk]), r(u.status));
|
|
9510
9511
|
}, s = async () => {
|
|
9511
|
-
if (!(
|
|
9512
|
+
if (!(de !== e || !L))
|
|
9512
9513
|
try {
|
|
9513
9514
|
const u = await bo(t, e);
|
|
9514
|
-
|
|
9515
|
+
de === e && L && (He = u[0] ?? null, dn());
|
|
9515
9516
|
} catch {
|
|
9516
9517
|
}
|
|
9517
9518
|
}, c = async () => {
|
|
@@ -9522,7 +9523,7 @@ function gc(e, t) {
|
|
|
9522
9523
|
bo(t, e),
|
|
9523
9524
|
ag(t, e)
|
|
9524
9525
|
]);
|
|
9525
|
-
if (
|
|
9526
|
+
if (de !== e || !L) return;
|
|
9526
9527
|
ta(d), He = p[0] ?? null, dn(), r(u.status), h && h.status === "pending" && (U.kind === "idle" || U.kind === "connecting") && !an.has(h.id) ? (an.add(h.id), sn({ kind: "executing", command: h, actionsRun: U.kind === "idle" ? U.actionsRun : 0 }), await ea(h, t, e)) : U.kind === "connecting" && sn({ kind: "idle", actionsRun: 0 });
|
|
9527
9528
|
} catch {
|
|
9528
9529
|
}
|
|
@@ -9536,7 +9537,7 @@ function gc(e, t) {
|
|
|
9536
9537
|
c();
|
|
9537
9538
|
}
|
|
9538
9539
|
}).then((u) => {
|
|
9539
|
-
if (
|
|
9540
|
+
if (de !== e || U.kind === "finished") {
|
|
9540
9541
|
u();
|
|
9541
9542
|
return;
|
|
9542
9543
|
}
|
|
@@ -9552,7 +9553,7 @@ function ao() {
|
|
|
9552
9553
|
e && (e.textContent = "Cancel task");
|
|
9553
9554
|
}
|
|
9554
9555
|
async function Xm(e, t) {
|
|
9555
|
-
if (
|
|
9556
|
+
if (de !== t || !L) return;
|
|
9556
9557
|
const n = L.querySelector("[data-ap-runner-cancel]");
|
|
9557
9558
|
n && (n.disabled = !0);
|
|
9558
9559
|
try {
|
|
@@ -9562,8 +9563,8 @@ async function Xm(e, t) {
|
|
|
9562
9563
|
}
|
|
9563
9564
|
}
|
|
9564
9565
|
function mc() {
|
|
9565
|
-
if (!
|
|
9566
|
-
const e =
|
|
9566
|
+
if (!de || !zt || !Zn || !yo) return;
|
|
9567
|
+
const e = de, t = zt;
|
|
9567
9568
|
Xa({ taskId: e, backendUrl: Zn, title: yo }), St && clearInterval(St), wo(), St = setInterval(wo, hc);
|
|
9568
9569
|
const n = U.kind === "finished" ? U.actionsRun : 0;
|
|
9569
9570
|
an = /* @__PURE__ */ new Set(), U = { kind: "idle", actionsRun: n }, $i(), gc(e, t);
|
|
@@ -9615,15 +9616,15 @@ function dn() {
|
|
|
9615
9616
|
}
|
|
9616
9617
|
}
|
|
9617
9618
|
async function Vm(e) {
|
|
9618
|
-
if (!L || !He || !
|
|
9619
|
-
const t =
|
|
9619
|
+
if (!L || !He || !de || It) return;
|
|
9620
|
+
const t = de, n = zt;
|
|
9620
9621
|
if (n) {
|
|
9621
9622
|
It = !0;
|
|
9622
9623
|
try {
|
|
9623
9624
|
const r = { selectedOption: e };
|
|
9624
9625
|
await Wa(n, t, He.id, r), He = null, dn();
|
|
9625
9626
|
const o = await bo(n, t);
|
|
9626
|
-
|
|
9627
|
+
de === t && L && (He = o[0] ?? null, dn());
|
|
9627
9628
|
} catch {
|
|
9628
9629
|
const r = L.querySelector("[data-ap-runner-chat-error]");
|
|
9629
9630
|
r && (r.textContent = "Failed to send your answer — try again.", r.style.display = "block");
|
|
@@ -9664,7 +9665,7 @@ async function ea(e, t, n) {
|
|
|
9664
9665
|
} catch (c) {
|
|
9665
9666
|
r = "error", o = c instanceof Error ? c.message : "Unknown error executing command";
|
|
9666
9667
|
}
|
|
9667
|
-
if (
|
|
9668
|
+
if (de === n && L && tb(r, e, o), await Km(t, n, e.id, r, o), de !== n || !L) return;
|
|
9668
9669
|
Le == null || Le.hide();
|
|
9669
9670
|
const s = (U.kind === "executing" || U.kind === "finishing" ? U.actionsRun : 0) + 1;
|
|
9670
9671
|
U.kind === "finishing" ? sn({ kind: "finished", status: U.status, actionsRun: s }) : U.kind === "executing" && sn({ kind: "idle", actionsRun: s });
|
|
@@ -9681,7 +9682,7 @@ async function Ym(e, t) {
|
|
|
9681
9682
|
await Wa(e, t, He.id, s), He = null, dn();
|
|
9682
9683
|
try {
|
|
9683
9684
|
const c = await bo(e, t);
|
|
9684
|
-
|
|
9685
|
+
de === t && L && (He = c[0] ?? null, dn());
|
|
9685
9686
|
} catch {
|
|
9686
9687
|
}
|
|
9687
9688
|
} else
|
|
@@ -9749,10 +9750,10 @@ function ta(e) {
|
|
|
9749
9750
|
}
|
|
9750
9751
|
}
|
|
9751
9752
|
function ob(e) {
|
|
9752
|
-
if (!L || !
|
|
9753
|
+
if (!L || !de || !Zn) return;
|
|
9753
9754
|
const t = L.querySelector("[data-ap-runner-summary]");
|
|
9754
9755
|
if (!t) return;
|
|
9755
|
-
const n = `${Zn.replace(/\/+$/, "")}/tasks/${
|
|
9756
|
+
const n = `${Zn.replace(/\/+$/, "")}/tasks/${de}`, r = e === "completed" ? "Automation complete!" : "Automation ended", o = e === "completed";
|
|
9756
9757
|
t.style.display = "block", t.innerHTML = `
|
|
9757
9758
|
<div class="ap-sdk-success-card">
|
|
9758
9759
|
<p class="ap-sdk-success-headline">${Ni(r)}</p>
|
|
@@ -9783,8 +9784,8 @@ function ib(e) {
|
|
|
9783
9784
|
c.textContent = h, c.style.display = "block";
|
|
9784
9785
|
};
|
|
9785
9786
|
t.addEventListener("click", async () => {
|
|
9786
|
-
if (!
|
|
9787
|
-
const h =
|
|
9787
|
+
if (!de || !zt) return;
|
|
9788
|
+
const h = de, k = zt;
|
|
9788
9789
|
t.disabled = !0, n.disabled = !0, c.style.display = "none";
|
|
9789
9790
|
try {
|
|
9790
9791
|
await pg(k, h), u.innerHTML = '<span class="ap-sdk-status-badge ap-sdk-status-badge--approved">Approved</span>', r.style.display = "none";
|
|
@@ -9798,8 +9799,8 @@ function ib(e) {
|
|
|
9798
9799
|
s.textContent = o.value.trim() ? "Reject & Continue" : "Reject Permanently";
|
|
9799
9800
|
};
|
|
9800
9801
|
o.addEventListener("input", p), s.addEventListener("click", async () => {
|
|
9801
|
-
if (!
|
|
9802
|
-
const h =
|
|
9802
|
+
if (!de || !zt) return;
|
|
9803
|
+
const h = de, k = zt, m = o.value.trim();
|
|
9803
9804
|
s.disabled = !0, t.disabled = !0, c.style.display = "none", s.textContent = "Rejecting…";
|
|
9804
9805
|
try {
|
|
9805
9806
|
await hg(k, h, m), m ? mc() : (u.innerHTML = '<span class="ap-sdk-status-badge ap-sdk-status-badge--rejected">Rejected</span>', r.style.display = "none");
|
|
@@ -10157,21 +10158,21 @@ function xb(e, t, n, r, o, s, c, u, d) {
|
|
|
10157
10158
|
const j = p.currentPickedEl.parentElement;
|
|
10158
10159
|
j && V(ua(j), j);
|
|
10159
10160
|
});
|
|
10160
|
-
const
|
|
10161
|
+
const ge = () => {
|
|
10161
10162
|
Er(), d == null || d();
|
|
10162
10163
|
};
|
|
10163
|
-
_.addEventListener("click",
|
|
10164
|
+
_.addEventListener("click", ge), w.addEventListener("click", ge), R.forEach((j) => {
|
|
10164
10165
|
j.addEventListener("click", () => {
|
|
10165
10166
|
p.captureType = j.dataset.apType, R.forEach((Q) => Q.classList.toggle("ap-sdk-active", Q === j));
|
|
10166
10167
|
});
|
|
10167
10168
|
});
|
|
10168
10169
|
const Je = (j) => {
|
|
10169
|
-
j.key === "Escape" &&
|
|
10170
|
+
j.key === "Escape" && ge();
|
|
10170
10171
|
};
|
|
10171
10172
|
document.addEventListener("keydown", Je), gr = () => document.removeEventListener("keydown", Je);
|
|
10172
10173
|
const Nt = F.querySelector("[data-ap-reconfigure]");
|
|
10173
10174
|
if (c ? Nt.addEventListener("click", () => {
|
|
10174
|
-
|
|
10175
|
+
ge(), c();
|
|
10175
10176
|
}) : Nt.style.display = "none", C && u) {
|
|
10176
10177
|
const j = () => {
|
|
10177
10178
|
C.disabled = !N.value.trim() || p.submitting || p.awaitingPick;
|
|
@@ -10184,7 +10185,7 @@ function xb(e, t, n, r, o, s, c, u, d) {
|
|
|
10184
10185
|
});
|
|
10185
10186
|
}
|
|
10186
10187
|
P.addEventListener("click", async () => {
|
|
10187
|
-
var
|
|
10188
|
+
var me;
|
|
10188
10189
|
if (p.submitting) return;
|
|
10189
10190
|
let j = n.backendUrl ?? "", Q = n.token ?? "";
|
|
10190
10191
|
if (h) {
|
|
@@ -10214,7 +10215,7 @@ function xb(e, t, n, r, o, s, c, u, d) {
|
|
|
10214
10215
|
W = (await ii(Ie, Se.id, Re, p.currentCtx, bt)).id, Me = "task", J = Re.slice(0, 120) || p.currentCtx.pageTitle || "Browser capture";
|
|
10215
10216
|
else if (p.captureType === "planning") {
|
|
10216
10217
|
let Xe = iu(Re, { ...p.currentCtx, ancestry: p.currentCtx.outerTree || p.currentCtx.ancestry });
|
|
10217
|
-
(
|
|
10218
|
+
(me = p.currentCtx.innerTree) != null && me.trim() && (Xe += `
|
|
10218
10219
|
|
|
10219
10220
|
Element tree:
|
|
10220
10221
|
${p.currentCtx.innerTree}`), W = (await Is(Ie, Se.id, Xe, bt)).id, Me = "planning", J = Re.slice(0, 120) || p.currentCtx.pageTitle || "Planning session";
|
|
@@ -10232,11 +10233,11 @@ ${p.currentCtx.innerTree}`), W = (await Is(Ie, Se.id, Xe, bt)).id, Me = "plannin
|
|
|
10232
10233
|
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
10233
10234
|
}), Ec(Ie).catch(() => {
|
|
10234
10235
|
}), h && s({ backendUrl: j, token: Q }), Me === "automate") {
|
|
10235
|
-
|
|
10236
|
+
ge(), Ii(W, Ie, j, J, d);
|
|
10236
10237
|
return;
|
|
10237
10238
|
}
|
|
10238
10239
|
const Ue = Me === "task" ? `${j.replace(/\/+$/, "")}/tasks/${W}` : `${j.replace(/\/+$/, "")}/planning/${W}`;
|
|
10239
|
-
Tb(te, Me, J, Ue,
|
|
10240
|
+
Tb(te, Me, J, Ue, ge), F.classList.add("ap-sdk-panel--success"), p.submitting = !1;
|
|
10240
10241
|
} catch (Se) {
|
|
10241
10242
|
dr(
|
|
10242
10243
|
te,
|