@cat-factory/contracts 0.134.0 → 0.135.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/public-api.d.ts +120 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +79 -0
- package/dist/public-api.js.map +1 -1
- package/dist/routes/public-api.d.ts +238 -0
- package/dist/routes/public-api.d.ts.map +1 -1
- package/dist/routes/public-api.js +39 -1
- package/dist/routes/public-api.js.map +1 -1
- package/package.json +1 -1
package/dist/public-api.d.ts
CHANGED
|
@@ -139,4 +139,124 @@ export declare const startPublicTaskSchema: v.ObjectSchema<{
|
|
|
139
139
|
readonly pipelineId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>, undefined>;
|
|
140
140
|
}, undefined>;
|
|
141
141
|
export type StartPublicTaskInput = v.InferOutput<typeof startPublicTaskSchema>;
|
|
142
|
+
/**
|
|
143
|
+
* Edit a task's mutable fields (typically before it runs) — the external counterpart of the
|
|
144
|
+
* SPA's inline title/description edit. Deliberately narrower than the internal `updateBlock`
|
|
145
|
+
* patch (which also carries model/risk/pipeline pins and board-layout knobs that have no
|
|
146
|
+
* external meaning): the public surface exposes only the two human-authored fields, so it
|
|
147
|
+
* stays small and stable. Both fields are optional; an empty patch is a harmless no-op.
|
|
148
|
+
*/
|
|
149
|
+
export declare const updatePublicTaskSchema: v.ObjectSchema<{
|
|
150
|
+
readonly title: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
|
|
151
|
+
readonly description: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 2000, undefined>]>, undefined>;
|
|
152
|
+
}, undefined>;
|
|
153
|
+
export type UpdatePublicTaskInput = v.InferOutput<typeof updatePublicTaskSchema>;
|
|
154
|
+
/**
|
|
155
|
+
* A task run's status as exposed externally. Mirrors the internal `ExecutionStatus`
|
|
156
|
+
* members but is a DECOUPLED public type, so the external contract stays stable if the
|
|
157
|
+
* engine ever adds an internal status. Unlike the coarse initiative-job status
|
|
158
|
+
* (`running`/`succeeded`/`failed`), the richer run view surfaces the parked states a
|
|
159
|
+
* caller may want to react to (`blocked` = awaiting a human, `paused` = spend-gated).
|
|
160
|
+
*/
|
|
161
|
+
export declare const publicRunStatusSchema: v.PicklistSchema<["running", "blocked", "paused", "done", "failed"], undefined>;
|
|
162
|
+
export type PublicRunStatus = v.InferOutput<typeof publicRunStatusSchema>;
|
|
163
|
+
/** A single step of a task run — a small projection of the internal `PipelineStep`. */
|
|
164
|
+
export declare const publicRunStepSchema: v.ObjectSchema<{
|
|
165
|
+
/** The step's agent kind (`architect`, `coder`, `ci`, `merger`, a custom kind, …). */
|
|
166
|
+
readonly agentKind: v.StringSchema<undefined>;
|
|
167
|
+
/** Lifecycle state: `pending` → `working` → `waiting_decision` → `done`. */
|
|
168
|
+
readonly state: v.PicklistSchema<["pending", "working", "waiting_decision", "done"], undefined>;
|
|
169
|
+
/** 0..1 progress of this step. */
|
|
170
|
+
readonly progress: v.NumberSchema<undefined>;
|
|
171
|
+
/** Live subtask counts while an async (container) step runs; null when none. */
|
|
172
|
+
readonly subtasks: v.NullableSchema<v.ObjectSchema<{
|
|
173
|
+
readonly completed: v.NumberSchema<undefined>;
|
|
174
|
+
readonly inProgress: v.NumberSchema<undefined>;
|
|
175
|
+
readonly total: v.NumberSchema<undefined>;
|
|
176
|
+
}, undefined>, undefined>;
|
|
177
|
+
}, undefined>;
|
|
178
|
+
export type PublicRunStep = v.InferOutput<typeof publicRunStepSchema>;
|
|
179
|
+
/**
|
|
180
|
+
* The rich external view of a task's run — per-step status/progress/subtasks, the failure
|
|
181
|
+
* kind+message, and the PR the run opened (url + branch). A larger projection than the
|
|
182
|
+
* coarse `publicJob`, deliberately scoped to a BOARD task run (created/owned via the public
|
|
183
|
+
* task surface), never a headless initiative job or a raw `ExecutionInstance`.
|
|
184
|
+
*/
|
|
185
|
+
export declare const publicRunSchema: v.ObjectSchema<{
|
|
186
|
+
readonly runId: v.StringSchema<undefined>;
|
|
187
|
+
readonly taskId: v.StringSchema<undefined>;
|
|
188
|
+
readonly status: v.PicklistSchema<["running", "blocked", "paused", "done", "failed"], undefined>;
|
|
189
|
+
readonly createdAt: v.NumberSchema<undefined>;
|
|
190
|
+
/** Index of the step the run is currently on. */
|
|
191
|
+
readonly currentStep: v.NumberSchema<undefined>;
|
|
192
|
+
readonly steps: v.ArraySchema<v.ObjectSchema<{
|
|
193
|
+
/** The step's agent kind (`architect`, `coder`, `ci`, `merger`, a custom kind, …). */
|
|
194
|
+
readonly agentKind: v.StringSchema<undefined>;
|
|
195
|
+
/** Lifecycle state: `pending` → `working` → `waiting_decision` → `done`. */
|
|
196
|
+
readonly state: v.PicklistSchema<["pending", "working", "waiting_decision", "done"], undefined>;
|
|
197
|
+
/** 0..1 progress of this step. */
|
|
198
|
+
readonly progress: v.NumberSchema<undefined>;
|
|
199
|
+
/** Live subtask counts while an async (container) step runs; null when none. */
|
|
200
|
+
readonly subtasks: v.NullableSchema<v.ObjectSchema<{
|
|
201
|
+
readonly completed: v.NumberSchema<undefined>;
|
|
202
|
+
readonly inProgress: v.NumberSchema<undefined>;
|
|
203
|
+
readonly total: v.NumberSchema<undefined>;
|
|
204
|
+
}, undefined>, undefined>;
|
|
205
|
+
}, undefined>, undefined>;
|
|
206
|
+
/** The PR the run opened, once one exists; null otherwise. */
|
|
207
|
+
readonly pullRequest: v.NullableSchema<v.ObjectSchema<{
|
|
208
|
+
readonly url: v.StringSchema<undefined>;
|
|
209
|
+
readonly branch: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
210
|
+
}, undefined>, undefined>;
|
|
211
|
+
/** Present when `status` is `failed` (the failure kind + message); null otherwise. */
|
|
212
|
+
readonly error: v.NullableSchema<v.ObjectSchema<{
|
|
213
|
+
readonly code: v.StringSchema<undefined>;
|
|
214
|
+
readonly message: v.StringSchema<undefined>;
|
|
215
|
+
}, undefined>, undefined>;
|
|
216
|
+
}, undefined>;
|
|
217
|
+
export type PublicRun = v.InferOutput<typeof publicRunSchema>;
|
|
218
|
+
/**
|
|
219
|
+
* A pipeline as exposed externally — enough to pick a `pipelineId` for `start` and know
|
|
220
|
+
* whether it is safe to run headlessly. Closes the gap where `start` demands a `pipelineId`
|
|
221
|
+
* for an unpinned task yet nothing lists the valid ids. A small projection of the internal
|
|
222
|
+
* `Pipeline` (its id/name + the enabled step chain), plus the two headless-relevant flags.
|
|
223
|
+
*/
|
|
224
|
+
export declare const publicPipelineSchema: v.ObjectSchema<{
|
|
225
|
+
readonly pipelineId: v.StringSchema<undefined>;
|
|
226
|
+
readonly name: v.StringSchema<undefined>;
|
|
227
|
+
/** The enabled step chain, in order (each an agent kind). */
|
|
228
|
+
readonly steps: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
229
|
+
/**
|
|
230
|
+
* Whether this pipeline is exposed as a PUBLIC initiative pipeline (`POST /initiatives`).
|
|
231
|
+
* A non-public pipeline can still back a board task `start` when pinned or passed by id.
|
|
232
|
+
*/
|
|
233
|
+
readonly public: v.BooleanSchema<undefined>;
|
|
234
|
+
/**
|
|
235
|
+
* Whether the pipeline is safe to run headlessly (every enabled step is inline — no
|
|
236
|
+
* container/GitHub push — and none parks on a human gate). A headless-startable pipeline
|
|
237
|
+
* can be driven end-to-end with no interactive user; others may park awaiting input.
|
|
238
|
+
*/
|
|
239
|
+
readonly headlessStartable: v.BooleanSchema<undefined>;
|
|
240
|
+
}, undefined>;
|
|
241
|
+
export type PublicPipeline = v.InferOutput<typeof publicPipelineSchema>;
|
|
242
|
+
export declare const publicPipelineListSchema: v.ObjectSchema<{
|
|
243
|
+
readonly pipelines: v.ArraySchema<v.ObjectSchema<{
|
|
244
|
+
readonly pipelineId: v.StringSchema<undefined>;
|
|
245
|
+
readonly name: v.StringSchema<undefined>;
|
|
246
|
+
/** The enabled step chain, in order (each an agent kind). */
|
|
247
|
+
readonly steps: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
248
|
+
/**
|
|
249
|
+
* Whether this pipeline is exposed as a PUBLIC initiative pipeline (`POST /initiatives`).
|
|
250
|
+
* A non-public pipeline can still back a board task `start` when pinned or passed by id.
|
|
251
|
+
*/
|
|
252
|
+
readonly public: v.BooleanSchema<undefined>;
|
|
253
|
+
/**
|
|
254
|
+
* Whether the pipeline is safe to run headlessly (every enabled step is inline — no
|
|
255
|
+
* container/GitHub push — and none parks on a human gate). A headless-startable pipeline
|
|
256
|
+
* can be driven end-to-end with no interactive user; others may park awaiting input.
|
|
257
|
+
*/
|
|
258
|
+
readonly headlessStartable: v.BooleanSchema<undefined>;
|
|
259
|
+
}, undefined>, undefined>;
|
|
260
|
+
}, undefined>;
|
|
261
|
+
export type PublicPipelineList = v.InferOutput<typeof publicPipelineListSchema>;
|
|
142
262
|
//# sourceMappingURL=public-api.d.ts.map
|
package/dist/public-api.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public-api.d.ts","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAmB5B,+BAA+B;AAC/B,eAAO,MAAM,yBAAyB;IACpC,wEAAwE;;IAExE,iEAAiE;;IAEjE,kFAAkF;;aAElF,CAAA;AACF,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,yBAAyB,CAAC,CAAA;AAEtF;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,iEAAiD,CAAA;AACnF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEzE,2EAA2E;AAC3E,eAAO,MAAM,qBAAqB;IAChC,kDAAkD;;IAElD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9E;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB;;;aAGjC,CAAA;AACF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAMhF;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,iFAAiE,CAAA;AACnG,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEzE,uFAAuF;AACvF,eAAO,MAAM,mBAAmB;IAC9B,sFAAsF;;IAEtF,4EAA4E;;IAE5E,kCAAkC;;IAElC,gFAAgF;;;;;;aAIhF,CAAA;AACF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAErE;;;;;GAKG;AACH,eAAO,MAAM,eAAe;;;;;IAK1B,iDAAiD;;;QAxBjD,sFAAsF;;QAEtF,4EAA4E;;QAE5E,kCAAkC;;QAElC,gFAAgF;;;;;;;IAqBhF,8DAA8D;;;;;IAE9D,sFAAsF;;;;;aAEtF,CAAA;AACF,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,eAAe,CAAC,CAAA;AAM7D;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB;;;IAG/B,6DAA6D;;IAE7D;;;OAGG;;IAEH;;;;OAIG;;aAEH,CAAA;AACF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAEvE,eAAO,MAAM,wBAAwB;;;;QAhBnC,6DAA6D;;QAE7D;;;WAGG;;QAEH;;;;WAIG;;;aAKyF,CAAA;AAC9F,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,wBAAwB,CAAC,CAAA"}
|
package/dist/public-api.js
CHANGED
|
@@ -117,4 +117,83 @@ export const createPublicTaskSchema = v.object({
|
|
|
117
117
|
export const startPublicTaskSchema = v.object({
|
|
118
118
|
pipelineId: v.optional(v.pipe(v.string(), v.trim(), v.minLength(1), v.maxLength(120))),
|
|
119
119
|
});
|
|
120
|
+
/**
|
|
121
|
+
* Edit a task's mutable fields (typically before it runs) — the external counterpart of the
|
|
122
|
+
* SPA's inline title/description edit. Deliberately narrower than the internal `updateBlock`
|
|
123
|
+
* patch (which also carries model/risk/pipeline pins and board-layout knobs that have no
|
|
124
|
+
* external meaning): the public surface exposes only the two human-authored fields, so it
|
|
125
|
+
* stays small and stable. Both fields are optional; an empty patch is a harmless no-op.
|
|
126
|
+
*/
|
|
127
|
+
export const updatePublicTaskSchema = v.object({
|
|
128
|
+
title: v.optional(v.pipe(v.string(), v.trim(), v.minLength(1), v.maxLength(200))),
|
|
129
|
+
description: v.optional(v.pipe(v.string(), v.trim(), v.maxLength(2000))),
|
|
130
|
+
});
|
|
131
|
+
// ---------------------------------------------------------------------------
|
|
132
|
+
// Richer run projection + live stream (the task-lifecycle surface).
|
|
133
|
+
// ---------------------------------------------------------------------------
|
|
134
|
+
/**
|
|
135
|
+
* A task run's status as exposed externally. Mirrors the internal `ExecutionStatus`
|
|
136
|
+
* members but is a DECOUPLED public type, so the external contract stays stable if the
|
|
137
|
+
* engine ever adds an internal status. Unlike the coarse initiative-job status
|
|
138
|
+
* (`running`/`succeeded`/`failed`), the richer run view surfaces the parked states a
|
|
139
|
+
* caller may want to react to (`blocked` = awaiting a human, `paused` = spend-gated).
|
|
140
|
+
*/
|
|
141
|
+
export const publicRunStatusSchema = v.picklist(['running', 'blocked', 'paused', 'done', 'failed']);
|
|
142
|
+
/** A single step of a task run — a small projection of the internal `PipelineStep`. */
|
|
143
|
+
export const publicRunStepSchema = v.object({
|
|
144
|
+
/** The step's agent kind (`architect`, `coder`, `ci`, `merger`, a custom kind, …). */
|
|
145
|
+
agentKind: v.string(),
|
|
146
|
+
/** Lifecycle state: `pending` → `working` → `waiting_decision` → `done`. */
|
|
147
|
+
state: v.picklist(['pending', 'working', 'waiting_decision', 'done']),
|
|
148
|
+
/** 0..1 progress of this step. */
|
|
149
|
+
progress: v.number(),
|
|
150
|
+
/** Live subtask counts while an async (container) step runs; null when none. */
|
|
151
|
+
subtasks: v.nullable(v.object({ completed: v.number(), inProgress: v.number(), total: v.number() })),
|
|
152
|
+
});
|
|
153
|
+
/**
|
|
154
|
+
* The rich external view of a task's run — per-step status/progress/subtasks, the failure
|
|
155
|
+
* kind+message, and the PR the run opened (url + branch). A larger projection than the
|
|
156
|
+
* coarse `publicJob`, deliberately scoped to a BOARD task run (created/owned via the public
|
|
157
|
+
* task surface), never a headless initiative job or a raw `ExecutionInstance`.
|
|
158
|
+
*/
|
|
159
|
+
export const publicRunSchema = v.object({
|
|
160
|
+
runId: v.string(),
|
|
161
|
+
taskId: v.string(),
|
|
162
|
+
status: publicRunStatusSchema,
|
|
163
|
+
createdAt: v.number(),
|
|
164
|
+
/** Index of the step the run is currently on. */
|
|
165
|
+
currentStep: v.number(),
|
|
166
|
+
steps: v.array(publicRunStepSchema),
|
|
167
|
+
/** The PR the run opened, once one exists; null otherwise. */
|
|
168
|
+
pullRequest: v.nullable(v.object({ url: v.string(), branch: v.nullable(v.string()) })),
|
|
169
|
+
/** Present when `status` is `failed` (the failure kind + message); null otherwise. */
|
|
170
|
+
error: v.nullable(v.object({ code: v.string(), message: v.string() })),
|
|
171
|
+
});
|
|
172
|
+
// ---------------------------------------------------------------------------
|
|
173
|
+
// Pipeline discovery.
|
|
174
|
+
// ---------------------------------------------------------------------------
|
|
175
|
+
/**
|
|
176
|
+
* A pipeline as exposed externally — enough to pick a `pipelineId` for `start` and know
|
|
177
|
+
* whether it is safe to run headlessly. Closes the gap where `start` demands a `pipelineId`
|
|
178
|
+
* for an unpinned task yet nothing lists the valid ids. A small projection of the internal
|
|
179
|
+
* `Pipeline` (its id/name + the enabled step chain), plus the two headless-relevant flags.
|
|
180
|
+
*/
|
|
181
|
+
export const publicPipelineSchema = v.object({
|
|
182
|
+
pipelineId: v.string(),
|
|
183
|
+
name: v.string(),
|
|
184
|
+
/** The enabled step chain, in order (each an agent kind). */
|
|
185
|
+
steps: v.array(v.string()),
|
|
186
|
+
/**
|
|
187
|
+
* Whether this pipeline is exposed as a PUBLIC initiative pipeline (`POST /initiatives`).
|
|
188
|
+
* A non-public pipeline can still back a board task `start` when pinned or passed by id.
|
|
189
|
+
*/
|
|
190
|
+
public: v.boolean(),
|
|
191
|
+
/**
|
|
192
|
+
* Whether the pipeline is safe to run headlessly (every enabled step is inline — no
|
|
193
|
+
* container/GitHub push — and none parks on a human gate). A headless-startable pipeline
|
|
194
|
+
* can be driven end-to-end with no interactive user; others may park awaiting input.
|
|
195
|
+
*/
|
|
196
|
+
headlessStartable: v.boolean(),
|
|
197
|
+
});
|
|
198
|
+
export const publicPipelineListSchema = v.object({ pipelines: v.array(publicPipelineSchema) });
|
|
120
199
|
//# sourceMappingURL=public-api.js.map
|
package/dist/public-api.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public-api.js","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAC5B,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAEvF,8EAA8E;AAC9E,0EAA0E;AAC1E,EAAE;AACF,iFAAiF;AACjF,kFAAkF;AAClF,gFAAgF;AAChF,+EAA+E;AAC/E,uBAAuB;AACvB,EAAE;AACF,+EAA+E;AAC/E,8EAA8E;AAC9E,2EAA2E;AAC3E,mFAAmF;AACnF,qFAAqF;AACrF,8EAA8E;AAE9E,+BAA+B;AAC/B,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChD,wEAAwE;IACxE,UAAU,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,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,WAAW,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC;IACtF,sFAAsF;IACtF,KAAK,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;CACvE,CAAC,CAAA;AAGF,8EAA8E;AAC9E,sBAAsB;AACtB,8EAA8E;AAE9E;;;;;GAKG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,6DAA6D;IAC7D,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAC1B;;;OAGG;IACH,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE;IACnB;;;;OAIG;IACH,iBAAiB,EAAE,CAAC,CAAC,OAAO,EAAE;CAC/B,CAAC,CAAA;AAGF,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,oBAAoB,CAAC,EAAE,CAAC,CAAA"}
|
|
@@ -431,4 +431,242 @@ export declare const startPublicTaskContract: {
|
|
|
431
431
|
}, undefined>;
|
|
432
432
|
};
|
|
433
433
|
};
|
|
434
|
+
/** Edit a task's title/description (pre-start edits). */
|
|
435
|
+
export declare const updatePublicTaskContract: {
|
|
436
|
+
readonly method: "patch";
|
|
437
|
+
readonly requestPathParamsSchema: import("valibot").ObjectSchema<{
|
|
438
|
+
taskId: import("valibot").StringSchema<undefined>;
|
|
439
|
+
}, undefined> & import("@toad-contracts/core").StandardObjectKeysV1<unknown, unknown>;
|
|
440
|
+
readonly pathResolver: ({ taskId }: {
|
|
441
|
+
taskId: string;
|
|
442
|
+
}) => string;
|
|
443
|
+
readonly requestBodySchema: import("valibot").ObjectSchema<{
|
|
444
|
+
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>;
|
|
445
|
+
readonly description: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").TrimAction, import("valibot").MaxLengthAction<string, 2000, undefined>]>, undefined>;
|
|
446
|
+
}, undefined>;
|
|
447
|
+
readonly responsesByStatusCode: {
|
|
448
|
+
readonly '4xx': import("valibot").ObjectSchema<{
|
|
449
|
+
readonly error: import("valibot").ObjectSchema<{
|
|
450
|
+
readonly code: import("valibot").StringSchema<undefined>;
|
|
451
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
452
|
+
readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
|
|
453
|
+
readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
|
|
454
|
+
readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
455
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
456
|
+
}, undefined>, undefined>, undefined>;
|
|
457
|
+
}, undefined>;
|
|
458
|
+
}, undefined>;
|
|
459
|
+
readonly '5xx': import("valibot").ObjectSchema<{
|
|
460
|
+
readonly error: import("valibot").ObjectSchema<{
|
|
461
|
+
readonly code: import("valibot").StringSchema<undefined>;
|
|
462
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
463
|
+
readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
|
|
464
|
+
readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
|
|
465
|
+
readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
466
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
467
|
+
}, undefined>, undefined>, undefined>;
|
|
468
|
+
}, undefined>;
|
|
469
|
+
}, undefined>;
|
|
470
|
+
readonly 200: import("valibot").ObjectSchema<{
|
|
471
|
+
readonly taskId: import("valibot").StringSchema<undefined>;
|
|
472
|
+
readonly serviceId: import("valibot").StringSchema<undefined>;
|
|
473
|
+
readonly title: import("valibot").StringSchema<undefined>;
|
|
474
|
+
readonly description: import("valibot").StringSchema<undefined>;
|
|
475
|
+
readonly taskType: import("valibot").PicklistSchema<["feature", "bug", "document", "spike", "review", "recurring"], undefined>;
|
|
476
|
+
readonly status: import("valibot").PicklistSchema<["planned", "ready", "in_progress", "blocked", "pr_ready", "done"], undefined>;
|
|
477
|
+
readonly progress: import("valibot").NumberSchema<undefined>;
|
|
478
|
+
readonly executionId: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
479
|
+
readonly pullRequestUrl: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
480
|
+
}, undefined>;
|
|
481
|
+
};
|
|
482
|
+
};
|
|
483
|
+
/** Stop a task's in-flight run (records a `cancelled` terminal state, leaving it retryable). */
|
|
484
|
+
export declare const stopPublicTaskContract: {
|
|
485
|
+
readonly method: "post";
|
|
486
|
+
readonly requestPathParamsSchema: import("valibot").ObjectSchema<{
|
|
487
|
+
taskId: import("valibot").StringSchema<undefined>;
|
|
488
|
+
}, undefined> & import("@toad-contracts/core").StandardObjectKeysV1<unknown, unknown>;
|
|
489
|
+
readonly pathResolver: ({ taskId }: {
|
|
490
|
+
taskId: string;
|
|
491
|
+
}) => string;
|
|
492
|
+
readonly requestBodySchema: typeof ContractNoBody;
|
|
493
|
+
readonly responsesByStatusCode: {
|
|
494
|
+
readonly '4xx': import("valibot").ObjectSchema<{
|
|
495
|
+
readonly error: import("valibot").ObjectSchema<{
|
|
496
|
+
readonly code: import("valibot").StringSchema<undefined>;
|
|
497
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
498
|
+
readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
|
|
499
|
+
readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
|
|
500
|
+
readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
501
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
502
|
+
}, undefined>, undefined>, undefined>;
|
|
503
|
+
}, undefined>;
|
|
504
|
+
}, undefined>;
|
|
505
|
+
readonly '5xx': import("valibot").ObjectSchema<{
|
|
506
|
+
readonly error: import("valibot").ObjectSchema<{
|
|
507
|
+
readonly code: import("valibot").StringSchema<undefined>;
|
|
508
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
509
|
+
readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
|
|
510
|
+
readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
|
|
511
|
+
readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
512
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
513
|
+
}, undefined>, undefined>, undefined>;
|
|
514
|
+
}, undefined>;
|
|
515
|
+
}, undefined>;
|
|
516
|
+
readonly 200: import("valibot").ObjectSchema<{
|
|
517
|
+
readonly taskId: import("valibot").StringSchema<undefined>;
|
|
518
|
+
readonly serviceId: import("valibot").StringSchema<undefined>;
|
|
519
|
+
readonly title: import("valibot").StringSchema<undefined>;
|
|
520
|
+
readonly description: import("valibot").StringSchema<undefined>;
|
|
521
|
+
readonly taskType: import("valibot").PicklistSchema<["feature", "bug", "document", "spike", "review", "recurring"], undefined>;
|
|
522
|
+
readonly status: import("valibot").PicklistSchema<["planned", "ready", "in_progress", "blocked", "pr_ready", "done"], undefined>;
|
|
523
|
+
readonly progress: import("valibot").NumberSchema<undefined>;
|
|
524
|
+
readonly executionId: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
525
|
+
readonly pullRequestUrl: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
526
|
+
}, undefined>;
|
|
527
|
+
};
|
|
528
|
+
};
|
|
529
|
+
/** Retry a task's failed run. */
|
|
530
|
+
export declare const retryPublicTaskContract: {
|
|
531
|
+
readonly method: "post";
|
|
532
|
+
readonly requestPathParamsSchema: import("valibot").ObjectSchema<{
|
|
533
|
+
taskId: import("valibot").StringSchema<undefined>;
|
|
534
|
+
}, undefined> & import("@toad-contracts/core").StandardObjectKeysV1<unknown, unknown>;
|
|
535
|
+
readonly pathResolver: ({ taskId }: {
|
|
536
|
+
taskId: string;
|
|
537
|
+
}) => string;
|
|
538
|
+
readonly requestBodySchema: typeof ContractNoBody;
|
|
539
|
+
readonly responsesByStatusCode: {
|
|
540
|
+
readonly '4xx': import("valibot").ObjectSchema<{
|
|
541
|
+
readonly error: import("valibot").ObjectSchema<{
|
|
542
|
+
readonly code: import("valibot").StringSchema<undefined>;
|
|
543
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
544
|
+
readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
|
|
545
|
+
readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
|
|
546
|
+
readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
547
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
548
|
+
}, undefined>, undefined>, undefined>;
|
|
549
|
+
}, undefined>;
|
|
550
|
+
}, undefined>;
|
|
551
|
+
readonly '5xx': import("valibot").ObjectSchema<{
|
|
552
|
+
readonly error: import("valibot").ObjectSchema<{
|
|
553
|
+
readonly code: import("valibot").StringSchema<undefined>;
|
|
554
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
555
|
+
readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
|
|
556
|
+
readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
|
|
557
|
+
readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
558
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
559
|
+
}, undefined>, undefined>, undefined>;
|
|
560
|
+
}, undefined>;
|
|
561
|
+
}, undefined>;
|
|
562
|
+
readonly 202: import("valibot").ObjectSchema<{
|
|
563
|
+
readonly taskId: import("valibot").StringSchema<undefined>;
|
|
564
|
+
readonly serviceId: import("valibot").StringSchema<undefined>;
|
|
565
|
+
readonly title: import("valibot").StringSchema<undefined>;
|
|
566
|
+
readonly description: import("valibot").StringSchema<undefined>;
|
|
567
|
+
readonly taskType: import("valibot").PicklistSchema<["feature", "bug", "document", "spike", "review", "recurring"], undefined>;
|
|
568
|
+
readonly status: import("valibot").PicklistSchema<["planned", "ready", "in_progress", "blocked", "pr_ready", "done"], undefined>;
|
|
569
|
+
readonly progress: import("valibot").NumberSchema<undefined>;
|
|
570
|
+
readonly executionId: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
571
|
+
readonly pullRequestUrl: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
572
|
+
}, undefined>;
|
|
573
|
+
};
|
|
574
|
+
};
|
|
575
|
+
/** Read a task's rich run projection (per-step status, subtasks, failure, PR branch). */
|
|
576
|
+
export declare const getPublicRunContract: {
|
|
577
|
+
readonly method: "get";
|
|
578
|
+
readonly requestPathParamsSchema: import("valibot").ObjectSchema<{
|
|
579
|
+
taskId: import("valibot").StringSchema<undefined>;
|
|
580
|
+
}, undefined> & import("@toad-contracts/core").StandardObjectKeysV1<unknown, unknown>;
|
|
581
|
+
readonly pathResolver: ({ taskId }: {
|
|
582
|
+
taskId: string;
|
|
583
|
+
}) => string;
|
|
584
|
+
readonly responsesByStatusCode: {
|
|
585
|
+
readonly '4xx': import("valibot").ObjectSchema<{
|
|
586
|
+
readonly error: import("valibot").ObjectSchema<{
|
|
587
|
+
readonly code: import("valibot").StringSchema<undefined>;
|
|
588
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
589
|
+
readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
|
|
590
|
+
readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
|
|
591
|
+
readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
592
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
593
|
+
}, undefined>, undefined>, undefined>;
|
|
594
|
+
}, undefined>;
|
|
595
|
+
}, undefined>;
|
|
596
|
+
readonly '5xx': import("valibot").ObjectSchema<{
|
|
597
|
+
readonly error: import("valibot").ObjectSchema<{
|
|
598
|
+
readonly code: import("valibot").StringSchema<undefined>;
|
|
599
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
600
|
+
readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
|
|
601
|
+
readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
|
|
602
|
+
readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
603
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
604
|
+
}, undefined>, undefined>, undefined>;
|
|
605
|
+
}, undefined>;
|
|
606
|
+
}, undefined>;
|
|
607
|
+
readonly 200: import("valibot").ObjectSchema<{
|
|
608
|
+
readonly runId: import("valibot").StringSchema<undefined>;
|
|
609
|
+
readonly taskId: import("valibot").StringSchema<undefined>;
|
|
610
|
+
readonly status: import("valibot").PicklistSchema<["running", "blocked", "paused", "done", "failed"], undefined>;
|
|
611
|
+
readonly createdAt: import("valibot").NumberSchema<undefined>;
|
|
612
|
+
readonly currentStep: import("valibot").NumberSchema<undefined>;
|
|
613
|
+
readonly steps: import("valibot").ArraySchema<import("valibot").ObjectSchema<{
|
|
614
|
+
readonly agentKind: import("valibot").StringSchema<undefined>;
|
|
615
|
+
readonly state: import("valibot").PicklistSchema<["pending", "working", "waiting_decision", "done"], undefined>;
|
|
616
|
+
readonly progress: import("valibot").NumberSchema<undefined>;
|
|
617
|
+
readonly subtasks: import("valibot").NullableSchema<import("valibot").ObjectSchema<{
|
|
618
|
+
readonly completed: import("valibot").NumberSchema<undefined>;
|
|
619
|
+
readonly inProgress: import("valibot").NumberSchema<undefined>;
|
|
620
|
+
readonly total: import("valibot").NumberSchema<undefined>;
|
|
621
|
+
}, undefined>, undefined>;
|
|
622
|
+
}, undefined>, undefined>;
|
|
623
|
+
readonly pullRequest: import("valibot").NullableSchema<import("valibot").ObjectSchema<{
|
|
624
|
+
readonly url: import("valibot").StringSchema<undefined>;
|
|
625
|
+
readonly branch: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
626
|
+
}, undefined>, undefined>;
|
|
627
|
+
readonly error: import("valibot").NullableSchema<import("valibot").ObjectSchema<{
|
|
628
|
+
readonly code: import("valibot").StringSchema<undefined>;
|
|
629
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
630
|
+
}, undefined>, undefined>;
|
|
631
|
+
}, undefined>;
|
|
632
|
+
};
|
|
633
|
+
};
|
|
634
|
+
/** List the workspace's pipelines (id/name/steps + a headless-startable flag). */
|
|
635
|
+
export declare const listPublicPipelinesContract: {
|
|
636
|
+
readonly method: "get";
|
|
637
|
+
readonly pathResolver: () => string;
|
|
638
|
+
readonly responsesByStatusCode: {
|
|
639
|
+
readonly '4xx': import("valibot").ObjectSchema<{
|
|
640
|
+
readonly error: import("valibot").ObjectSchema<{
|
|
641
|
+
readonly code: import("valibot").StringSchema<undefined>;
|
|
642
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
643
|
+
readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
|
|
644
|
+
readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
|
|
645
|
+
readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
646
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
647
|
+
}, undefined>, undefined>, undefined>;
|
|
648
|
+
}, undefined>;
|
|
649
|
+
}, undefined>;
|
|
650
|
+
readonly '5xx': import("valibot").ObjectSchema<{
|
|
651
|
+
readonly error: import("valibot").ObjectSchema<{
|
|
652
|
+
readonly code: import("valibot").StringSchema<undefined>;
|
|
653
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
654
|
+
readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
|
|
655
|
+
readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
|
|
656
|
+
readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
657
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
658
|
+
}, undefined>, undefined>, undefined>;
|
|
659
|
+
}, undefined>;
|
|
660
|
+
}, undefined>;
|
|
661
|
+
readonly 200: import("valibot").ObjectSchema<{
|
|
662
|
+
readonly pipelines: import("valibot").ArraySchema<import("valibot").ObjectSchema<{
|
|
663
|
+
readonly pipelineId: import("valibot").StringSchema<undefined>;
|
|
664
|
+
readonly name: import("valibot").StringSchema<undefined>;
|
|
665
|
+
readonly steps: import("valibot").ArraySchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
666
|
+
readonly public: import("valibot").BooleanSchema<undefined>;
|
|
667
|
+
readonly headlessStartable: import("valibot").BooleanSchema<undefined>;
|
|
668
|
+
}, undefined>, undefined>;
|
|
669
|
+
}, undefined>;
|
|
670
|
+
};
|
|
671
|
+
};
|
|
434
672
|
//# sourceMappingURL=public-api.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public-api.d.ts","sourceRoot":"","sources":["../../src/routes/public-api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAqB,MAAM,yBAAyB,CAAA;
|
|
1
|
+
{"version":3,"file":"public-api.d.ts","sourceRoot":"","sources":["../../src/routes/public-api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAqB,MAAM,yBAAyB,CAAA;AAuC3E,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIpC,CAAA;AAEF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKrC,CAAA;AAEF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKrC,CAAA;AAIF,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKtC,CAAA;AAEF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAK/B,CAAA;AAIF,4DAA4D;AAC5D,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIrC,CAAA;AAEF,qCAAqC;AACrC,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMnC,CAAA;AAEF,0FAA0F;AAC1F,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKzC,CAAA;AAEF,2BAA2B;AAC3B,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKhC,CAAA;AAEF,0BAA0B;AAC1B,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMlC,CAAA;AAEF,yDAAyD;AACzD,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMnC,CAAA;AAEF,gGAAgG;AAChG,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMjC,CAAA;AAEF,iCAAiC;AACjC,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMlC,CAAA;AAEF,yFAAyF;AACzF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAK/B,CAAA;AAIF,kFAAkF;AAClF,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAItC,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ContractNoBody, defineApiContract } from '@toad-contracts/valibot';
|
|
2
2
|
import { createPublicApiKeySchema, createdPublicApiKeySchema, publicApiKeyListResultSchema, } from '../public-api-keys.js';
|
|
3
|
-
import { createInitiativeJobSchema, createPublicTaskSchema, initiativeAcceptedSchema, publicJobSchema, publicServiceListSchema, publicTaskListSchema, publicTaskSchema, startPublicTaskSchema, } from '../public-api.js';
|
|
3
|
+
import { createInitiativeJobSchema, createPublicTaskSchema, initiativeAcceptedSchema, publicJobSchema, publicPipelineListSchema, publicRunSchema, publicServiceListSchema, publicTaskListSchema, publicTaskSchema, startPublicTaskSchema, updatePublicTaskSchema, } from '../public-api.js';
|
|
4
4
|
import { errorResponses, singleStringParam } from './_shared.js';
|
|
5
5
|
// ---------------------------------------------------------------------------
|
|
6
6
|
// Public-API route contracts. Two surfaces:
|
|
@@ -84,4 +84,42 @@ export const startPublicTaskContract = defineApiContract({
|
|
|
84
84
|
requestBodySchema: startPublicTaskSchema,
|
|
85
85
|
responsesByStatusCode: { 202: publicTaskSchema, ...errorResponses },
|
|
86
86
|
});
|
|
87
|
+
/** Edit a task's title/description (pre-start edits). */
|
|
88
|
+
export const updatePublicTaskContract = defineApiContract({
|
|
89
|
+
method: 'patch',
|
|
90
|
+
requestPathParamsSchema: taskIdParams,
|
|
91
|
+
pathResolver: ({ taskId }) => `/api/v1/tasks/${taskId}`,
|
|
92
|
+
requestBodySchema: updatePublicTaskSchema,
|
|
93
|
+
responsesByStatusCode: { 200: publicTaskSchema, ...errorResponses },
|
|
94
|
+
});
|
|
95
|
+
/** Stop a task's in-flight run (records a `cancelled` terminal state, leaving it retryable). */
|
|
96
|
+
export const stopPublicTaskContract = defineApiContract({
|
|
97
|
+
method: 'post',
|
|
98
|
+
requestPathParamsSchema: taskIdParams,
|
|
99
|
+
pathResolver: ({ taskId }) => `/api/v1/tasks/${taskId}/stop`,
|
|
100
|
+
requestBodySchema: ContractNoBody,
|
|
101
|
+
responsesByStatusCode: { 200: publicTaskSchema, ...errorResponses },
|
|
102
|
+
});
|
|
103
|
+
/** Retry a task's failed run. */
|
|
104
|
+
export const retryPublicTaskContract = defineApiContract({
|
|
105
|
+
method: 'post',
|
|
106
|
+
requestPathParamsSchema: taskIdParams,
|
|
107
|
+
pathResolver: ({ taskId }) => `/api/v1/tasks/${taskId}/retry`,
|
|
108
|
+
requestBodySchema: ContractNoBody,
|
|
109
|
+
responsesByStatusCode: { 202: publicTaskSchema, ...errorResponses },
|
|
110
|
+
});
|
|
111
|
+
/** Read a task's rich run projection (per-step status, subtasks, failure, PR branch). */
|
|
112
|
+
export const getPublicRunContract = defineApiContract({
|
|
113
|
+
method: 'get',
|
|
114
|
+
requestPathParamsSchema: taskIdParams,
|
|
115
|
+
pathResolver: ({ taskId }) => `/api/v1/tasks/${taskId}/run`,
|
|
116
|
+
responsesByStatusCode: { 200: publicRunSchema, ...errorResponses },
|
|
117
|
+
});
|
|
118
|
+
// ---- pipeline discovery (key-authenticated) --------------------------------
|
|
119
|
+
/** List the workspace's pipelines (id/name/steps + a headless-startable flag). */
|
|
120
|
+
export const listPublicPipelinesContract = defineApiContract({
|
|
121
|
+
method: 'get',
|
|
122
|
+
pathResolver: () => '/api/v1/pipelines',
|
|
123
|
+
responsesByStatusCode: { 200: publicPipelineListSchema, ...errorResponses },
|
|
124
|
+
});
|
|
87
125
|
//# sourceMappingURL=public-api.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public-api.js","sourceRoot":"","sources":["../../src/routes/public-api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC3E,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EACzB,4BAA4B,GAC7B,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EACL,yBAAyB,EACzB,sBAAsB,EACtB,wBAAwB,EACxB,eAAe,EACf,uBAAuB,EACvB,oBAAoB,EACpB,gBAAgB,EAChB,qBAAqB,
|
|
1
|
+
{"version":3,"file":"public-api.js","sourceRoot":"","sources":["../../src/routes/public-api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC3E,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EACzB,4BAA4B,GAC7B,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EACL,yBAAyB,EACzB,sBAAsB,EACtB,wBAAwB,EACxB,eAAe,EACf,wBAAwB,EACxB,eAAe,EACf,uBAAuB,EACvB,oBAAoB,EACpB,gBAAgB,EAChB,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAEhE,8EAA8E;AAC9E,4CAA4C;AAC5C,EAAE;AACF,gFAAgF;AAChF,iFAAiF;AACjF,mFAAmF;AACnF,8DAA8D;AAC9D,EAAE;AACF,6EAA6E;AAC7E,4EAA4E;AAC5E,8EAA8E;AAE9E,MAAM,QAAQ,GAAG,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