@wjarka/cezarion 0.14.9-dev.898 → 0.14.9-dev.901

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 (78) hide show
  1. package/README.md +12 -0
  2. package/dist/contract/index.js +50 -5
  3. package/dist/contract/projects.d.ts +40 -0
  4. package/dist/contract/runs.d.ts +43 -0
  5. package/dist/contract/skills.d.ts +5 -0
  6. package/dist/index.js +6 -0
  7. package/dist/index.js.map +1 -1
  8. package/dist/runs/store.d.ts +12 -0
  9. package/dist/runs/store.js +5 -0
  10. package/dist/runs/store.js.map +1 -1
  11. package/dist/runs/webhook.d.ts +125 -0
  12. package/dist/runs/webhook.js +256 -0
  13. package/dist/runs/webhook.js.map +1 -0
  14. package/dist/server/server.d.ts +2634 -1403
  15. package/dist/server/server.js +131 -7
  16. package/dist/server/server.js.map +1 -1
  17. package/dist/task-cli/cli.js +51 -4
  18. package/dist/task-cli/cli.js.map +1 -1
  19. package/dist/task-cli/discovery.js +6 -5
  20. package/dist/task-cli/discovery.js.map +1 -1
  21. package/dist/task-cli/http.d.ts +3 -0
  22. package/dist/task-cli/http.js.map +1 -1
  23. package/dist/workflows/run.d.ts +2 -0
  24. package/dist/workflows/run.js +1 -0
  25. package/dist/workflows/run.js.map +1 -1
  26. package/dist/workspace/config.d.ts +9 -0
  27. package/dist/workspace/config.js +13 -1
  28. package/dist/workspace/config.js.map +1 -1
  29. package/dist/workspace/projects.d.ts +24 -1
  30. package/dist/workspace/projects.js +14 -1
  31. package/dist/workspace/projects.js.map +1 -1
  32. package/package.json +3 -3
  33. package/web/dist/assets/agent-accounts-DOFEs7OK.js +1 -0
  34. package/web/dist/assets/centered-state-BrRPODjj.js +43 -0
  35. package/web/dist/assets/{collapsible-D3Lh_nlG.js → collapsible-CH3UzMt8.js} +1 -1
  36. package/web/dist/assets/{commit-list-CgoIXaVd.js → commit-list-BF4myGkq.js} +1 -1
  37. package/web/dist/assets/{compare-variants-2AnPP6ez.js → compare-variants-DNX6SniB.js} +1 -1
  38. package/web/dist/assets/{diff-CZcD4D1r2.js → diff-Jd8igxRb2.js} +2 -2
  39. package/web/dist/assets/{diff-controls-BCazakYu.js → diff-controls-1iZN3L9z.js} +1 -1
  40. package/web/dist/assets/{diff-stat-Cn7rzy1H.js → diff-stat-C3Id3W_C.js} +1 -1
  41. package/web/dist/assets/{diff-view-C46nHiP2.js → diff-view-BK1wJX0D.js} +1 -1
  42. package/web/dist/assets/{dropdown-menu-CyFz8H2A.js → dropdown-menu-JK2oEKtU.js} +1 -1
  43. package/web/dist/assets/{git-toolbar-DT4Q02mZ.js → git-toolbar-Czc2eDts.js} +1 -1
  44. package/web/dist/assets/github-BOYBHSuU.js +1 -0
  45. package/web/dist/assets/{image-preview-B618kDBH.js → image-preview-BEOsw8qX.js} +1 -1
  46. package/web/dist/assets/index-CaQiR7tg.js +7 -0
  47. package/web/dist/assets/index-Cp146nCD.css +1 -0
  48. package/web/dist/assets/{markdown-0VE-LMFx.js → markdown-CbMH76QP.js} +1 -1
  49. package/web/dist/assets/pill-i0LDDqPl.js +1 -0
  50. package/web/dist/assets/{project-router-EEnXzYjj.js → project-router-5lOBnHn-.js} +1 -1
  51. package/web/dist/assets/{prompt-templates-D8lCwJds.js → prompt-templates-CinGNbS4.js} +3 -3
  52. package/web/dist/assets/repo-git-CwEH2IXE.js +1 -0
  53. package/web/dist/assets/{run-diff-C-Ij6Y04.js → run-diff-3peOAX9l.js} +2 -2
  54. package/web/dist/assets/run-header-DDuQGG2F.js +1 -0
  55. package/web/dist/assets/{skills-CH6TkMy9.js → skills-Cd35zfc2.js} +1 -1
  56. package/web/dist/assets/{tab-link-CQc65wEy.js → tab-link-KwnZekGX.js} +1 -1
  57. package/web/dist/assets/task-changes-BRAnOBnv.js +1 -0
  58. package/web/dist/assets/{task-commits-BYdWmsx1.js → task-commits-CLHTP-nL.js} +1 -1
  59. package/web/dist/assets/{task-files-DHUEF1Fh.js → task-files-BbQ3zTG5.js} +2 -2
  60. package/web/dist/assets/task-thread-BzPJy_YC.js +9 -0
  61. package/web/dist/assets/{textarea-BOXhPgVD.js → textarea-CP5yQwcP.js} +1 -1
  62. package/web/dist/assets/thread-loading-DRqt03Zs.js +1 -0
  63. package/web/dist/assets/{token-metrics-DJeOZ5n-.js → token-metrics-BjlJ1WUf.js} +1 -1
  64. package/web/dist/assets/{utils-DKheTxGD.js → utils-BW1-Ibnd.js} +1 -1
  65. package/web/dist/assets/{workflows-CpHaJbUe.js → workflows-BPYflHS1.js} +4 -4
  66. package/web/dist/assets/{zoomable-image-YW3Qdrr_.js → zoomable-image-DVvXID3t.js} +1 -1
  67. package/web/dist/index.html +14 -14
  68. package/web/dist/assets/agent-accounts-tNk0wiKj.js +0 -1
  69. package/web/dist/assets/centered-state-DXxIJA15.js +0 -43
  70. package/web/dist/assets/github-vwoJvCTz.js +0 -1
  71. package/web/dist/assets/index-1YNk4P3I.js +0 -7
  72. package/web/dist/assets/index-D0WAgmTQ.css +0 -1
  73. package/web/dist/assets/pill-BU5y1CTd.js +0 -1
  74. package/web/dist/assets/repo-git-CYDGngEk.js +0 -1
  75. package/web/dist/assets/run-header-DYiqx0qE.js +0 -1
  76. package/web/dist/assets/task-changes-CEi-l2GZ.js +0 -1
  77. package/web/dist/assets/task-thread-DAxvkDvr.js +0 -9
  78. package/web/dist/assets/thread-loading-D9dDLmql.js +0 -1
@@ -3,6 +3,7 @@ import { AutomationStore } from '../automations/store.ts';
3
3
  import type { IncomingMessage } from 'node:http';
4
4
  import { Hono } from 'hono';
5
5
  import { type ServerType } from '@hono/node-server';
6
+ import { TaskWebhooks } from '../runs/webhook.ts';
6
7
  import { ProviderAuthService, type ProviderId } from '../core/provider-auth.ts';
7
8
  import { RunnerModelCatalog } from '../core/runner-model-catalog.ts';
8
9
  import { SkillsUpdateService } from '../skills-update.ts';
@@ -19,6 +20,13 @@ import { openInTerminal } from './open-in-terminal.ts';
19
20
  import { openFileInDefaultApp, openInApp } from './open-in-app.ts';
20
21
  import { ProviderRuntimeAuthObserver } from './provider-auth-runtime.ts';
