@cat-factory/contracts 0.279.0 → 0.280.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.
package/dist/index.d.ts CHANGED
@@ -113,6 +113,7 @@ export * from './public-api-keys.js';
113
113
  export * from './public-api.js';
114
114
  export * from './public-board.js';
115
115
  export * from './public-evidence.js';
116
+ export * from './public-spec.js';
116
117
  export * from './public-merge-evidence.js';
117
118
  export * from './public-spend.js';
118
119
  export * from './debug-api.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA;AAC7B,cAAc,0BAA0B,CAAA;AACxC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,qBAAqB,CAAA;AACnC,cAAc,kBAAkB,CAAA;AAChC,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,0BAA0B,CAAA;AACxC,cAAc,eAAe,CAAA;AAC7B,cAAc,0BAA0B,CAAA;AACxC,cAAc,cAAc,CAAA;AAC5B,cAAc,sBAAsB,CAAA;AACpC,cAAc,uBAAuB,CAAA;AACrC,cAAc,oBAAoB,CAAA;AAClC,cAAc,eAAe,CAAA;AAC7B,cAAc,uBAAuB,CAAA;AACrC,cAAc,yBAAyB,CAAA;AACvC,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA;AACjC,cAAc,oBAAoB,CAAA;AAClC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,wBAAwB,CAAA;AACtC,cAAc,wBAAwB,CAAA;AACtC,cAAc,wBAAwB,CAAA;AACtC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,qBAAqB,CAAA;AACnC,cAAc,eAAe,CAAA;AAC7B,cAAc,wBAAwB,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AClC,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,wBAAwB,CAAA;AACtC,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA"}
package/dist/index.js CHANGED
@@ -113,6 +113,7 @@ export * from './public-api-keys.js';
113
113
  export * from './public-api.js';
114
114
  export * from './public-board.js';
115
115
  export * from './public-evidence.js';
116
+ export * from './public-spec.js';
116
117
  export * from './public-merge-evidence.js';
117
118
  export * from './public-spend.js';
118
119
  export * from './debug-api.js';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA;AAC7B,cAAc,0BAA0B,CAAA;AACxC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,qBAAqB,CAAA;AACnC,cAAc,kBAAkB,CAAA;AAChC,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,0BAA0B,CAAA;AACxC,cAAc,eAAe,CAAA;AAC7B,cAAc,0BAA0B,CAAA;AACxC,cAAc,cAAc,CAAA;AAC5B,cAAc,sBAAsB,CAAA;AACpC,cAAc,uBAAuB,CAAA;AACrC,cAAc,oBAAoB,CAAA;AAClC,cAAc,eAAe,CAAA;AAC7B,cAAc,uBAAuB,CAAA;AACrC,cAAc,yBAAyB,CAAA;AACvC,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA;AACjC,cAAc,oBAAoB,CAAA;AAClC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,wBAAwB,CAAA;AACtC,cAAc,wBAAwB,CAAA;AACtC,cAAc,wBAAwB,CAAA;AACtC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,q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A;AACnC,cAAc,eAAe,CAAA;AAC7B,cAAc,oBAAoB,CAAA;AAClC,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,wBAAwB,CAAA;AACtC,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA"}
