@agiflowai/agent-cli 0.1.6 → 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 +4 -0
- package/dist/claudeNotification.js +874 -892
- 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-CzonoyqG.mjs → index-B0CN_utb.mjs} +17 -14
- package/dist/{index-CzonoyqG.mjs.map → index-B0CN_utb.mjs.map} +1 -1
- package/dist/{index-BguL5xV2.mjs → index-BW0p4wl1.mjs} +2 -2
- package/dist/index-BW0p4wl1.mjs.map +1 -0
- package/dist/{index-98Y-WaTX.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-98Y-WaTX.mjs.map +0 -1
- package/dist/index-BguL5xV2.mjs.map +0 -1
|
@@ -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.
|
|
12485
|
+
VITE_AGENT_CLI_DOCKER_IMAGE: "agiflowai/agent-cli:v0.1.6",
|
|
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.
|
|
12485
|
+
VITE_AGENT_CLI_DOCKER_IMAGE: "agiflowai/agent-cli:v0.1.6",
|
|
12486
12486
|
VITE_AGENT_CLI_DOCKER_NETWORK: "",
|
|
12487
12487
|
VITE_SAVE_RAW: "",
|
|
12488
12488
|
VITE_MULTIPLEX_SOCKET_PATH: process.env.VITE_MULTIPLEX_SOCKET_PATH
|
package/dist/claudePreToolUse.js
CHANGED
|
@@ -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.
|
|
12485
|
+
VITE_AGENT_CLI_DOCKER_IMAGE: "agiflowai/agent-cli:v0.1.6",
|
|
12486
12486
|
VITE_AGENT_CLI_DOCKER_NETWORK: "",
|
|
12487
12487
|
VITE_SAVE_RAW: "",
|
|
12488
12488
|
VITE_MULTIPLEX_SOCKET_PATH: process.env.VITE_MULTIPLEX_SOCKET_PATH
|
package/dist/claudeSessionEnd.js
CHANGED
|
@@ -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.
|
|
12413
|
+
VITE_AGENT_CLI_DOCKER_IMAGE: "agiflowai/agent-cli:v0.1.6",
|
|
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.
|
|
12493
|
+
VITE_AGENT_CLI_DOCKER_IMAGE: "agiflowai/agent-cli:v0.1.6",
|
|
12494
12494
|
VITE_AGENT_CLI_DOCKER_NETWORK: "",
|
|
12495
12495
|
VITE_SAVE_RAW: "",
|
|
12496
12496
|
VITE_MULTIPLEX_SOCKET_PATH: process.env.VITE_MULTIPLEX_SOCKET_PATH
|
package/dist/claudeStop.js
CHANGED
|
@@ -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.
|
|
12487
|
+
VITE_AGENT_CLI_DOCKER_IMAGE: "agiflowai/agent-cli:v0.1.6",
|
|
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-
|
|
2
|
+
import { bu as z, bl as H, bv as P, bm as M } from "./index-B0CN_utb.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-
|
|
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-B0CN_utb.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";
|
|
@@ -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.
|
|
12496
|
+
VITE_AGENT_CLI_DOCKER_IMAGE: "agiflowai/agent-cli:v0.1.6",
|
|
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-
|
|
18836
|
+
const { createGetAgentStatus: e } = await Promise.resolve().then(() => rT), { createSendAgentStatus: r } = await Promise.resolve().then(() => tT), { AGENT_STATUS: i } = await import("./index-BW0p4wl1.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-
|
|
20676
|
+
const { AGENT_STATUS: e } = await import("./index-BW0p4wl1.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-
|
|
21833
|
+
const { createSelectComponent: n, createToolInvocationInput: o } = await import("./index-CLbzXWKM.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(
|
|
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),
|
|
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(
|
|
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("🛡️
|
|
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
|
|
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-
|
|
41988
|
+
//# sourceMappingURL=index-B0CN_utb.mjs.map
|