@agiflowai/agent-cli 0.1.6 → 0.1.8

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.
@@ -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.1.5",
12485
+ VITE_AGENT_CLI_DOCKER_IMAGE: "agiflowai/agent-cli:v0.1.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
@@ -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.1.5",
12485
+ VITE_AGENT_CLI_DOCKER_IMAGE: "agiflowai/agent-cli:v0.1.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
@@ -12482,7 +12482,7 @@ let er = class {
12482
12482
  this.runtimeConfig = gh.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.1.5",
12485
+ VITE_AGENT_CLI_DOCKER_IMAGE: "agiflowai/agent-cli:v0.1.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 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.1.5",
12413
+ VITE_AGENT_CLI_DOCKER_IMAGE: "agiflowai/agent-cli:v0.1.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.1.5",
12493
+ VITE_AGENT_CLI_DOCKER_IMAGE: "agiflowai/agent-cli:v0.1.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.1.5",
12487
+ VITE_AGENT_CLI_DOCKER_IMAGE: "agiflowai/agent-cli:v0.1.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 { bu as z, bl as H, bv as P, bm as M } from "./index-CzonoyqG.mjs";
2
+ import { bu as z, bl as H, bv as P, bm as M } from "./index-_P3fcORL.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,4 +1,4 @@
1
- import { bg as g, bh as O, bi as e, bj as C, bk as T, bl as y, bm as w, bn as A, bo as I, bp as B, bq as M, br as P, bs as L, bt as _ } from "./index-CzonoyqG.mjs";
1
+ import { bg as g, bh as O, bi as e, bj as C, bk as T, bl as y, bm as w, bn as A, bo as I, bp as B, bq as M, br as P, bs as L, bt as _ } from "./index-_P3fcORL.mjs";
2
2
  import { useQueryClient as R, useQuery as F, useMutation as E, QueryClientProvider as q, QueryClient as z } from "@tanstack/react-query";
3
3
  import { useDispatch as K, useSelector as N, Provider as $ } from "react-redux";
4
4
  import { useRef as U, useEffect as V, useState as D } from "react";
@@ -1,4 +1,4 @@
1
- import { A as t, a, 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 u, m as i, 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 P, B as I, C as l, D as U, E as C, F as G, G as L, H as Y, I as f, 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 te } from "./index-CzonoyqG.mjs";
1
+ import { A as t, a, 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 u, m as i, 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 P, B as I, C as l, D as U, E as C, F as G, G as L, H as Y, I as f, 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 te } from "./index-_P3fcORL.mjs";
2
2
  export {
3
3
  t as AGENT_EVENT_TYPES,
4
4
  a as AGENT_STATUS,
@@ -56,4 +56,4 @@ export {
56
56
  se as OutputStreamSchema,
57
57
  te as TraceIdSchema
58
58
  };
59
- //# sourceMappingURL=index-BguL5xV2.mjs.map
59
+ //# sourceMappingURL=index-Cb01ISp3.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-Cb01ISp3.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,4 +1,4 @@
1
- import { aj as s, ai as t, aa as o, af as c, ae as S, a1 as m, a5 as r, ah as n, a9 as h, a7 as g, am as l, a8 as p, ad as M, ak as P, ag as T, a6 as u, a2 as i, ab as C, ac as v, a4 as I, a3 as d, al as x, an as A, ao as R, aq as f, ap as q, ar as V } from "./index-CzonoyqG.mjs";
1
+ import { aj as s, ai as t, aa as o, af as c, ae as S, a1 as m, a5 as r, ah as n, a9 as h, a7 as g, am as l, a8 as p, ad as M, ak as P, ag as T, a6 as u, a2 as i, ab as C, ac as v, a4 as I, a3 as d, al as x, an as A, ao as R, aq as f, ap as q, ar as V } from "./index-_P3fcORL.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-98Y-WaTX.mjs.map
31
+ //# sourceMappingURL=index-CoGollC7.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-CoGollC7.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -12493,7 +12493,7 @@ let Ni = class {
12493
12493
  this.runtimeConfig = wv.parse(t), this.appConfig = ew.parse({
12494
12494
  VITE_INJECT_AGIFLOW_APP_ENDPOINT: "https://agiflow.io",
12495
12495
  VITE_INJECT_AGIFLOW_APP_DOCKER_ENDPOINT: "https://agiflow.io",
12496
- VITE_AGENT_CLI_DOCKER_IMAGE: "agiflowai/agent-cli:v0.1.5",
12496
+ VITE_AGENT_CLI_DOCKER_IMAGE: "agiflowai/agent-cli:v0.1.7",
12497
12497
  VITE_AGENT_CLI_DOCKER_NETWORK: "",
12498
12498
  VITE_SAVE_RAW: "",
12499
12499
  VITE_MULTIPLEX_SOCKET_PATH: process.env.VITE_MULTIPLEX_SOCKET_PATH
@@ -18833,7 +18833,7 @@ let Ru = class {
18833
18833
  const t = this.agentConfigService.getStoredAgentSessionId();
18834
18834
  if (t)
18835
18835
  try {
18836
- const { createGetAgentStatus: e } = await Promise.resolve().then(() => rT), { createSendAgentStatus: r } = await Promise.resolve().then(() => tT), { AGENT_STATUS: i } = await import("./index-BguL5xV2.mjs"), n = e(t, t), a = (await this.multiplexClient.request(n))?.payload?.result || i.IDLE;
18836
+ const { createGetAgentStatus: e } = await Promise.resolve().then(() => rT), { createSendAgentStatus: r } = await Promise.resolve().then(() => tT), { AGENT_STATUS: i } = await import("./index-Cb01ISp3.mjs"), n = e(t, t), a = (await this.multiplexClient.request(n))?.payload?.result || i.IDLE;
18837
18837
  await this.multiplexClient.publish(
18838
18838
  r(t, {
18839
18839
  agentType: this.agentConfigService.getAgentType() ?? void 0,
@@ -20673,7 +20673,7 @@ let Yo = class {
20673
20673
  * Middleware layers wrap around this with setup (BEFORE) and cleanup (AFTER)
20674
20674
  */
20675
20675
  async launchPty(t) {
20676
- const { AGENT_STATUS: e } = await import("./index-BguL5xV2.mjs"), r = t.metadata.agentCommand, i = t.metadata.agentArgs;
20676
+ const { AGENT_STATUS: e } = await import("./index-Cb01ISp3.mjs"), r = t.metadata.agentCommand, i = t.metadata.agentArgs;
20677
20677
  if (!r)
20678
20678
  throw new Error("launchPty requires metadata.agentCommand to be set by middleware");
20679
20679
  const n = await this.getAgentEnvironmentVariablesForContext(t);
@@ -21830,7 +21830,7 @@ class hT extends cy {
21830
21830
  if (!e.length) return;
21831
21831
  const i = (/* @__PURE__ */ new Date()).toISOString();
21832
21832
  try {
21833
- const { createSelectComponent: n, createToolInvocationInput: o } = await import("./index-98Y-WaTX.mjs"), { createRequestApproval: s } = await Promise.resolve().then(() => ti), a = e.map((S) => ({ label: S.text, value: S.number, selected: !!S.selected })), u = n(a), c = o(!1, u), f = s(r.agentSessionId, {
21833
+ const { createSelectComponent: n, createToolInvocationInput: o } = await import("./index-CoGollC7.mjs"), { createRequestApproval: s } = await Promise.resolve().then(() => ti), a = e.map((S) => ({ label: S.text, value: S.number, selected: !!S.selected })), u = n(a), c = o(!1, u), f = s(r.agentSessionId, {
21834
21834
  toolName: "selectOption",
21835
21835
  toolArgs: { timestamp: i, options: a },
21836
21836
  input: c
@@ -21961,6 +21961,8 @@ let Qo = class extends Yo {
21961
21961
  autonomousStopTimeout = null;
21962
21962
  // Autonomous mode: track if idle_prompt was received (requires user input)
21963
21963
  idlePromptReceived = !1;
21964
+ // Autonomous mode: track if user input was received after idle_prompt
21965
+ userInputAfterIdlePrompt = !1;
21964
21966
  // Autonomous mode: track the prompt timeout for proper cleanup
21965
21967
  autonomousPromptTimeout = null;
21966
21968
  // Whitelist of simple keyboard commands that don't trigger complex input
@@ -22002,17 +22004,16 @@ let Qo = class extends Yo {
22002
22004
  f,
22003
22005
  S
22004
22006
  ), this.claudePath = "claude", this.multiplexClient.subscribe(Se.IDLE_PROMPT, (m) => {
22005
- m.command === "request" && this.handleIdlePromptNotification(m);
22007
+ m.command === "request" && this.handleIdlePromptNotification();
22006
22008
  });
22007
22009
  }
22008
22010
  /**
22009
22011
  * Handle idle_prompt notification from notification hook
22010
- * When Claude is waiting for user input (after 60+ seconds idle), cancel pending stop
22012
+ * When Claude is waiting for user input (after 60+ seconds idle), track the state
22013
+ * Stop will only be cancelled if user actually provides input after idle_prompt
22011
22014
  */
22012
- handleIdlePromptNotification(t) {
22013
- this.logger.info("🔔 idle_prompt notification received - Claude needs user input", {
22014
- message: t.payload?.message
22015
- }), this.idlePromptReceived = !0, this.autonomousStopTimeout && (clearTimeout(this.autonomousStopTimeout), this.autonomousStopTimeout = null, this.logger.info("⏹️ Cancelled pending stop - waiting for user input"));
22015
+ handleIdlePromptNotification() {
22016
+ this.logger.info("🔔 idle_prompt notification received - Claude needs user input"), this.idlePromptReceived = !0, this.userInputAfterIdlePrompt = !1;
22016
22017
  }
22017
22018
  /**
22018
22019
  * Override handleStopAgentRequest with 2-minute delay for autonomous mode
@@ -22027,8 +22028,8 @@ let Qo = class extends Yo {
22027
22028
  reason: t.payload.reason,
22028
22029
  sessionId: t.payload.sessionId
22029
22030
  }), this.autonomousStopTimeout = setTimeout(async () => {
22030
- if (this.idlePromptReceived) {
22031
- this.logger.info("🛡️ idle_prompt received during wait - cancelling stop (requires user input)");
22031
+ if (this.idlePromptReceived && this.userInputAfterIdlePrompt) {
22032
+ this.logger.info("🛡️ User input received after idle_prompt - cancelling stop");
22032
22033
  return;
22033
22034
  }
22034
22035
  if (!this.ptyRunner.isSessionRunning()) {
@@ -22160,7 +22161,9 @@ let Qo = class extends Yo {
22160
22161
  * Override handleMessageInput to detect and handle complex input
22161
22162
  */
22162
22163
  async handleMessageInput(t) {
22163
- const e = t.payload.content, r = this.isSimpleKeyboardInput(e);
22164
+ const e = t.payload.content;
22165
+ this.idlePromptReceived && (this.userInputAfterIdlePrompt = !0, this.logger.debug("User input received after idle_prompt"));
22166
+ const r = this.isSimpleKeyboardInput(e);
22164
22167
  this.complexInputDetected && !r && await this.handleComplexInputEscape(), await super.handleMessageInput(t);
22165
22168
  }
22166
22169
  /**
@@ -41982,4 +41985,4 @@ export {
41982
41985
  Av as y,
41983
41986
  Sw as z
41984
41987
  };
41985
- //# sourceMappingURL=index-CzonoyqG.mjs.map
41988
+ //# sourceMappingURL=index-_P3fcORL.mjs.map