acpx 0.5.3 → 0.6.0
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/README.md +12 -4
- package/dist/{cli-ChWsO-bb.js → cli-rGyZlX2p.js} +4 -4
- package/dist/{cli-ChWsO-bb.js.map → cli-rGyZlX2p.js.map} +1 -1
- package/dist/cli.d.ts +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +100 -24
- package/dist/cli.js.map +1 -1
- package/dist/{client-D-4_aZf2.d.ts → client-2fTFutRH.d.ts} +4 -2
- package/dist/client-2fTFutRH.d.ts.map +1 -0
- package/dist/{flags-ceSqz2T6.js → flags-DG-3Vfgg.js} +25 -6
- package/dist/flags-DG-3Vfgg.js.map +1 -0
- package/dist/{flows-_KmnuUXd.js → flows-gbxyIf6o.js} +13 -6
- package/dist/flows-gbxyIf6o.js.map +1 -0
- package/dist/flows.d.ts +2 -8
- package/dist/flows.d.ts.map +1 -1
- package/dist/flows.js +1 -1
- package/dist/{ipc-BM335WFg.js → ipc-CkAW8Qvc.js} +51 -9
- package/dist/ipc-CkAW8Qvc.js.map +1 -0
- package/dist/{output-C4QhjpM6.js → output-DmHvT8vm.js} +141 -12
- package/dist/output-DmHvT8vm.js.map +1 -0
- package/dist/{perf-metrics-D0um6IR6.js → perf-metrics-DvT_gvUh.js} +12 -2
- package/dist/perf-metrics-DvT_gvUh.js.map +1 -0
- package/dist/{prompt-turn-CXMtXBl-.js → prompt-turn-BOoZaDEq.js} +221 -38
- package/dist/prompt-turn-BOoZaDEq.js.map +1 -0
- package/dist/{render-Br-kVPK_.js → render-CyodRDtK.js} +35 -3
- package/dist/{render-Br-kVPK_.js.map → render-CyodRDtK.js.map} +1 -1
- package/dist/runtime.d.ts +84 -10
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +425 -190
- package/dist/runtime.js.map +1 -1
- package/dist/{session-BtwAKtJ3.js → session-DcIse8N0.js} +66 -15
- package/dist/session-DcIse8N0.js.map +1 -0
- package/dist/session-options-pCbHn_n7.d.ts +13 -0
- package/dist/session-options-pCbHn_n7.d.ts.map +1 -0
- package/dist/{types-yxf-gcOE.d.ts → types-CVBeQyi3.d.ts} +9 -1
- package/dist/types-CVBeQyi3.d.ts.map +1 -0
- package/package.json +20 -20
- package/skills/acpx/SKILL.md +7 -2
- package/dist/client-D-4_aZf2.d.ts.map +0 -1
- package/dist/flags-ceSqz2T6.js.map +0 -1
- package/dist/flows-_KmnuUXd.js.map +0 -1
- package/dist/ipc-BM335WFg.js.map +0 -1
- package/dist/output-C4QhjpM6.js.map +0 -1
- package/dist/perf-metrics-D0um6IR6.js.map +0 -1
- package/dist/prompt-turn-CXMtXBl-.js.map +0 -1
- package/dist/session-BtwAKtJ3.js.map +0 -1
- package/dist/types-yxf-gcOE.d.ts.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-CiIaOW0V.js";
|
|
2
|
-
import { u as normalizeRuntimeSessionId } from "./perf-metrics-
|
|
3
|
-
import { s as probeQueueOwnerHealth } from "./ipc-
|
|
2
|
+
import { u as normalizeRuntimeSessionId } from "./perf-metrics-DvT_gvUh.js";
|
|
3
|
+
import { s as probeQueueOwnerHealth } from "./ipc-CkAW8Qvc.js";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
//#region src/cli/output/json-output.ts
|
|
6
6
|
function emitJsonResult(format, payload) {
|
|
@@ -18,6 +18,7 @@ var render_exports = /* @__PURE__ */ __exportAll({
|
|
|
18
18
|
printEnsuredSessionByFormat: () => printEnsuredSessionByFormat,
|
|
19
19
|
printNewSessionByFormat: () => printNewSessionByFormat,
|
|
20
20
|
printPromptSessionBanner: () => printPromptSessionBanner,
|
|
21
|
+
printPruneResultByFormat: () => printPruneResultByFormat,
|
|
21
22
|
printQueuedPromptByFormat: () => printQueuedPromptByFormat,
|
|
22
23
|
printSessionsByFormat: () => printSessionsByFormat
|
|
23
24
|
});
|
|
@@ -129,6 +130,37 @@ function printCreatedSessionBanner(record, agentName, format, jsonStrict = false
|
|
|
129
130
|
process.stderr.write(`[acpx] agent: ${agentName}\n`);
|
|
130
131
|
process.stderr.write(`[acpx] cwd: ${record.cwd}\n`);
|
|
131
132
|
}
|
|
133
|
+
function formatBytes(bytes) {
|
|
134
|
+
if (bytes >= 1073741824) return `${(bytes / 1073741824).toFixed(1)} GB`;
|
|
135
|
+
if (bytes >= 1048576) return `${(bytes / 1048576).toFixed(1)} MB`;
|
|
136
|
+
if (bytes >= 1024) return `${(bytes / 1024).toFixed(1)} KB`;
|
|
137
|
+
return `${bytes} B`;
|
|
138
|
+
}
|
|
139
|
+
function printPruneResultByFormat(result, format) {
|
|
140
|
+
const count = result.pruned.length;
|
|
141
|
+
if (emitJsonResult(format, {
|
|
142
|
+
action: result.dryRun ? "sessions_prune_dry_run" : "sessions_pruned",
|
|
143
|
+
dryRun: result.dryRun,
|
|
144
|
+
count,
|
|
145
|
+
bytesFreed: result.bytesFreed,
|
|
146
|
+
pruned: result.pruned.map((r) => r.acpxRecordId)
|
|
147
|
+
})) return;
|
|
148
|
+
if (format === "quiet") {
|
|
149
|
+
for (const record of result.pruned) process.stdout.write(`${record.acpxRecordId}\n`);
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
if (count === 0) {
|
|
153
|
+
process.stdout.write(result.dryRun ? "[DRY RUN] No sessions to prune\n" : "No sessions pruned\n");
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
const prefix = result.dryRun ? "[DRY RUN] Would prune" : "Pruned";
|
|
157
|
+
const bytesSuffix = !result.dryRun && result.bytesFreed > 0 ? `, freed ${formatBytes(result.bytesFreed)}` : "";
|
|
158
|
+
process.stdout.write(`${prefix} ${count} session${count === 1 ? "" : "s"}${bytesSuffix}\n`);
|
|
159
|
+
for (const record of result.pruned) {
|
|
160
|
+
const label = record.name ? ` (${record.name})` : "";
|
|
161
|
+
process.stdout.write(` ${record.acpxRecordId}${label}\t${record.closedAt ?? record.lastUsedAt}\n`);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
132
164
|
function agentSessionIdPayload(agentSessionId) {
|
|
133
165
|
const normalized = normalizeRuntimeSessionId(agentSessionId);
|
|
134
166
|
if (!normalized) return {};
|
|
@@ -137,4 +169,4 @@ function agentSessionIdPayload(agentSessionId) {
|
|
|
137
169
|
//#endregion
|
|
138
170
|
export { emitJsonResult as i, formatPromptSessionBannerLine as n, render_exports as r, agentSessionIdPayload as t };
|
|
139
171
|
|
|
140
|
-
//# sourceMappingURL=render-
|
|
172
|
+
//# sourceMappingURL=render-CyodRDtK.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render-Br-kVPK_.js","names":[],"sources":["../src/cli/output/json-output.ts","../src/cli/output/render.ts"],"sourcesContent":["import type { OutputFormat } from \"../../types.js\";\n\nexport function emitJsonResult(format: OutputFormat, payload: unknown): boolean {\n if (format !== \"json\") {\n return false;\n }\n process.stdout.write(`${JSON.stringify(payload)}\\n`);\n return true;\n}\n","import path from \"node:path\";\nimport { normalizeRuntimeSessionId } from \"../../session/runtime-session-id.js\";\nimport type { OutputFormat, SessionRecord } from \"../../types.js\";\nimport { probeQueueOwnerHealth } from \"../queue/ipc.js\";\nimport { emitJsonResult } from \"./json-output.js\";\n\nfunction formatSessionLabel(record: SessionRecord): string {\n return record.name ?? \"cwd\";\n}\n\nfunction formatRoutedFrom(sessionCwd: string, currentCwd: string): string | undefined {\n const relative = path.relative(sessionCwd, currentCwd);\n if (!relative || relative === \".\") {\n return undefined;\n }\n return relative.startsWith(\".\") ? relative : `.${path.sep}${relative}`;\n}\n\ntype SessionConnectionStatus = \"connected\" | \"needs reconnect\";\n\nasync function resolveSessionConnectionStatus(\n record: SessionRecord,\n): Promise<SessionConnectionStatus> {\n const health = await probeQueueOwnerHealth(record.acpxRecordId);\n return health.healthy ? \"connected\" : \"needs reconnect\";\n}\n\nexport function printSessionsByFormat(sessions: SessionRecord[], format: OutputFormat): void {\n if (format === \"json\") {\n process.stdout.write(`${JSON.stringify(sessions)}\\n`);\n return;\n }\n\n if (format === \"quiet\") {\n for (const session of sessions) {\n const closedMarker = session.closed ? \" [closed]\" : \"\";\n process.stdout.write(`${session.acpxRecordId}${closedMarker}\\n`);\n }\n return;\n }\n\n if (sessions.length === 0) {\n process.stdout.write(\"No sessions\\n\");\n return;\n }\n\n for (const session of sessions) {\n const closedMarker = session.closed ? \" [closed]\" : \"\";\n process.stdout.write(\n `${session.acpxRecordId}${closedMarker}\\t${session.name ?? \"-\"}\\t${session.cwd}\\t${session.lastUsedAt}\\n`,\n );\n }\n}\n\nexport function printClosedSessionByFormat(record: SessionRecord, format: OutputFormat): void {\n if (\n emitJsonResult(format, {\n action: \"session_closed\",\n acpxRecordId: record.acpxRecordId,\n acpxSessionId: record.acpSessionId,\n agentSessionId: record.agentSessionId,\n })\n ) {\n return;\n }\n\n if (format === \"quiet\") {\n return;\n }\n\n process.stdout.write(`${record.acpxRecordId}\\n`);\n}\n\nexport function printNewSessionByFormat(\n record: SessionRecord,\n replaced: SessionRecord | undefined,\n format: OutputFormat,\n): void {\n if (\n emitJsonResult(format, {\n action: \"session_ensured\",\n created: true,\n acpxRecordId: record.acpxRecordId,\n acpxSessionId: record.acpSessionId,\n agentSessionId: record.agentSessionId,\n name: record.name,\n replacedSessionId: replaced?.acpxRecordId,\n })\n ) {\n return;\n }\n\n if (format === \"quiet\") {\n process.stdout.write(`${record.acpxRecordId}\\n`);\n return;\n }\n\n if (replaced) {\n process.stdout.write(`${record.acpxRecordId}\\t(replaced ${replaced.acpxRecordId})\\n`);\n return;\n }\n\n process.stdout.write(`${record.acpxRecordId}\\n`);\n}\n\nexport function printEnsuredSessionByFormat(\n record: SessionRecord,\n created: boolean,\n format: OutputFormat,\n): void {\n if (\n emitJsonResult(format, {\n action: \"session_ensured\",\n created,\n acpxRecordId: record.acpxRecordId,\n acpxSessionId: record.acpSessionId,\n agentSessionId: record.agentSessionId,\n name: record.name,\n })\n ) {\n return;\n }\n\n if (format === \"quiet\") {\n process.stdout.write(`${record.acpxRecordId}\\n`);\n return;\n }\n\n const action = created ? \"created\" : \"existing\";\n process.stdout.write(`${record.acpxRecordId}\\t(${action})\\n`);\n}\n\nexport function printQueuedPromptByFormat(\n result: {\n sessionId: string;\n requestId: string;\n },\n format: OutputFormat,\n): void {\n if (\n emitJsonResult(format, {\n action: \"prompt_queued\",\n acpxRecordId: result.sessionId,\n requestId: result.requestId,\n })\n ) {\n return;\n }\n\n if (format === \"quiet\") {\n return;\n }\n\n process.stdout.write(`[queued] ${result.requestId}\\n`);\n}\n\nexport function formatPromptSessionBannerLine(\n record: SessionRecord,\n currentCwd: string,\n connectionStatus: SessionConnectionStatus = \"needs reconnect\",\n): string {\n const label = formatSessionLabel(record);\n const normalizedSessionCwd = path.resolve(record.cwd);\n const normalizedCurrentCwd = path.resolve(currentCwd);\n const routedFrom =\n normalizedSessionCwd === normalizedCurrentCwd\n ? undefined\n : formatRoutedFrom(normalizedSessionCwd, normalizedCurrentCwd);\n const status = connectionStatus;\n\n if (routedFrom) {\n return `[acpx] session ${label} (${record.acpxRecordId}) · ${normalizedSessionCwd} (routed from ${routedFrom}) · agent ${status}`;\n }\n\n return `[acpx] session ${label} (${record.acpxRecordId}) · ${normalizedSessionCwd} · agent ${status}`;\n}\n\nexport async function printPromptSessionBanner(\n record: SessionRecord,\n currentCwd: string,\n format: OutputFormat,\n jsonStrict = false,\n): Promise<void> {\n if (format === \"quiet\" || (jsonStrict && format === \"json\")) {\n return;\n }\n\n const status = await resolveSessionConnectionStatus(record);\n process.stderr.write(`${formatPromptSessionBannerLine(record, currentCwd, status)}\\n`);\n}\n\nexport function printCreatedSessionBanner(\n record: SessionRecord,\n agentName: string,\n format: OutputFormat,\n jsonStrict = false,\n): void {\n if (format === \"quiet\" || (jsonStrict && format === \"json\")) {\n return;\n }\n\n const label = formatSessionLabel(record);\n process.stderr.write(`[acpx] created session ${label} (${record.acpxRecordId})\\n`);\n process.stderr.write(`[acpx] agent: ${agentName}\\n`);\n process.stderr.write(`[acpx] cwd: ${record.cwd}\\n`);\n}\n\nexport function agentSessionIdPayload(agentSessionId: string | undefined): {\n agentSessionId?: string;\n} {\n const normalized = normalizeRuntimeSessionId(agentSessionId);\n if (!normalized) {\n return {};\n }\n\n return { agentSessionId: normalized };\n}\n"],"mappings":";;;;;AAEA,SAAgB,eAAe,QAAsB,SAA2B;AAC9E,KAAI,WAAW,OACb,QAAO;AAET,SAAQ,OAAO,MAAM,GAAG,KAAK,UAAU,QAAQ,CAAC,IAAI;AACpD,QAAO;;;;;;;;;;;;;;;ACDT,SAAS,mBAAmB,QAA+B;AACzD,QAAO,OAAO,QAAQ;;AAGxB,SAAS,iBAAiB,YAAoB,YAAwC;CACpF,MAAM,WAAW,KAAK,SAAS,YAAY,WAAW;AACtD,KAAI,CAAC,YAAY,aAAa,IAC5B;AAEF,QAAO,SAAS,WAAW,IAAI,GAAG,WAAW,IAAI,KAAK,MAAM;;AAK9D,eAAe,+BACb,QACkC;AAElC,SADe,MAAM,sBAAsB,OAAO,aAAa,EACjD,UAAU,cAAc;;AAGxC,SAAgB,sBAAsB,UAA2B,QAA4B;AAC3F,KAAI,WAAW,QAAQ;AACrB,UAAQ,OAAO,MAAM,GAAG,KAAK,UAAU,SAAS,CAAC,IAAI;AACrD;;AAGF,KAAI,WAAW,SAAS;AACtB,OAAK,MAAM,WAAW,UAAU;GAC9B,MAAM,eAAe,QAAQ,SAAS,cAAc;AACpD,WAAQ,OAAO,MAAM,GAAG,QAAQ,eAAe,aAAa,IAAI;;AAElE;;AAGF,KAAI,SAAS,WAAW,GAAG;AACzB,UAAQ,OAAO,MAAM,gBAAgB;AACrC;;AAGF,MAAK,MAAM,WAAW,UAAU;EAC9B,MAAM,eAAe,QAAQ,SAAS,cAAc;AACpD,UAAQ,OAAO,MACb,GAAG,QAAQ,eAAe,aAAa,IAAI,QAAQ,QAAQ,IAAI,IAAI,QAAQ,IAAI,IAAI,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mBACpC;CACR,MAAM,QAAQ,mBAAmB,OAAO;CACxC,MAAM,uBAAuB,KAAK,QAAQ,OAAO,IAAI;CACrD,MAAM,uBAAuB,KAAK,QAAQ,WAAW;CACrD,MAAM,aACJ,yBAAyB,uBACrB,KAAA,IACA,iBAAiB,sBAAsB,qBAAqB;CAClE,MAAM,SAAS;AAEf,KAAI,WACF,QAAO,kBAAkB,MAAM,IAAI,OAAO,aAAa,MAAM,qBAAqB,gBAAgB,WAAW,YAAY;AAG3H,QAAO,kBAAkB,MAAM,IAAI,OAAO,aAAa,MAAM,qBAAqB,WAAW;;AAG/F,eAAsB,yBACpB,QACA,YACA,QACA,aAAa,OACE;AACf,KAAI,WAAW,WAAY,cAAc,WAAW,OAClD;CAGF,MAAM,SAAS,MAAM,+BAA+B,OAAO;AAC3D,SAAQ,OAAO,MAAM,GAAG,8BAA8B,QAAQ,YAAY,OAAO,CAAC,IAAI;;AAGxF,SAAgB,0BACd,QACA,WACA,QACA,aAAa,OACP;AACN,KAAI,WAAW,WAAY,cAAc,WAAW,OAClD;CAGF,MAAM,QAAQ,mBAAmB,OAAO;AACxC,SAAQ,OAAO,MAAM,0BAA0B,MAAM,IAAI,OAAO,aAAa,KAAK;AAClF,SAAQ,OAAO,MAAM,iBAAiB,UAAU,IAAI;AACpD,SAAQ,OAAO,MAAM,eAAe,OAAO,IAAI,IAAI;;AAGrD,SAAgB,sBAAsB,gBAEpC;CACA,MAAM,aAAa,0BAA0B,eAAe;AAC5D,KAAI,CAAC,WACH,QAAO,EAAE;AAGX,QAAO,EAAE,gBAAgB,YAAY"}
|
|
1
|
+
{"version":3,"file":"render-CyodRDtK.js","names":[],"sources":["../src/cli/output/json-output.ts","../src/cli/output/render.ts"],"sourcesContent":["import type { OutputFormat } from \"../../types.js\";\n\nexport function emitJsonResult(format: OutputFormat, payload: unknown): boolean {\n if (format !== \"json\") {\n return false;\n }\n process.stdout.write(`${JSON.stringify(payload)}\\n`);\n return true;\n}\n","import path from \"node:path\";\nimport { normalizeRuntimeSessionId } from \"../../session/runtime-session-id.js\";\nimport type { OutputFormat, SessionRecord } from \"../../types.js\";\nimport { probeQueueOwnerHealth } from \"../queue/ipc.js\";\nimport { emitJsonResult } from \"./json-output.js\";\n\nfunction formatSessionLabel(record: SessionRecord): string {\n return record.name ?? \"cwd\";\n}\n\nfunction formatRoutedFrom(sessionCwd: string, currentCwd: string): string | undefined {\n const relative = path.relative(sessionCwd, currentCwd);\n if (!relative || relative === \".\") {\n return undefined;\n }\n return relative.startsWith(\".\") ? relative : `.${path.sep}${relative}`;\n}\n\ntype SessionConnectionStatus = \"connected\" | \"needs reconnect\";\n\nasync function resolveSessionConnectionStatus(\n record: SessionRecord,\n): Promise<SessionConnectionStatus> {\n const health = await probeQueueOwnerHealth(record.acpxRecordId);\n return health.healthy ? \"connected\" : \"needs reconnect\";\n}\n\nexport function printSessionsByFormat(sessions: SessionRecord[], format: OutputFormat): void {\n if (format === \"json\") {\n process.stdout.write(`${JSON.stringify(sessions)}\\n`);\n return;\n }\n\n if (format === \"quiet\") {\n for (const session of sessions) {\n const closedMarker = session.closed ? \" [closed]\" : \"\";\n process.stdout.write(`${session.acpxRecordId}${closedMarker}\\n`);\n }\n return;\n }\n\n if (sessions.length === 0) {\n process.stdout.write(\"No sessions\\n\");\n return;\n }\n\n for (const session of sessions) {\n const closedMarker = session.closed ? \" [closed]\" : \"\";\n process.stdout.write(\n `${session.acpxRecordId}${closedMarker}\\t${session.name ?? \"-\"}\\t${session.cwd}\\t${session.lastUsedAt}\\n`,\n );\n }\n}\n\nexport function printClosedSessionByFormat(record: SessionRecord, format: OutputFormat): void {\n if (\n emitJsonResult(format, {\n action: \"session_closed\",\n acpxRecordId: record.acpxRecordId,\n acpxSessionId: record.acpSessionId,\n agentSessionId: record.agentSessionId,\n })\n ) {\n return;\n }\n\n if (format === \"quiet\") {\n return;\n }\n\n process.stdout.write(`${record.acpxRecordId}\\n`);\n}\n\nexport function printNewSessionByFormat(\n record: SessionRecord,\n replaced: SessionRecord | undefined,\n format: OutputFormat,\n): void {\n if (\n emitJsonResult(format, {\n action: \"session_ensured\",\n created: true,\n acpxRecordId: record.acpxRecordId,\n acpxSessionId: record.acpSessionId,\n agentSessionId: record.agentSessionId,\n name: record.name,\n replacedSessionId: replaced?.acpxRecordId,\n })\n ) {\n return;\n }\n\n if (format === \"quiet\") {\n process.stdout.write(`${record.acpxRecordId}\\n`);\n return;\n }\n\n if (replaced) {\n process.stdout.write(`${record.acpxRecordId}\\t(replaced ${replaced.acpxRecordId})\\n`);\n return;\n }\n\n process.stdout.write(`${record.acpxRecordId}\\n`);\n}\n\nexport function printEnsuredSessionByFormat(\n record: SessionRecord,\n created: boolean,\n format: OutputFormat,\n): void {\n if (\n emitJsonResult(format, {\n action: \"session_ensured\",\n created,\n acpxRecordId: record.acpxRecordId,\n acpxSessionId: record.acpSessionId,\n agentSessionId: record.agentSessionId,\n name: record.name,\n })\n ) {\n return;\n }\n\n if (format === \"quiet\") {\n process.stdout.write(`${record.acpxRecordId}\\n`);\n return;\n }\n\n const action = created ? \"created\" : \"existing\";\n process.stdout.write(`${record.acpxRecordId}\\t(${action})\\n`);\n}\n\nexport function printQueuedPromptByFormat(\n result: {\n sessionId: string;\n requestId: string;\n },\n format: OutputFormat,\n): void {\n if (\n emitJsonResult(format, {\n action: \"prompt_queued\",\n acpxRecordId: result.sessionId,\n requestId: result.requestId,\n })\n ) {\n return;\n }\n\n if (format === \"quiet\") {\n return;\n }\n\n process.stdout.write(`[queued] ${result.requestId}\\n`);\n}\n\nexport function formatPromptSessionBannerLine(\n record: SessionRecord,\n currentCwd: string,\n connectionStatus: SessionConnectionStatus = \"needs reconnect\",\n): string {\n const label = formatSessionLabel(record);\n const normalizedSessionCwd = path.resolve(record.cwd);\n const normalizedCurrentCwd = path.resolve(currentCwd);\n const routedFrom =\n normalizedSessionCwd === normalizedCurrentCwd\n ? undefined\n : formatRoutedFrom(normalizedSessionCwd, normalizedCurrentCwd);\n const status = connectionStatus;\n\n if (routedFrom) {\n return `[acpx] session ${label} (${record.acpxRecordId}) · ${normalizedSessionCwd} (routed from ${routedFrom}) · agent ${status}`;\n }\n\n return `[acpx] session ${label} (${record.acpxRecordId}) · ${normalizedSessionCwd} · agent ${status}`;\n}\n\nexport async function printPromptSessionBanner(\n record: SessionRecord,\n currentCwd: string,\n format: OutputFormat,\n jsonStrict = false,\n): Promise<void> {\n if (format === \"quiet\" || (jsonStrict && format === \"json\")) {\n return;\n }\n\n const status = await resolveSessionConnectionStatus(record);\n process.stderr.write(`${formatPromptSessionBannerLine(record, currentCwd, status)}\\n`);\n}\n\nexport function printCreatedSessionBanner(\n record: SessionRecord,\n agentName: string,\n format: OutputFormat,\n jsonStrict = false,\n): void {\n if (format === \"quiet\" || (jsonStrict && format === \"json\")) {\n return;\n }\n\n const label = formatSessionLabel(record);\n process.stderr.write(`[acpx] created session ${label} (${record.acpxRecordId})\\n`);\n process.stderr.write(`[acpx] agent: ${agentName}\\n`);\n process.stderr.write(`[acpx] cwd: ${record.cwd}\\n`);\n}\n\nfunction formatBytes(bytes: number): string {\n if (bytes >= 1_073_741_824) {\n return `${(bytes / 1_073_741_824).toFixed(1)} GB`;\n }\n if (bytes >= 1_048_576) {\n return `${(bytes / 1_048_576).toFixed(1)} MB`;\n }\n if (bytes >= 1024) {\n return `${(bytes / 1024).toFixed(1)} KB`;\n }\n return `${bytes} B`;\n}\n\nexport function printPruneResultByFormat(\n result: { pruned: SessionRecord[]; bytesFreed: number; dryRun: boolean },\n format: OutputFormat,\n): void {\n const count = result.pruned.length;\n\n if (\n emitJsonResult(format, {\n action: result.dryRun ? \"sessions_prune_dry_run\" : \"sessions_pruned\",\n dryRun: result.dryRun,\n count,\n bytesFreed: result.bytesFreed,\n pruned: result.pruned.map((r) => r.acpxRecordId),\n })\n ) {\n return;\n }\n\n if (format === \"quiet\") {\n for (const record of result.pruned) {\n process.stdout.write(`${record.acpxRecordId}\\n`);\n }\n return;\n }\n\n if (count === 0) {\n process.stdout.write(\n result.dryRun ? \"[DRY RUN] No sessions to prune\\n\" : \"No sessions pruned\\n\",\n );\n return;\n }\n\n const prefix = result.dryRun ? \"[DRY RUN] Would prune\" : \"Pruned\";\n const bytesSuffix =\n !result.dryRun && result.bytesFreed > 0 ? `, freed ${formatBytes(result.bytesFreed)}` : \"\";\n process.stdout.write(`${prefix} ${count} session${count === 1 ? \"\" : \"s\"}${bytesSuffix}\\n`);\n\n for (const record of result.pruned) {\n const label = record.name ? ` (${record.name})` : \"\";\n process.stdout.write(\n ` ${record.acpxRecordId}${label}\\t${record.closedAt ?? record.lastUsedAt}\\n`,\n );\n }\n}\n\nexport function agentSessionIdPayload(agentSessionId: string | undefined): {\n agentSessionId?: string;\n} {\n const normalized = normalizeRuntimeSessionId(agentSessionId);\n if (!normalized) {\n return {};\n }\n\n return { agentSessionId: normalized };\n}\n"],"mappings":";;;;;AAEA,SAAgB,eAAe,QAAsB,SAA2B;AAC9E,KAAI,WAAW,OACb,QAAO;AAET,SAAQ,OAAO,MAAM,GAAG,KAAK,UAAU,QAAQ,CAAC,IAAI;AACpD,QAAO;;;;;;;;;;;;;;;;ACDT,SAAS,mBAAmB,QAA+B;AACzD,QAAO,OAAO,QAAQ;;AAGxB,SAAS,iBAAiB,YAAoB,YAAwC;CACpF,MAAM,WAAW,KAAK,SAAS,YAAY,WAAW;AACtD,KAAI,CAAC,YAAY,aAAa,IAC5B;AAEF,QAAO,SAAS,WAAW,IAAI,GAAG,WAAW,IAAI,KAAK,MAAM;;AAK9D,eAAe,+BACb,QACkC;AAElC,SAAO,MADc,sBAAsB,OAAO,aAAa,EACjD,UAAU,cAAc;;AAGxC,SAAgB,sBAAsB,UAA2B,QAA4B;AAC3F,KAAI,WAAW,QAAQ;AACrB,UAAQ,OAAO,MAAM,GAAG,KAAK,UAAU,SAAS,CAAC,IAAI;AACrD;;AAGF,KAAI,WAAW,SAAS;AACtB,OAAK,MAAM,WAAW,UAAU;GAC9B,MAAM,eAAe,QAAQ,SAAS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icy, r as McpServer, s as SessionRecord } from "./types-
|
|
2
|
-
import { t as AcpClient } from "./client-
|
|
1
|
+
import { a as PermissionMode, i as NonInteractivePermissionPolicy, r as McpServer, s as SessionRecord } from "./types-CVBeQyi3.js";
|
|
2
|
+
import { t as AcpClient } from "./client-2fTFutRH.js";
|
|
3
3
|
import fs from "node:fs";
|
|
4
4
|
|
|
5
|
+
//#region src/agent-registry.d.ts
|
|
6
|
+
declare const DEFAULT_AGENT_NAME = "codex";
|
|
7
|
+
//#endregion
|
|
5
8
|
//#region src/runtime/public/contract.d.ts
|
|
6
9
|
type AcpRuntimePromptMode = "prompt" | "steer";
|
|
7
10
|
type AcpRuntimeSessionMode = "persistent" | "oneshot";
|
|
@@ -72,17 +75,59 @@ type AcpRuntimeEvent = {
|
|
|
72
75
|
toolCallId?: string;
|
|
73
76
|
status?: string;
|
|
74
77
|
title?: string;
|
|
75
|
-
}
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Compatibility terminal event emitted by runTurn(...). startTurn(...).events
|
|
81
|
+
* does not emit terminal events; use AcpRuntimeTurn.result instead.
|
|
82
|
+
*/
|
|
83
|
+
| {
|
|
76
84
|
type: "done";
|
|
77
85
|
stopReason?: string;
|
|
78
|
-
}
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Compatibility failure event emitted by runTurn(...). startTurn(...).events
|
|
89
|
+
* does not emit terminal events; use AcpRuntimeTurn.result instead.
|
|
90
|
+
*/
|
|
91
|
+
| {
|
|
79
92
|
type: "error";
|
|
80
93
|
message: string;
|
|
81
94
|
code?: string;
|
|
82
95
|
retryable?: boolean;
|
|
83
96
|
};
|
|
97
|
+
type AcpRuntimeTurnResultError = {
|
|
98
|
+
message: string;
|
|
99
|
+
code?: string;
|
|
100
|
+
retryable?: boolean;
|
|
101
|
+
};
|
|
102
|
+
type AcpRuntimeTurnResult = {
|
|
103
|
+
status: "completed";
|
|
104
|
+
stopReason?: string;
|
|
105
|
+
} | {
|
|
106
|
+
status: "cancelled";
|
|
107
|
+
stopReason?: string;
|
|
108
|
+
} | {
|
|
109
|
+
status: "failed";
|
|
110
|
+
error: AcpRuntimeTurnResultError;
|
|
111
|
+
};
|
|
112
|
+
interface AcpRuntimeTurn {
|
|
113
|
+
readonly requestId: string;
|
|
114
|
+
readonly events: AsyncIterable<AcpRuntimeEvent>;
|
|
115
|
+
readonly result: Promise<AcpRuntimeTurnResult>;
|
|
116
|
+
cancel(input?: {
|
|
117
|
+
reason?: string;
|
|
118
|
+
}): Promise<void>;
|
|
119
|
+
closeStream(input?: {
|
|
120
|
+
reason?: string;
|
|
121
|
+
}): Promise<void>;
|
|
122
|
+
}
|
|
84
123
|
interface AcpRuntime {
|
|
85
124
|
ensureSession(input: AcpRuntimeEnsureInput): Promise<AcpRuntimeHandle>;
|
|
125
|
+
startTurn(input: AcpRuntimeTurnInput): AcpRuntimeTurn;
|
|
126
|
+
/**
|
|
127
|
+
* Compatibility adapter for consumers that expect terminal status in the
|
|
128
|
+
* event stream. Prefer startTurn(...), which separates live events from the
|
|
129
|
+
* terminal result.
|
|
130
|
+
*/
|
|
86
131
|
runTurn(input: AcpRuntimeTurnInput): AsyncIterable<AcpRuntimeEvent>;
|
|
87
132
|
getCapabilities?(input: {
|
|
88
133
|
handle?: AcpRuntimeHandle;
|
|
@@ -135,9 +180,6 @@ type AcpFileSessionStoreOptions = {
|
|
|
135
180
|
stateDir: string;
|
|
136
181
|
};
|
|
137
182
|
//#endregion
|
|
138
|
-
//#region src/agent-registry.d.ts
|
|
139
|
-
declare const DEFAULT_AGENT_NAME = "codex";
|
|
140
|
-
//#endregion
|
|
141
183
|
//#region src/runtime/engine/manager.d.ts
|
|
142
184
|
type AcpRuntimeManagerDeps = {
|
|
143
185
|
clientFactory?: (options: ConstructorParameters<typeof AcpClient>[0]) => AcpClient;
|
|
@@ -147,8 +189,14 @@ declare class AcpRuntimeManager {
|
|
|
147
189
|
private readonly deps;
|
|
148
190
|
private readonly activeControllers;
|
|
149
191
|
private readonly pendingPersistentClients;
|
|
192
|
+
private readonly closingActiveRecords;
|
|
150
193
|
constructor(options: AcpRuntimeOptions, deps?: AcpRuntimeManagerDeps);
|
|
151
194
|
private createClient;
|
|
195
|
+
private readPendingPersistentClient;
|
|
196
|
+
private closePendingPersistentClient;
|
|
197
|
+
private refreshClosedState;
|
|
198
|
+
private retainPersistentClientAfterTurn;
|
|
199
|
+
private withRuntimeControlSession;
|
|
152
200
|
ensureSession(input: {
|
|
153
201
|
sessionKey: string;
|
|
154
202
|
agent: string;
|
|
@@ -156,6 +204,16 @@ declare class AcpRuntimeManager {
|
|
|
156
204
|
cwd?: string;
|
|
157
205
|
resumeSessionId?: string;
|
|
158
206
|
}): Promise<SessionRecord>;
|
|
207
|
+
startTurn(input: {
|
|
208
|
+
handle: AcpRuntimeHandle;
|
|
209
|
+
text: string;
|
|
210
|
+
attachments?: AcpRuntimeTurnAttachment[];
|
|
211
|
+
mode: AcpRuntimePromptMode;
|
|
212
|
+
sessionMode: "persistent" | "oneshot";
|
|
213
|
+
requestId: string;
|
|
214
|
+
timeoutMs?: number;
|
|
215
|
+
signal?: AbortSignal;
|
|
216
|
+
}): AcpRuntimeTurn;
|
|
159
217
|
runTurn(input: {
|
|
160
218
|
handle: AcpRuntimeHandle;
|
|
161
219
|
text: string;
|
|
@@ -228,15 +286,30 @@ declare class AcpxRuntime implements AcpxRuntimeLike {
|
|
|
228
286
|
probeRunner?: (options: AcpRuntimeOptions) => Promise<{
|
|
229
287
|
ok: boolean;
|
|
230
288
|
message: string;
|
|
231
|
-
details?:
|
|
289
|
+
details?: unknown[];
|
|
232
290
|
}>;
|
|
233
291
|
} | undefined);
|
|
234
292
|
isHealthy(): boolean;
|
|
235
293
|
probeAvailability(): Promise<void>;
|
|
236
294
|
doctor(): Promise<AcpRuntimeDoctorReport>;
|
|
237
295
|
ensureSession(input: AcpRuntimeEnsureInput): Promise<AcpRuntimeHandle>;
|
|
296
|
+
startTurn(input: AcpRuntimeTurnInput): {
|
|
297
|
+
requestId: string;
|
|
298
|
+
events: {
|
|
299
|
+
[Symbol.asyncIterator](): AsyncGenerator<AcpRuntimeEvent, void, any>;
|
|
300
|
+
};
|
|
301
|
+
readonly result: Promise<AcpRuntimeTurnResult>;
|
|
302
|
+
cancel(inputArgs?: {
|
|
303
|
+
reason?: string;
|
|
304
|
+
}): Promise<void>;
|
|
305
|
+
closeStream(inputArgs?: {
|
|
306
|
+
reason?: string;
|
|
307
|
+
}): Promise<void>;
|
|
308
|
+
};
|
|
238
309
|
runTurn(input: AcpRuntimeTurnInput): AsyncIterable<AcpRuntimeEvent>;
|
|
239
|
-
getCapabilities(
|
|
310
|
+
getCapabilities(_input?: {
|
|
311
|
+
handle?: AcpRuntimeHandle;
|
|
312
|
+
}): AcpRuntimeCapabilities;
|
|
240
313
|
getStatus(input: {
|
|
241
314
|
handle: AcpRuntimeHandle;
|
|
242
315
|
signal?: AbortSignal;
|
|
@@ -261,6 +334,7 @@ declare class AcpxRuntime implements AcpxRuntimeLike {
|
|
|
261
334
|
}): Promise<void>;
|
|
262
335
|
private getManager;
|
|
263
336
|
private runProbe;
|
|
337
|
+
private resolveManagerHandle;
|
|
264
338
|
private resolveHandleState;
|
|
265
339
|
}
|
|
266
340
|
declare function createAcpRuntime(options: AcpRuntimeOptions): AcpxRuntime;
|
|
@@ -268,5 +342,5 @@ declare function createRuntimeStore(options: {
|
|
|
268
342
|
stateDir: string;
|
|
269
343
|
}): AcpSessionStore;
|
|
270
344
|
//#endregion
|
|
271
|
-
export { ACPX_BACKEND_ID, type AcpAgentRegistry, type AcpFileSessionStoreOptions, type AcpRuntime, type AcpRuntimeCapabilities, type AcpRuntimeDoctorReport, type AcpRuntimeEnsureInput, AcpRuntimeError, type AcpRuntimeErrorCode, type AcpRuntimeEvent, type AcpRuntimeHandle, type AcpRuntimeOptions, type AcpRuntimePromptMode, type AcpRuntimeSessionMode, type AcpRuntimeStatus, type AcpRuntimeTurnAttachment, type AcpRuntimeTurnInput, type AcpSessionRecord, type AcpSessionStore, type AcpSessionUpdateTag, AcpxRuntime, DEFAULT_AGENT_NAME, createAcpRuntime, createAgentRegistry, createFileSessionStore, createRuntimeStore, decodeAcpxRuntimeHandleState, encodeAcpxRuntimeHandleState, isAcpRuntimeError };
|
|
345
|
+
export { ACPX_BACKEND_ID, type AcpAgentRegistry, type AcpFileSessionStoreOptions, type AcpRuntime, type AcpRuntimeCapabilities, type AcpRuntimeDoctorReport, type AcpRuntimeEnsureInput, AcpRuntimeError, type AcpRuntimeErrorCode, type AcpRuntimeEvent, type AcpRuntimeHandle, type AcpRuntimeOptions, type AcpRuntimePromptMode, type AcpRuntimeSessionMode, type AcpRuntimeStatus, type AcpRuntimeTurn, type AcpRuntimeTurnAttachment, type AcpRuntimeTurnInput, type AcpRuntimeTurnResult, type AcpRuntimeTurnResultError, type AcpSessionRecord, type AcpSessionStore, type AcpSessionUpdateTag, AcpxRuntime, DEFAULT_AGENT_NAME, createAcpRuntime, createAgentRegistry, createFileSessionStore, createRuntimeStore, decodeAcpxRuntimeHandleState, encodeAcpxRuntimeHandleState, isAcpRuntimeError };
|
|
272
346
|
//# sourceMappingURL=runtime.d.ts.map
|
package/dist/runtime.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.ts","names":[],"sources":["../src/
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","names":[],"sources":["../src/agent-registry.ts","../src/runtime/public/contract.ts","../src/runtime/engine/manager.ts","../src/runtime/public/file-session-store.ts","../src/runtime/public/errors.ts","../src/runtime/public/shared.ts","../src/runtime/public/handle-state.ts","../src/runtime.ts"],"mappings":";;;;;cAgFa,kBAAA;;;KCzED,oBAAA;AAAA,KAEA,qBAAA;AAAA,KAEA,mBAAA;AAAA,KAaA,iBAAA;AAAA,KAEA,gBAAA;EACV,UAAA;EACA,OAAA;EACA,kBAAA;EACA,GAAA;EACA,YAAA;EACA,gBAAA;EACA,cAAA;AAAA;AAAA,KAG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