@agiflowai/agent-cli 0.1.5 → 0.1.7
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 +8 -0
- package/dist/claudeNotification.js +143 -148
- 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-CHMlUeQp.mjs → index-B0CN_utb.mjs} +2396 -2176
- package/dist/index-B0CN_utb.mjs.map +1 -0
- package/dist/{index-De2eOUVb.mjs → index-BW0p4wl1.mjs} +2 -2
- package/dist/index-BW0p4wl1.mjs.map +1 -0
- package/dist/{index-CT9j6u1g.mjs → index-CLbzXWKM.mjs} +2 -2
- package/dist/index-CLbzXWKM.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-CHMlUeQp.mjs.map +0 -1
- package/dist/index-CT9j6u1g.mjs.map +0 -1
- package/dist/index-De2eOUVb.mjs.map +0 -1
|
@@ -10327,7 +10327,7 @@ ue({
|
|
|
10327
10327
|
channel: ne()
|
|
10328
10328
|
})
|
|
10329
10329
|
});
|
|
10330
|
-
|
|
10330
|
+
ue({
|
|
10331
10331
|
eventType: ce("agent-rpc-request").default("agent-rpc-request"),
|
|
10332
10332
|
command: ce("request").default("request"),
|
|
10333
10333
|
payload: ue({
|
|
@@ -10357,15 +10357,16 @@ ue({
|
|
|
10357
10357
|
id: tt([ne(), ke(), _n()])
|
|
10358
10358
|
})
|
|
10359
10359
|
});
|
|
10360
|
-
const
|
|
10361
|
-
|
|
10362
|
-
|
|
10360
|
+
const mp = (e, t, r) => ({
|
|
10361
|
+
eventType: "agent-idle-prompt",
|
|
10362
|
+
command: "request",
|
|
10363
|
+
traceId: Cd(),
|
|
10364
|
+
target: { type: "agent" },
|
|
10363
10365
|
payload: {
|
|
10364
|
-
|
|
10365
|
-
|
|
10366
|
-
|
|
10367
|
-
|
|
10368
|
-
id: Cd()
|
|
10366
|
+
sessionId: e,
|
|
10367
|
+
timestamp: Date.now(),
|
|
10368
|
+
message: t || "Claude is waiting for user input",
|
|
10369
|
+
metadata: r
|
|
10369
10370
|
}
|
|
10370
10371
|
});
|
|
10371
10372
|
function X(e) {
|
|
@@ -10615,7 +10616,7 @@ function Hl(e, t) {
|
|
|
10615
10616
|
function st(e) {
|
|
10616
10617
|
return e.isRight ? { isRight: !0, value: e.value } : e;
|
|
10617
10618
|
}
|
|
10618
|
-
function
|
|
10619
|
+
function gp(e) {
|
|
10619
10620
|
switch (e.type) {
|
|
10620
10621
|
case M.ConstantValue:
|
|
10621
10622
|
case M.DynamicValue:
|
|
@@ -10651,19 +10652,19 @@ function pp(e) {
|
|
|
10651
10652
|
}(rt || (rt = {})), function(e) {
|
|
10652
10653
|
e.id = "id", e.moduleId = "moduleId", e.serviceId = "serviceId";
|
|
10653
10654
|
}(oe || (oe = {}));
|
|
10654
|
-
let
|
|
10655
|
+
let vp = class Xl extends Dt {
|
|
10655
10656
|
_buildNewInstance(t) {
|
|
10656
10657
|
return new Xl(t);
|
|
10657
10658
|
}
|
|
10658
10659
|
_cloneModel(t) {
|
|
10659
|
-
return
|
|
10660
|
+
return gp(t);
|
|
10660
10661
|
}
|
|
10661
10662
|
}, Do = class Wn {
|
|
10662
10663
|
#e;
|
|
10663
10664
|
#t;
|
|
10664
10665
|
#r;
|
|
10665
10666
|
constructor(t, r, i) {
|
|
10666
|
-
this.#t = i ?? new
|
|
10667
|
+
this.#t = i ?? new vp({ id: { isOptional: !1 }, moduleId: { isOptional: !0 }, serviceId: { isOptional: !1 } }), this.#r = t, this.#e = r;
|
|
10667
10668
|
}
|
|
10668
10669
|
static build(t, r) {
|
|
10669
10670
|
return new Wn(t, r);
|
|
@@ -10755,31 +10756,31 @@ let Ao = class Kn {
|
|
|
10755
10756
|
this.#e.removeByRelation(pt.serviceId, t);
|
|
10756
10757
|
}
|
|
10757
10758
|
};
|
|
10758
|
-
function
|
|
10759
|
+
function pp() {
|
|
10759
10760
|
return 0;
|
|
10760
10761
|
}
|
|
10761
|
-
function
|
|
10762
|
+
function hp(e) {
|
|
10762
10763
|
return (t) => {
|
|
10763
|
-
t !== void 0 && t.kind === rt.unknown && He(e, ql,
|
|
10764
|
+
t !== void 0 && t.kind === rt.unknown && He(e, ql, pp, (r) => r - 1);
|
|
10764
10765
|
};
|
|
10765
10766
|
}
|
|
10766
|
-
function
|
|
10767
|
+
function bp(e, t) {
|
|
10767
10768
|
return (...r) => (i) => {
|
|
10768
10769
|
if (i === void 0) return e(...r);
|
|
10769
10770
|
if (i.kind === le.unmanaged) throw new B(F.injectionDecoratorConflict, "Unexpected injection found. Multiple @inject, @multiInject or @unmanaged decorators found");
|
|
10770
10771
|
return t(i, ...r);
|
|
10771
10772
|
};
|
|
10772
10773
|
}
|
|
10773
|
-
function
|
|
10774
|
+
function yp(e) {
|
|
10774
10775
|
if (e.kind !== rt.unknown && e.isFromTypescriptParamType !== !0) throw new B(F.injectionDecoratorConflict, "Unexpected injection found. Multiple @inject, @multiInject or @unmanaged decorators found");
|
|
10775
10776
|
}
|
|
10776
10777
|
(function(e) {
|
|
10777
10778
|
e[e.multipleInjection = 0] = "multipleInjection", e[e.singleInjection = 1] = "singleInjection", e[e.unmanaged = 2] = "unmanaged";
|
|
10778
10779
|
})(le || (le = {}));
|
|
10779
|
-
const
|
|
10780
|
+
const _p = bp(function(e, t, r) {
|
|
10780
10781
|
return e === le.multipleInjection ? { chained: r?.chained ?? !1, kind: e, name: void 0, optional: !1, tags: /* @__PURE__ */ new Map(), value: t } : { kind: e, name: void 0, optional: !1, tags: /* @__PURE__ */ new Map(), value: t };
|
|
10781
10782
|
}, function(e, t, r, i) {
|
|
10782
|
-
return
|
|
10783
|
+
return yp(e), t === le.multipleInjection ? { ...e, chained: i?.chained ?? !1, kind: t, value: r } : { ...e, kind: t, value: r };
|
|
10783
10784
|
});
|
|
10784
10785
|
function Co(e, t) {
|
|
10785
10786
|
return (r) => {
|
|
@@ -10788,7 +10789,7 @@ function Co(e, t) {
|
|
|
10788
10789
|
};
|
|
10789
10790
|
}
|
|
10790
10791
|
var Ne;
|
|
10791
|
-
function
|
|
10792
|
+
function $p(e, t, r, i) {
|
|
10792
10793
|
if (B.isErrorOfKind(i, F.injectionDecoratorConflict)) {
|
|
10793
10794
|
const n = function(o, a, s) {
|
|
10794
10795
|
if (s === void 0) {
|
|
@@ -10818,7 +10819,7 @@ ${function(o) {
|
|
|
10818
10819
|
}
|
|
10819
10820
|
throw i;
|
|
10820
10821
|
}
|
|
10821
|
-
function
|
|
10822
|
+
function wp(e, t) {
|
|
10822
10823
|
return (r, i, n) => {
|
|
10823
10824
|
try {
|
|
10824
10825
|
n === void 0 ? function(o, a) {
|
|
@@ -10851,7 +10852,7 @@ Found @inject decorator at method "${c.toString()}" at class "${u.constructor.na
|
|
|
10851
10852
|
};
|
|
10852
10853
|
}(e, t)(r, i, n);
|
|
10853
10854
|
} catch (o) {
|
|
10854
|
-
|
|
10855
|
+
$p(r, i, n, o);
|
|
10855
10856
|
}
|
|
10856
10857
|
};
|
|
10857
10858
|
}
|
|
@@ -10862,18 +10863,18 @@ function An(e, t) {
|
|
|
10862
10863
|
};
|
|
10863
10864
|
}
|
|
10864
10865
|
function ge(e) {
|
|
10865
|
-
return
|
|
10866
|
+
return wp(_p(le.singleInjection, e), hp);
|
|
10866
10867
|
}
|
|
10867
10868
|
(function(e) {
|
|
10868
10869
|
e[e.method = 0] = "method", e[e.parameter = 1] = "parameter", e[e.property = 2] = "property";
|
|
10869
10870
|
})(Ne || (Ne = {}));
|
|
10870
|
-
const Ro = "@inversifyjs/core/classIsInjectableFlagReflectKey",
|
|
10871
|
-
function
|
|
10871
|
+
const Ro = "@inversifyjs/core/classIsInjectableFlagReflectKey", Ip = [Array, BigInt, Boolean, Function, Number, Object, String];
|
|
10872
|
+
function kp(e) {
|
|
10872
10873
|
const t = nt(e, "design:paramtypes");
|
|
10873
10874
|
t !== void 0 && He(e, gt, vt, /* @__PURE__ */ function(r) {
|
|
10874
10875
|
return (i) => (r.forEach((n, o) => {
|
|
10875
10876
|
var a;
|
|
10876
|
-
i.constructorArguments[o] !== void 0 || (a = n,
|
|
10877
|
+
i.constructorArguments[o] !== void 0 || (a = n, Ip.includes(a)) || (i.constructorArguments[o] = function(s) {
|
|
10877
10878
|
return { isFromTypescriptParamType: !0, kind: le.singleInjection, name: void 0, optional: !1, tags: /* @__PURE__ */ new Map(), value: s };
|
|
10878
10879
|
}(n));
|
|
10879
10880
|
}), i);
|
|
@@ -10884,14 +10885,14 @@ function je(e) {
|
|
|
10884
10885
|
(function(r) {
|
|
10885
10886
|
if (nt(r, Ro) !== void 0) throw new B(F.injectionDecoratorConflict, `Cannot apply @injectable decorator multiple times at class "${r.name}"`);
|
|
10886
10887
|
Wl(r, Ro, !0);
|
|
10887
|
-
})(t),
|
|
10888
|
+
})(t), kp(t);
|
|
10888
10889
|
};
|
|
10889
10890
|
}
|
|
10890
10891
|
var ze;
|
|
10891
10892
|
function Bi(e) {
|
|
10892
10893
|
return e instanceof Error ? e instanceof RangeError && /stack space|call stack|too much recursion/i.test(e.message) || e.name === "InternalError" && /too much recursion/.test(e.message) : !1;
|
|
10893
10894
|
}
|
|
10894
|
-
function
|
|
10895
|
+
function Sp(e, t) {
|
|
10895
10896
|
if (Bi(t)) {
|
|
10896
10897
|
const r = function(i) {
|
|
10897
10898
|
const n = [...i];
|
|
@@ -11136,7 +11137,7 @@ function Zo(e, t, r, i) {
|
|
|
11136
11137
|
t.setPlan(e, n);
|
|
11137
11138
|
} else t.setNonCachedServiceNode(r, i);
|
|
11138
11139
|
}
|
|
11139
|
-
class
|
|
11140
|
+
class zp extends se {
|
|
11140
11141
|
#e;
|
|
11141
11142
|
#t;
|
|
11142
11143
|
#r;
|
|
@@ -11148,7 +11149,7 @@ class jp extends se {
|
|
|
11148
11149
|
return this.#t(this.#e, this.#r, this.#n);
|
|
11149
11150
|
}
|
|
11150
11151
|
}
|
|
11151
|
-
class
|
|
11152
|
+
class Op extends se {
|
|
11152
11153
|
#e;
|
|
11153
11154
|
#t;
|
|
11154
11155
|
#r;
|
|
@@ -11182,7 +11183,7 @@ function ad(e, t, r, i) {
|
|
|
11182
11183
|
const S = m.operations.getPlan(g);
|
|
11183
11184
|
if (S !== void 0 && S.tree.root.isContextFree) return S.tree.root;
|
|
11184
11185
|
}
|
|
11185
|
-
const _ = f(m, y, p), I = new
|
|
11186
|
+
const _ = f(m, y, p), I = new zp(m, c, y, p, _);
|
|
11186
11187
|
return Zo(g, m.operations, I, { bindingConstraintsList: y, chainedBindings: p.kind === le.multipleInjection && p.chained, optionalBindings: p.optional }), I;
|
|
11187
11188
|
};
|
|
11188
11189
|
}(a, s);
|
|
@@ -11215,7 +11216,7 @@ function ad(e, t, r, i) {
|
|
|
11215
11216
|
const S = m.operations.getPlan(g);
|
|
11216
11217
|
if (S !== void 0 && S.tree.root.isContextFree) return S.tree.root;
|
|
11217
11218
|
}
|
|
11218
|
-
const _ = f(m, y, p), I = new
|
|
11219
|
+
const _ = f(m, y, p), I = new Op(m, c, y, p, _);
|
|
11219
11220
|
return Zo(g, m.operations, I, { bindingConstraintsList: y, chainedBindings: p.kind === ze.multipleInjection && p.chained, optionalBindings: p.optional }), I;
|
|
11220
11221
|
};
|
|
11221
11222
|
}(a, s);
|
|
@@ -11227,7 +11228,7 @@ function ad(e, t, r, i) {
|
|
|
11227
11228
|
}(t, i);
|
|
11228
11229
|
return (a, s) => a.node.binding.type === M.Instance ? n(a, a.node, s) : o(a, a.node, s);
|
|
11229
11230
|
}
|
|
11230
|
-
class
|
|
11231
|
+
class jp extends se {
|
|
11231
11232
|
#e;
|
|
11232
11233
|
constructor(t, r) {
|
|
11233
11234
|
super(r, r.serviceIdentifier), this.#e = t;
|
|
@@ -11251,23 +11252,23 @@ const cd = /* @__PURE__ */ function(e) {
|
|
|
11251
11252
|
return s;
|
|
11252
11253
|
};
|
|
11253
11254
|
}(sd);
|
|
11254
|
-
function
|
|
11255
|
+
function xp(e) {
|
|
11255
11256
|
try {
|
|
11256
11257
|
const t = function(o) {
|
|
11257
11258
|
return o.rootConstraints.isMultiple ? { chained: o.rootConstraints.chained, isMultiple: !0, name: o.rootConstraints.name, optional: o.rootConstraints.isOptional ?? !1, serviceIdentifier: o.rootConstraints.serviceIdentifier, tag: o.rootConstraints.tag } : { isMultiple: !1, name: o.rootConstraints.name, optional: o.rootConstraints.isOptional ?? !1, serviceIdentifier: o.rootConstraints.serviceIdentifier, tag: o.rootConstraints.tag };
|
|
11258
11259
|
}(e), r = e.operations.getPlan(t);
|
|
11259
11260
|
if (r !== void 0) return r;
|
|
11260
|
-
const i = cd(e), n = { tree: { root: new
|
|
11261
|
+
const i = cd(e), n = { tree: { root: new jp(e, i) } };
|
|
11261
11262
|
return e.operations.setPlan(t, n), n;
|
|
11262
11263
|
} catch (t) {
|
|
11263
|
-
|
|
11264
|
+
Sp(e, t);
|
|
11264
11265
|
}
|
|
11265
11266
|
}
|
|
11266
11267
|
var be;
|
|
11267
11268
|
(function(e) {
|
|
11268
11269
|
e.bindingAdded = "bindingAdded", e.bindingRemoved = "bindingRemoved";
|
|
11269
11270
|
})(be || (be = {}));
|
|
11270
|
-
class
|
|
11271
|
+
class Ep {
|
|
11271
11272
|
#e;
|
|
11272
11273
|
#t;
|
|
11273
11274
|
#r;
|
|
@@ -11301,10 +11302,10 @@ class Up {
|
|
|
11301
11302
|
}
|
|
11302
11303
|
}
|
|
11303
11304
|
const Vi = od(ad(Hn, Xn, function(e, t, r) {
|
|
11304
|
-
return
|
|
11305
|
+
return Np(e, t, r);
|
|
11305
11306
|
}, function(e, t, r) {
|
|
11306
|
-
return
|
|
11307
|
-
})),
|
|
11307
|
+
return Up(e, t, r);
|
|
11308
|
+
})), Np = function(e) {
|
|
11308
11309
|
const t = rd(e);
|
|
11309
11310
|
return (r, i, n) => {
|
|
11310
11311
|
try {
|
|
@@ -11314,7 +11315,7 @@ const Vi = od(ad(Hn, Xn, function(e, t, r) {
|
|
|
11314
11315
|
throw o;
|
|
11315
11316
|
}
|
|
11316
11317
|
};
|
|
11317
|
-
}(Vi),
|
|
11318
|
+
}(Vi), Up = function(e) {
|
|
11318
11319
|
const t = id(e);
|
|
11319
11320
|
return (r, i, n) => {
|
|
11320
11321
|
try {
|
|
@@ -11370,7 +11371,7 @@ class Fo {
|
|
|
11370
11371
|
#i;
|
|
11371
11372
|
#o;
|
|
11372
11373
|
constructor() {
|
|
11373
|
-
this.#e = /* @__PURE__ */ new Map(), this.#t = this.#a(), this.#r = this.#a(), this.#n = this.#a(), this.#i = this.#a(), this.#o = new
|
|
11374
|
+
this.#e = /* @__PURE__ */ new Map(), this.#t = this.#a(), this.#r = this.#a(), this.#n = this.#a(), this.#i = this.#a(), this.#o = new Ep();
|
|
11374
11375
|
}
|
|
11375
11376
|
clearCache() {
|
|
11376
11377
|
for (const t of this.#d()) t.clear();
|
|
@@ -11498,7 +11499,7 @@ class Fo {
|
|
|
11498
11499
|
var a, s, u;
|
|
11499
11500
|
}
|
|
11500
11501
|
}
|
|
11501
|
-
function
|
|
11502
|
+
function Tp(e, t) {
|
|
11502
11503
|
if (Bi(t)) {
|
|
11503
11504
|
const r = function(i) {
|
|
11504
11505
|
const n = [...i];
|
|
@@ -11553,7 +11554,7 @@ function ld(e, t) {
|
|
|
11553
11554
|
function Go(e, t) {
|
|
11554
11555
|
return e.cache = { isRight: !0, value: t }, t;
|
|
11555
11556
|
}
|
|
11556
|
-
function
|
|
11557
|
+
function Pp(e, t, r) {
|
|
11557
11558
|
const i = e.getActivations(t);
|
|
11558
11559
|
return i === void 0 ? r : X(r) ? Vo(e, r, i[Symbol.iterator]()) : function(n, o, a) {
|
|
11559
11560
|
let s = o, u = a.next();
|
|
@@ -11576,15 +11577,15 @@ function Jt(e, t, r) {
|
|
|
11576
11577
|
const n = t.onActivation;
|
|
11577
11578
|
i = X(i) ? i.then((o) => n(e.context, o)) : n(e.context, i);
|
|
11578
11579
|
}
|
|
11579
|
-
return
|
|
11580
|
+
return Pp(e, t.serviceIdentifier, i);
|
|
11580
11581
|
}
|
|
11581
11582
|
function Ji(e) {
|
|
11582
11583
|
return (t, r) => r.cache.isRight ? r.cache.value : ld(r, Jt(t, r, e(t, r)));
|
|
11583
11584
|
}
|
|
11584
|
-
const
|
|
11585
|
+
const Dp = Ji(function(e, t) {
|
|
11585
11586
|
return t.value;
|
|
11586
11587
|
});
|
|
11587
|
-
function
|
|
11588
|
+
function Ap(e) {
|
|
11588
11589
|
return e;
|
|
11589
11590
|
}
|
|
11590
11591
|
function Wi(e, t) {
|
|
@@ -11603,9 +11604,9 @@ function Wi(e, t) {
|
|
|
11603
11604
|
}
|
|
11604
11605
|
};
|
|
11605
11606
|
}
|
|
11606
|
-
const
|
|
11607
|
+
const Cp = ((e) => Wi(Ap, e))(function(e, t) {
|
|
11607
11608
|
return t.value(e.context);
|
|
11608
|
-
}),
|
|
11609
|
+
}), Rp = Ji(function(e, t) {
|
|
11609
11610
|
return t.factory(e.context);
|
|
11610
11611
|
});
|
|
11611
11612
|
function Jo(e, t, r) {
|
|
@@ -11642,13 +11643,13 @@ function Ko(e) {
|
|
|
11642
11643
|
return X(o) ? o.then(() => Wo(n, i.binding, i.classMetadata.lifecycle.postConstructMethodNames)) : Wo(n, i.binding, i.classMetadata.lifecycle.postConstructMethodNames);
|
|
11643
11644
|
};
|
|
11644
11645
|
}
|
|
11645
|
-
const
|
|
11646
|
+
const Mp = Ji(function(e, t) {
|
|
11646
11647
|
return t.provider(e.context);
|
|
11647
11648
|
});
|
|
11648
|
-
function
|
|
11649
|
+
function Zp(e) {
|
|
11649
11650
|
return e.binding;
|
|
11650
11651
|
}
|
|
11651
|
-
function
|
|
11652
|
+
function Lp(e) {
|
|
11652
11653
|
return e.binding;
|
|
11653
11654
|
}
|
|
11654
11655
|
const qo = /* @__PURE__ */ function(e) {
|
|
@@ -11670,7 +11671,7 @@ const qo = /* @__PURE__ */ function(e) {
|
|
|
11670
11671
|
for (const o of i.redirections) Ve(o) ? n.push(...t(r, o)) : n.push(e(r, o));
|
|
11671
11672
|
return n;
|
|
11672
11673
|
};
|
|
11673
|
-
}(Yn),
|
|
11674
|
+
}(Yn), Bp = /* @__PURE__ */ function(e, t, r) {
|
|
11674
11675
|
return (i, n) => {
|
|
11675
11676
|
const o = e(i, n);
|
|
11676
11677
|
return X(o) ? t(o, i, n) : r(o, i, n);
|
|
@@ -11686,7 +11687,7 @@ const qo = /* @__PURE__ */ function(e) {
|
|
|
11686
11687
|
const n = await t;
|
|
11687
11688
|
return e(n, r, i);
|
|
11688
11689
|
};
|
|
11689
|
-
}(Ko(qo)), Ko(qo)),
|
|
11690
|
+
}(Ko(qo)), Ko(qo)), Fp = /* @__PURE__ */ function(e) {
|
|
11690
11691
|
return (t, r) => {
|
|
11691
11692
|
const i = e(t, r);
|
|
11692
11693
|
return X(i) ? i.then((n) => r.binding.factory(...n)) : r.binding.factory(...i);
|
|
@@ -11697,28 +11698,28 @@ const qo = /* @__PURE__ */ function(e) {
|
|
|
11697
11698
|
for (const n of r.params) i.push(e(t, n));
|
|
11698
11699
|
return i.some(X) ? Promise.all(i) : i;
|
|
11699
11700
|
};
|
|
11700
|
-
}(zn)),
|
|
11701
|
-
function
|
|
11701
|
+
}(zn)), Gp = ((e) => Wi(Zp, e))(Bp), Vp = ((e) => Wi(Lp, e))(Fp);
|
|
11702
|
+
function Jp(e) {
|
|
11702
11703
|
try {
|
|
11703
11704
|
return zn(e, e.planResult.tree.root);
|
|
11704
11705
|
} catch (t) {
|
|
11705
|
-
|
|
11706
|
+
Tp(e, t);
|
|
11706
11707
|
}
|
|
11707
11708
|
}
|
|
11708
11709
|
function Yn(e, t) {
|
|
11709
11710
|
switch (t.binding.type) {
|
|
11710
11711
|
case M.ConstantValue:
|
|
11711
|
-
return
|
|
11712
|
+
return Dp(e, t.binding);
|
|
11712
11713
|
case M.DynamicValue:
|
|
11713
|
-
return
|
|
11714
|
+
return Cp(e, t.binding);
|
|
11714
11715
|
case M.Factory:
|
|
11715
|
-
return
|
|
11716
|
+
return Rp(e, t.binding);
|
|
11716
11717
|
case M.Instance:
|
|
11717
|
-
return
|
|
11718
|
+
return Gp(e, t);
|
|
11718
11719
|
case M.Provider:
|
|
11719
|
-
return
|
|
11720
|
+
return Mp(e, t.binding);
|
|
11720
11721
|
case M.ResolvedValue:
|
|
11721
|
-
return
|
|
11722
|
+
return Vp(e, t);
|
|
11722
11723
|
}
|
|
11723
11724
|
}
|
|
11724
11725
|
function zn(e, t) {
|
|
@@ -11735,7 +11736,7 @@ function zn(e, t) {
|
|
|
11735
11736
|
return Yn(r, i);
|
|
11736
11737
|
}(e, t.bindings);
|
|
11737
11738
|
}
|
|
11738
|
-
function
|
|
11739
|
+
function Wp(e) {
|
|
11739
11740
|
return e.scope !== void 0;
|
|
11740
11741
|
}
|
|
11741
11742
|
function Xo(e, t) {
|
|
@@ -11765,7 +11766,7 @@ async function ea(e, t) {
|
|
|
11765
11766
|
let i = t.next();
|
|
11766
11767
|
for (; i.done !== !0; ) await i.value(r), i = t.next();
|
|
11767
11768
|
}
|
|
11768
|
-
function
|
|
11769
|
+
function Kp(e, t) {
|
|
11769
11770
|
const r = function(i, n) {
|
|
11770
11771
|
if (n.type === M.Instance) {
|
|
11771
11772
|
const o = i.getClassMetadata(n.implementationType), a = n.cache.value;
|
|
@@ -11786,25 +11787,25 @@ function on(e, t) {
|
|
|
11786
11787
|
if (t === void 0) return;
|
|
11787
11788
|
const r = function(n) {
|
|
11788
11789
|
const o = [];
|
|
11789
|
-
for (const a of n)
|
|
11790
|
+
for (const a of n) Wp(a) && a.scope === me.Singleton && a.cache.isRight && o.push(a);
|
|
11790
11791
|
return o;
|
|
11791
11792
|
}(t), i = [];
|
|
11792
11793
|
for (const n of r) {
|
|
11793
|
-
const o =
|
|
11794
|
+
const o = Kp(e, n);
|
|
11794
11795
|
o !== void 0 && i.push(o);
|
|
11795
11796
|
}
|
|
11796
11797
|
return i.length > 0 ? Promise.all(i).then(() => {
|
|
11797
11798
|
}) : void 0;
|
|
11798
11799
|
}
|
|
11799
|
-
function
|
|
11800
|
+
function qp(e, t) {
|
|
11800
11801
|
const r = e.getBindingsFromModule(t);
|
|
11801
11802
|
return on(e, r);
|
|
11802
11803
|
}
|
|
11803
|
-
function
|
|
11804
|
+
function Hp(e, t) {
|
|
11804
11805
|
const r = e.getBindings(t);
|
|
11805
11806
|
return on(e, r);
|
|
11806
11807
|
}
|
|
11807
|
-
const
|
|
11808
|
+
const Xp = Symbol.for("@inversifyjs/plugin/isPlugin"), dd = Symbol.for("@inversifyjs/container/bindingIdentifier");
|
|
11808
11809
|
function ra(e) {
|
|
11809
11810
|
return typeof e == "object" && e !== null && e[dd] === !0;
|
|
11810
11811
|
}
|
|
@@ -11844,7 +11845,7 @@ function Lt(e) {
|
|
|
11844
11845
|
function ct(e, t) {
|
|
11845
11846
|
return (r) => r.tags.has(e) && r.tags.get(e) === t;
|
|
11846
11847
|
}
|
|
11847
|
-
function
|
|
11848
|
+
function Yp(e) {
|
|
11848
11849
|
return e.name === void 0 && e.tags.size === 0;
|
|
11849
11850
|
}
|
|
11850
11851
|
function Bt(e) {
|
|
@@ -11866,7 +11867,7 @@ function Gt(e) {
|
|
|
11866
11867
|
(function(e) {
|
|
11867
11868
|
e[e.invalidOperation = 0] = "invalidOperation";
|
|
11868
11869
|
})(we || (we = {}));
|
|
11869
|
-
class
|
|
11870
|
+
class Qp {
|
|
11870
11871
|
#e;
|
|
11871
11872
|
constructor(t) {
|
|
11872
11873
|
this.#e = t;
|
|
@@ -11976,7 +11977,7 @@ class Qn {
|
|
|
11976
11977
|
}(t, r));
|
|
11977
11978
|
}
|
|
11978
11979
|
whenDefault() {
|
|
11979
|
-
return this.when(
|
|
11980
|
+
return this.when(Yp);
|
|
11980
11981
|
}
|
|
11981
11982
|
whenNamed(t) {
|
|
11982
11983
|
return this.when(ut(t));
|
|
@@ -12048,7 +12049,7 @@ class Ze extends Qn {
|
|
|
12048
12049
|
class Mn extends Ze {
|
|
12049
12050
|
#e;
|
|
12050
12051
|
constructor(t) {
|
|
12051
|
-
super(t), this.#e = new
|
|
12052
|
+
super(t), this.#e = new Qp(t);
|
|
12052
12053
|
}
|
|
12053
12054
|
inRequestScope() {
|
|
12054
12055
|
return this.#e.inRequestScope();
|
|
@@ -12060,7 +12061,7 @@ class Mn extends Ze {
|
|
|
12060
12061
|
return this.#e.inTransientScope();
|
|
12061
12062
|
}
|
|
12062
12063
|
}
|
|
12063
|
-
class
|
|
12064
|
+
class eh {
|
|
12064
12065
|
#e;
|
|
12065
12066
|
#t;
|
|
12066
12067
|
#r;
|
|
@@ -12092,7 +12093,7 @@ class nh {
|
|
|
12092
12093
|
}
|
|
12093
12094
|
async unbindAll() {
|
|
12094
12095
|
const t = [...this.#n.bindingService.getNonParentBoundServices()];
|
|
12095
|
-
await Promise.all(t.map(async (r) =>
|
|
12096
|
+
await Promise.all(t.map(async (r) => Hp(this.#e, r)));
|
|
12096
12097
|
for (const r of t) this.#n.activationService.removeAllByServiceId(r), this.#n.bindingService.removeAllByServiceId(r), this.#n.deactivationService.removeAllByServiceId(r);
|
|
12097
12098
|
this.#n.planResultCacheService.clearCache();
|
|
12098
12099
|
}
|
|
@@ -12147,7 +12148,7 @@ class nh {
|
|
|
12147
12148
|
return !1;
|
|
12148
12149
|
}
|
|
12149
12150
|
}
|
|
12150
|
-
class
|
|
12151
|
+
class th {
|
|
12151
12152
|
#e;
|
|
12152
12153
|
#t;
|
|
12153
12154
|
#r;
|
|
@@ -12191,10 +12192,10 @@ class rh {
|
|
|
12191
12192
|
this.#i.bindingService.set(t), this.#n.invalidateService({ binding: t, kind: be.bindingAdded });
|
|
12192
12193
|
}
|
|
12193
12194
|
#s(...t) {
|
|
12194
|
-
return t.map((r) =>
|
|
12195
|
+
return t.map((r) => qp(this.#t, r.id));
|
|
12195
12196
|
}
|
|
12196
12197
|
}
|
|
12197
|
-
class
|
|
12198
|
+
class nh {
|
|
12198
12199
|
deactivationParams;
|
|
12199
12200
|
constructor(t) {
|
|
12200
12201
|
this.deactivationParams = function(r) {
|
|
@@ -12206,7 +12207,7 @@ class ih {
|
|
|
12206
12207
|
});
|
|
12207
12208
|
}
|
|
12208
12209
|
}
|
|
12209
|
-
class
|
|
12210
|
+
class rh {
|
|
12210
12211
|
planParamsOperations;
|
|
12211
12212
|
#e;
|
|
12212
12213
|
constructor(t) {
|
|
@@ -12221,7 +12222,7 @@ class oh {
|
|
|
12221
12222
|
this.#e.bindingService.set(t), this.#e.planResultCacheService.invalidateServiceBinding({ binding: t, kind: be.bindingAdded, operations: this.planParamsOperations });
|
|
12222
12223
|
}
|
|
12223
12224
|
}
|
|
12224
|
-
class
|
|
12225
|
+
class ih {
|
|
12225
12226
|
#e;
|
|
12226
12227
|
#t;
|
|
12227
12228
|
constructor(t, r) {
|
|
@@ -12231,7 +12232,7 @@ class ah {
|
|
|
12231
12232
|
this.#t.planResultCacheService.invalidateServiceBinding({ ...t, operations: this.#e.planParamsOperations });
|
|
12232
12233
|
}
|
|
12233
12234
|
}
|
|
12234
|
-
class
|
|
12235
|
+
class oh {
|
|
12235
12236
|
#e;
|
|
12236
12237
|
#t;
|
|
12237
12238
|
#r;
|
|
@@ -12241,7 +12242,7 @@ class sh {
|
|
|
12241
12242
|
}
|
|
12242
12243
|
register(t, r) {
|
|
12243
12244
|
const i = new r(t, this.#t);
|
|
12244
|
-
if (i[
|
|
12245
|
+
if (i[Xp] !== !0) throw new $e(we.invalidOperation, "Invalid plugin. The plugin must extend the Plugin class");
|
|
12245
12246
|
i.load(this.#e);
|
|
12246
12247
|
}
|
|
12247
12248
|
#i(t) {
|
|
@@ -12280,7 +12281,7 @@ class ia {
|
|
|
12280
12281
|
this.#e.push(t);
|
|
12281
12282
|
}
|
|
12282
12283
|
}
|
|
12283
|
-
class
|
|
12284
|
+
class ah {
|
|
12284
12285
|
#e;
|
|
12285
12286
|
#t;
|
|
12286
12287
|
#r;
|
|
@@ -12331,7 +12332,7 @@ class uh {
|
|
|
12331
12332
|
#l(t, r, i) {
|
|
12332
12333
|
const n = this.#u(t, r, i), o = this.#a.planResultCacheService.get(n);
|
|
12333
12334
|
if (o !== void 0) return o;
|
|
12334
|
-
const a =
|
|
12335
|
+
const a = xp(this.#s(r, t, i));
|
|
12335
12336
|
for (const s of this.#i) s(n, a);
|
|
12336
12337
|
return a;
|
|
12337
12338
|
}
|
|
@@ -12339,13 +12340,13 @@ class uh {
|
|
|
12339
12340
|
return { get: this.get.bind(this), getAll: this.getAll.bind(this), getAllAsync: this.getAllAsync.bind(this), getAsync: this.getAsync.bind(this) };
|
|
12340
12341
|
}
|
|
12341
12342
|
#g(t) {
|
|
12342
|
-
return
|
|
12343
|
+
return Jp({ context: this.#n, getActivations: this.#r, planResult: t, requestScopeCache: /* @__PURE__ */ new Map() });
|
|
12343
12344
|
}
|
|
12344
12345
|
#f(t, r) {
|
|
12345
12346
|
r !== void 0 && (r.name !== void 0 && (t.rootConstraints.name = r.name), r.optional === !0 && (t.rootConstraints.isOptional = !0), r.tag !== void 0 && (t.rootConstraints.tag = { key: r.tag.key, value: r.tag.value }), t.rootConstraints.isMultiple && (t.rootConstraints.chained = r?.chained ?? !1));
|
|
12346
12347
|
}
|
|
12347
12348
|
}
|
|
12348
|
-
class
|
|
12349
|
+
class sh {
|
|
12349
12350
|
#e;
|
|
12350
12351
|
#t;
|
|
12351
12352
|
constructor(t) {
|
|
@@ -12360,8 +12361,8 @@ class ch {
|
|
|
12360
12361
|
this.#t.push({ activationService: this.#e.activationService.clone(), bindingService: this.#e.bindingService.clone(), deactivationService: this.#e.deactivationService.clone() });
|
|
12361
12362
|
}
|
|
12362
12363
|
}
|
|
12363
|
-
const
|
|
12364
|
-
class
|
|
12364
|
+
const uh = me.Transient;
|
|
12365
|
+
class ch {
|
|
12365
12366
|
#e;
|
|
12366
12367
|
#t;
|
|
12367
12368
|
#r;
|
|
@@ -12369,10 +12370,10 @@ class dh {
|
|
|
12369
12370
|
#i;
|
|
12370
12371
|
#o;
|
|
12371
12372
|
constructor(t) {
|
|
12372
|
-
const r = t?.autobind ?? !1, i = t?.defaultScope ??
|
|
12373
|
+
const r = t?.autobind ?? !1, i = t?.defaultScope ?? uh;
|
|
12373
12374
|
this.#n = this.#c(t, r, i);
|
|
12374
|
-
const n = new
|
|
12375
|
-
this.#e = new
|
|
12375
|
+
const n = new rh(this.#n), o = new ih(n, this.#n), a = new nh(this.#n);
|
|
12376
|
+
this.#e = new eh(a.deactivationParams, i, o, this.#n), this.#t = new th(this.#e, a.deactivationParams, i, o, this.#n), this.#i = new ah(n, this.#n, r, i), this.#r = new oh(this, this.#n, this.#i), this.#o = new sh(this.#n);
|
|
12376
12377
|
}
|
|
12377
12378
|
bind(t) {
|
|
12378
12379
|
return this.#e.bind(t);
|
|
@@ -12450,7 +12451,7 @@ class dh {
|
|
|
12450
12451
|
return a.#n.planResultCacheService.subscribe(o), new ia($t.build(() => a.#n.activationService), Do.build(() => a.#n.bindingService, n), Ao.build(() => a.#n.deactivationService), o);
|
|
12451
12452
|
}
|
|
12452
12453
|
}
|
|
12453
|
-
const
|
|
12454
|
+
const lh = L.object({
|
|
12454
12455
|
VITE_INJECT_AGIFLOW_APP_ENDPOINT: L.string().default("").transform((e) => e.trim() || void 0).pipe(L.string().url().optional()).describe(
|
|
12455
12456
|
"Server base URL for both HTTP API and WebSocket connections (optional - leave empty for standalone mode)"
|
|
12456
12457
|
),
|
|
@@ -12460,16 +12461,16 @@ const fh = L.object({
|
|
|
12460
12461
|
VITE_SAVE_RAW: L.preprocess((e) => e === "false" || e === "" || e === null || e === void 0 ? !1 : e === "true" ? !0 : e, L.boolean().optional()).default(!1),
|
|
12461
12462
|
VITE_MULTIPLEX_SOCKET_PATH: L.string().optional().describe("Unix socket path for multiplex broker")
|
|
12462
12463
|
});
|
|
12463
|
-
var
|
|
12464
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
12464
|
+
var dh = Object.getOwnPropertyDescriptor, fh = (e, t, r, i) => {
|
|
12465
|
+
for (var n = i > 1 ? void 0 : i ? dh(t, r) : t, o = e.length - 1, a; o >= 0; o--)
|
|
12465
12466
|
(a = e[o]) && (n = a(n) || n);
|
|
12466
12467
|
return n;
|
|
12467
12468
|
};
|
|
12468
|
-
const
|
|
12469
|
+
const mh = ue({
|
|
12469
12470
|
debug: Qt().default(!1),
|
|
12470
12471
|
verbose: Qt().default(!1),
|
|
12471
12472
|
logLevel: ne().default("info")
|
|
12472
|
-
}),
|
|
12473
|
+
}), gh = lh;
|
|
12473
12474
|
let er = class {
|
|
12474
12475
|
runtimeConfig;
|
|
12475
12476
|
appConfig;
|
|
@@ -12479,10 +12480,10 @@ let er = class {
|
|
|
12479
12480
|
verbose: process.env.VERBOSE === "true",
|
|
12480
12481
|
logLevel: process.env.LOG_LEVEL || "info"
|
|
12481
12482
|
};
|
|
12482
|
-
this.runtimeConfig =
|
|
12483
|
+
this.runtimeConfig = mh.parse(e), this.appConfig = gh.parse({
|
|
12483
12484
|
VITE_INJECT_AGIFLOW_APP_ENDPOINT: "https://agiflow.io",
|
|
12484
12485
|
VITE_INJECT_AGIFLOW_APP_DOCKER_ENDPOINT: "https://agiflow.io",
|
|
12485
|
-
VITE_AGENT_CLI_DOCKER_IMAGE: "agiflowai/agent-cli:v0.1.
|
|
12486
|
+
VITE_AGENT_CLI_DOCKER_IMAGE: "agiflowai/agent-cli:v0.1.6",
|
|
12486
12487
|
VITE_AGENT_CLI_DOCKER_NETWORK: "",
|
|
12487
12488
|
VITE_SAVE_RAW: "",
|
|
12488
12489
|
VITE_MULTIPLEX_SOCKET_PATH: process.env.VITE_MULTIPLEX_SOCKET_PATH
|
|
@@ -12549,11 +12550,11 @@ let er = class {
|
|
|
12549
12550
|
return `ws://${t ? "host.docker.internal" : "localhost"}:${e}`;
|
|
12550
12551
|
}
|
|
12551
12552
|
};
|
|
12552
|
-
er =
|
|
12553
|
+
er = fh([
|
|
12553
12554
|
je()
|
|
12554
12555
|
], er);
|
|
12555
|
-
var
|
|
12556
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
12556
|
+
var vh = Object.getOwnPropertyDescriptor, ph = (e, t, r, i) => {
|
|
12557
|
+
for (var n = i > 1 ? void 0 : i ? vh(t, r) : t, o = e.length - 1, a; o >= 0; o--)
|
|
12557
12558
|
(a = e[o]) && (n = a(n) || n);
|
|
12558
12559
|
return n;
|
|
12559
12560
|
};
|
|
@@ -12637,11 +12638,11 @@ let tr = class {
|
|
|
12637
12638
|
return !this.isDirect && !this.isRemote;
|
|
12638
12639
|
}
|
|
12639
12640
|
};
|
|
12640
|
-
tr =
|
|
12641
|
+
tr = ph([
|
|
12641
12642
|
je()
|
|
12642
12643
|
], tr);
|
|
12643
|
-
var
|
|
12644
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
12644
|
+
var hh = Object.getOwnPropertyDescriptor, bh = (e, t, r, i) => {
|
|
12645
|
+
for (var n = i > 1 ? void 0 : i ? hh(t, r) : t, o = e.length - 1, a; o >= 0; o--)
|
|
12645
12646
|
(a = e[o]) && (n = a(n) || n);
|
|
12646
12647
|
return n;
|
|
12647
12648
|
};
|
|
@@ -12653,7 +12654,7 @@ const xe = () => L.preprocess((e) => {
|
|
|
12653
12654
|
if (["1", "true", "yes", "y", "on"].includes(t)) return !0;
|
|
12654
12655
|
if (["0", "false", "no", "n", "off"].includes(t)) return !1;
|
|
12655
12656
|
}
|
|
12656
|
-
}, L.boolean().optional()),
|
|
12657
|
+
}, L.boolean().optional()), yh = () => L.preprocess((e) => {
|
|
12657
12658
|
if (typeof e == "number" && Number.isFinite(e)) return e;
|
|
12658
12659
|
if (typeof e == "string") {
|
|
12659
12660
|
const t = Number(e);
|
|
@@ -12684,7 +12685,7 @@ const xe = () => L.preprocess((e) => {
|
|
|
12684
12685
|
AGI_NETLOG_ENABLE: xe().default(!0),
|
|
12685
12686
|
AGI_NETLOG_DEBUG: xe().optional(),
|
|
12686
12687
|
AGI_NETLOG_FILE: L.string().optional(),
|
|
12687
|
-
AGI_NETLOG_MAX_BODY:
|
|
12688
|
+
AGI_NETLOG_MAX_BODY: yh().optional(),
|
|
12688
12689
|
AGI_NETLOG_REMOTE_ENABLE: xe().default(!0),
|
|
12689
12690
|
AGI_NETLOG_REMOTE_FILE: L.string().optional(),
|
|
12690
12691
|
// Debug flags
|
|
@@ -12822,12 +12823,12 @@ let nr = class {
|
|
|
12822
12823
|
return this.parsedEnv;
|
|
12823
12824
|
}
|
|
12824
12825
|
};
|
|
12825
|
-
nr =
|
|
12826
|
+
nr = bh([
|
|
12826
12827
|
je()
|
|
12827
12828
|
], nr);
|
|
12828
|
-
const
|
|
12829
|
-
|
|
12830
|
-
class
|
|
12829
|
+
const _h = new er();
|
|
12830
|
+
_h.getAppConfig();
|
|
12831
|
+
class $h {
|
|
12831
12832
|
stream;
|
|
12832
12833
|
useJsonFormat;
|
|
12833
12834
|
constructor(t) {
|
|
@@ -12998,8 +12999,8 @@ const H = {
|
|
|
12998
12999
|
// ============================================================================
|
|
12999
13000
|
DisposableRegistry: Symbol.for("DisposableRegistry")
|
|
13000
13001
|
};
|
|
13001
|
-
var
|
|
13002
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
13002
|
+
var wh = Object.getOwnPropertyDescriptor, Ih = (e, t, r, i) => {
|
|
13003
|
+
for (var n = i > 1 ? void 0 : i ? wh(t, r) : t, o = e.length - 1, a; o >= 0; o--)
|
|
13003
13004
|
(a = e[o]) && (n = a(n) || n);
|
|
13004
13005
|
return n;
|
|
13005
13006
|
}, aa = (e, t) => (r, i) => t(r, i, e);
|
|
@@ -13065,13 +13066,13 @@ let wt = class {
|
|
|
13065
13066
|
}
|
|
13066
13067
|
}
|
|
13067
13068
|
};
|
|
13068
|
-
wt =
|
|
13069
|
+
wt = Ih([
|
|
13069
13070
|
je(),
|
|
13070
13071
|
aa(0, ge(H.Logger)),
|
|
13071
13072
|
aa(1, ge(H.MultiplexClientConfig))
|
|
13072
13073
|
], wt);
|
|
13073
|
-
var
|
|
13074
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
13074
|
+
var kh = Object.getOwnPropertyDescriptor, Sh = (e, t, r, i) => {
|
|
13075
|
+
for (var n = i > 1 ? void 0 : i ? kh(t, r) : t, o = e.length - 1, a; o >= 0; o--)
|
|
13075
13076
|
(a = e[o]) && (n = a(n) || n);
|
|
13076
13077
|
return n;
|
|
13077
13078
|
}, sa = (e, t) => (r, i) => t(r, i, e);
|
|
@@ -13178,13 +13179,13 @@ let ua = class extends wt {
|
|
|
13178
13179
|
return this.connected;
|
|
13179
13180
|
}
|
|
13180
13181
|
};
|
|
13181
|
-
ua =
|
|
13182
|
+
ua = Sh([
|
|
13182
13183
|
je(),
|
|
13183
13184
|
sa(0, ge(H.Logger)),
|
|
13184
13185
|
sa(1, ge(H.MultiplexClientConfig))
|
|
13185
13186
|
], ua);
|
|
13186
|
-
var
|
|
13187
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
13187
|
+
var zh = Object.getOwnPropertyDescriptor, Oh = (e, t, r, i) => {
|
|
13188
|
+
for (var n = i > 1 ? void 0 : i ? zh(t, r) : t, o = e.length - 1, a; o >= 0; o--)
|
|
13188
13189
|
(a = e[o]) && (n = a(n) || n);
|
|
13189
13190
|
return n;
|
|
13190
13191
|
}, ca = (e, t) => (r, i) => t(r, i, e);
|
|
@@ -13229,13 +13230,13 @@ let la = class {
|
|
|
13229
13230
|
throw new Error(`Invalid sessionId: "${e}"`);
|
|
13230
13231
|
}
|
|
13231
13232
|
};
|
|
13232
|
-
la =
|
|
13233
|
+
la = Oh([
|
|
13233
13234
|
je(),
|
|
13234
13235
|
ca(0, ge(H.Logger)),
|
|
13235
13236
|
ca(1, ge(H.MessageMultiplexBroker))
|
|
13236
13237
|
], la);
|
|
13237
|
-
var
|
|
13238
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
13238
|
+
var jh = Object.getOwnPropertyDescriptor, xh = (e, t, r, i) => {
|
|
13239
|
+
for (var n = i > 1 ? void 0 : i ? jh(t, r) : t, o = e.length - 1, a; o >= 0; o--)
|
|
13239
13240
|
(a = e[o]) && (n = a(n) || n);
|
|
13240
13241
|
return n;
|
|
13241
13242
|
}, da = (e, t) => (r, i) => t(r, i, e);
|
|
@@ -13425,7 +13426,7 @@ let rr = class extends wt {
|
|
|
13425
13426
|
}, e), this.reconnectTimer.unref();
|
|
13426
13427
|
}
|
|
13427
13428
|
};
|
|
13428
|
-
rr =
|
|
13429
|
+
rr = xh([
|
|
13429
13430
|
je(),
|
|
13430
13431
|
da(0, ge(H.Logger)),
|
|
13431
13432
|
da(1, ge(H.MultiplexClientConfig))
|
|
@@ -13433,8 +13434,8 @@ rr = Nh([
|
|
|
13433
13434
|
const fa = {
|
|
13434
13435
|
MESSAGE_STDIN: "agent-message-stdin"
|
|
13435
13436
|
};
|
|
13436
|
-
var
|
|
13437
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
13437
|
+
var Eh = Object.getOwnPropertyDescriptor, Nh = (e, t, r, i) => {
|
|
13438
|
+
for (var n = i > 1 ? void 0 : i ? Eh(t, r) : t, o = e.length - 1, a; o >= 0; o--)
|
|
13438
13439
|
(a = e[o]) && (n = a(n) || n);
|
|
13439
13440
|
return n;
|
|
13440
13441
|
}, ma = (e, t) => (r, i) => t(r, i, e);
|
|
@@ -13613,13 +13614,13 @@ let ga = class extends wt {
|
|
|
13613
13614
|
clearTimeout(r.timeout), this.pendingRequests.delete(t), e.error ? r.reject(new Error(`${e.error.code}: ${e.error.message}`)) : r.resolve(e.event);
|
|
13614
13615
|
}
|
|
13615
13616
|
};
|
|
13616
|
-
ga =
|
|
13617
|
+
ga = Nh([
|
|
13617
13618
|
je(),
|
|
13618
13619
|
ma(0, ge(H.Logger)),
|
|
13619
13620
|
ma(1, ge(H.MultiplexClientConfig))
|
|
13620
13621
|
], ga);
|
|
13621
|
-
var
|
|
13622
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
13622
|
+
var Uh = Object.getOwnPropertyDescriptor, Th = (e, t, r, i) => {
|
|
13623
|
+
for (var n = i > 1 ? void 0 : i ? Uh(t, r) : t, o = e.length - 1, a; o >= 0; o--)
|
|
13623
13624
|
(a = e[o]) && (n = a(n) || n);
|
|
13624
13625
|
return n;
|
|
13625
13626
|
}, va = (e, t) => (r, i) => t(r, i, e);
|
|
@@ -13694,16 +13695,16 @@ let pa = class {
|
|
|
13694
13695
|
return `${Date.now()}-${Math.random().toString(36).substring(2, 15)}`;
|
|
13695
13696
|
}
|
|
13696
13697
|
};
|
|
13697
|
-
pa =
|
|
13698
|
+
pa = Th([
|
|
13698
13699
|
je(),
|
|
13699
13700
|
va(0, ge(H.Logger)),
|
|
13700
13701
|
va(1, ge(H.SubEnvManager))
|
|
13701
13702
|
], pa);
|
|
13702
|
-
function
|
|
13703
|
-
const e = new
|
|
13703
|
+
function Ph() {
|
|
13704
|
+
const e = new ch({ defaultScope: "Singleton" });
|
|
13704
13705
|
e.bind(H.SubEnvManager).to(nr).inSingletonScope(), e.bind(H.Logger).toDynamicValue(() => {
|
|
13705
13706
|
const u = process.env.AGI_LOG_DIR || mo(Rd(), "agent-cli-hooks"), c = mo(u, "hooks.log");
|
|
13706
|
-
return new
|
|
13707
|
+
return new $h({ logFilePath: c, useJsonFormat: !0 });
|
|
13707
13708
|
}).inTransientScope();
|
|
13708
13709
|
const t = e.get(H.SubEnvManager), r = t.sessionId || "", i = t.brokerWsUrl, n = t.remoteMultiplexSocketPath, o = n ? void 0 : i, a = o ? o.replace(/^ws/, "http").replace(/\/ws$/, "/request") : void 0;
|
|
13709
13710
|
if (!!(o || n)) {
|
|
@@ -13719,20 +13720,20 @@ function Ah() {
|
|
|
13719
13720
|
}
|
|
13720
13721
|
return e;
|
|
13721
13722
|
}
|
|
13722
|
-
const qi =
|
|
13723
|
-
class
|
|
13723
|
+
const qi = Ph(), qe = qi.get(H.Logger), gd = qi.get(H.SubEnvManager), Dh = gd.multiplexBrokerWsUrl || "";
|
|
13724
|
+
class Ah {
|
|
13724
13725
|
agentSessionId;
|
|
13725
13726
|
// Agiflow agent session ID
|
|
13726
13727
|
claudeSessionId;
|
|
13727
13728
|
// Claude Code session ID
|
|
13728
13729
|
multiplexClient = null;
|
|
13729
13730
|
enableRemote = !1;
|
|
13730
|
-
constructor(t, r
|
|
13731
|
+
constructor(t, r) {
|
|
13731
13732
|
this.agentSessionId = t, this.claudeSessionId = r;
|
|
13732
13733
|
}
|
|
13733
13734
|
async setupMultiplexClient() {
|
|
13734
13735
|
const t = gd.remoteMultiplexSocketPath;
|
|
13735
|
-
if (this.enableRemote = !!(this.agentSessionId && (
|
|
13736
|
+
if (this.enableRemote = !!(this.agentSessionId && (Dh || t)), this.enableRemote)
|
|
13736
13737
|
try {
|
|
13737
13738
|
this.multiplexClient = qi.get(H.MessageMultiplexClient), await this.multiplexClient.connect();
|
|
13738
13739
|
} catch (r) {
|
|
@@ -13748,14 +13749,8 @@ class Rh {
|
|
|
13748
13749
|
rawInput: t
|
|
13749
13750
|
}), t.notification_type !== "permission_prompt" && t.notification_type === "idle_prompt" && (await this.setupMultiplexClient(), this.enableRemote && this.multiplexClient))
|
|
13750
13751
|
try {
|
|
13751
|
-
const r =
|
|
13752
|
-
|
|
13753
|
-
t.message,
|
|
13754
|
-
"input",
|
|
13755
|
-
// default prompt type
|
|
13756
|
-
t.metadata ?? {}
|
|
13757
|
-
);
|
|
13758
|
-
await this.multiplexClient.request(r), qe.info("idle-prompt-sent", {
|
|
13752
|
+
const r = mp(this.agentSessionId, t.message, t.metadata);
|
|
13753
|
+
await this.multiplexClient.publish(r), qe.info("idle-prompt-sent", {
|
|
13759
13754
|
agentSessionId: this.agentSessionId,
|
|
13760
13755
|
message: t.message
|
|
13761
13756
|
});
|
|
@@ -13767,7 +13762,7 @@ class Rh {
|
|
|
13767
13762
|
}
|
|
13768
13763
|
}
|
|
13769
13764
|
}
|
|
13770
|
-
async function
|
|
13765
|
+
async function Ch() {
|
|
13771
13766
|
try {
|
|
13772
13767
|
let e;
|
|
13773
13768
|
try {
|
|
@@ -13785,12 +13780,12 @@ async function Mh() {
|
|
|
13785
13780
|
process.exit(0);
|
|
13786
13781
|
return;
|
|
13787
13782
|
}
|
|
13788
|
-
await new
|
|
13783
|
+
await new Ah(t, r).processNotification(e), process.exit(0);
|
|
13789
13784
|
} catch (e) {
|
|
13790
13785
|
qe.error("Unexpected error in Notification hook", e), process.exit(0);
|
|
13791
13786
|
}
|
|
13792
13787
|
}
|
|
13793
|
-
|
|
13788
|
+
Ch().catch(() => {
|
|
13794
13789
|
process.exit(0);
|
|
13795
13790
|
});
|
|
13796
13791
|
//# sourceMappingURL=notification.js.map
|