@cat-factory/contracts 0.319.0 → 0.322.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.
Files changed (64) hide show
  1. package/dist/debug-api.d.ts +1 -1
  2. package/dist/debug-api.d.ts.map +1 -1
  3. package/dist/debug-api.js +3 -7
  4. package/dist/debug-api.js.map +1 -1
  5. package/dist/errors.d.ts +1 -1
  6. package/dist/errors.d.ts.map +1 -1
  7. package/dist/errors.js +7 -0
  8. package/dist/errors.js.map +1 -1
  9. package/dist/index.d.ts +2 -0
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +2 -0
  12. package/dist/index.js.map +1 -1
  13. package/dist/kaizen.d.ts +74 -0
  14. package/dist/kaizen.d.ts.map +1 -1
  15. package/dist/kaizen.js +37 -0
  16. package/dist/kaizen.js.map +1 -1
  17. package/dist/public-api.d.ts +31 -0
  18. package/dist/public-api.d.ts.map +1 -1
  19. package/dist/public-api.js +33 -21
  20. package/dist/public-api.js.map +1 -1
  21. package/dist/public-kaizen.d.ts +316 -0
  22. package/dist/public-kaizen.d.ts.map +1 -0
  23. package/dist/public-kaizen.js +218 -0
  24. package/dist/public-kaizen.js.map +1 -0
  25. package/dist/public-paging.d.ts +24 -0
  26. package/dist/public-paging.d.ts.map +1 -0
  27. package/dist/public-paging.js +41 -0
  28. package/dist/public-paging.js.map +1 -0
  29. package/dist/public-provisioning.d.ts +193 -0
  30. package/dist/public-provisioning.d.ts.map +1 -1
  31. package/dist/public-provisioning.js +161 -0
  32. package/dist/public-provisioning.js.map +1 -1
  33. package/dist/routes/index.d.ts +1 -0
  34. package/dist/routes/index.d.ts.map +1 -1
  35. package/dist/routes/index.js +1 -0
  36. package/dist/routes/index.js.map +1 -1
  37. package/dist/routes/kaizen.d.ts +6 -0
  38. package/dist/routes/kaizen.d.ts.map +1 -1
  39. package/dist/routes/public-api.d.ts +4 -0
  40. package/dist/routes/public-api.d.ts.map +1 -1
  41. package/dist/routes/public-board.d.ts +4 -0
  42. package/dist/routes/public-board.d.ts.map +1 -1
  43. package/dist/routes/public-kaizen.d.ts +240 -0
  44. package/dist/routes/public-kaizen.d.ts.map +1 -0
  45. package/dist/routes/public-kaizen.js +64 -0
  46. package/dist/routes/public-kaizen.js.map +1 -0
  47. package/dist/routes/public-provisioning.d.ts +147 -0
  48. package/dist/routes/public-provisioning.d.ts.map +1 -1
  49. package/dist/routes/public-provisioning.js +60 -2
  50. package/dist/routes/public-provisioning.js.map +1 -1
  51. package/dist/routes/sandbox.d.ts +20 -10
  52. package/dist/routes/sandbox.d.ts.map +1 -1
  53. package/dist/routes/sandbox.js +12 -2
  54. package/dist/routes/sandbox.js.map +1 -1
  55. package/dist/routes/tasks.d.ts +1 -1
  56. package/dist/sandbox.d.ts +70 -13
  57. package/dist/sandbox.d.ts.map +1 -1
  58. package/dist/sandbox.js +41 -2
  59. package/dist/sandbox.js.map +1 -1
  60. package/dist/tasks.d.ts +11 -2
  61. package/dist/tasks.d.ts.map +1 -1
  62. package/dist/tasks.js +10 -0
  63. package/dist/tasks.js.map +1 -1
  64. package/package.json +1 -1
