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
@@ -1,12 +1,9 @@
1
- import { E as PromptInput, S as PermissionMode, a as AcpElicitationHandler, d as AcpPermissionHandler, r as AcpClientOptions, w as PermissionStats, x as NonInteractivePermissionPolicy } from "./session-options-DQlqgFv2.js";
1
+ import { E as PromptInput, S as PermissionMode, a as AcpElicitationHandler, d as AcpPermissionHandler, r as AcpClientOptions, w as PermissionStats, x as NonInteractivePermissionPolicy } from "./session-options-BlnP3WAc.js";
2
2
  import { AnyMessage, InitializeResponse, ListSessionsRequest, ListSessionsResponse, PromptResponse, SessionConfigOption, SetSessionConfigOptionResponse } from "@agentclientprotocol/sdk";
3
- //#region src/async-control.d.ts
4
3
  type AcpControlAuthority = {
5
4
  signal?: AbortSignal;
6
5
  assertActive?: () => void;
7
6
  };
8
- //#endregion
9
- //#region src/acp/model-config-state.d.ts
10
7
  type SessionModelState = {
11
8
  configId?: string;
12
9
  currentModelId: string;
@@ -15,8 +12,6 @@ type SessionModelState = {
15
12
  name: string;
16
13
  }>;
17
14
  };
18
- //#endregion
19
- //#region src/acp/client.d.ts
20
15
  type LoadSessionOptions = {
21
16
  authority?: AcpControlAuthority;
22
17
  suppressReplayUpdates?: boolean;
@@ -174,6 +169,7 @@ declare class AcpClient {
174
169
  private createStartupFailureWatcher;
175
170
  private normalizeInitializeError;
176
171
  private selectAuthMethod;
172
+ private inheritedEnvPolicy;
177
173
  private readAgentSpecificEnvCredential;
178
174
  private selectAgentManagedAuthMethod;
179
175
  private isGrokBuildAcpCommand;
@@ -220,6 +216,5 @@ declare class AcpClient {
220
216
  timeoutMs?: number;
221
217
  }): Promise<void>;
222
218
  }
223
- //#endregion
224
219
  export { AcpControlAuthority as n, AcpClient as t };
225
- //# sourceMappingURL=client-R5OmZ--S.d.ts.map
220
+ //# sourceMappingURL=client-D12zqSyN.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client-D12zqSyN.d.ts","names":[],"sources":["../src/async-control.ts","../src/acp/model-config-state.ts","../src/acp/client.ts"],"mappings":";;KAcY;EACV,SAAS;EACT;;KChBU;EACV;EACA;EACA,iBAAiB;IACf;IACA;;;KCkNC;EACH,YAAY;EACZ;EACA;EACA;;KAGU;EACV;EACA;EACA,gBAAgB;EAChB,SAAS;EACT;EACA;;KAGU;EACV;EACA,gBAAgB;EAChB,SAAS;EACT;EACA;;KAGU,sBAAsB;KA4C7B;KAsFO;EACV;EACA,QAAQ,OAAO;EACf;EACA,QAAQ;EACR;;KAGU;EACV;EACA;EACA;EACA,WAAW;;cAoBA;UACH;UACA;UACA;mBACS;mBACA;mBACA;UACT;UACA;UACA;mBAQS;mBAMA;mBACA;UACT;UACA;UACA;UACA;UACA;UACA;mBACS;mBACA;mBACA;UACT;UACA;UAEA;UACA;UACA;UACA;mBACS;mBACA;EAEL,YAAA,SAAS;MAsCjB,oBAAoB;EAIxB;EAIA,sBAAsB;EAItB,6BAA6B;EAW7B;EAIA;EAIA;EAIA;EAIA,iBACE,UAAU,KACR;EAWJ;EAIA,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BA;UAyBA;UAKA;UAwBA;UASA;UAUM;UAqDN;UAYM;UAmBA;UASA;UASA;UAoBN;UASA;UAMA;UAaA;UAWM;UAkBA;EAgCR,0BAA0B;IAC9B;IACA;MACE"}
@@ -1,7 +1,7 @@
1
- import { a as MAX_TIMER_DELAY_MS, t as createOutputFormatter } from "./output-B1Srnvko.js";
2
- import { C as textPrompt, It as SESSION_RECORD_SCHEMA, Pt as PERMISSION_MODES, R as resolveSessionRecord, S as promptToDisplayText, bt as writePrivateJsonFile, ft as defaultSessionEventLog, yt as writePrivateFile } from "./ipc-D2BC99hf.js";
3
- import { N as runTimedExecFile } from "./agent-registry-Gtwn7nMp.js";
4
- import { G as recordSessionUpdate, H as createSessionConversation, U as recordClientOperation, W as recordPromptSubmission, dt as TimeoutError, i as runOnce, m as createSessionWithClient, mt as withTimeout, o as sendSessionDirect, pt as withInterrupt, q as cloneSessionAcpxState, ut as InterruptedError } from "./queue-owner-runtime-Be8sr9L5.js";
1
+ import { a as MAX_TIMER_DELAY_MS, t as createOutputFormatter } from "./output-mqRHzGzM.js";
2
+ import { C as textPrompt, It as SESSION_RECORD_SCHEMA, Pt as PERMISSION_MODES, R as resolveSessionRecord, S as promptToDisplayText, bt as writePrivateJsonFile, ft as defaultSessionEventLog, yt as writePrivateFile } from "./ipc-BbYFsKOj.js";
3
+ import { N as runTimedExecFile } from "./agent-registry-Cz9fD9H1.js";
4
+ import { G as recordSessionUpdate, H as createSessionConversation, U as recordClientOperation, W as recordPromptSubmission, dt as InterruptedError, ft as TimeoutError, ht as withTimeout, i as runOnce, m as createSessionWithClient, mt as withInterrupt, o as sendSessionDirect, q as cloneSessionAcpxState } from "./queue-owner-runtime-B0mPqOu4.js";
5
5
  import path from "node:path";
