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

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 (87) hide show
  1. package/{dist → npm}/cache.d.ts +1 -1
  2. package/npm/core/api.d.ts +6098 -0
  3. package/npm/core/assistant-actor.d.ts +15 -0
  4. package/npm/core/branches.d.ts +21 -0
  5. package/npm/core/cancel.d.ts +9 -0
  6. package/npm/core/catalog.d.ts +4733 -0
  7. package/npm/core/change-types-migrate.d.ts +10 -0
  8. package/npm/core/cite.d.ts +54 -0
  9. package/npm/core/curated.d.ts +37 -0
  10. package/npm/core/facts-callers.d.ts +150 -0
  11. package/npm/core/facts-carry.d.ts +36 -0
  12. package/npm/core/facts-join-prototype.d.ts +177 -0
  13. package/npm/core/facts-join-vendor.d.ts +92 -0
  14. package/npm/core/facts-join.d.ts +256 -0
  15. package/npm/core/facts.d.ts +94 -0
  16. package/npm/core/fs.d.ts +47 -0
  17. package/npm/core/gates-migrate.d.ts +10 -0
  18. package/npm/core/host-questions.d.ts +24 -0
  19. package/npm/core/identity.d.ts +17 -0
  20. package/npm/core/index.d.ts +62 -0
  21. package/npm/core/json-schema.d.ts +20 -0
  22. package/npm/core/judgments.d.ts +63 -0
  23. package/npm/core/light.d.ts +8 -0
  24. package/npm/core/log.d.ts +49 -0
  25. package/npm/core/manifest-edit.d.ts +48 -0
  26. package/npm/core/merge.d.ts +78 -0
  27. package/npm/core/metarepo.d.ts +83 -0
  28. package/npm/core/migrate.d.ts +31 -0
  29. package/npm/core/migration-files.d.ts +13 -0
  30. package/npm/core/orgpack-defaults.d.ts +194 -0
  31. package/npm/core/orgpack-load.d.ts +86 -0
  32. package/npm/core/questions.d.ts +267 -0
  33. package/npm/core/record-cache.d.ts +52 -0
  34. package/npm/core/refs.d.ts +9 -0
  35. package/npm/core/repo-description.d.ts +44 -0
  36. package/npm/core/runtime-migrate.d.ts +11 -0
  37. package/npm/core/schema/ai.d.ts +397 -0
  38. package/npm/core/schema/change.d.ts +244 -0
  39. package/npm/core/schema/common.d.ts +135 -0
  40. package/npm/core/schema/dialect.d.ts +801 -0
  41. package/npm/core/schema/executors.d.ts +396 -0
  42. package/npm/core/schema/fact-corrections.d.ts +55 -0
  43. package/npm/core/schema/facts.d.ts +1476 -0
  44. package/npm/core/schema/frameworks.d.ts +371 -0
  45. package/npm/core/schema/judgment.d.ts +77 -0
  46. package/npm/core/schema/kinds.d.ts +5166 -0
  47. package/npm/core/schema/layout.d.ts +25 -0
  48. package/npm/core/schema/orgpack.d.ts +1167 -0
  49. package/npm/core/schema/plugin.d.ts +73 -0
  50. package/npm/core/schema/question.d.ts +152 -0
  51. package/npm/core/schema/repo-type.d.ts +109 -0
  52. package/npm/core/schema/review.d.ts +558 -0
  53. package/npm/core/schema/scan-settings.d.ts +34 -0
  54. package/npm/core/schema/scan-verify.d.ts +535 -0
  55. package/npm/core/schema/spec.d.ts +269 -0
  56. package/npm/core/schema/version.d.ts +9 -0
  57. package/npm/core/schema/workspace.d.ts +312 -0
  58. package/npm/core/serialize.d.ts +17 -0
  59. package/npm/core/sources-migrate.d.ts +15 -0
  60. package/npm/core/specs.d.ts +66 -0
  61. package/npm/core/tar-read.d.ts +13 -0
  62. package/npm/core/template.d.ts +101 -0
  63. package/npm/core/words.d.ts +13 -0
  64. package/npm/core/zip-read.d.ts +37 -0
  65. package/npm/core/zip.d.ts +13 -0
  66. package/npm/index.js +8892 -0
  67. package/{dist → npm}/plugin.d.ts +1 -1
  68. package/{dist → npm}/runner.d.ts +1 -1
  69. package/package.json +10 -11
  70. package/dist/cache.js +0 -115
  71. package/dist/cache.js.map +0 -1
  72. package/dist/fs-repo.js +0 -120
  73. package/dist/fs-repo.js.map +0 -1
  74. package/dist/index.js +0 -7
  75. package/dist/index.js.map +0 -1
  76. package/dist/parse-cache.js +0 -275
  77. package/dist/parse-cache.js.map +0 -1
  78. package/dist/plugin.js +0 -85
  79. package/dist/plugin.js.map +0 -1
  80. package/dist/runner.js +0 -209
  81. package/dist/runner.js.map +0 -1
  82. package/dist/sandbox.js +0 -443
  83. package/dist/sandbox.js.map +0 -1
  84. /package/{dist → npm}/fs-repo.d.ts +0 -0
  85. /package/{dist → npm}/index.d.ts +0 -0
  86. /package/{dist → npm}/parse-cache.d.ts +0 -0
  87. /package/{dist → npm}/sandbox.d.ts +0 -0
