acpx 0.20.0 → 0.21.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-Gtwn7nMp.js → agent-registry-Cz9fD9H1.js} +5 -8
- package/dist/{agent-registry-Gtwn7nMp.js.map → agent-registry-Cz9fD9H1.js.map} +1 -1
- package/dist/agent-registry.d.ts +0 -2
- package/dist/agent-registry.d.ts.map +1 -1
- package/dist/agent-registry.js +1 -1
- package/dist/{cli-CnufHoAJ.js → cli-BLEPj7lL.js} +6 -8
- package/dist/{cli-CnufHoAJ.js.map → cli-BLEPj7lL.js.map} +1 -1
- package/dist/cli.d.ts +1 -5
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +27 -45
- package/dist/cli.js.map +1 -1
- package/dist/{client-R5OmZ--S.d.ts → client-D12zqSyN.d.ts} +3 -8
- package/dist/client-D12zqSyN.d.ts.map +1 -0
- package/dist/{flows-CTRAV28u.js → flows-BVpRv0Df.js} +19 -33
- package/dist/{flows-CTRAV28u.js.map → flows-BVpRv0Df.js.map} +1 -1
- package/dist/flows.d.ts +2 -14
- package/dist/flows.d.ts.map +1 -1
- package/dist/flows.js +1 -1
- package/dist/{invocation-options-DE3Z_fqa.js → invocation-options-VJlayf-0.js} +16 -12
- package/dist/{invocation-options-DE3Z_fqa.js.map → invocation-options-VJlayf-0.js.map} +1 -1
- package/dist/{ipc-D2BC99hf.js → ipc-BbYFsKOj.js} +38 -69
- package/dist/ipc-BbYFsKOj.js.map +1 -0
- package/dist/{output-B1Srnvko.js → output-mqRHzGzM.js} +10 -17
- package/dist/{output-B1Srnvko.js.map → output-mqRHzGzM.js.map} +1 -1
- package/dist/{queue-owner-runtime-Be8sr9L5.js → queue-owner-runtime-B0mPqOu4.js} +168 -117
- package/dist/queue-owner-runtime-B0mPqOu4.js.map +1 -0
- package/dist/runtime.d.ts +18 -26
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +29 -32
- package/dist/runtime.js.map +1 -1
- package/dist/{session-options-DQlqgFv2.d.ts → session-options-BlnP3WAc.d.ts} +8 -7
- package/dist/session-options-BlnP3WAc.d.ts.map +1 -0
- package/dist/{session-watch-CpYYtV62.js → session-watch-BnIxHQrU.js} +5 -6
- package/dist/{session-watch-CpYYtV62.js.map → session-watch-BnIxHQrU.js.map} +1 -1
- package/dist/{watch-Db2D1eYN.js → watch-bQXyUy3z.js} +3 -4
- package/dist/{watch-Db2D1eYN.js.map → watch-bQXyUy3z.js.map} +1 -1
- package/package.json +20 -20
- package/skills/acpx/SKILL.md +27 -1
- package/dist/client-R5OmZ--S.d.ts.map +0 -1
- package/dist/ipc-D2BC99hf.js.map +0 -1
- package/dist/queue-owner-runtime-Be8sr9L5.js.map +0 -1
- package/dist/session-options-DQlqgFv2.d.ts.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as PROCESS_HELPER_TIMEOUT_MS, E as isChildProcessRunning, N as runTimedExecFile, P as splitCommandLine, S as PROCESS_HELPER_MAX_BUFFER_BYTES, n as AGENT_REGISTRY, r as BUILT_IN_AGENT_PACKAGES, t as AGENT_ARGV_REGISTRY } from "./agent-registry-
|
|
1
|
+
import { C as PROCESS_HELPER_TIMEOUT_MS, E as isChildProcessRunning, N as runTimedExecFile, P as splitCommandLine, S as PROCESS_HELPER_MAX_BUFFER_BYTES, n as AGENT_REGISTRY, r as BUILT_IN_AGENT_PACKAGES, t as AGENT_ARGV_REGISTRY } from "./agent-registry-Cz9fD9H1.js";
|
|
2
2
|
import fs, { statSync } from "node:fs";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import fs$1 from "node:fs/promises";
|
|
@@ -12,7 +12,7 @@ import { isHardlinkFallbackError } from "@openclaw/fs-safe/durability";
|
|
|
12
12
|
import { acquireFileLock } from "@openclaw/fs-safe/file-lock";
|
|
13
13
|
import net from "node:net";
|
|
14
14
|
import { resolveSecureTempRoot } from "@openclaw/fs-safe/secure-temp-root";
|
|
15
|
-
|
|
15
|
+
// src/errors.ts
|
|
16
16
|
var AcpxOperationalError = class extends Error {
|
|
17
17
|
outputCode;
|
|
18
18
|
detailCode;
|
|
@@ -185,8 +185,7 @@ var PermissionPromptUnavailableError = class extends AcpxOperationalError {
|
|
|
185
185
|
super(message);
|
|
186
186
|
}
|
|
187
187
|
};
|
|
188
|
-
|
|
189
|
-
//#region src/types.ts
|
|
188
|
+
// src/types.ts
|
|
190
189
|
const EXIT_CODES = {
|
|
191
190
|
SUCCESS: 0,
|
|
192
191
|
ERROR: 1,
|
|
@@ -229,8 +228,7 @@ const OUTPUT_ERROR_ORIGINS = [
|
|
|
229
228
|
"acp"
|
|
230
229
|
];
|
|
231
230
|
const SESSION_RECORD_SCHEMA = "acpx.session.v1";
|
|
232
|
-
|
|
233
|
-
//#region src/acp/error-shapes.ts
|
|
231
|
+
// src/acp/error-shapes.ts
|
|
234
232
|
const RESOURCE_NOT_FOUND_ACP_CODES = /* @__PURE__ */ new Set([-32001, -32002]);
|
|
235
233
|
function asRecord$5(value) {
|
|
236
234
|
if (!value || typeof value !== "object" || Array.isArray(value)) return;
|
|
@@ -302,8 +300,7 @@ function isAcpResourceNotFoundError(error) {
|
|
|
302
300
|
}
|
|
303
301
|
return isSessionNotFoundText(formatUnknownErrorMessage(error));
|
|
304
302
|
}
|
|
305
|
-
|
|
306
|
-
//#region src/acp/error-normalization.ts
|
|
303
|
+
// src/acp/error-normalization.ts
|
|
307
304
|
const AUTH_REQUIRED_ACP_CODES = /* @__PURE__ */ new Set([-32e3]);
|
|
308
305
|
const QUERY_CLOSED_BEFORE_RESPONSE_DETAIL = "query closed before response received";
|
|
309
306
|
function asRecord$4(value) {
|
|
@@ -432,8 +429,7 @@ function exitCodeForOutputErrorCode(code) {
|
|
|
432
429
|
default: return EXIT_CODES.ERROR;
|
|
433
430
|
}
|
|
434
431
|
}
|
|
435
|
-
|
|
436
|
-
//#region src/process-liveness.ts
|
|
432
|
+
// src/process-liveness.ts
|
|
437
433
|
function isProcessAlive(pid) {
|
|
438
434
|
if (!pid || !Number.isInteger(pid) || pid <= 0 || pid === process.pid) return false;
|
|
439
435
|
try {
|
|
@@ -452,8 +448,7 @@ function isProcessDefinitelyDead(pid) {
|
|
|
452
448
|
return error.code === "ESRCH";
|
|
453
449
|
}
|
|
454
450
|
}
|
|
455
|
-
|
|
456
|
-
//#region \0@oxc-project+runtime@0.153.0/helpers/esm/usingCtx.js
|
|
451
|
+
// \0@oxc-project+runtime@0.155.0/helpers/esm/usingCtx.js
|
|
457
452
|
function _usingCtx() {
|
|
458
453
|
var r = "function" == typeof SuppressedError ? SuppressedError : function(r, e) {
|
|
459
454
|
var n = Error();
|
|
@@ -508,8 +503,7 @@ function _usingCtx() {
|
|
|
508
503
|
}
|
|
509
504
|
};
|
|
510
505
|
}
|
|
511
|
-
|
|
512
|
-
//#region src/state-files.ts
|
|
506
|
+
// src/state-files.ts
|
|
513
507
|
async function writePrivateFile(filePath, content, options = {}) {
|
|
514
508
|
try {
|
|
515
509
|
var _usingCtx$1 = _usingCtx();
|
|
@@ -542,8 +536,7 @@ async function writePrivateFile(filePath, content, options = {}) {
|
|
|
542
536
|
async function writePrivateJsonFile(filePath, value) {
|
|
543
537
|
await writePrivateFile(filePath, `${JSON.stringify(value, null, 2)}\n`);
|
|
544
538
|
}
|
|
545
|
-
|
|
546
|
-
//#region src/session/event-log.ts
|
|
539
|
+
// src/session/event-log.ts
|
|
547
540
|
const DEFAULT_EVENT_SEGMENT_MAX_BYTES = 67108864;
|
|
548
541
|
/** Upper bound stored for a newly imported journal. */
|
|
549
542
|
const MAX_EVENT_SEGMENTS = 1024;
|
|
@@ -616,8 +609,7 @@ function defaultSessionEventLog(sessionId) {
|
|
|
616
609
|
last_write_error: null
|
|
617
610
|
};
|
|
618
611
|
}
|
|
619
|
-
|
|
620
|
-
//#region src/acp/jsonrpc.ts
|
|
612
|
+
// src/acp/jsonrpc.ts
|
|
621
613
|
function asRecord$3(value) {
|
|
622
614
|
if (!value || typeof value !== "object" || Array.isArray(value)) return null;
|
|
623
615
|
return value;
|
|
@@ -709,8 +701,7 @@ function parseJsonRpcErrorMessage(message) {
|
|
|
709
701
|
if (!errorRecord || typeof errorRecord.message !== "string") return;
|
|
710
702
|
return errorRecord.message;
|
|
711
703
|
}
|
|
712
|
-
|
|
713
|
-
//#region src/perf-metrics.ts
|
|
704
|
+
// src/perf-metrics.ts
|
|
714
705
|
const counters = /* @__PURE__ */ new Map();
|
|
715
706
|
const gauges = /* @__PURE__ */ new Map();
|
|
716
707
|
const timings = /* @__PURE__ */ new Map();
|
|
@@ -775,8 +766,7 @@ function resetPerfMetrics() {
|
|
|
775
766
|
function formatPerfMetric(name, durationMsValue) {
|
|
776
767
|
return `${name}=${roundMetric(durationMsValue)}ms`;
|
|
777
768
|
}
|
|
778
|
-
|
|
779
|
-
//#region src/session/journal.ts
|
|
769
|
+
// src/session/journal.ts
|
|
780
770
|
const SESSION_JOURNAL_SCHEMA = "acpx.session.journal.v1";
|
|
781
771
|
const sequenceSchema = z.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER);
|
|
782
772
|
const resultSchema = z.union([z.object({
|
|
@@ -1272,8 +1262,7 @@ async function settleUnlessAborted(operation, signal) {
|
|
|
1272
1262
|
throw error;
|
|
1273
1263
|
}
|
|
1274
1264
|
}
|
|
1275
|
-
|
|
1276
|
-
//#region src/acp/agent-session-id.ts
|
|
1265
|
+
// src/acp/agent-session-id.ts
|
|
1277
1266
|
const AGENT_SESSION_ID_META_KEYS = ["agentSessionId", "sessionId"];
|
|
1278
1267
|
function normalizeAgentSessionId(value) {
|
|
1279
1268
|
if (typeof value !== "string") return;
|
|
@@ -1292,8 +1281,7 @@ function extractAgentSessionId(meta) {
|
|
|
1292
1281
|
if (normalized) return normalized;
|
|
1293
1282
|
}
|
|
1294
1283
|
}
|
|
1295
|
-
|
|
1296
|
-
//#region src/session/persistence/serialize.ts
|
|
1284
|
+
// src/session/persistence/serialize.ts
|
|
1297
1285
|
function serializeSessionRecordForDisk(record) {
|
|
1298
1286
|
return {
|
|
1299
1287
|
schema: SESSION_RECORD_SCHEMA,
|
|
@@ -1335,8 +1323,7 @@ function serializeSessionRecordForDisk(record) {
|
|
|
1335
1323
|
} : void 0
|
|
1336
1324
|
};
|
|
1337
1325
|
}
|
|
1338
|
-
|
|
1339
|
-
//#region src/acp/builtin-command-migration.ts
|
|
1326
|
+
// src/acp/builtin-command-migration.ts
|
|
1340
1327
|
const LEGACY_AGENT_COMMANDS = {
|
|
1341
1328
|
pi: [
|
|
1342
1329
|
"npx pi-acp",
|
|
@@ -1368,12 +1355,14 @@ const LEGACY_AGENT_COMMANDS = {
|
|
|
1368
1355
|
"npx -y @agentclientprotocol/claude-agent-acp@^0.37.0",
|
|
1369
1356
|
"npx -y @agentclientprotocol/claude-agent-acp@^0.60.0",
|
|
1370
1357
|
"npx -y @agentclientprotocol/claude-agent-acp@^0.76.0",
|
|
1358
|
+
"npx -y @agentclientprotocol/claude-agent-acp@^0.81.2",
|
|
1371
1359
|
"npm exec @agentclientprotocol/claude-agent-acp@^0.25.0",
|
|
1372
1360
|
"npm exec @agentclientprotocol/claude-agent-acp@^0.31.0",
|
|
1373
1361
|
"npm exec @agentclientprotocol/claude-agent-acp@^0.36.1",
|
|
1374
1362
|
"npm exec @agentclientprotocol/claude-agent-acp@^0.37.0",
|
|
1375
1363
|
"npm exec @agentclientprotocol/claude-agent-acp@^0.60.0",
|
|
1376
|
-
"npm exec @agentclientprotocol/claude-agent-acp@^0.76.0"
|
|
1364
|
+
"npm exec @agentclientprotocol/claude-agent-acp@^0.76.0",
|
|
1365
|
+
"npm exec @agentclientprotocol/claude-agent-acp@^0.81.2"
|
|
1377
1366
|
],
|
|
1378
1367
|
gemini: ["gemini", "gemini --experimental-acp"],
|
|
1379
1368
|
kiro: ["kiro-cli acp"],
|
|
@@ -1431,8 +1420,7 @@ function migrateBuiltInAgentIdentity(agentCommand, agentArgv) {
|
|
|
1431
1420
|
function canonicalAgentCommand(agentCommand) {
|
|
1432
1421
|
return migrateBuiltInAgentIdentity(agentCommand).agentCommand;
|
|
1433
1422
|
}
|
|
1434
|
-
|
|
1435
|
-
//#region src/session/persistence/parse.ts
|
|
1423
|
+
// src/session/persistence/parse.ts
|
|
1436
1424
|
function asRecord$2(value) {
|
|
1437
1425
|
if (!value || typeof value !== "object" || Array.isArray(value)) return;
|
|
1438
1426
|
return value;
|
|
@@ -1877,8 +1865,7 @@ function hasNullOptionalSessionFields(options) {
|
|
|
1877
1865
|
function hasInvalidExitStatus(options) {
|
|
1878
1866
|
return typeof options.lastAgentExitCode === "symbol" || typeof options.lastAgentExitSignal === "symbol";
|
|
1879
1867
|
}
|
|
1880
|
-
|
|
1881
|
-
//#region src/persisted-key-policy.ts
|
|
1868
|
+
// src/persisted-key-policy.ts
|
|
1882
1869
|
const SNAKE_CASE_KEY = /^[a-z][a-z0-9_]*$/;
|
|
1883
1870
|
const ZED_TAG_KEYS = /* @__PURE__ */ new Set([
|
|
1884
1871
|
"User",
|
|
@@ -1949,8 +1936,7 @@ function assertPersistedKeyPolicy(value) {
|
|
|
1949
1936
|
if (violations.length === 0) return;
|
|
1950
1937
|
throw new Error(`Persisted key policy violation (expected snake_case keys): ${violations.join(", ")}`);
|
|
1951
1938
|
}
|
|
1952
|
-
|
|
1953
|
-
//#region src/session/persistence/discovery.ts
|
|
1939
|
+
// src/session/persistence/discovery.ts
|
|
1954
1940
|
const DISCOVERY_BATCH_SIZE = 4;
|
|
1955
1941
|
/** Select and return the same canonical snapshot; cached metadata cannot exclude records. */
|
|
1956
1942
|
async function* scanSessionRecords(sessionDir) {
|
|
@@ -1972,8 +1958,7 @@ async function readRecord(file) {
|
|
|
1972
1958
|
return;
|
|
1973
1959
|
}
|
|
1974
1960
|
}
|
|
1975
|
-
|
|
1976
|
-
//#region src/session/persistence/repository.ts
|
|
1961
|
+
// src/session/persistence/repository.ts
|
|
1977
1962
|
const DEFAULT_HISTORY_LIMIT = 20;
|
|
1978
1963
|
function sessionFilePath(acpxRecordId) {
|
|
1979
1964
|
const safeId = safeSessionId(acpxRecordId);
|
|
@@ -2201,8 +2186,7 @@ async function unlinkCountingBytes(filePath) {
|
|
|
2201
2186
|
await fs$1.unlink(filePath).catch(() => void 0);
|
|
2202
2187
|
return bytes;
|
|
2203
2188
|
}
|
|
2204
|
-
|
|
2205
|
-
//#region src/process-identity.ts
|
|
2189
|
+
// src/process-identity.ts
|
|
2206
2190
|
const IDENTITY_QUERY_TIMEOUT_MS$1 = 2e3;
|
|
2207
2191
|
const LINUX_PROCESS_QUERY = `
|
|
2208
2192
|
const fs = require('node:fs/promises');
|
|
@@ -2597,8 +2581,7 @@ async function getOwnProcessIdentity() {
|
|
|
2597
2581
|
});
|
|
2598
2582
|
return await ownIdentityPending;
|
|
2599
2583
|
}
|
|
2600
|
-
|
|
2601
|
-
//#region src/session/lock-owner.ts
|
|
2584
|
+
// src/session/lock-owner.ts
|
|
2602
2585
|
const OBSERVATION_REUSE_MS = 1e3;
|
|
2603
2586
|
const IDENTITY_QUERY_TIMEOUT_MS = 1e3;
|
|
2604
2587
|
function lockOwnerPid(value) {
|
|
@@ -2637,8 +2620,7 @@ async function createLockOwner(options = {}) {
|
|
|
2637
2620
|
}
|
|
2638
2621
|
};
|
|
2639
2622
|
}
|
|
2640
|
-
|
|
2641
|
-
//#region src/prompt-content.ts
|
|
2623
|
+
// src/prompt-content.ts
|
|
2642
2624
|
var PromptInputValidationError = class extends Error {
|
|
2643
2625
|
constructor(message) {
|
|
2644
2626
|
super(message);
|
|
@@ -2813,8 +2795,7 @@ function contentBlockDisplayText(block) {
|
|
|
2813
2795
|
function resourceBlockDisplayText(block) {
|
|
2814
2796
|
return "text" in block.resource && typeof block.resource.text === "string" ? block.resource.text : block.resource.uri;
|
|
2815
2797
|
}
|
|
2816
|
-
|
|
2817
|
-
//#region src/acp/process-descendants.ts
|
|
2798
|
+
// src/acp/process-descendants.ts
|
|
2818
2799
|
function hasStaleWindowsParent(identity, parent) {
|
|
2819
2800
|
return identity.birth.kind === "windows-creation" && (parent?.birth.kind !== "windows-creation" || parent.birth.value > identity.birth.value);
|
|
2820
2801
|
}
|
|
@@ -2970,8 +2951,7 @@ var ProcessDescendants = class {
|
|
|
2970
2951
|
this.identities.clear();
|
|
2971
2952
|
}
|
|
2972
2953
|
};
|
|
2973
|
-
|
|
2974
|
-
//#region src/session/queue/paths.ts
|
|
2954
|
+
// src/session/queue/paths.ts
|
|
2975
2955
|
function shortHash(value, length) {
|
|
2976
2956
|
return createHash("sha256").update(value).digest("hex").slice(0, length);
|
|
2977
2957
|
}
|
|
@@ -2993,8 +2973,7 @@ function queueSocketPath(sessionId, homeDir = os.homedir()) {
|
|
|
2993
2973
|
if (process.platform === "win32") return `\\\\.\\pipe\\acpx-${key}`;
|
|
2994
2974
|
return path.join(queueSocketBaseDir(homeDir) ?? "/tmp", `${key}.sock`);
|
|
2995
2975
|
}
|
|
2996
|
-
|
|
2997
|
-
//#region src/session/queue/retirement-receipt.ts
|
|
2976
|
+
// src/session/queue/retirement-receipt.ts
|
|
2998
2977
|
const MAX_RETIREMENT_MEMBERS = 4096;
|
|
2999
2978
|
const MAX_RETIREMENT_BYTES = 1048576;
|
|
3000
2979
|
function hasQueueRetirementReceipt(value) {
|
|
@@ -3132,8 +3111,7 @@ async function assertQueueRetirementComplete(receipt, deadline) {
|
|
|
3132
3111
|
const table = live.length > 0 ? await readRetirementSnapshot(deadline) : void 0;
|
|
3133
3112
|
for (const witness of live) if (observeRetirementSnapshot(witness, table) !== "gone") throw queueRetirementIncomplete();
|
|
3134
3113
|
}
|
|
3135
|
-
|
|
3136
|
-
//#region src/session/queue/lease-mutation.ts
|
|
3114
|
+
// src/session/queue/lease-mutation.ts
|
|
3137
3115
|
const GUARD_WAIT_MS = 2e3;
|
|
3138
3116
|
const localMutations = /* @__PURE__ */ new Map();
|
|
3139
3117
|
var QueueLeaseGuardSettlementError = class extends QueueConnectionError {
|
|
@@ -3282,8 +3260,7 @@ async function withQueueLeaseMutation(sessionId, mutate, options = {}) {
|
|
|
3282
3260
|
return outcome.value;
|
|
3283
3261
|
});
|
|
3284
3262
|
}
|
|
3285
|
-
|
|
3286
|
-
//#region src/session/queue/lease-store.ts
|
|
3263
|
+
// src/session/queue/lease-store.ts
|
|
3287
3264
|
const PROCESS_SIGTERM_GRACE_MS = process.platform === "win32" ? 4e3 : 12e3;
|
|
3288
3265
|
const PROCESS_SIGKILL_GRACE_MS = 1500;
|
|
3289
3266
|
const PROCESS_POLL_MS = 50;
|
|
@@ -3796,8 +3773,7 @@ async function waitMs(ms) {
|
|
|
3796
3773
|
setTimeout(resolve, ms);
|
|
3797
3774
|
});
|
|
3798
3775
|
}
|
|
3799
|
-
|
|
3800
|
-
//#region src/session/queue/ipc-transport.ts
|
|
3776
|
+
// src/session/queue/ipc-transport.ts
|
|
3801
3777
|
const QUEUE_CONNECT_ATTEMPTS = 40;
|
|
3802
3778
|
const SOCKET_CONNECTION_TIMEOUT_MS = 5e3;
|
|
3803
3779
|
function shouldRetryQueueConnect(error) {
|
|
@@ -3841,8 +3817,7 @@ async function connectToQueueOwner(owner, maxAttempts = QUEUE_CONNECT_ATTEMPTS)
|
|
|
3841
3817
|
await waitMs(50);
|
|
3842
3818
|
}
|
|
3843
3819
|
}
|
|
3844
|
-
|
|
3845
|
-
//#region src/session/queue/ipc-health.ts
|
|
3820
|
+
// src/session/queue/ipc-health.ts
|
|
3846
3821
|
async function isStillCurrent(owner) {
|
|
3847
3822
|
const current = await readQueueOwnerRecord(owner.sessionId);
|
|
3848
3823
|
return current?.pid === owner.pid && current.ownerGeneration === owner.ownerGeneration;
|
|
@@ -3894,8 +3869,7 @@ async function probeQueueOwnerHealth(sessionId) {
|
|
|
3894
3869
|
queueDepth: owner.queueDepth
|
|
3895
3870
|
};
|
|
3896
3871
|
}
|
|
3897
|
-
|
|
3898
|
-
//#region src/session/queue/messages.ts
|
|
3872
|
+
// src/session/queue/messages.ts
|
|
3899
3873
|
function asRecord(value) {
|
|
3900
3874
|
if (!value || typeof value !== "object" || Array.isArray(value)) return;
|
|
3901
3875
|
return value;
|
|
@@ -4274,8 +4248,7 @@ function parseErrorOwnerMessage(message, context) {
|
|
|
4274
4248
|
function isValidOwnerErrorCore(message) {
|
|
4275
4249
|
return typeof message.message === "string" && isOutputErrorCode(message.code) && isOutputErrorOrigin(message.origin);
|
|
4276
4250
|
}
|
|
4277
|
-
|
|
4278
|
-
//#region src/session/queue/request-limit.ts
|
|
4251
|
+
// src/session/queue/request-limit.ts
|
|
4279
4252
|
function queueRequestByteLimit(raw = process.env.ACPX_QUEUE_MAX_REQUEST_BYTES) {
|
|
4280
4253
|
if (raw === void 0 || raw.trim() === "") return;
|
|
4281
4254
|
const limit = Number(raw);
|
|
@@ -4293,8 +4266,7 @@ function assertQueueRequestSize(line) {
|
|
|
4293
4266
|
retryable: false
|
|
4294
4267
|
});
|
|
4295
4268
|
}
|
|
4296
|
-
|
|
4297
|
-
//#region src/session/queue/socket-output.ts
|
|
4269
|
+
// src/session/queue/socket-output.ts
|
|
4298
4270
|
const OUTPUT_CHUNK_BYTES = 65536;
|
|
4299
4271
|
const DRAIN_TIMEOUT_MS = 1e3;
|
|
4300
4272
|
const DEFAULT_LIMITS = Object.freeze({
|
|
@@ -4504,8 +4476,7 @@ var QueueSocketOutput = class {
|
|
|
4504
4476
|
this.closeSpool();
|
|
4505
4477
|
}
|
|
4506
4478
|
};
|
|
4507
|
-
|
|
4508
|
-
//#region src/session/queue/ipc-server.ts
|
|
4479
|
+
// src/session/queue/ipc-server.ts
|
|
4509
4480
|
const QUEUE_SOCKET_DRAIN_TIMEOUT_MS = 1e3;
|
|
4510
4481
|
function makeQueueOwnerError(requestId, message, detailCode, options = {}) {
|
|
4511
4482
|
return {
|
|
@@ -4897,8 +4868,7 @@ var SessionQueueOwner = class SessionQueueOwner {
|
|
|
4897
4868
|
return true;
|
|
4898
4869
|
}
|
|
4899
4870
|
};
|
|
4900
|
-
|
|
4901
|
-
//#region src/session/queue/ipc.ts
|
|
4871
|
+
// src/session/queue/ipc.ts
|
|
4902
4872
|
function assertOwnerGeneration(owner, message) {
|
|
4903
4873
|
if (owner.ownerGeneration !== void 0 && message.ownerGeneration !== void 0 && message.ownerGeneration !== owner.ownerGeneration) throw new QueueProtocolError("Queue owner returned mismatched generation", {
|
|
4904
4874
|
detailCode: "QUEUE_OWNER_GENERATION_MISMATCH",
|
|
@@ -5368,7 +5338,6 @@ async function trySetConfigOptionOnRunningOwner(sessionId, configId, value, time
|
|
|
5368
5338
|
submit: (owner) => withOwnerControlPersistence(owner, submitSetConfigOptionToQueueOwner(owner, configId, value, timeoutMs, assertDispatch))
|
|
5369
5339
|
});
|
|
5370
5340
|
}
|
|
5371
|
-
//#endregion
|
|
5372
5341
|
export { measurePerf as $, UnsupportedPromptContentError as $t, findSession as A, AUTH_POLICIES as At, assertPersistedKeyPolicy as B, AgentStartupError as Bt, textPrompt as C, exitCodeForOutputErrorCode as Ct, DEFAULT_HISTORY_LIMIT as D, normalizeOutputError as Dt, observeProcessIncarnation as E, isRetryablePromptError as Et, normalizeName as F, PERMISSION_POLICY_ACTIONS as Ft, normalizeAgentSessionId as G, PermissionDeniedError as Gt, canonicalAgentCommand as H, ClaudeAcpSessionCreateTimeoutError as Ht, pruneSessions as I, SESSION_RECORD_SCHEMA as It, SessionWatchError as J, SessionConfigOptionReplayError as Jt, SESSION_JOURNAL_SCHEMA as K, PermissionPromptUnavailableError as Kt, readSessionRecord as L, AcpxOperationalError as Lt, isoNow as M, NON_INTERACTIVE_PERMISSION_POLICIES as Mt, listSessions as N, OUTPUT_FORMATS as Nt, absolutePath as O, extractAcpError as Ot, listSessionsForAgent as P, PERMISSION_MODES as Pt, incrementPerfCounter as Q, SessionResumeRequiredError as Qt, resolveSessionRecord as R, AgentDisconnectedError as Rt, promptToDisplayText as S, isProcessAlive as St, lockOwnerPid as T, isAcpQueryClosedBeforeResponseError as Tt, serializeSessionRecordForDisk as U, CopilotAcpUnsupportedError as Ut, parseSessionRecord as V, AuthPolicyError as Vt, extractAgentSessionId as W, GeminiAcpStartupTimeoutError as Wt, formatPerfMetric as X, SessionModelReplayError as Xt, watchSession as Y, SessionModeReplayError as Yt, getPerfMetricsSnapshot as Z, SessionNotFoundError as Zt, ProcessDescendants as _, sessionEventLockPath as _t, trySetModelOnRunningOwner as a, isAcpMessageObject as at, mergePromptSourceWithText as b, writePrivateJsonFile as bt, probeQueueOwnerHealth as c, parsePermissionNotice as ct, releaseQueueOwnerLease as d, boundedEventMaxSegments as dt, resetPerfMetrics as et, terminateProcess as f, defaultSessionEventLog as ft, QueueLeaseGuardSettlementError as g, sessionEventActivePath as gt, waitMs as h, sessionBaseDir as ht, trySetModeOnRunningOwner as i, isAcpJsonRpcMessage as it, findSessionByDirectoryWalk as j, EXIT_CODES as jt, findGitRepositoryRoot as k, isAcpResourceNotFoundError as kt, readQueueOwnerRecord as l, parsePromptStopReason as lt, tryAcquireQueueOwnerLease as m, retainedEventMaxSegments as mt, tryCloseSessionOnRunningOwner as n, startPerfTimer as nt, trySubmitToRunningOwner as o, isSessionUpdateNotification as ot, terminateQueueOwnerForSession as p, existingEventSegmentIndices as pt, SessionJournalReader as q, QueueConnectionError as qt, trySetConfigOptionOnRunningOwner as r, extractSessionUpdateNotification as rt, SessionQueueOwner as s, parseJsonRpcErrorMessage as st, tryCancelOnRunningOwner as t, setPerfGauge as tt, refreshQueueOwnerLease as u, DEFAULT_EVENT_SEGMENT_MAX_BYTES as ut, PromptInputValidationError as v, sessionEventSegmentPath as vt, createLockOwner as w, formatErrorMessage as wt, parsePromptSource as x, _usingCtx as xt, getUnsupportedPromptContentMessage as y, writePrivateFile as yt, writeSessionRecord as z, AgentSpawnError as zt };
|
|
5373
5342
|
|
|
5374
|
-
//# sourceMappingURL=ipc-
|
|
5343
|
+
//# sourceMappingURL=ipc-BbYFsKOj.js.map
|