@critical-path/svelte 0.19.1 → 0.19.2
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/CHANGELOG.md +9 -0
- package/dist/index.js +435 -427
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { CriticalPathClient as e } from "@critical-path/client";
|
|
2
2
|
import * as t from "svelte/internal/client";
|
|
3
|
-
import { isTempTaskId as n,
|
|
3
|
+
import { isTempTaskId as n, precedenceOf as r, resolveStatusDefinition as i } from "@critical-path/core";
|
|
4
4
|
//#region src/latest-request.ts
|
|
5
|
-
var
|
|
5
|
+
var a = class {
|
|
6
6
|
controller;
|
|
7
7
|
begin(e) {
|
|
8
8
|
this.controller?.abort(), this.controller = new AbortController();
|
|
@@ -15,9 +15,9 @@ var i = class {
|
|
|
15
15
|
cancel() {
|
|
16
16
|
this.controller?.abort(), this.controller = void 0;
|
|
17
17
|
}
|
|
18
|
-
},
|
|
18
|
+
}, o = class {
|
|
19
19
|
client;
|
|
20
|
-
#e = new
|
|
20
|
+
#e = new a();
|
|
21
21
|
#t = t.state(t.proxy([]));
|
|
22
22
|
get data() {
|
|
23
23
|
return t.get(this.#t);
|
|
@@ -75,15 +75,15 @@ var i = class {
|
|
|
75
75
|
this.#e.cancel();
|
|
76
76
|
}
|
|
77
77
|
};
|
|
78
|
-
function
|
|
79
|
-
return new
|
|
78
|
+
function s(e) {
|
|
79
|
+
return new o(e);
|
|
80
80
|
}
|
|
81
81
|
//#endregion
|
|
82
82
|
//#region src/task-state.svelte.ts
|
|
83
|
-
var
|
|
83
|
+
var c = class {
|
|
84
84
|
client;
|
|
85
85
|
projectId;
|
|
86
|
-
#e = new
|
|
86
|
+
#e = new a();
|
|
87
87
|
#t = t.state(t.proxy([]));
|
|
88
88
|
get data() {
|
|
89
89
|
return t.get(this.#t);
|
|
@@ -218,14 +218,14 @@ var s = class {
|
|
|
218
218
|
this.#e.cancel();
|
|
219
219
|
}
|
|
220
220
|
};
|
|
221
|
-
function
|
|
222
|
-
return new
|
|
221
|
+
function ee(e, t) {
|
|
222
|
+
return new c(e, t);
|
|
223
223
|
}
|
|
224
224
|
//#endregion
|
|
225
225
|
//#region src/workflow-state.svelte.ts
|
|
226
|
-
var
|
|
226
|
+
var te = class {
|
|
227
227
|
client;
|
|
228
|
-
#e = new
|
|
228
|
+
#e = new a();
|
|
229
229
|
#t = t.state(t.proxy([]));
|
|
230
230
|
get data() {
|
|
231
231
|
return t.get(this.#t);
|
|
@@ -292,15 +292,15 @@ var ee = class {
|
|
|
292
292
|
this.#e.cancel();
|
|
293
293
|
}
|
|
294
294
|
};
|
|
295
|
-
function
|
|
296
|
-
return new
|
|
295
|
+
function ne(e) {
|
|
296
|
+
return new te(e);
|
|
297
297
|
}
|
|
298
298
|
//#endregion
|
|
299
299
|
//#region src/comment-state.svelte.ts
|
|
300
|
-
var
|
|
300
|
+
var re = class {
|
|
301
301
|
client;
|
|
302
302
|
taskId;
|
|
303
|
-
#e = new
|
|
303
|
+
#e = new a();
|
|
304
304
|
#t = t.state(t.proxy([]));
|
|
305
305
|
get data() {
|
|
306
306
|
return t.get(this.#t);
|
|
@@ -413,15 +413,15 @@ var ne = class {
|
|
|
413
413
|
this.#e.cancel();
|
|
414
414
|
}
|
|
415
415
|
};
|
|
416
|
-
function
|
|
417
|
-
return new
|
|
416
|
+
function ie(e, t) {
|
|
417
|
+
return new re(e, t);
|
|
418
418
|
}
|
|
419
419
|
//#endregion
|
|
420
420
|
//#region src/attachment-state.svelte.ts
|
|
421
|
-
var
|
|
421
|
+
var ae = class {
|
|
422
422
|
client;
|
|
423
423
|
filter;
|
|
424
|
-
#e = new
|
|
424
|
+
#e = new a();
|
|
425
425
|
#t = t.state(t.proxy([]));
|
|
426
426
|
get data() {
|
|
427
427
|
return t.get(this.#t);
|
|
@@ -482,15 +482,15 @@ var ie = class {
|
|
|
482
482
|
this.#e.cancel();
|
|
483
483
|
}
|
|
484
484
|
};
|
|
485
|
-
function
|
|
486
|
-
return new
|
|
485
|
+
function oe(e, t) {
|
|
486
|
+
return new ae(e, t);
|
|
487
487
|
}
|
|
488
488
|
//#endregion
|
|
489
489
|
//#region src/activity-state.svelte.ts
|
|
490
|
-
var
|
|
490
|
+
var se = class {
|
|
491
491
|
client;
|
|
492
492
|
taskId;
|
|
493
|
-
#e = new
|
|
493
|
+
#e = new a();
|
|
494
494
|
#t = t.state(t.proxy([]));
|
|
495
495
|
get comments() {
|
|
496
496
|
return t.get(this.#t);
|
|
@@ -643,15 +643,15 @@ var oe = class {
|
|
|
643
643
|
this.#e.cancel();
|
|
644
644
|
}
|
|
645
645
|
};
|
|
646
|
-
function
|
|
647
|
-
return new
|
|
646
|
+
function ce(e, t) {
|
|
647
|
+
return new se(e, t);
|
|
648
648
|
}
|
|
649
649
|
//#endregion
|
|
650
650
|
//#region src/deliverable-state.svelte.ts
|
|
651
|
-
var
|
|
651
|
+
var le = class {
|
|
652
652
|
client;
|
|
653
653
|
projectId;
|
|
654
|
-
#e = new
|
|
654
|
+
#e = new a();
|
|
655
655
|
#t = t.state(t.proxy([]));
|
|
656
656
|
get data() {
|
|
657
657
|
return t.get(this.#t);
|
|
@@ -732,15 +732,15 @@ var ce = class {
|
|
|
732
732
|
this.#e.cancel();
|
|
733
733
|
}
|
|
734
734
|
};
|
|
735
|
-
function
|
|
736
|
-
return new
|
|
735
|
+
function ue(e, t) {
|
|
736
|
+
return new le(e, t);
|
|
737
737
|
}
|
|
738
738
|
//#endregion
|
|
739
739
|
//#region src/deliverable-summary-state.svelte.ts
|
|
740
|
-
var
|
|
740
|
+
var de = class {
|
|
741
741
|
client;
|
|
742
742
|
deliverableId;
|
|
743
|
-
#e = new
|
|
743
|
+
#e = new a();
|
|
744
744
|
#t = t.state(null);
|
|
745
745
|
get summary() {
|
|
746
746
|
return t.get(this.#t);
|
|
@@ -787,12 +787,12 @@ var ue = class {
|
|
|
787
787
|
this.#e.cancel();
|
|
788
788
|
}
|
|
789
789
|
};
|
|
790
|
-
function
|
|
791
|
-
return new
|
|
790
|
+
function fe(e, t) {
|
|
791
|
+
return new de(e, t);
|
|
792
792
|
}
|
|
793
793
|
//#endregion
|
|
794
794
|
//#region src/kanban-state.svelte.ts
|
|
795
|
-
var
|
|
795
|
+
var pe = class {
|
|
796
796
|
projectId;
|
|
797
797
|
options;
|
|
798
798
|
taskState;
|
|
@@ -818,7 +818,7 @@ var fe = class {
|
|
|
818
818
|
canceled: []
|
|
819
819
|
};
|
|
820
820
|
for (let n of e) {
|
|
821
|
-
let e = n.semanticStatus ||
|
|
821
|
+
let e = n.semanticStatus || i(n.status, this.options?.customDefinitions).category;
|
|
822
822
|
t[e] ? t[e].push(n) : t.not_started.push(n);
|
|
823
823
|
}
|
|
824
824
|
return t;
|
|
@@ -836,7 +836,7 @@ var fe = class {
|
|
|
836
836
|
t.set(this.#e, e);
|
|
837
837
|
}
|
|
838
838
|
constructor(e, t, n = {}) {
|
|
839
|
-
this.projectId = t, this.options = n, this.taskState = new
|
|
839
|
+
this.projectId = t, this.options = n, this.taskState = new c(e, t);
|
|
840
840
|
}
|
|
841
841
|
async fetch() {
|
|
842
842
|
return this.taskState.fetch();
|
|
@@ -854,15 +854,15 @@ var fe = class {
|
|
|
854
854
|
return this.taskState.deleteTask(e);
|
|
855
855
|
}
|
|
856
856
|
};
|
|
857
|
-
function
|
|
858
|
-
return new
|
|
857
|
+
function me(e, t, n) {
|
|
858
|
+
return new pe(e, t, n);
|
|
859
859
|
}
|
|
860
860
|
//#endregion
|
|
861
861
|
//#region src/task-transitions-state.svelte.ts
|
|
862
|
-
var
|
|
862
|
+
var he = class {
|
|
863
863
|
client;
|
|
864
864
|
taskId;
|
|
865
|
-
#e = new
|
|
865
|
+
#e = new a();
|
|
866
866
|
#t = t.state(t.proxy([]));
|
|
867
867
|
get allowedTransitions() {
|
|
868
868
|
return t.get(this.#t);
|
|
@@ -906,8 +906,8 @@ var me = class {
|
|
|
906
906
|
this.#e.cancel();
|
|
907
907
|
}
|
|
908
908
|
};
|
|
909
|
-
function
|
|
910
|
-
return new
|
|
909
|
+
function ge(e, t) {
|
|
910
|
+
return new he(e, t);
|
|
911
911
|
}
|
|
912
912
|
//#endregion
|
|
913
913
|
//#region ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/util.js
|
|
@@ -941,13 +941,13 @@ var l;
|
|
|
941
941
|
}
|
|
942
942
|
e.joinValues = r, e.jsonStringifyReplacer = (e, t) => typeof t == "bigint" ? t.toString() : t;
|
|
943
943
|
})(l ||= {});
|
|
944
|
-
var
|
|
944
|
+
var _e;
|
|
945
945
|
(function(e) {
|
|
946
946
|
e.mergeShapes = (e, t) => ({
|
|
947
947
|
...e,
|
|
948
948
|
...t
|
|
949
949
|
});
|
|
950
|
-
})(
|
|
950
|
+
})(_e ||= {});
|
|
951
951
|
var u = l.arrayToEnum([
|
|
952
952
|
"string",
|
|
953
953
|
"nan",
|
|
@@ -1113,13 +1113,13 @@ var m = (e, t) => {
|
|
|
1113
1113
|
default: n = t.defaultError, l.assertNever(e);
|
|
1114
1114
|
}
|
|
1115
1115
|
return { message: n };
|
|
1116
|
-
},
|
|
1117
|
-
function
|
|
1118
|
-
return
|
|
1116
|
+
}, ve = m;
|
|
1117
|
+
function ye() {
|
|
1118
|
+
return ve;
|
|
1119
1119
|
}
|
|
1120
1120
|
//#endregion
|
|
1121
1121
|
//#region ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js
|
|
1122
|
-
var
|
|
1122
|
+
var be = (e) => {
|
|
1123
1123
|
let { data: t, path: n, errorMaps: r, issueData: i } = e, a = [...n, ...i.path || []], o = {
|
|
1124
1124
|
...i,
|
|
1125
1125
|
path: a
|
|
@@ -1141,7 +1141,7 @@ var ye = (e) => {
|
|
|
1141
1141
|
};
|
|
1142
1142
|
};
|
|
1143
1143
|
function h(e, t) {
|
|
1144
|
-
let n =
|
|
1144
|
+
let n = ye(), r = be({
|
|
1145
1145
|
issueData: t,
|
|
1146
1146
|
data: e.data,
|
|
1147
1147
|
path: e.path,
|
|
@@ -1198,13 +1198,13 @@ var g = class e {
|
|
|
1198
1198
|
value: n
|
|
1199
1199
|
};
|
|
1200
1200
|
}
|
|
1201
|
-
}, _ = Object.freeze({ status: "aborted" }),
|
|
1201
|
+
}, _ = Object.freeze({ status: "aborted" }), xe = (e) => ({
|
|
1202
1202
|
status: "dirty",
|
|
1203
1203
|
value: e
|
|
1204
1204
|
}), v = (e) => ({
|
|
1205
1205
|
status: "valid",
|
|
1206
1206
|
value: e
|
|
1207
|
-
}),
|
|
1207
|
+
}), Se = (e) => e.status === "aborted", Ce = (e) => e.status === "dirty", y = (e) => e.status === "valid", we = (e) => typeof Promise < "u" && e instanceof Promise, b;
|
|
1208
1208
|
(function(e) {
|
|
1209
1209
|
e.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, e.toString = (e) => typeof e == "string" ? e : e?.message;
|
|
1210
1210
|
})(b ||= {});
|
|
@@ -1217,7 +1217,7 @@ var x = class {
|
|
|
1217
1217
|
get path() {
|
|
1218
1218
|
return this._cachedPath.length || (Array.isArray(this._key) ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath;
|
|
1219
1219
|
}
|
|
1220
|
-
},
|
|
1220
|
+
}, Te = (e, t) => {
|
|
1221
1221
|
if (y(t)) return {
|
|
1222
1222
|
success: !0,
|
|
1223
1223
|
data: t.value
|
|
@@ -1279,7 +1279,7 @@ var C = class {
|
|
|
1279
1279
|
}
|
|
1280
1280
|
_parseSync(e) {
|
|
1281
1281
|
let t = this._parse(e);
|
|
1282
|
-
if (
|
|
1282
|
+
if (we(t)) throw Error("Synchronous parse encountered promise.");
|
|
1283
1283
|
return t;
|
|
1284
1284
|
}
|
|
1285
1285
|
_parseAsync(e) {
|
|
@@ -1304,7 +1304,7 @@ var C = class {
|
|
|
1304
1304
|
data: e,
|
|
1305
1305
|
parsedType: d(e)
|
|
1306
1306
|
};
|
|
1307
|
-
return
|
|
1307
|
+
return Te(n, this._parseSync({
|
|
1308
1308
|
data: e,
|
|
1309
1309
|
path: n.path,
|
|
1310
1310
|
parent: n
|
|
@@ -1363,7 +1363,7 @@ var C = class {
|
|
|
1363
1363
|
path: n.path,
|
|
1364
1364
|
parent: n
|
|
1365
1365
|
});
|
|
1366
|
-
return
|
|
1366
|
+
return Te(n, await (we(r) ? r : Promise.resolve(r)));
|
|
1367
1367
|
}
|
|
1368
1368
|
refine(e, t) {
|
|
1369
1369
|
let n = (e) => typeof t == "string" || t === void 0 ? { message: t } : typeof t == "function" ? t(e) : t;
|
|
@@ -1414,10 +1414,10 @@ var C = class {
|
|
|
1414
1414
|
return j.create(this, this._def);
|
|
1415
1415
|
}
|
|
1416
1416
|
or(e) {
|
|
1417
|
-
return
|
|
1417
|
+
return st.create([this, e], this._def);
|
|
1418
1418
|
}
|
|
1419
1419
|
and(e) {
|
|
1420
|
-
return
|
|
1420
|
+
return ut.create(this, e, this._def);
|
|
1421
1421
|
}
|
|
1422
1422
|
transform(e) {
|
|
1423
1423
|
return new M({
|
|
@@ -1432,7 +1432,7 @@ var C = class {
|
|
|
1432
1432
|
}
|
|
1433
1433
|
default(e) {
|
|
1434
1434
|
let t = typeof e == "function" ? e : () => e;
|
|
1435
|
-
return new
|
|
1435
|
+
return new bt({
|
|
1436
1436
|
...S(this._def),
|
|
1437
1437
|
innerType: this,
|
|
1438
1438
|
defaultValue: t,
|
|
@@ -1440,7 +1440,7 @@ var C = class {
|
|
|
1440
1440
|
});
|
|
1441
1441
|
}
|
|
1442
1442
|
brand() {
|
|
1443
|
-
return new
|
|
1443
|
+
return new Ct({
|
|
1444
1444
|
typeName: F.ZodBranded,
|
|
1445
1445
|
type: this,
|
|
1446
1446
|
...S(this._def)
|
|
@@ -1448,7 +1448,7 @@ var C = class {
|
|
|
1448
1448
|
}
|
|
1449
1449
|
catch(e) {
|
|
1450
1450
|
let t = typeof e == "function" ? e : () => e;
|
|
1451
|
-
return new
|
|
1451
|
+
return new xt({
|
|
1452
1452
|
...S(this._def),
|
|
1453
1453
|
innerType: this,
|
|
1454
1454
|
catchValue: t,
|
|
@@ -1463,10 +1463,10 @@ var C = class {
|
|
|
1463
1463
|
});
|
|
1464
1464
|
}
|
|
1465
1465
|
pipe(e) {
|
|
1466
|
-
return
|
|
1466
|
+
return wt.create(this, e);
|
|
1467
1467
|
}
|
|
1468
1468
|
readonly() {
|
|
1469
|
-
return
|
|
1469
|
+
return Tt.create(this);
|
|
1470
1470
|
}
|
|
1471
1471
|
isOptional() {
|
|
1472
1472
|
return this.safeParse(void 0).success;
|
|
@@ -1474,25 +1474,25 @@ var C = class {
|
|
|
1474
1474
|
isNullable() {
|
|
1475
1475
|
return this.safeParse(null).success;
|
|
1476
1476
|
}
|
|
1477
|
-
},
|
|
1478
|
-
function
|
|
1477
|
+
}, Ee = /^c[^\s-]{8,}$/i, De = /^[0-9a-z]+$/, Oe = /^[0-9A-HJKMNP-TV-Z]{26}$/i, ke = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, Ae = /^[a-z0-9_-]{21}$/i, je = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, Me = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, Ne = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, Pe = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$", Fe, Ie = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, Le = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/, Re = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/, ze = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, Be = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, Ve = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, He = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", Ue = RegExp(`^${He}$`);
|
|
1478
|
+
function We(e) {
|
|
1479
1479
|
let t = "[0-5]\\d";
|
|
1480
1480
|
e.precision ? t = `${t}\\.\\d{${e.precision}}` : e.precision ?? (t = `${t}(\\.\\d+)?`);
|
|
1481
1481
|
let n = e.precision ? "+" : "?";
|
|
1482
1482
|
return `([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`;
|
|
1483
1483
|
}
|
|
1484
|
-
function We(e) {
|
|
1485
|
-
return RegExp(`^${Ue(e)}$`);
|
|
1486
|
-
}
|
|
1487
1484
|
function Ge(e) {
|
|
1488
|
-
|
|
1489
|
-
return n.push(e.local ? "Z?" : "Z"), e.offset && n.push("([+-]\\d{2}:?\\d{2})"), t = `${t}(${n.join("|")})`, RegExp(`^${t}$`);
|
|
1485
|
+
return RegExp(`^${We(e)}$`);
|
|
1490
1486
|
}
|
|
1491
|
-
function Ke(e
|
|
1492
|
-
|
|
1487
|
+
function Ke(e) {
|
|
1488
|
+
let t = `${He}T${We(e)}`, n = [];
|
|
1489
|
+
return n.push(e.local ? "Z?" : "Z"), e.offset && n.push("([+-]\\d{2}:?\\d{2})"), t = `${t}(${n.join("|")})`, RegExp(`^${t}$`);
|
|
1493
1490
|
}
|
|
1494
1491
|
function qe(e, t) {
|
|
1495
|
-
|
|
1492
|
+
return !((t !== "v4" && t || !Ie.test(e)) && (t !== "v6" && t || !Re.test(e)));
|
|
1493
|
+
}
|
|
1494
|
+
function Je(e, t) {
|
|
1495
|
+
if (!je.test(e)) return !1;
|
|
1496
1496
|
try {
|
|
1497
1497
|
let [n] = e.split(".");
|
|
1498
1498
|
if (!n) return !1;
|
|
@@ -1502,10 +1502,10 @@ function qe(e, t) {
|
|
|
1502
1502
|
return !1;
|
|
1503
1503
|
}
|
|
1504
1504
|
}
|
|
1505
|
-
function
|
|
1506
|
-
return !((t !== "v4" && t || !
|
|
1505
|
+
function Ye(e, t) {
|
|
1506
|
+
return !((t !== "v4" && t || !Le.test(e)) && (t !== "v6" && t || !ze.test(e)));
|
|
1507
1507
|
}
|
|
1508
|
-
var
|
|
1508
|
+
var Xe = class e extends C {
|
|
1509
1509
|
_parse(e) {
|
|
1510
1510
|
if (this._def.coerce && (e.data = String(e.data)), this._getType(e) !== u.string) {
|
|
1511
1511
|
let t = this._getOrReturnCtx(e);
|
|
@@ -1549,37 +1549,37 @@ var Ye = class e extends C {
|
|
|
1549
1549
|
exact: !0,
|
|
1550
1550
|
message: r.message
|
|
1551
1551
|
}), t.dirty());
|
|
1552
|
-
} else if (r.kind === "email")
|
|
1552
|
+
} else if (r.kind === "email") Ne.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1553
1553
|
validation: "email",
|
|
1554
1554
|
code: f.invalid_string,
|
|
1555
1555
|
message: r.message
|
|
1556
1556
|
}), t.dirty());
|
|
1557
|
-
else if (r.kind === "emoji")
|
|
1557
|
+
else if (r.kind === "emoji") Fe ||= new RegExp(Pe, "u"), Fe.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1558
1558
|
validation: "emoji",
|
|
1559
1559
|
code: f.invalid_string,
|
|
1560
1560
|
message: r.message
|
|
1561
1561
|
}), t.dirty());
|
|
1562
|
-
else if (r.kind === "uuid")
|
|
1562
|
+
else if (r.kind === "uuid") ke.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1563
1563
|
validation: "uuid",
|
|
1564
1564
|
code: f.invalid_string,
|
|
1565
1565
|
message: r.message
|
|
1566
1566
|
}), t.dirty());
|
|
1567
|
-
else if (r.kind === "nanoid")
|
|
1567
|
+
else if (r.kind === "nanoid") Ae.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1568
1568
|
validation: "nanoid",
|
|
1569
1569
|
code: f.invalid_string,
|
|
1570
1570
|
message: r.message
|
|
1571
1571
|
}), t.dirty());
|
|
1572
|
-
else if (r.kind === "cuid")
|
|
1572
|
+
else if (r.kind === "cuid") Ee.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1573
1573
|
validation: "cuid",
|
|
1574
1574
|
code: f.invalid_string,
|
|
1575
1575
|
message: r.message
|
|
1576
1576
|
}), t.dirty());
|
|
1577
|
-
else if (r.kind === "cuid2")
|
|
1577
|
+
else if (r.kind === "cuid2") De.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1578
1578
|
validation: "cuid2",
|
|
1579
1579
|
code: f.invalid_string,
|
|
1580
1580
|
message: r.message
|
|
1581
1581
|
}), t.dirty());
|
|
1582
|
-
else if (r.kind === "ulid")
|
|
1582
|
+
else if (r.kind === "ulid") Oe.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1583
1583
|
validation: "ulid",
|
|
1584
1584
|
code: f.invalid_string,
|
|
1585
1585
|
message: r.message
|
|
@@ -1612,39 +1612,39 @@ var Ye = class e extends C {
|
|
|
1612
1612
|
code: f.invalid_string,
|
|
1613
1613
|
validation: { endsWith: r.value },
|
|
1614
1614
|
message: r.message
|
|
1615
|
-
}), t.dirty()) : r.kind === "datetime" ?
|
|
1615
|
+
}), t.dirty()) : r.kind === "datetime" ? Ke(r).test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1616
1616
|
code: f.invalid_string,
|
|
1617
1617
|
validation: "datetime",
|
|
1618
1618
|
message: r.message
|
|
1619
|
-
}), t.dirty()) : r.kind === "date" ?
|
|
1619
|
+
}), t.dirty()) : r.kind === "date" ? Ue.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1620
1620
|
code: f.invalid_string,
|
|
1621
1621
|
validation: "date",
|
|
1622
1622
|
message: r.message
|
|
1623
|
-
}), t.dirty()) : r.kind === "time" ?
|
|
1623
|
+
}), t.dirty()) : r.kind === "time" ? Ge(r).test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1624
1624
|
code: f.invalid_string,
|
|
1625
1625
|
validation: "time",
|
|
1626
1626
|
message: r.message
|
|
1627
|
-
}), t.dirty()) : r.kind === "duration" ?
|
|
1627
|
+
}), t.dirty()) : r.kind === "duration" ? Me.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1628
1628
|
validation: "duration",
|
|
1629
1629
|
code: f.invalid_string,
|
|
1630
1630
|
message: r.message
|
|
1631
|
-
}), t.dirty()) : r.kind === "ip" ?
|
|
1631
|
+
}), t.dirty()) : r.kind === "ip" ? qe(e.data, r.version) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1632
1632
|
validation: "ip",
|
|
1633
1633
|
code: f.invalid_string,
|
|
1634
1634
|
message: r.message
|
|
1635
|
-
}), t.dirty()) : r.kind === "jwt" ?
|
|
1635
|
+
}), t.dirty()) : r.kind === "jwt" ? Je(e.data, r.alg) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1636
1636
|
validation: "jwt",
|
|
1637
1637
|
code: f.invalid_string,
|
|
1638
1638
|
message: r.message
|
|
1639
|
-
}), t.dirty()) : r.kind === "cidr" ?
|
|
1639
|
+
}), t.dirty()) : r.kind === "cidr" ? Ye(e.data, r.version) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1640
1640
|
validation: "cidr",
|
|
1641
1641
|
code: f.invalid_string,
|
|
1642
1642
|
message: r.message
|
|
1643
|
-
}), t.dirty()) : r.kind === "base64" ?
|
|
1643
|
+
}), t.dirty()) : r.kind === "base64" ? Be.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1644
1644
|
validation: "base64",
|
|
1645
1645
|
code: f.invalid_string,
|
|
1646
1646
|
message: r.message
|
|
1647
|
-
}), t.dirty()) : r.kind === "base64url" ?
|
|
1647
|
+
}), t.dirty()) : r.kind === "base64url" ? Ve.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1648
1648
|
validation: "base64url",
|
|
1649
1649
|
code: f.invalid_string,
|
|
1650
1650
|
message: r.message
|
|
@@ -1913,17 +1913,17 @@ var Ye = class e extends C {
|
|
|
1913
1913
|
return e;
|
|
1914
1914
|
}
|
|
1915
1915
|
};
|
|
1916
|
-
|
|
1916
|
+
Xe.create = (e) => new Xe({
|
|
1917
1917
|
checks: [],
|
|
1918
1918
|
typeName: F.ZodString,
|
|
1919
1919
|
coerce: e?.coerce ?? !1,
|
|
1920
1920
|
...S(e)
|
|
1921
1921
|
});
|
|
1922
|
-
function
|
|
1922
|
+
function Ze(e, t) {
|
|
1923
1923
|
let n = (e.toString().split(".")[1] || "").length, r = (t.toString().split(".")[1] || "").length, i = n > r ? n : r;
|
|
1924
1924
|
return Number.parseInt(e.toFixed(i).replace(".", "")) % Number.parseInt(t.toFixed(i).replace(".", "")) / 10 ** i;
|
|
1925
1925
|
}
|
|
1926
|
-
var
|
|
1926
|
+
var Qe = class e extends C {
|
|
1927
1927
|
constructor() {
|
|
1928
1928
|
super(...arguments), this.min = this.gte, this.max = this.lte, this.step = this.multipleOf;
|
|
1929
1929
|
}
|
|
@@ -1956,7 +1956,7 @@ var Ze = class e extends C {
|
|
|
1956
1956
|
inclusive: r.inclusive,
|
|
1957
1957
|
exact: !1,
|
|
1958
1958
|
message: r.message
|
|
1959
|
-
}), n.dirty()) : r.kind === "multipleOf" ?
|
|
1959
|
+
}), n.dirty()) : r.kind === "multipleOf" ? Ze(e.data, r.value) !== 0 && (t = this._getOrReturnCtx(e, t), h(t, {
|
|
1960
1960
|
code: f.not_multiple_of,
|
|
1961
1961
|
multipleOf: r.value,
|
|
1962
1962
|
message: r.message
|
|
@@ -2082,13 +2082,13 @@ var Ze = class e extends C {
|
|
|
2082
2082
|
return Number.isFinite(t) && Number.isFinite(e);
|
|
2083
2083
|
}
|
|
2084
2084
|
};
|
|
2085
|
-
|
|
2085
|
+
Qe.create = (e) => new Qe({
|
|
2086
2086
|
checks: [],
|
|
2087
2087
|
typeName: F.ZodNumber,
|
|
2088
2088
|
coerce: e?.coerce || !1,
|
|
2089
2089
|
...S(e)
|
|
2090
2090
|
});
|
|
2091
|
-
var
|
|
2091
|
+
var $e = class e extends C {
|
|
2092
2092
|
constructor() {
|
|
2093
2093
|
super(...arguments), this.min = this.gte, this.max = this.lte;
|
|
2094
2094
|
}
|
|
@@ -2209,13 +2209,13 @@ var Qe = class e extends C {
|
|
|
2209
2209
|
return e;
|
|
2210
2210
|
}
|
|
2211
2211
|
};
|
|
2212
|
-
|
|
2212
|
+
$e.create = (e) => new $e({
|
|
2213
2213
|
checks: [],
|
|
2214
2214
|
typeName: F.ZodBigInt,
|
|
2215
2215
|
coerce: e?.coerce ?? !1,
|
|
2216
2216
|
...S(e)
|
|
2217
2217
|
});
|
|
2218
|
-
var
|
|
2218
|
+
var et = class extends C {
|
|
2219
2219
|
_parse(e) {
|
|
2220
2220
|
if (this._def.coerce && (e.data = !!e.data), this._getType(e) !== u.boolean) {
|
|
2221
2221
|
let t = this._getOrReturnCtx(e);
|
|
@@ -2228,12 +2228,12 @@ var $e = class extends C {
|
|
|
2228
2228
|
return v(e.data);
|
|
2229
2229
|
}
|
|
2230
2230
|
};
|
|
2231
|
-
|
|
2231
|
+
et.create = (e) => new et({
|
|
2232
2232
|
typeName: F.ZodBoolean,
|
|
2233
2233
|
coerce: e?.coerce || !1,
|
|
2234
2234
|
...S(e)
|
|
2235
2235
|
});
|
|
2236
|
-
var
|
|
2236
|
+
var tt = class e extends C {
|
|
2237
2237
|
_parse(e) {
|
|
2238
2238
|
if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== u.date) {
|
|
2239
2239
|
let t = this._getOrReturnCtx(e);
|
|
@@ -2296,13 +2296,13 @@ var et = class e extends C {
|
|
|
2296
2296
|
return e == null ? null : new Date(e);
|
|
2297
2297
|
}
|
|
2298
2298
|
};
|
|
2299
|
-
|
|
2299
|
+
tt.create = (e) => new tt({
|
|
2300
2300
|
checks: [],
|
|
2301
2301
|
coerce: e?.coerce || !1,
|
|
2302
2302
|
typeName: F.ZodDate,
|
|
2303
2303
|
...S(e)
|
|
2304
2304
|
});
|
|
2305
|
-
var
|
|
2305
|
+
var nt = class extends C {
|
|
2306
2306
|
_parse(e) {
|
|
2307
2307
|
if (this._getType(e) !== u.symbol) {
|
|
2308
2308
|
let t = this._getOrReturnCtx(e);
|
|
@@ -2315,11 +2315,11 @@ var tt = class extends C {
|
|
|
2315
2315
|
return v(e.data);
|
|
2316
2316
|
}
|
|
2317
2317
|
};
|
|
2318
|
-
|
|
2318
|
+
nt.create = (e) => new nt({
|
|
2319
2319
|
typeName: F.ZodSymbol,
|
|
2320
2320
|
...S(e)
|
|
2321
2321
|
});
|
|
2322
|
-
var
|
|
2322
|
+
var rt = class extends C {
|
|
2323
2323
|
_parse(e) {
|
|
2324
2324
|
if (this._getType(e) !== u.undefined) {
|
|
2325
2325
|
let t = this._getOrReturnCtx(e);
|
|
@@ -2332,11 +2332,11 @@ var nt = class extends C {
|
|
|
2332
2332
|
return v(e.data);
|
|
2333
2333
|
}
|
|
2334
2334
|
};
|
|
2335
|
-
|
|
2335
|
+
rt.create = (e) => new rt({
|
|
2336
2336
|
typeName: F.ZodUndefined,
|
|
2337
2337
|
...S(e)
|
|
2338
2338
|
});
|
|
2339
|
-
var
|
|
2339
|
+
var it = class extends C {
|
|
2340
2340
|
_parse(e) {
|
|
2341
2341
|
if (this._getType(e) !== u.null) {
|
|
2342
2342
|
let t = this._getOrReturnCtx(e);
|
|
@@ -2349,11 +2349,11 @@ var rt = class extends C {
|
|
|
2349
2349
|
return v(e.data);
|
|
2350
2350
|
}
|
|
2351
2351
|
};
|
|
2352
|
-
|
|
2352
|
+
it.create = (e) => new it({
|
|
2353
2353
|
typeName: F.ZodNull,
|
|
2354
2354
|
...S(e)
|
|
2355
2355
|
});
|
|
2356
|
-
var
|
|
2356
|
+
var at = class extends C {
|
|
2357
2357
|
constructor() {
|
|
2358
2358
|
super(...arguments), this._any = !0;
|
|
2359
2359
|
}
|
|
@@ -2361,7 +2361,7 @@ var it = class extends C {
|
|
|
2361
2361
|
return v(e.data);
|
|
2362
2362
|
}
|
|
2363
2363
|
};
|
|
2364
|
-
|
|
2364
|
+
at.create = (e) => new at({
|
|
2365
2365
|
typeName: F.ZodAny,
|
|
2366
2366
|
...S(e)
|
|
2367
2367
|
});
|
|
@@ -2391,7 +2391,7 @@ T.create = (e) => new T({
|
|
|
2391
2391
|
typeName: F.ZodNever,
|
|
2392
2392
|
...S(e)
|
|
2393
2393
|
});
|
|
2394
|
-
var
|
|
2394
|
+
var ot = class extends C {
|
|
2395
2395
|
_parse(e) {
|
|
2396
2396
|
if (this._getType(e) !== u.undefined) {
|
|
2397
2397
|
let t = this._getOrReturnCtx(e);
|
|
@@ -2404,7 +2404,7 @@ var at = class extends C {
|
|
|
2404
2404
|
return v(e.data);
|
|
2405
2405
|
}
|
|
2406
2406
|
};
|
|
2407
|
-
|
|
2407
|
+
ot.create = (e) => new ot({
|
|
2408
2408
|
typeName: F.ZodVoid,
|
|
2409
2409
|
...S(e)
|
|
2410
2410
|
});
|
|
@@ -2682,7 +2682,7 @@ var O = class e extends C {
|
|
|
2682
2682
|
});
|
|
2683
2683
|
}
|
|
2684
2684
|
keyof() {
|
|
2685
|
-
return
|
|
2685
|
+
return _t(l.objectKeys(this.shape));
|
|
2686
2686
|
}
|
|
2687
2687
|
};
|
|
2688
2688
|
O.create = (e, t) => new O({
|
|
@@ -2704,7 +2704,7 @@ O.create = (e, t) => new O({
|
|
|
2704
2704
|
typeName: F.ZodObject,
|
|
2705
2705
|
...S(t)
|
|
2706
2706
|
});
|
|
2707
|
-
var
|
|
2707
|
+
var st = class extends C {
|
|
2708
2708
|
_parse(e) {
|
|
2709
2709
|
let { ctx: t } = this._processInputParams(e), n = this._def.options;
|
|
2710
2710
|
function r(e) {
|
|
@@ -2767,12 +2767,12 @@ var ot = class extends C {
|
|
|
2767
2767
|
return this._def.options;
|
|
2768
2768
|
}
|
|
2769
2769
|
};
|
|
2770
|
-
|
|
2770
|
+
st.create = (e, t) => new st({
|
|
2771
2771
|
options: e,
|
|
2772
2772
|
typeName: F.ZodUnion,
|
|
2773
2773
|
...S(t)
|
|
2774
2774
|
});
|
|
2775
|
-
var k = (e) => e instanceof
|
|
2775
|
+
var k = (e) => e instanceof ht ? k(e.schema) : e instanceof M ? k(e.innerType()) : e instanceof gt ? [e.value] : e instanceof vt ? e.options : e instanceof yt ? l.objectValues(e.enum) : e instanceof bt ? k(e._def.innerType) : e instanceof rt ? [void 0] : e instanceof it ? [null] : e instanceof N ? [void 0, ...k(e.unwrap())] : e instanceof P ? [null, ...k(e.unwrap())] : e instanceof Ct || e instanceof Tt ? k(e.unwrap()) : e instanceof xt ? k(e._def.innerType) : [], ct = class e extends C {
|
|
2776
2776
|
_parse(e) {
|
|
2777
2777
|
let { ctx: t } = this._processInputParams(e);
|
|
2778
2778
|
if (t.parsedType !== u.object) return h(t, {
|
|
@@ -2823,7 +2823,7 @@ var k = (e) => e instanceof mt ? k(e.schema) : e instanceof M ? k(e.innerType())
|
|
|
2823
2823
|
});
|
|
2824
2824
|
}
|
|
2825
2825
|
};
|
|
2826
|
-
function
|
|
2826
|
+
function lt(e, t) {
|
|
2827
2827
|
let n = d(e), r = d(t);
|
|
2828
2828
|
if (e === t) return {
|
|
2829
2829
|
valid: !0,
|
|
@@ -2835,7 +2835,7 @@ function ct(e, t) {
|
|
|
2835
2835
|
...t
|
|
2836
2836
|
};
|
|
2837
2837
|
for (let n of r) {
|
|
2838
|
-
let r =
|
|
2838
|
+
let r = lt(e[n], t[n]);
|
|
2839
2839
|
if (!r.valid) return { valid: !1 };
|
|
2840
2840
|
i[n] = r.data;
|
|
2841
2841
|
}
|
|
@@ -2848,7 +2848,7 @@ function ct(e, t) {
|
|
|
2848
2848
|
if (e.length !== t.length) return { valid: !1 };
|
|
2849
2849
|
let n = [];
|
|
2850
2850
|
for (let r = 0; r < e.length; r++) {
|
|
2851
|
-
let i = e[r], a = t[r], o =
|
|
2851
|
+
let i = e[r], a = t[r], o = lt(i, a);
|
|
2852
2852
|
if (!o.valid) return { valid: !1 };
|
|
2853
2853
|
n.push(o.data);
|
|
2854
2854
|
}
|
|
@@ -2862,12 +2862,12 @@ function ct(e, t) {
|
|
|
2862
2862
|
data: e
|
|
2863
2863
|
} : { valid: !1 };
|
|
2864
2864
|
}
|
|
2865
|
-
var
|
|
2865
|
+
var ut = class extends C {
|
|
2866
2866
|
_parse(e) {
|
|
2867
2867
|
let { status: t, ctx: n } = this._processInputParams(e), r = (e, r) => {
|
|
2868
|
-
if (
|
|
2869
|
-
let i =
|
|
2870
|
-
return i.valid ? ((
|
|
2868
|
+
if (Se(e) || Se(r)) return _;
|
|
2869
|
+
let i = lt(e.value, r.value);
|
|
2870
|
+
return i.valid ? ((Ce(e) || Ce(r)) && t.dirty(), {
|
|
2871
2871
|
status: t.value,
|
|
2872
2872
|
value: i.data
|
|
2873
2873
|
}) : (h(n, { code: f.invalid_intersection_types }), _);
|
|
@@ -2891,7 +2891,7 @@ var lt = class extends C {
|
|
|
2891
2891
|
}));
|
|
2892
2892
|
}
|
|
2893
2893
|
};
|
|
2894
|
-
|
|
2894
|
+
ut.create = (e, t, n) => new ut({
|
|
2895
2895
|
left: e,
|
|
2896
2896
|
right: t,
|
|
2897
2897
|
typeName: F.ZodIntersection,
|
|
@@ -2944,7 +2944,7 @@ A.create = (e, t) => {
|
|
|
2944
2944
|
...S(t)
|
|
2945
2945
|
});
|
|
2946
2946
|
};
|
|
2947
|
-
var
|
|
2947
|
+
var dt = class e extends C {
|
|
2948
2948
|
get keySchema() {
|
|
2949
2949
|
return this._def.keyType;
|
|
2950
2950
|
}
|
|
@@ -2976,13 +2976,13 @@ var ut = class e extends C {
|
|
|
2976
2976
|
typeName: F.ZodRecord,
|
|
2977
2977
|
...S(r)
|
|
2978
2978
|
}) : new e({
|
|
2979
|
-
keyType:
|
|
2979
|
+
keyType: Xe.create(),
|
|
2980
2980
|
valueType: t,
|
|
2981
2981
|
typeName: F.ZodRecord,
|
|
2982
2982
|
...S(n)
|
|
2983
2983
|
});
|
|
2984
2984
|
}
|
|
2985
|
-
},
|
|
2985
|
+
}, ft = class extends C {
|
|
2986
2986
|
get keySchema() {
|
|
2987
2987
|
return this._def.keyType;
|
|
2988
2988
|
}
|
|
@@ -3028,13 +3028,13 @@ var ut = class e extends C {
|
|
|
3028
3028
|
}
|
|
3029
3029
|
}
|
|
3030
3030
|
};
|
|
3031
|
-
|
|
3031
|
+
ft.create = (e, t, n) => new ft({
|
|
3032
3032
|
valueType: t,
|
|
3033
3033
|
keyType: e,
|
|
3034
3034
|
typeName: F.ZodMap,
|
|
3035
3035
|
...S(n)
|
|
3036
3036
|
});
|
|
3037
|
-
var
|
|
3037
|
+
var pt = class e extends C {
|
|
3038
3038
|
_parse(e) {
|
|
3039
3039
|
let { status: t, ctx: n } = this._processInputParams(e);
|
|
3040
3040
|
if (n.parsedType !== u.set) return h(n, {
|
|
@@ -3098,14 +3098,14 @@ var ft = class e extends C {
|
|
|
3098
3098
|
return this.min(1, e);
|
|
3099
3099
|
}
|
|
3100
3100
|
};
|
|
3101
|
-
|
|
3101
|
+
pt.create = (e, t) => new pt({
|
|
3102
3102
|
valueType: e,
|
|
3103
3103
|
minSize: null,
|
|
3104
3104
|
maxSize: null,
|
|
3105
3105
|
typeName: F.ZodSet,
|
|
3106
3106
|
...S(t)
|
|
3107
3107
|
});
|
|
3108
|
-
var
|
|
3108
|
+
var mt = class e extends C {
|
|
3109
3109
|
constructor() {
|
|
3110
3110
|
super(...arguments), this.validate = this.implement;
|
|
3111
3111
|
}
|
|
@@ -3117,13 +3117,13 @@ var pt = class e extends C {
|
|
|
3117
3117
|
received: t.parsedType
|
|
3118
3118
|
}), _;
|
|
3119
3119
|
function n(e, n) {
|
|
3120
|
-
return
|
|
3120
|
+
return be({
|
|
3121
3121
|
data: e,
|
|
3122
3122
|
path: t.path,
|
|
3123
3123
|
errorMaps: [
|
|
3124
3124
|
t.common.contextualErrorMap,
|
|
3125
3125
|
t.schemaErrorMap,
|
|
3126
|
-
|
|
3126
|
+
ye(),
|
|
3127
3127
|
m
|
|
3128
3128
|
].filter((e) => !!e),
|
|
3129
3129
|
issueData: {
|
|
@@ -3133,13 +3133,13 @@ var pt = class e extends C {
|
|
|
3133
3133
|
});
|
|
3134
3134
|
}
|
|
3135
3135
|
function r(e, n) {
|
|
3136
|
-
return
|
|
3136
|
+
return be({
|
|
3137
3137
|
data: e,
|
|
3138
3138
|
path: t.path,
|
|
3139
3139
|
errorMaps: [
|
|
3140
3140
|
t.common.contextualErrorMap,
|
|
3141
3141
|
t.schemaErrorMap,
|
|
3142
|
-
|
|
3142
|
+
ye(),
|
|
3143
3143
|
m
|
|
3144
3144
|
].filter((e) => !!e),
|
|
3145
3145
|
issueData: {
|
|
@@ -3203,7 +3203,7 @@ var pt = class e extends C {
|
|
|
3203
3203
|
...S(r)
|
|
3204
3204
|
});
|
|
3205
3205
|
}
|
|
3206
|
-
},
|
|
3206
|
+
}, ht = class extends C {
|
|
3207
3207
|
get schema() {
|
|
3208
3208
|
return this._def.getter();
|
|
3209
3209
|
}
|
|
@@ -3216,12 +3216,12 @@ var pt = class e extends C {
|
|
|
3216
3216
|
});
|
|
3217
3217
|
}
|
|
3218
3218
|
};
|
|
3219
|
-
|
|
3219
|
+
ht.create = (e, t) => new ht({
|
|
3220
3220
|
getter: e,
|
|
3221
3221
|
typeName: F.ZodLazy,
|
|
3222
3222
|
...S(t)
|
|
3223
3223
|
});
|
|
3224
|
-
var
|
|
3224
|
+
var gt = class extends C {
|
|
3225
3225
|
_parse(e) {
|
|
3226
3226
|
if (e.data !== this._def.value) {
|
|
3227
3227
|
let t = this._getOrReturnCtx(e);
|
|
@@ -3240,19 +3240,19 @@ var ht = class extends C {
|
|
|
3240
3240
|
return this._def.value;
|
|
3241
3241
|
}
|
|
3242
3242
|
};
|
|
3243
|
-
|
|
3243
|
+
gt.create = (e, t) => new gt({
|
|
3244
3244
|
value: e,
|
|
3245
3245
|
typeName: F.ZodLiteral,
|
|
3246
3246
|
...S(t)
|
|
3247
3247
|
});
|
|
3248
|
-
function
|
|
3249
|
-
return new
|
|
3248
|
+
function _t(e, t) {
|
|
3249
|
+
return new vt({
|
|
3250
3250
|
values: e,
|
|
3251
3251
|
typeName: F.ZodEnum,
|
|
3252
3252
|
...S(t)
|
|
3253
3253
|
});
|
|
3254
3254
|
}
|
|
3255
|
-
var
|
|
3255
|
+
var vt = class e extends C {
|
|
3256
3256
|
_parse(e) {
|
|
3257
3257
|
if (typeof e.data != "string") {
|
|
3258
3258
|
let t = this._getOrReturnCtx(e), n = this._def.values;
|
|
@@ -3303,8 +3303,8 @@ var _t = class e extends C {
|
|
|
3303
3303
|
});
|
|
3304
3304
|
}
|
|
3305
3305
|
};
|
|
3306
|
-
|
|
3307
|
-
var
|
|
3306
|
+
vt.create = _t;
|
|
3307
|
+
var yt = class extends C {
|
|
3308
3308
|
_parse(e) {
|
|
3309
3309
|
let t = l.getValidEnumValues(this._def.values), n = this._getOrReturnCtx(e);
|
|
3310
3310
|
if (n.parsedType !== u.string && n.parsedType !== u.number) {
|
|
@@ -3329,7 +3329,7 @@ var vt = class extends C {
|
|
|
3329
3329
|
return this._def.values;
|
|
3330
3330
|
}
|
|
3331
3331
|
};
|
|
3332
|
-
|
|
3332
|
+
yt.create = (e, t) => new yt({
|
|
3333
3333
|
values: e,
|
|
3334
3334
|
typeName: F.ZodNativeEnum,
|
|
3335
3335
|
...S(t)
|
|
@@ -3380,7 +3380,7 @@ var M = class extends C {
|
|
|
3380
3380
|
path: n.path,
|
|
3381
3381
|
parent: n
|
|
3382
3382
|
});
|
|
3383
|
-
return r.status === "aborted" ? _ : r.status === "dirty" || t.value === "dirty" ?
|
|
3383
|
+
return r.status === "aborted" ? _ : r.status === "dirty" || t.value === "dirty" ? xe(r.value) : r;
|
|
3384
3384
|
});
|
|
3385
3385
|
{
|
|
3386
3386
|
if (t.value === "aborted") return _;
|
|
@@ -3389,7 +3389,7 @@ var M = class extends C {
|
|
|
3389
3389
|
path: n.path,
|
|
3390
3390
|
parent: n
|
|
3391
3391
|
});
|
|
3392
|
-
return r.status === "aborted" ? _ : r.status === "dirty" || t.value === "dirty" ?
|
|
3392
|
+
return r.status === "aborted" ? _ : r.status === "dirty" || t.value === "dirty" ? xe(r.value) : r;
|
|
3393
3393
|
}
|
|
3394
3394
|
}
|
|
3395
3395
|
if (r.type === "refinement") {
|
|
@@ -3486,7 +3486,7 @@ P.create = (e, t) => new P({
|
|
|
3486
3486
|
typeName: F.ZodNullable,
|
|
3487
3487
|
...S(t)
|
|
3488
3488
|
});
|
|
3489
|
-
var
|
|
3489
|
+
var bt = class extends C {
|
|
3490
3490
|
_parse(e) {
|
|
3491
3491
|
let { ctx: t } = this._processInputParams(e), n = t.data;
|
|
3492
3492
|
return t.parsedType === u.undefined && (n = this._def.defaultValue()), this._def.innerType._parse({
|
|
@@ -3499,13 +3499,13 @@ var yt = class extends C {
|
|
|
3499
3499
|
return this._def.innerType;
|
|
3500
3500
|
}
|
|
3501
3501
|
};
|
|
3502
|
-
|
|
3502
|
+
bt.create = (e, t) => new bt({
|
|
3503
3503
|
innerType: e,
|
|
3504
3504
|
typeName: F.ZodDefault,
|
|
3505
3505
|
defaultValue: typeof t.default == "function" ? t.default : () => t.default,
|
|
3506
3506
|
...S(t)
|
|
3507
3507
|
});
|
|
3508
|
-
var
|
|
3508
|
+
var xt = class extends C {
|
|
3509
3509
|
_parse(e) {
|
|
3510
3510
|
let { ctx: t } = this._processInputParams(e), n = {
|
|
3511
3511
|
...t,
|
|
@@ -3518,7 +3518,7 @@ var bt = class extends C {
|
|
|
3518
3518
|
path: n.path,
|
|
3519
3519
|
parent: { ...n }
|
|
3520
3520
|
});
|
|
3521
|
-
return
|
|
3521
|
+
return we(r) ? r.then((e) => ({
|
|
3522
3522
|
status: "valid",
|
|
3523
3523
|
value: e.status === "valid" ? e.value : this._def.catchValue({
|
|
3524
3524
|
get error() {
|
|
@@ -3540,13 +3540,13 @@ var bt = class extends C {
|
|
|
3540
3540
|
return this._def.innerType;
|
|
3541
3541
|
}
|
|
3542
3542
|
};
|
|
3543
|
-
|
|
3543
|
+
xt.create = (e, t) => new xt({
|
|
3544
3544
|
innerType: e,
|
|
3545
3545
|
typeName: F.ZodCatch,
|
|
3546
3546
|
catchValue: typeof t.catch == "function" ? t.catch : () => t.catch,
|
|
3547
3547
|
...S(t)
|
|
3548
3548
|
});
|
|
3549
|
-
var
|
|
3549
|
+
var St = class extends C {
|
|
3550
3550
|
_parse(e) {
|
|
3551
3551
|
if (this._getType(e) !== u.nan) {
|
|
3552
3552
|
let t = this._getOrReturnCtx(e);
|
|
@@ -3562,11 +3562,11 @@ var xt = class extends C {
|
|
|
3562
3562
|
};
|
|
3563
3563
|
}
|
|
3564
3564
|
};
|
|
3565
|
-
|
|
3565
|
+
St.create = (e) => new St({
|
|
3566
3566
|
typeName: F.ZodNaN,
|
|
3567
3567
|
...S(e)
|
|
3568
3568
|
});
|
|
3569
|
-
var
|
|
3569
|
+
var Ct = class extends C {
|
|
3570
3570
|
_parse(e) {
|
|
3571
3571
|
let { ctx: t } = this._processInputParams(e), n = t.data;
|
|
3572
3572
|
return this._def.type._parse({
|
|
@@ -3578,7 +3578,7 @@ var St = class extends C {
|
|
|
3578
3578
|
unwrap() {
|
|
3579
3579
|
return this._def.type;
|
|
3580
3580
|
}
|
|
3581
|
-
},
|
|
3581
|
+
}, wt = class e extends C {
|
|
3582
3582
|
_parse(e) {
|
|
3583
3583
|
let { status: t, ctx: n } = this._processInputParams(e);
|
|
3584
3584
|
if (n.common.async) return (async () => {
|
|
@@ -3587,7 +3587,7 @@ var St = class extends C {
|
|
|
3587
3587
|
path: n.path,
|
|
3588
3588
|
parent: n
|
|
3589
3589
|
});
|
|
3590
|
-
return e.status === "aborted" ? _ : e.status === "dirty" ? (t.dirty(),
|
|
3590
|
+
return e.status === "aborted" ? _ : e.status === "dirty" ? (t.dirty(), xe(e.value)) : this._def.out._parseAsync({
|
|
3591
3591
|
data: e.value,
|
|
3592
3592
|
path: n.path,
|
|
3593
3593
|
parent: n
|
|
@@ -3616,16 +3616,16 @@ var St = class extends C {
|
|
|
3616
3616
|
typeName: F.ZodPipeline
|
|
3617
3617
|
});
|
|
3618
3618
|
}
|
|
3619
|
-
},
|
|
3619
|
+
}, Tt = class extends C {
|
|
3620
3620
|
_parse(e) {
|
|
3621
3621
|
let t = this._def.innerType._parse(e), n = (e) => (y(e) && (e.value = Object.freeze(e.value)), e);
|
|
3622
|
-
return
|
|
3622
|
+
return we(t) ? t.then((e) => n(e)) : n(t);
|
|
3623
3623
|
}
|
|
3624
3624
|
unwrap() {
|
|
3625
3625
|
return this._def.innerType;
|
|
3626
3626
|
}
|
|
3627
3627
|
};
|
|
3628
|
-
|
|
3628
|
+
Tt.create = (e, t) => new Tt({
|
|
3629
3629
|
innerType: e,
|
|
3630
3630
|
typeName: F.ZodReadonly,
|
|
3631
3631
|
...S(t)
|
|
@@ -3634,21 +3634,21 @@ var F;
|
|
|
3634
3634
|
(function(e) {
|
|
3635
3635
|
e.ZodString = "ZodString", e.ZodNumber = "ZodNumber", e.ZodNaN = "ZodNaN", e.ZodBigInt = "ZodBigInt", e.ZodBoolean = "ZodBoolean", e.ZodDate = "ZodDate", e.ZodSymbol = "ZodSymbol", e.ZodUndefined = "ZodUndefined", e.ZodNull = "ZodNull", e.ZodAny = "ZodAny", e.ZodUnknown = "ZodUnknown", e.ZodNever = "ZodNever", e.ZodVoid = "ZodVoid", e.ZodArray = "ZodArray", e.ZodObject = "ZodObject", e.ZodUnion = "ZodUnion", e.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", e.ZodIntersection = "ZodIntersection", e.ZodTuple = "ZodTuple", e.ZodRecord = "ZodRecord", e.ZodMap = "ZodMap", e.ZodSet = "ZodSet", e.ZodFunction = "ZodFunction", e.ZodLazy = "ZodLazy", e.ZodLiteral = "ZodLiteral", e.ZodEnum = "ZodEnum", e.ZodEffects = "ZodEffects", e.ZodNativeEnum = "ZodNativeEnum", e.ZodOptional = "ZodOptional", e.ZodNullable = "ZodNullable", e.ZodDefault = "ZodDefault", e.ZodCatch = "ZodCatch", e.ZodPromise = "ZodPromise", e.ZodBranded = "ZodBranded", e.ZodPipeline = "ZodPipeline", e.ZodReadonly = "ZodReadonly";
|
|
3636
3636
|
})(F ||= {});
|
|
3637
|
-
var I =
|
|
3638
|
-
|
|
3639
|
-
var R =
|
|
3640
|
-
|
|
3641
|
-
var
|
|
3642
|
-
T.create,
|
|
3637
|
+
var I = Xe.create, L = Qe.create;
|
|
3638
|
+
St.create, $e.create;
|
|
3639
|
+
var R = et.create;
|
|
3640
|
+
tt.create, nt.create, rt.create, it.create, at.create;
|
|
3641
|
+
var Et = w.create;
|
|
3642
|
+
T.create, ot.create;
|
|
3643
3643
|
var z = E.create, B = O.create;
|
|
3644
|
-
O.strictCreate,
|
|
3645
|
-
var V =
|
|
3646
|
-
|
|
3647
|
-
var H =
|
|
3648
|
-
|
|
3644
|
+
O.strictCreate, st.create, ct.create, ut.create, A.create;
|
|
3645
|
+
var V = dt.create;
|
|
3646
|
+
ft.create, pt.create, mt.create, ht.create, gt.create;
|
|
3647
|
+
var H = vt.create;
|
|
3648
|
+
yt.create, j.create, M.create, N.create, P.create, M.createWithPreprocess, wt.create;
|
|
3649
3649
|
//#endregion
|
|
3650
3650
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/Options.js
|
|
3651
|
-
var
|
|
3651
|
+
var Dt = Symbol("Let zodToJsonSchema decide on which parser to use"), Ot = {
|
|
3652
3652
|
name: void 0,
|
|
3653
3653
|
$refStrategy: "root",
|
|
3654
3654
|
basePath: ["#"],
|
|
@@ -3671,14 +3671,14 @@ var Et = Symbol("Let zodToJsonSchema decide on which parser to use"), Dt = {
|
|
|
3671
3671
|
base64Strategy: "contentEncoding:base64",
|
|
3672
3672
|
nameStrategy: "ref",
|
|
3673
3673
|
openAiAnyTypeName: "OpenAiAnyType"
|
|
3674
|
-
},
|
|
3675
|
-
...
|
|
3674
|
+
}, kt = (e) => typeof e == "string" ? {
|
|
3675
|
+
...Ot,
|
|
3676
3676
|
name: e
|
|
3677
3677
|
} : {
|
|
3678
|
-
...
|
|
3678
|
+
...Ot,
|
|
3679
3679
|
...e
|
|
3680
|
-
},
|
|
3681
|
-
let t =
|
|
3680
|
+
}, At = (e) => {
|
|
3681
|
+
let t = kt(e), n = t.name === void 0 ? t.basePath : [
|
|
3682
3682
|
...t.basePath,
|
|
3683
3683
|
t.definitionPath,
|
|
3684
3684
|
t.name
|
|
@@ -3701,18 +3701,18 @@ var Et = Symbol("Let zodToJsonSchema decide on which parser to use"), Dt = {
|
|
|
3701
3701
|
};
|
|
3702
3702
|
//#endregion
|
|
3703
3703
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/errorMessages.js
|
|
3704
|
-
function
|
|
3704
|
+
function jt(e, t, n, r) {
|
|
3705
3705
|
r?.errorMessages && n && (e.errorMessage = {
|
|
3706
3706
|
...e.errorMessage,
|
|
3707
3707
|
[t]: n
|
|
3708
3708
|
});
|
|
3709
3709
|
}
|
|
3710
3710
|
function U(e, t, n, r, i) {
|
|
3711
|
-
e[t] = n,
|
|
3711
|
+
e[t] = n, jt(e, t, r, i);
|
|
3712
3712
|
}
|
|
3713
3713
|
//#endregion
|
|
3714
3714
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js
|
|
3715
|
-
var
|
|
3715
|
+
var Mt = (e, t) => {
|
|
3716
3716
|
let n = 0;
|
|
3717
3717
|
for (; n < e.length && n < t.length && e[n] === t[n]; n++);
|
|
3718
3718
|
return [(e.length - n).toString(), ...t.slice(n)].join("/");
|
|
@@ -3726,11 +3726,11 @@ function W(e) {
|
|
|
3726
3726
|
e.definitionPath,
|
|
3727
3727
|
e.openAiAnyTypeName
|
|
3728
3728
|
];
|
|
3729
|
-
return e.flags.hasReferencedOpenAiAnyType = !0, { $ref: e.$refStrategy === "relative" ?
|
|
3729
|
+
return e.flags.hasReferencedOpenAiAnyType = !0, { $ref: e.$refStrategy === "relative" ? Mt(t, e.currentPath) : t.join("/") };
|
|
3730
3730
|
}
|
|
3731
3731
|
//#endregion
|
|
3732
3732
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/array.js
|
|
3733
|
-
function
|
|
3733
|
+
function Nt(e, t) {
|
|
3734
3734
|
let n = { type: "array" };
|
|
3735
3735
|
return e.type?._def && e.type?._def?.typeName !== F.ZodAny && (n.items = J(e.type._def, {
|
|
3736
3736
|
...t,
|
|
@@ -3739,7 +3739,7 @@ function Mt(e, t) {
|
|
|
3739
3739
|
}
|
|
3740
3740
|
//#endregion
|
|
3741
3741
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js
|
|
3742
|
-
function
|
|
3742
|
+
function Pt(e, t) {
|
|
3743
3743
|
let n = {
|
|
3744
3744
|
type: "integer",
|
|
3745
3745
|
format: "int64"
|
|
@@ -3758,22 +3758,22 @@ function Nt(e, t) {
|
|
|
3758
3758
|
}
|
|
3759
3759
|
//#endregion
|
|
3760
3760
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js
|
|
3761
|
-
function
|
|
3761
|
+
function Ft() {
|
|
3762
3762
|
return { type: "boolean" };
|
|
3763
3763
|
}
|
|
3764
3764
|
//#endregion
|
|
3765
3765
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js
|
|
3766
|
-
function
|
|
3766
|
+
function It(e, t) {
|
|
3767
3767
|
return J(e.type._def, t);
|
|
3768
3768
|
}
|
|
3769
3769
|
//#endregion
|
|
3770
3770
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js
|
|
3771
|
-
var
|
|
3771
|
+
var Lt = (e, t) => J(e.innerType._def, t);
|
|
3772
3772
|
//#endregion
|
|
3773
3773
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/date.js
|
|
3774
|
-
function
|
|
3774
|
+
function Rt(e, t, n) {
|
|
3775
3775
|
let r = n ?? t.dateStrategy;
|
|
3776
|
-
if (Array.isArray(r)) return { anyOf: r.map((n, r) =>
|
|
3776
|
+
if (Array.isArray(r)) return { anyOf: r.map((n, r) => Rt(e, t, n)) };
|
|
3777
3777
|
switch (r) {
|
|
3778
3778
|
case "string":
|
|
3779
3779
|
case "format:date-time": return {
|
|
@@ -3784,10 +3784,10 @@ function Lt(e, t, n) {
|
|
|
3784
3784
|
type: "string",
|
|
3785
3785
|
format: "date"
|
|
3786
3786
|
};
|
|
3787
|
-
case "integer": return
|
|
3787
|
+
case "integer": return zt(e, t);
|
|
3788
3788
|
}
|
|
3789
3789
|
}
|
|
3790
|
-
var
|
|
3790
|
+
var zt = (e, t) => {
|
|
3791
3791
|
let n = {
|
|
3792
3792
|
type: "integer",
|
|
3793
3793
|
format: "unix-time"
|
|
@@ -3803,7 +3803,7 @@ var Rt = (e, t) => {
|
|
|
3803
3803
|
};
|
|
3804
3804
|
//#endregion
|
|
3805
3805
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/default.js
|
|
3806
|
-
function
|
|
3806
|
+
function Bt(e, t) {
|
|
3807
3807
|
return {
|
|
3808
3808
|
...J(e.innerType._def, t),
|
|
3809
3809
|
default: e.defaultValue()
|
|
@@ -3811,12 +3811,12 @@ function zt(e, t) {
|
|
|
3811
3811
|
}
|
|
3812
3812
|
//#endregion
|
|
3813
3813
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js
|
|
3814
|
-
function
|
|
3814
|
+
function Vt(e, t) {
|
|
3815
3815
|
return t.effectStrategy === "input" ? J(e.schema._def, t) : W(t);
|
|
3816
3816
|
}
|
|
3817
3817
|
//#endregion
|
|
3818
3818
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js
|
|
3819
|
-
function
|
|
3819
|
+
function Ht(e) {
|
|
3820
3820
|
return {
|
|
3821
3821
|
type: "string",
|
|
3822
3822
|
enum: Array.from(e.values)
|
|
@@ -3824,8 +3824,8 @@ function Vt(e) {
|
|
|
3824
3824
|
}
|
|
3825
3825
|
//#endregion
|
|
3826
3826
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js
|
|
3827
|
-
var
|
|
3828
|
-
function
|
|
3827
|
+
var Ut = (e) => "type" in e && e.type === "string" ? !1 : "allOf" in e;
|
|
3828
|
+
function Wt(e, t) {
|
|
3829
3829
|
let n = [J(e.left._def, {
|
|
3830
3830
|
...t,
|
|
3831
3831
|
currentPath: [
|
|
@@ -3842,7 +3842,7 @@ function Ut(e, t) {
|
|
|
3842
3842
|
]
|
|
3843
3843
|
})].filter((e) => !!e), r = t.target === "jsonSchema2019-09" ? { unevaluatedProperties: !1 } : void 0, i = [];
|
|
3844
3844
|
return n.forEach((e) => {
|
|
3845
|
-
if (
|
|
3845
|
+
if (Ut(e)) i.push(...e.allOf), e.unevaluatedProperties === void 0 && (r = void 0);
|
|
3846
3846
|
else {
|
|
3847
3847
|
let t = e;
|
|
3848
3848
|
if ("additionalProperties" in e && e.additionalProperties === !1) {
|
|
@@ -3858,7 +3858,7 @@ function Ut(e, t) {
|
|
|
3858
3858
|
}
|
|
3859
3859
|
//#endregion
|
|
3860
3860
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js
|
|
3861
|
-
function
|
|
3861
|
+
function Gt(e, t) {
|
|
3862
3862
|
let n = typeof e.value;
|
|
3863
3863
|
return n !== "bigint" && n !== "number" && n !== "boolean" && n !== "string" ? { type: Array.isArray(e.value) ? "array" : "object" } : t.target === "openApi3" ? {
|
|
3864
3864
|
type: n === "bigint" ? "integer" : n,
|
|
@@ -3870,12 +3870,12 @@ function Wt(e, t) {
|
|
|
3870
3870
|
}
|
|
3871
3871
|
//#endregion
|
|
3872
3872
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/string.js
|
|
3873
|
-
var
|
|
3873
|
+
var Kt = void 0, G = {
|
|
3874
3874
|
cuid: /^[cC][^\s-]{8,}$/,
|
|
3875
3875
|
cuid2: /^[0-9a-z]+$/,
|
|
3876
3876
|
ulid: /^[0-9A-HJKMNP-TV-Z]{26}$/,
|
|
3877
3877
|
email: /^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,
|
|
3878
|
-
emoji: () => (
|
|
3878
|
+
emoji: () => (Kt === void 0 && (Kt = RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$", "u")), Kt),
|
|
3879
3879
|
uuid: /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,
|
|
3880
3880
|
ipv4: /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,
|
|
3881
3881
|
ipv4Cidr: /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,
|
|
@@ -3886,7 +3886,7 @@ var Gt = void 0, G = {
|
|
|
3886
3886
|
nanoid: /^[a-zA-Z0-9_-]{21}$/,
|
|
3887
3887
|
jwt: /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/
|
|
3888
3888
|
};
|
|
3889
|
-
function
|
|
3889
|
+
function qt(e, t) {
|
|
3890
3890
|
let n = { type: "string" };
|
|
3891
3891
|
if (e.checks) for (let r of e.checks) switch (r.kind) {
|
|
3892
3892
|
case "min":
|
|
@@ -3922,10 +3922,10 @@ function Kt(e, t) {
|
|
|
3922
3922
|
q(n, G.cuid2, r.message, t);
|
|
3923
3923
|
break;
|
|
3924
3924
|
case "startsWith":
|
|
3925
|
-
q(n, RegExp(`^${
|
|
3925
|
+
q(n, RegExp(`^${Jt(r.value, t)}`), r.message, t);
|
|
3926
3926
|
break;
|
|
3927
3927
|
case "endsWith":
|
|
3928
|
-
q(n, RegExp(`${
|
|
3928
|
+
q(n, RegExp(`${Jt(r.value, t)}$`), r.message, t);
|
|
3929
3929
|
break;
|
|
3930
3930
|
case "datetime":
|
|
3931
3931
|
K(n, "date-time", r.message, t);
|
|
@@ -3943,7 +3943,7 @@ function Kt(e, t) {
|
|
|
3943
3943
|
U(n, "minLength", typeof n.minLength == "number" ? Math.max(n.minLength, r.value) : r.value, r.message, t), U(n, "maxLength", typeof n.maxLength == "number" ? Math.min(n.maxLength, r.value) : r.value, r.message, t);
|
|
3944
3944
|
break;
|
|
3945
3945
|
case "includes":
|
|
3946
|
-
q(n, RegExp(
|
|
3946
|
+
q(n, RegExp(Jt(r.value, t)), r.message, t);
|
|
3947
3947
|
break;
|
|
3948
3948
|
case "ip":
|
|
3949
3949
|
r.version !== "v6" && K(n, "ipv4", r.message, t), r.version !== "v4" && K(n, "ipv6", r.message, t);
|
|
@@ -3978,13 +3978,13 @@ function Kt(e, t) {
|
|
|
3978
3978
|
}
|
|
3979
3979
|
return n;
|
|
3980
3980
|
}
|
|
3981
|
-
function
|
|
3982
|
-
return t.patternStrategy === "escape" ?
|
|
3981
|
+
function Jt(e, t) {
|
|
3982
|
+
return t.patternStrategy === "escape" ? Xt(e) : e;
|
|
3983
3983
|
}
|
|
3984
|
-
var
|
|
3985
|
-
function
|
|
3984
|
+
var Yt = /* @__PURE__ */ new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");
|
|
3985
|
+
function Xt(e) {
|
|
3986
3986
|
let t = "";
|
|
3987
|
-
for (let n = 0; n < e.length; n++)
|
|
3987
|
+
for (let n = 0; n < e.length; n++) Yt.has(e[n]) || (t += "\\"), t += e[n];
|
|
3988
3988
|
return t;
|
|
3989
3989
|
}
|
|
3990
3990
|
function K(e, t, n, r) {
|
|
@@ -4001,11 +4001,11 @@ function q(e, t, n, r) {
|
|
|
4001
4001
|
pattern: e.pattern,
|
|
4002
4002
|
...e.errorMessage && r.errorMessages && { errorMessage: { pattern: e.errorMessage.pattern } }
|
|
4003
4003
|
}), delete e.pattern, e.errorMessage && (delete e.errorMessage.pattern, Object.keys(e.errorMessage).length === 0 && delete e.errorMessage)), e.allOf.push({
|
|
4004
|
-
pattern:
|
|
4004
|
+
pattern: Zt(t, r),
|
|
4005
4005
|
...n && r.errorMessages && { errorMessage: { pattern: n } }
|
|
4006
|
-
})) : U(e, "pattern",
|
|
4006
|
+
})) : U(e, "pattern", Zt(t, r), n, r);
|
|
4007
4007
|
}
|
|
4008
|
-
function
|
|
4008
|
+
function Zt(e, t) {
|
|
4009
4009
|
if (!t.applyRegexFlags || !e.flags) return e.source;
|
|
4010
4010
|
let n = {
|
|
4011
4011
|
i: e.flags.includes("i"),
|
|
@@ -4046,7 +4046,7 @@ function Xt(e, t) {
|
|
|
4046
4046
|
}
|
|
4047
4047
|
//#endregion
|
|
4048
4048
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/record.js
|
|
4049
|
-
function
|
|
4049
|
+
function Qt(e, t) {
|
|
4050
4050
|
if (t.target === "openAi" && console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead."), t.target === "openApi3" && e.keyType?._def.typeName === F.ZodEnum) return {
|
|
4051
4051
|
type: "object",
|
|
4052
4052
|
required: e.keyType._def.values,
|
|
@@ -4072,7 +4072,7 @@ function Zt(e, t) {
|
|
|
4072
4072
|
};
|
|
4073
4073
|
if (t.target === "openApi3") return n;
|
|
4074
4074
|
if (e.keyType?._def.typeName === F.ZodString && e.keyType._def.checks?.length) {
|
|
4075
|
-
let { type: r, ...i } =
|
|
4075
|
+
let { type: r, ...i } = qt(e.keyType._def, t);
|
|
4076
4076
|
return {
|
|
4077
4077
|
...n,
|
|
4078
4078
|
propertyNames: i
|
|
@@ -4083,7 +4083,7 @@ function Zt(e, t) {
|
|
|
4083
4083
|
propertyNames: { enum: e.keyType._def.values }
|
|
4084
4084
|
};
|
|
4085
4085
|
if (e.keyType?._def.typeName === F.ZodBranded && e.keyType._def.type._def.typeName === F.ZodString && e.keyType._def.type._def.checks?.length) {
|
|
4086
|
-
let { type: r, ...i } =
|
|
4086
|
+
let { type: r, ...i } = It(e.keyType._def, t);
|
|
4087
4087
|
return {
|
|
4088
4088
|
...n,
|
|
4089
4089
|
propertyNames: i
|
|
@@ -4093,8 +4093,8 @@ function Zt(e, t) {
|
|
|
4093
4093
|
}
|
|
4094
4094
|
//#endregion
|
|
4095
4095
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/map.js
|
|
4096
|
-
function
|
|
4097
|
-
return t.mapStrategy === "record" ?
|
|
4096
|
+
function $t(e, t) {
|
|
4097
|
+
return t.mapStrategy === "record" ? Qt(e, t) : {
|
|
4098
4098
|
type: "array",
|
|
4099
4099
|
maxItems: 125,
|
|
4100
4100
|
items: {
|
|
@@ -4123,7 +4123,7 @@ function Qt(e, t) {
|
|
|
4123
4123
|
}
|
|
4124
4124
|
//#endregion
|
|
4125
4125
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js
|
|
4126
|
-
function
|
|
4126
|
+
function en(e) {
|
|
4127
4127
|
let t = e.values, n = Object.keys(e.values).filter((e) => typeof t[t[e]] != "number").map((e) => t[e]), r = Array.from(new Set(n.map((e) => typeof e)));
|
|
4128
4128
|
return {
|
|
4129
4129
|
type: r.length === 1 ? r[0] === "string" ? "string" : "number" : ["string", "number"],
|
|
@@ -4132,7 +4132,7 @@ function $t(e) {
|
|
|
4132
4132
|
}
|
|
4133
4133
|
//#endregion
|
|
4134
4134
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/never.js
|
|
4135
|
-
function
|
|
4135
|
+
function tn(e) {
|
|
4136
4136
|
return e.target === "openAi" ? void 0 : { not: W({
|
|
4137
4137
|
...e,
|
|
4138
4138
|
currentPath: [...e.currentPath, "not"]
|
|
@@ -4140,7 +4140,7 @@ function en(e) {
|
|
|
4140
4140
|
}
|
|
4141
4141
|
//#endregion
|
|
4142
4142
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/null.js
|
|
4143
|
-
function
|
|
4143
|
+
function nn(e) {
|
|
4144
4144
|
return e.target === "openApi3" ? {
|
|
4145
4145
|
enum: ["null"],
|
|
4146
4146
|
nullable: !0
|
|
@@ -4148,19 +4148,19 @@ function tn(e) {
|
|
|
4148
4148
|
}
|
|
4149
4149
|
//#endregion
|
|
4150
4150
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/union.js
|
|
4151
|
-
var
|
|
4151
|
+
var rn = {
|
|
4152
4152
|
ZodString: "string",
|
|
4153
4153
|
ZodNumber: "number",
|
|
4154
4154
|
ZodBigInt: "integer",
|
|
4155
4155
|
ZodBoolean: "boolean",
|
|
4156
4156
|
ZodNull: "null"
|
|
4157
4157
|
};
|
|
4158
|
-
function
|
|
4159
|
-
if (t.target === "openApi3") return
|
|
4158
|
+
function an(e, t) {
|
|
4159
|
+
if (t.target === "openApi3") return on(e, t);
|
|
4160
4160
|
let n = e.options instanceof Map ? Array.from(e.options.values()) : e.options;
|
|
4161
|
-
if (n.every((e) => e._def.typeName in
|
|
4161
|
+
if (n.every((e) => e._def.typeName in rn && (!e._def.checks || !e._def.checks.length))) {
|
|
4162
4162
|
let e = n.reduce((e, t) => {
|
|
4163
|
-
let n =
|
|
4163
|
+
let n = rn[t._def.typeName];
|
|
4164
4164
|
return n && !e.includes(n) ? [...e, n] : e;
|
|
4165
4165
|
}, []);
|
|
4166
4166
|
return { type: e.length > 1 ? e : e[0] };
|
|
@@ -4188,9 +4188,9 @@ function rn(e, t) {
|
|
|
4188
4188
|
type: "string",
|
|
4189
4189
|
enum: n.reduce((e, t) => [...e, ...t._def.values.filter((t) => !e.includes(t))], [])
|
|
4190
4190
|
};
|
|
4191
|
-
return
|
|
4191
|
+
return on(e, t);
|
|
4192
4192
|
}
|
|
4193
|
-
var
|
|
4193
|
+
var on = (e, t) => {
|
|
4194
4194
|
let n = (e.options instanceof Map ? Array.from(e.options.values()) : e.options).map((e, n) => J(e._def, {
|
|
4195
4195
|
...t,
|
|
4196
4196
|
currentPath: [
|
|
@@ -4203,7 +4203,7 @@ var an = (e, t) => {
|
|
|
4203
4203
|
};
|
|
4204
4204
|
//#endregion
|
|
4205
4205
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js
|
|
4206
|
-
function
|
|
4206
|
+
function sn(e, t) {
|
|
4207
4207
|
if ([
|
|
4208
4208
|
"ZodString",
|
|
4209
4209
|
"ZodNumber",
|
|
@@ -4211,9 +4211,9 @@ function on(e, t) {
|
|
|
4211
4211
|
"ZodBoolean",
|
|
4212
4212
|
"ZodNull"
|
|
4213
4213
|
].includes(e.innerType._def.typeName) && (!e.innerType._def.checks || !e.innerType._def.checks.length)) return t.target === "openApi3" ? {
|
|
4214
|
-
type:
|
|
4214
|
+
type: rn[e.innerType._def.typeName],
|
|
4215
4215
|
nullable: !0
|
|
4216
|
-
} : { type: [
|
|
4216
|
+
} : { type: [rn[e.innerType._def.typeName], "null"] };
|
|
4217
4217
|
if (t.target === "openApi3") {
|
|
4218
4218
|
let n = J(e.innerType._def, {
|
|
4219
4219
|
...t,
|
|
@@ -4239,12 +4239,12 @@ function on(e, t) {
|
|
|
4239
4239
|
}
|
|
4240
4240
|
//#endregion
|
|
4241
4241
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/number.js
|
|
4242
|
-
function
|
|
4242
|
+
function cn(e, t) {
|
|
4243
4243
|
let n = { type: "number" };
|
|
4244
4244
|
if (!e.checks) return n;
|
|
4245
4245
|
for (let r of e.checks) switch (r.kind) {
|
|
4246
4246
|
case "int":
|
|
4247
|
-
n.type = "integer",
|
|
4247
|
+
n.type = "integer", jt(n, "type", r.message, t);
|
|
4248
4248
|
break;
|
|
4249
4249
|
case "min":
|
|
4250
4250
|
t.target === "jsonSchema7" ? r.inclusive ? U(n, "minimum", r.value, r.message, t) : U(n, "exclusiveMinimum", r.value, r.message, t) : (r.inclusive || (n.exclusiveMinimum = !0), U(n, "minimum", r.value, r.message, t));
|
|
@@ -4258,7 +4258,7 @@ function sn(e, t) {
|
|
|
4258
4258
|
}
|
|
4259
4259
|
//#endregion
|
|
4260
4260
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/object.js
|
|
4261
|
-
function
|
|
4261
|
+
function ln(e, t) {
|
|
4262
4262
|
let n = t.target === "openAi", r = {
|
|
4263
4263
|
type: "object",
|
|
4264
4264
|
properties: {}
|
|
@@ -4266,7 +4266,7 @@ function cn(e, t) {
|
|
|
4266
4266
|
for (let e in a) {
|
|
4267
4267
|
let o = a[e];
|
|
4268
4268
|
if (o === void 0 || o._def === void 0) continue;
|
|
4269
|
-
let s =
|
|
4269
|
+
let s = dn(o);
|
|
4270
4270
|
s && n && (o._def.typeName === "ZodOptional" && (o = o._def.innerType), o.isNullable() || (o = o.nullable()), s = !1);
|
|
4271
4271
|
let c = J(o._def, {
|
|
4272
4272
|
...t,
|
|
@@ -4284,10 +4284,10 @@ function cn(e, t) {
|
|
|
4284
4284
|
c !== void 0 && (r.properties[e] = c, s || i.push(e));
|
|
4285
4285
|
}
|
|
4286
4286
|
i.length && (r.required = i);
|
|
4287
|
-
let o =
|
|
4287
|
+
let o = un(e, t);
|
|
4288
4288
|
return o !== void 0 && (r.additionalProperties = o), r;
|
|
4289
4289
|
}
|
|
4290
|
-
function
|
|
4290
|
+
function un(e, t) {
|
|
4291
4291
|
if (e.catchall._def.typeName !== "ZodNever") return J(e.catchall._def, {
|
|
4292
4292
|
...t,
|
|
4293
4293
|
currentPath: [...t.currentPath, "additionalProperties"]
|
|
@@ -4298,7 +4298,7 @@ function ln(e, t) {
|
|
|
4298
4298
|
case "strip": return t.removeAdditionalStrategy === "strict" ? t.allowedAdditionalProperties : t.rejectedAdditionalProperties;
|
|
4299
4299
|
}
|
|
4300
4300
|
}
|
|
4301
|
-
function
|
|
4301
|
+
function dn(e) {
|
|
4302
4302
|
try {
|
|
4303
4303
|
return e.isOptional();
|
|
4304
4304
|
} catch {
|
|
@@ -4307,7 +4307,7 @@ function un(e) {
|
|
|
4307
4307
|
}
|
|
4308
4308
|
//#endregion
|
|
4309
4309
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js
|
|
4310
|
-
var
|
|
4310
|
+
var fn = (e, t) => {
|
|
4311
4311
|
if (t.currentPath.toString() === t.propertyPath?.toString()) return J(e.innerType._def, t);
|
|
4312
4312
|
let n = J(e.innerType._def, {
|
|
4313
4313
|
...t,
|
|
@@ -4318,7 +4318,7 @@ var dn = (e, t) => {
|
|
|
4318
4318
|
]
|
|
4319
4319
|
});
|
|
4320
4320
|
return n ? { anyOf: [{ not: W(t) }, n] } : W(t);
|
|
4321
|
-
},
|
|
4321
|
+
}, pn = (e, t) => {
|
|
4322
4322
|
if (t.pipeStrategy === "input") return J(e.in._def, t);
|
|
4323
4323
|
if (t.pipeStrategy === "output") return J(e.out._def, t);
|
|
4324
4324
|
let n = J(e.in._def, {
|
|
@@ -4340,12 +4340,12 @@ var dn = (e, t) => {
|
|
|
4340
4340
|
};
|
|
4341
4341
|
//#endregion
|
|
4342
4342
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js
|
|
4343
|
-
function
|
|
4343
|
+
function mn(e, t) {
|
|
4344
4344
|
return J(e.type._def, t);
|
|
4345
4345
|
}
|
|
4346
4346
|
//#endregion
|
|
4347
4347
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/set.js
|
|
4348
|
-
function
|
|
4348
|
+
function hn(e, t) {
|
|
4349
4349
|
let n = {
|
|
4350
4350
|
type: "array",
|
|
4351
4351
|
uniqueItems: !0,
|
|
@@ -4358,7 +4358,7 @@ function mn(e, t) {
|
|
|
4358
4358
|
}
|
|
4359
4359
|
//#endregion
|
|
4360
4360
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js
|
|
4361
|
-
function
|
|
4361
|
+
function gn(e, t) {
|
|
4362
4362
|
return e.rest ? {
|
|
4363
4363
|
type: "array",
|
|
4364
4364
|
minItems: e.items.length,
|
|
@@ -4390,51 +4390,51 @@ function hn(e, t) {
|
|
|
4390
4390
|
}
|
|
4391
4391
|
//#endregion
|
|
4392
4392
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js
|
|
4393
|
-
function
|
|
4393
|
+
function _n(e) {
|
|
4394
4394
|
return { not: W(e) };
|
|
4395
4395
|
}
|
|
4396
4396
|
//#endregion
|
|
4397
4397
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js
|
|
4398
|
-
function
|
|
4398
|
+
function vn(e) {
|
|
4399
4399
|
return W(e);
|
|
4400
4400
|
}
|
|
4401
4401
|
//#endregion
|
|
4402
4402
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js
|
|
4403
|
-
var
|
|
4403
|
+
var yn = (e, t) => J(e.innerType._def, t), bn = (e, t, n) => {
|
|
4404
4404
|
switch (t) {
|
|
4405
|
-
case F.ZodString: return
|
|
4406
|
-
case F.ZodNumber: return
|
|
4407
|
-
case F.ZodObject: return
|
|
4408
|
-
case F.ZodBigInt: return
|
|
4409
|
-
case F.ZodBoolean: return
|
|
4410
|
-
case F.ZodDate: return
|
|
4411
|
-
case F.ZodUndefined: return
|
|
4412
|
-
case F.ZodNull: return
|
|
4413
|
-
case F.ZodArray: return
|
|
4405
|
+
case F.ZodString: return qt(e, n);
|
|
4406
|
+
case F.ZodNumber: return cn(e, n);
|
|
4407
|
+
case F.ZodObject: return ln(e, n);
|
|
4408
|
+
case F.ZodBigInt: return Pt(e, n);
|
|
4409
|
+
case F.ZodBoolean: return Ft();
|
|
4410
|
+
case F.ZodDate: return Rt(e, n);
|
|
4411
|
+
case F.ZodUndefined: return _n(n);
|
|
4412
|
+
case F.ZodNull: return nn(n);
|
|
4413
|
+
case F.ZodArray: return Nt(e, n);
|
|
4414
4414
|
case F.ZodUnion:
|
|
4415
|
-
case F.ZodDiscriminatedUnion: return
|
|
4416
|
-
case F.ZodIntersection: return
|
|
4417
|
-
case F.ZodTuple: return
|
|
4418
|
-
case F.ZodRecord: return
|
|
4419
|
-
case F.ZodLiteral: return
|
|
4420
|
-
case F.ZodEnum: return
|
|
4421
|
-
case F.ZodNativeEnum: return
|
|
4422
|
-
case F.ZodNullable: return
|
|
4423
|
-
case F.ZodOptional: return
|
|
4424
|
-
case F.ZodMap: return
|
|
4425
|
-
case F.ZodSet: return
|
|
4415
|
+
case F.ZodDiscriminatedUnion: return an(e, n);
|
|
4416
|
+
case F.ZodIntersection: return Wt(e, n);
|
|
4417
|
+
case F.ZodTuple: return gn(e, n);
|
|
4418
|
+
case F.ZodRecord: return Qt(e, n);
|
|
4419
|
+
case F.ZodLiteral: return Gt(e, n);
|
|
4420
|
+
case F.ZodEnum: return Ht(e);
|
|
4421
|
+
case F.ZodNativeEnum: return en(e);
|
|
4422
|
+
case F.ZodNullable: return sn(e, n);
|
|
4423
|
+
case F.ZodOptional: return fn(e, n);
|
|
4424
|
+
case F.ZodMap: return $t(e, n);
|
|
4425
|
+
case F.ZodSet: return hn(e, n);
|
|
4426
4426
|
case F.ZodLazy: return () => e.getter()._def;
|
|
4427
|
-
case F.ZodPromise: return
|
|
4427
|
+
case F.ZodPromise: return mn(e, n);
|
|
4428
4428
|
case F.ZodNaN:
|
|
4429
|
-
case F.ZodNever: return
|
|
4430
|
-
case F.ZodEffects: return
|
|
4429
|
+
case F.ZodNever: return tn(n);
|
|
4430
|
+
case F.ZodEffects: return Vt(e, n);
|
|
4431
4431
|
case F.ZodAny: return W(n);
|
|
4432
|
-
case F.ZodUnknown: return
|
|
4433
|
-
case F.ZodDefault: return
|
|
4434
|
-
case F.ZodBranded: return
|
|
4435
|
-
case F.ZodReadonly: return
|
|
4436
|
-
case F.ZodCatch: return
|
|
4437
|
-
case F.ZodPipeline: return
|
|
4432
|
+
case F.ZodUnknown: return vn(n);
|
|
4433
|
+
case F.ZodDefault: return Bt(e, n);
|
|
4434
|
+
case F.ZodBranded: return It(e, n);
|
|
4435
|
+
case F.ZodReadonly: return yn(e, n);
|
|
4436
|
+
case F.ZodCatch: return Lt(e, n);
|
|
4437
|
+
case F.ZodPipeline: return pn(e, n);
|
|
4438
4438
|
case F.ZodFunction:
|
|
4439
4439
|
case F.ZodVoid:
|
|
4440
4440
|
case F.ZodSymbol: return;
|
|
@@ -4447,10 +4447,10 @@ function J(e, t, n = !1) {
|
|
|
4447
4447
|
let r = t.seen.get(e);
|
|
4448
4448
|
if (t.override) {
|
|
4449
4449
|
let i = t.override?.(e, t, r, n);
|
|
4450
|
-
if (i !==
|
|
4450
|
+
if (i !== Dt) return i;
|
|
4451
4451
|
}
|
|
4452
4452
|
if (r && !n) {
|
|
4453
|
-
let e =
|
|
4453
|
+
let e = xn(r, t);
|
|
4454
4454
|
if (e !== void 0) return e;
|
|
4455
4455
|
}
|
|
4456
4456
|
let i = {
|
|
@@ -4459,22 +4459,22 @@ function J(e, t, n = !1) {
|
|
|
4459
4459
|
jsonSchema: void 0
|
|
4460
4460
|
};
|
|
4461
4461
|
t.seen.set(e, i);
|
|
4462
|
-
let a =
|
|
4463
|
-
if (o &&
|
|
4462
|
+
let a = bn(e, e.typeName, t), o = typeof a == "function" ? J(a(), t) : a;
|
|
4463
|
+
if (o && Sn(e, t, o), t.postProcess) {
|
|
4464
4464
|
let n = t.postProcess(o, e, t);
|
|
4465
4465
|
return i.jsonSchema = o, n;
|
|
4466
4466
|
}
|
|
4467
4467
|
return i.jsonSchema = o, o;
|
|
4468
4468
|
}
|
|
4469
|
-
var
|
|
4469
|
+
var xn = (e, t) => {
|
|
4470
4470
|
switch (t.$refStrategy) {
|
|
4471
4471
|
case "root": return { $ref: e.path.join("/") };
|
|
4472
|
-
case "relative": return { $ref:
|
|
4472
|
+
case "relative": return { $ref: Mt(t.currentPath, e.path) };
|
|
4473
4473
|
case "none":
|
|
4474
4474
|
case "seen": return e.path.length < t.currentPath.length && e.path.every((e, n) => t.currentPath[n] === e) ? (console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`), W(t)) : t.$refStrategy === "seen" ? W(t) : void 0;
|
|
4475
4475
|
}
|
|
4476
|
-
},
|
|
4477
|
-
let n =
|
|
4476
|
+
}, Sn = (e, t, n) => (e.description && (n.description = e.description, t.markdownDescription && (n.markdownDescription = e.description)), n), Cn = (e, t) => {
|
|
4477
|
+
let n = At(t), r = typeof t == "object" && t.definitions ? Object.entries(t.definitions).reduce((e, [t, r]) => ({
|
|
4478
4478
|
...e,
|
|
4479
4479
|
[t]: J(r._def, {
|
|
4480
4480
|
...n,
|
|
@@ -4522,12 +4522,12 @@ var bn = (e, t) => {
|
|
|
4522
4522
|
}
|
|
4523
4523
|
};
|
|
4524
4524
|
return n.target === "jsonSchema7" ? s.$schema = "http://json-schema.org/draft-07/schema#" : (n.target === "jsonSchema2019-09" || n.target === "openAi") && (s.$schema = "https://json-schema.org/draft/2019-09/schema#"), n.target === "openAi" && ("anyOf" in s || "oneOf" in s || "allOf" in s || "type" in s && Array.isArray(s.type)) && console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property."), s;
|
|
4525
|
-
}, Y = (e) => B(e).passthrough(), X = (e) => e.nullable().optional(), Z = B({}).passthrough(),
|
|
4525
|
+
}, Y = (e) => B(e).passthrough(), X = (e) => e.nullable().optional(), Z = B({}).passthrough(), wn = Y({
|
|
4526
4526
|
id: I().describe("Project id; pass as projectId to other tools"),
|
|
4527
4527
|
name: I(),
|
|
4528
4528
|
key: X(I()).describe("Short prefix, e.g. \"PROJ\""),
|
|
4529
4529
|
description: X(I())
|
|
4530
|
-
}).describe("A project"),
|
|
4530
|
+
}).describe("A project"), Tn = Y({
|
|
4531
4531
|
id: I().describe("Task id; pass as id or taskId to other tools"),
|
|
4532
4532
|
projectId: I(),
|
|
4533
4533
|
title: I(),
|
|
@@ -4540,31 +4540,31 @@ var bn = (e, t) => {
|
|
|
4540
4540
|
estimatedHours: X(L()),
|
|
4541
4541
|
loggedHours: X(L()),
|
|
4542
4542
|
isBlocked: X(R())
|
|
4543
|
-
}).describe("A task"),
|
|
4543
|
+
}).describe("A task"), En = Y({
|
|
4544
4544
|
dependencyId: I().describe("Id of the dependency record"),
|
|
4545
4545
|
taskId: I().describe("The other task"),
|
|
4546
4546
|
title: I(),
|
|
4547
4547
|
status: I(),
|
|
4548
4548
|
type: I().describe("'blocking' (the waiting task cannot start until the other finishes) or 'relates_to' (informational)")
|
|
4549
|
-
}),
|
|
4550
|
-
dependsOn: z(
|
|
4551
|
-
dependents: z(
|
|
4552
|
-
})).describe("Present when includeDependencies is true") }).describe("A task"),
|
|
4549
|
+
}), Dn = Tn.extend({ dependencies: X(Y({
|
|
4550
|
+
dependsOn: z(En).describe("Tasks this task waits for (upstream)"),
|
|
4551
|
+
dependents: z(En).describe("Tasks waiting for this task (downstream)")
|
|
4552
|
+
})).describe("Present when includeDependencies is true") }).describe("A task"), On = Y({
|
|
4553
4553
|
id: I(),
|
|
4554
4554
|
taskId: I().describe("The task that waits"),
|
|
4555
4555
|
dependsOnTaskId: I().describe("The task it waits for"),
|
|
4556
4556
|
type: I().describe("blocking or relates_to")
|
|
4557
|
-
}).describe("A dependency between two tasks"),
|
|
4557
|
+
}).describe("A dependency between two tasks"), kn = Y({
|
|
4558
4558
|
id: I(),
|
|
4559
4559
|
projectId: I(),
|
|
4560
4560
|
title: I(),
|
|
4561
4561
|
dueDate: X(I())
|
|
4562
|
-
}).describe("A deliverable"),
|
|
4562
|
+
}).describe("A deliverable"), An = Y({
|
|
4563
4563
|
id: I(),
|
|
4564
4564
|
taskId: I(),
|
|
4565
4565
|
content: I(),
|
|
4566
4566
|
authorId: X(I())
|
|
4567
|
-
}).describe("A task comment"),
|
|
4567
|
+
}).describe("A task comment"), jn = Y({
|
|
4568
4568
|
assigneeId: X(I()),
|
|
4569
4569
|
teamId: X(I()),
|
|
4570
4570
|
capacity: L().describe("1 for a person, headcount for a team pool"),
|
|
@@ -4572,7 +4572,7 @@ var bn = (e, t) => {
|
|
|
4572
4572
|
start: I(),
|
|
4573
4573
|
end: I(),
|
|
4574
4574
|
taskIds: z(I())
|
|
4575
|
-
}),
|
|
4575
|
+
}), Mn = Y({
|
|
4576
4576
|
taskId: I(),
|
|
4577
4577
|
isCritical: R().describe("True when any delay to this task delays the project end"),
|
|
4578
4578
|
totalSlack: L().describe("Slack in hours; 0 means critical, negative means a deadline is missed by that much"),
|
|
@@ -4586,23 +4586,23 @@ var bn = (e, t) => {
|
|
|
4586
4586
|
isMilestone: X(R()).describe("True for a milestone"),
|
|
4587
4587
|
deadlineDate: X(I()).describe("The task's deadline as an instant"),
|
|
4588
4588
|
deadlineVarianceHours: X(L()).describe("Working hours from forecast finish to deadline; negative means it will be missed")
|
|
4589
|
-
}),
|
|
4589
|
+
}), Nn = Y({
|
|
4590
4590
|
projectId: I(),
|
|
4591
4591
|
projectStartDate: X(I()),
|
|
4592
4592
|
projectEndDate: X(I()).describe("Forecast finish date"),
|
|
4593
4593
|
totalDurationHours: L(),
|
|
4594
4594
|
criticalTaskIds: z(I()).describe("Tasks with zero or negative slack, in schedule order"),
|
|
4595
4595
|
missedDeadlineTaskIds: X(z(I())).describe("Tasks forecast to finish after their deadline"),
|
|
4596
|
-
tasks: z(
|
|
4596
|
+
tasks: z(Mn),
|
|
4597
4597
|
leveled: X(R()),
|
|
4598
4598
|
unleveledProjectEndDate: X(I()).describe("With levelling: the end date before levelling"),
|
|
4599
|
-
overallocations: X(z(
|
|
4600
|
-
}),
|
|
4601
|
-
projects: z(
|
|
4599
|
+
overallocations: X(z(jn)).describe("Assignee mode: periods where someone is booked above capacity")
|
|
4600
|
+
}), Pn = Y({
|
|
4601
|
+
projects: z(Nn).describe("One analysis per project"),
|
|
4602
4602
|
projectEndDate: X(I()).describe("The latest project end"),
|
|
4603
4603
|
leveled: X(R()),
|
|
4604
|
-
overallocations: z(
|
|
4605
|
-
}),
|
|
4604
|
+
overallocations: z(jn)
|
|
4605
|
+
}), Fn = Y({
|
|
4606
4606
|
id: I(),
|
|
4607
4607
|
type: I().describe("container, iteration, deliverable or phase"),
|
|
4608
4608
|
name: I(),
|
|
@@ -4611,7 +4611,7 @@ var bn = (e, t) => {
|
|
|
4611
4611
|
isCritical: R(),
|
|
4612
4612
|
blockedTasks: L(),
|
|
4613
4613
|
taskIds: z(I())
|
|
4614
|
-
}),
|
|
4614
|
+
}), In = Y({
|
|
4615
4615
|
projectId: I(),
|
|
4616
4616
|
level: I(),
|
|
4617
4617
|
macro: X(Y({
|
|
@@ -4621,17 +4621,17 @@ var bn = (e, t) => {
|
|
|
4621
4621
|
totalTasks: L(),
|
|
4622
4622
|
completedTasks: L(),
|
|
4623
4623
|
blockedTasks: L(),
|
|
4624
|
-
phases: z(
|
|
4624
|
+
phases: z(Fn)
|
|
4625
4625
|
})).describe("Phase-level summary"),
|
|
4626
4626
|
standard: X(Z).describe("Task timeline: { tasks, criticalPathTaskIds, dependencies, totalDurationHours }"),
|
|
4627
4627
|
concrete: X(V(Z)).describe("Work evidence (time entries, attachments) by task id")
|
|
4628
|
-
}),
|
|
4628
|
+
}), Ln = Y({
|
|
4629
4629
|
taskId: I(),
|
|
4630
|
-
macroPhase: X(
|
|
4630
|
+
macroPhase: X(Fn).describe("The phase this task belongs to"),
|
|
4631
4631
|
standard: Z.describe("The task with cpm (isCritical, slackWorkingHours, dates), blockingTaskIds and dependentTaskIds"),
|
|
4632
4632
|
concrete: Z.describe("Evidence of work on the task"),
|
|
4633
4633
|
metrics: X(Z).describe("Same as get_task_metrics")
|
|
4634
|
-
}),
|
|
4634
|
+
}), Rn = Y({
|
|
4635
4635
|
taskId: I(),
|
|
4636
4636
|
points: z(Y({
|
|
4637
4637
|
timestamp: I(),
|
|
@@ -4639,7 +4639,7 @@ var bn = (e, t) => {
|
|
|
4639
4639
|
status: I()
|
|
4640
4640
|
})),
|
|
4641
4641
|
curveProfile: I().describe("linear, s_curve, early_surge, late_rush, stalled or insufficient_data")
|
|
4642
|
-
}),
|
|
4642
|
+
}), zn = Y({
|
|
4643
4643
|
taskId: I(),
|
|
4644
4644
|
progress: Y({
|
|
4645
4645
|
progressPercentage: L().describe("0-100"),
|
|
@@ -4661,8 +4661,8 @@ var bn = (e, t) => {
|
|
|
4661
4661
|
schedulePerformanceIndex: L().describe("SPI = EV / PV; below 1 is behind schedule")
|
|
4662
4662
|
}),
|
|
4663
4663
|
inferredActuals: Z.describe("Actual start/end dates and active working time"),
|
|
4664
|
-
progressHistory:
|
|
4665
|
-
}),
|
|
4664
|
+
progressHistory: Rn
|
|
4665
|
+
}), Bn = Y({
|
|
4666
4666
|
startDate: I(),
|
|
4667
4667
|
endDate: I(),
|
|
4668
4668
|
interval: I(),
|
|
@@ -4680,7 +4680,7 @@ var bn = (e, t) => {
|
|
|
4680
4680
|
totalHours: L(),
|
|
4681
4681
|
totalCapacity: X(L()),
|
|
4682
4682
|
averageUtilization: X(L())
|
|
4683
|
-
}),
|
|
4683
|
+
}), Vn = Y({
|
|
4684
4684
|
skills: X(z(Y({
|
|
4685
4685
|
name: I(),
|
|
4686
4686
|
description: I()
|
|
@@ -4720,28 +4720,28 @@ var bn = (e, t) => {
|
|
|
4720
4720
|
content: "---\nname: triage-tasks\ndescription: Review new, unprioritized or stale tasks and set priority, estimate, tags and blocked state consistently. Use when the user asks to triage, groom or clean up a backlog.\n---\n\n# Triage tasks\n\nMake every task in scope actionable: a clear title, a priority, an estimate and an honest blocked state.\n\n## 1. Gather the tasks\n\n1. Get the `projectId` with `list_projects` if you do not have it, then `get_project` to learn the workflow status keys.\n2. Call `list_tasks` with filters that match the request, for example:\n - untriaged: `priority: \"none\"`;\n - a backlog: `status` set to the backlog key from the workflow;\n - one person's work: `assigneeId`.\n Page with `nextCursor` until it is empty, or stop at a sensible batch (about 25) and say how many remain.\n3. For tasks whose description is thin or which look blocked, read the discussion with `list_comments`.\n\n## 2. Decide, task by task\n\n| Field | Rule |\n| --- | --- |\n| `priority` | `urgent`: blocks other people now or a live problem. `high`: needed for the next deliverable. `medium`: planned work. `low`: nice to have. Reserve `urgent` for a handful of tasks. |\n| `estimatedHours` | Effort in hours. If a task is over about 24 hours, propose splitting it instead of estimating it. |\n| `tags` | Reuse tags already used in the project; do not invent a new scheme. |\n| `isBlocked` / `blockedReason` | Blocked only when work cannot continue; the reason names what it waits for. |\n| title | Starts with a verb and says the outcome. Rewrite only when it is unclear. |\n\nFlag likely duplicates (same outcome, different words) instead of deleting them.\n\n## 3. Propose, then apply\n\n1. Show the user a table: task title, current values, proposed values, one-line reason.\n2. After the user approves (all or some), apply each change with `update_task`, passing only the fields that change.\n3. For any non-obvious change, record why with `add_comment` on the task.\n\n## Guardrails\n\n- Do not change `status` or `assigneeId` during triage unless the user asked for it.\n- Never call `delete_task` during triage. Suggest canceling duplicates and let the user decide.\n"
|
|
4721
4721
|
}
|
|
4722
4722
|
];
|
|
4723
|
-
function
|
|
4723
|
+
function Hn(e) {
|
|
4724
4724
|
return Q.find((t) => t.name === e);
|
|
4725
4725
|
}
|
|
4726
4726
|
//#endregion
|
|
4727
4727
|
//#region ../mcp/dist/tools/definitions.js
|
|
4728
|
-
var
|
|
4728
|
+
var Un = {
|
|
4729
4729
|
core: "Projects, tasks and task dependencies: find, read, create, update and delete",
|
|
4730
4730
|
collaboration: "Deliverables and task comments",
|
|
4731
4731
|
scheduling: "Critical path, portfolio scheduling and workload/capacity",
|
|
4732
4732
|
analytics: "Project status ladder, task metrics, earned value and progress history",
|
|
4733
4733
|
guidance: "Skills: step-by-step playbooks for multi-step jobs"
|
|
4734
4734
|
};
|
|
4735
|
-
function
|
|
4736
|
-
let { $schema: t, ...n } =
|
|
4735
|
+
function Wn(e) {
|
|
4736
|
+
let { $schema: t, ...n } = Cn(e, { $refStrategy: "none" });
|
|
4737
4737
|
return n;
|
|
4738
4738
|
}
|
|
4739
4739
|
function $(e) {
|
|
4740
4740
|
let t = e.annotations?.readOnlyHint ?? !1;
|
|
4741
4741
|
return {
|
|
4742
4742
|
...e,
|
|
4743
|
-
inputSchema:
|
|
4744
|
-
outputSchema:
|
|
4743
|
+
inputSchema: Wn(e.zodSchema),
|
|
4744
|
+
outputSchema: Wn(e.outputZodSchema),
|
|
4745
4745
|
annotations: {
|
|
4746
4746
|
readOnlyHint: t,
|
|
4747
4747
|
destructiveHint: e.annotations?.destructiveHint ?? !1,
|
|
@@ -4750,60 +4750,60 @@ function $(e) {
|
|
|
4750
4750
|
}
|
|
4751
4751
|
};
|
|
4752
4752
|
}
|
|
4753
|
-
var
|
|
4753
|
+
var Gn = class extends Error {
|
|
4754
4754
|
constructor(e, t) {
|
|
4755
4755
|
super(`Invalid arguments for tool "${e}": ${t}`), this.name = "ToolArgumentError";
|
|
4756
4756
|
}
|
|
4757
4757
|
};
|
|
4758
|
-
function
|
|
4758
|
+
function Kn(e, t) {
|
|
4759
4759
|
let n = e.zodSchema.strict().safeParse(t ?? {});
|
|
4760
4760
|
if (!n.success) {
|
|
4761
4761
|
let t = n.error.issues.map((e) => `${e.path.join(".") || "(root)"}: ${e.message}`).join("; ");
|
|
4762
|
-
throw new
|
|
4762
|
+
throw new Gn(e.name, t);
|
|
4763
4763
|
}
|
|
4764
4764
|
return n.data;
|
|
4765
4765
|
}
|
|
4766
|
-
async function
|
|
4766
|
+
async function qn(e) {
|
|
4767
4767
|
return { isEngine: "store" in e && typeof e.store == "object" };
|
|
4768
4768
|
}
|
|
4769
|
-
var
|
|
4769
|
+
var Jn = $({
|
|
4770
4770
|
name: "list_projects",
|
|
4771
4771
|
title: "List Projects",
|
|
4772
4772
|
description: "List every project you can read, with its id, name and key. Start here to find a projectId; never guess ids. Returns { projects }.",
|
|
4773
4773
|
toolset: "core",
|
|
4774
|
-
outputZodSchema: B({ projects: z(
|
|
4774
|
+
outputZodSchema: B({ projects: z(wn) }),
|
|
4775
4775
|
zodSchema: B({}),
|
|
4776
4776
|
annotations: { readOnlyHint: !0 },
|
|
4777
4777
|
execute: async (e, t) => ({ projects: await t.getProjects() })
|
|
4778
|
-
}),
|
|
4778
|
+
}), Yn = $({
|
|
4779
4779
|
name: "get_project",
|
|
4780
4780
|
title: "Get Project",
|
|
4781
4781
|
description: "Get one project by id: name, key, workflow statuses, custom field definitions and calendar. Use it before creating or moving tasks to learn the valid status keys and custom fields. Returns the project. For its tasks use `list_tasks`.",
|
|
4782
4782
|
toolset: "core",
|
|
4783
|
-
outputZodSchema:
|
|
4783
|
+
outputZodSchema: wn,
|
|
4784
4784
|
zodSchema: B({ id: I().describe("The project ID") }),
|
|
4785
4785
|
annotations: { readOnlyHint: !0 },
|
|
4786
4786
|
execute: async (e, t) => t.getProject(e.id)
|
|
4787
|
-
}),
|
|
4787
|
+
}), Xn = $({
|
|
4788
4788
|
name: "create_project",
|
|
4789
4789
|
title: "Create Project",
|
|
4790
4790
|
description: "Create a new, empty project. Use only when the user wants a new project; to add work to an existing one use `create_task`. Returns the created project with its id.",
|
|
4791
4791
|
toolset: "core",
|
|
4792
|
-
outputZodSchema:
|
|
4792
|
+
outputZodSchema: wn,
|
|
4793
4793
|
zodSchema: B({
|
|
4794
4794
|
name: I().describe("Name of the project"),
|
|
4795
4795
|
description: I().optional().describe("Description of the project"),
|
|
4796
4796
|
key: I().optional().describe("Short project key/prefix (e.g. \"PROJ\")"),
|
|
4797
|
-
customFields: V(
|
|
4797
|
+
customFields: V(Et()).optional().describe("Custom field values as a JSON object (validated against the project's field definitions for tasks)")
|
|
4798
4798
|
}),
|
|
4799
4799
|
execute: async (e, t) => t.createProject(e)
|
|
4800
|
-
}),
|
|
4800
|
+
}), Zn = $({
|
|
4801
4801
|
name: "list_tasks",
|
|
4802
4802
|
title: "List Tasks",
|
|
4803
4803
|
description: "Find tasks, oldest first, filtered by project, status, priority, assignee, iteration, deliverable, container or parent task ('none' for top-level tasks only). Use it for questions like \"what is blocked / assigned to X / in progress\" and to look up task ids. Returns { tasks, nextCursor }; pass nextCursor back as cursor for the next page. For one task's full record use `get_task`.",
|
|
4804
4804
|
toolset: "core",
|
|
4805
4805
|
outputZodSchema: B({
|
|
4806
|
-
tasks: z(
|
|
4806
|
+
tasks: z(Tn),
|
|
4807
4807
|
nextCursor: I().nullable().optional()
|
|
4808
4808
|
}),
|
|
4809
4809
|
zodSchema: B({
|
|
@@ -4843,12 +4843,12 @@ var qn = $({
|
|
|
4843
4843
|
nextCursor: r.nextCursor
|
|
4844
4844
|
};
|
|
4845
4845
|
}
|
|
4846
|
-
}),
|
|
4846
|
+
}), Qn = $({
|
|
4847
4847
|
name: "get_task",
|
|
4848
4848
|
title: "Get Task",
|
|
4849
4849
|
description: "Get one task by id: status, priority, assignee, estimate, logged hours, dates, blocked state and custom fields. Set includeDependencies to also see which tasks it waits for and which wait for it. Returns the task, with { dependencies: { dependsOn, dependents } } when asked. For its discussion use `list_comments`; for progress and variance use `get_task_metrics`.",
|
|
4850
4850
|
toolset: "core",
|
|
4851
|
-
outputZodSchema:
|
|
4851
|
+
outputZodSchema: Dn,
|
|
4852
4852
|
zodSchema: B({
|
|
4853
4853
|
id: I().describe("The task ID"),
|
|
4854
4854
|
includeDependencies: R().optional().describe("Also return the tasks this one waits for (dependsOn) and the tasks waiting for it (dependents)")
|
|
@@ -4857,16 +4857,23 @@ var qn = $({
|
|
|
4857
4857
|
execute: async (e, t) => {
|
|
4858
4858
|
let n = await t.getTask(e.id);
|
|
4859
4859
|
if (!n || !e.includeDependencies) return n;
|
|
4860
|
-
let r = await
|
|
4860
|
+
let r = await tr(t, e.id), i = new Map([...r.upstreamTasks, ...r.downstreamTasks].map((e) => [e.id, e]));
|
|
4861
|
+
for (let n of r.dependencies) {
|
|
4862
|
+
let r = n.taskId === e.id ? n.dependsOnTaskId : n.taskId;
|
|
4863
|
+
if (i.has(r) || r === e.id) continue;
|
|
4864
|
+
let a = await t.getTask(r).catch(() => null);
|
|
4865
|
+
a && i.set(r, a);
|
|
4866
|
+
}
|
|
4867
|
+
let a = [], o = [];
|
|
4861
4868
|
for (let t of r.dependencies) {
|
|
4862
|
-
let { waiting: n, waitedFor: r } =
|
|
4869
|
+
let { waiting: n, waitedFor: r } = $n(t), s = n === e.id ? r : n, c = i.get(s);
|
|
4863
4870
|
if (!c || s === e.id) continue;
|
|
4864
4871
|
let ee = {
|
|
4865
4872
|
dependencyId: t.id,
|
|
4866
4873
|
taskId: c.id,
|
|
4867
4874
|
title: c.title,
|
|
4868
4875
|
status: c.status,
|
|
4869
|
-
type:
|
|
4876
|
+
type: er(t)
|
|
4870
4877
|
};
|
|
4871
4878
|
(n === e.id ? a : o).push(ee);
|
|
4872
4879
|
}
|
|
@@ -4879,26 +4886,27 @@ var qn = $({
|
|
|
4879
4886
|
};
|
|
4880
4887
|
}
|
|
4881
4888
|
});
|
|
4882
|
-
function
|
|
4883
|
-
|
|
4884
|
-
|
|
4885
|
-
|
|
4889
|
+
function $n(e) {
|
|
4890
|
+
let t = r(e);
|
|
4891
|
+
return t ? {
|
|
4892
|
+
waiting: t.after,
|
|
4893
|
+
waitedFor: t.before
|
|
4886
4894
|
} : {
|
|
4887
4895
|
waiting: e.taskId,
|
|
4888
4896
|
waitedFor: e.dependsOnTaskId
|
|
4889
4897
|
};
|
|
4890
4898
|
}
|
|
4891
|
-
var
|
|
4892
|
-
async function
|
|
4893
|
-
let { isEngine: n } = await
|
|
4899
|
+
var er = (e) => e.type === "relates_to" ? "relates_to" : "blocking";
|
|
4900
|
+
async function tr(e, t) {
|
|
4901
|
+
let { isEngine: n } = await qn(e);
|
|
4894
4902
|
return n ? e.getTaskDependencyGraph(t) : e.getTaskDependencies(t);
|
|
4895
4903
|
}
|
|
4896
|
-
var
|
|
4904
|
+
var nr = $({
|
|
4897
4905
|
name: "create_task",
|
|
4898
4906
|
title: "Create Task",
|
|
4899
4907
|
description: "Create a task in a project. Check with `list_tasks` first so you do not add a duplicate. Without a status the task starts in the project's default workflow status. Returns the created task with its id.",
|
|
4900
4908
|
toolset: "core",
|
|
4901
|
-
outputZodSchema:
|
|
4909
|
+
outputZodSchema: Tn,
|
|
4902
4910
|
zodSchema: B({
|
|
4903
4911
|
projectId: I().optional().describe("Project ID (inferred from active view in browser if omitted)"),
|
|
4904
4912
|
title: I().describe("Title of the task"),
|
|
@@ -4920,7 +4928,7 @@ var tr = $({
|
|
|
4920
4928
|
allocation: L().gt(0).max(1).optional().describe("Share of the assignee's time the task takes, in (0, 1]; e.g. 0.5 for half-time. Estimates are effort, so a 0.5 task takes twice as long"),
|
|
4921
4929
|
isBlocked: R().optional().describe("Whether the task is blocked"),
|
|
4922
4930
|
blockedReason: I().optional().describe("Reason why the task is blocked"),
|
|
4923
|
-
customFields: V(
|
|
4931
|
+
customFields: V(Et()).optional().describe("Custom field values as a JSON object (validated against the project's field definitions for tasks)")
|
|
4924
4932
|
}),
|
|
4925
4933
|
execute: async (e, t, n) => {
|
|
4926
4934
|
let r = e.projectId || n?.projectId;
|
|
@@ -4944,12 +4952,12 @@ var tr = $({
|
|
|
4944
4952
|
};
|
|
4945
4953
|
return t.createTask(i);
|
|
4946
4954
|
}
|
|
4947
|
-
}),
|
|
4955
|
+
}), rr = $({
|
|
4948
4956
|
name: "update_task",
|
|
4949
4957
|
title: "Update Task",
|
|
4950
4958
|
description: "Change an existing task: title, description, status, priority, assignee, due date, deadline, milestone flag, estimate, logged hours, allocation, blocked state, tags or custom fields. Only the fields you pass change. Use it to move a task through its workflow or re-plan it. Returns the updated task.",
|
|
4951
4959
|
toolset: "core",
|
|
4952
|
-
outputZodSchema:
|
|
4960
|
+
outputZodSchema: Tn,
|
|
4953
4961
|
zodSchema: B({
|
|
4954
4962
|
id: I().describe("The task ID"),
|
|
4955
4963
|
title: I().optional().describe("New title"),
|
|
@@ -4972,14 +4980,14 @@ var tr = $({
|
|
|
4972
4980
|
loggedHours: L().optional().describe("Total hours worked so far"),
|
|
4973
4981
|
isBlocked: R().optional().describe("Whether the task is blocked"),
|
|
4974
4982
|
blockedReason: I().optional().describe("Reason why the task is blocked"),
|
|
4975
|
-
customFields: V(
|
|
4983
|
+
customFields: V(Et()).optional().describe("Custom field values as a JSON object (validated against the project's field definitions for tasks)")
|
|
4976
4984
|
}),
|
|
4977
4985
|
annotations: { idempotentHint: !0 },
|
|
4978
4986
|
execute: async (e, t) => {
|
|
4979
4987
|
let { id: n, ...r } = e;
|
|
4980
4988
|
return t.updateTask(n, r);
|
|
4981
4989
|
}
|
|
4982
|
-
}),
|
|
4990
|
+
}), ir = $({
|
|
4983
4991
|
name: "delete_task",
|
|
4984
4992
|
title: "Delete Task",
|
|
4985
4993
|
description: "Permanently delete a task by id. This cannot be undone: confirm with the user first, and prefer `update_task` with a canceled status when the history should be kept. Returns { success }.",
|
|
@@ -4991,12 +4999,12 @@ var tr = $({
|
|
|
4991
4999
|
idempotentHint: !0
|
|
4992
5000
|
},
|
|
4993
5001
|
execute: async (e, t) => ({ success: await t.deleteTask(e.id) })
|
|
4994
|
-
}),
|
|
5002
|
+
}), ar = $({
|
|
4995
5003
|
name: "add_dependency",
|
|
4996
5004
|
title: "Add Dependency",
|
|
4997
5005
|
description: "Record that a task cannot start until another task finishes, so the critical path schedules them in order. Use it when planning or re-sequencing work. Adding a link that already exists returns it; a link that would make a loop is refused. Returns the dependency { id, taskId, dependsOnTaskId, type }. To undo use `remove_dependency`.",
|
|
4998
5006
|
toolset: "core",
|
|
4999
|
-
outputZodSchema:
|
|
5007
|
+
outputZodSchema: On,
|
|
5000
5008
|
zodSchema: B({
|
|
5001
5009
|
taskId: I().describe("The task that waits"),
|
|
5002
5010
|
dependsOnTaskId: I().describe("The task that must finish first"),
|
|
@@ -5004,7 +5012,7 @@ var tr = $({
|
|
|
5004
5012
|
}),
|
|
5005
5013
|
annotations: { idempotentHint: !0 },
|
|
5006
5014
|
execute: async (e, t) => {
|
|
5007
|
-
let n = e.type ?? "blocking", { isEngine: r } = await
|
|
5015
|
+
let n = e.type ?? "blocking", { isEngine: r } = await qn(t);
|
|
5008
5016
|
return r ? t.addDependency({
|
|
5009
5017
|
taskId: e.taskId,
|
|
5010
5018
|
dependsOnTaskId: e.dependsOnTaskId,
|
|
@@ -5014,7 +5022,7 @@ var tr = $({
|
|
|
5014
5022
|
type: n
|
|
5015
5023
|
});
|
|
5016
5024
|
}
|
|
5017
|
-
}),
|
|
5025
|
+
}), or = $({
|
|
5018
5026
|
name: "remove_dependency",
|
|
5019
5027
|
title: "Remove Dependency",
|
|
5020
5028
|
description: "Stop a task waiting for another task, for example when the order was wrong or the work no longer depends on it. Identify the link by its two task ids, as given to `add_dependency`. Removing a link that does not exist is not an error. Returns { removed, dependencyIds } with the number of links removed.",
|
|
@@ -5030,22 +5038,22 @@ var tr = $({
|
|
|
5030
5038
|
}),
|
|
5031
5039
|
annotations: { idempotentHint: !0 },
|
|
5032
5040
|
execute: async (e, t) => {
|
|
5033
|
-
let n = (await
|
|
5034
|
-
let { waiting: n, waitedFor: r } =
|
|
5035
|
-
return n === e.taskId && r === e.dependsOnTaskId && (!e.type ||
|
|
5036
|
-
}), { isEngine: r } = await
|
|
5041
|
+
let n = (await tr(t, e.taskId)).dependencies.filter((t) => {
|
|
5042
|
+
let { waiting: n, waitedFor: r } = $n(t);
|
|
5043
|
+
return n === e.taskId && r === e.dependsOnTaskId && (!e.type || er(t) === e.type);
|
|
5044
|
+
}), { isEngine: r } = await qn(t), i = [];
|
|
5037
5045
|
for (let e of n) (r ? await t.removeDependency(e.id) : await t.removeDependency(e.taskId, e.id)) && i.push(e.id);
|
|
5038
5046
|
return {
|
|
5039
5047
|
removed: i.length,
|
|
5040
5048
|
dependencyIds: i
|
|
5041
5049
|
};
|
|
5042
5050
|
}
|
|
5043
|
-
}),
|
|
5051
|
+
}), sr = $({
|
|
5044
5052
|
name: "list_deliverables",
|
|
5045
5053
|
title: "List Deliverables",
|
|
5046
5054
|
description: "List a project's deliverables: outputs that group the tasks producing them. Use it to see what is due and which tasks feed each deliverable. For dated checkpoints, look for milestone tasks (`isMilestone`). Returns { deliverables }.",
|
|
5047
5055
|
toolset: "collaboration",
|
|
5048
|
-
outputZodSchema: B({ deliverables: z(
|
|
5056
|
+
outputZodSchema: B({ deliverables: z(kn) }),
|
|
5049
5057
|
zodSchema: B({ projectId: I().optional().describe("Project ID (falls back to ambient context if omitted)") }),
|
|
5050
5058
|
annotations: { readOnlyHint: !0 },
|
|
5051
5059
|
execute: async (e, t, n) => {
|
|
@@ -5053,19 +5061,19 @@ var tr = $({
|
|
|
5053
5061
|
if (!r) throw Error("projectId is required to list deliverables. Find one with `list_projects`.");
|
|
5054
5062
|
return "getDeliverables" in t && typeof t.getDeliverables == "function" ? { deliverables: await t.getDeliverables(r) } : { deliverables: [] };
|
|
5055
5063
|
}
|
|
5056
|
-
}),
|
|
5064
|
+
}), cr = $({
|
|
5057
5065
|
name: "create_deliverable",
|
|
5058
5066
|
title: "Create Deliverable",
|
|
5059
5067
|
description: "Create a deliverable in a project, optionally linking existing tasks by id. Use it for an output (a document, a build, an asset) that several tasks produce. For a dated checkpoint the schedule should enforce, create a task with `isMilestone: true` and a `deadline` instead. Returns the created deliverable.",
|
|
5060
5068
|
toolset: "collaboration",
|
|
5061
|
-
outputZodSchema:
|
|
5069
|
+
outputZodSchema: kn,
|
|
5062
5070
|
zodSchema: B({
|
|
5063
5071
|
projectId: I().optional().describe("Project ID (falls back to ambient context if omitted)"),
|
|
5064
5072
|
title: I().describe("Name of the deliverable"),
|
|
5065
5073
|
description: I().optional().describe("What the deliverable is and how it is accepted"),
|
|
5066
5074
|
dueDate: I().optional().describe("Due date (ISO string)"),
|
|
5067
5075
|
taskIds: z(I()).optional().describe("IDs of existing tasks that feed this deliverable"),
|
|
5068
|
-
customFields: V(
|
|
5076
|
+
customFields: V(Et()).optional().describe("Custom field values as a JSON object (validated against the project's field definitions for tasks)")
|
|
5069
5077
|
}),
|
|
5070
5078
|
execute: async (e, t, n) => {
|
|
5071
5079
|
let r = e.projectId || n?.projectId;
|
|
@@ -5076,37 +5084,37 @@ var tr = $({
|
|
|
5076
5084
|
});
|
|
5077
5085
|
throw Error("createDeliverable is not supported by this backend target.");
|
|
5078
5086
|
}
|
|
5079
|
-
}),
|
|
5087
|
+
}), lr = $({
|
|
5080
5088
|
name: "list_comments",
|
|
5081
5089
|
title: "List Comments",
|
|
5082
5090
|
description: "List the comments on a task. Use it to read the discussion, decisions or blockers recorded there. Returns { comments }.",
|
|
5083
5091
|
toolset: "collaboration",
|
|
5084
|
-
outputZodSchema: B({ comments: z(
|
|
5092
|
+
outputZodSchema: B({ comments: z(An) }),
|
|
5085
5093
|
zodSchema: B({ taskId: I().describe("The task ID") }),
|
|
5086
5094
|
annotations: { readOnlyHint: !0 },
|
|
5087
5095
|
execute: async (e, t) => "getComments" in t && typeof t.getComments == "function" ? { comments: await t.getComments(e.taskId) } : { comments: [] }
|
|
5088
|
-
}),
|
|
5096
|
+
}), ur = $({
|
|
5089
5097
|
name: "add_comment",
|
|
5090
5098
|
title: "Add Comment",
|
|
5091
5099
|
description: "Post a comment on a task, attributed to the identity this server runs as. Use it to record a decision, status note, question or the reasoning behind a change you made. Returns the created comment.",
|
|
5092
5100
|
toolset: "collaboration",
|
|
5093
|
-
outputZodSchema:
|
|
5101
|
+
outputZodSchema: An,
|
|
5094
5102
|
zodSchema: B({
|
|
5095
5103
|
taskId: I().describe("The task ID"),
|
|
5096
5104
|
content: I().describe("Comment body/markdown"),
|
|
5097
|
-
customFields: V(
|
|
5105
|
+
customFields: V(Et()).optional().describe("Custom field values as a JSON object (validated against the project's field definitions for tasks)")
|
|
5098
5106
|
}),
|
|
5099
5107
|
execute: async (e, t) => t.addComment({
|
|
5100
5108
|
taskId: e.taskId,
|
|
5101
5109
|
content: e.content,
|
|
5102
5110
|
customFields: e.customFields
|
|
5103
5111
|
})
|
|
5104
|
-
}),
|
|
5112
|
+
}), dr = $({
|
|
5105
5113
|
name: "calculate_portfolio_critical_path",
|
|
5106
5114
|
title: "Calculate Portfolio Critical Path",
|
|
5107
5115
|
description: "Schedule several projects together (default: every project you can read) so people and teams shared between them are not double-booked. Use it for cross-project delivery dates and resource conflicts. Returns { projects, projectEndDate, overallocations } with one analysis per project. For a single project use `calculate_critical_path`.",
|
|
5108
5116
|
toolset: "scheduling",
|
|
5109
|
-
outputZodSchema:
|
|
5117
|
+
outputZodSchema: Pn,
|
|
5110
5118
|
zodSchema: B({
|
|
5111
5119
|
projectIds: z(I()).optional().describe("Projects to include (default: every project you can read)"),
|
|
5112
5120
|
projectOrder: z(I()).optional().describe("Project ids in priority order for levelling; unlisted projects come last"),
|
|
@@ -5123,13 +5131,12 @@ var tr = $({
|
|
|
5123
5131
|
}),
|
|
5124
5132
|
annotations: { readOnlyHint: !0 },
|
|
5125
5133
|
execute: async (e, t) => t.calculatePortfolioCriticalPath(e)
|
|
5126
|
-
}),
|
|
5127
|
-
qn,
|
|
5134
|
+
}), fr = [
|
|
5128
5135
|
Jn,
|
|
5129
5136
|
Yn,
|
|
5130
5137
|
Xn,
|
|
5131
5138
|
Zn,
|
|
5132
|
-
|
|
5139
|
+
Qn,
|
|
5133
5140
|
nr,
|
|
5134
5141
|
rr,
|
|
5135
5142
|
ir,
|
|
@@ -5138,12 +5145,13 @@ var tr = $({
|
|
|
5138
5145
|
sr,
|
|
5139
5146
|
cr,
|
|
5140
5147
|
lr,
|
|
5148
|
+
ur,
|
|
5141
5149
|
$({
|
|
5142
5150
|
name: "calculate_critical_path",
|
|
5143
5151
|
title: "Calculate Critical Path",
|
|
5144
5152
|
description: "Schedule one project with the Critical Path Method: which tasks drive the end date, each task's early and late start and finish, and how much it can slip (slack). Use it for \"when will this finish?\", \"what is on the critical path?\" or \"can this task slip?\". Set calendars 'assignee' with levelResources so each person works on one task at a time. Returns { projectEndDate, criticalTaskIds, tasks, overallocations }. For several projects that share people use `calculate_portfolio_critical_path`.",
|
|
5145
5153
|
toolset: "scheduling",
|
|
5146
|
-
outputZodSchema:
|
|
5154
|
+
outputZodSchema: Nn,
|
|
5147
5155
|
zodSchema: B({
|
|
5148
5156
|
projectId: I().optional().describe("Project ID (falls back to ambient context if omitted)"),
|
|
5149
5157
|
calendars: H(["project", "assignee"]).optional().describe("'assignee' schedules each task on its assignee's or team's working calendar; default uses the project calendar"),
|
|
@@ -5169,13 +5177,13 @@ var tr = $({
|
|
|
5169
5177
|
});
|
|
5170
5178
|
}
|
|
5171
5179
|
}),
|
|
5172
|
-
|
|
5180
|
+
dr,
|
|
5173
5181
|
$({
|
|
5174
5182
|
name: "get_timeline_ladder",
|
|
5175
5183
|
title: "Get Timeline Ladder of Abstraction",
|
|
5176
5184
|
description: "Project status at three zoom levels: 'macro' phases with health (on_track, at_risk, blocked, overdue) and progress, 'standard' task timeline with the critical path and dependencies, and 'concrete' evidence of work (time logged, attachments) per task. Use it for project status reports; level 'macro' gives a compact summary. Returns { macro, standard, concrete }. For a single task use `get_task_ladder`.",
|
|
5177
5185
|
toolset: "analytics",
|
|
5178
|
-
outputZodSchema:
|
|
5186
|
+
outputZodSchema: In,
|
|
5179
5187
|
zodSchema: B({
|
|
5180
5188
|
projectId: I().optional().describe("Project ID (falls back to ambient context if omitted)"),
|
|
5181
5189
|
level: H([
|
|
@@ -5203,7 +5211,7 @@ var tr = $({
|
|
|
5203
5211
|
title: "Get Task Ladder View",
|
|
5204
5212
|
description: "One task in context: the phase it belongs to and that phase's health, its place in the schedule (dates, slack, critical or not) and evidence of work done. Use it to explain where a task fits and whether it puts its phase at risk. Returns { macroPhase, standard, concrete, metrics }. For the numbers alone use `get_task_metrics`.",
|
|
5205
5213
|
toolset: "analytics",
|
|
5206
|
-
outputZodSchema:
|
|
5214
|
+
outputZodSchema: Ln,
|
|
5207
5215
|
zodSchema: B({ taskId: I().describe("The task ID") }),
|
|
5208
5216
|
annotations: { readOnlyHint: !0 },
|
|
5209
5217
|
execute: async (e, t) => t.getTaskLadder(e.taskId)
|
|
@@ -5213,7 +5221,7 @@ var tr = $({
|
|
|
5213
5221
|
title: "Get Task Metrics",
|
|
5214
5222
|
description: "Is a task on track? Progress percentage, actual against estimated hours, schedule variance, overdue flags and earned value (CPI, SPI). Use it to diagnose a late or over-budget task. Returns { progress, realityDelta, evm, inferredActuals, progressHistory }.",
|
|
5215
5223
|
toolset: "analytics",
|
|
5216
|
-
outputZodSchema:
|
|
5224
|
+
outputZodSchema: zn,
|
|
5217
5225
|
zodSchema: B({ taskId: I().describe("The task ID") }),
|
|
5218
5226
|
annotations: { readOnlyHint: !0 },
|
|
5219
5227
|
execute: async (e, t) => t.getTaskMetrics(e.taskId)
|
|
@@ -5223,7 +5231,7 @@ var tr = $({
|
|
|
5223
5231
|
title: "Get Task Progress History",
|
|
5224
5232
|
description: "How a task's progress has moved over time: dated progress points and a curve shape (linear, s_curve, early_surge, late_rush, stalled). Use it to tell whether work is stalling or being rushed at the end. Returns { points, curveProfile }. `get_task_metrics` includes the same history alongside variance and earned value.",
|
|
5225
5233
|
toolset: "analytics",
|
|
5226
|
-
outputZodSchema:
|
|
5234
|
+
outputZodSchema: Rn,
|
|
5227
5235
|
zodSchema: B({ taskId: I().describe("The task ID") }),
|
|
5228
5236
|
annotations: { readOnlyHint: !0 },
|
|
5229
5237
|
execute: async (e, t) => t.getTaskProgressHistory(e.taskId)
|
|
@@ -5233,7 +5241,7 @@ var tr = $({
|
|
|
5233
5241
|
title: "Get Workload Distribution",
|
|
5234
5242
|
description: "Hours of work per person, team, task type, priority or status in each day, week or month, with capacity and utilization. Use it for \"who is overloaded?\" and capacity planning; a utilizationRatio above 1 means more work than capacity. Omit projectId for the whole workspace. Returns { buckets, seriesKeys, seriesLabels, totalHours, averageUtilization }.",
|
|
5235
5243
|
toolset: "scheduling",
|
|
5236
|
-
outputZodSchema:
|
|
5244
|
+
outputZodSchema: Bn,
|
|
5237
5245
|
zodSchema: B({
|
|
5238
5246
|
projectId: I().optional().describe("Project ID (optional, defaults to workspace-wide or ambient project)"),
|
|
5239
5247
|
startDate: I().optional().describe("Start date ISO (YYYY-MM-DD)"),
|
|
@@ -5276,7 +5284,7 @@ var tr = $({
|
|
|
5276
5284
|
title: "Get Skill",
|
|
5277
5285
|
description: "Load a step-by-step playbook for a multi-step project management job, such as planning a project, triaging tasks, finding schedule risk, writing a status report, checking capacity or investigating a late task. Call it before starting such a job and follow its steps. Omit name to list the skills. Returns { name, description, content }, or { skills } without a name.",
|
|
5278
5286
|
toolset: "guidance",
|
|
5279
|
-
outputZodSchema:
|
|
5287
|
+
outputZodSchema: Vn,
|
|
5280
5288
|
zodSchema: B({ name: I().optional().describe("Skill name, e.g. \"plan-project\"; omit to list all skills") }),
|
|
5281
5289
|
annotations: { readOnlyHint: !0 },
|
|
5282
5290
|
execute: async (e) => {
|
|
@@ -5284,41 +5292,41 @@ var tr = $({
|
|
|
5284
5292
|
name: e,
|
|
5285
5293
|
description: t
|
|
5286
5294
|
})) };
|
|
5287
|
-
let t =
|
|
5295
|
+
let t = Hn(e.name);
|
|
5288
5296
|
if (!t) throw Error(`Skill "${e.name}" not found. Available skills: ${Q.map((e) => e.name).join(", ")}.`);
|
|
5289
5297
|
return t;
|
|
5290
5298
|
}
|
|
5291
5299
|
})
|
|
5292
|
-
],
|
|
5293
|
-
function
|
|
5294
|
-
let { tools: t, toolsets: n, readOnly: r } = e, i = (t ?? []).filter((e) => !
|
|
5295
|
-
if (i.length > 0) throw Error(`Unknown Critical Path tool(s): ${i.join(", ")}. Known tools: ${
|
|
5296
|
-
let a = (n ?? []).filter((e) => !(e in
|
|
5297
|
-
if (a.length > 0) throw Error(`Unknown Critical Path toolset(s): ${a.join(", ")}. Known toolsets: ${Object.keys(
|
|
5300
|
+
], pr = new Map(fr.map((e) => [e.name, e]));
|
|
5301
|
+
function mr(e = {}) {
|
|
5302
|
+
let { tools: t, toolsets: n, readOnly: r } = e, i = (t ?? []).filter((e) => !pr.has(e));
|
|
5303
|
+
if (i.length > 0) throw Error(`Unknown Critical Path tool(s): ${i.join(", ")}. Known tools: ${fr.map((e) => e.name).join(", ")}.`);
|
|
5304
|
+
let a = (n ?? []).filter((e) => !(e in Un));
|
|
5305
|
+
if (a.length > 0) throw Error(`Unknown Critical Path toolset(s): ${a.join(", ")}. Known toolsets: ${Object.keys(Un).join(", ")}.`);
|
|
5298
5306
|
let o = !t && !n;
|
|
5299
|
-
return
|
|
5307
|
+
return fr.filter((e) => (o || t?.includes(e.name) || n?.includes(e.toolset)) && (!r || e.annotations.readOnlyHint));
|
|
5300
5308
|
}
|
|
5301
|
-
var
|
|
5309
|
+
var hr = class extends Error {
|
|
5302
5310
|
constructor(e) {
|
|
5303
5311
|
super(e), this.name = "ToolNotFoundError";
|
|
5304
5312
|
}
|
|
5305
|
-
},
|
|
5306
|
-
async function
|
|
5313
|
+
}, gr = "Check the id: find valid project ids with `list_projects` and task ids with `list_tasks`. Ids are never guessable, and items you cannot read are reported as not found.";
|
|
5314
|
+
async function _r(e, t, n, r) {
|
|
5307
5315
|
try {
|
|
5308
|
-
let i = await e.execute(
|
|
5309
|
-
if (i == null) throw new
|
|
5316
|
+
let i = await e.execute(Kn(e, t), n, r);
|
|
5317
|
+
if (i == null) throw new hr(`Nothing found for ${JSON.stringify(t ?? {})}.`);
|
|
5310
5318
|
return JSON.parse(JSON.stringify(i));
|
|
5311
5319
|
} catch (t) {
|
|
5312
|
-
throw Error(
|
|
5320
|
+
throw Error(vr(e, t));
|
|
5313
5321
|
}
|
|
5314
5322
|
}
|
|
5315
|
-
function
|
|
5323
|
+
function vr(e, t) {
|
|
5316
5324
|
let n = t?.message || String(t);
|
|
5317
|
-
return t instanceof
|
|
5325
|
+
return t instanceof Gn ? `${n}. Fix the arguments to match the input schema of "${e.name}" and call it again.` : t instanceof hr || t?.name === "NotFoundError" || t?.status === 404 || /not found/i.test(n) ? `${n} ${gr}` : t?.name === "CircularDependencyError" || /circular/i.test(n) ? `${n} The tasks are already ordered the other way round. Check with \`get_task\` and includeDependencies, and ask the user which order is right rather than retrying.` : t?.name === "ForbiddenError" || t?.status === 403 ? `${n} You do not have permission for this; tell the user rather than retrying.` : n;
|
|
5318
5326
|
}
|
|
5319
5327
|
//#endregion
|
|
5320
5328
|
//#region ../mcp/dist/tools/instructions.js
|
|
5321
|
-
var
|
|
5329
|
+
var yr = [
|
|
5322
5330
|
{
|
|
5323
5331
|
when: "Find a project or task id",
|
|
5324
5332
|
tools: ["list_projects", "list_tasks"]
|
|
@@ -5372,7 +5380,7 @@ var vr = [
|
|
|
5372
5380
|
tools: ["get_workload_distribution"]
|
|
5373
5381
|
}
|
|
5374
5382
|
];
|
|
5375
|
-
function
|
|
5383
|
+
function br(e, t = {}) {
|
|
5376
5384
|
let n = new Set(e.map((e) => e.name)), r = [
|
|
5377
5385
|
"Critical Path is a project management backend. A project holds tasks and deliverables (outputs that group the tasks producing them). Tasks have a workflow status, priority, assignee, effort estimate, logged hours, optional subtasks (parentId) and dependencies, and comments. A task with `isMilestone: true` is a zero-duration checkpoint, and a `deadline` on any task is enforced by critical path analysis.",
|
|
5378
5386
|
"",
|
|
@@ -5383,7 +5391,7 @@ function yr(e, t = {}) {
|
|
|
5383
5391
|
"- Confirm with the user before any tool marked destructive."
|
|
5384
5392
|
];
|
|
5385
5393
|
t.projectId && r.push(`- The user is viewing project "${t.projectId}"; tools use it when you omit projectId.`);
|
|
5386
|
-
let i =
|
|
5394
|
+
let i = yr.map((e) => ({
|
|
5387
5395
|
...e,
|
|
5388
5396
|
tools: e.tools.filter((e) => n.has(e))
|
|
5389
5397
|
})).filter((e) => e.tools.length > 0);
|
|
@@ -5399,7 +5407,7 @@ function yr(e, t = {}) {
|
|
|
5399
5407
|
}
|
|
5400
5408
|
//#endregion
|
|
5401
5409
|
//#region ../mcp/dist/web/index.js
|
|
5402
|
-
function
|
|
5410
|
+
function xr(e = typeof document < "u" ? document : null) {
|
|
5403
5411
|
if (!e) return null;
|
|
5404
5412
|
if (!e.modelContext) {
|
|
5405
5413
|
let t = /* @__PURE__ */ new Map();
|
|
@@ -5424,14 +5432,14 @@ function br(e = typeof document < "u" ? document : null) {
|
|
|
5424
5432
|
}
|
|
5425
5433
|
return e.modelContext;
|
|
5426
5434
|
}
|
|
5427
|
-
function
|
|
5435
|
+
function Sr(e) {
|
|
5428
5436
|
let t = e.document ?? (typeof document < "u" ? document : null), n = e.navigator ?? (typeof navigator < "u" ? navigator : null), r = e.window ?? (typeof window < "u" ? window : null), i;
|
|
5429
|
-
t?.modelContext ? i = t.modelContext : n?.modelContext ? i = n.modelContext : t && (i =
|
|
5430
|
-
let a =
|
|
5437
|
+
t?.modelContext ? i = t.modelContext : n?.modelContext ? i = n.modelContext : t && (i = xr(t) ?? void 0);
|
|
5438
|
+
let a = mr({
|
|
5431
5439
|
tools: e.tools,
|
|
5432
5440
|
toolsets: e.toolsets,
|
|
5433
5441
|
readOnly: e.readOnly
|
|
5434
|
-
}), o =
|
|
5442
|
+
}), o = br(a, { projectId: e.projectId }), s = [], c = new AbortController();
|
|
5435
5443
|
if (e.signal?.aborted) return {
|
|
5436
5444
|
unregister: () => {},
|
|
5437
5445
|
getRegisteredTools: () => [],
|
|
@@ -5447,7 +5455,7 @@ function xr(e) {
|
|
|
5447
5455
|
outputSchema: t.outputSchema,
|
|
5448
5456
|
annotations: { ...t.annotations },
|
|
5449
5457
|
execute: async (n) => {
|
|
5450
|
-
let r = e.projectId ? { projectId: e.projectId } : void 0, i = await
|
|
5458
|
+
let r = e.projectId ? { projectId: e.projectId } : void 0, i = await _r(t, n, e.client, r);
|
|
5451
5459
|
return e.onToolExecuted?.(t.name, n, i), i;
|
|
5452
5460
|
}
|
|
5453
5461
|
};
|
|
@@ -5477,7 +5485,7 @@ function xr(e) {
|
|
|
5477
5485
|
}
|
|
5478
5486
|
//#endregion
|
|
5479
5487
|
//#region src/webmcp-state.svelte.ts
|
|
5480
|
-
var
|
|
5488
|
+
var Cr = class {
|
|
5481
5489
|
client;
|
|
5482
5490
|
options;
|
|
5483
5491
|
#e = t.state(!1);
|
|
@@ -5524,7 +5532,7 @@ var Sr = class {
|
|
|
5524
5532
|
if (!this.registered) {
|
|
5525
5533
|
this.error = null;
|
|
5526
5534
|
try {
|
|
5527
|
-
this.abortController = new AbortController(), this.handle =
|
|
5535
|
+
this.abortController = new AbortController(), this.handle = Sr({
|
|
5528
5536
|
client: this.client,
|
|
5529
5537
|
projectId: this.activeProjectId,
|
|
5530
5538
|
tools: this.options.tools,
|
|
@@ -5550,15 +5558,15 @@ var Sr = class {
|
|
|
5550
5558
|
this.activeProjectId !== e && (this.activeProjectId = e, this.registered && (this.unregister(), this.register()));
|
|
5551
5559
|
}
|
|
5552
5560
|
};
|
|
5553
|
-
function
|
|
5554
|
-
return new
|
|
5561
|
+
function wr(e, t) {
|
|
5562
|
+
return new Cr(e, t);
|
|
5555
5563
|
}
|
|
5556
5564
|
//#endregion
|
|
5557
5565
|
//#region src/critical-path-state.svelte.ts
|
|
5558
|
-
var
|
|
5566
|
+
var Tr = class {
|
|
5559
5567
|
client;
|
|
5560
5568
|
projectId;
|
|
5561
|
-
#e = new
|
|
5569
|
+
#e = new a();
|
|
5562
5570
|
#t = t.state(null);
|
|
5563
5571
|
get data() {
|
|
5564
5572
|
return t.get(this.#t);
|
|
@@ -5599,15 +5607,15 @@ var wr = class {
|
|
|
5599
5607
|
this.#e.cancel();
|
|
5600
5608
|
}
|
|
5601
5609
|
};
|
|
5602
|
-
function
|
|
5603
|
-
return new
|
|
5610
|
+
function Er(e, t) {
|
|
5611
|
+
return new Tr(e, t);
|
|
5604
5612
|
}
|
|
5605
5613
|
//#endregion
|
|
5606
5614
|
//#region src/timeline-ladder-state.svelte.ts
|
|
5607
|
-
var
|
|
5615
|
+
var Dr = class {
|
|
5608
5616
|
client;
|
|
5609
5617
|
projectId;
|
|
5610
|
-
#e = new
|
|
5618
|
+
#e = new a();
|
|
5611
5619
|
#t = t.state(null);
|
|
5612
5620
|
get data() {
|
|
5613
5621
|
return t.get(this.#t);
|
|
@@ -5682,17 +5690,17 @@ var Er = class {
|
|
|
5682
5690
|
this.#e.cancel();
|
|
5683
5691
|
}
|
|
5684
5692
|
};
|
|
5685
|
-
function
|
|
5686
|
-
return new
|
|
5693
|
+
function Or(e, t, n) {
|
|
5694
|
+
return new Dr(e, t, n);
|
|
5687
5695
|
}
|
|
5688
5696
|
//#endregion
|
|
5689
5697
|
//#region src/task-metrics-state.svelte.ts
|
|
5690
|
-
var
|
|
5698
|
+
var kr = class {
|
|
5691
5699
|
client;
|
|
5692
5700
|
taskId;
|
|
5693
|
-
#e = new
|
|
5694
|
-
#t = new
|
|
5695
|
-
#n = new
|
|
5701
|
+
#e = new a();
|
|
5702
|
+
#t = new a();
|
|
5703
|
+
#n = new a();
|
|
5696
5704
|
#r = t.state(null);
|
|
5697
5705
|
get metrics() {
|
|
5698
5706
|
return t.get(this.#r);
|
|
@@ -5806,16 +5814,16 @@ var Or = class {
|
|
|
5806
5814
|
this.#e.cancel(), this.#t.cancel(), this.#n.cancel();
|
|
5807
5815
|
}
|
|
5808
5816
|
};
|
|
5809
|
-
function
|
|
5810
|
-
return new
|
|
5817
|
+
function Ar(e, t) {
|
|
5818
|
+
return new kr(e, t);
|
|
5811
5819
|
}
|
|
5812
5820
|
//#endregion
|
|
5813
5821
|
//#region src/workload-state.svelte.ts
|
|
5814
|
-
var
|
|
5822
|
+
var jr = class {
|
|
5815
5823
|
client;
|
|
5816
5824
|
projectId;
|
|
5817
5825
|
initialOptions;
|
|
5818
|
-
#e = new
|
|
5826
|
+
#e = new a();
|
|
5819
5827
|
#t = t.state(null);
|
|
5820
5828
|
get data() {
|
|
5821
5829
|
return t.get(this.#t);
|
|
@@ -5934,13 +5942,13 @@ var Ar = class {
|
|
|
5934
5942
|
this.#e.cancel();
|
|
5935
5943
|
}
|
|
5936
5944
|
};
|
|
5937
|
-
function
|
|
5938
|
-
return new
|
|
5945
|
+
function Mr(e, t, n) {
|
|
5946
|
+
return new jr(e, t, n);
|
|
5939
5947
|
}
|
|
5940
5948
|
//#endregion
|
|
5941
5949
|
//#region src/index.ts
|
|
5942
|
-
function
|
|
5950
|
+
function Nr(t) {
|
|
5943
5951
|
return new e(t);
|
|
5944
5952
|
}
|
|
5945
5953
|
//#endregion
|
|
5946
|
-
export {
|
|
5954
|
+
export { ae as AttachmentState, re as CommentState, Tr as CriticalPathState, le as DeliverableState, de as DeliverableSummaryState, pe as KanbanState, o as ProjectState, se as TaskActivityState, kr as TaskMetricsState, c as TaskState, he as TaskTransitionsState, Dr as TimelineLadderState, Cr as WebMcpState, te as WorkflowState, jr as WorkloadState, oe as createAttachmentState, ie as createCommentState, Nr as createCriticalPathClient, Er as createCriticalPathState, ue as createDeliverableState, fe as createDeliverableSummaryState, me as createKanbanState, s as createProjectState, ce as createTaskActivityState, Ar as createTaskMetricsState, ee as createTaskState, ge as createTaskTransitionsState, Or as createTimelineLadderState, wr as createWebMcpState, ne as createWorkflowState, Mr as createWorkloadState };
|