@sealant/api-contracts-next 0.0.0-next.0 → 0.39.0-next.682
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/LICENSE +202 -0
- package/dist/core-api/access-tokens.d.ts +126 -0
- package/dist/core-api/access-tokens.js +72 -0
- package/dist/core-api/budgets.d.ts +15 -0
- package/dist/core-api/budgets.js +13 -0
- package/dist/core-api/connected-accounts.d.ts +226 -0
- package/dist/core-api/connected-accounts.js +128 -0
- package/dist/core-api/control-plane.d.ts +1318 -0
- package/dist/core-api/control-plane.js +31 -0
- package/dist/core-api/github.d.ts +261 -0
- package/dist/core-api/github.js +153 -0
- package/dist/core-api/inference.d.ts +223 -0
- package/dist/core-api/inference.js +139 -0
- package/dist/core-api/oci-names.d.ts +21 -0
- package/dist/core-api/oci-names.js +44 -0
- package/dist/core-api/packages.d.ts +179 -0
- package/dist/core-api/packages.js +60 -0
- package/dist/core-api/profiles.d.ts +188 -0
- package/dist/core-api/profiles.js +88 -0
- package/dist/core-api/record-events.d.ts +209 -0
- package/dist/core-api/record-events.js +193 -0
- package/dist/core-api/registries.d.ts +106 -0
- package/dist/core-api/registries.js +85 -0
- package/dist/core-api/runs.d.ts +516 -0
- package/dist/core-api/runs.js +284 -0
- package/dist/core-api/sessions.d.ts +390 -0
- package/dist/core-api/sessions.js +264 -0
- package/dist/core-api/ssh-keys.d.ts +120 -0
- package/dist/core-api/ssh-keys.js +108 -0
- package/dist/core-api/system.d.ts +51 -0
- package/dist/core-api/system.js +41 -0
- package/dist/core-api/users.d.ts +71 -0
- package/dist/core-api/users.js +48 -0
- package/dist/core-api/workspaces.d.ts +1880 -0
- package/dist/core-api/workspaces.js +980 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +18 -0
- package/dist/workspace-environment.d.ts +124 -0
- package/dist/workspace-environment.js +259 -0
- package/package.json +31 -9
|
@@ -0,0 +1,516 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Run + execution-record wire contracts.
|
|
3
|
+
*
|
|
4
|
+
* A `run` is one harness execution; it owns the execution record (the telemetry log). These
|
|
5
|
+
* endpoints are the network face of the run-detail read path (RunRepo -> THIS contract -> apps/api ->
|
|
6
|
+
* SDK): register a run, read its metadata, list runs, update its terminal status, and read its
|
|
7
|
+
* record — timeline, byte-exact scrollback, and the provenance-honest loss report.
|
|
8
|
+
*
|
|
9
|
+
* Wire note: per-runtime monotonic uint64 sequences are carried as DECIMAL STRINGS (not JSON numbers)
|
|
10
|
+
* so values past 2^53 survive; the SDK and API layer convert to/from `bigint`.
|
|
11
|
+
*/
|
|
12
|
+
import { Schema } from "effect";
|
|
13
|
+
import { HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi";
|
|
14
|
+
import { BudgetExceededError } from "./budgets.js";
|
|
15
|
+
export declare const runStatusSchema: Schema.Literals<readonly ["queued", "running", "completed", "failed", "cancelled"]>;
|
|
16
|
+
export type RunStatusWire = typeof runStatusSchema.Type;
|
|
17
|
+
export declare const runModeSchema: Schema.Literals<readonly ["one-shot", "interactive"]>;
|
|
18
|
+
export type RunModeWire = typeof runModeSchema.Type;
|
|
19
|
+
export declare const ioStreamSchema: Schema.Literals<readonly ["stdout", "stderr", "pty"]>;
|
|
20
|
+
export type IoStreamWire = typeof ioStreamSchema.Type;
|
|
21
|
+
/** The one-shot harness invocation the control plane execs in the workspace. */
|
|
22
|
+
export declare const runCommandSchema: Schema.Struct<{
|
|
23
|
+
readonly executable: Schema.String;
|
|
24
|
+
readonly args: Schema.$Array<Schema.String>;
|
|
25
|
+
readonly cwd: Schema.optional<Schema.String>;
|
|
26
|
+
}>;
|
|
27
|
+
export type RunCommandWire = typeof runCommandSchema.Type;
|
|
28
|
+
export declare const runSchema: Schema.Struct<{
|
|
29
|
+
readonly runId: Schema.String;
|
|
30
|
+
readonly workspaceId: Schema.String;
|
|
31
|
+
readonly attemptId: Schema.optional<Schema.String>;
|
|
32
|
+
readonly ownerUserId: Schema.String;
|
|
33
|
+
readonly harnessId: Schema.String;
|
|
34
|
+
readonly mode: Schema.Literals<readonly ["one-shot", "interactive"]>;
|
|
35
|
+
readonly status: Schema.Literals<readonly ["queued", "running", "completed", "failed", "cancelled"]>;
|
|
36
|
+
readonly prompt: Schema.optional<Schema.String>;
|
|
37
|
+
/** The resolved invocation the control plane executed (server-side runs) — self-describing. */
|
|
38
|
+
readonly command: Schema.optional<Schema.Struct<{
|
|
39
|
+
readonly executable: Schema.String;
|
|
40
|
+
readonly args: Schema.$Array<Schema.String>;
|
|
41
|
+
readonly cwd: Schema.optional<Schema.String>;
|
|
42
|
+
}>>;
|
|
43
|
+
/** Opaque caller correlation bag, echoed verbatim (no platform semantics). */
|
|
44
|
+
readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
45
|
+
readonly exitCode: Schema.optional<Schema.Number>;
|
|
46
|
+
readonly errorMessage: Schema.optional<Schema.String>;
|
|
47
|
+
readonly startedAt: Schema.optional<Schema.String>;
|
|
48
|
+
readonly finishedAt: Schema.optional<Schema.String>;
|
|
49
|
+
readonly createdAt: Schema.String;
|
|
50
|
+
readonly updatedAt: Schema.String;
|
|
51
|
+
}>;
|
|
52
|
+
export type Run = typeof runSchema.Type;
|
|
53
|
+
export declare const runFileChangeSchema: Schema.Struct<{
|
|
54
|
+
readonly path: Schema.String;
|
|
55
|
+
readonly change: Schema.Literals<readonly ["added", "modified", "deleted", "renamed"]>;
|
|
56
|
+
readonly oldPath: Schema.optional<Schema.String>;
|
|
57
|
+
}>;
|
|
58
|
+
export type RunFileChangeWire = typeof runFileChangeSchema.Type;
|
|
59
|
+
export declare const createRunRequestSchema: Schema.Struct<{
|
|
60
|
+
readonly workspaceId: Schema.String;
|
|
61
|
+
readonly harnessId: Schema.String;
|
|
62
|
+
readonly ownerUserId: Schema.String;
|
|
63
|
+
readonly mode: Schema.optional<Schema.Literals<readonly ["one-shot", "interactive"]>>;
|
|
64
|
+
readonly prompt: Schema.optional<Schema.String>;
|
|
65
|
+
readonly attemptId: Schema.optional<Schema.String>;
|
|
66
|
+
readonly command: Schema.optional<Schema.Struct<{
|
|
67
|
+
readonly executable: Schema.String;
|
|
68
|
+
readonly args: Schema.$Array<Schema.String>;
|
|
69
|
+
readonly cwd: Schema.optional<Schema.String>;
|
|
70
|
+
}>>;
|
|
71
|
+
/** Opaque caller correlation bag ({ projectId, sessionId, ... }): stored + echoed, no semantics. */
|
|
72
|
+
readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
73
|
+
}>;
|
|
74
|
+
export type CreateRunRequest = typeof createRunRequestSchema.Type;
|
|
75
|
+
export declare const updateRunRequestSchema: Schema.Struct<{
|
|
76
|
+
/** The run's owner. Required by the control plane: an update that names no owner finds no run. */
|
|
77
|
+
readonly ownerUserId: Schema.optional<Schema.String>;
|
|
78
|
+
readonly status: Schema.optional<Schema.Literals<readonly ["queued", "running", "completed", "failed", "cancelled"]>>;
|
|
79
|
+
readonly exitCode: Schema.optional<Schema.Number>;
|
|
80
|
+
readonly errorMessage: Schema.optional<Schema.String>;
|
|
81
|
+
readonly diff: Schema.optional<Schema.String>;
|
|
82
|
+
readonly changedFiles: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
83
|
+
readonly path: Schema.String;
|
|
84
|
+
readonly change: Schema.Literals<readonly ["added", "modified", "deleted", "renamed"]>;
|
|
85
|
+
readonly oldPath: Schema.optional<Schema.String>;
|
|
86
|
+
}>>>;
|
|
87
|
+
/** The caller read the run's changes and the reading failed: nothing is known of them. */
|
|
88
|
+
readonly changesReadFailed: Schema.optional<Schema.Boolean>;
|
|
89
|
+
}>;
|
|
90
|
+
export type UpdateRunRequest = typeof updateRunRequestSchema.Type;
|
|
91
|
+
export declare const listRunsQuerySchema: Schema.Struct<{
|
|
92
|
+
readonly workspaceId: Schema.optional<Schema.String>;
|
|
93
|
+
readonly ownerUserId: Schema.optional<Schema.String>;
|
|
94
|
+
readonly status: Schema.optional<Schema.Literals<readonly ["queued", "running", "completed", "failed", "cancelled"]>>;
|
|
95
|
+
readonly limit: Schema.optional<Schema.String>;
|
|
96
|
+
}>;
|
|
97
|
+
export type ListRunsQuery = typeof listRunsQuerySchema.Type;
|
|
98
|
+
export declare const listRunsResponseSchema: Schema.Struct<{
|
|
99
|
+
readonly items: Schema.$Array<Schema.Struct<{
|
|
100
|
+
readonly runId: Schema.String;
|
|
101
|
+
readonly workspaceId: Schema.String;
|
|
102
|
+
readonly attemptId: Schema.optional<Schema.String>;
|
|
103
|
+
readonly ownerUserId: Schema.String;
|
|
104
|
+
readonly harnessId: Schema.String;
|
|
105
|
+
readonly mode: Schema.Literals<readonly ["one-shot", "interactive"]>;
|
|
106
|
+
readonly status: Schema.Literals<readonly ["queued", "running", "completed", "failed", "cancelled"]>;
|
|
107
|
+
readonly prompt: Schema.optional<Schema.String>;
|
|
108
|
+
/** The resolved invocation the control plane executed (server-side runs) — self-describing. */
|
|
109
|
+
readonly command: Schema.optional<Schema.Struct<{
|
|
110
|
+
readonly executable: Schema.String;
|
|
111
|
+
readonly args: Schema.$Array<Schema.String>;
|
|
112
|
+
readonly cwd: Schema.optional<Schema.String>;
|
|
113
|
+
}>>;
|
|
114
|
+
/** Opaque caller correlation bag, echoed verbatim (no platform semantics). */
|
|
115
|
+
readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
116
|
+
readonly exitCode: Schema.optional<Schema.Number>;
|
|
117
|
+
readonly errorMessage: Schema.optional<Schema.String>;
|
|
118
|
+
readonly startedAt: Schema.optional<Schema.String>;
|
|
119
|
+
readonly finishedAt: Schema.optional<Schema.String>;
|
|
120
|
+
readonly createdAt: Schema.String;
|
|
121
|
+
readonly updatedAt: Schema.String;
|
|
122
|
+
}>>;
|
|
123
|
+
}>;
|
|
124
|
+
export type ListRunsResponse = typeof listRunsResponseSchema.Type;
|
|
125
|
+
export declare const timelineEntrySchema: Schema.Struct<{
|
|
126
|
+
readonly eventId: Schema.String;
|
|
127
|
+
readonly sequence: Schema.String;
|
|
128
|
+
readonly kind: Schema.String;
|
|
129
|
+
readonly occurredAt: Schema.String;
|
|
130
|
+
readonly summary: Schema.String;
|
|
131
|
+
readonly ref: Schema.optional<Schema.Unknown>;
|
|
132
|
+
/** Correlation id of the producing process (attribution key for record views). */
|
|
133
|
+
readonly processId: Schema.optional<Schema.String>;
|
|
134
|
+
/** Numeric CaptureMethod / Confidence enums — how the fact was captured, per envelope. */
|
|
135
|
+
readonly captureMethod: Schema.Number;
|
|
136
|
+
readonly confidence: Schema.Number;
|
|
137
|
+
}>;
|
|
138
|
+
export type TimelineEntry = typeof timelineEntrySchema.Type;
|
|
139
|
+
/**
|
|
140
|
+
* Owner scoping on reads: the run must belong to `ownerUserId` (uniform 404 otherwise). The field
|
|
141
|
+
* stays optional on the wire for older callers, but the control plane requires it: a read that
|
|
142
|
+
* names no owner finds no run.
|
|
143
|
+
*/
|
|
144
|
+
export declare const runOwnerQuerySchema: Schema.Struct<{
|
|
145
|
+
readonly ownerUserId: Schema.optional<Schema.String>;
|
|
146
|
+
}>;
|
|
147
|
+
export type RunOwnerQuery = typeof runOwnerQuerySchema.Type;
|
|
148
|
+
export declare const getRunTimelineQuerySchema: Schema.Struct<{
|
|
149
|
+
readonly ownerUserId: Schema.optional<Schema.String>;
|
|
150
|
+
readonly fromSequence: Schema.optional<Schema.String>;
|
|
151
|
+
readonly toSequence: Schema.optional<Schema.String>;
|
|
152
|
+
readonly limit: Schema.optional<Schema.String>;
|
|
153
|
+
/**
|
|
154
|
+
* Comma-separated payload cases (e.g. `processStarted,processExited,fileChange`). Filters the
|
|
155
|
+
* timeline to those event kinds server-side — the read path for record views that must not pay
|
|
156
|
+
* for the ioChunk-dominated full log.
|
|
157
|
+
*/
|
|
158
|
+
readonly kinds: Schema.optional<Schema.String>;
|
|
159
|
+
}>;
|
|
160
|
+
export type GetRunTimelineQuery = typeof getRunTimelineQuerySchema.Type;
|
|
161
|
+
export declare const runTimelineResponseSchema: Schema.Struct<{
|
|
162
|
+
readonly items: Schema.$Array<Schema.Struct<{
|
|
163
|
+
readonly eventId: Schema.String;
|
|
164
|
+
readonly sequence: Schema.String;
|
|
165
|
+
readonly kind: Schema.String;
|
|
166
|
+
readonly occurredAt: Schema.String;
|
|
167
|
+
readonly summary: Schema.String;
|
|
168
|
+
readonly ref: Schema.optional<Schema.Unknown>;
|
|
169
|
+
/** Correlation id of the producing process (attribution key for record views). */
|
|
170
|
+
readonly processId: Schema.optional<Schema.String>;
|
|
171
|
+
/** Numeric CaptureMethod / Confidence enums — how the fact was captured, per envelope. */
|
|
172
|
+
readonly captureMethod: Schema.Number;
|
|
173
|
+
readonly confidence: Schema.Number;
|
|
174
|
+
}>>;
|
|
175
|
+
}>;
|
|
176
|
+
export type RunTimelineResponse = typeof runTimelineResponseSchema.Type;
|
|
177
|
+
/**
|
|
178
|
+
* One stored EventEnvelope, verbatim: correlation ids, both clocks, capture provenance, and the
|
|
179
|
+
* jsonb payload (bigints stringified at ingest). This is the drill-down read behind a timeline
|
|
180
|
+
* entry — the timeline carries the summary + ref, this carries the whole record.
|
|
181
|
+
*/
|
|
182
|
+
export declare const runEventSchema: Schema.Struct<{
|
|
183
|
+
readonly eventId: Schema.String;
|
|
184
|
+
readonly runId: Schema.String;
|
|
185
|
+
readonly runtimeId: Schema.String;
|
|
186
|
+
readonly executionId: Schema.optional<Schema.String>;
|
|
187
|
+
readonly sessionId: Schema.optional<Schema.String>;
|
|
188
|
+
readonly processId: Schema.optional<Schema.String>;
|
|
189
|
+
readonly requestId: Schema.optional<Schema.String>;
|
|
190
|
+
readonly schemaVersion: Schema.Number;
|
|
191
|
+
readonly sequence: Schema.String;
|
|
192
|
+
readonly observedAt: Schema.String;
|
|
193
|
+
readonly monotonicTimestamp: Schema.String;
|
|
194
|
+
readonly captureMethod: Schema.Number;
|
|
195
|
+
readonly confidence: Schema.Number;
|
|
196
|
+
readonly payloadCase: Schema.String;
|
|
197
|
+
readonly payload: Schema.Unknown;
|
|
198
|
+
readonly ingestedAt: Schema.String;
|
|
199
|
+
}>;
|
|
200
|
+
export type RunEvent = typeof runEventSchema.Type;
|
|
201
|
+
export declare const getRunScrollbackQuerySchema: Schema.Struct<{
|
|
202
|
+
readonly ownerUserId: Schema.optional<Schema.String>;
|
|
203
|
+
readonly processId: Schema.String;
|
|
204
|
+
readonly stream: Schema.Literals<readonly ["stdout", "stderr", "pty"]>;
|
|
205
|
+
readonly atSequence: Schema.optional<Schema.String>;
|
|
206
|
+
/** Inclusive lower sequence bound — with `atSequence` this selects a sequence RANGE. */
|
|
207
|
+
readonly fromSequence: Schema.optional<Schema.String>;
|
|
208
|
+
/** Maximum chunks to reconstruct (server default 5000). */
|
|
209
|
+
readonly limit: Schema.optional<Schema.String>;
|
|
210
|
+
}>;
|
|
211
|
+
export type GetRunScrollbackQuery = typeof getRunScrollbackQuerySchema.Type;
|
|
212
|
+
export declare const runScrollbackResponseSchema: Schema.Struct<{
|
|
213
|
+
readonly processId: Schema.String;
|
|
214
|
+
readonly stream: Schema.Literals<readonly ["stdout", "stderr", "pty"]>;
|
|
215
|
+
readonly byteCount: Schema.Number;
|
|
216
|
+
/** Base64-encoded reconstructed bytes (byte-exact as recorded; redaction happens upstream). */
|
|
217
|
+
readonly contentBase64: Schema.String;
|
|
218
|
+
}>;
|
|
219
|
+
export type RunScrollbackResponse = typeof runScrollbackResponseSchema.Type;
|
|
220
|
+
export declare const lossSpanSchema: Schema.Struct<{
|
|
221
|
+
readonly kind: Schema.Literals<readonly ["dropped_event", "sequence_gap", "watch_overflow", "early_close"]>;
|
|
222
|
+
readonly fromSequence: Schema.optional<Schema.String>;
|
|
223
|
+
readonly toSequence: Schema.optional<Schema.String>;
|
|
224
|
+
readonly droppedCount: Schema.optional<Schema.String>;
|
|
225
|
+
readonly detectedVia: Schema.Literals<readonly ["marker", "gap"]>;
|
|
226
|
+
readonly reason: Schema.optional<Schema.String>;
|
|
227
|
+
}>;
|
|
228
|
+
export type LossSpan = typeof lossSpanSchema.Type;
|
|
229
|
+
export declare const runLossReportSchema: Schema.Struct<{
|
|
230
|
+
readonly runId: Schema.String;
|
|
231
|
+
readonly droppedEventCount: Schema.String;
|
|
232
|
+
readonly sequenceGapCount: Schema.Number;
|
|
233
|
+
readonly watchOverflowCount: Schema.Number;
|
|
234
|
+
readonly earlyClose: Schema.Boolean;
|
|
235
|
+
readonly spans: Schema.$Array<Schema.Struct<{
|
|
236
|
+
readonly kind: Schema.Literals<readonly ["dropped_event", "sequence_gap", "watch_overflow", "early_close"]>;
|
|
237
|
+
readonly fromSequence: Schema.optional<Schema.String>;
|
|
238
|
+
readonly toSequence: Schema.optional<Schema.String>;
|
|
239
|
+
readonly droppedCount: Schema.optional<Schema.String>;
|
|
240
|
+
readonly detectedVia: Schema.Literals<readonly ["marker", "gap"]>;
|
|
241
|
+
readonly reason: Schema.optional<Schema.String>;
|
|
242
|
+
}>>;
|
|
243
|
+
}>;
|
|
244
|
+
export type RunLossReport = typeof runLossReportSchema.Type;
|
|
245
|
+
export declare const runChangesResponseSchema: Schema.Struct<{
|
|
246
|
+
readonly files: Schema.$Array<Schema.Struct<{
|
|
247
|
+
readonly path: Schema.String;
|
|
248
|
+
readonly change: Schema.Literals<readonly ["added", "modified", "deleted", "renamed"]>;
|
|
249
|
+
readonly oldPath: Schema.optional<Schema.String>;
|
|
250
|
+
}>>;
|
|
251
|
+
/** Unified diff of everything that changed (empty until the run has produced changes). */
|
|
252
|
+
readonly diff: Schema.String;
|
|
253
|
+
/**
|
|
254
|
+
* Whether the run's changes were read. `false`: they were not (the run has not ended, no
|
|
255
|
+
* reading ran for it, or the reading failed), and the empty `files` and `diff` say nothing
|
|
256
|
+
* about what changed. Absent from a control plane older than the field: read as `true`.
|
|
257
|
+
*/
|
|
258
|
+
readonly available: Schema.optional<Schema.Boolean>;
|
|
259
|
+
/** Why the changes are not available, when `available` is `false`. */
|
|
260
|
+
readonly unavailableReason: Schema.optional<Schema.String>;
|
|
261
|
+
}>;
|
|
262
|
+
export type RunChangesResponse = typeof runChangesResponseSchema.Type;
|
|
263
|
+
declare const RunBadRequestError_base: Schema.Class<RunBadRequestError, Schema.TaggedStruct<"RunBadRequestError", {
|
|
264
|
+
readonly message: Schema.String;
|
|
265
|
+
}>, import("effect/Cause").YieldableError>;
|
|
266
|
+
export declare class RunBadRequestError extends RunBadRequestError_base {
|
|
267
|
+
}
|
|
268
|
+
declare const RunNotFoundError_base: Schema.Class<RunNotFoundError, Schema.TaggedStruct<"RunNotFoundError", {
|
|
269
|
+
readonly message: Schema.String;
|
|
270
|
+
}>, import("effect/Cause").YieldableError>;
|
|
271
|
+
export declare class RunNotFoundError extends RunNotFoundError_base {
|
|
272
|
+
}
|
|
273
|
+
declare const RunInternalServerError_base: Schema.Class<RunInternalServerError, Schema.TaggedStruct<"RunInternalServerError", {
|
|
274
|
+
readonly message: Schema.String;
|
|
275
|
+
}>, import("effect/Cause").YieldableError>;
|
|
276
|
+
export declare class RunInternalServerError extends RunInternalServerError_base {
|
|
277
|
+
}
|
|
278
|
+
export declare const RunsGroup: HttpApiGroup.HttpApiGroup<"runs", HttpApiEndpoint.HttpApiEndpoint<"createRun", "POST", "/", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
279
|
+
readonly workspaceId: Schema.String;
|
|
280
|
+
readonly harnessId: Schema.String;
|
|
281
|
+
readonly ownerUserId: Schema.String;
|
|
282
|
+
readonly mode: Schema.optional<Schema.Literals<readonly ["one-shot", "interactive"]>>;
|
|
283
|
+
readonly prompt: Schema.optional<Schema.String>;
|
|
284
|
+
readonly attemptId: Schema.optional<Schema.String>;
|
|
285
|
+
readonly command: Schema.optional<Schema.Struct<{
|
|
286
|
+
readonly executable: Schema.String;
|
|
287
|
+
readonly args: Schema.$Array<Schema.String>;
|
|
288
|
+
readonly cwd: Schema.optional<Schema.String>;
|
|
289
|
+
}>>;
|
|
290
|
+
/** Opaque caller correlation bag ({ projectId, sessionId, ... }): stored + echoed, no semantics. */
|
|
291
|
+
readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
292
|
+
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
293
|
+
readonly runId: Schema.String;
|
|
294
|
+
readonly workspaceId: Schema.String;
|
|
295
|
+
readonly attemptId: Schema.optional<Schema.String>;
|
|
296
|
+
readonly ownerUserId: Schema.String;
|
|
297
|
+
readonly harnessId: Schema.String;
|
|
298
|
+
readonly mode: Schema.Literals<readonly ["one-shot", "interactive"]>;
|
|
299
|
+
readonly status: Schema.Literals<readonly ["queued", "running", "completed", "failed", "cancelled"]>;
|
|
300
|
+
readonly prompt: Schema.optional<Schema.String>;
|
|
301
|
+
/** The resolved invocation the control plane executed (server-side runs) — self-describing. */
|
|
302
|
+
readonly command: Schema.optional<Schema.Struct<{
|
|
303
|
+
readonly executable: Schema.String;
|
|
304
|
+
readonly args: Schema.$Array<Schema.String>;
|
|
305
|
+
readonly cwd: Schema.optional<Schema.String>;
|
|
306
|
+
}>>;
|
|
307
|
+
/** Opaque caller correlation bag, echoed verbatim (no platform semantics). */
|
|
308
|
+
readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
309
|
+
readonly exitCode: Schema.optional<Schema.Number>;
|
|
310
|
+
readonly errorMessage: Schema.optional<Schema.String>;
|
|
311
|
+
readonly startedAt: Schema.optional<Schema.String>;
|
|
312
|
+
readonly finishedAt: Schema.optional<Schema.String>;
|
|
313
|
+
readonly createdAt: Schema.String;
|
|
314
|
+
readonly updatedAt: Schema.String;
|
|
315
|
+
}>>, HttpApiEndpoint.Json<typeof BudgetExceededError | typeof RunBadRequestError | typeof RunNotFoundError | typeof RunInternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"getRun", "GET", "/:runId", HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
316
|
+
readonly runId: Schema.String;
|
|
317
|
+
}>>, HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
318
|
+
readonly ownerUserId: Schema.optional<Schema.String>;
|
|
319
|
+
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
320
|
+
readonly runId: Schema.String;
|
|
321
|
+
readonly workspaceId: Schema.String;
|
|
322
|
+
readonly attemptId: Schema.optional<Schema.String>;
|
|
323
|
+
readonly ownerUserId: Schema.String;
|
|
324
|
+
readonly harnessId: Schema.String;
|
|
325
|
+
readonly mode: Schema.Literals<readonly ["one-shot", "interactive"]>;
|
|
326
|
+
readonly status: Schema.Literals<readonly ["queued", "running", "completed", "failed", "cancelled"]>;
|
|
327
|
+
readonly prompt: Schema.optional<Schema.String>;
|
|
328
|
+
/** The resolved invocation the control plane executed (server-side runs) — self-describing. */
|
|
329
|
+
readonly command: Schema.optional<Schema.Struct<{
|
|
330
|
+
readonly executable: Schema.String;
|
|
331
|
+
readonly args: Schema.$Array<Schema.String>;
|
|
332
|
+
readonly cwd: Schema.optional<Schema.String>;
|
|
333
|
+
}>>;
|
|
334
|
+
/** Opaque caller correlation bag, echoed verbatim (no platform semantics). */
|
|
335
|
+
readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
336
|
+
readonly exitCode: Schema.optional<Schema.Number>;
|
|
337
|
+
readonly errorMessage: Schema.optional<Schema.String>;
|
|
338
|
+
readonly startedAt: Schema.optional<Schema.String>;
|
|
339
|
+
readonly finishedAt: Schema.optional<Schema.String>;
|
|
340
|
+
readonly createdAt: Schema.String;
|
|
341
|
+
readonly updatedAt: Schema.String;
|
|
342
|
+
}>>, HttpApiEndpoint.Json<typeof RunNotFoundError | typeof RunInternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"getRunChanges", "GET", "/:runId/changes", HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
343
|
+
readonly runId: Schema.String;
|
|
344
|
+
}>>, HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
345
|
+
readonly ownerUserId: Schema.optional<Schema.String>;
|
|
346
|
+
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
347
|
+
readonly files: Schema.$Array<Schema.Struct<{
|
|
348
|
+
readonly path: Schema.String;
|
|
349
|
+
readonly change: Schema.Literals<readonly ["added", "modified", "deleted", "renamed"]>;
|
|
350
|
+
readonly oldPath: Schema.optional<Schema.String>;
|
|
351
|
+
}>>;
|
|
352
|
+
/** Unified diff of everything that changed (empty until the run has produced changes). */
|
|
353
|
+
readonly diff: Schema.String;
|
|
354
|
+
/**
|
|
355
|
+
* Whether the run's changes were read. `false`: they were not (the run has not ended, no
|
|
356
|
+
* reading ran for it, or the reading failed), and the empty `files` and `diff` say nothing
|
|
357
|
+
* about what changed. Absent from a control plane older than the field: read as `true`.
|
|
358
|
+
*/
|
|
359
|
+
readonly available: Schema.optional<Schema.Boolean>;
|
|
360
|
+
/** Why the changes are not available, when `available` is `false`. */
|
|
361
|
+
readonly unavailableReason: Schema.optional<Schema.String>;
|
|
362
|
+
}>>, HttpApiEndpoint.Json<typeof RunNotFoundError | typeof RunInternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"getRunEvent", "GET", "/:runId/events/:sequence", HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
363
|
+
readonly runId: Schema.String;
|
|
364
|
+
readonly sequence: Schema.String;
|
|
365
|
+
}>>, HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
366
|
+
readonly ownerUserId: Schema.optional<Schema.String>;
|
|
367
|
+
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
368
|
+
readonly eventId: Schema.String;
|
|
369
|
+
readonly runId: Schema.String;
|
|
370
|
+
readonly runtimeId: Schema.String;
|
|
371
|
+
readonly executionId: Schema.optional<Schema.String>;
|
|
372
|
+
readonly sessionId: Schema.optional<Schema.String>;
|
|
373
|
+
readonly processId: Schema.optional<Schema.String>;
|
|
374
|
+
readonly requestId: Schema.optional<Schema.String>;
|
|
375
|
+
readonly schemaVersion: Schema.Number;
|
|
376
|
+
readonly sequence: Schema.String;
|
|
377
|
+
readonly observedAt: Schema.String;
|
|
378
|
+
readonly monotonicTimestamp: Schema.String;
|
|
379
|
+
readonly captureMethod: Schema.Number;
|
|
380
|
+
readonly confidence: Schema.Number;
|
|
381
|
+
readonly payloadCase: Schema.String;
|
|
382
|
+
readonly payload: Schema.Unknown;
|
|
383
|
+
readonly ingestedAt: Schema.String;
|
|
384
|
+
}>>, HttpApiEndpoint.Json<typeof RunBadRequestError | typeof RunNotFoundError | typeof RunInternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"getRunLoss", "GET", "/:runId/loss", HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
385
|
+
readonly runId: Schema.String;
|
|
386
|
+
}>>, HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
387
|
+
readonly ownerUserId: Schema.optional<Schema.String>;
|
|
388
|
+
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
389
|
+
readonly runId: Schema.String;
|
|
390
|
+
readonly droppedEventCount: Schema.String;
|
|
391
|
+
readonly sequenceGapCount: Schema.Number;
|
|
392
|
+
readonly watchOverflowCount: Schema.Number;
|
|
393
|
+
readonly earlyClose: Schema.Boolean;
|
|
394
|
+
readonly spans: Schema.$Array<Schema.Struct<{
|
|
395
|
+
readonly kind: Schema.Literals<readonly ["dropped_event", "sequence_gap", "watch_overflow", "early_close"]>;
|
|
396
|
+
readonly fromSequence: Schema.optional<Schema.String>;
|
|
397
|
+
readonly toSequence: Schema.optional<Schema.String>;
|
|
398
|
+
readonly droppedCount: Schema.optional<Schema.String>;
|
|
399
|
+
readonly detectedVia: Schema.Literals<readonly ["marker", "gap"]>;
|
|
400
|
+
readonly reason: Schema.optional<Schema.String>;
|
|
401
|
+
}>>;
|
|
402
|
+
}>>, HttpApiEndpoint.Json<typeof RunNotFoundError | typeof RunInternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"getRunScrollback", "GET", "/:runId/scrollback", HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
403
|
+
readonly runId: Schema.String;
|
|
404
|
+
}>>, HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
405
|
+
readonly ownerUserId: Schema.optional<Schema.String>;
|
|
406
|
+
readonly processId: Schema.String;
|
|
407
|
+
readonly stream: Schema.Literals<readonly ["stdout", "stderr", "pty"]>;
|
|
408
|
+
readonly atSequence: Schema.optional<Schema.String>;
|
|
409
|
+
/** Inclusive lower sequence bound — with `atSequence` this selects a sequence RANGE. */
|
|
410
|
+
readonly fromSequence: Schema.optional<Schema.String>;
|
|
411
|
+
/** Maximum chunks to reconstruct (server default 5000). */
|
|
412
|
+
readonly limit: Schema.optional<Schema.String>;
|
|
413
|
+
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
414
|
+
readonly processId: Schema.String;
|
|
415
|
+
readonly stream: Schema.Literals<readonly ["stdout", "stderr", "pty"]>;
|
|
416
|
+
readonly byteCount: Schema.Number;
|
|
417
|
+
/** Base64-encoded reconstructed bytes (byte-exact as recorded; redaction happens upstream). */
|
|
418
|
+
readonly contentBase64: Schema.String;
|
|
419
|
+
}>>, HttpApiEndpoint.Json<typeof RunBadRequestError | typeof RunNotFoundError | typeof RunInternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"getRunTimeline", "GET", "/:runId/timeline", HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
420
|
+
readonly runId: Schema.String;
|
|
421
|
+
}>>, HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
422
|
+
readonly ownerUserId: Schema.optional<Schema.String>;
|
|
423
|
+
readonly fromSequence: Schema.optional<Schema.String>;
|
|
424
|
+
readonly toSequence: Schema.optional<Schema.String>;
|
|
425
|
+
readonly limit: Schema.optional<Schema.String>;
|
|
426
|
+
/**
|
|
427
|
+
* Comma-separated payload cases (e.g. `processStarted,processExited,fileChange`). Filters the
|
|
428
|
+
* timeline to those event kinds server-side — the read path for record views that must not pay
|
|
429
|
+
* for the ioChunk-dominated full log.
|
|
430
|
+
*/
|
|
431
|
+
readonly kinds: Schema.optional<Schema.String>;
|
|
432
|
+
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
433
|
+
readonly items: Schema.$Array<Schema.Struct<{
|
|
434
|
+
readonly eventId: Schema.String;
|
|
435
|
+
readonly sequence: Schema.String;
|
|
436
|
+
readonly kind: Schema.String;
|
|
437
|
+
readonly occurredAt: Schema.String;
|
|
438
|
+
readonly summary: Schema.String;
|
|
439
|
+
readonly ref: Schema.optional<Schema.Unknown>;
|
|
440
|
+
/** Correlation id of the producing process (attribution key for record views). */
|
|
441
|
+
readonly processId: Schema.optional<Schema.String>;
|
|
442
|
+
/** Numeric CaptureMethod / Confidence enums — how the fact was captured, per envelope. */
|
|
443
|
+
readonly captureMethod: Schema.Number;
|
|
444
|
+
readonly confidence: Schema.Number;
|
|
445
|
+
}>>;
|
|
446
|
+
}>>, HttpApiEndpoint.Json<typeof RunBadRequestError | typeof RunNotFoundError | typeof RunInternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"listRuns", "GET", "/", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
447
|
+
readonly workspaceId: Schema.optional<Schema.String>;
|
|
448
|
+
readonly ownerUserId: Schema.optional<Schema.String>;
|
|
449
|
+
readonly status: Schema.optional<Schema.Literals<readonly ["queued", "running", "completed", "failed", "cancelled"]>>;
|
|
450
|
+
readonly limit: Schema.optional<Schema.String>;
|
|
451
|
+
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
452
|
+
readonly items: Schema.$Array<Schema.Struct<{
|
|
453
|
+
readonly runId: Schema.String;
|
|
454
|
+
readonly workspaceId: Schema.String;
|
|
455
|
+
readonly attemptId: Schema.optional<Schema.String>;
|
|
456
|
+
readonly ownerUserId: Schema.String;
|
|
457
|
+
readonly harnessId: Schema.String;
|
|
458
|
+
readonly mode: Schema.Literals<readonly ["one-shot", "interactive"]>;
|
|
459
|
+
readonly status: Schema.Literals<readonly ["queued", "running", "completed", "failed", "cancelled"]>;
|
|
460
|
+
readonly prompt: Schema.optional<Schema.String>;
|
|
461
|
+
/** The resolved invocation the control plane executed (server-side runs) — self-describing. */
|
|
462
|
+
readonly command: Schema.optional<Schema.Struct<{
|
|
463
|
+
readonly executable: Schema.String;
|
|
464
|
+
readonly args: Schema.$Array<Schema.String>;
|
|
465
|
+
readonly cwd: Schema.optional<Schema.String>;
|
|
466
|
+
}>>;
|
|
467
|
+
/** Opaque caller correlation bag, echoed verbatim (no platform semantics). */
|
|
468
|
+
readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
469
|
+
readonly exitCode: Schema.optional<Schema.Number>;
|
|
470
|
+
readonly errorMessage: Schema.optional<Schema.String>;
|
|
471
|
+
readonly startedAt: Schema.optional<Schema.String>;
|
|
472
|
+
readonly finishedAt: Schema.optional<Schema.String>;
|
|
473
|
+
readonly createdAt: Schema.String;
|
|
474
|
+
readonly updatedAt: Schema.String;
|
|
475
|
+
}>>;
|
|
476
|
+
}>>, HttpApiEndpoint.Json<typeof RunBadRequestError | typeof RunInternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"updateRun", "PATCH", "/:runId", HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
477
|
+
readonly runId: Schema.String;
|
|
478
|
+
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
479
|
+
/** The run's owner. Required by the control plane: an update that names no owner finds no run. */
|
|
480
|
+
readonly ownerUserId: Schema.optional<Schema.String>;
|
|
481
|
+
readonly status: Schema.optional<Schema.Literals<readonly ["queued", "running", "completed", "failed", "cancelled"]>>;
|
|
482
|
+
readonly exitCode: Schema.optional<Schema.Number>;
|
|
483
|
+
readonly errorMessage: Schema.optional<Schema.String>;
|
|
484
|
+
readonly diff: Schema.optional<Schema.String>;
|
|
485
|
+
readonly changedFiles: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
486
|
+
readonly path: Schema.String;
|
|
487
|
+
readonly change: Schema.Literals<readonly ["added", "modified", "deleted", "renamed"]>;
|
|
488
|
+
readonly oldPath: Schema.optional<Schema.String>;
|
|
489
|
+
}>>>;
|
|
490
|
+
/** The caller read the run's changes and the reading failed: nothing is known of them. */
|
|
491
|
+
readonly changesReadFailed: Schema.optional<Schema.Boolean>;
|
|
492
|
+
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
493
|
+
readonly runId: Schema.String;
|
|
494
|
+
readonly workspaceId: Schema.String;
|
|
495
|
+
readonly attemptId: Schema.optional<Schema.String>;
|
|
496
|
+
readonly ownerUserId: Schema.String;
|
|
497
|
+
readonly harnessId: Schema.String;
|
|
498
|
+
readonly mode: Schema.Literals<readonly ["one-shot", "interactive"]>;
|
|
499
|
+
readonly status: Schema.Literals<readonly ["queued", "running", "completed", "failed", "cancelled"]>;
|
|
500
|
+
readonly prompt: Schema.optional<Schema.String>;
|
|
501
|
+
/** The resolved invocation the control plane executed (server-side runs) — self-describing. */
|
|
502
|
+
readonly command: Schema.optional<Schema.Struct<{
|
|
503
|
+
readonly executable: Schema.String;
|
|
504
|
+
readonly args: Schema.$Array<Schema.String>;
|
|
505
|
+
readonly cwd: Schema.optional<Schema.String>;
|
|
506
|
+
}>>;
|
|
507
|
+
/** Opaque caller correlation bag, echoed verbatim (no platform semantics). */
|
|
508
|
+
readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
509
|
+
readonly exitCode: Schema.optional<Schema.Number>;
|
|
510
|
+
readonly errorMessage: Schema.optional<Schema.String>;
|
|
511
|
+
readonly startedAt: Schema.optional<Schema.String>;
|
|
512
|
+
readonly finishedAt: Schema.optional<Schema.String>;
|
|
513
|
+
readonly createdAt: Schema.String;
|
|
514
|
+
readonly updatedAt: Schema.String;
|
|
515
|
+
}>>, HttpApiEndpoint.Json<typeof RunBadRequestError | typeof RunNotFoundError | typeof RunInternalServerError>, never, never>, false>;
|
|
516
|
+
export {};
|