acpx 0.17.0 → 0.17.1
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/{agent-registry-DU6mhZBL.js → agent-registry-evUoJINz.js} +5 -1
- package/dist/agent-registry-evUoJINz.js.map +1 -0
- package/dist/agent-registry.d.ts.map +1 -1
- package/dist/agent-registry.js +1 -1
- package/dist/{cli-CiyfEC7L.js → cli-B2ycKzaO.js} +5 -5
- package/dist/{cli-CiyfEC7L.js.map → cli-B2ycKzaO.js.map} +1 -1
- package/dist/cli.js +9 -9
- package/dist/{client-C6NUFqr-.d.ts → client-CkbBoSGd.d.ts} +6 -2
- package/dist/client-CkbBoSGd.d.ts.map +1 -0
- package/dist/{flows-CTOdIk-m.js → flows-xGyhmoHO.js} +5 -5
- package/dist/{flows-CTOdIk-m.js.map → flows-xGyhmoHO.js.map} +1 -1
- package/dist/flows.d.ts +1 -1
- package/dist/flows.js +1 -1
- package/dist/{invocation-options-DbCcOAzM.js → invocation-options-eZEBh4vd.js} +5 -5
- package/dist/{invocation-options-DbCcOAzM.js.map → invocation-options-eZEBh4vd.js.map} +1 -1
- package/dist/{ipc-D3akHMEq.js → ipc-D2rstexT.js} +4 -4
- package/dist/ipc-D2rstexT.js.map +1 -0
- package/dist/{output-BPPjvJTI.js → output-D2xL6wdp.js} +3 -3
- package/dist/{output-BPPjvJTI.js.map → output-D2xL6wdp.js.map} +1 -1
- package/dist/{queue-owner-runtime--IbbndGz.js → queue-owner-runtime-Dgv3e2Tp.js} +64 -38
- package/dist/queue-owner-runtime-Dgv3e2Tp.js.map +1 -0
- package/dist/runtime.d.ts +91 -37
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +113 -29
- package/dist/runtime.js.map +1 -1
- package/dist/{session-watch--UX5dh00.js → session-watch-CTe9Bnbc.js} +4 -4
- package/dist/{session-watch--UX5dh00.js.map → session-watch-CTe9Bnbc.js.map} +1 -1
- package/dist/{watch-BbBxO-kb.js → watch-DxuXEc8n.js} +2 -2
- package/dist/{watch-BbBxO-kb.js.map → watch-DxuXEc8n.js.map} +1 -1
- package/package.json +3 -3
- package/skills/acpx/SKILL.md +1 -0
- package/dist/agent-registry-DU6mhZBL.js.map +0 -1
- package/dist/client-C6NUFqr-.d.ts.map +0 -1
- package/dist/ipc-D3akHMEq.js.map +0 -1
- package/dist/queue-owner-runtime--IbbndGz.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as startPerfTimer, At as AgentSpawnError, B as extractAgentSessionId, Bt as SessionModeReplayError, C as textPrompt, Ct as OUTPUT_ERROR_ORIGINS, E as findGitRepositoryRoot, F as resolveSessionRecord, Ft as GeminiAcpStartupTimeoutError, H as SESSION_JOURNAL_SCHEMA, I as writeSessionRecord, It as PermissionDeniedError, J as incrementPerfCounter, K as formatPerfMetric, Lt as PermissionPromptUnavailableError, M as normalizeName, Mt as AuthPolicyError, Nt as ClaudeAcpSessionCreateTimeoutError, O as findSessionByDirectoryWalk, Ot as AcpxOperationalError, Pt as CopilotAcpUnsupportedError, Q as setPerfGauge, Rt as QueueConnectionError, S as promptToDisplayText, St as OUTPUT_ERROR_CODES, T as absolutePath, U as SessionJournalReader, Ut as SessionResumeRequiredError, V as normalizeAgentSessionId, Vt as SessionModelReplayError, Wt as UnsupportedPromptContentError, X as recordPerfDuration, Y as measurePerf, Z as resetPerfMetrics, _ as waitMs$1, _t as formatUnknownErrorMessage, a as trySetModelOnRunningOwner, bt as EXIT_CODES, c as queueRequestExceedsLimit, ct as defaultSessionEventLog, dt as sessionEventLockPath, f as refreshQueueOwnerLease, ft as sessionEventSegmentPath, g as tryAcquireQueueOwnerLease, gt as extractAcpError, h as terminateQueueOwnerForSession, ht as isProcessAlive, i as trySetModeOnRunningOwner, jt as AgentStartupError, k as isoNow$1, kt as AgentDisconnectedError, l as parseQueueRequest, lt as sessionBaseDir, m as terminateProcess, n as tryCloseSessionOnRunningOwner, nt as isAcpMessageObject, o as trySubmitToRunningOwner, p as releaseQueueOwnerLease, q as getPerfMetricsSnapshot, r as trySetConfigOptionOnRunningOwner, rt as isSessionUpdateNotification, s as queueRequestByteLimit, t as tryCancelOnRunningOwner, tt as isAcpJsonRpcMessage, ut as sessionEventActivePath, vt as isAcpResourceNotFoundError, y as getUnsupportedPromptContentMessage, zt as SessionConfigOptionReplayError } from "./ipc-
|
|
2
|
-
import { A as resolveAgentCommandParts, C as asAbsoluteCwd, E as isoNow$2, F as waitForSpawn, M as runTimedExecFile, N as splitCommandLine, P as waitForChildExit, S as PROCESS_HELPER_TIMEOUT_MS, T as isChildProcessRunning, _ as buildSpawnCommandOptions, b as readWindowsEnvValue, f as resolveBuiltInAgentLaunch, g as buildAgentSpawnCommand, j as resolveAgentSessionCwd, k as requireAgentStdio, v as buildTerminalShellSpawnCommand, w as basenameToken, x as resolveWindowsExecutablePath, y as buildTerminalSpawnCommand } from "./agent-registry-
|
|
1
|
+
import { $ as startPerfTimer, At as AgentSpawnError, B as extractAgentSessionId, Bt as SessionModeReplayError, C as textPrompt, Ct as OUTPUT_ERROR_ORIGINS, E as findGitRepositoryRoot, F as resolveSessionRecord, Ft as GeminiAcpStartupTimeoutError, H as SESSION_JOURNAL_SCHEMA, I as writeSessionRecord, It as PermissionDeniedError, J as incrementPerfCounter, K as formatPerfMetric, Lt as PermissionPromptUnavailableError, M as normalizeName, Mt as AuthPolicyError, Nt as ClaudeAcpSessionCreateTimeoutError, O as findSessionByDirectoryWalk, Ot as AcpxOperationalError, Pt as CopilotAcpUnsupportedError, Q as setPerfGauge, Rt as QueueConnectionError, S as promptToDisplayText, St as OUTPUT_ERROR_CODES, T as absolutePath, U as SessionJournalReader, Ut as SessionResumeRequiredError, V as normalizeAgentSessionId, Vt as SessionModelReplayError, Wt as UnsupportedPromptContentError, X as recordPerfDuration, Y as measurePerf, Z as resetPerfMetrics, _ as waitMs$1, _t as formatUnknownErrorMessage, a as trySetModelOnRunningOwner, bt as EXIT_CODES, c as queueRequestExceedsLimit, ct as defaultSessionEventLog, dt as sessionEventLockPath, f as refreshQueueOwnerLease, ft as sessionEventSegmentPath, g as tryAcquireQueueOwnerLease, gt as extractAcpError, h as terminateQueueOwnerForSession, ht as isProcessAlive, i as trySetModeOnRunningOwner, jt as AgentStartupError, k as isoNow$1, kt as AgentDisconnectedError, l as parseQueueRequest, lt as sessionBaseDir, m as terminateProcess, n as tryCloseSessionOnRunningOwner, nt as isAcpMessageObject, o as trySubmitToRunningOwner, p as releaseQueueOwnerLease, q as getPerfMetricsSnapshot, r as trySetConfigOptionOnRunningOwner, rt as isSessionUpdateNotification, s as queueRequestByteLimit, t as tryCancelOnRunningOwner, tt as isAcpJsonRpcMessage, ut as sessionEventActivePath, vt as isAcpResourceNotFoundError, y as getUnsupportedPromptContentMessage, zt as SessionConfigOptionReplayError } from "./ipc-D2rstexT.js";
|
|
2
|
+
import { A as resolveAgentCommandParts, C as asAbsoluteCwd, E as isoNow$2, F as waitForSpawn, M as runTimedExecFile, N as splitCommandLine, P as waitForChildExit, S as PROCESS_HELPER_TIMEOUT_MS, T as isChildProcessRunning, _ as buildSpawnCommandOptions, b as readWindowsEnvValue, f as resolveBuiltInAgentLaunch, g as buildAgentSpawnCommand, j as resolveAgentSessionCwd, k as requireAgentStdio, v as buildTerminalShellSpawnCommand, w as basenameToken, x as resolveWindowsExecutablePath, y as buildTerminalSpawnCommand } from "./agent-registry-evUoJINz.js";
|
|
3
3
|
import fs, { readFileSync, realpathSync } from "node:fs";
|
|
4
4
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
5
5
|
import path from "node:path";
|
|
@@ -1571,6 +1571,7 @@ function observeAcpStream(base, options) {
|
|
|
1571
1571
|
const activePrompt = promptOwner ? options.bindPromptOwner(promptOwner) : void 0;
|
|
1572
1572
|
const id = responseId(message);
|
|
1573
1573
|
if (!(id !== void 0 && elicitationRequestIds.delete(id))) options.onMessage("outbound", message);
|
|
1574
|
+
if (activePrompt) options.assertPromptActive(activePrompt);
|
|
1574
1575
|
const writer = base.writable.getWriter();
|
|
1575
1576
|
try {
|
|
1576
1577
|
await writer.write(message);
|
|
@@ -2361,6 +2362,7 @@ var AcpClient = class {
|
|
|
2361
2362
|
cancellingSessionIds = /* @__PURE__ */ new Set();
|
|
2362
2363
|
permissionAbortControllers = /* @__PURE__ */ new Map();
|
|
2363
2364
|
closing = false;
|
|
2365
|
+
closeEpoch = 0;
|
|
2364
2366
|
agentStartedAt;
|
|
2365
2367
|
lastAgentExit;
|
|
2366
2368
|
lastKnownPid;
|
|
@@ -2457,8 +2459,11 @@ var AcpClient = class {
|
|
|
2457
2459
|
this.filesystem.updatePermissionPolicy(this.options.permissionMode, this.options.nonInteractivePermissions);
|
|
2458
2460
|
this.terminalManager.updatePermissionPolicy(this.options.permissionMode, this.options.nonInteractivePermissions);
|
|
2459
2461
|
}
|
|
2462
|
+
hasLiveConnection() {
|
|
2463
|
+
return this.connection != null && !this.connection.signal.aborted && this.agent != null && isChildProcessRunning(this.agent);
|
|
2464
|
+
}
|
|
2460
2465
|
hasReusableSession(sessionId) {
|
|
2461
|
-
return this.
|
|
2466
|
+
return this.hasLiveConnection() && this.loadedSessionId === sessionId;
|
|
2462
2467
|
}
|
|
2463
2468
|
hasActivePrompt(sessionId) {
|
|
2464
2469
|
if (!this.activePrompt) return false;
|
|
@@ -2475,18 +2480,21 @@ var AcpClient = class {
|
|
|
2475
2480
|
active.elicitationController.abort();
|
|
2476
2481
|
}
|
|
2477
2482
|
async start() {
|
|
2478
|
-
if (this.
|
|
2483
|
+
if (this.hasLiveConnection()) return;
|
|
2479
2484
|
if (this.connection || this.agent) await this.close();
|
|
2485
|
+
const epoch = this.closeEpoch;
|
|
2480
2486
|
const maxMessageBytes = readMaxAcpMessageBytes();
|
|
2481
2487
|
const launch = await this.resolveAgentLaunchPlan();
|
|
2482
2488
|
this.logAgentLaunch(launch);
|
|
2483
2489
|
await this.ensureLaunchSupport(launch);
|
|
2484
2490
|
const { child, process: startedProcess } = await this.spawnAgentProcess(launch);
|
|
2485
|
-
this.
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2491
|
+
if (this.closeEpoch === epoch) {
|
|
2492
|
+
this.agent = child;
|
|
2493
|
+
this.closing = false;
|
|
2494
|
+
this.agentStartedAt = startedProcess.startedAt;
|
|
2495
|
+
this.lastAgentExit = void 0;
|
|
2496
|
+
this.lastKnownPid = startedProcess.pid;
|
|
2497
|
+
}
|
|
2490
2498
|
const startupStderr = [];
|
|
2491
2499
|
child.stderr.on("data", (chunk) => {
|
|
2492
2500
|
this.captureStartupStderr(startupStderr, chunk);
|
|
@@ -2502,6 +2510,7 @@ var AcpClient = class {
|
|
|
2502
2510
|
startupFailure.dispose();
|
|
2503
2511
|
throw error;
|
|
2504
2512
|
}
|
|
2513
|
+
await this.stopIfClosedDuringLaunch(epoch, child, startupFailure);
|
|
2505
2514
|
const input = Writable.toWeb(child.stdin);
|
|
2506
2515
|
const output = Readable.toWeb(child.stdout);
|
|
2507
2516
|
let connection;
|
|
@@ -2509,7 +2518,13 @@ var AcpClient = class {
|
|
|
2509
2518
|
this.rejectPendingConnectionRequests(error);
|
|
2510
2519
|
connection?.close(error);
|
|
2511
2520
|
}));
|
|
2512
|
-
|
|
2521
|
+
const capabilities = resolveClientCapabilities({
|
|
2522
|
+
devinAcp: launch.devinAcp,
|
|
2523
|
+
fs: this.options.fs !== false,
|
|
2524
|
+
terminal: this.options.terminal !== false,
|
|
2525
|
+
elicitationModes: this.options.elicitationModes
|
|
2526
|
+
});
|
|
2527
|
+
connection = this.createConnection(stream, launch, capabilities);
|
|
2513
2528
|
connection.signal.addEventListener("abort", () => {
|
|
2514
2529
|
this.recordAgentExit(child, "connection_close", child.exitCode ?? null, child.signalCode ?? null);
|
|
2515
2530
|
}, { once: true });
|
|
@@ -2518,7 +2533,8 @@ var AcpClient = class {
|
|
|
2518
2533
|
connection,
|
|
2519
2534
|
startupFailure,
|
|
2520
2535
|
startupStderr,
|
|
2521
|
-
launch
|
|
2536
|
+
launch,
|
|
2537
|
+
capabilities
|
|
2522
2538
|
});
|
|
2523
2539
|
}
|
|
2524
2540
|
async resolveAgentLaunchPlan() {
|
|
@@ -2615,18 +2631,21 @@ var AcpClient = class {
|
|
|
2615
2631
|
releaseExitNotification();
|
|
2616
2632
|
}
|
|
2617
2633
|
}
|
|
2618
|
-
createConnection(stream, launch) {
|
|
2634
|
+
createConnection(stream, launch, capabilities) {
|
|
2619
2635
|
const app = client({ name: "acpx" }).onNotification(methods.client.session.update, async ({ params }) => {
|
|
2620
2636
|
await this.handleSessionUpdate(params);
|
|
2621
2637
|
}).onNotification(methods.client.elicitation.complete, async () => {}).onRequest(methods.client.session.requestPermission, async ({ params }) => {
|
|
2622
2638
|
return await this.handlePermissionRequest(params);
|
|
2623
2639
|
}).onRequest(methods.client.elicitation.create, async ({ params, requestId, signal }) => {
|
|
2624
2640
|
return await this.handleElicitationRequest(params, requestId, signal);
|
|
2625
|
-
})
|
|
2641
|
+
});
|
|
2642
|
+
if (capabilities.fs?.readTextFile) app.onRequest(methods.client.fs.readTextFile, async ({ params }) => {
|
|
2626
2643
|
return await this.handleReadTextFile(params);
|
|
2627
|
-
})
|
|
2644
|
+
});
|
|
2645
|
+
if (capabilities.fs?.writeTextFile) app.onRequest(methods.client.fs.writeTextFile, async ({ params }) => {
|
|
2628
2646
|
return await this.handleWriteTextFile(params);
|
|
2629
|
-
})
|
|
2647
|
+
});
|
|
2648
|
+
if (capabilities.terminal) app.onRequest(methods.client.terminal.create, async ({ params }) => {
|
|
2630
2649
|
return await this.handleCreateTerminal(params);
|
|
2631
2650
|
}).onRequest(methods.client.terminal.output, async ({ params }) => {
|
|
2632
2651
|
return await this.terminalManager.terminalOutput(params);
|
|
@@ -2644,7 +2663,7 @@ var AcpClient = class {
|
|
|
2644
2663
|
}
|
|
2645
2664
|
async initializeAgentConnection(params) {
|
|
2646
2665
|
try {
|
|
2647
|
-
const initResult = await Promise.race([this.initializeProtocolConnection(params.connection, params.launch), params.startupFailure.promise]);
|
|
2666
|
+
const initResult = await Promise.race([this.initializeProtocolConnection(params.connection, params.launch, params.capabilities), params.startupFailure.promise]);
|
|
2648
2667
|
params.startupFailure.dispose();
|
|
2649
2668
|
this.connection = params.connection;
|
|
2650
2669
|
this.initResult = initResult;
|
|
@@ -2655,15 +2674,10 @@ var AcpClient = class {
|
|
|
2655
2674
|
await this.handleInitializeFailure(params, error);
|
|
2656
2675
|
}
|
|
2657
2676
|
}
|
|
2658
|
-
async initializeProtocolConnection(connection, launch) {
|
|
2677
|
+
async initializeProtocolConnection(connection, launch, capabilities) {
|
|
2659
2678
|
const initializePromise = connection.agent.request(methods.agent.initialize, {
|
|
2660
2679
|
protocolVersion: PROTOCOL_VERSION,
|
|
2661
|
-
clientCapabilities:
|
|
2662
|
-
devinAcp: launch.devinAcp,
|
|
2663
|
-
fs: this.options.fs !== false,
|
|
2664
|
-
terminal: this.options.terminal !== false,
|
|
2665
|
-
elicitationModes: this.options.elicitationModes ?? []
|
|
2666
|
-
}),
|
|
2680
|
+
clientCapabilities: capabilities,
|
|
2667
2681
|
clientInfo: resolveClientInfo(launch.devinAcp)
|
|
2668
2682
|
});
|
|
2669
2683
|
const initialized = launch.geminiAcp ? await withTimeout(initializePromise, resolveGeminiAcpStartupTimeoutMs()) : await initializePromise;
|
|
@@ -2689,6 +2703,7 @@ var AcpClient = class {
|
|
|
2689
2703
|
},
|
|
2690
2704
|
suppressReplaySessionUpdates: () => this.suppressReplaySessionUpdateMessages,
|
|
2691
2705
|
bindPromptOwner: (owner) => this.bindPromptOwner(owner),
|
|
2706
|
+
assertPromptActive: (active) => this.assertPromptActive(active),
|
|
2692
2707
|
onPromptRequestWritten: (active, owner) => this.onPromptRequestWritten(active, owner)
|
|
2693
2708
|
});
|
|
2694
2709
|
}
|
|
@@ -2781,28 +2796,22 @@ var AcpClient = class {
|
|
|
2781
2796
|
this.suppressSessionUpdates = previous.suppressSessionUpdates;
|
|
2782
2797
|
this.suppressReplaySessionUpdateMessages = previous.suppressReplaySessionUpdateMessages;
|
|
2783
2798
|
}
|
|
2784
|
-
async prompt(sessionId, prompt, onRequestWritten, onElicitation, onPermissionRequest) {
|
|
2799
|
+
async prompt(sessionId, prompt, onRequestWritten, onElicitation, onPermissionRequest, authority) {
|
|
2785
2800
|
const connection = this.getConnection();
|
|
2786
2801
|
const normalizedPrompt = this.normalizePromptForAgent(prompt);
|
|
2787
2802
|
const restoreConsoleError = this.options.suppressSdkConsoleErrors ? installSdkConsoleErrorSuppression() : void 0;
|
|
2788
2803
|
const previousActivePrompt = this.activePrompt;
|
|
2789
|
-
const activePrompt = this.beginActivePrompt(sessionId, onRequestWritten, onElicitation, onPermissionRequest);
|
|
2790
|
-
let promptPromise;
|
|
2804
|
+
const activePrompt = this.beginActivePrompt(sessionId, onRequestWritten, onElicitation, onPermissionRequest, authority);
|
|
2791
2805
|
try {
|
|
2792
|
-
promptPromise = this.runConnectionRequest(() => connection.agent.request(methods.agent.session.prompt, {
|
|
2806
|
+
const promptPromise = this.runConnectionRequest(() => connection.agent.request(methods.agent.session.prompt, {
|
|
2793
2807
|
sessionId,
|
|
2794
2808
|
prompt: normalizedPrompt
|
|
2795
|
-
}));
|
|
2796
|
-
|
|
2797
|
-
this.clearActivePrompt(activePrompt);
|
|
2798
|
-
restoreConsoleError?.();
|
|
2799
|
-
throw error;
|
|
2800
|
-
}
|
|
2801
|
-
activePrompt.promise = promptPromise;
|
|
2802
|
-
try {
|
|
2809
|
+
}), authority);
|
|
2810
|
+
activePrompt.promise = promptPromise;
|
|
2803
2811
|
previousActivePrompt?.elicitationController?.abort();
|
|
2804
2812
|
return this.returnPromptResponseOrPermissionFailure(sessionId, await promptPromise);
|
|
2805
2813
|
} catch (error) {
|
|
2814
|
+
if (activePrompt.admissionFailure) throw activePrompt.admissionFailure.error;
|
|
2806
2815
|
this.throwPromptPermissionFailureIfPresent(sessionId);
|
|
2807
2816
|
throw error;
|
|
2808
2817
|
} finally {
|
|
@@ -2810,11 +2819,12 @@ var AcpClient = class {
|
|
|
2810
2819
|
this.clearActivePrompt(activePrompt);
|
|
2811
2820
|
}
|
|
2812
2821
|
}
|
|
2813
|
-
beginActivePrompt(sessionId, onRequestWritten, elicitationHandler, permissionHandler) {
|
|
2822
|
+
beginActivePrompt(sessionId, onRequestWritten, elicitationHandler, permissionHandler, authority) {
|
|
2814
2823
|
this.cancellingSessionIds.delete(sessionId);
|
|
2815
2824
|
const active = {
|
|
2816
2825
|
sessionId,
|
|
2817
2826
|
onRequestWritten,
|
|
2827
|
+
authority,
|
|
2818
2828
|
elicitationHandler,
|
|
2819
2829
|
permissionHandler,
|
|
2820
2830
|
elicitationController: new AbortController()
|
|
@@ -2830,6 +2840,14 @@ var AcpClient = class {
|
|
|
2830
2840
|
if (active) active.requestId = owner.requestId;
|
|
2831
2841
|
return active;
|
|
2832
2842
|
}
|
|
2843
|
+
assertPromptActive(active) {
|
|
2844
|
+
try {
|
|
2845
|
+
assertControlAuthority(active.authority);
|
|
2846
|
+
} catch (error) {
|
|
2847
|
+
active.admissionFailure = { error };
|
|
2848
|
+
throw error;
|
|
2849
|
+
}
|
|
2850
|
+
}
|
|
2833
2851
|
onPromptRequestWritten(active, owner) {
|
|
2834
2852
|
if (active.requestId !== owner.requestId || active.sessionId !== owner.sessionId) return;
|
|
2835
2853
|
try {
|
|
@@ -3002,6 +3020,7 @@ var AcpClient = class {
|
|
|
3002
3020
|
}
|
|
3003
3021
|
async close() {
|
|
3004
3022
|
this.closing = true;
|
|
3023
|
+
this.closeEpoch += 1;
|
|
3005
3024
|
this.abortActiveElicitation();
|
|
3006
3025
|
await this.terminalManager.shutdown();
|
|
3007
3026
|
const agent = this.agent;
|
|
@@ -3026,6 +3045,12 @@ var AcpClient = class {
|
|
|
3026
3045
|
this.connection = void 0;
|
|
3027
3046
|
this.agent = void 0;
|
|
3028
3047
|
}
|
|
3048
|
+
async stopIfClosedDuringLaunch(epoch, child, startupFailure) {
|
|
3049
|
+
if (this.closeEpoch === epoch) return;
|
|
3050
|
+
startupFailure.dispose();
|
|
3051
|
+
await this.terminateAgentProcess(child);
|
|
3052
|
+
throw new Error("ACP client was closed while the agent was starting");
|
|
3053
|
+
}
|
|
3029
3054
|
abortActiveElicitation() {
|
|
3030
3055
|
this.activePrompt?.elicitationController?.abort();
|
|
3031
3056
|
}
|
|
@@ -3232,6 +3257,7 @@ var AcpClient = class {
|
|
|
3232
3257
|
}
|
|
3233
3258
|
async handlePermissionRequest(params) {
|
|
3234
3259
|
if (this.cancellingSessionIds.has(params.sessionId)) return cancelledPermissionResponse();
|
|
3260
|
+
if (this.initResult?.agentInfo?.name === "antigravity-acp" && params.toolCall.toolCallId.startsWith("interaction_")) return this.handleModePermissionError(params.sessionId, new PermissionPromptUnavailableError("Antigravity requested a user answer. acpx cannot answer Antigravity interaction questions; continue in an interactive client.")).response;
|
|
3235
3261
|
const hostResponse = await this.tryHandlePermissionRequestWithHost(params);
|
|
3236
3262
|
if (hostResponse) return hostResponse;
|
|
3237
3263
|
const { response, recorded } = await this.resolvePermissionRequestFromMode(params);
|
|
@@ -6210,7 +6236,7 @@ function abortTimedOutRequests(error, client, sessionId) {
|
|
|
6210
6236
|
async function runPromptTurn(params) {
|
|
6211
6237
|
let settledResponse;
|
|
6212
6238
|
try {
|
|
6213
|
-
const promptPromise = params.client.prompt(params.sessionId, params.prompt, params.onPromptRequestWritten, params.onElicitation, params.onPermissionRequest);
|
|
6239
|
+
const promptPromise = params.client.prompt(params.sessionId, params.prompt, params.onPromptRequestWritten, params.onElicitation, params.onPermissionRequest, params.authority);
|
|
6214
6240
|
promptPromise.then((response) => {
|
|
6215
6241
|
settledResponse = response;
|
|
6216
6242
|
}, () => {});
|
|
@@ -7536,4 +7562,4 @@ const queueOwnerRuntimeTestInternals = { queueOwnerExitIsFatal };
|
|
|
7536
7562
|
//#endregion
|
|
7537
7563
|
export { normalizeQueueOwnerTtlMs as $, setDesiredModeId as A, recordClientOperation as B, withConnectedSession as C, applyInitialModelSelection as D, applyConfigOptionsToRecord as E, createInitialSessionRecord as F, AcpClient as G, recordSessionUpdate as H, reconcileAgentSessionId as I, RequestedModelUnsupportedError as J, REQUESTED_MODEL_UNSUPPORTED_ERROR_CODE as K, cloneSessionAcpxState as L, sessionOptionsFromRecord as M, applyConversation as N, applyModelSelection as O, applyLifecycleSnapshotToRecord as P, DEFAULT_QUEUE_OWNER_TTL_MS as Q, cloneSessionConversation as R, setSessionModel as S, applyConfigOptionSelection as T, trimConversationForRuntime as U, recordPromptSubmission as V, advertisedModelState as W, getAcpxVersion as X, isRequestedModelUnsupportedError as Y, permissionModeSatisfies as Z, cancelSessionPrompt as _, runQueuedTask as a, withInterrupt as at, setSessionConfigOption as b, LiveSessionCheckpoint as c, normalizeOutputError as ct, flushPerfMetricsCapture as d, listSessionEvents as et, installPerfMetricsCapture as f, listAgentSessions as g, ensureSession as h, runOnce as i, assertControlAuthority as it, persistSessionOptions as j, applyRequestedModelIfAdvertised as k, runPromptTurn as l, createSessionWithClient as m, runSessionQueueOwner as n, InterruptedError as nt, sendSessionDirect as o, withTimeout as ot, createSession as p, REQUESTED_MODEL_UNSUPPORTED_REASONS as q, sendSession as r, TimeoutError as rt, DISCARD_OUTPUT_FORMATTER as s, exitCodeForOutputErrorCode as st, queueOwnerRuntimeTestInternals as t, isLegacyZedCodexAcpInvocation as tt, buildQueueOwnerArgOverride as u, closeSession as v, connectAndLoadSession as w, setSessionMode as x, sessionControlTestInternals as y, createSessionConversation as z };
|
|
7538
7564
|
|
|
7539
|
-
//# sourceMappingURL=queue-owner-runtime
|
|
7565
|
+
//# sourceMappingURL=queue-owner-runtime-Dgv3e2Tp.js.map
|