@@ -0,0 +1,240 @@
1
+ /**
2
+ * One page of the workspace's Kaizen entries, newest first, with the acknowledgement / status /
3
+ * agent-kind / since filters applied in SQL.
4
+ *
5
+ * The read this surface exists for: an improvement loop enumerates every grading the workspace
6
+ * has produced without naming a run or a task first, which is the one thing it cannot know
7
+ * (finding out is the question it is asking). `?acknowledged=false` is the backlog, and paging
8
+ * is keyset, so a poll loop can never skip an entry because a run finished mid-page.
9
+ */
10
+ export declare const listPublicKaizenEntriesContract: {
11
+ readonly method: "get";
12
+ readonly requestQuerySchema: import("valibot").ObjectSchema<{
13
+ readonly limit: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").RegexAction<string, "Must be a whole number">, import("valibot").TransformAction<any, number>, import("valibot").NumberSchema<undefined>, import("valibot").IntegerAction<number, undefined>, import("valibot").MinValueAction<number, 1, undefined>, import("valibot").MaxValueAction<number, 100, undefined>]>, undefined>;
14
+ readonly cursor: 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>;
15
+ readonly acknowledged: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").PicklistSchema<["true", "false"], undefined>, import("valibot").TransformAction<"false" | "true", boolean>]>, undefined>;
16
+ readonly settled: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").PicklistSchema<["true", "false"], undefined>, import("valibot").TransformAction<"false" | "true", boolean>]>, undefined>;
17
+ readonly status: import("valibot").OptionalSchema<import("valibot").PicklistSchema<["scheduled", "running", "complete", "failed"], undefined>, undefined>;
18
+ readonly agentKind: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").TrimAction, import("valibot").MinLengthAction<string, 1, undefined>, import("valibot").MaxLengthAction<string, 120, undefined>]>, undefined>;
19
+ readonly since: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").RegexAction<string, "Must be a whole number of epoch milliseconds">, import("valibot").TransformAction<any, number>, import("valibot").NumberSchema<undefined>, import("valibot").IntegerAction<number, undefined>, import("valibot").MinValueAction<number, 0, undefined>]>, undefined>;
20
+ }, undefined>;
21
+ readonly pathResolver: () => string;
22
+ readonly responsesByStatusCode: {
23
+ readonly '4xx': import("valibot").ObjectSchema<{
24
+ readonly error: import("valibot").ObjectSchema<{
25
+ readonly code: import("valibot").StringSchema<undefined>;
26
+ readonly message: import("valibot").StringSchema<undefined>;
27
+ readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
28
+ readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
29
+ readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
30
+ readonly message: import("valibot").StringSchema<undefined>;
31
+ }, undefined>, undefined>, undefined>;
32
+ }, undefined>;
33
+ }, undefined>;
34
+ readonly '5xx': import("valibot").ObjectSchema<{
35
+ readonly error: import("valibot").ObjectSchema<{
36
+ readonly code: import("valibot").StringSchema<undefined>;
37
+ readonly message: import("valibot").StringSchema<undefined>;
38
+ readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
39
+ readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
40
+ readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
41
+ readonly message: import("valibot").StringSchema<undefined>;
42
+ }, undefined>, undefined>, undefined>;
43
+ }, undefined>;
44
+ }, undefined>;
45
+ readonly 200: import("valibot").ObjectSchema<{
46
+ readonly entries: import("valibot").ArraySchema<import("valibot").ObjectSchema<{
47
+ readonly entryId: import("valibot").StringSchema<undefined>;
48
+ readonly runId: import("valibot").StringSchema<undefined>;
49
+ readonly stepIndex: import("valibot").NumberSchema<undefined>;
50
+ readonly taskId: import("valibot").StringSchema<undefined>;
51
+ readonly task: import("valibot").NullableSchema<import("valibot").ObjectSchema<{
52
+ readonly title: import("valibot").StringSchema<undefined>;
53
+ readonly status: import("valibot").PicklistSchema<["planned", "ready", "in_progress", "blocked", "pr_ready", "done"], undefined>;
54
+ readonly serviceId: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
55
+ readonly serviceTitle: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
56
+ }, undefined>, undefined>;
57
+ readonly agentKind: import("valibot").StringSchema<undefined>;
58
+ readonly model: import("valibot").StringSchema<undefined>;
59
+ readonly promptVersion: import("valibot").NumberSchema<undefined>;
60
+ readonly comboKey: import("valibot").StringSchema<undefined>;
61
+ readonly combo: import("valibot").NullableSchema<import("valibot").ObjectSchema<{
62
+ readonly consecutiveHighGrades: import("valibot").NumberSchema<undefined>;
63
+ readonly verified: import("valibot").BooleanSchema<undefined>;
64
+ readonly verifiedAt: import("valibot").NullableSchema<import("valibot").NumberSchema<undefined>, undefined>;
65
+ }, undefined>, undefined>;
66
+ readonly status: import("valibot").PicklistSchema<["scheduled", "running", "complete", "failed"], undefined>;
67
+ readonly grade: import("valibot").NullableSchema<import("valibot").NumberSchema<undefined>, undefined>;
68
+ readonly summary: import("valibot").StringSchema<undefined>;
69
+ readonly recommendations: import("valibot").ArraySchema<import("valibot").StringSchema<undefined>, undefined>;
70
+ readonly graderModel: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
71
+ readonly error: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
72
+ readonly acknowledged: import("valibot").BooleanSchema<undefined>;
73
+ readonly acknowledgedAt: import("valibot").NullableSchema<import("valibot").NumberSchema<undefined>, undefined>;
74
+ readonly acknowledgedBy: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
75
+ readonly acknowledgementNote: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
76
+ readonly createdAt: import("valibot").NumberSchema<undefined>;
77
+ readonly updatedAt: import("valibot").NumberSchema<undefined>;
78
+ }, undefined>, undefined>;
79
+ readonly nextCursor: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
80
+ }, undefined>;
81
+ };
82
+ } & {
83
+ readonly minScope: "read";
84
+ };
85
+ /**
86
+ * One entry by id: the read-back beside the acknowledge write, so a caller holding an `entryId`
87
+ * (from a page it stored, or from a ticket it filed) can re-read the current grade, its
88
+ * recommendations and its triage state rather than re-paging the list to find it.
89
+ */
90
+ export declare const getPublicKaizenEntryContract: {
91
+ readonly method: "get";
92
+ readonly requestPathParamsSchema: import("valibot").ObjectSchema<{
93
+ entryId: import("valibot").StringSchema<undefined>;
94
+ }, undefined> & import("@toad-contracts/core").StandardObjectKeysV1<unknown, unknown>;
95
+ readonly pathResolver: ({ entryId }: {
96
+ entryId: string;
97
+ }) => string;
98
+ readonly responsesByStatusCode: {
99
+ readonly '4xx': import("valibot").ObjectSchema<{
100
+ readonly error: import("valibot").ObjectSchema<{
101
+ readonly code: import("valibot").StringSchema<undefined>;
102
+ readonly message: import("valibot").StringSchema<undefined>;
103
+ readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
104
+ readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
105
+ readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
106
+ readonly message: import("valibot").StringSchema<undefined>;
107
+ }, undefined>, undefined>, undefined>;
108
+ }, undefined>;
109
+ }, undefined>;
110
+ readonly '5xx': import("valibot").ObjectSchema<{
111
+ readonly error: import("valibot").ObjectSchema<{
112
+ readonly code: import("valibot").StringSchema<undefined>;
113
+ readonly message: import("valibot").StringSchema<undefined>;
114
+ readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
115
+ readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
116
+ readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
117
+ readonly message: import("valibot").StringSchema<undefined>;
118
+ }, undefined>, undefined>, undefined>;
119
+ }, undefined>;
120
+ }, undefined>;
121
+ readonly 200: import("valibot").ObjectSchema<{
122
+ readonly entryId: import("valibot").StringSchema<undefined>;
123
+ readonly runId: import("valibot").StringSchema<undefined>;
124
+ readonly stepIndex: import("valibot").NumberSchema<undefined>;
125
+ readonly taskId: import("valibot").StringSchema<undefined>;
126
+ readonly task: import("valibot").NullableSchema<import("valibot").ObjectSchema<{
127
+ readonly title: import("valibot").StringSchema<undefined>;
128
+ readonly status: import("valibot").PicklistSchema<["planned", "ready", "in_progress", "blocked", "pr_ready", "done"], undefined>;
129
+ readonly serviceId: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
130
+ readonly serviceTitle: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
131
+ }, undefined>, undefined>;
132
+ readonly agentKind: import("valibot").StringSchema<undefined>;
133
+ readonly model: import("valibot").StringSchema<undefined>;
134
+ readonly promptVersion: import("valibot").NumberSchema<undefined>;
135
+ readonly comboKey: import("valibot").StringSchema<undefined>;
136
+ readonly combo: import("valibot").NullableSchema<import("valibot").ObjectSchema<{
137
+ readonly consecutiveHighGrades: import("valibot").NumberSchema<undefined>;
138
+ readonly verified: import("valibot").BooleanSchema<undefined>;
139
+ readonly verifiedAt: import("valibot").NullableSchema<import("valibot").NumberSchema<undefined>, undefined>;
140
+ }, undefined>, undefined>;
141
+ readonly status: import("valibot").PicklistSchema<["scheduled", "running", "complete", "failed"], undefined>;
142
+ readonly grade: import("valibot").NullableSchema<import("valibot").NumberSchema<undefined>, undefined>;
143
+ readonly summary: import("valibot").StringSchema<undefined>;
144
+ readonly recommendations: import("valibot").ArraySchema<import("valibot").StringSchema<undefined>, undefined>;
145
+ readonly graderModel: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
146
+ readonly error: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
147
+ readonly acknowledged: import("valibot").BooleanSchema<undefined>;
148
+ readonly acknowledgedAt: import("valibot").NullableSchema<import("valibot").NumberSchema<undefined>, undefined>;
149
+ readonly acknowledgedBy: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
150
+ readonly acknowledgementNote: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
151
+ readonly createdAt: import("valibot").NumberSchema<undefined>;
152
+ readonly updatedAt: import("valibot").NumberSchema<undefined>;
153
+ }, undefined>;
154
+ };
155
+ } & {
156
+ readonly minScope: "read";
157
+ };
158
+ /**
159
+ * Record (or clear) that an entry has been triaged, and answer with the updated entry.
160
+ *
161
+ * `write`, not `admin`: acknowledging is bookkeeping about work a human has already read. The
162
+ * body is optional in practice (an empty `{}` acknowledges), and acknowledging an
163
+ * already-acknowledged entry is a no-op that returns it unchanged, so a retrying client cannot
164
+ * rewrite when the entry was first triaged. An entry the grader has not settled yet is refused
165
+ * `409` with `details.reason: "kaizen_entry_not_settled"`, because there are no recommendations
166
+ * to have triaged.
167
+ */
168
+ export declare const acknowledgePublicKaizenEntryContract: {
169
+ readonly method: "post";
170
+ readonly requestPathParamsSchema: import("valibot").ObjectSchema<{
171
+ entryId: import("valibot").StringSchema<undefined>;
172
+ }, undefined> & import("@toad-contracts/core").StandardObjectKeysV1<unknown, unknown>;
173
+ readonly pathResolver: ({ entryId }: {
174
+ entryId: string;
175
+ }) => string;
176
+ readonly requestBodySchema: import("valibot").ObjectSchema<{
177
+ readonly acknowledged: import("valibot").OptionalSchema<import("valibot").BooleanSchema<undefined>, undefined>;
178
+ readonly note: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").TrimAction, import("valibot").MaxLengthAction<string, 2000, undefined>]>, undefined>, undefined>;
179
+ }, undefined>;
180
+ readonly responsesByStatusCode: {
181
+ readonly '4xx': import("valibot").ObjectSchema<{
182
+ readonly error: import("valibot").ObjectSchema<{
183
+ readonly code: import("valibot").StringSchema<undefined>;
184
+ readonly message: import("valibot").StringSchema<undefined>;
185
+ readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
186
+ readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
187
+ readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
188
+ readonly message: import("valibot").StringSchema<undefined>;
189
+ }, undefined>, undefined>, undefined>;
190
+ }, undefined>;
191
+ }, undefined>;
192
+ readonly '5xx': import("valibot").ObjectSchema<{
193
+ readonly error: import("valibot").ObjectSchema<{
194
+ readonly code: import("valibot").StringSchema<undefined>;
195
+ readonly message: import("valibot").StringSchema<undefined>;
196
+ readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
197
+ readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
198
+ readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
199
+ readonly message: import("valibot").StringSchema<undefined>;
200
+ }, undefined>, undefined>, undefined>;
201
+ }, undefined>;
202
+ }, undefined>;
203
+ readonly 200: import("valibot").ObjectSchema<{
204
+ readonly entryId: import("valibot").StringSchema<undefined>;
205
+ readonly runId: import("valibot").StringSchema<undefined>;
206
+ readonly stepIndex: import("valibot").NumberSchema<undefined>;
207
+ readonly taskId: import("valibot").StringSchema<undefined>;
208
+ readonly task: import("valibot").NullableSchema<import("valibot").ObjectSchema<{
209
+ readonly title: import("valibot").StringSchema<undefined>;
210
+ readonly status: import("valibot").PicklistSchema<["planned", "ready", "in_progress", "blocked", "pr_ready", "done"], undefined>;
211
+ readonly serviceId: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
212
+ readonly serviceTitle: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
213
+ }, undefined>, undefined>;
214
+ readonly agentKind: import("valibot").StringSchema<undefined>;
215
+ readonly model: import("valibot").StringSchema<undefined>;
216
+ readonly promptVersion: import("valibot").NumberSchema<undefined>;
217
+ readonly comboKey: import("valibot").StringSchema<undefined>;
218
+ readonly combo: import("valibot").NullableSchema<import("valibot").ObjectSchema<{
219
+ readonly consecutiveHighGrades: import("valibot").NumberSchema<undefined>;
220
+ readonly verified: import("valibot").BooleanSchema<undefined>;
221
+ readonly verifiedAt: import("valibot").NullableSchema<import("valibot").NumberSchema<undefined>, undefined>;
222
+ }, undefined>, undefined>;
223
+ readonly status: import("valibot").PicklistSchema<["scheduled", "running", "complete", "failed"], undefined>;
224
+ readonly grade: import("valibot").NullableSchema<import("valibot").NumberSchema<undefined>, undefined>;
225
+ readonly summary: import("valibot").StringSchema<undefined>;
226
+ readonly recommendations: import("valibot").ArraySchema<import("valibot").StringSchema<undefined>, undefined>;
227
+ readonly graderModel: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
228
+ readonly error: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
229
+ readonly acknowledged: import("valibot").BooleanSchema<undefined>;
230
+ readonly acknowledgedAt: import("valibot").NullableSchema<import("valibot").NumberSchema<undefined>, undefined>;
231
+ readonly acknowledgedBy: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
232
+ readonly acknowledgementNote: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
233
+ readonly createdAt: import("valibot").NumberSchema<undefined>;
234
+ readonly updatedAt: import("valibot").NumberSchema<undefined>;
235
+ }, undefined>;
236
+ };
237
+ } & {
238
+ readonly minScope: "write";
239
+ };
240
+ //# sourceMappingURL=public-kaizen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public-kaizen.d.ts","sourceRoot":"","sources":["../../src/routes/public-kaizen.ts"],"names":[],"mappings":"AA4BA;;;;;;;;GAQG;AACH,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQ3C,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQxC,CAAA;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAShD,CAAA"}
@@ -0,0 +1,64 @@
1
+ import { defineApiContract } from '@toad-contracts/valibot';
2
+ import { acknowledgeKaizenEntrySchema, listPublicKaizenEntriesQuerySchema, publicKaizenEntryListSchema, publicKaizenEntrySchema, } from '../public-kaizen.js';
3
+ import { errorResponses, singleStringParam, withMinScope } from './_shared.js';
4
+ // ---------------------------------------------------------------------------
5
+ // Route contracts for the public KAIZEN surface: absolute `/api/v1` paths, authenticated
6
+ // in-controller by a public-API key. The wire shapes and the reasoning behind them live in
7
+ // `../public-kaizen.ts`; the grading machinery behind an entry is `KaizenService`, and the
8
+ // surface's own account for an integrator is `backend/docs/public-api.md`.
9
+ //
10
+ // The scope split follows the one the merge-evidence surface established. Reading gradings is
11
+ // `read` like every other read on this API. ACKNOWLEDGING is `write`, not `admin`: it records
12
+ // that a person has triaged a recommendation, which starts nothing, spends nothing and merges
13
+ // nothing. Requiring `admin` for it would mean an integration whose whole job is draining the
14
+ // improvement backlog had to hold a key that also deletes tasks and merges pull requests.
15
+ //
16
+ // The entries are addressed by ENTRY id under `/api/v1/kaizen/entries`, and both point routes
17
+ // re-apply the key's workspace to the row they load, the rule every point read on this API
18
+ // follows (`/api/v1/debug/llm-calls/:callId`, `/api/v1/merge-records/:recordId`).
19
+ // ---------------------------------------------------------------------------
20
+ const entryIdParams = singleStringParam('entryId');
21
+ /**
22
+ * One page of the workspace's Kaizen entries, newest first, with the acknowledgement / status /
23
+ * agent-kind / since filters applied in SQL.
24
+ *
25
+ * The read this surface exists for: an improvement loop enumerates every grading the workspace
26
+ * has produced without naming a run or a task first, which is the one thing it cannot know
27
+ * (finding out is the question it is asking). `?acknowledged=false` is the backlog, and paging
28
+ * is keyset, so a poll loop can never skip an entry because a run finished mid-page.
29
+ */
30
+ export const listPublicKaizenEntriesContract = withMinScope('read', defineApiContract({
31
+ method: 'get',
32
+ requestQuerySchema: listPublicKaizenEntriesQuerySchema,
33
+ pathResolver: () => '/api/v1/kaizen/entries',
34
+ responsesByStatusCode: { 200: publicKaizenEntryListSchema, ...errorResponses },
35
+ }));
36
+ /**
37
+ * One entry by id: the read-back beside the acknowledge write, so a caller holding an `entryId`
38
+ * (from a page it stored, or from a ticket it filed) can re-read the current grade, its
39
+ * recommendations and its triage state rather than re-paging the list to find it.
40
+ */
41
+ export const getPublicKaizenEntryContract = withMinScope('read', defineApiContract({
42
+ method: 'get',
43
+ requestPathParamsSchema: entryIdParams,
44
+ pathResolver: ({ entryId }) => `/api/v1/kaizen/entries/${entryId}`,
45
+ responsesByStatusCode: { 200: publicKaizenEntrySchema, ...errorResponses },
46
+ }));
47
+ /**
48
+ * Record (or clear) that an entry has been triaged, and answer with the updated entry.
49
+ *
50
+ * `write`, not `admin`: acknowledging is bookkeeping about work a human has already read. The
51
+ * body is optional in practice (an empty `{}` acknowledges), and acknowledging an
52
+ * already-acknowledged entry is a no-op that returns it unchanged, so a retrying client cannot
53
+ * rewrite when the entry was first triaged. An entry the grader has not settled yet is refused
54
+ * `409` with `details.reason: "kaizen_entry_not_settled"`, because there are no recommendations
55
+ * to have triaged.
56
+ */
57
+ export const acknowledgePublicKaizenEntryContract = withMinScope('write', defineApiContract({
58
+ method: 'post',
59
+ requestPathParamsSchema: entryIdParams,
60
+ pathResolver: ({ entryId }) => `/api/v1/kaizen/entries/${entryId}/acknowledge`,
61
+ requestBodySchema: acknowledgeKaizenEntrySchema,
62
+ responsesByStatusCode: { 200: publicKaizenEntrySchema, ...errorResponses },
63
+ }));
64
+ //# sourceMappingURL=public-kaizen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public-kaizen.js","sourceRoot":"","sources":["../../src/routes/public-kaizen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,EACL,4BAA4B,EAC5B,kCAAkC,EAClC,2BAA2B,EAC3B,uBAAuB,GACxB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAE9E,8EAA8E;AAC9E,yFAAyF;AACzF,2FAA2F;AAC3F,2FAA2F;AAC3F,2EAA2E;AAC3E,EAAE;AACF,8FAA8F;AAC9F,8FAA8F;AAC9F,8FAA8F;AAC9F,8FAA8F;AAC9F,0FAA0F;AAC1F,EAAE;AACF,8FAA8F;AAC9F,2FAA2F;AAC3F,kFAAkF;AAClF,8EAA8E;AAE9E,MAAM,aAAa,GAAG,iBAAiB,CAAC,SAAS,CAAC,CAAA;AAElD;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,YAAY,CACzD,MAAM,EACN,iBAAiB,CAAC;IAChB,MAAM,EAAE,KAAK;IACb,kBAAkB,EAAE,kCAAkC;IACtD,YAAY,EAAE,GAAG,EAAE,CAAC,wBAAwB;IAC5C,qBAAqB,EAAE,EAAE,GAAG,EAAE,2BAA2B,EAAE,GAAG,cAAc,EAAE;CAC/E,CAAC,CACH,CAAA;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,YAAY,CACtD,MAAM,EACN,iBAAiB,CAAC;IAChB,MAAM,EAAE,KAAK;IACb,uBAAuB,EAAE,aAAa;IACtC,YAAY,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,0BAA0B,OAAO,EAAE;IAClE,qBAAqB,EAAE,EAAE,GAAG,EAAE,uBAAuB,EAAE,GAAG,cAAc,EAAE;CAC3E,CAAC,CACH,CAAA;AAED;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,oCAAoC,GAAG,YAAY,CAC9D,OAAO,EACP,iBAAiB,CAAC;IAChB,MAAM,EAAE,MAAM;IACd,uBAAuB,EAAE,aAAa;IACtC,YAAY,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,0BAA0B,OAAO,cAAc;IAC9E,iBAAiB,EAAE,4BAA4B;IAC/C,qBAAqB,EAAE,EAAE,GAAG,EAAE,uBAAuB,EAAE,GAAG,cAAc,EAAE;CAC3E,CAAC,CACH,CAAA"}
@@ -201,6 +201,84 @@ export declare const linkPublicRepoContract: {
201
201
  } & {
202
202
  readonly minScope: "admin";
203
203
  };