@@ -0,0 +1,232 @@
1
+ import * as v from 'valibot';
2
+ /** Ceiling on requirement rows one response may carry, across the whole tree. */
3
+ export declare const PUBLIC_SPEC_MAX_REQUIREMENTS = 2000;
4
+ /** Ceiling on domain-rule rows one response may carry, across the whole tree. */
5
+ export declare const PUBLIC_SPEC_MAX_RULES = 2000;
6
+ /**
7
+ * Ceiling on acceptance criteria one response may carry, across the whole tree.
8
+ *
9
+ * Across the tree rather than per requirement, because a per-item cap does not bound anything: a
10
+ * criterion carries three 2,000-character clauses, so twenty of them on each of 2,000 requirements
11
+ * is a response two orders of magnitude past every other cap here. The row caps bound the tree's
12
+ * SHAPE; this bounds the part of its WEIGHT they do not.
13
+ */
14
+ export declare const PUBLIC_SPEC_MAX_ACCEPTANCE = 5000;
15
+ /** Ceiling on how many rendered `.feature` files one response may carry. */
16
+ export declare const PUBLIC_SPEC_MAX_FEATURE_FILES = 500;
17
+ /** Ceiling on the characters of Gherkin ONE feature file may carry. */
18
+ export declare const PUBLIC_SPEC_MAX_FEATURE_CHARS = 20000;
19
+ /**
20
+ * Ceiling on the characters of Gherkin ALL feature files may carry, together.
21
+ *
22
+ * The per-file cap alone bounds nothing that matters: 500 files each clamped to 20,000 characters
23
+ * is a ten-megabyte body served to a `read`-scope key. Spent in the same traversal order as every
24
+ * other budget, so a file is whole, clamped, or absent, and never a sample.
25
+ */
26
+ export declare const PUBLIC_SPEC_MAX_FEATURE_TOTAL_CHARS = 1000000;
27
+ /**
28
+ * Ceiling on read-issue rows one response may carry.
29
+ *
30
+ * The issue list is produced by the read rather than by the spec, so it is the one axis that grows
31
+ * with FAILURE: a rate-limit window part-way through a few-thousand-shard walk logs a row per
32
+ * shard, and an uncapped list makes the report of a degraded read larger than a healthy response.
33
+ * Capping it without saying so would be the same fold every cap here exists to prevent, so it gets
34
+ * a `truncations` row like the rest.
35
+ */
36
+ export declare const PUBLIC_SPEC_MAX_ISSUES = 200;
37
+ /**
38
+ * Where the served tree was read from, and WHEN.
39
+ *
40
+ * `commit` is the head of `ref` resolved immediately before the walk, and it is nullable for one
41
+ * honest reason: the tree is read BY BRANCH NAME (that is what makes the reads cacheable and
42
+ * cheap), so a push landing mid-walk can leave the response describing a slightly later commit
43
+ * than the one named. A null means the head could not be resolved at all: the tree below is still
44
+ * what the branch held, we simply cannot name the commit.
45
+ *
46
+ * There is no `directory` here, and its absence is the fact: the `spec/` tree is anchored at the
47
+ * REPOSITORY ROOT, so two services carved out of one monorepo share one spec. Naming a
48
+ * subdirectory would imply a scoping the reader does not apply.
49
+ */
50
+ export declare const publicSpecProvenanceSchema: v.ObjectSchema<{
51
+ readonly provider: v.PicklistSchema<["github", "gitlab"], undefined>;
52
+ /** The repository's owner (org or user). */
53
+ readonly owner: v.StringSchema<undefined>;
54
+ /** The repository's name. */
55
+ readonly repo: v.StringSchema<undefined>;
56
+ /** The branch the spec was read from: the repository's default branch. */
57
+ readonly ref: v.StringSchema<undefined>;
58
+ /** The head commit of `ref` at read time, or null when it could not be resolved. */
59
+ readonly commit: v.NullableSchema<v.StringSchema<undefined>, undefined>;
60
+ }, undefined>;
61
+ export type PublicSpecProvenance = v.InferOutput<typeof publicSpecProvenanceSchema>;
62
+ /**
63
+ * One rendered Gherkin feature file, bounded.
64
+ *
65
+ * `chars`/`totalChars`/`truncated` are the debug surface's own shape, for its own reason: a bare
66
+ * truncated string is indistinguishable from a short one, so a reader would confidently conclude
67
+ * a feature declares two scenarios from a payload that merely hit its budget.
68
+ */
69
+ export declare const publicSpecFeatureFileSchema: v.ObjectSchema<{
70
+ /** The owning module's display name. */
71
+ readonly module: v.StringSchema<undefined>;
72
+ /** The feature/group display name. */
73
+ readonly group: v.StringSchema<undefined>;
74
+ /** Repo-relative path of the `.feature` file. */
75
+ readonly path: v.StringSchema<undefined>;
76
+ /** The Gherkin, clamped to {@link PUBLIC_SPEC_MAX_FEATURE_CHARS}. */
77
+ readonly content: v.StringSchema<undefined>;
78
+ /** Characters actually returned in `content`. */
79
+ readonly chars: v.NumberSchema<undefined>;
80
+ /** Characters the file holds in the repository, whatever was returned. */
81
+ readonly totalChars: v.NumberSchema<undefined>;
82
+ /** True when `chars < totalChars`. */
83
+ readonly truncated: v.BooleanSchema<undefined>;
84
+ }, undefined>;
85
+ export type PublicSpecFeatureFile = v.InferOutput<typeof publicSpecFeatureFileSchema>;
86
+ /** Which axis a cap bit on. Every member counts ITEMS, so `shown`/`total` share one unit. */
87
+ export declare const publicSpecTruncationSectionSchema: v.PicklistSchema<["requirements", "rules", "acceptance", "features", "issues"], undefined>;
88
+ export type PublicSpecTruncationSection = v.InferOutput<typeof publicSpecTruncationSectionSchema>;
89
+ /**
90
+ * One cap that bit, and by how much. Present only for an axis that was actually shortened, so an
91
+ * empty `truncations` means the tree below is complete.
92
+ *
93
+ * The cap is applied in the tree's own traversal order (module, then group, then declaration
94
+ * order), which is stated so a reader does not have to guess: the rows that were dropped are the
95
+ * ones latest in that order, not the least important ones. Nothing here RANKS requirements.
96
+ */
97
+ export declare const publicSpecTruncationSchema: v.ObjectSchema<{
98
+ readonly section: v.PicklistSchema<["requirements", "rules", "acceptance", "features", "issues"], undefined>;
99
+ /** How many rows the response carries. */
100
+ readonly shown: v.NumberSchema<undefined>;
101
+ /** How many rows the spec holds. */
102
+ readonly total: v.NumberSchema<undefined>;
103
+ }, undefined>;
104
+ export type PublicSpecTruncation = v.InferOutput<typeof publicSpecTruncationSchema>;
105
+ /**
106
+ * How the presence anchor (`spec/service.json`) resolved, for a caller that got a `200`.
107
+ *
108
+ * {@link specAnchorStateSchema} minus `read_failed`, which never reaches a body here: an unread
109
+ * repository is a `503` carrying `reason: "spec_read_failed"`. What remains are the three states
110
+ * that are FACTS ABOUT THE REPOSITORY, and they are served as three values rather than folded into
111
+ * one boolean because they need different reactions:
112
+ *
113
+ * - `present` — a spec was read. `spec` is the tree.
114
+ * - `absent` — the default branch holds no `spec/service.json`. The common, final answer, and
115
+ * the only one that means "this service declares nothing".
116
+ * - `unparsed` — the anchor is THERE and unusable (truncated JSON, a half-written commit). The
117
+ * tree is unavailable for a reason somebody has to fix in the repository, and an integrator
118
+ * treating it as "no requirements" would be reporting a broken file as an empty service.
119
+ *
120
+ * A boolean carried the first two and quietly folded the third onto `absent`, discoverable only by
121
+ * noticing an `issues` row. This surface does not fold outcomes; the whole endpoint exists because
122
+ * the internal view does.
123
+ */
124
+ export declare const publicSpecAnchorSchema: v.PicklistSchema<["present", "absent", "unparsed"], undefined>;
125
+ export type PublicSpecAnchor = v.InferOutput<typeof publicSpecAnchorSchema>;
126
+ /**
127
+ * The service's specification as `/api/v1` serves it.
128
+ *
129
+ * A `200` here never means the repository could not be read (a `503` with
130
+ * `reason: "spec_read_failed"`), that no repository is linked (a `422`), or that this deployment
131
+ * wired no VCS integration (a `503` with `reason: "vcs_not_configured"`). What it does mean is
132
+ * {@link PublicServiceSpec.anchor}.
133
+ */
134
+ export declare const publicServiceSpecSchema: v.ObjectSchema<{
135
+ /** The board service frame this spec belongs to, echoed so a response stands alone. */
136
+ readonly serviceId: v.StringSchema<undefined>;
137
+ /**
138
+ * What the default branch holds where the spec should be. `spec` is non-null exactly when this
139
+ * is `present`; the other two are the two ways it can be null.
140
+ */
141
+ readonly anchor: v.PicklistSchema<["present", "absent", "unparsed"], undefined>;
142
+ /**
143
+ * The structured tree (modules → groups → requirements + rules), or null when `anchor` is not
144
+ * `present`. {@link readSpecDocSchema} rather than the strict authoring schema: a spec whose
145
+ * anchor names no service is a state a repository can genuinely be in, and this surface has to
146
+ * describe repositories as they are.
147
+ */
148
+ readonly spec: v.NullableSchema<v.ObjectSchema<{
149
+ readonly summary: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>, "">;
150
+ readonly modules: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
151
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
152
+ readonly summary: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>, "">;
153
+ readonly groups: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
154
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
155
+ readonly summary: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>, "">;
156
+ readonly requirements: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
157
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>;
158
+ readonly title: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
159
+ readonly statement: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 4000, undefined>]>;
160
+ readonly kind: v.PicklistSchema<["functional", "nonfunctional", "constraint"], undefined>;
161
+ readonly priority: v.PicklistSchema<["must", "should", "could"], undefined>;
162
+ readonly state: v.OptionalSchema<v.PicklistSchema<["aspirational", "established"], undefined>, "aspirational">;
163
+ readonly sourceBlockIds: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>, readonly []>;
164
+ readonly acceptance: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
165
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>;
166
+ readonly given: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
167
+ readonly when: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
168
+ readonly outcome: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
169
+ }, undefined>, undefined>, readonly []>;
170
+ }, undefined>, undefined>, readonly []>;
171
+ readonly rules: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
172
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>;
173
+ readonly rule: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 4000, undefined>]>;
174
+ readonly rationale: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>, "">;
175
+ readonly sourceBlockIds: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>, readonly []>;
176
+ }, undefined>, undefined>, readonly []>;
177
+ }, undefined>, undefined>, readonly []>;
178
+ }, undefined>, undefined>, readonly []>;
179
+ readonly service: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 120, undefined>]>, "">;
180
+ }, undefined>, undefined>;
181
+ /** The rendered Gherkin, one entry per `.feature` file. Empty when the repo renders none. */
182
+ readonly features: v.ArraySchema<v.ObjectSchema<{
183
+ /** The owning module's display name. */
184
+ readonly module: v.StringSchema<undefined>;
185
+ /** The feature/group display name. */
186
+ readonly group: v.StringSchema<undefined>;
187
+ /** Repo-relative path of the `.feature` file. */
188
+ readonly path: v.StringSchema<undefined>;
189
+ /** The Gherkin, clamped to {@link PUBLIC_SPEC_MAX_FEATURE_CHARS}. */
190
+ readonly content: v.StringSchema<undefined>;
191
+ /** Characters actually returned in `content`. */
192
+ readonly chars: v.NumberSchema<undefined>;
193
+ /** Characters the file holds in the repository, whatever was returned. */
194
+ readonly totalChars: v.NumberSchema<undefined>;
195
+ /** True when `chars < totalChars`. */
196
+ readonly truncated: v.BooleanSchema<undefined>;
197
+ }, undefined>, undefined>;
198
+ readonly provenance: v.ObjectSchema<{
199
+ readonly provider: v.PicklistSchema<["github", "gitlab"], undefined>;
200
+ /** The repository's owner (org or user). */
201
+ readonly owner: v.StringSchema<undefined>;
202
+ /** The repository's name. */
203
+ readonly repo: v.StringSchema<undefined>;
204
+ /** The branch the spec was read from: the repository's default branch. */
205
+ readonly ref: v.StringSchema<undefined>;
206
+ /** The head commit of `ref` at read time, or null when it could not be resolved. */
207
+ readonly commit: v.NullableSchema<v.StringSchema<undefined>, undefined>;
208
+ }, undefined>;
209
+ /**
210
+ * Files the read could not fully account for: a provider error on one shard, a shard whose JSON
211
+ * is unusable, a group salvaged with some requirements dropped, the tail a spent read budget
212
+ * never reached. A present-but-partial spec is served rather than refused, and this is what
213
+ * stops the part that arrived reading as the whole.
214
+ *
215
+ * Capped at {@link PUBLIC_SPEC_MAX_ISSUES}, with a `truncations` row when the cap bit.
216
+ */
217
+ readonly issues: v.ArraySchema<v.ObjectSchema<{
218
+ readonly path: v.StringSchema<undefined>;
219
+ readonly kind: v.PicklistSchema<["read_failed", "unparsed", "partial", "unread"], undefined>;
220
+ readonly dropped: v.OptionalSchema<v.NullableSchema<v.NumberSchema<undefined>, undefined>, 0>;
221
+ }, undefined>, undefined>;
222
+ /** Every cap that bit. Empty when nothing was left out. */
223
+ readonly truncations: v.ArraySchema<v.ObjectSchema<{
224
+ readonly section: v.PicklistSchema<["requirements", "rules", "acceptance", "features", "issues"], undefined>;
225
+ /** How many rows the response carries. */
226
+ readonly shown: v.NumberSchema<undefined>;
227
+ /** How many rows the spec holds. */
228
+ readonly total: v.NumberSchema<undefined>;
229
+ }, undefined>, undefined>;
230
+ }, undefined>;
231
+ export type PublicServiceSpec = v.InferOutput<typeof publicServiceSpecSchema>;
232
+ //# sourceMappingURL=public-spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public-spec.d.ts","sourceRoot":"","sources":["../src/public-spec.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AA8C5B,iFAAiF;AACjF,eAAO,MAAM,4BAA4B,OAAQ,CAAA;AAEjD,iFAAiF;AACjF,eAAO,MAAM,qBAAqB,OAAQ,CAAA;AAE1C;;;;;;;GAOG;AACH,eAAO,MAAM,0BAA0B,OAAQ,CAAA;AAE/C,4EAA4E;AAC5E,eAAO,MAAM,6BAA6B,MAAM,CAAA;AAEhD,uEAAuE;AACvE,eAAO,MAAM,6BAA6B,QAAS,CAAA;AAEnD;;;;;;GAMG;AACH,eAAO,MAAM,mCAAmC,UAAY,CAAA;AAE5D;;;;;;;;GAQG;AACH,eAAO,MAAM,sBAAsB,MAAM,CAAA;AAEzC;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,0BAA0B;;IAErC,4CAA4C;;IAE5C,6BAA6B;;IAE7B,0EAA0E;;IAE1E,oFAAoF;;aAEpF,CAAA;AACF,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,0BAA0B,CAAC,CAAA;AAEnF;;;;;;GAMG;AACH,eAAO,MAAM,2BAA2B;IACtC,wCAAwC;;IAExC,sCAAsC;;IAEtC,iDAAiD;;IAEjD,qEAAqE;;IAErE,iDAAiD;;IAEjD,0EAA0E;;IAE1E,sCAAsC;;aAEtC,CAAA;AACF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,2BAA2B,CAAC,CAAA;AAErF,6FAA6F;AAC7F,eAAO,MAAM,iCAAiC,4FAM5C,CAAA;AACF,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,iCAAiC,CAAC,CAAA;AAEjG;;;;;;;GAOG;AACH,eAAO,MAAM,0BAA0B;;IAErC,0CAA0C;;IAE1C,oCAAoC;;aAEpC,CAAA;AACF,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,0BAA0B,CAAC,CAAA;AAEnF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,sBAAsB,gEAAgD,CAAA;AACnF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAE3E;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB;IAClC,uFAAuF;;IAEvF;;;OAGG;;IAEH;;;;;OAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEH,6FAA6F;;QAzF7F,wCAAwC;;QAExC,sCAAsC;;QAEtC,iDAAiD;;QAEjD,qEAAqE;;QAErE,iDAAiD;;QAEjD,0EAA0E;;QAE1E,sCAAsC;;;;;QA/BtC,4CAA4C;;QAE5C,6BAA6B;;QAE7B,0EAA0E;;QAE1E,oFAAoF;;;IAyGpF;;;;;;;OAOG;;;;;;IAEH,2DAA2D;;;QAhE3D,0CAA0C;;QAE1C,oCAAoC;;;aAgEpC,CAAA;AACF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,uBAAuB,CAAC,CAAA"}
@@ -0,0 +1,208 @@
1
+ import * as v from 'valibot';
2
+ import { vcsProviderSchema } from './routes/auth.js';
3
+ import { readSpecDocSchema, specReadIssueSchema } from './spec.js';
4
+ // ---------------------------------------------------------------------------
5
+ // The public read of a service's in-repo SPECIFICATION (`GET /api/v1/services/:serviceId/spec`).
6
+ //
7
+ // The spec is the platform's requirements truth: structured requirement items with a MoSCoW
8
+ // priority, an `aspirational ⇄ established` lifecycle state and Gherkin-shaped acceptance
9
+ // criteria, stored in the service's own repository under `spec/`. Three consumers could already
10
+ // read it (agents through the repo-ops, humans through the app's requirements window, and anyone
11
+ // holding VCS credentials through a checkout), and the one that could not was the headless
12
+ // integrator holding only a cat-factory API key. That is the consumer this exists for: an
13
+ // outcome-reviewing tool can fetch a run's report and, with this, the criteria the report scored
14
+ // against, which is a key lookup on the requirement id rather than a repository clone.
15
+ //
16
+ // Four decisions shape the shape:
17
+ //
18
+ // 1. **The tree is served as the SAME `SpecDoc` the app's window consumes**, not a re-projection.
19
+ // A second wire shape over one artifact is two things to keep in step, and the requirement id
20
+ // is the join key onto the run report either way. The cost is real and stated rather than
21
+ // hidden: `SpecDoc` and everything under it become part of the STABLE `/api/v1` surface the
22
+ // moment this ships, so those schemas leave the "internals are freely breakable" half of
23
+ // CLAUDE.md and join the half that needs a migration path. That is a price worth paying once,
24
+ // and cheaper than two shapes drifting.
25
+ // 2. **A read has four outcomes and this shape refuses to fold them.** The internal view collapses
26
+ // "no spec on this branch" and "we could not read the repo" into one `present: false`, which
27
+ // is right for a window rendering an empty state and wrong for an integrator: it would report
28
+ // every service as requirement-free for the duration of a VCS incident. Here an unwired VCS
29
+ // capability and a failed read are each a `503` carrying their own `details.reason`, what the
30
+ // branch holds is the three-valued {@link PublicServiceSpec.anchor}, and a spec that read
31
+ // PARTIALLY is served with {@link PublicServiceSpec.issues} naming each file that did not
32
+ // survive.
33
+ // 3. **Provenance, because this is a snapshot and not a subscription.** The spec on the default
34
+ // branch is not the spec a run with an open pull request is working against, so the response
35
+ // names the ref and the commit it describes rather than implying a liveness it does not have.
36
+ // 4. **Every cap is reported.** Both unbounded axes (the requirement/rule rows and the rendered
37
+ // Gherkin) are bounded, and each bound states what it left out, so a capped response can never
38
+ // read as a shorter spec. Same rule the debug surface is built on.
39
+ //
40
+ // There is deliberately NO write side. The files are the truth and the write path is a REVIEWED
41
+ // commit: agents propose spec changes through pull requests and the tester-driven promotion post-op
42
+ // remains the one author of `state`. An API write would bypass exactly the review that makes the
43
+ // spec trustworthy, so its absence is a decision rather than a gap.
44
+ // ---------------------------------------------------------------------------
45
+ /** Ceiling on requirement rows one response may carry, across the whole tree. */
46
+ export const PUBLIC_SPEC_MAX_REQUIREMENTS = 2_000;
47
+ /** Ceiling on domain-rule rows one response may carry, across the whole tree. */
48
+ export const PUBLIC_SPEC_MAX_RULES = 2_000;
49
+ /**
50
+ * Ceiling on acceptance criteria one response may carry, across the whole tree.
51
+ *
52
+ * Across the tree rather than per requirement, because a per-item cap does not bound anything: a
53
+ * criterion carries three 2,000-character clauses, so twenty of them on each of 2,000 requirements
54
+ * is a response two orders of magnitude past every other cap here. The row caps bound the tree's
55
+ * SHAPE; this bounds the part of its WEIGHT they do not.
56
+ */
57
+ export const PUBLIC_SPEC_MAX_ACCEPTANCE = 5_000;
58
+ /** Ceiling on how many rendered `.feature` files one response may carry. */
59
+ export const PUBLIC_SPEC_MAX_FEATURE_FILES = 500;
60
+ /** Ceiling on the characters of Gherkin ONE feature file may carry. */
61
+ export const PUBLIC_SPEC_MAX_FEATURE_CHARS = 20_000;
62
+ /**
63
+ * Ceiling on the characters of Gherkin ALL feature files may carry, together.
64
+ *
65
+ * The per-file cap alone bounds nothing that matters: 500 files each clamped to 20,000 characters
66
+ * is a ten-megabyte body served to a `read`-scope key. Spent in the same traversal order as every
67
+ * other budget, so a file is whole, clamped, or absent, and never a sample.
68
+ */
69
+ export const PUBLIC_SPEC_MAX_FEATURE_TOTAL_CHARS = 1_000_000;
70
+ /**
71
+ * Ceiling on read-issue rows one response may carry.
72
+ *
73
+ * The issue list is produced by the read rather than by the spec, so it is the one axis that grows
74
+ * with FAILURE: a rate-limit window part-way through a few-thousand-shard walk logs a row per
75
+ * shard, and an uncapped list makes the report of a degraded read larger than a healthy response.
76
+ * Capping it without saying so would be the same fold every cap here exists to prevent, so it gets
77
+ * a `truncations` row like the rest.
78
+ */
79
+ export const PUBLIC_SPEC_MAX_ISSUES = 200;
80
+ /**
81
+ * Where the served tree was read from, and WHEN.
82
+ *
83
+ * `commit` is the head of `ref` resolved immediately before the walk, and it is nullable for one
84
+ * honest reason: the tree is read BY BRANCH NAME (that is what makes the reads cacheable and
85
+ * cheap), so a push landing mid-walk can leave the response describing a slightly later commit
86
+ * than the one named. A null means the head could not be resolved at all: the tree below is still
87
+ * what the branch held, we simply cannot name the commit.
88
+ *
89
+ * There is no `directory` here, and its absence is the fact: the `spec/` tree is anchored at the
90
+ * REPOSITORY ROOT, so two services carved out of one monorepo share one spec. Naming a
91
+ * subdirectory would imply a scoping the reader does not apply.
92
+ */
93
+ export const publicSpecProvenanceSchema = v.object({
94
+ provider: vcsProviderSchema,
95
+ /** The repository's owner (org or user). */
96
+ owner: v.string(),
97
+ /** The repository's name. */
98
+ repo: v.string(),
99
+ /** The branch the spec was read from: the repository's default branch. */
100
+ ref: v.string(),
101
+ /** The head commit of `ref` at read time, or null when it could not be resolved. */
102
+ commit: v.nullable(v.string()),
103
+ });
104
+ /**
105
+ * One rendered Gherkin feature file, bounded.
106
+ *
107
+ * `chars`/`totalChars`/`truncated` are the debug surface's own shape, for its own reason: a bare
108
+ * truncated string is indistinguishable from a short one, so a reader would confidently conclude
109
+ * a feature declares two scenarios from a payload that merely hit its budget.
110
+ */
111
+ export const publicSpecFeatureFileSchema = v.object({
112
+ /** The owning module's display name. */
113
+ module: v.string(),
114
+ /** The feature/group display name. */
115
+ group: v.string(),
116
+ /** Repo-relative path of the `.feature` file. */
117
+ path: v.string(),
118
+ /** The Gherkin, clamped to {@link PUBLIC_SPEC_MAX_FEATURE_CHARS}. */
119
+ content: v.string(),
120
+ /** Characters actually returned in `content`. */
121
+ chars: v.number(),
122
+ /** Characters the file holds in the repository, whatever was returned. */
123
+ totalChars: v.number(),
124
+ /** True when `chars < totalChars`. */
125
+ truncated: v.boolean(),
126
+ });
127
+ /** Which axis a cap bit on. Every member counts ITEMS, so `shown`/`total` share one unit. */
128
+ export const publicSpecTruncationSectionSchema = v.picklist([
129
+ 'requirements',
130
+ 'rules',
131
+ 'acceptance',
132
+ 'features',
133
+ 'issues',
134
+ ]);
135
+ /**
136
+ * One cap that bit, and by how much. Present only for an axis that was actually shortened, so an
137
+ * empty `truncations` means the tree below is complete.
138
+ *
139
+ * The cap is applied in the tree's own traversal order (module, then group, then declaration
140
+ * order), which is stated so a reader does not have to guess: the rows that were dropped are the
141
+ * ones latest in that order, not the least important ones. Nothing here RANKS requirements.
142
+ */
143
+ export const publicSpecTruncationSchema = v.object({
144
+ section: publicSpecTruncationSectionSchema,
145
+ /** How many rows the response carries. */
146
+ shown: v.number(),
147
+ /** How many rows the spec holds. */
148
+ total: v.number(),
149
+ });
150
+ /**
151
+ * How the presence anchor (`spec/service.json`) resolved, for a caller that got a `200`.
152
+ *
153
+ * {@link specAnchorStateSchema} minus `read_failed`, which never reaches a body here: an unread
154
+ * repository is a `503` carrying `reason: "spec_read_failed"`. What remains are the three states
155
+ * that are FACTS ABOUT THE REPOSITORY, and they are served as three values rather than folded into
156
+ * one boolean because they need different reactions:
157
+ *
158
+ * - `present` — a spec was read. `spec` is the tree.
159
+ * - `absent` — the default branch holds no `spec/service.json`. The common, final answer, and
160
+ * the only one that means "this service declares nothing".
161
+ * - `unparsed` — the anchor is THERE and unusable (truncated JSON, a half-written commit). The
162
+ * tree is unavailable for a reason somebody has to fix in the repository, and an integrator
163
+ * treating it as "no requirements" would be reporting a broken file as an empty service.
164
+ *
165
+ * A boolean carried the first two and quietly folded the third onto `absent`, discoverable only by
166
+ * noticing an `issues` row. This surface does not fold outcomes; the whole endpoint exists because
167
+ * the internal view does.
168
+ */
169
+ export const publicSpecAnchorSchema = v.picklist(['present', 'absent', 'unparsed']);
170
+ /**
171
+ * The service's specification as `/api/v1` serves it.
172
+ *
173
+ * A `200` here never means the repository could not be read (a `503` with
174
+ * `reason: "spec_read_failed"`), that no repository is linked (a `422`), or that this deployment
175
+ * wired no VCS integration (a `503` with `reason: "vcs_not_configured"`). What it does mean is
176
+ * {@link PublicServiceSpec.anchor}.
177
+ */
178
+ export const publicServiceSpecSchema = v.object({
179
+ /** The board service frame this spec belongs to, echoed so a response stands alone. */
180
+ serviceId: v.string(),
181
+ /**
182
+ * What the default branch holds where the spec should be. `spec` is non-null exactly when this
183
+ * is `present`; the other two are the two ways it can be null.
184
+ */
185
+ anchor: publicSpecAnchorSchema,
186
+ /**
187
+ * The structured tree (modules → groups → requirements + rules), or null when `anchor` is not
188
+ * `present`. {@link readSpecDocSchema} rather than the strict authoring schema: a spec whose
189
+ * anchor names no service is a state a repository can genuinely be in, and this surface has to
190
+ * describe repositories as they are.
191
+ */
192
+ spec: v.nullable(readSpecDocSchema),
193
+ /** The rendered Gherkin, one entry per `.feature` file. Empty when the repo renders none. */
194
+ features: v.array(publicSpecFeatureFileSchema),
195
+ provenance: publicSpecProvenanceSchema,
196
+ /**
197
+ * Files the read could not fully account for: a provider error on one shard, a shard whose JSON
198
+ * is unusable, a group salvaged with some requirements dropped, the tail a spent read budget
199
+ * never reached. A present-but-partial spec is served rather than refused, and this is what
200
+ * stops the part that arrived reading as the whole.
201
+ *
202
+ * Capped at {@link PUBLIC_SPEC_MAX_ISSUES}, with a `truncations` row when the cap bit.
203
+ */
204
+ issues: v.array(specReadIssueSchema),
205
+ /** Every cap that bit. Empty when nothing was left out. */
206
+ truncations: v.array(publicSpecTruncationSchema),
207
+ });
208
+ //# sourceMappingURL=public-spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public-spec.js","sourceRoot":"","sources":["../src/public-spec.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAC5B,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AACpD,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM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AAS,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC,CAAA;AAGnF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,uFAAuF;IACvF,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB;;;OAGG;IACH,MAAM,EAAE,sBAAsB;IAC9B;;;;;OAKG;IACH,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,iBAAiB,CAAC;IACnC,6FAA6F;IAC7F,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,2BAA2B,CAAC;IAC9C,UAAU,EAAE,0BAA0B;IACtC;;;;;;;OAOG;IACH,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,mBAAmB,CAAC;IACpC,2DAA2D;IAC3D,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,0BAA0B,CAAC;CACjD,CAAC,CAAA"}
@@ -52,6 +52,7 @@ export * from './provisioning-logs.js';
52
52
  export * from './public-api.js';
