@automatalabs/acp-agents 1.2.7 → 1.3.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.
Files changed (66) hide show
  1. package/README.md +67 -3
  2. package/dist/acp-client.d.ts +21 -1
  3. package/dist/acp-client.d.ts.map +1 -1
  4. package/dist/acp-client.js +29 -5
  5. package/dist/agent/acp-agent.d.ts +141 -0
  6. package/dist/agent/acp-agent.d.ts.map +1 -0
  7. package/dist/agent/acp-agent.js +832 -0
  8. package/dist/agent/errors.d.ts +17 -0
  9. package/dist/agent/errors.d.ts.map +1 -0
  10. package/dist/agent/errors.js +37 -0
  11. package/dist/agent/events.d.ts +26 -0
  12. package/dist/agent/events.d.ts.map +1 -0
  13. package/dist/agent/events.js +165 -0
  14. package/dist/agent/fork.d.ts +27 -0
  15. package/dist/agent/fork.d.ts.map +1 -0
  16. package/dist/agent/fork.js +28 -0
  17. package/dist/agent/probe.d.ts +14 -0
  18. package/dist/agent/probe.d.ts.map +1 -0
  19. package/dist/agent/probe.js +87 -0
  20. package/dist/agent/process-registry.d.ts +9 -0
  21. package/dist/agent/process-registry.d.ts.map +1 -0
  22. package/dist/agent/process-registry.js +28 -0
  23. package/dist/agent/queue.d.ts +19 -0
  24. package/dist/agent/queue.d.ts.map +1 -0
  25. package/dist/agent/queue.js +90 -0
  26. package/dist/agent/routing.d.ts +27 -0
  27. package/dist/agent/routing.d.ts.map +1 -0
  28. package/dist/agent/routing.js +87 -0
  29. package/dist/agent/structured.d.ts +47 -0
  30. package/dist/agent/structured.d.ts.map +1 -0
  31. package/dist/agent/structured.js +90 -0
  32. package/dist/agent/turn.d.ts +65 -0
  33. package/dist/agent/turn.d.ts.map +1 -0
  34. package/dist/agent/turn.js +187 -0
  35. package/dist/agent/types.d.ts +221 -0
  36. package/dist/agent/types.d.ts.map +1 -0
  37. package/dist/agent/types.js +9 -0
  38. package/dist/backend.d.ts +6 -0
  39. package/dist/backend.d.ts.map +1 -1
  40. package/dist/backends/claude.d.ts +1 -0
  41. package/dist/backends/claude.d.ts.map +1 -1
  42. package/dist/backends/claude.js +5 -0
  43. package/dist/config-catalog.d.ts +173 -0
  44. package/dist/config-catalog.d.ts.map +1 -0
  45. package/dist/config-catalog.js +408 -0
  46. package/dist/index.d.ts +10 -3
  47. package/dist/index.d.ts.map +1 -1
  48. package/dist/index.js +10 -1
  49. package/dist/protocol-coverage.d.ts +56 -0
  50. package/dist/protocol-coverage.d.ts.map +1 -1
  51. package/dist/protocol-coverage.js +52 -0
  52. package/dist/registry.d.ts +12 -0
  53. package/dist/registry.d.ts.map +1 -1
  54. package/dist/registry.js +22 -0
  55. package/dist/routing.d.ts +14 -0
  56. package/dist/routing.d.ts.map +1 -0
  57. package/dist/routing.js +53 -0
  58. package/dist/runner.d.ts.map +1 -1
  59. package/dist/runner.js +3 -64
  60. package/dist/session-ref.d.ts +8 -0
  61. package/dist/session-ref.d.ts.map +1 -0
  62. package/dist/session-ref.js +21 -0
  63. package/dist/structured-tool.d.ts +4 -0
  64. package/dist/structured-tool.d.ts.map +1 -1
  65. package/dist/structured-tool.js +5 -0
  66. package/package.json +3 -3
