@hasna/loops 0.4.27 → 0.4.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/CHANGELOG.md +205 -1
  2. package/README.md +232 -49
  3. package/dist/api/index.d.ts +20 -19
  4. package/dist/api/index.js +7770 -1342
  5. package/dist/cli/index.js +2976 -966
  6. package/dist/cli/safe-error-context.d.ts +1 -0
  7. package/dist/daemon/daemon.d.ts +1 -0
  8. package/dist/daemon/index.js +1899 -499
  9. package/dist/generated/storage-kit/index.d.ts +1 -1
  10. package/dist/generated/storage-kit/mode.d.ts +6 -12
  11. package/dist/index.d.ts +3 -3
  12. package/dist/index.js +5319 -1096
  13. package/dist/lib/advancement.d.ts +52 -0
  14. package/dist/lib/agent-adapter.d.ts +20 -2
  15. package/dist/lib/auth/route-policy.d.ts +14 -0
  16. package/dist/lib/auth/tenant-auth.d.ts +38 -0
  17. package/dist/lib/cloud/mode.d.ts +2 -8
  18. package/dist/lib/cloud/storage.d.ts +1 -2
  19. package/dist/lib/cloud/transport.d.ts +4 -18
  20. package/dist/lib/errors.d.ts +43 -1
  21. package/dist/lib/executor.d.ts +9 -0
  22. package/dist/lib/format.d.ts +2 -2
  23. package/dist/lib/goal/runner.d.ts +36 -3
  24. package/dist/lib/health.d.ts +1 -1
  25. package/dist/lib/labels.d.ts +4 -0
  26. package/dist/lib/loop-status.d.ts +4 -0
  27. package/dist/lib/migration.d.ts +70 -17
  28. package/dist/lib/mode.d.ts +2 -5
  29. package/dist/lib/mode.js +28 -37
  30. package/dist/lib/route/fields.d.ts +8 -0
  31. package/dist/lib/route/index.d.ts +2 -2
  32. package/dist/lib/route/throttle.d.ts +7 -0
  33. package/dist/lib/route/types.d.ts +3 -0
  34. package/dist/lib/run-completion.d.ts +18 -0
  35. package/dist/lib/scheduler.d.ts +5 -11
  36. package/dist/lib/storage/contract.d.ts +15 -1
  37. package/dist/lib/storage/index.d.ts +1 -1
  38. package/dist/lib/storage/index.js +4083 -486
  39. package/dist/lib/storage/pg-executor.d.ts +10 -5
  40. package/dist/lib/storage/postgres-loop-storage.d.ts +52 -26
  41. package/dist/lib/storage/postgres-schema.d.ts +8 -0
  42. package/dist/lib/storage/postgres-schema.js +1326 -1
  43. package/dist/lib/storage/postgres.d.ts +3 -1
  44. package/dist/lib/storage/postgres.js +1356 -27
  45. package/dist/lib/storage/provider-credentials.d.ts +84 -0
  46. package/dist/lib/storage/shared-database-transfer.d.ts +136 -0
  47. package/dist/lib/storage/sqlite.d.ts +15 -2
  48. package/dist/lib/storage/sqlite.js +1379 -217
  49. package/dist/lib/storage/tenant-backfill-s3.d.ts +53 -0
  50. package/dist/lib/storage/tenant-backfill.d.ts +40 -0
  51. package/dist/lib/store/index.d.ts +14 -8
  52. package/dist/lib/store.d.ts +129 -7
  53. package/dist/lib/store.js +1352 -218
  54. package/dist/lib/templates.d.ts +11 -0
  55. package/dist/lib/workflow-events.d.ts +6 -0
  56. package/dist/lib/workflow-provenance.d.ts +8 -0
  57. package/dist/lib/workflow-runner.d.ts +52 -4
  58. package/dist/mcp/index.js +2074 -657
  59. package/dist/runner/index.d.ts +20 -2
  60. package/dist/runner/index.js +2146 -183
  61. package/dist/sdk/http.d.ts +364 -4
  62. package/dist/sdk/http.js +379 -1
  63. package/dist/sdk/index.d.ts +7 -2
  64. package/dist/sdk/index.js +2341 -742
  65. package/dist/serve/index.d.ts +14 -0
  66. package/dist/serve/index.js +13269 -1830
  67. package/dist/types.d.ts +75 -3
  68. package/docs/AUTOMATION_RUNTIME_DESIGN.md +32 -32
  69. package/docs/CUTOVER-RUNBOOK.md +158 -31
  70. package/docs/DEPLOYMENT_MODES.md +84 -56
  71. package/docs/RUNTIME_BOUNDARY.md +26 -26
  72. package/docs/SHARED-DATABASE-TRANSFER.md +95 -0
  73. package/docs/SHARED_KIT_EXTRACTION_INVENTORY.md +631 -0
  74. package/docs/TRANSCRIPT_LOOP_PATTERNS.md +3 -3
  75. package/docs/UNIFIED_PRODUCT_CONTRACT.md +365 -0
  76. package/docs/USAGE.md +150 -56
  77. package/docs/workflows/transcript-feedback-to-loops.json +2 -2
  78. package/package.json +8 -4
  79. package/dist/lib/storage/pg-runner-claim.d.ts +0 -40