53
53
  export * from './public-board.js';
54
54
  export * from './public-evidence.js';
55
+ export * from './public-spec.js';
55
56
  export * from './public-merge-evidence.js';
56
57
  export * from './debug-api.js';
57
58
  export * from './public-decisions.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/routes/index.ts"],"names":[],"mappings":"AAGA,cAAc,cAAc,CAAA;AAC5B,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,cAAc,CAAA;AAC5B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,mBAAmB,CAAA;AACjC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,gBAAgB,CAAA;AAC9B,cAAc,oBAAoB,CAA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1B,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA;AAC5B,cAAc,kBAAkB,CAAA;AAChC,cAAc,eAAe,CAAA;AAC7B,cAAc,oBAAoB,CAAA;AAClC,cAAc,yBAAyB,CAAA;AACvC,cAAc,wBAAwB,CAAA;AACtC,cAAc,yBAAyB,CAAA;AACvC,cAAc,iBAAiB,CAAA"}
@@ -55,6 +55,7 @@ export * from './provisioning-logs.js';
55
55
  export * from './public-api.js';
56
56
  export * from './public-board.js';
57
57
  export * from './public-evidence.js';
58
+ export * from './public-spec.js';
58
59
  export * from './public-merge-evidence.js';
59
60
  export * from './debug-api.js';
