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.
Files changed (42) hide show
  1. package/dist/{agent-registry-Gtwn7nMp.js → agent-registry-Cz9fD9H1.js} +5 -8
  2. package/dist/{agent-registry-Gtwn7nMp.js.map → agent-registry-Cz9fD9H1.js.map} +1 -1
  3. package/dist/agent-registry.d.ts +0 -2
  4. package/dist/agent-registry.d.ts.map +1 -1
  5. package/dist/agent-registry.js +1 -1
  6. package/dist/{cli-CnufHoAJ.js → cli-BLEPj7lL.js} +6 -8
  7. package/dist/{cli-CnufHoAJ.js.map → cli-BLEPj7lL.js.map} +1 -1
  8. package/dist/cli.d.ts +1 -5
  9. package/dist/cli.d.ts.map +1 -1
  10. package/dist/cli.js +27 -45
  11. package/dist/cli.js.map +1 -1
  12. package/dist/{client-R5OmZ--S.d.ts → client-D12zqSyN.d.ts} +3 -8
  13. package/dist/client-D12zqSyN.d.ts.map +1 -0
  14. package/dist/{flows-CTRAV28u.js → flows-BVpRv0Df.js} +19 -33
  15. package/dist/{flows-CTRAV28u.js.map → flows-BVpRv0Df.js.map} +1 -1
  16. package/dist/flows.d.ts +2 -14
  17. package/dist/flows.d.ts.map +1 -1
  18. package/dist/flows.js +1 -1
  19. package/dist/{invocation-options-DE3Z_fqa.js → invocation-options-VJlayf-0.js} +16 -12
  20. package/dist/{invocation-options-DE3Z_fqa.js.map → invocation-options-VJlayf-0.js.map} +1 -1
  21. package/dist/{ipc-D2BC99hf.js → ipc-BbYFsKOj.js} +38 -69
  22. package/dist/ipc-BbYFsKOj.js.map +1 -0
  23. package/dist/{output-B1Srnvko.js → output-mqRHzGzM.js} +10 -17
  24. package/dist/{output-B1Srnvko.js.map → output-mqRHzGzM.js.map} +1 -1
  25. package/dist/{queue-owner-runtime-Be8sr9L5.js → queue-owner-runtime-B0mPqOu4.js} +168 -117
  26. package/dist/queue-owner-runtime-B0mPqOu4.js.map +1 -0
  27. package/dist/runtime.d.ts +18 -26
  28. package/dist/runtime.d.ts.map +1 -1
  29. package/dist/runtime.js +29 -32
  30. package/dist/runtime.js.map +1 -1
  31. package/dist/{session-options-DQlqgFv2.d.ts → session-options-BlnP3WAc.d.ts} +8 -7
  32. package/dist/session-options-BlnP3WAc.d.ts.map +1 -0
  33. package/dist/{session-watch-CpYYtV62.js → session-watch-BnIxHQrU.js} +5 -6
  34. package/dist/{session-watch-CpYYtV62.js.map → session-watch-BnIxHQrU.js.map} +1 -1
  35. package/dist/{watch-Db2D1eYN.js → watch-bQXyUy3z.js} +3 -4
  36. package/dist/{watch-Db2D1eYN.js.map → watch-bQXyUy3z.js.map} +1 -1
  37. package/package.json +20 -20
  38. package/skills/acpx/SKILL.md +27 -1
  39. package/dist/client-R5OmZ--S.d.ts.map +0 -1
  40. package/dist/ipc-D2BC99hf.js.map +0 -1
  41. package/dist/queue-owner-runtime-Be8sr9L5.js.map +0 -1
  42. package/dist/session-options-DQlqgFv2.d.ts.map +0 -1
