@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.
Files changed (88) hide show
  1. package/npm/core/ai-decisions.d.ts +373 -0
  2. package/npm/core/api.d.ts +15888 -3797
  3. package/npm/core/app-memory.d.ts +69 -0
  4. package/npm/core/assistant-actor.d.ts +28 -7
  5. package/npm/core/audit.d.ts +174 -0
  6. package/npm/core/canary.d.ts +369 -0
  7. package/npm/core/cancel.d.ts +20 -0
  8. package/npm/core/catalog.d.ts +220 -66
  9. package/npm/core/change-types-migrate.d.ts +14 -0
  10. package/npm/core/cite.d.ts +88 -6
  11. package/npm/core/contract-check.d.ts +276 -0
  12. package/npm/core/curated.d.ts +10 -0
  13. package/npm/core/decision-batches.d.ts +29 -0
  14. package/npm/core/declarable-routes.d.ts +52 -0
  15. package/npm/core/declared-links.d.ts +210 -0
  16. package/npm/core/eol.d.ts +5 -0
  17. package/npm/core/fact-paths.d.ts +14 -0
  18. package/npm/core/facts-callers.d.ts +23 -1
  19. package/npm/core/facts-carry.d.ts +8 -2
  20. package/npm/core/facts-deps.d.ts +85 -0
  21. package/npm/core/facts-join-prototype.d.ts +66 -4
  22. package/npm/core/facts-join-vendor.d.ts +67 -7
  23. package/npm/core/facts-join.d.ts +476 -2
  24. package/npm/core/facts-terms.d.ts +108 -0
  25. package/npm/core/facts.d.ts +155 -1
  26. package/npm/core/field-places.d.ts +109 -0
  27. package/npm/core/file-pool.d.ts +84 -0
  28. package/npm/core/fs.d.ts +205 -7
  29. package/npm/core/glob-plain.d.ts +34 -0
  30. package/npm/core/glob.d.ts +14 -0
  31. package/npm/core/hash-cache.d.ts +53 -0
  32. package/npm/core/host-questions.d.ts +273 -1
  33. package/npm/core/identity.d.ts +20 -8
  34. package/npm/core/index.d.ts +38 -0
  35. package/npm/core/initialisms.d.ts +62 -0
  36. package/npm/core/kept-files.d.ts +17 -0
  37. package/npm/core/light.d.ts +5 -0
  38. package/npm/core/link-candidates.d.ts +224 -0
  39. package/npm/core/link-evidence.d.ts +212 -0
  40. package/npm/core/log.d.ts +2 -0
  41. package/npm/core/manifest-edit.d.ts +83 -6
  42. package/npm/core/merge.d.ts +28 -0
  43. package/npm/core/metarepo.d.ts +26 -1
  44. package/npm/core/migrate.d.ts +3 -2
  45. package/npm/core/org-notes.d.ts +180 -0
  46. package/npm/core/orgpack-defaults.d.ts +30 -6
  47. package/npm/core/orgpack-load.d.ts +24 -0
  48. package/npm/core/paths.d.ts +23 -0
  49. package/npm/core/printer.d.ts +18 -0
  50. package/npm/core/process-trees.d.ts +109 -0
  51. package/npm/core/profile-migrate.d.ts +13 -0
  52. package/npm/core/question-order.d.ts +23 -0
  53. package/npm/core/question-owners.d.ts +57 -0
  54. package/npm/core/question-proposals.d.ts +77 -0
  55. package/npm/core/question-roles.d.ts +84 -0
  56. package/npm/core/questions.d.ts +123 -6
  57. package/npm/core/record-cache.d.ts +122 -2
  58. package/npm/core/repo-files.d.ts +66 -0
  59. package/npm/core/repo-reads.d.ts +44 -0
  60. package/npm/core/roles-migrate.d.ts +10 -0
  61. package/npm/core/run-log.d.ts +341 -0
  62. package/npm/core/runtime-migrate.d.ts +18 -0
  63. package/npm/core/schema/ai.d.ts +61 -13
  64. package/npm/core/schema/common.d.ts +32 -8
  65. package/npm/core/schema/component-type.d.ts +193 -0
  66. package/npm/core/schema/conventions.d.ts +80 -0
  67. package/npm/core/schema/dialect.d.ts +12 -12
  68. package/npm/core/schema/fact-corrections.d.ts +112 -2
  69. package/npm/core/schema/facts.d.ts +743 -23
  70. package/npm/core/schema/frameworks.d.ts +12 -12
  71. package/npm/core/schema/kinds.d.ts +230 -66
  72. package/npm/core/schema/orgpack.d.ts +248 -24
  73. package/npm/core/schema/question.d.ts +281 -5
  74. package/npm/core/schema/reading-rules.d.ts +51 -0
  75. package/npm/core/schema/repo-type.d.ts +20 -2
  76. package/npm/core/schema/review.d.ts +30 -9
  77. package/npm/core/schema/scan-verify.d.ts +77 -0
  78. package/npm/core/schema/version.d.ts +4 -1
  79. package/npm/core/schema/workspace.d.ts +29 -11
  80. package/npm/core/setup-edit.d.ts +107 -0
  81. package/npm/core/shared-maps.d.ts +146 -0
  82. package/npm/core/stack-helpers.d.ts +32 -0
  83. package/npm/core/version-order.d.ts +14 -0
  84. package/npm/fs-repo.d.ts +2 -1
  85. package/npm/index.js +14248 -6710
  86. package/npm/listing.d.ts +14 -0
  87. package/npm/sandbox.d.ts +2 -1
  88. package/package.json +1 -1
