@maycombhq/sdk 2.0.0-beta.10 → 2.0.0-beta.12
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 +522 -11
- package/npm/core/catalog.d.ts +66 -64
- package/npm/core/contract-check.d.ts +251 -0
- package/npm/core/facts-join-prototype.d.ts +5 -0
- package/npm/core/facts-join.d.ts +27 -0
- package/npm/core/facts-terms.d.ts +108 -0
- package/npm/core/fs.d.ts +1 -1
- package/npm/core/host-questions.d.ts +45 -0
- package/npm/core/index.d.ts +4 -0
- package/npm/core/merge.d.ts +7 -0
- package/npm/core/metarepo.d.ts +1 -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 +1 -1
- package/npm/core/profile-migrate.d.ts +11 -0
- package/npm/core/questions.d.ts +27 -1
- package/npm/core/schema/common.d.ts +8 -8
- package/npm/core/schema/conventions.d.ts +7 -2
- package/npm/core/schema/fact-corrections.d.ts +1 -0
- package/npm/core/schema/facts.d.ts +284 -2
- package/npm/core/schema/kinds.d.ts +66 -64
- package/npm/core/schema/orgpack.d.ts +9 -1
- package/npm/core/schema/question.d.ts +37 -2
- package/npm/core/schema/repo-type.d.ts +20 -2
- package/npm/core/schema/scan-verify.d.ts +45 -45
- package/npm/core/schema/version.d.ts +2 -1
- package/npm/index.js +2309 -1983
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export declare const FACT_KINDS: readonly ["entry", "call", "store", "field", "deploy", "config", "framework", "flow"];
|
|
2
|
+
export declare const FACT_KINDS: readonly ["entry", "call", "store", "field", "deploy", "config", "framework", "flow", "term"];
|
|
3
3
|
export type FactKind = (typeof FACT_KINDS)[number];
|
|
4
4
|
/** A fact's id: any slug the assistant chooses; the projection makes catalog ids from the claim. */
|
|
5
5
|
export declare const FactId: z.ZodString;
|
|
@@ -13,6 +13,21 @@ export declare const CitePart: z.ZodObject<{
|
|
|
13
13
|
line: z.ZodNumber;
|
|
14
14
|
value: z.ZodString;
|
|
15
15
|
}, z.core.$strict>;
|
|
16
|
+
/**
|
|
17
|
+
* The line a call's `auth` or `tls` rests on (ADR 0163), with the other lines it is set from
|
|
18
|
+
* (`with`, as a claim's): the line that builds the client certificate's context the cited line
|
|
19
|
+
* passes. Each part names its own value, as a `cite.with` part does.
|
|
20
|
+
*/
|
|
21
|
+
export declare const SecurityCite: z.ZodObject<{
|
|
22
|
+
file: z.ZodString;
|
|
23
|
+
line: z.ZodNumber;
|
|
24
|
+
value: z.ZodString;
|
|
25
|
+
with: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
26
|
+
file: z.ZodString;
|
|
27
|
+
line: z.ZodNumber;
|
|
28
|
+
value: z.ZodString;
|
|
29
|
+
}, z.core.$strict>>>;
|
|
30
|
+
}, z.core.$strict>;
|
|
16
31
|
/**
|
|
17
32
|
* Where a fact rests. `value` is what the verifier looks for on the line (the route, the topic,
|
|
18
33
|
* the table, the field, the host or the key); `quote` is the line's text, or enough of it, as a
|
|
@@ -171,6 +186,9 @@ export declare const EntryFact: z.ZodObject<{
|
|
|
171
186
|
kind: z.ZodLiteral<"entry">;
|
|
172
187
|
}, z.core.$strict>;
|
|
173
188
|
export declare const CALL_TYPES: readonly ["rest", "grpc", "soap", "graphql", "event-topic", "mq-queue", "sftp", "webhook"];
|
|
189
|
+
/** A call's transport security (ADR 0163). */
|
|
190
|
+
export declare const CALL_TLS: readonly ["mtls", "tls", "none"];
|
|
191
|
+
export type CallTls = (typeof CALL_TLS)[number];
|
|
174
192
|
export declare const CallFact: z.ZodObject<{
|
|
175
193
|
callType: z.ZodEnum<{
|
|
176
194
|
rest: "rest";
|
|
@@ -192,6 +210,39 @@ export declare const CallFact: z.ZodObject<{
|
|
|
192
210
|
sync: "sync";
|
|
193
211
|
async: "async";
|
|
194
212
|
}>>;
|
|
213
|
+
auth: z.ZodOptional<z.ZodEnum<{
|
|
214
|
+
none: "none";
|
|
215
|
+
oauth2: "oauth2";
|
|
216
|
+
mtls: "mtls";
|
|
217
|
+
"api-key": "api-key";
|
|
218
|
+
basic: "basic";
|
|
219
|
+
other: "other";
|
|
220
|
+
}>>;
|
|
221
|
+
authCite: z.ZodOptional<z.ZodObject<{
|
|
222
|
+
file: z.ZodString;
|
|
223
|
+
line: z.ZodNumber;
|
|
224
|
+
value: z.ZodString;
|
|
225
|
+
with: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
226
|
+
file: z.ZodString;
|
|
227
|
+
line: z.ZodNumber;
|
|
228
|
+
value: z.ZodString;
|
|
229
|
+
}, z.core.$strict>>>;
|
|
230
|
+
}, z.core.$strict>>;
|
|
231
|
+
tls: z.ZodOptional<z.ZodEnum<{
|
|
232
|
+
none: "none";
|
|
233
|
+
mtls: "mtls";
|
|
234
|
+
tls: "tls";
|
|
235
|
+
}>>;
|
|
236
|
+
tlsCite: z.ZodOptional<z.ZodObject<{
|
|
237
|
+
file: z.ZodString;
|
|
238
|
+
line: z.ZodNumber;
|
|
239
|
+
value: z.ZodString;
|
|
240
|
+
with: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
241
|
+
file: z.ZodString;
|
|
242
|
+
line: z.ZodNumber;
|
|
243
|
+
value: z.ZodString;
|
|
244
|
+
}, z.core.$strict>>>;
|
|
245
|
+
}, z.core.$strict>>;
|
|
195
246
|
id: z.ZodString;
|
|
196
247
|
repo: z.ZodString;
|
|
197
248
|
commit: z.ZodString;
|
|
@@ -369,9 +420,15 @@ export declare const DeployFact: z.ZodObject<{
|
|
|
369
420
|
* The facts file's shape version (ADR 0143). No line carries it: a file written before has no
|
|
370
421
|
* number, reads as version 1 and parses unchanged, every field added since being optional.
|
|
371
422
|
* 1: the shapes of ADR 0124 and its addenda. 2: a deploy fact's `host`, `basePath` and `exposes`.
|
|
423
|
+
* 3 (ADR 0163): the `term` kind, and a call's `auth`, `authCite`, `tls` and `tlsCite`.
|
|
372
424
|
*/
|
|
373
|
-
export declare const FACTS_SCHEMA_VERSION:
|
|
425
|
+
export declare const FACTS_SCHEMA_VERSION: 3;
|
|
374
426
|
export declare const SETTING_KINDS: readonly ["timeout", "retry", "circuit-breaker", "rate-limit", "pool", "cache-ttl", "feature-flag", "config", "schedule"];
|
|
427
|
+
/**
|
|
428
|
+
* Whether a key and its value look like a secret: the key's last part ends in a secret word,
|
|
429
|
+
* and the value is neither a reference to where the secret lives nor a flag or a mode.
|
|
430
|
+
*/
|
|
431
|
+
export declare function looksLikeSecret(key: string, value: string | undefined): boolean;
|
|
375
432
|
export declare const ConfigFact: z.ZodObject<{
|
|
376
433
|
settingKind: z.ZodDefault<z.ZodEnum<{
|
|
377
434
|
config: "config";
|
|
@@ -468,6 +525,73 @@ export declare const FrameworkFact: z.ZodObject<{
|
|
|
468
525
|
}>>;
|
|
469
526
|
kind: z.ZodLiteral<"framework">;
|
|
470
527
|
}, z.core.$strict>;
|
|
528
|
+
/**
|
|
529
|
+
* What a term the organisation uses says about the repo that writes it (ADR 0163): `owner`, the
|
|
530
|
+
* value names this repo's own system (an owner block, an `appId` of its own); `consumer`, it names
|
|
531
|
+
* a system let in or served (an entry of a `consumers` list); `none`, it names neither (a
|
|
532
|
+
* cost centre, a support group); `unknown`, nothing says yet, which becomes a question.
|
|
533
|
+
*/
|
|
534
|
+
export declare const TERM_ROLES: readonly ["owner", "consumer", "none", "unknown"];
|
|
535
|
+
export type TermRole = (typeof TERM_ROLES)[number];
|
|
536
|
+
/**
|
|
537
|
+
* A term of the organisation's, as a repo writes it (ADR 0163): an identifier such as an
|
|
538
|
+
* application id in an access list, a CMDB id, a cost centre. Atticus knows no term itself: what
|
|
539
|
+
* one means comes from the notes the organisation writes on a repo type (or org-wide), in its own
|
|
540
|
+
* words, which the reader is handed; with no note, the reader records the identifiers it meets
|
|
541
|
+
* with `role: unknown`, and they are asked about once per term and repo type.
|
|
542
|
+
*
|
|
543
|
+
* `cite` is the value's line (the verifier looks for `value` there). `meaning` is the line that
|
|
544
|
+
* gives it its role (the `"consumers": [` line, an owner block's key), in the same file, at or
|
|
545
|
+
* above the value's line; an owner or consumer needs one. A kind of its own: its subject is an
|
|
546
|
+
* identifier no other kind holds, and the joins read it across repos.
|
|
547
|
+
*/
|
|
548
|
+
export declare const TermFact: z.ZodObject<{
|
|
549
|
+
term: z.ZodString;
|
|
550
|
+
value: z.ZodString;
|
|
551
|
+
role: z.ZodEnum<{
|
|
552
|
+
unknown: "unknown";
|
|
553
|
+
owner: "owner";
|
|
554
|
+
none: "none";
|
|
555
|
+
consumer: "consumer";
|
|
556
|
+
}>;
|
|
557
|
+
note: z.ZodOptional<z.ZodString>;
|
|
558
|
+
meaning: z.ZodOptional<z.ZodObject<{
|
|
559
|
+
file: z.ZodString;
|
|
560
|
+
line: z.ZodNumber;
|
|
561
|
+
value: z.ZodString;
|
|
562
|
+
}, z.core.$strict>>;
|
|
563
|
+
id: z.ZodString;
|
|
564
|
+
repo: z.ZodString;
|
|
565
|
+
commit: z.ZodString;
|
|
566
|
+
component: z.ZodOptional<z.ZodString>;
|
|
567
|
+
cite: z.ZodObject<{
|
|
568
|
+
file: z.ZodString;
|
|
569
|
+
line: z.ZodNumber;
|
|
570
|
+
value: z.ZodString;
|
|
571
|
+
quote: z.ZodOptional<z.ZodString>;
|
|
572
|
+
with: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
573
|
+
file: z.ZodString;
|
|
574
|
+
line: z.ZodNumber;
|
|
575
|
+
value: z.ZodString;
|
|
576
|
+
}, z.core.$strict>>>;
|
|
577
|
+
}, z.core.$strict>;
|
|
578
|
+
verified: z.ZodDefault<z.ZodEnum<{
|
|
579
|
+
line: "line";
|
|
580
|
+
none: "none";
|
|
581
|
+
person: "person";
|
|
582
|
+
sample: "sample";
|
|
583
|
+
}>>;
|
|
584
|
+
by: z.ZodDefault<z.ZodEnum<{
|
|
585
|
+
person: "person";
|
|
586
|
+
assistant: "assistant";
|
|
587
|
+
reader: "reader";
|
|
588
|
+
}>>;
|
|
589
|
+
conf: z.ZodDefault<z.ZodEnum<{
|
|
590
|
+
inferred: "inferred";
|
|
591
|
+
declared: "declared";
|
|
592
|
+
}>>;
|
|
593
|
+
kind: z.ZodLiteral<"term">;
|
|
594
|
+
}, z.core.$strict>;
|
|
471
595
|
export declare const FlowFactStep: z.ZodObject<{
|
|
472
596
|
kind: z.ZodEnum<{
|
|
473
597
|
transform: "transform";
|
|
@@ -707,6 +831,39 @@ export declare const Fact: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
707
831
|
sync: "sync";
|
|
708
832
|
async: "async";
|
|
709
833
|
}>>;
|
|
834
|
+
auth: z.ZodOptional<z.ZodEnum<{
|
|
835
|
+
none: "none";
|
|
836
|
+
oauth2: "oauth2";
|
|
837
|
+
mtls: "mtls";
|
|
838
|
+
"api-key": "api-key";
|
|
839
|
+
basic: "basic";
|
|
840
|
+
other: "other";
|
|
841
|
+
}>>;
|
|
842
|
+
authCite: z.ZodOptional<z.ZodObject<{
|
|
843
|
+
file: z.ZodString;
|
|
844
|
+
line: z.ZodNumber;
|
|
845
|
+
value: z.ZodString;
|
|
846
|
+
with: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
847
|
+
file: z.ZodString;
|
|
848
|
+
line: z.ZodNumber;
|
|
849
|
+
value: z.ZodString;
|
|
850
|
+
}, z.core.$strict>>>;
|
|
851
|
+
}, z.core.$strict>>;
|
|
852
|
+
tls: z.ZodOptional<z.ZodEnum<{
|
|
853
|
+
none: "none";
|
|
854
|
+
mtls: "mtls";
|
|
855
|
+
tls: "tls";
|
|
856
|
+
}>>;
|
|
857
|
+
tlsCite: z.ZodOptional<z.ZodObject<{
|
|
858
|
+
file: z.ZodString;
|
|
859
|
+
line: z.ZodNumber;
|
|
860
|
+
value: z.ZodString;
|
|
861
|
+
with: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
862
|
+
file: z.ZodString;
|
|
863
|
+
line: z.ZodNumber;
|
|
864
|
+
value: z.ZodString;
|
|
865
|
+
}, z.core.$strict>>>;
|
|
866
|
+
}, z.core.$strict>>;
|
|
710
867
|
id: z.ZodString;
|
|
711
868
|
repo: z.ZodString;
|
|
712
869
|
commit: z.ZodString;
|
|
@@ -1038,6 +1195,52 @@ export declare const Fact: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1038
1195
|
declared: "declared";
|
|
1039
1196
|
}>>;
|
|
1040
1197
|
kind: z.ZodLiteral<"flow">;
|
|
1198
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1199
|
+
term: z.ZodString;
|
|
1200
|
+
value: z.ZodString;
|
|
1201
|
+
role: z.ZodEnum<{
|
|
1202
|
+
unknown: "unknown";
|
|
1203
|
+
owner: "owner";
|
|
1204
|
+
none: "none";
|
|
1205
|
+
consumer: "consumer";
|
|
1206
|
+
}>;
|
|
1207
|
+
note: z.ZodOptional<z.ZodString>;
|
|
1208
|
+
meaning: z.ZodOptional<z.ZodObject<{
|
|
1209
|
+
file: z.ZodString;
|
|
1210
|
+
line: z.ZodNumber;
|
|
1211
|
+
value: z.ZodString;
|
|
1212
|
+
}, z.core.$strict>>;
|
|
1213
|
+
id: z.ZodString;
|
|
1214
|
+
repo: z.ZodString;
|
|
1215
|
+
commit: z.ZodString;
|
|
1216
|
+
component: z.ZodOptional<z.ZodString>;
|
|
1217
|
+
cite: z.ZodObject<{
|
|
1218
|
+
file: z.ZodString;
|
|
1219
|
+
line: z.ZodNumber;
|
|
1220
|
+
value: z.ZodString;
|
|
1221
|
+
quote: z.ZodOptional<z.ZodString>;
|
|
1222
|
+
with: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1223
|
+
file: z.ZodString;
|
|
1224
|
+
line: z.ZodNumber;
|
|
1225
|
+
value: z.ZodString;
|
|
1226
|
+
}, z.core.$strict>>>;
|
|
1227
|
+
}, z.core.$strict>;
|
|
1228
|
+
verified: z.ZodDefault<z.ZodEnum<{
|
|
1229
|
+
line: "line";
|
|
1230
|
+
none: "none";
|
|
1231
|
+
person: "person";
|
|
1232
|
+
sample: "sample";
|
|
1233
|
+
}>>;
|
|
1234
|
+
by: z.ZodDefault<z.ZodEnum<{
|
|
1235
|
+
person: "person";
|
|
1236
|
+
assistant: "assistant";
|
|
1237
|
+
reader: "reader";
|
|
1238
|
+
}>>;
|
|
1239
|
+
conf: z.ZodDefault<z.ZodEnum<{
|
|
1240
|
+
inferred: "inferred";
|
|
1241
|
+
declared: "declared";
|
|
1242
|
+
}>>;
|
|
1243
|
+
kind: z.ZodLiteral<"term">;
|
|
1041
1244
|
}, z.core.$strict>], "kind">;
|
|
1042
1245
|
export type Fact = z.infer<typeof Fact>;
|
|
1043
1246
|
export type FactOf<K extends FactKind> = Extract<Fact, {
|
|
@@ -1157,6 +1360,39 @@ export declare const FactsFile: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
1157
1360
|
sync: "sync";
|
|
1158
1361
|
async: "async";
|
|
1159
1362
|
}>>;
|
|
1363
|
+
auth: z.ZodOptional<z.ZodEnum<{
|
|
1364
|
+
none: "none";
|
|
1365
|
+
oauth2: "oauth2";
|
|
1366
|
+
mtls: "mtls";
|
|
1367
|
+
"api-key": "api-key";
|
|
1368
|
+
basic: "basic";
|
|
1369
|
+
other: "other";
|
|
1370
|
+
}>>;
|
|
1371
|
+
authCite: z.ZodOptional<z.ZodObject<{
|
|
1372
|
+
file: z.ZodString;
|
|
1373
|
+
line: z.ZodNumber;
|
|
1374
|
+
value: z.ZodString;
|
|
1375
|
+
with: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1376
|
+
file: z.ZodString;
|
|
1377
|
+
line: z.ZodNumber;
|
|
1378
|
+
value: z.ZodString;
|
|
1379
|
+
}, z.core.$strict>>>;
|
|
1380
|
+
}, z.core.$strict>>;
|
|
1381
|
+
tls: z.ZodOptional<z.ZodEnum<{
|
|
1382
|
+
none: "none";
|
|
1383
|
+
mtls: "mtls";
|
|
1384
|
+
tls: "tls";
|
|
1385
|
+
}>>;
|
|
1386
|
+
tlsCite: z.ZodOptional<z.ZodObject<{
|
|
1387
|
+
file: z.ZodString;
|
|
1388
|
+
line: z.ZodNumber;
|
|
1389
|
+
value: z.ZodString;
|
|
1390
|
+
with: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1391
|
+
file: z.ZodString;
|
|
1392
|
+
line: z.ZodNumber;
|
|
1393
|
+
value: z.ZodString;
|
|
1394
|
+
}, z.core.$strict>>>;
|
|
1395
|
+
}, z.core.$strict>>;
|
|
1160
1396
|
id: z.ZodString;
|
|
1161
1397
|
repo: z.ZodString;
|
|
1162
1398
|
commit: z.ZodString;
|
|
@@ -1488,4 +1724,50 @@ export declare const FactsFile: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
1488
1724
|
declared: "declared";
|
|
1489
1725
|
}>>;
|
|
1490
1726
|
kind: z.ZodLiteral<"flow">;
|
|
1727
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1728
|
+
term: z.ZodString;
|
|
1729
|
+
value: z.ZodString;
|
|
1730
|
+
role: z.ZodEnum<{
|
|
1731
|
+
unknown: "unknown";
|
|
1732
|
+
owner: "owner";
|
|
1733
|
+
none: "none";
|
|
1734
|
+
consumer: "consumer";
|
|
1735
|
+
}>;
|
|
1736
|
+
note: z.ZodOptional<z.ZodString>;
|
|
1737
|
+
meaning: z.ZodOptional<z.ZodObject<{
|
|
1738
|
+
file: z.ZodString;
|
|
1739
|
+
line: z.ZodNumber;
|
|
1740
|
+
value: z.ZodString;
|
|
1741
|
+
}, z.core.$strict>>;
|
|
1742
|
+
id: z.ZodString;
|
|
1743
|
+
repo: z.ZodString;
|
|
1744
|
+
commit: z.ZodString;
|
|
1745
|
+
component: z.ZodOptional<z.ZodString>;
|
|
1746
|
+
cite: z.ZodObject<{
|
|
1747
|
+
file: z.ZodString;
|
|
1748
|
+
line: z.ZodNumber;
|
|
1749
|
+
value: z.ZodString;
|
|
1750
|
+
quote: z.ZodOptional<z.ZodString>;
|
|
1751
|
+
with: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1752
|
+
file: z.ZodString;
|
|
1753
|
+
line: z.ZodNumber;
|
|
1754
|
+
value: z.ZodString;
|
|
1755
|
+
}, z.core.$strict>>>;
|
|
1756
|
+
}, z.core.$strict>;
|
|
1757
|
+
verified: z.ZodDefault<z.ZodEnum<{
|
|
1758
|
+
line: "line";
|
|
1759
|
+
none: "none";
|
|
1760
|
+
person: "person";
|
|
1761
|
+
sample: "sample";
|
|
1762
|
+
}>>;
|
|
1763
|
+
by: z.ZodDefault<z.ZodEnum<{
|
|
1764
|
+
person: "person";
|
|
1765
|
+
assistant: "assistant";
|
|
1766
|
+
reader: "reader";
|
|
1767
|
+
}>>;
|
|
1768
|
+
conf: z.ZodDefault<z.ZodEnum<{
|
|
1769
|
+
inferred: "inferred";
|
|
1770
|
+
declared: "declared";
|
|
1771
|
+
}>>;
|
|
1772
|
+
kind: z.ZodLiteral<"term">;
|
|
1491
1773
|
}, z.core.$strict>], "kind">>;
|