@maycombhq/sdk 2.0.0-beta.2 → 2.0.0-beta.21
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/ai-decisions.d.ts +360 -0
- package/npm/core/api.d.ts +5806 -1212
- package/npm/core/audit.d.ts +165 -0
- package/npm/core/catalog.d.ts +220 -66
- package/npm/core/contract-check.d.ts +261 -0
- package/npm/core/decision-batches.d.ts +29 -0
- package/npm/core/declared-links.d.ts +62 -0
- package/npm/core/eol.d.ts +5 -0
- package/npm/core/fact-paths.d.ts +14 -0
- package/npm/core/facts-callers.d.ts +2 -0
- package/npm/core/facts-join-prototype.d.ts +66 -4
- package/npm/core/facts-join-vendor.d.ts +20 -2
- package/npm/core/facts-join.d.ts +320 -1
- package/npm/core/facts-terms.d.ts +108 -0
- package/npm/core/fs.d.ts +23 -4
- package/npm/core/host-questions.d.ts +93 -1
- package/npm/core/index.d.ts +22 -0
- package/npm/core/link-candidates.d.ts +103 -0
- package/npm/core/link-evidence.d.ts +212 -0
- package/npm/core/manifest-edit.d.ts +53 -4
- package/npm/core/merge.d.ts +28 -0
- package/npm/core/metarepo.d.ts +18 -1
- package/npm/core/migrate.d.ts +3 -2
- package/npm/core/org-notes.d.ts +180 -0
- package/npm/core/orgpack-defaults.d.ts +22 -6
- package/npm/core/orgpack-load.d.ts +19 -0
- package/npm/core/profile-migrate.d.ts +11 -0
- package/npm/core/question-order.d.ts +23 -0
- package/npm/core/question-owners.d.ts +53 -0
- package/npm/core/question-proposals.d.ts +77 -0
- package/npm/core/question-roles.d.ts +24 -0
- package/npm/core/questions.d.ts +85 -6
- package/npm/core/repo-reads.d.ts +44 -0
- package/npm/core/roles-migrate.d.ts +9 -0
- package/npm/core/runtime-migrate.d.ts +18 -0
- package/npm/core/schema/ai.d.ts +57 -9
- package/npm/core/schema/common.d.ts +32 -8
- package/npm/core/schema/component-type.d.ts +193 -0
- package/npm/core/schema/conventions.d.ts +80 -0
- package/npm/core/schema/fact-corrections.d.ts +96 -2
- package/npm/core/schema/facts.d.ts +410 -1
- package/npm/core/schema/kinds.d.ts +230 -66
- package/npm/core/schema/orgpack.d.ts +110 -7
- package/npm/core/schema/question.d.ts +228 -5
- package/npm/core/schema/reading-rules.d.ts +51 -0
- package/npm/core/schema/repo-type.d.ts +20 -2
- package/npm/core/schema/review.d.ts +7 -7
- package/npm/core/schema/scan-verify.d.ts +87 -45
- package/npm/core/schema/version.d.ts +4 -1
- package/npm/core/schema/workspace.d.ts +29 -11
- package/npm/core/shared-maps.d.ts +146 -0
- package/npm/core/stack-helpers.d.ts +32 -0
- package/npm/index.js +5614 -2343
- package/package.json +1 -1
|
@@ -24,17 +24,17 @@ export declare const VerifySettings: z.ZodObject<{
|
|
|
24
24
|
why: z.ZodString;
|
|
25
25
|
at: z.ZodString;
|
|
26
26
|
}, z.core.$strict>>>;
|
|
27
|
-
|
|
27
|
+
prefixes: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
28
28
|
paths: z.ZodArray<z.ZodString>;
|
|
29
|
-
|
|
30
|
-
names: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
29
|
+
prefix: z.ZodString;
|
|
31
30
|
why: z.ZodString;
|
|
32
31
|
at: z.ZodString;
|
|
33
32
|
value: z.ZodString;
|
|
34
33
|
}, z.core.$strict>>>;
|
|
35
|
-
|
|
34
|
+
clients: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
36
35
|
paths: z.ZodArray<z.ZodString>;
|
|
37
|
-
|
|
36
|
+
base: z.ZodString;
|
|
37
|
+
names: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
38
38
|
why: z.ZodString;
|
|
39
39
|
at: z.ZodString;
|
|
40
40
|
value: z.ZodString;
|
|
@@ -49,17 +49,17 @@ export declare const VerifyFix: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
49
49
|
why: z.ZodString;
|
|
50
50
|
at: z.ZodString;
|
|
51
51
|
}, z.core.$strict>>>;
|
|
52
|
-
|
|
52
|
+
prefixes: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
53
53
|
paths: z.ZodArray<z.ZodString>;
|
|
54
|
-
|
|
55
|
-
names: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
54
|
+
prefix: z.ZodString;
|
|
56
55
|
why: z.ZodString;
|
|
57
56
|
at: z.ZodString;
|
|
58
57
|
value: z.ZodString;
|
|
59
58
|
}, z.core.$strict>>>;
|
|
60
|
-
|
|
59
|
+
clients: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
61
60
|
paths: z.ZodArray<z.ZodString>;
|
|
62
|
-
|
|
61
|
+
base: z.ZodString;
|
|
62
|
+
names: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
63
63
|
why: z.ZodString;
|
|
64
64
|
at: z.ZodString;
|
|
65
65
|
value: z.ZodString;
|
|
@@ -79,6 +79,12 @@ export declare const VerifyFix: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
79
79
|
"repo-type": "repo-type";
|
|
80
80
|
}>>;
|
|
81
81
|
repoType: z.ZodOptional<z.ZodString>;
|
|
82
|
+
role: z.ZodOptional<z.ZodEnum<{
|
|
83
|
+
product: "product";
|
|
84
|
+
architecture: "architecture";
|
|
85
|
+
delivery: "delivery";
|
|
86
|
+
analysis: "analysis";
|
|
87
|
+
}>>;
|
|
82
88
|
sameAs: z.ZodOptional<z.ZodObject<{
|
|
83
89
|
id: z.ZodString;
|
|
84
90
|
verdict: z.ZodEnum<{
|
|
@@ -105,17 +111,17 @@ export declare const VerifyMissed: z.ZodObject<{
|
|
|
105
111
|
why: z.ZodString;
|
|
106
112
|
at: z.ZodString;
|
|
107
113
|
}, z.core.$strict>>>;
|
|
108
|
-
|
|
114
|
+
prefixes: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
109
115
|
paths: z.ZodArray<z.ZodString>;
|
|
110
|
-
|
|
111
|
-
names: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
116
|
+
prefix: z.ZodString;
|
|
112
117
|
why: z.ZodString;
|
|
113
118
|
at: z.ZodString;
|
|
114
119
|
value: z.ZodString;
|
|
115
120
|
}, z.core.$strict>>>;
|
|
116
|
-
|
|
121
|
+
clients: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
117
122
|
paths: z.ZodArray<z.ZodString>;
|
|
118
|
-
|
|
123
|
+
base: z.ZodString;
|
|
124
|
+
names: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
119
125
|
why: z.ZodString;
|
|
120
126
|
at: z.ZodString;
|
|
121
127
|
value: z.ZodString;
|
|
@@ -135,6 +141,12 @@ export declare const VerifyMissed: z.ZodObject<{
|
|
|
135
141
|
"repo-type": "repo-type";
|
|
136
142
|
}>>;
|
|
137
143
|
repoType: z.ZodOptional<z.ZodString>;
|
|
144
|
+
role: z.ZodOptional<z.ZodEnum<{
|
|
145
|
+
product: "product";
|
|
146
|
+
architecture: "architecture";
|
|
147
|
+
delivery: "delivery";
|
|
148
|
+
analysis: "analysis";
|
|
149
|
+
}>>;
|
|
138
150
|
sameAs: z.ZodOptional<z.ZodObject<{
|
|
139
151
|
id: z.ZodString;
|
|
140
152
|
verdict: z.ZodEnum<{
|
|
@@ -171,17 +183,17 @@ export declare const VerifyWrong: z.ZodObject<{
|
|
|
171
183
|
why: z.ZodString;
|
|
172
184
|
at: z.ZodString;
|
|
173
185
|
}, z.core.$strict>>>;
|
|
174
|
-
|
|
186
|
+
prefixes: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
175
187
|
paths: z.ZodArray<z.ZodString>;
|
|
176
|
-
|
|
177
|
-
names: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
188
|
+
prefix: z.ZodString;
|
|
178
189
|
why: z.ZodString;
|
|
179
190
|
at: z.ZodString;
|
|
180
191
|
value: z.ZodString;
|
|
181
192
|
}, z.core.$strict>>>;
|
|
182
|
-
|
|
193
|
+
clients: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
183
194
|
paths: z.ZodArray<z.ZodString>;
|
|
184
|
-
|
|
195
|
+
base: z.ZodString;
|
|
196
|
+
names: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
185
197
|
why: z.ZodString;
|
|
186
198
|
at: z.ZodString;
|
|
187
199
|
value: z.ZodString;
|
|
@@ -201,6 +213,12 @@ export declare const VerifyWrong: z.ZodObject<{
|
|
|
201
213
|
"repo-type": "repo-type";
|
|
202
214
|
}>>;
|
|
203
215
|
repoType: z.ZodOptional<z.ZodString>;
|
|
216
|
+
role: z.ZodOptional<z.ZodEnum<{
|
|
217
|
+
product: "product";
|
|
218
|
+
architecture: "architecture";
|
|
219
|
+
delivery: "delivery";
|
|
220
|
+
analysis: "analysis";
|
|
221
|
+
}>>;
|
|
204
222
|
sameAs: z.ZodOptional<z.ZodObject<{
|
|
205
223
|
id: z.ZodString;
|
|
206
224
|
verdict: z.ZodEnum<{
|
|
@@ -240,17 +258,17 @@ export declare const VerifyAnswer: z.ZodObject<{
|
|
|
240
258
|
why: z.ZodString;
|
|
241
259
|
at: z.ZodString;
|
|
242
260
|
}, z.core.$strict>>>;
|
|
243
|
-
|
|
261
|
+
prefixes: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
244
262
|
paths: z.ZodArray<z.ZodString>;
|
|
245
|
-
|
|
246
|
-
names: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
263
|
+
prefix: z.ZodString;
|
|
247
264
|
why: z.ZodString;
|
|
248
265
|
at: z.ZodString;
|
|
249
266
|
value: z.ZodString;
|
|
250
267
|
}, z.core.$strict>>>;
|
|
251
|
-
|
|
268
|
+
clients: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
252
269
|
paths: z.ZodArray<z.ZodString>;
|
|
253
|
-
|
|
270
|
+
base: z.ZodString;
|
|
271
|
+
names: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
254
272
|
why: z.ZodString;
|
|
255
273
|
at: z.ZodString;
|
|
256
274
|
value: z.ZodString;
|
|
@@ -270,6 +288,12 @@ export declare const VerifyAnswer: z.ZodObject<{
|
|
|
270
288
|
"repo-type": "repo-type";
|
|
271
289
|
}>>;
|
|
272
290
|
repoType: z.ZodOptional<z.ZodString>;
|
|
291
|
+
role: z.ZodOptional<z.ZodEnum<{
|
|
292
|
+
product: "product";
|
|
293
|
+
architecture: "architecture";
|
|
294
|
+
delivery: "delivery";
|
|
295
|
+
analysis: "analysis";
|
|
296
|
+
}>>;
|
|
273
297
|
sameAs: z.ZodOptional<z.ZodObject<{
|
|
274
298
|
id: z.ZodString;
|
|
275
299
|
verdict: z.ZodEnum<{
|
|
@@ -304,17 +328,17 @@ export declare const VerifyAnswer: z.ZodObject<{
|
|
|
304
328
|
why: z.ZodString;
|
|
305
329
|
at: z.ZodString;
|
|
306
330
|
}, z.core.$strict>>>;
|
|
307
|
-
|
|
331
|
+
prefixes: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
308
332
|
paths: z.ZodArray<z.ZodString>;
|
|
309
|
-
|
|
310
|
-
names: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
333
|
+
prefix: z.ZodString;
|
|
311
334
|
why: z.ZodString;
|
|
312
335
|
at: z.ZodString;
|
|
313
336
|
value: z.ZodString;
|
|
314
337
|
}, z.core.$strict>>>;
|
|
315
|
-
|
|
338
|
+
clients: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
316
339
|
paths: z.ZodArray<z.ZodString>;
|
|
317
|
-
|
|
340
|
+
base: z.ZodString;
|
|
341
|
+
names: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
318
342
|
why: z.ZodString;
|
|
319
343
|
at: z.ZodString;
|
|
320
344
|
value: z.ZodString;
|
|
@@ -334,6 +358,12 @@ export declare const VerifyAnswer: z.ZodObject<{
|
|
|
334
358
|
"repo-type": "repo-type";
|
|
335
359
|
}>>;
|
|
336
360
|
repoType: z.ZodOptional<z.ZodString>;
|
|
361
|
+
role: z.ZodOptional<z.ZodEnum<{
|
|
362
|
+
product: "product";
|
|
363
|
+
architecture: "architecture";
|
|
364
|
+
delivery: "delivery";
|
|
365
|
+
analysis: "analysis";
|
|
366
|
+
}>>;
|
|
337
367
|
sameAs: z.ZodOptional<z.ZodObject<{
|
|
338
368
|
id: z.ZodString;
|
|
339
369
|
verdict: z.ZodEnum<{
|
|
@@ -375,17 +405,17 @@ export declare const ScanVerifyProposal: z.ZodObject<{
|
|
|
375
405
|
why: z.ZodString;
|
|
376
406
|
at: z.ZodString;
|
|
377
407
|
}, z.core.$strict>>>;
|
|
378
|
-
|
|
408
|
+
prefixes: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
379
409
|
paths: z.ZodArray<z.ZodString>;
|
|
380
|
-
|
|
381
|
-
names: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
410
|
+
prefix: z.ZodString;
|
|
382
411
|
why: z.ZodString;
|
|
383
412
|
at: z.ZodString;
|
|
384
413
|
value: z.ZodString;
|
|
385
414
|
}, z.core.$strict>>>;
|
|
386
|
-
|
|
415
|
+
clients: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
387
416
|
paths: z.ZodArray<z.ZodString>;
|
|
388
|
-
|
|
417
|
+
base: z.ZodString;
|
|
418
|
+
names: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
389
419
|
why: z.ZodString;
|
|
390
420
|
at: z.ZodString;
|
|
391
421
|
value: z.ZodString;
|
|
@@ -402,17 +432,17 @@ export declare const ScanVerifyProposal: z.ZodObject<{
|
|
|
402
432
|
why: z.ZodString;
|
|
403
433
|
at: z.ZodString;
|
|
404
434
|
}, z.core.$strict>>>;
|
|
405
|
-
|
|
435
|
+
prefixes: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
406
436
|
paths: z.ZodArray<z.ZodString>;
|
|
407
|
-
|
|
408
|
-
names: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
437
|
+
prefix: z.ZodString;
|
|
409
438
|
why: z.ZodString;
|
|
410
439
|
at: z.ZodString;
|
|
411
440
|
value: z.ZodString;
|
|
412
441
|
}, z.core.$strict>>>;
|
|
413
|
-
|
|
442
|
+
clients: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
414
443
|
paths: z.ZodArray<z.ZodString>;
|
|
415
|
-
|
|
444
|
+
base: z.ZodString;
|
|
445
|
+
names: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
416
446
|
why: z.ZodString;
|
|
417
447
|
at: z.ZodString;
|
|
418
448
|
value: z.ZodString;
|
|
@@ -432,6 +462,12 @@ export declare const ScanVerifyProposal: z.ZodObject<{
|
|
|
432
462
|
"repo-type": "repo-type";
|
|
433
463
|
}>>;
|
|
434
464
|
repoType: z.ZodOptional<z.ZodString>;
|
|
465
|
+
role: z.ZodOptional<z.ZodEnum<{
|
|
466
|
+
product: "product";
|
|
467
|
+
architecture: "architecture";
|
|
468
|
+
delivery: "delivery";
|
|
469
|
+
analysis: "analysis";
|
|
470
|
+
}>>;
|
|
435
471
|
sameAs: z.ZodOptional<z.ZodObject<{
|
|
436
472
|
id: z.ZodString;
|
|
437
473
|
verdict: z.ZodEnum<{
|
|
@@ -466,17 +502,17 @@ export declare const ScanVerifyProposal: z.ZodObject<{
|
|
|
466
502
|
why: z.ZodString;
|
|
467
503
|
at: z.ZodString;
|
|
468
504
|
}, z.core.$strict>>>;
|
|
469
|
-
|
|
505
|
+
prefixes: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
470
506
|
paths: z.ZodArray<z.ZodString>;
|
|
471
|
-
|
|
472
|
-
names: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
507
|
+
prefix: z.ZodString;
|
|
473
508
|
why: z.ZodString;
|
|
474
509
|
at: z.ZodString;
|
|
475
510
|
value: z.ZodString;
|
|
476
511
|
}, z.core.$strict>>>;
|
|
477
|
-
|
|
512
|
+
clients: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
478
513
|
paths: z.ZodArray<z.ZodString>;
|
|
479
|
-
|
|
514
|
+
base: z.ZodString;
|
|
515
|
+
names: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
480
516
|
why: z.ZodString;
|
|
481
517
|
at: z.ZodString;
|
|
482
518
|
value: z.ZodString;
|
|
@@ -496,6 +532,12 @@ export declare const ScanVerifyProposal: z.ZodObject<{
|
|
|
496
532
|
"repo-type": "repo-type";
|
|
497
533
|
}>>;
|
|
498
534
|
repoType: z.ZodOptional<z.ZodString>;
|
|
535
|
+
role: z.ZodOptional<z.ZodEnum<{
|
|
536
|
+
product: "product";
|
|
537
|
+
architecture: "architecture";
|
|
538
|
+
delivery: "delivery";
|
|
539
|
+
analysis: "analysis";
|
|
540
|
+
}>>;
|
|
499
541
|
sameAs: z.ZodOptional<z.ZodObject<{
|
|
500
542
|
id: z.ZodString;
|
|
501
543
|
verdict: z.ZodEnum<{
|
|
@@ -2,8 +2,11 @@
|
|
|
2
2
|
* Current catalog schema version. Bumping it requires an ADR and a migration.
|
|
3
3
|
* Version 2 (ADR 0031) added the Capability kind and changed no existing field.
|
|
4
4
|
* Version 3 (ADR 0125) added `required` on a Schema field, optional, and changed no other field.
|
|
5
|
+
* Version 4 (ADR 0164) added `protobuf` to a Schema's `format`, and changed no other field.
|
|
6
|
+
* Version 5 (ADR 0181) added the evidence source `ai` and an evidence's `run` (a link the AI
|
|
7
|
+
* decided, flagged `joined-by-ai`), and changed no other field.
|
|
5
8
|
*
|
|
6
9
|
* It lives in its own file, with no schema beside it, so the command line can print it in its
|
|
7
10
|
* help without loading zod (`@maycombhq/core/light`); `./common.js` exports it with C1.
|
|
8
11
|
*/
|
|
9
|
-
export declare const SCHEMA_VERSION:
|
|
12
|
+
export declare const SCHEMA_VERSION: 5;
|
|
@@ -12,16 +12,30 @@ import { z } from "zod";
|
|
|
12
12
|
*
|
|
13
13
|
* Version 2 (ADR 0128) added `description` on a repo, optional, and changed no other field.
|
|
14
14
|
*/
|
|
15
|
-
export declare const WORKSPACE_SCHEMA_VERSION:
|
|
15
|
+
export declare const WORKSPACE_SCHEMA_VERSION: 3;
|
|
16
16
|
/** Every workspace-file schema version a reader accepts, oldest first. */
|
|
17
|
-
export declare const SUPPORTED_WORKSPACE_SCHEMA_VERSIONS: readonly [1, 2];
|
|
17
|
+
export declare const SUPPORTED_WORKSPACE_SCHEMA_VERSIONS: readonly [1, 2, 3];
|
|
18
18
|
/**
|
|
19
|
-
* A workspace file's schema version. Version-1 files differ from version
|
|
20
|
-
* (
|
|
21
|
-
*
|
|
19
|
+
* A workspace file's schema version. Version-1 and version-2 files differ from version 3 only in
|
|
20
|
+
* this number (version 2 let a repo say what it is, version 3 its base path; nothing they hold
|
|
21
|
+
* changed meaning), so they are read as they are and come back as version 3 in memory; writers
|
|
22
|
+
* always write the current version, and `atticus upgrade` rewrites old files.
|
|
22
23
|
*/
|
|
23
|
-
export declare const WorkspaceSchemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
|
|
24
|
+
export declare const WorkspaceSchemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>;
|
|
25
|
+
/**
|
|
26
|
+
* The path a repo's routes sit under on its hosts (ADR 0134): what a platform's ingress or a
|
|
27
|
+
* shared gateway host puts in front of them (`/forge/limits`, `/forge-onboarding/1.0`). Plain
|
|
28
|
+
* segments, a leading slash and no trailing one.
|
|
29
|
+
*/
|
|
30
|
+
export declare const BasePath: z.ZodString;
|
|
24
31
|
export declare const GitRef: z.ZodString;
|
|
32
|
+
/**
|
|
33
|
+
* A host a component answers on, as calls name it: "ledger-api.apps.bank.internal", or with *
|
|
34
|
+
* for one label or part of one, "pay-api-*.apps.bank.internal". Lower case. Without a port it
|
|
35
|
+
* takes calls on any port; with one ("localhost:9966", ADR 0088) only calls on that port, so
|
|
36
|
+
* two services on one host are told apart.
|
|
37
|
+
*/
|
|
38
|
+
export declare const HostPattern: z.ZodString;
|
|
25
39
|
/**
|
|
26
40
|
* A URL's host (lower case) and port (the scheme's when it names none), or undefined for a
|
|
27
41
|
* path with no host.
|
|
@@ -99,15 +113,17 @@ export declare const ManifestRepo: z.ZodObject<{
|
|
|
99
113
|
build: z.ZodOptional<z.ZodString>;
|
|
100
114
|
archived: z.ZodDefault<z.ZodBoolean>;
|
|
101
115
|
hosts: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
116
|
+
basePath: z.ZodOptional<z.ZodString>;
|
|
102
117
|
modules: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
103
118
|
path: z.ZodString;
|
|
104
119
|
component: z.ZodString;
|
|
105
120
|
hosts: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
121
|
+
basePath: z.ZodOptional<z.ZodString>;
|
|
106
122
|
}, z.core.$strict>>>;
|
|
107
123
|
}, z.core.$strict>;
|
|
108
124
|
export type ManifestRepo = z.infer<typeof ManifestRepo>;
|
|
109
125
|
export declare const RepoManifest: z.ZodObject<{
|
|
110
|
-
schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
|
|
126
|
+
schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>;
|
|
111
127
|
platform: z.ZodString;
|
|
112
128
|
repos: z.ZodArray<z.ZodObject<{
|
|
113
129
|
id: z.ZodString;
|
|
@@ -137,10 +153,12 @@ export declare const RepoManifest: z.ZodObject<{
|
|
|
137
153
|
build: z.ZodOptional<z.ZodString>;
|
|
138
154
|
archived: z.ZodDefault<z.ZodBoolean>;
|
|
139
155
|
hosts: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
156
|
+
basePath: z.ZodOptional<z.ZodString>;
|
|
140
157
|
modules: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
141
158
|
path: z.ZodString;
|
|
142
159
|
component: z.ZodString;
|
|
143
160
|
hosts: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
161
|
+
basePath: z.ZodOptional<z.ZodString>;
|
|
144
162
|
}, z.core.$strict>>>;
|
|
145
163
|
}, z.core.$strict>>;
|
|
146
164
|
}, z.core.$strict>;
|
|
@@ -212,7 +230,7 @@ export declare const ChangeRepo: z.ZodObject<{
|
|
|
212
230
|
}, z.core.$strict>;
|
|
213
231
|
export type ChangeRepo = z.infer<typeof ChangeRepo>;
|
|
214
232
|
export declare const ChangeRepos: z.ZodObject<{
|
|
215
|
-
schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
|
|
233
|
+
schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>;
|
|
216
234
|
change: z.ZodString;
|
|
217
235
|
repos: z.ZodArray<z.ZodObject<{
|
|
218
236
|
id: z.ZodString;
|
|
@@ -270,7 +288,7 @@ export declare const OutcomeMeasure: z.ZodObject<{
|
|
|
270
288
|
}, z.core.$strict>;
|
|
271
289
|
export type OutcomeMeasure = z.infer<typeof OutcomeMeasure>;
|
|
272
290
|
export declare const ChangeOutcomes: z.ZodObject<{
|
|
273
|
-
schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
|
|
291
|
+
schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>;
|
|
274
292
|
change: z.ZodString;
|
|
275
293
|
measures: z.ZodArray<z.ZodObject<{
|
|
276
294
|
id: z.ZodString;
|
|
@@ -290,7 +308,7 @@ export type ChangeOutcomes = z.infer<typeof ChangeOutcomes>;
|
|
|
290
308
|
* Home shows the setup checklist.
|
|
291
309
|
*/
|
|
292
310
|
export declare const CatalogBaseline: z.ZodObject<{
|
|
293
|
-
schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
|
|
311
|
+
schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>;
|
|
294
312
|
acceptedBy: z.ZodString;
|
|
295
313
|
acceptedAt: z.ZodISODateTime;
|
|
296
314
|
kinds: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
@@ -303,7 +321,7 @@ export type CatalogBaseline = z.infer<typeof CatalogBaseline>;
|
|
|
303
321
|
* the migrations it has had. An older Atticus refuses to upgrade a metarepo a newer one wrote.
|
|
304
322
|
*/
|
|
305
323
|
export declare const MetarepoStamp: z.ZodObject<{
|
|
306
|
-
schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
|
|
324
|
+
schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>;
|
|
307
325
|
atticus: z.ZodString;
|
|
308
326
|
upgradedAt: z.ZodISODateTime;
|
|
309
327
|
upgradedBy: z.ZodString;
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { CatalogRecord } from "./catalog.js";
|
|
3
|
+
import { type FactEnd, type FactJoinOutside, type JoinRepo } from "./facts-join.js";
|
|
4
|
+
import type { Fact } from "./schema/facts.js";
|
|
5
|
+
/**
|
|
6
|
+
* Another team's Atticus map, read-only (plan item O3, ADR 0160). A team that runs Atticus on its
|
|
7
|
+
* own repos shares its verified facts; a person brings them in as files (`atticus join shared
|
|
8
|
+
* import <their metarepo>`), and only their entries are kept, under `shared/<team>/` in this
|
|
9
|
+
* metarepo: `map.yaml` (whose map it is, the system of our profile it stands for, their commit)
|
|
10
|
+
* and `facts/<repo>.jsonl` (their entry facts, quotes redacted).
|
|
11
|
+
*
|
|
12
|
+
* A call the estate join leaves to that system (its `outside` list: by a person's answer, the
|
|
13
|
+
* call's `to`, or a host the system's aliases name) is matched to the one entry of their map that
|
|
14
|
+
* serves it, by method and path the way the join matches our own (a base path their manifest
|
|
15
|
+
* gives in front, parameters folded), gRPC and SOAP by name. One is a match; two or more equally
|
|
16
|
+
* good, a question for a person; none, a gap: their map serves nothing like it.
|
|
17
|
+
*
|
|
18
|
+
* A match marks the call's Interface (still to their system, never to a record of theirs) with
|
|
19
|
+
* `joined-to-shared-map` and an evidence entry on their entry's line, at their repo and commit,
|
|
20
|
+
* `by` their team. Their facts are never verified, corrected or reported on here: they are theirs.
|
|
21
|
+
* Pure, apart from `readSharedMaps`, which reads the files.
|
|
22
|
+
*/
|
|
23
|
+
export declare const SHARED_MAP_SCHEMA_VERSION: 1;
|
|
24
|
+
/** The `extractor` of the evidence a shared map adds, so a write takes the last write's off. */
|
|
25
|
+
export declare const SHARED_MAP_EVIDENCE = "atticus-shared@1";
|
|
26
|
+
/** A call to a system whose shared map serves nothing like it (a gap on the Interface). */
|
|
27
|
+
export declare const NOT_IN_SHARED_MAP = "not-in-shared-map";
|
|
28
|
+
/** The flags this module writes, and takes off again before every write. */
|
|
29
|
+
export declare const SHARED_MAP_FLAGS: ReadonlySet<string>;
|
|
30
|
+
/** One of their repos, as their manifest gives it and as their facts were read. */
|
|
31
|
+
export declare const SharedMapRepo: z.ZodObject<{
|
|
32
|
+
repo: z.ZodString;
|
|
33
|
+
component: z.ZodOptional<z.ZodString>;
|
|
34
|
+
commit: z.ZodOptional<z.ZodString>;
|
|
35
|
+
hosts: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
36
|
+
basePath: z.ZodOptional<z.ZodString>;
|
|
37
|
+
entries: z.ZodNumber;
|
|
38
|
+
}, z.core.$strict>;
|
|
39
|
+
export type SharedMapRepoT = z.infer<typeof SharedMapRepo>;
|
|
40
|
+
/** `shared/<team>/map.yaml`: whose map it is, what it stands for, and at which commit. */
|
|
41
|
+
export declare const SharedMapFile: z.ZodObject<{
|
|
42
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
43
|
+
team: z.ZodString;
|
|
44
|
+
name: z.ZodString;
|
|
45
|
+
system: z.ZodString;
|
|
46
|
+
source: z.ZodOptional<z.ZodString>;
|
|
47
|
+
commit: z.ZodString;
|
|
48
|
+
importedAt: z.ZodISODateTime;
|
|
49
|
+
repos: z.ZodArray<z.ZodObject<{
|
|
50
|
+
repo: z.ZodString;
|
|
51
|
+
component: z.ZodOptional<z.ZodString>;
|
|
52
|
+
commit: z.ZodOptional<z.ZodString>;
|
|
53
|
+
hosts: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
54
|
+
basePath: z.ZodOptional<z.ZodString>;
|
|
55
|
+
entries: z.ZodNumber;
|
|
56
|
+
}, z.core.$strict>>;
|
|
57
|
+
}, z.core.$strict>;
|
|
58
|
+
export type SharedMapFileT = z.infer<typeof SharedMapFile>;
|
|
59
|
+
/** A shared map as the join reads it: the file, with each repo's entry facts. */
|
|
60
|
+
export interface SharedMap {
|
|
61
|
+
team: string;
|
|
62
|
+
name: string;
|
|
63
|
+
system: string;
|
|
64
|
+
/** Their metarepo's commit. */
|
|
65
|
+
commit: string;
|
|
66
|
+
repos: readonly (SharedMapRepoT & {
|
|
67
|
+
facts: readonly Fact[];
|
|
68
|
+
})[];
|
|
69
|
+
}
|
|
70
|
+
/** An entry of their map: their repo, fact, component, line and the commit their code is at. */
|
|
71
|
+
export interface SharedEntryEnd extends FactEnd {
|
|
72
|
+
team: string;
|
|
73
|
+
commit?: string;
|
|
74
|
+
}
|
|
75
|
+
export interface SharedJoinMatch {
|
|
76
|
+
call: FactEnd;
|
|
77
|
+
team: string;
|
|
78
|
+
system: string;
|
|
79
|
+
entry: SharedEntryEnd;
|
|
80
|
+
method?: string;
|
|
81
|
+
/** The path (or gRPC/SOAP name) their entry serves, as it writes it. */
|
|
82
|
+
path: string;
|
|
83
|
+
}
|
|
84
|
+
export interface SharedJoinGap {
|
|
85
|
+
call: FactEnd;
|
|
86
|
+
team: string;
|
|
87
|
+
system: string;
|
|
88
|
+
method?: string;
|
|
89
|
+
path: string;
|
|
90
|
+
message: string;
|
|
91
|
+
}
|
|
92
|
+
export interface SharedJoinAsk {
|
|
93
|
+
call: FactEnd;
|
|
94
|
+
team: string;
|
|
95
|
+
system: string;
|
|
96
|
+
question: string;
|
|
97
|
+
candidates: SharedEntryEnd[];
|
|
98
|
+
}
|
|
99
|
+
export interface SharedJoinResult {
|
|
100
|
+
matches: SharedJoinMatch[];
|
|
101
|
+
gaps: SharedJoinGap[];
|
|
102
|
+
asks: SharedJoinAsk[];
|
|
103
|
+
}
|
|
104
|
+
export interface JoinSharedMapsInput {
|
|
105
|
+
/** The calls the estate join left to a system outside the estate (`FactsJoinResult.outside`). */
|
|
106
|
+
outside: readonly FactJoinOutside[];
|
|
107
|
+
/** Our repos, for the call facts and the config facts their hosts come from. */
|
|
108
|
+
repos: readonly JoinRepo[];
|
|
109
|
+
maps: readonly SharedMap[];
|
|
110
|
+
/** Our profiles' outside systems: id, name and aliases, to read the target a call was left to. */
|
|
111
|
+
systems: readonly {
|
|
112
|
+
id: string;
|
|
113
|
+
name: string;
|
|
114
|
+
aliases: readonly string[];
|
|
115
|
+
}[];
|
|
116
|
+
}
|
|
117
|
+
/** Match every call left to a system with a shared map to the entry of their map that serves it. */
|
|
118
|
+
export declare function joinSharedMaps(input: JoinSharedMapsInput): SharedJoinResult;
|
|
119
|
+
/** The records with every mark a shared map made taken off (evidence and flags). */
|
|
120
|
+
export declare function stripSharedMaps(records: readonly CatalogRecord[]): CatalogRecord[];
|
|
121
|
+
/**
|
|
122
|
+
* The records with the marks put on: the Interface a matched call made (from the call's
|
|
123
|
+
* component, to the system, citing the call's line) gets `joined-to-shared-map` and their entry's
|
|
124
|
+
* line as callee evidence, at their repo and commit, `by` their team; a call their map has no
|
|
125
|
+
* entry for gets `not-in-shared-map`. Its confidence, its `to` and its id never change: the
|
|
126
|
+
* Interface stays ours, to their system, and nothing of theirs becomes a record.
|
|
127
|
+
*/
|
|
128
|
+
export declare function applySharedMaps(records: readonly CatalogRecord[], result: SharedJoinResult, systems: JoinSharedMapsInput["systems"]): CatalogRecord[];
|
|
129
|
+
/** The part of a shared join about one repo's calls. */
|
|
130
|
+
export declare function sharedJoinAbout(all: SharedJoinResult, repo: string): SharedJoinResult;
|
|
131
|
+
/** A shared map on disk that couldn't be read, with why. */
|
|
132
|
+
export interface SharedMapProblem {
|
|
133
|
+
team: string;
|
|
134
|
+
message: string;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Every shared map under `shared/` (ADR 0160): each `<team>/map.yaml` and its `facts/<repo>.jsonl`,
|
|
138
|
+
* only their entry facts kept. A folder that doesn't read is a problem, said, and left out; a
|
|
139
|
+
* metarepo with none gives none. Files only.
|
|
140
|
+
*/
|
|
141
|
+
export declare function readSharedMaps(root: string): Promise<{
|
|
142
|
+
maps: (SharedMap & {
|
|
143
|
+
file: SharedMapFileT;
|
|
144
|
+
})[];
|
|
145
|
+
problems: SharedMapProblem[];
|
|
146
|
+
}>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The stack helpers (plan item G4): code that knows one stack or framework and helps the read,
|
|
3
|
+
* none of which the read needs. The assistant reads the code and cites every fact (ADR 0124);
|
|
4
|
+
* each helper only saves it work or cross-checks it, and each can be switched off:
|
|
5
|
+
*
|
|
6
|
+
* - `framework-models`: the frameworks taught in `org-pack/frameworks/` (ADR 0054, `atticus
|
|
7
|
+
* frameworks learn`), given to the reader as what a house annotation or client means, and
|
|
8
|
+
* `atticus verify`'s offer to learn a house framework. Off, the reader gets no model: it reads
|
|
9
|
+
* the house layer as ordinary code, cites the wrapper's call line with the path built in
|
|
10
|
+
* `cite.with`, and writes a question naming an annotation it can't place, as FACT_RULES say.
|
|
11
|
+
* - `gateway-walk`: the join through gateway routes to the service behind them (ADR 0124
|
|
12
|
+
* addenda A-gateway, A-gateway2). Off, a call that lands on a gateway route is joined to that
|
|
13
|
+
* route, the gateway's repo; the route's forwarding call is joined on its own, so the caller's
|
|
14
|
+
* link stops one hop short.
|
|
15
|
+
* - `readers`: the built-in readers and dialects of a scan (the cross-check of ADR 0124 §3) and
|
|
16
|
+
* the OpenAPI reader behind `atticus verify --skipped`'s uncovered spec operations (R1). Off, a
|
|
17
|
+
* repo with verified facts is projected from them alone, a repo with none gives no records,
|
|
18
|
+
* and verify lists no uncovered operations.
|
|
19
|
+
* - `derived-names`: the verifier's per-framework naming rules (`verify/src/derived.ts`: an
|
|
20
|
+
* ORM's table for an entity, Rails' routes, Spring Data REST's paths). Off, a claim must be
|
|
21
|
+
* written on its cited line or a `cite.with` part, so a reader cites the `@Table` or
|
|
22
|
+
* `table_name` line, or the route line, rather than the entity's class.
|
|
23
|
+
*
|
|
24
|
+
* Switched off for one run with `ATTICUS_HELPERS_OFF` (a comma list of the names, or `all`);
|
|
25
|
+
* the pure functions take an option of their own.
|
|
26
|
+
*/
|
|
27
|
+
export declare const STACK_HELPERS: readonly ["framework-models", "gateway-walk", "readers", "derived-names"];
|
|
28
|
+
export type StackHelper = (typeof STACK_HELPERS)[number];
|
|
29
|
+
/** The helpers switched off: `ATTICUS_HELPERS_OFF=all` or `gateway-walk,readers`. Unknown names are ignored. */
|
|
30
|
+
export declare function stackHelpersOff(env?: Readonly<Record<string, string | undefined>>): Set<StackHelper>;
|
|
31
|
+
/** Whether a helper is on for this run. */
|
|
32
|
+
export declare const helperOn: (h: StackHelper, env?: Readonly<Record<string, string | undefined>>) => boolean;
|