21
22
  export interface ServerDeps {
23
+ /** The task-webhook subscribers (#589). Boot creates it and attaches the boot store BEFORE
24
+ * `manager.recover()`, so recovery's transitions are reported; `startServer` sets its origin
25
+ * from the port it binds. Absent (tests, embedded apps), `createApp` makes its own. */
26
+ taskWebhooks?: TaskWebhooks;
27
+ /** Test seam for task-webhook deliveries (#589): the `fetch` they POST with. Used only when
28
+ * `createApp` builds its own `TaskWebhooks`. */
29
+ taskWebhookFetch?: typeof fetch;
22
30
  /** Same-process optional private listener; attached to managers before recovery. */
23
31
  delegation?: DelegationController;
24
32
  repoRoot: string;
@@ -1226,6 +1234,10 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
1226
1234
  source: "checkout" | "local";
1227
1235
  maxParallel?: number | undefined;
1228
1236
  tags?: string[] | undefined;
1237
+ webhook?: {
1238
+ url: string;
1239
+ tokenSet: boolean;
1240
+ } | undefined;
1229
1241
  status: import("../workspace/projects.ts").ProjectStatus;
1230
1242
  branch?: string;
1231
1243
  forge?: import("./forge/types.ts").ForgeKind;
@@ -1253,6 +1265,10 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
1253
1265
  source: "checkout" | "local";
1254
1266
  maxParallel?: number | undefined;
1255
1267
  tags?: string[] | undefined;
1268
+ webhook?: {
1269
+ url: string;
1270
+ tokenSet: boolean;
1271
+ } | undefined;
1256
1272
  status: import("../workspace/projects.ts").ProjectStatus;
1257
1273
  branch?: string;
1258
1274
  forge?: import("./forge/types.ts").ForgeKind;
@@ -1279,6 +1295,10 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
1279
1295
  source: "checkout" | "local";
1280
1296
  maxParallel?: number | undefined;
1281
1297
  tags?: string[] | undefined;
1298
+ webhook?: {
1299
+ url: string;
1300
+ tokenSet: boolean;
1301
+ } | undefined;
1282
1302
  status: import("../workspace/projects.ts").ProjectStatus;
1283
1303
  branch?: string;
1284
1304
  forge?: import("./forge/types.ts").ForgeKind;
@@ -1358,6 +1378,10 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
1358
1378
  json: {
1359
1379
  maxParallel?: number | null | undefined;
1360
1380
  tags?: string[] | null | undefined;
1381
+ webhook?: {
1382
+ url: string;
1383
+ token?: string | undefined;
1384
+ } | null | undefined;
1361
1385
  };
1362
1386
  } & {
1363
1387
  param: {
@@ -1374,6 +1398,10 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
1374
1398
  json: {
1375
1399
  maxParallel?: number | null | undefined;
1376
1400
  tags?: string[] | null | undefined;
1401
+ webhook?: {
1402
+ url: string;
1403
+ token?: string | undefined;
1404
+ } | null | undefined;
1377
1405
  };
1378
1406
  } & {
1379
1407
  param: {
@@ -1390,6 +1418,10 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
1390
1418
  json: {
1391
1419
  maxParallel?: number | null | undefined;
1392
1420
  tags?: string[] | null | undefined;
1421
+ webhook?: {
1422
+ url: string;
1423
+ token?: string | undefined;
1424
+ } | null | undefined;
1393
1425
  };
1394
1426
  } & {
1395
1427
  param: {
@@ -1408,6 +1440,10 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
1408
1440
  source: "checkout" | "local";
1409
1441
  maxParallel?: number | undefined;
1410
1442
  tags?: string[] | undefined;
1443
+ webhook?: {
1444
+ url: string;
1445
+ tokenSet: boolean;
1446
+ } | undefined;
1411
1447
  status: import("../workspace/projects.ts").ProjectStatus;
1412
1448
  branch?: string;
1413
1449
  forge?: import("./forge/types.ts").ForgeKind;
@@ -1420,6 +1456,10 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
1420
1456
  json: {
1421
1457
  maxParallel?: number | null | undefined;
1422
1458
  tags?: string[] | null | undefined;
1459
+ webhook?: {
1460
+ url: string;
1461
+ token?: string | undefined;
1462
+ } | null | undefined;
1423
1463
  };
1424
1464
  } & {
1425
1465
  param: {
@@ -1428,6 +1468,57 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
1428
1468
  };
1429
1469
  };
1430
1470
  };
1471
+ } & {
1472
+ "/projects/:projectId/webhook/test": {
1473
+ $post: {
1474
+ output: {
1475
+ error: string;
1476
+ };
1477
+ outputFormat: "json";
1478
+ status: 409;
1479
+ input: {
1480
+ param: {
1481
+ projectId: string;
1482
+ };
1483
+ };
1484
+ } | {
1485
+ output: {
1486
+ error: string;
1487
+ };
1488
+ outputFormat: "json";
1489
+ status: 404;
1490
+ input: {
1491
+ param: {
1492
+ projectId: string;
1493
+ };
1494
+ };
1495
+ } | {
1496
+ output: {
1497
+ error: string;
1498
+ };
1499
+ outputFormat: "json";
1500
+ status: 400;
1501
+ input: {
1502
+ param: {
1503
+ projectId: string;
1504
+ };
1505
+ };
1506
+ } | {
1507
+ output: {
1508
+ ok: boolean;
1509
+ status?: number | undefined;
1510
+ error?: string | undefined;
1511
+ dryRun?: boolean | undefined;
1512
+ };
1513
+ outputFormat: "json";
1514
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1515
+ input: {
1516
+ param: {
1517
+ projectId: string;
1518
+ };
1519
+ };
1520
+ };
1521
+ };
1431
1522
  } & {
1432
1523
  "/projects/checkout": {
1433
1524
  $post: {
@@ -1442,6 +1533,10 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
1442
1533
  source: "checkout" | "local";
1443
1534
  maxParallel?: number | undefined;
1444
1535
  tags?: string[] | undefined;
1536
+ webhook?: {
1537
+ url: string;
1538
+ tokenSet: boolean;
1539
+ } | undefined;
1445
1540
  status: import("../workspace/projects.ts").ProjectStatus;
1446
1541
  branch?: string;
1447
1542
  forge?: import("./forge/types.ts").ForgeKind;
@@ -2741,6 +2836,11 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
2741
2836
  systemPrompt?: string | undefined;
2742
2837
  generateFollowups?: boolean | undefined;
2743
2838
  autonomous?: boolean | undefined;
2839
+ notify?: boolean | undefined;
2840
+ webhook?: {
2841
+ lastDeliveredAt?: string | undefined;
2842
+ lastError?: string | undefined;
2843
+ } | undefined;
2744
2844
  automation?: {
2745
2845
  automationId: string;
2746
2846
  automationRevision: number;
@@ -3609,6 +3709,11 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
3609
3709
  systemPrompt?: string | undefined;
3610
3710
  generateFollowups?: boolean | undefined;
3611
3711
  autonomous?: boolean | undefined;
3712
+ notify?: boolean | undefined;
3713
+ webhook?: {
3714
+ lastDeliveredAt?: string | undefined;
3715
+ lastError?: string | undefined;
3716
+ } | undefined;
3612
3717
  automation?: {
3613
3718
  automationId: string;
3614
3719
  automationRevision: number;
@@ -4213,19 +4318,6 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
4213
4318
  } & {
4214
4319
  "/repo/commit/:sha": {
4215
4320
  $get: {
4216
- output: string;
4217
- outputFormat: "text";
4218
- status: import("hono/utils/http-status").ContentfulStatusCode;
4219
- input: {
4220
- query: {
4221
- structured?: string | undefined;
4222
- };
4223
- } & {
4224
- param: {
4225
- sha: string;
4226
- };
4227
- };
4228
- } | {
4229
4321
  output: {
4230
4322
  error: string;
4231
4323
  code?: "invalid_input" | undefined;
@@ -4289,6 +4381,19 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
4289
4381
  sha: string;
4290
4382
  };
4291
4383
  };
4384
+ } | {
4385
+ output: string;
4386
+ outputFormat: "text";
4387
+ status: import("hono/utils/http-status").ContentfulStatusCode;
4388
+ input: {
4389
+ query: {
4390
+ structured?: string | undefined;
4391
+ };
4392
+ } & {
4393
+ param: {
4394
+ sha: string;
4395
+ };
4396
+ };
4292
4397
  };
4293
4398
  };
4294
4399
  } & {
@@ -6267,6 +6372,11 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
6267
6372
  event: string;
6268
6373
  githubUrl: string;
6269
6374
  } | undefined;
6375
+ notify?: boolean | undefined;
6376
+ webhook?: {
6377
+ lastDeliveredAt?: string | undefined;
6378
+ lastError?: string | undefined;
6379
+ } | undefined;
6270
6380
  status: "cancelled" | "done" | "failed" | "queued" | "review" | "running" | "waiting";
6271
6381
  activity?: "monitoring" | undefined;
6272
6382
  hasPendingHumanAsk?: boolean | undefined;
@@ -6494,6 +6604,24 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
6494
6604
  } & {
6495
6605
  "/runs/:id/worker-destroy": {
6496
6606
  $post: {
6607
+ output: {
6608
+ readonly code: "capacity_limit" | "denied_scope" | "incompatible_state" | "incomplete_cleanup" | "invalid_baseline" | "invalid_input" | "unauthenticated" | "unavailable_diff" | "unavailable_transport";
6609
+ readonly error: string;
6610
+ };
6611
+ outputFormat: "json";
6612
+ status: 400 | 401 | 403 | 409 | 503;
6613
+ input: {
6614
+ query: {
6615
+ [x: string]: string | string[];
6616
+ };
6617
+ } & {
6618
+ param: {
6619
+ id: string;
6620
+ };
6621
+ } & {
6622
+ json: Record<string, never>;
6623
+ };
6624
+ } | {
6497
6625
  output: {
6498
6626
  error: string;
6499
6627
  code?: "invalid_input" | undefined;
@@ -6565,24 +6693,6 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
6565
6693
  } & {
6566
6694
  json: Record<string, never>;
6567
6695
  };
6568
- } | {
6569
- output: {
6570
- readonly code: "capacity_limit" | "denied_scope" | "incompatible_state" | "incomplete_cleanup" | "invalid_baseline" | "invalid_input" | "unauthenticated" | "unavailable_diff" | "unavailable_transport";
6571
- readonly error: string;
6572
- };
6573
- outputFormat: "json";
6574
- status: 400 | 401 | 403 | 409 | 503;
6575
- input: {
6576
- query: {
6577
- [x: string]: string | string[];
6578
- };
6579
- } & {
6580
- param: {
6581
- id: string;
6582
- };
6583
- } & {
6584
- json: Record<string, never>;
6585
- };
6586
6696
  };
6587
6697
  };
6588
6698
  } & {
@@ -6940,6 +7050,11 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
6940
7050
  systemPrompt?: string | undefined;
6941
7051
  generateFollowups?: boolean | undefined;
6942
7052
  autonomous?: boolean | undefined;
7053
+ notify?: boolean | undefined;
7054
+ webhook?: {
7055
+ lastDeliveredAt?: string | undefined;
7056
+ lastError?: string | undefined;
7057
+ } | undefined;
6943
7058
  automation?: {
6944
7059
  automationId: string;
6945
7060
  automationRevision: number;
@@ -7418,6 +7533,11 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
7418
7533
  systemPrompt?: string | undefined;
7419
7534
  generateFollowups?: boolean | undefined;
7420
7535
  autonomous?: boolean | undefined;
7536
+ notify?: boolean | undefined;
7537
+ webhook?: {
7538
+ lastDeliveredAt?: string | undefined;
7539
+ lastError?: string | undefined;
7540
+ } | undefined;
7421
7541
  automation?: {
7422
7542
  automationId: string;
7423
7543
  automationRevision: number;
@@ -7548,34 +7668,25 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
7548
7668
  };
7549
7669
  };
7550
7670
  } & {
7551
- "/runs/:id/auto-resume": {
7552
- $delete: {
7671
+ "/runs/:id/notify": {
7672
+ $post: {
7553
7673
  output: {
7554
7674
  error: string;
7675
+ code?: "invalid_input" | undefined;
7555
7676
  };
7556
7677
  outputFormat: "json";
7557
- status: 404;
7678
+ status: 400;
7558
7679
  input: {
7559
7680
  param: {
7560
7681
  id: string;
7561
7682
  };
7562
- };
7563
- } | {
7564
- output: {
7565
- cancelled: true;
7566
- };
7567
- outputFormat: "json";
7568
- status: import("hono/utils/http-status").ContentfulStatusCode;
7569
- input: {
7570
- param: {
7571
- id: string;
7683
+ } & {
7684
+ json: {
7685
+ notify: boolean;
7686
+ message?: string | undefined;
7572
7687
  };
7573
7688
  };
7574
- };
7575
- };
7576
- } & {
7577
- "/runs/:id/read": {
7578
- $post: {
7689
+ } | {
7579
7690
  output: {
7580
7691
  id: string;
7581
7692
  title: string;
@@ -7906,6 +8017,11 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
7906
8017
  systemPrompt?: string | undefined;
7907
8018
  generateFollowups?: boolean | undefined;
7908
8019
  autonomous?: boolean | undefined;
8020
+ notify?: boolean | undefined;
8021
+ webhook?: {
8022
+ lastDeliveredAt?: string | undefined;
8023
+ lastError?: string | undefined;
8024
+ } | undefined;
7909
8025
  automation?: {
7910
8026
  automationId: string;
7911
8027
  automationRevision: number;
@@ -8013,6 +8129,11 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
8013
8129
  param: {
8014
8130
  id: string;
8015
8131
  };
8132
+ } & {
8133
+ json: {
8134
+ notify: boolean;
8135
+ message?: string | undefined;
8136
+ };
8016
8137
  };
8017
8138
  } | {
8018
8139
  output: {
@@ -8024,11 +8145,58 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
8024
8145
  param: {
8025
8146
  id: string;
8026
8147
  };
8148
+ } & {
8149
+ json: {
8150
+ notify: boolean;
8151
+ message?: string | undefined;
8152
+ };
8153
+ };
8154
+ } | {
8155
+ output: {
8156
+ error: string;
8157
+ };
8158
+ outputFormat: "json";
8159
+ status: 400;
8160
+ input: {
8161
+ param: {
8162
+ id: string;
8163
+ };
8164
+ } & {
8165
+ json: {
8166
+ notify: boolean;
8167
+ message?: string | undefined;
8168
+ };
8027
8169
  };
8028
8170
  };
8029
8171
  };
8030
8172
  } & {
8031
- "/runs/:id/unread": {
8173
+ "/runs/:id/auto-resume": {
8174
+ $delete: {
8175
+ output: {
8176
+ error: string;
8177
+ };
8178
+ outputFormat: "json";
8179
+ status: 404;
8180
+ input: {
8181
+ param: {
8182
+ id: string;
8183
+ };
8184
+ };
8185
+ } | {
8186
+ output: {
8187
+ cancelled: true;
8188
+ };
8189
+ outputFormat: "json";
8190
+ status: import("hono/utils/http-status").ContentfulStatusCode;
8191
+ input: {
8192
+ param: {
8193
+ id: string;
8194
+ };
8195
+ };
8196
+ };
8197
+ };
8198
+ } & {
8199
+ "/runs/:id/read": {
8032
8200
  $post: {
8033
8201
  output: {
8034
8202
  id: string;
@@ -8360,6 +8528,11 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
8360
8528
  systemPrompt?: string | undefined;
8361
8529
  generateFollowups?: boolean | undefined;
8362
8530
  autonomous?: boolean | undefined;
8531
+ notify?: boolean | undefined;
8532
+ webhook?: {
8533
+ lastDeliveredAt?: string | undefined;
8534
+ lastError?: string | undefined;
8535
+ } | undefined;
8363
8536
  automation?: {
8364
8537
  automationId: string;
8365
8538
  automationRevision: number;
@@ -8482,7 +8655,7 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
8482
8655
  };
8483
8656
  };
8484
8657
  } & {
8485
- "/runs": {
8658
+ "/runs/:id/unread": {
8486
8659
  $post: {
8487
8660
  output: {
8488
8661
  id: string;
@@ -8814,6 +8987,11 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
8814
8987
  systemPrompt?: string | undefined;
8815
8988
  generateFollowups?: boolean | undefined;
8816
8989
  autonomous?: boolean | undefined;
8990
+ notify?: boolean | undefined;
8991
+ webhook?: {
8992
+ lastDeliveredAt?: string | undefined;
8993
+ lastError?: string | undefined;
8994
+ } | undefined;
8817
8995
  automation?: {
8818
8996
  automationId: string;
8819
8997
  automationRevision: number;
@@ -8916,60 +9094,42 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
8916
9094
  } | undefined;
8917
9095
  };
8918
9096
  outputFormat: "json";
8919
- status: 200;
9097
+ status: import("hono/utils/http-status").ContentfulStatusCode;
8920
9098
  input: {
8921
- json: {
8922
- workflow?: string | undefined;
8923
- steps?: {
8924
- id: string;
8925
- name?: string | undefined;
8926
- prompt?: string | undefined;
8927
- skill?: string | undefined;
8928
- model?: string | undefined;
8929
- effort?: string | undefined;
8930
- runner?: "claude" | "codex" | "cursor" | "opencode" | "pi" | undefined;
8931
- agentProfile?: string | undefined;
8932
- allowedTools?: string[] | undefined;
8933
- bashAllowlist?: string[] | undefined;
8934
- command?: string | undefined;
8935
- onFail?: {
8936
- retry: string;
8937
- max?: number | undefined;
8938
- } | undefined;
8939
- }[] | undefined;
8940
- task: string;
8941
- model?: string | undefined;
8942
- effort?: string | undefined;
8943
- runner?: "claude" | "codex" | "cursor" | "opencode" | "pi" | undefined;
8944
- agentProfile?: string | undefined;
8945
- variants?: number | undefined;
8946
- worktree?: boolean | undefined;
8947
- autonomous?: boolean | undefined;
8948
- generateFollowups?: boolean | undefined;
8949
- systemPrompt?: string | undefined;
8950
- images?: {
8951
- mediaType: string;
8952
- data: string;
8953
- }[] | undefined;
8954
- todoId?: string | undefined;
8955
- clientRequestId?: string | undefined;
9099
+ param: {
9100
+ id: string;
8956
9101
  };
8957
9102
  };
8958
9103
  } | {
8959
9104
  output: {
8960
- id: string;
8961
- title: string;
8962
- titleSummary?: string | undefined;
8963
- diffStat?: {
8964
- adds: number;
8965
- dels: number;
8966
- files: number;
8967
- repointed?: boolean | undefined;
8968
- } | undefined;
8969
- workflow: string;
8970
- task: string;
8971
- queuedMessages?: {
8972
- id: string;
9105
+ error: string;
9106
+ };
9107
+ outputFormat: "json";
9108
+ status: 404;
9109
+ input: {
9110
+ param: {
9111
+ id: string;
9112
+ };
9113
+ };
9114
+ };
9115
+ };
9116
+ } & {
9117
+ "/runs": {
9118
+ $post: {
9119
+ output: {
9120
+ id: string;
9121
+ title: string;
9122
+ titleSummary?: string | undefined;
9123
+ diffStat?: {
9124
+ adds: number;
9125
+ dels: number;
9126
+ files: number;
9127
+ repointed?: boolean | undefined;
9128
+ } | undefined;
9129
+ workflow: string;
9130
+ task: string;
9131
+ queuedMessages?: {
9132
+ id: string;
8973
9133
  text: string;
8974
9134
  images?: string[] | undefined;
8975
9135
  createdAt: string;
@@ -9286,6 +9446,11 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
9286
9446
  systemPrompt?: string | undefined;
9287
9447
  generateFollowups?: boolean | undefined;
9288
9448
  autonomous?: boolean | undefined;
9449
+ notify?: boolean | undefined;
9450
+ webhook?: {
9451
+ lastDeliveredAt?: string | undefined;
9452
+ lastError?: string | undefined;
9453
+ } | undefined;
9289
9454
  automation?: {
9290
9455
  automationId: string;
9291
9456
  automationRevision: number;
@@ -9388,7 +9553,7 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
9388
9553
  } | undefined;
9389
9554
  };
9390
9555
  outputFormat: "json";
9391
- status: 201;
9556
+ status: 200;
9392
9557
  input: {
9393
9558
  json: {
9394
9559
  workflow?: string | undefined;
@@ -9425,573 +9590,445 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
9425
9590
  }[] | undefined;
9426
9591
  todoId?: string | undefined;
9427
9592
  clientRequestId?: string | undefined;
9593
+ notify?: boolean | undefined;
9428
9594
  };
9429
9595
  };
9430
9596
  } | {
9431
9597
  output: {
9432
- error: string;
9433
- };
9434
- outputFormat: "json";
9435
- status: 409;
9436
- input: {
9437
- json: {
9438
- workflow?: string | undefined;
9439
- steps?: {
9440
- id: string;
9441
- name?: string | undefined;
9442
- prompt?: string | undefined;
9443
- skill?: string | undefined;
9444
- model?: string | undefined;
9445
- effort?: string | undefined;
9446
- runner?: "claude" | "codex" | "cursor" | "opencode" | "pi" | undefined;
9447
- agentProfile?: string | undefined;
9448
- allowedTools?: string[] | undefined;
9449
- bashAllowlist?: string[] | undefined;
9450
- command?: string | undefined;
9451
- onFail?: {
9452
- retry: string;
9453
- max?: number | undefined;
9598
+ id: string;
9599
+ title: string;
9600
+ titleSummary?: string | undefined;
9601
+ diffStat?: {
9602
+ adds: number;
9603
+ dels: number;
9604
+ files: number;
9605
+ repointed?: boolean | undefined;
9606
+ } | undefined;
9607
+ workflow: string;
9608
+ task: string;
9609
+ queuedMessages?: {
9610
+ id: string;
9611
+ text: string;
9612
+ images?: string[] | undefined;
9613
+ createdAt: string;
9614
+ }[] | undefined;
9615
+ continuationMessage?: {
9616
+ id: string;
9617
+ text: string;
9618
+ images?: string[] | undefined;
9619
+ createdAt: string;
9620
+ origin?: "human" | "lifecycle" | undefined;
9621
+ agentInputId?: string | undefined;
9622
+ } | undefined;
9623
+ invalidAsk?: boolean | undefined;
9624
+ delegation?: {
9625
+ role: "invalid";
9626
+ } | {
9627
+ role: "root";
9628
+ conversation?: {
9629
+ messages: {
9630
+ senderRunId: string;
9631
+ recipientRunId: string;
9632
+ kind: "follow-up" | "progress" | "reply" | "request";
9633
+ requestId?: string | undefined;
9634
+ id: string;
9635
+ text: string;
9636
+ createdAt: string;
9637
+ deadline?: string | undefined;
9638
+ requestHash: string;
9639
+ state: "accepted" | "continuation-required" | "destroyed" | "late";
9640
+ resumed?: true | undefined;
9641
+ instruction?: string | undefined;
9642
+ question?: {
9643
+ questions: {
9644
+ id?: string | undefined;
9645
+ header: string;
9646
+ question: string;
9647
+ options: {
9648
+ label: string;
9649
+ description?: string | undefined;
9650
+ }[];
9651
+ multiSelect?: boolean | undefined;
9652
+ }[];
9653
+ } | undefined;
9654
+ }[];
9655
+ outcomes: {
9656
+ requestId: string;
9657
+ status: "cancelled" | "completed-without-reply" | "destroyed" | "failed" | "human-fallback" | "replied" | "sender-closed" | "timed-out";
9658
+ observedAt: string;
9659
+ replyId?: string | undefined;
9660
+ }[];
9661
+ } | undefined;
9662
+ permissions: ("destroy" | "diff" | "inspect" | "spawn" | "steer" | "stop" | "wait")[];
9663
+ receipts: {
9664
+ requestId: string;
9665
+ workerId: string;
9666
+ requestHash: string;
9667
+ deletion?: {
9668
+ phase: "complete" | "pending";
9669
+ revision: number;
9670
+ resourceId: string;
9671
+ generation: string;
9454
9672
  } | undefined;
9455
- }[] | undefined;
9456
- task: string;
9457
- model?: string | undefined;
9458
- effort?: string | undefined;
9459
- runner?: "claude" | "codex" | "cursor" | "opencode" | "pi" | undefined;
9460
- agentProfile?: string | undefined;
9461
- variants?: number | undefined;
9462
- worktree?: boolean | undefined;
9463
- autonomous?: boolean | undefined;
9464
- generateFollowups?: boolean | undefined;
9465
- systemPrompt?: string | undefined;
9466
- images?: {
9467
- mediaType: string;
9468
- data: string;
9469
- }[] | undefined;
9470
- todoId?: string | undefined;
9471
- clientRequestId?: string | undefined;
9472
- };
9473
- };
9474
- } | {
9475
- output: {
9476
- error: string;
9477
- };
9478
- outputFormat: "json";
9479
- status: 400;
9480
- input: {
9481
- json: {
9482
- workflow?: string | undefined;
9483
- steps?: {
9673
+ }[];
9674
+ wait?: {
9484
9675
  id: string;
9485
- name?: string | undefined;
9486
- prompt?: string | undefined;
9487
- skill?: string | undefined;
9488
- model?: string | undefined;
9489
- effort?: string | undefined;
9490
- runner?: "claude" | "codex" | "cursor" | "opencode" | "pi" | undefined;
9491
- agentProfile?: string | undefined;
9492
- allowedTools?: string[] | undefined;
9493
- bashAllowlist?: string[] | undefined;
9494
- command?: string | undefined;
9495
- onFail?: {
9496
- retry: string;
9497
- max?: number | undefined;
9676
+ workerIds: string[];
9677
+ requestIds?: string[] | undefined;
9678
+ requestOutcomes?: {
9679
+ requestId: string;
9680
+ status: "cancelled" | "completed-without-reply" | "destroyed" | "failed" | "human-fallback" | "replied" | "sender-closed" | "timed-out";
9681
+ observedAt: string;
9682
+ replyId?: string | undefined;
9683
+ }[] | undefined;
9684
+ deadline: string;
9685
+ mode?: "all" | "any" | "one" | undefined;
9686
+ revisions?: {
9687
+ workerId: string;
9688
+ revision: number;
9689
+ }[] | undefined;
9690
+ reason?: "cancelled" | "message" | "outcome" | "timeout" | undefined;
9691
+ phase: "parked" | "registered" | "wake-pending";
9692
+ outcomes: {
9693
+ workerId: string;
9694
+ status: "cancelled" | "done" | "failed" | "review";
9695
+ observedAt: string;
9696
+ summary?: string | undefined;
9697
+ revision?: number | undefined;
9698
+ }[];
9699
+ wakeId?: string | undefined;
9700
+ } | undefined;
9701
+ lastWait?: {
9702
+ id: string;
9703
+ workerIds: string[];
9704
+ requestIds?: string[] | undefined;
9705
+ requestOutcomes?: {
9706
+ requestId: string;
9707
+ status: "cancelled" | "completed-without-reply" | "destroyed" | "failed" | "human-fallback" | "replied" | "sender-closed" | "timed-out";
9708
+ observedAt: string;
9709
+ replyId?: string | undefined;
9710
+ }[] | undefined;
9711
+ deadline: string;
9712
+ mode?: "all" | "any" | "one" | undefined;
9713
+ revisions?: {
9714
+ workerId: string;
9715
+ revision: number;
9716
+ }[] | undefined;
9717
+ reason?: "cancelled" | "message" | "outcome" | "timeout" | undefined;
9718
+ phase: "parked" | "registered" | "wake-pending";
9719
+ outcomes: {
9720
+ workerId: string;
9721
+ status: "cancelled" | "done" | "failed" | "review";
9722
+ observedAt: string;
9723
+ summary?: string | undefined;
9724
+ revision?: number | undefined;
9725
+ }[];
9726
+ wakeId?: string | undefined;
9727
+ } | undefined;
9728
+ results?: {
9729
+ workerId: string;
9730
+ revision: number;
9731
+ snapshotId: string;
9732
+ observedAt: string;
9733
+ lastExecutionOutcome: "cancelled" | "completed" | "failed" | "review-ready" | "running";
9734
+ previous?: {
9735
+ revision: number;
9736
+ observedAt: string;
9737
+ lastExecutionOutcome: "cancelled" | "completed" | "failed" | "review-ready" | "running";
9498
9738
  } | undefined;
9499
9739
  }[] | undefined;
9500
- task: string;
9501
- model?: string | undefined;
9502
- effort?: string | undefined;
9503
- runner?: "claude" | "codex" | "cursor" | "opencode" | "pi" | undefined;
9504
- agentProfile?: string | undefined;
9505
- variants?: number | undefined;
9506
- worktree?: boolean | undefined;
9507
- autonomous?: boolean | undefined;
9508
- generateFollowups?: boolean | undefined;
9509
- systemPrompt?: string | undefined;
9510
- images?: {
9511
- mediaType: string;
9512
- data: string;
9513
- }[] | undefined;
9514
- todoId?: string | undefined;
9515
- clientRequestId?: string | undefined;
9516
- };
9517
- };
9518
- } | {
9519
- output: {
9520
- error: string;
9521
- };
9522
- outputFormat: "json";
9523
- status: 404;
9524
- input: {
9525
- json: {
9526
- workflow?: string | undefined;
9527
- steps?: {
9528
- id: string;
9529
- name?: string | undefined;
9530
- prompt?: string | undefined;
9531
- skill?: string | undefined;
9532
- model?: string | undefined;
9533
- effort?: string | undefined;
9534
- runner?: "claude" | "codex" | "cursor" | "opencode" | "pi" | undefined;
9535
- agentProfile?: string | undefined;
9536
- allowedTools?: string[] | undefined;
9537
- bashAllowlist?: string[] | undefined;
9538
- command?: string | undefined;
9539
- onFail?: {
9540
- retry: string;
9541
- max?: number | undefined;
9542
- } | undefined;
9543
- }[] | undefined;
9544
- task: string;
9545
- model?: string | undefined;
9546
- effort?: string | undefined;
9547
- runner?: "claude" | "codex" | "cursor" | "opencode" | "pi" | undefined;
9548
- agentProfile?: string | undefined;
9549
- variants?: number | undefined;
9550
- worktree?: boolean | undefined;
9551
- autonomous?: boolean | undefined;
9552
- generateFollowups?: boolean | undefined;
9553
- systemPrompt?: string | undefined;
9554
- images?: {
9555
- mediaType: string;
9556
- data: string;
9557
- }[] | undefined;
9558
- todoId?: string | undefined;
9559
- clientRequestId?: string | undefined;
9560
- };
9561
- };
9562
- } | {
9563
- output: {
9564
- runs: {
9565
- id: string;
9566
- title: string;
9567
- titleSummary?: string | undefined;
9568
- diffStat?: {
9569
- adds: number;
9570
- dels: number;
9571
- files: number;
9572
- repointed?: boolean | undefined;
9740
+ finishRequestedAt?: string | undefined;
9741
+ historyDeletion?: "pending" | undefined;
9742
+ completion?: {
9743
+ phase: "attention" | "waiting";
9744
+ waitId?: string | undefined;
9573
9745
  } | undefined;
9574
- workflow: string;
9575
- task: string;
9576
- queuedMessages?: {
9577
- id: string;
9578
- text: string;
9579
- images?: string[] | undefined;
9580
- createdAt: string;
9581
- }[] | undefined;
9582
- continuationMessage?: {
9746
+ } | {
9747
+ role: "worker";
9748
+ wait?: {
9583
9749
  id: string;
9584
- text: string;
9585
- images?: string[] | undefined;
9586
- createdAt: string;
9587
- origin?: "human" | "lifecycle" | undefined;
9588
- agentInputId?: string | undefined;
9589
- } | undefined;
9590
- invalidAsk?: boolean | undefined;
9591
- delegation?: {
9592
- role: "invalid";
9593
- } | {
9594
- role: "root";
9595
- conversation?: {
9596
- messages: {
9597
- senderRunId: string;
9598
- recipientRunId: string;
9599
- kind: "follow-up" | "progress" | "reply" | "request";
9600
- requestId?: string | undefined;
9601
- id: string;
9602
- text: string;
9603
- createdAt: string;
9604
- deadline?: string | undefined;
9605
- requestHash: string;
9606
- state: "accepted" | "continuation-required" | "destroyed" | "late";
9607
- resumed?: true | undefined;
9608
- instruction?: string | undefined;
9609
- question?: {
9610
- questions: {
9611
- id?: string | undefined;
9612
- header: string;
9613
- question: string;
9614
- options: {
9615
- label: string;
9616
- description?: string | undefined;
9617
- }[];
9618
- multiSelect?: boolean | undefined;
9619
- }[];
9620
- } | undefined;
9621
- }[];
9622
- outcomes: {
9623
- requestId: string;
9624
- status: "cancelled" | "completed-without-reply" | "destroyed" | "failed" | "human-fallback" | "replied" | "sender-closed" | "timed-out";
9625
- observedAt: string;
9626
- replyId?: string | undefined;
9627
- }[];
9628
- } | undefined;
9629
- permissions: ("destroy" | "diff" | "inspect" | "spawn" | "steer" | "stop" | "wait")[];
9630
- receipts: {
9750
+ workerIds: string[];
9751
+ requestIds?: string[] | undefined;
9752
+ requestOutcomes?: {
9631
9753
  requestId: string;
9754
+ status: "cancelled" | "completed-without-reply" | "destroyed" | "failed" | "human-fallback" | "replied" | "sender-closed" | "timed-out";
9755
+ observedAt: string;
9756
+ replyId?: string | undefined;
9757
+ }[] | undefined;
9758
+ deadline: string;
9759
+ mode?: "all" | "any" | "one" | undefined;
9760
+ revisions?: {
9632
9761
  workerId: string;
9633
- requestHash: string;
9634
- deletion?: {
9635
- phase: "complete" | "pending";
9636
- revision: number;
9637
- resourceId: string;
9638
- generation: string;
9639
- } | undefined;
9762
+ revision: number;
9763
+ }[] | undefined;
9764
+ reason?: "cancelled" | "message" | "outcome" | "timeout" | undefined;
9765
+ phase: "parked" | "registered" | "wake-pending";
9766
+ outcomes: {
9767
+ workerId: string;
9768
+ status: "cancelled" | "done" | "failed" | "review";
9769
+ observedAt: string;
9770
+ summary?: string | undefined;
9771
+ revision?: number | undefined;
9640
9772
  }[];
9641
- wait?: {
9642
- id: string;
9643
- workerIds: string[];
9644
- requestIds?: string[] | undefined;
9645
- requestOutcomes?: {
9646
- requestId: string;
9647
- status: "cancelled" | "completed-without-reply" | "destroyed" | "failed" | "human-fallback" | "replied" | "sender-closed" | "timed-out";
9648
- observedAt: string;
9649
- replyId?: string | undefined;
9650
- }[] | undefined;
9651
- deadline: string;
9652
- mode?: "all" | "any" | "one" | undefined;
9653
- revisions?: {
9654
- workerId: string;
9655
- revision: number;
9656
- }[] | undefined;
9657
- reason?: "cancelled" | "message" | "outcome" | "timeout" | undefined;
9658
- phase: "parked" | "registered" | "wake-pending";
9659
- outcomes: {
9660
- workerId: string;
9661
- status: "cancelled" | "done" | "failed" | "review";
9662
- observedAt: string;
9663
- summary?: string | undefined;
9664
- revision?: number | undefined;
9665
- }[];
9666
- wakeId?: string | undefined;
9667
- } | undefined;
9668
- lastWait?: {
9669
- id: string;
9670
- workerIds: string[];
9671
- requestIds?: string[] | undefined;
9672
- requestOutcomes?: {
9673
- requestId: string;
9674
- status: "cancelled" | "completed-without-reply" | "destroyed" | "failed" | "human-fallback" | "replied" | "sender-closed" | "timed-out";
9675
- observedAt: string;
9676
- replyId?: string | undefined;
9677
- }[] | undefined;
9678
- deadline: string;
9679
- mode?: "all" | "any" | "one" | undefined;
9680
- revisions?: {
9681
- workerId: string;
9682
- revision: number;
9683
- }[] | undefined;
9684
- reason?: "cancelled" | "message" | "outcome" | "timeout" | undefined;
9685
- phase: "parked" | "registered" | "wake-pending";
9686
- outcomes: {
9687
- workerId: string;
9688
- status: "cancelled" | "done" | "failed" | "review";
9689
- observedAt: string;
9690
- summary?: string | undefined;
9691
- revision?: number | undefined;
9692
- }[];
9693
- wakeId?: string | undefined;
9694
- } | undefined;
9695
- results?: {
9773
+ wakeId?: string | undefined;
9774
+ } | undefined;
9775
+ lastWait?: {
9776
+ id: string;
9777
+ workerIds: string[];
9778
+ requestIds?: string[] | undefined;
9779
+ requestOutcomes?: {
9780
+ requestId: string;
9781
+ status: "cancelled" | "completed-without-reply" | "destroyed" | "failed" | "human-fallback" | "replied" | "sender-closed" | "timed-out";
9782
+ observedAt: string;
9783
+ replyId?: string | undefined;
9784
+ }[] | undefined;
9785
+ deadline: string;
9786
+ mode?: "all" | "any" | "one" | undefined;
9787
+ revisions?: {
9696
9788
  workerId: string;
9697
9789
  revision: number;
9698
- snapshotId: string;
9699
- observedAt: string;
9700
- lastExecutionOutcome: "cancelled" | "completed" | "failed" | "review-ready" | "running";
9701
- previous?: {
9702
- revision: number;
9703
- observedAt: string;
9704
- lastExecutionOutcome: "cancelled" | "completed" | "failed" | "review-ready" | "running";
9705
- } | undefined;
9706
9790
  }[] | undefined;
9707
- finishRequestedAt?: string | undefined;
9708
- historyDeletion?: "pending" | undefined;
9709
- completion?: {
9710
- phase: "attention" | "waiting";
9711
- waitId?: string | undefined;
9712
- } | undefined;
9713
- } | {
9714
- role: "worker";
9715
- wait?: {
9716
- id: string;
9717
- workerIds: string[];
9718
- requestIds?: string[] | undefined;
9719
- requestOutcomes?: {
9720
- requestId: string;
9721
- status: "cancelled" | "completed-without-reply" | "destroyed" | "failed" | "human-fallback" | "replied" | "sender-closed" | "timed-out";
9722
- observedAt: string;
9723
- replyId?: string | undefined;
9724
- }[] | undefined;
9725
- deadline: string;
9726
- mode?: "all" | "any" | "one" | undefined;
9727
- revisions?: {
9728
- workerId: string;
9729
- revision: number;
9730
- }[] | undefined;
9731
- reason?: "cancelled" | "message" | "outcome" | "timeout" | undefined;
9732
- phase: "parked" | "registered" | "wake-pending";
9733
- outcomes: {
9734
- workerId: string;
9735
- status: "cancelled" | "done" | "failed" | "review";
9736
- observedAt: string;
9737
- summary?: string | undefined;
9738
- revision?: number | undefined;
9739
- }[];
9740
- wakeId?: string | undefined;
9741
- } | undefined;
9742
- lastWait?: {
9743
- id: string;
9744
- workerIds: string[];
9745
- requestIds?: string[] | undefined;
9746
- requestOutcomes?: {
9747
- requestId: string;
9748
- status: "cancelled" | "completed-without-reply" | "destroyed" | "failed" | "human-fallback" | "replied" | "sender-closed" | "timed-out";
9749
- observedAt: string;
9750
- replyId?: string | undefined;
9751
- }[] | undefined;
9752
- deadline: string;
9753
- mode?: "all" | "any" | "one" | undefined;
9754
- revisions?: {
9755
- workerId: string;
9756
- revision: number;
9757
- }[] | undefined;
9758
- reason?: "cancelled" | "message" | "outcome" | "timeout" | undefined;
9759
- phase: "parked" | "registered" | "wake-pending";
9760
- outcomes: {
9761
- workerId: string;
9762
- status: "cancelled" | "done" | "failed" | "review";
9763
- observedAt: string;
9764
- summary?: string | undefined;
9765
- revision?: number | undefined;
9766
- }[];
9767
- wakeId?: string | undefined;
9768
- } | undefined;
9769
- permissions: ("destroy" | "diff" | "inspect" | "spawn" | "steer" | "stop" | "wait")[];
9770
- parentRunId: string;
9771
- workspace: {
9772
- ownerRunId: string;
9773
- resourceId: string;
9774
- kind: "owned-isolated";
9775
- path: string;
9776
- branch: string;
9777
- baselineSha: string;
9778
- };
9779
- destroy?: {
9780
- requestedAt: string;
9781
- phase: "cleaning" | "complete" | "incomplete" | "requested" | "terminating";
9782
- remaining: ("branch" | "process" | "worktree")[];
9783
- error?: string | undefined;
9784
- } | undefined;
9785
- context?: {
9786
- text?: string | undefined;
9787
- inputs: {
9788
- source: {
9789
- kind: "baseline-file";
9790
- path: string;
9791
- } | {
9792
- kind: "parent-attachment";
9793
- id: string;
9794
- };
9795
- path: string;
9796
- sha256: string;
9797
- bytes: number;
9798
- }[];
9799
- } | undefined;
9800
- executionRevision?: number | undefined;
9801
- executionStartSeq?: number | undefined;
9802
- } | undefined;
9803
- agentInputs?: {
9804
- conversation?: {
9805
- senderRunId: string;
9806
- recipientRunId: string;
9807
- kind: "follow-up" | "progress" | "reply" | "request";
9808
- requestId?: string | undefined;
9809
- } | undefined;
9810
- id: string;
9811
- source: "agent" | "lifecycle";
9812
- parentRunId: string;
9813
- text: string;
9814
- createdAt: string;
9815
- deliveredAt?: string | undefined;
9816
- consumedAt?: string | undefined;
9817
- awaitingRead?: true | undefined;
9818
- inboxClaim?: {
9819
- receiptId: string;
9820
- generation: string;
9821
- expiresAt: string;
9822
- acknowledgedAt?: string | undefined;
9823
- memberIds?: string[] | undefined;
9824
- } | undefined;
9825
- }[] | undefined;
9826
- ciWait?: {
9827
- prUrl: string;
9828
- repository: string;
9829
- prNumber: number;
9830
- headSha: string;
9831
- id: string;
9832
- generation: string;
9833
- turnId: string;
9834
- timeoutSeconds: number;
9835
- registeredAt: string;
9836
- deadline: string;
9837
- phase: "delivered" | "parked" | "registered" | "wake-pending" | "withdrawn";
9838
- result?: {
9839
- outcome: "cancelled" | "deadline" | "error" | "failed" | "head_changed" | "no_checks" | "passed" | "skipped";
9840
- headSha: string;
9841
- observedHeadSha?: string | undefined;
9791
+ reason?: "cancelled" | "message" | "outcome" | "timeout" | undefined;
9792
+ phase: "parked" | "registered" | "wake-pending";
9793
+ outcomes: {
9794
+ workerId: string;
9795
+ status: "cancelled" | "done" | "failed" | "review";
9842
9796
  observedAt: string;
9843
- checks: {
9844
- name: string;
9845
- state: string;
9846
- link: string;
9847
- }[];
9848
- totalChecks: number;
9849
- truncated: boolean;
9850
- diagnostic?: string | undefined;
9851
- } | undefined;
9797
+ summary?: string | undefined;
9798
+ revision?: number | undefined;
9799
+ }[];
9852
9800
  wakeId?: string | undefined;
9853
- deliveredAt?: string | undefined;
9854
9801
  } | undefined;
9855
- lastCiWait?: {
9856
- prUrl: string;
9857
- repository: string;
9858
- prNumber: number;
9859
- headSha: string;
9860
- id: string;
9861
- generation: string;
9862
- turnId: string;
9863
- timeoutSeconds: number;
9864
- registeredAt: string;
9865
- deadline: string;
9866
- phase: "delivered" | "parked" | "registered" | "wake-pending" | "withdrawn";
9867
- result?: {
9868
- outcome: "cancelled" | "deadline" | "error" | "failed" | "head_changed" | "no_checks" | "passed" | "skipped";
9869
- headSha: string;
9870
- observedHeadSha?: string | undefined;
9871
- observedAt: string;
9872
- checks: {
9873
- name: string;
9874
- state: string;
9875
- link: string;
9876
- }[];
9877
- totalChecks: number;
9878
- truncated: boolean;
9879
- diagnostic?: string | undefined;
9880
- } | undefined;
9881
- wakeId?: string | undefined;
9882
- deliveredAt?: string | undefined;
9802
+ permissions: ("destroy" | "diff" | "inspect" | "spawn" | "steer" | "stop" | "wait")[];
9803
+ parentRunId: string;
9804
+ workspace: {
9805
+ ownerRunId: string;
9806
+ resourceId: string;
9807
+ kind: "owned-isolated";
9808
+ path: string;
9809
+ branch: string;
9810
+ baselineSha: string;
9811
+ };
9812
+ destroy?: {
9813
+ requestedAt: string;
9814
+ phase: "cleaning" | "complete" | "incomplete" | "requested" | "terminating";
9815
+ remaining: ("branch" | "process" | "worktree")[];
9816
+ error?: string | undefined;
9883
9817
  } | undefined;
9884
- lastCiWaitError?: string | undefined;
9885
- taskImages?: string[] | undefined;
9886
- model?: string | undefined;
9887
- effort?: string | undefined;
9888
- modelIdentity?: string | undefined;
9889
- runner?: "claude" | "codex" | "cursor" | "opencode" | "pi" | undefined;
9890
- agentProfile?: string | undefined;
9891
- systemPrompt?: string | undefined;
9892
- generateFollowups?: boolean | undefined;
9893
- autonomous?: boolean | undefined;
9894
- automation?: {
9895
- automationId: string;
9896
- automationRevision: number;
9897
- receiptId: string;
9898
- event: string;
9899
- githubUrl: string;
9818
+ context?: {
9819
+ text?: string | undefined;
9820
+ inputs: {
9821
+ source: {
9822
+ kind: "baseline-file";
9823
+ path: string;
9824
+ } | {
9825
+ kind: "parent-attachment";
9826
+ id: string;
9827
+ };
9828
+ path: string;
9829
+ sha256: string;
9830
+ bytes: number;
9831
+ }[];
9900
9832
  } | undefined;
9901
- status: "cancelled" | "done" | "failed" | "queued" | "review" | "running" | "waiting";
9902
- stopping?: boolean | undefined;
9903
- activity?: "monitoring" | undefined;
9904
- hasPendingHumanAsk?: boolean | undefined;
9905
- monitoringWakeAt?: string | undefined;
9906
- monitoringWakeCapReached?: boolean | undefined;
9907
- autoResumeAt?: string | undefined;
9908
- autoResumeAttempts?: number | undefined;
9833
+ executionRevision?: number | undefined;
9834
+ executionStartSeq?: number | undefined;
9835
+ } | undefined;
9836
+ agentInputs?: {
9837
+ conversation?: {
9838
+ senderRunId: string;
9839
+ recipientRunId: string;
9840
+ kind: "follow-up" | "progress" | "reply" | "request";
9841
+ requestId?: string | undefined;
9842
+ } | undefined;
9843
+ id: string;
9844
+ source: "agent" | "lifecycle";
9845
+ parentRunId: string;
9846
+ text: string;
9909
9847
  createdAt: string;
9910
- startedAt?: string | undefined;
9911
- finishedAt?: string | undefined;
9912
- tokensUsed: number;
9913
- inputTokens?: number | undefined;
9914
- outputTokens?: number | undefined;
9915
- costUsd?: number | undefined;
9916
- pullRequestUrl?: string | undefined;
9917
- referencedPullRequestUrl?: string | undefined;
9918
- prNumber?: number | undefined;
9919
- issueNumber?: number | undefined;
9920
- referencedIssueNumberSeeded?: boolean | undefined;
9921
- titleOrigin?: "auto" | "marker" | "user" | undefined;
9922
- markerRefs?: {
9923
- pr?: number | undefined;
9924
- issue?: number | undefined;
9848
+ deliveredAt?: string | undefined;
9849
+ consumedAt?: string | undefined;
9850
+ awaitingRead?: true | undefined;
9851
+ inboxClaim?: {
9852
+ receiptId: string;
9853
+ generation: string;
9854
+ expiresAt: string;
9855
+ acknowledgedAt?: string | undefined;
9856
+ memberIds?: string[] | undefined;
9925
9857
  } | undefined;
9926
- referencedPrCandidates?: string[] | undefined;
9927
- referencedIssueUrl?: string | undefined;
9928
- referencedIssueCandidates?: string[] | undefined;
9929
- worktree?: false | undefined;
9930
- worktreePath?: string | undefined;
9931
- branch?: string | undefined;
9932
- baseBranch?: string | undefined;
9933
- worktreeReclaimedAt?: string | undefined;
9934
- groupId?: string | undefined;
9935
- variant?: string | undefined;
9936
- clientRequestId?: string | undefined;
9937
- clientRequestHash?: string | undefined;
9938
- peakRssBytes?: number | undefined;
9939
- peakProcCount?: number | undefined;
9940
- archived: boolean;
9941
- archivedAt?: string | undefined;
9942
- pinned?: boolean | undefined;
9943
- pinnedAt?: string | undefined;
9944
- seenAt?: string | undefined;
9945
- currentStepId?: string | undefined;
9946
- error?: string | undefined;
9947
- steps: {
9948
- id: string;
9949
- name: string;
9950
- kind: "agent" | "check";
9951
- status: "cancelled" | "done" | "failed" | "pending" | "review" | "running" | "skipped" | "waiting";
9952
- iterations: number;
9953
- retriesUsed?: number | undefined;
9954
- tokensUsed: number;
9955
- inputTokens?: number | undefined;
9956
- outputTokens?: number | undefined;
9957
- usageInvocationsStarted?: number | undefined;
9958
- usageInvocationsObserved?: number | undefined;
9959
- usageTurnsStarted?: number | undefined;
9960
- usageTurnsRecorded?: number | undefined;
9961
- usageInvocationEpoch?: number | undefined;
9962
- startedAt?: string | undefined;
9963
- finishedAt?: string | undefined;
9964
- error?: string | undefined;
9965
- sessionId?: string | undefined;
9966
- backend?: "claude" | "codex" | "cursor" | "opencode" | "pi" | undefined;
9967
- profileId?: string | undefined;
9968
- costUsd?: number | undefined;
9969
- synthetic?: "continuation" | undefined;
9970
- }[];
9971
- workflowDef?: {
9972
- name: string;
9973
- description?: string | undefined;
9974
- steps: {
9975
- id: string;
9976
- name?: string | undefined;
9977
- prompt?: string | undefined;
9978
- skill?: string | undefined;
9979
- model?: string | undefined;
9980
- effort?: string | undefined;
9981
- runner?: "claude" | "codex" | "cursor" | "opencode" | "pi" | undefined;
9982
- agentProfile?: string | undefined;
9983
- allowedTools?: string[] | undefined;
9984
- bashAllowlist?: string[] | undefined;
9985
- command?: string | undefined;
9986
- onFail?: {
9987
- retry: string;
9988
- max: number;
9989
- } | undefined;
9858
+ }[] | undefined;
9859
+ ciWait?: {
9860
+ prUrl: string;
9861
+ repository: string;
9862
+ prNumber: number;
9863
+ headSha: string;
9864
+ id: string;
9865
+ generation: string;
9866
+ turnId: string;
9867
+ timeoutSeconds: number;
9868
+ registeredAt: string;
9869
+ deadline: string;
9870
+ phase: "delivered" | "parked" | "registered" | "wake-pending" | "withdrawn";
9871
+ result?: {
9872
+ outcome: "cancelled" | "deadline" | "error" | "failed" | "head_changed" | "no_checks" | "passed" | "skipped";
9873
+ headSha: string;
9874
+ observedHeadSha?: string | undefined;
9875
+ observedAt: string;
9876
+ checks: {
9877
+ name: string;
9878
+ state: string;
9879
+ link: string;
9990
9880
  }[];
9991
- source: "built-in" | "file";
9992
- path?: string | undefined;
9881
+ totalChecks: number;
9882
+ truncated: boolean;
9883
+ diagnostic?: string | undefined;
9884
+ } | undefined;
9885
+ wakeId?: string | undefined;
9886
+ deliveredAt?: string | undefined;
9887
+ } | undefined;
9888
+ lastCiWait?: {
9889
+ prUrl: string;
9890
+ repository: string;
9891
+ prNumber: number;
9892
+ headSha: string;
9893
+ id: string;
9894
+ generation: string;
9895
+ turnId: string;
9896
+ timeoutSeconds: number;
9897
+ registeredAt: string;
9898
+ deadline: string;
9899
+ phase: "delivered" | "parked" | "registered" | "wake-pending" | "withdrawn";
9900
+ result?: {
9901
+ outcome: "cancelled" | "deadline" | "error" | "failed" | "head_changed" | "no_checks" | "passed" | "skipped";
9902
+ headSha: string;
9903
+ observedHeadSha?: string | undefined;
9904
+ observedAt: string;
9905
+ checks: {
9906
+ name: string;
9907
+ state: string;
9908
+ link: string;
9909
+ }[];
9910
+ totalChecks: number;
9911
+ truncated: boolean;
9912
+ diagnostic?: string | undefined;
9993
9913
  } | undefined;
9914
+ wakeId?: string | undefined;
9915
+ deliveredAt?: string | undefined;
9916
+ } | undefined;
9917
+ lastCiWaitError?: string | undefined;
9918
+ taskImages?: string[] | undefined;
9919
+ model?: string | undefined;
9920
+ effort?: string | undefined;
9921
+ modelIdentity?: string | undefined;
9922
+ runner?: "claude" | "codex" | "cursor" | "opencode" | "pi" | undefined;
9923
+ agentProfile?: string | undefined;
9924
+ systemPrompt?: string | undefined;
9925
+ generateFollowups?: boolean | undefined;
9926
+ autonomous?: boolean | undefined;
9927
+ notify?: boolean | undefined;
9928
+ webhook?: {
9929
+ lastDeliveredAt?: string | undefined;
9930
+ lastError?: string | undefined;
9931
+ } | undefined;
9932
+ automation?: {
9933
+ automationId: string;
9934
+ automationRevision: number;
9935
+ receiptId: string;
9936
+ event: string;
9937
+ githubUrl: string;
9938
+ } | undefined;
9939
+ status: "cancelled" | "done" | "failed" | "queued" | "review" | "running" | "waiting";
9940
+ stopping?: boolean | undefined;
9941
+ activity?: "monitoring" | undefined;
9942
+ hasPendingHumanAsk?: boolean | undefined;
9943
+ monitoringWakeAt?: string | undefined;
9944
+ monitoringWakeCapReached?: boolean | undefined;
9945
+ autoResumeAt?: string | undefined;
9946
+ autoResumeAttempts?: number | undefined;
9947
+ createdAt: string;
9948
+ startedAt?: string | undefined;
9949
+ finishedAt?: string | undefined;
9950
+ tokensUsed: number;
9951
+ inputTokens?: number | undefined;
9952
+ outputTokens?: number | undefined;
9953
+ costUsd?: number | undefined;
9954
+ pullRequestUrl?: string | undefined;
9955
+ referencedPullRequestUrl?: string | undefined;
9956
+ prNumber?: number | undefined;
9957
+ issueNumber?: number | undefined;
9958
+ referencedIssueNumberSeeded?: boolean | undefined;
9959
+ titleOrigin?: "auto" | "marker" | "user" | undefined;
9960
+ markerRefs?: {
9961
+ pr?: number | undefined;
9962
+ issue?: number | undefined;
9963
+ } | undefined;
9964
+ referencedPrCandidates?: string[] | undefined;
9965
+ referencedIssueUrl?: string | undefined;
9966
+ referencedIssueCandidates?: string[] | undefined;
9967
+ worktree?: false | undefined;
9968
+ worktreePath?: string | undefined;
9969
+ branch?: string | undefined;
9970
+ baseBranch?: string | undefined;
9971
+ worktreeReclaimedAt?: string | undefined;
9972
+ groupId?: string | undefined;
9973
+ variant?: string | undefined;
9974
+ clientRequestId?: string | undefined;
9975
+ clientRequestHash?: string | undefined;
9976
+ peakRssBytes?: number | undefined;
9977
+ peakProcCount?: number | undefined;
9978
+ archived: boolean;
9979
+ archivedAt?: string | undefined;
9980
+ pinned?: boolean | undefined;
9981
+ pinnedAt?: string | undefined;
9982
+ seenAt?: string | undefined;
9983
+ currentStepId?: string | undefined;
9984
+ error?: string | undefined;
9985
+ steps: {
9986
+ id: string;
9987
+ name: string;
9988
+ kind: "agent" | "check";
9989
+ status: "cancelled" | "done" | "failed" | "pending" | "review" | "running" | "skipped" | "waiting";
9990
+ iterations: number;
9991
+ retriesUsed?: number | undefined;
9992
+ tokensUsed: number;
9993
+ inputTokens?: number | undefined;
9994
+ outputTokens?: number | undefined;
9995
+ usageInvocationsStarted?: number | undefined;
9996
+ usageInvocationsObserved?: number | undefined;
9997
+ usageTurnsStarted?: number | undefined;
9998
+ usageTurnsRecorded?: number | undefined;
9999
+ usageInvocationEpoch?: number | undefined;
10000
+ startedAt?: string | undefined;
10001
+ finishedAt?: string | undefined;
10002
+ error?: string | undefined;
10003
+ sessionId?: string | undefined;
10004
+ backend?: "claude" | "codex" | "cursor" | "opencode" | "pi" | undefined;
10005
+ profileId?: string | undefined;
10006
+ costUsd?: number | undefined;
10007
+ synthetic?: "continuation" | undefined;
9994
10008
  }[];
10009
+ workflowDef?: {
10010
+ name: string;
10011
+ description?: string | undefined;
10012
+ steps: {
10013
+ id: string;
10014
+ name?: string | undefined;
10015
+ prompt?: string | undefined;
10016
+ skill?: string | undefined;
10017
+ model?: string | undefined;
10018
+ effort?: string | undefined;
10019
+ runner?: "claude" | "codex" | "cursor" | "opencode" | "pi" | undefined;
10020
+ agentProfile?: string | undefined;
10021
+ allowedTools?: string[] | undefined;
10022
+ bashAllowlist?: string[] | undefined;
10023
+ command?: string | undefined;
10024
+ onFail?: {
10025
+ retry: string;
10026
+ max: number;
10027
+ } | undefined;
10028
+ }[];
10029
+ source: "built-in" | "file";
10030
+ path?: string | undefined;
10031
+ } | undefined;
9995
10032
  };
9996
10033
  outputFormat: "json";
9997
10034
  status: 201;
@@ -10031,176 +10068,792 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
10031
10068
  }[] | undefined;
10032
10069
  todoId?: string | undefined;
10033
10070
  clientRequestId?: string | undefined;
10071
+ notify?: boolean | undefined;
10034
10072
  };
10035
10073
  };
10036
- };
10037
- };
10038
- } & {
10039
- "/runs/:id": {
10040
- $get: {
10074
+ } | {
10041
10075
  output: {
10042
- id: string;
10043
- title: string;
10044
- titleSummary?: string | undefined;
10045
- diffStat?: {
10046
- adds: number;
10047
- dels: number;
10048
- files: number;
10049
- repointed?: boolean | undefined;
10050
- } | undefined;
10051
- workflow: string;
10052
- task: string;
10053
- queuedMessages?: {
10054
- id: string;
10055
- text: string;
10056
- images?: string[] | undefined;
10057
- createdAt: string;
10058
- }[] | undefined;
10059
- stopping?: boolean | undefined;
10060
- continuationMessage?: {
10061
- id: string;
10062
- text: string;
10063
- images?: string[] | undefined;
10064
- createdAt: string;
10065
- origin?: "human" | "lifecycle" | undefined;
10066
- agentInputId?: string | undefined;
10067
- } | undefined;
10068
- invalidAsk?: boolean | undefined;
10069
- delegation?: {
10070
- role: "invalid";
10071
- } | {
10072
- role: "root";
10073
- conversation?: {
10074
- messages: {
10075
- senderRunId: string;
10076
- recipientRunId: string;
10077
- kind: "follow-up" | "progress" | "reply" | "request";
10078
- requestId?: string | undefined;
10079
- id: string;
10080
- text: string;
10081
- createdAt: string;
10082
- deadline?: string | undefined;
10083
- requestHash: string;
10084
- state: "accepted" | "continuation-required" | "destroyed" | "late";
10085
- resumed?: true | undefined;
10086
- instruction?: string | undefined;
10087
- question?: {
10088
- questions: {
10089
- id?: string | undefined;
10090
- header: string;
10091
- question: string;
10092
- options: {
10093
- label: string;
10094
- description?: string | undefined;
10095
- }[];
10096
- multiSelect?: boolean | undefined;
10097
- }[];
10098
- } | undefined;
10099
- }[];
10100
- outcomes: {
10101
- requestId: string;
10102
- status: "cancelled" | "completed-without-reply" | "destroyed" | "failed" | "human-fallback" | "replied" | "sender-closed" | "timed-out";
10103
- observedAt: string;
10104
- replyId?: string | undefined;
10105
- }[];
10106
- } | undefined;
10107
- permissions: ("destroy" | "diff" | "inspect" | "spawn" | "steer" | "stop" | "wait")[];
10108
- receipts: {
10109
- requestId: string;
10110
- workerId: string;
10111
- requestHash: string;
10112
- deletion?: {
10113
- phase: "complete" | "pending";
10114
- revision: number;
10115
- resourceId: string;
10116
- generation: string;
10076
+ error: string;
10077
+ };
10078
+ outputFormat: "json";
10079
+ status: 409;
10080
+ input: {
10081
+ json: {
10082
+ workflow?: string | undefined;
10083
+ steps?: {
10084
+ id: string;
10085
+ name?: string | undefined;
10086
+ prompt?: string | undefined;
10087
+ skill?: string | undefined;
10088
+ model?: string | undefined;
10089
+ effort?: string | undefined;
10090
+ runner?: "claude" | "codex" | "cursor" | "opencode" | "pi" | undefined;
10091
+ agentProfile?: string | undefined;
10092
+ allowedTools?: string[] | undefined;
10093
+ bashAllowlist?: string[] | undefined;
10094
+ command?: string | undefined;
10095
+ onFail?: {
10096
+ retry: string;
10097
+ max?: number | undefined;
10117
10098
  } | undefined;
10118
- }[];
10119
- wait?: {
10099
+ }[] | undefined;
10100
+ task: string;
10101
+ model?: string | undefined;
10102
+ effort?: string | undefined;
10103
+ runner?: "claude" | "codex" | "cursor" | "opencode" | "pi" | undefined;
10104
+ agentProfile?: string | undefined;
10105
+ variants?: number | undefined;
10106
+ worktree?: boolean | undefined;
10107
+ autonomous?: boolean | undefined;
10108
+ generateFollowups?: boolean | undefined;
10109
+ systemPrompt?: string | undefined;
10110
+ images?: {
10111
+ mediaType: string;
10112
+ data: string;
10113
+ }[] | undefined;
10114
+ todoId?: string | undefined;
10115
+ clientRequestId?: string | undefined;
10116
+ notify?: boolean | undefined;
10117
+ };
10118
+ };
10119
+ } | {
10120
+ output: {
10121
+ error: string;
10122
+ };
10123
+ outputFormat: "json";
10124
+ status: 400;
10125
+ input: {
10126
+ json: {
10127
+ workflow?: string | undefined;
10128
+ steps?: {
10120
10129
  id: string;
10121
- workerIds: string[];
10122
- requestIds?: string[] | undefined;
10123
- requestOutcomes?: {
10124
- requestId: string;
10125
- status: "cancelled" | "completed-without-reply" | "destroyed" | "failed" | "human-fallback" | "replied" | "sender-closed" | "timed-out";
10126
- observedAt: string;
10127
- replyId?: string | undefined;
10128
- }[] | undefined;
10129
- deadline: string;
10130
- mode?: "all" | "any" | "one" | undefined;
10131
- revisions?: {
10132
- workerId: string;
10133
- revision: number;
10134
- }[] | undefined;
10135
- reason?: "cancelled" | "message" | "outcome" | "timeout" | undefined;
10136
- phase: "parked" | "registered" | "wake-pending";
10137
- outcomes: {
10138
- workerId: string;
10139
- status: "cancelled" | "done" | "failed" | "review";
10140
- observedAt: string;
10141
- summary?: string | undefined;
10142
- revision?: number | undefined;
10143
- }[];
10144
- wakeId?: string | undefined;
10145
- } | undefined;
10146
- lastWait?: {
10130
+ name?: string | undefined;
10131
+ prompt?: string | undefined;
10132
+ skill?: string | undefined;
10133
+ model?: string | undefined;
10134
+ effort?: string | undefined;
10135
+ runner?: "claude" | "codex" | "cursor" | "opencode" | "pi" | undefined;
10136
+ agentProfile?: string | undefined;
10137
+ allowedTools?: string[] | undefined;
10138
+ bashAllowlist?: string[] | undefined;
10139
+ command?: string | undefined;
10140
+ onFail?: {
10141
+ retry: string;
10142
+ max?: number | undefined;
10143
+ } | undefined;
10144
+ }[] | undefined;
10145
+ task: string;
10146
+ model?: string | undefined;
10147
+ effort?: string | undefined;
10148
+ runner?: "claude" | "codex" | "cursor" | "opencode" | "pi" | undefined;
10149
+ agentProfile?: string | undefined;
10150
+ variants?: number | undefined;
10151
+ worktree?: boolean | undefined;
10152
+ autonomous?: boolean | undefined;
10153
+ generateFollowups?: boolean | undefined;
10154
+ systemPrompt?: string | undefined;
10155
+ images?: {
10156
+ mediaType: string;
10157
+ data: string;
10158
+ }[] | undefined;
10159
+ todoId?: string | undefined;
10160
+ clientRequestId?: string | undefined;
10161
+ notify?: boolean | undefined;
10162
+ };
10163
+ };
10164
+ } | {
10165
+ output: {
10166
+ error: string;
10167
+ };
10168
+ outputFormat: "json";
10169
+ status: 404;
10170
+ input: {
10171
+ json: {
10172
+ workflow?: string | undefined;
10173
+ steps?: {
10147
10174
  id: string;
10148
- workerIds: string[];
10149
- requestIds?: string[] | undefined;
10150
- requestOutcomes?: {
10151
- requestId: string;
10152
- status: "cancelled" | "completed-without-reply" | "destroyed" | "failed" | "human-fallback" | "replied" | "sender-closed" | "timed-out";
10153
- observedAt: string;
10154
- replyId?: string | undefined;
10155
- }[] | undefined;
10156
- deadline: string;
10157
- mode?: "all" | "any" | "one" | undefined;
10158
- revisions?: {
10159
- workerId: string;
10160
- revision: number;
10161
- }[] | undefined;
10162
- reason?: "cancelled" | "message" | "outcome" | "timeout" | undefined;
10163
- phase: "parked" | "registered" | "wake-pending";
10164
- outcomes: {
10165
- workerId: string;
10166
- status: "cancelled" | "done" | "failed" | "review";
10167
- observedAt: string;
10168
- summary?: string | undefined;
10169
- revision?: number | undefined;
10170
- }[];
10171
- wakeId?: string | undefined;
10172
- } | undefined;
10173
- results?: {
10174
- workerId: string;
10175
- revision: number;
10176
- snapshotId: string;
10177
- observedAt: string;
10178
- lastExecutionOutcome: "cancelled" | "completed" | "failed" | "review-ready" | "running";
10179
- previous?: {
10180
- revision: number;
10181
- observedAt: string;
10182
- lastExecutionOutcome: "cancelled" | "completed" | "failed" | "review-ready" | "running";
10175
+ name?: string | undefined;
10176
+ prompt?: string | undefined;
10177
+ skill?: string | undefined;
10178
+ model?: string | undefined;
10179
+ effort?: string | undefined;
10180
+ runner?: "claude" | "codex" | "cursor" | "opencode" | "pi" | undefined;
10181
+ agentProfile?: string | undefined;
10182
+ allowedTools?: string[] | undefined;
10183
+ bashAllowlist?: string[] | undefined;
10184
+ command?: string | undefined;
10185
+ onFail?: {
10186
+ retry: string;
10187
+ max?: number | undefined;
10183
10188
  } | undefined;
10184
10189
  }[] | undefined;
10185
- finishRequestedAt?: string | undefined;
10186
- historyDeletion?: "pending" | undefined;
10187
- completion?: {
10188
- phase: "attention" | "waiting";
10189
- waitId?: string | undefined;
10190
+ task: string;
10191
+ model?: string | undefined;
10192
+ effort?: string | undefined;
10193
+ runner?: "claude" | "codex" | "cursor" | "opencode" | "pi" | undefined;
10194
+ agentProfile?: string | undefined;
10195
+ variants?: number | undefined;
10196
+ worktree?: boolean | undefined;
10197
+ autonomous?: boolean | undefined;
10198
+ generateFollowups?: boolean | undefined;
10199
+ systemPrompt?: string | undefined;
10200
+ images?: {
10201
+ mediaType: string;
10202
+ data: string;
10203
+ }[] | undefined;
10204
+ todoId?: string | undefined;
10205
+ clientRequestId?: string | undefined;
10206
+ notify?: boolean | undefined;
10207
+ };
10208
+ };
10209
+ } | {
10210
+ output: {
10211
+ runs: {
10212
+ id: string;
10213
+ title: string;
10214
+ titleSummary?: string | undefined;
10215
+ diffStat?: {
10216
+ adds: number;
10217
+ dels: number;
10218
+ files: number;
10219
+ repointed?: boolean | undefined;
10190
10220
  } | undefined;
10191
- } | {
10192
- role: "worker";
10193
- wait?: {
10221
+ workflow: string;
10222
+ task: string;
10223
+ queuedMessages?: {
10194
10224
  id: string;
10195
- workerIds: string[];
10196
- requestIds?: string[] | undefined;
10197
- requestOutcomes?: {
10198
- requestId: string;
10199
- status: "cancelled" | "completed-without-reply" | "destroyed" | "failed" | "human-fallback" | "replied" | "sender-closed" | "timed-out";
10200
- observedAt: string;
10201
- replyId?: string | undefined;
10202
- }[] | undefined;
10203
- deadline: string;
10225
+ text: string;
10226
+ images?: string[] | undefined;
10227
+ createdAt: string;
10228
+ }[] | undefined;
10229
+ continuationMessage?: {
10230
+ id: string;
10231
+ text: string;
10232
+ images?: string[] | undefined;
10233
+ createdAt: string;
10234
+ origin?: "human" | "lifecycle" | undefined;
10235
+ agentInputId?: string | undefined;
10236
+ } | undefined;
10237
+ invalidAsk?: boolean | undefined;
10238
+ delegation?: {
10239
+ role: "invalid";
10240
+ } | {
10241
+ role: "root";
10242
+ conversation?: {
10243
+ messages: {
10244
+ senderRunId: string;
10245
+ recipientRunId: string;
10246
+ kind: "follow-up" | "progress" | "reply" | "request";
10247
+ requestId?: string | undefined;
10248
+ id: string;
10249
+ text: string;
10250
+ createdAt: string;
10251
+ deadline?: string | undefined;
10252
+ requestHash: string;
10253
+ state: "accepted" | "continuation-required" | "destroyed" | "late";
10254
+ resumed?: true | undefined;
10255
+ instruction?: string | undefined;
10256
+ question?: {
10257
+ questions: {
10258
+ id?: string | undefined;
10259
+ header: string;
10260
+ question: string;
10261
+ options: {
10262
+ label: string;
10263
+ description?: string | undefined;
10264
+ }[];
10265
+ multiSelect?: boolean | undefined;
10266
+ }[];
10267
+ } | undefined;
10268
+ }[];
10269
+ outcomes: {
10270
+ requestId: string;
10271
+ status: "cancelled" | "completed-without-reply" | "destroyed" | "failed" | "human-fallback" | "replied" | "sender-closed" | "timed-out";
10272
+ observedAt: string;
10273
+ replyId?: string | undefined;
10274
+ }[];
10275
+ } | undefined;
10276
+ permissions: ("destroy" | "diff" | "inspect" | "spawn" | "steer" | "stop" | "wait")[];
10277
+ receipts: {
10278
+ requestId: string;
10279
+ workerId: string;
10280
+ requestHash: string;
10281
+ deletion?: {
10282
+ phase: "complete" | "pending";
10283
+ revision: number;
10284
+ resourceId: string;
10285
+ generation: string;
10286
+ } | undefined;
10287
+ }[];
10288
+ wait?: {
10289
+ id: string;
10290
+ workerIds: string[];
10291
+ requestIds?: string[] | undefined;
10292
+ requestOutcomes?: {
10293
+ requestId: string;
10294
+ status: "cancelled" | "completed-without-reply" | "destroyed" | "failed" | "human-fallback" | "replied" | "sender-closed" | "timed-out";
10295
+ observedAt: string;
10296
+ replyId?: string | undefined;
10297
+ }[] | undefined;
10298
+ deadline: string;
10299
+ mode?: "all" | "any" | "one" | undefined;
10300
+ revisions?: {
10301
+ workerId: string;
10302
+ revision: number;
10303
+ }[] | undefined;
10304
+ reason?: "cancelled" | "message" | "outcome" | "timeout" | undefined;
10305
+ phase: "parked" | "registered" | "wake-pending";
10306
+ outcomes: {
10307
+ workerId: string;
10308
+ status: "cancelled" | "done" | "failed" | "review";
10309
+ observedAt: string;
10310
+ summary?: string | undefined;
10311
+ revision?: number | undefined;
10312
+ }[];
10313
+ wakeId?: string | undefined;
10314
+ } | undefined;
10315
+ lastWait?: {
10316
+ id: string;
10317
+ workerIds: string[];
10318
+ requestIds?: string[] | undefined;
10319
+ requestOutcomes?: {
10320
+ requestId: string;
10321
+ status: "cancelled" | "completed-without-reply" | "destroyed" | "failed" | "human-fallback" | "replied" | "sender-closed" | "timed-out";
10322
+ observedAt: string;
10323
+ replyId?: string | undefined;
10324
+ }[] | undefined;
10325
+ deadline: string;
10326
+ mode?: "all" | "any" | "one" | undefined;
10327
+ revisions?: {
10328
+ workerId: string;
10329
+ revision: number;
10330
+ }[] | undefined;
10331
+ reason?: "cancelled" | "message" | "outcome" | "timeout" | undefined;
10332
+ phase: "parked" | "registered" | "wake-pending";
10333
+ outcomes: {
10334
+ workerId: string;
10335
+ status: "cancelled" | "done" | "failed" | "review";
10336
+ observedAt: string;
10337
+ summary?: string | undefined;
10338
+ revision?: number | undefined;
10339
+ }[];
10340
+ wakeId?: string | undefined;
10341
+ } | undefined;
10342
+ results?: {
10343
+ workerId: string;
10344
+ revision: number;
10345
+ snapshotId: string;
10346
+ observedAt: string;
10347
+ lastExecutionOutcome: "cancelled" | "completed" | "failed" | "review-ready" | "running";
10348
+ previous?: {
10349
+ revision: number;
10350
+ observedAt: string;
10351
+ lastExecutionOutcome: "cancelled" | "completed" | "failed" | "review-ready" | "running";
10352
+ } | undefined;
10353
+ }[] | undefined;
10354
+ finishRequestedAt?: string | undefined;
10355
+ historyDeletion?: "pending" | undefined;
10356
+ completion?: {
10357
+ phase: "attention" | "waiting";
10358
+ waitId?: string | undefined;
10359
+ } | undefined;
10360
+ } | {
10361
+ role: "worker";
10362
+ wait?: {
10363
+ id: string;
10364
+ workerIds: string[];
10365
+ requestIds?: string[] | undefined;
10366
+ requestOutcomes?: {
10367
+ requestId: string;
10368
+ status: "cancelled" | "completed-without-reply" | "destroyed" | "failed" | "human-fallback" | "replied" | "sender-closed" | "timed-out";
10369
+ observedAt: string;
10370
+ replyId?: string | undefined;
10371
+ }[] | undefined;
10372
+ deadline: string;
10373
+ mode?: "all" | "any" | "one" | undefined;
10374
+ revisions?: {
10375
+ workerId: string;
10376
+ revision: number;
10377
+ }[] | undefined;
10378
+ reason?: "cancelled" | "message" | "outcome" | "timeout" | undefined;
10379
+ phase: "parked" | "registered" | "wake-pending";
10380
+ outcomes: {
10381
+ workerId: string;
10382
+ status: "cancelled" | "done" | "failed" | "review";
10383
+ observedAt: string;
10384
+ summary?: string | undefined;
10385
+ revision?: number | undefined;
10386
+ }[];
10387
+ wakeId?: string | undefined;
10388
+ } | undefined;
10389
+ lastWait?: {
10390
+ id: string;
10391
+ workerIds: string[];
10392
+ requestIds?: string[] | undefined;
10393
+ requestOutcomes?: {
10394
+ requestId: string;
10395
+ status: "cancelled" | "completed-without-reply" | "destroyed" | "failed" | "human-fallback" | "replied" | "sender-closed" | "timed-out";
10396
+ observedAt: string;
10397
+ replyId?: string | undefined;
10398
+ }[] | undefined;
10399
+ deadline: string;
10400
+ mode?: "all" | "any" | "one" | undefined;
10401
+ revisions?: {
10402
+ workerId: string;
10403
+ revision: number;
10404
+ }[] | undefined;
10405
+ reason?: "cancelled" | "message" | "outcome" | "timeout" | undefined;
10406
+ phase: "parked" | "registered" | "wake-pending";
10407
+ outcomes: {
10408
+ workerId: string;
10409
+ status: "cancelled" | "done" | "failed" | "review";
10410
+ observedAt: string;
10411
+ summary?: string | undefined;
10412
+ revision?: number | undefined;
10413
+ }[];
10414
+ wakeId?: string | undefined;
10415
+ } | undefined;
10416
+ permissions: ("destroy" | "diff" | "inspect" | "spawn" | "steer" | "stop" | "wait")[];
10417
+ parentRunId: string;
10418
+ workspace: {
10419
+ ownerRunId: string;
10420
+ resourceId: string;
10421
+ kind: "owned-isolated";
10422
+ path: string;
10423
+ branch: string;
10424
+ baselineSha: string;
10425
+ };
10426
+ destroy?: {
10427
+ requestedAt: string;
10428
+ phase: "cleaning" | "complete" | "incomplete" | "requested" | "terminating";
10429
+ remaining: ("branch" | "process" | "worktree")[];
10430
+ error?: string | undefined;
10431
+ } | undefined;
10432
+ context?: {
10433
+ text?: string | undefined;
10434
+ inputs: {
10435
+ source: {
10436
+ kind: "baseline-file";
10437
+ path: string;
10438
+ } | {
10439
+ kind: "parent-attachment";
10440
+ id: string;
10441
+ };
10442
+ path: string;
10443
+ sha256: string;
10444
+ bytes: number;
10445
+ }[];
10446
+ } | undefined;
10447
+ executionRevision?: number | undefined;
10448
+ executionStartSeq?: number | undefined;
10449
+ } | undefined;
10450
+ agentInputs?: {
10451
+ conversation?: {
10452
+ senderRunId: string;
10453
+ recipientRunId: string;
10454
+ kind: "follow-up" | "progress" | "reply" | "request";
10455
+ requestId?: string | undefined;
10456
+ } | undefined;
10457
+ id: string;
10458
+ source: "agent" | "lifecycle";
10459
+ parentRunId: string;
10460
+ text: string;
10461
+ createdAt: string;
10462
+ deliveredAt?: string | undefined;
10463
+ consumedAt?: string | undefined;
10464
+ awaitingRead?: true | undefined;
10465
+ inboxClaim?: {
10466
+ receiptId: string;
10467
+ generation: string;
10468
+ expiresAt: string;
10469
+ acknowledgedAt?: string | undefined;
10470
+ memberIds?: string[] | undefined;
10471
+ } | undefined;
10472
+ }[] | undefined;
10473
+ ciWait?: {
10474
+ prUrl: string;
10475
+ repository: string;
10476
+ prNumber: number;
10477
+ headSha: string;
10478
+ id: string;
10479
+ generation: string;
10480
+ turnId: string;
10481
+ timeoutSeconds: number;
10482
+ registeredAt: string;
10483
+ deadline: string;
10484
+ phase: "delivered" | "parked" | "registered" | "wake-pending" | "withdrawn";
10485
+ result?: {
10486
+ outcome: "cancelled" | "deadline" | "error" | "failed" | "head_changed" | "no_checks" | "passed" | "skipped";
10487
+ headSha: string;
10488
+ observedHeadSha?: string | undefined;
10489
+ observedAt: string;
10490
+ checks: {
10491
+ name: string;
10492
+ state: string;
10493
+ link: string;
10494
+ }[];
10495
+ totalChecks: number;
10496
+ truncated: boolean;
10497
+ diagnostic?: string | undefined;
10498
+ } | undefined;
10499
+ wakeId?: string | undefined;
10500
+ deliveredAt?: string | undefined;
10501
+ } | undefined;
10502
+ lastCiWait?: {
10503
+ prUrl: string;
10504
+ repository: string;
10505
+ prNumber: number;
10506
+ headSha: string;
10507
+ id: string;
10508
+ generation: string;
10509
+ turnId: string;
10510
+ timeoutSeconds: number;
10511
+ registeredAt: string;
10512
+ deadline: string;
10513
+ phase: "delivered" | "parked" | "registered" | "wake-pending" | "withdrawn";
10514
+ result?: {
10515
+ outcome: "cancelled" | "deadline" | "error" | "failed" | "head_changed" | "no_checks" | "passed" | "skipped";
10516
+ headSha: string;
10517
+ observedHeadSha?: string | undefined;
10518
+ observedAt: string;
10519
+ checks: {
10520
+ name: string;
10521
+ state: string;
10522
+ link: string;
10523
+ }[];
10524
+ totalChecks: number;
10525
+ truncated: boolean;
10526
+ diagnostic?: string | undefined;
10527
+ } | undefined;
10528
+ wakeId?: string | undefined;
10529
+ deliveredAt?: string | undefined;
10530
+ } | undefined;
10531
+ lastCiWaitError?: string | undefined;
10532
+ taskImages?: string[] | undefined;
10533
+ model?: string | undefined;
10534
+ effort?: string | undefined;
10535
+ modelIdentity?: string | undefined;
10536
+ runner?: "claude" | "codex" | "cursor" | "opencode" | "pi" | undefined;
10537
+ agentProfile?: string | undefined;
10538
+ systemPrompt?: string | undefined;
10539
+ generateFollowups?: boolean | undefined;
10540
+ autonomous?: boolean | undefined;
10541
+ notify?: boolean | undefined;
10542
+ webhook?: {
10543
+ lastDeliveredAt?: string | undefined;
10544
+ lastError?: string | undefined;
10545
+ } | undefined;
10546
+ automation?: {
10547
+ automationId: string;
10548
+ automationRevision: number;
10549
+ receiptId: string;
10550
+ event: string;
10551
+ githubUrl: string;
10552
+ } | undefined;
10553
+ status: "cancelled" | "done" | "failed" | "queued" | "review" | "running" | "waiting";
10554
+ stopping?: boolean | undefined;
10555
+ activity?: "monitoring" | undefined;
10556
+ hasPendingHumanAsk?: boolean | undefined;
10557
+ monitoringWakeAt?: string | undefined;
10558
+ monitoringWakeCapReached?: boolean | undefined;
10559
+ autoResumeAt?: string | undefined;
10560
+ autoResumeAttempts?: number | undefined;
10561
+ createdAt: string;
10562
+ startedAt?: string | undefined;
10563
+ finishedAt?: string | undefined;
10564
+ tokensUsed: number;
10565
+ inputTokens?: number | undefined;
10566
+ outputTokens?: number | undefined;
10567
+ costUsd?: number | undefined;
10568
+ pullRequestUrl?: string | undefined;
10569
+ referencedPullRequestUrl?: string | undefined;
10570
+ prNumber?: number | undefined;
10571
+ issueNumber?: number | undefined;
10572
+ referencedIssueNumberSeeded?: boolean | undefined;
10573
+ titleOrigin?: "auto" | "marker" | "user" | undefined;
10574
+ markerRefs?: {
10575
+ pr?: number | undefined;
10576
+ issue?: number | undefined;
10577
+ } | undefined;
10578
+ referencedPrCandidates?: string[] | undefined;
10579
+ referencedIssueUrl?: string | undefined;
10580
+ referencedIssueCandidates?: string[] | undefined;
10581
+ worktree?: false | undefined;
10582
+ worktreePath?: string | undefined;
10583
+ branch?: string | undefined;
10584
+ baseBranch?: string | undefined;
10585
+ worktreeReclaimedAt?: string | undefined;
10586
+ groupId?: string | undefined;
10587
+ variant?: string | undefined;
10588
+ clientRequestId?: string | undefined;
10589
+ clientRequestHash?: string | undefined;
10590
+ peakRssBytes?: number | undefined;
10591
+ peakProcCount?: number | undefined;
10592
+ archived: boolean;
10593
+ archivedAt?: string | undefined;
10594
+ pinned?: boolean | undefined;
10595
+ pinnedAt?: string | undefined;
10596
+ seenAt?: string | undefined;
10597
+ currentStepId?: string | undefined;
10598
+ error?: string | undefined;
10599
+ steps: {
10600
+ id: string;
10601
+ name: string;
10602
+ kind: "agent" | "check";
10603
+ status: "cancelled" | "done" | "failed" | "pending" | "review" | "running" | "skipped" | "waiting";
10604
+ iterations: number;
10605
+ retriesUsed?: number | undefined;
10606
+ tokensUsed: number;
10607
+ inputTokens?: number | undefined;
10608
+ outputTokens?: number | undefined;
10609
+ usageInvocationsStarted?: number | undefined;
10610
+ usageInvocationsObserved?: number | undefined;
10611
+ usageTurnsStarted?: number | undefined;
10612
+ usageTurnsRecorded?: number | undefined;
10613
+ usageInvocationEpoch?: number | undefined;
10614
+ startedAt?: string | undefined;
10615
+ finishedAt?: string | undefined;
10616
+ error?: string | undefined;
10617
+ sessionId?: string | undefined;
10618
+ backend?: "claude" | "codex" | "cursor" | "opencode" | "pi" | undefined;
10619
+ profileId?: string | undefined;
10620
+ costUsd?: number | undefined;
10621
+ synthetic?: "continuation" | undefined;
10622
+ }[];
10623
+ workflowDef?: {
10624
+ name: string;
10625
+ description?: string | undefined;
10626
+ steps: {
10627
+ id: string;
10628
+ name?: string | undefined;
10629
+ prompt?: string | undefined;
10630
+ skill?: string | undefined;
10631
+ model?: string | undefined;
10632
+ effort?: string | undefined;
10633
+ runner?: "claude" | "codex" | "cursor" | "opencode" | "pi" | undefined;
10634
+ agentProfile?: string | undefined;
10635
+ allowedTools?: string[] | undefined;
10636
+ bashAllowlist?: string[] | undefined;
10637
+ command?: string | undefined;
10638
+ onFail?: {
10639
+ retry: string;
10640
+ max: number;
10641
+ } | undefined;
10642
+ }[];
10643
+ source: "built-in" | "file";
10644
+ path?: string | undefined;
10645
+ } | undefined;
10646
+ }[];
10647
+ };
10648
+ outputFormat: "json";
10649
+ status: 201;
10650
+ input: {
10651
+ json: {
10652
+ workflow?: string | undefined;
10653
+ steps?: {
10654
+ id: string;
10655
+ name?: string | undefined;
10656
+ prompt?: string | undefined;
10657
+ skill?: string | undefined;
10658
+ model?: string | undefined;
10659
+ effort?: string | undefined;
10660
+ runner?: "claude" | "codex" | "cursor" | "opencode" | "pi" | undefined;
10661
+ agentProfile?: string | undefined;
10662
+ allowedTools?: string[] | undefined;
10663
+ bashAllowlist?: string[] | undefined;
10664
+ command?: string | undefined;
10665
+ onFail?: {
10666
+ retry: string;
10667
+ max?: number | undefined;
10668
+ } | undefined;
10669
+ }[] | undefined;
10670
+ task: string;
10671
+ model?: string | undefined;
10672
+ effort?: string | undefined;
10673
+ runner?: "claude" | "codex" | "cursor" | "opencode" | "pi" | undefined;
10674
+ agentProfile?: string | undefined;
10675
+ variants?: number | undefined;
10676
+ worktree?: boolean | undefined;
10677
+ autonomous?: boolean | undefined;
10678
+ generateFollowups?: boolean | undefined;
10679
+ systemPrompt?: string | undefined;
10680
+ images?: {
10681
+ mediaType: string;
10682
+ data: string;
10683
+ }[] | undefined;
10684
+ todoId?: string | undefined;
10685
+ clientRequestId?: string | undefined;
10686
+ notify?: boolean | undefined;
10687
+ };
10688
+ };
10689
+ };
10690
+ };
10691
+ } & {
10692
+ "/runs/:id": {
10693
+ $get: {
10694
+ output: {
10695
+ id: string;
10696
+ title: string;
10697
+ titleSummary?: string | undefined;
10698
+ diffStat?: {
10699
+ adds: number;
10700
+ dels: number;
10701
+ files: number;
10702
+ repointed?: boolean | undefined;
10703
+ } | undefined;
10704
+ workflow: string;
10705
+ task: string;
10706
+ queuedMessages?: {
10707
+ id: string;
10708
+ text: string;
10709
+ images?: string[] | undefined;
10710
+ createdAt: string;
10711
+ }[] | undefined;
10712
+ stopping?: boolean | undefined;
10713
+ continuationMessage?: {
10714
+ id: string;
10715
+ text: string;
10716
+ images?: string[] | undefined;
10717
+ createdAt: string;
10718
+ origin?: "human" | "lifecycle" | undefined;
10719
+ agentInputId?: string | undefined;
10720
+ } | undefined;
10721
+ invalidAsk?: boolean | undefined;
10722
+ delegation?: {
10723
+ role: "invalid";
10724
+ } | {
10725
+ role: "root";
10726
+ conversation?: {
10727
+ messages: {
10728
+ senderRunId: string;
10729
+ recipientRunId: string;
10730
+ kind: "follow-up" | "progress" | "reply" | "request";
10731
+ requestId?: string | undefined;
10732
+ id: string;
10733
+ text: string;
10734
+ createdAt: string;
10735
+ deadline?: string | undefined;
10736
+ requestHash: string;
10737
+ state: "accepted" | "continuation-required" | "destroyed" | "late";
10738
+ resumed?: true | undefined;
10739
+ instruction?: string | undefined;
10740
+ question?: {
10741
+ questions: {
10742
+ id?: string | undefined;
10743
+ header: string;
10744
+ question: string;
10745
+ options: {
10746
+ label: string;
10747
+ description?: string | undefined;
10748
+ }[];
10749
+ multiSelect?: boolean | undefined;
10750
+ }[];
10751
+ } | undefined;
10752
+ }[];
10753
+ outcomes: {
10754
+ requestId: string;
10755
+ status: "cancelled" | "completed-without-reply" | "destroyed" | "failed" | "human-fallback" | "replied" | "sender-closed" | "timed-out";
10756
+ observedAt: string;
10757
+ replyId?: string | undefined;
10758
+ }[];
10759
+ } | undefined;
10760
+ permissions: ("destroy" | "diff" | "inspect" | "spawn" | "steer" | "stop" | "wait")[];
10761
+ receipts: {
10762
+ requestId: string;
10763
+ workerId: string;
10764
+ requestHash: string;
10765
+ deletion?: {
10766
+ phase: "complete" | "pending";
10767
+ revision: number;
10768
+ resourceId: string;
10769
+ generation: string;
10770
+ } | undefined;
10771
+ }[];
10772
+ wait?: {
10773
+ id: string;
10774
+ workerIds: string[];
10775
+ requestIds?: string[] | undefined;
10776
+ requestOutcomes?: {
10777
+ requestId: string;
10778
+ status: "cancelled" | "completed-without-reply" | "destroyed" | "failed" | "human-fallback" | "replied" | "sender-closed" | "timed-out";
10779
+ observedAt: string;
10780
+ replyId?: string | undefined;
10781
+ }[] | undefined;
10782
+ deadline: string;
10783
+ mode?: "all" | "any" | "one" | undefined;
10784
+ revisions?: {
10785
+ workerId: string;
10786
+ revision: number;
10787
+ }[] | undefined;
10788
+ reason?: "cancelled" | "message" | "outcome" | "timeout" | undefined;
10789
+ phase: "parked" | "registered" | "wake-pending";
10790
+ outcomes: {
10791
+ workerId: string;
10792
+ status: "cancelled" | "done" | "failed" | "review";
10793
+ observedAt: string;
10794
+ summary?: string | undefined;
10795
+ revision?: number | undefined;
10796
+ }[];
10797
+ wakeId?: string | undefined;
10798
+ } | undefined;
10799
+ lastWait?: {
10800
+ id: string;
10801
+ workerIds: string[];
10802
+ requestIds?: string[] | undefined;
10803
+ requestOutcomes?: {
10804
+ requestId: string;
10805
+ status: "cancelled" | "completed-without-reply" | "destroyed" | "failed" | "human-fallback" | "replied" | "sender-closed" | "timed-out";
10806
+ observedAt: string;
10807
+ replyId?: string | undefined;
10808
+ }[] | undefined;
10809
+ deadline: string;
10810
+ mode?: "all" | "any" | "one" | undefined;
10811
+ revisions?: {
10812
+ workerId: string;
10813
+ revision: number;
10814
+ }[] | undefined;
10815
+ reason?: "cancelled" | "message" | "outcome" | "timeout" | undefined;
10816
+ phase: "parked" | "registered" | "wake-pending";
10817
+ outcomes: {
10818
+ workerId: string;
10819
+ status: "cancelled" | "done" | "failed" | "review";
10820
+ observedAt: string;
10821
+ summary?: string | undefined;
10822
+ revision?: number | undefined;
10823
+ }[];
10824
+ wakeId?: string | undefined;
10825
+ } | undefined;
10826
+ results?: {
10827
+ workerId: string;
10828
+ revision: number;
10829
+ snapshotId: string;
10830
+ observedAt: string;
10831
+ lastExecutionOutcome: "cancelled" | "completed" | "failed" | "review-ready" | "running";
10832
+ previous?: {
10833
+ revision: number;
10834
+ observedAt: string;
10835
+ lastExecutionOutcome: "cancelled" | "completed" | "failed" | "review-ready" | "running";
10836
+ } | undefined;
10837
+ }[] | undefined;
10838
+ finishRequestedAt?: string | undefined;
10839
+ historyDeletion?: "pending" | undefined;
10840
+ completion?: {
10841
+ phase: "attention" | "waiting";
10842
+ waitId?: string | undefined;
10843
+ } | undefined;
10844
+ } | {
10845
+ role: "worker";
10846
+ wait?: {
10847
+ id: string;
10848
+ workerIds: string[];
10849
+ requestIds?: string[] | undefined;
10850
+ requestOutcomes?: {
10851
+ requestId: string;
10852
+ status: "cancelled" | "completed-without-reply" | "destroyed" | "failed" | "human-fallback" | "replied" | "sender-closed" | "timed-out";
10853
+ observedAt: string;
10854
+ replyId?: string | undefined;
10855
+ }[] | undefined;
10856
+ deadline: string;
10204
10857
  mode?: "all" | "any" | "one" | undefined;
10205
10858
  revisions?: {
10206
10859
  workerId: string;
@@ -10376,6 +11029,11 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
10376
11029
  event: string;
10377
11030
  githubUrl: string;
10378
11031
  } | undefined;
11032
+ notify?: boolean | undefined;
11033
+ webhook?: {
11034
+ lastDeliveredAt?: string | undefined;
11035
+ lastError?: string | undefined;
11036
+ } | undefined;
10379
11037
  status: "cancelled" | "done" | "failed" | "queued" | "review" | "running" | "waiting";
10380
11038
  activity?: "monitoring" | undefined;
10381
11039
  hasPendingHumanAsk?: boolean | undefined;
@@ -10951,6 +11609,11 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
10951
11609
  systemPrompt?: string | undefined;
10952
11610
  generateFollowups?: boolean | undefined;
10953
11611
  autonomous?: boolean | undefined;
11612
+ notify?: boolean | undefined;
11613
+ webhook?: {
11614
+ lastDeliveredAt?: string | undefined;
11615
+ lastError?: string | undefined;
11616
+ } | undefined;
10954
11617
  automation?: {
10955
11618
  automationId: string;
10956
11619
  automationRevision: number;
@@ -11643,20 +12306,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
11643
12306
  } & {
11644
12307
  "/runs/:id/handoff": {
11645
12308
  $get: {
11646
- output: string;
11647
- outputFormat: "text";
11648
- status: 200;
12309
+ output: {
12310
+ error: string;
12311
+ };
12312
+ outputFormat: "json";
12313
+ status: 404;
11649
12314
  input: {
11650
12315
  param: {
11651
12316
  id: string;
11652
12317
  };
11653
12318
  };
11654
12319
  } | {
11655
- output: {
11656
- error: string;
11657
- };
11658
- outputFormat: "json";
11659
- status: 404;
12320
+ output: string;
12321
+ outputFormat: "text";
12322
+ status: 200;
11660
12323
  input: {
11661
12324
  param: {
11662
12325
  id: string;
@@ -11694,20 +12357,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
11694
12357
  } & {
11695
12358
  "/runs/:id/diff": {
11696
12359
  $get: {
11697
- output: string;
11698
- outputFormat: "text";
11699
- status: import("hono/utils/http-status").ContentfulStatusCode;
12360
+ output: {
12361
+ error: string;
12362
+ };
12363
+ outputFormat: "json";
12364
+ status: 404;
11700
12365
  input: {
11701
12366
  param: {
11702
12367
  id: string;
11703
12368
  };
11704
12369
  };
11705
12370
  } | {
11706
- output: {
11707
- error: string;
11708
- };
11709
- outputFormat: "json";
11710
- status: 404;
12371
+ output: string;
12372
+ outputFormat: "text";
12373
+ status: import("hono/utils/http-status").ContentfulStatusCode;
11711
12374
  input: {
11712
12375
  param: {
11713
12376
  id: string;
@@ -13094,6 +13757,11 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
13094
13757
  systemPrompt?: string | undefined;
13095
13758
  generateFollowups?: boolean | undefined;
13096
13759
  autonomous?: boolean | undefined;
13760
+ notify?: boolean | undefined;
13761
+ webhook?: {
13762
+ lastDeliveredAt?: string | undefined;
13763
+ lastError?: string | undefined;
13764
+ } | undefined;
13097
13765
  automation?: {
13098
13766
  automationId: string;
13099
13767
  automationRevision: number;
@@ -13962,6 +14630,11 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
13962
14630
  systemPrompt?: string | undefined;
13963
14631
  generateFollowups?: boolean | undefined;
13964
14632
  autonomous?: boolean | undefined;
14633
+ notify?: boolean | undefined;
14634
+ webhook?: {
14635
+ lastDeliveredAt?: string | undefined;
14636
+ lastError?: string | undefined;
14637
+ } | undefined;
13965
14638
  automation?: {
13966
14639
  automationId: string;
13967
14640
  automationRevision: number;
@@ -14566,19 +15239,6 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
14566
15239
  } & {
14567
15240
  "/repo/commit/:sha": {
14568
15241
  $get: {
14569
- output: string;
14570
- outputFormat: "text";
14571
- status: import("hono/utils/http-status").ContentfulStatusCode;
14572
- input: {
14573
- query: {
14574
- structured?: string | undefined;
14575
- };
14576
- } & {
14577
- param: {
14578
- sha: string;
14579
- };
14580
- };
14581
- } | {
14582
15242
  output: {
14583
15243
  error: string;
14584
15244
  code?: "invalid_input" | undefined;
@@ -14642,6 +15302,19 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
14642
15302
  sha: string;
14643
15303
  };
14644
15304
  };
15305
+ } | {
15306
+ output: string;
15307
+ outputFormat: "text";
15308
+ status: import("hono/utils/http-status").ContentfulStatusCode;
15309
+ input: {
15310
+ query: {
15311
+ structured?: string | undefined;
15312
+ };
15313
+ } & {
15314
+ param: {
15315
+ sha: string;
15316
+ };
15317
+ };
14645
15318
  };
14646
15319
  };
14647
15320
  } & {
@@ -15737,7 +16410,120 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
15737
16410
  error: string;
15738
16411
  };
15739
16412
  outputFormat: "json";
15740
- status: 404;
16413
+ status: 404;
16414
+ input: {
16415
+ json: {
16416
+ name: string;
16417
+ description?: string | undefined;
16418
+ enabled?: boolean | undefined;
16419
+ events: ("issue.labeled" | "issue.opened" | "issue.unlabeled" | "pull_request.opened")[];
16420
+ intervalSeconds: number;
16421
+ filters: {
16422
+ [x: string]: unknown;
16423
+ authors?: string[] | undefined;
16424
+ assignees?: string[] | undefined;
16425
+ allLabels?: string[] | undefined;
16426
+ anyLabels?: string[] | undefined;
16427
+ excludeLabels?: string[] | undefined;
16428
+ changedLabels?: string[] | undefined;
16429
+ lookbackDays?: number | undefined;
16430
+ maxRecords?: number | undefined;
16431
+ };
16432
+ task: {
16433
+ [x: string]: unknown;
16434
+ prompt: string;
16435
+ workflow?: string | undefined;
16436
+ steps?: {
16437
+ id: string;
16438
+ name?: string | undefined;
16439
+ prompt?: string | undefined;
16440
+ skill?: string | undefined;
16441
+ model?: string | undefined;
16442
+ effort?: string | undefined;
16443
+ runner?: "claude" | "codex" | "cursor" | "opencode" | "pi" | undefined;
16444
+ agentProfile?: string | undefined;
16445
+ allowedTools?: string[] | undefined;
16446
+ bashAllowlist?: string[] | undefined;
16447
+ command?: string | undefined;
16448
+ onFail?: {
16449
+ retry: string;
16450
+ max?: number | undefined;
16451
+ } | undefined;
16452
+ }[] | undefined;
16453
+ runner?: "claude" | "codex" | "cursor" | "opencode" | "pi" | undefined;
16454
+ model?: string | undefined;
16455
+ effort?: string | undefined;
16456
+ variants?: 1 | 2 | 3 | undefined;
16457
+ worktree?: boolean | undefined;
16458
+ generateFollowups?: boolean | undefined;
16459
+ autonomous?: boolean | undefined;
16460
+ systemPrompt?: string | undefined;
16461
+ };
16462
+ expectedRevision: number;
16463
+ };
16464
+ } & {
16465
+ param: {
16466
+ id: string;
16467
+ };
16468
+ };
16469
+ } | {
16470
+ output: {
16471
+ automation: {
16472
+ [x: string]: import("hono/utils/types").JSONValue;
16473
+ id: string;
16474
+ revision: number;
16475
+ name: string;
16476
+ description?: string | undefined;
16477
+ enabled: boolean;
16478
+ events: ("issue.labeled" | "issue.opened" | "issue.unlabeled" | "pull_request.opened")[];
16479
+ intervalSeconds: number;
16480
+ filters: {
16481
+ [x: string]: import("hono/utils/types").JSONValue;
16482
+ authors?: string[] | undefined;
16483
+ assignees?: string[] | undefined;
16484
+ allLabels?: string[] | undefined;
16485
+ anyLabels?: string[] | undefined;
16486
+ excludeLabels?: string[] | undefined;
16487
+ changedLabels?: string[] | undefined;
16488
+ lookbackDays: number;
16489
+ maxRecords: number;
16490
+ };
16491
+ task: {
16492
+ [x: string]: import("hono/utils/types").JSONValue;
16493
+ prompt: string;
16494
+ workflow?: string | undefined;
16495
+ steps?: {
16496
+ id: string;
16497
+ name?: string | undefined;
16498
+ prompt?: string | undefined;
16499
+ skill?: string | undefined;
16500
+ model?: string | undefined;
16501
+ effort?: string | undefined;
16502
+ runner?: "claude" | "codex" | "cursor" | "opencode" | "pi" | undefined;
16503
+ agentProfile?: string | undefined;
16504
+ allowedTools?: string[] | undefined;
16505
+ bashAllowlist?: string[] | undefined;
16506
+ command?: string | undefined;
16507
+ onFail?: {
16508
+ retry: string;
16509
+ max: number;
16510
+ } | undefined;
16511
+ }[] | undefined;
16512
+ runner?: "claude" | "codex" | "cursor" | "opencode" | "pi" | undefined;
16513
+ model?: string | undefined;
16514
+ effort?: string | undefined;
16515
+ variants?: 1 | 2 | 3 | undefined;
16516
+ worktree?: boolean | undefined;
16517
+ generateFollowups?: boolean | undefined;
16518
+ autonomous?: boolean | undefined;
16519
+ systemPrompt?: string | undefined;
16520
+ };
16521
+ createdAt: string;
16522
+ updatedAt: string;
16523
+ };
16524
+ };
16525
+ outputFormat: "json";
16526
+ status: import("hono/utils/http-status").ContentfulStatusCode;
15741
16527
  input: {
15742
16528
  json: {
15743
16529
  name: string;
@@ -15795,28 +16581,30 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
15795
16581
  };
15796
16582
  } | {
15797
16583
  output: {
15798
- automation: {
15799
- [x: string]: import("hono/utils/types").JSONValue;
15800
- id: string;
15801
- revision: number;
16584
+ error: string;
16585
+ };
16586
+ outputFormat: "json";
16587
+ status: 400 | 409;
16588
+ input: {
16589
+ json: {
15802
16590
  name: string;
15803
16591
  description?: string | undefined;
15804
- enabled: boolean;
16592
+ enabled?: boolean | undefined;
15805
16593
  events: ("issue.labeled" | "issue.opened" | "issue.unlabeled" | "pull_request.opened")[];
15806
16594
  intervalSeconds: number;
15807
16595
  filters: {
15808
- [x: string]: import("hono/utils/types").JSONValue;
16596
+ [x: string]: unknown;
15809
16597
  authors?: string[] | undefined;
15810
16598
  assignees?: string[] | undefined;
15811
16599
  allLabels?: string[] | undefined;
15812
16600
  anyLabels?: string[] | undefined;
15813
16601
  excludeLabels?: string[] | undefined;
15814
16602
  changedLabels?: string[] | undefined;
15815
- lookbackDays: number;
15816
- maxRecords: number;
16603
+ lookbackDays?: number | undefined;
16604
+ maxRecords?: number | undefined;
15817
16605
  };
15818
16606
  task: {
15819
- [x: string]: import("hono/utils/types").JSONValue;
16607
+ [x: string]: unknown;
15820
16608
  prompt: string;
15821
16609
  workflow?: string | undefined;
15822
16610
  steps?: {
@@ -15833,7 +16621,7 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
15833
16621
  command?: string | undefined;
15834
16622
  onFail?: {
15835
16623
  retry: string;
15836
- max: number;
16624
+ max?: number | undefined;
15837
16625
  } | undefined;
15838
16626
  }[] | undefined;
15839
16627
  runner?: "claude" | "codex" | "cursor" | "opencode" | "pi" | undefined;
@@ -15845,32 +16633,76 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
15845
16633
  autonomous?: boolean | undefined;
15846
16634
  systemPrompt?: string | undefined;
15847
16635
  };
15848
- createdAt: string;
15849
- updatedAt: string;
16636
+ expectedRevision: number;
16637
+ };
16638
+ } & {
16639
+ param: {
16640
+ id: string;
16641
+ };
16642
+ };
16643
+ };
16644
+ };
16645
+ } & {
16646
+ "/automations/:id": {
16647
+ $delete: {
16648
+ output: null;
16649
+ outputFormat: "body";
16650
+ status: 204;
16651
+ input: {
16652
+ param: {
16653
+ id: string;
15850
16654
  };
15851
16655
  };
16656
+ } | {
16657
+ output: {
16658
+ error: string;
16659
+ };
15852
16660
  outputFormat: "json";
15853
- status: import("hono/utils/http-status").ContentfulStatusCode;
16661
+ status: 404;
15854
16662
  input: {
15855
- json: {
16663
+ param: {
16664
+ id: string;
16665
+ };
16666
+ };
16667
+ };
16668
+ };
16669
+ } & {
16670
+ "/automations/:id/enable": {
16671
+ $post: {
16672
+ output: {
16673
+ error: string;
16674
+ };
16675
+ outputFormat: "json";
16676
+ status: 404;
16677
+ input: {
16678
+ param: {
16679
+ id: string;
16680
+ };
16681
+ };
16682
+ } | {
16683
+ output: {
16684
+ automation: {
16685
+ [x: string]: import("hono/utils/types").JSONValue;
16686
+ id: string;
16687
+ revision: number;
15856
16688
  name: string;
15857
16689
  description?: string | undefined;
15858
- enabled?: boolean | undefined;
16690
+ enabled: boolean;
15859
16691
  events: ("issue.labeled" | "issue.opened" | "issue.unlabeled" | "pull_request.opened")[];
15860
16692
  intervalSeconds: number;
15861
16693
  filters: {
15862
- [x: string]: unknown;
16694
+ [x: string]: import("hono/utils/types").JSONValue;
15863
16695
  authors?: string[] | undefined;
15864
16696
  assignees?: string[] | undefined;
15865
16697
  allLabels?: string[] | undefined;
15866
16698
  anyLabels?: string[] | undefined;
15867
16699
  excludeLabels?: string[] | undefined;
15868
16700
  changedLabels?: string[] | undefined;
15869
- lookbackDays?: number | undefined;
15870
- maxRecords?: number | undefined;
16701
+ lookbackDays: number;
16702
+ maxRecords: number;
15871
16703
  };
15872
16704
  task: {
15873
- [x: string]: unknown;
16705
+ [x: string]: import("hono/utils/types").JSONValue;
15874
16706
  prompt: string;
15875
16707
  workflow?: string | undefined;
15876
16708
  steps?: {
@@ -15887,7 +16719,7 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
15887
16719
  command?: string | undefined;
15888
16720
  onFail?: {
15889
16721
  retry: string;
15890
- max?: number | undefined;
16722
+ max: number;
15891
16723
  } | undefined;
15892
16724
  }[] | undefined;
15893
16725
  runner?: "claude" | "codex" | "cursor" | "opencode" | "pi" | undefined;
@@ -15899,39 +16731,56 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
15899
16731
  autonomous?: boolean | undefined;
15900
16732
  systemPrompt?: string | undefined;
15901
16733
  };
15902
- expectedRevision: number;
16734
+ createdAt: string;
16735
+ updatedAt: string;
15903
16736
  };
15904
- } & {
16737
+ };
16738
+ outputFormat: "json";
16739
+ status: import("hono/utils/http-status").ContentfulStatusCode;
16740
+ input: {
15905
16741
  param: {
15906
16742
  id: string;
15907
16743
  };
15908
16744
  };
15909
- } | {
16745
+ };
16746
+ };
16747
+ } & {
16748
+ "/automations/:id/pause": {
16749
+ $post: {
15910
16750
  output: {
15911
16751
  error: string;
15912
16752
  };
15913
16753
  outputFormat: "json";
15914
- status: 400 | 409;
16754
+ status: 404;
15915
16755
  input: {
15916
- json: {
16756
+ param: {
16757
+ id: string;
16758
+ };
16759
+ };
16760
+ } | {
16761
+ output: {
16762
+ automation: {
16763
+ [x: string]: import("hono/utils/types").JSONValue;
16764
+ id: string;
16765
+ revision: number;
15917
16766
  name: string;
15918
16767
  description?: string | undefined;
15919
- enabled?: boolean | undefined;
16768
+ enabled: boolean;
15920
16769
  events: ("issue.labeled" | "issue.opened" | "issue.unlabeled" | "pull_request.opened")[];
15921
16770
  intervalSeconds: number;
15922
16771
  filters: {
15923
- [x: string]: unknown;
16772
+ [x: string]: import("hono/utils/types").JSONValue;
15924
16773
  authors?: string[] | undefined;
15925
16774
  assignees?: string[] | undefined;
15926
16775
  allLabels?: string[] | undefined;
15927
16776
  anyLabels?: string[] | undefined;
15928
16777
  excludeLabels?: string[] | undefined;
15929
16778
  changedLabels?: string[] | undefined;
15930
- lookbackDays?: number | undefined;
15931
- maxRecords?: number | undefined;
16779
+ lookbackDays: number;
16780
+ maxRecords: number;
15932
16781
  };
15933
16782
  task: {
15934
- [x: string]: unknown;
16783
+ [x: string]: import("hono/utils/types").JSONValue;
15935
16784
  prompt: string;
15936
16785
  workflow?: string | undefined;
15937
16786
  steps?: {
@@ -15948,7 +16797,7 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
15948
16797
  command?: string | undefined;
15949
16798
  onFail?: {
15950
16799
  retry: string;
15951
- max?: number | undefined;
16800
+ max: number;
15952
16801
  } | undefined;
15953
16802
  }[] | undefined;
15954
16803
  runner?: "claude" | "codex" | "cursor" | "opencode" | "pi" | undefined;
@@ -15960,120 +16809,619 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
15960
16809
  autonomous?: boolean | undefined;
15961
16810
  systemPrompt?: string | undefined;
15962
16811
  };
15963
- expectedRevision: number;
16812
+ createdAt: string;
16813
+ updatedAt: string;
16814
+ };
16815
+ };
16816
+ outputFormat: "json";
16817
+ status: import("hono/utils/http-status").ContentfulStatusCode;
16818
+ input: {
16819
+ param: {
16820
+ id: string;
16821
+ };
16822
+ };
16823
+ };
16824
+ };
16825
+ } & {
16826
+ "/automations/:id/check": {
16827
+ $post: {
16828
+ output: {
16829
+ error: string;
16830
+ };
16831
+ outputFormat: "json";
16832
+ status: 404;
16833
+ input: {
16834
+ json: {
16835
+ mode: "execute" | "preview";
16836
+ };
16837
+ } & {
16838
+ param: {
16839
+ id: string;
16840
+ };
16841
+ };
16842
+ } | {
16843
+ output: {
16844
+ checkId: string;
16845
+ };
16846
+ outputFormat: "json";
16847
+ status: 202;
16848
+ input: {
16849
+ json: {
16850
+ mode: "execute" | "preview";
16851
+ };
16852
+ } & {
16853
+ param: {
16854
+ id: string;
16855
+ };
16856
+ };
16857
+ };
16858
+ };
16859
+ } & {
16860
+ "/automation-log": {
16861
+ $get: {
16862
+ output: {
16863
+ error: string;
16864
+ code?: "invalid_input" | undefined;
16865
+ };
16866
+ outputFormat: "json";
16867
+ status: 400;
16868
+ input: {
16869
+ query: {
16870
+ automationId?: string | undefined;
16871
+ result?: "baseline" | "duplicate" | "error" | "launched" | "no-match" | "preview" | "rate-limited" | undefined;
16872
+ event?: "issue.labeled" | "issue.opened" | "issue.unlabeled" | "pull_request.opened" | undefined;
16873
+ since?: string | undefined;
16874
+ cursor?: number | undefined;
16875
+ limit?: number | undefined;
16876
+ };
16877
+ };
16878
+ } | {
16879
+ output: {
16880
+ records: {
16881
+ [x: string]: import("hono/utils/types").JSONValue;
16882
+ seq: number;
16883
+ ts: string;
16884
+ automationId: string;
16885
+ revision: number;
16886
+ event?: "issue.labeled" | "issue.opened" | "issue.unlabeled" | "pull_request.opened" | undefined;
16887
+ result: "baseline" | "duplicate" | "error" | "launched" | "no-match" | "preview" | "rate-limited";
16888
+ reason?: string | undefined;
16889
+ durationMs?: number | undefined;
16890
+ receiptId?: string | undefined;
16891
+ runId?: string | undefined;
16892
+ githubNumber?: number | undefined;
16893
+ githubTitle?: string | undefined;
16894
+ githubUrl?: string | undefined;
16895
+ rateLimit?: {
16896
+ [x: string]: import("hono/utils/types").JSONValue;
16897
+ bucket: "core" | "search";
16898
+ remaining?: number | undefined;
16899
+ resetAt?: string | undefined;
16900
+ } | undefined;
16901
+ }[];
16902
+ };
16903
+ outputFormat: "json";
16904
+ status: import("hono/utils/http-status").ContentfulStatusCode;
16905
+ input: {
16906
+ query: {
16907
+ automationId?: string | undefined;
16908
+ result?: "baseline" | "duplicate" | "error" | "launched" | "no-match" | "preview" | "rate-limited" | undefined;
16909
+ event?: "issue.labeled" | "issue.opened" | "issue.unlabeled" | "pull_request.opened" | undefined;
16910
+ since?: string | undefined;
16911
+ cursor?: number | undefined;
16912
+ limit?: number | undefined;
16913
+ };
16914
+ };
16915
+ };
16916
+ };
16917
+ } & {
16918
+ "/automation-log/:receiptId/retry": {
16919
+ $post: {
16920
+ output: {
16921
+ error: string;
16922
+ };
16923
+ outputFormat: "json";
16924
+ status: 404;
16925
+ input: {
16926
+ param: {
16927
+ receiptId: string;
16928
+ };
16929
+ };
16930
+ } | {
16931
+ output: {
16932
+ error: string;
16933
+ };
16934
+ outputFormat: "json";
16935
+ status: 409;
16936
+ input: {
16937
+ param: {
16938
+ receiptId: string;
15964
16939
  };
15965
- } & {
16940
+ };
16941
+ } | {
16942
+ output: {
16943
+ receiptId: string;
16944
+ runId: string;
16945
+ };
16946
+ outputFormat: "json";
16947
+ status: 202;
16948
+ input: {
15966
16949
  param: {
15967
- id: string;
16950
+ receiptId: string;
15968
16951
  };
15969
16952
  };
15970
16953
  };
15971
16954
  };
15972
- } & {
15973
- "/automations/:id": {
15974
- $delete: {
15975
- output: null;
15976
- outputFormat: "body";
15977
- status: 204;
15978
- input: {
15979
- param: {
16955
+ }, "/"> | import("hono/types").MergeSchemaPath<{
16956
+ "/runs": {
16957
+ $get: {
16958
+ output: {
16959
+ id: string;
16960
+ title: string;
16961
+ titleSummary?: string | undefined;
16962
+ diffStat?: {
16963
+ adds: number;
16964
+ dels: number;
16965
+ files: number;
16966
+ repointed?: boolean | undefined;
16967
+ } | undefined;
16968
+ workflow: string;
16969
+ task: string;
16970
+ queuedMessages?: {
16971
+ id: string;
16972
+ text: string;
16973
+ images?: string[] | undefined;
16974
+ createdAt: string;
16975
+ }[] | undefined;
16976
+ stopping?: boolean | undefined;
16977
+ continuationMessage?: {
16978
+ id: string;
16979
+ text: string;
16980
+ images?: string[] | undefined;
16981
+ createdAt: string;
16982
+ origin?: "human" | "lifecycle" | undefined;
16983
+ agentInputId?: string | undefined;
16984
+ } | undefined;
16985
+ invalidAsk?: boolean | undefined;
16986
+ delegation?: {
16987
+ role: "invalid";
16988
+ } | {
16989
+ role: "root";
16990
+ conversation?: {
16991
+ messages: {
16992
+ senderRunId: string;
16993
+ recipientRunId: string;
16994
+ kind: "follow-up" | "progress" | "reply" | "request";
16995
+ requestId?: string | undefined;
16996
+ id: string;
16997
+ text: string;
16998
+ createdAt: string;
16999
+ deadline?: string | undefined;
17000
+ requestHash: string;
17001
+ state: "accepted" | "continuation-required" | "destroyed" | "late";
17002
+ resumed?: true | undefined;
17003
+ instruction?: string | undefined;
17004
+ question?: {
17005
+ questions: {
17006
+ id?: string | undefined;
17007
+ header: string;
17008
+ question: string;
17009
+ options: {
17010
+ label: string;
17011
+ description?: string | undefined;
17012
+ }[];
17013
+ multiSelect?: boolean | undefined;
17014
+ }[];
17015
+ } | undefined;
17016
+ }[];
17017
+ outcomes: {
17018
+ requestId: string;
17019
+ status: "cancelled" | "completed-without-reply" | "destroyed" | "failed" | "human-fallback" | "replied" | "sender-closed" | "timed-out";
17020
+ observedAt: string;
17021
+ replyId?: string | undefined;
17022
+ }[];
17023
+ } | undefined;
17024
+ permissions: ("destroy" | "diff" | "inspect" | "spawn" | "steer" | "stop" | "wait")[];
17025
+ receipts: {
17026
+ requestId: string;
17027
+ workerId: string;
17028
+ requestHash: string;
17029
+ deletion?: {
17030
+ phase: "complete" | "pending";
17031
+ revision: number;
17032
+ resourceId: string;
17033
+ generation: string;
17034
+ } | undefined;
17035
+ }[];
17036
+ wait?: {
17037
+ id: string;
17038
+ workerIds: string[];
17039
+ requestIds?: string[] | undefined;
17040
+ requestOutcomes?: {
17041
+ requestId: string;
17042
+ status: "cancelled" | "completed-without-reply" | "destroyed" | "failed" | "human-fallback" | "replied" | "sender-closed" | "timed-out";
17043
+ observedAt: string;
17044
+ replyId?: string | undefined;
17045
+ }[] | undefined;
17046
+ deadline: string;
17047
+ mode?: "all" | "any" | "one" | undefined;
17048
+ revisions?: {
17049
+ workerId: string;
17050
+ revision: number;
17051
+ }[] | undefined;
17052
+ reason?: "cancelled" | "message" | "outcome" | "timeout" | undefined;
17053
+ phase: "parked" | "registered" | "wake-pending";
17054
+ outcomes: {
17055
+ workerId: string;
17056
+ status: "cancelled" | "done" | "failed" | "review";
17057
+ observedAt: string;
17058
+ summary?: string | undefined;
17059
+ revision?: number | undefined;
17060
+ }[];
17061
+ wakeId?: string | undefined;
17062
+ } | undefined;
17063
+ lastWait?: {
17064
+ id: string;
17065
+ workerIds: string[];
17066
+ requestIds?: string[] | undefined;
17067
+ requestOutcomes?: {
17068
+ requestId: string;
17069
+ status: "cancelled" | "completed-without-reply" | "destroyed" | "failed" | "human-fallback" | "replied" | "sender-closed" | "timed-out";
17070
+ observedAt: string;
17071
+ replyId?: string | undefined;
17072
+ }[] | undefined;
17073
+ deadline: string;
17074
+ mode?: "all" | "any" | "one" | undefined;
17075
+ revisions?: {
17076
+ workerId: string;
17077
+ revision: number;
17078
+ }[] | undefined;
17079
+ reason?: "cancelled" | "message" | "outcome" | "timeout" | undefined;
17080
+ phase: "parked" | "registered" | "wake-pending";
17081
+ outcomes: {
17082
+ workerId: string;
17083
+ status: "cancelled" | "done" | "failed" | "review";
17084
+ observedAt: string;
17085
+ summary?: string | undefined;
17086
+ revision?: number | undefined;
17087
+ }[];
17088
+ wakeId?: string | undefined;
17089
+ } | undefined;
17090
+ results?: {
17091
+ workerId: string;
17092
+ revision: number;
17093
+ snapshotId: string;
17094
+ observedAt: string;
17095
+ lastExecutionOutcome: "cancelled" | "completed" | "failed" | "review-ready" | "running";
17096
+ previous?: {
17097
+ revision: number;
17098
+ observedAt: string;
17099
+ lastExecutionOutcome: "cancelled" | "completed" | "failed" | "review-ready" | "running";
17100
+ } | undefined;
17101
+ }[] | undefined;
17102
+ finishRequestedAt?: string | undefined;
17103
+ historyDeletion?: "pending" | undefined;
17104
+ completion?: {
17105
+ phase: "attention" | "waiting";
17106
+ waitId?: string | undefined;
17107
+ } | undefined;
17108
+ } | {
17109
+ role: "worker";
17110
+ wait?: {
17111
+ id: string;
17112
+ workerIds: string[];
17113
+ requestIds?: string[] | undefined;
17114
+ requestOutcomes?: {
17115
+ requestId: string;
17116
+ status: "cancelled" | "completed-without-reply" | "destroyed" | "failed" | "human-fallback" | "replied" | "sender-closed" | "timed-out";
17117
+ observedAt: string;
17118
+ replyId?: string | undefined;
17119
+ }[] | undefined;
17120
+ deadline: string;
17121
+ mode?: "all" | "any" | "one" | undefined;
17122
+ revisions?: {
17123
+ workerId: string;
17124
+ revision: number;
17125
+ }[] | undefined;
17126
+ reason?: "cancelled" | "message" | "outcome" | "timeout" | undefined;
17127
+ phase: "parked" | "registered" | "wake-pending";
17128
+ outcomes: {
17129
+ workerId: string;
17130
+ status: "cancelled" | "done" | "failed" | "review";
17131
+ observedAt: string;
17132
+ summary?: string | undefined;
17133
+ revision?: number | undefined;
17134
+ }[];
17135
+ wakeId?: string | undefined;
17136
+ } | undefined;
17137
+ lastWait?: {
17138
+ id: string;
17139
+ workerIds: string[];
17140
+ requestIds?: string[] | undefined;
17141
+ requestOutcomes?: {
17142
+ requestId: string;
17143
+ status: "cancelled" | "completed-without-reply" | "destroyed" | "failed" | "human-fallback" | "replied" | "sender-closed" | "timed-out";
17144
+ observedAt: string;
17145
+ replyId?: string | undefined;
17146
+ }[] | undefined;
17147
+ deadline: string;
17148
+ mode?: "all" | "any" | "one" | undefined;
17149
+ revisions?: {
17150
+ workerId: string;
17151
+ revision: number;
17152
+ }[] | undefined;
17153
+ reason?: "cancelled" | "message" | "outcome" | "timeout" | undefined;
17154
+ phase: "parked" | "registered" | "wake-pending";
17155
+ outcomes: {
17156
+ workerId: string;
17157
+ status: "cancelled" | "done" | "failed" | "review";
17158
+ observedAt: string;
17159
+ summary?: string | undefined;
17160
+ revision?: number | undefined;
17161
+ }[];
17162
+ wakeId?: string | undefined;
17163
+ } | undefined;
17164
+ permissions: ("destroy" | "diff" | "inspect" | "spawn" | "steer" | "stop" | "wait")[];
17165
+ parentRunId: string;
17166
+ workspace: {
17167
+ ownerRunId: string;
17168
+ resourceId: string;
17169
+ kind: "owned-isolated";
17170
+ path: string;
17171
+ branch: string;
17172
+ baselineSha: string;
17173
+ };
17174
+ destroy?: {
17175
+ requestedAt: string;
17176
+ phase: "cleaning" | "complete" | "incomplete" | "requested" | "terminating";
17177
+ remaining: ("branch" | "process" | "worktree")[];
17178
+ error?: string | undefined;
17179
+ } | undefined;
17180
+ context?: {
17181
+ text?: string | undefined;
17182
+ inputs: {
17183
+ source: {
17184
+ kind: "baseline-file";
17185
+ path: string;
17186
+ } | {
17187
+ kind: "parent-attachment";
17188
+ id: string;
17189
+ };
17190
+ path: string;
17191
+ sha256: string;
17192
+ bytes: number;
17193
+ }[];
17194
+ } | undefined;
17195
+ executionRevision?: number | undefined;
17196
+ executionStartSeq?: number | undefined;
17197
+ } | undefined;
17198
+ agentInputs?: {
17199
+ conversation?: {
17200
+ senderRunId: string;
17201
+ recipientRunId: string;
17202
+ kind: "follow-up" | "progress" | "reply" | "request";
17203
+ requestId?: string | undefined;
17204
+ } | undefined;
15980
17205
  id: string;
15981
- };
15982
- };
15983
- } | {
15984
- output: {
15985
- error: string;
15986
- };
15987
- outputFormat: "json";
15988
- status: 404;
15989
- input: {
15990
- param: {
17206
+ source: "agent" | "lifecycle";
17207
+ parentRunId: string;
17208
+ text: string;
17209
+ createdAt: string;
17210
+ deliveredAt?: string | undefined;
17211
+ consumedAt?: string | undefined;
17212
+ awaitingRead?: true | undefined;
17213
+ inboxClaim?: {
17214
+ receiptId: string;
17215
+ generation: string;
17216
+ expiresAt: string;
17217
+ acknowledgedAt?: string | undefined;
17218
+ memberIds?: string[] | undefined;
17219
+ } | undefined;
17220
+ }[] | undefined;
17221
+ ciWait?: {
17222
+ prUrl: string;
17223
+ repository: string;
17224
+ prNumber: number;
17225
+ headSha: string;
15991
17226
  id: string;
15992
- };
15993
- };
15994
- };
15995
- };
15996
- } & {
15997
- "/automations/:id/enable": {
15998
- $post: {
15999
- output: {
16000
- error: string;
16001
- };
16002
- outputFormat: "json";
16003
- status: 404;
16004
- input: {
16005
- param: {
17227
+ generation: string;
17228
+ turnId: string;
17229
+ timeoutSeconds: number;
17230
+ registeredAt: string;
17231
+ deadline: string;
17232
+ phase: "delivered" | "parked" | "registered" | "wake-pending" | "withdrawn";
17233
+ result?: {
17234
+ outcome: "cancelled" | "deadline" | "error" | "failed" | "head_changed" | "no_checks" | "passed" | "skipped";
17235
+ headSha: string;
17236
+ observedHeadSha?: string | undefined;
17237
+ observedAt: string;
17238
+ checks: {
17239
+ name: string;
17240
+ state: string;
17241
+ link: string;
17242
+ }[];
17243
+ totalChecks: number;
17244
+ truncated: boolean;
17245
+ diagnostic?: string | undefined;
17246
+ } | undefined;
17247
+ wakeId?: string | undefined;
17248
+ deliveredAt?: string | undefined;
17249
+ } | undefined;
17250
+ lastCiWait?: {
17251
+ prUrl: string;
17252
+ repository: string;
17253
+ prNumber: number;
17254
+ headSha: string;
16006
17255
  id: string;
16007
- };
16008
- };
16009
- } | {
16010
- output: {
16011
- automation: {
16012
- [x: string]: import("hono/utils/types").JSONValue;
17256
+ generation: string;
17257
+ turnId: string;
17258
+ timeoutSeconds: number;
17259
+ registeredAt: string;
17260
+ deadline: string;
17261
+ phase: "delivered" | "parked" | "registered" | "wake-pending" | "withdrawn";
17262
+ result?: {
17263
+ outcome: "cancelled" | "deadline" | "error" | "failed" | "head_changed" | "no_checks" | "passed" | "skipped";
17264
+ headSha: string;
17265
+ observedHeadSha?: string | undefined;
17266
+ observedAt: string;
17267
+ checks: {
17268
+ name: string;
17269
+ state: string;
17270
+ link: string;
17271
+ }[];
17272
+ totalChecks: number;
17273
+ truncated: boolean;
17274
+ diagnostic?: string | undefined;
17275
+ } | undefined;
17276
+ wakeId?: string | undefined;
17277
+ deliveredAt?: string | undefined;
17278
+ } | undefined;
17279
+ lastCiWaitError?: string | undefined;
17280
+ taskImages?: string[] | undefined;
17281
+ model?: string | undefined;
17282
+ effort?: string | undefined;
17283
+ modelIdentity?: string | undefined;
17284
+ runner?: "claude" | "codex" | "cursor" | "opencode" | "pi" | undefined;
17285
+ agentProfile?: string | undefined;
17286
+ systemPrompt?: string | undefined;
17287
+ generateFollowups?: boolean | undefined;
17288
+ autonomous?: boolean | undefined;
17289
+ automation?: {
17290
+ automationId: string;
17291
+ automationRevision: number;
17292
+ receiptId: string;
17293
+ event: string;
17294
+ githubUrl: string;
17295
+ } | undefined;
17296
+ notify?: boolean | undefined;
17297
+ webhook?: {
17298
+ lastDeliveredAt?: string | undefined;
17299
+ lastError?: string | undefined;
17300
+ } | undefined;
17301
+ status: "cancelled" | "done" | "failed" | "queued" | "review" | "running" | "waiting";
17302
+ activity?: "monitoring" | undefined;
17303
+ hasPendingHumanAsk?: boolean | undefined;
17304
+ monitoringWakeAt?: string | undefined;
17305
+ monitoringWakeCapReached?: boolean | undefined;
17306
+ autoResumeAt?: string | undefined;
17307
+ autoResumeAttempts?: number | undefined;
17308
+ createdAt: string;
17309
+ startedAt?: string | undefined;
17310
+ finishedAt?: string | undefined;
17311
+ tokensUsed: number;
17312
+ inputTokens?: number | undefined;
17313
+ outputTokens?: number | undefined;
17314
+ costUsd?: number | undefined;
17315
+ pullRequestUrl?: string | undefined;
17316
+ referencedPullRequestUrl?: string | undefined;
17317
+ prNumber?: number | undefined;
17318
+ issueNumber?: number | undefined;
17319
+ referencedIssueNumberSeeded?: boolean | undefined;
17320
+ titleOrigin?: "auto" | "marker" | "user" | undefined;
17321
+ markerRefs?: {
17322
+ pr?: number | undefined;
17323
+ issue?: number | undefined;
17324
+ } | undefined;
17325
+ referencedPrCandidates?: string[] | undefined;
17326
+ referencedIssueUrl?: string | undefined;
17327
+ referencedIssueCandidates?: string[] | undefined;
17328
+ worktree?: false | undefined;
17329
+ worktreePath?: string | undefined;
17330
+ branch?: string | undefined;
17331
+ baseBranch?: string | undefined;
17332
+ worktreeReclaimedAt?: string | undefined;
17333
+ groupId?: string | undefined;
17334
+ variant?: string | undefined;
17335
+ clientRequestId?: string | undefined;
17336
+ clientRequestHash?: string | undefined;
17337
+ peakRssBytes?: number | undefined;
17338
+ peakProcCount?: number | undefined;
17339
+ archived: boolean;
17340
+ archivedAt?: string | undefined;
17341
+ pinned?: boolean | undefined;
17342
+ pinnedAt?: string | undefined;
17343
+ seenAt?: string | undefined;
17344
+ currentStepId?: string | undefined;
17345
+ error?: string | undefined;
17346
+ steps: {
16013
17347
  id: string;
16014
- revision: number;
17348
+ name: string;
17349
+ kind: "agent" | "check";
17350
+ status: "cancelled" | "done" | "failed" | "pending" | "review" | "running" | "skipped" | "waiting";
17351
+ iterations: number;
17352
+ retriesUsed?: number | undefined;
17353
+ tokensUsed: number;
17354
+ inputTokens?: number | undefined;
17355
+ outputTokens?: number | undefined;
17356
+ usageInvocationsStarted?: number | undefined;
17357
+ usageInvocationsObserved?: number | undefined;
17358
+ usageTurnsStarted?: number | undefined;
17359
+ usageTurnsRecorded?: number | undefined;
17360
+ usageInvocationEpoch?: number | undefined;
17361
+ startedAt?: string | undefined;
17362
+ finishedAt?: string | undefined;
17363
+ error?: string | undefined;
17364
+ sessionId?: string | undefined;
17365
+ backend?: "claude" | "codex" | "cursor" | "opencode" | "pi" | undefined;
17366
+ profileId?: string | undefined;
17367
+ costUsd?: number | undefined;
17368
+ synthetic?: "continuation" | undefined;
17369
+ }[];
17370
+ workflowDef?: {
16015
17371
  name: string;
16016
17372
  description?: string | undefined;
16017
- enabled: boolean;
16018
- events: ("issue.labeled" | "issue.opened" | "issue.unlabeled" | "pull_request.opened")[];
16019
- intervalSeconds: number;
16020
- filters: {
16021
- [x: string]: import("hono/utils/types").JSONValue;
16022
- authors?: string[] | undefined;
16023
- assignees?: string[] | undefined;
16024
- allLabels?: string[] | undefined;
16025
- anyLabels?: string[] | undefined;
16026
- excludeLabels?: string[] | undefined;
16027
- changedLabels?: string[] | undefined;
16028
- lookbackDays: number;
16029
- maxRecords: number;
16030
- };
16031
- task: {
16032
- [x: string]: import("hono/utils/types").JSONValue;
16033
- prompt: string;
16034
- workflow?: string | undefined;
16035
- steps?: {
16036
- id: string;
16037
- name?: string | undefined;
16038
- prompt?: string | undefined;
16039
- skill?: string | undefined;
16040
- model?: string | undefined;
16041
- effort?: string | undefined;
16042
- runner?: "claude" | "codex" | "cursor" | "opencode" | "pi" | undefined;
16043
- agentProfile?: string | undefined;
16044
- allowedTools?: string[] | undefined;
16045
- bashAllowlist?: string[] | undefined;
16046
- command?: string | undefined;
16047
- onFail?: {
16048
- retry: string;
16049
- max: number;
16050
- } | undefined;
16051
- }[] | undefined;
16052
- runner?: "claude" | "codex" | "cursor" | "opencode" | "pi" | undefined;
16053
- model?: string | undefined;
16054
- effort?: string | undefined;
16055
- variants?: 1 | 2 | 3 | undefined;
16056
- worktree?: boolean | undefined;
16057
- generateFollowups?: boolean | undefined;
16058
- autonomous?: boolean | undefined;
16059
- systemPrompt?: string | undefined;
16060
- };
16061
- createdAt: string;
16062
- updatedAt: string;
16063
- };
16064
- };
17373
+ steps: {
17374
+ id: string;
17375
+ name?: string | undefined;
17376
+ prompt?: string | undefined;
17377
+ skill?: string | undefined;
17378
+ model?: string | undefined;
17379
+ effort?: string | undefined;
17380
+ runner?: "claude" | "codex" | "cursor" | "opencode" | "pi" | undefined;
17381
+ agentProfile?: string | undefined;
17382
+ allowedTools?: string[] | undefined;
17383
+ bashAllowlist?: string[] | undefined;
17384
+ command?: string | undefined;
17385
+ onFail?: {
17386
+ retry: string;
17387
+ max: number;
17388
+ } | undefined;
17389
+ }[];
17390
+ source: "built-in" | "file";
17391
+ path?: string | undefined;
17392
+ } | undefined;
17393
+ finishBlocked?: string | null | undefined;
17394
+ cliResumeCommand?: string | undefined;
17395
+ usage?: {
17396
+ cpuPct: number;
17397
+ rssBytes: number;
17398
+ procCount: number;
17399
+ } | undefined;
17400
+ }[];
16065
17401
  outputFormat: "json";
16066
17402
  status: import("hono/utils/http-status").ContentfulStatusCode;
17403
+ input: {};
17404
+ };
17405
+ };
17406
+ } & {
17407
+ "/runs/:id/relationships": {
17408
+ $get: {
17409
+ output: {
17410
+ error: string;
17411
+ code?: "invalid_input" | undefined;
17412
+ };
17413
+ outputFormat: "json";
17414
+ status: 400;
16067
17415
  input: {
16068
17416
  param: {
16069
17417
  id: string;
16070
17418
  };
17419
+ } & {
17420
+ query: {
17421
+ [x: string]: string | string[];
17422
+ };
16071
17423
  };
16072
- };
16073
- };
16074
- } & {
16075
- "/automations/:id/pause": {
16076
- $post: {
17424
+ } | {
16077
17425
  output: {
16078
17426
  error: string;
16079
17427
  };
@@ -16083,62 +17431,83 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
16083
17431
  param: {
16084
17432
  id: string;
16085
17433
  };
17434
+ } & {
17435
+ query: {
17436
+ [x: string]: string | string[];
17437
+ };
16086
17438
  };
16087
17439
  } | {
16088
17440
  output: {
16089
- automation: {
16090
- [x: string]: import("hono/utils/types").JSONValue;
16091
- id: string;
16092
- revision: number;
16093
- name: string;
16094
- description?: string | undefined;
16095
- enabled: boolean;
16096
- events: ("issue.labeled" | "issue.opened" | "issue.unlabeled" | "pull_request.opened")[];
16097
- intervalSeconds: number;
16098
- filters: {
16099
- [x: string]: import("hono/utils/types").JSONValue;
16100
- authors?: string[] | undefined;
16101
- assignees?: string[] | undefined;
16102
- allLabels?: string[] | undefined;
16103
- anyLabels?: string[] | undefined;
16104
- excludeLabels?: string[] | undefined;
16105
- changedLabels?: string[] | undefined;
16106
- lookbackDays: number;
16107
- maxRecords: number;
17441
+ parentRunId?: string | undefined;
17442
+ workers: {
17443
+ workerId: string;
17444
+ parentRunId: string;
17445
+ status: "cancelled" | "done" | "failed" | "queued" | "review" | "running" | "waiting";
17446
+ currentStepId?: string | undefined;
17447
+ activity?: "monitoring" | undefined;
17448
+ workspace: {
17449
+ ownerRunId: string;
17450
+ resourceId: string;
17451
+ kind: "owned-isolated";
17452
+ path: string;
17453
+ branch: string;
17454
+ baselineSha: string;
16108
17455
  };
16109
- task: {
16110
- [x: string]: import("hono/utils/types").JSONValue;
16111
- prompt: string;
16112
- workflow?: string | undefined;
16113
- steps?: {
17456
+ backend?: "claude" | "codex" | "cursor" | "opencode" | "pi" | undefined;
17457
+ model?: string | undefined;
17458
+ inputs?: {
17459
+ source: {
17460
+ kind: "baseline-file";
17461
+ path: string;
17462
+ } | {
17463
+ kind: "parent-attachment";
16114
17464
  id: string;
16115
- name?: string | undefined;
16116
- prompt?: string | undefined;
16117
- skill?: string | undefined;
16118
- model?: string | undefined;
16119
- effort?: string | undefined;
16120
- runner?: "claude" | "codex" | "cursor" | "opencode" | "pi" | undefined;
16121
- agentProfile?: string | undefined;
16122
- allowedTools?: string[] | undefined;
16123
- bashAllowlist?: string[] | undefined;
16124
- command?: string | undefined;
16125
- onFail?: {
16126
- retry: string;
16127
- max: number;
16128
- } | undefined;
17465
+ };
17466
+ path: string;
17467
+ sha256: string;
17468
+ bytes: number;
17469
+ }[] | undefined;
17470
+ wait?: {
17471
+ id: string;
17472
+ workerIds: string[];
17473
+ requestIds?: string[] | undefined;
17474
+ requestOutcomes?: {
17475
+ requestId: string;
17476
+ status: "cancelled" | "completed-without-reply" | "destroyed" | "failed" | "human-fallback" | "replied" | "sender-closed" | "timed-out";
17477
+ observedAt: string;
17478
+ replyId?: string | undefined;
16129
17479
  }[] | undefined;
16130
- runner?: "claude" | "codex" | "cursor" | "opencode" | "pi" | undefined;
16131
- model?: string | undefined;
16132
- effort?: string | undefined;
16133
- variants?: 1 | 2 | 3 | undefined;
16134
- worktree?: boolean | undefined;
16135
- generateFollowups?: boolean | undefined;
16136
- autonomous?: boolean | undefined;
16137
- systemPrompt?: string | undefined;
16138
- };
16139
- createdAt: string;
16140
- updatedAt: string;
16141
- };
17480
+ deadline: string;
17481
+ mode?: "all" | "any" | "one" | undefined;
17482
+ revisions?: {
17483
+ workerId: string;
17484
+ revision: number;
17485
+ }[] | undefined;
17486
+ reason?: "cancelled" | "message" | "outcome" | "timeout" | undefined;
17487
+ phase: "parked" | "registered" | "wake-pending";
17488
+ outcomes: {
17489
+ workerId: string;
17490
+ status: "cancelled" | "done" | "failed" | "review";
17491
+ observedAt: string;
17492
+ summary?: string | undefined;
17493
+ revision?: number | undefined;
17494
+ }[];
17495
+ wakeId?: string | undefined;
17496
+ } | undefined;
17497
+ destroy?: {
17498
+ requestedAt: string;
17499
+ phase: "cleaning" | "complete" | "incomplete" | "requested" | "terminating";
17500
+ remaining: ("branch" | "process" | "worktree")[];
17501
+ error?: string | undefined;
17502
+ } | undefined;
17503
+ outcome?: {
17504
+ workerId: string;
17505
+ status: "cancelled" | "done" | "failed" | "review";
17506
+ observedAt: string;
17507
+ summary?: string | undefined;
17508
+ revision?: number | undefined;
17509
+ } | undefined;
17510
+ }[];
16142
17511
  };
16143
17512
  outputFormat: "json";
16144
17513
  status: import("hono/utils/http-status").ContentfulStatusCode;
@@ -16146,46 +17515,34 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
16146
17515
  param: {
16147
17516
  id: string;
16148
17517
  };
17518
+ } & {
17519
+ query: {
17520
+ [x: string]: string | string[];
17521
+ };
16149
17522
  };
16150
17523
  };
16151
17524
  };
16152
17525
  } & {
16153
- "/automations/:id/check": {
17526
+ "/runs/:id/worker-destroy": {
16154
17527
  $post: {
16155
17528
  output: {
16156
- error: string;
17529
+ readonly code: "capacity_limit" | "denied_scope" | "incompatible_state" | "incomplete_cleanup" | "invalid_baseline" | "invalid_input" | "unauthenticated" | "unavailable_diff" | "unavailable_transport";
17530
+ readonly error: string;
16157
17531
  };
16158
17532
  outputFormat: "json";
16159
- status: 404;
17533
+ status: 400 | 401 | 403 | 409 | 503;
16160
17534
  input: {
16161
- json: {
16162
- mode: "execute" | "preview";
17535
+ query: {
17536
+ [x: string]: string | string[];
16163
17537
  };
16164
17538
  } & {
16165
17539
  param: {
16166
17540
  id: string;
16167
17541
  };
16168
- };
16169
- } | {
16170
- output: {
16171
- checkId: string;
16172
- };
16173
- outputFormat: "json";
16174
- status: 202;
16175
- input: {
16176
- json: {
16177
- mode: "execute" | "preview";
16178
- };
16179
17542
  } & {
16180
- param: {
16181
- id: string;
16182
- };
17543
+ json: Record<string, never>;
16183
17544
  };
16184
- };
16185
- };
16186
- } & {
16187
- "/automation-log": {
16188
- $get: {
17545
+ } | {
16189
17546
  output: {
16190
17547
  error: string;
16191
17548
  code?: "invalid_input" | undefined;
@@ -16194,94 +17551,96 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
16194
17551
  status: 400;
16195
17552
  input: {
16196
17553
  query: {
16197
- automationId?: string | undefined;
16198
- result?: "baseline" | "duplicate" | "error" | "launched" | "no-match" | "preview" | "rate-limited" | undefined;
16199
- event?: "issue.labeled" | "issue.opened" | "issue.unlabeled" | "pull_request.opened" | undefined;
16200
- since?: string | undefined;
16201
- cursor?: number | undefined;
16202
- limit?: number | undefined;
17554
+ [x: string]: string | string[];
16203
17555
  };
16204
- };
16205
- } | {
16206
- output: {
16207
- records: {
16208
- [x: string]: import("hono/utils/types").JSONValue;
16209
- seq: number;
16210
- ts: string;
16211
- automationId: string;
16212
- revision: number;
16213
- event?: "issue.labeled" | "issue.opened" | "issue.unlabeled" | "pull_request.opened" | undefined;
16214
- result: "baseline" | "duplicate" | "error" | "launched" | "no-match" | "preview" | "rate-limited";
16215
- reason?: string | undefined;
16216
- durationMs?: number | undefined;
16217
- receiptId?: string | undefined;
16218
- runId?: string | undefined;
16219
- githubNumber?: number | undefined;
16220
- githubTitle?: string | undefined;
16221
- githubUrl?: string | undefined;
16222
- rateLimit?: {
16223
- [x: string]: import("hono/utils/types").JSONValue;
16224
- bucket: "core" | "search";
16225
- remaining?: number | undefined;
16226
- resetAt?: string | undefined;
16227
- } | undefined;
16228
- }[];
16229
- };
16230
- outputFormat: "json";
16231
- status: import("hono/utils/http-status").ContentfulStatusCode;
16232
- input: {
16233
- query: {
16234
- automationId?: string | undefined;
16235
- result?: "baseline" | "duplicate" | "error" | "launched" | "no-match" | "preview" | "rate-limited" | undefined;
16236
- event?: "issue.labeled" | "issue.opened" | "issue.unlabeled" | "pull_request.opened" | undefined;
16237
- since?: string | undefined;
16238
- cursor?: number | undefined;
16239
- limit?: number | undefined;
17556
+ } & {
17557
+ param: {
17558
+ id: string;
16240
17559
  };
16241
- };
16242
- };
16243
- };
16244
- } & {
16245
- "/automation-log/:receiptId/retry": {
16246
- $post: {
17560
+ } & {
17561
+ json: Record<string, never>;
17562
+ };
17563
+ } | {
16247
17564
  output: {
16248
- error: string;
17565
+ workerId: string;
17566
+ state: "complete" | "incomplete";
17567
+ deleted?: ({
17568
+ kind: "worktree";
17569
+ path: string;
17570
+ } | {
17571
+ kind: "branch";
17572
+ ref: string;
17573
+ })[] | undefined;
17574
+ remaining: ("branch" | "process" | "worktree")[];
17575
+ error?: string | undefined;
16249
17576
  };
16250
17577
  outputFormat: "json";
16251
- status: 404;
17578
+ status: 200;
16252
17579
  input: {
17580
+ query: {
17581
+ [x: string]: string | string[];
17582
+ };
17583
+ } & {
16253
17584
  param: {
16254
- receiptId: string;
17585
+ id: string;
16255
17586
  };
17587
+ } & {
17588
+ json: Record<string, never>;
16256
17589
  };
16257
17590
  } | {
16258
17591
  output: {
16259
- error: string;
17592
+ workerId: string;
17593
+ state: "complete" | "incomplete";
17594
+ deleted?: ({
17595
+ kind: "worktree";
17596
+ path: string;
17597
+ } | {
17598
+ kind: "branch";
17599
+ ref: string;
17600
+ })[] | undefined;
17601
+ remaining: ("branch" | "process" | "worktree")[];
17602
+ error?: string | undefined;
16260
17603
  };
16261
17604
  outputFormat: "json";
16262
17605
  status: 409;
16263
17606
  input: {
17607
+ query: {
17608
+ [x: string]: string | string[];
17609
+ };
17610
+ } & {
16264
17611
  param: {
16265
- receiptId: string;
17612
+ id: string;
16266
17613
  };
17614
+ } & {
17615
+ json: Record<string, never>;
16267
17616
  };
16268
- } | {
17617
+ };
17618
+ };
17619
+ } & {
17620
+ "/runs/archive-finished": {
17621
+ $post: {
16269
17622
  output: {
16270
- receiptId: string;
16271
- runId: string;
17623
+ archived: number;
16272
17624
  };
16273
17625
  outputFormat: "json";
16274
- status: 202;
16275
- input: {
16276
- param: {
16277
- receiptId: string;
16278
- };
17626
+ status: import("hono/utils/http-status").ContentfulStatusCode;
17627
+ input: {};
17628
+ };
17629
+ };
17630
+ } & {
17631
+ "/runs/read-all": {
17632
+ $post: {
17633
+ output: {
17634
+ read: number;
16279
17635
  };
17636
+ outputFormat: "json";
17637
+ status: import("hono/utils/http-status").ContentfulStatusCode;
17638
+ input: {};
16280
17639
  };
16281
17640
  };
16282
- }, "/"> | import("hono/types").MergeSchemaPath<{
16283
- "/runs": {
16284
- $get: {
17641
+ } & {
17642
+ "/runs/:id/archive": {
17643
+ $post: {
16285
17644
  output: {
16286
17645
  id: string;
16287
17646
  title: string;
@@ -16300,7 +17659,6 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
16300
17659
  images?: string[] | undefined;
16301
17660
  createdAt: string;
16302
17661
  }[] | undefined;
16303
- stopping?: boolean | undefined;
16304
17662
  continuationMessage?: {
16305
17663
  id: string;
16306
17664
  text: string;
@@ -16613,6 +17971,11 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
16613
17971
  systemPrompt?: string | undefined;
16614
17972
  generateFollowups?: boolean | undefined;
16615
17973
  autonomous?: boolean | undefined;
17974
+ notify?: boolean | undefined;
17975
+ webhook?: {
17976
+ lastDeliveredAt?: string | undefined;
17977
+ lastError?: string | undefined;
17978
+ } | undefined;
16616
17979
  automation?: {
16617
17980
  automationId: string;
16618
17981
  automationRevision: number;
@@ -16621,6 +17984,7 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
16621
17984
  githubUrl: string;
16622
17985
  } | undefined;
16623
17986
  status: "cancelled" | "done" | "failed" | "queued" | "review" | "running" | "waiting";
17987
+ stopping?: boolean | undefined;
16624
17988
  activity?: "monitoring" | undefined;
16625
17989
  hasPendingHumanAsk?: boolean | undefined;
16626
17990
  monitoringWakeAt?: string | undefined;
@@ -16653,316 +18017,113 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
16653
18017
  baseBranch?: string | undefined;
16654
18018
  worktreeReclaimedAt?: string | undefined;
16655
18019
  groupId?: string | undefined;
16656
- variant?: string | undefined;
16657
- clientRequestId?: string | undefined;
16658
- clientRequestHash?: string | undefined;
16659
- peakRssBytes?: number | undefined;
16660
- peakProcCount?: number | undefined;
16661
- archived: boolean;
16662
- archivedAt?: string | undefined;
16663
- pinned?: boolean | undefined;
16664
- pinnedAt?: string | undefined;
16665
- seenAt?: string | undefined;
16666
- currentStepId?: string | undefined;
16667
- error?: string | undefined;
16668
- steps: {
16669
- id: string;
16670
- name: string;
16671
- kind: "agent" | "check";
16672
- status: "cancelled" | "done" | "failed" | "pending" | "review" | "running" | "skipped" | "waiting";
16673
- iterations: number;
16674
- retriesUsed?: number | undefined;
16675
- tokensUsed: number;
16676
- inputTokens?: number | undefined;
16677
- outputTokens?: number | undefined;
16678
- usageInvocationsStarted?: number | undefined;
16679
- usageInvocationsObserved?: number | undefined;
16680
- usageTurnsStarted?: number | undefined;
16681
- usageTurnsRecorded?: number | undefined;
16682
- usageInvocationEpoch?: number | undefined;
16683
- startedAt?: string | undefined;
16684
- finishedAt?: string | undefined;
16685
- error?: string | undefined;
16686
- sessionId?: string | undefined;
16687
- backend?: "claude" | "codex" | "cursor" | "opencode" | "pi" | undefined;
16688
- profileId?: string | undefined;
16689
- costUsd?: number | undefined;
16690
- synthetic?: "continuation" | undefined;
16691
- }[];
16692
- workflowDef?: {
16693
- name: string;
16694
- description?: string | undefined;
16695
- steps: {
16696
- id: string;
16697
- name?: string | undefined;
16698
- prompt?: string | undefined;
16699
- skill?: string | undefined;
16700
- model?: string | undefined;
16701
- effort?: string | undefined;
16702
- runner?: "claude" | "codex" | "cursor" | "opencode" | "pi" | undefined;
16703
- agentProfile?: string | undefined;
16704
- allowedTools?: string[] | undefined;
16705
- bashAllowlist?: string[] | undefined;
16706
- command?: string | undefined;
16707
- onFail?: {
16708
- retry: string;
16709
- max: number;
16710
- } | undefined;
16711
- }[];
16712
- source: "built-in" | "file";
16713
- path?: string | undefined;
16714
- } | undefined;
16715
- finishBlocked?: string | null | undefined;
16716
- cliResumeCommand?: string | undefined;
16717
- usage?: {
16718
- cpuPct: number;
16719
- rssBytes: number;
16720
- procCount: number;
16721
- } | undefined;
16722
- }[];
16723
- outputFormat: "json";
16724
- status: import("hono/utils/http-status").ContentfulStatusCode;
16725
- input: {};
16726
- };
16727
- };
16728
- } & {
16729
- "/runs/:id/relationships": {
16730
- $get: {
16731
- output: {
16732
- error: string;
16733
- code?: "invalid_input" | undefined;
16734
- };
16735
- outputFormat: "json";
16736
- status: 400;
16737
- input: {
16738
- param: {
16739
- id: string;
16740
- };
16741
- } & {
16742
- query: {
16743
- [x: string]: string | string[];
16744
- };
16745
- };
16746
- } | {
16747
- output: {
16748
- error: string;
16749
- };
16750
- outputFormat: "json";
16751
- status: 404;
16752
- input: {
16753
- param: {
16754
- id: string;
16755
- };
16756
- } & {
16757
- query: {
16758
- [x: string]: string | string[];
16759
- };
16760
- };
16761
- } | {
16762
- output: {
16763
- parentRunId?: string | undefined;
16764
- workers: {
16765
- workerId: string;
16766
- parentRunId: string;
16767
- status: "cancelled" | "done" | "failed" | "queued" | "review" | "running" | "waiting";
16768
- currentStepId?: string | undefined;
16769
- activity?: "monitoring" | undefined;
16770
- workspace: {
16771
- ownerRunId: string;
16772
- resourceId: string;
16773
- kind: "owned-isolated";
16774
- path: string;
16775
- branch: string;
16776
- baselineSha: string;
16777
- };
16778
- backend?: "claude" | "codex" | "cursor" | "opencode" | "pi" | undefined;
16779
- model?: string | undefined;
16780
- inputs?: {
16781
- source: {
16782
- kind: "baseline-file";
16783
- path: string;
16784
- } | {
16785
- kind: "parent-attachment";
16786
- id: string;
16787
- };
16788
- path: string;
16789
- sha256: string;
16790
- bytes: number;
16791
- }[] | undefined;
16792
- wait?: {
16793
- id: string;
16794
- workerIds: string[];
16795
- requestIds?: string[] | undefined;
16796
- requestOutcomes?: {
16797
- requestId: string;
16798
- status: "cancelled" | "completed-without-reply" | "destroyed" | "failed" | "human-fallback" | "replied" | "sender-closed" | "timed-out";
16799
- observedAt: string;
16800
- replyId?: string | undefined;
16801
- }[] | undefined;
16802
- deadline: string;
16803
- mode?: "all" | "any" | "one" | undefined;
16804
- revisions?: {
16805
- workerId: string;
16806
- revision: number;
16807
- }[] | undefined;
16808
- reason?: "cancelled" | "message" | "outcome" | "timeout" | undefined;
16809
- phase: "parked" | "registered" | "wake-pending";
16810
- outcomes: {
16811
- workerId: string;
16812
- status: "cancelled" | "done" | "failed" | "review";
16813
- observedAt: string;
16814
- summary?: string | undefined;
16815
- revision?: number | undefined;
16816
- }[];
16817
- wakeId?: string | undefined;
16818
- } | undefined;
16819
- destroy?: {
16820
- requestedAt: string;
16821
- phase: "cleaning" | "complete" | "incomplete" | "requested" | "terminating";
16822
- remaining: ("branch" | "process" | "worktree")[];
16823
- error?: string | undefined;
16824
- } | undefined;
16825
- outcome?: {
16826
- workerId: string;
16827
- status: "cancelled" | "done" | "failed" | "review";
16828
- observedAt: string;
16829
- summary?: string | undefined;
16830
- revision?: number | undefined;
16831
- } | undefined;
18020
+ variant?: string | undefined;
18021
+ clientRequestId?: string | undefined;
18022
+ clientRequestHash?: string | undefined;
18023
+ peakRssBytes?: number | undefined;
18024
+ peakProcCount?: number | undefined;
18025
+ archived: boolean;
18026
+ archivedAt?: string | undefined;
18027
+ pinned?: boolean | undefined;
18028
+ pinnedAt?: string | undefined;
18029
+ seenAt?: string | undefined;
18030
+ currentStepId?: string | undefined;
18031
+ error?: string | undefined;
18032
+ steps: {
18033
+ id: string;
18034
+ name: string;
18035
+ kind: "agent" | "check";
18036
+ status: "cancelled" | "done" | "failed" | "pending" | "review" | "running" | "skipped" | "waiting";
18037
+ iterations: number;
18038
+ retriesUsed?: number | undefined;
18039
+ tokensUsed: number;
18040
+ inputTokens?: number | undefined;
18041
+ outputTokens?: number | undefined;
18042
+ usageInvocationsStarted?: number | undefined;
18043
+ usageInvocationsObserved?: number | undefined;
18044
+ usageTurnsStarted?: number | undefined;
18045
+ usageTurnsRecorded?: number | undefined;
18046
+ usageInvocationEpoch?: number | undefined;
18047
+ startedAt?: string | undefined;
18048
+ finishedAt?: string | undefined;
18049
+ error?: string | undefined;
18050
+ sessionId?: string | undefined;
18051
+ backend?: "claude" | "codex" | "cursor" | "opencode" | "pi" | undefined;
18052
+ profileId?: string | undefined;
18053
+ costUsd?: number | undefined;
18054
+ synthetic?: "continuation" | undefined;
16832
18055
  }[];
18056
+ workflowDef?: {
18057
+ name: string;
18058
+ description?: string | undefined;
18059
+ steps: {
18060
+ id: string;
18061
+ name?: string | undefined;
18062
+ prompt?: string | undefined;
18063
+ skill?: string | undefined;
18064
+ model?: string | undefined;
18065
+ effort?: string | undefined;
18066
+ runner?: "claude" | "codex" | "cursor" | "opencode" | "pi" | undefined;
18067
+ agentProfile?: string | undefined;
18068
+ allowedTools?: string[] | undefined;
18069
+ bashAllowlist?: string[] | undefined;
18070
+ command?: string | undefined;
18071
+ onFail?: {
18072
+ retry: string;
18073
+ max: number;
18074
+ } | undefined;
18075
+ }[];
18076
+ source: "built-in" | "file";
18077
+ path?: string | undefined;
18078
+ } | undefined;
16833
18079
  };
16834
18080
  outputFormat: "json";
16835
18081
  status: import("hono/utils/http-status").ContentfulStatusCode;
16836
18082
  input: {
16837
- param: {
16838
- id: string;
16839
- };
16840
- } & {
16841
- query: {
16842
- [x: string]: string | string[];
16843
- };
16844
- };
16845
- };
16846
- };
16847
- } & {
16848
- "/runs/:id/worker-destroy": {
16849
- $post: {
16850
- output: {
16851
- error: string;
16852
- code?: "invalid_input" | undefined;
16853
- };
16854
- outputFormat: "json";
16855
- status: 400;
16856
- input: {
16857
- query: {
16858
- [x: string]: string | string[];
18083
+ json: {
18084
+ archived?: boolean | undefined;
16859
18085
  };
16860
18086
  } & {
16861
18087
  param: {
16862
18088
  id: string;
16863
18089
  };
16864
- } & {
16865
- json: Record<string, never>;
16866
18090
  };
16867
18091
  } | {
16868
18092
  output: {
16869
- workerId: string;
16870
- state: "complete" | "incomplete";
16871
- deleted?: ({
16872
- kind: "worktree";
16873
- path: string;
16874
- } | {
16875
- kind: "branch";
16876
- ref: string;
16877
- })[] | undefined;
16878
- remaining: ("branch" | "process" | "worktree")[];
16879
- error?: string | undefined;
18093
+ error: string;
16880
18094
  };
16881
18095
  outputFormat: "json";
16882
- status: 200;
18096
+ status: 404;
16883
18097
  input: {
16884
- query: {
16885
- [x: string]: string | string[];
18098
+ json: {
18099
+ archived?: boolean | undefined;
16886
18100
  };
16887
18101
  } & {
16888
18102
  param: {
16889
18103
  id: string;
16890
18104
  };
16891
- } & {
16892
- json: Record<string, never>;
16893
18105
  };
16894
- } | {
18106
+ };
18107
+ };
18108
+ } & {
18109
+ "/runs/:id/pin": {
18110
+ $post: {
16895
18111
  output: {
16896
- workerId: string;
16897
- state: "complete" | "incomplete";
16898
- deleted?: ({
16899
- kind: "worktree";
16900
- path: string;
16901
- } | {
16902
- kind: "branch";
16903
- ref: string;
16904
- })[] | undefined;
16905
- remaining: ("branch" | "process" | "worktree")[];
16906
- error?: string | undefined;
18112
+ error: string;
18113
+ code?: "invalid_input" | undefined;
16907
18114
  };
16908
18115
  outputFormat: "json";
16909
- status: 409;
18116
+ status: 400;
16910
18117
  input: {
16911
- query: {
16912
- [x: string]: string | string[];
16913
- };
16914
- } & {
16915
18118
  param: {
16916
18119
  id: string;
16917
18120
  };
16918
18121
  } & {
16919
- json: Record<string, never>;
16920
- };
16921
- } | {
16922
- output: {
16923
- readonly code: "capacity_limit" | "denied_scope" | "incompatible_state" | "incomplete_cleanup" | "invalid_baseline" | "invalid_input" | "unauthenticated" | "unavailable_diff" | "unavailable_transport";
16924
- readonly error: string;
16925
- };
16926
- outputFormat: "json";
16927
- status: 400 | 401 | 403 | 409 | 503;
16928
- input: {
16929
- query: {
16930
- [x: string]: string | string[];
16931
- };
16932
- } & {
16933
- param: {
16934
- id: string;
18122
+ json: {
18123
+ pinned?: boolean | undefined;
16935
18124
  };
16936
- } & {
16937
- json: Record<string, never>;
16938
- };
16939
- };
16940
- };
16941
- } & {
16942
- "/runs/archive-finished": {
16943
- $post: {
16944
- output: {
16945
- archived: number;
16946
- };
16947
- outputFormat: "json";
16948
- status: import("hono/utils/http-status").ContentfulStatusCode;
16949
- input: {};
16950
- };
16951
- };
16952
- } & {
16953
- "/runs/read-all": {
16954
- $post: {
16955
- output: {
16956
- read: number;
16957
18125
  };
16958
- outputFormat: "json";
16959
- status: import("hono/utils/http-status").ContentfulStatusCode;
16960
- input: {};
16961
- };
16962
- };
16963
- } & {
16964
- "/runs/:id/archive": {
16965
- $post: {
18126
+ } | {
16966
18127
  output: {
16967
18128
  id: string;
16968
18129
  title: string;
@@ -17293,6 +18454,11 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
17293
18454
  systemPrompt?: string | undefined;
17294
18455
  generateFollowups?: boolean | undefined;
17295
18456
  autonomous?: boolean | undefined;
18457
+ notify?: boolean | undefined;
18458
+ webhook?: {
18459
+ lastDeliveredAt?: string | undefined;
18460
+ lastError?: string | undefined;
18461
+ } | undefined;
17296
18462
  automation?: {
17297
18463
  automationId: string;
17298
18464
  automationRevision: number;
@@ -17397,13 +18563,13 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
17397
18563
  outputFormat: "json";
17398
18564
  status: import("hono/utils/http-status").ContentfulStatusCode;
17399
18565
  input: {
17400
- json: {
17401
- archived?: boolean | undefined;
17402
- };
17403
- } & {
17404
18566
  param: {
17405
18567
  id: string;
17406
18568
  };
18569
+ } & {
18570
+ json: {
18571
+ pinned?: boolean | undefined;
18572
+ };
17407
18573
  };
17408
18574
  } | {
17409
18575
  output: {
@@ -17412,18 +18578,18 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
17412
18578
  outputFormat: "json";
17413
18579
  status: 404;
17414
18580
  input: {
17415
- json: {
17416
- archived?: boolean | undefined;
17417
- };
17418
- } & {
17419
18581
  param: {
17420
18582
  id: string;
17421
18583
  };
18584
+ } & {
18585
+ json: {
18586
+ pinned?: boolean | undefined;
18587
+ };
17422
18588
  };
17423
18589
  };
17424
18590
  };
17425
18591
  } & {
17426
- "/runs/:id/pin": {
18592
+ "/runs/:id/notify": {
17427
18593
  $post: {
17428
18594
  output: {
17429
18595
  error: string;
@@ -17437,7 +18603,8 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
17437
18603
  };
17438
18604
  } & {
17439
18605
  json: {
17440
- pinned?: boolean | undefined;
18606
+ notify: boolean;
18607
+ message?: string | undefined;
17441
18608
  };
17442
18609
  };
17443
18610
  } | {
@@ -17771,6 +18938,11 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
17771
18938
  systemPrompt?: string | undefined;
17772
18939
  generateFollowups?: boolean | undefined;
17773
18940
  autonomous?: boolean | undefined;
18941
+ notify?: boolean | undefined;
18942
+ webhook?: {
18943
+ lastDeliveredAt?: string | undefined;
18944
+ lastError?: string | undefined;
18945
+ } | undefined;
17774
18946
  automation?: {
17775
18947
  automationId: string;
17776
18948
  automationRevision: number;
@@ -17880,7 +19052,8 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
17880
19052
  };
17881
19053
  } & {
17882
19054
  json: {
17883
- pinned?: boolean | undefined;
19055
+ notify: boolean;
19056
+ message?: string | undefined;
17884
19057
  };
17885
19058
  };
17886
19059
  } | {
@@ -17895,7 +19068,24 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
17895
19068
  };
17896
19069
  } & {
17897
19070
  json: {
17898
- pinned?: boolean | undefined;
19071
+ notify: boolean;
19072
+ message?: string | undefined;
19073
+ };
19074
+ };
19075
+ } | {
19076
+ output: {
19077
+ error: string;
19078
+ };
19079
+ outputFormat: "json";
19080
+ status: 400;
19081
+ input: {
19082
+ param: {
19083
+ id: string;
19084
+ };
19085
+ } & {
19086
+ json: {
19087
+ notify: boolean;
19088
+ message?: string | undefined;
17899
19089
  };
17900
19090
  };
17901
19091
  };
@@ -18259,6 +19449,11 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
18259
19449
  systemPrompt?: string | undefined;
18260
19450
  generateFollowups?: boolean | undefined;
18261
19451
  autonomous?: boolean | undefined;
19452
+ notify?: boolean | undefined;
19453
+ webhook?: {
19454
+ lastDeliveredAt?: string | undefined;
19455
+ lastError?: string | undefined;
19456
+ } | undefined;
18262
19457
  automation?: {
18263
19458
  automationId: string;
18264
19459
  automationRevision: number;
@@ -18713,6 +19908,11 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
18713
19908
  systemPrompt?: string | undefined;
18714
19909
  generateFollowups?: boolean | undefined;
18715
19910
  autonomous?: boolean | undefined;
19911
+ notify?: boolean | undefined;
19912
+ webhook?: {
19913
+ lastDeliveredAt?: string | undefined;
19914
+ lastError?: string | undefined;
19915
+ } | undefined;
18716
19916
  automation?: {
18717
19917
  automationId: string;
18718
19918
  automationRevision: number;
@@ -19167,6 +20367,11 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
19167
20367
  systemPrompt?: string | undefined;
19168
20368
  generateFollowups?: boolean | undefined;
19169
20369
  autonomous?: boolean | undefined;
20370
+ notify?: boolean | undefined;
20371
+ webhook?: {
20372
+ lastDeliveredAt?: string | undefined;
20373
+ lastError?: string | undefined;
20374
+ } | undefined;
19170
20375
  automation?: {
19171
20376
  automationId: string;
19172
20377
  automationRevision: number;
@@ -19306,6 +20511,7 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
19306
20511
  }[] | undefined;
19307
20512
  todoId?: string | undefined;
19308
20513
  clientRequestId?: string | undefined;
20514
+ notify?: boolean | undefined;
19309
20515
  };
19310
20516
  };
19311
20517
  } | {
@@ -19639,6 +20845,11 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
19639
20845
  systemPrompt?: string | undefined;
19640
20846
  generateFollowups?: boolean | undefined;
19641
20847
  autonomous?: boolean | undefined;
20848
+ notify?: boolean | undefined;
20849
+ webhook?: {
20850
+ lastDeliveredAt?: string | undefined;
20851
+ lastError?: string | undefined;
20852
+ } | undefined;
19642
20853
  automation?: {
19643
20854
  automationId: string;
19644
20855
  automationRevision: number;
@@ -19778,6 +20989,7 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
19778
20989
  }[] | undefined;
19779
20990
  todoId?: string | undefined;
19780
20991
  clientRequestId?: string | undefined;
20992
+ notify?: boolean | undefined;
19781
20993
  };
19782
20994
  };
19783
20995
  } | {
@@ -19822,6 +21034,7 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
19822
21034
  }[] | undefined;
19823
21035
  todoId?: string | undefined;
19824
21036
  clientRequestId?: string | undefined;
21037
+ notify?: boolean | undefined;
19825
21038
  };
19826
21039
  };
19827
21040
  } | {
@@ -19866,6 +21079,7 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
19866
21079
  }[] | undefined;
19867
21080
  todoId?: string | undefined;
19868
21081
  clientRequestId?: string | undefined;
21082
+ notify?: boolean | undefined;
19869
21083
  };
19870
21084
  };
19871
21085
  } | {
@@ -19910,6 +21124,7 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
19910
21124
  }[] | undefined;
19911
21125
  todoId?: string | undefined;
19912
21126
  clientRequestId?: string | undefined;
21127
+ notify?: boolean | undefined;
19913
21128
  };
19914
21129
  };
19915
21130
  } | {
@@ -20244,6 +21459,11 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
20244
21459
  systemPrompt?: string | undefined;
20245
21460
  generateFollowups?: boolean | undefined;
20246
21461
  autonomous?: boolean | undefined;
21462
+ notify?: boolean | undefined;
21463
+ webhook?: {
21464
+ lastDeliveredAt?: string | undefined;
21465
+ lastError?: string | undefined;
21466
+ } | undefined;
20247
21467
  automation?: {
20248
21468
  automationId: string;
20249
21469
  automationRevision: number;
@@ -20384,6 +21604,7 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
20384
21604
  }[] | undefined;
20385
21605
  todoId?: string | undefined;
20386
21606
  clientRequestId?: string | undefined;
21607
+ notify?: boolean | undefined;
20387
21608
  };
20388
21609
  };
20389
21610
  };
@@ -20729,6 +21950,11 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
20729
21950
  event: string;
20730
21951
  githubUrl: string;
20731
21952
  } | undefined;
21953
+ notify?: boolean | undefined;
21954
+ webhook?: {
21955
+ lastDeliveredAt?: string | undefined;
21956
+ lastError?: string | undefined;
21957
+ } | undefined;
20732
21958
  status: "cancelled" | "done" | "failed" | "queued" | "review" | "running" | "waiting";
20733
21959
  activity?: "monitoring" | undefined;
20734
21960
  hasPendingHumanAsk?: boolean | undefined;
@@ -21304,6 +22530,11 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
21304
22530
  systemPrompt?: string | undefined;
21305
22531
  generateFollowups?: boolean | undefined;
21306
22532
  autonomous?: boolean | undefined;
22533
+ notify?: boolean | undefined;
22534
+ webhook?: {
22535
+ lastDeliveredAt?: string | undefined;
22536
+ lastError?: string | undefined;
22537
+ } | undefined;
21307
22538
  automation?: {
21308
22539
  automationId: string;
21309
22540
  automationRevision: number;
@@ -21996,20 +23227,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
21996
23227
  } & {
21997
23228
  "/runs/:id/handoff": {
21998
23229
  $get: {
21999
- output: string;
22000
- outputFormat: "text";
22001
- status: 200;
23230
+ output: {
23231
+ error: string;
23232
+ };
23233
+ outputFormat: "json";
23234
+ status: 404;
22002
23235
  input: {
22003
23236
  param: {
22004
23237
  id: string;
22005
23238
  };
22006
23239
  };
22007
23240
  } | {
22008
- output: {
22009
- error: string;
22010
- };
22011
- outputFormat: "json";
22012
- status: 404;
23241
+ output: string;
23242
+ outputFormat: "text";
23243
+ status: 200;
22013
23244
  input: {
22014
23245
  param: {
22015
23246
  id: string;
@@ -22047,20 +23278,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
22047
23278
  } & {
22048
23279
  "/runs/:id/diff": {
22049
23280
  $get: {
22050
- output: string;
22051
- outputFormat: "text";
22052
- status: import("hono/utils/http-status").ContentfulStatusCode;
23281
+ output: {
23282
+ error: string;
23283
+ };
23284
+ outputFormat: "json";
23285
+ status: 404;
22053
23286
  input: {
22054
23287
  param: {
22055
23288
  id: string;
22056
23289
  };
22057
23290
  };
22058
23291
  } | {
22059
- output: {
22060
- error: string;
22061
- };
22062
- outputFormat: "json";
22063
- status: 404;
23292
+ output: string;
23293
+ outputFormat: "text";
23294
+ status: import("hono/utils/http-status").ContentfulStatusCode;
22064
23295
  input: {
22065
23296
  param: {
22066
23297
  id: string;