@abseed/spectra-core 0.1.0

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.
@@ -0,0 +1,1284 @@
1
+ /**
2
+ * Runtime validation for files a human may have edited by hand. The goal is a
3
+ * readable message pointing at the offending field, never a stack trace.
4
+ */
5
+ import { z } from 'zod';
6
+ import type { Changeset, Expectation, ProjectInfo, Question, Term } from './types.js';
7
+ /** Project identity, hand-editable in `specs/project.json`. Both fields are required and non-empty. */
8
+ export declare const projectInfoSchema: z.ZodObject<{
9
+ name: z.ZodString;
10
+ domain: z.ZodString;
11
+ }, "strict", z.ZodTypeAny, {
12
+ name: string;
13
+ domain: string;
14
+ }, {
15
+ name: string;
16
+ domain: string;
17
+ }>;
18
+ export declare const attributeSchema: z.ZodObject<{
19
+ name: z.ZodString;
20
+ valueType: z.ZodEffects<z.ZodString, string, string>;
21
+ default: z.ZodOptional<z.ZodUnknown>;
22
+ optional: z.ZodOptional<z.ZodBoolean>;
23
+ }, "strict", z.ZodTypeAny, {
24
+ name: string;
25
+ valueType: string;
26
+ default?: unknown;
27
+ optional?: boolean | undefined;
28
+ }, {
29
+ name: string;
30
+ valueType: string;
31
+ default?: unknown;
32
+ optional?: boolean | undefined;
33
+ }>;
34
+ export declare const termSchema: z.ZodObject<{
35
+ name: z.ZodString;
36
+ type: z.ZodEnum<[string, ...string[]]>;
37
+ spec: z.ZodString;
38
+ parent: z.ZodDefault<z.ZodNullable<z.ZodString>>;
39
+ tags: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
40
+ attributes: z.ZodDefault<z.ZodArray<z.ZodObject<{
41
+ name: z.ZodString;
42
+ valueType: z.ZodEffects<z.ZodString, string, string>;
43
+ default: z.ZodOptional<z.ZodUnknown>;
44
+ optional: z.ZodOptional<z.ZodBoolean>;
45
+ }, "strict", z.ZodTypeAny, {
46
+ name: string;
47
+ valueType: string;
48
+ default?: unknown;
49
+ optional?: boolean | undefined;
50
+ }, {
51
+ name: string;
52
+ valueType: string;
53
+ default?: unknown;
54
+ optional?: boolean | undefined;
55
+ }>, "many">>;
56
+ }, "strict", z.ZodTypeAny, {
57
+ spec: string;
58
+ name: string;
59
+ parent: string | null;
60
+ type: string;
61
+ tags: string[];
62
+ attributes: {
63
+ name: string;
64
+ valueType: string;
65
+ default?: unknown;
66
+ optional?: boolean | undefined;
67
+ }[];
68
+ }, {
69
+ spec: string;
70
+ name: string;
71
+ type: string;
72
+ parent?: string | null | undefined;
73
+ tags?: string[] | undefined;
74
+ attributes?: {
75
+ name: string;
76
+ valueType: string;
77
+ default?: unknown;
78
+ optional?: boolean | undefined;
79
+ }[] | undefined;
80
+ }>;
81
+ export declare const changesetSchema: z.ZodObject<{
82
+ id: z.ZodString;
83
+ summary: z.ZodString;
84
+ ops: z.ZodArray<z.ZodDiscriminatedUnion<"op", [z.ZodObject<{
85
+ op: z.ZodLiteral<"add_entity">;
86
+ term: z.ZodString;
87
+ termType: z.ZodOptional<z.ZodEnum<[string, ...string[]]>>;
88
+ parent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
89
+ spec: z.ZodString;
90
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
91
+ attributes: z.ZodOptional<z.ZodArray<z.ZodObject<{
92
+ name: z.ZodString;
93
+ valueType: z.ZodEffects<z.ZodString, string, string>;
94
+ default: z.ZodOptional<z.ZodUnknown>;
95
+ optional: z.ZodOptional<z.ZodBoolean>;
96
+ }, "strict", z.ZodTypeAny, {
97
+ name: string;
98
+ valueType: string;
99
+ default?: unknown;
100
+ optional?: boolean | undefined;
101
+ }, {
102
+ name: string;
103
+ valueType: string;
104
+ default?: unknown;
105
+ optional?: boolean | undefined;
106
+ }>, "many">>;
107
+ }, "strict", z.ZodTypeAny, {
108
+ spec: string;
109
+ op: "add_entity";
110
+ term: string;
111
+ parent?: string | null | undefined;
112
+ tags?: string[] | undefined;
113
+ attributes?: {
114
+ name: string;
115
+ valueType: string;
116
+ default?: unknown;
117
+ optional?: boolean | undefined;
118
+ }[] | undefined;
119
+ termType?: string | undefined;
120
+ }, {
121
+ spec: string;
122
+ op: "add_entity";
123
+ term: string;
124
+ parent?: string | null | undefined;
125
+ tags?: string[] | undefined;
126
+ attributes?: {
127
+ name: string;
128
+ valueType: string;
129
+ default?: unknown;
130
+ optional?: boolean | undefined;
131
+ }[] | undefined;
132
+ termType?: string | undefined;
133
+ }>, z.ZodObject<{
134
+ op: z.ZodLiteral<"remove_entity">;
135
+ term: z.ZodString;
136
+ }, "strict", z.ZodTypeAny, {
137
+ op: "remove_entity";
138
+ term: string;
139
+ }, {
140
+ op: "remove_entity";
141
+ term: string;
142
+ }>, z.ZodObject<{
143
+ op: z.ZodLiteral<"add_attribute">;
144
+ term: z.ZodString;
145
+ attribute: z.ZodObject<{
146
+ name: z.ZodString;
147
+ valueType: z.ZodEffects<z.ZodString, string, string>;
148
+ default: z.ZodOptional<z.ZodUnknown>;
149
+ optional: z.ZodOptional<z.ZodBoolean>;
150
+ }, "strict", z.ZodTypeAny, {
151
+ name: string;
152
+ valueType: string;
153
+ default?: unknown;
154
+ optional?: boolean | undefined;
155
+ }, {
156
+ name: string;
157
+ valueType: string;
158
+ default?: unknown;
159
+ optional?: boolean | undefined;
160
+ }>;
161
+ }, "strict", z.ZodTypeAny, {
162
+ op: "add_attribute";
163
+ attribute: {
164
+ name: string;
165
+ valueType: string;
166
+ default?: unknown;
167
+ optional?: boolean | undefined;
168
+ };
169
+ term: string;
170
+ }, {
171
+ op: "add_attribute";
172
+ attribute: {
173
+ name: string;
174
+ valueType: string;
175
+ default?: unknown;
176
+ optional?: boolean | undefined;
177
+ };
178
+ term: string;
179
+ }>, z.ZodObject<{
180
+ op: z.ZodLiteral<"remove_attribute">;
181
+ term: z.ZodString;
182
+ attribute: z.ZodString;
183
+ }, "strict", z.ZodTypeAny, {
184
+ op: "remove_attribute";
185
+ attribute: string;
186
+ term: string;
187
+ }, {
188
+ op: "remove_attribute";
189
+ attribute: string;
190
+ term: string;
191
+ }>, z.ZodObject<{
192
+ op: z.ZodLiteral<"modify_spec">;
193
+ term: z.ZodString;
194
+ spec: z.ZodString;
195
+ }, "strict", z.ZodTypeAny, {
196
+ spec: string;
197
+ op: "modify_spec";
198
+ term: string;
199
+ }, {
200
+ spec: string;
201
+ op: "modify_spec";
202
+ term: string;
203
+ }>]>, "many">;
204
+ tests: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
205
+ fromQuestion: z.ZodOptional<z.ZodString>;
206
+ appliedAt: z.ZodOptional<z.ZodString>;
207
+ implementedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
208
+ author: z.ZodOptional<z.ZodObject<{
209
+ kind: z.ZodEnum<["human", "spec", "coder"]>;
210
+ user: z.ZodOptional<z.ZodString>;
211
+ }, "strict", z.ZodTypeAny, {
212
+ kind: "human" | "spec" | "coder";
213
+ user?: string | undefined;
214
+ }, {
215
+ kind: "human" | "spec" | "coder";
216
+ user?: string | undefined;
217
+ }>>;
218
+ }, "strict", z.ZodTypeAny, {
219
+ id: string;
220
+ summary: string;
221
+ ops: ({
222
+ spec: string;
223
+ op: "add_entity";
224
+ term: string;
225
+ parent?: string | null | undefined;
226
+ tags?: string[] | undefined;
227
+ attributes?: {
228
+ name: string;
229
+ valueType: string;
230
+ default?: unknown;
231
+ optional?: boolean | undefined;
232
+ }[] | undefined;
233
+ termType?: string | undefined;
234
+ } | {
235
+ op: "remove_entity";
236
+ term: string;
237
+ } | {
238
+ op: "add_attribute";
239
+ attribute: {
240
+ name: string;
241
+ valueType: string;
242
+ default?: unknown;
243
+ optional?: boolean | undefined;
244
+ };
245
+ term: string;
246
+ } | {
247
+ op: "remove_attribute";
248
+ attribute: string;
249
+ term: string;
250
+ } | {
251
+ spec: string;
252
+ op: "modify_spec";
253
+ term: string;
254
+ })[];
255
+ tests: string[];
256
+ fromQuestion?: string | undefined;
257
+ appliedAt?: string | undefined;
258
+ implementedAt?: string | null | undefined;
259
+ author?: {
260
+ kind: "human" | "spec" | "coder";
261
+ user?: string | undefined;
262
+ } | undefined;
263
+ }, {
264
+ id: string;
265
+ summary: string;
266
+ ops: ({
267
+ spec: string;
268
+ op: "add_entity";
269
+ term: string;
270
+ parent?: string | null | undefined;
271
+ tags?: string[] | undefined;
272
+ attributes?: {
273
+ name: string;
274
+ valueType: string;
275
+ default?: unknown;
276
+ optional?: boolean | undefined;
277
+ }[] | undefined;
278
+ termType?: string | undefined;
279
+ } | {
280
+ op: "remove_entity";
281
+ term: string;
282
+ } | {
283
+ op: "add_attribute";
284
+ attribute: {
285
+ name: string;
286
+ valueType: string;
287
+ default?: unknown;
288
+ optional?: boolean | undefined;
289
+ };
290
+ term: string;
291
+ } | {
292
+ op: "remove_attribute";
293
+ attribute: string;
294
+ term: string;
295
+ } | {
296
+ spec: string;
297
+ op: "modify_spec";
298
+ term: string;
299
+ })[];
300
+ tests?: string[] | undefined;
301
+ fromQuestion?: string | undefined;
302
+ appliedAt?: string | undefined;
303
+ implementedAt?: string | null | undefined;
304
+ author?: {
305
+ kind: "human" | "spec" | "coder";
306
+ user?: string | undefined;
307
+ } | undefined;
308
+ }>;
309
+ export declare const proposalSchema: z.ZodObject<{
310
+ summary: z.ZodString;
311
+ ops: z.ZodArray<z.ZodDiscriminatedUnion<"op", [z.ZodObject<{
312
+ op: z.ZodLiteral<"add_entity">;
313
+ term: z.ZodString;
314
+ termType: z.ZodOptional<z.ZodEnum<[string, ...string[]]>>;
315
+ parent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
316
+ spec: z.ZodString;
317
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
318
+ attributes: z.ZodOptional<z.ZodArray<z.ZodObject<{
319
+ name: z.ZodString;
320
+ valueType: z.ZodEffects<z.ZodString, string, string>;
321
+ default: z.ZodOptional<z.ZodUnknown>;
322
+ optional: z.ZodOptional<z.ZodBoolean>;
323
+ }, "strict", z.ZodTypeAny, {
324
+ name: string;
325
+ valueType: string;
326
+ default?: unknown;
327
+ optional?: boolean | undefined;
328
+ }, {
329
+ name: string;
330
+ valueType: string;
331
+ default?: unknown;
332
+ optional?: boolean | undefined;
333
+ }>, "many">>;
334
+ }, "strict", z.ZodTypeAny, {
335
+ spec: string;
336
+ op: "add_entity";
337
+ term: string;
338
+ parent?: string | null | undefined;
339
+ tags?: string[] | undefined;
340
+ attributes?: {
341
+ name: string;
342
+ valueType: string;
343
+ default?: unknown;
344
+ optional?: boolean | undefined;
345
+ }[] | undefined;
346
+ termType?: string | undefined;
347
+ }, {
348
+ spec: string;
349
+ op: "add_entity";
350
+ term: string;
351
+ parent?: string | null | undefined;
352
+ tags?: string[] | undefined;
353
+ attributes?: {
354
+ name: string;
355
+ valueType: string;
356
+ default?: unknown;
357
+ optional?: boolean | undefined;
358
+ }[] | undefined;
359
+ termType?: string | undefined;
360
+ }>, z.ZodObject<{
361
+ op: z.ZodLiteral<"remove_entity">;
362
+ term: z.ZodString;
363
+ }, "strict", z.ZodTypeAny, {
364
+ op: "remove_entity";
365
+ term: string;
366
+ }, {
367
+ op: "remove_entity";
368
+ term: string;
369
+ }>, z.ZodObject<{
370
+ op: z.ZodLiteral<"add_attribute">;
371
+ term: z.ZodString;
372
+ attribute: z.ZodObject<{
373
+ name: z.ZodString;
374
+ valueType: z.ZodEffects<z.ZodString, string, string>;
375
+ default: z.ZodOptional<z.ZodUnknown>;
376
+ optional: z.ZodOptional<z.ZodBoolean>;
377
+ }, "strict", z.ZodTypeAny, {
378
+ name: string;
379
+ valueType: string;
380
+ default?: unknown;
381
+ optional?: boolean | undefined;
382
+ }, {
383
+ name: string;
384
+ valueType: string;
385
+ default?: unknown;
386
+ optional?: boolean | undefined;
387
+ }>;
388
+ }, "strict", z.ZodTypeAny, {
389
+ op: "add_attribute";
390
+ attribute: {
391
+ name: string;
392
+ valueType: string;
393
+ default?: unknown;
394
+ optional?: boolean | undefined;
395
+ };
396
+ term: string;
397
+ }, {
398
+ op: "add_attribute";
399
+ attribute: {
400
+ name: string;
401
+ valueType: string;
402
+ default?: unknown;
403
+ optional?: boolean | undefined;
404
+ };
405
+ term: string;
406
+ }>, z.ZodObject<{
407
+ op: z.ZodLiteral<"remove_attribute">;
408
+ term: z.ZodString;
409
+ attribute: z.ZodString;
410
+ }, "strict", z.ZodTypeAny, {
411
+ op: "remove_attribute";
412
+ attribute: string;
413
+ term: string;
414
+ }, {
415
+ op: "remove_attribute";
416
+ attribute: string;
417
+ term: string;
418
+ }>, z.ZodObject<{
419
+ op: z.ZodLiteral<"modify_spec">;
420
+ term: z.ZodString;
421
+ spec: z.ZodString;
422
+ }, "strict", z.ZodTypeAny, {
423
+ spec: string;
424
+ op: "modify_spec";
425
+ term: string;
426
+ }, {
427
+ spec: string;
428
+ op: "modify_spec";
429
+ term: string;
430
+ }>]>, "many">;
431
+ tests: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
432
+ }, "strict", z.ZodTypeAny, {
433
+ summary: string;
434
+ ops: ({
435
+ spec: string;
436
+ op: "add_entity";
437
+ term: string;
438
+ parent?: string | null | undefined;
439
+ tags?: string[] | undefined;
440
+ attributes?: {
441
+ name: string;
442
+ valueType: string;
443
+ default?: unknown;
444
+ optional?: boolean | undefined;
445
+ }[] | undefined;
446
+ termType?: string | undefined;
447
+ } | {
448
+ op: "remove_entity";
449
+ term: string;
450
+ } | {
451
+ op: "add_attribute";
452
+ attribute: {
453
+ name: string;
454
+ valueType: string;
455
+ default?: unknown;
456
+ optional?: boolean | undefined;
457
+ };
458
+ term: string;
459
+ } | {
460
+ op: "remove_attribute";
461
+ attribute: string;
462
+ term: string;
463
+ } | {
464
+ spec: string;
465
+ op: "modify_spec";
466
+ term: string;
467
+ })[];
468
+ tests: string[];
469
+ }, {
470
+ summary: string;
471
+ ops: ({
472
+ spec: string;
473
+ op: "add_entity";
474
+ term: string;
475
+ parent?: string | null | undefined;
476
+ tags?: string[] | undefined;
477
+ attributes?: {
478
+ name: string;
479
+ valueType: string;
480
+ default?: unknown;
481
+ optional?: boolean | undefined;
482
+ }[] | undefined;
483
+ termType?: string | undefined;
484
+ } | {
485
+ op: "remove_entity";
486
+ term: string;
487
+ } | {
488
+ op: "add_attribute";
489
+ attribute: {
490
+ name: string;
491
+ valueType: string;
492
+ default?: unknown;
493
+ optional?: boolean | undefined;
494
+ };
495
+ term: string;
496
+ } | {
497
+ op: "remove_attribute";
498
+ attribute: string;
499
+ term: string;
500
+ } | {
501
+ spec: string;
502
+ op: "modify_spec";
503
+ term: string;
504
+ })[];
505
+ tests?: string[] | undefined;
506
+ }>;
507
+ export declare const questionSchema: z.ZodEffects<z.ZodObject<{
508
+ id: z.ZodString;
509
+ asks: z.ZodString;
510
+ because: z.ZodString;
511
+ raisedBy: z.ZodObject<{
512
+ pass: z.ZodString;
513
+ file: z.ZodOptional<z.ZodString>;
514
+ terms: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
515
+ }, "strict", z.ZodTypeAny, {
516
+ terms: string[];
517
+ pass: string;
518
+ file?: string | undefined;
519
+ }, {
520
+ pass: string;
521
+ terms?: string[] | undefined;
522
+ file?: string | undefined;
523
+ }>;
524
+ options: z.ZodDefault<z.ZodArray<z.ZodObject<{
525
+ label: z.ZodString;
526
+ detail: z.ZodOptional<z.ZodString>;
527
+ proposal: z.ZodDefault<z.ZodNullable<z.ZodObject<{
528
+ summary: z.ZodString;
529
+ ops: z.ZodArray<z.ZodDiscriminatedUnion<"op", [z.ZodObject<{
530
+ op: z.ZodLiteral<"add_entity">;
531
+ term: z.ZodString;
532
+ termType: z.ZodOptional<z.ZodEnum<[string, ...string[]]>>;
533
+ parent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
534
+ spec: z.ZodString;
535
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
536
+ attributes: z.ZodOptional<z.ZodArray<z.ZodObject<{
537
+ name: z.ZodString;
538
+ valueType: z.ZodEffects<z.ZodString, string, string>;
539
+ default: z.ZodOptional<z.ZodUnknown>;
540
+ optional: z.ZodOptional<z.ZodBoolean>;
541
+ }, "strict", z.ZodTypeAny, {
542
+ name: string;
543
+ valueType: string;
544
+ default?: unknown;
545
+ optional?: boolean | undefined;
546
+ }, {
547
+ name: string;
548
+ valueType: string;
549
+ default?: unknown;
550
+ optional?: boolean | undefined;
551
+ }>, "many">>;
552
+ }, "strict", z.ZodTypeAny, {
553
+ spec: string;
554
+ op: "add_entity";
555
+ term: string;
556
+ parent?: string | null | undefined;
557
+ tags?: string[] | undefined;
558
+ attributes?: {
559
+ name: string;
560
+ valueType: string;
561
+ default?: unknown;
562
+ optional?: boolean | undefined;
563
+ }[] | undefined;
564
+ termType?: string | undefined;
565
+ }, {
566
+ spec: string;
567
+ op: "add_entity";
568
+ term: string;
569
+ parent?: string | null | undefined;
570
+ tags?: string[] | undefined;
571
+ attributes?: {
572
+ name: string;
573
+ valueType: string;
574
+ default?: unknown;
575
+ optional?: boolean | undefined;
576
+ }[] | undefined;
577
+ termType?: string | undefined;
578
+ }>, z.ZodObject<{
579
+ op: z.ZodLiteral<"remove_entity">;
580
+ term: z.ZodString;
581
+ }, "strict", z.ZodTypeAny, {
582
+ op: "remove_entity";
583
+ term: string;
584
+ }, {
585
+ op: "remove_entity";
586
+ term: string;
587
+ }>, z.ZodObject<{
588
+ op: z.ZodLiteral<"add_attribute">;
589
+ term: z.ZodString;
590
+ attribute: z.ZodObject<{
591
+ name: z.ZodString;
592
+ valueType: z.ZodEffects<z.ZodString, string, string>;
593
+ default: z.ZodOptional<z.ZodUnknown>;
594
+ optional: z.ZodOptional<z.ZodBoolean>;
595
+ }, "strict", z.ZodTypeAny, {
596
+ name: string;
597
+ valueType: string;
598
+ default?: unknown;
599
+ optional?: boolean | undefined;
600
+ }, {
601
+ name: string;
602
+ valueType: string;
603
+ default?: unknown;
604
+ optional?: boolean | undefined;
605
+ }>;
606
+ }, "strict", z.ZodTypeAny, {
607
+ op: "add_attribute";
608
+ attribute: {
609
+ name: string;
610
+ valueType: string;
611
+ default?: unknown;
612
+ optional?: boolean | undefined;
613
+ };
614
+ term: string;
615
+ }, {
616
+ op: "add_attribute";
617
+ attribute: {
618
+ name: string;
619
+ valueType: string;
620
+ default?: unknown;
621
+ optional?: boolean | undefined;
622
+ };
623
+ term: string;
624
+ }>, z.ZodObject<{
625
+ op: z.ZodLiteral<"remove_attribute">;
626
+ term: z.ZodString;
627
+ attribute: z.ZodString;
628
+ }, "strict", z.ZodTypeAny, {
629
+ op: "remove_attribute";
630
+ attribute: string;
631
+ term: string;
632
+ }, {
633
+ op: "remove_attribute";
634
+ attribute: string;
635
+ term: string;
636
+ }>, z.ZodObject<{
637
+ op: z.ZodLiteral<"modify_spec">;
638
+ term: z.ZodString;
639
+ spec: z.ZodString;
640
+ }, "strict", z.ZodTypeAny, {
641
+ spec: string;
642
+ op: "modify_spec";
643
+ term: string;
644
+ }, {
645
+ spec: string;
646
+ op: "modify_spec";
647
+ term: string;
648
+ }>]>, "many">;
649
+ tests: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
650
+ }, "strict", z.ZodTypeAny, {
651
+ summary: string;
652
+ ops: ({
653
+ spec: string;
654
+ op: "add_entity";
655
+ term: string;
656
+ parent?: string | null | undefined;
657
+ tags?: string[] | undefined;
658
+ attributes?: {
659
+ name: string;
660
+ valueType: string;
661
+ default?: unknown;
662
+ optional?: boolean | undefined;
663
+ }[] | undefined;
664
+ termType?: string | undefined;
665
+ } | {
666
+ op: "remove_entity";
667
+ term: string;
668
+ } | {
669
+ op: "add_attribute";
670
+ attribute: {
671
+ name: string;
672
+ valueType: string;
673
+ default?: unknown;
674
+ optional?: boolean | undefined;
675
+ };
676
+ term: string;
677
+ } | {
678
+ op: "remove_attribute";
679
+ attribute: string;
680
+ term: string;
681
+ } | {
682
+ spec: string;
683
+ op: "modify_spec";
684
+ term: string;
685
+ })[];
686
+ tests: string[];
687
+ }, {
688
+ summary: string;
689
+ ops: ({
690
+ spec: string;
691
+ op: "add_entity";
692
+ term: string;
693
+ parent?: string | null | undefined;
694
+ tags?: string[] | undefined;
695
+ attributes?: {
696
+ name: string;
697
+ valueType: string;
698
+ default?: unknown;
699
+ optional?: boolean | undefined;
700
+ }[] | undefined;
701
+ termType?: string | undefined;
702
+ } | {
703
+ op: "remove_entity";
704
+ term: string;
705
+ } | {
706
+ op: "add_attribute";
707
+ attribute: {
708
+ name: string;
709
+ valueType: string;
710
+ default?: unknown;
711
+ optional?: boolean | undefined;
712
+ };
713
+ term: string;
714
+ } | {
715
+ op: "remove_attribute";
716
+ attribute: string;
717
+ term: string;
718
+ } | {
719
+ spec: string;
720
+ op: "modify_spec";
721
+ term: string;
722
+ })[];
723
+ tests?: string[] | undefined;
724
+ }>>>;
725
+ }, "strict", z.ZodTypeAny, {
726
+ proposal: {
727
+ summary: string;
728
+ ops: ({
729
+ spec: string;
730
+ op: "add_entity";
731
+ term: string;
732
+ parent?: string | null | undefined;
733
+ tags?: string[] | undefined;
734
+ attributes?: {
735
+ name: string;
736
+ valueType: string;
737
+ default?: unknown;
738
+ optional?: boolean | undefined;
739
+ }[] | undefined;
740
+ termType?: string | undefined;
741
+ } | {
742
+ op: "remove_entity";
743
+ term: string;
744
+ } | {
745
+ op: "add_attribute";
746
+ attribute: {
747
+ name: string;
748
+ valueType: string;
749
+ default?: unknown;
750
+ optional?: boolean | undefined;
751
+ };
752
+ term: string;
753
+ } | {
754
+ op: "remove_attribute";
755
+ attribute: string;
756
+ term: string;
757
+ } | {
758
+ spec: string;
759
+ op: "modify_spec";
760
+ term: string;
761
+ })[];
762
+ tests: string[];
763
+ } | null;
764
+ label: string;
765
+ detail?: string | undefined;
766
+ }, {
767
+ label: string;
768
+ proposal?: {
769
+ summary: string;
770
+ ops: ({
771
+ spec: string;
772
+ op: "add_entity";
773
+ term: string;
774
+ parent?: string | null | undefined;
775
+ tags?: string[] | undefined;
776
+ attributes?: {
777
+ name: string;
778
+ valueType: string;
779
+ default?: unknown;
780
+ optional?: boolean | undefined;
781
+ }[] | undefined;
782
+ termType?: string | undefined;
783
+ } | {
784
+ op: "remove_entity";
785
+ term: string;
786
+ } | {
787
+ op: "add_attribute";
788
+ attribute: {
789
+ name: string;
790
+ valueType: string;
791
+ default?: unknown;
792
+ optional?: boolean | undefined;
793
+ };
794
+ term: string;
795
+ } | {
796
+ op: "remove_attribute";
797
+ attribute: string;
798
+ term: string;
799
+ } | {
800
+ spec: string;
801
+ op: "modify_spec";
802
+ term: string;
803
+ })[];
804
+ tests?: string[] | undefined;
805
+ } | null | undefined;
806
+ detail?: string | undefined;
807
+ }>, "many">>;
808
+ author: z.ZodOptional<z.ZodObject<{
809
+ kind: z.ZodEnum<["human", "spec", "coder"]>;
810
+ user: z.ZodOptional<z.ZodString>;
811
+ }, "strict", z.ZodTypeAny, {
812
+ kind: "human" | "spec" | "coder";
813
+ user?: string | undefined;
814
+ }, {
815
+ kind: "human" | "spec" | "coder";
816
+ user?: string | undefined;
817
+ }>>;
818
+ status: z.ZodDefault<z.ZodEnum<["draft", "ready"]>>;
819
+ rev: z.ZodDefault<z.ZodNumber>;
820
+ answer: z.ZodDefault<z.ZodNullable<z.ZodObject<{
821
+ chose: z.ZodNullable<z.ZodString>;
822
+ note: z.ZodString;
823
+ answeredAt: z.ZodString;
824
+ changesetId: z.ZodOptional<z.ZodString>;
825
+ author: z.ZodOptional<z.ZodObject<{
826
+ kind: z.ZodEnum<["human", "spec", "coder"]>;
827
+ user: z.ZodOptional<z.ZodString>;
828
+ }, "strict", z.ZodTypeAny, {
829
+ kind: "human" | "spec" | "coder";
830
+ user?: string | undefined;
831
+ }, {
832
+ kind: "human" | "spec" | "coder";
833
+ user?: string | undefined;
834
+ }>>;
835
+ }, "strict", z.ZodTypeAny, {
836
+ chose: string | null;
837
+ note: string;
838
+ answeredAt: string;
839
+ changesetId?: string | undefined;
840
+ author?: {
841
+ kind: "human" | "spec" | "coder";
842
+ user?: string | undefined;
843
+ } | undefined;
844
+ }, {
845
+ chose: string | null;
846
+ note: string;
847
+ answeredAt: string;
848
+ changesetId?: string | undefined;
849
+ author?: {
850
+ kind: "human" | "spec" | "coder";
851
+ user?: string | undefined;
852
+ } | undefined;
853
+ }>>>;
854
+ }, "strict", z.ZodTypeAny, {
855
+ status: "draft" | "ready";
856
+ answer: {
857
+ chose: string | null;
858
+ note: string;
859
+ answeredAt: string;
860
+ changesetId?: string | undefined;
861
+ author?: {
862
+ kind: "human" | "spec" | "coder";
863
+ user?: string | undefined;
864
+ } | undefined;
865
+ } | null;
866
+ options: {
867
+ proposal: {
868
+ summary: string;
869
+ ops: ({
870
+ spec: string;
871
+ op: "add_entity";
872
+ term: string;
873
+ parent?: string | null | undefined;
874
+ tags?: string[] | undefined;
875
+ attributes?: {
876
+ name: string;
877
+ valueType: string;
878
+ default?: unknown;
879
+ optional?: boolean | undefined;
880
+ }[] | undefined;
881
+ termType?: string | undefined;
882
+ } | {
883
+ op: "remove_entity";
884
+ term: string;
885
+ } | {
886
+ op: "add_attribute";
887
+ attribute: {
888
+ name: string;
889
+ valueType: string;
890
+ default?: unknown;
891
+ optional?: boolean | undefined;
892
+ };
893
+ term: string;
894
+ } | {
895
+ op: "remove_attribute";
896
+ attribute: string;
897
+ term: string;
898
+ } | {
899
+ spec: string;
900
+ op: "modify_spec";
901
+ term: string;
902
+ })[];
903
+ tests: string[];
904
+ } | null;
905
+ label: string;
906
+ detail?: string | undefined;
907
+ }[];
908
+ id: string;
909
+ asks: string;
910
+ because: string;
911
+ raisedBy: {
912
+ terms: string[];
913
+ pass: string;
914
+ file?: string | undefined;
915
+ };
916
+ rev: number;
917
+ author?: {
918
+ kind: "human" | "spec" | "coder";
919
+ user?: string | undefined;
920
+ } | undefined;
921
+ }, {
922
+ id: string;
923
+ asks: string;
924
+ because: string;
925
+ raisedBy: {
926
+ pass: string;
927
+ terms?: string[] | undefined;
928
+ file?: string | undefined;
929
+ };
930
+ status?: "draft" | "ready" | undefined;
931
+ answer?: {
932
+ chose: string | null;
933
+ note: string;
934
+ answeredAt: string;
935
+ changesetId?: string | undefined;
936
+ author?: {
937
+ kind: "human" | "spec" | "coder";
938
+ user?: string | undefined;
939
+ } | undefined;
940
+ } | null | undefined;
941
+ options?: {
942
+ label: string;
943
+ proposal?: {
944
+ summary: string;
945
+ ops: ({
946
+ spec: string;
947
+ op: "add_entity";
948
+ term: string;
949
+ parent?: string | null | undefined;
950
+ tags?: string[] | undefined;
951
+ attributes?: {
952
+ name: string;
953
+ valueType: string;
954
+ default?: unknown;
955
+ optional?: boolean | undefined;
956
+ }[] | undefined;
957
+ termType?: string | undefined;
958
+ } | {
959
+ op: "remove_entity";
960
+ term: string;
961
+ } | {
962
+ op: "add_attribute";
963
+ attribute: {
964
+ name: string;
965
+ valueType: string;
966
+ default?: unknown;
967
+ optional?: boolean | undefined;
968
+ };
969
+ term: string;
970
+ } | {
971
+ op: "remove_attribute";
972
+ attribute: string;
973
+ term: string;
974
+ } | {
975
+ spec: string;
976
+ op: "modify_spec";
977
+ term: string;
978
+ })[];
979
+ tests?: string[] | undefined;
980
+ } | null | undefined;
981
+ detail?: string | undefined;
982
+ }[] | undefined;
983
+ author?: {
984
+ kind: "human" | "spec" | "coder";
985
+ user?: string | undefined;
986
+ } | undefined;
987
+ rev?: number | undefined;
988
+ }>, {
989
+ status: "draft" | "ready";
990
+ answer: {
991
+ chose: string | null;
992
+ note: string;
993
+ answeredAt: string;
994
+ changesetId?: string | undefined;
995
+ author?: {
996
+ kind: "human" | "spec" | "coder";
997
+ user?: string | undefined;
998
+ } | undefined;
999
+ } | null;
1000
+ options: {
1001
+ proposal: {
1002
+ summary: string;
1003
+ ops: ({
1004
+ spec: string;
1005
+ op: "add_entity";
1006
+ term: string;
1007
+ parent?: string | null | undefined;
1008
+ tags?: string[] | undefined;
1009
+ attributes?: {
1010
+ name: string;
1011
+ valueType: string;
1012
+ default?: unknown;
1013
+ optional?: boolean | undefined;
1014
+ }[] | undefined;
1015
+ termType?: string | undefined;
1016
+ } | {
1017
+ op: "remove_entity";
1018
+ term: string;
1019
+ } | {
1020
+ op: "add_attribute";
1021
+ attribute: {
1022
+ name: string;
1023
+ valueType: string;
1024
+ default?: unknown;
1025
+ optional?: boolean | undefined;
1026
+ };
1027
+ term: string;
1028
+ } | {
1029
+ op: "remove_attribute";
1030
+ attribute: string;
1031
+ term: string;
1032
+ } | {
1033
+ spec: string;
1034
+ op: "modify_spec";
1035
+ term: string;
1036
+ })[];
1037
+ tests: string[];
1038
+ } | null;
1039
+ label: string;
1040
+ detail?: string | undefined;
1041
+ }[];
1042
+ id: string;
1043
+ asks: string;
1044
+ because: string;
1045
+ raisedBy: {
1046
+ terms: string[];
1047
+ pass: string;
1048
+ file?: string | undefined;
1049
+ };
1050
+ rev: number;
1051
+ author?: {
1052
+ kind: "human" | "spec" | "coder";
1053
+ user?: string | undefined;
1054
+ } | undefined;
1055
+ }, {
1056
+ id: string;
1057
+ asks: string;
1058
+ because: string;
1059
+ raisedBy: {
1060
+ pass: string;
1061
+ terms?: string[] | undefined;
1062
+ file?: string | undefined;
1063
+ };
1064
+ status?: "draft" | "ready" | undefined;
1065
+ answer?: {
1066
+ chose: string | null;
1067
+ note: string;
1068
+ answeredAt: string;
1069
+ changesetId?: string | undefined;
1070
+ author?: {
1071
+ kind: "human" | "spec" | "coder";
1072
+ user?: string | undefined;
1073
+ } | undefined;
1074
+ } | null | undefined;
1075
+ options?: {
1076
+ label: string;
1077
+ proposal?: {
1078
+ summary: string;
1079
+ ops: ({
1080
+ spec: string;
1081
+ op: "add_entity";
1082
+ term: string;
1083
+ parent?: string | null | undefined;
1084
+ tags?: string[] | undefined;
1085
+ attributes?: {
1086
+ name: string;
1087
+ valueType: string;
1088
+ default?: unknown;
1089
+ optional?: boolean | undefined;
1090
+ }[] | undefined;
1091
+ termType?: string | undefined;
1092
+ } | {
1093
+ op: "remove_entity";
1094
+ term: string;
1095
+ } | {
1096
+ op: "add_attribute";
1097
+ attribute: {
1098
+ name: string;
1099
+ valueType: string;
1100
+ default?: unknown;
1101
+ optional?: boolean | undefined;
1102
+ };
1103
+ term: string;
1104
+ } | {
1105
+ op: "remove_attribute";
1106
+ attribute: string;
1107
+ term: string;
1108
+ } | {
1109
+ spec: string;
1110
+ op: "modify_spec";
1111
+ term: string;
1112
+ })[];
1113
+ tests?: string[] | undefined;
1114
+ } | null | undefined;
1115
+ detail?: string | undefined;
1116
+ }[] | undefined;
1117
+ author?: {
1118
+ kind: "human" | "spec" | "coder";
1119
+ user?: string | undefined;
1120
+ } | undefined;
1121
+ rev?: number | undefined;
1122
+ }>;
1123
+ export declare const expectationSchema: z.ZodEffects<z.ZodObject<{
1124
+ id: z.ZodString;
1125
+ kind: z.ZodEnum<["functional", "non-functional"]>;
1126
+ author: z.ZodOptional<z.ZodObject<{
1127
+ kind: z.ZodEnum<["human", "spec", "coder"]>;
1128
+ user: z.ZodOptional<z.ZodString>;
1129
+ }, "strict", z.ZodTypeAny, {
1130
+ kind: "human" | "spec" | "coder";
1131
+ user?: string | undefined;
1132
+ }, {
1133
+ kind: "human" | "spec" | "coder";
1134
+ user?: string | undefined;
1135
+ }>>;
1136
+ status: z.ZodDefault<z.ZodEnum<["draft", "ready"]>>;
1137
+ rev: z.ZodDefault<z.ZodNumber>;
1138
+ terms: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1139
+ given: z.ZodDefault<z.ZodString>;
1140
+ expect: z.ZodString;
1141
+ raisedBy: z.ZodObject<{
1142
+ pass: z.ZodString;
1143
+ from: z.ZodOptional<z.ZodString>;
1144
+ file: z.ZodOptional<z.ZodString>;
1145
+ }, "strict", z.ZodTypeAny, {
1146
+ pass: string;
1147
+ file?: string | undefined;
1148
+ from?: string | undefined;
1149
+ }, {
1150
+ pass: string;
1151
+ file?: string | undefined;
1152
+ from?: string | undefined;
1153
+ }>;
1154
+ supersededBy: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1155
+ retiredBecause: z.ZodOptional<z.ZodString>;
1156
+ contested: z.ZodDefault<z.ZodArray<z.ZodObject<{
1157
+ kind: z.ZodEnum<["unknown-term", "duplicate", "overlaps", "contradicts", "restates"]>;
1158
+ subject: z.ZodString;
1159
+ detail: z.ZodString;
1160
+ quote: z.ZodOptional<z.ZodString>;
1161
+ }, "strict", z.ZodTypeAny, {
1162
+ kind: "unknown-term" | "duplicate" | "overlaps" | "contradicts" | "restates";
1163
+ detail: string;
1164
+ subject: string;
1165
+ quote?: string | undefined;
1166
+ }, {
1167
+ kind: "unknown-term" | "duplicate" | "overlaps" | "contradicts" | "restates";
1168
+ detail: string;
1169
+ subject: string;
1170
+ quote?: string | undefined;
1171
+ }>, "many">>;
1172
+ }, "strict", z.ZodTypeAny, {
1173
+ status: "draft" | "ready";
1174
+ kind: "functional" | "non-functional";
1175
+ terms: string[];
1176
+ id: string;
1177
+ raisedBy: {
1178
+ pass: string;
1179
+ file?: string | undefined;
1180
+ from?: string | undefined;
1181
+ };
1182
+ rev: number;
1183
+ given: string;
1184
+ expect: string;
1185
+ supersededBy: string | null;
1186
+ contested: {
1187
+ kind: "unknown-term" | "duplicate" | "overlaps" | "contradicts" | "restates";
1188
+ detail: string;
1189
+ subject: string;
1190
+ quote?: string | undefined;
1191
+ }[];
1192
+ author?: {
1193
+ kind: "human" | "spec" | "coder";
1194
+ user?: string | undefined;
1195
+ } | undefined;
1196
+ retiredBecause?: string | undefined;
1197
+ }, {
1198
+ kind: "functional" | "non-functional";
1199
+ id: string;
1200
+ raisedBy: {
1201
+ pass: string;
1202
+ file?: string | undefined;
1203
+ from?: string | undefined;
1204
+ };
1205
+ expect: string;
1206
+ status?: "draft" | "ready" | undefined;
1207
+ terms?: string[] | undefined;
1208
+ author?: {
1209
+ kind: "human" | "spec" | "coder";
1210
+ user?: string | undefined;
1211
+ } | undefined;
1212
+ rev?: number | undefined;
1213
+ given?: string | undefined;
1214
+ supersededBy?: string | null | undefined;
1215
+ retiredBecause?: string | undefined;
1216
+ contested?: {
1217
+ kind: "unknown-term" | "duplicate" | "overlaps" | "contradicts" | "restates";
1218
+ detail: string;
1219
+ subject: string;
1220
+ quote?: string | undefined;
1221
+ }[] | undefined;
1222
+ }>, {
1223
+ status: "draft" | "ready";
1224
+ kind: "functional" | "non-functional";
1225
+ terms: string[];
1226
+ id: string;
1227
+ raisedBy: {
1228
+ pass: string;
1229
+ file?: string | undefined;
1230
+ from?: string | undefined;
1231
+ };
1232
+ rev: number;
1233
+ given: string;
1234
+ expect: string;
1235
+ supersededBy: string | null;
1236
+ contested: {
1237
+ kind: "unknown-term" | "duplicate" | "overlaps" | "contradicts" | "restates";
1238
+ detail: string;
1239
+ subject: string;
1240
+ quote?: string | undefined;
1241
+ }[];
1242
+ author?: {
1243
+ kind: "human" | "spec" | "coder";
1244
+ user?: string | undefined;
1245
+ } | undefined;
1246
+ retiredBecause?: string | undefined;
1247
+ }, {
1248
+ kind: "functional" | "non-functional";
1249
+ id: string;
1250
+ raisedBy: {
1251
+ pass: string;
1252
+ file?: string | undefined;
1253
+ from?: string | undefined;
1254
+ };
1255
+ expect: string;
1256
+ status?: "draft" | "ready" | undefined;
1257
+ terms?: string[] | undefined;
1258
+ author?: {
1259
+ kind: "human" | "spec" | "coder";
1260
+ user?: string | undefined;
1261
+ } | undefined;
1262
+ rev?: number | undefined;
1263
+ given?: string | undefined;
1264
+ supersededBy?: string | null | undefined;
1265
+ retiredBecause?: string | undefined;
1266
+ contested?: {
1267
+ kind: "unknown-term" | "duplicate" | "overlaps" | "contradicts" | "restates";
1268
+ detail: string;
1269
+ subject: string;
1270
+ quote?: string | undefined;
1271
+ }[] | undefined;
1272
+ }>;
1273
+ export type ParseResult<T> = {
1274
+ ok: true;
1275
+ value: T;
1276
+ } | {
1277
+ ok: false;
1278
+ errors: string[];
1279
+ };
1280
+ export declare function parseTerm(data: unknown): ParseResult<Term>;
1281
+ export declare function parseChangeset(data: unknown): ParseResult<Changeset>;
1282
+ export declare function parseQuestion(data: unknown): ParseResult<Question>;
1283
+ export declare function parseExpectation(data: unknown): ParseResult<Expectation>;
1284
+ export declare function parseProjectInfo(data: unknown): ParseResult<ProjectInfo>;