@maycombhq/sdk 2.0.0-beta.2 → 2.0.0-beta.22

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.
Files changed (61) hide show
  1. package/npm/core/ai-decisions.d.ts +373 -0
  2. package/npm/core/api.d.ts +5890 -1210
  3. package/npm/core/audit.d.ts +165 -0
  4. package/npm/core/catalog.d.ts +220 -66
  5. package/npm/core/cite.d.ts +20 -4
  6. package/npm/core/contract-check.d.ts +261 -0
  7. package/npm/core/decision-batches.d.ts +29 -0
  8. package/npm/core/declared-links.d.ts +62 -0
  9. package/npm/core/eol.d.ts +5 -0
  10. package/npm/core/fact-paths.d.ts +14 -0
  11. package/npm/core/facts-callers.d.ts +2 -0
  12. package/npm/core/facts-carry.d.ts +8 -2
  13. package/npm/core/facts-join-prototype.d.ts +66 -4
  14. package/npm/core/facts-join-vendor.d.ts +20 -2
  15. package/npm/core/facts-join.d.ts +325 -1
  16. package/npm/core/facts-terms.d.ts +108 -0
  17. package/npm/core/fs.d.ts +40 -4
  18. package/npm/core/glob.d.ts +14 -0
  19. package/npm/core/host-questions.d.ts +93 -1
  20. package/npm/core/identity.d.ts +28 -0
  21. package/npm/core/index.d.ts +24 -0
  22. package/npm/core/link-candidates.d.ts +103 -0
  23. package/npm/core/link-evidence.d.ts +212 -0
  24. package/npm/core/manifest-edit.d.ts +53 -4
  25. package/npm/core/merge.d.ts +28 -0
  26. package/npm/core/metarepo.d.ts +18 -1
  27. package/npm/core/migrate.d.ts +3 -2
  28. package/npm/core/org-notes.d.ts +180 -0
  29. package/npm/core/orgpack-defaults.d.ts +22 -6
  30. package/npm/core/orgpack-load.d.ts +19 -0
  31. package/npm/core/profile-migrate.d.ts +11 -0
  32. package/npm/core/question-order.d.ts +23 -0
  33. package/npm/core/question-owners.d.ts +53 -0
  34. package/npm/core/question-proposals.d.ts +77 -0
  35. package/npm/core/question-roles.d.ts +24 -0
  36. package/npm/core/questions.d.ts +90 -6
  37. package/npm/core/repo-files.d.ts +60 -0
  38. package/npm/core/repo-reads.d.ts +44 -0
  39. package/npm/core/roles-migrate.d.ts +9 -0
  40. package/npm/core/runtime-migrate.d.ts +18 -0
  41. package/npm/core/schema/ai.d.ts +57 -9
  42. package/npm/core/schema/common.d.ts +32 -8
  43. package/npm/core/schema/component-type.d.ts +193 -0
  44. package/npm/core/schema/conventions.d.ts +80 -0
  45. package/npm/core/schema/fact-corrections.d.ts +105 -2
  46. package/npm/core/schema/facts.d.ts +410 -1
  47. package/npm/core/schema/kinds.d.ts +230 -66
  48. package/npm/core/schema/orgpack.d.ts +159 -19
  49. package/npm/core/schema/question.d.ts +228 -5
  50. package/npm/core/schema/reading-rules.d.ts +51 -0
  51. package/npm/core/schema/repo-type.d.ts +20 -2
  52. package/npm/core/schema/review.d.ts +7 -7
  53. package/npm/core/schema/scan-verify.d.ts +87 -45
  54. package/npm/core/schema/version.d.ts +4 -1
  55. package/npm/core/schema/workspace.d.ts +29 -11
  56. package/npm/core/shared-maps.d.ts +146 -0
  57. package/npm/core/stack-helpers.d.ts +32 -0
  58. package/npm/fs-repo.d.ts +2 -1
  59. package/npm/index.js +6194 -2542
  60. package/npm/listing.d.ts +14 -0
  61. package/package.json +1 -1
