@agiflowai/agent-cli 0.2.25 → 0.2.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/claudeNotification.js +1691 -1670
- package/dist/claudePermissionRequest.js +1808 -1787
- package/dist/claudePostToolUse.js +1705 -1684
- package/dist/claudePreToolUse.js +1616 -1596
- package/dist/claudeSessionEnd.js +1692 -1673
- package/dist/claudeSessionStart.js +1629 -1608
- package/dist/claudeStop.js +1699 -1678
- package/dist/cli.js +168 -149
- package/dist/cli.js.map +1 -1
- package/dist/daemon.js +22 -22
- package/dist/{index-DxcGwY5j.mjs → index-B5eNSEAK.mjs} +4 -4
- package/dist/index-B5eNSEAK.mjs.map +1 -0
- package/dist/{index-B9Al3DuK.mjs → index-BA1dCLoA.mjs} +8 -7
- package/dist/index-BA1dCLoA.mjs.map +1 -0
- package/dist/{index-DTMl_vl1.mjs → index-DXEXJZWX.mjs} +13311 -10149
- package/dist/index-DXEXJZWX.mjs.map +1 -0
- package/dist/index.js +29 -28
- package/dist/package.json +3 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/index-B9Al3DuK.mjs.map +0 -1
- package/dist/index-DTMl_vl1.mjs.map +0 -1
- package/dist/index-DxcGwY5j.mjs.map +0 -1
package/dist/daemon.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { jsx as e, jsxs as i, Fragment as F } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { bm as f, bn as Y, bo as A, bp as D, bq as $, br as X, bs as H, bt as J, bu as Z, bv as ee, bw as re, bx as ne, by as oe, bz as ie } from "./index-DXEXJZWX.mjs";
|
|
3
3
|
import { useQueryClient as U, useQuery as te, useMutation as q, QueryClientProvider as ce, QueryClient as le } from "@tanstack/react-query";
|
|
4
4
|
import { useDispatch as de, useSelector as h, shallowEqual as ae, Provider as se } from "react-redux";
|
|
5
|
-
import P, { useRef as R, useEffect as
|
|
5
|
+
import P, { useRef as R, useEffect as z, useState as C, useCallback as ue, useMemo as he } from "react";
|
|
6
6
|
const ge = ({ children: t }) => {
|
|
7
7
|
const { Box: n, Text: r } = f(), c = de(), d = U(), l = h((s) => s.daemonStatus.status), u = h((s) => s.daemonStatus.error), g = R(!1);
|
|
8
|
-
return
|
|
8
|
+
return z(() => {
|
|
9
9
|
l === "error" && (async () => {
|
|
10
10
|
const p = await A.get(D.CredentialsService).load();
|
|
11
11
|
(!p || !p.apiKey) && d.invalidateQueries({ queryKey: ["auth", "check"] });
|
|
12
12
|
})();
|
|
13
|
-
}, [l, d]),
|
|
13
|
+
}, [l, d]), z(() => (c(Y()), $(async () => {
|
|
14
14
|
if (!g.current) {
|
|
15
15
|
g.current = !0;
|
|
16
16
|
try {
|
|
@@ -27,7 +27,7 @@ const ge = ({ children: t }) => {
|
|
|
27
27
|
/* @__PURE__ */ e(r, { dimColor: !0, children: "Retrying in background..." })
|
|
28
28
|
] }) : l === "connected" ? /* @__PURE__ */ e(F, { children: t }) : null;
|
|
29
29
|
}, me = ({ children: t }) => {
|
|
30
|
-
const { Box: n, Text: r, Newline: c, Static: d, Link: l, useInput: u } = f(), g = U(), [s, x] =
|
|
30
|
+
const { Box: n, Text: r, Newline: c, Static: d, Link: l, useInput: u } = f(), g = U(), [s, x] = C(null), [p, Q] = C(null), [v, N] = C([]), [y, O] = C(0), [b, m] = C("checking"), [j, k] = C(""), B = R(null), T = A.get(D.DeviceCodeAuthService), L = A.get(D.CredentialsService), { data: I, isLoading: E } = te({
|
|
31
31
|
queryKey: ["auth", "check"],
|
|
32
32
|
queryFn: async () => {
|
|
33
33
|
const o = await L.load();
|
|
@@ -44,9 +44,9 @@ const ge = ({ children: t }) => {
|
|
|
44
44
|
}
|
|
45
45
|
}), M = q({
|
|
46
46
|
mutationFn: async (o) => {
|
|
47
|
-
|
|
47
|
+
B.current = new AbortController();
|
|
48
48
|
const a = await T.pollForToken(o.device_code, o.interval || 5, {
|
|
49
|
-
signal:
|
|
49
|
+
signal: B.current.signal
|
|
50
50
|
}), S = await T.listOrganizations(a.access_token);
|
|
51
51
|
return { accessToken: a.access_token, organizations: S };
|
|
52
52
|
},
|
|
@@ -70,23 +70,23 @@ const ge = ({ children: t }) => {
|
|
|
70
70
|
m("error"), k(o instanceof Error ? o.message : "Failed to exchange for agent API key");
|
|
71
71
|
}
|
|
72
72
|
}), V = ue(() => {
|
|
73
|
-
p && v[
|
|
73
|
+
p && v[y] && _.mutate({
|
|
74
74
|
accessToken: p,
|
|
75
|
-
organizationId: v[
|
|
75
|
+
organizationId: v[y].id
|
|
76
76
|
});
|
|
77
|
-
}, [p, v,
|
|
77
|
+
}, [p, v, y, _]);
|
|
78
78
|
if (u(
|
|
79
79
|
(o, a) => {
|
|
80
80
|
b === "selecting_org" && (a.upArrow ? O((S) => Math.max(0, S - 1)) : a.downArrow ? O((S) => Math.min(v.length - 1, S + 1)) : a.return && V());
|
|
81
81
|
},
|
|
82
82
|
{ isActive: b === "selecting_org" }
|
|
83
|
-
),
|
|
84
|
-
|
|
85
|
-
}, []),
|
|
86
|
-
I && !I.authenticated && b === "checking" && !
|
|
87
|
-
}, [I, b,
|
|
83
|
+
), z(() => () => {
|
|
84
|
+
B.current?.abort();
|
|
85
|
+
}, []), z(() => {
|
|
86
|
+
I && !I.authenticated && b === "checking" && !E && w.mutate();
|
|
87
|
+
}, [I, b, E, w]), I?.authenticated)
|
|
88
88
|
return /* @__PURE__ */ e(F, { children: t({ isAuthenticated: !0 }) });
|
|
89
|
-
if (
|
|
89
|
+
if (E)
|
|
90
90
|
return /* @__PURE__ */ i(n, { flexDirection: "column", padding: 1, children: [
|
|
91
91
|
/* @__PURE__ */ e(n, { marginBottom: 1, children: /* @__PURE__ */ e(r, { bold: !0, color: "cyan", children: "🔐 Agiflow Authentication" }) }),
|
|
92
92
|
/* @__PURE__ */ e(n, { borderStyle: "round", borderColor: "cyan", padding: 1, children: /* @__PURE__ */ e(n, { flexDirection: "column", children: /* @__PURE__ */ i(r, { children: [
|
|
@@ -182,8 +182,8 @@ const ge = ({ children: t }) => {
|
|
|
182
182
|
/* @__PURE__ */ e(r, { bold: !0, color: "yellow", children: "📋 Select Organization:" }),
|
|
183
183
|
/* @__PURE__ */ e(c, {}),
|
|
184
184
|
v.map((o, a) => /* @__PURE__ */ i(r, { children: [
|
|
185
|
-
/* @__PURE__ */ e(r, { color: a ===
|
|
186
|
-
/* @__PURE__ */ e(r, { bold: a ===
|
|
185
|
+
/* @__PURE__ */ e(r, { color: a === y ? "green" : "gray", children: a === y ? "❯ " : " " }),
|
|
186
|
+
/* @__PURE__ */ e(r, { bold: a === y, children: o.name }),
|
|
187
187
|
/* @__PURE__ */ i(r, { dimColor: !0, children: [
|
|
188
188
|
" (",
|
|
189
189
|
o.slug,
|
|
@@ -283,7 +283,7 @@ const fe = () => {
|
|
|
283
283
|
/* @__PURE__ */ e(re, { children: /* @__PURE__ */ e(fe, {}) }),
|
|
284
284
|
/* @__PURE__ */ e(ne, {})
|
|
285
285
|
] });
|
|
286
|
-
},
|
|
286
|
+
}, ye = () => {
|
|
287
287
|
const { Box: t, Text: n } = f();
|
|
288
288
|
return /* @__PURE__ */ i(t, { flexDirection: "column", borderStyle: "round", borderColor: "green", padding: 1, flexGrow: 1, children: [
|
|
289
289
|
/* @__PURE__ */ e(n, { bold: !0, color: "green", children: "Welcome to Agent CLI Daemon!" }),
|
|
@@ -303,7 +303,7 @@ const fe = () => {
|
|
|
303
303
|
] }) }),
|
|
304
304
|
/* @__PURE__ */ e(t, { marginTop: 1, children: /* @__PURE__ */ e(n, { dimColor: !0, children: "The Agiflow UI Dashboard can be accessed in your browser." }) })
|
|
305
305
|
] });
|
|
306
|
-
},
|
|
306
|
+
}, Ce = new le({
|
|
307
307
|
defaultOptions: {
|
|
308
308
|
queries: {
|
|
309
309
|
retry: !1,
|
|
@@ -316,8 +316,8 @@ const fe = () => {
|
|
|
316
316
|
}
|
|
317
317
|
}), xe = () => {
|
|
318
318
|
const { Box: t } = f(), r = h((c) => c.agentTabs.tabs).length > 0;
|
|
319
|
-
return /* @__PURE__ */ e(me, { children: ({ isAuthenticated: c }) => /* @__PURE__ */ e(ge, { children: /* @__PURE__ */ e(t, { flexGrow: 1, flexDirection: "column", children: c && !r ? /* @__PURE__ */ e(
|
|
320
|
-
}, ve = () => /* @__PURE__ */ e(oe, { children: /* @__PURE__ */ e(se, { store: ie, children: /* @__PURE__ */ e(ce, { client:
|
|
319
|
+
return /* @__PURE__ */ e(me, { children: ({ isAuthenticated: c }) => /* @__PURE__ */ e(ge, { children: /* @__PURE__ */ e(t, { flexGrow: 1, flexDirection: "column", children: c && !r ? /* @__PURE__ */ e(ye, {}) : /* @__PURE__ */ e(pe, {}) }) }) });
|
|
320
|
+
}, ve = () => /* @__PURE__ */ e(oe, { children: /* @__PURE__ */ e(se, { store: ie, children: /* @__PURE__ */ e(ce, { client: Ce, children: /* @__PURE__ */ e(xe, {}) }) }) }), ke = async () => {
|
|
321
321
|
const { render: t } = await import("ink"), { waitUntilExit: n } = t(/* @__PURE__ */ e(ve, {}), {
|
|
322
322
|
stdin: process.stdin,
|
|
323
323
|
stdout: process.stdout,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { an as s, am as t, ae as o, aj as c, ai as S, a5 as m, a9 as r, al as n, ad as h, ab as g, aq as l, ac as p, ah as M, ao as P, ak as T, aa as u, a6 as i, af as v, ag as C, a8 as I, a7 as d, ap as x, ar as A, as as R, au as f, at as q, av as V } from "./index-DXEXJZWX.mjs";
|
|
2
2
|
export {
|
|
3
3
|
s as AgentMessageCreateSchema,
|
|
4
4
|
t as AgentMessageTypeSchema,
|
|
@@ -17,8 +17,8 @@ export {
|
|
|
17
17
|
T as StepStartMessagePartSchema,
|
|
18
18
|
u as TextMessagePartSchema,
|
|
19
19
|
i as ToolCallSchema,
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
v as ToolInvocationInputSchema,
|
|
21
|
+
C as ToolInvocationMessagePartSchema,
|
|
22
22
|
I as ToolInvocationSchema,
|
|
23
23
|
d as ToolResultSchema,
|
|
24
24
|
x as UpdateMessageSchema,
|
|
@@ -28,4 +28,4 @@ export {
|
|
|
28
28
|
q as createTextPart,
|
|
29
29
|
V as createToolInvocationInput
|
|
30
30
|
};
|
|
31
|
-
//# sourceMappingURL=index-
|
|
31
|
+
//# sourceMappingURL=index-B5eNSEAK.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-B5eNSEAK.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as a, a as t, b as n, c as S, d as m, e as o, f as
|
|
1
|
+
import { A as a, a as t, b as n, c as S, d as m, e as o, f as c, g as E, h as A, i as g, j as h, k as v, l as i, m as u, n as r, o as p, p as R, q as D, r as T, s as M, t as q, u as d, v as O, w as k, x as N, y as _, z as C, B as P, C as l, D as I, E as G, F as U, G as f, H as L, I as Y, J as B, K as V, L as x, M as y, N as z, O as b, P as j, Q as w, R as F, S as H, T as J, U as K, V as Q, W, X, Y as Z, Z as $, _ as ee, $ as se, a0 as ae, a1 as te, a2 as ne, a3 as Se, a4 as me } from "./index-DXEXJZWX.mjs";
|
|
2
2
|
export {
|
|
3
3
|
a as AGENT_EVENT_TYPES,
|
|
4
4
|
t as AGENT_STATUS,
|
|
@@ -6,8 +6,8 @@ export {
|
|
|
6
6
|
S as AgentConfigSchema,
|
|
7
7
|
m as AgentSessionDirectControlRequestEventSchema,
|
|
8
8
|
o as AgentSessionEndedEventSchema,
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
c as AgentSessionErrorAckEventSchema,
|
|
10
|
+
E as AgentSessionErrorRequestEventSchema,
|
|
11
11
|
A as AgentSessionErrorResponseEventSchema,
|
|
12
12
|
g as AgentSessionIdlePromptRequestEventSchema,
|
|
13
13
|
h as AgentSessionMessageDeletedAckEventSchema,
|
|
@@ -15,8 +15,8 @@ export {
|
|
|
15
15
|
i as AgentSessionMessageInputAckEventSchema,
|
|
16
16
|
u as AgentSessionMessageInputRequestEventSchema,
|
|
17
17
|
r as AgentSessionMessageInputResponseEventSchema,
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
p as AgentSessionMessageOutputAckEventSchema,
|
|
19
|
+
R as AgentSessionMessageOutputEndedEventSchema,
|
|
20
20
|
D as AgentSessionMessageOutputPermissionRequestedEventSchema,
|
|
21
21
|
T as AgentSessionMessageOutputRequestEventSchema,
|
|
22
22
|
M as AgentSessionMessageOutputResponseEventSchema,
|
|
@@ -57,6 +57,7 @@ export {
|
|
|
57
57
|
ae as GitCloneConfigSchema,
|
|
58
58
|
te as OUTPUT_STREAMS,
|
|
59
59
|
ne as OutputStreamSchema,
|
|
60
|
-
Se as TraceIdSchema
|
|
60
|
+
Se as TraceIdSchema,
|
|
61
|
+
me as TraceparentSchema
|
|
61
62
|
};
|
|
62
|
-
//# sourceMappingURL=index-
|
|
63
|
+
//# sourceMappingURL=index-BA1dCLoA.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-BA1dCLoA.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|