@@ -0,0 +1,408 @@
1
+ // Harness config discovery — the token-free catalog probe behind `agentprism-workflows config`
2
+ // (the CLI lives in @automatalabs/workflows; that facade re-exports everything here) and the
3
+ // SDK's `AcpAgent.probe`. Where validate probes only the harnesses a script routes to, this
4
+ // probes any requested (or every routable) harness WITHOUT a script: one no-prompt ACP session
5
+ // per harness, returning the agent-advertised session config-option catalog plus the effective
6
+ // ACP session-mode catalog — model ids (including bracket variants), effort levels, modes, and
7
+ // every other negotiable option. Zero tokens. Authoring flows run this FIRST so `model` /
8
+ // `configOptions` values come from the live catalog, not memory.
9
+ import { redactText } from "@automatalabs/shared-types";
10
+ import { BUILTIN_BACKEND_IDS } from "./backends/builtins.js";
11
+ import { resolveBackendRegistry } from "./registry.js";
12
+ import { AcpAgentRunner } from "./runner.js";
13
+ let probeFactory = (backends) => new AcpAgentRunner({ backends });
14
+ /** Package-internal hermetic test seam. Deliberately absent from the public index export. */
15
+ export function setConfigProbeFactoryForTests(factory) {
16
+ const previous = probeFactory;
17
+ probeFactory = factory;
18
+ return () => {
19
+ probeFactory = previous;
20
+ };
21
+ }
22
+ /** Every leaf {value,label} the select advertises, flattening any advertised optgroups. */
23
+ export function selectChoicePairs(option) {
24
+ return option.options
25
+ .flatMap((entry) => ("options" in entry ? entry.options : [entry]))
26
+ .map((entry) => ({ value: entry.value, label: entry.name }));
27
+ }
28
+ /** The group a bare (ungrouped) choice value belongs to: its first "/"-segment
29
+ * (pi/opencode ids are "<provider>/<model>"); a value with no "/" is "(ungrouped)". */
30
+ function groupOfValue(value) {
31
+ const slash = value.indexOf("/");
32
+ return slash > 0 ? value.slice(0, slash) : "(ungrouped)";
33
+ }
34
+ /**
35
+ * Group a select's choices for summary display. Prefers the harness-advertised optgroup
36
+ * labels; absent those, groups by the first "/"-segment of each value. Groups come back
37
+ * largest-first, ties broken by first appearance.
38
+ */
39
+ export function summarizeSelectChoices(option) {
40
+ const counts = new Map();
41
+ const order = [];
42
+ const bump = (name, n) => {
43
+ if (!counts.has(name))
44
+ order.push(name);
45
+ counts.set(name, (counts.get(name) ?? 0) + n);
46
+ };
47
+ const hasAdvertisedGroups = option.options.some((entry) => "options" in entry);
48
+ for (const entry of option.options) {
49
+ if ("options" in entry)
50
+ bump(entry.name ?? entry.group, entry.options.length);
51
+ else if (hasAdvertisedGroups)
52
+ bump(groupOfValue(entry.value), 1); // stray leaf beside groups
53
+ else
54
+ bump(groupOfValue(entry.value), 1);
55
+ }
56
+ const total = [...counts.values()].reduce((sum, n) => sum + n, 0);
57
+ const groups = order
58
+ .map((group) => ({ group, count: counts.get(group) ?? 0 }))
59
+ .sort((a, b) => b.count - a.count || order.indexOf(a.group) - order.indexOf(b.group));
60
+ return { total, groups };
61
+ }
62
+ export const DEFAULT_PROBE_TIMEOUT_MS = 60_000;
63
+ /**
64
+ * Probe each requested harness's advertised config-option catalog. A per-harness
65
+ * spawn/auth/session failure (or timeout) is reported as `probed:false` on that entry —
66
+ * never thrown. Only caller configuration errors throw: a malformed AGENTPRISM_BACKENDS /
67
+ * `backends` registry (loud at construction, mirroring `createAcpRunner`) or invalid options.
68
+ */
69
+ export async function probeHarnessConfig(options = {}) {
70
+ const timeoutMs = options.probeTimeoutMs ?? DEFAULT_PROBE_TIMEOUT_MS;
71
+ const concurrency = options.probeConcurrency ?? 4;
72
+ if (!Number.isInteger(timeoutMs) || timeoutMs <= 0 || timeoutMs > 2_147_483_647) {
73
+ throw new TypeError("probeTimeoutMs must be a positive integer no greater than 2147483647");
74
+ }
75
+ if (!Number.isInteger(concurrency) || concurrency <= 0 || concurrency > 16) {
76
+ throw new TypeError("probeConcurrency must be an integer between 1 and 16");
77
+ }
78
+ const cwd = options.cwd ?? process.cwd();
79
+ const registry = resolveBackendRegistry(options.backends);
80
+ const defaultHarnesses = options.probeRunner?.listBackends?.() ?? [...BUILTIN_BACKEND_IDS, ...registry.keys()];
81
+ const harnessTargets = options.harnesses && options.harnesses.length > 0
82
+ ? options.harnesses
83
+ : options.modelSpecs && options.modelSpecs.length > 0
84
+ ? []
85
+ : defaultHarnesses;
86
+ const targets = [
87
+ ...new Map([
88
+ ...harnessTargets.map((spec) => ({ spec, selectModel: false })),
89
+ ...(options.modelSpecs ?? []).map((spec) => ({ spec, selectModel: true })),
90
+ ].map((target) => [JSON.stringify([target.spec, target.selectModel]), target])).values(),
91
+ ];
92
+ const harnessOptions = new Array(targets.length);
93
+ const ownsRunner = options.probeRunner === undefined;
94
+ const runner = options.probeRunner ?? probeFactory(options.backends);
95
+ try {
96
+ let nextTarget = 0;
97
+ await Promise.all(Array.from({ length: Math.min(concurrency, targets.length) }, async () => {
98
+ while (nextTarget < targets.length) {
99
+ const index = nextTarget++;
100
+ const target = targets[index];
101
+ try {
102
+ const result = await withProbeTimeout((signal) => runner.probeConfigOptions(target.spec, {
103
+ cwd,
104
+ selectModel: target.selectModel,
105
+ backends: options.backends,
106
+ signal,
107
+ }), timeoutMs, options.signal);
108
+ harnessOptions[index] = {
109
+ backendId: result.backendId,
110
+ ...(result.defaultModeId === undefined ? {} : { defaultModeId: result.defaultModeId }),
111
+ ...(target.selectModel ? { model: target.spec } : {}),
112
+ probed: true,
113
+ modes: result.modes ?? null,
114
+ options: result.options,
115
+ };
116
+ }
117
+ catch (error) {
118
+ harnessOptions[index] = {
119
+ backendId: target.spec.split("/", 1)[0] ?? target.spec,
120
+ ...(target.selectModel ? { model: target.spec } : {}),
121
+ probed: false,
122
+ error: probeErrorMessage(error),
123
+ };
124
+ }
125
+ }
126
+ }));
127
+ }
128
+ finally {
129
+ if (ownsRunner) {
130
+ try {
131
+ // Always initiate owned cleanup, including after cancellation, without
132
+ // letting stalled disposal extend the caller's discovery budget.
133
+ const disposal = Promise.resolve().then(() => runner.dispose?.());
134
+ void disposal.catch(() => { });
135
+ await withProbeTimeout(() => disposal, timeoutMs, options.signal);
136
+ }
137
+ catch {
138
+ // Probe results are already complete; disposal (e.g. of a timed-out process) is best-effort.
139
+ }
140
+ }
141
+ }
142
+ const ok = harnessOptions.every((harness) => harness.probed);
143
+ return {
144
+ ok, exitCode: ok ? 0 : 1, harnessOptions,
145
+ authoringSummary: buildHarnessConfigSummary({ harnessOptions }),
146
+ };
147
+ }
148
+ /** The `model` select option a harness advertises, if any. */
149
+ function modelSelectOption(harness) {
150
+ return (harness.options ?? []).find((option) => option.type === "select" && option.id === "model");
151
+ }
152
+ /** Compile a `--models=<filter>` value into a leaf-value matcher. A value wrapped in
153
+ * slashes (`/.../`) is a case-insensitive regex; anything else is a case-insensitive
154
+ * substring. Throws a TypeError on an invalid regex (surfaced as a CLI usage error). */
155
+ export function buildModelFilter(filter) {
156
+ if (filter.length >= 2 && filter.startsWith("/") && filter.endsWith("/")) {
157
+ let re;
158
+ try {
159
+ re = new RegExp(filter.slice(1, -1), "i");
160
+ }
161
+ catch (error) {
162
+ throw new TypeError(`--models: invalid regex ${filter} — ${error instanceof Error ? error.message : String(error)}`);
163
+ }
164
+ return (value) => re.test(value);
165
+ }
166
+ const needle = filter.toLowerCase();
167
+ return (value) => value.toLowerCase().includes(needle);
168
+ }
169
+ /** Build the per-harness `--models` view. `filter` undefined = breakdown mode. */
170
+ export function buildHarnessModelsView(report, filter) {
171
+ const match = filter === undefined ? undefined : buildModelFilter(filter);
172
+ return report.harnessOptions.map((harness) => {
173
+ if (!harness.probed) {
174
+ return { backendId: harness.backendId, probed: false, error: harness.error, hasModelOption: false };
175
+ }
176
+ const model = modelSelectOption(harness);
177
+ if (!model) {
178
+ return { backendId: harness.backendId, probed: true, hasModelOption: false };
179
+ }
180
+ if (match === undefined) {
181
+ const { total, groups } = summarizeSelectChoices(model);
182
+ return { backendId: harness.backendId, probed: true, hasModelOption: true, total, groups };
183
+ }
184
+ const matches = selectChoicePairs(model)
185
+ .map((pair) => pair.value)
186
+ .filter((value) => match(value));
187
+ return { backendId: harness.backendId, probed: true, hasModelOption: true, filter, matches };
188
+ });
189
+ }
190
+ /** Bound one probe; the underlying promise keeps its handlers, so a late settle is inert. */
191
+ function withProbeTimeout(op, ms, signal) {
192
+ return new Promise((resolve, reject) => {
193
+ if (signal?.aborted) {
194
+ reject(signal.reason ?? new Error("config discovery cancelled"));
195
+ return;
196
+ }
197
+ const controller = new AbortController();
198
+ const cleanup = () => {
199
+ clearTimeout(timer);
200
+ signal?.removeEventListener("abort", onAbort);
201
+ };
202
+ const abort = (reason) => {
203
+ cleanup();
204
+ controller.abort(reason);
205
+ reject(reason);
206
+ };
207
+ const onAbort = () => abort(signal?.reason ?? new Error("config discovery cancelled"));
208
+ const timer = setTimeout(() => abort(new Error(`probe timed out after ${ms}ms`)), ms);
209
+ signal?.addEventListener("abort", onAbort, { once: true });
210
+ // Keep the deadline alive even if a stalled runner has no referenced handles.
211
+ // Defer invocation so synchronous throws also clear the timer through this path.
212
+ Promise.resolve().then(() => {
213
+ controller.signal.throwIfAborted();
214
+ return op(controller.signal);
215
+ }).then((value) => {
216
+ cleanup();
217
+ resolve(value);
218
+ }, (error) => {
219
+ cleanup();
220
+ reject(error);
221
+ });
222
+ });
223
+ }
224
+ function probeErrorMessage(error) {
225
+ return redactText(error instanceof Error ? error.message : String(error)).value;
226
+ }
227
+ // ── The bounded authoring summary ──
228
+ const MAX_ENTRIES = 24;
229
+ const MAX_VALUE_LENGTH = 240;
230
+ // Deliberate classification by exact provider id, never a substring/name heuristic.
231
+ const OPENCODE_AGGREGATORS = new Set([
232
+ "openrouter", "opencode", "opencode-go", "huggingface", "amazon-bedrock", "github-copilot",
233
+ ]);
234
+ const MODEL_DISCOVERY_META = "@automatalabs/agentprism.modelDiscovery";
235
+ function boundedLabel(value) {
236
+ return value.length <= MAX_VALUE_LENGTH
237
+ ? value
238
+ : `${value.slice(0, MAX_VALUE_LENGTH)}… (${value.length - MAX_VALUE_LENGTH} characters omitted)`;
239
+ }
240
+ function display(value) {
241
+ return boundedLabel(redactText(value).value);
242
+ }
243
+ function providerOf(value) {
244
+ const slash = value.indexOf("/");
245
+ return slash > 0 ? value.slice(0, slash) : "(ungrouped)";
246
+ }
247
+ function providerFilter(provider) {
248
+ return provider === "(ungrouped)"
249
+ ? "/^[^/]+$/"
250
+ : `/^${provider.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}\\//`;
251
+ }
252
+ function preferences(value) {
253
+ if (!value || typeof value !== "object")
254
+ return undefined;
255
+ const meta = value;
256
+ if (meta.source !== "enabledModels" || !Array.isArray(meta.preferred) || !Array.isArray(meta.unmatched)) {
257
+ return undefined;
258
+ }
259
+ if (!meta.preferred.every((id) => typeof id === "string") || !meta.unmatched.every((id) => typeof id === "string")) {
260
+ return undefined;
261
+ }
262
+ return { preferred: meta.preferred, unmatched: meta.unmatched };
263
+ }
264
+ /** Compact live authoring guidance. Does not mutate or restrict the supported catalog.
265
+ * Lists are bounded per harness; omitted counts and exact expansion filters are explicit.
266
+ * Options such as effort remain authoritative only for the exact probed model. */
267
+ export function buildHarnessConfigSummary(report) {
268
+ return {
269
+ harnesses: report.harnessOptions.map((harness) => {
270
+ const entry = {
271
+ backendId: boundedLabel(harness.backendId),
272
+ ...(harness.model === undefined ? {} : { model: boundedLabel(harness.model) }),
273
+ probed: harness.probed,
274
+ ...(!harness.probed ? { error: display(harness.error ?? "unknown error") } : {}),
275
+ hasModelOption: false,
276
+ total: 0, models: [], omittedModels: 0, groups: [], omittedGroups: 0,
277
+ omittedGroupModels: 0, unmatched: [], omittedUnmatched: 0,
278
+ };
279
+ if (!harness.probed)
280
+ return entry;
281
+ const model = harness.options?.find((option) => option.id === "model" && option.type === "select");
282
+ if (!model || model.type !== "select")
283
+ return entry;
284
+ entry.hasModelOption = true;
285
+ const ids = selectChoicePairs(model).map(({ value }) => value);
286
+ entry.total = ids.length;
287
+ if (model.currentValue) {
288
+ const route = `${harness.backendId}/${model.currentValue}`;
289
+ if (route.length <= MAX_VALUE_LENGTH) {
290
+ entry.currentModel = model.currentValue;
291
+ if (ids.includes(model.currentValue) && !model.currentValue.includes("*"))
292
+ entry.currentRoute = route;
293
+ }
294
+ else
295
+ entry.omittedCurrentModel = true;
296
+ }
297
+ const groups = new Map();
298
+ for (const id of ids) {
299
+ const provider = providerOf(id);
300
+ groups.set(provider, (groups.get(provider) ?? 0) + 1);
301
+ }
302
+ const isAggregator = (provider) => harness.backendId === "opencode" && OPENCODE_AGGREGATORS.has(provider);
303
+ // Stable sorting preserves catalog provider order within each classification.
304
+ const orderedGroups = [...groups].sort(([a], [b]) => Number(isAggregator(a)) - Number(isAggregator(b)));
305
+ for (const [provider, count] of orderedGroups) {
306
+ if (entry.groups.length >= MAX_ENTRIES || provider.length > MAX_VALUE_LENGTH) {
307
+ entry.omittedGroups++;
308
+ entry.omittedGroupModels += count;
309
+ continue;
310
+ }
311
+ entry.groups.push({
312
+ provider, count,
313
+ kind: isAggregator(provider) ? "aggregator" : "provider",
314
+ ...(isAggregator(provider) ? { selector: `${provider}/*` } : {}),
315
+ modelFilter: providerFilter(provider),
316
+ });
317
+ }
318
+ const preferred = harness.backendId === "pi" ? preferences(model._meta?.[MODEL_DISCOVERY_META]) : undefined;
319
+ let candidates;
320
+ if (preferred) {
321
+ const available = new Set(ids);
322
+ candidates = [...new Set(preferred.preferred)].filter((id) => available.has(id));
323
+ entry.preferenceSource = "enabledModels";
324
+ entry.preferredTotal = candidates.length;
325
+ entry.unmatched = preferred.unmatched.slice(0, MAX_ENTRIES).map(display);
326
+ entry.omittedUnmatched = preferred.unmatched.length - entry.unmatched.length;
327
+ }
328
+ else if (harness.backendId === "pi") {
329
+ candidates = [];
330
+ }
331
+ else if (harness.backendId === "opencode") {
332
+ // When direct catalogs exceed the display bound, represent each configured
333
+ // direct provider before filling more rows from any one provider.
334
+ const direct = new Map();
335
+ for (const id of ids) {
336
+ const provider = providerOf(id);
337
+ if (isAggregator(provider))
338
+ continue;
339
+ const group = direct.get(provider) ?? [];
340
+ group.push(id);
341
+ direct.set(provider, group);
342
+ }
343
+ candidates = [];
344
+ for (let index = 0; [...direct.values()].some((values) => index < values.length); index++) {
345
+ for (const values of direct.values())
346
+ if (values[index] !== undefined)
347
+ candidates.push(values[index]);
348
+ }
349
+ }
350
+ else {
351
+ candidates = ids.filter((id) => !isAggregator(providerOf(id)));
352
+ }
353
+ for (const id of candidates) {
354
+ const route = `${harness.backendId}/${id}`;
355
+ if (entry.models.length >= MAX_ENTRIES || route.length > MAX_VALUE_LENGTH || id.includes("*"))
356
+ continue;
357
+ entry.models.push({ modelId: id, route });
358
+ }
359
+ entry.omittedModels = entry.total - entry.models.length;
360
+ return entry;
361
+ }),
362
+ };
363
+ }
364
+ /** Format the bounded summary for both explicit discovery and missing-route diagnostics. */
365
+ export function formatHarnessConfigSummary(summary) {
366
+ const lines = ["authoring model summary:"];
367
+ if (!summary.harnesses.length)
368
+ lines.push(" (no harnesses requested)");
369
+ for (const harness of summary.harnesses) {
370
+ const label = harness.model ?? harness.backendId;
371
+ if (!harness.probed) {
372
+ lines.push(` ${JSON.stringify(label)}: unavailable — ${JSON.stringify(harness.error)}`);
373
+ continue;
374
+ }
375
+ if (!harness.hasModelOption) {
376
+ lines.push(` ${JSON.stringify(label)}: no model option advertised`);
377
+ continue;
378
+ }
379
+ lines.push(` ${JSON.stringify(label)}: ${harness.total} supported model(s)`);
380
+ if (harness.currentModel !== undefined) {
381
+ lines.push(` current model: ${JSON.stringify(harness.currentRoute ?? harness.currentModel)}`);
382
+ }
383
+ if (harness.omittedCurrentModel)
384
+ lines.push(" current model omitted by summary length limit; inspect the model config option");
385
+ if (harness.preferenceSource) {
386
+ lines.push(` Pi enabledModels: ${harness.preferredTotal} available preferred model(s); presentation shortlist, not an execution allowlist`);
387
+ }
388
+ else if (harness.backendId === "pi") {
389
+ lines.push(" No enabledModels preference metadata; showing available provider groups");
390
+ }
391
+ for (const model of harness.models)
392
+ lines.push(` model: ${JSON.stringify(model.route)}`);
393
+ if (harness.omittedModels)
394
+ lines.push(` ${harness.omittedModels} supported model(s) not listed as exact routes here; expand with modelFilter`);
395
+ for (const group of harness.groups) {
396
+ lines.push(` ${group.kind === "aggregator" ? "browse only (not executable)" : "provider"}: ${JSON.stringify(group.selector ?? group.provider)} (${group.count} models); modelFilter: ${JSON.stringify(group.modelFilter)}`);
397
+ }
398
+ if (harness.omittedGroups)
399
+ lines.push(` ${harness.omittedGroups} provider group(s), ${harness.omittedGroupModels} models omitted by summary limits; use config modelFilter`);
400
+ if (harness.unmatched.length)
401
+ lines.push(` unmatched enabledModels patterns: ${harness.unmatched.map((value) => JSON.stringify(value)).join(", ")}`);
402
+ if (harness.omittedUnmatched)
403
+ lines.push(` ${harness.omittedUnmatched} additional unmatched enabledModels pattern(s) omitted by summary limits`);
404
+ }
405
+ lines.push(' Browse wildcards are not executable. Expand with config harnesses:["<backend>"], modelFilter:"<substring or /regex/>"; use an exact returned leaf route in agent(prompt, { model }).');
406
+ lines.push(' Default-model options do not describe every model. Probe config modelSpecs:["<exact route>"] before choosing mode/effort/configOptions. A backend-only model route explicitly selects its configured default.');
407
+ return lines.join("\n");
408
+ }
package/dist/index.d.ts CHANGED
@@ -1,4 +1,6 @@
1
1
  export { AcpAgentRunner, createAcpRunner, selectBackend } from "./runner.js";