204
+ /**
205
+ * Read ONE file from a repository this workspace has linked, at a ref.
206
+ *
207
+ * What it exists for is grading what a run actually COMMITTED, which nothing on this surface could
208
+ * answer: `GET /repos` lists rows, `/repos/available` answers reachability, and
209
+ * `GET /services/:id/spec` serves the one tree the platform understands. Everything else was the
210
+ * agent's own prose, so a caller wanting a real answer had to hold a second VCS credential.
211
+ *
212
+ * **`path` is a QUERY parameter, not the rest of the URL**, which is the one place this deliberately
213
+ * departs from the shape a provider's own API uses. A repo-relative path contains slashes, and a
214
+ * path SEGMENT cannot: OpenAPI 3 path templating does not admit them, so a `.../contents/{path}`
215
+ * would be unrepresentable in the spec the four SDK clients are generated from, and the router would
216
+ * match one segment and 404 everything nested. As a query value it needs one ordinary encoding and
217
+ * every generated client passes it without a special case.
218
+ *
219
+ * `ref` is a branch, tag or commit sha. Omitted, it is passed through omitted, so the PROVIDER
220
+ * resolves the repository's own default branch: the platform's recorded default may be a value it
221
+ * invented for a projection row that carries none, and pinning that would read a branch the
222
+ * repository need not have. The response then reports `ref: null` and the `sha` it did read.
223
+ *
224
+ * Five outcomes a caller branches on, and none of them are folded: `404` with
225
+ * `details.reason: 'repo_not_linked'` for a repository this workspace has not adopted, `404` with
226
+ * `'file_not_found'` for a path the ref does not hold, `422` with `'file_too_large'` for a file past
227
+ * `MAX_REPO_FILE_CHARS` (plus `size` and `limit`) or past the provider's own contents ceiling (plus
228
+ * `limit` alone, since nothing measured it), refused rather than truncated because a shortened
229
+ * answer reads exactly like a shorter file, `422` with `'file_not_text'` (plus `sha`) for bytes that
230
+ * are not UTF-8, and `503` when the deployment's VCS integration is unwired or the provider could
231
+ * not be reached, which is not evidence about the file.
232
+ */
233
+ export declare const getPublicRepoFileContract: {
234
+ readonly method: "get";
235
+ readonly requestPathParamsSchema: v.ObjectSchema<{
236
+ readonly owner: v.StringSchema<undefined>;
237
+ readonly name: v.StringSchema<undefined>;
238
+ }, undefined> & import("@toad-contracts/core").StandardObjectKeysV1<unknown, unknown>;
239
+ readonly pathResolver: ({ owner, name }: {
240
+ owner: string;
241
+ name: string;
242
+ }) => string;
243
+ readonly requestQuerySchema: v.ObjectSchema<{
244
+ readonly path: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 1000, undefined>, v.CheckAction<string, "A path is relative to the repository root">, v.CheckAction<string, "No path segment may be '..'">]>;
245
+ readonly ref: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>, undefined>;
246
+ }, undefined>;
247
+ readonly responsesByStatusCode: {
248
+ readonly '4xx': v.ObjectSchema<{
249
+ readonly error: v.ObjectSchema<{
250
+ readonly code: v.StringSchema<undefined>;
251
+ readonly message: v.StringSchema<undefined>;
252
+ readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
253
+ readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
254
+ readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
255
+ readonly message: v.StringSchema<undefined>;
256
+ }, undefined>, undefined>, undefined>;
257
+ }, undefined>;
258
+ }, undefined>;
259
+ readonly '5xx': v.ObjectSchema<{
260
+ readonly error: v.ObjectSchema<{
261
+ readonly code: v.StringSchema<undefined>;
262
+ readonly message: v.StringSchema<undefined>;
263
+ readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
264
+ readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
265
+ readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
266
+ readonly message: v.StringSchema<undefined>;
267
+ }, undefined>, undefined>, undefined>;
268
+ }, undefined>;
269
+ }, undefined>;
270
+ readonly 200: v.ObjectSchema<{
271
+ readonly owner: v.StringSchema<undefined>;
272
+ readonly name: v.StringSchema<undefined>;
273
+ readonly path: v.StringSchema<undefined>;
274
+ readonly ref: v.NullableSchema<v.StringSchema<undefined>, undefined>;
275
+ readonly sha: v.StringSchema<undefined>;
276
+ readonly content: v.StringSchema<undefined>;
277
+ }, undefined>;
278
+ };
279
+ } & {
280
+ readonly minScope: "admin";
281
+ };
204
282
  /** Poll one bootstrap run. Idempotent, and the only way to learn a run's outcome. */
