@cat-factory/contracts 0.275.0 → 0.276.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 +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/public-api.d.ts +137 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +74 -0
- package/dist/public-api.js.map +1 -1
- package/dist/public-board.d.ts +276 -0
- package/dist/public-board.d.ts.map +1 -0
- package/dist/public-board.js +215 -0
- package/dist/public-board.js.map +1 -0
- package/dist/public-evidence.d.ts +30 -3
- package/dist/public-evidence.d.ts.map +1 -1
- package/dist/public-evidence.js +27 -3
- package/dist/public-evidence.js.map +1 -1
- package/dist/requests.d.ts +19 -2
- package/dist/requests.d.ts.map +1 -1
- package/dist/requests.js +18 -1
- package/dist/requests.js.map +1 -1
- package/dist/routes/board.d.ts +6 -2
- package/dist/routes/board.d.ts.map +1 -1
- package/dist/routes/index.d.ts +1 -0
- package/dist/routes/index.d.ts.map +1 -1
- package/dist/routes/index.js +1 -0
- package/dist/routes/index.js.map +1 -1
- package/dist/routes/public-api.d.ts +18 -0
- package/dist/routes/public-api.d.ts.map +1 -1
- package/dist/routes/public-board.d.ts +369 -0
- package/dist/routes/public-board.d.ts.map +1 -0
- package/dist/routes/public-board.js +112 -0
- package/dist/routes/public-board.js.map +1 -0
- package/dist/routes/public-evidence.d.ts +1 -0
- package/dist/routes/public-evidence.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/gate-parking.d.ts +0 -30
- package/dist/gate-parking.d.ts.map +0 -1
- package/dist/gate-parking.js +0 -58
- package/dist/gate-parking.js.map +0 -1
|
@@ -0,0 +1,369 @@
|
|
|
1
|
+
import { ContractNoBody } from '@toad-contracts/valibot';
|
|
2
|
+
/**
|
|
3
|
+
* List the repositories this workspace can back a service with.
|
|
4
|
+
*
|
|
5
|
+
* The discovery half of service creation, and what makes it usable with no browser: the create
|
|
6
|
+
* takes a provider repo id, and nothing on this surface served one. `read` scope, like every other
|
|
7
|
+
* discovery endpoint here (`/pipelines`, `/task-types`): it names what the workspace has already
|
|
8
|
+
* connected, and an integration must be able to see what it is about to ask for without holding the
|
|
9
|
+
* credential that could change it.
|
|
10
|
+
*/
|
|
11
|
+
export declare const listPublicReposContract: {
|
|
12
|
+
readonly method: "get";
|
|
13
|
+
readonly pathResolver: () => string;
|
|
14
|
+
readonly responsesByStatusCode: {
|
|
15
|
+
readonly '4xx': import("valibot").ObjectSchema<{
|
|
16
|
+
readonly error: import("valibot").ObjectSchema<{
|
|
17
|
+
readonly code: import("valibot").StringSchema<undefined>;
|
|
18
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
19
|
+
readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
|
|
20
|
+
readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
|
|
21
|
+
readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
22
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
23
|
+
}, undefined>, undefined>, undefined>;
|
|
24
|
+
}, undefined>;
|
|
25
|
+
}, undefined>;
|
|
26
|
+
readonly '5xx': import("valibot").ObjectSchema<{
|
|
27
|
+
readonly error: import("valibot").ObjectSchema<{
|
|
28
|
+
readonly code: import("valibot").StringSchema<undefined>;
|
|
29
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
30
|
+
readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
|
|
31
|
+
readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
|
|
32
|
+
readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
33
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
34
|
+
}, undefined>, undefined>, undefined>;
|
|
35
|
+
}, undefined>;
|
|
36
|
+
}, undefined>;
|
|
37
|
+
readonly 200: import("valibot").ObjectSchema<{
|
|
38
|
+
readonly repos: import("valibot").ArraySchema<import("valibot").ObjectSchema<{
|
|
39
|
+
readonly repoId: import("valibot").NumberSchema<undefined>;
|
|
40
|
+
readonly provider: import("valibot").StringSchema<undefined>;
|
|
41
|
+
readonly owner: import("valibot").StringSchema<undefined>;
|
|
42
|
+
readonly name: import("valibot").StringSchema<undefined>;
|
|
43
|
+
readonly defaultBranch: import("valibot").StringSchema<undefined>;
|
|
44
|
+
readonly private: import("valibot").BooleanSchema<undefined>;
|
|
45
|
+
readonly monorepo: import("valibot").BooleanSchema<undefined>;
|
|
46
|
+
readonly serviceId: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
47
|
+
readonly linkedElsewhere: import("valibot").BooleanSchema<undefined>;
|
|
48
|
+
}, undefined>, undefined>;
|
|
49
|
+
}, undefined>;
|
|
50
|
+
};
|
|
51
|
+
} & {
|
|
52
|
+
readonly minScope: "read";
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Create a board service, optionally backed by a repository: the last act of board setup that had
|
|
56
|
+
* no headless counterpart, so a deployment that could provision its own keys and enrol its own
|
|
57
|
+
* webhook still had to open the app once to have anywhere to file work.
|
|
58
|
+
*
|
|
59
|
+
* Delegates to the SAME service methods the app's own "import a repository" button and drag-drop
|
|
60
|
+
* call, so every guard holds identically: a whole-repo repository that already backs a service in
|
|
61
|
+
* this account is MOUNTED here rather than duplicated, a monorepo must name its subdirectory, and a
|
|
62
|
+
* subdirectory another service already claims is refused.
|
|
63
|
+
*/
|
|
64
|
+
export declare const createPublicServiceContract: {
|
|
65
|
+
readonly method: "post";
|
|
66
|
+
readonly pathResolver: () => string;
|
|
67
|
+
readonly requestBodySchema: import("valibot").ObjectSchema<{
|
|
68
|
+
readonly title: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").TrimAction, import("valibot").MinLengthAction<string, 1, undefined>, import("valibot").MaxLengthAction<string, 200, undefined>]>, undefined>;
|
|
69
|
+
readonly description: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").TrimAction, import("valibot").MaxLengthAction<string, 2000, undefined>]>, undefined>;
|
|
70
|
+
readonly type: import("valibot").OptionalSchema<import("valibot").PicklistSchema<["service", "frontend", "library", "document"], undefined>, undefined>;
|
|
71
|
+
readonly repo: import("valibot").OptionalSchema<import("valibot").ObjectSchema<{
|
|
72
|
+
readonly repoId: import("valibot").NumberSchema<undefined>;
|
|
73
|
+
readonly directory: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").TrimAction, import("valibot").MaxLengthAction<string, 400, undefined>]>, undefined>;
|
|
74
|
+
readonly monorepo: import("valibot").OptionalSchema<import("valibot").BooleanSchema<undefined>, undefined>;
|
|
75
|
+
}, undefined>, undefined>;
|
|
76
|
+
}, undefined>;
|
|
77
|
+
readonly responsesByStatusCode: {
|
|
78
|
+
readonly '4xx': import("valibot").ObjectSchema<{
|
|
79
|
+
readonly error: import("valibot").ObjectSchema<{
|
|
80
|
+
readonly code: import("valibot").StringSchema<undefined>;
|
|
81
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
82
|
+
readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
|
|
83
|
+
readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
|
|
84
|
+
readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
85
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
86
|
+
}, undefined>, undefined>, undefined>;
|
|
87
|
+
}, undefined>;
|
|
88
|
+
}, undefined>;
|
|
89
|
+
readonly '5xx': import("valibot").ObjectSchema<{
|
|
90
|
+
readonly error: import("valibot").ObjectSchema<{
|
|
91
|
+
readonly code: import("valibot").StringSchema<undefined>;
|
|
92
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
93
|
+
readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
|
|
94
|
+
readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
|
|
95
|
+
readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
96
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
97
|
+
}, undefined>, undefined>, undefined>;
|
|
98
|
+
}, undefined>;
|
|
99
|
+
}, undefined>;
|
|
100
|
+
readonly 201: import("valibot").ObjectSchema<{
|
|
101
|
+
readonly serviceId: import("valibot").StringSchema<undefined>;
|
|
102
|
+
readonly title: import("valibot").StringSchema<undefined>;
|
|
103
|
+
readonly description: import("valibot").StringSchema<undefined>;
|
|
104
|
+
readonly type: import("valibot").PicklistSchema<["frontend", "service", "library", "document", "api", "database", "queue", "integration", "external", "environment"], undefined>;
|
|
105
|
+
readonly status: import("valibot").PicklistSchema<["planned", "ready", "in_progress", "blocked", "pr_ready", "done"], undefined>;
|
|
106
|
+
}, undefined>;
|
|
107
|
+
};
|
|
108
|
+
} & {
|
|
109
|
+
readonly minScope: "admin";
|
|
110
|
+
};
|
|
111
|
+
/**
|
|
112
|
+
* Declare that this task must wait for another one. Idempotent: an edge that already exists is
|
|
113
|
+
* returned as-is rather than toggled off, which is what separates this from the app's own toggle
|
|
114
|
+
* and what lets a provisioning integration re-run without inverting the graph it declared last time.
|
|
115
|
+
*/
|
|
116
|
+
export declare const addPublicTaskDependencyContract: {
|
|
117
|
+
readonly method: "post";
|
|
118
|
+
readonly requestPathParamsSchema: import("valibot").ObjectSchema<{
|
|
119
|
+
taskId: import("valibot").StringSchema<undefined>;
|
|
120
|
+
}, undefined> & import("@toad-contracts/core").StandardObjectKeysV1<unknown, unknown>;
|
|
121
|
+
readonly pathResolver: ({ taskId }: {
|
|
122
|
+
taskId: string;
|
|
123
|
+
}) => string;
|
|
124
|
+
readonly requestBodySchema: import("valibot").ObjectSchema<{
|
|
125
|
+
readonly dependsOnTaskId: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").TrimAction, import("valibot").MinLengthAction<string, 1, undefined>, import("valibot").MaxLengthAction<string, 120, undefined>]>;
|
|
126
|
+
}, undefined>;
|
|
127
|
+
readonly responsesByStatusCode: {
|
|
128
|
+
readonly '4xx': import("valibot").ObjectSchema<{
|
|
129
|
+
readonly error: import("valibot").ObjectSchema<{
|
|
130
|
+
readonly code: import("valibot").StringSchema<undefined>;
|
|
131
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
132
|
+
readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
|
|
133
|
+
readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
|
|
134
|
+
readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
135
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
136
|
+
}, undefined>, undefined>, undefined>;
|
|
137
|
+
}, undefined>;
|
|
138
|
+
}, undefined>;
|
|
139
|
+
readonly '5xx': import("valibot").ObjectSchema<{
|
|
140
|
+
readonly error: import("valibot").ObjectSchema<{
|
|
141
|
+
readonly code: import("valibot").StringSchema<undefined>;
|
|
142
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
143
|
+
readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
|
|
144
|
+
readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
|
|
145
|
+
readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
146
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
147
|
+
}, undefined>, undefined>, undefined>;
|
|
148
|
+
}, undefined>;
|
|
149
|
+
}, undefined>;
|
|
150
|
+
readonly 200: import("valibot").ObjectSchema<{
|
|
151
|
+
readonly taskId: import("valibot").StringSchema<undefined>;
|
|
152
|
+
readonly serviceId: import("valibot").StringSchema<undefined>;
|
|
153
|
+
readonly title: import("valibot").StringSchema<undefined>;
|
|
154
|
+
readonly description: import("valibot").StringSchema<undefined>;
|
|
155
|
+
readonly taskType: import("valibot").UnionSchema<[import("valibot").PicklistSchema<readonly ["feature", "bug", "document", "spike", "review", "ralph", "recurring"], undefined>, import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").RegexAction<string, "Consumer id must be <namespace>:<name> (lowercase a-z0-9, dash-separated)">]>], undefined>;
|
|
156
|
+
readonly status: import("valibot").PicklistSchema<["planned", "ready", "in_progress", "blocked", "pr_ready", "done"], undefined>;
|
|
157
|
+
readonly progress: import("valibot").NumberSchema<undefined>;
|
|
158
|
+
readonly runId: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
159
|
+
readonly pullRequestUrl: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
160
|
+
readonly dependsOn: import("valibot").ArraySchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
161
|
+
readonly autoStartDependents: import("valibot").BooleanSchema<undefined>;
|
|
162
|
+
}, undefined>;
|
|
163
|
+
};
|
|
164
|
+
} & {
|
|
165
|
+
readonly minScope: "write";
|
|
166
|
+
};
|
|
167
|
+
/** Drop a dependency edge. Idempotent, for the same reason the add is. */
|
|
168
|
+
export declare const removePublicTaskDependencyContract: {
|
|
169
|
+
readonly method: "post";
|
|
170
|
+
readonly requestPathParamsSchema: import("valibot").ObjectSchema<{
|
|
171
|
+
taskId: import("valibot").StringSchema<undefined>;
|
|
172
|
+
}, undefined> & import("@toad-contracts/core").StandardObjectKeysV1<unknown, unknown>;
|
|
173
|
+
readonly pathResolver: ({ taskId }: {
|
|
174
|
+
taskId: string;
|
|
175
|
+
}) => string;
|
|
176
|
+
readonly requestBodySchema: import("valibot").ObjectSchema<{
|
|
177
|
+
readonly dependsOnTaskId: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").TrimAction, import("valibot").MinLengthAction<string, 1, undefined>, import("valibot").MaxLengthAction<string, 120, undefined>]>;
|
|
178
|
+
}, undefined>;
|
|
179
|
+
readonly responsesByStatusCode: {
|
|
180
|
+
readonly '4xx': import("valibot").ObjectSchema<{
|
|
181
|
+
readonly error: import("valibot").ObjectSchema<{
|
|
182
|
+
readonly code: import("valibot").StringSchema<undefined>;
|
|
183
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
184
|
+
readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
|
|
185
|
+
readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
|
|
186
|
+
readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
187
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
188
|
+
}, undefined>, undefined>, undefined>;
|
|
189
|
+
}, undefined>;
|
|
190
|
+
}, undefined>;
|
|
191
|
+
readonly '5xx': import("valibot").ObjectSchema<{
|
|
192
|
+
readonly error: import("valibot").ObjectSchema<{
|
|
193
|
+
readonly code: import("valibot").StringSchema<undefined>;
|
|
194
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
195
|
+
readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
|
|
196
|
+
readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
|
|
197
|
+
readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
198
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
199
|
+
}, undefined>, undefined>, undefined>;
|
|
200
|
+
}, undefined>;
|
|
201
|
+
}, undefined>;
|
|
202
|
+
readonly 200: import("valibot").ObjectSchema<{
|
|
203
|
+
readonly taskId: import("valibot").StringSchema<undefined>;
|
|
204
|
+
readonly serviceId: import("valibot").StringSchema<undefined>;
|
|
205
|
+
readonly title: import("valibot").StringSchema<undefined>;
|
|
206
|
+
readonly description: import("valibot").StringSchema<undefined>;
|
|
207
|
+
readonly taskType: import("valibot").UnionSchema<[import("valibot").PicklistSchema<readonly ["feature", "bug", "document", "spike", "review", "ralph", "recurring"], undefined>, import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").RegexAction<string, "Consumer id must be <namespace>:<name> (lowercase a-z0-9, dash-separated)">]>], undefined>;
|
|
208
|
+
readonly status: import("valibot").PicklistSchema<["planned", "ready", "in_progress", "blocked", "pr_ready", "done"], undefined>;
|
|
209
|
+
readonly progress: import("valibot").NumberSchema<undefined>;
|
|
210
|
+
readonly runId: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
211
|
+
readonly pullRequestUrl: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
212
|
+
readonly dependsOn: import("valibot").ArraySchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
213
|
+
readonly autoStartDependents: import("valibot").BooleanSchema<undefined>;
|
|
214
|
+
}, undefined>;
|
|
215
|
+
};
|
|
216
|
+
} & {
|
|
217
|
+
readonly minScope: "write";
|
|
218
|
+
};
|
|
219
|
+
/** The requirements documents attached to a task, in the order the agents read them. */
|
|
220
|
+
export declare const listPublicTaskDocumentsContract: {
|
|
221
|
+
readonly method: "get";
|
|
222
|
+
readonly requestPathParamsSchema: import("valibot").ObjectSchema<{
|
|
223
|
+
taskId: import("valibot").StringSchema<undefined>;
|
|
224
|
+
}, undefined> & import("@toad-contracts/core").StandardObjectKeysV1<unknown, unknown>;
|
|
225
|
+
readonly pathResolver: ({ taskId }: {
|
|
226
|
+
taskId: string;
|
|
227
|
+
}) => string;
|
|
228
|
+
readonly responsesByStatusCode: {
|
|
229
|
+
readonly '4xx': import("valibot").ObjectSchema<{
|
|
230
|
+
readonly error: import("valibot").ObjectSchema<{
|
|
231
|
+
readonly code: import("valibot").StringSchema<undefined>;
|
|
232
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
233
|
+
readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
|
|
234
|
+
readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
|
|
235
|
+
readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
236
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
237
|
+
}, undefined>, undefined>, undefined>;
|
|
238
|
+
}, undefined>;
|
|
239
|
+
}, undefined>;
|
|
240
|
+
readonly '5xx': import("valibot").ObjectSchema<{
|
|
241
|
+
readonly error: import("valibot").ObjectSchema<{
|
|
242
|
+
readonly code: import("valibot").StringSchema<undefined>;
|
|
243
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
244
|
+
readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
|
|
245
|
+
readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
|
|
246
|
+
readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
247
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
248
|
+
}, undefined>, undefined>, undefined>;
|
|
249
|
+
}, undefined>;
|
|
250
|
+
}, undefined>;
|
|
251
|
+
readonly 200: import("valibot").ObjectSchema<{
|
|
252
|
+
readonly documents: import("valibot").ArraySchema<import("valibot").ObjectSchema<{
|
|
253
|
+
readonly source: import("valibot").PicklistSchema<["confluence", "notion", "github", "figma", "zeplin", "linear", "upload"], undefined>;
|
|
254
|
+
readonly externalId: import("valibot").StringSchema<undefined>;
|
|
255
|
+
readonly title: import("valibot").StringSchema<undefined>;
|
|
256
|
+
readonly url: import("valibot").StringSchema<undefined>;
|
|
257
|
+
readonly excerpt: import("valibot").StringSchema<undefined>;
|
|
258
|
+
}, undefined>, undefined>;
|
|
259
|
+
}, undefined>;
|
|
260
|
+
};
|
|
261
|
+
} & {
|
|
262
|
+
readonly minScope: "read";
|
|
263
|
+
};
|
|
264
|
+
/**
|
|
265
|
+
* Attach a requirements document to an EXISTING task: the same two forms creation takes, at the
|
|
266
|
+
* moment a spec actually arrives.
|
|
267
|
+
*/
|
|
268
|
+
export declare const attachPublicTaskDocumentContract: {
|
|
269
|
+
readonly method: "post";
|
|
270
|
+
readonly requestPathParamsSchema: import("valibot").ObjectSchema<{
|
|
271
|
+
taskId: import("valibot").StringSchema<undefined>;
|
|
272
|
+
}, undefined> & import("@toad-contracts/core").StandardObjectKeysV1<unknown, unknown>;
|
|
273
|
+
readonly pathResolver: ({ taskId }: {
|
|
274
|
+
taskId: string;
|
|
275
|
+
}) => string;
|
|
276
|
+
readonly requestBodySchema: import("valibot").ObjectSchema<{
|
|
277
|
+
readonly document: import("valibot").VariantSchema<"kind", [import("valibot").ObjectSchema<{
|
|
278
|
+
readonly kind: import("valibot").LiteralSchema<"source", undefined>;
|
|
279
|
+
readonly source: import("valibot").PicklistSchema<["confluence", "notion", "github", "figma", "zeplin", "linear"], undefined>;
|
|
280
|
+
readonly ref: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").TrimAction, import("valibot").MinLengthAction<string, 1, undefined>, import("valibot").MaxLengthAction<string, 500, undefined>]>;
|
|
281
|
+
}, undefined>, import("valibot").ObjectSchema<{
|
|
282
|
+
readonly kind: import("valibot").LiteralSchema<"upload", undefined>;
|
|
283
|
+
readonly title: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").TrimAction, import("valibot").MinLengthAction<string, 1, undefined>, import("valibot").MaxLengthAction<string, 200, undefined>]>;
|
|
284
|
+
readonly content: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").TrimAction, import("valibot").MinLengthAction<string, 1, undefined>, import("valibot").MaxLengthAction<string, 100000, undefined>]>;
|
|
285
|
+
}, undefined>], undefined>;
|
|
286
|
+
}, undefined>;
|
|
287
|
+
readonly responsesByStatusCode: {
|
|
288
|
+
readonly '4xx': import("valibot").ObjectSchema<{
|
|
289
|
+
readonly error: import("valibot").ObjectSchema<{
|
|
290
|
+
readonly code: import("valibot").StringSchema<undefined>;
|
|
291
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
292
|
+
readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
|
|
293
|
+
readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
|
|
294
|
+
readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
295
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
296
|
+
}, undefined>, undefined>, undefined>;
|
|
297
|
+
}, undefined>;
|
|
298
|
+
}, undefined>;
|
|
299
|
+
readonly '5xx': import("valibot").ObjectSchema<{
|
|
300
|
+
readonly error: import("valibot").ObjectSchema<{
|
|
301
|
+
readonly code: import("valibot").StringSchema<undefined>;
|
|
302
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
303
|
+
readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
|
|
304
|
+
readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
|
|
305
|
+
readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
306
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
307
|
+
}, undefined>, undefined>, undefined>;
|
|
308
|
+
}, undefined>;
|
|
309
|
+
}, undefined>;
|
|
310
|
+
readonly 201: import("valibot").ObjectSchema<{
|
|
311
|
+
readonly source: import("valibot").PicklistSchema<["confluence", "notion", "github", "figma", "zeplin", "linear", "upload"], undefined>;
|
|
312
|
+
readonly externalId: import("valibot").StringSchema<undefined>;
|
|
313
|
+
readonly title: import("valibot").StringSchema<undefined>;
|
|
314
|
+
readonly url: import("valibot").StringSchema<undefined>;
|
|
315
|
+
readonly excerpt: import("valibot").StringSchema<undefined>;
|
|
316
|
+
}, undefined>;
|
|
317
|
+
};
|
|
318
|
+
} & {
|
|
319
|
+
readonly minScope: "write";
|
|
320
|
+
};
|
|
321
|
+
/**
|
|
322
|
+
* Detach a document from a task, naming it by the `(source, externalId)` pair the list serves.
|
|
323
|
+
*
|
|
324
|
+
* A POST rather than a `DELETE .../documents/{id}`: a document's identity is two values, one of
|
|
325
|
+
* which is a free-form external id that is a path for some sources (`docs/adr/0001.md`), so
|
|
326
|
+
* addressing it in a path segment would need escaping rules a caller has to get right to reach its
|
|
327
|
+
* own document.
|
|
328
|
+
*/
|
|
329
|
+
export declare const detachPublicTaskDocumentContract: {
|
|
330
|
+
readonly method: "post";
|
|
331
|
+
readonly requestPathParamsSchema: import("valibot").ObjectSchema<{
|
|
332
|
+
taskId: import("valibot").StringSchema<undefined>;
|
|
333
|
+
}, undefined> & import("@toad-contracts/core").StandardObjectKeysV1<unknown, unknown>;
|
|
334
|
+
readonly pathResolver: ({ taskId }: {
|
|
335
|
+
taskId: string;
|
|
336
|
+
}) => string;
|
|
337
|
+
readonly requestBodySchema: import("valibot").ObjectSchema<{
|
|
338
|
+
readonly source: import("valibot").PicklistSchema<["confluence", "notion", "github", "figma", "zeplin", "linear", "upload"], undefined>;
|
|
339
|
+
readonly externalId: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").TrimAction, import("valibot").MinLengthAction<string, 1, undefined>, import("valibot").MaxLengthAction<string, 500, undefined>]>;
|
|
340
|
+
}, undefined>;
|
|
341
|
+
readonly responsesByStatusCode: {
|
|
342
|
+
readonly '4xx': import("valibot").ObjectSchema<{
|
|
343
|
+
readonly error: import("valibot").ObjectSchema<{
|
|
344
|
+
readonly code: import("valibot").StringSchema<undefined>;
|
|
345
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
346
|
+
readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
|
|
347
|
+
readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
|
|
348
|
+
readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
349
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
350
|
+
}, undefined>, undefined>, undefined>;
|
|
351
|
+
}, undefined>;
|
|
352
|
+
}, undefined>;
|
|
353
|
+
readonly '5xx': import("valibot").ObjectSchema<{
|
|
354
|
+
readonly error: import("valibot").ObjectSchema<{
|
|
355
|
+
readonly code: import("valibot").StringSchema<undefined>;
|
|
356
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
357
|
+
readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
|
|
358
|
+
readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
|
|
359
|
+
readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
360
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
361
|
+
}, undefined>, undefined>, undefined>;
|
|
362
|
+
}, undefined>;
|
|
363
|
+
}, undefined>;
|
|
364
|
+
readonly 204: typeof ContractNoBody;
|
|
365
|
+
};
|
|
366
|
+
} & {
|
|
367
|
+
readonly minScope: "write";
|
|
368
|
+
};
|
|
369
|
+
//# sourceMappingURL=public-board.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public-board.d.ts","sourceRoot":"","sources":["../../src/routes/public-board.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAqB,MAAM,yBAAyB,CAAA;AAsC3E;;;;;;;;GAQG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOnC,CAAA;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQvC,CAAA;AAID;;;;GAIG;AACH,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAS3C,CAAA;AAED,0EAA0E;AAC1E,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAS9C,CAAA;AAID,wFAAwF;AACxF,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQ3C,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAS5C,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAS5C,CAAA"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { ContractNoBody, defineApiContract } from '@toad-contracts/valibot';
|
|
2
|
+
import { attachPublicTaskDocumentSchema, createPublicServiceSchema, detachPublicTaskDocumentSchema, publicAttachedDocumentListSchema, publicAttachedDocumentSchema, publicRepoListSchema, publicTaskDependencySchema, } from '../public-board.js';
|
|
3
|
+
import { publicServiceSchema, publicTaskSchema } from '../public-api.js';
|
|
4
|
+
import { errorResponses, singleStringParam, withMinScope } from './_shared.js';
|
|
5
|
+
// ---------------------------------------------------------------------------
|
|
6
|
+
// Board PROVISIONING and the two task relationships that outlive a create call, on `/api/v1`.
|
|
7
|
+
//
|
|
8
|
+
// Their own file rather than more of `public-api.ts`, which had grown to carry the whole surface:
|
|
9
|
+
// these are one cohesive addition (what a headless deployment needs to SET UP and RELATE the board
|
|
10
|
+
// it drives, as opposed to what it needs to run one task) and they share a scope argument that is
|
|
11
|
+
// worth stating once.
|
|
12
|
+
//
|
|
13
|
+
// **Scope.** Service creation is `admin`; the task-level writes are `write`.
|
|
14
|
+
//
|
|
15
|
+
// The split follows what each act CHANGES rather than how destructive it feels. Creating a service
|
|
16
|
+
// is board STRUCTURE, which is what `admin` already covers on this surface for keys and the
|
|
17
|
+
// outbound webhook, and it is the rung a provisioning integration holds anyway. Attaching a
|
|
18
|
+
// document, declaring an ordering: those edit ONE task the caller can already create, edit and
|
|
19
|
+
// start with a `write` key, so putting them a rung higher would mean handing an integration that
|
|
20
|
+
// files tickets a credential that can also merge pull requests and delete tasks.
|
|
21
|
+
//
|
|
22
|
+
// Where the two readings were close, the REVERSIBLE one wins (ADR 0034): a scope can be relaxed
|
|
23
|
+
// later and never tightened, because narrowing what a live key may do is a break however small.
|
|
24
|
+
// ---------------------------------------------------------------------------
|
|
25
|
+
const taskIdParams = singleStringParam('taskId');
|
|
26
|
+
// ---- provisioning: the repositories, and the services they back --------------
|
|
27
|
+
/**
|
|
28
|
+
* List the repositories this workspace can back a service with.
|
|
29
|
+
*
|
|
30
|
+
* The discovery half of service creation, and what makes it usable with no browser: the create
|
|
31
|
+
* takes a provider repo id, and nothing on this surface served one. `read` scope, like every other
|
|
32
|
+
* discovery endpoint here (`/pipelines`, `/task-types`): it names what the workspace has already
|
|
33
|
+
* connected, and an integration must be able to see what it is about to ask for without holding the
|
|
34
|
+
* credential that could change it.
|
|
35
|
+
*/
|
|
36
|
+
export const listPublicReposContract = withMinScope('read', defineApiContract({
|
|
37
|
+
method: 'get',
|
|
38
|
+
pathResolver: () => '/api/v1/repos',
|
|
39
|
+
responsesByStatusCode: { 200: publicRepoListSchema, ...errorResponses },
|
|
40
|
+
}));
|
|
41
|
+
/**
|
|
42
|
+
* Create a board service, optionally backed by a repository: the last act of board setup that had
|
|
43
|
+
* no headless counterpart, so a deployment that could provision its own keys and enrol its own
|
|
44
|
+
* webhook still had to open the app once to have anywhere to file work.
|
|
45
|
+
*
|
|
46
|
+
* Delegates to the SAME service methods the app's own "import a repository" button and drag-drop
|
|
47
|
+
* call, so every guard holds identically: a whole-repo repository that already backs a service in
|
|
48
|
+
* this account is MOUNTED here rather than duplicated, a monorepo must name its subdirectory, and a
|
|
49
|
+
* subdirectory another service already claims is refused.
|
|
50
|
+
*/
|
|
51
|
+
export const createPublicServiceContract = withMinScope('admin', defineApiContract({
|
|
52
|
+
method: 'post',
|
|
53
|
+
pathResolver: () => '/api/v1/services',
|
|
54
|
+
requestBodySchema: createPublicServiceSchema,
|
|
55
|
+
responsesByStatusCode: { 201: publicServiceSchema, ...errorResponses },
|
|
56
|
+
}));
|
|
57
|
+
// ---- task ordering ----------------------------------------------------------
|
|
58
|
+
/**
|
|
59
|
+
* Declare that this task must wait for another one. Idempotent: an edge that already exists is
|
|
60
|
+
* returned as-is rather than toggled off, which is what separates this from the app's own toggle
|
|
61
|
+
* and what lets a provisioning integration re-run without inverting the graph it declared last time.
|
|
62
|
+
*/
|
|
63
|
+
export const addPublicTaskDependencyContract = withMinScope('write', defineApiContract({
|
|
64
|
+
method: 'post',
|
|
65
|
+
requestPathParamsSchema: taskIdParams,
|
|
66
|
+
pathResolver: ({ taskId }) => `/api/v1/tasks/${taskId}/dependencies`,
|
|
67
|
+
requestBodySchema: publicTaskDependencySchema,
|
|
68
|
+
responsesByStatusCode: { 200: publicTaskSchema, ...errorResponses },
|
|
69
|
+
}));
|
|
70
|
+
/** Drop a dependency edge. Idempotent, for the same reason the add is. */
|
|
71
|
+
export const removePublicTaskDependencyContract = withMinScope('write', defineApiContract({
|
|
72
|
+
method: 'post',
|
|
73
|
+
requestPathParamsSchema: taskIdParams,
|
|
74
|
+
pathResolver: ({ taskId }) => `/api/v1/tasks/${taskId}/dependencies/remove`,
|
|
75
|
+
requestBodySchema: publicTaskDependencySchema,
|
|
76
|
+
responsesByStatusCode: { 200: publicTaskSchema, ...errorResponses },
|
|
77
|
+
}));
|
|
78
|
+
// ---- a task's documents, after it exists -------------------------------------
|
|
79
|
+
/** The requirements documents attached to a task, in the order the agents read them. */
|
|
80
|
+
export const listPublicTaskDocumentsContract = withMinScope('read', defineApiContract({
|
|
81
|
+
method: 'get',
|
|
82
|
+
requestPathParamsSchema: taskIdParams,
|
|
83
|
+
pathResolver: ({ taskId }) => `/api/v1/tasks/${taskId}/documents`,
|
|
84
|
+
responsesByStatusCode: { 200: publicAttachedDocumentListSchema, ...errorResponses },
|
|
85
|
+
}));
|
|
86
|
+
/**
|
|
87
|
+
* Attach a requirements document to an EXISTING task: the same two forms creation takes, at the
|
|
88
|
+
* moment a spec actually arrives.
|
|
89
|
+
*/
|
|
90
|
+
export const attachPublicTaskDocumentContract = withMinScope('write', defineApiContract({
|
|
91
|
+
method: 'post',
|
|
92
|
+
requestPathParamsSchema: taskIdParams,
|
|
93
|
+
pathResolver: ({ taskId }) => `/api/v1/tasks/${taskId}/documents`,
|
|
94
|
+
requestBodySchema: attachPublicTaskDocumentSchema,
|
|
95
|
+
responsesByStatusCode: { 201: publicAttachedDocumentSchema, ...errorResponses },
|
|
96
|
+
}));
|
|
97
|
+
/**
|
|
98
|
+
* Detach a document from a task, naming it by the `(source, externalId)` pair the list serves.
|
|
99
|
+
*
|
|
100
|
+
* A POST rather than a `DELETE .../documents/{id}`: a document's identity is two values, one of
|
|
101
|
+
* which is a free-form external id that is a path for some sources (`docs/adr/0001.md`), so
|
|
102
|
+
* addressing it in a path segment would need escaping rules a caller has to get right to reach its
|
|
103
|
+
* own document.
|
|
104
|
+
*/
|
|
105
|
+
export const detachPublicTaskDocumentContract = withMinScope('write', defineApiContract({
|
|
106
|
+
method: 'post',
|
|
107
|
+
requestPathParamsSchema: taskIdParams,
|
|
108
|
+
pathResolver: ({ taskId }) => `/api/v1/tasks/${taskId}/documents/detach`,
|
|
109
|
+
requestBodySchema: detachPublicTaskDocumentSchema,
|
|
110
|
+
responsesByStatusCode: { 204: ContractNoBody, ...errorResponses },
|
|
111
|
+
}));
|
|
112
|
+
//# sourceMappingURL=public-board.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public-board.js","sourceRoot":"","sources":["../../src/routes/public-board.ts"],"names":[],"mappings":"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"}
|
|
@@ -458,6 +458,7 @@ export declare const listPublicRunArtifactsContract: {
|
|
|
458
458
|
readonly artifacts: import("valibot").ArraySchema<import("valibot").ObjectSchema<{
|
|
459
459
|
readonly artifactId: import("valibot").StringSchema<undefined>;
|
|
460
460
|
readonly kind: import("valibot").PicklistSchema<["screenshot", "reference"], undefined>;
|
|
461
|
+
readonly scope: import("valibot").PicklistSchema<["run", "task"], undefined>;
|
|
461
462
|
readonly view: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
462
463
|
readonly contentType: import("valibot").StringSchema<undefined>;
|
|
463
464
|
readonly byteSize: import("valibot").NumberSchema<undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public-evidence.d.ts","sourceRoot":"","sources":["../../src/routes/public-evidence.ts"],"names":[],"mappings":"AAyBA;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQtC,CAAA;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQvC,CAAA;AAED,oGAAoG;AACpG,eAAO,MAAM,8BAA8B
|
|
1
|
+
{"version":3,"file":"public-evidence.d.ts","sourceRoot":"","sources":["../../src/routes/public-evidence.ts"],"names":[],"mappings":"AAyBA;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQtC,CAAA;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQvC,CAAA;AAED,oGAAoG;AACpG,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQ1C,CAAA"}
|
package/package.json
CHANGED
package/dist/gate-parking.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Built-in gate kinds whose poll never times out because they are waiting on a HUMAN, so a step
|
|
3
|
-
* carrying one can park the run indefinitely.
|
|
4
|
-
*
|
|
5
|
-
* Membership is equivalent to the gate's `pollExhaustion: 'rearm'` declaration, and
|
|
6
|
-
* `@cat-factory/gates`' `human-wait-parity.test.ts` fails the build if the two ever disagree: a new
|
|
7
|
-
* built-in gate that waits on a human cannot ship without being classified here.
|
|
8
|
-
*
|
|
9
|
-
* Only BUILT-IN gates are covered. A deployment that registers its own unbounded-wait gate is not
|
|
10
|
-
* seen by the static rule (reading a registered gate's `pollExhaustion` means invoking its factory
|
|
11
|
-
* with an engine context, which a request-time admission check has no business doing), so the run
|
|
12
|
-
* is admitted and the park is answered in the app. Stated rather than silently assumed: see
|
|
13
|
-
* ADR 0032.
|
|
14
|
-
*/
|
|
15
|
-
export declare const HUMAN_WAIT_GATE_KINDS: ReadonlySet<string>;
|
|
16
|
-
/**
|
|
17
|
-
* Every gate kind the platform itself ships, human-wait and bounded alike.
|
|
18
|
-
*
|
|
19
|
-
* What it is FOR is the negative: a gate step whose kind is NOT in here was registered by the
|
|
20
|
-
* DEPLOYMENT through the public `GateRegistry` seam, and the note above is why nothing outside
|
|
21
|
-
* `@cat-factory/gates` can then say whether it ever ends on its own. That is a fact worth
|
|
22
|
-
* REPORTING rather than one to silently assume either way — a run sitting on such a gate with an
|
|
23
|
-
* empty public decision list is either mid-probe or waiting on a person forever, and only the
|
|
24
|
-
* deployment that registered it knows which.
|
|
25
|
-
*
|
|
26
|
-
* Pinned by the same drift guard as {@link HUMAN_WAIT_GATE_KINDS}, derived from the built-in
|
|
27
|
-
* registry, so a new built-in cannot ship without landing here.
|
|
28
|
-
*/
|
|
29
|
-
export declare const BUILTIN_GATE_KINDS: ReadonlySet<string>;
|
|
30
|
-
//# sourceMappingURL=gate-parking.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"gate-parking.d.ts","sourceRoot":"","sources":["../src/gate-parking.ts"],"names":[],"mappings":"AAmBA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,qBAAqB,EAAE,WAAW,CAAC,MAAM,CAIpD,CAAA;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,kBAAkB,EAAE,WAAW,CAAC,MAAM,CAMjD,CAAA"}
|
package/dist/gate-parking.js
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
// Which polling-GATE kinds park the run on a human, and are therefore a static park surface a
|
|
2
|
-
// start path can refuse on.
|
|
3
|
-
//
|
|
4
|
-
// A gate is normally the opposite of a park: it probes a provider, escalates to a helper agent on a
|
|
5
|
-
// negative verdict, and settles itself. One gate kind is different. `human-review` declares
|
|
6
|
-
// `pollExhaustion: 'rearm'` with an effectively unbounded attempt budget, which is the engine's way
|
|
7
|
-
// of saying "there is no deadline for a human reviewer": running out of polls is not a verdict, so
|
|
8
|
-
// the step re-arms and the run waits indefinitely for a person on the PR.
|
|
9
|
-
//
|
|
10
|
-
// That makes it a human park in exactly the sense the public API's admission rule cares about, and
|
|
11
|
-
// it is STATIC: the kind sits in the pipeline's step chain at save time, unlike an agent-raised
|
|
12
|
-
// decision or a judge `park` disposition, which only exist once a run is under way.
|
|
13
|
-
//
|
|
14
|
-
// This lives in `contracts` rather than beside either consumer because the two packages that must
|
|
15
|
-
// agree cannot see each other: `@cat-factory/server`'s public-API admission reads it, and
|
|
16
|
-
// `@cat-factory/gates` (which owns the gate definitions and therefore the `pollExhaustion` values)
|
|
17
|
-
// pins it with a drift guard. A shared constant is the only shape in which those two cannot
|
|
18
|
-
// disagree. The same reasoning as `BUILTIN_GATABLE_KINDS` in `agent-gating.ts`.
|
|
19
|
-
/**
|
|
20
|
-
* Built-in gate kinds whose poll never times out because they are waiting on a HUMAN, so a step
|
|
21
|
-
* carrying one can park the run indefinitely.
|
|
22
|
-
*
|
|
23
|
-
* Membership is equivalent to the gate's `pollExhaustion: 'rearm'` declaration, and
|
|
24
|
-
* `@cat-factory/gates`' `human-wait-parity.test.ts` fails the build if the two ever disagree: a new
|
|
25
|
-
* built-in gate that waits on a human cannot ship without being classified here.
|
|
26
|
-
*
|
|
27
|
-
* Only BUILT-IN gates are covered. A deployment that registers its own unbounded-wait gate is not
|
|
28
|
-
* seen by the static rule (reading a registered gate's `pollExhaustion` means invoking its factory
|
|
29
|
-
* with an engine context, which a request-time admission check has no business doing), so the run
|
|
30
|
-
* is admitted and the park is answered in the app. Stated rather than silently assumed: see
|
|
31
|
-
* ADR 0032.
|
|
32
|
-
*/
|
|
33
|
-
export const HUMAN_WAIT_GATE_KINDS = new Set([
|
|
34
|
-
// Waits for a real human code review on the PR. `pollExhaustion: 'rearm'`, an effectively
|
|
35
|
-
// infinite attempt budget, and a notification (not a timeout) as the nudge.
|
|
36
|
-
'human-review',
|
|
37
|
-
]);
|
|
38
|
-
/**
|
|
39
|
-
* Every gate kind the platform itself ships, human-wait and bounded alike.
|
|
40
|
-
*
|
|
41
|
-
* What it is FOR is the negative: a gate step whose kind is NOT in here was registered by the
|
|
42
|
-
* DEPLOYMENT through the public `GateRegistry` seam, and the note above is why nothing outside
|
|
43
|
-
* `@cat-factory/gates` can then say whether it ever ends on its own. That is a fact worth
|
|
44
|
-
* REPORTING rather than one to silently assume either way — a run sitting on such a gate with an
|
|
45
|
-
* empty public decision list is either mid-probe or waiting on a person forever, and only the
|
|
46
|
-
* deployment that registered it knows which.
|
|
47
|
-
*
|
|
48
|
-
* Pinned by the same drift guard as {@link HUMAN_WAIT_GATE_KINDS}, derived from the built-in
|
|
49
|
-
* registry, so a new built-in cannot ship without landing here.
|
|
50
|
-
*/
|
|
51
|
-
export const BUILTIN_GATE_KINDS = new Set([
|
|
52
|
-
'ci',
|
|
53
|
-
'conflicts',
|
|
54
|
-
'post-release-health',
|
|
55
|
-
'human-review',
|
|
56
|
-
'doc-quality',
|
|
57
|
-
]);
|
|
58
|
-
//# sourceMappingURL=gate-parking.js.map
|
package/dist/gate-parking.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"gate-parking.js","sourceRoot":"","sources":["../src/gate-parking.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,4BAA4B;AAC5B,EAAE;AACF,oGAAoG;AACpG,4FAA4F;AAC5F,oGAAoG;AACpG,mGAAmG;AACnG,0EAA0E;AAC1E,EAAE;AACF,mGAAmG;AACnG,gGAAgG;AAChG,oFAAoF;AACpF,EAAE;AACF,kGAAkG;AAClG,0FAA0F;AAC1F,mGAAmG;AACnG,4FAA4F;AAC5F,gFAAgF;AAEhF;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAwB,IAAI,GAAG,CAAS;IACxE,0FAA0F;IAC1F,4EAA4E;IAC5E,cAAc;CACf,CAAC,CAAA;AAEF;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAwB,IAAI,GAAG,CAAS;IACrE,IAAI;IACJ,WAAW;IACX,qBAAqB;IACrB,cAAc;IACd,aAAa;CACd,CAAC,CAAA"}
|