@@ -0,0 +1,193 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * A component type (ADR 0180, C6): org-pack/component-types/<id>/type.yaml, with an optional
4
+ * notes.md beside it. What a kind of component in the organisation is (a BFF, a gateway proxy,
5
+ * a mainframe program, a kind of its own), how the assistant recognises one when it reads a
6
+ * repo (signals it cites), where one usually runs, how the canvas draws it, and what one must
7
+ * and must not do. Atticus's own types (`Component.type`'s documented values, ADR 0040) are the
8
+ * default set in the same shape; an organisation adds types, rewords a built-in under its own
9
+ * id, or switches one off. A type's notes are data in prompts, never instructions.
10
+ */
11
+ export declare const COMPONENT_TYPE_SCHEMA_VERSION: 1;
12
+ /** How a read recognises a component of the type: something on a line the assistant can cite. */
13
+ export declare const TypeSignal: z.ZodObject<{
14
+ kind: z.ZodEnum<{
15
+ file: "file";
16
+ path: "path";
17
+ dependency: "dependency";
18
+ framework: "framework";
19
+ annotation: "annotation";
20
+ "repo-type": "repo-type";
21
+ words: "words";
22
+ }>;
23
+ value: z.ZodString;
24
+ why: z.ZodOptional<z.ZodString>;
25
+ }, z.core.$strict>;
26
+ export type TypeSignal = z.infer<typeof TypeSignal>;
27
+ export declare const TYPE_SHAPES: readonly ["box", "rounded", "hexagon", "cylinder", "diamond", "parallelogram", "circle"];
28
+ /** The file's fields as written (ComponentType checks them and fills in a switched-off type's words). */
29
+ export declare const ComponentTypeShape: z.ZodObject<{
30
+ schemaVersion: z.ZodLiteral<1>;
31
+ id: z.ZodString;
32
+ name: z.ZodOptional<z.ZodString>;
33
+ description: z.ZodOptional<z.ZodString>;
34
+ owner: z.ZodOptional<z.ZodString>;
35
+ signals: z.ZodDefault<z.ZodArray<z.ZodObject<{
36
+ kind: z.ZodEnum<{
37
+ file: "file";
38
+ path: "path";
39
+ dependency: "dependency";
40
+ framework: "framework";
41
+ annotation: "annotation";
42
+ "repo-type": "repo-type";
43
+ words: "words";
44
+ }>;
45
+ value: z.ZodString;
46
+ why: z.ZodOptional<z.ZodString>;
47
+ }, z.core.$strict>>>;
48
+ runsOn: z.ZodOptional<z.ZodObject<{
49
+ platform: z.ZodOptional<z.ZodString>;
50
+ cloud: z.ZodOptional<z.ZodString>;
51
+ framework: z.ZodOptional<z.ZodString>;
52
+ }, z.core.$strict>>;
53
+ draws: z.ZodOptional<z.ZodObject<{
54
+ shape: z.ZodOptional<z.ZodEnum<{
55
+ box: "box";
56
+ rounded: "rounded";
57
+ hexagon: "hexagon";
58
+ cylinder: "cylinder";
59
+ diamond: "diamond";
60
+ parallelogram: "parallelogram";
61
+ circle: "circle";
62
+ }>>;
63
+ colour: z.ZodOptional<z.ZodString>;
64
+ badge: z.ZodOptional<z.ZodString>;
65
+ }, z.core.$strict>>;
66
+ must: z.ZodOptional<z.ZodArray<z.ZodString>>;
67
+ mustNot: z.ZodOptional<z.ZodArray<z.ZodString>>;
68
+ off: z.ZodOptional<z.ZodBoolean>;
69
+ notes: z.ZodOptional<z.ZodString>;
70
+ }, z.core.$strict>;
71
+ /**
72
+ * A kind of component, in the organisation's words: org-pack/component-types/<id>/type.yaml.
73
+ * `name` and `description` are required unless the file switches a built-in off.
74
+ */
75
+ export declare const ComponentType: z.ZodPipe<z.ZodObject<{
76
+ schemaVersion: z.ZodLiteral<1>;
77
+ id: z.ZodString;
78
+ name: z.ZodOptional<z.ZodString>;
79
+ description: z.ZodOptional<z.ZodString>;
80
+ owner: z.ZodOptional<z.ZodString>;
81
+ signals: z.ZodDefault<z.ZodArray<z.ZodObject<{
82
+ kind: z.ZodEnum<{
83
+ file: "file";
84
+ path: "path";
85
+ dependency: "dependency";
86
+ framework: "framework";
87
+ annotation: "annotation";
88
+ "repo-type": "repo-type";
89
+ words: "words";
90
+ }>;
91
+ value: z.ZodString;
92
+ why: z.ZodOptional<z.ZodString>;
93
+ }, z.core.$strict>>>;
94
+ runsOn: z.ZodOptional<z.ZodObject<{
95
+ platform: z.ZodOptional<z.ZodString>;
96
+ cloud: z.ZodOptional<z.ZodString>;
97
+ framework: z.ZodOptional<z.ZodString>;
98
+ }, z.core.$strict>>;
99
+ draws: z.ZodOptional<z.ZodObject<{
100
+ shape: z.ZodOptional<z.ZodEnum<{
101
+ box: "box";
102
+ rounded: "rounded";
103
+ hexagon: "hexagon";
104
+ cylinder: "cylinder";
105
+ diamond: "diamond";
106
+ parallelogram: "parallelogram";
107
+ circle: "circle";
108
+ }>>;
109
+ colour: z.ZodOptional<z.ZodString>;
110
+ badge: z.ZodOptional<z.ZodString>;
111
+ }, z.core.$strict>>;
112
+ must: z.ZodOptional<z.ZodArray<z.ZodString>>;
113
+ mustNot: z.ZodOptional<z.ZodArray<z.ZodString>>;
114
+ off: z.ZodOptional<z.ZodBoolean>;
115
+ notes: z.ZodOptional<z.ZodString>;
116
+ }, z.core.$strict>, z.ZodTransform<{
117
+ name: string;
118
+ description: string;
119
+ schemaVersion: 1;
120
+ id: string;
121
+ signals: {
122
+ kind: "file" | "path" | "dependency" | "framework" | "annotation" | "repo-type" | "words";
123
+ value: string;
124
+ why?: string | undefined;
125
+ }[];
126
+ owner?: string | undefined;
127
+ runsOn?: {
128
+ platform?: string | undefined;
129
+ cloud?: string | undefined;
130
+ framework?: string | undefined;
131
+ } | undefined;
132
+ draws?: {
133
+ shape?: "box" | "rounded" | "hexagon" | "cylinder" | "diamond" | "parallelogram" | "circle" | undefined;
134
+ colour?: string | undefined;
135
+ badge?: string | undefined;
136
+ } | undefined;
137
+ must?: string[] | undefined;
138
+ mustNot?: string[] | undefined;
139
+ off?: boolean | undefined;
140
+ notes?: string | undefined;
141
+ }, {
142
+ schemaVersion: 1;
143
+ id: string;
144
+ signals: {
145
+ kind: "file" | "path" | "dependency" | "framework" | "annotation" | "repo-type" | "words";
146
+ value: string;
147
+ why?: string | undefined;
148
+ }[];
149
+ name?: string | undefined;
150
+ description?: string | undefined;
151
+ owner?: string | undefined;
152
+ runsOn?: {
153
+ platform?: string | undefined;
154
+ cloud?: string | undefined;
155
+ framework?: string | undefined;
156
+ } | undefined;
157
+ draws?: {
158
+ shape?: "box" | "rounded" | "hexagon" | "cylinder" | "diamond" | "parallelogram" | "circle" | undefined;
159
+ colour?: string | undefined;
160
+ badge?: string | undefined;
161
+ } | undefined;
162
+ must?: string[] | undefined;
163
+ mustNot?: string[] | undefined;
164
+ off?: boolean | undefined;
165
+ notes?: string | undefined;
166
+ }>>;
167
+ export type ComponentType = z.infer<typeof ComponentType>;
168
+ /** A type as loaded: the file's words, and the notes.md body when there is one. */
169
+ export interface LoadedComponentType extends ComponentType {
170
+ /** The notes file's text, as written (Markdown). */
171
+ notesText?: string;
172
+ /** `builtin`, or the org pack. */
173
+ source: "builtin" | "org-pack";
174
+ }
175
+ /** Atticus's own component types (ADR 0040's documented values), in the org pack's shape. */
176
+ export declare const BUILTIN_COMPONENT_TYPES: readonly LoadedComponentType[];
177
+ /**
178
+ * The organisation's set: Atticus's built-ins, each replaced by an org-pack type of the same id
179
+ * (its words win) or taken out by one with `off`, then the organisation's own types, in id order.
180
+ */
181
+ export declare function effectiveComponentTypes(pack: readonly LoadedComponentType[]): LoadedComponentType[];
182
+ /**
183
+ * The types as `atticus map <repo> --estimate` lists them for the reader: each with its id, its
184
+ * description and the signals it rests on, in a data block. The reader writes one `component`
185
+ * fact per component with the type it fits, citing the line that shows a signal.
186
+ */
187
+ export declare function componentTypesText(types: readonly LoadedComponentType[]): string;
188
+ /**
189
+ * What a type must and must not do, for a stage drafting a new component or a review: each
190
+ * line quoted, in a data block, with the type's notes file named (not read into the prompt whole:
191
+ * a person's write-up can be long; the stage reads it from the file when it needs it).
192
+ */
193
+ export declare function componentTypeRulesText(types: readonly LoadedComponentType[], packRel: string): string;
@@ -0,0 +1,80 @@
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
+ /**
10
+ * Version 2 (ADR 0163) adds `notes`, the organisation-wide notes every read is handed beside its
11
+ * repo type's. A version-1 file reads as it is and comes back as version 2 in memory.
12
+ */
13
+ export declare const CONVENTIONS_SCHEMA_VERSION: 2;
14
+ /** The folders an API spec is kept in, as a gateway's repo keeps its proxy's spec. */
15
+ export declare const DEFAULT_API_SPEC_FOLDERS: readonly ["oas", "openapi", "swagger", "asyncapi", "api-spec", "api-specs", "apispec", "apispecs"];
16
+ /** The folders of a gateway's proxy bundles: an entry under one is a gateway route, whatever the repo. */
17
+ export declare const DEFAULT_GATEWAY_BUNDLE_FOLDERS: readonly ["apiproxy", "sharedflowbundle"];
18
+ /** The words a virtual host or a gateway's config uses for each side of the organisation. */
19
+ export declare const DEFAULT_FACING_WORDS: {
20
+ readonly internal: readonly ["internal", "private", "intranet", "inside"];
21
+ readonly external: readonly ["external", "partner", "public", "internet", "egress"];
22
+ };
23
+ /** Folders whose files hold nothing of what a repo serves, calls or stores: tests and fixtures. */
24
+ export declare const DEFAULT_NOT_PRODUCT_FOLDERS: readonly ["src/test", "src/it", "test", "tests", "__tests__", "__mocks__", "spec", "specs", "e2e", "testdata", "test-data", "fixtures"];
25
+ /** Folders whose strings aren't the product's (generated, built, vendored), for the skipped-lines note. */
26
+ 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"];
27
+ /**
28
+ * A framework the organisation tells Atticus about (verify's framework table, ADR 0124 addendum
29
+ * A-framework): what a declaration in a build file means. Looked at before the built-in table,
30
+ * so an entry here can also say what a known declaration means in this house.
31
+ */
32
+ export declare const ConventionFramework: z.ZodObject<{
33
+ declares: z.ZodString;
34
+ name: z.ZodString;
35
+ topic: z.ZodOptional<z.ZodString>;
36
+ shape: z.ZodOptional<z.ZodEnum<{
37
+ "batch-job": "batch-job";
38
+ rest: "rest";
39
+ store: "store";
40
+ screen: "screen";
41
+ }>>;
42
+ }, z.core.$strict>;
43
+ export type ConventionFramework = z.infer<typeof ConventionFramework>;
44
+ export declare const Conventions: z.ZodObject<{
45
+ schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
46
+ apiSpecFolders: z.ZodDefault<z.ZodArray<z.ZodString>>;
47
+ gatewayBundleFolders: z.ZodDefault<z.ZodArray<z.ZodString>>;
48
+ facing: z.ZodDefault<z.ZodObject<{
49
+ internal: z.ZodDefault<z.ZodArray<z.ZodString>>;
50
+ external: z.ZodDefault<z.ZodArray<z.ZodString>>;
51
+ }, z.core.$strict>>;
52
+ frameworks: z.ZodDefault<z.ZodArray<z.ZodObject<{
53
+ declares: z.ZodString;
54
+ name: z.ZodString;
55
+ topic: z.ZodOptional<z.ZodString>;
56
+ shape: z.ZodOptional<z.ZodEnum<{
57
+ "batch-job": "batch-job";
58
+ rest: "rest";
59
+ store: "store";
60
+ screen: "screen";
61
+ }>>;
62
+ }, z.core.$strict>>>;
63
+ notProductFolders: z.ZodDefault<z.ZodArray<z.ZodString>>;
64
+ notReadFolders: z.ZodDefault<z.ZodArray<z.ZodString>>;
65
+ housePrefixes: z.ZodDefault<z.ZodArray<z.ZodString>>;
66
+ notes: z.ZodOptional<z.ZodArray<z.ZodString>>;
67
+ }, z.core.$strict>;
68
+ export type Conventions = z.infer<typeof Conventions>;
69
+ /** The conventions of a pack without conventions.yaml: the built-in lists. */
70
+ export declare const DEFAULT_CONVENTIONS: Conventions;
71
+ /**
72
+ * A test for a path under one of these folders, as whole segments anywhere in it: `(^|/)(a|b)/`.
73
+ * `tail` follows the folder (default: anything). Matches nothing when the list is empty.
74
+ */
75
+ export declare function underFolders(folders: readonly string[], o?: {
76
+ tail?: string;
77
+ flags?: string;
78
+ }): RegExp;
79
+ /** An entry cited under one of these folders is a gateway route (default: the built-in bundle folders). */
80
+ export declare function gatewayBundleTest(folders?: readonly string[]): RegExp;
@@ -11,16 +11,55 @@ 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
- export declare const FACT_CORRECTIONS_SCHEMA_VERSION: 1;
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
+ term: "term";
24
63
  framework: "framework";