205
283
  export declare const getPublicRepoBootstrapContract: {
206
284
  readonly method: "get";
@@ -427,6 +505,63 @@ export declare const connectPublicEnvironmentContract: {
427
505
  } & {
428
506
  readonly minScope: "admin";
429
507
  };
508
+ /**
509
+ * Every environment handler this workspace holds, with the secret KEYS each carries and no values.
510
+ *
511
+ * The half that was missing: handlers could be WRITTEN here and never read. A deployment that seeds
512
+ * them programmatically (the documented path for a multi-tenant Node deployment, and the one local
513
+ * mode takes) had no way for a headless caller to confirm the seed landed, so "the backend accepts
514
+ * our credential" and "this workspace has a handler for that backend" collapsed into one
515
+ * unanswerable question. They are different failures with different fixes.
516
+ *
517
+ * It reports every engine, including a `remote-custom` handler for a backend the deployment
518
+ * registered in code, which is why it does not reuse the connect call's own response shape: that one
519
+ * pins `engine: 'kubernetes'` truthfully for a write only ever made with it, and widening a shipped
520
+ * literal would retype a field released clients already narrow on.
521
+ */
522
+ export declare const listPublicEnvironmentConnectionsContract: {
523
+ readonly method: "get";
524
+ readonly pathResolver: () => string;
525
+ readonly responsesByStatusCode: {
526
+ readonly '4xx': v.ObjectSchema<{
527
+ readonly error: v.ObjectSchema<{
528
+ readonly code: v.StringSchema<undefined>;
529
+ readonly message: v.StringSchema<undefined>;
530
+ readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
531
+ readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
532
+ readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
533
+ readonly message: v.StringSchema<undefined>;
534
+ }, undefined>, undefined>, undefined>;
535
+ }, undefined>;
536
+ }, undefined>;
537
+ readonly '5xx': v.ObjectSchema<{
538
+ readonly error: v.ObjectSchema<{
539
+ readonly code: v.StringSchema<undefined>;
540
+ readonly message: v.StringSchema<undefined>;
541
+ readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
542
+ readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
543
+ readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
544
+ readonly message: v.StringSchema<undefined>;
545
+ }, undefined>, undefined>, undefined>;
546
+ }, undefined>;
547
+ }, undefined>;
548
+ readonly 200: v.ObjectSchema<{
549
+ readonly connections: v.ArraySchema<v.ObjectSchema<{
550
+ readonly provisionType: v.StringSchema<undefined>;
551
+ readonly manifestId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
552
+ readonly acceptsManifestId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
553
+ readonly engine: v.StringSchema<undefined>;
554
+ readonly backendKind: v.StringSchema<undefined>;
555
+ readonly label: v.StringSchema<undefined>;
556
+ readonly endpoint: v.StringSchema<undefined>;
557
+ readonly secretKeys: v.ArraySchema<v.StringSchema<undefined>, undefined>;
558
+ readonly connectedAt: v.NumberSchema<undefined>;
559
+ }, undefined>, undefined>;
560
+ }, undefined>;
561
+ };
562
+ } & {
563
+ readonly minScope: "admin";
564
+ };
430
565
  /**
431
566
  * Patch a service: its authored fields, and where its per-run manifests live.
432
567
  *
@@ -462,6 +597,10 @@ export declare const updatePublicServiceContract: {
462
597
  readonly path: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 500, undefined>]>;
463
598
  readonly renderer: v.OptionalSchema<v.PicklistSchema<["raw", "kustomize"], undefined>, undefined>;
464
599
  }, undefined>], undefined>;
600
+ }, undefined>, v.ObjectSchema<{
601
+ readonly type: v.LiteralSchema<"custom", undefined>;
602
+ readonly manifestId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.RegexAction<string, "Only lowercase letters, digits and hyphens are allowed">, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
603
+ readonly manifestPath: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 500, undefined>]>, undefined>;
465
604
  }, undefined>], undefined>, undefined>;
466
605
  }, undefined>, v.CheckAction<{
467
606
  title?: string | undefined;
@@ -479,6 +618,10 @@ export declare const updatePublicServiceContract: {
479
618
  path: string;
480
619
  renderer?: "kustomize" | "raw" | undefined;
481
620
  };
621
+ } | {
622
+ type: "custom";
623
+ manifestId: string;
624
+ manifestPath?: string | undefined;
482
625
  } | undefined;
483
626
  }, "Supply at least one of title, description or provisioning.">]>;
484
627
  readonly responsesByStatusCode: {
@@ -523,6 +666,10 @@ export declare const updatePublicServiceContract: {
523
666
  readonly path: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 500, undefined>]>;
524
667
  readonly renderer: v.OptionalSchema<v.PicklistSchema<["raw", "kustomize"], undefined>, undefined>;
525
668
  }, undefined>], undefined>;
669
+ }, undefined>, v.ObjectSchema<{
670
+ readonly type: v.LiteralSchema<"custom", undefined>;
671
+ readonly manifestId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.RegexAction<string, "Only lowercase letters, digits and hyphens are allowed">, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
672
+ readonly manifestPath: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 500, undefined>]>, undefined>;
526
673
  }, undefined>], undefined>, undefined>;
527
674
  }, undefined>;
528
675
  };
@@ -1 +1 @@
1
- {"version":3,"file":"public-provisioning.d.ts","sourceRoot":"","sources":["../../src/routes/public-provisioning.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAiD5B;;;;;;;GAOG;AACH,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQ5C,CAAA;AAID;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,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,CAAA;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,wCAAwC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOpD,CAAA;AAID;;;;;;;;;;GAUG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CASvC,CAAA;AAID;;;;;;;;GAQG;AACH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOzC,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAO1C,CAAA;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAO1C,CAAA;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAO1C,CAAA;AAID;;;;;;;GAOG;AACH,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAO7C,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQhD,CAAA"}
@@ -1,6 +1,6 @@
1
1
  import * as v from 'valibot';
2
- import { defineApiContract } from '@toad-contracts/valibot';
3
- import { connectPublicEnvironmentSchema, linkPublicRepoSchema, publicAvailableRepoListSchema, publicBootstrapJobSchema, publicBootstrapRepoSchema, publicEnvironmentConnectionTestSchema, publicEnvironmentConnectionViewSchema, publicModelPresetListSchema, publicRiskPolicyListSchema, publicTrackerWritebackSettingsSchema, publicVcsConnectionViewSchema, publicWiredModelListSchema, testPublicEnvironmentConnectionSchema, updatePublicServiceSchema, updatePublicTrackerWritebackSchema, } from '../public-provisioning.js';
2
+ import { defineApiContract, withObjectKeys } from '@toad-contracts/valibot';
3
+ import { connectPublicEnvironmentSchema, linkPublicRepoSchema, publicAvailableRepoListSchema, publicBootstrapJobSchema, publicBootstrapRepoSchema, publicEnvironmentConnectionTestSchema, publicEnvironmentConnectionViewSchema, publicEnvironmentHandlerListSchema, publicModelPresetListSchema, publicRepoFilePathSchema, publicRepoFileSchema, publicRiskPolicyListSchema, publicTrackerWritebackSettingsSchema, publicVcsConnectionViewSchema, publicWiredModelListSchema, testPublicEnvironmentConnectionSchema, updatePublicServiceSchema, updatePublicTrackerWritebackSchema, } from '../public-provisioning.js';
4
4
  import { publicServiceSchema } from '../public-api.js';
5
5
  import { publicRepoSchema } from '../public-board.js';
6
6
  import { errorResponses, singleStringParam, withMinScope } from './_shared.js';
@@ -86,6 +86,45 @@ export const linkPublicRepoContract = withMinScope('admin', defineApiContract({
86
86
  requestBodySchema: linkPublicRepoSchema,
87
87
  responsesByStatusCode: { 200: publicRepoSchema, ...errorResponses },
88
88
  }));
89
+ /**
90
+ * Read ONE file from a repository this workspace has linked, at a ref.
91
+ *
92
+ * What it exists for is grading what a run actually COMMITTED, which nothing on this surface could
93
+ * answer: `GET /repos` lists rows, `/repos/available` answers reachability, and
94
+ * `GET /services/:id/spec` serves the one tree the platform understands. Everything else was the
95
+ * agent's own prose, so a caller wanting a real answer had to hold a second VCS credential.
96
+ *
97
+ * **`path` is a QUERY parameter, not the rest of the URL**, which is the one place this deliberately
98
+ * departs from the shape a provider's own API uses. A repo-relative path contains slashes, and a
99
+ * path SEGMENT cannot: OpenAPI 3 path templating does not admit them, so a `.../contents/{path}`
100
+ * would be unrepresentable in the spec the four SDK clients are generated from, and the router would
101
+ * match one segment and 404 everything nested. As a query value it needs one ordinary encoding and
102
+ * every generated client passes it without a special case.
103
+ *
104
+ * `ref` is a branch, tag or commit sha. Omitted, it is passed through omitted, so the PROVIDER
105
+ * resolves the repository's own default branch: the platform's recorded default may be a value it
106
+ * invented for a projection row that carries none, and pinning that would read a branch the
107
+ * repository need not have. The response then reports `ref: null` and the `sha` it did read.
108
+ *
109
+ * Five outcomes a caller branches on, and none of them are folded: `404` with
110
+ * `details.reason: 'repo_not_linked'` for a repository this workspace has not adopted, `404` with
111
+ * `'file_not_found'` for a path the ref does not hold, `422` with `'file_too_large'` for a file past
112
+ * `MAX_REPO_FILE_CHARS` (plus `size` and `limit`) or past the provider's own contents ceiling (plus
113
+ * `limit` alone, since nothing measured it), refused rather than truncated because a shortened
114
+ * answer reads exactly like a shorter file, `422` with `'file_not_text'` (plus `sha`) for bytes that
115
+ * are not UTF-8, and `503` when the deployment's VCS integration is unwired or the provider could
116
+ * not be reached, which is not evidence about the file.
117
+ */
118
+ export const getPublicRepoFileContract = withMinScope('admin', defineApiContract({
119
+ method: 'get',
120
+ requestPathParamsSchema: withObjectKeys(v.object({ owner: v.string(), name: v.string() })),
121
+ pathResolver: ({ owner, name }) => `/api/v1/repos/${owner}/${name}/contents`,
122
+ requestQuerySchema: v.object({
123
+ path: publicRepoFilePathSchema,
124
+ ref: v.optional(v.pipe(v.string(), v.trim(), v.minLength(1), v.maxLength(255))),
125
+ }),
126
+ responsesByStatusCode: { 200: publicRepoFileSchema, ...errorResponses },
127
+ }));
89
128
  /** Poll one bootstrap run. Idempotent, and the only way to learn a run's outcome. */
