@agiflowai/agent-cli 0.2.6 → 0.2.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 CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.7
4
+ Fix:
5
+ - Fix websocket url error.
6
+
3
7
  ## 0.2.6
4
8
  Fix:
5
9
  - Fix build React.dev issue.
@@ -12491,7 +12491,7 @@ let er = class {
12491
12491
  this.runtimeConfig = vh.parse(e), this.appConfig = ph.parse({
12492
12492
  VITE_INJECT_AGIFLOW_APP_ENDPOINT: "https://agiflow.io",
12493
12493
  VITE_INJECT_AGIFLOW_APP_DOCKER_ENDPOINT: "https://agiflow.io",
12494
- VITE_AGENT_CLI_DOCKER_IMAGE: "agiflowai/agent-cli:v0.2.6",
12494
+ VITE_AGENT_CLI_DOCKER_IMAGE: "agiflowai/agent-cli:v0.2.7",
12495
12495
  VITE_AGENT_CLI_DOCKER_NETWORK: "",
12496
12496
  VITE_SAVE_RAW: "",
12497
12497
  VITE_MULTIPLEX_SOCKET_PATH: process.env.VITE_MULTIPLEX_SOCKET_PATH
@@ -12490,7 +12490,7 @@ let er = class {
12490
12490
  this.runtimeConfig = ph.parse(e), this.appConfig = hh.parse({
12491
12491
  VITE_INJECT_AGIFLOW_APP_ENDPOINT: "https://agiflow.io",
12492
12492
  VITE_INJECT_AGIFLOW_APP_DOCKER_ENDPOINT: "https://agiflow.io",
12493
- VITE_AGENT_CLI_DOCKER_IMAGE: "agiflowai/agent-cli:v0.2.6",
12493
+ VITE_AGENT_CLI_DOCKER_IMAGE: "agiflowai/agent-cli:v0.2.7",
12494
12494
  VITE_AGENT_CLI_DOCKER_NETWORK: "",
12495
12495
  VITE_SAVE_RAW: "",
12496
12496
  VITE_MULTIPLEX_SOCKET_PATH: process.env.VITE_MULTIPLEX_SOCKET_PATH
@@ -12482,7 +12482,7 @@ let er = class {
12482
12482
  this.runtimeConfig = vh.parse(e), this.appConfig = ph.parse({
12483
12483
  VITE_INJECT_AGIFLOW_APP_ENDPOINT: "https://agiflow.io",
12484
12484
  VITE_INJECT_AGIFLOW_APP_DOCKER_ENDPOINT: "https://agiflow.io",
12485
- VITE_AGENT_CLI_DOCKER_IMAGE: "agiflowai/agent-cli:v0.2.6",
12485
+ VITE_AGENT_CLI_DOCKER_IMAGE: "agiflowai/agent-cli:v0.2.7",
12486
12486
  VITE_AGENT_CLI_DOCKER_NETWORK: "",
12487
12487
  VITE_SAVE_RAW: "",
12488
12488
  VITE_MULTIPLEX_SOCKET_PATH: process.env.VITE_MULTIPLEX_SOCKET_PATH
@@ -12410,7 +12410,7 @@ let Kn = class {
12410
12410
  this.runtimeConfig = dh.parse(e), this.appConfig = fh.parse({
12411
12411
  VITE_INJECT_AGIFLOW_APP_ENDPOINT: "https://agiflow.io",
12412
12412
  VITE_INJECT_AGIFLOW_APP_DOCKER_ENDPOINT: "https://agiflow.io",
12413
- VITE_AGENT_CLI_DOCKER_IMAGE: "agiflowai/agent-cli:v0.2.6",
12413
+ VITE_AGENT_CLI_DOCKER_IMAGE: "agiflowai/agent-cli:v0.2.7",
12414
12414
  VITE_AGENT_CLI_DOCKER_NETWORK: "",
12415
12415
  VITE_SAVE_RAW: "",
12416
12416
  VITE_MULTIPLEX_SOCKET_PATH: process.env.VITE_MULTIPLEX_SOCKET_PATH
@@ -12410,7 +12410,7 @@ let Wn = class {
12410
12410
  this.runtimeConfig = ch.parse(e), this.appConfig = lh.parse({
12411
12411
  VITE_INJECT_AGIFLOW_APP_ENDPOINT: "https://agiflow.io",
12412
12412
  VITE_INJECT_AGIFLOW_APP_DOCKER_ENDPOINT: "https://agiflow.io",
12413
- VITE_AGENT_CLI_DOCKER_IMAGE: "agiflowai/agent-cli:v0.2.6",
12413
+ VITE_AGENT_CLI_DOCKER_IMAGE: "agiflowai/agent-cli:v0.2.7",
12414
12414
  VITE_AGENT_CLI_DOCKER_NETWORK: "",
12415
12415
  VITE_SAVE_RAW: "",
12416
12416
  VITE_MULTIPLEX_SOCKET_PATH: process.env.VITE_MULTIPLEX_SOCKET_PATH
@@ -12490,7 +12490,7 @@ let er = class {
12490
12490
  this.runtimeConfig = ph.parse(e), this.appConfig = hh.parse({
12491
12491
  VITE_INJECT_AGIFLOW_APP_ENDPOINT: "https://agiflow.io",
12492
12492
  VITE_INJECT_AGIFLOW_APP_DOCKER_ENDPOINT: "https://agiflow.io",
12493
- VITE_AGENT_CLI_DOCKER_IMAGE: "agiflowai/agent-cli:v0.2.6",
12493
+ VITE_AGENT_CLI_DOCKER_IMAGE: "agiflowai/agent-cli:v0.2.7",
12494
12494
  VITE_AGENT_CLI_DOCKER_NETWORK: "",
12495
12495
  VITE_SAVE_RAW: "",
12496
12496
  VITE_MULTIPLEX_SOCKET_PATH: process.env.VITE_MULTIPLEX_SOCKET_PATH
@@ -12484,7 +12484,7 @@ let er = class {
12484
12484
  this.runtimeConfig = fh.parse(e), this.appConfig = mh.parse({
12485
12485
  VITE_INJECT_AGIFLOW_APP_ENDPOINT: "https://agiflow.io",
12486
12486
  VITE_INJECT_AGIFLOW_APP_DOCKER_ENDPOINT: "https://agiflow.io",
12487
- VITE_AGENT_CLI_DOCKER_IMAGE: "agiflowai/agent-cli:v0.2.6",
12487
+ VITE_AGENT_CLI_DOCKER_IMAGE: "agiflowai/agent-cli:v0.2.7",
12488
12488
  VITE_AGENT_CLI_DOCKER_NETWORK: "",
12489
12489
  VITE_SAVE_RAW: "",
12490
12490
  VITE_MULTIPLEX_SOCKET_PATH: process.env.VITE_MULTIPLEX_SOCKET_PATH
package/dist/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { bw as z, bm as H, bx as P, bn as M } from "./index-CPSRdi5k.mjs";
2
+ import { bw as z, bm as H, bx as P, bn as M } from "./index-CQkCZNRM.mjs";
3
3
  import Q from "node:events";
4
4
  import X from "node:child_process";
5
5
  import Z from "node:path";
package/dist/daemon.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { jsx as e, jsxs as i, Fragment as F } from "react/jsx-runtime";
2
- import { bi as b, bj as V, bk as Y, bl as $, bm as S, bn as D, bo as X, bp as H, bq as J, br as Z, bs as ee, bt as re, bu as ne, bv as oe } from "./index-CPSRdi5k.mjs";
2
+ import { bi as b, bj as V, bk as Y, bl as $, bm as S, bn as D, bo as X, bp as H, bq as J, br as Z, bs as ee, bt as re, bu as ne, bv as oe } from "./index-CQkCZNRM.mjs";
3
3
  import { useQueryClient as ie, useQuery as te, useMutation as M, QueryClientProvider as ce, QueryClient as le } from "@tanstack/react-query";
4
4
  import { useDispatch as de, useSelector as u, shallowEqual as ae, Provider as se } from "react-redux";
5
5
  import P, { useRef as L, useEffect as _, useState as C, useCallback as ue, useMemo as he } from "react";
@@ -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 E, g as c, h as A, i as g, j as h, k as v, l as i, m as u, n as r, o as R, p, q as D, r as T, s as M, t as q, u as O, v as d, 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 } from "./index-CPSRdi5k.mjs";
1
+ import { A as a, a as t, b as n, c as S, d as m, e as o, f as E, g as c, h as A, i as g, j as h, k as v, l as i, m as u, n as r, o as R, p, q as D, r as T, s as M, t as q, u as O, v as d, 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 } from "./index-CQkCZNRM.mjs";
2
2
  export {
3
3
  a as AGENT_EVENT_TYPES,
4
4
  t as AGENT_STATUS,
@@ -58,4 +58,4 @@ export {
58
58
  te as OutputStreamSchema,
59
59
  ne as TraceIdSchema
60
60
  };
61
- //# sourceMappingURL=index-BKpNk4j3.mjs.map
61
+ //# sourceMappingURL=index-C3bjyLFC.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-C3bjyLFC.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,4 +1,4 @@
1
- import { al as s, ak as t, ac as o, ah as c, ag as S, a3 as m, a7 as r, aj as n, ab as h, a9 as g, ao as l, aa as p, af as M, am as P, ai as T, a8 as u, a4 as i, ad as C, ae as v, a6 as I, a5 as d, an as x, ap as A, aq as R, as as f, ar as q, at as V } from "./index-CPSRdi5k.mjs";
1
+ import { al as s, ak as t, ac as o, ah as c, ag as S, a3 as m, a7 as r, aj as n, ab as h, a9 as g, ao as l, aa as p, af as M, am as P, ai as T, a8 as u, a4 as i, ad as C, ae as v, a6 as I, a5 as d, an as x, ap as A, aq as R, as as f, ar as q, at as V } from "./index-CQkCZNRM.mjs";
2
2
  export {
3
3
  s as AgentMessageCreateSchema,
4
4
  t as AgentMessageTypeSchema,
@@ -28,4 +28,4 @@ export {
28
28
  q as createTextPart,
29
29
  V as createToolInvocationInput
30
30
  };
31
- //# sourceMappingURL=index-T6apYL3S.mjs.map
31
+ //# sourceMappingURL=index-CJ3v4aki.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-CJ3v4aki.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -12494,7 +12494,7 @@ let Vo = class {
12494
12494
  this.runtimeConfig = xv.parse(t), this.appConfig = iw.parse({
12495
12495
  VITE_INJECT_AGIFLOW_APP_ENDPOINT: "https://agiflow.io",
12496
12496
  VITE_INJECT_AGIFLOW_APP_DOCKER_ENDPOINT: "https://agiflow.io",
12497
- VITE_AGENT_CLI_DOCKER_IMAGE: "agiflowai/agent-cli:v0.2.6",
12497
+ VITE_AGENT_CLI_DOCKER_IMAGE: "agiflowai/agent-cli:v0.2.7",
12498
12498
  VITE_AGENT_CLI_DOCKER_NETWORK: "",
12499
12499
  VITE_SAVE_RAW: "",
12500
12500
  VITE_MULTIPLEX_SOCKET_PATH: process.env.VITE_MULTIPLEX_SOCKET_PATH
@@ -13350,7 +13350,9 @@ const nt = Ie({
13350
13350
  apiKey: z().optional(),
13351
13351
  endpoint: z().optional()
13352
13352
  }).optional(),
13353
- gitClone: Pw.optional()
13353
+ gitClone: Pw.optional(),
13354
+ apiUrl: z().optional(),
13355
+ serverUrl: z().optional()
13354
13356
  }), ap = nt.extend({
13355
13357
  eventType: ee(Ge.START_AGENT).default(Ge.START_AGENT),
13356
13358
  command: ee(oe.REQUEST).default(oe.REQUEST),
@@ -13931,11 +13933,22 @@ let Su = class {
13931
13933
  const r = qR(e);
13932
13934
  this.containers.set(e, r);
13933
13935
  const i = r.get($e.AgentConfigService), n = t.payload.agentConfig ? JSON.parse(JSON.stringify(t.payload.agentConfig)) : {};
13934
- i.initializeAgentSession(
13936
+ if (i.initializeAgentSession(
13935
13937
  ii(t.payload.agentType),
13936
13938
  e,
13937
13939
  n
13938
- );
13940
+ ), n.apiUrl || n.serverUrl) {
13941
+ const d = n.apiUrl, h = n.serverUrl || n.apiUrl;
13942
+ d && (i.setHttpOptions({
13943
+ apiUrl: d,
13944
+ agentSessionId: e
13945
+ }), this.logger.debug(`HTTP options set with apiUrl: ${d}`)), h && (i.setWsOptions({
13946
+ serverUrl: h,
13947
+ agentSessionId: e,
13948
+ reconnectInterval: 5e3
13949
+ // Default reconnect interval
13950
+ }), this.logger.debug(`WebSocket options set with serverUrl: ${h}`));
13951
+ }
13939
13952
  const o = /* @__PURE__ */ new Set(), s = r.get($e.AgentWsService);
13940
13953
  this.broker.registerService(e, $e.AgentWsService.description, s), o.add($e.AgentWsService.description), this.broker.registerWsService(e, s);
13941
13954
  const a = r.get($e.AgentHttpService);
@@ -19701,7 +19714,7 @@ let Bu = class {
19701
19714
  const t = this.agentConfigService.getStoredAgentSessionId();
19702
19715
  if (t)
19703
19716
  try {
19704
- const { createGetAgentStatus: e } = await Promise.resolve().then(() => gT), { createSendAgentStatus: r } = await Promise.resolve().then(() => hI), { AGENT_STATUS: i } = await import("./index-BKpNk4j3.mjs"), n = e(t, t), a = (await this.multiplexClient.request(n))?.payload?.result || i.IDLE;
19717
+ const { createGetAgentStatus: e } = await Promise.resolve().then(() => gT), { createSendAgentStatus: r } = await Promise.resolve().then(() => hI), { AGENT_STATUS: i } = await import("./index-C3bjyLFC.mjs"), n = e(t, t), a = (await this.multiplexClient.request(n))?.payload?.result || i.IDLE;
19705
19718
  await this.multiplexClient.publish(
19706
19719
  r(t, {
19707
19720
  agentType: this.agentConfigService.getAgentType() ?? void 0,
@@ -21628,7 +21641,7 @@ let Qo = class {
21628
21641
  * Middleware layers wrap around this with setup (BEFORE) and cleanup (AFTER)
21629
21642
  */
21630
21643
  async launchPty(t) {
21631
- const { AGENT_STATUS: e } = await import("./index-BKpNk4j3.mjs"), r = t.metadata.agentCommand, i = t.metadata.agentArgs;
21644
+ const { AGENT_STATUS: e } = await import("./index-C3bjyLFC.mjs"), r = t.metadata.agentCommand, i = t.metadata.agentArgs;
21632
21645
  if (!r)
21633
21646
  throw new Error("launchPty requires metadata.agentCommand to be set by middleware");
21634
21647
  const n = await this.getAgentEnvironmentVariablesForContext(t);
@@ -22779,7 +22792,7 @@ class TT extends cy {
22779
22792
  if (!e.length) return;
22780
22793
  const i = (/* @__PURE__ */ new Date()).toISOString();
22781
22794
  try {
22782
- const { createSelectComponent: n, createToolInvocationInput: o } = await import("./index-T6apYL3S.mjs"), { createRequestApproval: s } = await Promise.resolve().then(() => Bi), a = e.map((_) => ({ label: _.text, value: _.number, selected: !!_.selected })), u = n(a), c = o(!1, u), f = s(r.agentSessionId, {
22795
+ const { createSelectComponent: n, createToolInvocationInput: o } = await import("./index-CJ3v4aki.mjs"), { createRequestApproval: s } = await Promise.resolve().then(() => Bi), a = e.map((_) => ({ label: _.text, value: _.number, selected: !!_.selected })), u = n(a), c = o(!1, u), f = s(r.agentSessionId, {
22783
22796
  toolName: "selectOption",
22784
22797
  toolArgs: { timestamp: i, options: a },
22785
22798
  input: c
@@ -25046,7 +25059,12 @@ let qu = class {
25046
25059
  sessionAlias: i,
25047
25060
  dockerImage: a.dockerImage,
25048
25061
  mcps: a.mcps,
25049
- hooks: a.hooks
25062
+ hooks: a.hooks,
25063
+ // Include apiUrl and serverUrl for HTTP/WS configuration
25064
+ // These will be used by AgentManager to initialize AgentConfigService
25065
+ apiUrl: e,
25066
+ serverUrl: e
25067
+ // WebSocket service uses same URL as HTTP (protocol converted automatically)
25050
25068
  }), f = {
25051
25069
  id: r,
25052
25070
  label: i,
@@ -42719,4 +42737,4 @@ export {
42719
42737
  fw as y,
42720
42738
  Iv as z
42721
42739
  };
42722
- //# sourceMappingURL=index-CPSRdi5k.mjs.map
42740
+ //# sourceMappingURL=index-CQkCZNRM.mjs.map