25
64
  entry: "entry";
26
65
  store: "store";
@@ -33,14 +72,41 @@ export declare const FactCorrection: z.ZodObject<{
33
72
  value: z.ZodString;
34
73
  }, z.core.$strict>;
35
74
  action: z.ZodEnum<{
75
+ link: "link";
36
76
  wrong: "wrong";
37
77
  edit: "edit";
78
+ unlink: "unlink";
38
79
  }>;
80
+ link: z.ZodOptional<z.ZodObject<{
81
+ repo: z.ZodOptional<z.ZodString>;
82
+ system: z.ZodOptional<z.ZodString>;
83
+ entry: z.ZodOptional<z.ZodString>;
84
+ method: z.ZodOptional<z.ZodString>;
85
+ path: z.ZodString;
86
+ }, z.core.$strict>>;
39
87
  set: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
40
88
  line: z.ZodOptional<z.ZodNumber>;
41
89
  reason: z.ZodOptional<z.ZodString>;
42
90
  by: z.ZodString;
43
91
  at: z.ZodISODateTime;
92
+ ai: z.ZodOptional<z.ZodObject<{
93
+ runtime: z.ZodEnum<{
94
+ "hand-off": "hand-off";
95
+ "copilot-acp": "copilot-acp";
96
+ }>;
97
+ run: z.ZodString;
98
+ bar: z.ZodOptional<z.ZodEnum<{
99
+ confident: "confident";
100
+ "agrees-with-shapes": "agrees-with-shapes";
101
+ "person-rule": "person-rule";
102
+ }>>;
103
+ }, z.core.$strict>>;
104
+ batch: z.ZodOptional<z.ZodString>;
105
+ rule: z.ZodOptional<z.ZodObject<{
106
+ from: z.ZodString;
107
+ match: z.ZodString;
108
+ }, z.core.$strict>>;
109
+ match: z.ZodOptional<z.ZodString>;
44
110
  }, z.core.$strict>;