90
129
  export const getPublicRepoBootstrapContract = withMinScope('admin', defineApiContract({
91
130
  method: 'get',
@@ -122,6 +161,25 @@ export const connectPublicEnvironmentContract = withMinScope('admin', defineApiC
122
161
  requestBodySchema: connectPublicEnvironmentSchema,
123
162
  responsesByStatusCode: { 201: publicEnvironmentConnectionViewSchema, ...errorResponses },
124
163
  }));
164
+ /**
165
+ * Every environment handler this workspace holds, with the secret KEYS each carries and no values.
166
+ *
167
+ * The half that was missing: handlers could be WRITTEN here and never read. A deployment that seeds
168
+ * them programmatically (the documented path for a multi-tenant Node deployment, and the one local
169
+ * mode takes) had no way for a headless caller to confirm the seed landed, so "the backend accepts
170
+ * our credential" and "this workspace has a handler for that backend" collapsed into one
171
+ * unanswerable question. They are different failures with different fixes.
172
+ *
173
+ * It reports every engine, including a `remote-custom` handler for a backend the deployment
174
+ * registered in code, which is why it does not reuse the connect call's own response shape: that one
175
+ * pins `engine: 'kubernetes'` truthfully for a write only ever made with it, and widening a shipped
176
+ * literal would retype a field released clients already narrow on.
177
+ */
178
+ export const listPublicEnvironmentConnectionsContract = withMinScope('admin', defineApiContract({
179
+ method: 'get',
180
+ pathResolver: () => '/api/v1/environments/connections',
181
+ responsesByStatusCode: { 200: publicEnvironmentHandlerListSchema, ...errorResponses },
182
+ }));
125
183
  // ---- a service's provisioning (the SOURCE half) -----------------------------
126
184
  /**
127
185
  * Patch a service: its authored fields, and where its per-run manifests live.
@@ -1 +1 @@
1
- {"version":3,"file":"public-provisioning.js","sourceRoot":"","sources":["../../src/routes/public-provisioning.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAC5B,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,EACL,8BAA8B,EAC9B,oBAAoB,EACpB,6BAA6B,EAC7B,wBAAwB,EACxB,yBAAyB,EACzB,qCAAqC,EACrC,qCAAqC,EACrC,2BAA2B,EAC3B,0BAA0B,EAC1B,oCAAoC,EACpC,6BAA6B,EAC7B,0BAA0B,EAC1B,qCAAqC,EACrC,yBAAyB,EACzB,kCAAkC,GACnC,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAE9E,8EAA8E;AAC9E,uEAAuE;AACvE,EAAE;AACF,kGAAkG;AAClG,gGAAgG;AAChG,oGA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M,iCAAiC,GAAG,YAAY,CAC3D,OAAO,EACP,iBAAiB,CAAC;IAChB,MAAM,EAAE,KAAK;IACb,YAAY,EAAE,GAAG,EAAE,CAAC,2BAA2B;IAC/C,qBAAqB,EAAE,EAAE,GAAG,EAAE,oCAAoC,EAAE,GAAG,cAAc,EAAE;CACxF,CAAC,CACH,CAAA;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,oCAAoC,GAAG,YAAY,CAC9D,OAAO,EACP,iBAAiB,CAAC;IAChB,MAAM,EAAE,OAAO;IACf,YAAY,EAAE,GAAG,EAAE,CAAC,2BAA2B;IAC/C,iBAAiB,EAAE,kCAAkC;IACrD,qBAAqB,EAAE,EAAE,GAAG,EAAE,oCAAoC,EAAE,GAAG,cAAc,EAAE;CACxF,CAAC,CACH,CAAA"}
1
+ {"version":3,"file":"public-provisioning.js","sourceRoot":"","sources":["../../src/routes/public-provisioning.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAC5B,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAC3E,OAAO,EACL,8BAA8B,EAC9B,oBAAoB,EACpB,6BAA6B,EAC7B,wBAAwB,EACxB,yBAAyB,EACzB,qCAAqC,EACrC,qCAAqC,EACrC,kCAAkC,EAClC,2BAA2B,EAC3B,wBAAwB,EACxB,oBAAoB,EACpB,0BAA0B,EAC1B,oCAAoC,EACpC,6BAA6B,EAC7B,0BAA0B,EAC1B,qCAAqC,EACrC,yBAAyB,EACzB,kCAAkC,GACnC,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAE9E,8EAA8E;AAC9E,uEAAuE;AACvE,EAAE;AACF,kGAAk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