60
61
  export * from './public-decisions.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/routes/index.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,+EAA+E;AAC/E,oDAAoD;AACpD,cAAc,cAAc,CAAA;AAC5B,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,cAAc,CAAA;AAC5B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,mBAAmB,CAAA;AACjC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,gBAAgB,CAAA;AAC9B,cAAc,oBAAoB,CAAA;AAClC,cAAc,eAAe,CAAA;AAC7B,cAAc,mBAAmB,CAAA;AACjC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,YAAY,CAAA;AAC1B,cAAc,eAAe,CAAA;AAC7B,cAAc,uBAAuB,CAAA;AACrC,cAAc,oBAAoB,CAAA;AAClC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,aAAa,CAAA;AAC3B,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AACvC,cAAc,wBAAwB,CAAA;AACtC,cAAc,yBAAyB,CAAA;AACvC,cAAc,iBAAiB,CAAA"}
@@ -0,0 +1,110 @@
1
+ /**
2
+ * The service's in-repo specification: the structured requirement tree, the rendered Gherkin, and
3
+ * the ref + commit both were read at.
4
+ *
5
+ * `read` scope, like every other discovery and evidence read here. It is a read of what the
6
+ * service is committed to honouring, and an integration reviewing a run's outcome must be able to
7
+ * see the criteria it was scored against without holding a key that could also merge a pull
8
+ * request.
9
+ *
10
+ * Read-only by design, not by omission: see the note at the top of `../public-spec.ts`.
11
+ */
12
+ export declare const getPublicServiceSpecContract: {
13
+ readonly method: "get";
14
+ readonly requestPathParamsSchema: import("valibot").ObjectSchema<{
15
+ serviceId: import("valibot").StringSchema<undefined>;
16
+ }, undefined> & import("@toad-contracts/core").StandardObjectKeysV1<unknown, unknown>;
17
+ readonly pathResolver: ({ serviceId }: {
18
+ serviceId: string;
19
+ }) => string;
20
+ readonly responsesByStatusCode: {
21
+ readonly '4xx': import("valibot").ObjectSchema<{
22
+ readonly error: import("valibot").ObjectSchema<{
23
+ readonly code: import("valibot").StringSchema<undefined>;
24
+ readonly message: import("valibot").StringSchema<undefined>;
25
+ readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
26
+ readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
27
+ readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
28
+ readonly message: import("valibot").StringSchema<undefined>;
29
+ }, undefined>, undefined>, undefined>;
30
+ }, undefined>;
31
+ }, undefined>;
32
+ readonly '5xx': import("valibot").ObjectSchema<{
33
+ readonly error: import("valibot").ObjectSchema<{
34
+ readonly code: import("valibot").StringSchema<undefined>;
35
+ readonly message: import("valibot").StringSchema<undefined>;
36
+ readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
37
+ readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
38
+ readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
39
+ readonly message: import("valibot").StringSchema<undefined>;
40
+ }, undefined>, undefined>, undefined>;
41
+ }, undefined>;
42
+ }, undefined>;
43
+ readonly 200: import("valibot").ObjectSchema<{
44
+ readonly serviceId: import("valibot").StringSchema<undefined>;
45
+ readonly anchor: import("valibot").PicklistSchema<["present", "absent", "unparsed"], undefined>;
46
+ readonly spec: import("valibot").NullableSchema<import("valibot").ObjectSchema<{
47
+ readonly summary: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MaxLengthAction<string, 2000, undefined>]>, "">;
48
+ readonly modules: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
49
+ readonly name: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").TrimAction, import("valibot").MinLengthAction<string, 1, undefined>, import("valibot").MaxLengthAction<string, 120, undefined>]>;
50
+ readonly summary: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MaxLengthAction<string, 2000, undefined>]>, "">;
51
+ readonly groups: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
52
+ readonly name: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").TrimAction, import("valibot").MinLengthAction<string, 1, undefined>, import("valibot").MaxLengthAction<string, 120, undefined>]>;
53
+ readonly summary: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MaxLengthAction<string, 2000, undefined>]>, "">;
54
+ readonly requirements: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
55
+ readonly id: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").TrimAction, import("valibot").MinLengthAction<string, 1, undefined>, import("valibot").MaxLengthAction<string, 200, undefined>]>;
56
+ readonly title: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").TrimAction, import("valibot").MinLengthAction<string, 1, undefined>, import("valibot").MaxLengthAction<string, 120, undefined>]>;
57
+ readonly statement: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").TrimAction, import("valibot").MinLengthAction<string, 1, undefined>, import("valibot").MaxLengthAction<string, 4000, undefined>]>;
58
+ readonly kind: import("valibot").PicklistSchema<["functional", "nonfunctional", "constraint"], undefined>;
59
+ readonly priority: import("valibot").PicklistSchema<["must", "should", "could"], undefined>;
60
+ readonly state: import("valibot").OptionalSchema<import("valibot").PicklistSchema<["aspirational", "established"], undefined>, "aspirational">;
61
+ readonly sourceBlockIds: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").TrimAction, import("valibot").MinLengthAction<string, 1, undefined>, import("valibot").MaxLengthAction<string, 200, undefined>]>, undefined>, readonly []>;
62
+ readonly acceptance: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
63
+ readonly id: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").TrimAction, import("valibot").MinLengthAction<string, 1, undefined>, import("valibot").MaxLengthAction<string, 200, undefined>]>;
64
+ readonly given: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MaxLengthAction<string, 2000, undefined>]>;
65
+ readonly when: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MaxLengthAction<string, 2000, undefined>]>;
66
+ readonly outcome: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MaxLengthAction<string, 2000, undefined>]>;
67
+ }, undefined>, undefined>, readonly []>;
68
+ }, undefined>, undefined>, readonly []>;
69
+ readonly rules: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
70
+ readonly id: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").TrimAction, import("valibot").MinLengthAction<string, 1, undefined>, import("valibot").MaxLengthAction<string, 200, undefined>]>;
71
+ readonly rule: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").TrimAction, import("valibot").MinLengthAction<string, 1, undefined>, import("valibot").MaxLengthAction<string, 4000, undefined>]>;
72
+ readonly rationale: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MaxLengthAction<string, 2000, undefined>]>, "">;
73
+ readonly sourceBlockIds: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").TrimAction, import("valibot").MinLengthAction<string, 1, undefined>, import("valibot").MaxLengthAction<string, 200, undefined>]>, undefined>, readonly []>;
74
+ }, undefined>, undefined>, readonly []>;
75
+ }, undefined>, undefined>, readonly []>;
76
+ }, undefined>, undefined>, readonly []>;
77
+ readonly service: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").TrimAction, import("valibot").MaxLengthAction<string, 120, undefined>]>, "">;
78
+ }, undefined>, undefined>;
79
+ readonly features: import("valibot").ArraySchema<import("valibot").ObjectSchema<{
80
+ readonly module: import("valibot").StringSchema<undefined>;
81
+ readonly group: import("valibot").StringSchema<undefined>;
82
+ readonly path: import("valibot").StringSchema<undefined>;
83
+ readonly content: import("valibot").StringSchema<undefined>;
84
+ readonly chars: import("valibot").NumberSchema<undefined>;
85
+ readonly totalChars: import("valibot").NumberSchema<undefined>;
86
+ readonly truncated: import("valibot").BooleanSchema<undefined>;
87
+ }, undefined>, undefined>;
88
+ readonly provenance: import("valibot").ObjectSchema<{
89
+ readonly provider: import("valibot").PicklistSchema<["github", "gitlab"], undefined>;
90
+ readonly owner: import("valibot").StringSchema<undefined>;
91
+ readonly repo: import("valibot").StringSchema<undefined>;
92
+ readonly ref: import("valibot").StringSchema<undefined>;
93
+ readonly commit: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
94
+ }, undefined>;
95
+ readonly issues: import("valibot").ArraySchema<import("valibot").ObjectSchema<{
96
+ readonly path: import("valibot").StringSchema<undefined>;
97
+ readonly kind: import("valibot").PicklistSchema<["read_failed", "unparsed", "partial", "unread"], undefined>;
98
+ readonly dropped: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").NumberSchema<undefined>, undefined>, 0>;
99
+ }, undefined>, undefined>;
100
+ readonly truncations: import("valibot").ArraySchema<import("valibot").ObjectSchema<{
101
+ readonly section: import("valibot").PicklistSchema<["requirements", "rules", "acceptance", "features", "issues"], undefined>;
102
+ readonly shown: import("valibot").NumberSchema<undefined>;
103
+ readonly total: import("valibot").NumberSchema<undefined>;
104
+ }, undefined>, undefined>;
105
+ }, undefined>;
106
+ };
107
+ } & {
108
+ readonly minScope: "read";
109
+ };
110
+ //# sourceMappingURL=public-spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public-spec.d.ts","sourceRoot":"","sources":["../../src/routes/public-spec.ts"],"names":[],"mappings":"AAeA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQxC,CAAA"}
@@ -0,0 +1,31 @@
1
+ import { defineApiContract } from '@toad-contracts/valibot';
2
+ import { publicServiceSpecSchema } from '../public-spec.js';
3
+ import { errorResponses, singleStringParam, withMinScope } from './_shared.js';
4
+ // ---------------------------------------------------------------------------
5
+ // The public SPEC read: absolute `/api/v1` path, authenticated in-controller by a public-API key.
6
+ // The wire shape and the reasoning behind it live in `../public-spec.ts`; the honesty contract the
7
+ // controller implements (four outcomes, never folded) is in `PublicSpecController`.
8
+ //
9
+ // Addressed under `/api/v1/services/:serviceId/*`, beside `…/tasks`, because a spec is a fact about
10
+ // a SERVICE. The `serviceId` is the board service-frame id every other endpoint on this surface
11
+ // already uses, and it resolves through the same board read, so a key can only ever name a service
12
+ // of its own workspace.
13
+ // ---------------------------------------------------------------------------
14
+ /**
15
+ * The service's in-repo specification: the structured requirement tree, the rendered Gherkin, and
16
+ * the ref + commit both were read at.
17
+ *
18
+ * `read` scope, like every other discovery and evidence read here. It is a read of what the
19
+ * service is committed to honouring, and an integration reviewing a run's outcome must be able to
20
+ * see the criteria it was scored against without holding a key that could also merge a pull
21
+ * request.
22
+ *
23
+ * Read-only by design, not by omission: see the note at the top of `../public-spec.ts`.
24
+ */
25
+ export const getPublicServiceSpecContract = withMinScope('read', defineApiContract({
26
+ method: 'get',
27
+ requestPathParamsSchema: singleStringParam('serviceId'),
28
+ pathResolver: ({ serviceId }) => `/api/v1/services/${serviceId}/spec`,
29
+ responsesByStatusCode: { 200: publicServiceSpecSchema, ...errorResponses },
30
+ }));
31
+ //# sourceMappingURL=public-spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public-spec.js","sourceRoot":"","sources":["../../src/routes/public-spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAA;AAC3D,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAE9E,8EAA8E;AAC9E,kGAAkG;AAClG,mGAAmG;AACnG,oFAAoF;AACpF,EAAE;AACF,oGAAoG;AACpG,gGAAgG;AAChG,mGAAmG;AACnG,wBAAwB;AACxB,8EAA8E;AAE9E;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,YAAY,CACtD,MAAM,EACN,iBAAiB,CAAC;IAChB,MAAM,EAAE,KAAK;IACb,uBAAuB,EAAE,iBAAiB,CAAC,WAAW,CAAC;IACvD,YAAY,EAAE,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,oBAAoB,SAAS,OAAO;IACrE,qBAAqB,EAAE,EAAE,GAAG,EAAE,uBAAuB,EAAE,GAAG,cAAc,EAAE;CAC3E,CAAC,CACH,CAAA"}
@@ -32,7 +32,6 @@ export declare const getServiceSpecContract: {
32
32
  readonly 200: import("valibot").ObjectSchema<{
33
33
  readonly present: import("valibot").BooleanSchema<undefined>;
34
34
  readonly spec: import("valibot").NullableSchema<import("valibot").ObjectSchema<{
35
- readonly service: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").TrimAction, import("valibot").MinLengthAction<string, 1, undefined>, import("valibot").MaxLengthAction<string, 120, undefined>]>;
36
35
  readonly summary: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MaxLengthAction<string, 2000, undefined>]>, "">;
37
36
  readonly modules: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
38
37
  readonly name: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").TrimAction, import("valibot").MinLengthAction<string, 1, undefined>, import("valibot").MaxLengthAction<string, 120, undefined>]>;
@@ -63,6 +62,7 @@ export declare const getServiceSpecContract: {
63
62
  }, undefined>, undefined>, readonly []>;
64
63
  }, undefined>, undefined>, readonly []>;
65
64
  }, undefined>, undefined>, readonly []>;
