@maycombhq/sdk 2.0.0-beta.12.2 → 2.0.0-beta.14
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 +35 -5
- package/npm/core/contract-check.d.ts +10 -0
- 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 +59 -9
- package/package.json +1 -1
package/npm/core/api.d.ts
CHANGED
|
@@ -128,8 +128,10 @@ import { z } from "zod";
|
|
|
128
128
|
* calls share a path prefix or host with other open targets questions of its repo: the rule
|
|
129
129
|
* (`/accounts/**`) one answer could take to cover them all, the questions it covers and their
|
|
130
130
|
* calls. Additive only.
|
|
131
|
+
* 2.50.0 (ADR 0172): the contract check's counts give `unlinked`, the calls no link starts at.
|
|
132
|
+
* Additive only.
|
|
131
133
|
*/
|
|
132
|
-
export declare const API_VERSION = "2.
|
|
134
|
+
export declare const API_VERSION = "2.50.0";
|
|
133
135
|
export declare const DEFAULT_PORT = 4321;
|
|
134
136
|
/** RFC 9457 problem details, used for every error. */
|
|
135
137
|
export declare const Problem: z.ZodObject<{
|
|
@@ -1348,7 +1350,7 @@ export declare const Task: z.ZodObject<{
|
|
|
1348
1350
|
run: z.ZodOptional<z.ZodString>;
|
|
1349
1351
|
}, z.core.$strip>;
|
|
1350
1352
|
export declare const RunView: z.ZodObject<{
|
|
1351
|
-
schemaVersion: z.ZodLiteral<
|
|
1353
|
+
schemaVersion: z.ZodLiteral<5>;
|
|
1352
1354
|
runId: z.ZodString;
|
|
1353
1355
|
change: z.ZodString;
|
|
1354
1356
|
agent: z.ZodString;
|
|
@@ -1356,6 +1358,7 @@ export declare const RunView: z.ZodObject<{
|
|
|
1356
1358
|
model: "model";
|
|
1357
1359
|
"hand-off": "hand-off";
|
|
1358
1360
|
"headless-claude-code": "headless-claude-code";
|
|
1361
|
+
"copilot-acp": "copilot-acp";
|
|
1359
1362
|
mock: "mock";
|
|
1360
1363
|
replay: "replay";
|
|
1361
1364
|
}>;
|
|
@@ -1424,12 +1427,17 @@ export declare const RunView: z.ZodObject<{
|
|
|
1424
1427
|
quick: "quick";
|
|
1425
1428
|
}>>;
|
|
1426
1429
|
model: z.ZodOptional<z.ZodString>;
|
|
1430
|
+
assistant: z.ZodOptional<z.ZodObject<{
|
|
1431
|
+
name: z.ZodString;
|
|
1432
|
+
version: z.ZodOptional<z.ZodString>;
|
|
1433
|
+
protocolVersion: z.ZodOptional<z.ZodNumber>;
|
|
1434
|
+
}, z.core.$strict>>;
|
|
1427
1435
|
promptPath: z.ZodOptional<z.ZodString>;
|
|
1428
1436
|
workspaceFile: z.ZodOptional<z.ZodString>;
|
|
1429
1437
|
}, z.core.$strict>;
|
|
1430
1438
|
/** ADR 0106: one run in the list of model runs. */
|
|
1431
1439
|
export declare const RunListItem: z.ZodObject<{
|
|
1432
|
-
schemaVersion: z.ZodLiteral<
|
|
1440
|
+
schemaVersion: z.ZodLiteral<5>;
|
|
1433
1441
|
runId: z.ZodString;
|
|
1434
1442
|
change: z.ZodString;
|
|
1435
1443
|
agent: z.ZodString;
|
|
@@ -1437,6 +1445,7 @@ export declare const RunListItem: z.ZodObject<{
|
|
|
1437
1445
|
model: "model";
|
|
1438
1446
|
"hand-off": "hand-off";
|
|
1439
1447
|
"headless-claude-code": "headless-claude-code";
|
|
1448
|
+
"copilot-acp": "copilot-acp";
|
|
1440
1449
|
mock: "mock";
|
|
1441
1450
|
replay: "replay";
|
|
1442
1451
|
}>;
|
|
@@ -1504,6 +1513,11 @@ export declare const RunListItem: z.ZodObject<{
|
|
|
1504
1513
|
quick: "quick";
|
|
1505
1514
|
}>>;
|
|
1506
1515
|
model: z.ZodOptional<z.ZodString>;
|
|
1516
|
+
assistant: z.ZodOptional<z.ZodObject<{
|
|
1517
|
+
name: z.ZodString;
|
|
1518
|
+
version: z.ZodOptional<z.ZodString>;
|
|
1519
|
+
protocolVersion: z.ZodOptional<z.ZodNumber>;
|
|
1520
|
+
}, z.core.$strict>>;
|
|
1507
1521
|
promptPath: z.ZodOptional<z.ZodString>;
|
|
1508
1522
|
workspaceFile: z.ZodOptional<z.ZodString>;
|
|
1509
1523
|
attempt: z.ZodNumber;
|
|
@@ -1520,7 +1534,7 @@ export declare const StartStepRequest: z.ZodObject<{
|
|
|
1520
1534
|
export type StartStepRequest = z.infer<typeof StartStepRequest>;
|
|
1521
1535
|
export declare const RunList: z.ZodObject<{
|
|
1522
1536
|
runs: z.ZodArray<z.ZodObject<{
|
|
1523
|
-
schemaVersion: z.ZodLiteral<
|
|
1537
|
+
schemaVersion: z.ZodLiteral<5>;
|
|
1524
1538
|
runId: z.ZodString;
|
|
1525
1539
|
change: z.ZodString;
|
|
1526
1540
|
agent: z.ZodString;
|
|
@@ -1528,6 +1542,7 @@ export declare const RunList: z.ZodObject<{
|
|
|
1528
1542
|
model: "model";
|
|
1529
1543
|
"hand-off": "hand-off";
|
|
1530
1544
|
"headless-claude-code": "headless-claude-code";
|
|
1545
|
+
"copilot-acp": "copilot-acp";
|
|
1531
1546
|
mock: "mock";
|
|
1532
1547
|
replay: "replay";
|
|
1533
1548
|
}>;
|
|
@@ -1595,6 +1610,11 @@ export declare const RunList: z.ZodObject<{
|
|
|
1595
1610
|
quick: "quick";
|
|
1596
1611
|
}>>;
|
|
1597
1612
|
model: z.ZodOptional<z.ZodString>;
|
|
1613
|
+
assistant: z.ZodOptional<z.ZodObject<{
|
|
1614
|
+
name: z.ZodString;
|
|
1615
|
+
version: z.ZodOptional<z.ZodString>;
|
|
1616
|
+
protocolVersion: z.ZodOptional<z.ZodNumber>;
|
|
1617
|
+
}, z.core.$strict>>;
|
|
1598
1618
|
promptPath: z.ZodOptional<z.ZodString>;
|
|
1599
1619
|
workspaceFile: z.ZodOptional<z.ZodString>;
|
|
1600
1620
|
attempt: z.ZodNumber;
|
|
@@ -1609,7 +1629,7 @@ export type RunList = z.infer<typeof RunList>;
|
|
|
1609
1629
|
/** ADR 0106: what one run was asked and answered, and what the checks handed back to it. */
|
|
1610
1630
|
export declare const RunTranscript: z.ZodObject<{
|
|
1611
1631
|
run: z.ZodObject<{
|
|
1612
|
-
schemaVersion: z.ZodLiteral<
|
|
1632
|
+
schemaVersion: z.ZodLiteral<5>;
|
|
1613
1633
|
runId: z.ZodString;
|
|
1614
1634
|
change: z.ZodString;
|
|
1615
1635
|
agent: z.ZodString;
|
|
@@ -1617,6 +1637,7 @@ export declare const RunTranscript: z.ZodObject<{
|
|
|
1617
1637
|
model: "model";
|
|
1618
1638
|
"hand-off": "hand-off";
|
|
1619
1639
|
"headless-claude-code": "headless-claude-code";
|
|
1640
|
+
"copilot-acp": "copilot-acp";
|
|
1620
1641
|
mock: "mock";
|
|
1621
1642
|
replay: "replay";
|
|
1622
1643
|
}>;
|
|
@@ -1684,6 +1705,11 @@ export declare const RunTranscript: z.ZodObject<{
|
|
|
1684
1705
|
quick: "quick";
|
|
1685
1706
|
}>>;
|
|
1686
1707
|
model: z.ZodOptional<z.ZodString>;
|
|
1708
|
+
assistant: z.ZodOptional<z.ZodObject<{
|
|
1709
|
+
name: z.ZodString;
|
|
1710
|
+
version: z.ZodOptional<z.ZodString>;
|
|
1711
|
+
protocolVersion: z.ZodOptional<z.ZodNumber>;
|
|
1712
|
+
}, z.core.$strict>>;
|
|
1687
1713
|
promptPath: z.ZodOptional<z.ZodString>;
|
|
1688
1714
|
workspaceFile: z.ZodOptional<z.ZodString>;
|
|
1689
1715
|
attempt: z.ZodNumber;
|
|
@@ -2292,6 +2318,7 @@ export declare const ContractCounts: z.ZodObject<{
|
|
|
2292
2318
|
compared: z.ZodNumber;
|
|
2293
2319
|
mismatches: z.ZodNumber;
|
|
2294
2320
|
unconfirmed: z.ZodNumber;
|
|
2321
|
+
unlinked: z.ZodOptional<z.ZodNumber>;
|
|
2295
2322
|
}, z.core.$strip>;
|
|
2296
2323
|
export declare const TrustView: z.ZodObject<{
|
|
2297
2324
|
factsDir: z.ZodString;
|
|
@@ -2433,6 +2460,7 @@ export declare const TrustView: z.ZodObject<{
|
|
|
2433
2460
|
compared: z.ZodNumber;
|
|
2434
2461
|
mismatches: z.ZodNumber;
|
|
2435
2462
|
unconfirmed: z.ZodNumber;
|
|
2463
|
+
unlinked: z.ZodOptional<z.ZodNumber>;
|
|
2436
2464
|
}, z.core.$strip>>;
|
|
2437
2465
|
problems: z.ZodArray<z.ZodObject<{
|
|
2438
2466
|
file: z.ZodString;
|
|
@@ -3503,6 +3531,7 @@ export declare const ContractsView: z.ZodObject<{
|
|
|
3503
3531
|
compared: z.ZodNumber;
|
|
3504
3532
|
mismatches: z.ZodNumber;
|
|
3505
3533
|
unconfirmed: z.ZodNumber;
|
|
3534
|
+
unlinked: z.ZodOptional<z.ZodNumber>;
|
|
3506
3535
|
}, z.core.$strip>;
|
|
3507
3536
|
notes: z.ZodArray<z.ZodString>;
|
|
3508
3537
|
}, z.core.$strip>;
|
|
@@ -6353,6 +6382,7 @@ export declare const StartRunRequest: z.ZodObject<{
|
|
|
6353
6382
|
model: "model";
|
|
6354
6383
|
"hand-off": "hand-off";
|
|
6355
6384
|
"headless-claude-code": "headless-claude-code";
|
|
6385
|
+
"copilot-acp": "copilot-acp";
|
|
6356
6386
|
mock: "mock";
|
|
6357
6387
|
replay: "replay";
|
|
6358
6388
|
}>>;
|
|
@@ -197,6 +197,11 @@ export interface ContractCheckResult {
|
|
|
197
197
|
compared: number;
|
|
198
198
|
mismatches: number;
|
|
199
199
|
unconfirmed: number;
|
|
200
|
+
/**
|
|
201
|
+
* ADR 0172: the calls no link starts at (not joined, not to an outside system), so nothing on
|
|
202
|
+
* their other side can be compared until they join.
|
|
203
|
+
*/
|
|
204
|
+
unlinked: number;
|
|
200
205
|
};
|
|
201
206
|
}
|
|
202
207
|
export interface ContractCheckInput {
|
|
@@ -243,6 +248,11 @@ export declare const isMessageType: (f: {
|
|
|
243
248
|
export declare const ENVELOPE_TRANSFORM: RegExp;
|
|
244
249
|
/** Compare the payload on both sides of every link the join made, and of every call to an outside system with a spec. */
|
|
245
250
|
export declare function checkContracts(input: ContractCheckInput): ContractCheckResult;
|
|
251
|
+
/**
|
|
252
|
+
* ADR 0172: the calls of the estate no link starts at: a REST, SOAP or gRPC call, or a publish,
|
|
253
|
+
* the join neither joined nor left to an outside system. Their payload is checked once they join.
|
|
254
|
+
*/
|
|
255
|
+
export declare function unlinkedCalls(input: Pick<ContractCheckInput, "repos" | "join">): FactEnd[];
|
|
246
256
|
/**
|
|
247
257
|
* The findings a newer spec of an outside system brings (ADR 0164): those against `next` that
|
|
248
258
|
* the same calls didn't have against `prev`, by kind, side and field. What the Outside systems
|
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)
|
|
@@ -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),
|
|
@@ -5598,7 +5646,9 @@ var ContractCounts = z29.object({
|
|
|
5598
5646
|
links: z29.number().int(),
|
|
5599
5647
|
compared: z29.number().int(),
|
|
5600
5648
|
mismatches: z29.number().int(),
|
|
5601
|
-
unconfirmed: z29.number().int()
|
|
5649
|
+
unconfirmed: z29.number().int(),
|
|
5650
|
+
/** 2.50.0 (ADR 0172): the calls no link starts at, whose payload can't be checked yet. */
|
|
5651
|
+
unlinked: z29.number().int().optional()
|
|
5602
5652
|
});
|
|
5603
5653
|
var TrustView = z29.object({
|
|
5604
5654
|
/** Where the facts files are, relative to the metarepo. */
|
package/package.json
CHANGED