6
6
  import { spawn } from "node:child_process";
7
7
  import fs from "node:fs/promises";
@@ -11,14 +11,13 @@ import { setTimeout as setTimeout$1 } from "node:timers/promises";
11
11
  import { ZodError, z } from "zod";
12
12
  import { createHash, randomUUID } from "node:crypto";
13
13
  import { performance } from "node:perf_hooks";
14
- //#region src/flows/timeout.ts
14
+ // src/flows/timeout.ts
15
15
  function resolveFlowTimeoutMs(timeoutMs) {
16
16
  if (timeoutMs === void 0) return;
17
17
  if (!Number.isFinite(timeoutMs) || timeoutMs > 2147483647) throw new TypeError(`timeoutMs must be a finite number no greater than ${MAX_TIMER_DELAY_MS}`);
18
18
  return timeoutMs > 0 ? timeoutMs : void 0;
19
19
  }
20
- //#endregion
21
- //#region src/flows/attempt.ts
20
+ // src/flows/attempt.ts
22
21
  /** One node attempt owns admission and completion of its managed operations. */
23
22
  var FlowAttempt = class {
24
23
  signal;
@@ -142,8 +141,7 @@ var FlowAttempt = class {
142
141
  return new AggregateError(failures, "Flow attempt cleanup failed", { cause: failures[0] });
143
142
  }
144
143
  };
145
- //#endregion
146
- //#region src/flows/authoring.ts
144
+ // src/flows/authoring.ts
147
145
  const FLOW_DEFINITION_BRAND = Symbol.for("acpx.flow.definition");
