@agiflowai/agent-cli 0.2.18 → 0.2.19
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 +3 -0
- package/dist/claudeNotification.js +1 -1
- package/dist/claudePermissionRequest.js +1 -1
- package/dist/claudePostToolUse.js +1 -1
- package/dist/claudePreToolUse.js +1 -1
- package/dist/claudeSessionEnd.js +1 -1
- package/dist/claudeSessionStart.js +1 -1
- package/dist/claudeStop.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/daemon.js +1 -1
- package/dist/{index-CkE7X3P2.mjs → index-CnxYuVgu.mjs} +2 -2
- package/dist/index-CnxYuVgu.mjs.map +1 -0
- package/dist/{index-BvnfhTPZ.mjs → index-oo6DLQ9J.mjs} +691 -669
- package/dist/index-oo6DLQ9J.mjs.map +1 -0
- package/dist/{index-Ba8ZwafA.mjs → index-s06HhsTh.mjs} +2 -2
- package/dist/index-s06HhsTh.mjs.map +1 -0
- package/dist/index.js +2 -2
- package/dist/package.json +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/index-Ba8ZwafA.mjs.map +0 -1
- package/dist/index-BvnfhTPZ.mjs.map +0 -1
- package/dist/index-CkE7X3P2.mjs.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import Nr, { homedir as
|
|
3
|
-
import * as
|
|
4
|
-
import Be, { join as _t, resolve as vn, basename as
|
|
1
|
+
import * as No from "os";
|
|
2
|
+
import Nr, { homedir as Un, tmpdir as Dk } from "os";
|
|
3
|
+
import * as ii from "path";
|
|
4
|
+
import Be, { join as _t, resolve as vn, basename as Bo, dirname as bi, parse as Ok } from "path";
|
|
5
5
|
import { execSync as vt, exec as Nk, spawn as Od } from "child_process";
|
|
6
6
|
import * as Jt from "fs";
|
|
7
7
|
import Ee, { promises as Nd, existsSync as At, mkdtempSync as Bk, writeFileSync as Uk, unlinkSync as Mk, statSync as xg, readFileSync as Lk, mkdir as Eg, stat as zk, mkdirSync as wg } from "fs";
|
|
@@ -18,7 +18,7 @@ import { ulid as lt } from "ulidx";
|
|
|
18
18
|
import { fileURLToPath as Cg } from "node:url";
|
|
19
19
|
import * as Or from "node:fs";
|
|
20
20
|
import qk from "node:fs";
|
|
21
|
-
import
|
|
21
|
+
import An from "pino";
|
|
22
22
|
import { createServer as Vk } from "node:http";
|
|
23
23
|
import Hk, { createServer as Kk } from "node:net";
|
|
24
24
|
import bt, { WebSocketServer as ns, WebSocket as Vr } from "ws";
|
|
@@ -620,26 +620,26 @@ class os {
|
|
|
620
620
|
return this.#e();
|
|
621
621
|
}
|
|
622
622
|
}
|
|
623
|
-
function
|
|
623
|
+
function Mn(t, e, r) {
|
|
624
624
|
return Reflect.getOwnMetadata(e, t, r);
|
|
625
625
|
}
|
|
626
626
|
function fl(t, e, r, i) {
|
|
627
627
|
Reflect.defineMetadata(e, r, t, i);
|
|
628
628
|
}
|
|
629
629
|
function Sn(t, e, r, i, n) {
|
|
630
|
-
const o = i(
|
|
630
|
+
const o = i(Mn(t, e, n) ?? r());
|
|
631
631
|
Reflect.defineMetadata(e, o, t, n);
|
|
632
632
|
}
|
|
633
633
|
const Ja = "@inversifyjs/container/bindingId";
|
|
634
634
|
function mn() {
|
|
635
|
-
const t =
|
|
635
|
+
const t = Mn(Object, Ja) ?? 0;
|
|
636
636
|
return t === Number.MAX_SAFE_INTEGER ? fl(Object, Ja, Number.MIN_SAFE_INTEGER) : Sn(Object, Ja, () => t, (e) => e + 1), t;
|
|
637
637
|
}
|
|
638
638
|
const wr = { Request: "Request", Singleton: "Singleton", Transient: "Transient" }, tt = { ConstantValue: "ConstantValue", DynamicValue: "DynamicValue", Factory: "Factory", Instance: "Instance", Provider: "Provider", ResolvedValue: "ResolvedValue", ServiceRedirection: "ServiceRedirection" };
|
|
639
639
|
function* Pg(...t) {
|
|
640
640
|
for (const e of t) yield* e;
|
|
641
641
|
}
|
|
642
|
-
class
|
|
642
|
+
class ro {
|
|
643
643
|
#e;
|
|
644
644
|
#t;
|
|
645
645
|
#n;
|
|
@@ -676,7 +676,7 @@ class to {
|
|
|
676
676
|
}
|
|
677
677
|
}
|
|
678
678
|
_buildNewInstance(e) {
|
|
679
|
-
return new
|
|
679
|
+
return new ro(e);
|
|
680
680
|
}
|
|
681
681
|
_cloneModel(e) {
|
|
682
682
|
return e;
|
|
@@ -743,40 +743,40 @@ class to {
|
|
|
743
743
|
}
|
|
744
744
|
}
|
|
745
745
|
}
|
|
746
|
-
var
|
|
746
|
+
var Mi;
|
|
747
747
|
(function(t) {
|
|
748
748
|
t.moduleId = "moduleId", t.serviceId = "serviceId";
|
|
749
|
-
})(
|
|
750
|
-
class
|
|
749
|
+
})(Mi || (Mi = {}));
|
|
750
|
+
class qi {
|
|
751
751
|
#e;
|
|
752
752
|
#t;
|
|
753
753
|
constructor(e, r) {
|
|
754
|
-
this.#e = r ?? new
|
|
754
|
+
this.#e = r ?? new ro({ moduleId: { isOptional: !0 }, serviceId: { isOptional: !1 } }), this.#t = e;
|
|
755
755
|
}
|
|
756
756
|
static build(e) {
|
|
757
|
-
return new
|
|
757
|
+
return new qi(e);
|
|
758
758
|
}
|
|
759
759
|
add(e, r) {
|
|
760
760
|
this.#e.add(e, r);
|
|
761
761
|
}
|
|
762
762
|
clone() {
|
|
763
|
-
return new
|
|
763
|
+
return new qi(this.#t, this.#e.clone());
|
|
764
764
|
}
|
|
765
765
|
get(e) {
|
|
766
|
-
const r = [], i = this.#e.get(
|
|
766
|
+
const r = [], i = this.#e.get(Mi.serviceId, e);
|
|
767
767
|
i !== void 0 && r.push(i);
|
|
768
768
|
const n = this.#t()?.get(e);
|
|
769
769
|
if (n !== void 0 && r.push(n), r.length !== 0) return Pg(...r);
|
|
770
770
|
}
|
|
771
771
|
removeAllByModuleId(e) {
|
|
772
|
-
this.#e.removeByRelation(
|
|
772
|
+
this.#e.removeByRelation(Mi.moduleId, e);
|
|
773
773
|
}
|
|
774
774
|
removeAllByServiceId(e) {
|
|
775
|
-
this.#e.removeByRelation(
|
|
775
|
+
this.#e.removeByRelation(Mi.serviceId, e);
|
|
776
776
|
}
|
|
777
777
|
}
|
|
778
|
-
const
|
|
779
|
-
function
|
|
778
|
+
const Li = "@inversifyjs/core/classMetadataReflectKey";
|
|
779
|
+
function zi() {
|
|
780
780
|
return { constructorArguments: [], lifecycle: { postConstructMethodNames: /* @__PURE__ */ new Set(), preDestroyMethodNames: /* @__PURE__ */ new Set() }, properties: /* @__PURE__ */ new Map(), scope: void 0 };
|
|
781
781
|
}
|
|
782
782
|
const hl = "@inversifyjs/core/pendingClassMetadataCountReflectKey", Ya = Symbol.for("@inversifyjs/core/InversifyCoreError");
|
|
@@ -793,11 +793,11 @@ class ot extends Error {
|
|
|
793
793
|
return ot.is(e) && e.kind === r;
|
|
794
794
|
}
|
|
795
795
|
}
|
|
796
|
-
var st,
|
|
796
|
+
var st, Ln, fr, Fi, ir;
|
|
797
797
|
function zs(t) {
|
|
798
|
-
const e =
|
|
798
|
+
const e = Mn(t, Li) ?? zi();
|
|
799
799
|
if (!function(r) {
|
|
800
|
-
const i =
|
|
800
|
+
const i = Mn(r, hl);
|
|
801
801
|
return i !== void 0 && i !== 0;
|
|
802
802
|
}(t)) return function(r, i) {
|
|
803
803
|
const n = [];
|
|
@@ -816,10 +816,10 @@ If you're using typescript and want to rely on auto injection, set "emitDecorato
|
|
|
816
816
|
const n = [];
|
|
817
817
|
for (let o = 0; o < i.constructorArguments.length; ++o) {
|
|
818
818
|
const s = i.constructorArguments[o];
|
|
819
|
-
s !== void 0 && s.kind !==
|
|
819
|
+
s !== void 0 && s.kind !== Ln.unknown || n.push(` - Missing or incomplete metadata for type "${r.name}" at constructor argument with index ${o.toString()}.
|
|
820
820
|
Every constructor parameter must be decorated either with @inject, @multiInject or @unmanaged decorator.`);
|
|
821
821
|
}
|
|
822
|
-
for (const [o, s] of i.properties) s.kind ===
|
|
822
|
+
for (const [o, s] of i.properties) s.kind === Ln.unknown && n.push(` - Missing or incomplete metadata for type "${r.name}" at property "${o.toString()}".
|
|
823
823
|
This property must be decorated either with @inject or @multiInject decorator.`);
|
|
824
824
|
throw n.length === 0 ? new ot(st.unknown, `Unexpected class metadata for type "${r.name}" with uncompletion traces.
|
|
825
825
|
This might be caused by one of the following reasons:
|
|
@@ -836,7 +836,7 @@ function Dg(t, e) {
|
|
|
836
836
|
const r = zs(e).scope ?? t.scope;
|
|
837
837
|
return { cache: { isRight: !1, value: void 0 }, id: mn(), implementationType: e, isSatisfiedBy: () => !0, moduleId: void 0, onActivation: void 0, onDeactivation: void 0, scope: r, serviceIdentifier: e, type: tt.Instance };
|
|
838
838
|
}
|
|
839
|
-
function
|
|
839
|
+
function Ai(t) {
|
|
840
840
|
return t.isRight ? { isRight: !0, value: t.value } : t;
|
|
841
841
|
}
|
|
842
842
|
function lx(t) {
|
|
@@ -844,23 +844,23 @@ function lx(t) {
|
|
|
844
844
|
case tt.ConstantValue:
|
|
845
845
|
case tt.DynamicValue:
|
|
846
846
|
return function(e) {
|
|
847
|
-
return { cache:
|
|
847
|
+
return { cache: Ai(e.cache), id: e.id, isSatisfiedBy: e.isSatisfiedBy, moduleId: e.moduleId, onActivation: e.onActivation, onDeactivation: e.onDeactivation, scope: e.scope, serviceIdentifier: e.serviceIdentifier, type: e.type, value: e.value };
|
|
848
848
|
}(t);
|
|
849
849
|
case tt.Factory:
|
|
850
850
|
return function(e) {
|
|
851
|
-
return { cache:
|
|
851
|
+
return { cache: Ai(e.cache), factory: e.factory, id: e.id, isSatisfiedBy: e.isSatisfiedBy, moduleId: e.moduleId, onActivation: e.onActivation, onDeactivation: e.onDeactivation, scope: e.scope, serviceIdentifier: e.serviceIdentifier, type: e.type };
|
|
852
852
|
}(t);
|
|
853
853
|
case tt.Instance:
|
|
854
854
|
return function(e) {
|
|
855
|
-
return { cache:
|
|
855
|
+
return { cache: Ai(e.cache), id: e.id, implementationType: e.implementationType, isSatisfiedBy: e.isSatisfiedBy, moduleId: e.moduleId, onActivation: e.onActivation, onDeactivation: e.onDeactivation, scope: e.scope, serviceIdentifier: e.serviceIdentifier, type: e.type };
|
|
856
856
|
}(t);
|
|
857
857
|
case tt.Provider:
|
|
858
858
|
return function(e) {
|
|
859
|
-
return { cache:
|
|
859
|
+
return { cache: Ai(e.cache), id: e.id, isSatisfiedBy: e.isSatisfiedBy, moduleId: e.moduleId, onActivation: e.onActivation, onDeactivation: e.onDeactivation, provider: e.provider, scope: e.scope, serviceIdentifier: e.serviceIdentifier, type: e.type };
|
|
860
860
|
}(t);
|
|
861
861
|
case tt.ResolvedValue:
|
|
862
862
|
return function(e) {
|
|
863
|
-
return { cache:
|
|
863
|
+
return { cache: Ai(e.cache), factory: e.factory, id: e.id, isSatisfiedBy: e.isSatisfiedBy, metadata: e.metadata, moduleId: e.moduleId, onActivation: e.onActivation, onDeactivation: e.onDeactivation, scope: e.scope, serviceIdentifier: e.serviceIdentifier, type: e.type };
|
|
864
864
|
}(t);
|
|
865
865
|
case tt.ServiceRedirection:
|
|
866
866
|
return function(e) {
|
|
@@ -872,10 +872,10 @@ function lx(t) {
|
|
|
872
872
|
t[t.injectionDecoratorConflict = 0] = "injectionDecoratorConflict", t[t.missingInjectionDecorator = 1] = "missingInjectionDecorator", t[t.planning = 2] = "planning", t[t.resolution = 3] = "resolution", t[t.unknown = 4] = "unknown";
|
|
873
873
|
})(st || (st = {})), function(t) {
|
|
874
874
|
t[t.unknown = 32] = "unknown";
|
|
875
|
-
}(
|
|
875
|
+
}(Ln || (Ln = {})), function(t) {
|
|
876
876
|
t.id = "id", t.moduleId = "moduleId", t.serviceId = "serviceId";
|
|
877
877
|
}(fr || (fr = {}));
|
|
878
|
-
class gl extends
|
|
878
|
+
class gl extends ro {
|
|
879
879
|
_buildNewInstance(e) {
|
|
880
880
|
return new gl(e);
|
|
881
881
|
}
|
|
@@ -951,12 +951,12 @@ let Md = class ic {
|
|
|
951
951
|
};
|
|
952
952
|
(function(t) {
|
|
953
953
|
t.moduleId = "moduleId", t.serviceId = "serviceId";
|
|
954
|
-
})(
|
|
954
|
+
})(Fi || (Fi = {}));
|
|
955
955
|
let Ld = class oc {
|
|
956
956
|
#e;
|
|
957
957
|
#t;
|
|
958
958
|
constructor(e, r) {
|
|
959
|
-
this.#e = r ?? new
|
|
959
|
+
this.#e = r ?? new ro({ moduleId: { isOptional: !0 }, serviceId: { isOptional: !1 } }), this.#t = e;
|
|
960
960
|
}
|
|
961
961
|
static build(e) {
|
|
962
962
|
return new oc(e);
|
|
@@ -968,16 +968,16 @@ let Ld = class oc {
|
|
|
968
968
|
return new oc(this.#t, this.#e.clone());
|
|
969
969
|
}
|
|
970
970
|
get(e) {
|
|
971
|
-
const r = [], i = this.#e.get(
|
|
971
|
+
const r = [], i = this.#e.get(Fi.serviceId, e);
|
|
972
972
|
i !== void 0 && r.push(i);
|
|
973
973
|
const n = this.#t()?.get(e);
|
|
974
974
|
if (n !== void 0 && r.push(n), r.length !== 0) return Pg(...r);
|
|
975
975
|
}
|
|
976
976
|
removeAllByModuleId(e) {
|
|
977
|
-
this.#e.removeByRelation(
|
|
977
|
+
this.#e.removeByRelation(Fi.moduleId, e);
|
|
978
978
|
}
|
|
979
979
|
removeAllByServiceId(e) {
|
|
980
|
-
this.#e.removeByRelation(
|
|
980
|
+
this.#e.removeByRelation(Fi.serviceId, e);
|
|
981
981
|
}
|
|
982
982
|
};
|
|
983
983
|
function Og() {
|
|
@@ -985,7 +985,7 @@ function Og() {
|
|
|
985
985
|
}
|
|
986
986
|
function Ng(t) {
|
|
987
987
|
return (e) => {
|
|
988
|
-
e !== void 0 && e.kind ===
|
|
988
|
+
e !== void 0 && e.kind === Ln.unknown && Sn(t, hl, Og, (r) => r - 1);
|
|
989
989
|
};
|
|
990
990
|
}
|
|
991
991
|
function Bg(t, e) {
|
|
@@ -996,7 +996,7 @@ function Bg(t, e) {
|
|
|
996
996
|
};
|
|
997
997
|
}
|
|
998
998
|
function Ug(t) {
|
|
999
|
-
if (t.kind !==
|
|
999
|
+
if (t.kind !== Ln.unknown && t.isFromTypescriptParamType !== !0) throw new ot(st.injectionDecoratorConflict, "Unexpected injection found. Multiple @inject, @multiInject or @unmanaged decorators found");
|
|
1000
1000
|
}
|
|
1001
1001
|
(function(t) {
|
|
1002
1002
|
t[t.multipleInjection = 0] = "multipleInjection", t[t.singleInjection = 1] = "singleInjection", t[t.unmanaged = 2] = "unmanaged";
|
|
@@ -1049,7 +1049,7 @@ function ml(t, e) {
|
|
|
1049
1049
|
n === void 0 ? function(o, s) {
|
|
1050
1050
|
const a = Xa(o, s);
|
|
1051
1051
|
return (u, c) => {
|
|
1052
|
-
Sn(u.constructor,
|
|
1052
|
+
Sn(u.constructor, Li, zi, zd(a(u), c));
|
|
1053
1053
|
};
|
|
1054
1054
|
}(t, e)(r, i) : typeof n == "number" ? function(o, s) {
|
|
1055
1055
|
const a = Xa(o, s);
|
|
@@ -1058,7 +1058,7 @@ function ml(t, e) {
|
|
|
1058
1058
|
return typeof m == "function" && h === void 0;
|
|
1059
1059
|
}(u, c)) throw new ot(st.injectionDecoratorConflict, `Found an @inject decorator in a non constructor parameter.
|
|
1060
1060
|
Found @inject decorator at method "${c?.toString() ?? ""}" at class "${u.constructor.name}"`);
|
|
1061
|
-
Sn(u,
|
|
1061
|
+
Sn(u, Li, zi, /* @__PURE__ */ function(m, h) {
|
|
1062
1062
|
return (f) => {
|
|
1063
1063
|
const _ = f.constructorArguments[h];
|
|
1064
1064
|
return f.constructorArguments[h] = m(_), f;
|
|
@@ -1072,7 +1072,7 @@ Found @inject decorator at method "${c?.toString() ?? ""}" at class "${u.constru
|
|
|
1072
1072
|
return m.set !== void 0;
|
|
1073
1073
|
}(l)) throw new ot(st.injectionDecoratorConflict, `Found an @inject decorator in a non setter property method.
|
|
1074
1074
|
Found @inject decorator at method "${c.toString()}" at class "${u.constructor.name}"`);
|
|
1075
|
-
Sn(u.constructor,
|
|
1075
|
+
Sn(u.constructor, Li, zi, zd(a(u), c));
|
|
1076
1076
|
};
|
|
1077
1077
|
}(t, e)(r, i, n);
|
|
1078
1078
|
} catch (o) {
|
|
@@ -1094,8 +1094,8 @@ function H(t) {
|
|
|
1094
1094
|
})(_n || (_n = {}));
|
|
1095
1095
|
const Fd = "@inversifyjs/core/classIsInjectableFlagReflectKey", fx = [Array, BigInt, Boolean, Function, Number, Object, String];
|
|
1096
1096
|
function hx(t) {
|
|
1097
|
-
const e =
|
|
1098
|
-
e !== void 0 && Sn(t,
|
|
1097
|
+
const e = Mn(t, "design:paramtypes");
|
|
1098
|
+
e !== void 0 && Sn(t, Li, zi, /* @__PURE__ */ function(r) {
|
|
1099
1099
|
return (i) => (r.forEach((n, o) => {
|
|
1100
1100
|
var s;
|
|
1101
1101
|
i.constructorArguments[o] !== void 0 || (s = n, fx.includes(s)) || (i.constructorArguments[o] = function(a) {
|
|
@@ -1107,7 +1107,7 @@ function hx(t) {
|
|
|
1107
1107
|
function xe(t) {
|
|
1108
1108
|
return (e) => {
|
|
1109
1109
|
(function(r) {
|
|
1110
|
-
if (
|
|
1110
|
+
if (Mn(r, Fd) !== void 0) throw new ot(st.injectionDecoratorConflict, `Cannot apply @injectable decorator multiple times at class "${r.name}"`);
|
|
1111
1111
|
fl(r, Fd, !0);
|
|
1112
1112
|
})(e), hx(e);
|
|
1113
1113
|
};
|
|
@@ -1119,7 +1119,7 @@ function gx(t) {
|
|
|
1119
1119
|
}
|
|
1120
1120
|
function mx(t) {
|
|
1121
1121
|
return (e) => {
|
|
1122
|
-
const r = e ?? { kind:
|
|
1122
|
+
const r = e ?? { kind: Ln.unknown, name: void 0, optional: !1, tags: /* @__PURE__ */ new Map() };
|
|
1123
1123
|
if (r.kind === ir.unmanaged) throw new ot(st.injectionDecoratorConflict, "Unexpected injection found. Found @unmanaged injection with additional @named, @optional, @tagged or @targetName injections");
|
|
1124
1124
|
return t(r);
|
|
1125
1125
|
};
|
|
@@ -1255,7 +1255,7 @@ function sc(t) {
|
|
|
1255
1255
|
const e = /* @__PURE__ */ new Map();
|
|
1256
1256
|
return t.rootConstraints.tag !== void 0 && e.set(t.rootConstraints.tag.key, t.rootConstraints.tag.value), new vl({ elem: { getAncestorsCalled: !1, name: t.rootConstraints.name, serviceIdentifier: t.rootConstraints.serviceIdentifier, tags: e }, previous: void 0 });
|
|
1257
1257
|
}
|
|
1258
|
-
function
|
|
1258
|
+
function zn(t) {
|
|
1259
1259
|
return t.redirections !== void 0;
|
|
1260
1260
|
}
|
|
1261
1261
|
function Lg(t, e, r, i) {
|
|
@@ -1316,14 +1316,14 @@ function jg(t) {
|
|
|
1316
1316
|
function Gg(t, e, r, i) {
|
|
1317
1317
|
if (t.redirections.length === 1) {
|
|
1318
1318
|
const [n] = t.redirections;
|
|
1319
|
-
return void (
|
|
1319
|
+
return void (zn(n) && Gg(n, e, r, [...i, n.binding.targetServiceIdentifier]));
|
|
1320
1320
|
}
|
|
1321
1321
|
Lg(t.redirections, e, r, i);
|
|
1322
1322
|
}
|
|
1323
1323
|
function yl(t, e, r) {
|
|
1324
1324
|
if (Array.isArray(t.bindings) && t.bindings.length === 1) {
|
|
1325
1325
|
const [i] = t.bindings;
|
|
1326
|
-
return void (
|
|
1326
|
+
return void (zn(i) && Gg(i, e, r, [i.binding.targetServiceIdentifier]));
|
|
1327
1327
|
}
|
|
1328
1328
|
Lg(t.bindings, e, r, []);
|
|
1329
1329
|
}
|
|
@@ -1364,7 +1364,7 @@ function Hg(t) {
|
|
|
1364
1364
|
return o(l, u);
|
|
1365
1365
|
};
|
|
1366
1366
|
}(t), i = (o, s, a, u, c) => {
|
|
1367
|
-
const l =
|
|
1367
|
+
const l = zn(u) ? u.binding.targetServiceIdentifier : u.serviceIdentifier;
|
|
1368
1368
|
o.servicesBranch.push(l);
|
|
1369
1369
|
const m = [];
|
|
1370
1370
|
for (const h of a) switch (h.type) {
|
|
@@ -1776,7 +1776,7 @@ function $x(t, e) {
|
|
|
1776
1776
|
const m = [], h = l.bindings;
|
|
1777
1777
|
if (h === void 0) return m;
|
|
1778
1778
|
const f = (_) => {
|
|
1779
|
-
if (
|
|
1779
|
+
if (zn(_)) for (const v of _.redirections) f(v);
|
|
1780
1780
|
else switch (_.binding.type) {
|
|
1781
1781
|
case tt.Instance: {
|
|
1782
1782
|
const v = _;
|
|
@@ -1928,7 +1928,7 @@ const Qd = /* @__PURE__ */ function(t) {
|
|
|
1928
1928
|
}(Gs), ef = /* @__PURE__ */ function(t) {
|
|
1929
1929
|
return function e(r, i) {
|
|
1930
1930
|
const n = [];
|
|
1931
|
-
for (const o of i.redirections)
|
|
1931
|
+
for (const o of i.redirections) zn(o) ? n.push(...e(r, o)) : n.push(t(r, o));
|
|
1932
1932
|
return n;
|
|
1933
1933
|
};
|
|
1934
1934
|
}(cc), Lx = /* @__PURE__ */ function(t, e, r) {
|
|
@@ -1985,10 +1985,10 @@ function cc(t, e) {
|
|
|
1985
1985
|
function Gs(t, e) {
|
|
1986
1986
|
if (e.bindings !== void 0) return Array.isArray(e.bindings) ? function(r, i) {
|
|
1987
1987
|
const n = [];
|
|
1988
|
-
for (const o of i)
|
|
1988
|
+
for (const o of i) zn(o) ? n.push(...ef(r, o)) : n.push(cc(r, o));
|
|
1989
1989
|
return n.some($t) ? Promise.all(n) : n;
|
|
1990
1990
|
}(t, e.bindings) : function(r, i) {
|
|
1991
|
-
if (
|
|
1991
|
+
if (zn(i)) {
|
|
1992
1992
|
const n = ef(r, i);
|
|
1993
1993
|
if (n.length === 1) return n[0];
|
|
1994
1994
|
throw new ot(st.resolution, "Unexpected multiple resolved values on single injection");
|
|
@@ -2071,7 +2071,7 @@ class Jr {
|
|
|
2071
2071
|
#t;
|
|
2072
2072
|
constructor(e) {
|
|
2073
2073
|
this.#e = function() {
|
|
2074
|
-
const r =
|
|
2074
|
+
const r = Mn(Object, eu) ?? 0;
|
|
2075
2075
|
return r === Number.MAX_SAFE_INTEGER ? fl(Object, eu, Number.MIN_SAFE_INTEGER) : Sn(Object, eu, () => r, (i) => i + 1), r;
|
|
2076
2076
|
}(), this.#t = e;
|
|
2077
2077
|
}
|
|
@@ -2086,7 +2086,7 @@ const Xg = Symbol.for("@inversifyjs/container/bindingIdentifier");
|
|
|
2086
2086
|
function uf(t) {
|
|
2087
2087
|
return typeof t == "object" && t !== null && t[Xg] === !0;
|
|
2088
2088
|
}
|
|
2089
|
-
class
|
|
2089
|
+
class $n {
|
|
2090
2090
|
static always = (e) => !0;
|
|
2091
2091
|
}
|
|
2092
2092
|
const tu = Symbol.for("@inversifyjs/container/InversifyContainerError");
|
|
@@ -2107,26 +2107,26 @@ var zr;
|
|
|
2107
2107
|
function xl(t) {
|
|
2108
2108
|
return { [Xg]: !0, id: t.id };
|
|
2109
2109
|
}
|
|
2110
|
-
function
|
|
2110
|
+
function Ni(t) {
|
|
2111
2111
|
return (e) => {
|
|
2112
2112
|
for (let r = e.getAncestor(); r !== void 0; r = r.getAncestor()) if (t(r)) return !0;
|
|
2113
2113
|
return !1;
|
|
2114
2114
|
};
|
|
2115
2115
|
}
|
|
2116
|
-
function
|
|
2116
|
+
function $i(t) {
|
|
2117
2117
|
return (e) => e.name === t;
|
|
2118
2118
|
}
|
|
2119
2119
|
function Uo(t) {
|
|
2120
2120
|
return (e) => e.serviceIdentifier === t;
|
|
2121
2121
|
}
|
|
2122
|
-
function
|
|
2122
|
+
function Ri(t, e) {
|
|
2123
2123
|
return (r) => r.tags.has(t) && r.tags.get(t) === e;
|
|
2124
2124
|
}
|
|
2125
2125
|
function Zx(t) {
|
|
2126
2126
|
return t.name === void 0 && t.tags.size === 0;
|
|
2127
2127
|
}
|
|
2128
2128
|
function Mo(t) {
|
|
2129
|
-
const e =
|
|
2129
|
+
const e = Ni(t);
|
|
2130
2130
|
return (r) => !e(r);
|
|
2131
2131
|
}
|
|
2132
2132
|
function Lo(t) {
|
|
@@ -2153,13 +2153,13 @@ class Jx {
|
|
|
2153
2153
|
return xl(this.#e);
|
|
2154
2154
|
}
|
|
2155
2155
|
inRequestScope() {
|
|
2156
|
-
return this.#e.scope = wr.Request, new
|
|
2156
|
+
return this.#e.scope = wr.Request, new On(this.#e);
|
|
2157
2157
|
}
|
|
2158
2158
|
inSingletonScope() {
|
|
2159
|
-
return this.#e.scope = wr.Singleton, new
|
|
2159
|
+
return this.#e.scope = wr.Singleton, new On(this.#e);
|
|
2160
2160
|
}
|
|
2161
2161
|
inTransientScope() {
|
|
2162
|
-
return this.#e.scope = wr.Transient, new
|
|
2162
|
+
return this.#e.scope = wr.Transient, new On(this.#e);
|
|
2163
2163
|
}
|
|
2164
2164
|
}
|
|
2165
2165
|
class Qg {
|
|
@@ -2171,7 +2171,7 @@ class Qg {
|
|
|
2171
2171
|
this.#e = e, this.#t = r, this.#n = i, this.#r = n;
|
|
2172
2172
|
}
|
|
2173
2173
|
to(e) {
|
|
2174
|
-
const r = zs(e), i = { cache: { isRight: !1, value: void 0 }, id: mn(), implementationType: e, isSatisfiedBy:
|
|
2174
|
+
const r = zs(e), i = { cache: { isRight: !1, value: void 0 }, id: mn(), implementationType: e, isSatisfiedBy: $n.always, moduleId: this.#t, onActivation: void 0, onDeactivation: void 0, scope: r.scope ?? this.#n, serviceIdentifier: this.#r, type: tt.Instance };
|
|
2175
2175
|
return this.#e(i), new ru(i);
|
|
2176
2176
|
}
|
|
2177
2177
|
toSelf() {
|
|
@@ -2179,27 +2179,27 @@ class Qg {
|
|
|
2179
2179
|
return this.to(this.#r);
|
|
2180
2180
|
}
|
|
2181
2181
|
toConstantValue(e) {
|
|
2182
|
-
const r = { cache: { isRight: !1, value: void 0 }, id: mn(), isSatisfiedBy:
|
|
2183
|
-
return this.#e(r), new
|
|
2182
|
+
const r = { cache: { isRight: !1, value: void 0 }, id: mn(), isSatisfiedBy: $n.always, moduleId: this.#t, onActivation: void 0, onDeactivation: void 0, scope: wr.Singleton, serviceIdentifier: this.#r, type: tt.ConstantValue, value: e };
|
|
2183
|
+
return this.#e(r), new On(r);
|
|
2184
2184
|
}
|
|
2185
2185
|
toDynamicValue(e) {
|
|
2186
|
-
const r = { cache: { isRight: !1, value: void 0 }, id: mn(), isSatisfiedBy:
|
|
2186
|
+
const r = { cache: { isRight: !1, value: void 0 }, id: mn(), isSatisfiedBy: $n.always, moduleId: this.#t, onActivation: void 0, onDeactivation: void 0, scope: this.#n, serviceIdentifier: this.#r, type: tt.DynamicValue, value: e };
|
|
2187
2187
|
return this.#e(r), new ru(r);
|
|
2188
2188
|
}
|
|
2189
2189
|
toResolvedValue(e, r) {
|
|
2190
|
-
const i = { cache: { isRight: !1, value: void 0 }, factory: e, id: mn(), isSatisfiedBy:
|
|
2190
|
+
const i = { cache: { isRight: !1, value: void 0 }, factory: e, id: mn(), isSatisfiedBy: $n.always, metadata: this.#i(r), moduleId: this.#t, onActivation: void 0, onDeactivation: void 0, scope: this.#n, serviceIdentifier: this.#r, type: tt.ResolvedValue };
|
|
2191
2191
|
return this.#e(i), new ru(i);
|
|
2192
2192
|
}
|
|
2193
2193
|
toFactory(e) {
|
|
2194
|
-
const r = { cache: { isRight: !1, value: void 0 }, factory: e, id: mn(), isSatisfiedBy:
|
|
2195
|
-
return this.#e(r), new
|
|
2194
|
+
const r = { cache: { isRight: !1, value: void 0 }, factory: e, id: mn(), isSatisfiedBy: $n.always, moduleId: this.#t, onActivation: void 0, onDeactivation: void 0, scope: wr.Singleton, serviceIdentifier: this.#r, type: tt.Factory };
|
|
2195
|
+
return this.#e(r), new On(r);
|
|
2196
2196
|
}
|
|
2197
2197
|
toProvider(e) {
|
|
2198
|
-
const r = { cache: { isRight: !1, value: void 0 }, id: mn(), isSatisfiedBy:
|
|
2199
|
-
return this.#e(r), new
|
|
2198
|
+
const r = { cache: { isRight: !1, value: void 0 }, id: mn(), isSatisfiedBy: $n.always, moduleId: this.#t, onActivation: void 0, onDeactivation: void 0, provider: e, scope: wr.Singleton, serviceIdentifier: this.#r, type: tt.Provider };
|
|
2199
|
+
return this.#e(r), new On(r);
|
|
2200
2200
|
}
|
|
2201
2201
|
toService(e) {
|
|
2202
|
-
const r = { id: mn(), isSatisfiedBy:
|
|
2202
|
+
const r = { id: mn(), isSatisfiedBy: $n.always, moduleId: this.#t, serviceIdentifier: this.#r, targetServiceIdentifier: e, type: tt.ServiceRedirection };
|
|
2203
2203
|
this.#e(r);
|
|
2204
2204
|
}
|
|
2205
2205
|
#i(e) {
|
|
@@ -2238,26 +2238,26 @@ class lc {
|
|
|
2238
2238
|
return this.#e.isSatisfiedBy = e, new em(this.#e);
|
|
2239
2239
|
}
|
|
2240
2240
|
whenAnyAncestor(e) {
|
|
2241
|
-
return this.when(
|
|
2241
|
+
return this.when(Ni(e));
|
|
2242
2242
|
}
|
|
2243
2243
|
whenAnyAncestorIs(e) {
|
|
2244
|
-
return this.when(
|
|
2244
|
+
return this.when(Ni(Uo(e)));
|
|
2245
2245
|
}
|
|
2246
2246
|
whenAnyAncestorNamed(e) {
|
|
2247
2247
|
return this.when(function(r) {
|
|
2248
|
-
return
|
|
2248
|
+
return Ni($i(r));
|
|
2249
2249
|
}(e));
|
|
2250
2250
|
}
|
|
2251
2251
|
whenAnyAncestorTagged(e, r) {
|
|
2252
2252
|
return this.when(function(i, n) {
|
|
2253
|
-
return
|
|
2253
|
+
return Ni(Ri(i, n));
|
|
2254
2254
|
}(e, r));
|
|
2255
2255
|
}
|
|
2256
2256
|
whenDefault() {
|
|
2257
2257
|
return this.when(Zx);
|
|
2258
2258
|
}
|
|
2259
2259
|
whenNamed(e) {
|
|
2260
|
-
return this.when(
|
|
2260
|
+
return this.when($i(e));
|
|
2261
2261
|
}
|
|
2262
2262
|
whenNoParent(e) {
|
|
2263
2263
|
return this.when(Lo(e));
|
|
@@ -2267,12 +2267,12 @@ class lc {
|
|
|
2267
2267
|
}
|
|
2268
2268
|
whenNoParentNamed(e) {
|
|
2269
2269
|
return this.when(function(r) {
|
|
2270
|
-
return Lo(
|
|
2270
|
+
return Lo($i(r));
|
|
2271
2271
|
}(e));
|
|
2272
2272
|
}
|
|
2273
2273
|
whenNoParentTagged(e, r) {
|
|
2274
2274
|
return this.when(function(i, n) {
|
|
2275
|
-
return Lo(
|
|
2275
|
+
return Lo(Ri(i, n));
|
|
2276
2276
|
}(e, r));
|
|
2277
2277
|
}
|
|
2278
2278
|
whenParent(e) {
|
|
@@ -2283,16 +2283,16 @@ class lc {
|
|
|
2283
2283
|
}
|
|
2284
2284
|
whenParentNamed(e) {
|
|
2285
2285
|
return this.when(function(r) {
|
|
2286
|
-
return zo(
|
|
2286
|
+
return zo($i(r));
|
|
2287
2287
|
}(e));
|
|
2288
2288
|
}
|
|
2289
2289
|
whenParentTagged(e, r) {
|
|
2290
2290
|
return this.when(function(i, n) {
|
|
2291
|
-
return zo(
|
|
2291
|
+
return zo(Ri(i, n));
|
|
2292
2292
|
}(e, r));
|
|
2293
2293
|
}
|
|
2294
2294
|
whenTagged(e, r) {
|
|
2295
|
-
return this.when(
|
|
2295
|
+
return this.when(Ri(e, r));
|
|
2296
2296
|
}
|
|
2297
2297
|
whenNoAncestor(e) {
|
|
2298
2298
|
return this.when(Mo(e));
|
|
@@ -2302,16 +2302,16 @@ class lc {
|
|
|
2302
2302
|
}
|
|
2303
2303
|
whenNoAncestorNamed(e) {
|
|
2304
2304
|
return this.when(function(r) {
|
|
2305
|
-
return Mo(
|
|
2305
|
+
return Mo($i(r));
|
|
2306
2306
|
}(e));
|
|
2307
2307
|
}
|
|
2308
2308
|
whenNoAncestorTagged(e, r) {
|
|
2309
2309
|
return this.when(function(i, n) {
|
|
2310
|
-
return Mo(
|
|
2310
|
+
return Mo(Ri(i, n));
|
|
2311
2311
|
}(e, r));
|
|
2312
2312
|
}
|
|
2313
2313
|
}
|
|
2314
|
-
class
|
|
2314
|
+
class On extends lc {
|
|
2315
2315
|
#e;
|
|
2316
2316
|
constructor(e) {
|
|
2317
2317
|
super(e), this.#e = new em(e);
|
|
@@ -2323,7 +2323,7 @@ class Dn extends lc {
|
|
|
2323
2323
|
return this.#e.onDeactivation(e);
|
|
2324
2324
|
}
|
|
2325
2325
|
}
|
|
2326
|
-
class ru extends
|
|
2326
|
+
class ru extends On {
|
|
2327
2327
|
#e;
|
|
2328
2328
|
constructor(e) {
|
|
2329
2329
|
super(e), this.#e = new Jx(e);
|
|
@@ -2720,12 +2720,12 @@ class qs {
|
|
|
2720
2720
|
}
|
|
2721
2721
|
#c(e, r, i) {
|
|
2722
2722
|
const n = this.#s(r, i);
|
|
2723
|
-
if (e?.parent === void 0) return new cf(
|
|
2723
|
+
if (e?.parent === void 0) return new cf(qi.build(() => {
|
|
2724
2724
|
}), Md.build(() => {
|
|
2725
2725
|
}, n), Ld.build(() => {
|
|
2726
2726
|
}), new Kd());
|
|
2727
2727
|
const o = new Kd(), s = e.parent;
|
|
2728
|
-
return s.#r.planResultCacheService.subscribe(o), new cf(
|
|
2728
|
+
return s.#r.planResultCacheService.subscribe(o), new cf(qi.build(() => s.#r.activationService), Md.build(() => s.#r.bindingService, n), Ld.build(() => s.#r.deactivationService), o);
|
|
2729
2729
|
}
|
|
2730
2730
|
}
|
|
2731
2731
|
const tm = Object.freeze({
|
|
@@ -2766,7 +2766,7 @@ function K(t, e, r) {
|
|
|
2766
2766
|
}), Object.defineProperty(s, "name", { value: t }), s;
|
|
2767
2767
|
}
|
|
2768
2768
|
const rm = Symbol("zod_brand");
|
|
2769
|
-
class
|
|
2769
|
+
class Nn extends Error {
|
|
2770
2770
|
constructor() {
|
|
2771
2771
|
super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
|
|
2772
2772
|
}
|
|
@@ -2803,7 +2803,7 @@ function ae(t, e = "|") {
|
|
|
2803
2803
|
function us(t, e) {
|
|
2804
2804
|
return typeof e == "bigint" ? e.toString() : e;
|
|
2805
2805
|
}
|
|
2806
|
-
function
|
|
2806
|
+
function no(t) {
|
|
2807
2807
|
return {
|
|
2808
2808
|
get value() {
|
|
2809
2809
|
{
|
|
@@ -2813,7 +2813,7 @@ function ro(t) {
|
|
|
2813
2813
|
}
|
|
2814
2814
|
};
|
|
2815
2815
|
}
|
|
2816
|
-
function
|
|
2816
|
+
function Kn(t) {
|
|
2817
2817
|
return t == null;
|
|
2818
2818
|
}
|
|
2819
2819
|
function Hs(t) {
|
|
@@ -2896,10 +2896,10 @@ function im(t) {
|
|
|
2896
2896
|
}
|
|
2897
2897
|
const wl = "captureStackTrace" in Error ? Error.captureStackTrace : (...t) => {
|
|
2898
2898
|
};
|
|
2899
|
-
function
|
|
2899
|
+
function ai(t) {
|
|
2900
2900
|
return typeof t == "object" && t !== null && !Array.isArray(t);
|
|
2901
2901
|
}
|
|
2902
|
-
const om =
|
|
2902
|
+
const om = no(() => {
|
|
2903
2903
|
if (typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare"))
|
|
2904
2904
|
return !1;
|
|
2905
2905
|
try {
|
|
@@ -2909,17 +2909,17 @@ const om = ro(() => {
|
|
|
2909
2909
|
return !1;
|
|
2910
2910
|
}
|
|
2911
2911
|
});
|
|
2912
|
-
function
|
|
2913
|
-
if (
|
|
2912
|
+
function Fn(t) {
|
|
2913
|
+
if (ai(t) === !1)
|
|
2914
2914
|
return !1;
|
|
2915
2915
|
const e = t.constructor;
|
|
2916
2916
|
if (e === void 0 || typeof e != "function")
|
|
2917
2917
|
return !0;
|
|
2918
2918
|
const r = e.prototype;
|
|
2919
|
-
return !(
|
|
2919
|
+
return !(ai(r) === !1 || Object.prototype.hasOwnProperty.call(r, "isPrototypeOf") === !1);
|
|
2920
2920
|
}
|
|
2921
2921
|
function Ks(t) {
|
|
2922
|
-
return
|
|
2922
|
+
return Fn(t) ? { ...t } : Array.isArray(t) ? [...t] : t;
|
|
2923
2923
|
}
|
|
2924
2924
|
function m1(t) {
|
|
2925
2925
|
let e = 0;
|
|
@@ -3049,7 +3049,7 @@ function pm(t, e) {
|
|
|
3049
3049
|
return Tr(t, o);
|
|
3050
3050
|
}
|
|
3051
3051
|
function dm(t, e) {
|
|
3052
|
-
if (!
|
|
3052
|
+
if (!Fn(e))
|
|
3053
3053
|
throw new Error("Invalid input to extend: expected a plain object");
|
|
3054
3054
|
const r = t._zod.def.checks;
|
|
3055
3055
|
if (r && r.length > 0) {
|
|
@@ -3067,7 +3067,7 @@ function dm(t, e) {
|
|
|
3067
3067
|
return Tr(t, n);
|
|
3068
3068
|
}
|
|
3069
3069
|
function fm(t, e) {
|
|
3070
|
-
if (!
|
|
3070
|
+
if (!Fn(e))
|
|
3071
3071
|
throw new Error("Invalid input to safeExtend: expected a plain object");
|
|
3072
3072
|
const r = Yr(t._zod.def, {
|
|
3073
3073
|
get shape() {
|
|
@@ -3143,7 +3143,7 @@ function mm(t, e, r) {
|
|
|
3143
3143
|
});
|
|
3144
3144
|
return Tr(e, i);
|
|
3145
3145
|
}
|
|
3146
|
-
function
|
|
3146
|
+
function Dn(t, e = 0) {
|
|
3147
3147
|
if (t.aborted === !0)
|
|
3148
3148
|
return !0;
|
|
3149
3149
|
for (let r = e; r < t.issues.length; r++)
|
|
@@ -3157,13 +3157,13 @@ function Ur(t, e) {
|
|
|
3157
3157
|
return (i = r).path ?? (i.path = []), r.path.unshift(t), r;
|
|
3158
3158
|
});
|
|
3159
3159
|
}
|
|
3160
|
-
function
|
|
3160
|
+
function Bi(t) {
|
|
3161
3161
|
return typeof t == "string" ? t : t?.message;
|
|
3162
3162
|
}
|
|
3163
3163
|
function Ir(t, e, r) {
|
|
3164
3164
|
const i = { ...t, path: t.path ?? [] };
|
|
3165
3165
|
if (!t.message) {
|
|
3166
|
-
const n =
|
|
3166
|
+
const n = Bi(t.inst?._zod.def?.error?.(t)) ?? Bi(e?.error?.(t)) ?? Bi(r.customError?.(t)) ?? Bi(r.localeError?.(t)) ?? "Invalid input";
|
|
3167
3167
|
i.message = n;
|
|
3168
3168
|
}
|
|
3169
3169
|
return delete i.inst, delete i.continue, e?.reportInput || delete i.input, i;
|
|
@@ -3191,7 +3191,7 @@ function Oe(t) {
|
|
|
3191
3191
|
}
|
|
3192
3192
|
return e;
|
|
3193
3193
|
}
|
|
3194
|
-
function
|
|
3194
|
+
function ui(...t) {
|
|
3195
3195
|
const [e, r, i] = t;
|
|
3196
3196
|
return typeof e == "string" ? {
|
|
3197
3197
|
message: e,
|
|
@@ -3243,7 +3243,7 @@ const ym = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3243
3243
|
BIGINT_FORMAT_RANGES: cm,
|
|
3244
3244
|
Class: E1,
|
|
3245
3245
|
NUMBER_FORMAT_RANGES: um,
|
|
3246
|
-
aborted:
|
|
3246
|
+
aborted: Dn,
|
|
3247
3247
|
allowsEval: om,
|
|
3248
3248
|
assert: l1,
|
|
3249
3249
|
assertEqual: s1,
|
|
@@ -3253,7 +3253,7 @@ const ym = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3253
3253
|
assignProp: wn,
|
|
3254
3254
|
base64ToUint8Array: _m,
|
|
3255
3255
|
base64urlToUint8Array: S1,
|
|
3256
|
-
cached:
|
|
3256
|
+
cached: no,
|
|
3257
3257
|
captureStackTrace: wl,
|
|
3258
3258
|
cleanEnum: y1,
|
|
3259
3259
|
cleanRegex: Hs,
|
|
@@ -3272,15 +3272,15 @@ const ym = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3272
3272
|
getParsedType: _1,
|
|
3273
3273
|
getSizableOrigin: Ws,
|
|
3274
3274
|
hexToUint8Array: k1,
|
|
3275
|
-
isObject:
|
|
3276
|
-
isPlainObject:
|
|
3277
|
-
issue:
|
|
3275
|
+
isObject: ai,
|
|
3276
|
+
isPlainObject: Fn,
|
|
3277
|
+
issue: ui,
|
|
3278
3278
|
joinValues: ae,
|
|
3279
3279
|
jsonStringifyReplacer: us,
|
|
3280
3280
|
merge: hm,
|
|
3281
3281
|
mergeDefs: Yr,
|
|
3282
3282
|
normalizeParams: ee,
|
|
3283
|
-
nullish:
|
|
3283
|
+
nullish: Kn,
|
|
3284
3284
|
numKeys: m1,
|
|
3285
3285
|
objectClone: p1,
|
|
3286
3286
|
omit: pm,
|
|
@@ -3301,7 +3301,7 @@ const ym = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3301
3301
|
uint8ArrayToBase64: vm,
|
|
3302
3302
|
uint8ArrayToBase64url: b1,
|
|
3303
3303
|
uint8ArrayToHex: x1,
|
|
3304
|
-
unwrapMessage:
|
|
3304
|
+
unwrapMessage: Bi
|
|
3305
3305
|
}, Symbol.toStringTag, { value: "Module" })), Sm = (t, e) => {
|
|
3306
3306
|
t.name = "$ZodError", Object.defineProperty(t, "_zod", {
|
|
3307
3307
|
value: t._zod,
|
|
@@ -3379,16 +3379,16 @@ function xm(t) {
|
|
|
3379
3379
|
return e.join(`
|
|
3380
3380
|
`);
|
|
3381
3381
|
}
|
|
3382
|
-
const
|
|
3382
|
+
const io = (t) => (e, r, i, n) => {
|
|
3383
3383
|
const o = i ? Object.assign(i, { async: !1 }) : { async: !1 }, s = e._zod.run({ value: r, issues: [] }, o);
|
|
3384
3384
|
if (s instanceof Promise)
|
|
3385
|
-
throw new
|
|
3385
|
+
throw new Nn();
|
|
3386
3386
|
if (s.issues.length) {
|
|
3387
3387
|
const a = new (n?.Err ?? t)(s.issues.map((u) => Ir(u, o, Qt())));
|
|
3388
3388
|
throw wl(a, n?.callee), a;
|
|
3389
3389
|
}
|
|
3390
3390
|
return s.value;
|
|
3391
|
-
}, dc = /* @__PURE__ */
|
|
3391
|
+
}, dc = /* @__PURE__ */ io(gr), oo = (t) => async (e, r, i, n) => {
|
|
3392
3392
|
const o = i ? Object.assign(i, { async: !0 }) : { async: !0 };
|
|
3393
3393
|
let s = e._zod.run({ value: r, issues: [] }, o);
|
|
3394
3394
|
if (s instanceof Promise && (s = await s), s.issues.length) {
|
|
@@ -3396,34 +3396,34 @@ const no = (t) => (e, r, i, n) => {
|
|
|
3396
3396
|
throw wl(a, n?.callee), a;
|
|
3397
3397
|
}
|
|
3398
3398
|
return s.value;
|
|
3399
|
-
}, fc = /* @__PURE__ */
|
|
3399
|
+
}, fc = /* @__PURE__ */ oo(gr), so = (t) => (e, r, i) => {
|
|
3400
3400
|
const n = i ? { ...i, async: !1 } : { async: !1 }, o = e._zod.run({ value: r, issues: [] }, n);
|
|
3401
3401
|
if (o instanceof Promise)
|
|
3402
|
-
throw new
|
|
3402
|
+
throw new Nn();
|
|
3403
3403
|
return o.issues.length ? {
|
|
3404
3404
|
success: !1,
|
|
3405
3405
|
error: new (t ?? Cl)(o.issues.map((s) => Ir(s, n, Qt())))
|
|
3406
3406
|
} : { success: !0, data: o.value };
|
|
3407
|
-
}, Em = /* @__PURE__ */
|
|
3407
|
+
}, Em = /* @__PURE__ */ so(gr), ao = (t) => async (e, r, i) => {
|
|
3408
3408
|
const n = i ? Object.assign(i, { async: !0 }) : { async: !0 };
|
|
3409
3409
|
let o = e._zod.run({ value: r, issues: [] }, n);
|
|
3410
3410
|
return o instanceof Promise && (o = await o), o.issues.length ? {
|
|
3411
3411
|
success: !1,
|
|
3412
3412
|
error: new t(o.issues.map((s) => Ir(s, n, Qt())))
|
|
3413
3413
|
} : { success: !0, data: o.value };
|
|
3414
|
-
}, wm = /* @__PURE__ */
|
|
3415
|
-
const n = i ? Object.assign(i, { direction: "backward" }) : { direction: "backward" };
|
|
3416
|
-
return no(t)(e, r, n);
|
|
3417
|
-
}, w1 = /* @__PURE__ */ Al(gr), $l = (t) => (e, r, i) => no(t)(e, r, i), C1 = /* @__PURE__ */ $l(gr), Rl = (t) => async (e, r, i) => {
|
|
3414
|
+
}, wm = /* @__PURE__ */ ao(gr), Al = (t) => (e, r, i) => {
|
|
3418
3415
|
const n = i ? Object.assign(i, { direction: "backward" }) : { direction: "backward" };
|
|
3419
3416
|
return io(t)(e, r, n);
|
|
3420
|
-
},
|
|
3417
|
+
}, w1 = /* @__PURE__ */ Al(gr), $l = (t) => (e, r, i) => io(t)(e, r, i), C1 = /* @__PURE__ */ $l(gr), Rl = (t) => async (e, r, i) => {
|
|
3421
3418
|
const n = i ? Object.assign(i, { direction: "backward" }) : { direction: "backward" };
|
|
3422
3419
|
return oo(t)(e, r, n);
|
|
3423
|
-
},
|
|
3420
|
+
}, I1 = /* @__PURE__ */ Rl(gr), Pl = (t) => async (e, r, i) => oo(t)(e, r, i), T1 = /* @__PURE__ */ Pl(gr), Dl = (t) => (e, r, i) => {
|
|
3424
3421
|
const n = i ? Object.assign(i, { direction: "backward" }) : { direction: "backward" };
|
|
3425
3422
|
return so(t)(e, r, n);
|
|
3426
|
-
},
|
|
3423
|
+
}, A1 = /* @__PURE__ */ Dl(gr), Ol = (t) => (e, r, i) => so(t)(e, r, i), $1 = /* @__PURE__ */ Ol(gr), Nl = (t) => async (e, r, i) => {
|
|
3424
|
+
const n = i ? Object.assign(i, { direction: "backward" }) : { direction: "backward" };
|
|
3425
|
+
return ao(t)(e, r, n);
|
|
3426
|
+
}, R1 = /* @__PURE__ */ Nl(gr), Bl = (t) => async (e, r, i) => ao(t)(e, r, i), P1 = /* @__PURE__ */ Bl(gr), Cm = /^[cC][^\s-]{8,}$/, Im = /^[0-9a-z]+$/, Tm = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, Am = /^[0-9a-vA-V]{20}$/, $m = /^[A-Za-z0-9]{27}$/, Rm = /^[a-zA-Z0-9_-]{21}$/, Pm = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, D1 = /^[-+]?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)?)??$/, Dm = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/, ci = (t) => t ? new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`) : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/, O1 = /* @__PURE__ */ ci(4), N1 = /* @__PURE__ */ ci(6), B1 = /* @__PURE__ */ ci(7), Om = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, U1 = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/, M1 = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/, Nm = /^[^\s@"]{1,64}@[^\s@]{1,255}$/u, L1 = Nm, z1 = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/, F1 = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
3427
3427
|
function Bm() {
|
|
3428
3428
|
return new RegExp(F1, "u");
|
|
3429
3429
|
}
|
|
@@ -3448,13 +3448,13 @@ const Ym = (t) => {
|
|
|
3448
3448
|
const e = t ? `[\\s\\S]{${t?.minimum ?? 0},${t?.maximum ?? ""}}` : "[\\s\\S]*";
|
|
3449
3449
|
return new RegExp(`^${e}$`);
|
|
3450
3450
|
}, Xm = /^-?\d+n?$/, Qm = /^-?\d+$/, Ml = /^-?\d+(?:\.\d+)?$/, e_ = /^(?:true|false)$/i, t_ = /^null$/i, r_ = /^undefined$/i, n_ = /^[^A-Z]*$/, i_ = /^[^a-z]*$/, o_ = /^[0-9a-fA-F]*$/;
|
|
3451
|
-
function
|
|
3451
|
+
function uo(t, e) {
|
|
3452
3452
|
return new RegExp(`^[A-Za-z0-9+/]{${t}}${e}$`);
|
|
3453
3453
|
}
|
|
3454
|
-
function
|
|
3454
|
+
function co(t) {
|
|
3455
3455
|
return new RegExp(`^[A-Za-z0-9_-]{${t}}$`);
|
|
3456
3456
|
}
|
|
3457
|
-
const j1 = /^[0-9a-fA-F]{32}$/, G1 = /* @__PURE__ */
|
|
3457
|
+
const j1 = /^[0-9a-fA-F]{32}$/, G1 = /* @__PURE__ */ uo(22, "=="), q1 = /* @__PURE__ */ co(22), V1 = /^[0-9a-fA-F]{40}$/, H1 = /* @__PURE__ */ uo(27, "="), K1 = /* @__PURE__ */ co(27), W1 = /^[0-9a-fA-F]{64}$/, Z1 = /* @__PURE__ */ uo(43, "="), J1 = /* @__PURE__ */ co(43), Y1 = /^[0-9a-fA-F]{96}$/, X1 = /* @__PURE__ */ uo(64, ""), Q1 = /* @__PURE__ */ co(64), eE = /^[0-9a-fA-F]{128}$/, tE = /* @__PURE__ */ uo(86, "=="), rE = /* @__PURE__ */ co(86), Ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3458
3458
|
__proto__: null,
|
|
3459
3459
|
base64: jm,
|
|
3460
3460
|
base64url: Ul,
|
|
@@ -3509,7 +3509,7 @@ const j1 = /^[0-9a-fA-F]{32}$/, G1 = /* @__PURE__ */ ao(22, "=="), q1 = /* @__PU
|
|
|
3509
3509
|
undefined: r_,
|
|
3510
3510
|
unicodeEmail: Nm,
|
|
3511
3511
|
uppercase: i_,
|
|
3512
|
-
uuid:
|
|
3512
|
+
uuid: ci,
|
|
3513
3513
|
uuid4: O1,
|
|
3514
3514
|
uuid6: N1,
|
|
3515
3515
|
uuid7: B1,
|
|
@@ -3662,7 +3662,7 @@ const j1 = /^[0-9a-fA-F]{32}$/, G1 = /* @__PURE__ */ ao(22, "=="), q1 = /* @__PU
|
|
|
3662
3662
|
var r;
|
|
3663
3663
|
xt.init(t, e), (r = t._zod.def).when ?? (r.when = (i) => {
|
|
3664
3664
|
const n = i.value;
|
|
3665
|
-
return !
|
|
3665
|
+
return !Kn(n) && n.size !== void 0;
|
|
3666
3666
|
}), t._zod.onattach.push((i) => {
|
|
3667
3667
|
const n = i._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
|
|
3668
3668
|
e.maximum < n && (i._zod.bag.maximum = e.maximum);
|
|
@@ -3682,7 +3682,7 @@ const j1 = /^[0-9a-fA-F]{32}$/, G1 = /* @__PURE__ */ ao(22, "=="), q1 = /* @__PU
|
|
|
3682
3682
|
var r;
|
|
3683
3683
|
xt.init(t, e), (r = t._zod.def).when ?? (r.when = (i) => {
|
|
3684
3684
|
const n = i.value;
|
|
3685
|
-
return !
|
|
3685
|
+
return !Kn(n) && n.size !== void 0;
|
|
3686
3686
|
}), t._zod.onattach.push((i) => {
|
|
3687
3687
|
const n = i._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
|
|
3688
3688
|
e.minimum > n && (i._zod.bag.minimum = e.minimum);
|
|
@@ -3702,7 +3702,7 @@ const j1 = /^[0-9a-fA-F]{32}$/, G1 = /* @__PURE__ */ ao(22, "=="), q1 = /* @__PU
|
|
|
3702
3702
|
var r;
|
|
3703
3703
|
xt.init(t, e), (r = t._zod.def).when ?? (r.when = (i) => {
|
|
3704
3704
|
const n = i.value;
|
|
3705
|
-
return !
|
|
3705
|
+
return !Kn(n) && n.size !== void 0;
|
|
3706
3706
|
}), t._zod.onattach.push((i) => {
|
|
3707
3707
|
const n = i._zod.bag;
|
|
3708
3708
|
n.minimum = e.size, n.maximum = e.size, n.size = e.size;
|
|
@@ -3725,7 +3725,7 @@ const j1 = /^[0-9a-fA-F]{32}$/, G1 = /* @__PURE__ */ ao(22, "=="), q1 = /* @__PU
|
|
|
3725
3725
|
var r;
|
|
3726
3726
|
xt.init(t, e), (r = t._zod.def).when ?? (r.when = (i) => {
|
|
3727
3727
|
const n = i.value;
|
|
3728
|
-
return !
|
|
3728
|
+
return !Kn(n) && n.length !== void 0;
|
|
3729
3729
|
}), t._zod.onattach.push((i) => {
|
|
3730
3730
|
const n = i._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
|
|
3731
3731
|
e.maximum < n && (i._zod.bag.maximum = e.maximum);
|
|
@@ -3748,7 +3748,7 @@ const j1 = /^[0-9a-fA-F]{32}$/, G1 = /* @__PURE__ */ ao(22, "=="), q1 = /* @__PU
|
|
|
3748
3748
|
var r;
|
|
3749
3749
|
xt.init(t, e), (r = t._zod.def).when ?? (r.when = (i) => {
|
|
3750
3750
|
const n = i.value;
|
|
3751
|
-
return !
|
|
3751
|
+
return !Kn(n) && n.length !== void 0;
|
|
3752
3752
|
}), t._zod.onattach.push((i) => {
|
|
3753
3753
|
const n = i._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
|
|
3754
3754
|
e.minimum > n && (i._zod.bag.minimum = e.minimum);
|
|
@@ -3771,7 +3771,7 @@ const j1 = /^[0-9a-fA-F]{32}$/, G1 = /* @__PURE__ */ ao(22, "=="), q1 = /* @__PU
|
|
|
3771
3771
|
var r;
|
|
3772
3772
|
xt.init(t, e), (r = t._zod.def).when ?? (r.when = (i) => {
|
|
3773
3773
|
const n = i.value;
|
|
3774
|
-
return !
|
|
3774
|
+
return !Kn(n) && n.length !== void 0;
|
|
3775
3775
|
}), t._zod.onattach.push((i) => {
|
|
3776
3776
|
const n = i._zod.bag;
|
|
3777
3777
|
n.minimum = e.length, n.maximum = e.length, n.length = e.length;
|
|
@@ -3790,7 +3790,7 @@ const j1 = /^[0-9a-fA-F]{32}$/, G1 = /* @__PURE__ */ ao(22, "=="), q1 = /* @__PU
|
|
|
3790
3790
|
continue: !e.abort
|
|
3791
3791
|
});
|
|
3792
3792
|
};
|
|
3793
|
-
}),
|
|
3793
|
+
}), lo = /* @__PURE__ */ K("$ZodCheckStringFormat", (t, e) => {
|
|
3794
3794
|
var r, i;
|
|
3795
3795
|
xt.init(t, e), t._zod.onattach.push((n) => {
|
|
3796
3796
|
const o = n._zod.bag;
|
|
@@ -3808,7 +3808,7 @@ const j1 = /^[0-9a-fA-F]{32}$/, G1 = /* @__PURE__ */ ao(22, "=="), q1 = /* @__PU
|
|
|
3808
3808
|
}) : (i = t._zod).check ?? (i.check = () => {
|
|
3809
3809
|
});
|
|
3810
3810
|
}), m_ = /* @__PURE__ */ K("$ZodCheckRegex", (t, e) => {
|
|
3811
|
-
|
|
3811
|
+
lo.init(t, e), t._zod.check = (r) => {
|
|
3812
3812
|
e.pattern.lastIndex = 0, !e.pattern.test(r.value) && r.issues.push({
|
|
3813
3813
|
origin: "string",
|
|
3814
3814
|
code: "invalid_format",
|
|
@@ -3820,9 +3820,9 @@ const j1 = /^[0-9a-fA-F]{32}$/, G1 = /* @__PURE__ */ ao(22, "=="), q1 = /* @__PU
|
|
|
3820
3820
|
});
|
|
3821
3821
|
};
|
|
3822
3822
|
}), __ = /* @__PURE__ */ K("$ZodCheckLowerCase", (t, e) => {
|
|
3823
|
-
e.pattern ?? (e.pattern = n_),
|
|
3823
|
+
e.pattern ?? (e.pattern = n_), lo.init(t, e);
|
|
3824
3824
|
}), v_ = /* @__PURE__ */ K("$ZodCheckUpperCase", (t, e) => {
|
|
3825
|
-
e.pattern ?? (e.pattern = i_),
|
|
3825
|
+
e.pattern ?? (e.pattern = i_), lo.init(t, e);
|
|
3826
3826
|
}), y_ = /* @__PURE__ */ K("$ZodCheckIncludes", (t, e) => {
|
|
3827
3827
|
xt.init(t, e);
|
|
3828
3828
|
const r = on(e.includes), i = new RegExp(typeof e.position == "number" ? `^.{${e.position}}${r}` : r);
|
|
@@ -3948,7 +3948,7 @@ const C_ = {
|
|
|
3948
3948
|
});
|
|
3949
3949
|
else {
|
|
3950
3950
|
const n = (s, a, u) => {
|
|
3951
|
-
let c =
|
|
3951
|
+
let c = Dn(s), l;
|
|
3952
3952
|
for (const m of a) {
|
|
3953
3953
|
if (m._zod.def.when) {
|
|
3954
3954
|
if (!m._zod.def.when(s))
|
|
@@ -3957,25 +3957,25 @@ const C_ = {
|
|
|
3957
3957
|
continue;
|
|
3958
3958
|
const h = s.issues.length, f = m._zod.check(s);
|
|
3959
3959
|
if (f instanceof Promise && u?.async === !1)
|
|
3960
|
-
throw new
|
|
3960
|
+
throw new Nn();
|
|
3961
3961
|
if (l || f instanceof Promise)
|
|
3962
3962
|
l = (l ?? Promise.resolve()).then(async () => {
|
|
3963
|
-
await f, s.issues.length !== h && (c || (c =
|
|
3963
|
+
await f, s.issues.length !== h && (c || (c = Dn(s, h)));
|
|
3964
3964
|
});
|
|
3965
3965
|
else {
|
|
3966
3966
|
if (s.issues.length === h)
|
|
3967
3967
|
continue;
|
|
3968
|
-
c || (c =
|
|
3968
|
+
c || (c = Dn(s, h));
|
|
3969
3969
|
}
|
|
3970
3970
|
}
|
|
3971
3971
|
return l ? l.then(() => s) : s;
|
|
3972
3972
|
}, o = (s, a, u) => {
|
|
3973
|
-
if (
|
|
3973
|
+
if (Dn(s))
|
|
3974
3974
|
return s.aborted = !0, s;
|
|
3975
3975
|
const c = n(a, i, u);
|
|
3976
3976
|
if (c instanceof Promise) {
|
|
3977
3977
|
if (u.async === !1)
|
|
3978
|
-
throw new
|
|
3978
|
+
throw new Nn();
|
|
3979
3979
|
return c.then((l) => t._zod.parse(l, u));
|
|
3980
3980
|
}
|
|
3981
3981
|
return t._zod.parse(c, u);
|
|
@@ -3990,7 +3990,7 @@ const C_ = {
|
|
|
3990
3990
|
const u = t._zod.parse(s, a);
|
|
3991
3991
|
if (u instanceof Promise) {
|
|
3992
3992
|
if (a.async === !1)
|
|
3993
|
-
throw new
|
|
3993
|
+
throw new Nn();
|
|
3994
3994
|
return u.then((c) => n(c, i, a));
|
|
3995
3995
|
}
|
|
3996
3996
|
return n(u, i, a);
|
|
@@ -4008,7 +4008,7 @@ const C_ = {
|
|
|
4008
4008
|
vendor: "zod",
|
|
4009
4009
|
version: 1
|
|
4010
4010
|
}));
|
|
4011
|
-
}),
|
|
4011
|
+
}), po = /* @__PURE__ */ K("$ZodString", (t, e) => {
|
|
4012
4012
|
Ue.init(t, e), t._zod.pattern = [...t?._zod.bag?.patterns ?? []].pop() ?? Ym(t._zod.bag), t._zod.parse = (r, i) => {
|
|
4013
4013
|
if (e.coerce)
|
|
4014
4014
|
try {
|
|
@@ -4023,7 +4023,7 @@ const C_ = {
|
|
|
4023
4023
|
}), r;
|
|
4024
4024
|
};
|
|
4025
4025
|
}), gt = /* @__PURE__ */ K("$ZodStringFormat", (t, e) => {
|
|
4026
|
-
|
|
4026
|
+
lo.init(t, e), po.init(t, e);
|
|
4027
4027
|
}), I_ = /* @__PURE__ */ K("$ZodGUID", (t, e) => {
|
|
4028
4028
|
e.pattern ?? (e.pattern = Dm), gt.init(t, e);
|
|
4029
4029
|
}), T_ = /* @__PURE__ */ K("$ZodUUID", (t, e) => {
|
|
@@ -4040,9 +4040,9 @@ const C_ = {
|
|
|
4040
4040
|
}[e.version];
|
|
4041
4041
|
if (i === void 0)
|
|
4042
4042
|
throw new Error(`Invalid UUID version: "${e.version}"`);
|
|
4043
|
-
e.pattern ?? (e.pattern =
|
|
4043
|
+
e.pattern ?? (e.pattern = ci(i));
|
|
4044
4044
|
} else
|
|
4045
|
-
e.pattern ?? (e.pattern =
|
|
4045
|
+
e.pattern ?? (e.pattern = ci());
|
|
4046
4046
|
gt.init(t, e);
|
|
4047
4047
|
}), A_ = /* @__PURE__ */ K("$ZodEmail", (t, e) => {
|
|
4048
4048
|
e.pattern ?? (e.pattern = Om), gt.init(t, e);
|
|
@@ -4419,7 +4419,7 @@ const f0 = /* @__PURE__ */ K("$ZodObject", (t, e) => {
|
|
|
4419
4419
|
}
|
|
4420
4420
|
});
|
|
4421
4421
|
}
|
|
4422
|
-
const i =
|
|
4422
|
+
const i = no(() => p0(e));
|
|
4423
4423
|
He(t._zod, "propValues", () => {
|
|
4424
4424
|
const a = e.shape, u = {};
|
|
4425
4425
|
for (const c in a) {
|
|
@@ -4432,7 +4432,7 @@ const f0 = /* @__PURE__ */ K("$ZodObject", (t, e) => {
|
|
|
4432
4432
|
}
|
|
4433
4433
|
return u;
|
|
4434
4434
|
});
|
|
4435
|
-
const n =
|
|
4435
|
+
const n = ai, o = e.catchall;
|
|
4436
4436
|
let s;
|
|
4437
4437
|
t._zod.parse = (a, u) => {
|
|
4438
4438
|
s ?? (s = i.value);
|
|
@@ -4454,7 +4454,7 @@ const f0 = /* @__PURE__ */ K("$ZodObject", (t, e) => {
|
|
|
4454
4454
|
};
|
|
4455
4455
|
}), h0 = /* @__PURE__ */ K("$ZodObjectJIT", (t, e) => {
|
|
4456
4456
|
f0.init(t, e);
|
|
4457
|
-
const r = t._zod.parse, i =
|
|
4457
|
+
const r = t._zod.parse, i = no(() => p0(e)), n = (h) => {
|
|
4458
4458
|
const f = new w_(["shape", "payload", "ctx"]), _ = i.value, v = (b) => {
|
|
4459
4459
|
const w = pc(b);
|
|
4460
4460
|
return `shape[${w}]._zod.run({ value: input[${w}], issues: [] }, ctx)`;
|
|
@@ -4508,7 +4508,7 @@ const f0 = /* @__PURE__ */ K("$ZodObject", (t, e) => {
|
|
|
4508
4508
|
return (b, w) => S(h, b, w);
|
|
4509
4509
|
};
|
|
4510
4510
|
let o;
|
|
4511
|
-
const s =
|
|
4511
|
+
const s = ai, a = !as.jitless, c = a && om.value, l = e.catchall;
|
|
4512
4512
|
let m;
|
|
4513
4513
|
t._zod.parse = (h, f) => {
|
|
4514
4514
|
m ?? (m = i.value);
|
|
@@ -4525,7 +4525,7 @@ function ff(t, e, r, i) {
|
|
|
4525
4525
|
for (const o of t)
|
|
4526
4526
|
if (o.issues.length === 0)
|
|
4527
4527
|
return e.value = o.value, e;
|
|
4528
|
-
const n = t.filter((o) => !
|
|
4528
|
+
const n = t.filter((o) => !Dn(o));
|
|
4529
4529
|
return n.length === 1 ? (e.value = n[0].value, n[0]) : (e.issues.push({
|
|
4530
4530
|
code: "invalid_union",
|
|
4531
4531
|
input: e.value,
|
|
@@ -4614,7 +4614,7 @@ const g0 = /* @__PURE__ */ K("$ZodXor", (t, e) => {
|
|
|
4614
4614
|
}
|
|
4615
4615
|
return n;
|
|
4616
4616
|
});
|
|
4617
|
-
const i =
|
|
4617
|
+
const i = no(() => {
|
|
4618
4618
|
const n = e.options, o = /* @__PURE__ */ new Map();
|
|
4619
4619
|
for (const s of n) {
|
|
4620
4620
|
const a = s._zod.propValues?.[e.discriminator];
|
|
@@ -4630,7 +4630,7 @@ const g0 = /* @__PURE__ */ K("$ZodXor", (t, e) => {
|
|
|
4630
4630
|
});
|
|
4631
4631
|
t._zod.parse = (n, o) => {
|
|
4632
4632
|
const s = n.value;
|
|
4633
|
-
if (!
|
|
4633
|
+
if (!ai(s))
|
|
4634
4634
|
return n.issues.push({
|
|
4635
4635
|
code: "invalid_type",
|
|
4636
4636
|
expected: "object",
|
|
@@ -4659,7 +4659,7 @@ function hc(t, e) {
|
|
|
4659
4659
|
return { valid: !0, data: t };
|
|
4660
4660
|
if (t instanceof Date && e instanceof Date && +t == +e)
|
|
4661
4661
|
return { valid: !0, data: t };
|
|
4662
|
-
if (
|
|
4662
|
+
if (Fn(t) && Fn(e)) {
|
|
4663
4663
|
const r = Object.keys(e), i = Object.keys(t).filter((o) => r.indexOf(o) !== -1), n = { ...t, ...e };
|
|
4664
4664
|
for (const o of i) {
|
|
4665
4665
|
const s = hc(t[o], e[o]);
|
|
@@ -4706,7 +4706,7 @@ function gf(t, e, r) {
|
|
|
4706
4706
|
else
|
|
4707
4707
|
t.issues.push(a);
|
|
4708
4708
|
const o = [...i].filter(([, a]) => a.l && a.r).map(([a]) => a);
|
|
4709
|
-
if (o.length && n && t.issues.push({ ...n, keys: o }),
|
|
4709
|
+
if (o.length && n && t.issues.push({ ...n, keys: o }), Dn(t))
|
|
4710
4710
|
return t;
|
|
4711
4711
|
const s = hc(e.value, r.value);
|
|
4712
4712
|
if (!s.valid)
|
|
@@ -4767,7 +4767,7 @@ function Fo(t, e, r) {
|
|
|
4767
4767
|
const v0 = /* @__PURE__ */ K("$ZodRecord", (t, e) => {
|
|
4768
4768
|
Ue.init(t, e), t._zod.parse = (r, i) => {
|
|
4769
4769
|
const n = r.value;
|
|
4770
|
-
if (!
|
|
4770
|
+
if (!Fn(n))
|
|
4771
4771
|
return r.issues.push({
|
|
4772
4772
|
expected: "record",
|
|
4773
4773
|
code: "invalid_type",
|
|
@@ -4930,7 +4930,7 @@ const b0 = /* @__PURE__ */ K("$ZodEnum", (t, e) => {
|
|
|
4930
4930
|
if (i.async)
|
|
4931
4931
|
return (n instanceof Promise ? n : Promise.resolve(n)).then((s) => (r.value = s, r));
|
|
4932
4932
|
if (n instanceof Promise)
|
|
4933
|
-
throw new
|
|
4933
|
+
throw new Nn();
|
|
4934
4934
|
return r.value = n, r;
|
|
4935
4935
|
};
|
|
4936
4936
|
});
|
|
@@ -5162,7 +5162,7 @@ function kf(t, e, r, i) {
|
|
|
5162
5162
|
continue: !i._zod.def.abort
|
|
5163
5163
|
// params: inst._zod.def.params,
|
|
5164
5164
|
};
|
|
5165
|
-
i._zod.def.params && (n.params = i._zod.def.params), e.issues.push(
|
|
5165
|
+
i._zod.def.params && (n.params = i._zod.def.params), e.issues.push(ui(n));
|
|
5166
5166
|
}
|
|
5167
5167
|
}
|
|
5168
5168
|
const nE = () => {
|
|
@@ -6735,7 +6735,7 @@ function NE() {
|
|
|
6735
6735
|
function Ef(t, e, r) {
|
|
6736
6736
|
return Math.abs(t) === 1 ? e : r;
|
|
6737
6737
|
}
|
|
6738
|
-
function
|
|
6738
|
+
function Qn(t) {
|
|
6739
6739
|
if (!t)
|
|
6740
6740
|
return "";
|
|
6741
6741
|
const e = ["ա", "ե", "ը", "ի", "ո", "ու", "օ"], r = t[t.length - 1];
|
|
@@ -6821,17 +6821,17 @@ const BE = () => {
|
|
|
6821
6821
|
const o = n.inclusive ? "<=" : "<", s = e(n.origin);
|
|
6822
6822
|
if (s) {
|
|
6823
6823
|
const a = Number(n.maximum), u = Ef(a, s.unit.one, s.unit.many);
|
|
6824
|
-
return `Չափազանց մեծ արժեք․ սպասվում է, որ ${
|
|
6824
|
+
return `Չափազանց մեծ արժեք․ սպասվում է, որ ${Qn(n.origin ?? "արժեք")} կունենա ${o}${n.maximum.toString()} ${u}`;
|
|
6825
6825
|
}
|
|
6826
|
-
return `Չափազանց մեծ արժեք․ սպասվում է, որ ${
|
|
6826
|
+
return `Չափազանց մեծ արժեք․ սպասվում է, որ ${Qn(n.origin ?? "արժեք")} լինի ${o}${n.maximum.toString()}`;
|
|
6827
6827
|
}
|
|
6828
6828
|
case "too_small": {
|
|
6829
6829
|
const o = n.inclusive ? ">=" : ">", s = e(n.origin);
|
|
6830
6830
|
if (s) {
|
|
6831
6831
|
const a = Number(n.minimum), u = Ef(a, s.unit.one, s.unit.many);
|
|
6832
|
-
return `Չափազանց փոքր արժեք․ սպասվում է, որ ${
|
|
6832
|
+
return `Չափազանց փոքր արժեք․ սպասվում է, որ ${Qn(n.origin)} կունենա ${o}${n.minimum.toString()} ${u}`;
|
|
6833
6833
|
}
|
|
6834
|
-
return `Չափազանց փոքր արժեք․ սպասվում է, որ ${
|
|
6834
|
+
return `Չափազանց փոքր արժեք․ սպասվում է, որ ${Qn(n.origin)} լինի ${o}${n.minimum.toString()}`;
|
|
6835
6835
|
}
|
|
6836
6836
|
case "invalid_format": {
|
|
6837
6837
|
const o = n;
|
|
@@ -6842,11 +6842,11 @@ const BE = () => {
|
|
|
6842
6842
|
case "unrecognized_keys":
|
|
6843
6843
|
return `Չճանաչված բանալի${n.keys.length > 1 ? "ներ" : ""}. ${ae(n.keys, ", ")}`;
|
|
6844
6844
|
case "invalid_key":
|
|
6845
|
-
return `Սխալ բանալի ${
|
|
6845
|
+
return `Սխալ բանալի ${Qn(n.origin)}-ում`;
|
|
6846
6846
|
case "invalid_union":
|
|
6847
6847
|
return "Սխալ մուտքագրում";
|
|
6848
6848
|
case "invalid_element":
|
|
6849
|
-
return `Սխալ արժեք ${
|
|
6849
|
+
return `Սխալ արժեք ${Qn(n.origin)}-ում`;
|
|
6850
6850
|
default:
|
|
6851
6851
|
return "Սխալ մուտքագրում";
|
|
6852
6852
|
}
|
|
@@ -7448,7 +7448,7 @@ function YE() {
|
|
|
7448
7448
|
localeError: JE()
|
|
7449
7449
|
};
|
|
7450
7450
|
}
|
|
7451
|
-
const
|
|
7451
|
+
const Pi = (t) => t.charAt(0).toUpperCase() + t.slice(1);
|
|
7452
7452
|
function wf(t) {
|
|
7453
7453
|
const e = Math.abs(t), r = e % 10, i = e % 100;
|
|
7454
7454
|
return i >= 11 && i <= 19 || r === 0 ? "many" : r === 1 ? "one" : "few";
|
|
@@ -7584,16 +7584,16 @@ const XE = () => {
|
|
|
7584
7584
|
case "too_big": {
|
|
7585
7585
|
const o = i[n.origin] ?? n.origin, s = e(n.origin, wf(Number(n.maximum)), n.inclusive ?? !1, "smaller");
|
|
7586
7586
|
if (s?.verb)
|
|
7587
|
-
return `${
|
|
7587
|
+
return `${Pi(o ?? n.origin ?? "reikšmė")} ${s.verb} ${n.maximum.toString()} ${s.unit ?? "elementų"}`;
|
|
7588
7588
|
const a = n.inclusive ? "ne didesnis kaip" : "mažesnis kaip";
|
|
7589
|
-
return `${
|
|
7589
|
+
return `${Pi(o ?? n.origin ?? "reikšmė")} turi būti ${a} ${n.maximum.toString()} ${s?.unit}`;
|
|
7590
7590
|
}
|
|
7591
7591
|
case "too_small": {
|
|
7592
7592
|
const o = i[n.origin] ?? n.origin, s = e(n.origin, wf(Number(n.minimum)), n.inclusive ?? !1, "bigger");
|
|
7593
7593
|
if (s?.verb)
|
|
7594
|
-
return `${
|
|
7594
|
+
return `${Pi(o ?? n.origin ?? "reikšmė")} ${s.verb} ${n.minimum.toString()} ${s.unit ?? "elementų"}`;
|
|
7595
7595
|
const a = n.inclusive ? "ne mažesnis kaip" : "didesnis kaip";
|
|
7596
|
-
return `${
|
|
7596
|
+
return `${Pi(o ?? n.origin ?? "reikšmė")} turi būti ${a} ${n.minimum.toString()} ${s?.unit}`;
|
|
7597
7597
|
}
|
|
7598
7598
|
case "invalid_format": {
|
|
7599
7599
|
const o = n;
|
|
@@ -7609,7 +7609,7 @@ const XE = () => {
|
|
|
7609
7609
|
return "Klaidinga įvestis";
|
|
7610
7610
|
case "invalid_element": {
|
|
7611
7611
|
const o = i[n.origin] ?? n.origin;
|
|
7612
|
-
return `${
|
|
7612
|
+
return `${Pi(o ?? n.origin ?? "reikšmė")} turi klaidingą įvestį`;
|
|
7613
7613
|
}
|
|
7614
7614
|
default:
|
|
7615
7615
|
return "Klaidinga įvestis";
|
|
@@ -10050,7 +10050,7 @@ function yp(t) {
|
|
|
10050
10050
|
return /* @__PURE__ */ ur(0, t);
|
|
10051
10051
|
}
|
|
10052
10052
|
// @__NO_SIDE_EFFECTS__
|
|
10053
|
-
function
|
|
10053
|
+
function li(t, e) {
|
|
10054
10054
|
return new a_({
|
|
10055
10055
|
check: "multiple_of",
|
|
10056
10056
|
...ee(e),
|
|
@@ -10058,7 +10058,7 @@ function ci(t, e) {
|
|
|
10058
10058
|
});
|
|
10059
10059
|
}
|
|
10060
10060
|
// @__NO_SIDE_EFFECTS__
|
|
10061
|
-
function
|
|
10061
|
+
function ki(t, e) {
|
|
10062
10062
|
return new l_({
|
|
10063
10063
|
check: "max_size",
|
|
10064
10064
|
...ee(e),
|
|
@@ -10074,7 +10074,7 @@ function xn(t, e) {
|
|
|
10074
10074
|
});
|
|
10075
10075
|
}
|
|
10076
10076
|
// @__NO_SIDE_EFFECTS__
|
|
10077
|
-
function
|
|
10077
|
+
function fo(t, e) {
|
|
10078
10078
|
return new d_({
|
|
10079
10079
|
check: "size_equals",
|
|
10080
10080
|
...ee(e),
|
|
@@ -10082,7 +10082,7 @@ function po(t, e) {
|
|
|
10082
10082
|
});
|
|
10083
10083
|
}
|
|
10084
10084
|
// @__NO_SIDE_EFFECTS__
|
|
10085
|
-
function
|
|
10085
|
+
function ho(t, e) {
|
|
10086
10086
|
return new f_({
|
|
10087
10087
|
check: "max_length",
|
|
10088
10088
|
...ee(e),
|
|
@@ -10090,7 +10090,7 @@ function fo(t, e) {
|
|
|
10090
10090
|
});
|
|
10091
10091
|
}
|
|
10092
10092
|
// @__NO_SIDE_EFFECTS__
|
|
10093
|
-
function
|
|
10093
|
+
function jn(t, e) {
|
|
10094
10094
|
return new h_({
|
|
10095
10095
|
check: "min_length",
|
|
10096
10096
|
...ee(e),
|
|
@@ -10098,7 +10098,7 @@ function Fn(t, e) {
|
|
|
10098
10098
|
});
|
|
10099
10099
|
}
|
|
10100
10100
|
// @__NO_SIDE_EFFECTS__
|
|
10101
|
-
function
|
|
10101
|
+
function go(t, e) {
|
|
10102
10102
|
return new g_({
|
|
10103
10103
|
check: "length_equals",
|
|
10104
10104
|
...ee(e),
|
|
@@ -10427,10 +10427,10 @@ function Iv(t, e, r) {
|
|
|
10427
10427
|
function Tv(t) {
|
|
10428
10428
|
const e = /* @__PURE__ */ Av((r) => (r.addIssue = (i) => {
|
|
10429
10429
|
if (typeof i == "string")
|
|
10430
|
-
r.issues.push(
|
|
10430
|
+
r.issues.push(ui(i, r.value, e._zod.def));
|
|
10431
10431
|
else {
|
|
10432
10432
|
const n = i;
|
|
10433
|
-
n.fatal && (n.continue = !1), n.code ?? (n.code = "custom"), n.input ?? (n.input = r.value), n.inst ?? (n.inst = e), n.continue ?? (n.continue = !e._zod.def.abort), r.issues.push(
|
|
10433
|
+
n.fatal && (n.continue = !1), n.code ?? (n.code = "custom"), n.input ?? (n.input = r.value), n.inst ?? (n.inst = e), n.continue ?? (n.continue = !e._zod.def.abort), r.issues.push(ui(n));
|
|
10434
10434
|
}
|
|
10435
10435
|
}, t(r.value, r)));
|
|
10436
10436
|
return e;
|
|
@@ -10470,7 +10470,7 @@ function Pv(t, e) {
|
|
|
10470
10470
|
const r = ee(e);
|
|
10471
10471
|
let i = r.truthy ?? ["true", "1", "yes", "on", "y", "enabled"], n = r.falsy ?? ["false", "0", "no", "off", "n", "disabled"];
|
|
10472
10472
|
r.case !== "sensitive" && (i = i.map((f) => typeof f == "string" ? f.toLowerCase() : f), n = n.map((f) => typeof f == "string" ? f.toLowerCase() : f));
|
|
10473
|
-
const o = new Set(i), s = new Set(n), a = t.Codec ?? Wl, u = t.Boolean ?? ql, c = t.String ??
|
|
10473
|
+
const o = new Set(i), s = new Set(n), a = t.Codec ?? Wl, u = t.Boolean ?? ql, c = t.String ?? po, l = new c({ type: "string", error: r.error }), m = new u({ type: "boolean", error: r.error }), h = new a({
|
|
10474
10474
|
type: "pipe",
|
|
10475
10475
|
in: l,
|
|
10476
10476
|
out: m,
|
|
@@ -10491,7 +10491,7 @@ function Pv(t, e) {
|
|
|
10491
10491
|
return h;
|
|
10492
10492
|
}
|
|
10493
10493
|
// @__NO_SIDE_EFFECTS__
|
|
10494
|
-
function
|
|
10494
|
+
function mo(t, e, r, i = {}) {
|
|
10495
10495
|
const n = ee(i), o = {
|
|
10496
10496
|
...ee(i),
|
|
10497
10497
|
check: "string_format",
|
|
@@ -10502,7 +10502,7 @@ function go(t, e, r, i = {}) {
|
|
|
10502
10502
|
};
|
|
10503
10503
|
return r instanceof RegExp && (o.pattern = r), new t(o);
|
|
10504
10504
|
}
|
|
10505
|
-
function
|
|
10505
|
+
function pi(t) {
|
|
10506
10506
|
let e = t?.target ?? "draft-2020-12";
|
|
10507
10507
|
return e === "draft-4" && (e = "draft-04"), e === "draft-7" && (e = "draft-07"), {
|
|
10508
10508
|
processors: t.processors ?? {},
|
|
@@ -10549,7 +10549,7 @@ function ft(t, e, r = { path: [], schemaPath: [] }) {
|
|
|
10549
10549
|
const u = e.metadataRegistry.get(t);
|
|
10550
10550
|
return u && Object.assign(s.schema, u), e.io === "input" && rr(t) && (delete s.schema.examples, delete s.schema.default), e.io === "input" && s.schema._prefault && ((i = s.schema).default ?? (i.default = s.schema._prefault)), delete s.schema._prefault, e.seen.get(t).schema;
|
|
10551
10551
|
}
|
|
10552
|
-
function
|
|
10552
|
+
function di(t, e) {
|
|
10553
10553
|
const r = t.seen.get(e);
|
|
10554
10554
|
if (!r)
|
|
10555
10555
|
throw new Error("Unprocessed schema. This is a bug in Zod.");
|
|
@@ -10621,7 +10621,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
10621
10621
|
}
|
|
10622
10622
|
}
|
|
10623
10623
|
}
|
|
10624
|
-
function
|
|
10624
|
+
function fi(t, e) {
|
|
10625
10625
|
const r = t.seen.get(e);
|
|
10626
10626
|
if (!r)
|
|
10627
10627
|
throw new Error("Unprocessed schema. This is a bug in Zod.");
|
|
@@ -10676,8 +10676,8 @@ function di(t, e) {
|
|
|
10676
10676
|
value: {
|
|
10677
10677
|
...e["~standard"],
|
|
10678
10678
|
jsonSchema: {
|
|
10679
|
-
input:
|
|
10680
|
-
output:
|
|
10679
|
+
input: Vi(e, "input", t.processors),
|
|
10680
|
+
output: Vi(e, "output", t.processors)
|
|
10681
10681
|
}
|
|
10682
10682
|
},
|
|
10683
10683
|
enumerable: !1,
|
|
@@ -10730,11 +10730,11 @@ function rr(t, e) {
|
|
|
10730
10730
|
return !1;
|
|
10731
10731
|
}
|
|
10732
10732
|
const Dv = (t, e = {}) => (r) => {
|
|
10733
|
-
const i =
|
|
10734
|
-
return ft(t, i),
|
|
10735
|
-
},
|
|
10736
|
-
const { libraryOptions: n, target: o } = i ?? {}, s =
|
|
10737
|
-
return ft(t, s),
|
|
10733
|
+
const i = pi({ ...r, processors: e });
|
|
10734
|
+
return ft(t, i), di(i, t), fi(i, t);
|
|
10735
|
+
}, Vi = (t, e, r = {}) => (i) => {
|
|
10736
|
+
const { libraryOptions: n, target: o } = i ?? {}, s = pi({ ...n ?? {}, target: o, io: e, processors: r });
|
|
10737
|
+
return ft(t, s), di(s, t), fi(s, t);
|
|
10738
10738
|
}, pC = {
|
|
10739
10739
|
guid: "uuid",
|
|
10740
10740
|
url: "uri",
|
|
@@ -11009,7 +11009,7 @@ const Dv = (t, e = {}) => (r) => {
|
|
|
11009
11009
|
};
|
|
11010
11010
|
function _y(t, e) {
|
|
11011
11011
|
if ("_idmap" in t) {
|
|
11012
|
-
const i = t, n =
|
|
11012
|
+
const i = t, n = pi({ ...e, processors: gc }), o = {};
|
|
11013
11013
|
for (const u of i._idmap.entries()) {
|
|
11014
11014
|
const [c, l] = u;
|
|
11015
11015
|
ft(l, n);
|
|
@@ -11022,7 +11022,7 @@ function _y(t, e) {
|
|
|
11022
11022
|
n.external = a;
|
|
11023
11023
|
for (const u of i._idmap.entries()) {
|
|
11024
11024
|
const [c, l] = u;
|
|
11025
|
-
|
|
11025
|
+
di(n, l), s[c] = fi(n, l);
|
|
11026
11026
|
}
|
|
11027
11027
|
if (Object.keys(o).length > 0) {
|
|
11028
11028
|
const u = n.target === "draft-2020-12" ? "$defs" : "definitions";
|
|
@@ -11032,8 +11032,8 @@ function _y(t, e) {
|
|
|
11032
11032
|
}
|
|
11033
11033
|
return { schemas: s };
|
|
11034
11034
|
}
|
|
11035
|
-
const r =
|
|
11036
|
-
return ft(t, r),
|
|
11035
|
+
const r = pi({ ...e, processors: gc });
|
|
11036
|
+
return ft(t, r), di(r, t), fi(r, t);
|
|
11037
11037
|
}
|
|
11038
11038
|
class dC {
|
|
11039
11039
|
/** @deprecated Access via ctx instead */
|
|
@@ -11069,7 +11069,7 @@ class dC {
|
|
|
11069
11069
|
}
|
|
11070
11070
|
constructor(e) {
|
|
11071
11071
|
let r = e?.target ?? "draft-2020-12";
|
|
11072
|
-
r === "draft-4" && (r = "draft-04"), r === "draft-7" && (r = "draft-07"), this.ctx =
|
|
11072
|
+
r === "draft-4" && (r = "draft-04"), r === "draft-7" && (r = "draft-07"), this.ctx = pi({
|
|
11073
11073
|
processors: gc,
|
|
11074
11074
|
target: r,
|
|
11075
11075
|
...e?.metadata && { metadata: e.metadata },
|
|
@@ -11090,8 +11090,8 @@ class dC {
|
|
|
11090
11090
|
* Must call process() first.
|
|
11091
11091
|
*/
|
|
11092
11092
|
emit(e, r) {
|
|
11093
|
-
r && (r.cycles && (this.ctx.cycles = r.cycles), r.reused && (this.ctx.reused = r.reused), r.external && (this.ctx.external = r.external)),
|
|
11094
|
-
const i =
|
|
11093
|
+
r && (r.cycles && (this.ctx.cycles = r.cycles), r.reused && (this.ctx.reused = r.reused), r.external && (this.ctx.external = r.external)), di(this.ctx, e);
|
|
11094
|
+
const i = fi(this.ctx, e), { "~standard": n, ...o } = i;
|
|
11095
11095
|
return o;
|
|
11096
11096
|
}
|
|
11097
11097
|
}
|
|
@@ -11101,7 +11101,7 @@ const fC = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
11101
11101
|
__proto__: null,
|
|
11102
11102
|
$ZodAny: o0,
|
|
11103
11103
|
$ZodArray: l0,
|
|
11104
|
-
$ZodAsyncError:
|
|
11104
|
+
$ZodAsyncError: Nn,
|
|
11105
11105
|
$ZodBase64: K_,
|
|
11106
11106
|
$ZodBase64URL: Z_,
|
|
11107
11107
|
$ZodBigInt: Vl,
|
|
@@ -11132,7 +11132,7 @@ const fC = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
11132
11132
|
$ZodCheckRegex: m_,
|
|
11133
11133
|
$ZodCheckSizeEquals: d_,
|
|
11134
11134
|
$ZodCheckStartsWith: S_,
|
|
11135
|
-
$ZodCheckStringFormat:
|
|
11135
|
+
$ZodCheckStringFormat: lo,
|
|
11136
11136
|
$ZodCheckUpperCase: v_,
|
|
11137
11137
|
$ZodCodec: Wl,
|
|
11138
11138
|
$ZodCustom: L0,
|
|
@@ -11182,7 +11182,7 @@ const fC = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
11182
11182
|
$ZodRecord: v0,
|
|
11183
11183
|
$ZodRegistry: H0,
|
|
11184
11184
|
$ZodSet: S0,
|
|
11185
|
-
$ZodString:
|
|
11185
|
+
$ZodString: po,
|
|
11186
11186
|
$ZodStringFormat: gt,
|
|
11187
11187
|
$ZodSuccess: $0,
|
|
11188
11188
|
$ZodSymbol: r0,
|
|
@@ -11258,7 +11258,7 @@ const fC = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
11258
11258
|
_jwt: gp,
|
|
11259
11259
|
_ksuid: ap,
|
|
11260
11260
|
_lazy: cC,
|
|
11261
|
-
_length:
|
|
11261
|
+
_length: go,
|
|
11262
11262
|
_literal: Xw,
|
|
11263
11263
|
_lowercase: Qs,
|
|
11264
11264
|
_lt: bn,
|
|
@@ -11266,13 +11266,13 @@ const fC = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
11266
11266
|
_mac: Z0,
|
|
11267
11267
|
_map: Ww,
|
|
11268
11268
|
_max: Cr,
|
|
11269
|
-
_maxLength:
|
|
11270
|
-
_maxSize:
|
|
11269
|
+
_maxLength: ho,
|
|
11270
|
+
_maxSize: ki,
|
|
11271
11271
|
_mime: ia,
|
|
11272
11272
|
_min: ur,
|
|
11273
|
-
_minLength:
|
|
11273
|
+
_minLength: jn,
|
|
11274
11274
|
_minSize: xn,
|
|
11275
|
-
_multipleOf:
|
|
11275
|
+
_multipleOf: li,
|
|
11276
11276
|
_nan: xv,
|
|
11277
11277
|
_nanoid: rp,
|
|
11278
11278
|
_nativeEnum: Yw,
|
|
@@ -11287,8 +11287,8 @@ const fC = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
11287
11287
|
_number: tv,
|
|
11288
11288
|
_optional: eC,
|
|
11289
11289
|
_overwrite: an,
|
|
11290
|
-
_parse:
|
|
11291
|
-
_parseAsync:
|
|
11290
|
+
_parse: io,
|
|
11291
|
+
_parseAsync: oo,
|
|
11292
11292
|
_pipe: sC,
|
|
11293
11293
|
_positive: mp,
|
|
11294
11294
|
_promise: lC,
|
|
@@ -11301,14 +11301,14 @@ const fC = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
11301
11301
|
_safeDecodeAsync: Bl,
|
|
11302
11302
|
_safeEncode: Dl,
|
|
11303
11303
|
_safeEncodeAsync: Nl,
|
|
11304
|
-
_safeParse:
|
|
11305
|
-
_safeParseAsync:
|
|
11304
|
+
_safeParse: so,
|
|
11305
|
+
_safeParseAsync: ao,
|
|
11306
11306
|
_set: Zw,
|
|
11307
|
-
_size:
|
|
11307
|
+
_size: fo,
|
|
11308
11308
|
_slugify: ca,
|
|
11309
11309
|
_startsWith: ra,
|
|
11310
11310
|
_string: K0,
|
|
11311
|
-
_stringFormat:
|
|
11311
|
+
_stringFormat: mo,
|
|
11312
11312
|
_stringbool: Pv,
|
|
11313
11313
|
_success: iC,
|
|
11314
11314
|
_superRefine: Tv,
|
|
@@ -11336,20 +11336,20 @@ const fC = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
11336
11336
|
_xor: Gw,
|
|
11337
11337
|
clone: Tr,
|
|
11338
11338
|
config: Qt,
|
|
11339
|
-
createStandardJSONSchemaMethod:
|
|
11339
|
+
createStandardJSONSchemaMethod: Vi,
|
|
11340
11340
|
createToJSONSchemaMethod: Dv,
|
|
11341
11341
|
decode: C1,
|
|
11342
11342
|
decodeAsync: T1,
|
|
11343
11343
|
describe: $v,
|
|
11344
11344
|
encode: w1,
|
|
11345
11345
|
encodeAsync: I1,
|
|
11346
|
-
extractDefs:
|
|
11347
|
-
finalize:
|
|
11346
|
+
extractDefs: di,
|
|
11347
|
+
finalize: fi,
|
|
11348
11348
|
flattenError: Il,
|
|
11349
11349
|
formatError: Tl,
|
|
11350
11350
|
globalConfig: as,
|
|
11351
11351
|
globalRegistry: Er,
|
|
11352
|
-
initializeContext:
|
|
11352
|
+
initializeContext: pi,
|
|
11353
11353
|
isValidBase64: jl,
|
|
11354
11354
|
isValidBase64URL: W_,
|
|
11355
11355
|
isValidJWT: Y_,
|
|
@@ -11378,16 +11378,16 @@ const fC = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
11378
11378
|
gt: kn,
|
|
11379
11379
|
gte: ur,
|
|
11380
11380
|
includes: ta,
|
|
11381
|
-
length:
|
|
11381
|
+
length: go,
|
|
11382
11382
|
lowercase: Qs,
|
|
11383
11383
|
lt: bn,
|
|
11384
11384
|
lte: Cr,
|
|
11385
|
-
maxLength:
|
|
11386
|
-
maxSize:
|
|
11385
|
+
maxLength: ho,
|
|
11386
|
+
maxSize: ki,
|
|
11387
11387
|
mime: ia,
|
|
11388
|
-
minLength:
|
|
11388
|
+
minLength: jn,
|
|
11389
11389
|
minSize: xn,
|
|
11390
|
-
multipleOf:
|
|
11390
|
+
multipleOf: li,
|
|
11391
11391
|
negative: _p,
|
|
11392
11392
|
nonnegative: yp,
|
|
11393
11393
|
nonpositive: vp,
|
|
@@ -11396,7 +11396,7 @@ const fC = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
11396
11396
|
positive: mp,
|
|
11397
11397
|
property: Sp,
|
|
11398
11398
|
regex: Xs,
|
|
11399
|
-
size:
|
|
11399
|
+
size: fo,
|
|
11400
11400
|
slugify: ca,
|
|
11401
11401
|
startsWith: ra,
|
|
11402
11402
|
toLowerCase: aa,
|
|
@@ -11468,10 +11468,10 @@ const ky = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
11468
11468
|
});
|
|
11469
11469
|
}, ds = K("ZodError", xy), mr = K("ZodError", xy, {
|
|
11470
11470
|
Parent: Error
|
|
11471
|
-
}), Ey = /* @__PURE__ */
|
|
11471
|
+
}), Ey = /* @__PURE__ */ io(mr), wy = /* @__PURE__ */ oo(mr), Cy = /* @__PURE__ */ so(mr), Iy = /* @__PURE__ */ ao(mr), Ty = /* @__PURE__ */ Al(mr), Ay = /* @__PURE__ */ $l(mr), $y = /* @__PURE__ */ Rl(mr), Ry = /* @__PURE__ */ Pl(mr), Py = /* @__PURE__ */ Dl(mr), Dy = /* @__PURE__ */ Ol(mr), Oy = /* @__PURE__ */ Nl(mr), Ny = /* @__PURE__ */ Bl(mr), ze = /* @__PURE__ */ K("ZodType", (t, e) => (Ue.init(t, e), Object.assign(t["~standard"], {
|
|
11472
11472
|
jsonSchema: {
|
|
11473
|
-
input:
|
|
11474
|
-
output:
|
|
11473
|
+
input: Vi(t, "input"),
|
|
11474
|
+
output: Vi(t, "output")
|
|
11475
11475
|
}
|
|
11476
11476
|
}), t.toJSONSchema = Dv(t, {}), t.def = e, t.type = e.type, Object.defineProperty(t, "_def", { value: e }), t.check = (...r) => t.clone(Yr(e, {
|
|
11477
11477
|
checks: [
|
|
@@ -11480,7 +11480,7 @@ const ky = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
11480
11480
|
]
|
|
11481
11481
|
}), {
|
|
11482
11482
|
parent: !0
|
|
11483
|
-
}), t.with = t.check, t.clone = (r, i) => Tr(t, r, i), t.brand = () => t, t.register = (r, i) => (r.add(t, i), t), t.parse = (r, i) => Ey(t, r, i, { callee: t.parse }), t.safeParse = (r, i) => Cy(t, r, i), t.parseAsync = async (r, i) => wy(t, r, i, { callee: t.parseAsync }), t.safeParseAsync = async (r, i) => Iy(t, r, i), t.spa = t.safeParseAsync, t.encode = (r, i) => Ty(t, r, i), t.decode = (r, i) => Ay(t, r, i), t.encodeAsync = async (r, i) => $y(t, r, i), t.decodeAsync = async (r, i) => Ry(t, r, i), t.safeEncode = (r, i) => Py(t, r, i), t.safeDecode = (r, i) => Dy(t, r, i), t.safeEncodeAsync = async (r, i) => Oy(t, r, i), t.safeDecodeAsync = async (r, i) => Ny(t, r, i), t.refine = (r, i) => t.check(pd(r, i)), t.superRefine = (r) => t.check(dd(r)), t.overwrite = (r) => t.check(/* @__PURE__ */ an(r)), t.optional = () =>
|
|
11483
|
+
}), t.with = t.check, t.clone = (r, i) => Tr(t, r, i), t.brand = () => t, t.register = (r, i) => (r.add(t, i), t), t.parse = (r, i) => Ey(t, r, i, { callee: t.parse }), t.safeParse = (r, i) => Cy(t, r, i), t.parseAsync = async (r, i) => wy(t, r, i, { callee: t.parseAsync }), t.safeParseAsync = async (r, i) => Iy(t, r, i), t.spa = t.safeParseAsync, t.encode = (r, i) => Ty(t, r, i), t.decode = (r, i) => Ay(t, r, i), t.encodeAsync = async (r, i) => $y(t, r, i), t.decodeAsync = async (r, i) => Ry(t, r, i), t.safeEncode = (r, i) => Py(t, r, i), t.safeDecode = (r, i) => Dy(t, r, i), t.safeEncodeAsync = async (r, i) => Oy(t, r, i), t.safeDecodeAsync = async (r, i) => Ny(t, r, i), t.refine = (r, i) => t.check(pd(r, i)), t.superRefine = (r) => t.check(dd(r)), t.overwrite = (r) => t.check(/* @__PURE__ */ an(r)), t.optional = () => Ki(t), t.exactOptional = () => Wp(t), t.nullable = () => Wi(t), t.nullish = () => Ki(Wi(t)), t.nonoptional = (r) => ed(t, r), t.array = () => tr(t), t.or = (r) => er([t, r]), t.and = (r) => Lp(t, r), t.transform = (r) => Zi(t, $a(r)), t.default = (r) => Yp(t, r), t.prefault = (r) => Qp(t, r), t.catch = (r) => nd(t, r), t.pipe = (r) => Zi(t, r), t.readonly = () => sd(t), t.describe = (r) => {
|
|
11484
11484
|
const i = t.clone();
|
|
11485
11485
|
return Er.add(i, { description: r }), i;
|
|
11486
11486
|
}, Object.defineProperty(t, "description", {
|
|
@@ -11494,14 +11494,14 @@ const ky = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
11494
11494
|
const i = t.clone();
|
|
11495
11495
|
return Er.add(i, r[0]), i;
|
|
11496
11496
|
}, t.isOptional = () => t.safeParse(void 0).success, t.isNullable = () => t.safeParse(null).success, t.apply = (r) => r(t), t)), la = /* @__PURE__ */ K("_ZodString", (t, e) => {
|
|
11497
|
-
|
|
11497
|
+
po.init(t, e), ze.init(t, e), t._zod.processJSONSchema = (i, n, o) => Ov(t, i, n);
|
|
11498
11498
|
const r = t._zod.bag;
|
|
11499
|
-
t.format = r.format ?? null, t.minLength = r.minimum ?? null, t.maxLength = r.maximum ?? null, t.regex = (...i) => t.check(/* @__PURE__ */ Xs(...i)), t.includes = (...i) => t.check(/* @__PURE__ */ ta(...i)), t.startsWith = (...i) => t.check(/* @__PURE__ */ ra(...i)), t.endsWith = (...i) => t.check(/* @__PURE__ */ na(...i)), t.min = (...i) => t.check(/* @__PURE__ */
|
|
11500
|
-
}),
|
|
11501
|
-
|
|
11499
|
+
t.format = r.format ?? null, t.minLength = r.minimum ?? null, t.maxLength = r.maximum ?? null, t.regex = (...i) => t.check(/* @__PURE__ */ Xs(...i)), t.includes = (...i) => t.check(/* @__PURE__ */ ta(...i)), t.startsWith = (...i) => t.check(/* @__PURE__ */ ra(...i)), t.endsWith = (...i) => t.check(/* @__PURE__ */ na(...i)), t.min = (...i) => t.check(/* @__PURE__ */ jn(...i)), t.max = (...i) => t.check(/* @__PURE__ */ ho(...i)), t.length = (...i) => t.check(/* @__PURE__ */ go(...i)), t.nonempty = (...i) => t.check(/* @__PURE__ */ jn(1, ...i)), t.lowercase = (i) => t.check(/* @__PURE__ */ Qs(i)), t.uppercase = (i) => t.check(/* @__PURE__ */ ea(i)), t.trim = () => t.check(/* @__PURE__ */ sa()), t.normalize = (...i) => t.check(/* @__PURE__ */ oa(...i)), t.toLowerCase = () => t.check(/* @__PURE__ */ aa()), t.toUpperCase = () => t.check(/* @__PURE__ */ ua()), t.slugify = () => t.check(/* @__PURE__ */ ca());
|
|
11500
|
+
}), _o = /* @__PURE__ */ K("ZodString", (t, e) => {
|
|
11501
|
+
po.init(t, e), la.init(t, e), t.email = (r) => t.check(/* @__PURE__ */ Jl(pa, r)), t.url = (r) => t.check(/* @__PURE__ */ Ys(vo, r)), t.jwt = (r) => t.check(/* @__PURE__ */ gp(Ca, r)), t.emoji = (r) => t.check(/* @__PURE__ */ tp(da, r)), t.guid = (r) => t.check(/* @__PURE__ */ ps(Hi, r)), t.uuid = (r) => t.check(/* @__PURE__ */ Yl(Kr, r)), t.uuidv4 = (r) => t.check(/* @__PURE__ */ Xl(Kr, r)), t.uuidv6 = (r) => t.check(/* @__PURE__ */ Ql(Kr, r)), t.uuidv7 = (r) => t.check(/* @__PURE__ */ ep(Kr, r)), t.nanoid = (r) => t.check(/* @__PURE__ */ rp(fa, r)), t.guid = (r) => t.check(/* @__PURE__ */ ps(Hi, r)), t.cuid = (r) => t.check(/* @__PURE__ */ np(ha, r)), t.cuid2 = (r) => t.check(/* @__PURE__ */ ip(ga, r)), t.ulid = (r) => t.check(/* @__PURE__ */ op(ma, r)), t.base64 = (r) => t.check(/* @__PURE__ */ dp(xa, r)), t.base64url = (r) => t.check(/* @__PURE__ */ fp(Ea, r)), t.xid = (r) => t.check(/* @__PURE__ */ sp(_a, r)), t.ksuid = (r) => t.check(/* @__PURE__ */ ap(va, r)), t.ipv4 = (r) => t.check(/* @__PURE__ */ up(ya, r)), t.ipv6 = (r) => t.check(/* @__PURE__ */ cp(Sa, r)), t.cidrv4 = (r) => t.check(/* @__PURE__ */ lp(ba, r)), t.cidrv6 = (r) => t.check(/* @__PURE__ */ pp(ka, r)), t.e164 = (r) => t.check(/* @__PURE__ */ hp(wa, r)), t.datetime = (r) => t.check(vy(r)), t.date = (r) => t.check(yy(r)), t.time = (r) => t.check(Sy(r)), t.duration = (r) => t.check(by(r));
|
|
11502
11502
|
});
|
|
11503
11503
|
function M(t) {
|
|
11504
|
-
return /* @__PURE__ */ K0(
|
|
11504
|
+
return /* @__PURE__ */ K0(_o, t);
|
|
11505
11505
|
}
|
|
11506
11506
|
const mt = /* @__PURE__ */ K("ZodStringFormat", (t, e) => {
|
|
11507
11507
|
gt.init(t, e), la.init(t, e);
|
|
@@ -11511,11 +11511,11 @@ const mt = /* @__PURE__ */ K("ZodStringFormat", (t, e) => {
|
|
|
11511
11511
|
function By(t) {
|
|
11512
11512
|
return /* @__PURE__ */ Jl(pa, t);
|
|
11513
11513
|
}
|
|
11514
|
-
const
|
|
11514
|
+
const Hi = /* @__PURE__ */ K("ZodGUID", (t, e) => {
|
|
11515
11515
|
I_.init(t, e), mt.init(t, e);
|
|
11516
11516
|
});
|
|
11517
11517
|
function Uy(t) {
|
|
11518
|
-
return /* @__PURE__ */ ps(
|
|
11518
|
+
return /* @__PURE__ */ ps(Hi, t);
|
|
11519
11519
|
}
|
|
11520
11520
|
const Kr = /* @__PURE__ */ K("ZodUUID", (t, e) => {
|
|
11521
11521
|
T_.init(t, e), mt.init(t, e);
|
|
@@ -11532,14 +11532,14 @@ function zy(t) {
|
|
|
11532
11532
|
function Fy(t) {
|
|
11533
11533
|
return /* @__PURE__ */ ep(Kr, t);
|
|
11534
11534
|
}
|
|
11535
|
-
const
|
|
11535
|
+
const vo = /* @__PURE__ */ K("ZodURL", (t, e) => {
|
|
11536
11536
|
$_.init(t, e), mt.init(t, e);
|
|
11537
11537
|
});
|
|
11538
11538
|
function jy(t) {
|
|
11539
|
-
return /* @__PURE__ */ Ys(
|
|
11539
|
+
return /* @__PURE__ */ Ys(vo, t);
|
|
11540
11540
|
}
|
|
11541
11541
|
function Gy(t) {
|
|
11542
|
-
return /* @__PURE__ */ Ys(
|
|
11542
|
+
return /* @__PURE__ */ Ys(vo, {
|
|
11543
11543
|
protocol: /^https?$/,
|
|
11544
11544
|
hostname: qm,
|
|
11545
11545
|
...ee(t)
|
|
@@ -11641,66 +11641,66 @@ const Ca = /* @__PURE__ */ K("ZodJWT", (t, e) => {
|
|
|
11641
11641
|
function oS(t) {
|
|
11642
11642
|
return /* @__PURE__ */ gp(Ca, t);
|
|
11643
11643
|
}
|
|
11644
|
-
const
|
|
11644
|
+
const xi = /* @__PURE__ */ K("ZodCustomStringFormat", (t, e) => {
|
|
11645
11645
|
Q_.init(t, e), mt.init(t, e);
|
|
11646
11646
|
});
|
|
11647
11647
|
function sS(t, e, r = {}) {
|
|
11648
|
-
return /* @__PURE__ */
|
|
11648
|
+
return /* @__PURE__ */ mo(xi, t, e, r);
|
|
11649
11649
|
}
|
|
11650
11650
|
function aS(t) {
|
|
11651
|
-
return /* @__PURE__ */
|
|
11651
|
+
return /* @__PURE__ */ mo(xi, "hostname", Gm, t);
|
|
11652
11652
|
}
|
|
11653
11653
|
function uS(t) {
|
|
11654
|
-
return /* @__PURE__ */
|
|
11654
|
+
return /* @__PURE__ */ mo(xi, "hex", o_, t);
|
|
11655
11655
|
}
|
|
11656
11656
|
function cS(t, e) {
|
|
11657
11657
|
const r = e?.enc ?? "hex", i = `${t}_${r}`, n = Ll[i];
|
|
11658
11658
|
if (!n)
|
|
11659
11659
|
throw new Error(`Unrecognized hash format: ${i}`);
|
|
11660
|
-
return /* @__PURE__ */
|
|
11660
|
+
return /* @__PURE__ */ mo(xi, i, n, e);
|
|
11661
11661
|
}
|
|
11662
|
-
const
|
|
11663
|
-
Gl.init(t, e), ze.init(t, e), t._zod.processJSONSchema = (i, n, o) => Nv(t, i, n), t.gt = (i, n) => t.check(/* @__PURE__ */ kn(i, n)), t.gte = (i, n) => t.check(/* @__PURE__ */ ur(i, n)), t.min = (i, n) => t.check(/* @__PURE__ */ ur(i, n)), t.lt = (i, n) => t.check(/* @__PURE__ */ bn(i, n)), t.lte = (i, n) => t.check(/* @__PURE__ */ Cr(i, n)), t.max = (i, n) => t.check(/* @__PURE__ */ Cr(i, n)), t.int = (i) => t.check(fs(i)), t.safe = (i) => t.check(fs(i)), t.positive = (i) => t.check(/* @__PURE__ */ kn(0, i)), t.nonnegative = (i) => t.check(/* @__PURE__ */ ur(0, i)), t.negative = (i) => t.check(/* @__PURE__ */ bn(0, i)), t.nonpositive = (i) => t.check(/* @__PURE__ */ Cr(0, i)), t.multipleOf = (i, n) => t.check(/* @__PURE__ */
|
|
11662
|
+
const yo = /* @__PURE__ */ K("ZodNumber", (t, e) => {
|
|
11663
|
+
Gl.init(t, e), ze.init(t, e), t._zod.processJSONSchema = (i, n, o) => Nv(t, i, n), t.gt = (i, n) => t.check(/* @__PURE__ */ kn(i, n)), t.gte = (i, n) => t.check(/* @__PURE__ */ ur(i, n)), t.min = (i, n) => t.check(/* @__PURE__ */ ur(i, n)), t.lt = (i, n) => t.check(/* @__PURE__ */ bn(i, n)), t.lte = (i, n) => t.check(/* @__PURE__ */ Cr(i, n)), t.max = (i, n) => t.check(/* @__PURE__ */ Cr(i, n)), t.int = (i) => t.check(fs(i)), t.safe = (i) => t.check(fs(i)), t.positive = (i) => t.check(/* @__PURE__ */ kn(0, i)), t.nonnegative = (i) => t.check(/* @__PURE__ */ ur(0, i)), t.negative = (i) => t.check(/* @__PURE__ */ bn(0, i)), t.nonpositive = (i) => t.check(/* @__PURE__ */ Cr(0, i)), t.multipleOf = (i, n) => t.check(/* @__PURE__ */ li(i, n)), t.step = (i, n) => t.check(/* @__PURE__ */ li(i, n)), t.finite = () => t;
|
|
11664
11664
|
const r = t._zod.bag;
|
|
11665
11665
|
t.minValue = Math.max(r.minimum ?? Number.NEGATIVE_INFINITY, r.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null, t.maxValue = Math.min(r.maximum ?? Number.POSITIVE_INFINITY, r.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null, t.isInt = (r.format ?? "").includes("int") || Number.isSafeInteger(r.multipleOf ?? 0.5), t.isFinite = !0, t.format = r.format ?? null;
|
|
11666
11666
|
});
|
|
11667
11667
|
function Me(t) {
|
|
11668
|
-
return /* @__PURE__ */ tv(
|
|
11668
|
+
return /* @__PURE__ */ tv(yo, t);
|
|
11669
11669
|
}
|
|
11670
|
-
const
|
|
11671
|
-
e0.init(t, e),
|
|
11670
|
+
const Wn = /* @__PURE__ */ K("ZodNumberFormat", (t, e) => {
|
|
11671
|
+
e0.init(t, e), yo.init(t, e);
|
|
11672
11672
|
});
|
|
11673
11673
|
function fs(t) {
|
|
11674
|
-
return /* @__PURE__ */ nv(
|
|
11674
|
+
return /* @__PURE__ */ nv(Wn, t);
|
|
11675
11675
|
}
|
|
11676
11676
|
function lS(t) {
|
|
11677
|
-
return /* @__PURE__ */ iv(
|
|
11677
|
+
return /* @__PURE__ */ iv(Wn, t);
|
|
11678
11678
|
}
|
|
11679
11679
|
function pS(t) {
|
|
11680
|
-
return /* @__PURE__ */ ov(
|
|
11680
|
+
return /* @__PURE__ */ ov(Wn, t);
|
|
11681
11681
|
}
|
|
11682
11682
|
function dS(t) {
|
|
11683
|
-
return /* @__PURE__ */ sv(
|
|
11683
|
+
return /* @__PURE__ */ sv(Wn, t);
|
|
11684
11684
|
}
|
|
11685
11685
|
function fS(t) {
|
|
11686
|
-
return /* @__PURE__ */ av(
|
|
11686
|
+
return /* @__PURE__ */ av(Wn, t);
|
|
11687
11687
|
}
|
|
11688
|
-
const
|
|
11688
|
+
const So = /* @__PURE__ */ K("ZodBoolean", (t, e) => {
|
|
11689
11689
|
ql.init(t, e), ze.init(t, e), t._zod.processJSONSchema = (r, i, n) => Bv(t, r, i);
|
|
11690
11690
|
});
|
|
11691
11691
|
function or(t) {
|
|
11692
|
-
return /* @__PURE__ */ uv(
|
|
11692
|
+
return /* @__PURE__ */ uv(So, t);
|
|
11693
11693
|
}
|
|
11694
|
-
const
|
|
11695
|
-
Vl.init(t, e), ze.init(t, e), t._zod.processJSONSchema = (i, n, o) => Uv(t, i), t.gte = (i, n) => t.check(/* @__PURE__ */ ur(i, n)), t.min = (i, n) => t.check(/* @__PURE__ */ ur(i, n)), t.gt = (i, n) => t.check(/* @__PURE__ */ kn(i, n)), t.gte = (i, n) => t.check(/* @__PURE__ */ ur(i, n)), t.min = (i, n) => t.check(/* @__PURE__ */ ur(i, n)), t.lt = (i, n) => t.check(/* @__PURE__ */ bn(i, n)), t.lte = (i, n) => t.check(/* @__PURE__ */ Cr(i, n)), t.max = (i, n) => t.check(/* @__PURE__ */ Cr(i, n)), t.positive = (i) => t.check(/* @__PURE__ */ kn(BigInt(0), i)), t.negative = (i) => t.check(/* @__PURE__ */ bn(BigInt(0), i)), t.nonpositive = (i) => t.check(/* @__PURE__ */ Cr(BigInt(0), i)), t.nonnegative = (i) => t.check(/* @__PURE__ */ ur(BigInt(0), i)), t.multipleOf = (i, n) => t.check(/* @__PURE__ */
|
|
11694
|
+
const bo = /* @__PURE__ */ K("ZodBigInt", (t, e) => {
|
|
11695
|
+
Vl.init(t, e), ze.init(t, e), t._zod.processJSONSchema = (i, n, o) => Uv(t, i), t.gte = (i, n) => t.check(/* @__PURE__ */ ur(i, n)), t.min = (i, n) => t.check(/* @__PURE__ */ ur(i, n)), t.gt = (i, n) => t.check(/* @__PURE__ */ kn(i, n)), t.gte = (i, n) => t.check(/* @__PURE__ */ ur(i, n)), t.min = (i, n) => t.check(/* @__PURE__ */ ur(i, n)), t.lt = (i, n) => t.check(/* @__PURE__ */ bn(i, n)), t.lte = (i, n) => t.check(/* @__PURE__ */ Cr(i, n)), t.max = (i, n) => t.check(/* @__PURE__ */ Cr(i, n)), t.positive = (i) => t.check(/* @__PURE__ */ kn(BigInt(0), i)), t.negative = (i) => t.check(/* @__PURE__ */ bn(BigInt(0), i)), t.nonpositive = (i) => t.check(/* @__PURE__ */ Cr(BigInt(0), i)), t.nonnegative = (i) => t.check(/* @__PURE__ */ ur(BigInt(0), i)), t.multipleOf = (i, n) => t.check(/* @__PURE__ */ li(i, n));
|
|
11696
11696
|
const r = t._zod.bag;
|
|
11697
11697
|
t.minValue = r.minimum ?? null, t.maxValue = r.maximum ?? null, t.format = r.format ?? null;
|
|
11698
11698
|
});
|
|
11699
11699
|
function hS(t) {
|
|
11700
|
-
return /* @__PURE__ */ lv(
|
|
11700
|
+
return /* @__PURE__ */ lv(bo, t);
|
|
11701
11701
|
}
|
|
11702
11702
|
const Ia = /* @__PURE__ */ K("ZodBigIntFormat", (t, e) => {
|
|
11703
|
-
t0.init(t, e),
|
|
11703
|
+
t0.init(t, e), bo.init(t, e);
|
|
11704
11704
|
});
|
|
11705
11705
|
function gS(t) {
|
|
11706
11706
|
return /* @__PURE__ */ dv(Ia, t);
|
|
@@ -11723,7 +11723,7 @@ function vS(t) {
|
|
|
11723
11723
|
const $p = /* @__PURE__ */ K("ZodNull", (t, e) => {
|
|
11724
11724
|
i0.init(t, e), ze.init(t, e), t._zod.processJSONSchema = (r, i, n) => Lv(t, r, i);
|
|
11725
11725
|
});
|
|
11726
|
-
function
|
|
11726
|
+
function Ei(t) {
|
|
11727
11727
|
return /* @__PURE__ */ mv($p, t);
|
|
11728
11728
|
}
|
|
11729
11729
|
const Rp = /* @__PURE__ */ K("ZodAny", (t, e) => {
|
|
@@ -11759,7 +11759,7 @@ function SS(t) {
|
|
|
11759
11759
|
return /* @__PURE__ */ bv(Aa, t);
|
|
11760
11760
|
}
|
|
11761
11761
|
const Np = /* @__PURE__ */ K("ZodArray", (t, e) => {
|
|
11762
|
-
l0.init(t, e), ze.init(t, e), t._zod.processJSONSchema = (r, i, n) => ny(t, r, i, n), t.element = e.element, t.min = (r, i) => t.check(/* @__PURE__ */
|
|
11762
|
+
l0.init(t, e), ze.init(t, e), t._zod.processJSONSchema = (r, i, n) => ny(t, r, i, n), t.element = e.element, t.min = (r, i) => t.check(/* @__PURE__ */ jn(r, i)), t.nonempty = (r) => t.check(/* @__PURE__ */ jn(1, r)), t.max = (r, i) => t.check(/* @__PURE__ */ ho(r, i)), t.length = (r, i) => t.check(/* @__PURE__ */ go(r, i)), t.unwrap = () => t.element;
|
|
11763
11763
|
});
|
|
11764
11764
|
function tr(t, e) {
|
|
11765
11765
|
return /* @__PURE__ */ Ev(Np, t, e);
|
|
@@ -11768,7 +11768,7 @@ function bS(t) {
|
|
|
11768
11768
|
const e = t._zod.def.shape;
|
|
11769
11769
|
return ut(Object.keys(e));
|
|
11770
11770
|
}
|
|
11771
|
-
const
|
|
11771
|
+
const ko = /* @__PURE__ */ K("ZodObject", (t, e) => {
|
|
11772
11772
|
h0.init(t, e), ze.init(t, e), t._zod.processJSONSchema = (r, i, n) => iy(t, r, i, n), He(t, "shape", () => e.shape), t.keyof = () => ut(Object.keys(t._zod.def.shape)), t.catchall = (r) => t.clone({ ...t._zod.def, catchall: r }), t.passthrough = () => t.clone({ ...t._zod.def, catchall: cr() }), t.loose = () => t.clone({ ...t._zod.def, catchall: cr() }), t.strict = () => t.clone({ ...t._zod.def, catchall: Ta() }), t.strip = () => t.clone({ ...t._zod.def, catchall: void 0 }), t.extend = (r) => dm(t, r), t.safeExtend = (r) => fm(t, r), t.merge = (r) => hm(t, r), t.pick = (r) => lm(t, r), t.omit = (r) => pm(t, r), t.partial = (...r) => gm(Ra, t, r[0]), t.required = (...r) => mm(Pa, t, r[0]);
|
|
11773
11773
|
});
|
|
11774
11774
|
function we(t, e) {
|
|
@@ -11777,10 +11777,10 @@ function we(t, e) {
|
|
|
11777
11777
|
shape: t ?? {},
|
|
11778
11778
|
...ee(e)
|
|
11779
11779
|
};
|
|
11780
|
-
return new
|
|
11780
|
+
return new ko(r);
|
|
11781
11781
|
}
|
|
11782
11782
|
function kS(t, e) {
|
|
11783
|
-
return new
|
|
11783
|
+
return new ko({
|
|
11784
11784
|
type: "object",
|
|
11785
11785
|
shape: t,
|
|
11786
11786
|
catchall: Ta(),
|
|
@@ -11788,25 +11788,25 @@ function kS(t, e) {
|
|
|
11788
11788
|
});
|
|
11789
11789
|
}
|
|
11790
11790
|
function xS(t, e) {
|
|
11791
|
-
return new
|
|
11791
|
+
return new ko({
|
|
11792
11792
|
type: "object",
|
|
11793
11793
|
shape: t,
|
|
11794
11794
|
catchall: cr(),
|
|
11795
11795
|
...ee(e)
|
|
11796
11796
|
});
|
|
11797
11797
|
}
|
|
11798
|
-
const
|
|
11798
|
+
const xo = /* @__PURE__ */ K("ZodUnion", (t, e) => {
|
|
11799
11799
|
Js.init(t, e), ze.init(t, e), t._zod.processJSONSchema = (r, i, n) => bp(t, r, i, n), t.options = e.options;
|
|
11800
11800
|
});
|
|
11801
11801
|
function er(t, e) {
|
|
11802
|
-
return new
|
|
11802
|
+
return new xo({
|
|
11803
11803
|
type: "union",
|
|
11804
11804
|
options: t,
|
|
11805
11805
|
...ee(e)
|
|
11806
11806
|
});
|
|
11807
11807
|
}
|
|
11808
11808
|
const Bp = /* @__PURE__ */ K("ZodXor", (t, e) => {
|
|
11809
|
-
|
|
11809
|
+
xo.init(t, e), g0.init(t, e), t._zod.processJSONSchema = (r, i, n) => bp(t, r, i, n), t.options = e.options;
|
|
11810
11810
|
});
|
|
11811
11811
|
function ES(t, e) {
|
|
11812
11812
|
return new Bp({
|
|
@@ -11817,7 +11817,7 @@ function ES(t, e) {
|
|
|
11817
11817
|
});
|
|
11818
11818
|
}
|
|
11819
11819
|
const Up = /* @__PURE__ */ K("ZodDiscriminatedUnion", (t, e) => {
|
|
11820
|
-
|
|
11820
|
+
xo.init(t, e), m0.init(t, e);
|
|
11821
11821
|
});
|
|
11822
11822
|
function wS(t, e, r) {
|
|
11823
11823
|
return new Up({
|
|
@@ -11852,11 +11852,11 @@ function Fp(t, e, r) {
|
|
|
11852
11852
|
...ee(n)
|
|
11853
11853
|
});
|
|
11854
11854
|
}
|
|
11855
|
-
const
|
|
11855
|
+
const Eo = /* @__PURE__ */ K("ZodRecord", (t, e) => {
|
|
11856
11856
|
v0.init(t, e), ze.init(t, e), t._zod.processJSONSchema = (r, i, n) => ay(t, r, i, n), t.keyType = e.keyType, t.valueType = e.valueType;
|
|
11857
11857
|
});
|
|
11858
11858
|
function sr(t, e, r) {
|
|
11859
|
-
return new
|
|
11859
|
+
return new Eo({
|
|
11860
11860
|
type: "record",
|
|
11861
11861
|
keyType: t,
|
|
11862
11862
|
valueType: e,
|
|
@@ -11865,7 +11865,7 @@ function sr(t, e, r) {
|
|
|
11865
11865
|
}
|
|
11866
11866
|
function CS(t, e, r) {
|
|
11867
11867
|
const i = Tr(t);
|
|
11868
|
-
return i._zod.values = void 0, new
|
|
11868
|
+
return i._zod.values = void 0, new Eo({
|
|
11869
11869
|
type: "record",
|
|
11870
11870
|
keyType: i,
|
|
11871
11871
|
valueType: e,
|
|
@@ -11873,7 +11873,7 @@ function CS(t, e, r) {
|
|
|
11873
11873
|
});
|
|
11874
11874
|
}
|
|
11875
11875
|
function IS(t, e, r) {
|
|
11876
|
-
return new
|
|
11876
|
+
return new Eo({
|
|
11877
11877
|
type: "record",
|
|
11878
11878
|
keyType: t,
|
|
11879
11879
|
valueType: e,
|
|
@@ -11882,7 +11882,7 @@ function IS(t, e, r) {
|
|
|
11882
11882
|
});
|
|
11883
11883
|
}
|
|
11884
11884
|
const jp = /* @__PURE__ */ K("ZodMap", (t, e) => {
|
|
11885
|
-
y0.init(t, e), ze.init(t, e), t._zod.processJSONSchema = (r, i, n) => ty(t, r), t.keyType = e.keyType, t.valueType = e.valueType, t.min = (...r) => t.check(/* @__PURE__ */ xn(...r)), t.nonempty = (r) => t.check(/* @__PURE__ */ xn(1, r)), t.max = (...r) => t.check(/* @__PURE__ */
|
|
11885
|
+
y0.init(t, e), ze.init(t, e), t._zod.processJSONSchema = (r, i, n) => ty(t, r), t.keyType = e.keyType, t.valueType = e.valueType, t.min = (...r) => t.check(/* @__PURE__ */ xn(...r)), t.nonempty = (r) => t.check(/* @__PURE__ */ xn(1, r)), t.max = (...r) => t.check(/* @__PURE__ */ ki(...r)), t.size = (...r) => t.check(/* @__PURE__ */ fo(...r));
|
|
11886
11886
|
});
|
|
11887
11887
|
function TS(t, e, r) {
|
|
11888
11888
|
return new jp({
|
|
@@ -11893,7 +11893,7 @@ function TS(t, e, r) {
|
|
|
11893
11893
|
});
|
|
11894
11894
|
}
|
|
11895
11895
|
const Gp = /* @__PURE__ */ K("ZodSet", (t, e) => {
|
|
11896
|
-
S0.init(t, e), ze.init(t, e), t._zod.processJSONSchema = (r, i, n) => ry(t, r), t.min = (...r) => t.check(/* @__PURE__ */ xn(...r)), t.nonempty = (r) => t.check(/* @__PURE__ */ xn(1, r)), t.max = (...r) => t.check(/* @__PURE__ */
|
|
11896
|
+
S0.init(t, e), ze.init(t, e), t._zod.processJSONSchema = (r, i, n) => ry(t, r), t.min = (...r) => t.check(/* @__PURE__ */ xn(...r)), t.nonempty = (r) => t.check(/* @__PURE__ */ xn(1, r)), t.max = (...r) => t.check(/* @__PURE__ */ ki(...r)), t.size = (...r) => t.check(/* @__PURE__ */ fo(...r));
|
|
11897
11897
|
});
|
|
11898
11898
|
function AS(t, e) {
|
|
11899
11899
|
return new Gp({
|
|
@@ -11902,7 +11902,7 @@ function AS(t, e) {
|
|
|
11902
11902
|
...ee(e)
|
|
11903
11903
|
});
|
|
11904
11904
|
}
|
|
11905
|
-
const
|
|
11905
|
+
const hi = /* @__PURE__ */ K("ZodEnum", (t, e) => {
|
|
11906
11906
|
b0.init(t, e), ze.init(t, e), t._zod.processJSONSchema = (i, n, o) => Hv(t, i, n), t.enum = e.entries, t.options = Object.values(e.entries);
|
|
11907
11907
|
const r = new Set(Object.keys(e.entries));
|
|
11908
11908
|
t.extract = (i, n) => {
|
|
@@ -11912,7 +11912,7 @@ const fi = /* @__PURE__ */ K("ZodEnum", (t, e) => {
|
|
|
11912
11912
|
o[s] = e.entries[s];
|
|
11913
11913
|
else
|
|
11914
11914
|
throw new Error(`Key ${s} not found in enum`);
|
|
11915
|
-
return new
|
|
11915
|
+
return new hi({
|
|
11916
11916
|
...e,
|
|
11917
11917
|
checks: [],
|
|
11918
11918
|
...ee(n),
|
|
@@ -11925,7 +11925,7 @@ const fi = /* @__PURE__ */ K("ZodEnum", (t, e) => {
|
|
|
11925
11925
|
delete o[s];
|
|
11926
11926
|
else
|
|
11927
11927
|
throw new Error(`Key ${s} not found in enum`);
|
|
11928
|
-
return new
|
|
11928
|
+
return new hi({
|
|
11929
11929
|
...e,
|
|
11930
11930
|
checks: [],
|
|
11931
11931
|
...ee(n),
|
|
@@ -11935,14 +11935,14 @@ const fi = /* @__PURE__ */ K("ZodEnum", (t, e) => {
|
|
|
11935
11935
|
});
|
|
11936
11936
|
function ut(t, e) {
|
|
11937
11937
|
const r = Array.isArray(t) ? Object.fromEntries(t.map((i) => [i, i])) : t;
|
|
11938
|
-
return new
|
|
11938
|
+
return new hi({
|
|
11939
11939
|
type: "enum",
|
|
11940
11940
|
entries: r,
|
|
11941
11941
|
...ee(e)
|
|
11942
11942
|
});
|
|
11943
11943
|
}
|
|
11944
11944
|
function $S(t, e) {
|
|
11945
|
-
return new
|
|
11945
|
+
return new hi({
|
|
11946
11946
|
type: "enum",
|
|
11947
11947
|
entries: t,
|
|
11948
11948
|
...ee(e)
|
|
@@ -11965,7 +11965,7 @@ function te(t, e) {
|
|
|
11965
11965
|
});
|
|
11966
11966
|
}
|
|
11967
11967
|
const Vp = /* @__PURE__ */ K("ZodFile", (t, e) => {
|
|
11968
|
-
x0.init(t, e), ze.init(t, e), t._zod.processJSONSchema = (r, i, n) => Jv(t, r, i), t.min = (r, i) => t.check(/* @__PURE__ */ xn(r, i)), t.max = (r, i) => t.check(/* @__PURE__ */
|
|
11968
|
+
x0.init(t, e), ze.init(t, e), t._zod.processJSONSchema = (r, i, n) => Jv(t, r, i), t.min = (r, i) => t.check(/* @__PURE__ */ xn(r, i)), t.max = (r, i) => t.check(/* @__PURE__ */ ki(r, i)), t.mime = (r, i) => t.check(/* @__PURE__ */ ia(Array.isArray(r) ? r : [r], i));
|
|
11969
11969
|
});
|
|
11970
11970
|
function RS(t) {
|
|
11971
11971
|
return /* @__PURE__ */ wv(Vp, t);
|
|
@@ -11976,10 +11976,10 @@ const Hp = /* @__PURE__ */ K("ZodTransform", (t, e) => {
|
|
|
11976
11976
|
throw new Vs(t.constructor.name);
|
|
11977
11977
|
r.addIssue = (o) => {
|
|
11978
11978
|
if (typeof o == "string")
|
|
11979
|
-
r.issues.push(
|
|
11979
|
+
r.issues.push(ui(o, r.value, e));
|
|
11980
11980
|
else {
|
|
11981
11981
|
const s = o;
|
|
11982
|
-
s.fatal && (s.continue = !1), s.code ?? (s.code = "custom"), s.input ?? (s.input = r.value), s.inst ?? (s.inst = t), r.issues.push(
|
|
11982
|
+
s.fatal && (s.continue = !1), s.code ?? (s.code = "custom"), s.input ?? (s.input = r.value), s.inst ?? (s.inst = t), r.issues.push(ui(s));
|
|
11983
11983
|
}
|
|
11984
11984
|
};
|
|
11985
11985
|
const n = e.transform(r.value, r);
|
|
@@ -11995,7 +11995,7 @@ function $a(t) {
|
|
|
11995
11995
|
const Ra = /* @__PURE__ */ K("ZodOptional", (t, e) => {
|
|
11996
11996
|
Kl.init(t, e), ze.init(t, e), t._zod.processJSONSchema = (r, i, n) => kp(t, r, i, n), t.unwrap = () => t._zod.def.innerType;
|
|
11997
11997
|
});
|
|
11998
|
-
function
|
|
11998
|
+
function Ki(t) {
|
|
11999
11999
|
return new Ra({
|
|
12000
12000
|
type: "optional",
|
|
12001
12001
|
innerType: t
|
|
@@ -12013,14 +12013,14 @@ function Wp(t) {
|
|
|
12013
12013
|
const Zp = /* @__PURE__ */ K("ZodNullable", (t, e) => {
|
|
12014
12014
|
C0.init(t, e), ze.init(t, e), t._zod.processJSONSchema = (r, i, n) => uy(t, r, i, n), t.unwrap = () => t._zod.def.innerType;
|
|
12015
12015
|
});
|
|
12016
|
-
function
|
|
12016
|
+
function Wi(t) {
|
|
12017
12017
|
return new Zp({
|
|
12018
12018
|
type: "nullable",
|
|
12019
12019
|
innerType: t
|
|
12020
12020
|
});
|
|
12021
12021
|
}
|
|
12022
12022
|
function PS(t) {
|
|
12023
|
-
return
|
|
12023
|
+
return Ki(Wi(t));
|
|
12024
12024
|
}
|
|
12025
12025
|
const Jp = /* @__PURE__ */ K("ZodDefault", (t, e) => {
|
|
12026
12026
|
I0.init(t, e), ze.init(t, e), t._zod.processJSONSchema = (r, i, n) => ly(t, r, i, n), t.unwrap = () => t._zod.def.innerType, t.removeDefault = t.unwrap;
|
|
@@ -12084,7 +12084,7 @@ function OS(t) {
|
|
|
12084
12084
|
const Da = /* @__PURE__ */ K("ZodPipe", (t, e) => {
|
|
12085
12085
|
D0.init(t, e), ze.init(t, e), t._zod.processJSONSchema = (r, i, n) => fy(t, r, i, n), t.in = e.in, t.out = e.out;
|
|
12086
12086
|
});
|
|
12087
|
-
function
|
|
12087
|
+
function Zi(t, e) {
|
|
12088
12088
|
return new Da({
|
|
12089
12089
|
type: "pipe",
|
|
12090
12090
|
in: t,
|
|
@@ -12151,7 +12151,7 @@ function hs(t) {
|
|
|
12151
12151
|
output: t?.output ?? cr()
|
|
12152
12152
|
});
|
|
12153
12153
|
}
|
|
12154
|
-
const
|
|
12154
|
+
const wo = /* @__PURE__ */ K("ZodCustom", (t, e) => {
|
|
12155
12155
|
L0.init(t, e), ze.init(t, e), t._zod.processJSONSchema = (r, i, n) => Xv(t, r);
|
|
12156
12156
|
});
|
|
12157
12157
|
function MS(t) {
|
|
@@ -12162,17 +12162,17 @@ function MS(t) {
|
|
|
12162
12162
|
return e._zod.check = t, e;
|
|
12163
12163
|
}
|
|
12164
12164
|
function LS(t, e) {
|
|
12165
|
-
return /* @__PURE__ */ Cv(
|
|
12165
|
+
return /* @__PURE__ */ Cv(wo, t ?? (() => !0), e);
|
|
12166
12166
|
}
|
|
12167
12167
|
function pd(t, e = {}) {
|
|
12168
|
-
return /* @__PURE__ */ Iv(
|
|
12168
|
+
return /* @__PURE__ */ Iv(wo, t, e);
|
|
12169
12169
|
}
|
|
12170
12170
|
function dd(t) {
|
|
12171
12171
|
return /* @__PURE__ */ Tv(t);
|
|
12172
12172
|
}
|
|
12173
12173
|
const zS = $v, FS = Rv;
|
|
12174
12174
|
function jS(t, e = {}) {
|
|
12175
|
-
const r = new
|
|
12175
|
+
const r = new wo({
|
|
12176
12176
|
type: "custom",
|
|
12177
12177
|
check: "custom",
|
|
12178
12178
|
fn: (i) => i instanceof t,
|
|
@@ -12191,15 +12191,15 @@ function jS(t, e = {}) {
|
|
|
12191
12191
|
}
|
|
12192
12192
|
const GS = (...t) => /* @__PURE__ */ Pv({
|
|
12193
12193
|
Codec: Oa,
|
|
12194
|
-
Boolean:
|
|
12195
|
-
String:
|
|
12194
|
+
Boolean: So,
|
|
12195
|
+
String: _o
|
|
12196
12196
|
}, ...t);
|
|
12197
12197
|
function qS(t) {
|
|
12198
|
-
const e = Na(() => er([M(t), Me(), or(),
|
|
12198
|
+
const e = Na(() => er([M(t), Me(), or(), Ei(), tr(e), sr(M(), e)]));
|
|
12199
12199
|
return e;
|
|
12200
12200
|
}
|
|
12201
12201
|
function VS(t, e) {
|
|
12202
|
-
return
|
|
12202
|
+
return Zi($a(t), e);
|
|
12203
12203
|
}
|
|
12204
12204
|
const mC = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
12205
12205
|
__proto__: null,
|
|
@@ -12207,28 +12207,28 @@ const mC = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
12207
12207
|
ZodArray: Np,
|
|
12208
12208
|
ZodBase64: xa,
|
|
12209
12209
|
ZodBase64URL: Ea,
|
|
12210
|
-
ZodBigInt:
|
|
12210
|
+
ZodBigInt: bo,
|
|
12211
12211
|
ZodBigIntFormat: Ia,
|
|
12212
|
-
ZodBoolean:
|
|
12212
|
+
ZodBoolean: So,
|
|
12213
12213
|
ZodCIDRv4: ba,
|
|
12214
12214
|
ZodCIDRv6: ka,
|
|
12215
12215
|
ZodCUID: ha,
|
|
12216
12216
|
ZodCUID2: ga,
|
|
12217
12217
|
ZodCatch: rd,
|
|
12218
12218
|
ZodCodec: Oa,
|
|
12219
|
-
ZodCustom:
|
|
12220
|
-
ZodCustomStringFormat:
|
|
12219
|
+
ZodCustom: wo,
|
|
12220
|
+
ZodCustomStringFormat: xi,
|
|
12221
12221
|
ZodDate: Aa,
|
|
12222
12222
|
ZodDefault: Jp,
|
|
12223
12223
|
ZodDiscriminatedUnion: Up,
|
|
12224
12224
|
ZodE164: wa,
|
|
12225
12225
|
ZodEmail: pa,
|
|
12226
12226
|
ZodEmoji: da,
|
|
12227
|
-
ZodEnum:
|
|
12227
|
+
ZodEnum: hi,
|
|
12228
12228
|
ZodExactOptional: Kp,
|
|
12229
12229
|
ZodFile: Vp,
|
|
12230
12230
|
ZodFunction: ld,
|
|
12231
|
-
ZodGUID:
|
|
12231
|
+
ZodGUID: Hi,
|
|
12232
12232
|
ZodIPv4: ya,
|
|
12233
12233
|
ZodIPv6: Sa,
|
|
12234
12234
|
ZodIntersection: Mp,
|
|
@@ -12244,17 +12244,17 @@ const mC = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
12244
12244
|
ZodNonOptional: Pa,
|
|
12245
12245
|
ZodNull: $p,
|
|
12246
12246
|
ZodNullable: Zp,
|
|
12247
|
-
ZodNumber:
|
|
12248
|
-
ZodNumberFormat:
|
|
12249
|
-
ZodObject:
|
|
12247
|
+
ZodNumber: yo,
|
|
12248
|
+
ZodNumberFormat: Wn,
|
|
12249
|
+
ZodObject: ko,
|
|
12250
12250
|
ZodOptional: Ra,
|
|
12251
12251
|
ZodPipe: Da,
|
|
12252
12252
|
ZodPrefault: Xp,
|
|
12253
12253
|
ZodPromise: cd,
|
|
12254
12254
|
ZodReadonly: od,
|
|
12255
|
-
ZodRecord:
|
|
12255
|
+
ZodRecord: Eo,
|
|
12256
12256
|
ZodSet: Gp,
|
|
12257
|
-
ZodString:
|
|
12257
|
+
ZodString: _o,
|
|
12258
12258
|
ZodStringFormat: mt,
|
|
12259
12259
|
ZodSuccess: td,
|
|
12260
12260
|
ZodSymbol: Tp,
|
|
@@ -12263,10 +12263,10 @@ const mC = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
12263
12263
|
ZodTuple: zp,
|
|
12264
12264
|
ZodType: ze,
|
|
12265
12265
|
ZodULID: ma,
|
|
12266
|
-
ZodURL:
|
|
12266
|
+
ZodURL: vo,
|
|
12267
12267
|
ZodUUID: Kr,
|
|
12268
12268
|
ZodUndefined: Ap,
|
|
12269
|
-
ZodUnion:
|
|
12269
|
+
ZodUnion: xo,
|
|
12270
12270
|
ZodUnknown: Pp,
|
|
12271
12271
|
ZodVoid: Op,
|
|
12272
12272
|
ZodXID: _a,
|
|
@@ -12328,14 +12328,14 @@ const mC = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
12328
12328
|
nativeEnum: $S,
|
|
12329
12329
|
never: Ta,
|
|
12330
12330
|
nonoptional: ed,
|
|
12331
|
-
null:
|
|
12332
|
-
nullable:
|
|
12331
|
+
null: Ei,
|
|
12332
|
+
nullable: Wi,
|
|
12333
12333
|
nullish: PS,
|
|
12334
12334
|
number: Me,
|
|
12335
12335
|
object: we,
|
|
12336
|
-
optional:
|
|
12336
|
+
optional: Ki,
|
|
12337
12337
|
partialRecord: CS,
|
|
12338
|
-
pipe:
|
|
12338
|
+
pipe: Zi,
|
|
12339
12339
|
prefault: Qp,
|
|
12340
12340
|
preprocess: VS,
|
|
12341
12341
|
promise: US,
|
|
@@ -12670,16 +12670,16 @@ function xC(t, e) {
|
|
|
12670
12670
|
return Xt(t, n);
|
|
12671
12671
|
}
|
|
12672
12672
|
function _c(t) {
|
|
12673
|
-
return /* @__PURE__ */ W0(
|
|
12673
|
+
return /* @__PURE__ */ W0(_o, t);
|
|
12674
12674
|
}
|
|
12675
12675
|
function vc(t) {
|
|
12676
|
-
return /* @__PURE__ */ rv(
|
|
12676
|
+
return /* @__PURE__ */ rv(yo, t);
|
|
12677
12677
|
}
|
|
12678
12678
|
function EC(t) {
|
|
12679
|
-
return /* @__PURE__ */ cv(
|
|
12679
|
+
return /* @__PURE__ */ cv(So, t);
|
|
12680
12680
|
}
|
|
12681
12681
|
function wC(t) {
|
|
12682
|
-
return /* @__PURE__ */ pv(
|
|
12682
|
+
return /* @__PURE__ */ pv(bo, t);
|
|
12683
12683
|
}
|
|
12684
12684
|
function es(t) {
|
|
12685
12685
|
return /* @__PURE__ */ kv(Aa, t);
|
|
@@ -12704,24 +12704,24 @@ const it = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
12704
12704
|
ZodArray: Np,
|
|
12705
12705
|
ZodBase64: xa,
|
|
12706
12706
|
ZodBase64URL: Ea,
|
|
12707
|
-
ZodBigInt:
|
|
12707
|
+
ZodBigInt: bo,
|
|
12708
12708
|
ZodBigIntFormat: Ia,
|
|
12709
|
-
ZodBoolean:
|
|
12709
|
+
ZodBoolean: So,
|
|
12710
12710
|
ZodCIDRv4: ba,
|
|
12711
12711
|
ZodCIDRv6: ka,
|
|
12712
12712
|
ZodCUID: ha,
|
|
12713
12713
|
ZodCUID2: ga,
|
|
12714
12714
|
ZodCatch: rd,
|
|
12715
12715
|
ZodCodec: Oa,
|
|
12716
|
-
ZodCustom:
|
|
12717
|
-
ZodCustomStringFormat:
|
|
12716
|
+
ZodCustom: wo,
|
|
12717
|
+
ZodCustomStringFormat: xi,
|
|
12718
12718
|
ZodDate: Aa,
|
|
12719
12719
|
ZodDefault: Jp,
|
|
12720
12720
|
ZodDiscriminatedUnion: Up,
|
|
12721
12721
|
ZodE164: wa,
|
|
12722
12722
|
ZodEmail: pa,
|
|
12723
12723
|
ZodEmoji: da,
|
|
12724
|
-
ZodEnum:
|
|
12724
|
+
ZodEnum: hi,
|
|
12725
12725
|
ZodError: ds,
|
|
12726
12726
|
ZodExactOptional: Kp,
|
|
12727
12727
|
ZodFile: Vp,
|
|
@@ -12729,7 +12729,7 @@ const it = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
12729
12729
|
return mc;
|
|
12730
12730
|
},
|
|
12731
12731
|
ZodFunction: ld,
|
|
12732
|
-
ZodGUID:
|
|
12732
|
+
ZodGUID: Hi,
|
|
12733
12733
|
ZodIPv4: ya,
|
|
12734
12734
|
ZodIPv6: Sa,
|
|
12735
12735
|
ZodISODate: Ep,
|
|
@@ -12750,18 +12750,18 @@ const it = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
12750
12750
|
ZodNonOptional: Pa,
|
|
12751
12751
|
ZodNull: $p,
|
|
12752
12752
|
ZodNullable: Zp,
|
|
12753
|
-
ZodNumber:
|
|
12754
|
-
ZodNumberFormat:
|
|
12755
|
-
ZodObject:
|
|
12753
|
+
ZodNumber: yo,
|
|
12754
|
+
ZodNumberFormat: Wn,
|
|
12755
|
+
ZodObject: ko,
|
|
12756
12756
|
ZodOptional: Ra,
|
|
12757
12757
|
ZodPipe: Da,
|
|
12758
12758
|
ZodPrefault: Xp,
|
|
12759
12759
|
ZodPromise: cd,
|
|
12760
12760
|
ZodReadonly: od,
|
|
12761
12761
|
ZodRealError: mr,
|
|
12762
|
-
ZodRecord:
|
|
12762
|
+
ZodRecord: Eo,
|
|
12763
12763
|
ZodSet: Gp,
|
|
12764
|
-
ZodString:
|
|
12764
|
+
ZodString: _o,
|
|
12765
12765
|
ZodStringFormat: mt,
|
|
12766
12766
|
ZodSuccess: td,
|
|
12767
12767
|
ZodSymbol: Tp,
|
|
@@ -12770,10 +12770,10 @@ const it = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
12770
12770
|
ZodTuple: zp,
|
|
12771
12771
|
ZodType: ze,
|
|
12772
12772
|
ZodULID: ma,
|
|
12773
|
-
ZodURL:
|
|
12773
|
+
ZodURL: vo,
|
|
12774
12774
|
ZodUUID: Kr,
|
|
12775
12775
|
ZodUndefined: Ap,
|
|
12776
|
-
ZodUnion:
|
|
12776
|
+
ZodUnion: xo,
|
|
12777
12777
|
ZodUnknown: Pp,
|
|
12778
12778
|
ZodVoid: Op,
|
|
12779
12779
|
ZodXID: _a,
|
|
@@ -12842,7 +12842,7 @@ const it = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
12842
12842
|
keyof: bS,
|
|
12843
12843
|
ksuid: Jy,
|
|
12844
12844
|
lazy: Na,
|
|
12845
|
-
length:
|
|
12845
|
+
length: go,
|
|
12846
12846
|
literal: te,
|
|
12847
12847
|
locales: G0,
|
|
12848
12848
|
looseObject: xS,
|
|
@@ -12852,13 +12852,13 @@ const it = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
12852
12852
|
lte: Cr,
|
|
12853
12853
|
mac: Xy,
|
|
12854
12854
|
map: TS,
|
|
12855
|
-
maxLength:
|
|
12856
|
-
maxSize:
|
|
12855
|
+
maxLength: ho,
|
|
12856
|
+
maxSize: ki,
|
|
12857
12857
|
meta: FS,
|
|
12858
12858
|
mime: ia,
|
|
12859
|
-
minLength:
|
|
12859
|
+
minLength: jn,
|
|
12860
12860
|
minSize: xn,
|
|
12861
|
-
multipleOf:
|
|
12861
|
+
multipleOf: li,
|
|
12862
12862
|
nan: OS,
|
|
12863
12863
|
nanoid: Vy,
|
|
12864
12864
|
nativeEnum: $S,
|
|
@@ -12868,17 +12868,17 @@ const it = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
12868
12868
|
nonoptional: ed,
|
|
12869
12869
|
nonpositive: vp,
|
|
12870
12870
|
normalize: oa,
|
|
12871
|
-
null:
|
|
12872
|
-
nullable:
|
|
12871
|
+
null: Ei,
|
|
12872
|
+
nullable: Wi,
|
|
12873
12873
|
nullish: PS,
|
|
12874
12874
|
number: Me,
|
|
12875
12875
|
object: we,
|
|
12876
|
-
optional:
|
|
12876
|
+
optional: Ki,
|
|
12877
12877
|
overwrite: an,
|
|
12878
12878
|
parse: Ey,
|
|
12879
12879
|
parseAsync: wy,
|
|
12880
12880
|
partialRecord: CS,
|
|
12881
|
-
pipe:
|
|
12881
|
+
pipe: Zi,
|
|
12882
12882
|
positive: mp,
|
|
12883
12883
|
prefault: Qp,
|
|
12884
12884
|
preprocess: VS,
|
|
@@ -12899,7 +12899,7 @@ const it = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
12899
12899
|
safeParseAsync: Iy,
|
|
12900
12900
|
set: AS,
|
|
12901
12901
|
setErrorMap: vC,
|
|
12902
|
-
size:
|
|
12902
|
+
size: fo,
|
|
12903
12903
|
slugify: ca,
|
|
12904
12904
|
startsWith: ra,
|
|
12905
12905
|
strictObject: kS,
|
|
@@ -12965,7 +12965,7 @@ let gs = class {
|
|
|
12965
12965
|
this.runtimeConfig = KS.parse(t), this.appConfig = $C.parse({
|
|
12966
12966
|
VITE_INJECT_AGIFLOW_APP_ENDPOINT: "https://agiflow.io",
|
|
12967
12967
|
VITE_INJECT_AGIFLOW_APP_DOCKER_ENDPOINT: "https://agiflow.io",
|
|
12968
|
-
VITE_AGENT_CLI_DOCKER_IMAGE: "agiflowai/agent-cli:v0.2.
|
|
12968
|
+
VITE_AGENT_CLI_DOCKER_IMAGE: "agiflowai/agent-cli:v0.2.14",
|
|
12969
12969
|
VITE_AGENT_CLI_DOCKER_NETWORK: "",
|
|
12970
12970
|
VITE_SAVE_RAW: "",
|
|
12971
12971
|
VITE_MULTIPLEX_SOCKET_PATH: ""
|
|
@@ -12993,14 +12993,14 @@ let gs = class {
|
|
|
12993
12993
|
* @returns Path to credentials.json in ~/.agiflow directory
|
|
12994
12994
|
*/
|
|
12995
12995
|
getCredentialsPath() {
|
|
12996
|
-
return _t(
|
|
12996
|
+
return _t(Un(), ".agiflow", "credentials.json");
|
|
12997
12997
|
}
|
|
12998
12998
|
/**
|
|
12999
12999
|
* Get Claude agents directory path
|
|
13000
13000
|
* @returns Path to .claude/agents directory
|
|
13001
13001
|
*/
|
|
13002
13002
|
getClaudeAgentsPath() {
|
|
13003
|
-
return _t(
|
|
13003
|
+
return _t(Un(), ".claude", "agents");
|
|
13004
13004
|
}
|
|
13005
13005
|
/**
|
|
13006
13006
|
* Get the appropriate server URL based on the environment
|
|
@@ -13334,7 +13334,7 @@ let yc = class {
|
|
|
13334
13334
|
yc = OC([
|
|
13335
13335
|
xe()
|
|
13336
13336
|
], yc);
|
|
13337
|
-
const WS = new gs(),
|
|
13337
|
+
const WS = new gs(), Ji = WS.getAppConfig(), tO = (t) => WS.getWebSocketUrl(t), F = {
|
|
13338
13338
|
// ============================================================================
|
|
13339
13339
|
// Core Services
|
|
13340
13340
|
// ============================================================================
|
|
@@ -14263,7 +14263,7 @@ const $f = 5 * 1024 * 1024, Rf = "━".repeat(60), fI = (t) => ({
|
|
|
14263
14263
|
setTabs: iO,
|
|
14264
14264
|
setActiveTabId: _s,
|
|
14265
14265
|
addTab: _b,
|
|
14266
|
-
removeTab:
|
|
14266
|
+
removeTab: Gn,
|
|
14267
14267
|
updateTabPtySize: oO,
|
|
14268
14268
|
incrementUnreadCount: yI,
|
|
14269
14269
|
resetUnreadCount: sO,
|
|
@@ -14360,23 +14360,23 @@ function wI(t, e) {
|
|
|
14360
14360
|
const i = (/* @__PURE__ */ new Date()).toISOString().replace(/[-:]/g, "").replace("T", "-").split(".")[0], n = t || "claude", o = e?.replace(/[^a-z0-9]/gi, "") || "default";
|
|
14361
14361
|
return `${n}-${o}-${i}`;
|
|
14362
14362
|
}
|
|
14363
|
-
function
|
|
14363
|
+
function gi(t) {
|
|
14364
14364
|
if (!t)
|
|
14365
14365
|
return pt.CLAUDE_CODE;
|
|
14366
14366
|
const e = t.toLowerCase();
|
|
14367
14367
|
return e === "gemini" || e === pt.GEMINI_CLI.toLowerCase() ? pt.GEMINI_CLI : (e === "claude" || e === pt.CLAUDE_CODE.toLowerCase(), pt.CLAUDE_CODE);
|
|
14368
14368
|
}
|
|
14369
|
-
class
|
|
14369
|
+
class ji extends Error {
|
|
14370
14370
|
constructor(e, r, i) {
|
|
14371
14371
|
super(e), this.agentSessionId = r, this.cause = i, this.name = "AgentManagerError";
|
|
14372
14372
|
}
|
|
14373
14373
|
}
|
|
14374
|
-
class CI extends
|
|
14374
|
+
class CI extends ji {
|
|
14375
14375
|
constructor(e) {
|
|
14376
14376
|
super(`Agent with sessionId ${e} already exists`, e), this.name = "AgentAlreadyExistsError";
|
|
14377
14377
|
}
|
|
14378
14378
|
}
|
|
14379
|
-
class aO extends
|
|
14379
|
+
class aO extends ji {
|
|
14380
14380
|
constructor(e) {
|
|
14381
14381
|
super(`Agent with sessionId ${e} not found`, e), this.name = "AgentNotFoundError";
|
|
14382
14382
|
}
|
|
@@ -14417,7 +14417,7 @@ let bc = class {
|
|
|
14417
14417
|
async launchAgent(t) {
|
|
14418
14418
|
const e = t.payload.agentSessionId;
|
|
14419
14419
|
if (!e)
|
|
14420
|
-
throw new
|
|
14420
|
+
throw new ji("agentSessionId is required in request payload");
|
|
14421
14421
|
if (this.hasAgent(e))
|
|
14422
14422
|
throw new CI(e);
|
|
14423
14423
|
try {
|
|
@@ -14425,7 +14425,7 @@ let bc = class {
|
|
|
14425
14425
|
this.containers.set(e, r);
|
|
14426
14426
|
const i = r.get(Ce.AgentConfigService), n = t.payload.agentConfig ? JSON.parse(JSON.stringify(t.payload.agentConfig)) : {};
|
|
14427
14427
|
if (i.initializeAgentSession(
|
|
14428
|
-
|
|
14428
|
+
gi(t.payload.agentType),
|
|
14429
14429
|
e,
|
|
14430
14430
|
n
|
|
14431
14431
|
), n.apiUrl || n.serverUrl) {
|
|
@@ -14475,7 +14475,7 @@ let bc = class {
|
|
|
14475
14475
|
};
|
|
14476
14476
|
return this.logger.success(`Agent launched successfully: ${e}`), h;
|
|
14477
14477
|
} catch (r) {
|
|
14478
|
-
throw this.logger.error(`Failed to launch agent ${e}:`, r), await this.cleanupFailedLaunch(e), new
|
|
14478
|
+
throw this.logger.error(`Failed to launch agent ${e}:`, r), await this.cleanupFailedLaunch(e), new ji(
|
|
14479
14479
|
`Failed to launch agent: ${r instanceof Error ? r.message : String(r)}`,
|
|
14480
14480
|
e,
|
|
14481
14481
|
r instanceof Error ? r : void 0
|
|
@@ -14518,7 +14518,7 @@ let bc = class {
|
|
|
14518
14518
|
}
|
|
14519
14519
|
this.broker.unregisterSession(t), n && this.unbindContainerServices(n), this.workers.delete(t), this.containers.delete(t), this.sessionEndedSent.delete(t);
|
|
14520
14520
|
} catch (o) {
|
|
14521
|
-
throw this.logger.error(`Error during agent termination ${t}:`, o), this.workers.delete(t), this.containers.delete(t), this.registeredServices.delete(t), this.sessionEndedSent.delete(t), new
|
|
14521
|
+
throw this.logger.error(`Error during agent termination ${t}:`, o), this.workers.delete(t), this.containers.delete(t), this.registeredServices.delete(t), this.sessionEndedSent.delete(t), new ji(
|
|
14522
14522
|
`Failed to terminate agent: ${o instanceof Error ? o.message : String(o)}`,
|
|
14523
14523
|
t,
|
|
14524
14524
|
o instanceof Error ? o : void 0
|
|
@@ -14761,7 +14761,7 @@ vs = $I([
|
|
|
14761
14761
|
Df(0, H(F.CredentialsService)),
|
|
14762
14762
|
Df(1, H(F.Logger))
|
|
14763
14763
|
], vs);
|
|
14764
|
-
class
|
|
14764
|
+
class Co {
|
|
14765
14765
|
args = [];
|
|
14766
14766
|
/**
|
|
14767
14767
|
* Create a new CommandBuilder instance
|
|
@@ -14912,7 +14912,7 @@ class wo {
|
|
|
14912
14912
|
* @returns A new CommandBuilder instance
|
|
14913
14913
|
*/
|
|
14914
14914
|
clone() {
|
|
14915
|
-
return new
|
|
14915
|
+
return new Co([...this.args]);
|
|
14916
14916
|
}
|
|
14917
14917
|
/**
|
|
14918
14918
|
* Clear all arguments
|
|
@@ -14937,7 +14937,7 @@ class wo {
|
|
|
14937
14937
|
}
|
|
14938
14938
|
}
|
|
14939
14939
|
function uO(t = []) {
|
|
14940
|
-
return new
|
|
14940
|
+
return new Co(t);
|
|
14941
14941
|
}
|
|
14942
14942
|
class Qe {
|
|
14943
14943
|
/**
|
|
@@ -15265,17 +15265,17 @@ ys = BI([
|
|
|
15265
15265
|
Of(0, H(F.ConfigManager)),
|
|
15266
15266
|
Of(1, H(F.SubEnvManager))
|
|
15267
15267
|
], ys);
|
|
15268
|
-
class
|
|
15268
|
+
class oi extends Error {
|
|
15269
15269
|
constructor(e, r) {
|
|
15270
15270
|
super(e), this.cause = r, this.name = "DaemonManagerError";
|
|
15271
15271
|
}
|
|
15272
15272
|
}
|
|
15273
|
-
class UI extends
|
|
15273
|
+
class UI extends oi {
|
|
15274
15274
|
constructor() {
|
|
15275
15275
|
super("Daemon is already running"), this.name = "DaemonAlreadyRunningError";
|
|
15276
15276
|
}
|
|
15277
15277
|
}
|
|
15278
|
-
class dO extends
|
|
15278
|
+
class dO extends oi {
|
|
15279
15279
|
constructor() {
|
|
15280
15280
|
super("Daemon is not running"), this.name = "DaemonNotRunningError";
|
|
15281
15281
|
}
|
|
@@ -15342,15 +15342,15 @@ let kc = class {
|
|
|
15342
15342
|
if (this.isRunning())
|
|
15343
15343
|
throw new UI();
|
|
15344
15344
|
if (this.isStarting)
|
|
15345
|
-
throw new
|
|
15345
|
+
throw new oi("Daemon is already starting");
|
|
15346
15346
|
this.isStarting = !0, this.logger.info("Starting daemon...");
|
|
15347
15347
|
try {
|
|
15348
15348
|
const e = await this.credentials.getApiKey(), r = await this.credentials.getOrganizationId();
|
|
15349
15349
|
if (!e)
|
|
15350
|
-
throw new
|
|
15350
|
+
throw new oi("Authentication required - no API key available");
|
|
15351
15351
|
const { ulid: i } = await import("ulidx"), n = await this.credentials.load(), o = t?.deviceGuid || n?.deviceId || i(), s = t?.serverUrl || this.configManager.getServerUrl();
|
|
15352
15352
|
if (!s)
|
|
15353
|
-
throw new
|
|
15353
|
+
throw new oi(
|
|
15354
15354
|
"Server URL not configured. Please set VITE_INJECT_AGIFLOW_APP_ENDPOINT environment variable."
|
|
15355
15355
|
);
|
|
15356
15356
|
this.daemonContainer = bD();
|
|
@@ -15381,7 +15381,7 @@ let kc = class {
|
|
|
15381
15381
|
startedAt: Date.now()
|
|
15382
15382
|
}, this.logger.success(`Daemon started successfully: ${this.metadata.daemonId}`), this.metadata;
|
|
15383
15383
|
} catch (e) {
|
|
15384
|
-
throw await this.cleanupOnFailure(), new
|
|
15384
|
+
throw await this.cleanupOnFailure(), new oi(
|
|
15385
15385
|
`Failed to start daemon: ${e instanceof Error ? e.message : String(e)}`,
|
|
15386
15386
|
e instanceof Error ? e : void 0
|
|
15387
15387
|
);
|
|
@@ -15933,29 +15933,51 @@ let It = class {
|
|
|
15933
15933
|
constructor(t, e) {
|
|
15934
15934
|
this.options = e || {};
|
|
15935
15935
|
const r = this.options.debug ? "debug" : this.options.verbose ? "trace" : "info";
|
|
15936
|
-
this.options.silent ? this.pino =
|
|
15936
|
+
this.options.silent ? this.pino = An({ level: "silent" }) : this.pino = this.createMultiTransportLogger(r);
|
|
15937
15937
|
}
|
|
15938
15938
|
/**
|
|
15939
|
-
* Create a logger that
|
|
15939
|
+
* Create a logger that logs to file and optionally to console
|
|
15940
15940
|
* Uses pino-roll for automatic size-based rotation (max 10MB per file)
|
|
15941
|
+
* Set LOG_TO_CONSOLE=true or AGENT_MODE=sandbox to enable console output
|
|
15941
15942
|
*/
|
|
15942
15943
|
createMultiTransportLogger(t) {
|
|
15943
|
-
|
|
15944
|
-
|
|
15945
|
-
|
|
15944
|
+
if (process.env.LOG_TO_CONSOLE === "true") {
|
|
15945
|
+
const o = An({
|
|
15946
|
+
level: t,
|
|
15947
|
+
formatters: {
|
|
15948
|
+
level: (s) => ({ level: s })
|
|
15949
|
+
},
|
|
15950
|
+
serializers: {
|
|
15951
|
+
err: An.stdSerializers.err,
|
|
15952
|
+
error: An.stdSerializers.err
|
|
15953
|
+
},
|
|
15954
|
+
transport: {
|
|
15955
|
+
target: "pino-pretty",
|
|
15956
|
+
options: {
|
|
15957
|
+
colorize: !1,
|
|
15958
|
+
translateTime: "SYS:standard",
|
|
15959
|
+
ignore: "pid,hostname"
|
|
15960
|
+
}
|
|
15961
|
+
}
|
|
15962
|
+
});
|
|
15963
|
+
return o.info("[PinoLogger] Logger initialized with console output (sandbox mode)"), o;
|
|
15964
|
+
}
|
|
15965
|
+
const r = Dr.join(Pr.tmpdir(), "agiflow-agents", "logs", `session-${process.pid}`);
|
|
15966
|
+
Or.existsSync(r) || Or.mkdirSync(r, { recursive: !0 });
|
|
15967
|
+
const i = Dr.join(r, "app.log"), n = An({
|
|
15946
15968
|
level: t,
|
|
15947
15969
|
formatters: {
|
|
15948
|
-
level: (
|
|
15970
|
+
level: (o) => ({ level: o })
|
|
15949
15971
|
},
|
|
15950
15972
|
// Serialize errors with full stack traces
|
|
15951
15973
|
serializers: {
|
|
15952
|
-
err:
|
|
15953
|
-
error:
|
|
15974
|
+
err: An.stdSerializers.err,
|
|
15975
|
+
error: An.stdSerializers.err
|
|
15954
15976
|
},
|
|
15955
15977
|
transport: {
|
|
15956
15978
|
target: "pino-roll",
|
|
15957
15979
|
options: {
|
|
15958
|
-
file:
|
|
15980
|
+
file: i,
|
|
15959
15981
|
size: "10m",
|
|
15960
15982
|
// Rotate when file reaches 10MB
|
|
15961
15983
|
limit: { count: 3 }
|
|
@@ -15963,7 +15985,7 @@ let It = class {
|
|
|
15963
15985
|
}
|
|
15964
15986
|
}
|
|
15965
15987
|
});
|
|
15966
|
-
return
|
|
15988
|
+
return n.info("[PinoLogger] Logger initialized"), n;
|
|
15967
15989
|
}
|
|
15968
15990
|
/**
|
|
15969
15991
|
* Get singleton instance (for backward compatibility with static methods)
|
|
@@ -16474,7 +16496,7 @@ const Zt = we({
|
|
|
16474
16496
|
jsonrpc: te("2.0").default("2.0"),
|
|
16475
16497
|
method: M(),
|
|
16476
16498
|
params: er([tr(dt()), sr(M(), dt())]).optional(),
|
|
16477
|
-
id: er([M(), Me(),
|
|
16499
|
+
id: er([M(), Me(), Ei()])
|
|
16478
16500
|
})
|
|
16479
16501
|
}), pT = we({
|
|
16480
16502
|
eventType: te("agent-rpc-request").default("agent-rpc-request"),
|
|
@@ -16490,7 +16512,7 @@ const Zt = we({
|
|
|
16490
16512
|
message: M(),
|
|
16491
16513
|
data: dt().optional()
|
|
16492
16514
|
}).optional(),
|
|
16493
|
-
id: er([M(), Me(),
|
|
16515
|
+
id: er([M(), Me(), Ei()])
|
|
16494
16516
|
})
|
|
16495
16517
|
});
|
|
16496
16518
|
var dT = Object.defineProperty, fT = Object.getOwnPropertyDescriptor, hT = (t, e, r) => e in t ? dT(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, gT = (t, e, r, i) => {
|
|
@@ -16511,7 +16533,7 @@ async function _T() {
|
|
|
16511
16533
|
}), r.on("error", e);
|
|
16512
16534
|
});
|
|
16513
16535
|
}
|
|
16514
|
-
let
|
|
16536
|
+
let qn = class {
|
|
16515
16537
|
constructor(t, e, r) {
|
|
16516
16538
|
this.logger = t, this.config = e, this.globalServices.set("StateManager", r);
|
|
16517
16539
|
}
|
|
@@ -16870,8 +16892,8 @@ let Gn = class {
|
|
|
16870
16892
|
const e = this.messageQueues.get(t);
|
|
16871
16893
|
if (!e || e.length === 0)
|
|
16872
16894
|
return;
|
|
16873
|
-
if (e.length >
|
|
16874
|
-
const i = e.length -
|
|
16895
|
+
if (e.length > qn.MAX_QUEUE_SIZE) {
|
|
16896
|
+
const i = e.length - qn.MAX_QUEUE_SIZE;
|
|
16875
16897
|
e.splice(0, i), this.logger.warn(`Queue for ${t} exceeded max size, trimmed ${i} old messages`);
|
|
16876
16898
|
}
|
|
16877
16899
|
const r = e.shift();
|
|
@@ -17087,13 +17109,13 @@ let Gn = class {
|
|
|
17087
17109
|
r && r.services.delete(e);
|
|
17088
17110
|
}
|
|
17089
17111
|
};
|
|
17090
|
-
mT(
|
|
17091
|
-
|
|
17112
|
+
mT(qn, "MAX_QUEUE_SIZE", 100);
|
|
17113
|
+
qn = gT([
|
|
17092
17114
|
xe(),
|
|
17093
17115
|
ou(0, H(F.Logger)),
|
|
17094
17116
|
ou(1, H(Et.MessageMultiplexBrokerConfig)),
|
|
17095
17117
|
ou(2, H(F.StateManager))
|
|
17096
|
-
],
|
|
17118
|
+
], qn);
|
|
17097
17119
|
var vT = Object.getOwnPropertyDescriptor, yT = (t, e, r, i) => {
|
|
17098
17120
|
for (var n = i > 1 ? void 0 : i ? vT(e, r) : e, o = t.length - 1, s; o >= 0; o--)
|
|
17099
17121
|
(s = t[o]) && (n = s(n) || n);
|
|
@@ -17105,7 +17127,7 @@ const fO = {
|
|
|
17105
17127
|
backoffMultiplier: 2,
|
|
17106
17128
|
maxBackoffMs: 3e4
|
|
17107
17129
|
};
|
|
17108
|
-
let
|
|
17130
|
+
let Yi = class {
|
|
17109
17131
|
constructor(t, e) {
|
|
17110
17132
|
this.logger = t, this.config = e;
|
|
17111
17133
|
}
|
|
@@ -17167,17 +17189,17 @@ let Ji = class {
|
|
|
17167
17189
|
}
|
|
17168
17190
|
}
|
|
17169
17191
|
};
|
|
17170
|
-
|
|
17192
|
+
Yi = yT([
|
|
17171
17193
|
xe(),
|
|
17172
17194
|
Uf(0, H(F.Logger)),
|
|
17173
17195
|
Uf(1, H(F.MultiplexClientConfig))
|
|
17174
|
-
],
|
|
17196
|
+
], Yi);
|
|
17175
17197
|
var ST = Object.getOwnPropertyDescriptor, bT = (t, e, r, i) => {
|
|
17176
17198
|
for (var n = i > 1 ? void 0 : i ? ST(e, r) : e, o = t.length - 1, s; o >= 0; o--)
|
|
17177
17199
|
(s = t[o]) && (n = s(n) || n);
|
|
17178
17200
|
return n;
|
|
17179
17201
|
}, Mf = (t, e) => (r, i) => e(r, i, t);
|
|
17180
|
-
let Ss = class extends
|
|
17202
|
+
let Ss = class extends Yi {
|
|
17181
17203
|
connected = !1;
|
|
17182
17204
|
brokerHandlers = /* @__PURE__ */ new Map();
|
|
17183
17205
|
constructor(t, e) {
|
|
@@ -17344,7 +17366,7 @@ var ET = Object.getOwnPropertyDescriptor, wT = (t, e, r, i) => {
|
|
|
17344
17366
|
(s = t[o]) && (n = s(n) || n);
|
|
17345
17367
|
return n;
|
|
17346
17368
|
}, zf = (t, e) => (r, i) => e(r, i, t);
|
|
17347
|
-
let Ac = class extends
|
|
17369
|
+
let Ac = class extends Yi {
|
|
17348
17370
|
ws = null;
|
|
17349
17371
|
reconnectTimer = null;
|
|
17350
17372
|
connected = !1;
|
|
@@ -17540,7 +17562,7 @@ var CT = Object.getOwnPropertyDescriptor, IT = (t, e, r, i) => {
|
|
|
17540
17562
|
(s = t[o]) && (n = s(n) || n);
|
|
17541
17563
|
return n;
|
|
17542
17564
|
}, Ff = (t, e) => (r, i) => e(r, i, t);
|
|
17543
|
-
let jf = class extends
|
|
17565
|
+
let jf = class extends Yi {
|
|
17544
17566
|
MAX_BUFFER_SIZE = 10 * 1024 * 1024;
|
|
17545
17567
|
// 10MB limit
|
|
17546
17568
|
connected = !1;
|
|
@@ -17844,7 +17866,7 @@ const qf = Wk(Nk);
|
|
|
17844
17866
|
let $c = class {
|
|
17845
17867
|
constructor(t) {
|
|
17846
17868
|
this.logger = t;
|
|
17847
|
-
const e =
|
|
17869
|
+
const e = Un();
|
|
17848
17870
|
this.searchPaths = [
|
|
17849
17871
|
`"${e}/workspace"`,
|
|
17850
17872
|
`"${e}/projects"`,
|
|
@@ -17858,7 +17880,7 @@ let $c = class {
|
|
|
17858
17880
|
const t = [];
|
|
17859
17881
|
for (const e of this.searchPaths)
|
|
17860
17882
|
try {
|
|
17861
|
-
const r = e.includes(
|
|
17883
|
+
const r = e.includes(Un() + '"') && !e.includes("/") ? 1 : 3, i = `find ${e} -maxdepth ${r} -name "package.json" -type f -not -path "*/node_modules/*" 2>/dev/null`, n = `find ${e} -maxdepth ${r} -name "pyproject.toml" -type f 2>/dev/null`, [o, s] = await Promise.allSettled([qf(i), qf(n)]);
|
|
17862
17884
|
o.status === "fulfilled" && o.value.stdout.trim() && t.push(...o.value.stdout.trim().split(`
|
|
17863
17885
|
`).filter(Boolean)), s.status === "fulfilled" && s.value.stdout.trim() && t.push(...s.value.stdout.trim().split(`
|
|
17864
17886
|
`).filter(Boolean));
|
|
@@ -17952,7 +17974,7 @@ let Rc = class {
|
|
|
17952
17974
|
* Called via RPC from agents (including Docker agents)
|
|
17953
17975
|
*/
|
|
17954
17976
|
async removeTab(t) {
|
|
17955
|
-
this.logger.info(`[StateManager] Removing tab: ${t}`), this.store.dispatch(
|
|
17977
|
+
this.logger.info(`[StateManager] Removing tab: ${t}`), this.store.dispatch(Gn(t));
|
|
17956
17978
|
}
|
|
17957
17979
|
/**
|
|
17958
17980
|
* Update agent status in Redux store
|
|
@@ -18209,7 +18231,7 @@ var UT = Object.getOwnPropertyDescriptor, MT = (t, e, r, i) => {
|
|
|
18209
18231
|
for (var n = i > 1 ? void 0 : i ? UT(e, r) : e, o = t.length - 1, s; o >= 0; o--)
|
|
18210
18232
|
(s = t[o]) && (n = s(n) || n);
|
|
18211
18233
|
return n;
|
|
18212
|
-
},
|
|
18234
|
+
}, ei = (t, e) => (r, i) => e(r, i, t);
|
|
18213
18235
|
let Dc = class {
|
|
18214
18236
|
constructor(t, e, r, i, n, o) {
|
|
18215
18237
|
this.config = t, this.context = e, this.credentialsService = r, this.agentConfig = i, this.logger = n, this.store = o, this.reconnectInterval = this.agentConfig.getReconnectInterval();
|
|
@@ -18598,12 +18620,12 @@ let Dc = class {
|
|
|
18598
18620
|
};
|
|
18599
18621
|
Dc = MT([
|
|
18600
18622
|
xe(),
|
|
18601
|
-
|
|
18602
|
-
|
|
18603
|
-
|
|
18604
|
-
|
|
18605
|
-
|
|
18606
|
-
|
|
18623
|
+
ei(0, H(F.ConfigManager)),
|
|
18624
|
+
ei(1, H(F.ContextService)),
|
|
18625
|
+
ei(2, H(F.CredentialsService)),
|
|
18626
|
+
ei(3, H(Ce.AgentConfigService)),
|
|
18627
|
+
ei(4, H(F.Logger)),
|
|
18628
|
+
ei(5, H(F.Store))
|
|
18607
18629
|
], Dc);
|
|
18608
18630
|
const hd = (t, e) => Zt.parse({
|
|
18609
18631
|
payload: {
|
|
@@ -18669,7 +18691,7 @@ const hd = (t, e) => Zt.parse({
|
|
|
18669
18691
|
params: [e],
|
|
18670
18692
|
id: lt()
|
|
18671
18693
|
}
|
|
18672
|
-
}),
|
|
18694
|
+
}), Xi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
18673
18695
|
__proto__: null,
|
|
18674
18696
|
createFetchProfileEnvironment: kb,
|
|
18675
18697
|
createRequestApproval: LT,
|
|
@@ -18695,7 +18717,7 @@ const hd = (t, e) => Zt.parse({
|
|
|
18695
18717
|
params: [e],
|
|
18696
18718
|
id: lt()
|
|
18697
18719
|
}
|
|
18698
|
-
}),
|
|
18720
|
+
}), Vn = (t, e, r) => {
|
|
18699
18721
|
const i = { data: e };
|
|
18700
18722
|
return Zt.parse({
|
|
18701
18723
|
payload: {
|
|
@@ -18718,7 +18740,7 @@ const hd = (t, e) => Zt.parse({
|
|
|
18718
18740
|
__proto__: null,
|
|
18719
18741
|
createSendAgentError: xb,
|
|
18720
18742
|
createSendAgentStatus: gd,
|
|
18721
|
-
createSendStdoutMessage:
|
|
18743
|
+
createSendStdoutMessage: Vn,
|
|
18722
18744
|
createSendStreamChunk: Eb
|
|
18723
18745
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
18724
18746
|
var FT = Object.getOwnPropertyDescriptor, jT = (t, e, r, i) => {
|
|
@@ -18728,7 +18750,7 @@ var FT = Object.getOwnPropertyDescriptor, jT = (t, e, r, i) => {
|
|
|
18728
18750
|
}, GT = (t, e) => (r, i) => e(r, i, t);
|
|
18729
18751
|
let Oc = class {
|
|
18730
18752
|
constructor(t) {
|
|
18731
|
-
this.logger = t, this.baseClonesDir = _t(
|
|
18753
|
+
this.logger = t, this.baseClonesDir = _t(Un(), ".agiflow", "clones");
|
|
18732
18754
|
}
|
|
18733
18755
|
baseClonesDir;
|
|
18734
18756
|
/**
|
|
@@ -18899,7 +18921,7 @@ class qT {
|
|
|
18899
18921
|
*/
|
|
18900
18922
|
async sendStdoutToClient(e, r) {
|
|
18901
18923
|
try {
|
|
18902
|
-
const i =
|
|
18924
|
+
const i = Vn(e, r);
|
|
18903
18925
|
await this.multiplexClient.publish(i);
|
|
18904
18926
|
} catch (i) {
|
|
18905
18927
|
this.logger.debug(`Failed to send stdout message: ${i}`);
|
|
@@ -19258,7 +19280,7 @@ class nA {
|
|
|
19258
19280
|
*/
|
|
19259
19281
|
async sendStdoutToClient(e, r) {
|
|
19260
19282
|
try {
|
|
19261
|
-
const i =
|
|
19283
|
+
const i = Vn(e, r);
|
|
19262
19284
|
await this.multiplexClient.publish(i);
|
|
19263
19285
|
} catch (i) {
|
|
19264
19286
|
this.logger.debug(`Failed to send stdout message: ${i}`);
|
|
@@ -19268,7 +19290,7 @@ class nA {
|
|
|
19268
19290
|
* Send a complete message via RPC
|
|
19269
19291
|
*/
|
|
19270
19292
|
async sendMessage(e, r, i) {
|
|
19271
|
-
const { createSendMessage: n } = await Promise.resolve().then(() =>
|
|
19293
|
+
const { createSendMessage: n } = await Promise.resolve().then(() => Xi);
|
|
19272
19294
|
try {
|
|
19273
19295
|
const o = n(e, {
|
|
19274
19296
|
sessionId: e,
|
|
@@ -19579,7 +19601,7 @@ Return your response as JSON with the schema provided.`;
|
|
|
19579
19601
|
* Create task comment with MR link
|
|
19580
19602
|
*/
|
|
19581
19603
|
async createTaskComment(e, r) {
|
|
19582
|
-
const { createTaskComment: i } = await Promise.resolve().then(() =>
|
|
19604
|
+
const { createTaskComment: i } = await Promise.resolve().then(() => Xi);
|
|
19583
19605
|
let n = `✅ Merge Request Created
|
|
19584
19606
|
|
|
19585
19607
|
[View PR${r.id ? ` #${r.id}` : ""}](${r.url})`;
|
|
@@ -19596,7 +19618,7 @@ var iA = Object.getOwnPropertyDescriptor, oA = (t, e, r, i) => {
|
|
|
19596
19618
|
(s = t[o]) && (n = s(n) || n);
|
|
19597
19619
|
return n;
|
|
19598
19620
|
}, sA = (t, e) => (r, i) => e(r, i, t);
|
|
19599
|
-
let
|
|
19621
|
+
let Qi = class {
|
|
19600
19622
|
// Cache push capability check
|
|
19601
19623
|
constructor(t, e) {
|
|
19602
19624
|
if (this.logger = e, this.originalRepositoryPath = vn(t), this.repositoryPath = this.originalRepositoryPath, !this.isGitRepository())
|
|
@@ -19677,7 +19699,7 @@ let Xi = class {
|
|
|
19677
19699
|
branch: s || "detached",
|
|
19678
19700
|
commit: a,
|
|
19679
19701
|
isActive: o === this.repositoryPath,
|
|
19680
|
-
name:
|
|
19702
|
+
name: Bo(o)
|
|
19681
19703
|
});
|
|
19682
19704
|
}
|
|
19683
19705
|
return e;
|
|
@@ -19689,7 +19711,7 @@ let Xi = class {
|
|
|
19689
19711
|
* Create a new worktree
|
|
19690
19712
|
*/
|
|
19691
19713
|
async createWorktree(t) {
|
|
19692
|
-
const { branch: e, worktreeName: r } = t, i = this.repositoryPath, n =
|
|
19714
|
+
const { branch: e, worktreeName: r } = t, i = this.repositoryPath, n = Bo(i), o = e || this.generateUniqueBranchName(), s = this.sanitizeBranchName(o), a = `${n}-worktrees`, u = r || s, c = _t(this.repositoryPath, ".."), l = _t(c, a), m = _t(l, u);
|
|
19693
19715
|
At(l) || await (await import("fs/promises")).mkdir(l, { recursive: !0 });
|
|
19694
19716
|
try {
|
|
19695
19717
|
this.execGit("worktree prune");
|
|
@@ -19839,7 +19861,7 @@ let Xi = class {
|
|
|
19839
19861
|
branch: r || "detached",
|
|
19840
19862
|
commit: e,
|
|
19841
19863
|
isActive: !0,
|
|
19842
|
-
name:
|
|
19864
|
+
name: Bo(t)
|
|
19843
19865
|
};
|
|
19844
19866
|
return this.logger.info(`Switched to worktree: ${t} (${r})`), i;
|
|
19845
19867
|
} catch (e) {
|
|
@@ -19857,7 +19879,7 @@ let Xi = class {
|
|
|
19857
19879
|
branch: r || "detached",
|
|
19858
19880
|
commit: e,
|
|
19859
19881
|
isActive: !1,
|
|
19860
|
-
name:
|
|
19882
|
+
name: Bo(t)
|
|
19861
19883
|
};
|
|
19862
19884
|
} catch {
|
|
19863
19885
|
return null;
|
|
@@ -20101,10 +20123,10 @@ let Xi = class {
|
|
|
20101
20123
|
this.execGit(`branch ${r} ${t}`);
|
|
20102
20124
|
}
|
|
20103
20125
|
};
|
|
20104
|
-
|
|
20126
|
+
Qi = oA([
|
|
20105
20127
|
xe(),
|
|
20106
20128
|
sA(1, H(F.Logger))
|
|
20107
|
-
],
|
|
20129
|
+
], Qi);
|
|
20108
20130
|
class aA {
|
|
20109
20131
|
constructor(e) {
|
|
20110
20132
|
this.logger = e;
|
|
@@ -20123,7 +20145,7 @@ class aA {
|
|
|
20123
20145
|
async before(e) {
|
|
20124
20146
|
const r = e.workingDir || process.cwd();
|
|
20125
20147
|
try {
|
|
20126
|
-
this.gitWorktreeService = new
|
|
20148
|
+
this.gitWorktreeService = new Qi(r, this.logger);
|
|
20127
20149
|
} catch (i) {
|
|
20128
20150
|
this.logger.debug(`Git worktree service not available for cleanup: ${i}`);
|
|
20129
20151
|
}
|
|
@@ -20141,7 +20163,7 @@ class aA {
|
|
|
20141
20163
|
if (!this.gitWorktreeService)
|
|
20142
20164
|
try {
|
|
20143
20165
|
const i = r.path.replace(/\/\.worktrees\/[^/]+$/, "");
|
|
20144
|
-
this.gitWorktreeService = new
|
|
20166
|
+
this.gitWorktreeService = new Qi(i, this.logger);
|
|
20145
20167
|
} catch (i) {
|
|
20146
20168
|
this.logger.warn(`Cannot initialize GitWorktreeService for cleanup: ${i}`);
|
|
20147
20169
|
return;
|
|
@@ -20196,7 +20218,7 @@ class lA {
|
|
|
20196
20218
|
*/
|
|
20197
20219
|
async sendStdoutToClient(e, r) {
|
|
20198
20220
|
try {
|
|
20199
|
-
const i =
|
|
20221
|
+
const i = Vn(e, r);
|
|
20200
20222
|
await this.multiplexClient.publish(i);
|
|
20201
20223
|
} catch (i) {
|
|
20202
20224
|
this.logger.debug(`Failed to send stdout message: ${i}`);
|
|
@@ -20281,7 +20303,7 @@ Important:
|
|
|
20281
20303
|
return;
|
|
20282
20304
|
const i = e.workingDir || process.cwd();
|
|
20283
20305
|
try {
|
|
20284
|
-
this.gitWorktreeService = new
|
|
20306
|
+
this.gitWorktreeService = new Qi(i, this.logger), this.logger.info(`[WorktreeMiddleware.before] gitWorktreeService initialized: ${!!this.gitWorktreeService}`);
|
|
20285
20307
|
} catch (l) {
|
|
20286
20308
|
this.logger.debug(`Git worktree service not available - not in a git repository: ${l}`);
|
|
20287
20309
|
return;
|
|
@@ -20628,7 +20650,7 @@ let Nc = class {
|
|
|
20628
20650
|
const t = this.agentConfigService.getStoredAgentSessionId();
|
|
20629
20651
|
if (t)
|
|
20630
20652
|
try {
|
|
20631
|
-
const { createGetAgentStatus: e } = await Promise.resolve().then(() => GA), { createSendAgentStatus: r } = await Promise.resolve().then(() => zT), { AGENT_STATUS: i } = await import("./index-
|
|
20653
|
+
const { createGetAgentStatus: e } = await Promise.resolve().then(() => GA), { createSendAgentStatus: r } = await Promise.resolve().then(() => zT), { AGENT_STATUS: i } = await import("./index-CnxYuVgu.mjs"), n = e(t, t), a = (await this.multiplexClient.request(n))?.payload?.result || i.IDLE;
|
|
20632
20654
|
await this.multiplexClient.publish(
|
|
20633
20655
|
r(t, {
|
|
20634
20656
|
agentType: this.agentConfigService.getAgentType() ?? void 0,
|
|
@@ -20680,13 +20702,13 @@ let Nc = class {
|
|
|
20680
20702
|
}
|
|
20681
20703
|
this.exitListeners = [];
|
|
20682
20704
|
const r = this.agentConfigService.getStoredAgentSessionId();
|
|
20683
|
-
r && this.store.dispatch(
|
|
20705
|
+
r && this.store.dispatch(Gn(r));
|
|
20684
20706
|
}
|
|
20685
20707
|
/**
|
|
20686
20708
|
* Create middleware context for worker-level middleware
|
|
20687
20709
|
*/
|
|
20688
20710
|
createMiddlewareContext(t, e, r) {
|
|
20689
|
-
const i =
|
|
20711
|
+
const i = gi(t);
|
|
20690
20712
|
return {
|
|
20691
20713
|
request: {
|
|
20692
20714
|
eventType: "daemon-start-agent",
|
|
@@ -20752,7 +20774,7 @@ let Nc = class {
|
|
|
20752
20774
|
this.logger.error("Error in exit listener:", h);
|
|
20753
20775
|
}
|
|
20754
20776
|
const l = this.agentConfigService.getStoredAgentSessionId();
|
|
20755
|
-
l && this.store.dispatch(
|
|
20777
|
+
l && this.store.dispatch(Gn(l));
|
|
20756
20778
|
}), t.workingDir !== this.agentConfigService.getWorkingDirectory() && (this.agentConfigService.setWorkingDirectory(t.workingDir), this.store.dispatch(xI({ id: i, workingDir: t.workingDir })), t.request.payload.agentConfig && (t.request.payload.agentConfig = {
|
|
20757
20779
|
...t.request.payload.agentConfig,
|
|
20758
20780
|
workingDirectory: t.workingDir
|
|
@@ -21050,7 +21072,7 @@ let Bc = class {
|
|
|
21050
21072
|
workingDirectory: t.workingDirectory,
|
|
21051
21073
|
docker: t.docker,
|
|
21052
21074
|
configJson: t.configJson
|
|
21053
|
-
}), i =
|
|
21075
|
+
}), i = gi(t.agentType);
|
|
21054
21076
|
this.initializeAgentSession(i, e, r);
|
|
21055
21077
|
}
|
|
21056
21078
|
/**
|
|
@@ -21142,7 +21164,7 @@ let Bc = class {
|
|
|
21142
21164
|
* @deprecated Use normalizeAgentType from @cli/utils instead
|
|
21143
21165
|
*/
|
|
21144
21166
|
normalizeAgentType(t) {
|
|
21145
|
-
return
|
|
21167
|
+
return gi(t);
|
|
21146
21168
|
}
|
|
21147
21169
|
/**
|
|
21148
21170
|
* Validate if agent type is supported
|
|
@@ -21215,7 +21237,7 @@ Bc = hA([
|
|
|
21215
21237
|
], Bc);
|
|
21216
21238
|
const Kf = Na(
|
|
21217
21239
|
() => er([
|
|
21218
|
-
|
|
21240
|
+
Ei(),
|
|
21219
21241
|
M(),
|
|
21220
21242
|
Me(),
|
|
21221
21243
|
or(),
|
|
@@ -21487,7 +21509,7 @@ let Uc = class {
|
|
|
21487
21509
|
* Send batch of agent messages
|
|
21488
21510
|
*/
|
|
21489
21511
|
async sendMessageBatch(t, e) {
|
|
21490
|
-
const r = await this.getAuthHeaders(), i = await this.context.getOrganizationId();
|
|
21512
|
+
const r = await this.getAuthHeaders(t), i = await this.context.getOrganizationId(t);
|
|
21491
21513
|
if (!i)
|
|
21492
21514
|
throw new Error("Organization ID is required for sending agent messages");
|
|
21493
21515
|
const n = (e || []).map((o) => Zf(o));
|
|
@@ -21513,7 +21535,7 @@ let Uc = class {
|
|
|
21513
21535
|
* Get a single message by ID
|
|
21514
21536
|
*/
|
|
21515
21537
|
async getMessage(t, e) {
|
|
21516
|
-
const r = await this.getAuthHeaders(), i = await this.context.getOrganizationId();
|
|
21538
|
+
const r = await this.getAuthHeaders(t), i = await this.context.getOrganizationId(t);
|
|
21517
21539
|
if (!i)
|
|
21518
21540
|
throw new Error("Organization ID is required for fetching agent message");
|
|
21519
21541
|
try {
|
|
@@ -21537,7 +21559,7 @@ let Uc = class {
|
|
|
21537
21559
|
* Get messages for a specific session
|
|
21538
21560
|
*/
|
|
21539
21561
|
async getSessionMessages(t, e) {
|
|
21540
|
-
const r = await this.getAuthHeaders(), i = await this.context.getOrganizationId();
|
|
21562
|
+
const r = await this.getAuthHeaders(t), i = await this.context.getOrganizationId(t);
|
|
21541
21563
|
if (!i)
|
|
21542
21564
|
throw new Error("Organization ID is required for fetching agent messages");
|
|
21543
21565
|
const n = new URLSearchParams();
|
|
@@ -21561,7 +21583,7 @@ let Uc = class {
|
|
|
21561
21583
|
* Upload content to R2 and create message record
|
|
21562
21584
|
*/
|
|
21563
21585
|
async uploadMessageContent(t, e, r, i) {
|
|
21564
|
-
const n = await this.getAuthHeaders(), o = await this.context.getOrganizationId();
|
|
21586
|
+
const n = await this.getAuthHeaders(t), o = await this.context.getOrganizationId(t);
|
|
21565
21587
|
if (!o)
|
|
21566
21588
|
throw new Error("Organization ID is required for uploading message content");
|
|
21567
21589
|
const s = typeof r == "string" ? Buffer.from(r, "utf-8") : r, a = s.length;
|
|
@@ -21607,7 +21629,7 @@ let Uc = class {
|
|
|
21607
21629
|
* Start a new message (creates empty message and returns ID)
|
|
21608
21630
|
*/
|
|
21609
21631
|
async startMessage(t, e) {
|
|
21610
|
-
const r = await this.getAuthHeaders(), i = await this.context.getOrganizationId();
|
|
21632
|
+
const r = await this.getAuthHeaders(t), i = await this.context.getOrganizationId(t);
|
|
21611
21633
|
if (!i)
|
|
21612
21634
|
throw new Error("Organization ID is required for starting agent messages");
|
|
21613
21635
|
try {
|
|
@@ -21639,7 +21661,7 @@ let Uc = class {
|
|
|
21639
21661
|
* Update an existing message (typically used to finalize content)
|
|
21640
21662
|
*/
|
|
21641
21663
|
async updateMessage(t, e, r) {
|
|
21642
|
-
const i = await this.getAuthHeaders(), n = await this.context.getOrganizationId();
|
|
21664
|
+
const i = await this.getAuthHeaders(t), n = await this.context.getOrganizationId(t);
|
|
21643
21665
|
if (!n)
|
|
21644
21666
|
throw new Error("Organization ID is required for updating agent messages");
|
|
21645
21667
|
try {
|
|
@@ -21677,7 +21699,7 @@ let Uc = class {
|
|
|
21677
21699
|
* Request approval for a tool call by adding user input
|
|
21678
21700
|
*/
|
|
21679
21701
|
async requestApproval(t, e) {
|
|
21680
|
-
const r = await this.getAuthHeaders(), i = await this.context.getOrganizationId();
|
|
21702
|
+
const r = await this.getAuthHeaders(t), i = await this.context.getOrganizationId(t);
|
|
21681
21703
|
if (!i)
|
|
21682
21704
|
throw new Error("Organization ID is required for requesting approval");
|
|
21683
21705
|
try {
|
|
@@ -21709,7 +21731,7 @@ let Uc = class {
|
|
|
21709
21731
|
* Delete all messages for a session (cleanup)
|
|
21710
21732
|
*/
|
|
21711
21733
|
async deleteSessionMessages(t) {
|
|
21712
|
-
const e = await this.getAuthHeaders(), r = await this.context.getOrganizationId();
|
|
21734
|
+
const e = await this.getAuthHeaders(t), r = await this.context.getOrganizationId(t);
|
|
21713
21735
|
if (!r)
|
|
21714
21736
|
throw new Error("Organization ID is required for deleting session messages");
|
|
21715
21737
|
this.logger.info(`=� Deleting all messages for session ${t}...`);
|
|
@@ -21761,7 +21783,7 @@ let Uc = class {
|
|
|
21761
21783
|
* Update tool approval status for a specific message
|
|
21762
21784
|
*/
|
|
21763
21785
|
async updateToolApproval(t, e, r, i, n) {
|
|
21764
|
-
const o = await this.getAuthHeaders(), s = await this.context.getOrganizationId();
|
|
21786
|
+
const o = await this.getAuthHeaders(t), s = await this.context.getOrganizationId(t);
|
|
21765
21787
|
if (!s)
|
|
21766
21788
|
throw new Error("Organization ID is required for updating tool approval");
|
|
21767
21789
|
try {
|
|
@@ -21790,7 +21812,7 @@ let Uc = class {
|
|
|
21790
21812
|
* Send tool approval notification to check for pending approvals
|
|
21791
21813
|
*/
|
|
21792
21814
|
async sendToolApprovalNotification(t, e, r, i) {
|
|
21793
|
-
const n = await this.getAuthHeaders(), o = await this.context.getOrganizationId();
|
|
21815
|
+
const n = await this.getAuthHeaders(t), o = await this.context.getOrganizationId(t);
|
|
21794
21816
|
if (!o)
|
|
21795
21817
|
throw new Error("Organization ID is required for sending tool approval notification");
|
|
21796
21818
|
try {
|
|
@@ -21820,7 +21842,7 @@ let Uc = class {
|
|
|
21820
21842
|
* API will find the message containing the tool and update it
|
|
21821
21843
|
*/
|
|
21822
21844
|
async updateToolResult(t, e, r, i) {
|
|
21823
|
-
const n = await this.getAuthHeaders(), o = await this.context.getOrganizationId();
|
|
21845
|
+
const n = await this.getAuthHeaders(t), o = await this.context.getOrganizationId(t);
|
|
21824
21846
|
if (!o)
|
|
21825
21847
|
throw new Error("Organization ID is required for updating tool result");
|
|
21826
21848
|
try {
|
|
@@ -21850,7 +21872,7 @@ let Uc = class {
|
|
|
21850
21872
|
* This allows frontend to deterministically enable chat input
|
|
21851
21873
|
*/
|
|
21852
21874
|
async sendAgentSessionReady(t) {
|
|
21853
|
-
const e = await this.getAuthHeaders(), r = await this.context.getOrganizationId();
|
|
21875
|
+
const e = await this.getAuthHeaders(t), r = await this.context.getOrganizationId(t);
|
|
21854
21876
|
if (!r)
|
|
21855
21877
|
throw new Error("Organization ID is required for sending agent session ready status");
|
|
21856
21878
|
try {
|
|
@@ -21904,7 +21926,7 @@ let Uc = class {
|
|
|
21904
21926
|
* This is used to inform the backend when a tool is automatically approved
|
|
21905
21927
|
*/
|
|
21906
21928
|
async notifyAutoApproval(t, e) {
|
|
21907
|
-
const r = await this.getAuthHeaders(), i = await this.context.getOrganizationId();
|
|
21929
|
+
const r = await this.getAuthHeaders(t), i = await this.context.getOrganizationId(t);
|
|
21908
21930
|
if (!i)
|
|
21909
21931
|
throw new Error("Organization ID is required for notifying auto-approval");
|
|
21910
21932
|
try {
|
|
@@ -21930,7 +21952,7 @@ let Uc = class {
|
|
|
21930
21952
|
* This allows the frontend to show appropriate UI prompts
|
|
21931
21953
|
*/
|
|
21932
21954
|
async sendIdlePromptNotification(t, e) {
|
|
21933
|
-
const r = await this.getAuthHeaders(), i = await this.context.getOrganizationId();
|
|
21955
|
+
const r = await this.getAuthHeaders(t), i = await this.context.getOrganizationId(t);
|
|
21934
21956
|
if (!i)
|
|
21935
21957
|
throw new Error("Organization ID is required for sending idle prompt notification");
|
|
21936
21958
|
try {
|
|
@@ -21963,7 +21985,7 @@ var MA = Object.getOwnPropertyDescriptor, LA = (t, e, r, i) => {
|
|
|
21963
21985
|
for (var n = i > 1 ? void 0 : i ? MA(e, r) : e, o = t.length - 1, s; o >= 0; o--)
|
|
21964
21986
|
(s = t[o]) && (n = s(n) || n);
|
|
21965
21987
|
return n;
|
|
21966
|
-
},
|
|
21988
|
+
}, Di = (t, e) => (r, i) => e(r, i, t);
|
|
21967
21989
|
let Mc = class {
|
|
21968
21990
|
constructor(t, e, r, i, n) {
|
|
21969
21991
|
this.httpService = t, this.agentConfig = e, this.subEnvManager = r, this.context = i, this.logger = n;
|
|
@@ -22210,11 +22232,11 @@ let Mc = class {
|
|
|
22210
22232
|
};
|
|
22211
22233
|
Mc = LA([
|
|
22212
22234
|
xe(),
|
|
22213
|
-
|
|
22214
|
-
|
|
22215
|
-
|
|
22216
|
-
|
|
22217
|
-
|
|
22235
|
+
Di(0, H(Ce.AgentHttpService)),
|
|
22236
|
+
Di(1, H(Ce.AgentConfigService)),
|
|
22237
|
+
Di(2, H(F.SubEnvManager)),
|
|
22238
|
+
Di(3, H(F.ContextService)),
|
|
22239
|
+
Di(4, H(F.Logger))
|
|
22218
22240
|
], Mc);
|
|
22219
22241
|
function zA() {
|
|
22220
22242
|
return new Jr((t) => {
|
|
@@ -22226,7 +22248,7 @@ function FA({ onlyFirst: t = !1 } = {}) {
|
|
|
22226
22248
|
return new RegExp(n, t ? void 0 : "g");
|
|
22227
22249
|
}
|
|
22228
22250
|
const jA = FA();
|
|
22229
|
-
function
|
|
22251
|
+
function mi(t) {
|
|
22230
22252
|
if (typeof t != "string")
|
|
22231
22253
|
throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);
|
|
22232
22254
|
return t.replace(jA, "");
|
|
@@ -22502,7 +22524,7 @@ let ws = class {
|
|
|
22502
22524
|
⏳ Agent stopping in ${i} seconds...\r
|
|
22503
22525
|
`;
|
|
22504
22526
|
try {
|
|
22505
|
-
const o =
|
|
22527
|
+
const o = Vn(r, n);
|
|
22506
22528
|
await this.multiplexClient.publish(o);
|
|
22507
22529
|
} catch (o) {
|
|
22508
22530
|
this.logger.warn("Failed to send stop notification to CLI", o);
|
|
@@ -22557,7 +22579,7 @@ let ws = class {
|
|
|
22557
22579
|
*/
|
|
22558
22580
|
async sendStdoutMessage(t) {
|
|
22559
22581
|
const e = this.getAgentSessionId() || "";
|
|
22560
|
-
await this.multiplexClient.publish(
|
|
22582
|
+
await this.multiplexClient.publish(Vn(e, t));
|
|
22561
22583
|
}
|
|
22562
22584
|
/**
|
|
22563
22585
|
* Flush the stdout buffer via multiplex client
|
|
@@ -22661,7 +22683,7 @@ let ws = class {
|
|
|
22661
22683
|
* Middleware layers wrap around this with setup (BEFORE) and cleanup (AFTER)
|
|
22662
22684
|
*/
|
|
22663
22685
|
async launchPty(t) {
|
|
22664
|
-
const { AGENT_STATUS: e } = await import("./index-
|
|
22686
|
+
const { AGENT_STATUS: e } = await import("./index-CnxYuVgu.mjs"), r = t.metadata.agentCommand, i = t.metadata.agentArgs;
|
|
22665
22687
|
if (!r)
|
|
22666
22688
|
throw new Error("launchPty requires metadata.agentCommand to be set by middleware");
|
|
22667
22689
|
const n = await this.getAgentEnvironmentVariablesForContext(t);
|
|
@@ -22712,7 +22734,7 @@ ${f}`);
|
|
|
22712
22734
|
*/
|
|
22713
22735
|
async fetchProfileEnvironment(t, e) {
|
|
22714
22736
|
try {
|
|
22715
|
-
const { createFetchProfileEnvironment: r } = await Promise.resolve().then(() =>
|
|
22737
|
+
const { createFetchProfileEnvironment: r } = await Promise.resolve().then(() => Xi), i = r(t, e), o = (await this.multiplexClient.request(i))?.payload?.result || {};
|
|
22716
22738
|
return this.logger.info(
|
|
22717
22739
|
`✅ Fetched ${Object.keys(o).length} environment variables from profile ${e}`
|
|
22718
22740
|
), o;
|
|
@@ -22747,7 +22769,7 @@ ${f}`);
|
|
|
22747
22769
|
* Create middleware context from request
|
|
22748
22770
|
*/
|
|
22749
22771
|
createMiddlewareContext(t, e) {
|
|
22750
|
-
const { payload: r } = t, i = r.agentSessionId, n =
|
|
22772
|
+
const { payload: r } = t, i = r.agentSessionId, n = gi(r.agentType), o = r.agentConfig?.workingDirectory ? e.getAbsolutePath(r.agentConfig.workingDirectory) : process.cwd();
|
|
22751
22773
|
return {
|
|
22752
22774
|
request: t,
|
|
22753
22775
|
agentSessionId: i,
|
|
@@ -23223,7 +23245,7 @@ class WA {
|
|
|
23223
23245
|
}
|
|
23224
23246
|
name = "BuildClaudeArgs";
|
|
23225
23247
|
async before(e) {
|
|
23226
|
-
const r = this.request.payload?.agentConfig?.conversationSessionId, i = this.request.payload?.agentConfig?.args || [], n = e.metadata.agentArgs || [], o = new
|
|
23248
|
+
const r = this.request.payload?.agentConfig?.conversationSessionId, i = this.request.payload?.agentConfig?.args || [], n = e.metadata.agentArgs || [], o = new Co().addArgs(i).addOptionIfDefined("--session-id", r).build(), s = [...this.initialArgs, ...n, ...o];
|
|
23227
23249
|
e.metadata.agentCommand = this.claudePath, e.metadata.agentArgs = s;
|
|
23228
23250
|
}
|
|
23229
23251
|
async after(e) {
|
|
@@ -23235,7 +23257,7 @@ class ZA {
|
|
|
23235
23257
|
}
|
|
23236
23258
|
name = "BuildGeminiArgs";
|
|
23237
23259
|
async before(e) {
|
|
23238
|
-
const r = this.request.payload?.agentConfig?.conversationSessionId, i = this.request.payload?.agentConfig?.args || [], n = new
|
|
23260
|
+
const r = this.request.payload?.agentConfig?.conversationSessionId, i = this.request.payload?.agentConfig?.args || [], n = new Co().addArgs(i).addOptionIfDefined("--session-id", r).build();
|
|
23239
23261
|
e.metadata.agentCommand = "gemini", e.metadata.agentArgs = n;
|
|
23240
23262
|
}
|
|
23241
23263
|
async after(e) {
|
|
@@ -23352,7 +23374,7 @@ var JA = Object.getOwnPropertyDescriptor, YA = (t, e, r, i) => {
|
|
|
23352
23374
|
return n;
|
|
23353
23375
|
}, XA = (t, e) => (r, i) => e(r, i, t);
|
|
23354
23376
|
function QA(t) {
|
|
23355
|
-
return t.startsWith("~/") ? _t(
|
|
23377
|
+
return t.startsWith("~/") ? _t(Un(), t.slice(2)) : t === "~" ? Un() : t;
|
|
23356
23378
|
}
|
|
23357
23379
|
let Lc = class {
|
|
23358
23380
|
constructor(t, e) {
|
|
@@ -23722,7 +23744,7 @@ ${n.error}`, c = Ba(e, r, {
|
|
|
23722
23744
|
async sendOutputToClient(e, r) {
|
|
23723
23745
|
if (!e || !this.multiplexClient.isConnected())
|
|
23724
23746
|
return;
|
|
23725
|
-
const i =
|
|
23747
|
+
const i = Vn(e, r);
|
|
23726
23748
|
await this.multiplexClient.publish(i);
|
|
23727
23749
|
}
|
|
23728
23750
|
}
|
|
@@ -23810,7 +23832,7 @@ class r$ extends Ob {
|
|
|
23810
23832
|
async handlePtyData(e, r) {
|
|
23811
23833
|
if (this.bypassPermissionsHandled)
|
|
23812
23834
|
return;
|
|
23813
|
-
const i =
|
|
23835
|
+
const i = mi(e);
|
|
23814
23836
|
i.includes("Bypass Permissions mode") && i.includes("Yes, I accept") && i.includes("No, exit") && (this.logger.info("Detected Bypass Permissions prompt, auto-accepting..."), this.bypassPermissionsHandled = !0, await new Promise((o) => setTimeout(o, 100)), this.ptyRunner.sendInput("2"), await new Promise((o) => setTimeout(o, 50)), this.ptyRunner.sendInput("\r"), this.logger.info("Bypass Permissions prompt accepted"));
|
|
23815
23837
|
}
|
|
23816
23838
|
}
|
|
@@ -23841,7 +23863,7 @@ class n$ extends Ob {
|
|
|
23841
23863
|
*/
|
|
23842
23864
|
processDataForOptions(e, r) {
|
|
23843
23865
|
this.optionBuffer += e;
|
|
23844
|
-
const i =
|
|
23866
|
+
const i = mi(e);
|
|
23845
23867
|
(/Do you want to proceed\?/m.test(i) || /●\s*\d+\.\s+/.test(i) || /\n\s{0,4}\d+\.\s+[^\n]+/.test(i)) && !this.isCollectingOptions && this.startOptionCollection(r);
|
|
23846
23868
|
}
|
|
23847
23869
|
/**
|
|
@@ -23856,7 +23878,7 @@ class n$ extends Ob {
|
|
|
23856
23878
|
* After timeout, extract and send detected options
|
|
23857
23879
|
*/
|
|
23858
23880
|
async processCollectedOptions(e) {
|
|
23859
|
-
const r =
|
|
23881
|
+
const r = mi(this.optionBuffer), i = this.extractOptions(r);
|
|
23860
23882
|
i.length && await this.handleDetectedOptions(i, e), this.resetOptionState();
|
|
23861
23883
|
}
|
|
23862
23884
|
/**
|
|
@@ -23890,7 +23912,7 @@ class n$ extends Ob {
|
|
|
23890
23912
|
if (!e.length) return;
|
|
23891
23913
|
const i = (/* @__PURE__ */ new Date()).toISOString();
|
|
23892
23914
|
try {
|
|
23893
|
-
const { createSelectComponent: n, createToolInvocationInput: o } = await import("./index-
|
|
23915
|
+
const { createSelectComponent: n, createToolInvocationInput: o } = await import("./index-s06HhsTh.mjs"), { createRequestApproval: s } = await Promise.resolve().then(() => Xi), a = e.map((m) => ({ label: m.text, value: m.number, selected: !!m.selected })), u = n(a), c = o(!1, u), l = s(r.agentSessionId, {
|
|
23894
23916
|
toolName: "selectOption",
|
|
23895
23917
|
toolArgs: { timestamp: i, options: a },
|
|
23896
23918
|
input: c
|
|
@@ -23971,7 +23993,7 @@ class Nb {
|
|
|
23971
23993
|
* Remove ANSI escape codes using strip-ansi package
|
|
23972
23994
|
*/
|
|
23973
23995
|
cleanAnsi(e) {
|
|
23974
|
-
return
|
|
23996
|
+
return mi(e);
|
|
23975
23997
|
}
|
|
23976
23998
|
}
|
|
23977
23999
|
class i$ extends Nb {
|
|
@@ -24244,7 +24266,7 @@ let Cs = class extends ws {
|
|
|
24244
24266
|
* Complex inputs include: prompts, menus, selection dialogs, etc.
|
|
24245
24267
|
*/
|
|
24246
24268
|
detectComplexInputPattern(t) {
|
|
24247
|
-
const e =
|
|
24269
|
+
const e = mi(t);
|
|
24248
24270
|
return [
|
|
24249
24271
|
/select|choose|pick/i,
|
|
24250
24272
|
// Selection prompts
|
|
@@ -24278,7 +24300,7 @@ let Cs = class extends ws {
|
|
|
24278
24300
|
*/
|
|
24279
24301
|
verifyAgentReady(t) {
|
|
24280
24302
|
if (this.detectComplexInputPattern(t) && !this.complexInputDetected && (this.complexInputDetected = !0, this.logger.debug("Complex input pattern detected in Claude Code output")), this.agentInputReady) return;
|
|
24281
|
-
const r =
|
|
24303
|
+
const r = mi(t);
|
|
24282
24304
|
if ([
|
|
24283
24305
|
/Type (your )?(message|prompt)/i,
|
|
24284
24306
|
/Enter (your )?(message|prompt)/i,
|
|
@@ -24493,7 +24515,7 @@ let Is = class extends ws {
|
|
|
24493
24515
|
const t = this.agentConfig.getStoredAgentSessionId() || this.agentConfig.getAgentSessionId();
|
|
24494
24516
|
if (t)
|
|
24495
24517
|
try {
|
|
24496
|
-
const { createSessionReadyRequest: e } = await Promise.resolve().then(() =>
|
|
24518
|
+
const { createSessionReadyRequest: e } = await Promise.resolve().then(() => Xi), r = e(t);
|
|
24497
24519
|
await this.multiplexClient.request(r), this.logger.info("Session ready status sent to backend");
|
|
24498
24520
|
} catch (e) {
|
|
24499
24521
|
this.logger.warn("Failed to send session ready status", e);
|
|
@@ -24711,7 +24733,7 @@ var d$ = Object.getOwnPropertyDescriptor, f$ = (t, e, r, i) => {
|
|
|
24711
24733
|
for (var n = i > 1 ? void 0 : i ? d$(e, r) : e, o = t.length - 1, s; o >= 0; o--)
|
|
24712
24734
|
(s = t[o]) && (n = s(n) || n);
|
|
24713
24735
|
return n;
|
|
24714
|
-
},
|
|
24736
|
+
}, Rn = (t, e) => (r, i) => e(r, i, t);
|
|
24715
24737
|
let As = class {
|
|
24716
24738
|
constructor(t, e, r, i, n, o, s) {
|
|
24717
24739
|
this.logger = t, this.credentialsService = e, this.configManager = r, this.contextService = i, this.subEnvManager = n, this.store = o, this.proxyService = s, this.serverUrl = this.configManager.getServerUrl(), this.apiKey = void 0, this.verbose = !1, this.organizationId = void 0, this.dockerImage = this.configManager.getAppConfig().VITE_AGENT_CLI_DOCKER_IMAGE || "agiflowai/agent-cli:latest", this.agentType = "", this.dockerRunner = new Ts(this.logger, this.subEnvManager);
|
|
@@ -24846,13 +24868,13 @@ let As = class {
|
|
|
24846
24868
|
};
|
|
24847
24869
|
As = f$([
|
|
24848
24870
|
xe(),
|
|
24849
|
-
|
|
24850
|
-
|
|
24851
|
-
|
|
24852
|
-
|
|
24853
|
-
|
|
24854
|
-
|
|
24855
|
-
|
|
24871
|
+
Rn(0, H(F.Logger)),
|
|
24872
|
+
Rn(1, H(F.CredentialsService)),
|
|
24873
|
+
Rn(2, H(F.ConfigManager)),
|
|
24874
|
+
Rn(3, H(F.ContextService)),
|
|
24875
|
+
Rn(4, H(F.SubEnvManager)),
|
|
24876
|
+
Rn(5, H(F.Store)),
|
|
24877
|
+
Rn(6, H(Re.MitmProxyService))
|
|
24856
24878
|
], As);
|
|
24857
24879
|
var h$ = Object.getOwnPropertyDescriptor, g$ = (t, e, r, i) => {
|
|
24858
24880
|
for (var n = i > 1 ? void 0 : i ? h$(e, r) : e, o = t.length - 1, s; o >= 0; o--)
|
|
@@ -24949,7 +24971,7 @@ let $s = class extends As {
|
|
|
24949
24971
|
* Get Claude-specific Docker options
|
|
24950
24972
|
*/
|
|
24951
24973
|
async getDockerOptions(t) {
|
|
24952
|
-
const { payload: e } = t, r = e.agentSessionId, i = e.agentConfig?.workingDirectory ? Qe.getAbsolutePath(e.agentConfig.workingDirectory) : process.cwd(), n =
|
|
24974
|
+
const { payload: e } = t, r = e.agentSessionId, i = e.agentConfig?.workingDirectory ? Qe.getAbsolutePath(e.agentConfig.workingDirectory) : process.cwd(), n = Ji.VITE_INJECT_AGIFLOW_APP_DOCKER_ENDPOINT || this.serverUrl, o = n ? n.replace(/^http/, "ws") : void 0;
|
|
24953
24975
|
let s = null;
|
|
24954
24976
|
e.agentConfig?.mcps && (s = this.processAgentConfig(e.agentConfig.mcps));
|
|
24955
24977
|
const a = e.agentConfig ? this.agentConfigService.createChildAgentConfig(e.agentConfig, {
|
|
@@ -24992,7 +25014,7 @@ let $s = class extends As {
|
|
|
24992
25014
|
additionalEnvVars: l,
|
|
24993
25015
|
// Use proxy-configured environment
|
|
24994
25016
|
additionalVolumes: m,
|
|
24995
|
-
networkMode:
|
|
25017
|
+
networkMode: Ji.VITE_AGENT_CLI_DOCKER_NETWORK,
|
|
24996
25018
|
// Use configured network mode
|
|
24997
25019
|
user: void 0
|
|
24998
25020
|
// Use default user from DockerRunnerService
|
|
@@ -25234,7 +25256,7 @@ let Rs = class extends As {
|
|
|
25234
25256
|
* Get Gemini-specific Docker options
|
|
25235
25257
|
*/
|
|
25236
25258
|
async getDockerOptions(t) {
|
|
25237
|
-
const { payload: e } = t, r = e.agentSessionId, i = e.agentConfig?.workingDirectory ? Qe.getAbsolutePath(e.agentConfig.workingDirectory) : process.cwd(), n =
|
|
25259
|
+
const { payload: e } = t, r = e.agentSessionId, i = e.agentConfig?.workingDirectory ? Qe.getAbsolutePath(e.agentConfig.workingDirectory) : process.cwd(), n = Ji.VITE_INJECT_AGIFLOW_APP_DOCKER_ENDPOINT || this.serverUrl, o = n ? n.replace(/^http/, "ws") : void 0, s = e.agentConfig ? this.agentConfigService.createChildAgentConfig(e.agentConfig, {
|
|
25238
25260
|
workingDirectory: "/workspace"
|
|
25239
25261
|
// Always use container path, not host path
|
|
25240
25262
|
}) : { workingDirectory: "/workspace", docker: !1 }, a = {
|
|
@@ -25267,7 +25289,7 @@ let Rs = class extends As {
|
|
|
25267
25289
|
// Additional Docker-specific options with proxy configuration
|
|
25268
25290
|
additionalEnvVars: u,
|
|
25269
25291
|
additionalVolumes: this.getAdditionalVolumes(),
|
|
25270
|
-
networkMode:
|
|
25292
|
+
networkMode: Ji.VITE_AGENT_CLI_DOCKER_NETWORK,
|
|
25271
25293
|
// Use configured network mode
|
|
25272
25294
|
user: void 0
|
|
25273
25295
|
// Use default user from DockerRunnerService
|
|
@@ -25542,62 +25564,62 @@ function E$(t, e, r, i) {
|
|
|
25542
25564
|
} while (i !== -1);
|
|
25543
25565
|
return o += t.slice(n), o;
|
|
25544
25566
|
}
|
|
25545
|
-
const { stdout: rh, stderr: nh } = k$, zc = Symbol("GENERATOR"),
|
|
25567
|
+
const { stdout: rh, stderr: nh } = k$, zc = Symbol("GENERATOR"), _i = Symbol("STYLER"), eo = Symbol("IS_EMPTY"), ih = [
|
|
25546
25568
|
"ansi",
|
|
25547
25569
|
"ansi",
|
|
25548
25570
|
"ansi256",
|
|
25549
25571
|
"ansi16m"
|
|
25550
|
-
],
|
|
25572
|
+
], vi = /* @__PURE__ */ Object.create(null), w$ = (t, e = {}) => {
|
|
25551
25573
|
if (e.level && !(Number.isInteger(e.level) && e.level >= 0 && e.level <= 3))
|
|
25552
25574
|
throw new Error("The `level` option should be an integer from 0 to 3");
|
|
25553
25575
|
const r = rh ? rh.level : 0;
|
|
25554
25576
|
t.level = e.level === void 0 ? r : e.level;
|
|
25555
25577
|
}, C$ = (t) => {
|
|
25556
25578
|
const e = (...r) => r.join(" ");
|
|
25557
|
-
return w$(e, t), Object.setPrototypeOf(e,
|
|
25579
|
+
return w$(e, t), Object.setPrototypeOf(e, Io.prototype), e;
|
|
25558
25580
|
};
|
|
25559
|
-
function
|
|
25581
|
+
function Io(t) {
|
|
25560
25582
|
return C$(t);
|
|
25561
25583
|
}
|
|
25562
|
-
Object.setPrototypeOf(
|
|
25584
|
+
Object.setPrototypeOf(Io.prototype, Function.prototype);
|
|
25563
25585
|
for (const [t, e] of Object.entries(Hr))
|
|
25564
|
-
|
|
25586
|
+
vi[t] = {
|
|
25565
25587
|
get() {
|
|
25566
|
-
const r = Ps(this, jc(e.open, e.close, this[
|
|
25588
|
+
const r = Ps(this, jc(e.open, e.close, this[_i]), this[eo]);
|
|
25567
25589
|
return Object.defineProperty(this, t, { value: r }), r;
|
|
25568
25590
|
}
|
|
25569
25591
|
};
|
|
25570
|
-
|
|
25592
|
+
vi.visible = {
|
|
25571
25593
|
get() {
|
|
25572
|
-
const t = Ps(this, this[
|
|
25594
|
+
const t = Ps(this, this[_i], !0);
|
|
25573
25595
|
return Object.defineProperty(this, "visible", { value: t }), t;
|
|
25574
25596
|
}
|
|
25575
25597
|
};
|
|
25576
25598
|
const Fc = (t, e, r, ...i) => t === "rgb" ? e === "ansi16m" ? Hr[r].ansi16m(...i) : e === "ansi256" ? Hr[r].ansi256(Hr.rgbToAnsi256(...i)) : Hr[r].ansi(Hr.rgbToAnsi(...i)) : t === "hex" ? Fc("rgb", e, r, ...Hr.hexToRgb(...i)) : Hr[r][t](...i), I$ = ["rgb", "hex", "ansi256"];
|
|
25577
25599
|
for (const t of I$) {
|
|
25578
|
-
|
|
25600
|
+
vi[t] = {
|
|
25579
25601
|
get() {
|
|
25580
25602
|
const { level: r } = this;
|
|
25581
25603
|
return function(...i) {
|
|
25582
|
-
const n = jc(Fc(t, ih[r], "color", ...i), Hr.color.close, this[
|
|
25583
|
-
return Ps(this, n, this[
|
|
25604
|
+
const n = jc(Fc(t, ih[r], "color", ...i), Hr.color.close, this[_i]);
|
|
25605
|
+
return Ps(this, n, this[eo]);
|
|
25584
25606
|
};
|
|
25585
25607
|
}
|
|
25586
25608
|
};
|
|
25587
25609
|
const e = "bg" + t[0].toUpperCase() + t.slice(1);
|
|
25588
|
-
|
|
25610
|
+
vi[e] = {
|
|
25589
25611
|
get() {
|
|
25590
25612
|
const { level: r } = this;
|
|
25591
25613
|
return function(...i) {
|
|
25592
|
-
const n = jc(Fc(t, ih[r], "bgColor", ...i), Hr.bgColor.close, this[
|
|
25593
|
-
return Ps(this, n, this[
|
|
25614
|
+
const n = jc(Fc(t, ih[r], "bgColor", ...i), Hr.bgColor.close, this[_i]);
|
|
25615
|
+
return Ps(this, n, this[eo]);
|
|
25594
25616
|
};
|
|
25595
25617
|
}
|
|
25596
25618
|
};
|
|
25597
25619
|
}
|
|
25598
25620
|
const T$ = Object.defineProperties(() => {
|
|
25599
25621
|
}, {
|
|
25600
|
-
...
|
|
25622
|
+
...vi,
|
|
25601
25623
|
level: {
|
|
25602
25624
|
enumerable: !0,
|
|
25603
25625
|
get() {
|
|
@@ -25618,11 +25640,11 @@ const T$ = Object.defineProperties(() => {
|
|
|
25618
25640
|
};
|
|
25619
25641
|
}, Ps = (t, e, r) => {
|
|
25620
25642
|
const i = (...n) => A$(i, n.length === 1 ? "" + n[0] : n.join(" "));
|
|
25621
|
-
return Object.setPrototypeOf(i, T$), i[zc] = t, i[
|
|
25643
|
+
return Object.setPrototypeOf(i, T$), i[zc] = t, i[_i] = e, i[eo] = r, i;
|
|
25622
25644
|
}, A$ = (t, e) => {
|
|
25623
25645
|
if (t.level <= 0 || !e)
|
|
25624
|
-
return t[
|
|
25625
|
-
let r = t[
|
|
25646
|
+
return t[eo] ? "" : e;
|
|
25647
|
+
let r = t[_i];
|
|
25626
25648
|
if (r === void 0)
|
|
25627
25649
|
return e;
|
|
25628
25650
|
const { openAll: i, closeAll: n } = r;
|
|
@@ -25633,9 +25655,9 @@ const T$ = Object.defineProperties(() => {
|
|
|
25633
25655
|
`);
|
|
25634
25656
|
return o !== -1 && (e = E$(e, n, i, o)), i + e + n;
|
|
25635
25657
|
};
|
|
25636
|
-
Object.defineProperties(
|
|
25637
|
-
const qe =
|
|
25638
|
-
|
|
25658
|
+
Object.defineProperties(Io.prototype, vi);
|
|
25659
|
+
const qe = Io();
|
|
25660
|
+
Io({ level: nh ? nh.level : 0 });
|
|
25639
25661
|
const $$ = {
|
|
25640
25662
|
status: "idle",
|
|
25641
25663
|
daemonId: null,
|
|
@@ -25695,7 +25717,7 @@ const $$ = {
|
|
|
25695
25717
|
e.status = "error", e.error = r.payload || "Failed to terminate daemon";
|
|
25696
25718
|
});
|
|
25697
25719
|
}
|
|
25698
|
-
}), { setDaemonStarting: mO, setDaemonConnected: _O, setDaemonDisconnected: vO, setDaemonError: yO } = Bb.actions, R$ = Bb.reducer,
|
|
25720
|
+
}), { setDaemonStarting: mO, setDaemonConnected: _O, setDaemonDisconnected: vO, setDaemonError: yO } = Bb.actions, R$ = Bb.reducer, to = Fk({
|
|
25699
25721
|
reducer: {
|
|
25700
25722
|
agentTabs: EI,
|
|
25701
25723
|
agentOutput: _I,
|
|
@@ -25724,13 +25746,13 @@ const $$ = {
|
|
|
25724
25746
|
});
|
|
25725
25747
|
});
|
|
25726
25748
|
}, []), e ? /* @__PURE__ */ Ie(Ub.Provider, { value: e, children: t }) : null;
|
|
25727
|
-
},
|
|
25749
|
+
}, wi = () => {
|
|
25728
25750
|
const t = tx(Ub);
|
|
25729
25751
|
if (!t)
|
|
25730
25752
|
throw new Error("useInk must be used within InkProvider");
|
|
25731
25753
|
return t;
|
|
25732
25754
|
}, D$ = [], O$ = ({ agentSessionId: t }) => {
|
|
25733
|
-
const { useStdout: e } =
|
|
25755
|
+
const { useStdout: e } = wi(), { write: r } = e(), i = Mr(
|
|
25734
25756
|
(n) => n.agentOutput[t]?.historicalChunks ?? D$,
|
|
25735
25757
|
Ig
|
|
25736
25758
|
);
|
|
@@ -25741,12 +25763,12 @@ const $$ = {
|
|
|
25741
25763
|
}
|
|
25742
25764
|
}, []), null;
|
|
25743
25765
|
}, N$ = Ag.memo(({ agentSessionId: t }) => {
|
|
25744
|
-
const { useStdout: e } =
|
|
25766
|
+
const { useStdout: e } = wi(), { write: r } = e(), i = Mr((n) => n.agentOutput[t]?.streamingChunk?.data);
|
|
25745
25767
|
return rn(() => {
|
|
25746
25768
|
i && r(i);
|
|
25747
25769
|
}, [i]), null;
|
|
25748
25770
|
}), B$ = () => {
|
|
25749
|
-
const { Text: t } =
|
|
25771
|
+
const { Text: t } = wi(), e = Mr((r) => r.agentTabs.activeTabId);
|
|
25750
25772
|
return e ? /* @__PURE__ */ Zr(Ls, { children: [
|
|
25751
25773
|
/* @__PURE__ */ Ie(O$, { agentSessionId: e }),
|
|
25752
25774
|
/* @__PURE__ */ Ie(N$, { agentSessionId: e }),
|
|
@@ -25764,7 +25786,7 @@ const $$ = {
|
|
|
25764
25786
|
onApproved: t,
|
|
25765
25787
|
onDenied: e
|
|
25766
25788
|
}) => {
|
|
25767
|
-
const { Box: r, Text: i, useInput: n } =
|
|
25789
|
+
const { Box: r, Text: i, useInput: n } = wi(), [o, s] = yn(!0), [a, u] = yn(!1), [c, l] = yn(!1), [m, h] = yn(null);
|
|
25768
25790
|
return rn(() => {
|
|
25769
25791
|
(async () => {
|
|
25770
25792
|
try {
|
|
@@ -25801,7 +25823,7 @@ const $$ = {
|
|
|
25801
25823
|
] }) })
|
|
25802
25824
|
] }) : null;
|
|
25803
25825
|
}, L$ = ({ children: t }) => {
|
|
25804
|
-
const { Box: e, Text: r } =
|
|
25826
|
+
const { Box: e, Text: r } = wi(), [i, n] = yn(!0), [o, s] = yn(!1), [a, u] = yn(!1), c = _e.get(F.Logger);
|
|
25805
25827
|
rn(() => {
|
|
25806
25828
|
(async () => {
|
|
25807
25829
|
try {
|
|
@@ -25830,7 +25852,7 @@ const $$ = {
|
|
|
25830
25852
|
/* @__PURE__ */ Ie(e, { marginTop: 1, children: /* @__PURE__ */ Ie(r, { dimColor: !0, children: "Proceeding in 3 seconds..." }) })
|
|
25831
25853
|
] }) : /* @__PURE__ */ Ie(Ls, { children: t });
|
|
25832
25854
|
}, z$ = Ag.memo(() => {
|
|
25833
|
-
const { Box: t, Text: e } =
|
|
25855
|
+
const { Box: t, Text: e } = wi(), r = Mr((l) => l.agentTabs.activeTabId), i = Mr((l) => l.agentTabs.tabs.find((m) => m.id === r)), n = i?.request?.payload?.agentSessionId, o = i?.request?.payload?.agentType || "unknown", s = i?.label, a = i?.worktreeWorkingDir || i?.request?.payload?.agentConfig?.workingDirectory || "~", u = Mr((l) => {
|
|
25834
25856
|
if (!n) return 0;
|
|
25835
25857
|
const m = l.agentOutput[n];
|
|
25836
25858
|
if (!m) return 0;
|
|
@@ -26074,7 +26096,7 @@ const j$ = ({ tabId: t }) => {
|
|
|
26074
26096
|
/* @__PURE__ */ Ie(B$, {}),
|
|
26075
26097
|
/* @__PURE__ */ Ie(z$, {})
|
|
26076
26098
|
] });
|
|
26077
|
-
}, K$ = () => /* @__PURE__ */ Ie(P$, { children: /* @__PURE__ */ Ie(Qk, { store:
|
|
26099
|
+
}, K$ = () => /* @__PURE__ */ Ie(P$, { children: /* @__PURE__ */ Ie(Qk, { store: to, children: /* @__PURE__ */ Ie(Xk, { client: V$, children: /* @__PURE__ */ Ie(H$, {}) }) }) }), W$ = async () => {
|
|
26078
26100
|
const { render: t } = await import("ink"), e = t(/* @__PURE__ */ Ie(K$, {}));
|
|
26079
26101
|
return {
|
|
26080
26102
|
waitUntilExit: () => e.waitUntilExit(),
|
|
@@ -26117,7 +26139,7 @@ let Gc = class {
|
|
|
26117
26139
|
const v = ["codex", "gpt", "openai", "chatgpt"], k = t.llmProvider.toLowerCase();
|
|
26118
26140
|
v.includes(k) || (console.error(qe.red("✗"), `Invalid LLM provider: ${t.llmProvider}`), console.error(qe.red("✗"), `Allowed providers: ${v.join(", ")}`), process.exit(1));
|
|
26119
26141
|
}
|
|
26120
|
-
const e = t.apiUrl ||
|
|
26142
|
+
const e = t.apiUrl || Ji.VITE_INJECT_AGIFLOW_APP_ENDPOINT;
|
|
26121
26143
|
let r = t.agentSessionId || this.subEnvManager?.sessionId;
|
|
26122
26144
|
if (r || (r = rc()), e)
|
|
26123
26145
|
try {
|
|
@@ -26129,7 +26151,7 @@ let Gc = class {
|
|
|
26129
26151
|
if (t.apiKey && t.organizationId && (_e.get(F.CredentialsService).setSessionCredentials(r, {
|
|
26130
26152
|
apiKey: t.apiKey,
|
|
26131
26153
|
organizationId: t.organizationId
|
|
26132
|
-
}), t.verbose && console.log(qe.blue("ℹ"), `Session credentials stored for agent session: ${r}`)), _e.isBound(F.MessageMultiplexBroker) && _e.unbind(F.MessageMultiplexBroker), _e.bind(F.MessageMultiplexBroker).to(
|
|
26154
|
+
}), t.verbose && console.log(qe.blue("ℹ"), `Session credentials stored for agent session: ${r}`)), _e.isBound(F.MessageMultiplexBroker) && _e.unbind(F.MessageMultiplexBroker), _e.bind(F.MessageMultiplexBroker).to(qn).inSingletonScope(), !_e.isBound(F.MessageMultiplexBrokerConfig)) {
|
|
26133
26155
|
const k = _e.get(F.ConfigManager).getAppConfig().VITE_MULTIPLEX_SOCKET_PATH;
|
|
26134
26156
|
_e.bind(F.MessageMultiplexBrokerConfig).toConstantValue({
|
|
26135
26157
|
wsPort: k ? null : 0,
|
|
@@ -26151,7 +26173,7 @@ let Gc = class {
|
|
|
26151
26173
|
const v = n.getPort();
|
|
26152
26174
|
v && console.log(qe.blue("ℹ"), `Message broker started on ${v}`);
|
|
26153
26175
|
}
|
|
26154
|
-
const s =
|
|
26176
|
+
const s = gi(t.agentType);
|
|
26155
26177
|
let a = {};
|
|
26156
26178
|
if (t.agentConfig)
|
|
26157
26179
|
try {
|
|
@@ -26205,7 +26227,7 @@ let Gc = class {
|
|
|
26205
26227
|
}
|
|
26206
26228
|
})
|
|
26207
26229
|
};
|
|
26208
|
-
|
|
26230
|
+
to.dispatch(_b(l)), to.dispatch(_s(r));
|
|
26209
26231
|
const m = _e.get(Re.MitmProxyService);
|
|
26210
26232
|
if (await m.start(), t.verbose && console.log(qe.blue("ℹ"), `MITM Proxy started on port ${m.getPort()}`), t.headless) {
|
|
26211
26233
|
const v = _e.get(Re.CertManager);
|
|
@@ -26350,7 +26372,7 @@ let qc = class {
|
|
|
26350
26372
|
});
|
|
26351
26373
|
}
|
|
26352
26374
|
async executeDaemon(t) {
|
|
26353
|
-
if (_e.isBound(F.MessageMultiplexBroker) && _e.unbind(F.MessageMultiplexBroker), _e.bind(F.MessageMultiplexBroker).to(
|
|
26375
|
+
if (_e.isBound(F.MessageMultiplexBroker) && _e.unbind(F.MessageMultiplexBroker), _e.bind(F.MessageMultiplexBroker).to(qn).inSingletonScope(), !_e.isBound(F.MessageMultiplexBrokerConfig)) {
|
|
26354
26376
|
const s = _e.get(F.ConfigManager).getAppConfig().VITE_MULTIPLEX_SOCKET_PATH;
|
|
26355
26377
|
_e.bind(F.MessageMultiplexBrokerConfig).toConstantValue({
|
|
26356
26378
|
wsPort: s ? null : 0,
|
|
@@ -26575,7 +26597,7 @@ var u2 = Object.getOwnPropertyDescriptor, c2 = (t, e, r, i) => {
|
|
|
26575
26597
|
for (var n = i > 1 ? void 0 : i ? u2(e, r) : e, o = t.length - 1, s; o >= 0; o--)
|
|
26576
26598
|
(s = t[o]) && (n = s(n) || n);
|
|
26577
26599
|
return n;
|
|
26578
|
-
},
|
|
26600
|
+
}, Pn = (t, e) => (r, i) => e(r, i, t);
|
|
26579
26601
|
let Kc = class {
|
|
26580
26602
|
constructor(t, e, r, i, n, o) {
|
|
26581
26603
|
this.logger = t, this.authService = e, this.credentials = r, this.agentDetection = i, this.configService = n, this.options = o;
|
|
@@ -26727,13 +26749,13 @@ let Kc = class {
|
|
|
26727
26749
|
};
|
|
26728
26750
|
Kc = c2([
|
|
26729
26751
|
xe(),
|
|
26730
|
-
|
|
26731
|
-
|
|
26732
|
-
|
|
26733
|
-
|
|
26734
|
-
|
|
26735
|
-
|
|
26736
|
-
|
|
26752
|
+
Pn(0, H(F.Logger)),
|
|
26753
|
+
Pn(1, H(F.DeviceCodeAuthService)),
|
|
26754
|
+
Pn(2, H(F.CredentialsService)),
|
|
26755
|
+
Pn(3, H(F.AgentDetectionService)),
|
|
26756
|
+
Pn(4, H(Et.DaemonConfigService)),
|
|
26757
|
+
Pn(5, H(Et.DaemonHttpOptions)),
|
|
26758
|
+
Pn(5, Mg())
|
|
26737
26759
|
], Kc);
|
|
26738
26760
|
var l2 = Object.getOwnPropertyDescriptor, p2 = (t, e, r, i) => {
|
|
26739
26761
|
for (var n = i > 1 ? void 0 : i ? l2(e, r) : e, o = t.length - 1, s; o >= 0; o--)
|
|
@@ -26785,7 +26807,7 @@ var d2 = Object.getOwnPropertyDescriptor, f2 = (t, e, r, i) => {
|
|
|
26785
26807
|
for (var n = i > 1 ? void 0 : i ? d2(e, r) : e, o = t.length - 1, s; o >= 0; o--)
|
|
26786
26808
|
(s = t[o]) && (n = s(n) || n);
|
|
26787
26809
|
return n;
|
|
26788
|
-
},
|
|
26810
|
+
}, Oi = (t, e) => (r, i) => e(r, i, t);
|
|
26789
26811
|
let Wc = class {
|
|
26790
26812
|
constructor(t, e, r, i, n) {
|
|
26791
26813
|
this.logger = t, this.credentials = e, this.context = r, this.configService = n, this.reduxStore = i;
|
|
@@ -27029,7 +27051,7 @@ let Wc = class {
|
|
|
27029
27051
|
command: e.command,
|
|
27030
27052
|
sessionId: e.payload.sessionId,
|
|
27031
27053
|
agentSessionId: r
|
|
27032
|
-
}), this.reduxStore.dispatch(
|
|
27054
|
+
}), this.reduxStore.dispatch(Gn(r));
|
|
27033
27055
|
const i = db.parse({
|
|
27034
27056
|
traceId: e.traceId,
|
|
27035
27057
|
eventType: Ve.STOP_AGENT,
|
|
@@ -27087,7 +27109,7 @@ let Wc = class {
|
|
|
27087
27109
|
this.logger.warn("No onTerminate callback provided, using fallback shutdown");
|
|
27088
27110
|
const r = this.reduxStore.getState().agentTabs.tabs;
|
|
27089
27111
|
for (const i of r)
|
|
27090
|
-
this.reduxStore.dispatch(
|
|
27112
|
+
this.reduxStore.dispatch(Gn(i.id));
|
|
27091
27113
|
setTimeout(() => {
|
|
27092
27114
|
this.disconnect(), this.logger.info("Daemon shutting down..."), process.exit(0);
|
|
27093
27115
|
}, 1e3);
|
|
@@ -27128,11 +27150,11 @@ let Wc = class {
|
|
|
27128
27150
|
};
|
|
27129
27151
|
Wc = f2([
|
|
27130
27152
|
xe(),
|
|
27131
|
-
|
|
27132
|
-
|
|
27133
|
-
|
|
27134
|
-
|
|
27135
|
-
|
|
27153
|
+
Oi(0, H(F.Logger)),
|
|
27154
|
+
Oi(1, H(F.CredentialsService)),
|
|
27155
|
+
Oi(2, H(F.ContextService)),
|
|
27156
|
+
Oi(3, H(F.Store)),
|
|
27157
|
+
Oi(4, H(Et.DaemonConfigService))
|
|
27136
27158
|
], Wc);
|
|
27137
27159
|
function h2() {
|
|
27138
27160
|
return new Jr((t) => {
|
|
@@ -30680,7 +30702,7 @@ function Lb() {
|
|
|
30680
30702
|
return gu.exports;
|
|
30681
30703
|
}
|
|
30682
30704
|
var mu, fh;
|
|
30683
|
-
function
|
|
30705
|
+
function Zn() {
|
|
30684
30706
|
if (fh) return mu;
|
|
30685
30707
|
fh = 1;
|
|
30686
30708
|
var t = We();
|
|
@@ -30820,7 +30842,7 @@ function Wn() {
|
|
|
30820
30842
|
return mu;
|
|
30821
30843
|
}
|
|
30822
30844
|
var _u = { exports: {} }, vu = { exports: {} }, yu = { exports: {} }, hh;
|
|
30823
|
-
function
|
|
30845
|
+
function Jn() {
|
|
30824
30846
|
if (hh) return yu.exports;
|
|
30825
30847
|
hh = 1;
|
|
30826
30848
|
var t = We();
|
|
@@ -30839,7 +30861,7 @@ function Xr() {
|
|
|
30839
30861
|
if (gh) return vu.exports;
|
|
30840
30862
|
gh = 1;
|
|
30841
30863
|
var t = We();
|
|
30842
|
-
nt(),
|
|
30864
|
+
nt(), Jn();
|
|
30843
30865
|
var e = vu.exports = t.asn1 = t.asn1 || {};
|
|
30844
30866
|
e.Class = {
|
|
30845
30867
|
UNIVERSAL: 0,
|
|
@@ -31318,7 +31340,7 @@ function un() {
|
|
|
31318
31340
|
return bu = t.md = t.md || {}, t.md.algorithms = t.md.algorithms || {}, bu;
|
|
31319
31341
|
}
|
|
31320
31342
|
var _h;
|
|
31321
|
-
function
|
|
31343
|
+
function To() {
|
|
31322
31344
|
if (_h) return Su.exports;
|
|
31323
31345
|
_h = 1;
|
|
31324
31346
|
var t = We();
|
|
@@ -31574,7 +31596,7 @@ function Sd() {
|
|
|
31574
31596
|
return ku.exports;
|
|
31575
31597
|
}
|
|
31576
31598
|
var xu = { exports: {} }, yh;
|
|
31577
|
-
function
|
|
31599
|
+
function Ci() {
|
|
31578
31600
|
if (yh) return xu.exports;
|
|
31579
31601
|
yh = 1;
|
|
31580
31602
|
var t = We();
|
|
@@ -31771,7 +31793,7 @@ function bd() {
|
|
|
31771
31793
|
if (bh) return Cu;
|
|
31772
31794
|
bh = 1;
|
|
31773
31795
|
var t = We();
|
|
31774
|
-
|
|
31796
|
+
To(), un(), nt();
|
|
31775
31797
|
var e = t.pkcs5 = t.pkcs5 || {}, r;
|
|
31776
31798
|
return t.util.isNodejs && !t.options.usePureJavaScript && (r = Ms), Cu = t.pbkdf2 = e.pbkdf2 = function(i, n, o, s, a, u) {
|
|
31777
31799
|
if (typeof a == "function" && (u = a, a = null), t.util.isNodejs && !t.options.usePureJavaScript && r.pbkdf2 && (a === null || typeof a != "object") && (r.pbkdf2Sync.length > 4 || !a || a === "sha1"))
|
|
@@ -32117,7 +32139,7 @@ function jr() {
|
|
|
32117
32139
|
if (Eh) return Zo.exports;
|
|
32118
32140
|
Eh = 1;
|
|
32119
32141
|
var t = We();
|
|
32120
|
-
return
|
|
32142
|
+
return Zn(), zb(), Fb(), nt(), function() {
|
|
32121
32143
|
if (t.random && t.random.getBytes) {
|
|
32122
32144
|
Zo.exports = t.random;
|
|
32123
32145
|
return;
|
|
@@ -32741,12 +32763,12 @@ function La() {
|
|
|
32741
32763
|
ht > 0 ? (j.lShiftTo(ht, ie), re.lShiftTo(ht, N)) : (j.copyTo(ie), re.copyTo(N));
|
|
32742
32764
|
var Kt = ie.t, yr = ie.data[Kt - 1];
|
|
32743
32765
|
if (yr != 0) {
|
|
32744
|
-
var lr = yr * (1 << this.F1) + (Kt > 1 ? ie.data[Kt - 2] >> this.F2 : 0), en = this.FV / lr,
|
|
32745
|
-
for (ie.dlShiftTo(
|
|
32746
|
-
for (; --
|
|
32747
|
-
var Va = N.data[--Rr] == yr ? this.DM : Math.floor(N.data[Rr] * en + (N.data[Rr - 1] + $r) *
|
|
32748
|
-
if ((N.data[Rr] += ie.am(0, Va, N,
|
|
32749
|
-
for (ie.dlShiftTo(
|
|
32766
|
+
var lr = yr * (1 << this.F1) + (Kt > 1 ? ie.data[Kt - 2] >> this.F2 : 0), en = this.FV / lr, Do = (1 << this.F1) / lr, $r = 1 << this.F2, Rr = N.t, Oo = Rr - Kt, ln = $ ?? i();
|
|
32767
|
+
for (ie.dlShiftTo(Oo, ln), N.compareTo(ln) >= 0 && (N.data[N.t++] = 1, N.subTo(ln, N)), r.ONE.dlShiftTo(Kt, ln), ln.subTo(ie, ie); ie.t < Kt; ) ie.data[ie.t++] = 0;
|
|
32768
|
+
for (; --Oo >= 0; ) {
|
|
32769
|
+
var Va = N.data[--Rr] == yr ? this.DM : Math.floor(N.data[Rr] * en + (N.data[Rr - 1] + $r) * Do);
|
|
32770
|
+
if ((N.data[Rr] += ie.am(0, Va, N, Oo, 0, Kt)) < Va)
|
|
32771
|
+
for (ie.dlShiftTo(Oo, ln), N.subTo(ln, N); N.data[Rr] < --Va; ) N.subTo(ln, N);
|
|
32750
32772
|
}
|
|
32751
32773
|
$ != null && (N.drShiftTo(Kt, $), me != he && r.ZERO.subTo($, $)), N.t = Kt, N.clamp(), ht > 0 && N.rShiftTo(ht, N), me < 0 && r.ZERO.subTo(N, N);
|
|
32752
32774
|
}
|
|
@@ -32970,15 +32992,15 @@ function La() {
|
|
|
32970
32992
|
C &= C - 1, ++$;
|
|
32971
32993
|
return $;
|
|
32972
32994
|
}
|
|
32973
|
-
function
|
|
32995
|
+
function Yn() {
|
|
32974
32996
|
for (var C = 0, $ = this.s & this.DM, N = 0; N < this.t; ++N) C += Qr(this.data[N] ^ $);
|
|
32975
32997
|
return C;
|
|
32976
32998
|
}
|
|
32977
|
-
function
|
|
32999
|
+
function Ti(C) {
|
|
32978
33000
|
var $ = Math.floor(C / this.DB);
|
|
32979
33001
|
return $ >= this.t ? this.s != 0 : (this.data[$] & 1 << C % this.DB) != 0;
|
|
32980
33002
|
}
|
|
32981
|
-
function
|
|
33003
|
+
function Po(C, $) {
|
|
32982
33004
|
var N = r.ONE.shiftLeft(C);
|
|
32983
33005
|
return this.bitwiseTo(N, $, N), N;
|
|
32984
33006
|
}
|
|
@@ -33070,7 +33092,7 @@ function La() {
|
|
|
33070
33092
|
N.data[this.t + j - $] = this.am($ - j, C.data[j], N, 0, 0, this.t + j - $);
|
|
33071
33093
|
N.clamp(), N.drShiftTo(1, N);
|
|
33072
33094
|
}
|
|
33073
|
-
function
|
|
33095
|
+
function Xn(C) {
|
|
33074
33096
|
this.r2 = i(), this.q3 = i(), r.ONE.dlShiftTo(2 * C.t, this.r2), this.mu = this.r2.divide(C), this.m = C;
|
|
33075
33097
|
}
|
|
33076
33098
|
function Sk(C) {
|
|
@@ -33092,23 +33114,23 @@ function La() {
|
|
|
33092
33114
|
function Ek(C, $, N) {
|
|
33093
33115
|
C.multiplyTo($, N), this.reduce(N);
|
|
33094
33116
|
}
|
|
33095
|
-
|
|
33117
|
+
Xn.prototype.convert = Sk, Xn.prototype.revert = bk, Xn.prototype.reduce = kk, Xn.prototype.mulTo = Ek, Xn.prototype.sqrTo = xk;
|
|
33096
33118
|
function wk(C, $) {
|
|
33097
33119
|
var N = C.bitLength(), j, re = k(1), ie;
|
|
33098
33120
|
if (N <= 0) return re;
|
|
33099
|
-
N < 18 ? j = 1 : N < 48 ? j = 3 : N < 144 ? j = 4 : N < 768 ? j = 5 : j = 6, N < 8 ? ie = new Z($) : $.isEven() ? ie = new
|
|
33121
|
+
N < 18 ? j = 1 : N < 48 ? j = 3 : N < 144 ? j = 4 : N < 768 ? j = 5 : j = 6, N < 8 ? ie = new Z($) : $.isEven() ? ie = new Xn($) : ie = new Fe($);
|
|
33100
33122
|
var me = new Array(), he = 3, ht = j - 1, Kt = (1 << j) - 1;
|
|
33101
33123
|
if (me[1] = ie.convert(this), j > 1) {
|
|
33102
33124
|
var yr = i();
|
|
33103
33125
|
for (ie.sqrTo(me[1], yr); he <= Kt; )
|
|
33104
33126
|
me[he] = i(), ie.mulTo(yr, me[he - 2], me[he]), he += 2;
|
|
33105
33127
|
}
|
|
33106
|
-
var lr = C.t - 1, en,
|
|
33128
|
+
var lr = C.t - 1, en, Do = !0, $r = i(), Rr;
|
|
33107
33129
|
for (N = g(C.data[lr]) - 1; lr >= 0; ) {
|
|
33108
33130
|
for (N >= ht ? en = C.data[lr] >> N - ht & Kt : (en = (C.data[lr] & (1 << N + 1) - 1) << ht - N, lr > 0 && (en |= C.data[lr - 1] >> this.DB + N - ht)), he = j; (en & 1) == 0; )
|
|
33109
33131
|
en >>= 1, --he;
|
|
33110
|
-
if ((N -= he) < 0 && (N += this.DB, --lr),
|
|
33111
|
-
me[en].copyTo(re),
|
|
33132
|
+
if ((N -= he) < 0 && (N += this.DB, --lr), Do)
|
|
33133
|
+
me[en].copyTo(re), Do = !1;
|
|
33112
33134
|
else {
|
|
33113
33135
|
for (; he > 1; )
|
|
33114
33136
|
ie.sqrTo(re, $r), ie.sqrTo($r, re), he -= 2;
|
|
@@ -33195,10 +33217,10 @@ function La() {
|
|
|
33195
33217
|
}
|
|
33196
33218
|
};
|
|
33197
33219
|
}
|
|
33198
|
-
return r.prototype.chunkSize = Se, r.prototype.toRadix = ge, r.prototype.fromRadix = Pe, r.prototype.fromNumber = je, r.prototype.bitwiseTo = ve, r.prototype.changeBit =
|
|
33220
|
+
return r.prototype.chunkSize = Se, r.prototype.toRadix = ge, r.prototype.fromRadix = Pe, r.prototype.fromNumber = je, r.prototype.bitwiseTo = ve, r.prototype.changeBit = Po, r.prototype.addTo = Bt, r.prototype.dMultiply = Gt, r.prototype.dAddOffset = qt, r.prototype.multiplyLowerTo = vk, r.prototype.multiplyUpperTo = yk, r.prototype.modInt = Ik, r.prototype.millerRabin = Rk, r.prototype.clone = z, r.prototype.intValue = B, r.prototype.byteValue = Q, r.prototype.shortValue = de, r.prototype.signum = Y, r.prototype.toByteArray = G, r.prototype.equals = J, r.prototype.min = X, r.prototype.max = se, r.prototype.and = Ke, r.prototype.or = ct, r.prototype.xor = Ne, r.prototype.andNot = Te, r.prototype.not = Je, r.prototype.shiftLeft = et, r.prototype.shiftRight = wt, r.prototype.getLowestSetBit = qr, r.prototype.bitCount = Yn, r.prototype.testBit = Ti, r.prototype.setBit = Dt, r.prototype.clearBit = Ot, r.prototype.flipBit = Nt, r.prototype.add = Ut, r.prototype.subtract = Mt, r.prototype.multiply = Lt, r.prototype.divide = zt, r.prototype.remainder = Ft, r.prototype.divideAndRemainder = jt, r.prototype.modPow = wk, r.prototype.modInverse = Tk, r.prototype.pow = _k, r.prototype.gcd = Ck, r.prototype.isProbablePrime = $k, $u;
|
|
33199
33221
|
}
|
|
33200
33222
|
var Ru = { exports: {} }, Pu = { exports: {} }, Ih;
|
|
33201
|
-
function
|
|
33223
|
+
function Ao() {
|
|
33202
33224
|
if (Ih) return Pu.exports;
|
|
33203
33225
|
Ih = 1;
|
|
33204
33226
|
var t = We();
|
|
@@ -33283,7 +33305,7 @@ function Gb() {
|
|
|
33283
33305
|
if (Th) return Ru.exports;
|
|
33284
33306
|
Th = 1;
|
|
33285
33307
|
var t = We();
|
|
33286
|
-
nt(), jr(),
|
|
33308
|
+
nt(), jr(), Ao();
|
|
33287
33309
|
var e = Ru.exports = t.pkcs1 = t.pkcs1 || {};
|
|
33288
33310
|
e.encode_rsa_oaep = function(i, n, o) {
|
|
33289
33311
|
var s, a, u, c;
|
|
@@ -33439,7 +33461,7 @@ function za() {
|
|
|
33439
33461
|
if ($h) return Du;
|
|
33440
33462
|
$h = 1;
|
|
33441
33463
|
var t = We();
|
|
33442
|
-
if (Xr(), La(),
|
|
33464
|
+
if (Xr(), La(), Jn(), Gb(), qb(), jr(), nt(), typeof e > "u")
|
|
33443
33465
|
var e = t.jsbn.BigInteger;
|
|
33444
33466
|
var r = t.util.isNodejs ? Ms : null, i = t.asn1, n = t.util;
|
|
33445
33467
|
t.pki = t.pki || {}, Du = t.pki.rsa = t.rsa = t.rsa || {};
|
|
@@ -34291,7 +34313,7 @@ function Vb() {
|
|
|
34291
34313
|
if (Rh) return Ou;
|
|
34292
34314
|
Rh = 1;
|
|
34293
34315
|
var t = We();
|
|
34294
|
-
if (
|
|
34316
|
+
if (Zn(), Xr(), Ma(), un(), Jn(), bd(), Ci(), jr(), jb(), za(), nt(), typeof e > "u")
|
|
34295
34317
|
var e = t.jsbn.BigInteger;
|
|
34296
34318
|
var r = t.asn1, i = t.pki = t.pki || {};
|
|
34297
34319
|
Ou = i.pbe = t.pbe = t.pbe || {};
|
|
@@ -35267,7 +35289,7 @@ function xd() {
|
|
|
35267
35289
|
if (Bh) return Uu.exports;
|
|
35268
35290
|
Bh = 1;
|
|
35269
35291
|
var t = We();
|
|
35270
|
-
|
|
35292
|
+
Zn(), Xr(), Ma(), un(), q2(), Jn(), Ci(), kd(), za(), nt();
|
|
35271
35293
|
var e = t.asn1, r = Uu.exports = t.pki = t.pki || {}, i = r.oids, n = {};
|
|
35272
35294
|
n.CN = i.commonName, n.commonName = "CN", n.C = i.countryName, n.countryName = "C", n.L = i.localityName, n.localityName = "L", n.ST = i.stateOrProvinceName, n.stateOrProvinceName = "ST", n.O = i.organizationName, n.organizationName = "O", n.OU = i.organizationalUnitName, n.organizationalUnitName = "OU", n.E = i.emailAddress, n.emailAddress = "E";
|
|
35273
35295
|
var o = t.pki.rsa.publicKeyValidator, s = {
|
|
@@ -36702,7 +36724,7 @@ function Wb() {
|
|
|
36702
36724
|
if (Uh) return Nu.exports;
|
|
36703
36725
|
Uh = 1;
|
|
36704
36726
|
var t = We();
|
|
36705
|
-
Xr(),
|
|
36727
|
+
Xr(), To(), Jn(), Hb(), Vb(), jr(), za(), Ao(), nt(), xd();
|
|
36706
36728
|
var e = t.asn1, r = t.pki, i = Nu.exports = t.pkcs12 = t.pkcs12 || {}, n = {
|
|
36707
36729
|
name: "ContentInfo",
|
|
36708
36730
|
tagClass: e.Class.UNIVERSAL,
|
|
@@ -37408,7 +37430,7 @@ function Zb() {
|
|
|
37408
37430
|
if (Mh) return Eu.exports;
|
|
37409
37431
|
Mh = 1;
|
|
37410
37432
|
var t = We();
|
|
37411
|
-
Xr(),
|
|
37433
|
+
Xr(), Jn(), Vb(), Ci(), bd(), Wb(), kd(), za(), nt(), xd();
|
|
37412
37434
|
var e = t.asn1, r = Eu.exports = t.pki = t.pki || {};
|
|
37413
37435
|
return r.pemToDer = function(i) {
|
|
37414
37436
|
var n = t.pem.decode(i)[0];
|
|
@@ -37444,7 +37466,7 @@ function Jb() {
|
|
|
37444
37466
|
if (Lh) return Fu;
|
|
37445
37467
|
Lh = 1;
|
|
37446
37468
|
var t = We();
|
|
37447
|
-
Xr(),
|
|
37469
|
+
Xr(), To(), Sd(), Ci(), Zb(), jr(), Ao(), nt();
|
|
37448
37470
|
var e = function(E, P, R, y) {
|
|
37449
37471
|
var A = t.util.createBuffer(), z = E.length >> 1, B = z + (E.length & 1), Q = E.substr(0, B), de = E.substr(z, B), Se = t.util.createBuffer(), Y = t.hmac.create();
|
|
37450
37472
|
R = P + R;
|
|
@@ -38735,7 +38757,7 @@ function V2() {
|
|
|
38735
38757
|
if (zh) return _u.exports;
|
|
38736
38758
|
zh = 1;
|
|
38737
38759
|
var t = We();
|
|
38738
|
-
|
|
38760
|
+
Zn(), Jb();
|
|
38739
38761
|
var e = _u.exports = t.tls;
|
|
38740
38762
|
e.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA = {
|
|
38741
38763
|
id: [0, 47],
|
|
@@ -39577,8 +39599,8 @@ function K2() {
|
|
|
39577
39599
|
Le(E, P, P);
|
|
39578
39600
|
}
|
|
39579
39601
|
function Le(E, P, R) {
|
|
39580
|
-
var y, A, z = 0, B = 0, Q = 0, de = 0, Se = 0, Y = 0, ge = 0, Pe = 0, je = 0, G = 0, J = 0, X = 0, se = 0, ve = 0, Ge = 0, Ke = 0, at = 0, ct = 0, De = 0, Ne = 0, ye = 0, Te = 0, Je = 0, et = 0, wt = 0, vr = 0, qr = 0, Qr = 0,
|
|
39581
|
-
y = P[0], z += y * Dt, B += y * Ot, Q += y * Nt, de += y * Bt, Se += y * Ut, Y += y * Mt, ge += y * Lt, Pe += y * zt, je += y * Ft, G += y * jt, J += y * Gt, X += y * qt, se += y * Ct, ve += y * Pt, Ge += y * Vt, Ke += y * Ht, y = P[1], B += y * Dt, Q += y * Ot, de += y * Nt, Se += y * Bt, Y += y * Ut, ge += y * Mt, Pe += y * Lt, je += y * zt, G += y * Ft, J += y * jt, X += y * Gt, se += y * qt, ve += y * Ct, Ge += y * Pt, Ke += y * Vt, at += y * Ht, y = P[2], Q += y * Dt, de += y * Ot, Se += y * Nt, Y += y * Bt, ge += y * Ut, Pe += y * Mt, je += y * Lt, G += y * zt, J += y * Ft, X += y * jt, se += y * Gt, ve += y * qt, Ge += y * Ct, Ke += y * Pt, at += y * Vt, ct += y * Ht, y = P[3], de += y * Dt, Se += y * Ot, Y += y * Nt, ge += y * Bt, Pe += y * Ut, je += y * Mt, G += y * Lt, J += y * zt, X += y * Ft, se += y * jt, ve += y * Gt, Ge += y * qt, Ke += y * Ct, at += y * Pt, ct += y * Vt, De += y * Ht, y = P[4], Se += y * Dt, Y += y * Ot, ge += y * Nt, Pe += y * Bt, je += y * Ut, G += y * Mt, J += y * Lt, X += y * zt, se += y * Ft, ve += y * jt, Ge += y * Gt, Ke += y * qt, at += y * Ct, ct += y * Pt, De += y * Vt, Ne += y * Ht, y = P[5], Y += y * Dt, ge += y * Ot, Pe += y * Nt, je += y * Bt, G += y * Ut, J += y * Mt, X += y * Lt, se += y * zt, ve += y * Ft, Ge += y * jt, Ke += y * Gt, at += y * qt, ct += y * Ct, De += y * Pt, Ne += y * Vt, ye += y * Ht, y = P[6], ge += y * Dt, Pe += y * Ot, je += y * Nt, G += y * Bt, J += y * Ut, X += y * Mt, se += y * Lt, ve += y * zt, Ge += y * Ft, Ke += y * jt, at += y * Gt, ct += y * qt, De += y * Ct, Ne += y * Pt, ye += y * Vt, Te += y * Ht, y = P[7], Pe += y * Dt, je += y * Ot, G += y * Nt, J += y * Bt, X += y * Ut, se += y * Mt, ve += y * Lt, Ge += y * zt, Ke += y * Ft, at += y * jt, ct += y * Gt, De += y * qt, Ne += y * Ct, ye += y * Pt, Te += y * Vt, Je += y * Ht, y = P[8], je += y * Dt, G += y * Ot, J += y * Nt, X += y * Bt, se += y * Ut, ve += y * Mt, Ge += y * Lt, Ke += y * zt, at += y * Ft, ct += y * jt, De += y * Gt, Ne += y * qt, ye += y * Ct, Te += y * Pt, Je += y * Vt, et += y * Ht, y = P[9], G += y * Dt, J += y * Ot, X += y * Nt, se += y * Bt, ve += y * Ut, Ge += y * Mt, Ke += y * Lt, at += y * zt, ct += y * Ft, De += y * jt, Ne += y * Gt, ye += y * qt, Te += y * Ct, Je += y * Pt, et += y * Vt, wt += y * Ht, y = P[10], J += y * Dt, X += y * Ot, se += y * Nt, ve += y * Bt, Ge += y * Ut, Ke += y * Mt, at += y * Lt, ct += y * zt, De += y * Ft, Ne += y * jt, ye += y * Gt, Te += y * qt, Je += y * Ct, et += y * Pt, wt += y * Vt, vr += y * Ht, y = P[11], X += y * Dt, se += y * Ot, ve += y * Nt, Ge += y * Bt, Ke += y * Ut, at += y * Mt, ct += y * Lt, De += y * zt, Ne += y * Ft, ye += y * jt, Te += y * Gt, Je += y * qt, et += y * Ct, wt += y * Pt, vr += y * Vt, qr += y * Ht, y = P[12], se += y * Dt, ve += y * Ot, Ge += y * Nt, Ke += y * Bt, at += y * Ut, ct += y * Mt, De += y * Lt, Ne += y * zt, ye += y * Ft, Te += y * jt, Je += y * Gt, et += y * qt, wt += y * Ct, vr += y * Pt, qr += y * Vt, Qr += y * Ht, y = P[13], ve += y * Dt, Ge += y * Ot, Ke += y * Nt, at += y * Bt, ct += y * Ut, De += y * Mt, Ne += y * Lt, ye += y * zt, Te += y * Ft, Je += y * jt, et += y * Gt, wt += y * qt, vr += y * Ct, qr += y * Pt, Qr += y * Vt,
|
|
39602
|
+
var y, A, z = 0, B = 0, Q = 0, de = 0, Se = 0, Y = 0, ge = 0, Pe = 0, je = 0, G = 0, J = 0, X = 0, se = 0, ve = 0, Ge = 0, Ke = 0, at = 0, ct = 0, De = 0, Ne = 0, ye = 0, Te = 0, Je = 0, et = 0, wt = 0, vr = 0, qr = 0, Qr = 0, Yn = 0, Ti = 0, Po = 0, Dt = R[0], Ot = R[1], Nt = R[2], Bt = R[3], Ut = R[4], Mt = R[5], Lt = R[6], zt = R[7], Ft = R[8], jt = R[9], Gt = R[10], qt = R[11], Ct = R[12], Pt = R[13], Vt = R[14], Ht = R[15];
|
|
39603
|
+
y = P[0], z += y * Dt, B += y * Ot, Q += y * Nt, de += y * Bt, Se += y * Ut, Y += y * Mt, ge += y * Lt, Pe += y * zt, je += y * Ft, G += y * jt, J += y * Gt, X += y * qt, se += y * Ct, ve += y * Pt, Ge += y * Vt, Ke += y * Ht, y = P[1], B += y * Dt, Q += y * Ot, de += y * Nt, Se += y * Bt, Y += y * Ut, ge += y * Mt, Pe += y * Lt, je += y * zt, G += y * Ft, J += y * jt, X += y * Gt, se += y * qt, ve += y * Ct, Ge += y * Pt, Ke += y * Vt, at += y * Ht, y = P[2], Q += y * Dt, de += y * Ot, Se += y * Nt, Y += y * Bt, ge += y * Ut, Pe += y * Mt, je += y * Lt, G += y * zt, J += y * Ft, X += y * jt, se += y * Gt, ve += y * qt, Ge += y * Ct, Ke += y * Pt, at += y * Vt, ct += y * Ht, y = P[3], de += y * Dt, Se += y * Ot, Y += y * Nt, ge += y * Bt, Pe += y * Ut, je += y * Mt, G += y * Lt, J += y * zt, X += y * Ft, se += y * jt, ve += y * Gt, Ge += y * qt, Ke += y * Ct, at += y * Pt, ct += y * Vt, De += y * Ht, y = P[4], Se += y * Dt, Y += y * Ot, ge += y * Nt, Pe += y * Bt, je += y * Ut, G += y * Mt, J += y * Lt, X += y * zt, se += y * Ft, ve += y * jt, Ge += y * Gt, Ke += y * qt, at += y * Ct, ct += y * Pt, De += y * Vt, Ne += y * Ht, y = P[5], Y += y * Dt, ge += y * Ot, Pe += y * Nt, je += y * Bt, G += y * Ut, J += y * Mt, X += y * Lt, se += y * zt, ve += y * Ft, Ge += y * jt, Ke += y * Gt, at += y * qt, ct += y * Ct, De += y * Pt, Ne += y * Vt, ye += y * Ht, y = P[6], ge += y * Dt, Pe += y * Ot, je += y * Nt, G += y * Bt, J += y * Ut, X += y * Mt, se += y * Lt, ve += y * zt, Ge += y * Ft, Ke += y * jt, at += y * Gt, ct += y * qt, De += y * Ct, Ne += y * Pt, ye += y * Vt, Te += y * Ht, y = P[7], Pe += y * Dt, je += y * Ot, G += y * Nt, J += y * Bt, X += y * Ut, se += y * Mt, ve += y * Lt, Ge += y * zt, Ke += y * Ft, at += y * jt, ct += y * Gt, De += y * qt, Ne += y * Ct, ye += y * Pt, Te += y * Vt, Je += y * Ht, y = P[8], je += y * Dt, G += y * Ot, J += y * Nt, X += y * Bt, se += y * Ut, ve += y * Mt, Ge += y * Lt, Ke += y * zt, at += y * Ft, ct += y * jt, De += y * Gt, Ne += y * qt, ye += y * Ct, Te += y * Pt, Je += y * Vt, et += y * Ht, y = P[9], G += y * Dt, J += y * Ot, X += y * Nt, se += y * Bt, ve += y * Ut, Ge += y * Mt, Ke += y * Lt, at += y * zt, ct += y * Ft, De += y * jt, Ne += y * Gt, ye += y * qt, Te += y * Ct, Je += y * Pt, et += y * Vt, wt += y * Ht, y = P[10], J += y * Dt, X += y * Ot, se += y * Nt, ve += y * Bt, Ge += y * Ut, Ke += y * Mt, at += y * Lt, ct += y * zt, De += y * Ft, Ne += y * jt, ye += y * Gt, Te += y * qt, Je += y * Ct, et += y * Pt, wt += y * Vt, vr += y * Ht, y = P[11], X += y * Dt, se += y * Ot, ve += y * Nt, Ge += y * Bt, Ke += y * Ut, at += y * Mt, ct += y * Lt, De += y * zt, Ne += y * Ft, ye += y * jt, Te += y * Gt, Je += y * qt, et += y * Ct, wt += y * Pt, vr += y * Vt, qr += y * Ht, y = P[12], se += y * Dt, ve += y * Ot, Ge += y * Nt, Ke += y * Bt, at += y * Ut, ct += y * Mt, De += y * Lt, Ne += y * zt, ye += y * Ft, Te += y * jt, Je += y * Gt, et += y * qt, wt += y * Ct, vr += y * Pt, qr += y * Vt, Qr += y * Ht, y = P[13], ve += y * Dt, Ge += y * Ot, Ke += y * Nt, at += y * Bt, ct += y * Ut, De += y * Mt, Ne += y * Lt, ye += y * zt, Te += y * Ft, Je += y * jt, et += y * Gt, wt += y * qt, vr += y * Ct, qr += y * Pt, Qr += y * Vt, Yn += y * Ht, y = P[14], Ge += y * Dt, Ke += y * Ot, at += y * Nt, ct += y * Bt, De += y * Ut, Ne += y * Mt, ye += y * Lt, Te += y * zt, Je += y * Ft, et += y * jt, wt += y * Gt, vr += y * qt, qr += y * Ct, Qr += y * Pt, Yn += y * Vt, Ti += y * Ht, y = P[15], Ke += y * Dt, at += y * Ot, ct += y * Nt, De += y * Bt, Ne += y * Ut, ye += y * Mt, Te += y * Lt, Je += y * zt, et += y * Ft, wt += y * jt, vr += y * Gt, qr += y * qt, Qr += y * Ct, Yn += y * Pt, Ti += y * Vt, Po += y * Ht, z += 38 * at, B += 38 * ct, Q += 38 * De, de += 38 * Ne, Se += 38 * ye, Y += 38 * Te, ge += 38 * Je, Pe += 38 * et, je += 38 * wt, G += 38 * vr, J += 38 * qr, X += 38 * Qr, se += 38 * Yn, ve += 38 * Ti, Ge += 38 * Po, A = 1, y = z + A + 65535, A = Math.floor(y / 65536), z = y - A * 65536, y = B + A + 65535, A = Math.floor(y / 65536), B = y - A * 65536, y = Q + A + 65535, A = Math.floor(y / 65536), Q = y - A * 65536, y = de + A + 65535, A = Math.floor(y / 65536), de = y - A * 65536, y = Se + A + 65535, A = Math.floor(y / 65536), Se = y - A * 65536, y = Y + A + 65535, A = Math.floor(y / 65536), Y = y - A * 65536, y = ge + A + 65535, A = Math.floor(y / 65536), ge = y - A * 65536, y = Pe + A + 65535, A = Math.floor(y / 65536), Pe = y - A * 65536, y = je + A + 65535, A = Math.floor(y / 65536), je = y - A * 65536, y = G + A + 65535, A = Math.floor(y / 65536), G = y - A * 65536, y = J + A + 65535, A = Math.floor(y / 65536), J = y - A * 65536, y = X + A + 65535, A = Math.floor(y / 65536), X = y - A * 65536, y = se + A + 65535, A = Math.floor(y / 65536), se = y - A * 65536, y = ve + A + 65535, A = Math.floor(y / 65536), ve = y - A * 65536, y = Ge + A + 65535, A = Math.floor(y / 65536), Ge = y - A * 65536, y = Ke + A + 65535, A = Math.floor(y / 65536), Ke = y - A * 65536, z += A - 1 + 37 * (A - 1), A = 1, y = z + A + 65535, A = Math.floor(y / 65536), z = y - A * 65536, y = B + A + 65535, A = Math.floor(y / 65536), B = y - A * 65536, y = Q + A + 65535, A = Math.floor(y / 65536), Q = y - A * 65536, y = de + A + 65535, A = Math.floor(y / 65536), de = y - A * 65536, y = Se + A + 65535, A = Math.floor(y / 65536), Se = y - A * 65536, y = Y + A + 65535, A = Math.floor(y / 65536), Y = y - A * 65536, y = ge + A + 65535, A = Math.floor(y / 65536), ge = y - A * 65536, y = Pe + A + 65535, A = Math.floor(y / 65536), Pe = y - A * 65536, y = je + A + 65535, A = Math.floor(y / 65536), je = y - A * 65536, y = G + A + 65535, A = Math.floor(y / 65536), G = y - A * 65536, y = J + A + 65535, A = Math.floor(y / 65536), J = y - A * 65536, y = X + A + 65535, A = Math.floor(y / 65536), X = y - A * 65536, y = se + A + 65535, A = Math.floor(y / 65536), se = y - A * 65536, y = ve + A + 65535, A = Math.floor(y / 65536), ve = y - A * 65536, y = Ge + A + 65535, A = Math.floor(y / 65536), Ge = y - A * 65536, y = Ke + A + 65535, A = Math.floor(y / 65536), Ke = y - A * 65536, z += A - 1 + 37 * (A - 1), E[0] = z, E[1] = B, E[2] = Q, E[3] = de, E[4] = Se, E[5] = Y, E[6] = ge, E[7] = Pe, E[8] = je, E[9] = G, E[10] = J, E[11] = X, E[12] = se, E[13] = ve, E[14] = Ge, E[15] = Ke;
|
|
39582
39604
|
}
|
|
39583
39605
|
return Gu;
|
|
39584
39606
|
}
|
|
@@ -39748,14 +39770,14 @@ function Z2() {
|
|
|
39748
39770
|
}
|
|
39749
39771
|
var Hu, Hh;
|
|
39750
39772
|
function J2() {
|
|
39751
|
-
return Hh || (Hh = 1, Hu = un(), Sd(),
|
|
39773
|
+
return Hh || (Hh = 1, Hu = un(), Sd(), Ao(), zb(), Yb()), Hu;
|
|
39752
39774
|
}
|
|
39753
39775
|
var Ku = { exports: {} }, Kh;
|
|
39754
39776
|
function Y2() {
|
|
39755
39777
|
if (Kh) return Ku.exports;
|
|
39756
39778
|
Kh = 1;
|
|
39757
39779
|
var t = We();
|
|
39758
|
-
|
|
39780
|
+
Zn(), Xr(), Ma(), Jn(), Ci(), Hb(), jr(), nt(), xd();
|
|
39759
39781
|
var e = t.asn1, r = Ku.exports = t.pkcs7 = t.pkcs7 || {};
|
|
39760
39782
|
r.messageFromPem = function(f) {
|
|
39761
39783
|
var _ = t.pem.decode(f)[0];
|
|
@@ -40566,7 +40588,7 @@ function X2() {
|
|
|
40566
40588
|
if (Wh) return Wu.exports;
|
|
40567
40589
|
Wh = 1;
|
|
40568
40590
|
var t = We();
|
|
40569
|
-
|
|
40591
|
+
Zn(), To(), Sd(), Ao(), nt();
|
|
40570
40592
|
var e = Wu.exports = t.ssh = t.ssh || {};
|
|
40571
40593
|
e.privateKeyToPutty = function(o, s, a) {
|
|
40572
40594
|
a = a || "", s = s || "";
|
|
@@ -40651,10 +40673,10 @@ Private-MAC: ` + g.digest().toHex() + `\r
|
|
|
40651
40673
|
}
|
|
40652
40674
|
var Zu, Zh;
|
|
40653
40675
|
function Q2() {
|
|
40654
|
-
return Zh || (Zh = 1, Zu = We(),
|
|
40676
|
+
return Zh || (Zh = 1, Zu = We(), Zn(), V2(), Xr(), yd(), Ma(), K2(), To(), W2(), Z2(), J2(), Kb(), bd(), Ci(), Gb(), Wb(), Y2(), Zb(), qb(), Fb(), kd(), jr(), jb(), X2(), Jb(), nt()), Zu;
|
|
40655
40677
|
}
|
|
40656
|
-
var
|
|
40657
|
-
const eR = /* @__PURE__ */ Rg(
|
|
40678
|
+
var ri = Q2();
|
|
40679
|
+
const eR = /* @__PURE__ */ Rg(ri);
|
|
40658
40680
|
var tR = Object.getOwnPropertyDescriptor, rR = (t, e, r, i) => {
|
|
40659
40681
|
for (var n = i > 1 ? void 0 : i ? tR(e, r) : e, o = t.length - 1, s; o >= 0; o--)
|
|
40660
40682
|
(s = t[o]) && (n = s(n) || n);
|
|
@@ -40662,7 +40684,7 @@ var tR = Object.getOwnPropertyDescriptor, rR = (t, e, r, i) => {
|
|
|
40662
40684
|
}, nR = (t, e) => (r, i) => e(r, i, t);
|
|
40663
40685
|
let tl = class {
|
|
40664
40686
|
constructor(t) {
|
|
40665
|
-
this.logger = t, this.certDir =
|
|
40687
|
+
this.logger = t, this.certDir = ii.join(Qe.AGIFLOW_DIR, "certs"), this.caKeyPath = ii.join(this.certDir, "ca.key"), this.caCertPath = ii.join(this.certDir, "ca.crt");
|
|
40666
40688
|
}
|
|
40667
40689
|
certDir;
|
|
40668
40690
|
caKeyPath;
|
|
@@ -40684,7 +40706,7 @@ let tl = class {
|
|
|
40684
40706
|
};
|
|
40685
40707
|
}
|
|
40686
40708
|
this.logger.info("Generating new self-signed Root CA...");
|
|
40687
|
-
const t =
|
|
40709
|
+
const t = ri.pki.rsa.generateKeyPair(2048), e = ri.pki.createCertificate();
|
|
40688
40710
|
e.publicKey = t.publicKey, e.serialNumber = "01", e.validity.notBefore = /* @__PURE__ */ new Date(), e.validity.notAfter = /* @__PURE__ */ new Date(), e.validity.notAfter.setFullYear(e.validity.notBefore.getFullYear() + 1);
|
|
40689
40711
|
const r = [
|
|
40690
40712
|
{ name: "commonName", value: this.commonName },
|
|
@@ -40707,8 +40729,8 @@ let tl = class {
|
|
|
40707
40729
|
keyEncipherment: !0,
|
|
40708
40730
|
dataEncipherment: !0
|
|
40709
40731
|
}
|
|
40710
|
-
]), e.sign(t.privateKey,
|
|
40711
|
-
const i =
|
|
40732
|
+
]), e.sign(t.privateKey, ri.md.sha256.create());
|
|
40733
|
+
const i = ri.pki.privateKeyToPem(t.privateKey), n = ri.pki.certificateToPem(e);
|
|
40712
40734
|
return Jt.writeFileSync(this.caKeyPath, i), Jt.writeFileSync(this.caCertPath, n), this.logger.success(`Root CA generated at ${this.certDir}`), {
|
|
40713
40735
|
key: i,
|
|
40714
40736
|
cert: n,
|
|
@@ -40729,7 +40751,7 @@ let tl = class {
|
|
|
40729
40751
|
* Check if the CA certificate is already installed in the system trust store
|
|
40730
40752
|
*/
|
|
40731
40753
|
async isCaInstalled() {
|
|
40732
|
-
const t =
|
|
40754
|
+
const t = No.platform();
|
|
40733
40755
|
try {
|
|
40734
40756
|
if (t === "darwin")
|
|
40735
40757
|
try {
|
|
@@ -40764,7 +40786,7 @@ let tl = class {
|
|
|
40764
40786
|
* and MITM certificates (for intercepted connections).
|
|
40765
40787
|
*/
|
|
40766
40788
|
async getOrCreateCombinedCaBundle() {
|
|
40767
|
-
const t =
|
|
40789
|
+
const t = ii.join(this.certDir, "combined-ca-bundle.crt");
|
|
40768
40790
|
try {
|
|
40769
40791
|
const e = await this.getSystemCAs(), r = Jt.existsSync(this.caCertPath) ? Jt.readFileSync(this.caCertPath, "utf8") : "";
|
|
40770
40792
|
if (!r)
|
|
@@ -40781,7 +40803,7 @@ ${r}`;
|
|
|
40781
40803
|
* Get the path to the system CA bundle
|
|
40782
40804
|
*/
|
|
40783
40805
|
getSystemCaBundlePath() {
|
|
40784
|
-
const t =
|
|
40806
|
+
const t = No.platform();
|
|
40785
40807
|
if (t === "darwin") {
|
|
40786
40808
|
const e = [
|
|
40787
40809
|
"/etc/ssl/cert.pem",
|
|
@@ -40810,7 +40832,7 @@ ${r}`;
|
|
|
40810
40832
|
const t = this.getSystemCaBundlePath();
|
|
40811
40833
|
if (Jt.existsSync(t))
|
|
40812
40834
|
return Jt.readFileSync(t, "utf8");
|
|
40813
|
-
if (
|
|
40835
|
+
if (No.platform() === "darwin")
|
|
40814
40836
|
try {
|
|
40815
40837
|
return vt(
|
|
40816
40838
|
"security find-certificate -a -p /System/Library/Keychains/SystemRootCertificates.keychain",
|
|
@@ -40832,7 +40854,7 @@ ${r}`;
|
|
|
40832
40854
|
async installCaToSystem() {
|
|
40833
40855
|
if (!Jt.existsSync(this.caCertPath))
|
|
40834
40856
|
throw new Error("CA certificate not found. Generate it first.");
|
|
40835
|
-
const t =
|
|
40857
|
+
const t = No.platform();
|
|
40836
40858
|
this.logger.info("Attempting to install CA certificate to system trust store...");
|
|
40837
40859
|
try {
|
|
40838
40860
|
if (t === "darwin")
|
|
@@ -40859,7 +40881,7 @@ tl = rR([
|
|
|
40859
40881
|
function iR(t, ...e) {
|
|
40860
40882
|
return (...r) => t(...e, ...r);
|
|
40861
40883
|
}
|
|
40862
|
-
function
|
|
40884
|
+
function $o(t) {
|
|
40863
40885
|
return function(...e) {
|
|
40864
40886
|
var r = e.pop();
|
|
40865
40887
|
return t.call(this, e, r);
|
|
@@ -40872,14 +40894,14 @@ function ek(t) {
|
|
|
40872
40894
|
function tk(t) {
|
|
40873
40895
|
return (e, ...r) => t(() => e(...r));
|
|
40874
40896
|
}
|
|
40875
|
-
var
|
|
40876
|
-
oR ?
|
|
40877
|
-
var
|
|
40897
|
+
var Ui;
|
|
40898
|
+
oR ? Ui = queueMicrotask : Xb ? Ui = setImmediate : Qb ? Ui = process.nextTick : Ui = ek;
|
|
40899
|
+
var Bn = tk(Ui);
|
|
40878
40900
|
function rl(t) {
|
|
40879
|
-
return
|
|
40901
|
+
return Ro(t) ? function(...e) {
|
|
40880
40902
|
const r = e.pop(), i = t.apply(this, e);
|
|
40881
40903
|
return Jh(i, r);
|
|
40882
|
-
} :
|
|
40904
|
+
} : $o(function(e, r) {
|
|
40883
40905
|
var i;
|
|
40884
40906
|
try {
|
|
40885
40907
|
i = t.apply(this, e);
|
|
@@ -40902,12 +40924,12 @@ function Yh(t, e, r) {
|
|
|
40902
40924
|
try {
|
|
40903
40925
|
t(e, r);
|
|
40904
40926
|
} catch (i) {
|
|
40905
|
-
|
|
40927
|
+
Bn((n) => {
|
|
40906
40928
|
throw n;
|
|
40907
40929
|
}, i);
|
|
40908
40930
|
}
|
|
40909
40931
|
}
|
|
40910
|
-
function
|
|
40932
|
+
function Ro(t) {
|
|
40911
40933
|
return t[Symbol.toStringTag] === "AsyncFunction";
|
|
40912
40934
|
}
|
|
40913
40935
|
function sR(t) {
|
|
@@ -40918,7 +40940,7 @@ function aR(t) {
|
|
|
40918
40940
|
}
|
|
40919
40941
|
function Ye(t) {
|
|
40920
40942
|
if (typeof t != "function") throw new Error("expected a function");
|
|
40921
|
-
return
|
|
40943
|
+
return Ro(t) ? rl(t) : t;
|
|
40922
40944
|
}
|
|
40923
40945
|
function Ze(t, e) {
|
|
40924
40946
|
if (e || (e = t.length), !e) throw new Error("arity is undefined");
|
|
@@ -41102,19 +41124,19 @@ function SR(t, e, r) {
|
|
|
41102
41124
|
return Ed(sn, t, e, r);
|
|
41103
41125
|
}
|
|
41104
41126
|
var nk = Ze(SR, 3), bR = rk(nk);
|
|
41105
|
-
const
|
|
41106
|
-
function
|
|
41127
|
+
const Ii = Symbol("promiseCallback");
|
|
41128
|
+
function yi() {
|
|
41107
41129
|
let t, e;
|
|
41108
41130
|
function r(i, ...n) {
|
|
41109
41131
|
if (i) return e(i);
|
|
41110
41132
|
t(n.length > 1 ? n : n[0]);
|
|
41111
41133
|
}
|
|
41112
|
-
return r[
|
|
41134
|
+
return r[Ii] = new Promise((i, n) => {
|
|
41113
41135
|
t = i, e = n;
|
|
41114
41136
|
}), r;
|
|
41115
41137
|
}
|
|
41116
41138
|
function ik(t, e, r) {
|
|
41117
|
-
typeof e != "number" && (r = e, e = null), r = Cn(r ||
|
|
41139
|
+
typeof e != "number" && (r = e, e = null), r = Cn(r || yi());
|
|
41118
41140
|
var i = Object.keys(t).length;
|
|
41119
41141
|
if (!i)
|
|
41120
41142
|
return r(null);
|
|
@@ -41198,7 +41220,7 @@ function ik(t, e, r) {
|
|
|
41198
41220
|
Array.isArray(x) && x.indexOf(b) >= 0 && w.push(I);
|
|
41199
41221
|
}), w;
|
|
41200
41222
|
}
|
|
41201
|
-
return r[
|
|
41223
|
+
return r[Ii];
|
|
41202
41224
|
}
|
|
41203
41225
|
var kR = /^(?:async\s)?(?:function)?\s*(?:\w+\s*)?\(([^)]+)\)(?:\s*{)/, xR = /^(?:async\s)?\s*(?:\(\s*)?((?:[^)=\s]\s*)*)(?:\)\s*)?=>/, ER = /,/, wR = /(=.+)?(\s*)$/;
|
|
41204
41226
|
function CR(t) {
|
|
@@ -41227,7 +41249,7 @@ Source:
|
|
|
41227
41249
|
function TR(t, e) {
|
|
41228
41250
|
var r = {};
|
|
41229
41251
|
return Object.keys(t).forEach((i) => {
|
|
41230
|
-
var n = t[i], o, s =
|
|
41252
|
+
var n = t[i], o, s = Ro(n), a = !s && n.length === 1 || s && n.length === 0;
|
|
41231
41253
|
if (Array.isArray(n))
|
|
41232
41254
|
o = [...n], n = o.pop(), r[i] = o.concat(o.length > 0 ? u : n);
|
|
41233
41255
|
else if (a)
|
|
@@ -41335,7 +41357,7 @@ function Cd(t, e, r) {
|
|
|
41335
41357
|
S,
|
|
41336
41358
|
w ? d : I || d
|
|
41337
41359
|
);
|
|
41338
|
-
if (b ? p._tasks.unshift(T) : p._tasks.push(T), m || (m = !0,
|
|
41360
|
+
if (b ? p._tasks.unshift(T) : p._tasks.push(T), m || (m = !0, Bn(() => {
|
|
41339
41361
|
m = !1, p.process();
|
|
41340
41362
|
})), w || !I)
|
|
41341
41363
|
return new Promise((D, U) => {
|
|
@@ -41353,7 +41375,7 @@ function Cd(t, e, r) {
|
|
|
41353
41375
|
};
|
|
41354
41376
|
}
|
|
41355
41377
|
function _(S) {
|
|
41356
|
-
return S.length === 0 && p.idle() ? (
|
|
41378
|
+
return S.length === 0 && p.idle() ? (Bn(() => l("drain")), !0) : !1;
|
|
41357
41379
|
}
|
|
41358
41380
|
const v = (S) => (b) => {
|
|
41359
41381
|
if (!b)
|
|
@@ -41431,7 +41453,7 @@ function Cd(t, e, r) {
|
|
|
41431
41453
|
p.paused = !0;
|
|
41432
41454
|
},
|
|
41433
41455
|
resume() {
|
|
41434
|
-
p.paused !== !1 && (p.paused = !1,
|
|
41456
|
+
p.paused !== !1 && (p.paused = !1, Bn(p.process));
|
|
41435
41457
|
}
|
|
41436
41458
|
};
|
|
41437
41459
|
return Object.defineProperties(p, {
|
|
@@ -41472,12 +41494,12 @@ function PR(t, e, r, i) {
|
|
|
41472
41494
|
});
|
|
41473
41495
|
}, (o) => i(o, e));
|
|
41474
41496
|
}
|
|
41475
|
-
var
|
|
41497
|
+
var Gi = Ze(PR, 4);
|
|
41476
41498
|
function ok(...t) {
|
|
41477
41499
|
var e = t.map(Ye);
|
|
41478
41500
|
return function(...r) {
|
|
41479
41501
|
var i = this, n = r[r.length - 1];
|
|
41480
|
-
return typeof n == "function" ? r.pop() : n =
|
|
41502
|
+
return typeof n == "function" ? r.pop() : n = yi(), Gi(
|
|
41481
41503
|
e,
|
|
41482
41504
|
r,
|
|
41483
41505
|
(o, s, a) => {
|
|
@@ -41486,7 +41508,7 @@ function ok(...t) {
|
|
|
41486
41508
|
}));
|
|
41487
41509
|
},
|
|
41488
41510
|
(o, s) => n(o, ...s)
|
|
41489
|
-
), n[
|
|
41511
|
+
), n[Ii];
|
|
41490
41512
|
};
|
|
41491
41513
|
}
|
|
41492
41514
|
function DR(...t) {
|
|
@@ -41596,10 +41618,10 @@ function KR(t, e, r) {
|
|
|
41596
41618
|
}
|
|
41597
41619
|
var ol = Ze(KR, 3);
|
|
41598
41620
|
function uk(t) {
|
|
41599
|
-
return
|
|
41621
|
+
return Ro(t) ? t : function(...e) {
|
|
41600
41622
|
var r = e.pop(), i = !0;
|
|
41601
41623
|
e.push((...n) => {
|
|
41602
|
-
i ?
|
|
41624
|
+
i ? Bn(() => r(...n)) : r(...n);
|
|
41603
41625
|
}), t.apply(this, e), i = !1;
|
|
41604
41626
|
};
|
|
41605
41627
|
}
|
|
@@ -41704,9 +41726,9 @@ function lP(t, e, r) {
|
|
|
41704
41726
|
return Td(t, 1, e, r);
|
|
41705
41727
|
}
|
|
41706
41728
|
function pP(t, e = (r) => r) {
|
|
41707
|
-
var r = /* @__PURE__ */ Object.create(null), i = /* @__PURE__ */ Object.create(null), n = Ye(t), o =
|
|
41729
|
+
var r = /* @__PURE__ */ Object.create(null), i = /* @__PURE__ */ Object.create(null), n = Ye(t), o = $o((s, a) => {
|
|
41708
41730
|
var u = e(...s);
|
|
41709
|
-
u in r ?
|
|
41731
|
+
u in r ? Bn(() => a(null, ...r[u])) : u in i ? i[u].push(a) : (i[u] = [a], n(...s, (c, ...l) => {
|
|
41710
41732
|
c || (r[u] = l);
|
|
41711
41733
|
var m = i[u];
|
|
41712
41734
|
delete i[u];
|
|
@@ -41826,11 +41848,11 @@ function vP(t, e) {
|
|
|
41826
41848
|
var yP = Ze(vP, 2);
|
|
41827
41849
|
function fg(t, e, r, i) {
|
|
41828
41850
|
var n = [...t].reverse();
|
|
41829
|
-
return
|
|
41851
|
+
return Gi(n, e, r, i);
|
|
41830
41852
|
}
|
|
41831
41853
|
function sl(t) {
|
|
41832
41854
|
var e = Ye(t);
|
|
41833
|
-
return
|
|
41855
|
+
return $o(function(i, n) {
|
|
41834
41856
|
return i.push((o, ...s) => {
|
|
41835
41857
|
let a = {};
|
|
41836
41858
|
if (o && (a.error = o), s.length > 0) {
|
|
@@ -41878,7 +41900,7 @@ function ul(t, e, r) {
|
|
|
41878
41900
|
times: al,
|
|
41879
41901
|
intervalFunc: lk(pk)
|
|
41880
41902
|
};
|
|
41881
|
-
if (arguments.length < 3 && typeof t == "function" ? (r = e ||
|
|
41903
|
+
if (arguments.length < 3 && typeof t == "function" ? (r = e || yi(), e = t) : (IP(i, t), r = r || yi()), typeof e != "function")
|
|
41882
41904
|
throw new Error("Invalid arguments for async.retry");
|
|
41883
41905
|
var n = Ye(e), o = 1;
|
|
41884
41906
|
function s() {
|
|
@@ -41886,7 +41908,7 @@ function ul(t, e, r) {
|
|
|
41886
41908
|
a !== !1 && (a && o++ < i.times && (typeof i.errorFilter != "function" || i.errorFilter(a)) ? setTimeout(s, i.intervalFunc(o - 1)) : r(a, ...u));
|
|
41887
41909
|
});
|
|
41888
41910
|
}
|
|
41889
|
-
return s(), r[
|
|
41911
|
+
return s(), r[Ii];
|
|
41890
41912
|
}
|
|
41891
41913
|
function IP(t, e) {
|
|
41892
41914
|
if (typeof e == "object")
|
|
@@ -41899,14 +41921,14 @@ function IP(t, e) {
|
|
|
41899
41921
|
function TP(t, e) {
|
|
41900
41922
|
e || (e = t, t = null);
|
|
41901
41923
|
let r = t && t.arity || e.length;
|
|
41902
|
-
|
|
41924
|
+
Ro(e) && (r += 1);
|
|
41903
41925
|
var i = Ye(e);
|
|
41904
|
-
return
|
|
41905
|
-
(n.length < r - 1 || o == null) && (n.push(o), o =
|
|
41926
|
+
return $o((n, o) => {
|
|
41927
|
+
(n.length < r - 1 || o == null) && (n.push(o), o = yi());
|
|
41906
41928
|
function s(a) {
|
|
41907
41929
|
i(...n, a);
|
|
41908
41930
|
}
|
|
41909
|
-
return t ? ul(t, s, o) : ul(s, o), o[
|
|
41931
|
+
return t ? ul(t, s, o) : ul(s, o), o[Ii];
|
|
41910
41932
|
});
|
|
41911
41933
|
}
|
|
41912
41934
|
function AP(t, e) {
|
|
@@ -41943,7 +41965,7 @@ function DP(t, e, r) {
|
|
|
41943
41965
|
var OP = Ze(DP, 3);
|
|
41944
41966
|
function NP(t, e, r) {
|
|
41945
41967
|
var i = Ye(t);
|
|
41946
|
-
return
|
|
41968
|
+
return $o((n, o) => {
|
|
41947
41969
|
var s = !1, a;
|
|
41948
41970
|
function u() {
|
|
41949
41971
|
var c = t.name || "anonymous", l = new Error('Callback function "' + c + '" timed out.');
|
|
@@ -41970,11 +41992,11 @@ function MP(t, e, r) {
|
|
|
41970
41992
|
return Rd(t, 1, e, r);
|
|
41971
41993
|
}
|
|
41972
41994
|
function LP(t, e, r, i) {
|
|
41973
|
-
arguments.length <= 3 && typeof e == "function" && (i = r, r = e, e = Array.isArray(t) ? [] : {}), i = Cn(i ||
|
|
41995
|
+
arguments.length <= 3 && typeof e == "function" && (i = r, r = e, e = Array.isArray(t) ? [] : {}), i = Cn(i || yi());
|
|
41974
41996
|
var n = Ye(r);
|
|
41975
41997
|
return Fr(t, (o, s, a) => {
|
|
41976
41998
|
n(e, o, s, a);
|
|
41977
|
-
}, (o) => i(o, e)), i[
|
|
41999
|
+
}, (o) => i(o, e)), i[Ii];
|
|
41978
42000
|
}
|
|
41979
42001
|
function zP(t, e) {
|
|
41980
42002
|
var r = null, i;
|
|
@@ -42078,7 +42100,7 @@ var HP = Ze(VP), Yt = {
|
|
|
42078
42100
|
priorityQueue: _P,
|
|
42079
42101
|
queue: ck,
|
|
42080
42102
|
race: yP,
|
|
42081
|
-
reduce:
|
|
42103
|
+
reduce: Gi,
|
|
42082
42104
|
reduceRight: fg,
|
|
42083
42105
|
reflect: sl,
|
|
42084
42106
|
reflectAll: SP,
|
|
@@ -42089,7 +42111,7 @@ var HP = Ze(VP), Yt = {
|
|
|
42089
42111
|
retryable: TP,
|
|
42090
42112
|
seq: ok,
|
|
42091
42113
|
series: AP,
|
|
42092
|
-
setImmediate:
|
|
42114
|
+
setImmediate: Bn,
|
|
42093
42115
|
some: hg,
|
|
42094
42116
|
someLimit: gg,
|
|
42095
42117
|
someSeries: mg,
|
|
@@ -42123,8 +42145,8 @@ var HP = Ze(VP), Yt = {
|
|
|
42123
42145
|
forEachOf: Fr,
|
|
42124
42146
|
forEachOfSeries: sn,
|
|
42125
42147
|
forEachOfLimit: Os,
|
|
42126
|
-
inject:
|
|
42127
|
-
foldl:
|
|
42148
|
+
inject: Gi,
|
|
42149
|
+
foldl: Gi,
|
|
42128
42150
|
foldr: fg,
|
|
42129
42151
|
select: cg,
|
|
42130
42152
|
selectLimit: lg,
|
|
@@ -42194,8 +42216,8 @@ const ZP = /* @__PURE__ */ Rg(WP), Tn = (t) => {
|
|
|
42194
42216
|
throw new TypeError("invalid options argument");
|
|
42195
42217
|
const e = t, r = t.fs || {};
|
|
42196
42218
|
return t.mkdir = t.mkdir || r.mkdir || Eg, t.mkdirAsync = t.mkdirAsync ? t.mkdirAsync : async (i, n) => new Promise((o, s) => e.mkdir(i, n, (a, u) => a ? s(a) : o(u))), t.stat = t.stat || r.stat || zk, t.statAsync = t.statAsync ? t.statAsync : async (i) => new Promise((n, o) => e.stat(i, (s, a) => s ? o(s) : n(a))), t.statSync = t.statSync || r.statSync || xg, t.mkdirSync = t.mkdirSync || r.mkdirSync || wg, e;
|
|
42197
|
-
},
|
|
42198
|
-
const i =
|
|
42219
|
+
}, Hn = (t, e, r) => {
|
|
42220
|
+
const i = bi(t), n = { ...Tn(e), recursive: !1 };
|
|
42199
42221
|
if (i === t)
|
|
42200
42222
|
try {
|
|
42201
42223
|
return n.mkdirSync(t, n);
|
|
@@ -42210,7 +42232,7 @@ const ZP = /* @__PURE__ */ Rg(WP), Tn = (t) => {
|
|
|
42210
42232
|
} catch (o) {
|
|
42211
42233
|
const s = o;
|
|
42212
42234
|
if (s && s.code === "ENOENT")
|
|
42213
|
-
return
|
|
42235
|
+
return Hn(t, n, Hn(i, n, r));
|
|
42214
42236
|
if (s && s.code !== "EEXIST" && s && s.code !== "EROFS")
|
|
42215
42237
|
throw o;
|
|
42216
42238
|
try {
|
|
@@ -42220,10 +42242,10 @@ const ZP = /* @__PURE__ */ Rg(WP), Tn = (t) => {
|
|
|
42220
42242
|
throw o;
|
|
42221
42243
|
}
|
|
42222
42244
|
}
|
|
42223
|
-
},
|
|
42245
|
+
}, si = Object.assign(async (t, e, r) => {
|
|
42224
42246
|
const i = Tn(e);
|
|
42225
42247
|
i.recursive = !1;
|
|
42226
|
-
const n =
|
|
42248
|
+
const n = bi(t);
|
|
42227
42249
|
return n === t ? i.mkdirAsync(t, i).catch((o) => {
|
|
42228
42250
|
const s = o;
|
|
42229
42251
|
if (s && s.code !== "EISDIR")
|
|
@@ -42231,7 +42253,7 @@ const ZP = /* @__PURE__ */ Rg(WP), Tn = (t) => {
|
|
|
42231
42253
|
}) : i.mkdirAsync(t, i).then(() => r || t, async (o) => {
|
|
42232
42254
|
const s = o;
|
|
42233
42255
|
if (s && s.code === "ENOENT")
|
|
42234
|
-
return
|
|
42256
|
+
return si(n, i).then((a) => si(t, i, a));
|
|
42235
42257
|
if (s && s.code !== "EEXIST" && s.code !== "EROFS")
|
|
42236
42258
|
throw o;
|
|
42237
42259
|
return i.statAsync(t).then((a) => {
|
|
@@ -42242,7 +42264,7 @@ const ZP = /* @__PURE__ */ Rg(WP), Tn = (t) => {
|
|
|
42242
42264
|
throw o;
|
|
42243
42265
|
});
|
|
42244
42266
|
});
|
|
42245
|
-
}, { sync:
|
|
42267
|
+
}, { sync: Hn }), dk = async (t, e, r) => {
|
|
42246
42268
|
if (r !== e)
|
|
42247
42269
|
return t.statAsync(e).then(
|
|
42248
42270
|
(i) => i.isDirectory() ? r : void 0,
|
|
@@ -42250,7 +42272,7 @@ const ZP = /* @__PURE__ */ Rg(WP), Tn = (t) => {
|
|
|
42250
42272
|
// will fail later
|
|
42251
42273
|
(i) => {
|
|
42252
42274
|
const n = i;
|
|
42253
|
-
return n && n.code === "ENOENT" ? dk(t,
|
|
42275
|
+
return n && n.code === "ENOENT" ? dk(t, bi(e), e) : void 0;
|
|
42254
42276
|
}
|
|
42255
42277
|
);
|
|
42256
42278
|
}, fk = (t, e, r) => {
|
|
@@ -42259,11 +42281,11 @@ const ZP = /* @__PURE__ */ Rg(WP), Tn = (t) => {
|
|
|
42259
42281
|
return t.statSync(e).isDirectory() ? r : void 0;
|
|
42260
42282
|
} catch (i) {
|
|
42261
42283
|
const n = i;
|
|
42262
|
-
return n && n.code === "ENOENT" ? fk(t,
|
|
42284
|
+
return n && n.code === "ENOENT" ? fk(t, bi(e), e) : void 0;
|
|
42263
42285
|
}
|
|
42264
42286
|
}, Bs = (t, e) => {
|
|
42265
42287
|
const r = Tn(e);
|
|
42266
|
-
if (r.recursive = !0,
|
|
42288
|
+
if (r.recursive = !0, bi(t) === t)
|
|
42267
42289
|
return r.mkdirSync(t, r);
|
|
42268
42290
|
const n = fk(r, t);
|
|
42269
42291
|
try {
|
|
@@ -42271,15 +42293,15 @@ const ZP = /* @__PURE__ */ Rg(WP), Tn = (t) => {
|
|
|
42271
42293
|
} catch (o) {
|
|
42272
42294
|
const s = o;
|
|
42273
42295
|
if (s && s.code === "ENOENT")
|
|
42274
|
-
return
|
|
42296
|
+
return Hn(t, r);
|
|
42275
42297
|
throw o;
|
|
42276
42298
|
}
|
|
42277
42299
|
}, Xu = Object.assign(async (t, e) => {
|
|
42278
42300
|
const r = { ...Tn(e), recursive: !0 };
|
|
42279
|
-
return
|
|
42301
|
+
return bi(t) === t ? await r.mkdirAsync(t, r) : dk(r, t).then((n) => r.mkdirAsync(t, r).then((o) => n || o).catch((o) => {
|
|
42280
42302
|
const s = o;
|
|
42281
42303
|
if (s && s.code === "ENOENT")
|
|
42282
|
-
return
|
|
42304
|
+
return si(t, r);
|
|
42283
42305
|
throw o;
|
|
42284
42306
|
}));
|
|
42285
42307
|
}, { sync: Bs }), JP = process.env.__TESTING_MKDIRP_PLATFORM__ || process.platform, hk = (t) => {
|
|
@@ -42302,22 +42324,22 @@ const ZP = /* @__PURE__ */ Rg(WP), Tn = (t) => {
|
|
|
42302
42324
|
}), yg = (t, e) => {
|
|
42303
42325
|
t = hk(t);
|
|
42304
42326
|
const r = Tn(e);
|
|
42305
|
-
return Pd(r) ? Bs(t, r) :
|
|
42327
|
+
return Pd(r) ? Bs(t, r) : Hn(t, r);
|
|
42306
42328
|
}, ec = Object.assign(async (t, e) => {
|
|
42307
42329
|
t = hk(t);
|
|
42308
42330
|
const r = Tn(e);
|
|
42309
|
-
return vg(r) ? Xu(t, r) :
|
|
42331
|
+
return vg(r) ? Xu(t, r) : si(t, r);
|
|
42310
42332
|
}, {
|
|
42311
42333
|
mkdirpSync: yg,
|
|
42312
42334
|
mkdirpNative: Xu,
|
|
42313
42335
|
mkdirpNativeSync: Bs,
|
|
42314
|
-
mkdirpManual:
|
|
42315
|
-
mkdirpManualSync:
|
|
42336
|
+
mkdirpManual: si,
|
|
42337
|
+
mkdirpManualSync: Hn,
|
|
42316
42338
|
sync: yg,
|
|
42317
42339
|
native: Xu,
|
|
42318
42340
|
nativeSync: Bs,
|
|
42319
|
-
manual:
|
|
42320
|
-
manualSync:
|
|
42341
|
+
manual: si,
|
|
42342
|
+
manualSync: Hn,
|
|
42321
42343
|
useNative: vg,
|
|
42322
42344
|
useNativeSync: Pd
|
|
42323
42345
|
}), { pki: ar, md: Sg } = eR, bg = [
|
|
@@ -42569,7 +42591,7 @@ class oD extends $g.EventEmitter {
|
|
|
42569
42591
|
}), !0), this.end = (i) => i ? e._onResponseData(r, i, (n, o) => n ? e._onError("ON_RESPONSE_DATA_ERROR", r, n) : e._onResponseEnd(r, (s) => s ? e._onError("ON_RESPONSE_END_ERROR", r, s) : r.proxyToClientResponse.end(o || void 0))) : e._onResponseEnd(r, (n) => n ? e._onError("ON_RESPONSE_END_ERROR", r, n) : r.proxyToClientResponse.end(i || void 0)), this;
|
|
42570
42592
|
}
|
|
42571
42593
|
}
|
|
42572
|
-
let tc = class
|
|
42594
|
+
let tc = class ni {
|
|
42573
42595
|
ca;
|
|
42574
42596
|
connectRequests = {};
|
|
42575
42597
|
forceSNI;
|
|
@@ -42930,7 +42952,7 @@ let tc = class ri {
|
|
|
42930
42952
|
a.on("message", n._onWebSocketFrame.bind(n, s, "message", !1)), a.on("ping", n._onWebSocketFrame.bind(n, s, "ping", !1)), a.on("pong", n._onWebSocketFrame.bind(n, s, "pong", !1)), a.on("error", n._onWebSocketError.bind(n, s)), a._socket.on("error", n._onWebSocketError.bind(n, s)), a.on("close", n._onWebSocketClose.bind(n, s, !1)), a._socket.pause();
|
|
42931
42953
|
let u;
|
|
42932
42954
|
if (i.url == "" || /^\//.test(i.url)) {
|
|
42933
|
-
const h =
|
|
42955
|
+
const h = ni.parseHostAndPort(i), f = s.isSSL ? "wss" : "ws", _ = h.port ? ":" + h.port : "";
|
|
42934
42956
|
u = `${f}://${h.host}${_}${i.url}`;
|
|
42935
42957
|
} else
|
|
42936
42958
|
u = i.url;
|
|
@@ -43012,7 +43034,7 @@ let tc = class ri {
|
|
|
43012
43034
|
}
|
|
43013
43035
|
};
|
|
43014
43036
|
o.clientToProxyRequest.on("error", n._onError.bind(n, "CLIENT_TO_PROXY_REQUEST_ERROR", o)), o.proxyToClientResponse.on("error", n._onError.bind(n, "PROXY_TO_CLIENT_RESPONSE_ERROR", o)), o.clientToProxyRequest.pause();
|
|
43015
|
-
const s =
|
|
43037
|
+
const s = ni.parseHostAndPort(o.clientToProxyRequest, o.isSSL ? 443 : 80);
|
|
43016
43038
|
function a(c) {
|
|
43017
43039
|
return c.on("error", n._onError.bind(n, "SERVER_TO_PROXY_RESPONSE_ERROR", o)), c.pause(), o.serverToProxyResponse = c, n._onResponse(o, (l) => {
|
|
43018
43040
|
if (l)
|
|
@@ -43023,7 +43045,7 @@ let tc = class ri {
|
|
|
43023
43045
|
return n._onError("ON_RESPONSEHEADERS_ERROR", o, h);
|
|
43024
43046
|
o.proxyToClientResponse.writeHead(
|
|
43025
43047
|
m.statusCode,
|
|
43026
|
-
|
|
43048
|
+
ni.filterAndCanonizeHeaders(m.headers)
|
|
43027
43049
|
), o.responseFilters.push(new oD(n, o));
|
|
43028
43050
|
let f = m;
|
|
43029
43051
|
return o.responseFilters.forEach((_) => {
|
|
@@ -43167,7 +43189,7 @@ let tc = class ri {
|
|
|
43167
43189
|
}
|
|
43168
43190
|
static parseHostAndPort(e, r) {
|
|
43169
43191
|
const i = e.url.match(/^http:\/\/([^/]+)(.*)/);
|
|
43170
|
-
return i ? (e.url = i[2] || "/",
|
|
43192
|
+
return i ? (e.url = i[2] || "/", ni.parseHost(i[1], r)) : e.headers.host ? ni.parseHost(e.headers.host, r) : null;
|
|
43171
43193
|
}
|
|
43172
43194
|
static parseHost(e, r) {
|
|
43173
43195
|
if (e.match(/^http:\/\/(.*)/)) {
|
|
@@ -43196,8 +43218,8 @@ var sD = Object.defineProperty, aD = Object.getOwnPropertyDescriptor, uD = (t, e
|
|
|
43196
43218
|
for (var n = i > 1 ? void 0 : i ? aD(e, r) : e, o = t.length - 1, s; o >= 0; o--)
|
|
43197
43219
|
(s = t[o]) && (n = s(n) || n);
|
|
43198
43220
|
return n;
|
|
43199
|
-
},
|
|
43200
|
-
let
|
|
43221
|
+
}, ti = (t, e) => (r, i) => e(r, i, t), lD = (t, e, r) => uD(t, e + "", r);
|
|
43222
|
+
let Si = class {
|
|
43201
43223
|
constructor(t, e, r, i, n, o) {
|
|
43202
43224
|
this.logger = t, this.certManager = e, this.router = r, this.llmParser = i, this.llmProvider = n, this.llmInstrumentConsumer = o, this.proxy = new tc(this.logger);
|
|
43203
43225
|
}
|
|
@@ -43239,7 +43261,7 @@ let yi = class {
|
|
|
43239
43261
|
}
|
|
43240
43262
|
this.port = t || await this.findAvailablePort(8081 + e);
|
|
43241
43263
|
const r = await this.certManager.getOrCreateRootCA();
|
|
43242
|
-
return this.proxy.use(tc.wildcard), this.proxy.use(tc.gunzip), this.proxy.sslCaDir =
|
|
43264
|
+
return this.proxy.use(tc.wildcard), this.proxy.use(tc.gunzip), this.proxy.sslCaDir = ii.dirname(r.caCertPath), this.proxy.onConnect((i, n, o, s) => {
|
|
43243
43265
|
const [a, u] = (i.url || "").split(":"), c = parseInt(u, 10) || 443;
|
|
43244
43266
|
if (a && this.shouldInterceptDomain(a)) {
|
|
43245
43267
|
this.logger.debug(`Intercepting HTTPS connection to: ${a}`);
|
|
@@ -43269,9 +43291,9 @@ let yi = class {
|
|
|
43269
43291
|
const o = process.hrtime.bigint(), s = (i.isSSL ? "https://" : "http://") + i.clientToProxyRequest.headers.host + i.clientToProxyRequest.url, a = i.clientToProxyRequest.method || "GET", u = lt(), l = i.connectRequest?.headers?.["proxy-authorization"] || i.clientToProxyRequest.headers["proxy-authorization"], m = this.extractSessionIdFromProxyAuth(l) || "global", h = [], f = [];
|
|
43270
43292
|
let _ = "";
|
|
43271
43293
|
this.llmProvider.isLLMCall(s) && this.logger.info(`LLM API Request: ${a} ${s}`), i.onRequestData((v, k, p) => {
|
|
43272
|
-
h.reduce((b, w) => b + w.length, 0) + k.length <=
|
|
43294
|
+
h.reduce((b, w) => b + w.length, 0) + k.length <= Si.MAX_BODY_BUFFER_SIZE && h.push(k), p(null, k);
|
|
43273
43295
|
}), i.onResponseData((v, k, p) => {
|
|
43274
|
-
if (f.reduce((b, w) => b + w.length, 0) + k.length <=
|
|
43296
|
+
if (f.reduce((b, w) => b + w.length, 0) + k.length <= Si.MAX_BODY_BUFFER_SIZE && f.push(k), this.llmProvider.isLLMCall(s)) {
|
|
43275
43297
|
const b = k.toString("utf8");
|
|
43276
43298
|
if (b.includes("data:") || b.includes("event:")) {
|
|
43277
43299
|
const w = {
|
|
@@ -43358,7 +43380,7 @@ let yi = class {
|
|
|
43358
43380
|
}), n();
|
|
43359
43381
|
}), new Promise((i, n) => {
|
|
43360
43382
|
this.proxy.listen(
|
|
43361
|
-
{ port: this.port, sslCaDir:
|
|
43383
|
+
{ port: this.port, sslCaDir: ii.dirname(r.caCertPath), host: "0.0.0.0" },
|
|
43362
43384
|
async (o) => {
|
|
43363
43385
|
if (o)
|
|
43364
43386
|
if (o.code === "EADDRINUSE" && e < 10) {
|
|
@@ -43451,16 +43473,16 @@ let yi = class {
|
|
|
43451
43473
|
return (await this.certManager.getOrCreateRootCA()).caCertPath;
|
|
43452
43474
|
}
|
|
43453
43475
|
};
|
|
43454
|
-
lD(
|
|
43455
|
-
|
|
43476
|
+
lD(Si, "MAX_BODY_BUFFER_SIZE", 10 * 1024 * 1024);
|
|
43477
|
+
Si = cD([
|
|
43456
43478
|
xe(),
|
|
43457
|
-
|
|
43458
|
-
|
|
43459
|
-
|
|
43460
|
-
|
|
43461
|
-
|
|
43462
|
-
|
|
43463
|
-
],
|
|
43479
|
+
ti(0, H(F.Logger)),
|
|
43480
|
+
ti(1, H(Re.CertManager)),
|
|
43481
|
+
ti(2, H(Re.LlmRouter)),
|
|
43482
|
+
ti(3, H(Re.LlmParser)),
|
|
43483
|
+
ti(4, H(Re.LlmProvider)),
|
|
43484
|
+
ti(5, H(Re.LLMInstrumentConsumer))
|
|
43485
|
+
], Si);
|
|
43464
43486
|
var pD = Object.getOwnPropertyDescriptor, dD = (t, e, r, i) => {
|
|
43465
43487
|
for (var n = i > 1 ? void 0 : i ? pD(e, r) : e, o = t.length - 1, s; o >= 0; o--)
|
|
43466
43488
|
(s = t[o]) && (n = s(n) || n);
|
|
@@ -43500,11 +43522,11 @@ kg = dD([
|
|
|
43500
43522
|
], kg);
|
|
43501
43523
|
function hD() {
|
|
43502
43524
|
return new Jr(({ bind: t }) => {
|
|
43503
|
-
t(Re.CertManager).to(tl).inSingletonScope(), t(Re.LLMInstrumentConsumer).to(el).inSingletonScope(), t(Re.MitmProxyService).to(
|
|
43525
|
+
t(Re.CertManager).to(tl).inSingletonScope(), t(Re.LLMInstrumentConsumer).to(el).inSingletonScope(), t(Re.MitmProxyService).to(Si).inSingletonScope();
|
|
43504
43526
|
});
|
|
43505
43527
|
}
|
|
43506
43528
|
const gD = () => new Jr((t) => {
|
|
43507
|
-
t.bind(F.Store).toConstantValue(
|
|
43529
|
+
t.bind(F.Store).toConstantValue(to), t.bind(F.StateManager).to(Rc).inSingletonScope();
|
|
43508
43530
|
});
|
|
43509
43531
|
var mD = Object.getOwnPropertyDescriptor, _D = (t, e, r, i) => {
|
|
43510
43532
|
for (var n = i > 1 ? void 0 : i ? mD(e, r) : e, o = t.length - 1, s; o >= 0; o--)
|
|
@@ -43513,7 +43535,7 @@ var mD = Object.getOwnPropertyDescriptor, _D = (t, e, r, i) => {
|
|
|
43513
43535
|
}, gn = (t, e) => (r, i) => e(r, i, t);
|
|
43514
43536
|
let ll = class {
|
|
43515
43537
|
constructor(t, e, r, i, n, o, s, a) {
|
|
43516
|
-
this.logger = t, this.configManager = e, this.credentials = r, this.httpService = i, this.wsService = n, this.multiplexBroker = o, this.mitmProxy = s, this.store = a ||
|
|
43538
|
+
this.logger = t, this.configManager = e, this.credentials = r, this.httpService = i, this.wsService = n, this.multiplexBroker = o, this.mitmProxy = s, this.store = a || to;
|
|
43517
43539
|
}
|
|
43518
43540
|
options;
|
|
43519
43541
|
daemonRegistration = null;
|
|
@@ -43613,7 +43635,7 @@ let ll = class {
|
|
|
43613
43635
|
const i = this.store.getState().agentTabs.tabs;
|
|
43614
43636
|
if (i.length > 0) {
|
|
43615
43637
|
for (const n of i)
|
|
43616
|
-
this.store.dispatch(
|
|
43638
|
+
this.store.dispatch(Gn(n.id));
|
|
43617
43639
|
await new Promise((n) => setTimeout(n, 1e3));
|
|
43618
43640
|
} else
|
|
43619
43641
|
this.logger.info("No active agents to stop");
|
|
@@ -43642,7 +43664,7 @@ let ll = class {
|
|
|
43642
43664
|
* Terminate a specific session - required for sessionManager interface
|
|
43643
43665
|
*/
|
|
43644
43666
|
async terminateSession(t) {
|
|
43645
|
-
this.store.dispatch(
|
|
43667
|
+
this.store.dispatch(Gn(t));
|
|
43646
43668
|
}
|
|
43647
43669
|
};
|
|
43648
43670
|
ll = _D([
|
|
@@ -43809,17 +43831,17 @@ export {
|
|
|
43809
43831
|
yc as aI,
|
|
43810
43832
|
Tf as aJ,
|
|
43811
43833
|
Ic as aK,
|
|
43812
|
-
|
|
43834
|
+
qn as aL,
|
|
43813
43835
|
Sc as aM,
|
|
43814
43836
|
bc as aN,
|
|
43815
43837
|
CI as aO,
|
|
43816
|
-
|
|
43838
|
+
ji as aP,
|
|
43817
43839
|
aO as aQ,
|
|
43818
43840
|
vs as aR,
|
|
43819
43841
|
ys as aS,
|
|
43820
43842
|
kc as aT,
|
|
43821
43843
|
UI as aU,
|
|
43822
|
-
|
|
43844
|
+
oi as aV,
|
|
43823
43845
|
dO as aW,
|
|
43824
43846
|
xc as aX,
|
|
43825
43847
|
VI as aY,
|
|
@@ -43850,7 +43872,7 @@ export {
|
|
|
43850
43872
|
vb as aw,
|
|
43851
43873
|
qc as ax,
|
|
43852
43874
|
Vc as ay,
|
|
43853
|
-
|
|
43875
|
+
Ji as az,
|
|
43854
43876
|
pt as b,
|
|
43855
43877
|
Cc as b0,
|
|
43856
43878
|
Tc as b1,
|
|
@@ -43859,10 +43881,10 @@ export {
|
|
|
43859
43881
|
Ac as b4,
|
|
43860
43882
|
jf as b5,
|
|
43861
43883
|
fO as b6,
|
|
43862
|
-
|
|
43884
|
+
Yi as b7,
|
|
43863
43885
|
$c as b8,
|
|
43864
43886
|
Rc as b9,
|
|
43865
|
-
|
|
43887
|
+
Co as ba,
|
|
43866
43888
|
uO as bb,
|
|
43867
43889
|
Qe as bc,
|
|
43868
43890
|
cO as bd,
|
|
@@ -43871,7 +43893,7 @@ export {
|
|
|
43871
43893
|
pO as bg,
|
|
43872
43894
|
DI as bh,
|
|
43873
43895
|
OI as bi,
|
|
43874
|
-
|
|
43896
|
+
wi as bj,
|
|
43875
43897
|
uu as bk,
|
|
43876
43898
|
SO as bl,
|
|
43877
43899
|
bO as bm,
|
|
@@ -43884,7 +43906,7 @@ export {
|
|
|
43884
43906
|
U$ as bt,
|
|
43885
43907
|
q$ as bu,
|
|
43886
43908
|
P$ as bv,
|
|
43887
|
-
|
|
43909
|
+
to as bw,
|
|
43888
43910
|
Rg as bx,
|
|
43889
43911
|
Re as by,
|
|
43890
43912
|
tn as c,
|
|
@@ -43912,4 +43934,4 @@ export {
|
|
|
43912
43934
|
YC as y,
|
|
43913
43935
|
LC as z
|
|
43914
43936
|
};
|
|
43915
|
-
//# sourceMappingURL=index-
|
|
43937
|
+
//# sourceMappingURL=index-oo6DLQ9J.mjs.map
|