@maycombhq/sdk 2.0.0-beta.1 → 2.0.0-beta.10
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/{dist → npm}/cache.d.ts +1 -1
- package/npm/core/api.d.ts +7462 -0
- package/npm/core/assistant-actor.d.ts +15 -0
- package/npm/core/audit.d.ts +153 -0
- package/npm/core/branches.d.ts +21 -0
- package/npm/core/cancel.d.ts +9 -0
- package/npm/core/catalog.d.ts +4733 -0
- package/npm/core/change-types-migrate.d.ts +10 -0
- package/npm/core/cite.d.ts +54 -0
- package/npm/core/curated.d.ts +37 -0
- package/npm/core/fact-paths.d.ts +14 -0
- package/npm/core/facts-callers.d.ts +152 -0
- package/npm/core/facts-carry.d.ts +36 -0
- package/npm/core/facts-join-prototype.d.ts +234 -0
- package/npm/core/facts-join-vendor.d.ts +110 -0
- package/npm/core/facts-join.d.ts +482 -0
- package/npm/core/facts.d.ts +94 -0
- package/npm/core/fs.d.ts +47 -0
- package/npm/core/gates-migrate.d.ts +10 -0
- package/npm/core/host-questions.d.ts +66 -0
- package/npm/core/identity.d.ts +17 -0
- package/npm/core/index.d.ts +73 -0
- package/npm/core/json-schema.d.ts +20 -0
- package/npm/core/judgments.d.ts +63 -0
- package/npm/core/light.d.ts +8 -0
- package/npm/core/link-evidence.d.ts +212 -0
- package/npm/core/log.d.ts +49 -0
- package/npm/core/manifest-edit.d.ts +57 -0
- package/npm/core/merge.d.ts +78 -0
- package/npm/core/metarepo.d.ts +91 -0
- package/npm/core/migrate.d.ts +31 -0
- package/npm/core/migration-files.d.ts +13 -0
- package/npm/core/orgpack-defaults.d.ts +199 -0
- package/npm/core/orgpack-load.d.ts +102 -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/questions.d.ts +297 -0
- package/npm/core/record-cache.d.ts +52 -0
- package/npm/core/refs.d.ts +9 -0
- package/npm/core/repo-description.d.ts +44 -0
- 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 +11 -0
- package/npm/core/schema/ai.d.ts +397 -0
- package/npm/core/schema/change.d.ts +244 -0
- package/npm/core/schema/common.d.ts +135 -0
- package/npm/core/schema/conventions.d.ts +75 -0
- package/npm/core/schema/dialect.d.ts +801 -0
- package/npm/core/schema/executors.d.ts +396 -0
- package/npm/core/schema/fact-corrections.d.ts +55 -0
- package/npm/core/schema/facts.d.ts +1491 -0
- package/npm/core/schema/frameworks.d.ts +371 -0
- package/npm/core/schema/judgment.d.ts +77 -0
- package/npm/core/schema/kinds.d.ts +5166 -0
- package/npm/core/schema/layout.d.ts +25 -0
- package/npm/core/schema/orgpack.d.ts +1185 -0
- package/npm/core/schema/plugin.d.ts +73 -0
- package/npm/core/schema/question.d.ts +195 -0
- package/npm/core/schema/repo-type.d.ts +109 -0
- package/npm/core/schema/review.d.ts +558 -0
- package/npm/core/schema/scan-settings.d.ts +34 -0
- package/npm/core/schema/scan-verify.d.ts +535 -0
- package/npm/core/schema/spec.d.ts +269 -0
- package/npm/core/schema/version.d.ts +9 -0
- package/npm/core/schema/workspace.d.ts +330 -0
- package/npm/core/serialize.d.ts +17 -0
- package/npm/core/shared-maps.d.ts +146 -0
- package/npm/core/sources-migrate.d.ts +15 -0
- package/npm/core/specs.d.ts +66 -0
- package/npm/core/stack-helpers.d.ts +32 -0
- package/npm/core/tar-read.d.ts +13 -0
- package/npm/core/template.d.ts +101 -0
- package/npm/core/words.d.ts +13 -0
- package/npm/core/zip-read.d.ts +37 -0
- package/npm/core/zip.d.ts +13 -0
- package/npm/index.js +9780 -0
- package/{dist → npm}/plugin.d.ts +1 -1
- package/{dist → npm}/runner.d.ts +1 -1
- package/package.json +10 -11
- package/dist/cache.js +0 -115
- package/dist/cache.js.map +0 -1
- package/dist/fs-repo.js +0 -120
- package/dist/fs-repo.js.map +0 -1
- package/dist/index.js +0 -7
- package/dist/index.js.map +0 -1
- package/dist/parse-cache.js +0 -275
- package/dist/parse-cache.js.map +0 -1
- package/dist/plugin.js +0 -85
- package/dist/plugin.js.map +0 -1
- package/dist/runner.js +0 -209
- package/dist/runner.js.map +0 -1
- package/dist/sandbox.js +0 -443
- package/dist/sandbox.js.map +0 -1
- /package/{dist → npm}/fs-repo.d.ts +0 -0
- /package/{dist → npm}/index.d.ts +0 -0
- /package/{dist → npm}/parse-cache.d.ts +0 -0
- /package/{dist → npm}/sandbox.d.ts +0 -0
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { SCHEMA_VERSION } from "./version.js";
|
|
3
|
+
/** Current catalog schema version (defined in ./version.js, which loads no schema). */
|
|
4
|
+
export { SCHEMA_VERSION };
|
|
5
|
+
/** Every catalog schema version a reader accepts, oldest first. */
|
|
6
|
+
export declare const SUPPORTED_SCHEMA_VERSIONS: readonly [1, 2, 3];
|
|
7
|
+
/**
|
|
8
|
+
* A record's schema version. Version-1 and version-2 files differ from version 3 only in this
|
|
9
|
+
* number (nothing they hold changed meaning), so they are read as they are and come back as
|
|
10
|
+
* version 3 in memory; writers always write the current version, and `migrateCatalog` rewrites
|
|
11
|
+
* old files. The type stays `1 | 2 | 3` so code that builds older records in memory keeps
|
|
12
|
+
* compiling until it is updated.
|
|
13
|
+
*/
|
|
14
|
+
export declare const SchemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>;
|
|
15
|
+
/**
|
|
16
|
+
* Stable record id. Lowercase slug, safe as a file name on Linux, macOS and Windows
|
|
17
|
+
* (no ":" or "/"), so every record can live in its own file named by its id.
|
|
18
|
+
*/
|
|
19
|
+
export declare const RecordId: z.ZodString;
|
|
20
|
+
/** A reference to another record by id. */
|
|
21
|
+
export declare const Ref: z.ZodString;
|
|
22
|
+
export declare const Status: z.ZodEnum<{
|
|
23
|
+
current: "current";
|
|
24
|
+
"planned-new": "planned-new";
|
|
25
|
+
"planned-modify": "planned-modify";
|
|
26
|
+
"planned-retire": "planned-retire";
|
|
27
|
+
retired: "retired";
|
|
28
|
+
}>;
|
|
29
|
+
/**
|
|
30
|
+
* verified: read directly from code, config or a published spec (an interface needs both ends seen).
|
|
31
|
+
* inferred: one end only, a diagram, a document or a rule.
|
|
32
|
+
* asserted: stated or confirmed by a person. Documents are never "asserted".
|
|
33
|
+
*/
|
|
34
|
+
export declare const Confidence: z.ZodEnum<{
|
|
35
|
+
verified: "verified";
|
|
36
|
+
inferred: "inferred";
|
|
37
|
+
asserted: "asserted";
|
|
38
|
+
}>;
|
|
39
|
+
export declare const EvidenceSource: z.ZodEnum<{
|
|
40
|
+
code: "code";
|
|
41
|
+
config: "config";
|
|
42
|
+
spec: "spec";
|
|
43
|
+
gateway: "gateway";
|
|
44
|
+
"event-config": "event-config";
|
|
45
|
+
infrastructure: "infrastructure";
|
|
46
|
+
pipeline: "pipeline";
|
|
47
|
+
migration: "migration";
|
|
48
|
+
diagram: "diagram";
|
|
49
|
+
document: "document";
|
|
50
|
+
export: "export";
|
|
51
|
+
manual: "manual";
|
|
52
|
+
}>;
|
|
53
|
+
export declare const Evidence: z.ZodObject<{
|
|
54
|
+
source: z.ZodEnum<{
|
|
55
|
+
code: "code";
|
|
56
|
+
config: "config";
|
|
57
|
+
spec: "spec";
|
|
58
|
+
gateway: "gateway";
|
|
59
|
+
"event-config": "event-config";
|
|
60
|
+
infrastructure: "infrastructure";
|
|
61
|
+
pipeline: "pipeline";
|
|
62
|
+
migration: "migration";
|
|
63
|
+
diagram: "diagram";
|
|
64
|
+
document: "document";
|
|
65
|
+
export: "export";
|
|
66
|
+
manual: "manual";
|
|
67
|
+
}>;
|
|
68
|
+
repo: z.ZodOptional<z.ZodString>;
|
|
69
|
+
path: z.ZodOptional<z.ZodString>;
|
|
70
|
+
line: z.ZodOptional<z.ZodNumber>;
|
|
71
|
+
commit: z.ZodOptional<z.ZodString>;
|
|
72
|
+
scannedAt: z.ZodOptional<z.ZodISODateTime>;
|
|
73
|
+
extractor: z.ZodOptional<z.ZodString>;
|
|
74
|
+
dialect: z.ZodOptional<z.ZodString>;
|
|
75
|
+
side: z.ZodOptional<z.ZodEnum<{
|
|
76
|
+
gateway: "gateway";
|
|
77
|
+
document: "document";
|
|
78
|
+
caller: "caller";
|
|
79
|
+
callee: "callee";
|
|
80
|
+
definition: "definition";
|
|
81
|
+
}>>;
|
|
82
|
+
by: z.ZodOptional<z.ZodString>;
|
|
83
|
+
}, z.core.$strict>;
|
|
84
|
+
export declare const IsoDate: z.ZodISODate;
|
|
85
|
+
export declare const IsoDateTime: z.ZodISODateTime;
|
|
86
|
+
/** Fields every record carries. `kind` is added per record type. */
|
|
87
|
+
export declare const commonFields: {
|
|
88
|
+
schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>;
|
|
89
|
+
id: z.ZodString;
|
|
90
|
+
status: z.ZodEnum<{
|
|
91
|
+
current: "current";
|
|
92
|
+
"planned-new": "planned-new";
|
|
93
|
+
"planned-modify": "planned-modify";
|
|
94
|
+
"planned-retire": "planned-retire";
|
|
95
|
+
retired: "retired";
|
|
96
|
+
}>;
|
|
97
|
+
confidence: z.ZodEnum<{
|
|
98
|
+
verified: "verified";
|
|
99
|
+
inferred: "inferred";
|
|
100
|
+
asserted: "asserted";
|
|
101
|
+
}>;
|
|
102
|
+
evidence: z.ZodArray<z.ZodObject<{
|
|
103
|
+
source: z.ZodEnum<{
|
|
104
|
+
code: "code";
|
|
105
|
+
config: "config";
|
|
106
|
+
spec: "spec";
|
|
107
|
+
gateway: "gateway";
|
|
108
|
+
"event-config": "event-config";
|
|
109
|
+
infrastructure: "infrastructure";
|
|
110
|
+
pipeline: "pipeline";
|
|
111
|
+
migration: "migration";
|
|
112
|
+
diagram: "diagram";
|
|
113
|
+
document: "document";
|
|
114
|
+
export: "export";
|
|
115
|
+
manual: "manual";
|
|
116
|
+
}>;
|
|
117
|
+
repo: z.ZodOptional<z.ZodString>;
|
|
118
|
+
path: z.ZodOptional<z.ZodString>;
|
|
119
|
+
line: z.ZodOptional<z.ZodNumber>;
|
|
120
|
+
commit: z.ZodOptional<z.ZodString>;
|
|
121
|
+
scannedAt: z.ZodOptional<z.ZodISODateTime>;
|
|
122
|
+
extractor: z.ZodOptional<z.ZodString>;
|
|
123
|
+
dialect: z.ZodOptional<z.ZodString>;
|
|
124
|
+
side: z.ZodOptional<z.ZodEnum<{
|
|
125
|
+
gateway: "gateway";
|
|
126
|
+
document: "document";
|
|
127
|
+
caller: "caller";
|
|
128
|
+
callee: "callee";
|
|
129
|
+
definition: "definition";
|
|
130
|
+
}>>;
|
|
131
|
+
by: z.ZodOptional<z.ZodString>;
|
|
132
|
+
}, z.core.$strict>>;
|
|
133
|
+
flags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
134
|
+
};
|
|
135
|
+
export type EvidenceT = z.infer<typeof Evidence>;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* Contract C6: the house conventions a read leans on (ADR 0147), `org-pack/conventions.yaml`.
|
|
4
|
+
* A new, optional file: a pack without it reads with the defaults below, which are the lists
|
|
5
|
+
* Atticus had written into its code before, so nothing changes until an organisation writes one.
|
|
6
|
+
* Every key is optional; a key given replaces its default list whole (it doesn't add to it), so
|
|
7
|
+
* an organisation can take a word out as well as put one in.
|
|
8
|
+
*/
|
|
9
|
+
export declare const CONVENTIONS_SCHEMA_VERSION: 1;
|
|
10
|
+
/** The folders an API spec is kept in, as a gateway's repo keeps its proxy's spec. */
|
|
11
|
+
export declare const DEFAULT_API_SPEC_FOLDERS: readonly ["oas", "openapi", "swagger", "asyncapi", "api-spec", "api-specs", "apispec", "apispecs"];
|
|
12
|
+
/** The folders of a gateway's proxy bundles: an entry under one is a gateway route, whatever the repo. */
|
|
13
|
+
export declare const DEFAULT_GATEWAY_BUNDLE_FOLDERS: readonly ["apiproxy", "sharedflowbundle"];
|
|
14
|
+
/** The words a virtual host or a gateway's config uses for each side of the organisation. */
|
|
15
|
+
export declare const DEFAULT_FACING_WORDS: {
|
|
16
|
+
readonly internal: readonly ["internal", "private", "intranet", "inside"];
|
|
17
|
+
readonly external: readonly ["external", "partner", "public", "internet", "egress"];
|
|
18
|
+
};
|
|
19
|
+
/** Folders whose files hold nothing of what a repo serves, calls or stores: tests and fixtures. */
|
|
20
|
+
export declare const DEFAULT_NOT_PRODUCT_FOLDERS: readonly ["src/test", "src/it", "test", "tests", "__tests__", "__mocks__", "spec", "specs", "e2e", "testdata", "test-data", "fixtures"];
|
|
21
|
+
/** Folders whose strings aren't the product's (generated, built, vendored), for the skipped-lines note. */
|
|
22
|
+
export declare const DEFAULT_NOT_READ_FOLDERS: readonly ["generated", "generated-sources", "__generated__", "gen", "dist", "build", "out", "target", "bin", "obj", "node_modules", "vendor", "vendored", "third_party", "third-party", ".next", ".nuxt", "coverage"];
|
|
23
|
+
/**
|
|
24
|
+
* A framework the organisation tells Atticus about (verify's framework table, ADR 0124 addendum
|
|
25
|
+
* A-framework): what a declaration in a build file means. Looked at before the built-in table,
|
|
26
|
+
* so an entry here can also say what a known declaration means in this house.
|
|
27
|
+
*/
|
|
28
|
+
export declare const ConventionFramework: z.ZodObject<{
|
|
29
|
+
declares: z.ZodString;
|
|
30
|
+
name: z.ZodString;
|
|
31
|
+
topic: z.ZodOptional<z.ZodString>;
|
|
32
|
+
shape: z.ZodOptional<z.ZodEnum<{
|
|
33
|
+
"batch-job": "batch-job";
|
|
34
|
+
rest: "rest";
|
|
35
|
+
store: "store";
|
|
36
|
+
screen: "screen";
|
|
37
|
+
}>>;
|
|
38
|
+
}, z.core.$strict>;
|
|
39
|
+
export type ConventionFramework = z.infer<typeof ConventionFramework>;
|
|
40
|
+
export declare const Conventions: z.ZodObject<{
|
|
41
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
42
|
+
apiSpecFolders: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
43
|
+
gatewayBundleFolders: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
44
|
+
facing: z.ZodDefault<z.ZodObject<{
|
|
45
|
+
internal: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
46
|
+
external: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
47
|
+
}, z.core.$strict>>;
|
|
48
|
+
frameworks: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
49
|
+
declares: z.ZodString;
|
|
50
|
+
name: z.ZodString;
|
|
51
|
+
topic: z.ZodOptional<z.ZodString>;
|
|
52
|
+
shape: z.ZodOptional<z.ZodEnum<{
|
|
53
|
+
"batch-job": "batch-job";
|
|
54
|
+
rest: "rest";
|
|
55
|
+
store: "store";
|
|
56
|
+
screen: "screen";
|
|
57
|
+
}>>;
|
|
58
|
+
}, z.core.$strict>>>;
|
|
59
|
+
notProductFolders: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
60
|
+
notReadFolders: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
61
|
+
housePrefixes: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
62
|
+
}, z.core.$strict>;
|
|
63
|
+
export type Conventions = z.infer<typeof Conventions>;
|
|
64
|
+
/** The conventions of a pack without conventions.yaml: the built-in lists. */
|
|
65
|
+
export declare const DEFAULT_CONVENTIONS: Conventions;
|
|
66
|
+
/**
|
|
67
|
+
* A test for a path under one of these folders, as whole segments anywhere in it: `(^|/)(a|b)/`.
|
|
68
|
+
* `tail` follows the folder (default: anything). Matches nothing when the list is empty.
|
|
69
|
+
*/
|
|
70
|
+
export declare function underFolders(folders: readonly string[], o?: {
|
|
71
|
+
tail?: string;
|
|
72
|
+
flags?: string;
|
|
73
|
+
}): RegExp;
|
|
74
|
+
/** An entry cited under one of these folders is a gateway route (default: the built-in bundle folders). */
|
|
75
|
+
export declare function gatewayBundleTest(folders?: readonly string[]): RegExp;
|