@maycombhq/sdk 2.0.0-beta.12.1 → 2.0.0-beta.13
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/npm/core/api.d.ts +29 -4
- package/npm/core/facts-join.d.ts +2 -1
- package/npm/core/merge.d.ts +2 -0
- package/npm/core/orgpack-defaults.d.ts +9 -3
- package/npm/core/runtime-migrate.d.ts +9 -0
- package/npm/core/schema/ai.d.ts +36 -9
- package/npm/core/schema/orgpack.d.ts +41 -2
- package/npm/index.js +57 -9
- package/package.json +1 -1
package/npm/core/api.d.ts
CHANGED
|
@@ -1348,7 +1348,7 @@ export declare const Task: z.ZodObject<{
|
|
|
1348
1348
|
run: z.ZodOptional<z.ZodString>;
|
|
1349
1349
|
}, z.core.$strip>;
|
|
1350
1350
|
export declare const RunView: z.ZodObject<{
|
|
1351
|
-
schemaVersion: z.ZodLiteral<
|
|
1351
|
+
schemaVersion: z.ZodLiteral<5>;
|
|
1352
1352
|
runId: z.ZodString;
|
|
1353
1353
|
change: z.ZodString;
|
|
1354
1354
|
agent: z.ZodString;
|
|
@@ -1356,6 +1356,7 @@ export declare const RunView: z.ZodObject<{
|
|
|
1356
1356
|
model: "model";
|
|
1357
1357
|
"hand-off": "hand-off";
|
|
1358
1358
|
"headless-claude-code": "headless-claude-code";
|
|
1359
|
+
"copilot-acp": "copilot-acp";
|
|
1359
1360
|
mock: "mock";
|
|
1360
1361
|
replay: "replay";
|
|
1361
1362
|
}>;
|
|
@@ -1424,12 +1425,17 @@ export declare const RunView: z.ZodObject<{
|
|
|
1424
1425
|
quick: "quick";
|
|
1425
1426
|
}>>;
|
|
1426
1427
|
model: z.ZodOptional<z.ZodString>;
|
|
1428
|
+
assistant: z.ZodOptional<z.ZodObject<{
|
|
1429
|
+
name: z.ZodString;
|
|
1430
|
+
version: z.ZodOptional<z.ZodString>;
|
|
1431
|
+
protocolVersion: z.ZodOptional<z.ZodNumber>;
|
|
1432
|
+
}, z.core.$strict>>;
|
|
1427
1433
|
promptPath: z.ZodOptional<z.ZodString>;
|
|
1428
1434
|
workspaceFile: z.ZodOptional<z.ZodString>;
|
|
1429
1435
|
}, z.core.$strict>;
|
|
1430
1436
|
/** ADR 0106: one run in the list of model runs. */
|
|
1431
1437
|
export declare const RunListItem: z.ZodObject<{
|
|
1432
|
-
schemaVersion: z.ZodLiteral<
|
|
1438
|
+
schemaVersion: z.ZodLiteral<5>;
|
|
1433
1439
|
runId: z.ZodString;
|
|
1434
1440
|
change: z.ZodString;
|
|
1435
1441
|
agent: z.ZodString;
|
|
@@ -1437,6 +1443,7 @@ export declare const RunListItem: z.ZodObject<{
|
|
|
1437
1443
|
model: "model";
|
|
1438
1444
|
"hand-off": "hand-off";
|
|
1439
1445
|
"headless-claude-code": "headless-claude-code";
|
|
1446
|
+
"copilot-acp": "copilot-acp";
|
|
1440
1447
|
mock: "mock";
|
|
1441
1448
|
replay: "replay";
|
|
1442
1449
|
}>;
|
|
@@ -1504,6 +1511,11 @@ export declare const RunListItem: z.ZodObject<{
|
|
|
1504
1511
|
quick: "quick";
|
|
1505
1512
|
}>>;
|
|
1506
1513
|
model: z.ZodOptional<z.ZodString>;
|
|
1514
|
+
assistant: z.ZodOptional<z.ZodObject<{
|
|
1515
|
+
name: z.ZodString;
|
|
1516
|
+
version: z.ZodOptional<z.ZodString>;
|
|
1517
|
+
protocolVersion: z.ZodOptional<z.ZodNumber>;
|
|
1518
|
+
}, z.core.$strict>>;
|
|
1507
1519
|
promptPath: z.ZodOptional<z.ZodString>;
|
|
1508
1520
|
workspaceFile: z.ZodOptional<z.ZodString>;
|
|
1509
1521
|
attempt: z.ZodNumber;
|
|
@@ -1520,7 +1532,7 @@ export declare const StartStepRequest: z.ZodObject<{
|
|
|
1520
1532
|
export type StartStepRequest = z.infer<typeof StartStepRequest>;
|
|
1521
1533
|
export declare const RunList: z.ZodObject<{
|
|
1522
1534
|
runs: z.ZodArray<z.ZodObject<{
|
|
1523
|
-
schemaVersion: z.ZodLiteral<
|
|
1535
|
+
schemaVersion: z.ZodLiteral<5>;
|
|
1524
1536
|
runId: z.ZodString;
|
|
1525
1537
|
change: z.ZodString;
|
|
1526
1538
|
agent: z.ZodString;
|
|
@@ -1528,6 +1540,7 @@ export declare const RunList: z.ZodObject<{
|
|
|
1528
1540
|
model: "model";
|
|
1529
1541
|
"hand-off": "hand-off";
|
|
1530
1542
|
"headless-claude-code": "headless-claude-code";
|
|
1543
|
+
"copilot-acp": "copilot-acp";
|
|
1531
1544
|
mock: "mock";
|
|
1532
1545
|
replay: "replay";
|
|
1533
1546
|
}>;
|
|
@@ -1595,6 +1608,11 @@ export declare const RunList: z.ZodObject<{
|
|
|
1595
1608
|
quick: "quick";
|
|
1596
1609
|
}>>;
|
|
1597
1610
|
model: z.ZodOptional<z.ZodString>;
|
|
1611
|
+
assistant: z.ZodOptional<z.ZodObject<{
|
|
1612
|
+
name: z.ZodString;
|
|
1613
|
+
version: z.ZodOptional<z.ZodString>;
|
|
1614
|
+
protocolVersion: z.ZodOptional<z.ZodNumber>;
|
|
1615
|
+
}, z.core.$strict>>;
|
|
1598
1616
|
promptPath: z.ZodOptional<z.ZodString>;
|
|
1599
1617
|
workspaceFile: z.ZodOptional<z.ZodString>;
|
|
1600
1618
|
attempt: z.ZodNumber;
|
|
@@ -1609,7 +1627,7 @@ export type RunList = z.infer<typeof RunList>;
|
|
|
1609
1627
|
/** ADR 0106: what one run was asked and answered, and what the checks handed back to it. */
|
|
1610
1628
|
export declare const RunTranscript: z.ZodObject<{
|
|
1611
1629
|
run: z.ZodObject<{
|
|
1612
|
-
schemaVersion: z.ZodLiteral<
|
|
1630
|
+
schemaVersion: z.ZodLiteral<5>;
|
|
1613
1631
|
runId: z.ZodString;
|
|
1614
1632
|
change: z.ZodString;
|
|
1615
1633
|
agent: z.ZodString;
|
|
@@ -1617,6 +1635,7 @@ export declare const RunTranscript: z.ZodObject<{
|
|
|
1617
1635
|
model: "model";
|
|
1618
1636
|
"hand-off": "hand-off";
|
|
1619
1637
|
"headless-claude-code": "headless-claude-code";
|
|
1638
|
+
"copilot-acp": "copilot-acp";
|
|
1620
1639
|
mock: "mock";
|
|
1621
1640
|
replay: "replay";
|
|
1622
1641
|
}>;
|
|
@@ -1684,6 +1703,11 @@ export declare const RunTranscript: z.ZodObject<{
|
|
|
1684
1703
|
quick: "quick";
|
|
1685
1704
|
}>>;
|
|
1686
1705
|
model: z.ZodOptional<z.ZodString>;
|
|
1706
|
+
assistant: z.ZodOptional<z.ZodObject<{
|
|
1707
|
+
name: z.ZodString;
|
|
1708
|
+
version: z.ZodOptional<z.ZodString>;
|
|
1709
|
+
protocolVersion: z.ZodOptional<z.ZodNumber>;
|
|
1710
|
+
}, z.core.$strict>>;
|
|
1687
1711
|
promptPath: z.ZodOptional<z.ZodString>;
|
|
1688
1712
|
workspaceFile: z.ZodOptional<z.ZodString>;
|
|
1689
1713
|
attempt: z.ZodNumber;
|
|
@@ -6353,6 +6377,7 @@ export declare const StartRunRequest: z.ZodObject<{
|
|
|
6353
6377
|
model: "model";
|
|
6354
6378
|
"hand-off": "hand-off";
|
|
6355
6379
|
"headless-claude-code": "headless-claude-code";
|
|
6380
|
+
"copilot-acp": "copilot-acp";
|
|
6356
6381
|
mock: "mock";
|
|
6357
6382
|
replay: "replay";
|
|
6358
6383
|
}>>;
|
package/npm/core/facts-join.d.ts
CHANGED
|
@@ -440,7 +440,8 @@ export declare function gatewayCycleQuestion(f: Call, component: string, gateway
|
|
|
440
440
|
export declare function callHostOf(f: Call, repoFacts: readonly Fact[]): string | undefined;
|
|
441
441
|
/**
|
|
442
442
|
* J0: a config placeholder: `${X}` or Spring's `${X:default}` anywhere in a value (a URL may be
|
|
443
|
-
* written around it, `https://${HOST}/v2`),
|
|
443
|
+
* written around it, `https://${HOST}/v2`), `env:X` as the whole value, or a build or deploy
|
|
444
|
+
* token `@X@` (Maven filtering, a gateway bundle's token replace from CI properties). With two in one value
|
|
444
445
|
* (`${SCHEME}://${HOST}/v1`) this is the first, the rest left in `after`.
|
|
445
446
|
*/
|
|
446
447
|
export declare function placeholderIn(s: string | undefined): {
|
package/npm/core/merge.d.ts
CHANGED
|
@@ -78,6 +78,8 @@ export interface MergeResult {
|
|
|
78
78
|
/** Things worth knowing that aren't wrong, e.g. hosts that look like a gateway nobody declared. */
|
|
79
79
|
notes: string[];
|
|
80
80
|
}
|
|
81
|
+
/** A record id cut to fit: its start, then a hash of the whole id, the same for the same id. */
|
|
82
|
+
export declare const fitRecordId: (id: string) => string;
|
|
81
83
|
/** Canonical REST endpoint id: <component>.<method>-<last fixed path segment, singular>. */
|
|
82
84
|
export declare function endpointId(component: string, method: string | undefined, normalizedPath: string): string;
|
|
83
85
|
export declare function mergeCatalog(input: MergeInput): MergeResult;
|
|
@@ -57,7 +57,7 @@ export declare const DEFAULT_ROLES: {
|
|
|
57
57
|
}[];
|
|
58
58
|
};
|
|
59
59
|
export declare const DEFAULT_RUNTIME: {
|
|
60
|
-
schemaVersion: 1 | 2;
|
|
60
|
+
schemaVersion: 1 | 2 | 3;
|
|
61
61
|
assistants: {
|
|
62
62
|
allowed: ("copilot" | "claude-code" | "cursor" | "gemini-cli" | "windsurf" | "agents-md")[];
|
|
63
63
|
default: "copilot" | "claude-code" | "cursor" | "gemini-cli" | "windsurf" | "agents-md";
|
|
@@ -65,8 +65,8 @@ export declare const DEFAULT_RUNTIME: {
|
|
|
65
65
|
editors: ("vscode" | "intellij")[];
|
|
66
66
|
ai: "on" | "text-only" | "off";
|
|
67
67
|
modes: {
|
|
68
|
-
allowed: ("model" | "hand-off" | "headless-claude-code")[];
|
|
69
|
-
default: "model" | "hand-off" | "headless-claude-code";
|
|
68
|
+
allowed: ("model" | "hand-off" | "headless-claude-code" | "copilot-acp")[];
|
|
69
|
+
default: "model" | "hand-off" | "headless-claude-code" | "copilot-acp";
|
|
70
70
|
};
|
|
71
71
|
models: {
|
|
72
72
|
allowed: string[];
|
|
@@ -133,6 +133,12 @@ export declare const DEFAULT_RUNTIME: {
|
|
|
133
133
|
expansion: boolean;
|
|
134
134
|
rerank: boolean;
|
|
135
135
|
} | undefined;
|
|
136
|
+
copilotAcp?: {
|
|
137
|
+
command?: string | undefined;
|
|
138
|
+
model?: string | undefined;
|
|
139
|
+
maxTurns?: number | undefined;
|
|
140
|
+
timeoutMs?: number | undefined;
|
|
141
|
+
} | undefined;
|
|
136
142
|
buildEngine?: {
|
|
137
143
|
default: "atticus" | "speckit";
|
|
138
144
|
perRepo: Record<string, "atticus" | "speckit">;
|
|
@@ -9,3 +9,12 @@ export declare function migrateRuntimeText(text: string): {
|
|
|
9
9
|
text: string;
|
|
10
10
|
changed: boolean;
|
|
11
11
|
};
|
|
12
|
+
/**
|
|
13
|
+
* runtime.yaml to version 3 (ADR 0171), for a file that names copilot-acp (a mode, or the
|
|
14
|
+
* copilotAcp section): the number only, every other line as the person wrote it. A file that
|
|
15
|
+
* doesn't name it means the same at version 1 or 2, so it is left as it is.
|
|
16
|
+
*/
|
|
17
|
+
export declare function migrateRuntimeV3Text(text: string): {
|
|
18
|
+
text: string;
|
|
19
|
+
changed: boolean;
|
|
20
|
+
};
|
package/npm/core/schema/ai.d.ts
CHANGED
|
@@ -4,10 +4,12 @@ import { z } from "zod";
|
|
|
4
4
|
* context-pack manifests and run summaries are written per run. See ADR 0014.
|
|
5
5
|
*/
|
|
6
6
|
export declare const AI_SCHEMA_VERSION: 1;
|
|
7
|
+
/** ADR 0171 adds copilot-acp: GitHub Copilot driven unattended through its Agent Client Protocol. */
|
|
7
8
|
export declare const RuntimeKind: z.ZodEnum<{
|
|
8
9
|
model: "model";
|
|
9
10
|
"hand-off": "hand-off";
|
|
10
11
|
"headless-claude-code": "headless-claude-code";
|
|
12
|
+
"copilot-acp": "copilot-acp";
|
|
11
13
|
mock: "mock";
|
|
12
14
|
replay: "replay";
|
|
13
15
|
}>;
|
|
@@ -93,6 +95,7 @@ export declare const AgentDefinition: z.ZodObject<{
|
|
|
93
95
|
model: "model";
|
|
94
96
|
"hand-off": "hand-off";
|
|
95
97
|
"headless-claude-code": "headless-claude-code";
|
|
98
|
+
"copilot-acp": "copilot-acp";
|
|
96
99
|
mock: "mock";
|
|
97
100
|
replay: "replay";
|
|
98
101
|
}>>;
|
|
@@ -164,10 +167,23 @@ export type RunState = z.infer<typeof RunState>;
|
|
|
164
167
|
/**
|
|
165
168
|
* The run record's own version: 2 adds the tools a run's model called (ADR 0107 addendum); 3 how
|
|
166
169
|
* its context was retrieved (ADR 0116): the model's expansion of the input and its order of the
|
|
167
|
-
* candidates; 4 the step's class and the model that ran it (ADR 0121 addendum, per-step models)
|
|
168
|
-
*
|
|
170
|
+
* candidates; 4 the step's class and the model that ran it (ADR 0121 addendum, per-step models);
|
|
171
|
+
* 5 the assistant program that ran it and its version (ADR 0171: the Copilot language server a
|
|
172
|
+
* copilot-acp run talked to). A version 1 to 4 record is read through `migrateRunSummary`,
|
|
173
|
+
* without what came later.
|
|
169
174
|
*/
|
|
170
|
-
export declare const RUN_SCHEMA_VERSION:
|
|
175
|
+
export declare const RUN_SCHEMA_VERSION: 5;
|
|
176
|
+
/**
|
|
177
|
+
* The assistant program a run talked to (version 5, ADR 0171), as it named itself: the agent's
|
|
178
|
+
* name and version from the Agent Client Protocol's initialize answer, the protocol version both
|
|
179
|
+
* sides agreed, and the version `<command> --version` printed. Data, never instructions.
|
|
180
|
+
*/
|
|
181
|
+
export declare const RunAssistant: z.ZodObject<{
|
|
182
|
+
name: z.ZodString;
|
|
183
|
+
version: z.ZodOptional<z.ZodString>;
|
|
184
|
+
protocolVersion: z.ZodOptional<z.ZodNumber>;
|
|
185
|
+
}, z.core.$strict>;
|
|
186
|
+
export type RunAssistant = z.infer<typeof RunAssistant>;
|
|
171
187
|
/**
|
|
172
188
|
* How a run's context was retrieved (ADR 0116), when a model helped: what it read the input as
|
|
173
189
|
* (search terms, the names it found, each mapped to an id the index has or said new, with the
|
|
@@ -237,7 +253,7 @@ export declare const RunTools: z.ZodObject<{
|
|
|
237
253
|
export type RunTools = z.infer<typeof RunTools>;
|
|
238
254
|
/** What goes into review/ for every run; full packs and transcripts stay in git-ignored .runs/. */
|
|
239
255
|
export declare const RunSummary: z.ZodObject<{
|
|
240
|
-
schemaVersion: z.ZodLiteral<
|
|
256
|
+
schemaVersion: z.ZodLiteral<5>;
|
|
241
257
|
runId: z.ZodString;
|
|
242
258
|
change: z.ZodString;
|
|
243
259
|
agent: z.ZodString;
|
|
@@ -245,6 +261,7 @@ export declare const RunSummary: z.ZodObject<{
|
|
|
245
261
|
model: "model";
|
|
246
262
|
"hand-off": "hand-off";
|
|
247
263
|
"headless-claude-code": "headless-claude-code";
|
|
264
|
+
"copilot-acp": "copilot-acp";
|
|
248
265
|
mock: "mock";
|
|
249
266
|
replay: "replay";
|
|
250
267
|
}>;
|
|
@@ -313,21 +330,26 @@ export declare const RunSummary: z.ZodObject<{
|
|
|
313
330
|
quick: "quick";
|
|
314
331
|
}>>;
|
|
315
332
|
model: z.ZodOptional<z.ZodString>;
|
|
333
|
+
assistant: z.ZodOptional<z.ZodObject<{
|
|
334
|
+
name: z.ZodString;
|
|
335
|
+
version: z.ZodOptional<z.ZodString>;
|
|
336
|
+
protocolVersion: z.ZodOptional<z.ZodNumber>;
|
|
337
|
+
}, z.core.$strict>>;
|
|
316
338
|
}, z.core.$strict>;
|
|
317
339
|
export type RunSummary = z.infer<typeof RunSummary>;
|
|
318
340
|
/**
|
|
319
|
-
* A stored run record at the current version: version 1 (before tools), 2 (before retrieval)
|
|
320
|
-
*
|
|
321
|
-
* returned as it is, for the schema to judge.
|
|
341
|
+
* A stored run record at the current version: version 1 (before tools), 2 (before retrieval), 3
|
|
342
|
+
* (before the step's class and model) and 4 (before the assistant program, ADR 0171) read as
|
|
343
|
+
* version 5 without them; anything else is returned as it is, for the schema to judge.
|
|
322
344
|
*/
|
|
323
345
|
export declare function migrateRunSummary(raw: unknown): unknown;
|
|
324
346
|
/** Read a stored run record of any version (ADR 0107 addendum). */
|
|
325
347
|
export declare const readRunSummary: (raw: unknown) => z.ZodSafeParseResult<{
|
|
326
|
-
schemaVersion:
|
|
348
|
+
schemaVersion: 5;
|
|
327
349
|
runId: string;
|
|
328
350
|
change: string;
|
|
329
351
|
agent: string;
|
|
330
|
-
runtime: "model" | "hand-off" | "headless-claude-code" | "mock" | "replay";
|
|
352
|
+
runtime: "model" | "hand-off" | "headless-claude-code" | "copilot-acp" | "mock" | "replay";
|
|
331
353
|
state: "failed" | "prepared" | "waiting" | "produced" | "validated" | "cancelled";
|
|
332
354
|
startedAt: string;
|
|
333
355
|
contextManifestSha256: string;
|
|
@@ -380,6 +402,11 @@ export declare const readRunSummary: (raw: unknown) => z.ZodSafeParseResult<{
|
|
|
380
402
|
} | undefined;
|
|
381
403
|
stepClass?: "read" | "draft" | "critic" | "knowledge" | "quick" | undefined;
|
|
382
404
|
model?: string | undefined;
|
|
405
|
+
assistant?: {
|
|
406
|
+
name: string;
|
|
407
|
+
version?: string | undefined;
|
|
408
|
+
protocolVersion?: number | undefined;
|
|
409
|
+
} | undefined;
|
|
383
410
|
}>;
|
|
384
411
|
/** A recorded model output for the replay runtime, keyed by agent and prompt hash. */
|
|
385
412
|
export declare const Recording: z.ZodObject<{
|
|
@@ -767,9 +767,40 @@ export type StepClass = z.infer<typeof StepClass>;
|
|
|
767
767
|
* step on the one model; `atticus upgrade` moves it to version 2 (`runtime-v2`), changing nothing
|
|
768
768
|
* else.
|
|
769
769
|
*/
|
|
770
|
-
export declare const RUNTIME_SCHEMA_VERSION:
|
|
770
|
+
export declare const RUNTIME_SCHEMA_VERSION: 3;
|
|
771
|
+
/**
|
|
772
|
+
* runtime.yaml version 3 (ADR 0171): how Atticus starts the GitHub Copilot language server in its
|
|
773
|
+
* Agent Client Protocol mode, for `copilot-acp`. Only how to start it, which model to ask for and
|
|
774
|
+
* the caps: what the session may read, write and run is fixed in code (rule 6), never here.
|
|
775
|
+
* - command: the server's program and any words before `--acp` (no shell), as one line; a path
|
|
776
|
+
* with spaces in double quotes. Default `npx --yes @github/copilot-language-server`.
|
|
777
|
+
* - model: the model id to ask the server for, when it offers a choice.
|
|
778
|
+
* - maxTurns: the most tool calls one session may make before Atticus cancels it (default 200).
|
|
779
|
+
* - timeoutMs: the longest one session may take (default 30 minutes).
|
|
780
|
+
*/
|
|
781
|
+
export declare const CopilotAcpSettings: z.ZodObject<{
|
|
782
|
+
command: z.ZodOptional<z.ZodString>;
|
|
783
|
+
model: z.ZodOptional<z.ZodString>;
|
|
784
|
+
maxTurns: z.ZodOptional<z.ZodNumber>;
|
|
785
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
786
|
+
}, z.core.$strict>;
|
|
787
|
+
export type CopilotAcpSettings = z.infer<typeof CopilotAcpSettings>;
|
|
788
|
+
export declare const COPILOT_ACP_DEFAULTS: {
|
|
789
|
+
readonly command: "npx --yes @github/copilot-language-server";
|
|
790
|
+
readonly maxTurns: 200;
|
|
791
|
+
readonly timeoutMs: number;
|
|
792
|
+
};
|
|
793
|
+
/** runtime.yaml's copilotAcp section with its defaults (ADR 0171). */
|
|
794
|
+
export declare function copilotAcpOf(runtime: {
|
|
795
|
+
copilotAcp?: CopilotAcpSettings | undefined;
|
|
796
|
+
} | undefined): {
|
|
797
|
+
command: string;
|
|
798
|
+
model?: string;
|
|
799
|
+
maxTurns: number;
|
|
800
|
+
timeoutMs: number;
|
|
801
|
+
};
|
|
771
802
|
export declare const Runtime: z.ZodObject<{
|
|
772
|
-
schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
|
|
803
|
+
schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>;
|
|
773
804
|
assistants: z.ZodObject<{
|
|
774
805
|
allowed: z.ZodArray<z.ZodEnum<{
|
|
775
806
|
copilot: "copilot";
|
|
@@ -802,11 +833,13 @@ export declare const Runtime: z.ZodObject<{
|
|
|
802
833
|
model: "model";
|
|
803
834
|
"hand-off": "hand-off";
|
|
804
835
|
"headless-claude-code": "headless-claude-code";
|
|
836
|
+
"copilot-acp": "copilot-acp";
|
|
805
837
|
}>>;
|
|
806
838
|
default: z.ZodEnum<{
|
|
807
839
|
model: "model";
|
|
808
840
|
"hand-off": "hand-off";
|
|
809
841
|
"headless-claude-code": "headless-claude-code";
|
|
842
|
+
"copilot-acp": "copilot-acp";
|
|
810
843
|
}>;
|
|
811
844
|
}, z.core.$strict>>;
|
|
812
845
|
models: z.ZodDefault<z.ZodObject<{
|
|
@@ -849,6 +882,12 @@ export declare const Runtime: z.ZodObject<{
|
|
|
849
882
|
expansion: z.ZodDefault<z.ZodBoolean>;
|
|
850
883
|
rerank: z.ZodDefault<z.ZodBoolean>;
|
|
851
884
|
}, z.core.$strict>>;
|
|
885
|
+
copilotAcp: z.ZodOptional<z.ZodObject<{
|
|
886
|
+
command: z.ZodOptional<z.ZodString>;
|
|
887
|
+
model: z.ZodOptional<z.ZodString>;
|
|
888
|
+
maxTurns: z.ZodOptional<z.ZodNumber>;
|
|
889
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
890
|
+
}, z.core.$strict>>;
|
|
852
891
|
telemetry: z.ZodDefault<z.ZodObject<{
|
|
853
892
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
854
893
|
}, z.core.$strict>>;
|
package/npm/index.js
CHANGED
|
@@ -2423,10 +2423,25 @@ var ASSISTANTS = [
|
|
|
2423
2423
|
var AssistantId = z9.enum(ASSISTANTS);
|
|
2424
2424
|
var STEP_CLASSES = ["read", "draft", "critic", "knowledge", "quick"];
|
|
2425
2425
|
var StepClass = z9.enum(STEP_CLASSES);
|
|
2426
|
-
var RUNTIME_SCHEMA_VERSION =
|
|
2426
|
+
var RUNTIME_SCHEMA_VERSION = 3;
|
|
2427
|
+
var ConfiguredMode = z9.enum(["hand-off", "model", "headless-claude-code", "copilot-acp"]);
|
|
2428
|
+
var CopilotAcpSettings = z9.strictObject({
|
|
2429
|
+
command: z9.string().trim().min(1).optional(),
|
|
2430
|
+
model: StepModelId().optional(),
|
|
2431
|
+
maxTurns: z9.number().int().positive().max(5e3).optional(),
|
|
2432
|
+
timeoutMs: z9.number().int().min(1e4).max(24 * 60 * 6e4).optional()
|
|
2433
|
+
});
|
|
2434
|
+
function StepModelId() {
|
|
2435
|
+
return z9.string().min(1).regex(/^\S+$/, "a model id, without spaces");
|
|
2436
|
+
}
|
|
2437
|
+
var COPILOT_ACP_DEFAULTS = {
|
|
2438
|
+
command: "npx --yes @github/copilot-language-server",
|
|
2439
|
+
maxTurns: 200,
|
|
2440
|
+
timeoutMs: 30 * 6e4
|
|
2441
|
+
};
|
|
2427
2442
|
var StepModel = z9.string().min(1).regex(/^\S+$/, "a model name or vendor/family, without spaces");
|
|
2428
2443
|
var RuntimeFields = z9.strictObject({
|
|
2429
|
-
schemaVersion: z9.union([V2, z9.literal(RUNTIME_SCHEMA_VERSION)]),
|
|
2444
|
+
schemaVersion: z9.union([V2, z9.literal(2), z9.literal(RUNTIME_SCHEMA_VERSION)]),
|
|
2430
2445
|
assistants: z9.strictObject({
|
|
2431
2446
|
allowed: z9.array(AssistantId).min(1),
|
|
2432
2447
|
default: AssistantId
|
|
@@ -2438,10 +2453,13 @@ var RuntimeFields = z9.strictObject({
|
|
|
2438
2453
|
* don't hold a gate, AI buttons become guidance, and people write what agents would draft.
|
|
2439
2454
|
*/
|
|
2440
2455
|
ai: z9.enum(["on", "text-only", "off"]).default("on"),
|
|
2441
|
-
/**
|
|
2456
|
+
/**
|
|
2457
|
+
* How AI steps run: hand-off to the assistant, a direct model call, headless Claude Code, or
|
|
2458
|
+
* (version 3, ADR 0171) Copilot driven unattended through its Agent Client Protocol.
|
|
2459
|
+
*/
|
|
2442
2460
|
modes: z9.strictObject({
|
|
2443
|
-
allowed: z9.array(
|
|
2444
|
-
default:
|
|
2461
|
+
allowed: z9.array(ConfiguredMode).min(1),
|
|
2462
|
+
default: ConfiguredMode
|
|
2445
2463
|
}).refine((m) => m.allowed.includes(m.default), "the default mode must be allowed").default({ allowed: ["hand-off"], default: "hand-off" }),
|
|
2446
2464
|
models: z9.strictObject({
|
|
2447
2465
|
allowed: z9.array(z9.string().min(1)).default([]),
|
|
@@ -2481,6 +2499,8 @@ var RuntimeFields = z9.strictObject({
|
|
|
2481
2499
|
* the section and one with an empty section get the same defaults.
|
|
2482
2500
|
*/
|
|
2483
2501
|
retrieval: RetrievalSettings.optional(),
|
|
2502
|
+
/** Version 3 (ADR 0171): how copilot-acp starts the Copilot language server. */
|
|
2503
|
+
copilotAcp: CopilotAcpSettings.optional(),
|
|
2484
2504
|
/** Atticus sends no telemetry unless an organisation turns it on here. */
|
|
2485
2505
|
telemetry: z9.strictObject({ enabled: z9.boolean().default(false) }).default({ enabled: false }),
|
|
2486
2506
|
adapters: z9.strictObject({
|
|
@@ -2513,6 +2533,20 @@ var RuntimeFields = z9.strictObject({
|
|
|
2513
2533
|
}).optional()
|
|
2514
2534
|
});
|
|
2515
2535
|
var Runtime = RuntimeFields.superRefine((r, ctx) => {
|
|
2536
|
+
if (r.schemaVersion < 3) {
|
|
2537
|
+
if ([...r.modes.allowed, r.modes.default].includes("copilot-acp"))
|
|
2538
|
+
ctx.addIssue({
|
|
2539
|
+
code: "custom",
|
|
2540
|
+
path: ["modes"],
|
|
2541
|
+
message: "copilot-acp needs schemaVersion 3 (ADR 0171): run atticus upgrade"
|
|
2542
|
+
});
|
|
2543
|
+
if (r.copilotAcp !== void 0)
|
|
2544
|
+
ctx.addIssue({
|
|
2545
|
+
code: "custom",
|
|
2546
|
+
path: ["copilotAcp"],
|
|
2547
|
+
message: "copilotAcp needs schemaVersion 3 (ADR 0171): run atticus upgrade"
|
|
2548
|
+
});
|
|
2549
|
+
}
|
|
2516
2550
|
if (r.schemaVersion !== 1)
|
|
2517
2551
|
return;
|
|
2518
2552
|
for (const c of STEP_CLASSES)
|
|
@@ -3973,7 +4007,7 @@ var QuestionOption = z21.strictObject({
|
|
|
3973
4007
|
/** What it would change in the result. */
|
|
3974
4008
|
changes: z21.string().trim().min(1)
|
|
3975
4009
|
});
|
|
3976
|
-
var AnswerMatch = z21.string().trim().min(1).refine((m) => m.startsWith("/") ? BasePath.safeParse(m.replace(/\/\*\*$/, "")).success : HostPattern.safeParse(m).success, "a match is a host pattern (*.payments.forge.internal)
|
|
4010
|
+
var AnswerMatch = z21.string().trim().min(1).refine((m) => m === "/**" || (m.startsWith("/") ? BasePath.safeParse(m.replace(/\/\*\*$/, "")).success : HostPattern.safeParse(m).success), "a match is a host pattern (*.payments.forge.internal), a path prefix (/forge/limits/**), or /** for every path");
|
|
3977
4011
|
var QuestionProposalCite = z21.strictObject({
|
|
3978
4012
|
/** The repo the file is in; the question's own when left out. */
|
|
3979
4013
|
repo: z21.string().trim().min(1).optional(),
|
|
@@ -4568,7 +4602,14 @@ var EstateJoins = z25.strictObject({
|
|
|
4568
4602
|
// packages/core/dist/schema/ai.js
|
|
4569
4603
|
import { z as z26 } from "zod";
|
|
4570
4604
|
var AI_SCHEMA_VERSION = 1;
|
|
4571
|
-
var RuntimeKind = z26.enum([
|
|
4605
|
+
var RuntimeKind = z26.enum([
|
|
4606
|
+
"hand-off",
|
|
4607
|
+
"model",
|
|
4608
|
+
"headless-claude-code",
|
|
4609
|
+
"copilot-acp",
|
|
4610
|
+
"mock",
|
|
4611
|
+
"replay"
|
|
4612
|
+
]);
|
|
4572
4613
|
var AgentInput = z26.union([
|
|
4573
4614
|
ChangeArtifact,
|
|
4574
4615
|
z26.enum([
|
|
@@ -4652,7 +4693,12 @@ var RunState = z26.enum([
|
|
|
4652
4693
|
"failed",
|
|
4653
4694
|
"cancelled"
|
|
4654
4695
|
]);
|
|
4655
|
-
var RUN_SCHEMA_VERSION =
|
|
4696
|
+
var RUN_SCHEMA_VERSION = 5;
|
|
4697
|
+
var RunAssistant = z26.strictObject({
|
|
4698
|
+
name: z26.string().min(1),
|
|
4699
|
+
version: z26.string().min(1).optional(),
|
|
4700
|
+
protocolVersion: z26.number().int().min(0).optional()
|
|
4701
|
+
});
|
|
4656
4702
|
var RunRetrieval = z26.strictObject({
|
|
4657
4703
|
expansion: z26.strictObject({
|
|
4658
4704
|
run: z26.string().min(1).optional(),
|
|
@@ -4731,7 +4777,9 @@ var RunSummary = z26.strictObject({
|
|
|
4731
4777
|
* Claude Code was given, or the editor's model a hand-off was answered with (`atticus handoff
|
|
4732
4778
|
* done --model`). Left out when nothing said which.
|
|
4733
4779
|
*/
|
|
4734
|
-
model: z26.string().min(1).optional()
|
|
4780
|
+
model: z26.string().min(1).optional(),
|
|
4781
|
+
/** The assistant program it talked to (version 5, ADR 0171), when the runtime drives one. */
|
|
4782
|
+
assistant: RunAssistant.optional()
|
|
4735
4783
|
});
|
|
4736
4784
|
var Recording = z26.strictObject({
|
|
4737
4785
|
schemaVersion: z26.literal(AI_SCHEMA_VERSION),
|
package/package.json
CHANGED