@maycombhq/sdk 2.0.0-beta.3 → 2.0.0-beta.30
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 +373 -0
- package/npm/core/api.d.ts +15888 -3797
- package/npm/core/app-memory.d.ts +69 -0
- package/npm/core/assistant-actor.d.ts +28 -7
- package/npm/core/audit.d.ts +174 -0
- package/npm/core/canary.d.ts +369 -0
- package/npm/core/cancel.d.ts +20 -0
- package/npm/core/catalog.d.ts +220 -66
- package/npm/core/change-types-migrate.d.ts +14 -0
- package/npm/core/cite.d.ts +88 -6
- package/npm/core/contract-check.d.ts +276 -0
- package/npm/core/curated.d.ts +10 -0
- package/npm/core/decision-batches.d.ts +29 -0
- package/npm/core/declarable-routes.d.ts +52 -0
- package/npm/core/declared-links.d.ts +210 -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 +23 -1
- package/npm/core/facts-carry.d.ts +8 -2
- package/npm/core/facts-deps.d.ts +85 -0
- package/npm/core/facts-join-prototype.d.ts +66 -4
- package/npm/core/facts-join-vendor.d.ts +67 -7
- package/npm/core/facts-join.d.ts +476 -2
- package/npm/core/facts-terms.d.ts +108 -0
- package/npm/core/facts.d.ts +155 -1
- package/npm/core/field-places.d.ts +109 -0
- package/npm/core/file-pool.d.ts +84 -0
- package/npm/core/fs.d.ts +205 -7
- package/npm/core/glob-plain.d.ts +34 -0
- package/npm/core/glob.d.ts +14 -0
- package/npm/core/hash-cache.d.ts +53 -0
- package/npm/core/host-questions.d.ts +273 -1
- package/npm/core/identity.d.ts +20 -8
- package/npm/core/index.d.ts +38 -0
- package/npm/core/initialisms.d.ts +62 -0
- package/npm/core/kept-files.d.ts +17 -0
- package/npm/core/light.d.ts +5 -0
- package/npm/core/link-candidates.d.ts +224 -0
- package/npm/core/link-evidence.d.ts +212 -0
- package/npm/core/log.d.ts +2 -0
- package/npm/core/manifest-edit.d.ts +83 -6
- package/npm/core/merge.d.ts +28 -0
- package/npm/core/metarepo.d.ts +26 -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 +30 -6
- package/npm/core/orgpack-load.d.ts +24 -0
- package/npm/core/paths.d.ts +23 -0
- package/npm/core/printer.d.ts +18 -0
- package/npm/core/process-trees.d.ts +109 -0
- package/npm/core/profile-migrate.d.ts +13 -0
- package/npm/core/question-order.d.ts +23 -0
- package/npm/core/question-owners.d.ts +57 -0
- package/npm/core/question-proposals.d.ts +77 -0
- package/npm/core/question-roles.d.ts +84 -0
- package/npm/core/questions.d.ts +123 -6
- package/npm/core/record-cache.d.ts +122 -2
- package/npm/core/repo-files.d.ts +66 -0
- package/npm/core/repo-reads.d.ts +44 -0
- package/npm/core/roles-migrate.d.ts +10 -0
- package/npm/core/run-log.d.ts +341 -0
- package/npm/core/runtime-migrate.d.ts +18 -0
- package/npm/core/schema/ai.d.ts +61 -13
- 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/dialect.d.ts +12 -12
- package/npm/core/schema/fact-corrections.d.ts +112 -2
- package/npm/core/schema/facts.d.ts +743 -23
- package/npm/core/schema/frameworks.d.ts +12 -12
- package/npm/core/schema/kinds.d.ts +230 -66
- package/npm/core/schema/orgpack.d.ts +248 -24
- package/npm/core/schema/question.d.ts +281 -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 +30 -9
- package/npm/core/schema/scan-verify.d.ts +77 -0
- package/npm/core/schema/version.d.ts +4 -1
- package/npm/core/schema/workspace.d.ts +29 -11
- package/npm/core/setup-edit.d.ts +107 -0
- package/npm/core/shared-maps.d.ts +146 -0
- package/npm/core/stack-helpers.d.ts +32 -0
- package/npm/core/version-order.d.ts +14 -0
- package/npm/fs-repo.d.ts +2 -1
- package/npm/index.js +14248 -6710
- package/npm/listing.d.ts +14 -0
- package/npm/sandbox.d.ts +2 -1
- package/package.json +1 -1
|
@@ -11,36 +11,104 @@ import { z } from "zod";
|
|
|
11
11
|
* file, line and value), so a read that gives the same fact another id still meets it. One that
|
|
12
12
|
* meets no fact is stale: the verifier says so and applies nothing.
|
|
13
13
|
*/
|
|
14
|
-
|
|
14
|
+
/**
|
|
15
|
+
* Version 2 (ADR 0181) adds what AI deciding needs, all optional: `ai` (a pairing Atticus applied
|
|
16
|
+
* from an AI run: by `atticus`, never the person, joined `joined-by-ai`), `batch` (the batch that
|
|
17
|
+
* wrote a line, so Undo removes exactly its lines), `rule` (a line a person's rule wrote, from
|
|
18
|
+
* which correction), `match` (the rule a person's correction spreads, "Apply to similar") and the
|
|
19
|
+
* action `unlink` (a person says the call reaches none of these). A version 1 line reads as it
|
|
20
|
+
* is and means the same; a line that uses any of them says version 2.
|
|
21
|
+
*/
|
|
22
|
+
export declare const FACT_CORRECTIONS_SCHEMA_VERSION: 2;
|
|
23
|
+
/** ADR 0181: who writes an AI pairing's line: Atticus, from the run, never the session or a person. */
|
|
24
|
+
export declare const AI_LINE_BY = "atticus";
|
|
25
|
+
/** ADR 0181: the AI run a pairing came from, and the bar it met to be applied. */
|
|
26
|
+
export declare const CorrectionAi: z.ZodObject<{
|
|
27
|
+
runtime: z.ZodEnum<{
|
|
28
|
+
"hand-off": "hand-off";
|
|
29
|
+
"copilot-acp": "copilot-acp";
|
|
30
|
+
}>;
|
|
31
|
+
run: z.ZodString;
|
|
32
|
+
bar: z.ZodOptional<z.ZodEnum<{
|
|
33
|
+
confident: "confident";
|
|
34
|
+
"agrees-with-shapes": "agrees-with-shapes";
|
|
35
|
+
"person-rule": "person-rule";
|
|
36
|
+
}>>;
|
|
37
|
+
}, z.core.$strict>;
|
|
38
|
+
export type CorrectionAi = z.infer<typeof CorrectionAi>;
|
|
15
39
|
/** The fields of a fact a correction may not set: what it is, where it comes from, who checked it. */
|
|
16
40
|
export declare const FACT_FIXED_FIELDS: readonly ["kind", "id", "repo", "commit", "cite", "verified", "by", "conf"];
|
|
41
|
+
/**
|
|
42
|
+
* G1 (ADR 0174): what a person paired a call with on the canvas: an entry of a repo (its id when
|
|
43
|
+
* paired, and its method and path, to find it again after a read gives it another id), or an
|
|
44
|
+
* outside system's operation. The call's own fact is left as read; the join reads the pairing.
|
|
45
|
+
*/
|
|
46
|
+
export declare const CorrectionLink: z.ZodObject<{
|
|
47
|
+
repo: z.ZodOptional<z.ZodString>;
|
|
48
|
+
system: z.ZodOptional<z.ZodString>;
|
|
49
|
+
entry: z.ZodOptional<z.ZodString>;
|
|
50
|
+
method: z.ZodOptional<z.ZodString>;
|
|
51
|
+
path: z.ZodString;
|
|
52
|
+
}, z.core.$strict>;
|
|
53
|
+
export type CorrectionLink = z.infer<typeof CorrectionLink>;
|
|
17
54
|
export declare const FactCorrection: z.ZodObject<{
|
|
18
|
-
schemaVersion: z.ZodLiteral<1>;
|
|
55
|
+
schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
|
|
19
56
|
fact: z.ZodString;
|
|
20
57
|
target: z.ZodObject<{
|
|
21
58
|
kind: z.ZodEnum<{
|
|
22
59
|
config: "config";
|
|
60
|
+
component: "component";
|
|
23
61
|
field: "field";
|
|
62
|
+
dependency: "dependency";
|
|
63
|
+
term: "term";
|
|
24
64
|
framework: "framework";
|
|
25
65
|
entry: "entry";
|
|
26
66
|
store: "store";
|
|
27
67
|
call: "call";
|
|
28
68
|
deploy: "deploy";
|
|
29
69
|
flow: "flow";
|
|
70
|
+
artifact: "artifact";
|
|
30
71
|
}>;
|
|
31
72
|
file: z.ZodString;
|
|
32
73
|
line: z.ZodNumber;
|
|
33
74
|
value: z.ZodString;
|
|
34
75
|
}, z.core.$strict>;
|
|
35
76
|
action: z.ZodEnum<{
|
|
77
|
+
link: "link";
|
|
36
78
|
wrong: "wrong";
|
|
37
79
|
edit: "edit";
|
|
80
|
+
unlink: "unlink";
|
|
38
81
|
}>;
|
|
82
|
+
link: z.ZodOptional<z.ZodObject<{
|
|
83
|
+
repo: z.ZodOptional<z.ZodString>;
|
|
84
|
+
system: z.ZodOptional<z.ZodString>;
|
|
85
|
+
entry: z.ZodOptional<z.ZodString>;
|
|
86
|
+
method: z.ZodOptional<z.ZodString>;
|
|
87
|
+
path: z.ZodString;
|
|
88
|
+
}, z.core.$strict>>;
|
|
39
89
|
set: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
40
90
|
line: z.ZodOptional<z.ZodNumber>;
|
|
41
91
|
reason: z.ZodOptional<z.ZodString>;
|
|
42
92
|
by: z.ZodString;
|
|
43
93
|
at: z.ZodISODateTime;
|
|
94
|
+
ai: z.ZodOptional<z.ZodObject<{
|
|
95
|
+
runtime: z.ZodEnum<{
|
|
96
|
+
"hand-off": "hand-off";
|
|
97
|
+
"copilot-acp": "copilot-acp";
|
|
98
|
+
}>;
|
|
99
|
+
run: z.ZodString;
|
|
100
|
+
bar: z.ZodOptional<z.ZodEnum<{
|
|
101
|
+
confident: "confident";
|
|
102
|
+
"agrees-with-shapes": "agrees-with-shapes";
|
|
103
|
+
"person-rule": "person-rule";
|
|
104
|
+
}>>;
|
|
105
|
+
}, z.core.$strict>>;
|
|
106
|
+
batch: z.ZodOptional<z.ZodString>;
|
|
107
|
+
rule: z.ZodOptional<z.ZodObject<{
|
|
108
|
+
from: z.ZodString;
|
|
109
|
+
match: z.ZodString;
|
|
110
|
+
}, z.core.$strict>>;
|
|
111
|
+
match: z.ZodOptional<z.ZodString>;
|
|
44
112
|
}, z.core.$strict>;
|
|
45
113
|
export type FactCorrection = z.infer<typeof FactCorrection>;
|
|
46
114
|
/** The corrections of a file's text, one per line; a line that isn't one is a problem with its number. */
|
|
@@ -53,3 +121,45 @@ export declare function parseCorrections(text: string): {
|
|
|
53
121
|
};
|
|
54
122
|
/** One correction as its line in the file, keys in a fixed order. */
|
|
55
123
|
export declare function correctionLine(c: FactCorrection): string;
|
|
124
|
+
type CallLike = {
|
|
125
|
+
kind: string;
|
|
126
|
+
id: string;
|
|
127
|
+
cite: {
|
|
128
|
+
file: string;
|
|
129
|
+
line: number;
|
|
130
|
+
value: string;
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
/**
|
|
134
|
+
* Review round 2 (beta.23): a person's newest edit of where a call goes (an `edit` setting `to`,
|
|
135
|
+
* not the AI's), or none.
|
|
136
|
+
*/
|
|
137
|
+
export declare function personEditOfTo(f: CallLike, corrections: readonly FactCorrection[]): FactCorrection | undefined;
|
|
138
|
+
/**
|
|
139
|
+
* G1 (ADR 0174): every pairing (`link`) that meets a call, newest first: on its cited line by its
|
|
140
|
+
* id or by what it cites, or by its id where an edit of the same fact moved it to the line it is
|
|
141
|
+
* on now. One matcher for the verifier and the join.
|
|
142
|
+
*/
|
|
143
|
+
export declare function linksFor(f: CallLike, corrections: readonly FactCorrection[]): FactCorrection[];
|
|
144
|
+
/**
|
|
145
|
+
* A pairing as the join reads it: what the call reaches, who said so, and (ADR 0181) the AI run.
|
|
146
|
+
* Review round 48: `none` when a person's `unlink` is the newest (asked for with `declined`): the
|
|
147
|
+
* call reaches nothing a person knows of, so an AI answer never joins it (the path is the call's).
|
|
148
|
+
*/
|
|
149
|
+
export type PairOnFile = CorrectionLink & {
|
|
150
|
+
by: string;
|
|
151
|
+
ai?: CorrectionAi;
|
|
152
|
+
none?: true;
|
|
153
|
+
};
|
|
154
|
+
/**
|
|
155
|
+
* G1 (ADR 0174): a repo's pairings, call fact id → what the person paired it with, from its
|
|
156
|
+
* corrections file: the newest link per call (a repo's or an outside system's), met as linksFor
|
|
157
|
+
* meets it. A link that meets no call is left out (the verifier says so). ADR 0181: an AI
|
|
158
|
+
* pairing keeps its run (`ai`); a newer `unlink` withdraws any pairing. With `declined` (the
|
|
159
|
+
* join's read, round 48), a person's newest `unlink` is kept as `none`, so the join knows a
|
|
160
|
+
* person said "none" and an AI answer doesn't join the call.
|
|
161
|
+
*/
|
|
162
|
+
export declare function pairsFromCorrections(facts: readonly CallLike[], corrections: readonly FactCorrection[], o?: {
|
|
163
|
+
declined?: boolean;
|
|
164
|
+
}): Record<string, PairOnFile>;
|
|
165
|
+
export {};
|