2
+ export { resolveModelRoute } from "./routing.js";
3
+ export type { ModelRoute } from "./routing.js";
2
4
  export type { AcpRunnerOptions, AuthenticateOptions, AuthMethodsOptions, AuthCapableRunner, AuthController, AuthOutcome, AuthStatusSnapshot, CompleteAuthOptions, DisableProviderOptions, DeleteSessionOptions, ListProvidersOptions, ListSessionsOptions, LogoutOptions, ProviderCapableRunner, ProbedConfigOptions, ProbeConfigOptionsOptions, ReattachSessionOptions, SetProviderOptions, } from "./runner.js";
3
5
  export { buildAuthDescriptor, buildAuthDescriptors, isGatewayShapedMeta } from "./auth/auth-types.js";
4
6
  export type { AuthContext, AuthMethodDescriptor, AuthResolution, AuthResolver } from "./auth/auth-types.js";
@@ -11,14 +13,19 @@ export type { AuthProfile, TerminalLaunch } from "./auth/auth-profile.js";
11
13
  export { InteractiveSession } from "./interactive.js";
12
14
  export { LoadedTurnFailedError, LoadedTurnStillRunningError, isLoadedTurnFailedError, isLoadedTurnStillRunningError, } from "./interactive.js";
13
15
  export type { InteractiveSessionOptions, InteractiveTurn } from "./interactive.js";