65
+ readonly service: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").TrimAction, import("valibot").MaxLengthAction<string, 120, undefined>]>, "">;
66
66
  }, undefined>, undefined>;
67
67
  readonly features: import("valibot").ArraySchema<import("valibot").ObjectSchema<{
68
68
  readonly module: import("valibot").StringSchema<undefined>;
@@ -70,6 +70,14 @@ export declare const getServiceSpecContract: {
70
70
  readonly path: import("valibot").StringSchema<undefined>;
71
71
  readonly content: import("valibot").StringSchema<undefined>;
72
72
  }, undefined>, undefined>;
73
+ readonly diagnostics: import("valibot").OptionalSchema<import("valibot").ObjectSchema<{
74
+ readonly anchor: import("valibot").PicklistSchema<["present", "absent", "read_failed", "unparsed"], undefined>;
75
+ readonly issues: import("valibot").ArraySchema<import("valibot").ObjectSchema<{
76
+ readonly path: import("valibot").StringSchema<undefined>;
77
+ readonly kind: import("valibot").PicklistSchema<["read_failed", "unparsed", "partial", "unread"], undefined>;
78
+ readonly dropped: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").NumberSchema<undefined>, undefined>, 0>;
79
+ }, undefined>, undefined>;
80
+ }, undefined>, undefined>;
73
81
  }, undefined>;
