@cat-factory/sdk 0.5.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.
@@ -0,0 +1,795 @@
1
+ export interface CreatePublicJob {
2
+ /** Length 1..50000. */
3
+ input: string;
4
+ /** Length 1..∞. */
5
+ pipelineId: string;
6
+ /** Length 0..200. */
7
+ title?: string;
8
+ }
9
+ export interface CreatePublicTask {
10
+ /** Length 0..2000. */
11
+ description?: string;
12
+ taskType?: 'feature' | 'bug' | 'document' | 'spike' | 'review' | 'ralph' | (string & {});
13
+ ticket?: PublicTaskTicket;
14
+ /** Length 1..200. */
15
+ title: string;
16
+ }
17
+ export interface DebugAgentContextSnapshot {
18
+ agentKind: string;
19
+ contextFiles: DebugContextFile[];
20
+ createdAt: number;
21
+ extras: Record<string, unknown>;
22
+ fragments: DebugContextFragment[];
23
+ /** Always present; `null` when the server has no value for it. */
24
+ harness: string | null;
25
+ /** Always present; `null` when the server has no value for it. */
26
+ model: string | null;
27
+ runId: string;
28
+ snapshotId: string;
29
+ stepIndex: number;
30
+ systemPrompt: DebugText;
31
+ userPrompt: DebugText;
32
+ }
33
+ export interface DebugAgentContextSummary {
34
+ agentKind: string;
35
+ contextFilesChars: number;
36
+ createdAt: number;
37
+ fragmentsChars: number;
38
+ /** Always present; `null` when the server has no value for it. */
39
+ harness: string | null;
40
+ /** Always present; `null` when the server has no value for it. */
41
+ model: string | null;
42
+ snapshotId: string;
43
+ stepIndex: number;
44
+ systemPromptChars: number;
45
+ userPromptChars: number;
46
+ }
47
+ export interface DebugContextFile {
48
+ content: DebugText;
49
+ path: string;
50
+ title: string;
51
+ url: string;
52
+ }
53
+ export interface DebugContextFragment {
54
+ body: DebugText;
55
+ id: string;
56
+ }
57
+ export interface DebugInfraLogEntry {
58
+ /** Always present; `null` when the server has no value for it. */
59
+ blockId: string | null;
60
+ createdAt: number;
61
+ /** Always present; `null` when the server has no value for it. */
62
+ detail: string | null;
63
+ /** Always present; `null` when the server has no value for it. */
64
+ error: string | null;
65
+ /** Always present; `null` when the server has no value for it. */
66
+ executionId: string | null;
67
+ id: string;
68
+ operation: DebugInfraLogEntryOperation;
69
+ outcome: DebugInfraLogEntryOutcome;
70
+ /** Always present; `null` when the server has no value for it. */
71
+ providerId: string | null;
72
+ subsystem: DebugInfraLogEntrySubsystem;
73
+ /** Always present; `null` when the server has no value for it. */
74
+ targetId: string | null;
75
+ workspaceId: string;
76
+ }
77
+ export type DebugInfraLogEntryOperation = 'provision' | 'teardown' | 'status' | 'dispatch' | 'release' | 'poll-failure';
78
+ /** Every `DebugInfraLogEntryOperation` value, for exhaustive handling and runtime validation. */
79
+ export declare const DEBUG_INFRA_LOG_ENTRY_OPERATION_VALUES: readonly ['provision', 'teardown', 'status', 'dispatch', 'release', 'poll-failure'];
80
+ export type DebugInfraLogEntryOutcome = 'success' | 'failure';
81
+ /** Every `DebugInfraLogEntryOutcome` value, for exhaustive handling and runtime validation. */
82
+ export declare const DEBUG_INFRA_LOG_ENTRY_OUTCOME_VALUES: readonly ['success', 'failure'];
83
+ export type DebugInfraLogEntrySubsystem = 'environment' | 'runner-pool' | 'container';
84
+ /** Every `DebugInfraLogEntrySubsystem` value, for exhaustive handling and runtime validation. */
85
+ export declare const DEBUG_INFRA_LOG_ENTRY_SUBSYSTEM_VALUES: readonly ['environment', 'runner-pool', 'container'];
86
+ export interface DebugLlmAgentKindRollup {
87
+ agentKind: string;
88
+ /** Always present; `null` when the server has no value for it. */
89
+ cacheHitRate: number | null;
90
+ cacheReadTokens: number;
91
+ cacheWriteTokens: number;
92
+ calls: number;
93
+ completionTokens: number;
94
+ /** Always present; `null` when the server has no value for it. */
95
+ costEstimate: number | null;
96
+ errors: number;
97
+ /** Always present; `null` when the server has no value for it. */
98
+ maxOutputTokens: number | null;
99
+ /** Always present; `null` when the server has no value for it. */
100
+ outputHeadroomRatio: number | null;
101
+ overheadMs: number;
102
+ peakCompletionTokens: number;
103
+ promptTokens: number;
104
+ /** Always present; `null` when the server has no value for it. */
105
+ transportOverheadRatio: number | null;
106
+ truncatedCalls: number;
107
+ upstreamMs: number;
108
+ warnings: number;
109
+ }
110
+ export interface DebugLlmCall {
111
+ agentKind: string;
112
+ cacheReadTokens: number;
113
+ cacheWriteTokens: number;
114
+ callId: string;
115
+ completionTokens: number;
116
+ createdAt: number;
117
+ elidedLeadingMessages: number;
118
+ /** Always present; `null` when the server has no value for it. */
119
+ errorMessage: string | null;
120
+ /** Always present; `null` when the server has no value for it. */
121
+ finishReason: string | null;
122
+ /** Always present; `null` when the server has no value for it. */
123
+ httpStatus: number | null;
124
+ messageCount: number;
125
+ model: string;
126
+ ok: boolean;
127
+ outcome: LlmCallOutcome;
128
+ overheadMs: number;
129
+ phase: string;
130
+ prompt: DebugText;
131
+ promptMessages?: DebugPromptMessage[] | null;
132
+ promptTokens: number;
133
+ provider: string;
134
+ reasoning: DebugText;
135
+ /** Always present; `null` when the server has no value for it. */
136
+ requestMaxTokens: number | null;
137
+ response: DebugText;
138
+ /** Always present; `null` when the server has no value for it. */
139
+ runId: string | null;
140
+ streaming: boolean;
141
+ toolCount: number;
142
+ totalMs: number;
143
+ totalTokens: number;
144
+ /** Always present; `null` when the server has no value for it. */
145
+ turnIndex: number | null;
146
+ upstreamMs: number;
147
+ }
148
+ export interface DebugLlmPhaseRollup {
149
+ /** Always present; `null` when the server has no value for it. */
150
+ cacheHitRate: number | null;
151
+ cacheReadTokens: number;
152
+ cacheWriteTokens: number;
153
+ calls: number;
154
+ /** Always present; `null` when the server has no value for it. */
155
+ carryCostShare: number | null;
156
+ carryCostTokens: number;
157
+ completionTokens: number;
158
+ /** Always present; `null` when the server has no value for it. */
159
+ costEstimate: number | null;
160
+ errors: number;
161
+ overheadMs: number;
162
+ phase: string;
163
+ promptTokens: number;
164
+ truncatedCalls: number;
165
+ upstreamMs: number;
166
+ warnings: number;
167
+ }
168
+ export interface DebugLlmTotals {
169
+ /** Always present; `null` when the server has no value for it. */
170
+ cacheHitRate: number | null;
171
+ cacheReadTokens: number;
172
+ cacheWriteTokens: number;
173
+ calls: number;
174
+ completionTokens: number;
175
+ /** Always present; `null` when the server has no value for it. */
176
+ costEstimate: number | null;
177
+ errors: number;
178
+ overheadMs: number;
179
+ promptTokens: number;
180
+ /** Always present; `null` when the server has no value for it. */
181
+ transportOverheadRatio: number | null;
182
+ truncatedCalls: number;
183
+ upstreamMs: number;
184
+ warnings: number;
185
+ }
186
+ export interface DebugPromptMessage {
187
+ content: DebugText;
188
+ index: number;
189
+ /** Always present; `null` when the server has no value for it. */
190
+ name: string | null;
191
+ role: string;
192
+ /** Always present; `null` when the server has no value for it. */
193
+ toolCallId: string | null;
194
+ toolCalls: DebugToolCall[];
195
+ }
196
+ export interface DebugRunFailure {
197
+ /** Always present; `null` when the server has no value for it. */
198
+ detail: string | null;
199
+ /** Always present; `null` when the server has no value for it. */
200
+ hint: string | null;
201
+ kind: DebugRunFailureKind;
202
+ /** Always present; `null` when the server has no value for it. */
203
+ lastSubtasks: DebugSubtaskCounts | null;
204
+ message: string;
205
+ occurredAt: number;
206
+ reason?: string | null;
207
+ stepIndex?: number;
208
+ }
209
+ export type DebugRunFailureKind = 'preflight' | 'dispatch' | 'environment' | 'evicted' | 'timeout' | 'agent' | 'job_failed' | 'rejected' | 'companion_rejected' | 'stalled' | 'cancelled' | 'unknown';
210
+ /** Every `DebugRunFailureKind` value, for exhaustive handling and runtime validation. */
211
+ export declare const DEBUG_RUN_FAILURE_KIND_VALUES: readonly ['preflight', 'dispatch', 'environment', 'evicted', 'timeout', 'agent', 'job_failed', 'rejected', 'companion_rejected', 'stalled', 'cancelled', 'unknown'];
212
+ export interface DebugRunOverview {
213
+ /** Always present; `null` when the server has no value for it. */
214
+ diagnostics: DebugRunOverviewDiagnostics | null;
215
+ generatedAt: number;
216
+ kind: 'cat-factory.run-debug-overview';
217
+ llm: DebugRunOverviewLlm;
218
+ run: DebugRunSummary;
219
+ signals: DebugRunSignal[];
220
+ sinks: DebugRunOverviewSinks;
221
+ steps: DebugRunStep[];
222
+ version: 1;
223
+ }
224
+ export interface DebugRunOverviewDiagnostics {
225
+ host?: DebugRunOverviewDiagnosticsHost;
226
+ lastDispatch?: DebugRunOverviewDiagnosticsLastDispatch;
227
+ }
228
+ export interface DebugRunOverviewDiagnosticsHost {
229
+ platform?: string;
230
+ }
231
+ export interface DebugRunOverviewDiagnosticsLastDispatch {
232
+ agentKind: string;
233
+ at: number;
234
+ executionBackend?: string;
235
+ model?: string | null;
236
+ repo?: DebugRunOverviewDiagnosticsLastDispatchRepo;
237
+ stepIndex: number;
238
+ }
239
+ export interface DebugRunOverviewDiagnosticsLastDispatchRepo {
240
+ baseBranch?: string;
241
+ name: string;
242
+ owner: string;
243
+ provider?: string;
244
+ }
245
+ export interface DebugRunOverviewLlm {
246
+ byAgentKind: DebugLlmAgentKindRollup[];
247
+ byPhase: DebugLlmPhaseRollup[];
248
+ /** Always present; `null` when the server has no value for it. */
249
+ costCurrency: string | null;
250
+ totals: DebugLlmTotals;
251
+ }
252
+ export interface DebugRunOverviewSinks {
253
+ agentContext: DebugRunOverviewSinksAgentContext;
254
+ llmCalls: DebugRunOverviewSinksAgentContext;
255
+ provisioningLog: DebugRunOverviewSinksAgentContext;
256
+ searchQueries: DebugRunOverviewSinksAgentContext;
257
+ }
258
+ export interface DebugRunOverviewSinksAgentContext {
259
+ available: boolean;
260
+ count: number;
261
+ }
262
+ export interface DebugRunSignal {
263
+ /** Always present; `null` when the server has no value for it. */
264
+ agentKind: string | null;
265
+ code: string;
266
+ /** Always present; `null` when the server has no value for it. */
267
+ count: number | null;
268
+ message: string;
269
+ severity: DebugRunSignalSeverity;
270
+ /** Always present; `null` when the server has no value for it. */
271
+ stepIndex: number | null;
272
+ }
273
+ export type DebugRunSignalSeverity = 'info' | 'warning' | 'error';
274
+ /** Every `DebugRunSignalSeverity` value, for exhaustive handling and runtime validation. */
275
+ export declare const DEBUG_RUN_SIGNAL_SEVERITY_VALUES: readonly ['info', 'warning', 'error'];
276
+ export interface DebugRunStep {
277
+ agentKind: string;
278
+ evictionRecoveries: number;
279
+ /** Always present; `null` when the server has no value for it. */
280
+ finishedAt: number | null;
281
+ /** Always present; `null` when the server has no value for it. */
282
+ firstEvictionDetail: DebugText | null;
283
+ hasStructuredResult: boolean;
284
+ index: number;
285
+ /** Always present; `null` when the server has no value for it. */
286
+ lastActivityAt: number | null;
287
+ /** Always present; `null` when the server has no value for it. */
288
+ model: string | null;
289
+ outputChars: number;
290
+ progress: number;
291
+ skipped: boolean;
292
+ /** Always present; `null` when the server has no value for it. */
293
+ startedAt: number | null;
294
+ state: string;
295
+ /** Always present; `null` when the server has no value for it. */
296
+ subtasks: RunSubtaskCounts | null;
297
+ }
298
+ export interface DebugRunSummary {
299
+ blockId: string;
300
+ createdAt: number;
301
+ currentStep: number;
302
+ /** Always present; `null` when the server has no value for it. */
303
+ failure: DebugRunFailure | null;
304
+ pipelineId: string;
305
+ pipelineName: string;
306
+ runId: string;
307
+ status: RunStatus;
308
+ stepCount: number;
309
+ }
310
+ export interface DebugSearchQuery {
311
+ agentKind: string;
312
+ createdAt: number;
313
+ executionId: string;
314
+ id: string;
315
+ /** Always present; `null` when the server has no value for it. */
316
+ provider: DebugSearchQueryProvider | null;
317
+ query: string;
318
+ resultCount: number;
319
+ workspaceId: string;
320
+ }
321
+ export type DebugSearchQueryProvider = 'brave' | 'searxng';
322
+ /** Every `DebugSearchQueryProvider` value, for exhaustive handling and runtime validation. */
323
+ export declare const DEBUG_SEARCH_QUERY_PROVIDER_VALUES: readonly ['brave', 'searxng'];
324
+ export interface DebugSubtaskCounts {
325
+ completed: number;
326
+ inProgress: number;
327
+ items?: DebugSubtaskItem[];
328
+ total: number;
329
+ }
330
+ export interface DebugSubtaskItem {
331
+ label: string;
332
+ status: DebugSubtaskItemStatus;
333
+ }
334
+ export type DebugSubtaskItemStatus = 'pending' | 'in_progress' | 'completed';
335
+ /** Every `DebugSubtaskItemStatus` value, for exhaustive handling and runtime validation. */
336
+ export declare const DEBUG_SUBTASK_ITEM_STATUS_VALUES: readonly ['pending', 'in_progress', 'completed'];
337
+ export interface DebugText {
338
+ chars: number;
339
+ matchOffset?: number | null;
340
+ offset: number;
341
+ text: string;
342
+ totalChars: number;
343
+ truncated: boolean;
344
+ }
345
+ export interface DebugToolCall {
346
+ args: DebugText;
347
+ name: string;
348
+ }
349
+ export interface ErrorResponse {
350
+ error: ErrorResponseError;
351
+ }
352
+ export interface ErrorResponseError {
353
+ code: string;
354
+ details?: unknown;
355
+ issues?: ErrorResponseErrorIssue[];
356
+ message: string;
357
+ }
358
+ export interface ErrorResponseErrorIssue {
359
+ message: string;
360
+ path?: string;
361
+ }
362
+ export type GetDebugLlmCallView = 'raw' | 'messages';
363
+ /** Every `GetDebugLlmCallView` value, for exhaustive handling and runtime validation. */
364
+ export declare const GET_DEBUG_LLM_CALL_VIEW_VALUES: readonly ['raw', 'messages'];
365
+ export interface ListDebugAgentContextResponse {
366
+ /** Always present; `null` when the server has no value for it. */
367
+ nextCursor: string | null;
368
+ snapshots: DebugAgentContextSummary[];
369
+ }
370
+ export type ListDebugLlmCallsOrder = 'newest' | 'oldest';
371
+ /** Every `ListDebugLlmCallsOrder` value, for exhaustive handling and runtime validation. */
372
+ export declare const LIST_DEBUG_LLM_CALLS_ORDER_VALUES: readonly ['newest', 'oldest'];
373
+ export interface ListDebugLlmCallsResponse {
374
+ calls: DebugLlmCall[];
375
+ /** Always present; `null` when the server has no value for it. */
376
+ nextCursor: string | null;
377
+ }
378
+ export interface ListDebugLogsResponse {
379
+ entries: DebugInfraLogEntry[];
380
+ /** Always present; `null` when the server has no value for it. */
381
+ nextCursor: string | null;
382
+ }
383
+ export interface ListDebugRunsResponse {
384
+ /** Always present; `null` when the server has no value for it. */
385
+ nextCursor: string | null;
386
+ runs: DebugRunSummary[];
387
+ }
388
+ export interface ListDebugSearchQueriesResponse {
389
+ /** Always present; `null` when the server has no value for it. */
390
+ nextCursor: string | null;
391
+ queries: DebugSearchQuery[];
392
+ }
393
+ export interface ListPublicJobsResponse {
394
+ jobs: PublicJob[];
395
+ /** Always present; `null` when the server has no value for it. */
396
+ nextCursor: string | null;
397
+ }
398
+ export type LlmCallOutcome = 'ok' | 'warning' | 'error';
399
+ /** Every `LlmCallOutcome` value, for exhaustive handling and runtime validation. */
400
+ export declare const LLM_CALL_OUTCOME_VALUES: readonly ['ok', 'warning', 'error'];
401
+ export interface Notification {
402
+ /** Always present; `null` when the server has no value for it. */
403
+ blockId: string | null;
404
+ body: string;
405
+ createdAt: number;
406
+ /** Always present; `null` when the server has no value for it. */
407
+ executionId: string | null;
408
+ id: string;
409
+ payload?: NotificationPayload | null;
410
+ /** Always present; `null` when the server has no value for it. */
411
+ resolvedAt: number | null;
412
+ severity?: NotificationSeverity;
413
+ status: NotificationStatus;
414
+ title: string;
415
+ type: NotificationType;
416
+ }
417
+ export interface NotificationPayload {
418
+ assessment?: NotificationPayloadAssessment;
419
+ changeClass?: NotificationPayloadChangeClass;
420
+ driftAffected?: NotificationPayloadDriftAffected[];
421
+ findingCount?: number;
422
+ forkCount?: number;
423
+ initiativeReason?: NotificationPayloadInitiativeReason;
424
+ mergeTrackRecordId?: string;
425
+ mergedRepos?: string[];
426
+ onCallAssessment?: NotificationPayloadOnCallAssessment;
427
+ pipelineName?: string;
428
+ platformAlerts?: NotificationPayloadPlatformAlert[];
429
+ platformFailedTotal?: number;
430
+ platformFailingRuns?: NotificationPayloadPlatformFailingRun[];
431
+ platformWindow?: NotificationPayloadPlatformWindow;
432
+ prUrl?: string;
433
+ releaseSignals?: NotificationPayloadReleaseSignal[];
434
+ revertUrl?: string;
435
+ sliceCount?: number;
436
+ targetUserId?: string | null;
437
+ unmergedRepos?: string[];
438
+ unreachableAreas?: NotificationPayloadUnreachableArea[];
439
+ }
440
+ export interface NotificationPayloadAssessment {
441
+ /** Range 0..1. */
442
+ complexity: number;
443
+ /** Range 0..1. */
444
+ impact: number;
445
+ rationale: string;
446
+ /** Range 0..1. */
447
+ risk: number;
448
+ }
449
+ export type NotificationPayloadChangeClass = 'docs' | 'test' | 'dependency' | 'config' | 'source' | 'schema' | 'unknown';
450
+ /** Every `NotificationPayloadChangeClass` value, for exhaustive handling and runtime validation. */
451
+ export declare const NOTIFICATION_PAYLOAD_CHANGE_CLASS_VALUES: readonly ['docs', 'test', 'dependency', 'config', 'source', 'schema', 'unknown'];
452
+ export interface NotificationPayloadDriftAffected {
453
+ id: string;
454
+ label: string;
455
+ reason: NotificationPayloadDriftAffectedReason;
456
+ /** Always present; `null` when the server has no value for it. */
457
+ sealedAt: number | null;
458
+ source: string;
459
+ }
460
+ export type NotificationPayloadDriftAffectedReason = 'key-mismatch' | 'corrupt';
461
+ /** Every `NotificationPayloadDriftAffectedReason` value, for exhaustive handling and runtime validation. */
462
+ export declare const NOTIFICATION_PAYLOAD_DRIFT_AFFECTED_REASON_VALUES: readonly ['key-mismatch', 'corrupt'];
463
+ export type NotificationPayloadInitiativeReason = 'item_blocked' | 'complete' | 'checkpoint';
464
+ /** Every `NotificationPayloadInitiativeReason` value, for exhaustive handling and runtime validation. */
465
+ export declare const NOTIFICATION_PAYLOAD_INITIATIVE_REASON_VALUES: readonly ['item_blocked', 'complete', 'checkpoint'];
466
+ export interface NotificationPayloadOnCallAssessment {
467
+ /** Range 0..1. */
468
+ culpritConfidence: number;
469
+ evidence: string[];
470
+ rationale: string;
471
+ recommendation: NotificationPayloadOnCallAssessmentRecommendation;
472
+ }
473
+ export type NotificationPayloadOnCallAssessmentRecommendation = 'revert' | 'hold' | 'monitor';
474
+ /** Every `NotificationPayloadOnCallAssessmentRecommendation` value, for exhaustive handling and runtime validation. */
475
+ export declare const NOTIFICATION_PAYLOAD_ON_CALL_ASSESSMENT_RECOMMENDATION_VALUES: readonly ['revert', 'hold', 'monitor'];
476
+ export type NotificationPayloadPlatformAlert = 'failure_rate_high' | 'duration_p99_high' | 'backlog_high' | 'throughput_stalled' | 'failure_kind_dominant' | 'sweep_degraded';
477
+ /** Every `NotificationPayloadPlatformAlert` value, for exhaustive handling and runtime validation. */
478
+ export declare const NOTIFICATION_PAYLOAD_PLATFORM_ALERT_VALUES: readonly ['failure_rate_high', 'duration_p99_high', 'backlog_high', 'throughput_stalled', 'failure_kind_dominant', 'sweep_degraded'];
479
+ export interface NotificationPayloadPlatformFailingRun {
480
+ /** Always present; `null` when the server has no value for it. */
481
+ blockId: string | null;
482
+ createdAt: number;
483
+ executionId: string;
484
+ failureKind: string;
485
+ }
486
+ export type NotificationPayloadPlatformWindow = '1h' | '24h' | '7d';
487
+ /** Every `NotificationPayloadPlatformWindow` value, for exhaustive handling and runtime validation. */
488
+ export declare const NOTIFICATION_PAYLOAD_PLATFORM_WINDOW_VALUES: readonly ['1h', '24h', '7d'];
489
+ export interface NotificationPayloadReleaseSignal {
490
+ detail?: string;
491
+ id: string;
492
+ kind: NotificationPayloadReleaseSignalKind;
493
+ name: string;
494
+ state: NotificationPayloadReleaseSignalState;
495
+ }
496
+ export type NotificationPayloadReleaseSignalKind = 'monitor' | 'slo';
497
+ /** Every `NotificationPayloadReleaseSignalKind` value, for exhaustive handling and runtime validation. */
498
+ export declare const NOTIFICATION_PAYLOAD_RELEASE_SIGNAL_KIND_VALUES: readonly ['monitor', 'slo'];
499
+ export type NotificationPayloadReleaseSignalState = 'ok' | 'warn' | 'alert' | 'no_data';
500
+ /** Every `NotificationPayloadReleaseSignalState` value, for exhaustive handling and runtime validation. */
501
+ export declare const NOTIFICATION_PAYLOAD_RELEASE_SIGNAL_STATE_VALUES: readonly ['ok', 'warn', 'alert', 'no_data'];
502
+ export type NotificationPayloadUnreachableArea = 'ephemeralEnvironments' | 'agentExecutor' | 'binaryStorage';
503
+ /** Every `NotificationPayloadUnreachableArea` value, for exhaustive handling and runtime validation. */
504
+ export declare const NOTIFICATION_PAYLOAD_UNREACHABLE_AREA_VALUES: readonly ['ephemeralEnvironments', 'agentExecutor', 'binaryStorage'];
505
+ export type NotificationSeverity = 'normal' | 'urgent';
506
+ /** Every `NotificationSeverity` value, for exhaustive handling and runtime validation. */
507
+ export declare const NOTIFICATION_SEVERITY_VALUES: readonly ['normal', 'urgent'];
508
+ export type NotificationStatus = 'open' | 'acted' | 'dismissed';
509
+ /** Every `NotificationStatus` value, for exhaustive handling and runtime validation. */
510
+ export declare const NOTIFICATION_STATUS_VALUES: readonly ['open', 'acted', 'dismissed'];
511
+ export type NotificationType = 'merge_review' | 'pipeline_complete' | 'ci_failed' | 'test_failed' | 'requirement_review' | 'clarity_review' | 'release_regression' | 'decision_required' | 'human_test_ready' | 'visual_confirmation_ready' | 'human_review' | 'followup_pending' | 'fork_decision_pending' | 'judge_review' | 'pr_review_ready' | 'initiative' | 'platform_health' | 'infra_unreachable' | 'budget_paused' | 'key_drift' | 'merge_tag_request';
512
+ /** Every `NotificationType` value, for exhaustive handling and runtime validation. */
513
+ export declare const NOTIFICATION_TYPE_VALUES: readonly ['merge_review', 'pipeline_complete', 'ci_failed', 'test_failed', 'requirement_review', 'clarity_review', 'release_regression', 'decision_required', 'human_test_ready', 'visual_confirmation_ready', 'human_review', 'followup_pending', 'fork_decision_pending', 'judge_review', 'pr_review_ready', 'initiative', 'platform_health', 'infra_unreachable', 'budget_paused', 'key_drift', 'merge_tag_request'];
514
+ export interface PublicChooseFork {
515
+ custom?: string | null;
516
+ forkId?: string | null;
517
+ note?: string | null;
518
+ }
519
+ /** Discriminated by `kind`. */
520
+ export type PublicDecision = PublicRequirementsDecision | PublicForkDecision | PublicJudgeDecision;
521
+ export interface PublicDecisionList {
522
+ decisions: PublicDecision[];
523
+ parked: boolean;
524
+ runId: string;
525
+ status: RunStatus;
526
+ taskId: string;
527
+ }
528
+ export interface PublicForkDecision {
529
+ forks: PublicForkDecisionFork[];
530
+ kind: 'fork';
531
+ /** Always present; `null` when the server has no value for it. */
532
+ seamSummary: string | null;
533
+ status: PublicForkDecisionStatus;
534
+ }
535
+ export interface PublicForkDecisionFork {
536
+ approach: string;
537
+ id: string;
538
+ recommended?: boolean;
539
+ riskNotes?: string | null;
540
+ summary: string;
541
+ title: string;
542
+ tradeoffs: string[];
543
+ }
544
+ export type PublicForkDecisionStatus = 'proposing' | 'awaiting_choice' | 'answering' | 'chosen' | 'single_path' | 'skipped';
545
+ /** Every `PublicForkDecisionStatus` value, for exhaustive handling and runtime validation. */
546
+ export declare const PUBLIC_FORK_DECISION_STATUS_VALUES: readonly ['proposing', 'awaiting_choice', 'answering', 'chosen', 'single_path', 'skipped'];
547
+ export interface PublicIncorporate {
548
+ /** Length 0..4000. */
549
+ feedback?: string;
550
+ }
551
+ export interface PublicJob {
552
+ createdAt: number;
553
+ /** Always present; `null` when the server has no value for it. */
554
+ error: RunError | null;
555
+ jobId: string;
556
+ pipelineId: string;
557
+ /** Always present; `null` when the server has no value for it. */
558
+ result: PublicJobResult | null;
559
+ status: PublicJobStatus;
560
+ }
561
+ export interface PublicJobAccepted {
562
+ jobId: string;
563
+ links: PublicJobAcceptedLinks;
564
+ status: PublicJobStatus;
565
+ }
566
+ export interface PublicJobAcceptedLinks {
567
+ events: string;
568
+ self: string;
569
+ }
570
+ export interface PublicJobResult {
571
+ /** Always present; `null` when the server has no value for it. */
572
+ data: unknown | null;
573
+ output: string;
574
+ }
575
+ export type PublicJobStatus = 'running' | 'succeeded' | 'failed';
576
+ /** Every `PublicJobStatus` value, for exhaustive handling and runtime validation. */
577
+ export declare const PUBLIC_JOB_STATUS_VALUES: readonly ['running', 'succeeded', 'failed'];
578
+ export interface PublicJudgeDecision {
579
+ bounces: number;
580
+ kind: 'judge';
581
+ maxBounces: number;
582
+ /** Always present; `null` when the server has no value for it. */
583
+ rubricId: string | null;
584
+ /** Always present; `null` when the server has no value for it. */
585
+ rubricName: string | null;
586
+ status: PublicJudgeDecisionStatus;
587
+ stepKind: string;
588
+ /** Always present; `null` when the server has no value for it. */
589
+ threshold: number | null;
590
+ /** Always present; `null` when the server has no value for it. */
591
+ verdict: PublicJudgeVerdict | null;
592
+ }
593
+ export type PublicJudgeDecisionStatus = 'evaluating' | 'awaiting_decision' | 'bouncing' | 'passed' | 'failed' | 'skipped';
594
+ /** Every `PublicJudgeDecisionStatus` value, for exhaustive handling and runtime validation. */
595
+ export declare const PUBLIC_JUDGE_DECISION_STATUS_VALUES: readonly ['evaluating', 'awaiting_decision', 'bouncing', 'passed', 'failed', 'skipped'];
596
+ export interface PublicJudgeFinding {
597
+ detail?: string;
598
+ severity: Severity;
599
+ title: string;
600
+ where?: string;
601
+ }
602
+ export interface PublicJudgeVerdict {
603
+ findings: PublicJudgeFinding[];
604
+ /** Range 0..1. */
605
+ score: number;
606
+ summary: string;
607
+ }
608
+ export interface PublicNotificationList {
609
+ notifications: Notification[];
610
+ }
611
+ export interface PublicPipeline {
612
+ headlessStartable: boolean;
613
+ name: string;
614
+ pipelineId: string;
615
+ public: boolean;
616
+ steps: string[];
617
+ }
618
+ export interface PublicPipelineList {
619
+ pipelines: PublicPipeline[];
620
+ }
621
+ export interface PublicReplyFinding {
622
+ /** Length 1..4000. */
623
+ reply: string;
624
+ }
625
+ export interface PublicRequirementsDecision {
626
+ findings: PublicReviewFinding[];
627
+ /** Always present; `null` when the server has no value for it. */
628
+ incorporatedRequirements: string | null;
629
+ iteration: number;
630
+ kind: 'requirements-review';
631
+ maxIterations: number;
632
+ reviewId: string;
633
+ status: PublicRequirementsDecisionStatus;
634
+ taskId: string;
635
+ }
636
+ export type PublicRequirementsDecisionStatus = 'ready' | 'incorporating' | 'reviewing' | 'merged' | 'exceeded' | 'incorporated';
637
+ /** Every `PublicRequirementsDecisionStatus` value, for exhaustive handling and runtime validation. */
638
+ export declare const PUBLIC_REQUIREMENTS_DECISION_STATUS_VALUES: readonly ['ready', 'incorporating', 'reviewing', 'merged', 'exceeded', 'incorporated'];
639
+ export interface PublicResolveExceeded {
640
+ choice: PublicResolveExceededChoice;
641
+ }
642
+ export type PublicResolveExceededChoice = 'extra-round' | 'proceed' | 'stop-reset';
643
+ /** Every `PublicResolveExceededChoice` value, for exhaustive handling and runtime validation. */
644
+ export declare const PUBLIC_RESOLVE_EXCEEDED_CHOICE_VALUES: readonly ['extra-round', 'proceed', 'stop-reset'];
645
+ export interface PublicResolveJudge {
646
+ choice: PublicResolveJudgeChoice;
647
+ feedback?: string | null;
648
+ }
649
+ export type PublicResolveJudgeChoice = 'proceed' | 'bounce' | 'stop';
650
+ /** Every `PublicResolveJudgeChoice` value, for exhaustive handling and runtime validation. */
651
+ export declare const PUBLIC_RESOLVE_JUDGE_CHOICE_VALUES: readonly ['proceed', 'bounce', 'stop'];
652
+ export interface PublicReviewFinding {
653
+ category: PublicReviewFindingCategory;
654
+ detail: string;
655
+ itemId: string;
656
+ /** Always present; `null` when the server has no value for it. */
657
+ reply: string | null;
658
+ severity: PublicReviewFindingSeverity;
659
+ status: PublicReviewFindingStatus;
660
+ title: string;
661
+ }
662
+ export type PublicReviewFindingCategory = 'gap' | 'clarification' | 'assumption' | 'risk' | 'question';
663
+ /** Every `PublicReviewFindingCategory` value, for exhaustive handling and runtime validation. */
664
+ export declare const PUBLIC_REVIEW_FINDING_CATEGORY_VALUES: readonly ['gap', 'clarification', 'assumption', 'risk', 'question'];
665
+ export type PublicReviewFindingSeverity = 'low' | 'medium' | 'high';
666
+ /** Every `PublicReviewFindingSeverity` value, for exhaustive handling and runtime validation. */
667
+ export declare const PUBLIC_REVIEW_FINDING_SEVERITY_VALUES: readonly ['low', 'medium', 'high'];
668
+ export type PublicReviewFindingStatus = 'open' | 'answered' | 'resolved' | 'dismissed' | 'recommend_requested';
669
+ /** Every `PublicReviewFindingStatus` value, for exhaustive handling and runtime validation. */
670
+ export declare const PUBLIC_REVIEW_FINDING_STATUS_VALUES: readonly ['open', 'answered', 'resolved', 'dismissed', 'recommend_requested'];
671
+ export interface PublicRun {
672
+ createdAt: number;
673
+ currentStep: number;
674
+ /** Always present; `null` when the server has no value for it. */
675
+ error: RunError | null;
676
+ /** Always present; `null` when the server has no value for it. */
677
+ pullRequest: RunPullRequest | null;
678
+ runId: string;
679
+ status: RunStatus;
680
+ steps: PublicRunStep[];
681
+ taskId: string;
682
+ }
683
+ export interface PublicRunStep {
684
+ agentKind: string;
685
+ progress: number;
686
+ state: StepState;
687
+ /** Always present; `null` when the server has no value for it. */
688
+ subtasks: RunSubtaskCounts | null;
689
+ }
690
+ export interface PublicService {
691
+ description: string;
692
+ serviceId: string;
693
+ status: TaskStatus;
694
+ title: string;
695
+ type: PublicServiceType;
696
+ }
697
+ export interface PublicServiceList {
698
+ services: PublicService[];
699
+ }
700
+ export type PublicServiceType = 'frontend' | 'service' | 'library' | 'document' | 'api' | 'database' | 'queue' | 'integration' | 'external' | 'environment';
701
+ /** Every `PublicServiceType` value, for exhaustive handling and runtime validation. */
702
+ export declare const PUBLIC_SERVICE_TYPE_VALUES: readonly ['frontend', 'service', 'library', 'document', 'api', 'database', 'queue', 'integration', 'external', 'environment'];
703
+ export interface PublicSetFindingStatus {
704
+ status: PublicSetFindingStatusStatus;
705
+ }
706
+ export type PublicSetFindingStatusStatus = 'dismissed' | 'open';
707
+ /** Every `PublicSetFindingStatusStatus` value, for exhaustive handling and runtime validation. */
708
+ export declare const PUBLIC_SET_FINDING_STATUS_STATUS_VALUES: readonly ['dismissed', 'open'];
709
+ export interface PublicTask {
710
+ description: string;
711
+ progress: number;
712
+ /** Always present; `null` when the server has no value for it. */
713
+ pullRequestUrl: string | null;
714
+ /** Always present; `null` when the server has no value for it. */
715
+ runId: string | null;
716
+ serviceId: string;
717
+ status: TaskStatus;
718
+ taskId: string;
719
+ taskType: 'feature' | 'bug' | 'document' | 'spike' | 'review' | 'ralph' | 'recurring' | (string & {});
720
+ title: string;
721
+ }
722
+ export interface PublicTaskList {
723
+ /** Always present; `null` when the server has no value for it. */
724
+ nextCursor: string | null;
725
+ tasks: PublicTask[];
726
+ }
727
+ export interface PublicTaskTicket {
728
+ /** Length 1..500. */
729
+ ref: string;
730
+ source: 'jira' | 'github' | 'linear' | (string & {});
731
+ }
732
+ export interface PublicUsage {
733
+ budget: PublicUsageBudget;
734
+ currency: string;
735
+ periodStart: number;
736
+ rows: PublicUsageRow[];
737
+ }
738
+ export interface PublicUsageBudget {
739
+ costLimit: number;
740
+ costSpent: number;
741
+ exceeded: boolean;
742
+ inputTokens: number;
743
+ outputTokens: number;
744
+ }
745
+ export interface PublicUsageRow {
746
+ billing: PublicUsageRowBilling;
747
+ calls: number;
748
+ costEstimate: number;
749
+ inputTokens: number;
750
+ model: string;
751
+ outputTokens: number;
752
+ provider: string;
753
+ /** Always present; `null` when the server has no value for it. */
754
+ vendor: string | null;
755
+ }
756
+ export type PublicUsageRowBilling = 'metered' | 'subscription';
757
+ /** Every `PublicUsageRowBilling` value, for exhaustive handling and runtime validation. */
758
+ export declare const PUBLIC_USAGE_ROW_BILLING_VALUES: readonly ['metered', 'subscription'];
759
+ export interface RunError {
760
+ code: string;
761
+ message: string;
762
+ }
763
+ export interface RunPullRequest {
764
+ /** Always present; `null` when the server has no value for it. */
765
+ branch: string | null;
766
+ url: string;
767
+ }
768
+ export type RunStatus = 'running' | 'blocked' | 'paused' | 'done' | 'failed';
769
+ /** Every `RunStatus` value, for exhaustive handling and runtime validation. */
770
+ export declare const RUN_STATUS_VALUES: readonly ['running', 'blocked', 'paused', 'done', 'failed'];
771
+ export interface RunSubtaskCounts {
772
+ completed: number;
773
+ inProgress: number;
774
+ total: number;
775
+ }
776
+ export type Severity = 'low' | 'medium' | 'high' | 'critical';
777
+ /** Every `Severity` value, for exhaustive handling and runtime validation. */
778
+ export declare const SEVERITY_VALUES: readonly ['low', 'medium', 'high', 'critical'];
779
+ export interface StartPublicTask {
780
+ /** Length 1..120. */
781
+ pipelineId?: string;
782
+ }
783
+ export type StepState = 'pending' | 'working' | 'waiting_decision' | 'done';
784
+ /** Every `StepState` value, for exhaustive handling and runtime validation. */
785
+ export declare const STEP_STATE_VALUES: readonly ['pending', 'working', 'waiting_decision', 'done'];
786
+ export type TaskStatus = 'planned' | 'ready' | 'in_progress' | 'blocked' | 'pr_ready' | 'done';
787
+ /** Every `TaskStatus` value, for exhaustive handling and runtime validation. */
788
+ export declare const TASK_STATUS_VALUES: readonly ['planned', 'ready', 'in_progress', 'blocked', 'pr_ready', 'done'];
789
+ export interface UpdatePublicTask {
790
+ /** Length 0..2000. */
791
+ description?: string;
792
+ /** Length 1..200. */
793
+ title?: string;
794
+ }
795
+ //# sourceMappingURL=models.generated.d.ts.map