16
+ export { AcpAgent } from "./agent/acp-agent.js";
17
+ export { isAcpAgentTurnError } from "./agent/errors.js";
18
+ export type { AcpAgentOptions, AcpAgentPromptOptions, AcpAgentSteerOptions, AcpAgentForkOptions, AcpAgentReopenOptions, AcpAgentCloseOptions, AcpAgentProbeOptions, AcpAgentCatalog, AcpAgentTurn, AcpAgentTurnError, AcpAgentToolCall, AcpAgentUpdateRecord, AcpAgentRawRecord, AcpAgentTurnUsage, AcpAgentEventMap, AcpAgentEventName, AcpAgentEventListener, AcpAgentState, } from "./agent/types.js";
14
19
  export { AGENT_METHODS, CLIENT_METHODS } from "@agentclientprotocol/sdk";
15
20
  export type { AgentNotificationMethod, AgentNotificationParamsByMethod, AgentAuthCapabilities, AgentRequestMethod, AgentRequestParamsByMethod, AgentRequestResponsesByMethod, AuthCapabilities, AuthenticateRequest, AuthenticateResponse, AuthMethod, AuthMethodAgent, AuthMethodId, AuthMethodTerminal, DisableProviderRequest, DisableProviderResponse, CompleteElicitationNotification, ConnectMcpRequest, ConnectMcpResponse, CreateElicitationRequest, CreateElicitationResponse, DeleteSessionRequest, DeleteSessionResponse, DisconnectMcpRequest, DisconnectMcpResponse, ElicitationAcceptAction, ElicitationCapabilities, ElicitationContentValue, ElicitationFormCapabilities, ElicitationFormMode, ElicitationId, ElicitationPropertySchema, ElicitationRequestScope, ElicitationSchema, ElicitationSchemaType, ElicitationSessionScope, ElicitationUrlCapabilities, ElicitationUrlMode, ForkSessionRequest, ForkSessionResponse, ListProvidersRequest, ListProvidersResponse, ListSessionsRequest, ListSessionsResponse, LlmProtocol, LoadSessionRequest, LoadSessionResponse, LogoutCapabilities, LogoutRequest, LogoutResponse, McpConnectionId, McpServerAcp, McpServerAcpId, MessageMcpNotification, MessageMcpRequest, MessageMcpResponse, PermissionOption, PermissionOptionId, PermissionOptionKind, RequestPermissionRequest, RequestPermissionResponse, ResumeSessionRequest, ResumeSessionResponse, ProviderCurrentConfig, ProviderId, ProviderInfo, ProvidersCapabilities, SessionMode, SessionModeState, SessionConfigOption, SessionInfo, SendRequestOptions, SetProviderRequest, SetProviderResponse, } from "@agentclientprotocol/sdk";