148
146
  function markDefinedFlow(definition) {
149
147
  if (isDefinedFlow(definition)) return definition;
@@ -158,8 +156,7 @@ function markDefinedFlow(definition) {
158
156
  function isDefinedFlow(value) {
159
157
  return value != null && typeof value === "object" && value[FLOW_DEFINITION_BRAND] === true;
160
158
  }
161
- //#endregion
162
- //#region src/flows/schema.ts
159
+ // src/flows/schema.ts
163
160
  const FLOW_NODE_TYPES = [
164
161
  "acp",
165
162
  "compute",
@@ -320,8 +317,7 @@ function formatIssue(issue, parentPath = []) {
320
317
  function hasOwn(value, key) {
321
318
  return value != null && typeof value === "object" && Object.prototype.hasOwnProperty.call(value, key);
322
319
  }
323
- //#endregion
324
- //#region src/flows/definition.ts
320
+ // src/flows/definition.ts
325
321
  function defineFlow(definition) {
326
322
  assertValidFlowDefinitionShape(definition);
327
323
  return markDefinedFlow(definition);
@@ -366,8 +362,7 @@ function checkpoint(definition = {}) {
366
362
  assertValidCheckpointNodeDefinition(node);
367
363
  return node;
368
364
  }
369
- //#endregion
370
- //#region src/flows/executors/shell-output.ts
365
+ // src/flows/executors/shell-output.ts
371
366
  function validateShellActionMaxBufferBytes(value) {
372
367
  if (value === void 0) return;
373
368
  if (!Number.isSafeInteger(value) || value < 0) throw new Error("Shell action maxBufferBytes must be a non-negative safe integer");
@@ -396,8 +391,7 @@ function createShellOutputCapture(maxBufferBytes, inactive, overflow) {
396
391
  }
397
392
  };
398
393
  }
399
- //#endregion
400
- //#region src/flows/executors/shell-process.ts
394
+ // src/flows/executors/shell-process.ts
401
395
  const KILL_GRACE_MS = 1e3;
402
396
  async function readPosixProcesses() {
403
397
  return (await runTimedExecFile("ps", ["-eo", "pid=,ppid=,pgid=,stat="])).trim().split("\n").map((line) => {
@@ -519,8 +513,7 @@ function hasShellProcesses(child) {
519
513
  return error.code !== "ESRCH";
520
514
  }
521
515
  }
522
- //#endregion
523
- //#region src/flows/executors/shell.ts
516
+ // src/flows/executors/shell.ts
524
517
  function writeShellStdin(child, stdin) {
525
518
  const stream = child.stdin;
526
519
  if (!stream) return;
@@ -727,8 +720,7 @@ function throwIfShellCancelled(signal, mode) {
727
720
  const reason = signal.reason;
728
721
  if (mode === "command" || reason instanceof TimeoutError || reason instanceof InterruptedError) throw reason;
729
722
  }
730
- //#endregion
731
- //#region src/flows/graph.ts
723
+ // src/flows/graph.ts
732
724
  function validateFlowDefinition(flow) {
733
725
  assertValidFlowDefinitionShape(flow);
734
726
  assertKnownFlowNode(flow, flow.startAt, "Flow start node is missing");
@@ -776,8 +768,7 @@ function getByPath(value, jsonPath) {
776
768
  return current[key];
777
769
  }, value);
778
770
  }
779
- //#endregion
780
- //#region src/flows/runtime-support.ts
771
+ // src/flows/runtime-support.ts
781
772
  function isoNow$1() {
782
773
  return (/* @__PURE__ */ new Date()).toISOString();
783
774
  }
@@ -1056,8 +1047,7 @@ function findConversationDeltaStart(before, after) {
1056
1047
  function deepEqualJson(left, right) {
1057
1048
  return JSON.stringify(left) === JSON.stringify(right);
1058
1049
  }
1059
- //#endregion
1060
- //#region src/flows/store.ts
1050
+ // src/flows/store.ts
1061
1051
  const FLOW_BUNDLE_SCHEMA = "acpx.flow-run-bundle.v1";
1062
1052
  const FLOW_TRACE_SCHEMA = "acpx.flow-trace-event.v1";
1063
1053
  const FLOW_SNAPSHOT_SCHEMA = "acpx.flow-definition-snapshot.v1";
@@ -1431,8 +1421,7 @@ function sessionDirPath(bundleId) {
1431
1421
  function isoNow() {
1432
1422
  return (/* @__PURE__ */ new Date()).toISOString();
1433
1423
  }
1434
- //#endregion
1435
- //#region src/flows/runtime.ts
1424
+ // src/flows/runtime.ts
1436
1425
  const DEFAULT_FLOW_HEARTBEAT_MS = 5e3;
1437
1426
  const DEFAULT_FLOW_STEP_TIMEOUT_MS = 9e5;
1438
1427
  function setNodeValue(values, nodeId, value) {
@@ -2273,8 +2262,7 @@ var FlowRunner = class {
2273
2262
  });
2274
2263
  }
2275
2264
  };
2276
- //#endregion
2277
- //#region src/flows/json.ts
2265
+ // src/flows/json.ts
2278
2266
  function normalizeJsonText(text) {
2279
2267
  if (typeof text === "string") return text.trim();
2280
2268
  if (text == null) return "";
@@ -2402,8 +2390,7 @@ function scanStringChar(char, escaped) {
2402
2390
  inString: char !== "\""
2403
2391
  };
2404
2392
  }
2405
- //#endregion
2406
- //#region src/flows/decision.ts
2393
+ // src/flows/decision.ts
2407
2394
  const DEFAULT_FIELD = "route";
2408
2395
  const SIMPLE_FIELD_PATTERN = /^[A-Za-z_][A-Za-z0-9_]*$/;
2409
2396
  function decision(definition) {
@@ -2468,7 +2455,6 @@ function formatDecisionPrompt(question, choices, field) {
2468
2455
  "Do not include any other text outside the JSON object."
2469
2456
  ].join("\n");
2470
2457
  }
2471
- //#endregion
2472
2458
  export { parseStrictJsonObject as a, validateFlowDefinition as c, checkpoint as d, compute as f, isDefinedFlow as h, parseJsonObject as i, acp as l, shell as m, decisionEdge as n, FlowRunner as o, defineFlow as p, extractJsonObject as r, flowRunsBaseDir as s, decision as t, action as u };
2473
2459
 
2474
- //# sourceMappingURL=flows-CTRAV28u.js.map
2460
+ //# sourceMappingURL=flows-BVpRv0Df.js.map