package/dist/cli.js CHANGED
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
- import { c as __exportAll, n as getTextErrorRemediationHints, o as toTimerMilliseconds, t as createOutputFormatter } from "./output-B1Srnvko.js";
3
- import { A as findSession, C as textPrompt, Ct as exitCodeForOutputErrorCode, Dt as normalizeOutputError, F as normalizeName, G as normalizeAgentSessionId, Lt as AcpxOperationalError, N as listSessions, Nt as OUTPUT_FORMATS, O as absolutePath, St as isProcessAlive, U as serializeSessionRecordForDisk, V as parseSessionRecord, _t as sessionEventLockPath, b as mergePromptSourceWithText, c as probeQueueOwnerHealth, dt as boundedEventMaxSegments, ft as defaultSessionEventLog, gt as sessionEventActivePath, j as findSessionByDirectoryWalk, jt as EXIT_CODES, k as findGitRepositoryRoot, v as PromptInputValidationError, x as parsePromptSource, xt as _usingCtx, yt as writePrivateFile, z as writeSessionRecord, zt as AgentSpawnError } from "./ipc-D2BC99hf.js";
4
- import { i as DEFAULT_AGENT_NAME, k as renderArgvIdentity, l as normalizeAgentName$1, s as listBuiltInAgents } from "./agent-registry-Gtwn7nMp.js";
5
- import { ct as listSessionEvents, d as flushPerfMetricsCapture, dt as TimeoutError, f as installPerfMetricsCapture, i as runOnce, lt as isLegacyZedCodexAcpInvocation, n as runSessionQueueOwner, nt as getAcpxVersion, ot as acquireSessionImport, s as DISCARD_OUTPUT_FORMATTER, st as acquireSessionScope, u as buildQueueOwnerArgOverride, ut as InterruptedError } from "./queue-owner-runtime-Be8sr9L5.js";
6
- import { C as resolvePermissionMode, E as resolveSessionsListFlags, S as resolveOutputPolicy, T as resolveSessionNameFromFlags, _ as parseSessionName, a as addGlobalFlags, b as resolveAgentInvocation, c as addSessionOption, d as parseDaysOlderThan, f as parseHistoryLimit, g as parsePruneBeforeDate, h as parseOutputFormat$1, i as addExecConfigOption, m as parseNonEmptyValue, n as sessionConnectionOptions, o as addPromptInputOption, p as parseMaxTurns, r as sessionOptionsFromGlobalFlags, s as addSessionNameOption, t as resolvePermissionPolicyFromFlags, u as parseAllowedTools, v as parseTimeoutSeconds, w as resolvePromptFlags, x as resolveGlobalFlags, y as parseTtlSeconds } from "./invocation-options-DE3Z_fqa.js";
2
+ import { c as __exportAll, n as getTextErrorRemediationHints, o as toTimerMilliseconds, t as createOutputFormatter } from "./output-mqRHzGzM.js";
3
+ import { A as findSession, C as textPrompt, Ct as exitCodeForOutputErrorCode, Dt as normalizeOutputError, F as normalizeName, G as normalizeAgentSessionId, Lt as AcpxOperationalError, N as listSessions, Nt as OUTPUT_FORMATS, O as absolutePath, St as isProcessAlive, U as serializeSessionRecordForDisk, V as parseSessionRecord, _t as sessionEventLockPath, b as mergePromptSourceWithText, c as probeQueueOwnerHealth, dt as boundedEventMaxSegments, ft as defaultSessionEventLog, gt as sessionEventActivePath, j as findSessionByDirectoryWalk, jt as EXIT_CODES, k as findGitRepositoryRoot, v as PromptInputValidationError, x as parsePromptSource, xt as _usingCtx, yt as writePrivateFile, z as writeSessionRecord, zt as AgentSpawnError } from "./ipc-BbYFsKOj.js";
4
+ import { i as DEFAULT_AGENT_NAME, k as renderArgvIdentity, l as normalizeAgentName$1, s as listBuiltInAgents } from "./agent-registry-Cz9fD9H1.js";
5
+ import { ct as acquireSessionScope, d as flushPerfMetricsCapture, dt as InterruptedError, f as installPerfMetricsCapture, ft as TimeoutError, i as runOnce, lt as listSessionEvents, n as runSessionQueueOwner, nt as getAcpxVersion, s as DISCARD_OUTPUT_FORMATTER, st as acquireSessionImport, u as buildQueueOwnerArgOverride, ut as isLegacyZedCodexAcpInvocation } from "./queue-owner-runtime-B0mPqOu4.js";
6
+ import { C as resolvePermissionMode, E as resolveSessionsListFlags, S as resolveOutputPolicy, T as resolveSessionNameFromFlags, _ as parseSessionName, a as addGlobalFlags, b as resolveAgentInvocation, c as addSessionOption, d as parseDaysOlderThan, f as parseHistoryLimit, g as parsePruneBeforeDate, h as parseOutputFormat$1, i as addExecConfigOption, m as parseNonEmptyValue, n as sessionConnectionOptions, o as addPromptInputOption, p as parseMaxTurns, r as sessionOptionsFromGlobalFlags, s as addSessionNameOption, t as resolvePermissionPolicyFromFlags, u as parseAllowedTools, v as parseTimeoutSeconds, w as resolvePromptFlags, x as resolveGlobalFlags, y as parseTtlSeconds } from "./invocation-options-VJlayf-0.js";
7
7
  import { realpathSync } from "node:fs";