16
21
  export { BACKENDS_ENV, registryWithRunBackends, resolveBackendRegistry } from "./registry.js";
17
- export type { BackendRegistry, CustomBackendConfig, RegisteredBackend } from "./registry.js";
22
+ export type { BackendRegistry, CustomBackendConfig, CustomBackendForkConfig, RegisteredBackend } from "./registry.js";
23
+ export { probeHarnessConfig, buildHarnessModelsView, buildModelFilter, buildHarnessConfigSummary, formatHarnessConfigSummary, selectChoicePairs, summarizeSelectChoices, DEFAULT_PROBE_TIMEOUT_MS, } from "./config-catalog.js";
24
+ export type { ProbeHarnessConfigOptions, HarnessConfigReport, ValidateHarnessOptions, HarnessModelsView, HarnessConfigSummary, HarnessConfigSummaryEntry, HarnessConfigSummaryModel, HarnessConfigSummaryGroup, SelectChoiceGroup, SelectChoiceSummary, ValidateProbeRunner, } from "./config-catalog.js";
18
25
  export { CANCEL_NOT_HONORED_GRACE_MS, PI_CHILD_CLEANUP_DEADLINE_MS, PI_CLOSE_DELIVERY_MARGIN_MS, PI_CLOSE_SESSION_TIMEOUT_MS, PI_DISPOSE_SIGKILL_GRACE_MS, PI_PROCESS_EXIT_MARGIN_MS, PI_PROCESS_SHUTDOWN_ENVELOPE_MS, PooledConnection, SESSION_STEERING_METHOD, LOADED_TURN_QUERY_METHOD, LOADED_TURN_ENDED_METHOD, SessionHandle, isChildCleanupError, } from "./acp-client.js";