@@ -1,3 +1,43 @@
1
+ export interface PublicValidationDetails {
2
+ "code": string;
3
+ "reason": "not_array" | "invalid_array" | "invalid_item" | "option_not_allowed";
4
+ "path": string;
5
+ "index"?: number;
6
+ "option"?: string;
7
+ }
8
+ export interface ValidationFailureResponse {
9
+ "ok": boolean;
10
+ "error": string;
11
+ "details"?: PublicValidationDetails;
12
+ }
13
+ export interface InvalidLoopStatusResponse {
14
+ "ok": boolean;
15
+ "error": string;
16
+ }
17
+ export interface AmbiguousNameResponse {
18
+ "ok": boolean;
19
+ "error": string;
20
+ }
21
+ export interface InvalidJsonResponse {
22
+ "ok": boolean;
23
+ "error": string;
24
+ }
25
+ export interface UnsupportedMediaTypeResponse {
26
+ "ok": boolean;
27
+ "error": string;
28
+ }
29
+ export interface InvalidWorkflowRecoveryBodyResponse {
30
+ "ok": boolean;
31
+ "error": string;
32
+ }
33
+ export interface WorkflowRecoveryConflictResponse {
34
+ "ok": boolean;
35
+ "error": "workflow_run_has_live_steps" | "workflow_run_step_ownership_unverifiable" | "workflow_run_not_running";
36
+ }
37
+ export interface RunFinalizeConflictResponse {
38
+ "ok": boolean;
39
+ "error": "stale_claim" | "run_not_running" | "loop_advancement_conflict";
40
+ }
1
41
  export interface Foundation {
2
42
  "status": string;
3
43
  "version": string;
@@ -9,7 +49,8 @@ export interface Loop {
9
49
  "id": string;
10
50
  "name": string;
11
51
  "description"?: string | null;
12
- "status": string;
52
+ "labels": Array<string>;
53
+ "status": "active" | "paused" | "stopped" | "expired";
13
54
  "schedule"?: Record<string, unknown>;
14
55
  "target"?: Record<string, unknown>;
15
56
  "nextRunAt"?: string | null;
@@ -19,6 +60,7 @@ export interface Loop {
19
60
  export interface CreateLoopInput {
20
61
  "name": string;
21
62
  "description"?: string;
63
+ "labels"?: Array<string>;
22
64
  "schedule": Record<string, unknown>;
23
65
  "target": Record<string, unknown>;
24
66
  }
@@ -27,6 +69,7 @@ export interface UpdateLoopInput {
27
69
  "nextRunAt"?: string | null;
28
70
  "retryScheduledFor"?: string | null;
29
71
  "expiresAt"?: string | null;
72
+ "labels"?: Array<string>;
30
73
  }
31
74
  export interface Run {
32
75
  "id": string;
@@ -111,6 +154,182 @@ export interface RunReceiptListResponse {
111
154
  "ok": boolean;
112
155
  "receipts": Array<RunReceipt>;
113
156
  }
157
+ export interface Workflow {
158
+ "id": string;
159
+ "name": string;
160
+ "description"?: string | null;
161
+ "version": number;
162
+ "status": string;
163
+ "steps": Array<Record<string, unknown>>;
164
+ "goal"?: Record<string, unknown>;
165
+ "createdAt"?: string;
166
+ "updatedAt"?: string;
167
+ }
168
+ export interface CreateWorkflowInput {
169
+ "name": string;
170
+ "description"?: string;
171
+ "steps": Array<Record<string, unknown>>;
172
+ "goal"?: Record<string, unknown>;
173
+ }
174
+ export interface WorkflowResponse {
175
+ "ok": boolean;
176
+ "workflow": Workflow;
177
+ }
178
+ export interface WorkflowListResponse {
179
+ "ok": boolean;
180
+ "workflows": Array<Workflow>;
181
+ }
182
+ export interface CreateWorkflowInvocationInput {
183
+ "id"?: string;
184
+ "workflowId"?: string;
185
+ "templateId"?: string;
186
+ "sourceRef": Record<string, unknown>;
187
+ "subjectRef": Record<string, unknown>;
188
+ "intent": string;
189
+ "scope"?: Record<string, unknown>;
190
+ "outputPolicy"?: Record<string, unknown>;
191
+ }
192
+ export type WorkflowInvocation = CreateWorkflowInvocationInput & {
193
+ "id": string;
194
+ "createdAt": string;
195
+ "updatedAt": string;
196
+ };
197
+ export interface WorkflowInvocationResponse {
198
+ "ok": boolean;
199
+ "invocation": WorkflowInvocation;
200
+ }
201
+ export interface WorkflowInvocationListResponse {
202
+ "ok": boolean;
203
+ "invocations": Array<WorkflowInvocation>;
204
+ }
205
+ export interface WorkflowWorkItem {
206
+ "id": string;
207
+ "routeKey": string;
208
+ "idempotencyKey": string;
209
+ "invocationId": string;
210
+ "sourceType": string;
211
+ "sourceRef": string;
212
+ "subjectRef": string;
213
+ "status": string;
214
+ "priority": number;
215
+ "createdAt"?: string;
216
+ "updatedAt"?: string;
217
+ }
218
+ export interface UpsertWorkflowWorkItemInput {
219
+ "id"?: string;
220
+ "routeKey": string;
221
+ "idempotencyKey": string;
222
+ "invocationId": string;
223
+ "sourceType": string;
224
+ "sourceRef": string;
225
+ "subjectRef": string;
226
+ "projectKey"?: string;
227
+ "projectGroup"?: string;
228
+ "machineId"?: string;
229
+ "routeScope"?: string;
230
+ "priority"?: number;
231
+ "status"?: "queued" | "deferred";
232
+ "nextAttemptAt"?: string;
233
+ "lastReason"?: string;
234
+ }
235
+ export interface WorkflowWorkItemResponse {
236
+ "ok": boolean;
237
+ "workItem": WorkflowWorkItem;
238
+ }
239
+ export interface WorkflowWorkItemListResponse {
240
+ "ok": boolean;
241
+ "workItems": Array<WorkflowWorkItem>;
242
+ }
243
+ export interface ImportInput {
244
+ "workflows"?: Array<Record<string, unknown>>;
245
+ "loops"?: Array<Record<string, unknown>>;
246
+ "runs"?: Array<Record<string, unknown>>;
247
+ "replace"?: boolean;
248
+ "preserveLoopScheduling"?: boolean;
249
+ "preserveWorkflowActivation"?: boolean;
250
+ }
251
+ export interface ImportResponse {
252
+ "ok": boolean;
253
+ "imported": {
254
+ "workflows": number;
255
+ "loops": number;
256
+ "runs": number;
257
+ };
258
+ "skippedRunning": number;
259
+ }
260
+ export interface AgentSessionContract {
261
+ "version": 1;
262
+ "provider": "claude" | "cursor" | "codewith" | "codex" | "aicopilot" | "opencode";
263
+ "model"?: string;
264
+ "cwd"?: string;
265
+ "permissionMode": "default" | "plan" | "auto" | "bypass";
266
+ "sandbox": "read-only" | "workspace-write" | "danger-full-access" | "enabled" | "disabled" | "provider-default";
267
+ "manualBreakGlass": boolean;
268
+ "routing"?: {
269
+ "projectPath"?: string;
270
+ "projectGroup"?: string;
271
+ "taskId"?: string;
272
+ "eventId"?: string;
273
+ "eventType"?: string;
274
+ "eventSource"?: string;
275
+ "role"?: "triage" | "planner" | "worker" | "verifier";
276
+ };
277
+ "timeoutMs": number | null;
278
+ "restrictions": {
279
+ "tools"?: Array<string>;
280
+ "commands"?: Array<string>;
281
+ "enforcement": "metadata_only";
282
+ "providerEnforced": false;
283
+ };
284
+ "safetyReason"?: string;
285
+ }
286
+ export interface AgentSessionContractEventInput {
287
+ "claimToken": string;
288
+ "eventType": "agent_session_contract";
289
+ "stepId": string;
290
+ "payload": AgentSessionContract;
291
+ }
292
+ export interface GenericWorkflowEvent {
293
+ "id": string;
294
+ "workflowRunId": string;
295
+ "sequence": number;
296
+ "eventType": "created" | "workflow_archived" | "todos_workflow_pointers_synced" | "todos_workflow_pointers_sync_failed" | "step_started" | "step_progress" | "recovered" | "step_pending" | "step_running" | "step_succeeded" | "step_failed" | "step_timed_out" | "step_skipped" | "step_cancelled" | "succeeded" | "failed" | "timed_out" | "cancelled";
297
+ "stepId"?: string;
298
+ "payload"?: Record<string, unknown>;
299
+ "createdAt": string;
300
+ }
301
+ export interface AgentSessionContractWorkflowEvent {
302
+ "id": string;
303
+ "workflowRunId": string;
304
+ "sequence": number;
305
+ "eventType": "agent_session_contract";
306
+ "stepId": string;
307
+ "payload": AgentSessionContract;
308
+ "createdAt": string;
309
+ }
310
+ export interface CustomWorkflowEvent {
311
+ "id": string;
312
+ "workflowRunId": string;
313
+ "sequence": number;
314
+ "eventKind": "custom";
315
+ "eventType": string;
316
+ "stepId"?: string;
317
+ "payload"?: Record<string, unknown>;
318
+ "createdAt": string;
319
+ }
320
+ export type WorkflowEvent = AgentSessionContractWorkflowEvent | GenericWorkflowEvent | CustomWorkflowEvent;
321
+ export interface WorkflowEventResponse {
322
+ "ok": boolean;
323
+ "event": WorkflowEvent;
324
+ }
325
+ export interface WorkflowEventListResponse {
326
+ "ok": boolean;
327
+ "events": Array<WorkflowEvent>;
328
+ }
329
+ export interface CountResponse {
330
+ "ok": boolean;
331
+ "count": number;
332
+ }
114
333
  export interface LoopsClientOptions {
115
334
  /** Base URL, e.g. process.env.APP_API_URL. */
116
335
  baseUrl: string;
@@ -135,26 +354,65 @@ export declare class LoopsClient {
135
354
  private request;
136
355
  /** Liveness probe */
137
356
  healthCheck(init?: RequestInit): Promise<Foundation>;
357
+ healthzProbe(init?: RequestInit): Promise<Record<string, unknown>>;
358
+ openapiJsonProbe(init?: RequestInit): Promise<Record<string, unknown>>;
138
359
  /** Readiness probe (storage reachable + migrated) */
139
360
  readyCheck(init?: RequestInit): Promise<Foundation>;
361
+ readyzProbe(init?: RequestInit): Promise<Record<string, unknown>>;
362
+ /** status.read */
363
+ statusRead(init?: RequestInit): Promise<Record<string, unknown>>;
364
+ /** api.read */
365
+ apiRead(init?: RequestInit): Promise<Record<string, unknown>>;
366
+ /** goalRuns.list */
367
+ goalRunsList(init?: RequestInit): Promise<Record<string, unknown>>;
368
+ /** goals.list */
369
+ goalsList(init?: RequestInit): Promise<Record<string, unknown>>;
370
+ /** goals.get */
371
+ goalsGet(id: string, init?: RequestInit): Promise<Record<string, unknown>>;
372
+ /** goals.planNodes */
373
+ goalsPlanNodes(id: string, init?: RequestInit): Promise<Record<string, unknown>>;
374
+ /** history.prune */
375
+ historyPrune(init?: RequestInit): Promise<Record<string, unknown>>;
376
+ /** Bulk id-preserving import (self-hosted backfill) */
377
+ importRows(body: ImportInput, init?: RequestInit): Promise<ImportResponse>;
378
+ /** List workflow route invocations */
379
+ listWorkflowInvocations(query?: {
380
+ "limit"?: number;
381
+ }, init?: RequestInit): Promise<WorkflowInvocationListResponse>;
382
+ /** Create an id-preserving workflow route invocation */
383
+ createWorkflowInvocation(body: CreateWorkflowInvocationInput, init?: RequestInit): Promise<WorkflowInvocationResponse>;
384
+ /** invocations.get */
385
+ invocationsGet(id: string, init?: RequestInit): Promise<Record<string, unknown>>;
386
+ /** leases.recover */
387
+ leasesRecover(init?: RequestInit): Promise<Record<string, unknown>>;
140
388
  /** List loops */
141
389
  listLoops(query?: {
142
390
  "status"?: "active" | "paused" | "stopped" | "expired";
143
391
  "limit"?: number;
392
+ "offset"?: number;
144
393
  "includeArchived"?: boolean;
145
394
  "archived"?: boolean;
395
+ "labels"?: Array<string>;
146
396
  }, init?: RequestInit): Promise<LoopListResponse>;
147
397
  /** Create a loop */
148
398
  createLoop(body: CreateLoopInput, init?: RequestInit): Promise<LoopResponse>;
399
+ /** Count loops (total-row verification) */
400
+ countLoops(query?: {
401
+ "status"?: string;
402
+ "includeArchived"?: boolean;
403
+ "archived"?: boolean;
404
+ }, init?: RequestInit): Promise<CountResponse>;
149
405
  /** Get a loop by id */
150
406
  getLoop(id: string, init?: RequestInit): Promise<LoopResponse>;
151
407
  /** Delete a loop */
152
408
  deleteLoop(id: string, init?: RequestInit): Promise<DeleteResponse>;
153
409
  /** Update a loop (status / schedule fields) */
154
410
  updateLoop(id: string, body: UpdateLoopInput, init?: RequestInit): Promise<LoopResponse>;
155
- /** Archive a loop */
411
+ /** Archive a loop by id or name */
156
412
  archiveLoop(id: string, init?: RequestInit): Promise<LoopResponse>;
157
- /** Unarchive a loop */
413
+ /** loops.rename */
414
+ loopsRename(id: string, init?: RequestInit): Promise<Record<string, unknown>>;
415
+ /** Unarchive a loop by id or name */
158
416
  unarchiveLoop(id: string, init?: RequestInit): Promise<LoopResponse>;
159
417
  /** List run receipts */
160
418
  listRunReceipts(query?: {
@@ -169,14 +427,116 @@ export declare class LoopsClient {
169
427
  writeRunReceipt(body: WriteRunReceiptInput, init?: RequestInit): Promise<RunReceiptResponse>;
170
428
  /** Get a run receipt by run id */
171
429
  getRunReceipt(runId: string, init?: RequestInit): Promise<RunReceiptResponse>;
430
+ /** runners.claim */
431
+ runnersClaim(body: Record<string, unknown>, init?: RequestInit): Promise<Record<string, unknown>>;
432
+ /** runners.poll */
433
+ runnersPoll(body: Record<string, unknown>, init?: RequestInit): Promise<Record<string, unknown>>;
172
434
  /** List runs */
173
435
  listRuns(query?: {
174
436
  "loopId"?: string;
175
437
  "status"?: string;
438
+ "labels"?: Array<string>;
176
439
  "limit"?: number;
440
+ "offset"?: number;
441
+ "showOutput"?: boolean;
177
442
  }, init?: RequestInit): Promise<RunListResponse>;
443
+ /** Count runs (total-row verification) */
444
+ countRuns(query?: {
445
+ "status"?: string;
446
+ }, init?: RequestInit): Promise<CountResponse>;
178
447
  /** Get a run by id */
179
- getRun(id: string, init?: RequestInit): Promise<RunResponse>;
448
+ getRun(id: string, query?: {
449
+ "showOutput"?: boolean;
450
+ }, init?: RequestInit): Promise<RunResponse>;
451
+ /** runs.evidence */
452
+ runsEvidence(id: string, body: Record<string, unknown>, init?: RequestInit): Promise<Record<string, unknown>>;
453
+ /** runs.finalize */
454
+ runsFinalize(id: string, body: {
455
+ "claimToken": string;
456
+ "status": "succeeded" | "failed" | "timed_out";
457
+ "finishedAt"?: string;
458
+ "durationMs"?: number;
459
+ "stdout"?: string;
460
+ "stderr"?: string;
461
+ "error"?: string;
462
+ "exitCode"?: number;
463
+ "pid"?: number;
464
+ }, init?: RequestInit): Promise<Record<string, unknown>>;
465
+ /** runs.Goals.Create */
466
+ runsGoalsCreate(id: string, body: Record<string, unknown>, init?: RequestInit): Promise<Record<string, unknown>>;
467
+ /** runs.Goals.Find */
468
+ runsGoalsFind(id: string, body: Record<string, unknown>, init?: RequestInit): Promise<Record<string, unknown>>;
469
+ /** runs.Goals.Events */
470
+ runsGoalsEvents(id: string, goalId: string, body: Record<string, unknown>, init?: RequestInit): Promise<Record<string, unknown>>;
471
+ /** runs.Goals.Get */
472
+ runsGoalsGet(id: string, goalId: string, body: Record<string, unknown>, init?: RequestInit): Promise<Record<string, unknown>>;
473
+ /** runs.Goals.Plan.Nodes.Create */
474
+ runsGoalsPlanNodesCreate(id: string, goalId: string, body: Record<string, unknown>, init?: RequestInit): Promise<Record<string, unknown>>;
475
+ /** runs.Goals.Plan.Nodes.List */
476
+ runsGoalsPlanNodesList(id: string, goalId: string, body: Record<string, unknown>, init?: RequestInit): Promise<Record<string, unknown>>;
477
+ /** runs.Goals.Plan.Nodes.Update */
478
+ runsGoalsPlanNodesUpdate(id: string, goalId: string, key: string, body: Record<string, unknown>, init?: RequestInit): Promise<Record<string, unknown>>;
479
+ /** runs.Goals.Status */
480
+ runsGoalsStatus(id: string, goalId: string, body: Record<string, unknown>, init?: RequestInit): Promise<Record<string, unknown>>;
481
+ /** runs.heartbeat */
482
+ runsHeartbeat(id: string, body: Record<string, unknown>, init?: RequestInit): Promise<Record<string, unknown>>;
483
+ /** runs.recover */
484
+ runsRecover(id: string, init?: RequestInit): Promise<Record<string, unknown>>;
485
+ /** runs.workflowRuns.create */
486
+ runsWorkflowRunsCreate(id: string, body: Record<string, unknown>, init?: RequestInit): Promise<Record<string, unknown>>;
487
+ /** Validate a legacy runner-authored agent session contract */
488
+ runsWorkflowRunsEvents(id: string, workflowRunId: string, body: AgentSessionContractEventInput, init?: RequestInit): Promise<WorkflowEventResponse>;
489
+ /** runs.workflowRuns.finalize */
490
+ runsWorkflowRunsFinalize(id: string, workflowRunId: string, body: Record<string, unknown>, init?: RequestInit): Promise<Record<string, unknown>>;
491
+ /** runs.workflowRuns.get */
492
+ runsWorkflowRunsGet(id: string, workflowRunId: string, body: Record<string, unknown>, init?: RequestInit): Promise<Record<string, unknown>>;
493
+ /** runs.workflowRuns.recover */
494
+ runsWorkflowRunsRecover(id: string, workflowRunId: string, body: Record<string, unknown>, init?: RequestInit): Promise<Record<string, unknown>>;
495
+ /** runs.workflowRuns.steps */
496
+ runsWorkflowRunsSteps(id: string, workflowRunId: string, body: Record<string, unknown>, init?: RequestInit): Promise<Record<string, unknown>>;
497
+ /** runs.workflowRuns.stepAction */
498
+ runsWorkflowRunsStepAction(id: string, workflowRunId: string, stepId: string, action: "get" | "start" | "pid" | "progress" | "skip" | "finalize", body: Record<string, unknown>, init?: RequestInit): Promise<Record<string, unknown>>;
499
+ /** api.status */
500
+ apiStatus(init?: RequestInit): Promise<Record<string, unknown>>;
501
+ v1VersionProbe(init?: RequestInit): Promise<Record<string, unknown>>;
502
+ /** List workflow route work items */
503
+ listWorkflowWorkItems(query?: {
504
+ "status"?: string;
505
+ "routeKey"?: string;
506
+ "limit"?: number;
507
+ }, init?: RequestInit): Promise<WorkflowWorkItemListResponse>;
508
+ /** Upsert an id-preserving workflow route work item */
509
+ upsertWorkflowWorkItem(body: UpsertWorkflowWorkItemInput, init?: RequestInit): Promise<WorkflowWorkItemResponse>;
510
+ /** workItems.get */
511
+ workItemsGet(id: string, init?: RequestInit): Promise<Record<string, unknown>>;
512
+ /** workflowRuns.list */
513
+ workflowRunsList(init?: RequestInit): Promise<Record<string, unknown>>;
514
+ /** workflowRuns.get */
515
+ workflowRunsGet(id: string, init?: RequestInit): Promise<Record<string, unknown>>;
516
+ /** workflowRuns.events */
517
+ workflowRunsEvents(id: string, init?: RequestInit): Promise<WorkflowEventListResponse>;
518
+ /** workflowRuns.recover */
519
+ workflowRunsRecover(id: string, body?: {
520
+ "reason"?: string;
521
+ }, init?: RequestInit): Promise<Record<string, unknown>>;
522
+ /** workflowRuns.steps */
523
+ workflowRunsSteps(id: string, init?: RequestInit): Promise<Record<string, unknown>>;
524
+ /** List workflow specs */
525
+ listWorkflows(query?: {
526
+ "status"?: "active" | "archived";
527
+ "limit"?: number;
528
+ "offset"?: number;
529
+ }, init?: RequestInit): Promise<WorkflowListResponse>;
530
+ /** Create a workflow spec */
531
+ createWorkflow(body: CreateWorkflowInput, init?: RequestInit): Promise<WorkflowResponse>;
532
+ /** Count workflow specs */
533
+ countWorkflows(query?: {
534
+ "status"?: string;
535
+ }, init?: RequestInit): Promise<CountResponse>;
536
+ /** Get a workflow spec by id */
537
+ getWorkflow(id: string, init?: RequestInit): Promise<WorkflowResponse>;
538
+ /** workflows.archive */
539
+ workflowsArchive(id: string, init?: RequestInit): Promise<Record<string, unknown>>;
180
540
  /** Service version */
181
541
  getVersion(init?: RequestInit): Promise<Foundation>;
182
542
  }