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

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.
@@ -24,17 +24,17 @@ export declare const VerifySettings: z.ZodObject<{
24
24
  why: z.ZodString;
25
25
  at: z.ZodString;
26
26
  }, z.core.$strict>>>;
27
- prefixes: z.ZodDefault<z.ZodArray<z.ZodObject<{
27
+ clients: z.ZodDefault<z.ZodArray<z.ZodObject<{
28
28
  paths: z.ZodArray<z.ZodString>;
29
- prefix: z.ZodString;
29
+ base: z.ZodString;
30
+ names: z.ZodDefault<z.ZodArray<z.ZodString>>;
30
31
  why: z.ZodString;
31
32
  at: z.ZodString;
32
33
  value: z.ZodString;
33
34
  }, z.core.$strict>>>;
34
- clients: z.ZodDefault<z.ZodArray<z.ZodObject<{
35
+ prefixes: z.ZodDefault<z.ZodArray<z.ZodObject<{
35
36
  paths: z.ZodArray<z.ZodString>;
36
- base: z.ZodString;
37
- names: z.ZodDefault<z.ZodArray<z.ZodString>>;
37
+ prefix: z.ZodString;
38
38
  why: z.ZodString;
39
39
  at: z.ZodString;
40
40
  value: z.ZodString;
@@ -49,17 +49,17 @@ export declare const VerifyFix: z.ZodUnion<readonly [z.ZodObject<{
49
49
  why: z.ZodString;
50
50
  at: z.ZodString;
51
51
  }, z.core.$strict>>>;
52
- prefixes: z.ZodDefault<z.ZodArray<z.ZodObject<{
52
+ clients: z.ZodDefault<z.ZodArray<z.ZodObject<{
53
53
  paths: z.ZodArray<z.ZodString>;
54
- prefix: z.ZodString;
54
+ base: z.ZodString;
55
+ names: z.ZodDefault<z.ZodArray<z.ZodString>>;
55
56
  why: z.ZodString;
56
57
  at: z.ZodString;
57
58
  value: z.ZodString;
58
59
  }, z.core.$strict>>>;
59
- clients: z.ZodDefault<z.ZodArray<z.ZodObject<{
60
+ prefixes: z.ZodDefault<z.ZodArray<z.ZodObject<{
60
61
  paths: z.ZodArray<z.ZodString>;
61
- base: z.ZodString;
62
- names: z.ZodDefault<z.ZodArray<z.ZodString>>;
62
+ prefix: z.ZodString;
63
63
  why: z.ZodString;
64
64
  at: z.ZodString;
65
65
  value: z.ZodString;
@@ -85,6 +85,11 @@ export declare const VerifyFix: z.ZodUnion<readonly [z.ZodObject<{
85
85
  delivery: "delivery";
86
86
  analysis: "analysis";
87
87
  }>>;
88
+ asks: z.ZodOptional<z.ZodEnum<{
89
+ business: "business";
90
+ delivery: "delivery";
91
+ design: "design";
92
+ }>>;
88
93
  sameAs: z.ZodOptional<z.ZodObject<{
89
94
  id: z.ZodString;
90
95
  verdict: z.ZodEnum<{
@@ -111,17 +116,17 @@ export declare const VerifyMissed: z.ZodObject<{
111
116
  why: z.ZodString;
112
117
  at: z.ZodString;
113
118
  }, z.core.$strict>>>;
114
- prefixes: z.ZodDefault<z.ZodArray<z.ZodObject<{
119
+ clients: z.ZodDefault<z.ZodArray<z.ZodObject<{
115
120
  paths: z.ZodArray<z.ZodString>;
116
- prefix: z.ZodString;
121
+ base: z.ZodString;
122
+ names: z.ZodDefault<z.ZodArray<z.ZodString>>;
117
123
  why: z.ZodString;
118
124
  at: z.ZodString;
119
125
  value: z.ZodString;
120
126
  }, z.core.$strict>>>;
121
- clients: z.ZodDefault<z.ZodArray<z.ZodObject<{
127
+ prefixes: z.ZodDefault<z.ZodArray<z.ZodObject<{
122
128
  paths: z.ZodArray<z.ZodString>;
123
- base: z.ZodString;
124
- names: z.ZodDefault<z.ZodArray<z.ZodString>>;
129
+ prefix: z.ZodString;
125
130
  why: z.ZodString;
126
131
  at: z.ZodString;
127
132
  value: z.ZodString;
@@ -147,6 +152,11 @@ export declare const VerifyMissed: z.ZodObject<{
147
152
  delivery: "delivery";
148
153
  analysis: "analysis";
149
154
  }>>;
155
+ asks: z.ZodOptional<z.ZodEnum<{
156
+ business: "business";
157
+ delivery: "delivery";
158
+ design: "design";
159
+ }>>;
150
160
  sameAs: z.ZodOptional<z.ZodObject<{
151
161
  id: z.ZodString;
152
162
  verdict: z.ZodEnum<{
@@ -183,17 +193,17 @@ export declare const VerifyWrong: z.ZodObject<{
183
193
  why: z.ZodString;
184
194
  at: z.ZodString;
185
195
  }, z.core.$strict>>>;
186
- prefixes: z.ZodDefault<z.ZodArray<z.ZodObject<{
196
+ clients: z.ZodDefault<z.ZodArray<z.ZodObject<{
187
197
  paths: z.ZodArray<z.ZodString>;
188
- prefix: z.ZodString;
198
+ base: z.ZodString;
199
+ names: z.ZodDefault<z.ZodArray<z.ZodString>>;
189
200
  why: z.ZodString;
190
201
  at: z.ZodString;
191
202
  value: z.ZodString;
192
203
  }, z.core.$strict>>>;
193
- clients: z.ZodDefault<z.ZodArray<z.ZodObject<{
204
+ prefixes: z.ZodDefault<z.ZodArray<z.ZodObject<{
194
205
  paths: z.ZodArray<z.ZodString>;
195
- base: z.ZodString;
196
- names: z.ZodDefault<z.ZodArray<z.ZodString>>;
206
+ prefix: z.ZodString;
197
207
  why: z.ZodString;
198
208
  at: z.ZodString;
199
209
  value: z.ZodString;
@@ -219,6 +229,11 @@ export declare const VerifyWrong: z.ZodObject<{
219
229
  delivery: "delivery";
220
230
  analysis: "analysis";
221
231
  }>>;
232
+ asks: z.ZodOptional<z.ZodEnum<{
233
+ business: "business";
234
+ delivery: "delivery";
235
+ design: "design";
236
+ }>>;
222
237
  sameAs: z.ZodOptional<z.ZodObject<{
223
238
  id: z.ZodString;
224
239
  verdict: z.ZodEnum<{
@@ -258,17 +273,17 @@ export declare const VerifyAnswer: z.ZodObject<{
258
273
  why: z.ZodString;
259
274
  at: z.ZodString;
260
275
  }, z.core.$strict>>>;
261
- prefixes: z.ZodDefault<z.ZodArray<z.ZodObject<{
276
+ clients: z.ZodDefault<z.ZodArray<z.ZodObject<{
262
277
  paths: z.ZodArray<z.ZodString>;
263
- prefix: z.ZodString;
278
+ base: z.ZodString;
279
+ names: z.ZodDefault<z.ZodArray<z.ZodString>>;
264
280
  why: z.ZodString;
265
281
  at: z.ZodString;
266
282
  value: z.ZodString;
267
283
  }, z.core.$strict>>>;
268
- clients: z.ZodDefault<z.ZodArray<z.ZodObject<{
284
+ prefixes: z.ZodDefault<z.ZodArray<z.ZodObject<{
269
285
  paths: z.ZodArray<z.ZodString>;
270
- base: z.ZodString;
271
- names: z.ZodDefault<z.ZodArray<z.ZodString>>;
286
+ prefix: z.ZodString;
272
287
  why: z.ZodString;
273
288
  at: z.ZodString;
274
289
  value: z.ZodString;
@@ -294,6 +309,11 @@ export declare const VerifyAnswer: z.ZodObject<{
294
309
  delivery: "delivery";
295
310
  analysis: "analysis";
296
311
  }>>;
312
+ asks: z.ZodOptional<z.ZodEnum<{
313
+ business: "business";
314
+ delivery: "delivery";
315
+ design: "design";
316
+ }>>;
297
317
  sameAs: z.ZodOptional<z.ZodObject<{
298
318
  id: z.ZodString;
299
319
  verdict: z.ZodEnum<{
@@ -328,17 +348,17 @@ export declare const VerifyAnswer: z.ZodObject<{
328
348
  why: z.ZodString;
329
349
  at: z.ZodString;
330
350
  }, z.core.$strict>>>;
331
- prefixes: z.ZodDefault<z.ZodArray<z.ZodObject<{
351
+ clients: z.ZodDefault<z.ZodArray<z.ZodObject<{
332
352
  paths: z.ZodArray<z.ZodString>;
333
- prefix: z.ZodString;
353
+ base: z.ZodString;
354
+ names: z.ZodDefault<z.ZodArray<z.ZodString>>;
334
355
  why: z.ZodString;
335
356
  at: z.ZodString;
336
357
  value: z.ZodString;
337
358
  }, z.core.$strict>>>;
338
- clients: z.ZodDefault<z.ZodArray<z.ZodObject<{
359
+ prefixes: z.ZodDefault<z.ZodArray<z.ZodObject<{
339
360
  paths: z.ZodArray<z.ZodString>;
340
- base: z.ZodString;
341
- names: z.ZodDefault<z.ZodArray<z.ZodString>>;
361
+ prefix: z.ZodString;
342
362
  why: z.ZodString;
343
363
  at: z.ZodString;
344
364
  value: z.ZodString;
@@ -364,6 +384,11 @@ export declare const VerifyAnswer: z.ZodObject<{
364
384
  delivery: "delivery";
365
385
  analysis: "analysis";
366
386
  }>>;
387
+ asks: z.ZodOptional<z.ZodEnum<{
388
+ business: "business";
389
+ delivery: "delivery";
390
+ design: "design";
391
+ }>>;
367
392
  sameAs: z.ZodOptional<z.ZodObject<{
368
393
  id: z.ZodString;
369
394
  verdict: z.ZodEnum<{
@@ -405,17 +430,17 @@ export declare const ScanVerifyProposal: z.ZodObject<{
405
430
  why: z.ZodString;
406
431
  at: z.ZodString;
407
432
  }, z.core.$strict>>>;
408
- prefixes: z.ZodDefault<z.ZodArray<z.ZodObject<{
433
+ clients: z.ZodDefault<z.ZodArray<z.ZodObject<{
409
434
  paths: z.ZodArray<z.ZodString>;
410
- prefix: z.ZodString;
435
+ base: z.ZodString;
436
+ names: z.ZodDefault<z.ZodArray<z.ZodString>>;
411
437
  why: z.ZodString;
412
438
  at: z.ZodString;
413
439
  value: z.ZodString;
414
440
  }, z.core.$strict>>>;
415
- clients: z.ZodDefault<z.ZodArray<z.ZodObject<{
441
+ prefixes: z.ZodDefault<z.ZodArray<z.ZodObject<{
416
442
  paths: z.ZodArray<z.ZodString>;
417
- base: z.ZodString;
418
- names: z.ZodDefault<z.ZodArray<z.ZodString>>;
443
+ prefix: z.ZodString;
419
444
  why: z.ZodString;
420
445
  at: z.ZodString;
421
446
  value: z.ZodString;
@@ -432,17 +457,17 @@ export declare const ScanVerifyProposal: z.ZodObject<{
432
457
  why: z.ZodString;
433
458
  at: z.ZodString;
434
459
  }, z.core.$strict>>>;
435
- prefixes: z.ZodDefault<z.ZodArray<z.ZodObject<{
460
+ clients: z.ZodDefault<z.ZodArray<z.ZodObject<{
436
461
  paths: z.ZodArray<z.ZodString>;
437
- prefix: z.ZodString;
462
+ base: z.ZodString;
463
+ names: z.ZodDefault<z.ZodArray<z.ZodString>>;
438
464
  why: z.ZodString;
439
465
  at: z.ZodString;
440
466
  value: z.ZodString;
441
467
  }, z.core.$strict>>>;
442
- clients: z.ZodDefault<z.ZodArray<z.ZodObject<{
468
+ prefixes: z.ZodDefault<z.ZodArray<z.ZodObject<{
443
469
  paths: z.ZodArray<z.ZodString>;
444
- base: z.ZodString;
445
- names: z.ZodDefault<z.ZodArray<z.ZodString>>;
470
+ prefix: z.ZodString;
446
471
  why: z.ZodString;
447
472
  at: z.ZodString;
448
473
  value: z.ZodString;
@@ -468,6 +493,11 @@ export declare const ScanVerifyProposal: z.ZodObject<{
468
493
  delivery: "delivery";
469
494
  analysis: "analysis";
470
495
  }>>;
496
+ asks: z.ZodOptional<z.ZodEnum<{
497
+ business: "business";
498
+ delivery: "delivery";
499
+ design: "design";
500
+ }>>;
471
501
  sameAs: z.ZodOptional<z.ZodObject<{
472
502
  id: z.ZodString;
473
503
  verdict: z.ZodEnum<{
@@ -502,17 +532,17 @@ export declare const ScanVerifyProposal: z.ZodObject<{
502
532
  why: z.ZodString;
503
533
  at: z.ZodString;
504
534
  }, z.core.$strict>>>;
505
- prefixes: z.ZodDefault<z.ZodArray<z.ZodObject<{
535
+ clients: z.ZodDefault<z.ZodArray<z.ZodObject<{
506
536
  paths: z.ZodArray<z.ZodString>;
507
- prefix: z.ZodString;
537
+ base: z.ZodString;
538
+ names: z.ZodDefault<z.ZodArray<z.ZodString>>;
508
539
  why: z.ZodString;
509
540
  at: z.ZodString;
510
541
  value: z.ZodString;
511
542
  }, z.core.$strict>>>;
512
- clients: z.ZodDefault<z.ZodArray<z.ZodObject<{
543
+ prefixes: z.ZodDefault<z.ZodArray<z.ZodObject<{
513
544
  paths: z.ZodArray<z.ZodString>;
514
- base: z.ZodString;
515
- names: z.ZodDefault<z.ZodArray<z.ZodString>>;
545
+ prefix: z.ZodString;
516
546
  why: z.ZodString;
517
547
  at: z.ZodString;
518
548
  value: z.ZodString;
@@ -538,6 +568,11 @@ export declare const ScanVerifyProposal: z.ZodObject<{
538
568
  delivery: "delivery";
539
569
  analysis: "analysis";
540
570
  }>>;
571
+ asks: z.ZodOptional<z.ZodEnum<{
572
+ business: "business";
573
+ delivery: "delivery";
574
+ design: "design";
575
+ }>>;
541
576
  sameAs: z.ZodOptional<z.ZodObject<{
542
577
  id: z.ZodString;
543
578
  verdict: z.ZodEnum<{
@@ -0,0 +1,107 @@
1
+ import type { z } from "zod";
2
+ import { type LineChange } from "./manifest-edit.js";
3
+ /**
4
+ * ADR 0190: settings and setup are done in the app, "Edit, then Propose". Each edit writes one
5
+ * file of the org pack through its schema, keeping the file's comments, order and line endings,
6
+ * and shows the lines it changes before it writes (`preview`); Propose for review then opens the
7
+ * PR. Nothing here reaches a shared system, and no edit takes a secret: a setting whose name
8
+ * looks like one is refused by the runtime.yaml schema itself.
9
+ */
10
+ /** runtime.yaml's outside systems the app sets up, in the order the Adapters panel shows them. */
11
+ export declare const ADAPTER_KINDS: readonly ["gitHost", "workTracker", "serviceDesk", "notify", "wiki", "design"];
12
+ export type AdapterKind = (typeof ADAPTER_KINDS)[number];
13
+ /**
14
+ * The types runtime.yaml's schema takes for each, read from it so the two never drift (manual
15
+ * first: a person does the step and records the result, ADR 0032). `mock` is for tests and isn't
16
+ * offered; a file that has it shows it.
17
+ */
18
+ export declare const ADAPTER_TYPES: Record<AdapterKind, readonly string[]>;
19
+ /**
20
+ * The settings Atticus itself reads for each kind (the manual adapters and the steps that name a
21
+ * repo on the Git host), each a value or a list. A live adapter's plugin may read more: those
22
+ * are written as further settings, checked by the same schema (never a secret's value).
23
+ */
24
+ export declare const ADAPTER_FIELDS: Record<AdapterKind, readonly {
25
+ name: string;
26
+ list?: boolean;
27
+ }[]>;
28
+ export declare class SetupEditError extends Error {
29
+ readonly code: "invalid" | "not-found" | "exists";
30
+ constructor(code: "invalid" | "not-found" | "exists", message: string);
31
+ }
32
+ /** What an edit changed (or would change, with preview), file by file name. */
33
+ export interface FileEdit {
34
+ /** The file, relative to the metarepo ("/"-separated). */
35
+ path: string;
36
+ changes: LineChange[];
37
+ written: boolean;
38
+ }
39
+ /** An adapter as the app sends it: its type and settings, or null to take it out. */
40
+ export interface AdapterValue {
41
+ type: string;
42
+ settings?: Record<string, string | number | boolean | string[]>;
43
+ }
44
+ /** The flow style a file uses (`[a]` or `[ a ]`), so a write keeps it and changes only its lines. */
45
+ export declare const flowPaddingOf: (text: string) => boolean;
46
+ /**
47
+ * Set (or with null, take out) one outside system in runtime.yaml: `adapters.<kind>`, written as
48
+ * the type alone when it has no settings (`gitHost: manual`). The entry is edited in place: a
49
+ * setting sent as it is stays as it is (its comments, its style), one changed is that line, one
50
+ * left out is taken out. The whole file is checked with the Runtime schema first, so a type it
51
+ * doesn't take, or a setting named like a secret, is refused. With `baseSha256` (the file's
52
+ * sha256 as the form read it), a file changed since is refused (`exists`), never overwritten.
53
+ */
54
+ export declare function setRuntimeAdapter(root: string, kind: AdapterKind, value: AdapterValue | null, o?: {
55
+ preview?: boolean;
56
+ baseSha256?: string;
57
+ }): Promise<FileEdit>;
58
+ /**
59
+ * The schema an org-pack file is read with, by its path in the org pack; none for other files.
60
+ * Matched in any case: on a disk that doesn't tell case apart (Windows, macOS) `Runtime.yaml` is
61
+ * runtime.yaml, and is checked as it.
62
+ */
63
+ export declare function orgPackFileSchema(rel: string): z.ZodTypeAny | undefined;
64
+ /** A path in the org pack the raw editor may open: relative, inside it, a text file. */
65
+ export declare function orgPackFileRel(rel: string): string;
66
+ export declare const sha256Of: (text: string) => string;
67
+ /** An org-pack file as the raw editor shows it, with the schema it is checked with. */
68
+ export declare function readOrgPackFile(root: string, rel: string): Promise<{
69
+ path: string;
70
+ rel: string;
71
+ content: string;
72
+ sha256: string;
73
+ exists: boolean;
74
+ checked: boolean;
75
+ }>;
76
+ /** The problems Atticus would have reading this text as that org-pack file (empty when none). */
77
+ export declare function orgPackFileProblems(rel: string, content: string): string[];
78
+ /**
79
+ * The raw editor's write (the fallback for anything without a form): the file's whole text,
80
+ * checked with its schema, written onto the file as the person opened it (`baseSha256`, from
81
+ * readOrgPackFile; an edit meanwhile is refused), in the file's own line endings.
82
+ */
83
+ export declare function writeOrgPackFile(root: string, rel: string, content: string, o: {
84
+ baseSha256: string;
85
+ preview?: boolean;
86
+ }): Promise<FileEdit>;
87
+ /** An integration pattern as the app's form gives it (patterns/<code>.yaml). */
88
+ export interface PatternInput {
89
+ code: string;
90
+ name: string;
91
+ definition: string;
92
+ interaction: string;
93
+ route: string;
94
+ targetType: string;
95
+ controls?: string[];
96
+ source: string;
97
+ version?: string;
98
+ status?: string;
99
+ }
100
+ /**
101
+ * A new integration pattern from the form, as its own file `patterns/<code>.yaml` (the shape the
102
+ * starter pack's patterns have), checked with the pattern schema. A code already there is refused:
103
+ * an existing pattern is edited in the raw editor.
104
+ */
105
+ export declare function addPattern(root: string, p: PatternInput, o?: {
106
+ preview?: boolean;
107
+ }): Promise<FileEdit>;