19
26
  export type { AcpSessionOptions, PooledConnectionDeps, SteeringRequest, SteeringResponse, LoadedTurnQueryRequest, LoadedTurnQueryResponse, LoadedTurnEndedNotification, LoadedTurnStatus, } from "./acp-client.js";
20
- export { AGENT_METHOD_COVERAGE, ACP_EXTENSION_SUPPORT_MATRIX, ACP_AUTH_REQUIRED_CODE_EXCLUSIVE, AUTH_CAPABILITY_KEYS, AUTH_META_CONVENTION_KEYS, AUTH_META_MATRIX, CLIENT_METHOD_COVERAGE, CODEX_SPAWN_AUTH_ENV, HANDLED_AUTH_METHOD_TYPES, PI_ACP_PROTOCOL_CONTRACT, BUILTIN_PROTOCOL_COVERAGE, assertAuthCapabilityShape, } from "./protocol-coverage.js";
21
- export type { AgentMethodCoverage, AcpExtensionSupportMatrixRow, AuthMetaMatrixRow, BuiltinProtocolCoverageRow, ClientMethodCoverage, } from "./protocol-coverage.js";
27
+ export { AGENT_METHOD_COVERAGE, ACP_EXTENSION_SUPPORT_MATRIX, ACP_AUTH_REQUIRED_CODE_EXCLUSIVE, AUTH_CAPABILITY_KEYS, AUTH_META_CONVENTION_KEYS, AUTH_META_MATRIX, CLIENT_METHOD_COVERAGE, CODEX_SPAWN_AUTH_ENV, HANDLED_AUTH_METHOD_TYPES, PI_ACP_PROTOCOL_CONTRACT, BUILTIN_PROTOCOL_COVERAGE, FORK_SESSION_TRAITS, FORK_SESSION_TRAIT_DEFAULT, PROMPT_USAGE_SCOPES, assertAuthCapabilityShape, forkSessionTrait, promptUsageScope, } from "./protocol-coverage.js";
28
+ export type { AgentMethodCoverage, AcpExtensionSupportMatrixRow, AuthMetaMatrixRow, BuiltinProtocolCoverageRow, ClientMethodCoverage, ForkSessionTraitRow, PromptUsageScopeRow, } from "./protocol-coverage.js";
22
29
  export { adaptPromptContent, isSupportedProtocolVersion, negotiateCapabilities, unsupportedMcpServer, } from "./capabilities.js";
23
30
  export type { NegotiatedCapabilities } from "./capabilities.js";
24
31
  export { AcpAgentPool, resolvePoolSize } from "./pool.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC7E,YAAY,EACV,gBAAgB,EAChB,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EACjB,cAAc,EACd,WAAW,EACX,kBAAkB,EAClB,mBAAmB,EACnB,sBAAsB,EACtB,oBAAoB,EACpB,oBAAoB,EACpB,mBAAmB,EACnB,aAAa,EACb,qBAAqB,EACrB,mBAAmB,EACnB,yBAAyB,EACzB,sBAAsB,EACtB,kBAAkB,GACnB,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AACtG,YAAY,EAAE,WAAW,EAAE,oBAAoB,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAC5G,OAAO,EACL,SAAS,EACT,kBAAkB,EAClB,kBAAkB,EAClB,aAAa,GACd,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EACV,SAAS,EACT,UAAU,EACV,cAAc,EACd,gBAAgB,EAChB,m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gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,uBAAuB,EACvB,aAAa,GACd,MAAM,wBAAwB,CAAC;AAChC,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhF,OAAO,EAAE,4BAA4B,EAAE,SAAS,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAClH,YAAY,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAKvD,OAAO,EACL,uCAAuC,EACvC,uBAAuB,EACvB,6BAA6B,GAC9B,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EACV,mBAAmB,EACnB,yBAAyB,EACzB,2BAA2B,EAC3B,2BAA2B,GAC5B,MAAM,qBAAqB,CAAC"}