@@ -0,0 +1,396 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Contract C4, version 1: manual steps and step executors (ADRs 0032 and 0033).
4
+ *
5
+ * A **manual step** is what a manual adapter produces instead of a write it can't make: what
6
+ * to do, where, every field ready to copy, and what to record back. It is stored as canonical
7
+ * YAML in the change folder (`openspec/changes/<change>/steps/<id>.yaml`), or in `steps/` at
8
+ * the metarepo root when no change owns it, and it is the audit trail of the write.
9
+ *
10
+ * An **executor** is a person's own automation (a script, RPA, a browser agent, an MCP
11
+ * server) that can do a step for them. Atticus calls it through one small protocol, over
12
+ * three transports: `http` (a service at 127.0.0.1), `command` (JSON on stdin, JSON lines on
13
+ * stdout) and `mcp` (tools over stdio JSON-RPC). The person declares where their executors
14
+ * run in `.atticus/executors.yaml` (local, never committed); the org pack decides which may
15
+ * run which procedure (C6 `process/procedures/*.yaml`, `executors.allowed`).
16
+ *
17
+ * Safety rules, not configurable: executors are off unless allowlisted; every write run has
18
+ * a person's approval of the exact inputs (their sha-256); credentials are never passed to an
19
+ * executor or stored from one, so no input or output key may look like a secret.
20
+ *
21
+ * A contract file at version 1. Changing it needs an ADR and a version bump with a migration.
22
+ */
23
+ export declare const EXECUTOR_SCHEMA_VERSION: 1;
24
+ /** The outside systems a manual adapter stands in for (the model has none: hand-off mode is that). */
25
+ export declare const MANUAL_SYSTEMS: readonly ["work-tracker", "service-desk", "git-host", "wiki", "notify", "design"];
26
+ export declare const ManualSystem: z.ZodEnum<{
27
+ wiki: "wiki";
28
+ design: "design";
29
+ "work-tracker": "work-tracker";
30
+ "service-desk": "service-desk";
31
+ "git-host": "git-host";
32
+ notify: "notify";
33
+ }>;
34
+ export type ManualSystem = z.infer<typeof ManualSystem>;
35
+ /** Keys that look like secrets. Executors never get or give credentials. */
36
+ export declare const SECRET_KEY_PATTERN: RegExp;
37
+ /** Every key path in a JSON value that looks like a secret. */
38
+ export declare function secretKeys(value: unknown, prefix?: string): string[];
39
+ /** How a value a person records back is checked. */
40
+ export declare const ResultFormat: z.ZodEnum<{
41
+ number: "number";
42
+ date: "date";
43
+ pattern: "pattern";
44
+ text: "text";
45
+ url: "url";
46
+ integer: "integer";
47
+ "yes-no": "yes-no";
48
+ handles: "handles";
49
+ choice: "choice";
50
+ }>;
51
+ export type ResultFormat = z.infer<typeof ResultFormat>;
52
+ /** A field ready to copy into the outside system. */
53
+ export declare const StepField: z.ZodObject<{
54
+ name: z.ZodString;
55
+ value: z.ZodString;
56
+ help: z.ZodOptional<z.ZodString>;
57
+ }, z.core.$strict>;
58
+ /** Something the person records back once the step is done (the new id, the PR URL). */
59
+ export declare const ResultField: z.ZodObject<{
60
+ name: z.ZodString;
61
+ label: z.ZodString;
62
+ format: z.ZodEnum<{
63
+ number: "number";
64
+ date: "date";
65
+ pattern: "pattern";
66
+ text: "text";
67
+ url: "url";
68
+ integer: "integer";
69
+ "yes-no": "yes-no";
70
+ handles: "handles";
71
+ choice: "choice";
72
+ }>;
73
+ required: z.ZodDefault<z.ZodBoolean>;
74
+ pattern: z.ZodOptional<z.ZodString>;
75
+ choices: z.ZodOptional<z.ZodArray<z.ZodString>>;
76
+ help: z.ZodOptional<z.ZodString>;
77
+ }, z.core.$strict>;
78
+ export type ResultField = z.infer<typeof ResultField>;
79
+ export declare const StepEvidence: z.ZodObject<{
80
+ kind: z.ZodEnum<{
81
+ file: "file";
82
+ link: "link";
83
+ page: "page";
84
+ log: "log";
85
+ screenshot: "screenshot";
86
+ }>;
87
+ ref: z.ZodString;
88
+ at: z.ZodOptional<z.ZodISODateTime>;
89
+ }, z.core.$strict>;
90
+ /** A person's approval of one write, with the sha-256 of the exact inputs when an executor runs it. */
91
+ export declare const StepApproval: z.ZodObject<{
92
+ by: z.ZodString;
93
+ at: z.ZodISODateTime;
94
+ ref: z.ZodString;
95
+ inputsSha256: z.ZodOptional<z.ZodString>;
96
+ }, z.core.$strict>;
97
+ export type StepApproval = z.infer<typeof StepApproval>;
98
+ export declare const RunStatus: z.ZodEnum<{
99
+ done: "done";
100
+ failed: "failed";
101
+ "needs-person": "needs-person";
102
+ }>;
103
+ /** One executor run on a step, kept for the audit trail and the retry rule. */
104
+ export declare const StepRun: z.ZodObject<{
105
+ runId: z.ZodString;
106
+ executor: z.ZodString;
107
+ at: z.ZodISODateTime;
108
+ finishedAt: z.ZodOptional<z.ZodISODateTime>;
109
+ approval: z.ZodObject<{
110
+ by: z.ZodString;
111
+ at: z.ZodISODateTime;
112
+ ref: z.ZodString;
113
+ inputsSha256: z.ZodOptional<z.ZodString>;
114
+ }, z.core.$strict>;
115
+ mode: z.ZodEnum<{
116
+ submit: "submit";
117
+ "fill-only": "fill-only";
118
+ }>;
119
+ idempotencyKey: z.ZodString;
120
+ status: z.ZodEnum<{
121
+ done: "done";
122
+ failed: "failed";
123
+ "needs-person": "needs-person";
124
+ "timed-out": "timed-out";
125
+ unreachable: "unreachable";
126
+ refused: "refused";
127
+ }>;
128
+ message: z.ZodOptional<z.ZodString>;
129
+ }, z.core.$strict>;
130
+ export type StepRun = z.infer<typeof StepRun>;
131
+ export declare const RecordedResult: z.ZodObject<{
132
+ at: z.ZodISODateTime;
133
+ by: z.ZodString;
134
+ values: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString>]>>>;
135
+ via: z.ZodDefault<z.ZodEnum<{
136
+ person: "person";
137
+ executor: "executor";
138
+ }>>;
139
+ executor: z.ZodOptional<z.ZodString>;
140
+ evidence: z.ZodDefault<z.ZodArray<z.ZodObject<{
141
+ kind: z.ZodEnum<{
142
+ file: "file";
143
+ link: "link";
144
+ page: "page";
145
+ log: "log";
146
+ screenshot: "screenshot";
147
+ }>;
148
+ ref: z.ZodString;
149
+ at: z.ZodOptional<z.ZodISODateTime>;
150
+ }, z.core.$strict>>>;
151
+ note: z.ZodOptional<z.ZodString>;
152
+ }, z.core.$strict>;
153
+ export declare const StepState: z.ZodEnum<{
154
+ done: "done";
155
+ open: "open";
156
+ skipped: "skipped";
157
+ }>;
158
+ export declare const ManualStep: z.ZodObject<{
159
+ schemaVersion: z.ZodLiteral<1>;
160
+ id: z.ZodString;
161
+ change: z.ZodOptional<z.ZodString>;
162
+ system: z.ZodEnum<{
163
+ wiki: "wiki";
164
+ design: "design";
165
+ "work-tracker": "work-tracker";
166
+ "service-desk": "service-desk";
167
+ "git-host": "git-host";
168
+ notify: "notify";
169
+ }>;
170
+ action: z.ZodString;
171
+ key: z.ZodString;
172
+ title: z.ZodString;
173
+ where: z.ZodString;
174
+ procedure: z.ZodOptional<z.ZodString>;
175
+ procedureStep: z.ZodOptional<z.ZodString>;
176
+ inputs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
177
+ fields: z.ZodDefault<z.ZodArray<z.ZodObject<{
178
+ name: z.ZodString;
179
+ value: z.ZodString;
180
+ help: z.ZodOptional<z.ZodString>;
181
+ }, z.core.$strict>>>;
182
+ instructions: z.ZodDefault<z.ZodArray<z.ZodString>>;
183
+ result: z.ZodDefault<z.ZodArray<z.ZodObject<{
184
+ name: z.ZodString;
185
+ label: z.ZodString;
186
+ format: z.ZodEnum<{
187
+ number: "number";
188
+ date: "date";
189
+ pattern: "pattern";
190
+ text: "text";
191
+ url: "url";
192
+ integer: "integer";
193
+ "yes-no": "yes-no";
194
+ handles: "handles";
195
+ choice: "choice";
196
+ }>;
197
+ required: z.ZodDefault<z.ZodBoolean>;
198
+ pattern: z.ZodOptional<z.ZodString>;
199
+ choices: z.ZodOptional<z.ZodArray<z.ZodString>>;
200
+ help: z.ZodOptional<z.ZodString>;
201
+ }, z.core.$strict>>>;
202
+ state: z.ZodDefault<z.ZodEnum<{
203
+ done: "done";
204
+ open: "open";
205
+ skipped: "skipped";
206
+ }>>;
207
+ dependsOn: z.ZodDefault<z.ZodArray<z.ZodString>>;
208
+ createdAt: z.ZodISODateTime;
209
+ createdBy: z.ZodString;
210
+ approval: z.ZodOptional<z.ZodObject<{
211
+ by: z.ZodString;
212
+ at: z.ZodISODateTime;
213
+ ref: z.ZodString;
214
+ inputsSha256: z.ZodOptional<z.ZodString>;
215
+ }, z.core.$strict>>;
216
+ reason: z.ZodOptional<z.ZodString>;
217
+ recorded: z.ZodOptional<z.ZodObject<{
218
+ at: z.ZodISODateTime;
219
+ by: z.ZodString;
220
+ values: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString>]>>>;
221
+ via: z.ZodDefault<z.ZodEnum<{
222
+ person: "person";
223
+ executor: "executor";
224
+ }>>;
225
+ executor: z.ZodOptional<z.ZodString>;
226
+ evidence: z.ZodDefault<z.ZodArray<z.ZodObject<{
227
+ kind: z.ZodEnum<{
228
+ file: "file";
229
+ link: "link";
230
+ page: "page";
231
+ log: "log";
232
+ screenshot: "screenshot";
233
+ }>;
234
+ ref: z.ZodString;
235
+ at: z.ZodOptional<z.ZodISODateTime>;
236
+ }, z.core.$strict>>>;
237
+ note: z.ZodOptional<z.ZodString>;
238
+ }, z.core.$strict>>;
239
+ runs: z.ZodDefault<z.ZodArray<z.ZodObject<{
240
+ runId: z.ZodString;
241
+ executor: z.ZodString;
242
+ at: z.ZodISODateTime;
243
+ finishedAt: z.ZodOptional<z.ZodISODateTime>;
244
+ approval: z.ZodObject<{
245
+ by: z.ZodString;
246
+ at: z.ZodISODateTime;
247
+ ref: z.ZodString;
248
+ inputsSha256: z.ZodOptional<z.ZodString>;
249
+ }, z.core.$strict>;
250
+ mode: z.ZodEnum<{
251
+ submit: "submit";
252
+ "fill-only": "fill-only";
253
+ }>;
254
+ idempotencyKey: z.ZodString;
255
+ status: z.ZodEnum<{
256
+ done: "done";
257
+ failed: "failed";
258
+ "needs-person": "needs-person";
259
+ "timed-out": "timed-out";
260
+ unreachable: "unreachable";
261
+ refused: "refused";
262
+ }>;
263
+ message: z.ZodOptional<z.ZodString>;
264
+ }, z.core.$strict>>>;
265
+ }, z.core.$strict>;
266
+ export type ManualStep = z.infer<typeof ManualStep>;
267
+ export type ManualStepInput = z.input<typeof ManualStep>;
268
+ export declare const ExecutorTransport: z.ZodEnum<{
269
+ http: "http";
270
+ command: "command";
271
+ mcp: "mcp";
272
+ }>;
273
+ export type ExecutorTransport = z.infer<typeof ExecutorTransport>;
274
+ /** One executor as the person declares it in `.atticus/executors.yaml`. */
275
+ export declare const ExecutorConfig: z.ZodObject<{
276
+ name: z.ZodString;
277
+ transport: z.ZodEnum<{
278
+ http: "http";
279
+ command: "command";
280
+ mcp: "mcp";
281
+ }>;
282
+ url: z.ZodOptional<z.ZodURL>;
283
+ command: z.ZodOptional<z.ZodString>;
284
+ args: z.ZodDefault<z.ZodArray<z.ZodString>>;
285
+ procedures: z.ZodDefault<z.ZodArray<z.ZodString>>;
286
+ stepKinds: z.ZodDefault<z.ZodArray<z.ZodString>>;
287
+ fillOnly: z.ZodDefault<z.ZodBoolean>;
288
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
289
+ tools: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
290
+ }, z.core.$strict>;
291
+ export type ExecutorConfig = z.infer<typeof ExecutorConfig>;
292
+ export declare const ExecutorsFile: z.ZodObject<{
293
+ schemaVersion: z.ZodLiteral<1>;
294
+ executors: z.ZodDefault<z.ZodArray<z.ZodObject<{
295
+ name: z.ZodString;
296
+ transport: z.ZodEnum<{
297
+ http: "http";
298
+ command: "command";
299
+ mcp: "mcp";
300
+ }>;
301
+ url: z.ZodOptional<z.ZodURL>;
302
+ command: z.ZodOptional<z.ZodString>;
303
+ args: z.ZodDefault<z.ZodArray<z.ZodString>>;
304
+ procedures: z.ZodDefault<z.ZodArray<z.ZodString>>;
305
+ stepKinds: z.ZodDefault<z.ZodArray<z.ZodString>>;
306
+ fillOnly: z.ZodDefault<z.ZodBoolean>;
307
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
308
+ tools: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
309
+ }, z.core.$strict>>>;
310
+ }, z.core.$strict>;
311
+ export type ExecutorsFile = z.infer<typeof ExecutorsFile>;
312
+ /** Atticus → executor: run one step of a procedure. */
313
+ export declare const RunRequest: z.ZodObject<{
314
+ schemaVersion: z.ZodLiteral<1>;
315
+ type: z.ZodLiteral<"run">;
316
+ runId: z.ZodString;
317
+ procedure: z.ZodString;
318
+ step: z.ZodString;
319
+ inputs: z.ZodRecord<z.ZodString, z.ZodUnknown>;
320
+ change: z.ZodOptional<z.ZodString>;
321
+ task: z.ZodOptional<z.ZodString>;
322
+ manualStep: z.ZodOptional<z.ZodString>;
323
+ idempotencyKey: z.ZodString;
324
+ mode: z.ZodDefault<z.ZodEnum<{
325
+ submit: "submit";
326
+ "fill-only": "fill-only";
327
+ }>>;
328
+ approval: z.ZodOptional<z.ZodObject<{
329
+ by: z.ZodString;
330
+ at: z.ZodISODateTime;
331
+ ref: z.ZodString;
332
+ inputsSha256: z.ZodOptional<z.ZodString>;
333
+ }, z.core.$strict>>;
334
+ }, z.core.$strict>;
335
+ export type RunRequest = z.infer<typeof RunRequest>;
336
+ /** Executor → Atticus, any number of times before the result. */
337
+ export declare const RunProgress: z.ZodObject<{
338
+ type: z.ZodLiteral<"progress">;
339
+ runId: z.ZodString;
340
+ message: z.ZodString;
341
+ percent: z.ZodOptional<z.ZodNumber>;
342
+ at: z.ZodOptional<z.ZodISODateTime>;
343
+ }, z.core.$strict>;
344
+ export type RunProgress = z.infer<typeof RunProgress>;
345
+ /** Executor → Atticus, once: what happened. */
346
+ export declare const RunResult: z.ZodObject<{
347
+ type: z.ZodLiteral<"result">;
348
+ runId: z.ZodString;
349
+ status: z.ZodEnum<{
350
+ done: "done";
351
+ failed: "failed";
352
+ "needs-person": "needs-person";
353
+ }>;
354
+ outputs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
355
+ evidence: z.ZodDefault<z.ZodArray<z.ZodObject<{
356
+ kind: z.ZodEnum<{
357
+ file: "file";
358
+ link: "link";
359
+ page: "page";
360
+ log: "log";
361
+ screenshot: "screenshot";
362
+ }>;
363
+ ref: z.ZodString;
364
+ at: z.ZodOptional<z.ZodISODateTime>;
365
+ }, z.core.$strict>>>;
366
+ message: z.ZodOptional<z.ZodString>;
367
+ startedAt: z.ZodOptional<z.ZodISODateTime>;
368
+ finishedAt: z.ZodOptional<z.ZodISODateTime>;
369
+ }, z.core.$strict>;
370
+ export type RunResult = z.infer<typeof RunResult>;
371
+ /** Atticus → executor: are you there, and what can you run? */
372
+ export declare const PingRequest: z.ZodObject<{
373
+ type: z.ZodLiteral<"ping">;
374
+ }, z.core.$strict>;
375
+ export declare const PingResponse: z.ZodObject<{
376
+ type: z.ZodLiteral<"pong">;
377
+ name: z.ZodString;
378
+ version: z.ZodString;
379
+ procedures: z.ZodDefault<z.ZodArray<z.ZodString>>;
380
+ stepKinds: z.ZodDefault<z.ZodArray<z.ZodString>>;
381
+ fillOnly: z.ZodDefault<z.ZodBoolean>;
382
+ }, z.core.$strict>;
383
+ export type PingResponse = z.infer<typeof PingResponse>;
384
+ /** Atticus → executor: was this idempotency key used? Only a "no" allows a retry without new approval. */
385
+ export declare const IdempotencyCheck: z.ZodObject<{
386
+ type: z.ZodLiteral<"check">;
387
+ idempotencyKey: z.ZodString;
388
+ }, z.core.$strict>;
389
+ export declare const IdempotencyAnswer: z.ZodObject<{
390
+ type: z.ZodLiteral<"checked">;
391
+ idempotencyKey: z.ZodString;
392
+ used: z.ZodBoolean;
393
+ }, z.core.$strict>;
394
+ export type IdempotencyAnswer = z.infer<typeof IdempotencyAnswer>;
395
+ /** JSON Schema for the C4 step and executor files and messages. */
396
+ export declare function executorJsonSchemas(): Record<string, object>;
@@ -0,0 +1,55 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * A person's correction of a fact (ADR 0124 addendum D-app, F3): `facts/<repo>.corrections.jsonl`
4
+ * (`.atticus/facts/` when adopted), one JSON object per line, written from the Map in the app.
5
+ * The verifier applies every correction to the facts it is given, each time it runs, so a
6
+ * correction outlives the next read: a fact marked wrong is left out of what the verifier keeps,
7
+ * and an edited fact becomes a person's fact (`by: person`, `verified: person`) whose claim is
8
+ * still checked on its line, because every fact cites its code (CLAUDE.md rule 4).
9
+ *
10
+ * A correction names the fact it is about twice: by id, and by what the assistant cited (kind,
11
+ * file, line and value), so a read that gives the same fact another id still meets it. One that
12
+ * meets no fact is stale: the verifier says so and applies nothing.
13
+ */
14
+ export declare const FACT_CORRECTIONS_SCHEMA_VERSION: 1;
15
+ /** The fields of a fact a correction may not set: what it is, where it comes from, who checked it. */
16
+ export declare const FACT_FIXED_FIELDS: readonly ["kind", "id", "repo", "commit", "cite", "verified", "by", "conf"];
17
+ export declare const FactCorrection: z.ZodObject<{
18
+ schemaVersion: z.ZodLiteral<1>;
19
+ fact: z.ZodString;
20
+ target: z.ZodObject<{
21
+ kind: z.ZodEnum<{
22
+ config: "config";
23
+ field: "field";
24
+ framework: "framework";
25
+ entry: "entry";
26
+ store: "store";
27
+ call: "call";
28
+ deploy: "deploy";
29
+ flow: "flow";
30
+ }>;
31
+ file: z.ZodString;
32
+ line: z.ZodNumber;
33
+ value: z.ZodString;
34
+ }, z.core.$strict>;
35
+ action: z.ZodEnum<{
36
+ wrong: "wrong";
37
+ edit: "edit";
38
+ }>;
39
+ set: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
40
+ line: z.ZodOptional<z.ZodNumber>;
41
+ reason: z.ZodOptional<z.ZodString>;
42
+ by: z.ZodString;
43
+ at: z.ZodISODateTime;
44
+ }, z.core.$strict>;
45
+ export type FactCorrection = z.infer<typeof FactCorrection>;
46
+ /** The corrections of a file's text, one per line; a line that isn't one is a problem with its number. */
47
+ export declare function parseCorrections(text: string): {
48
+ corrections: FactCorrection[];
49
+ bad: {
50
+ line: number;
51
+ message: string;
52
+ }[];
53
+ };
54
+ /** One correction as its line in the file, keys in a fixed order. */
55
+ export declare function correctionLine(c: FactCorrection): string;