45
111
  export type FactCorrection = z.infer<typeof FactCorrection>;
46
112
  /** The corrections of a file's text, one per line; a line that isn't one is a problem with its number. */
@@ -53,3 +119,40 @@ export declare function parseCorrections(text: string): {
53
119
  };
54
120
  /** One correction as its line in the file, keys in a fixed order. */
55
121
  export declare function correctionLine(c: FactCorrection): string;
122
+ type CallLike = {
123
+ kind: string;
124
+ id: string;
125
+ cite: {
126
+ file: string;
127
+ line: number;
128
+ value: string;
129
+ };
130
+ };
131
+ /**
132
+ * G1 (ADR 0174): every pairing (`link`) that meets a call, newest first: on its cited line by its
133
+ * id or by what it cites, or by its id where an edit of the same fact moved it to the line it is
134
+ * on now. One matcher for the verifier and the join.
135
+ */
136
+ export declare function linksFor(f: CallLike, corrections: readonly FactCorrection[]): FactCorrection[];
137
+ /**
138
+ * A pairing as the join reads it: what the call reaches, who said so, and (ADR 0181) the AI run.
139
+ * Review round 48: `none` when a person's `unlink` is the newest (asked for with `declined`): the
140
+ * call reaches nothing a person knows of, so an AI answer never joins it (the path is the call's).
141
+ */
142
+ export type PairOnFile = CorrectionLink & {
143
+ by: string;
144
+ ai?: CorrectionAi;
145
+ none?: true;
146
+ };
147
+ /**
148
+ * G1 (ADR 0174): a repo's pairings, call fact id → what the person paired it with, from its
149
+ * corrections file: the newest link per call (a repo's or an outside system's), met as linksFor
150
+ * meets it. A link that meets no call is left out (the verifier says so). ADR 0181: an AI
151
+ * pairing keeps its run (`ai`); a newer `unlink` withdraws any pairing. With `declined` (the
152
+ * join's read, round 48), a person's newest `unlink` is kept as `none`, so the join knows a
153
+ * person said "none" and an AI answer doesn't join the call.
154
+ */
155
+ export declare function pairsFromCorrections(facts: readonly CallLike[], corrections: readonly FactCorrection[], o?: {
156
+ declined?: boolean;
157
+ }): Record<string, PairOnFile>;
158
+ export {};