package/dist/index.js CHANGED
@@ -5,6 +5,9 @@
5
5
  // @automatalabs/workflow-engine; the two siblings meet ONLY at AgentRunner, injected by the
6
6
  // @automatalabs/workflows facade (which mcp-server builds on) via createAcpRunner().
7
7
  export { AcpAgentRunner, createAcpRunner, selectBackend } from "./runner.js";
8
+ // The full route (backend + stripped model value) behind selectBackend; `asciiLowercase`,
9
+ // `assertNoModelConfigOption` (routing.ts) and `sessionRefFor` (session-ref.ts) stay module-internal.
10
+ export { resolveModelRoute } from "./routing.js";
8
11
  // Type-driven auth contracts (§1.3) and the AuthStore lifecycle spine (§2).
9
12
  export { buildAuthDescriptor, buildAuthDescriptors, isGatewayShapedMeta } from "./auth/auth-types.js";
10
13
  export { AuthStore, BackendAuthMachine, classifyCredential, redactSecrets, } from "./auth/auth-store.js";
@@ -16,11 +19,17 @@ export { ProviderStore } from "./provider-store.js";
16
19
  export { claudeAuthProfile, codexAuthProfile, opencodeAuthProfile, piAuthProfile } from "./auth/auth-profiles.js";
17
20
  export { InteractiveSession } from "./interactive.js";
18
21
  export { LoadedTurnFailedError, LoadedTurnStillRunningError, isLoadedTurnFailedError, isLoadedTurnStillRunningError, } from "./interactive.js";
22
+ // The SDK-style AcpAgent front door (src/agent/): one dedicated ACP process per agent, FIFO turns,
23
+ // live forks, cold reopen from a session ref, and the no-prompt catalog probe.
24
+ export { AcpAgent } from "./agent/acp-agent.js";
25
+ export { isAcpAgentTurnError } from "./agent/errors.js";
19
26
  export { AGENT_METHODS, CLIENT_METHODS } from "@agentclientprotocol/sdk";
20
27
  // The custom-backend registry: run ANY ACP agent as an agent() target.
21
28
  export { BACKENDS_ENV, registryWithRunBackends, resolveBackendRegistry } from "./registry.js";
29
+ // Harness config catalog discovery (moved here from @automatalabs/workflows; the facade re-exports it).
30
+ export { probeHarnessConfig, buildHarnessModelsView, buildModelFilter, buildHarnessConfigSummary, formatHarnessConfigSummary, selectChoicePairs, summarizeSelectChoices, DEFAULT_PROBE_TIMEOUT_MS, } from "./config-catalog.js";
22
31
  export { CANCEL_NOT_HONORED_GRACE_MS, PI_CHILD_CLEANUP_DEADLINE_MS, PI_CLOSE_DELIVERY_MARGIN_MS, PI_CLOSE_SESSION_TIMEOUT_MS, PI_DISPOSE_SIGKILL_GRACE_MS, PI_PROCESS_EXIT_MARGIN_MS, PI_PROCESS_SHUTDOWN_ENVELOPE_MS, PooledConnection, SESSION_STEERING_METHOD, LOADED_TURN_QUERY_METHOD, LOADED_TURN_ENDED_METHOD, SessionHandle, isChildCleanupError, } from "./acp-client.js";
23
- export { AGENT_METHOD_COVERAGE, ACP_EXTENSION_SUPPORT_MATRIX, ACP_AUTH_REQUIRED_CODE_EXCLUSIVE, AUTH_CAPABILITY_KEYS, AUTH_META_CONVENTION_KEYS, AUTH_META_MATRIX, CLIENT_METHOD_COVERAGE, CODEX_SPAWN_AUTH_ENV, HANDLED_AUTH_METHOD_TYPES, PI_ACP_PROTOCOL_CONTRACT, BUILTIN_PROTOCOL_COVERAGE, assertAuthCapabilityShape, } from "./protocol-coverage.js";
32
+ export { AGENT_METHOD_COVERAGE, ACP_EXTENSION_SUPPORT_MATRIX, ACP_AUTH_REQUIRED_CODE_EXCLUSIVE, AUTH_CAPABILITY_KEYS, AUTH_META_CONVENTION_KEYS, AUTH_META_MATRIX, CLIENT_METHOD_COVERAGE, CODEX_SPAWN_AUTH_ENV, HANDLED_AUTH_METHOD_TYPES, PI_ACP_PROTOCOL_CONTRACT, BUILTIN_PROTOCOL_COVERAGE, FORK_SESSION_TRAITS, FORK_SESSION_TRAIT_DEFAULT, PROMPT_USAGE_SCOPES, assertAuthCapabilityShape, forkSessionTrait, promptUsageScope, } from "./protocol-coverage.js";
24
33
  // ACP standard capability negotiation. Vendor initialize metadata stays raw for extension owners.
25
34
  export { adaptPromptContent, isSupportedProtocolVersion, negotiateCapabilities, unsupportedMcpServer, } from "./capabilities.js";
26
35
  export { AcpAgentPool, resolvePoolSize } from "./pool.js";