74
82
  };
75
83
  };
@@ -116,7 +124,6 @@ export declare const getRunSpecContract: {
116
124
  readonly 200: import("valibot").ObjectSchema<{
117
125
  readonly present: import("valibot").BooleanSchema<undefined>;
118
126
  readonly spec: import("valibot").NullableSchema<import("valibot").ObjectSchema<{
119
- readonly service: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").TrimAction, import("valibot").MinLengthAction<string, 1, undefined>, import("valibot").MaxLengthAction<string, 120, undefined>]>;
120
127
  readonly summary: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MaxLengthAction<string, 2000, undefined>]>, "">;
121
128
  readonly modules: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
122
129
  readonly name: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").TrimAction, import("valibot").MinLengthAction<string, 1, undefined>, import("valibot").MaxLengthAction<string, 120, undefined>]>;
@@ -147,6 +154,7 @@ export declare const getRunSpecContract: {
147
154
  }, undefined>, undefined>, readonly []>;
148
155
  }, undefined>, undefined>, readonly []>;
149
156
  }, undefined>, undefined>, readonly []>;
157
+ readonly service: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").TrimAction, import("valibot").MaxLengthAction<string, 120, undefined>]>, "">;
150
158
  }, undefined>, undefined>;
151
159
  readonly features: import("valibot").ArraySchema<import("valibot").ObjectSchema<{
152
160
  readonly module: import("valibot").StringSchema<undefined>;
@@ -154,6 +162,14 @@ export declare const getRunSpecContract: {
154
162
  readonly path: import("valibot").StringSchema<undefined>;
155
163
  readonly content: import("valibot").StringSchema<undefined>;
156
164
  }, undefined>, undefined>;
165
+ readonly diagnostics: import("valibot").OptionalSchema<import("valibot").ObjectSchema<{
166
+ readonly anchor: import("valibot").PicklistSchema<["present", "absent", "read_failed", "unparsed"], undefined>;
167
+ readonly issues: import("valibot").ArraySchema<import("valibot").ObjectSchema<{
168
+ readonly path: import("valibot").StringSchema<undefined>;
169
+ readonly kind: import("valibot").PicklistSchema<["read_failed", "unparsed", "partial", "unread"], undefined>;
170
+ readonly dropped: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").NumberSchema<undefined>, undefined>, 0>;
171
+ }, undefined>, undefined>;
172
+ }, undefined>, undefined>;
157
173
  }, undefined>;
158
174
  };
159
175
  };
@@ -1 +1 @@
1
- {"version":3,"file":"spec.d.ts","sourceRoot":"","sources":["../../src/routes/spec.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKjC,CAAA;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAK7B,CAAA"}
1
+ {"version":3,"file":"spec.d.ts","sourceRoot":"","sources":["../../src/routes/spec.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKjC,CAAA;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAK7B,CAAA"}
package/dist/spec.d.ts CHANGED
@@ -1,4 +1,12 @@
1
1
  import * as v from 'valibot';
2
+ /**
3
+ * The two length bounds a READER has to honour to produce a parseable doc, exported so the
4
+ * reassembly clamps to the same numbers the schema enforces instead of restating them. A reader
5
+ * that clamps to its own constant passes its own tests and serves a `200` that fails the published
6
+ * schema the moment either number moves.
7
+ */
8
+ export declare const SPEC_NAME_MAX = 120;
9
+ export declare const SPEC_SUMMARY_MAX = 2000;
2
10
  /** MoSCoW priority — how essential a requirement is. */
3
11
  export declare const requirementPrioritySchema: v.PicklistSchema<["must", "should", "could"], undefined>;
4
12
  export type RequirementPriority = v.InferOutput<typeof requirementPrioritySchema>;
@@ -229,6 +237,71 @@ export declare const specDocSchema: v.ObjectSchema<{
229
237
  }, undefined>, undefined>, readonly []>;
230
238
  }, undefined>;
231
239
  export type SpecDoc = v.InferOutput<typeof specDocSchema>;
240
+ /**
241
+ * The same document as a READER reassembles it, as opposed to as a producer must author it.
242
+ *
243
+ * Derived from {@link specDocSchema} rather than restated, so the two cannot drift, with exactly
244
+ * one field relaxed: `service` may be the empty string. The anchor (`spec/service.json`) is a file
245
+ * in somebody's repository and can be half-written, so a read has to be able to say "this spec
246
+ * names no service" (every consumer falls back to the board frame's own title). The STRICT schema
247
+ * stays the ingestion boundary `parseSpecDoc` guards, so nothing can AUTHOR a nameless spec; this
248
+ * one exists because refusing to describe one that already exists is the worse answer.
249
+ *
250
+ * Both infer the same TypeScript type. The difference is entirely in what each will PARSE, which
251
+ * is the difference that matters: a view typed `SpecDoc` while carrying `service: ''` is a value
252
+ * that fails the schema its own type names, and on `/api/v1` that is a published contract the
253
+ * response violates.
254
+ */
255
+ export declare const readSpecDocSchema: v.ObjectSchema<{
256
+ /** One-paragraph product intent for the service overall. */
257
+ readonly summary: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>, "">;
258
+ /** Modules (domains), each grouping its feature groups; the two-level taxonomy. */
259
+ readonly modules: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
260
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
261
+ readonly summary: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>, "">;
262
+ readonly groups: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
263
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
264
+ readonly summary: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>, "">;
265
+ readonly requirements: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
266
+ /** Stable slug, e.g. `req-login-rate-limit`. */
267
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>;
268
+ /** Short headline. */
269
+ readonly title: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
270
+ /** The requirement itself, as `The system SHALL …` prose. */
271
+ readonly statement: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 4000, undefined>]>;
272
+ readonly kind: v.PicklistSchema<["functional", "nonfunctional", "constraint"], undefined>;
273
+ readonly priority: v.PicklistSchema<["must", "should", "could"], undefined>;
274
+ /**
275
+ * Whether the service is already known to honour this requirement. Defaults to
276
+ * `aspirational` — a requirement nobody has observed to hold is not standing behaviour, and
277
+ * a spec written before the code is the normal case rather than the exceptional one. See
278
+ * {@link requirementStateSchema}.
279
+ */
280
+ readonly state: v.OptionalSchema<v.PicklistSchema<["aspirational", "established"], undefined>, "aspirational">;
281
+ /** Ids of the board task/block(s) this requirement was aggregated from (provenance). */
282
+ readonly sourceBlockIds: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>, readonly []>;
283
+ /** Structured acceptance criteria → the seed for this requirement's Gherkin scenarios. */
284
+ readonly acceptance: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
285
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>;
286
+ readonly given: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
287
+ readonly when: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
288
+ readonly outcome: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
289
+ }, undefined>, undefined>, readonly []>;
290
+ }, undefined>, undefined>, readonly []>;
291
+ /** Domain rules / invariants scoped to this feature (rendered into its `<group>.md`). */
292
+ readonly rules: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
293
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>;
294
+ /** The invariant, e.g. `An order may never have a negative total.` */
295
+ readonly rule: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 4000, undefined>]>;
296
+ /** Why the rule exists (optional). */
297
+ readonly rationale: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>, "">;
298
+ readonly sourceBlockIds: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>, readonly []>;
299
+ }, undefined>, undefined>, readonly []>;
300
+ }, undefined>, undefined>, readonly []>;
301
+ }, undefined>, undefined>, readonly []>;
302
+ readonly service: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 120, undefined>]>, "">;
303
+ }, undefined>;
304
+ export type ReadSpecDoc = v.InferOutput<typeof readSpecDocSchema>;
232
305
  /** Folder, relative to the repo root, that holds the persisted spec. */
233
306
  export declare const SPEC_DIR = "spec";
234
307
  /** Tiny file carrying only the service name + one-paragraph summary. */
@@ -251,6 +324,72 @@ export declare const specFeatureFileSchema: v.ObjectSchema<{
251
324
  readonly content: v.StringSchema<undefined>;
252
325
  }, undefined>;
253
326
  export type SpecFeatureFile = v.InferOutput<typeof specFeatureFileSchema>;