@@ -4,10 +4,12 @@ import { z } from "zod";
4
4
  * context-pack manifests and run summaries are written per run. See ADR 0014.
5
5
  */
6
6
  export declare const AI_SCHEMA_VERSION: 1;
7
+ /** ADR 0171 adds copilot-acp: GitHub Copilot driven unattended through its Agent Client Protocol. */
7
8
  export declare const RuntimeKind: z.ZodEnum<{
8
9
  model: "model";
9
10
  "hand-off": "hand-off";
10
11
  "headless-claude-code": "headless-claude-code";
12
+ "copilot-acp": "copilot-acp";
11
13
  mock: "mock";
12
14
  replay: "replay";
13
15
  }>;
@@ -93,6 +95,7 @@ export declare const AgentDefinition: z.ZodObject<{
93
95
  model: "model";
94
96
  "hand-off": "hand-off";
95
97
  "headless-claude-code": "headless-claude-code";
98
+ "copilot-acp": "copilot-acp";
96
99
  mock: "mock";
97
100
  replay: "replay";
98
101
  }>>;
@@ -105,8 +108,8 @@ export declare const ContextSource: z.ZodObject<{
105
108
  pattern: "pattern";
106
109
  code: "code";
107
110
  document: "document";
108
- catalog: "catalog";
109
111
  artifact: "artifact";
112
+ catalog: "catalog";
110
113
  checklist: "checklist";
111
114
  skill: "skill";
112
115
  instruction: "instruction";
@@ -131,8 +134,8 @@ export declare const ContextPackManifest: z.ZodObject<{
131
134
  pattern: "pattern";
132
135
  code: "code";
133
136
  document: "document";
134
- catalog: "catalog";
135
137
  artifact: "artifact";
138
+ catalog: "catalog";
136
139
  checklist: "checklist";
137
140
  skill: "skill";
138
141
  instruction: "instruction";
@@ -164,10 +167,33 @@ export type RunState = z.infer<typeof RunState>;
164
167
  /**
165
168
  * The run record's own version: 2 adds the tools a run's model called (ADR 0107 addendum); 3 how
166
169
  * its context was retrieved (ADR 0116): the model's expansion of the input and its order of the
167
- * candidates; 4 the step's class and the model that ran it (ADR 0121 addendum, per-step models).
168
- * A version 1, 2 or 3 record is read through `migrateRunSummary`, without what came later.
170
+ * candidates; 4 the step's class and the model that ran it (ADR 0121 addendum, per-step models);
171
+ * 5 the assistant program that ran it and its version (ADR 0171: the Copilot language server a
172
+ * copilot-acp run talked to); 6 the batch a hand-off was asked in and a batch's parts (ADR 0185:
173
+ * a stage's critic lenses in one prompt). A version 1 to 5 record is read through
174
+ * `migrateRunSummary`, without what came later.
175
+ */
176
+ export declare const RUN_SCHEMA_VERSION: 6;
177
+ /**
178
+ * One part of a batched hand-off (version 6, ADR 0185): its name (the section that answers it,
179
+ * `=== <name>`, a critic lens's name) and its own run, which keeps its own prompt, pack and answer.
180
+ */
181
+ export declare const RunPart: z.ZodObject<{
182
+ name: z.ZodString;
183
+ runId: z.ZodString;
184
+ }, z.core.$strict>;
185
+ export type RunPart = z.infer<typeof RunPart>;
186
+ /**
187
+ * The assistant program a run talked to (version 5, ADR 0171), as it named itself: the agent's
188
+ * name and version from the Agent Client Protocol's initialize answer, the protocol version both
189
+ * sides agreed, and the version `<command> --version` printed. Data, never instructions.
169
190
  */
170
- export declare const RUN_SCHEMA_VERSION: 4;
191
+ export declare const RunAssistant: z.ZodObject<{
192
+ name: z.ZodString;
193
+ version: z.ZodOptional<z.ZodString>;
194
+ protocolVersion: z.ZodOptional<z.ZodNumber>;
195
+ }, z.core.$strict>;
196
+ export type RunAssistant = z.infer<typeof RunAssistant>;
171
197
  /**
172
198
  * How a run's context was retrieved (ADR 0116), when a model helped: what it read the input as
173
199
  * (search terms, the names it found, each mapped to an id the index has or said new, with the
@@ -237,7 +263,7 @@ export declare const RunTools: z.ZodObject<{
237
263
  export type RunTools = z.infer<typeof RunTools>;
238
264
  /** What goes into review/ for every run; full packs and transcripts stay in git-ignored .runs/. */
239
265
  export declare const RunSummary: z.ZodObject<{
240
- schemaVersion: z.ZodLiteral<4>;
266
+ schemaVersion: z.ZodLiteral<6>;
241
267
  runId: z.ZodString;
242
268
  change: z.ZodString;
243
269
  agent: z.ZodString;
@@ -245,6 +271,7 @@ export declare const RunSummary: z.ZodObject<{
245
271
  model: "model";
246
272
  "hand-off": "hand-off";
247
273
  "headless-claude-code": "headless-claude-code";
274
+ "copilot-acp": "copilot-acp";
248
275
  mock: "mock";
249
276
  replay: "replay";
250
277
  }>;
@@ -307,27 +334,38 @@ export declare const RunSummary: z.ZodObject<{
307
334
  }, z.core.$strict>>;
308
335
  stepClass: z.ZodOptional<z.ZodEnum<{
309
336
  read: "read";
337
+ quick: "quick";
310
338
  draft: "draft";
311
339
  critic: "critic";
312
340
  knowledge: "knowledge";
313
- quick: "quick";
314
341
  }>>;
315
342
  model: z.ZodOptional<z.ZodString>;
343
+ assistant: z.ZodOptional<z.ZodObject<{
344
+ name: z.ZodString;
345
+ version: z.ZodOptional<z.ZodString>;
346
+ protocolVersion: z.ZodOptional<z.ZodNumber>;
347
+ }, z.core.$strict>>;
348
+ batch: z.ZodOptional<z.ZodString>;
349
+ parts: z.ZodOptional<z.ZodArray<z.ZodObject<{
350
+ name: z.ZodString;
351
+ runId: z.ZodString;
352
+ }, z.core.$strict>>>;
316
353
  }, z.core.$strict>;
317
354
  export type RunSummary = z.infer<typeof RunSummary>;
318
355
  /**
319
- * A stored run record at the current version: version 1 (before tools), 2 (before retrieval) and
320
- * 3 (before the step's class and model) read as version 4 without them; anything else is
321
- * returned as it is, for the schema to judge.
356
+ * A stored run record at the current version: version 1 (before tools), 2 (before retrieval), 3
357
+ * (before the step's class and model), 4 (before the assistant program, ADR 0171) and 5 (before
358
+ * batches, ADR 0185) read as version 6 without them; anything else is returned as it is, for the
359
+ * schema to judge.
322
360
  */
323
361
  export declare function migrateRunSummary(raw: unknown): unknown;
324
362
  /** Read a stored run record of any version (ADR 0107 addendum). */
325
363
  export declare const readRunSummary: (raw: unknown) => z.ZodSafeParseResult<{
326
- schemaVersion: 4;
364
+ schemaVersion: 6;
327
365
  runId: string;
328
366
  change: string;
329
367
  agent: string;
330
- runtime: "model" | "hand-off" | "headless-claude-code" | "mock" | "replay";
368
+ runtime: "model" | "hand-off" | "headless-claude-code" | "copilot-acp" | "mock" | "replay";
331
369
  state: "failed" | "prepared" | "waiting" | "produced" | "validated" | "cancelled";
332
370
  startedAt: string;
333
371
  contextManifestSha256: string;
@@ -378,8 +416,18 @@ export declare const readRunSummary: (raw: unknown) => z.ZodSafeParseResult<{
378
416
  } | undefined;
379
417
  meaning?: string | undefined;
380
418
  } | undefined;
381
- stepClass?: "read" | "draft" | "critic" | "knowledge" | "quick" | undefined;
419
+ stepClass?: "read" | "quick" | "draft" | "critic" | "knowledge" | undefined;
382
420
  model?: string | undefined;
421
+ assistant?: {
422
+ name: string;
423
+ version?: string | undefined;
424
+ protocolVersion?: number | undefined;
425
+ } | undefined;
426
+ batch?: string | undefined;
427
+ parts?: {
428
+ name: string;
429
+ runId: string;
430
+ }[] | undefined;
383
431
  }>;
384
432
  /** A recorded model output for the replay runtime, keyed by agent and prompt hash. */
385
433
  export declare const Recording: z.ZodObject<{
@@ -3,15 +3,16 @@ import { SCHEMA_VERSION } from "./version.js";
3
3
  /** Current catalog schema version (defined in ./version.js, which loads no schema). */
4
4
  export { SCHEMA_VERSION };
5
5
  /** Every catalog schema version a reader accepts, oldest first. */
6
- export declare const SUPPORTED_SCHEMA_VERSIONS: readonly [1, 2, 3];
6
+ export declare const SUPPORTED_SCHEMA_VERSIONS: readonly [1, 2, 3, 4, 5];
7
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.
8
+ * A record's schema version. Version-1 to -4 files differ from version 5 only in this number
9
+ * (nothing they hold changed meaning: version 4, ADR 0164, only added `protobuf` to a Schema's
10
+ * formats; version 5, ADR 0181, only added the evidence source `ai` and its `run`), so they are
11
+ * read as they are and come back as version 5 in memory; writers always write the current
12
+ * version, and `migrateCatalog` rewrites old files. The type stays `1 | 2 | 3 | 4 | 5` so code
13
+ * that builds older records in memory keeps compiling until it is updated.
13
14
  */
14
- export declare const SchemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>;
15
+ export declare const SchemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>]>;
15
16
  /**
16
17
  * Stable record id. Lowercase slug, safe as a file name on Linux, macOS and Windows
17
18
  * (no ":" or "/"), so every record can live in its own file named by its id.
@@ -49,6 +50,25 @@ export declare const EvidenceSource: z.ZodEnum<{
49
50
  document: "document";
50
51
  export: "export";
51
52
  manual: "manual";
53
+ ai: "ai";
54
+ }>;
55
+ /**
56
+ * The evidence sources a dialect (C2) or a finding (C3) may name: every source but `ai` (ADR 0181),
57
+ * which only Atticus writes, for a link the AI decided. C2 and C3 are unchanged by it.
58
+ */
59
+ export declare const RuleEvidenceSource: z.ZodEnum<{
60
+ code: "code";
61
+ config: "config";
62
+ spec: "spec";
63
+ gateway: "gateway";
64
+ "event-config": "event-config";
65
+ infrastructure: "infrastructure";
66
+ pipeline: "pipeline";
67
+ migration: "migration";
68
+ diagram: "diagram";
69
+ document: "document";
70
+ export: "export";
71
+ manual: "manual";
52
72
  }>;
53
73
  export declare const Evidence: z.ZodObject<{
54
74
  source: z.ZodEnum<{
@@ -64,6 +84,7 @@ export declare const Evidence: z.ZodObject<{
64
84
  document: "document";
65
85
  export: "export";
66
86
  manual: "manual";
87
+ ai: "ai";
67
88
  }>;
68
89
  repo: z.ZodOptional<z.ZodString>;
69
90
  path: z.ZodOptional<z.ZodString>;
@@ -80,12 +101,13 @@ export declare const Evidence: z.ZodObject<{
80
101
  definition: "definition";
81
102
  }>>;
82
103
  by: z.ZodOptional<z.ZodString>;
104
+ run: z.ZodOptional<z.ZodString>;
83
105
  }, z.core.$strict>;
84
106
  export declare const IsoDate: z.ZodISODate;
85
107
  export declare const IsoDateTime: z.ZodISODateTime;
86
108
  /** Fields every record carries. `kind` is added per record type. */
87
109
  export declare const commonFields: {
88
- schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>;
110
+ schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>]>;
89
111
  id: z.ZodString;
90
112
  status: z.ZodEnum<{
91
113
  current: "current";
@@ -113,6 +135,7 @@ export declare const commonFields: {
113
135
  document: "document";
114
136
  export: "export";
115
137
  manual: "manual";
138
+ ai: "ai";
116
139
  }>;
117
140
  repo: z.ZodOptional<z.ZodString>;
118
141
  path: z.ZodOptional<z.ZodString>;
@@ -129,6 +152,7 @@ export declare const commonFields: {
129
152
  definition: "definition";
130
153
  }>>;
131
154
  by: z.ZodOptional<z.ZodString>;
155
+ run: z.ZodOptional<z.ZodString>;
132
156
  }, z.core.$strict>>;
133
157
  flags: z.ZodOptional<z.ZodArray<z.ZodString>>;
134
158
  };
@@ -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;
@@ -8,14 +8,14 @@ import { z } from "zod";
8
8
  export declare const DIALECT_SCHEMA_VERSION: 1;
9
9
  /** Grammars shipped with Atticus for syntax matches (ADR 0060). */
10
10
  export declare const SyntaxLanguage: z.ZodEnum<{
11
+ python: "python";
12
+ go: "go";
11
13
  java: "java";
12
14
  kotlin: "kotlin";
13
15
  typescript: "typescript";
14
16
  tsx: "tsx";
15
17
  javascript: "javascript";
16
18
  c_sharp: "c_sharp";
17
- python: "python";
18
- go: "go";
19
19
  scala: "scala";
20
20
  ruby: "ruby";
21
21
  php: "php";
@@ -59,14 +59,14 @@ export declare const DialectMatch: z.ZodUnion<readonly [z.ZodObject<{
59
59
  contains: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
60
60
  syntax: z.ZodString;
61
61
  language: z.ZodOptional<z.ZodEnum<{
62
+ python: "python";
63
+ go: "go";
62
64
  java: "java";
63
65
  kotlin: "kotlin";
64
66
  typescript: "typescript";
65
67
  tsx: "tsx";
66
68
  javascript: "javascript";
67
69
  c_sharp: "c_sharp";
68
- python: "python";
69
- go: "go";
70
70
  scala: "scala";
71
71
  ruby: "ruby";
72
72
  php: "php";
@@ -208,14 +208,14 @@ export declare const DialectRule: z.ZodObject<{
208
208
  contains: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
209
209
  syntax: z.ZodString;
210
210
  language: z.ZodOptional<z.ZodEnum<{
211
+ python: "python";
212
+ go: "go";
211
213
  java: "java";
212
214
  kotlin: "kotlin";
213
215
  typescript: "typescript";
214
216
  tsx: "tsx";
215
217
  javascript: "javascript";
216
218
  c_sharp: "c_sharp";
217
- python: "python";
218
- go: "go";
219
219
  scala: "scala";
220
220
  ruby: "ruby";
221
221
  php: "php";
@@ -405,14 +405,14 @@ export declare const DialectLookup: z.ZodObject<{
405
405
  contains: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
406
406
  syntax: z.ZodString;
407
407
  language: z.ZodOptional<z.ZodEnum<{
408
+ python: "python";
409
+ go: "go";
408
410
  java: "java";
409
411
  kotlin: "kotlin";
410
412
  typescript: "typescript";
411
413
  tsx: "tsx";
412
414
  javascript: "javascript";
413
415
  c_sharp: "c_sharp";
414
- python: "python";
415
- go: "go";
416
416
  scala: "scala";
417
417
  ruby: "ruby";
418
418
  php: "php";
@@ -534,14 +534,14 @@ export declare const Dialect: z.ZodObject<{
534
534
  contains: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
535
535
  syntax: z.ZodString;
536
536
  language: z.ZodOptional<z.ZodEnum<{
537
+ python: "python";
538
+ go: "go";
537
539
  java: "java";
538
540
  kotlin: "kotlin";
539
541
  typescript: "typescript";
540
542
  tsx: "tsx";
541
543
  javascript: "javascript";
542
544
  c_sharp: "c_sharp";
543
- python: "python";
544
- go: "go";
545
545
  scala: "scala";
546
546
  ruby: "ruby";
547
547
  php: "php";
@@ -600,14 +600,14 @@ export declare const Dialect: z.ZodObject<{
600
600
  contains: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
601
601
  syntax: z.ZodString;
602
602
  language: z.ZodOptional<z.ZodEnum<{
603
+ python: "python";
604
+ go: "go";
603
605
  java: "java";
604
606
  kotlin: "kotlin";
605
607
  typescript: "typescript";
606
608
  tsx: "tsx";
607
609
  javascript: "javascript";
608
610
  c_sharp: "c_sharp";
609
- python: "python";
610
- go: "go";
611
611
  scala: "scala";
612
612
  ruby: "ruby";
613
613
  php: "php";