@@ -122,6 +122,58 @@ export interface AcpExtensionSupportMatrixRow {
122
122
  /** Built-in support for non-standard agent request methods. Kept separate from
123
123
  * AGENT_METHOD_COVERAGE so a vendor extension is never counted as a standard ACP method. */
124
124
  export declare const ACP_EXTENSION_SUPPORT_MATRIX: readonly AcpExtensionSupportMatrixRow[];
125
+ /** How each installed agent answers `session/fork`, read from its adapter source, and what the
126
+ * AcpAgent SDK must do with the response. `id-only`: the response names a persisted copy that
127
+ * is not live — claude-agent-acp returns `{ sessionId }` from `dist/fork-session.js` and `prompt`
128
+ * on it throws "Session not found"; codex-acp installs state but unsubscribes the thread
129
+ * (`threadUnsubscribe`) and publishes no updates until resume/load. `live`: the fork handle is
130
+ * the session (pi constructs it in-process; OpenCode by live verification only). `reattach`
131
+ * names the reopen an `id-only` fork needs before its first turn. `cwd`: whether the fork may
132
+ * re-home — claude's transcript store is keyed by the source cwd. Data for the SDK's fork
133
+ * choreography; the runner's `forkSession()` returns the raw fork handle and never consults it. */
134
+ export interface ForkSessionTraitRow {
135
+ readonly agent: string;
136
+ readonly disposition: "id-only" | "live";
137
+ readonly reattach: "resume-or-load" | "none";
138
+ readonly cwd: "source-only" | "free";
139
+ /** Installed distributions whose fork implementation is probed by the protocol coverage
140
+ * suite (opencode ships a compiled binary; grounded by live-e2e only). */
141
+ readonly distProbe?: "claude" | "codex" | "pi";
142
+ }
143
+ /** Per-built-in `session/fork` dispositions. Pinned against the installed adapter dists by the
144
+ * protocol coverage suite and against the public docs by the docs-drift suite. */
145
+ export declare const FORK_SESSION_TRAITS: readonly ForkSessionTraitRow[];
146
+ /** Unknown agents: a fork response is treated as live (the ACP contract), cwd free. */
147
+ export declare const FORK_SESSION_TRAIT_DEFAULT: ForkSessionTraitRow;
148
+ /** The built-in row for `agent`, or — when `declared` is given (a custom registry entry's `fork`
149
+ * field, `CustomBackendConfig.fork`) — the row the declaration describes. A declaration always
150
+ * wins over the name: a custom entry named `claude` is a different program from the built-in and
151
+ * never inherits its row. An undeclared unknown agent gets `FORK_SESSION_TRAIT_DEFAULT`. */
152
+ export declare function forkSessionTrait(agent: string, declared?: {
153
+ readonly disposition: ForkSessionTraitRow["disposition"];
154
+ readonly cwd?: ForkSessionTraitRow["cwd"];
155
+ }): ForkSessionTraitRow;
156
+ /** What `PromptResponse.usage` covers on each installed agent, read from its adapter source.
157
+ * Every source-verified agent reports THE TURN (the SDK's own type doc says "across session";
158
+ * the adapters do not follow it): claude-agent-acp resets its accumulator at every turn
159
+ * activation, codex-acp reports the turn's last token count, pi sums the assistant messages
160
+ * after the turn's start index. A session total is therefore the client's own running sum of
161
+ * per-turn reports. OpenCode ships a compiled binary: `turn` by live verification and by the
162
+ * client's existing per-turn accumulator contract (`usage.ts` `recordPromptUsage` replaces,
163
+ * never sums) only. The `scope` union has one member on purpose: exactly one arithmetic is
164
+ * implemented, and a second member needs a live proof before it exists. */
165
+ export interface PromptUsageScopeRow {
166
+ readonly agent: string;
167
+ readonly scope: "turn";
168
+ /** Installed distributions whose usage reporting is probed by the protocol coverage suite. */
169
+ readonly distProbe?: "claude" | "codex" | "pi";
170
+ }
171
+ /** Per-built-in `PromptResponse.usage` scope. Pinned against the installed adapter dists so an
172
+ * adapter that starts reporting cumulative usage fails the build instead of silently doubling
173
+ * a client-side session sum. */
174
+ export declare const PROMPT_USAGE_SCOPES: readonly PromptUsageScopeRow[];
175
+ /** The usage scope `agent` reports on `session/prompt`; custom agents follow the ACP-client contract. */
176
+ export declare function promptUsageScope(agent: string): PromptUsageScopeRow["scope"];
125
177
  /** One built-in's reference to universal ACP classifications and backend-specific live evidence. */
126
178
  export interface BuiltinProtocolCoverageRow {
127
179
  readonly clientMethods: Readonly<Record<string, ClientMethodCoverage>>;
@@ -130,6 +182,10 @@ export interface BuiltinProtocolCoverageRow {
130
182
  readonly extensions: readonly AcpExtensionSupportMatrixRow[];
131
183
  readonly installedDistProbes: readonly string[];
132
184
  readonly liveProbes: readonly string[];
185
+ /** This built-in's `session/fork` disposition (the same frozen `FORK_SESSION_TRAITS` row). */
186
+ readonly fork: ForkSessionTraitRow;
187
+ /** This built-in's `PromptResponse.usage` scope (the same frozen `PROMPT_USAGE_SCOPES` row). */
188
+ readonly promptUsage: PromptUsageScopeRow;
133
189
  }
134
190
  /** Central backend dispositions. Registry tests enforce exact key and reference parity. */
135
191
  export declare const BUILTIN_PROTOCOL_COVERAGE: Readonly<{
@@ -1 +1 @@
1
- {"version":3,"file":"protocol-coverage.d.ts","sourceRoot":"","sources":["../src/protocol-coverage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AACzE,OAAO,KAAK,EACV,gBAAgB,EAChB,UAAU,EACV,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EACnB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAEpF,KAAK,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAC7B,KAAK,YAAY,GAAG,OAAO,CAAC,OAAO,cAAc,CAAC,CAAC;AACnD,KAAK,WAAW,GAAG,OAAO,CAAC,OAAO,aAAa,CAAC,CAAC;AAEjD,MAAM,MAAM,oBAAoB,G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