327
+ /**
328
+ * What became of ONE file the reader touched. The reader is deliberately total and salvaging
329
+ * (a flaky read or a malformed shard degrades to a partial tree rather than a thrown error), and
330
+ * a salvage that reports nothing is indistinguishable from a repo that genuinely holds less:
331
+ *
332
+ * - `read_failed`: the provider answered with something other than "absent" (rate limit, 5xx,
333
+ * a permission the installation lost). The file may well exist; we cannot say.
334
+ * - `unparsed`: the file was read and NOTHING could be recovered from it (unreadable JSON,
335
+ * or a shard whose own identity is missing), so its whole subtree is missing from the view.
336
+ * - `partial`: the file was read and salvaged item by item; `dropped` says how many
337
+ * requirements/rules failed validation and are therefore absent from an otherwise valid group.
338
+ * - `unread`: the pass ran out of its read budget before reaching this path, so it was never
339
+ * fetched. `dropped` counts the files left unread. Reported against the `spec` root, once per
340
+ * pass: a per-file row would make the budget's own report the largest thing in the response.
341
+ */
342
+ export declare const specReadIssueKindSchema: v.PicklistSchema<["read_failed", "unparsed", "partial", "unread"], undefined>;
343
+ export type SpecReadIssueKind = v.InferOutput<typeof specReadIssueKindSchema>;
344
+ /** One file the reader could not fully account for, named rather than silently dropped. */
345
+ export declare const specReadIssueSchema: v.ObjectSchema<{
346
+ /** Repo-relative path of the file (or directory, for a failed listing). */
347
+ readonly path: v.StringSchema<undefined>;
348
+ readonly kind: v.PicklistSchema<["read_failed", "unparsed", "partial", "unread"], undefined>;
349
+ /**
350
+ * How much this row cost the tree: items lost from a `partial` file, files left unread by an
351
+ * exhausted budget, 0 on the kinds that lose nothing countable.
352
+ *
353
+ * NULL means content was lost here and NO count describes it. A salvage reaches that state
354
+ * honestly: a shard whose `requirements` is an object rather than a list has requirements that
355
+ * are structurally unreadable, so there is nothing to count, and answering `0` would report the
356
+ * rebuilt group as a complete one that simply declares nothing. An unknown loss and no loss are
357
+ * different facts, and only a distinct value states the first.
358
+ */
359
+ readonly dropped: v.OptionalSchema<v.NullableSchema<v.NumberSchema<undefined>, undefined>, 0>;
360
+ }, undefined>;
361
+ export type SpecReadIssue = v.InferOutput<typeof specReadIssueSchema>;
362
+ /**
363
+ * How the PRESENCE ANCHOR (`spec/service.json`) resolved. Four states rather than the boolean
364
+ * `present` beside it, because three of them produce the same empty tree and demand different
365
+ * reactions: a branch with no spec is a normal answer, a provider outage is a retry, and a corrupt
366
+ * anchor is a repo somebody has to fix. Collapsing them is how "this service has no requirements"
367
+ * comes to be reported during every VCS incident.
368
+ */
369
+ export declare const specAnchorStateSchema: v.PicklistSchema<["present", "absent", "read_failed", "unparsed"], undefined>;
370
+ export type SpecAnchorState = v.InferOutput<typeof specAnchorStateSchema>;
371
+ /** What the reader could and could not account for on this pass. */
372
+ export declare const specReadDiagnosticsSchema: v.ObjectSchema<{
373
+ readonly anchor: v.PicklistSchema<["present", "absent", "read_failed", "unparsed"], undefined>;
374
+ /** Every file the pass could not fully account for. Empty on a clean read. */
375
+ readonly issues: v.ArraySchema<v.ObjectSchema<{
376
+ /** Repo-relative path of the file (or directory, for a failed listing). */
377
+ readonly path: v.StringSchema<undefined>;
378
+ readonly kind: v.PicklistSchema<["read_failed", "unparsed", "partial", "unread"], undefined>;
379
+ /**
380
+ * How much this row cost the tree: items lost from a `partial` file, files left unread by an
381
+ * exhausted budget, 0 on the kinds that lose nothing countable.
382
+ *
383
+ * NULL means content was lost here and NO count describes it. A salvage reaches that state
384
+ * honestly: a shard whose `requirements` is an object rather than a list has requirements that
385
+ * are structurally unreadable, so there is nothing to count, and answering `0` would report the
386
+ * rebuilt group as a complete one that simply declares nothing. An unknown loss and no loss are
387
+ * different facts, and only a distinct value states the first.
388
+ */
389
+ readonly dropped: v.OptionalSchema<v.NullableSchema<v.NumberSchema<undefined>, undefined>, 0>;
390
+ }, undefined>, undefined>;
391
+ }, undefined>;
392
+ export type SpecReadDiagnostics = v.InferOutput<typeof specReadDiagnosticsSchema>;
254
393
  /**
255
394
  * The service-spec view served to the SPA: the reassembled prescriptive spec tree read
256
395
  * from the service repo's default branch, plus its rendered Gherkin feature files.
@@ -260,10 +399,13 @@ export type SpecFeatureFile = v.InferOutput<typeof specFeatureFileSchema>;
260
399
  export declare const serviceSpecViewSchema: v.ObjectSchema<{
261
400
  /** Whether a spec exists on the service repo's default branch (a `spec/service.json`). */
262
401
  readonly present: v.BooleanSchema<undefined>;
263
- /** The reassembled spec tree, or null when none is present. */
402
+ /**
403
+ * The reassembled spec tree, or null when none is present.
404
+ *
405
+ * {@link readSpecDocSchema}, not the strict authoring schema: this is what a READER got back
406
+ * out of a repository, and an anchor that names no service is a state a repository can be in.
407
+ */
264
408
  readonly spec: v.NullableSchema<v.ObjectSchema<{
265
- /** Service / frame name (defaults to the repo name). */
266
- readonly service: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
267
409
  /** One-paragraph product intent for the service overall. */
268
410
  readonly summary: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>, "">;
269
411
  /** Modules (domains), each grouping its feature groups; the two-level taxonomy. */
@@ -310,6 +452,7 @@ export declare const serviceSpecViewSchema: v.ObjectSchema<{
310
452
  }, undefined>, undefined>, readonly []>;
311
453
  }, undefined>, undefined>, readonly []>;
312
454
  }, undefined>, undefined>, readonly []>;
455
+ readonly service: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 120, undefined>]>, "">;
313
456
  }, undefined>, undefined>;
314
457
  /** The rendered Gherkin feature files (empty when none present). The producer always
315
458
  * sends this field (`[]` when there are none), and the SPA dereferences it unguarded, so
@@ -324,6 +467,32 @@ export declare const serviceSpecViewSchema: v.ObjectSchema<{
324
467
  /** The raw Gherkin content. */
325
468
  readonly content: v.StringSchema<undefined>;
326
469
  }, undefined>, undefined>;
470
+ /**
471
+ * What the READ itself could account for, as distinct from what the spec says. Optional
472
+ * because absent means "this producer diagnosed nothing", which is a different fact from a
473
+ * clean pass and is the honest answer for the callers that assemble a view by hand (a memo, a
474
+ * test fixture). `readServiceSpec` always sets it.
475
+ */
476
+ readonly diagnostics: v.OptionalSchema<v.ObjectSchema<{
477
+ readonly anchor: v.PicklistSchema<["present", "absent", "read_failed", "unparsed"], undefined>;
478
+ /** Every file the pass could not fully account for. Empty on a clean read. */
479
+ readonly issues: v.ArraySchema<v.ObjectSchema<{
480
+ /** Repo-relative path of the file (or directory, for a failed listing). */
481
+ readonly path: v.StringSchema<undefined>;
482
+ readonly kind: v.PicklistSchema<["read_failed", "unparsed", "partial", "unread"], undefined>;
483
+ /**
484
+ * How much this row cost the tree: items lost from a `partial` file, files left unread by an
485
+ * exhausted budget, 0 on the kinds that lose nothing countable.
486
+ *
487
+ * NULL means content was lost here and NO count describes it. A salvage reaches that state
488
+ * honestly: a shard whose `requirements` is an object rather than a list has requirements that
489
+ * are structurally unreadable, so there is nothing to count, and answering `0` would report the
490
+ * rebuilt group as a complete one that simply declares nothing. An unknown loss and no loss are
491
+ * different facts, and only a distinct value states the first.
492
+ */
493
+ readonly dropped: v.OptionalSchema<v.NullableSchema<v.NumberSchema<undefined>, undefined>, 0>;
494
+ }, undefined>, undefined>;
495
+ }, undefined>, undefined>;
327
496
  }, undefined>;
328
497
  export type ServiceSpecView = v.InferOutput<typeof serviceSpecViewSchema>;
329
498
  /** The canonical "no spec" view — GitHub not connected, or no spec on the default branch. */