8
8
  import { fileURLToPath, pathToFileURL } from "node:url";
9
9
  import path from "node:path";
@@ -14,7 +14,7 @@ import { ZodError, z } from "zod";
14
14
  import { createHash, randomUUID } from "node:crypto";
15
15
  import { text } from "node:stream/consumers";
16
16
  import { performance } from "node:perf_hooks";
17
- //#region src/cli-public.ts
17
+ // src/cli-public.ts
18
18
  function configurePublicCli(options) {
19
19
  const builtInAgents = options.listBuiltInAgents(options.config.agents);
20
20
  for (const agentName of builtInAgents) options.registerAgentCommand(options.program, agentName, options.config);
@@ -54,8 +54,7 @@ Examples:
54
54
  acpx claude "refactor auth"
55
55
  acpx --agent ./my-custom-server "do something"`);
56
56
  }
57
- //#endregion
58
- //#region src/session/export.ts
57
+ // src/session/export.ts
59
58
  var SessionExportError = class extends AcpxOperationalError {
60
59
  code;
61
60
  exitCode = 2;
@@ -177,8 +176,7 @@ function normalizeAgentName(agentName) {
177
176
  if (!normalized || normalized.length === 0) return;
178
177
  return normalized === "factory-droid" || normalized === "factorydroid" ? "droid" : normalized;
179
178
  }
180
- //#endregion
181
- //#region src/session/import.ts
179
+ // src/session/import.ts
182
180
  const SUPPORTED_FORMAT_VERSION = 1;
183
181
  const exportedSessionSchema = z.object({
184
182
  format_version: z.literal(SUPPORTED_FORMAT_VERSION),
@@ -375,15 +373,13 @@ async function importSession(archivePath, options = {}) {
375
373
  await _usingCtx$1.d();
376
374
  }
377
375
  }
378
- //#endregion
379
- //#region src/cli/output/json-output.ts
376
+ // src/cli/output/json-output.ts
380
377
  function emitJsonResult(format, payload) {
381
378
  if (format !== "json") return false;
382
379
  process.stdout.write(`${JSON.stringify(payload)}\n`);
383
380
  return true;
384
381
  }
385
- //#endregion
386
- //#region src/cli/prompt-input.ts
382
+ // src/cli/prompt-input.ts
387
383
  async function readPromptInput(filePath, promptText, cwd, positionalLabel = "argument") {
388
384
  try {
389
385
  if (filePath) return await readPromptFile(filePath, promptText, cwd);
@@ -404,8 +400,7 @@ async function readPromptFile(filePath, promptText, cwd) {
404
400
  if (prompt.length === 0) throw new InvalidArgumentError("Prompt from --file is empty");
405
401
  return prompt;
406
402
  }
407
- //#endregion
408
- //#region src/cli/command-handlers.ts
403
+ // src/cli/command-handlers.ts
409
404
  var NoSessionError = class extends Error {
410
405
  constructor(message) {
411
406
  super(message);
@@ -416,11 +411,11 @@ let sessionModulePromise;
416
411
  let outputModulePromise;
417
412
  let outputRenderModulePromise;
418
413
  function loadSessionModule() {
419
- sessionModulePromise ??= import("./output-B1Srnvko.js").then((n) => n.s);
414
+ sessionModulePromise ??= import("./output-mqRHzGzM.js").then((n) => n.s);
420
415
  return sessionModulePromise;
421
416
  }
422
417
  function loadOutputModule() {
423
- outputModulePromise ??= import("./output-B1Srnvko.js").then((n) => n.r);
418
+ outputModulePromise ??= import("./output-mqRHzGzM.js").then((n) => n.r);
424
419
  return outputModulePromise;
425
420
  }
426
421
  function loadOutputRenderModule() {
@@ -902,7 +897,7 @@ async function handleSessionsWatch(explicitAgentName, flags, command, config) {
902
897
  includeClosed: true
903
898
  });
904
899
  if (!record) throw new Error(missingScopedSessionMessage(agent, sessionName));
905
- const { runSessionWatch } = await import("./session-watch-CpYYtV62.js");
900
+ const { runSessionWatch } = await import("./session-watch-BnIxHQrU.js");
906
901
  await runSessionWatch(record, {
907
902
  cursor: flags.cursor,
908
903
  policy: resolveRequestedOutputPolicy(globalFlags)
@@ -961,8 +956,7 @@ async function handleSessionsPrune(explicitAgentName, flags, command, config) {
961
956
  dryRun: flags.dryRun
962
957
  }), globalFlags.format);
963
958
  }
964
- //#endregion
965
- //#region src/cli/compare-args.ts
959
+ // src/cli/compare-args.ts
966
960
  function addCompareOptions(command) {
967
961
  return command.option("--cwd <dir>", "Target workspace").option("--approve-all", "Auto-approve all permission requests").option("--approve-reads", "Auto-approve read/search requests and prompt for writes").option("--deny-all", "Deny all permission requests").option("--timeout <seconds>", "Per-agent timeout in seconds", parseTimeoutSeconds).option("--format <fmt>", "Output format: text, json, quiet", parseOutputFormat$1).option("--json", "Alias for --format json").option("-f, --file <path>", "Read prompt text from file path (use - for stdin)", (value) => parseNonEmptyValue("Prompt file", value)).option("--prompt-file <path>", "Alias for --file", (value) => parseNonEmptyValue("Prompt file", value));
968
962
  }
@@ -992,8 +986,7 @@ function scanCompareArgs(argv) {
992
986
  ...output
993
987
  };
994
988
  }
995
- //#endregion
996
- //#region src/cli/compare-command.ts
989
+ // src/cli/compare-command.ts
997
990
  const DEFAULT_COMPARE_TIMEOUT_MS = 3e5;
998
991
  const FINAL_MESSAGE_PREVIEW_CHARS = 200;
999
992
  function asRecord$2(value) {
@@ -1252,8 +1245,7 @@ function registerCompareCommand(program, config) {
1252
1245
  else updateCompareExitCode(rows);
1253
1246
  });
1254
1247
  }
1255
- //#endregion
1256
- //#region src/mcp-servers.ts
1248
+ // src/mcp-servers.ts
1257
1249
  function asRecord$1(value) {
1258
1250
  if (!value || typeof value !== "object" || Array.isArray(value)) return;
1259
1251
  return value;
@@ -1337,8 +1329,7 @@ function parseOptionalMcpServers(value, sourcePath, fieldName = "mcpServers") {
1337
1329
  if (value === void 0) return;
1338
1330
  return parseMcpServers(value, sourcePath, fieldName);
1339
1331
  }
1340
- //#endregion
1341
- //#region src/cli/config.ts
1332
+ // src/cli/config.ts
1342
1333
  const DEFAULT_TTL_MS = 3e5;
1343
1334
  const DEFAULT_PERMISSION_MODE = "approve-reads";
1344
1335
  const DEFAULT_NON_INTERACTIVE_PERMISSION_POLICY = "deny";
@@ -1624,8 +1615,7 @@ async function initGlobalConfigFile() {
1624
1615
  created: true
1625
1616
  };
1626
1617
  }
1627
- //#endregion
1628
- //#region src/cli/config-command.ts
1618
+ // src/cli/config-command.ts
1629
1619
  async function handleConfigShow(command, config) {
1630
1620
  const globalFlags = resolveGlobalFlags(command, config);
1631
1621
  const payload = {
@@ -1678,8 +1668,7 @@ function registerConfigCommand(program, config) {
1678
1668
  await handleConfigShow(this, config);
1679
1669
  });
1680
1670
  }
1681
- //#endregion
1682
- //#region src/cli/output/render.ts
1671
+ // src/cli/output/render.ts
1683
1672
  var render_exports = /* @__PURE__ */ __exportAll({
1684
1673
  agentSessionIdPayload: () => agentSessionIdPayload,
1685
1674
  classifySessionConnectionStatus: () => classifySessionConnectionStatus,
@@ -1878,8 +1867,7 @@ function agentSessionIdPayload(agentSessionId) {
1878
1867
  if (!normalized) return {};
1879
1868
  return { agentSessionId: normalized };
1880
1869
  }
1881
- //#endregion
1882
- //#region src/cli/status-command.ts
1870
+ // src/cli/status-command.ts
1883
1871
  function formatUptime(startedAt) {
1884
1872
  if (!startedAt) return;
1885
1873
  const startedMs = Date.parse(startedAt);
@@ -2045,8 +2033,7 @@ function registerStatusCommand(parent, explicitAgentName, config, description) {
2045
2033
  await handleStatus(explicitAgentName, flags, this, config);
2046
2034
  });
2047
2035
  }
2048
- //#endregion
2049
- //#region src/cli/command-registration.ts
2036
+ // src/cli/command-registration.ts
2050
2037
  var LocalAttributeOption = class extends Option {
2051
2038
  localAttributeName;
2052
2039
  constructor(flags, description, localAttributeName) {
@@ -2149,7 +2136,7 @@ function registerAgentCommand(program, agentName, config) {
2149
2136
  }
2150
2137
  function registerFlowCommand(program, config) {
2151
2138
  program.command("flow").description("Run multi-step ACP workflows from flow files").command("run").description("Run a flow file").argument("<file>", "Flow module path").option("--input-json <json>", "Flow input as JSON").option("--input-file <path>", "Read flow input JSON from file").option("--default-agent <name>", "Default agent profile for ACP nodes without profile", (value) => parseNonEmptyValue("Default agent", value)).action(async function(file, flags) {
2152
- const { handleFlowRun } = await import("./cli-CnufHoAJ.js");
2139
+ const { handleFlowRun } = await import("./cli-BLEPj7lL.js");
2153
2140
  await handleFlowRun(file, flags, this, config);
2154
2141
  });
2155
2142
  }
@@ -2167,8 +2154,7 @@ function registerDefaultCommands(program, config) {
2167
2154
  registerCompareCommand(program, config);
2168
2155
  registerFlowCommand(program, config);
2169
2156
  }
2170
- //#endregion
2171
- //#region src/session/queue/owner-input.ts
2157
+ // src/session/queue/owner-input.ts
2172
2158
  function asRecord(value) {
2173
2159
  if (!value || typeof value !== "object" || Array.isArray(value)) return;
2174
2160
  return value;
@@ -2261,8 +2247,7 @@ async function runQueueOwnerFromStdin() {
2261
2247
  if (!payload) throw new Error("queue owner startup payload is empty");
2262
2248
  await runSessionQueueOwner(parseQueueOwnerPayload(payload));
2263
2249
  }
2264
- //#endregion
2265
- //#region src/cli-core.ts
2250
+ // src/cli-core.ts
2266
2251
  const TOP_LEVEL_VERBS = /* @__PURE__ */ new Set([
2267
2252
  "prompt",
2268
2253
  "exec",
@@ -2595,8 +2580,7 @@ function normalizeLifecycleScriptArgs(rawArgs) {
2595
2580
  if (rawArgs[0] === "--" && (process.env.npm_lifecycle_event || process.env.npm_lifecycle_script)) return rawArgs.slice(1);
2596
2581
  return rawArgs;
2597
2582
  }
2598
- //#endregion
2599
- //#region src/cli/broken-pipe.ts
2583
+ // src/cli/broken-pipe.ts
2600
2584
  function handleBrokenPipeError(error, mode, exit = (code) => process.exit(code)) {
2601
2585
  if (error.code !== "EPIPE") throw error;
2602
2586
  if (mode === "exit") exit(0);
@@ -2606,8 +2590,7 @@ function installBrokenPipeHandler(stream, mode) {
2606
2590
  handleBrokenPipeError(error, mode);
2607
2591
  });
2608
2592
  }
2609
- //#endregion
2610
- //#region src/cli.ts
2593
+ // src/cli.ts
2611
2594
  function isCliEntrypoint(argv) {
2612
2595
  const entry = argv[1];
2613
2596
  if (!entry) return false;
@@ -2626,7 +2609,6 @@ if (isCliEntrypoint(process.argv)) {
2626
2609
  if (queueOwnerArgOverride) process.env.ACPX_QUEUE_OWNER_ARGS ??= queueOwnerArgOverride;
2627
2610
  main(process.argv);
2628
2611
  }
2629
- //#endregion
2630
2612
  export { formatPromptSessionBannerLine, parseAllowedTools, parseMaxTurns, parseTtlSeconds };
2631
2613
 
2632
2614
  //# sourceMappingURL=cli.js.map