@@ -1 +1 @@
1
- {"version":3,"file":"spec.d.ts","sourceRoot":"","sources":["../src/spec.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAmC5B,wDAAwD;AACxD,eAAO,MAAM,yBAAyB,0DAA0C,CAAA;AAChF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,yBAAyB,CAAC,CAAA;AAEjF,uFAAuF;AACvF,eAAO,MAAM,qBAAqB,4EAA4D,CAAA;AAC9F,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEzE;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,sBAAsB,8DAA8C,CAAA;AACjF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAE3E;;;;GAIG;AACH,eAAO,MAAM,yBAAyB;;;;;aAOpC,CAAA;AACF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,yBAAyB,CAAC,CAAA;AAEjF,2FAA2F;AAC3F,eAAO,MAAM,qBAAqB;IAChC,gDAAgD;;IAEhD,sBAAsB;;IAEtB,6DAA6D;;;;IAI7D;;;;;OAKG;;IAEH,wFAAwF;;IAExF,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AAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS,CAGpE;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS,CAG1E;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,OAAO,GAAG,gBAAgB,GAAG,SAAS,CAGtF;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,GAAG,eAAe,GAAG,SAAS,CAGpF;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS,CAG1E;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,CAgCzD"}
package/dist/spec.js CHANGED
@@ -25,9 +25,17 @@ import * as v from 'valibot';
25
25
  // requirements, domain rules and acceptance criteria, so those inner item types
26
26
  // keep their names.
27
27
  // ---------------------------------------------------------------------------
28
+ /**
29
+ * The two length bounds a READER has to honour to produce a parseable doc, exported so the
30
+ * reassembly clamps to the same numbers the schema enforces instead of restating them. A reader
31
+ * that clamps to its own constant passes its own tests and serves a `200` that fails the published
32
+ * schema the moment either number moves.
33
+ */
34
+ export const SPEC_NAME_MAX = 120;
35
+ export const SPEC_SUMMARY_MAX = 2000;
28
36
  const requirementIdField = v.pipe(v.string(), v.trim(), v.minLength(1), v.maxLength(200));
29
- const reqNameField = v.pipe(v.string(), v.trim(), v.minLength(1), v.maxLength(120));
30
- const reqSummaryField = v.pipe(v.string(), v.maxLength(2000));
37
+ const reqNameField = v.pipe(v.string(), v.trim(), v.minLength(1), v.maxLength(SPEC_NAME_MAX));
38
+ const reqSummaryField = v.pipe(v.string(), v.maxLength(SPEC_SUMMARY_MAX));
31
39
  const reqStatementField = v.pipe(v.string(), v.trim(), v.minLength(1), v.maxLength(4000));
32
40
  const blockIdField = v.pipe(v.string(), v.trim(), v.minLength(1), v.maxLength(200));
33
41
  /** MoSCoW priority — how essential a requirement is. */
@@ -136,6 +144,25 @@ export const specDocSchema = v.object({
136
144
  /** Modules (domains), each grouping its feature groups; the two-level taxonomy. */
137
145
  modules: v.optional(v.array(specModuleSchema), []),
138
146
  });
147
+ /**
148
+ * The same document as a READER reassembles it, as opposed to as a producer must author it.
149
+ *
150
+ * Derived from {@link specDocSchema} rather than restated, so the two cannot drift, with exactly
151
+ * one field relaxed: `service` may be the empty string. The anchor (`spec/service.json`) is a file
152
+ * in somebody's repository and can be half-written, so a read has to be able to say "this spec
153
+ * names no service" (every consumer falls back to the board frame's own title). The STRICT schema
154
+ * stays the ingestion boundary `parseSpecDoc` guards, so nothing can AUTHOR a nameless spec; this
155
+ * one exists because refusing to describe one that already exists is the worse answer.
156
+ *
157
+ * Both infer the same TypeScript type. The difference is entirely in what each will PARSE, which
158
+ * is the difference that matters: a view typed `SpecDoc` while carrying `service: ''` is a value
159
+ * that fails the schema its own type names, and on `/api/v1` that is a published contract the
160
+ * response violates.
161
+ */
162
+ export const readSpecDocSchema = v.object({
163
+ ...specDocSchema.entries,
164
+ service: v.optional(v.pipe(v.string(), v.trim(), v.maxLength(SPEC_NAME_MAX)), ''),
165
+ });
139
166
  // ---- In-repo spec artifact paths ------------------------------------------
140
167
  // The sharded folder layout, the prescriptive sibling of `blueprints/`. The
141
168
  // canonical machine-readable files are the per-group `modules/<m>/<g>.json` shards;
@@ -167,6 +194,53 @@ export const specFeatureFileSchema = v.object({
167
194
  /** The raw Gherkin content. */
168
195
  content: v.string(),
169
196
  });
197
+ /**
198
+ * What became of ONE file the reader touched. The reader is deliberately total and salvaging
199
+ * (a flaky read or a malformed shard degrades to a partial tree rather than a thrown error), and
200
+ * a salvage that reports nothing is indistinguishable from a repo that genuinely holds less:
201
+ *
202
+ * - `read_failed`: the provider answered with something other than "absent" (rate limit, 5xx,
203
+ * a permission the installation lost). The file may well exist; we cannot say.
204
+ * - `unparsed`: the file was read and NOTHING could be recovered from it (unreadable JSON,
205
+ * or a shard whose own identity is missing), so its whole subtree is missing from the view.
206
+ * - `partial`: the file was read and salvaged item by item; `dropped` says how many
207
+ * requirements/rules failed validation and are therefore absent from an otherwise valid group.
208
+ * - `unread`: the pass ran out of its read budget before reaching this path, so it was never
209
+ * fetched. `dropped` counts the files left unread. Reported against the `spec` root, once per
210
+ * pass: a per-file row would make the budget's own report the largest thing in the response.
211
+ */
212
+ export const specReadIssueKindSchema = v.picklist(['read_failed', 'unparsed', 'partial', 'unread']);
213
+ /** One file the reader could not fully account for, named rather than silently dropped. */
214
+ export const specReadIssueSchema = v.object({
215
+ /** Repo-relative path of the file (or directory, for a failed listing). */
216
+ path: v.string(),
217
+ kind: specReadIssueKindSchema,
218
+ /**
219
+ * How much this row cost the tree: items lost from a `partial` file, files left unread by an
220
+ * exhausted budget, 0 on the kinds that lose nothing countable.
221
+ *
222
+ * NULL means content was lost here and NO count describes it. A salvage reaches that state
223
+ * honestly: a shard whose `requirements` is an object rather than a list has requirements that
224
+ * are structurally unreadable, so there is nothing to count, and answering `0` would report the
225
+ * rebuilt group as a complete one that simply declares nothing. An unknown loss and no loss are
226
+ * different facts, and only a distinct value states the first.
227
+ */
228
+ dropped: v.optional(v.nullable(v.number()), 0),
229
+ });
230
+ /**
231
+ * How the PRESENCE ANCHOR (`spec/service.json`) resolved. Four states rather than the boolean
232
+ * `present` beside it, because three of them produce the same empty tree and demand different
233
+ * reactions: a branch with no spec is a normal answer, a provider outage is a retry, and a corrupt
234
+ * anchor is a repo somebody has to fix. Collapsing them is how "this service has no requirements"
235
+ * comes to be reported during every VCS incident.
236
+ */
237
+ export const specAnchorStateSchema = v.picklist(['present', 'absent', 'read_failed', 'unparsed']);
238
+ /** What the reader could and could not account for on this pass. */
239
+ export const specReadDiagnosticsSchema = v.object({
240
+ anchor: specAnchorStateSchema,
241
+ /** Every file the pass could not fully account for. Empty on a clean read. */
242
+ issues: v.array(specReadIssueSchema),
243
+ });
170
244
  /**
171
245
  * The service-spec view served to the SPA: the reassembled prescriptive spec tree read
172
246
  * from the service repo's default branch, plus its rendered Gherkin feature files.
@@ -176,12 +250,24 @@ export const specFeatureFileSchema = v.object({
176
250
  export const serviceSpecViewSchema = v.object({
177
251
  /** Whether a spec exists on the service repo's default branch (a `spec/service.json`). */
178
252
  present: v.boolean(),
179
- /** The reassembled spec tree, or null when none is present. */
180
- spec: v.nullable(specDocSchema),
253
+ /**
254
+ * The reassembled spec tree, or null when none is present.
255
+ *
256
+ * {@link readSpecDocSchema}, not the strict authoring schema: this is what a READER got back
257
+ * out of a repository, and an anchor that names no service is a state a repository can be in.
258
+ */
259
+ spec: v.nullable(readSpecDocSchema),
181
260
  /** The rendered Gherkin feature files (empty when none present). The producer always
182
261
  * sends this field (`[]` when there are none), and the SPA dereferences it unguarded, so
183
262
  * it is required — not optional — to keep the wire shape and its sole consumer in lockstep. */
184
263
  features: v.array(specFeatureFileSchema),
264
+ /**
265
+ * What the READ itself could account for, as distinct from what the spec says. Optional
266
+ * because absent means "this producer diagnosed nothing", which is a different fact from a
267
+ * clean pass and is the honest answer for the callers that assemble a view by hand (a memo, a
268
+ * test fixture). `readServiceSpec` always sets it.
269
+ */
270
+ diagnostics: v.optional(specReadDiagnosticsSchema),
185
271
  });
186
272
  /** The canonical "no spec" view — GitHub not connected, or no spec on the default branch. */
187
273
  export const EMPTY_SERVICE_SPEC_VIEW = { present: false, spec: null, features: [] };
package/dist/spec.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"spec.js","sourceRoot":"","sources":["../src/spec.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B,8EAA8E;AAC9E,wEAAwE;AACxE,EAAE;AACF,8EAA8E;AAC9E,kFAAkF;AAClF,gFAAgF;AAChF,yDAAyD;AACzD,EAAE;AACF,gFAAgF;AAChF,mFAAmF;AACnF,gFAAgF;AAChF,kFAAkF;AAClF,+EAA+E;AAC/E,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AAK,CAAC,IAAI,CAAC,EAAE,EAAE,mBAAmB,CAAC,CAAA;gBACnC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;oBACzB,KAAK,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;gBAC7E,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACzB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cat-factory/contracts",
3
- "version": "0.279.0",
3
+ "version": "0.280.0",
4
4
  "description": "Valibot wire contract shared between the Agent Architecture Board frontend and backend.",
5
5
  "repository": {
6
6
  "type": "git",