@hearsay-tools/squawk 0.19.0-dev.8689 → 0.19.0-dev.8699

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 (92) hide show
  1. package/dist/contract/index.js +55 -14
  2. package/dist/contract/runs.d.ts +50 -0
  3. package/dist/contract/workspace-events.d.ts +18 -0
  4. package/dist/delegation/transport.d.ts +65 -65
  5. package/dist/server/models-routes.d.ts +12 -12
  6. package/dist/server/projects-routes.d.ts +45 -45
  7. package/dist/server/providers-routes.d.ts +57 -57
  8. package/dist/server/repo-routes.d.ts +21 -21
  9. package/dist/server/runner-install-routes.d.ts +10 -10
  10. package/dist/server/runs-routes.d.ts +8 -0
  11. package/dist/server/server.d.ts +1581 -1557
  12. package/dist/server/workspace-routes.d.ts +92 -84
  13. package/package.json +4 -4
  14. package/scripts/mock-ci-tool.mjs +4 -5
  15. package/web/dist/assets/{accounts-section-RDVTJfi7.js → accounts-section-CzFhdKWy.js} +1 -1
  16. package/web/dist/assets/activity-motion-D0Fch0mc.js +2 -0
  17. package/web/dist/assets/{activity-route-CjE0yxn0.js → activity-route-Cvw0jXpy.js} +1 -1
  18. package/web/dist/assets/{agent-config-section-DQ1RaVK2.js → agent-config-section-BCzxsvys.js} +1 -1
  19. package/web/dist/assets/{agent-defaults-section-Dzm7jIza.js → agent-defaults-section-DMRK-Qlp.js} +1 -1
  20. package/web/dist/assets/{appearance-DQLHHfI4.js → appearance-Ew3vb_-K.js} +1 -1
  21. package/web/dist/assets/{archive-on-merge-field-C7_Fwy2A.js → archive-on-merge-field-g87CG6RL.js} +1 -1
  22. package/web/dist/assets/attention-80jX8HhC.js +1 -0
  23. package/web/dist/assets/automations-route-CRBtWEo1.js +2 -0
  24. package/web/dist/assets/commit-list-Cd14tNSj.js +1 -0
  25. package/web/dist/assets/diff-D55N_7Ul.js +3 -0
  26. package/web/dist/assets/{diff-controls-BRa3141W.js → diff-controls-CmYvdEGt.js} +1 -1
  27. package/web/dist/assets/diff-stat-U7DT4Ilj.js +1 -0
  28. package/web/dist/assets/{diff-view-CwlKCj5V.js → diff-view-DV6muJdZ.js} +1 -1
  29. package/web/dist/assets/{file-preview-VvCzp02k.js → file-preview-CTPfK-oR.js} +1 -1
  30. package/web/dist/assets/{folder-browser-B7IbnF0d.js → folder-browser-DnSFycbU.js} +1 -1
  31. package/web/dist/assets/git-toolbar-Dc_o1nrh.js +1 -0
  32. package/web/dist/assets/github-WYk7bQID.js +1 -0
  33. package/web/dist/assets/{global-activity-route-C4-bmfh_.js → global-activity-route-Dvx2uk8w.js} +1 -1
  34. package/web/dist/assets/image-preview-2S3PEy8S.js +1 -0
  35. package/web/dist/assets/index-CGdnowj-.js +21 -0
  36. package/web/dist/assets/index-DAxuDJAo.css +1 -0
  37. package/web/dist/assets/{label-Bt8n7Spq.js → label-o_DsEmPt.js} +1 -1
  38. package/web/dist/assets/{live-reads-Crd6fVGH.js → live-reads-Cgk2XbiP.js} +1 -1
  39. package/web/dist/assets/{markdown-9L65ixU6.js → markdown-CJzxFk0P.js} +1 -1
  40. package/web/dist/assets/{notifications-section-QWmuj2j2.js → notifications-section-DNYO4sd4.js} +1 -1
  41. package/web/dist/assets/{open-in-menu-BPp88ouw.js → open-in-menu-Bzae69TK.js} +1 -1
  42. package/web/dist/assets/{preview-pane-connected-DAM2Snwh.js → preview-pane-connected-CRooCkyb.js} +2 -2
  43. package/web/dist/assets/{project-location-BRxXN249.js → project-location-D6riKh0Z.js} +1 -1
  44. package/web/dist/assets/{project-router-CLJTc7gv.js → project-router-CZ89wg-5.js} +1 -1
  45. package/web/dist/assets/{project-scope-context-Rv6S_BXt.js → project-scope-context-DIcqj4jJ.js} +2 -2
  46. package/web/dist/assets/{projects-section-DxubjpZI.js → projects-section-4rsb8E52.js} +1 -1
  47. package/web/dist/assets/{prompt-templates-section-CkQneT1G.js → prompt-templates-section-G3dlAOXt.js} +1 -1
  48. package/web/dist/assets/{queries-qCF-eOqZ.js → queries-DZhNVAD_.js} +1 -1
  49. package/web/dist/assets/{reference-chip-D0v0keVC.js → reference-chip-DSJSqjmO.js} +1 -1
  50. package/web/dist/assets/{remote-settings-notice-COojb6XK.js → remote-settings-notice-GNs7i0kP.js} +1 -1
  51. package/web/dist/assets/repo-git-CvZTTKFl.js +1 -0
  52. package/web/dist/assets/{report-reader-zWwalJDN.js → report-reader-CLlNdsZG.js} +1 -1
  53. package/web/dist/assets/reports-sl2SMDG1.js +1 -0
  54. package/web/dist/assets/{resources-section-Cb2WIqNv.js → resources-section-DhEoaA0K.js} +1 -1
  55. package/web/dist/assets/run-header-DZoOLIBZ.js +2 -0
  56. package/web/dist/assets/{select-y3oRuA2s.js → select-D3snxxoD.js} +1 -1
  57. package/web/dist/assets/{session-context-section-CiPNMiL7.js → session-context-section-esqZfONg.js} +2 -2
  58. package/web/dist/assets/{settings-agent-picker-CJJJncuA.js → settings-agent-picker-Dso2TmRM.js} +1 -1
  59. package/web/dist/assets/{settings-shell-CLToW28f.js → settings-shell-UO_0dSGl.js} +1 -1
  60. package/web/dist/assets/{sidebar-section-VOYJarPd.js → sidebar-section-pp7e3AZa.js} +1 -1
  61. package/web/dist/assets/{skills-BySF3yBA.js → skills-B99glme7.js} +1 -1
  62. package/web/dist/assets/{tab-link-Bu1g-ArE.js → tab-link-BGXFZZ_Z.js} +1 -1
  63. package/web/dist/assets/task-changes-Tn9M2OPH.js +1 -0
  64. package/web/dist/assets/task-commits-BHDMp1sO.js +1 -0
  65. package/web/dist/assets/{task-files-Bu-L_NRW.js → task-files-Csx1Bonx.js} +1 -1
  66. package/web/dist/assets/{task-github-item-DhiTqCjk.js → task-github-item-D0kQ0K4S.js} +1 -1
  67. package/web/dist/assets/{task-groups-4tzKGROI.js → task-groups-DK0I9p71.js} +1 -1
  68. package/web/dist/assets/{task-thread-CKkTeQdi.js → task-thread-DsMuGSug.js} +9 -9
  69. package/web/dist/assets/{tasks-table-C5uoZMFs.js → tasks-table-BNFYIwtc.js} +1 -1
  70. package/web/dist/assets/{thread-state-B_ZqjjRr.js → thread-state-DMWi6eLk.js} +1 -1
  71. package/web/dist/assets/{toaster-BXnLIU3z.js → toaster-0sM0sfWx.js} +1 -1
  72. package/web/dist/assets/use-hand-to-agent-state-DqCW8Giu.js +1 -0
  73. package/web/dist/assets/{workflows-DlTkuM0J.js → workflows-CxJvAn6z.js} +3 -3
  74. package/web/dist/assets/{workspace-tools-BRK7f1Hk.js → workspace-tools-DqJ8akIy.js} +1 -1
  75. package/web/dist/assets/{worktrees-section-BXI0-7HH.js → worktrees-section-DBZZlAe0.js} +4 -4
  76. package/web/dist/index.html +16 -15
  77. package/web/dist/assets/activity-motion-B7km8QVK.js +0 -2
  78. package/web/dist/assets/attention-CBCeJN5w.js +0 -1
  79. package/web/dist/assets/automations-route-BcdL5f0K.js +0 -2
  80. package/web/dist/assets/commit-list-CN1zX-0X.js +0 -1
  81. package/web/dist/assets/diff-hxqBOfZH.js +0 -3
  82. package/web/dist/assets/git-toolbar-BulcGzsv.js +0 -1
  83. package/web/dist/assets/github-By3yOcFH.js +0 -1
  84. package/web/dist/assets/image-preview-Pgf8bnzY.js +0 -1
  85. package/web/dist/assets/index-C69_Sk06.css +0 -1
  86. package/web/dist/assets/index-DNQcTHxV.js +0 -21
  87. package/web/dist/assets/repo-git-Mgk4Qcmo.js +0 -1
  88. package/web/dist/assets/reports-BCHWt3zy.js +0 -1
  89. package/web/dist/assets/run-header-DeprqSP7.js +0 -2
  90. package/web/dist/assets/task-changes-NUwvUglx.js +0 -1
  91. package/web/dist/assets/task-commits-CpV1Hz9L.js +0 -1
  92. package/web/dist/assets/use-hand-to-agent-state-K864D69i.js +0 -1
@@ -1482,6 +1482,20 @@ var continuationMessageSchema = queuedMessageSchema.extend({
1482
1482
  }).optional()
1483
1483
  });
1484
1484
 
1485
+ // ../contract/src/usage-limit-hold.ts
1486
+ function isUsageLimitHold(run) {
1487
+ return run.status === "waiting" && run.autoResumeAt !== void 0;
1488
+ }
1489
+ function usageLimitHoldOf(run) {
1490
+ if (!isUsageLimitHold(run)) return void 0;
1491
+ return {
1492
+ reason: run.autoResumeReason ?? "usage-limit",
1493
+ resumeAt: run.autoResumeAt,
1494
+ ...run.autoResumeAttempts === void 0 ? {} : { attempts: run.autoResumeAttempts },
1495
+ ...run.error === void 0 ? {} : { error: run.error.slice(0, 2e3) }
1496
+ };
1497
+ }
1498
+
1485
1499
  // ../contract/src/waits.ts
1486
1500
  import { z as z21 } from "zod";
1487
1501
 
@@ -1614,20 +1628,6 @@ var ciWaitReceiptSchema = ciPrIdentitySchema.extend({
1614
1628
  phase: ciWaitSchema.shape.phase
1615
1629
  }).strict();
1616
1630
 
1617
- // ../contract/src/usage-limit-hold.ts
1618
- function isUsageLimitHold(run) {
1619
- return run.status === "waiting" && run.autoResumeAt !== void 0;
1620
- }
1621
- function usageLimitHoldOf(run) {
1622
- if (!isUsageLimitHold(run)) return void 0;
1623
- return {
1624
- reason: run.autoResumeReason ?? "usage-limit",
1625
- resumeAt: run.autoResumeAt,
1626
- ...run.autoResumeAttempts === void 0 ? {} : { attempts: run.autoResumeAttempts },
1627
- ...run.error === void 0 ? {} : { error: run.error.slice(0, 2e3) }
1628
- };
1629
- }
1630
-
1631
1631
  // ../contract/src/wait-limits.ts
1632
1632
  var WAIT_LIMIT = 16;
1633
1633
  var LAST_WAITS_LIMIT = 16;
@@ -2419,6 +2419,10 @@ var apiRunSchema = runRecordSchema.extend({
2419
2419
  cliHandoff: z23.literal(false).optional(),
2420
2420
  usage: processUsageSchema.optional()
2421
2421
  });
2422
+ var runStatePreviewSchema = z23.object({
2423
+ kind: z23.enum(["ask", "permission", "review", "error"]),
2424
+ text: z23.string().min(1).max(240)
2425
+ });
2422
2426
  var runSummarySchema = z23.object({
2423
2427
  id: z23.string(),
2424
2428
  title: z23.string(),
@@ -2521,6 +2525,8 @@ var runSummarySchema = z23.object({
2521
2525
  * labels a delegated peer by the agent actually running it, which can differ from `runner`. */
2522
2526
  currentStepBackend: runnerSchema.optional(),
2523
2527
  error: z23.string().optional(),
2528
+ /** Concise 1-line ask, permission, review, or error preview for urgent/failed task rows. */
2529
+ statePreview: runStatePreviewSchema.optional(),
2524
2530
  /** Present while the run's isolated worktree exists — the breadcrumb says "Isolated worktree". */
2525
2531
  worktreePath: z23.string().optional()
2526
2532
  });
@@ -2562,6 +2568,37 @@ var SUMMARY_OPTIONAL_KEYS = [
2562
2568
  "error",
2563
2569
  "worktreePath"
2564
2570
  ];
2571
+ var STATE_PREVIEW_MAX = 240;
2572
+ function oneLinePreview(raw) {
2573
+ if (typeof raw !== "string") return "";
2574
+ const collapsed = raw.replace(/\s+/g, " ").trim();
2575
+ if (collapsed.length <= STATE_PREVIEW_MAX) return collapsed;
2576
+ return `${collapsed.slice(0, STATE_PREVIEW_MAX - 1).trimEnd()}\u2026`;
2577
+ }
2578
+ function deriveRunStatePreview(run, waitingOn) {
2579
+ if (!run.archived) {
2580
+ if (run.hasPendingPermission) return { kind: "permission", text: "Permission requested" };
2581
+ if (waitingOn?.kind === "human") {
2582
+ const openHuman = (Array.isArray(run.waits) ? run.waits : []).filter(
2583
+ (wait) => Boolean(wait) && typeof wait === "object" && wait.phase === "open" && wait.kind === "human"
2584
+ );
2585
+ const question = openHuman.find((wait) => Array.isArray(wait.questions) && wait.questions.length > 0)?.questions?.[0]?.question;
2586
+ const text = oneLinePreview(question);
2587
+ if (text) return { kind: "ask", text };
2588
+ const budget = openHuman.some((wait) => wait.via === "budget");
2589
+ return { kind: "ask", text: budget ? "Automatic wakes used up" : "Waiting for your reply" };
2590
+ }
2591
+ if (run.status === "review") {
2592
+ const text = oneLinePreview(run.doneAccepted?.summary);
2593
+ return { kind: "review", text: text || "Ready for review" };
2594
+ }
2595
+ }
2596
+ if (run.status === "failed" && !isUsageLimitHold(run)) {
2597
+ const text = oneLinePreview(run.error);
2598
+ if (text) return { kind: "error", text };
2599
+ }
2600
+ return void 0;
2601
+ }
2565
2602
  function toRunSummary(run) {
2566
2603
  const summary = {
2567
2604
  id: run.id,
@@ -2583,6 +2620,8 @@ function toRunSummary(run) {
2583
2620
  }
2584
2621
  const waitingOn = computeWaitingOn({ ...run, delegation: withRootLedger(summary.delegation, run.delegation) });
2585
2622
  if (waitingOn) summary.waitingOn = waitingOn;
2623
+ const statePreview = deriveRunStatePreview(run, waitingOn);
2624
+ if (statePreview) summary.statePreview = statePreview;
2586
2625
  if (hasResolvedWait(run)) summary.waitWakePending = true;
2587
2626
  if (run.usage) summary.usage = run.usage;
2588
2627
  const automationId = automationIdOf(run);
@@ -6607,6 +6646,7 @@ export {
6607
6646
  deleteRunResponseSchema,
6608
6647
  deleteWorkflowResponseSchema,
6609
6648
  deriveAttention,
6649
+ deriveRunStatePreview,
6610
6650
  deriveWebhookState,
6611
6651
  diffStatSchema,
6612
6652
  discoveredRunnerSchema,
@@ -6896,6 +6936,7 @@ export {
6896
6936
  runPullRequestSchema,
6897
6937
  runRecordSchema,
6898
6938
  runRelationshipsSchema,
6939
+ runStatePreviewSchema,
6899
6940
  runStatusSchema,
6900
6941
  runSummariesQuerySchema,
6901
6942
  runSummarySchema,
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ import { type WaitingOn } from './waits.ts';
2
3
  export { runStatusSchema, type RunStatus, stepStatusSchema, type StepStatus, stepKindSchema, type StepKind } from './run-status.ts';
3
4
  /**
4
5
  * The RUNS family of `/api/v1` — a task's record, its lifecycle mutations, and the artifacts
@@ -4325,6 +4326,17 @@ export type ApiRun = z.infer<typeof apiRunSchema>;
4325
4326
  * `toRunSummary` below is the only projection from a record to this shape. The route, the index
4326
4327
  * and the cockpit's stream patches all go through it, so a list and its stream cannot disagree.
4327
4328
  */
4329
+ /** Concise 1-line urgent or outcome preview carried on list summaries (hearsay-tools/squawk#4377). */
4330
+ export declare const runStatePreviewSchema: z.ZodObject<{
4331
+ kind: z.ZodEnum<{
4332
+ ask: "ask";
4333
+ error: "error";
4334
+ permission: "permission";
4335
+ review: "review";
4336
+ }>;
4337
+ text: z.ZodString;
4338
+ }, z.core.$strip>;
4339
+ export type RunStatePreview = z.infer<typeof runStatePreviewSchema>;
4328
4340
  export declare const runSummarySchema: z.ZodObject<{
4329
4341
  id: z.ZodString;
4330
4342
  title: z.ZodString;
@@ -4479,6 +4491,15 @@ export declare const runSummarySchema: z.ZodObject<{
4479
4491
  currentStepId: z.ZodOptional<z.ZodString>;
4480
4492
  currentStepBackend: z.ZodOptional<z.ZodString>;
4481
4493
  error: z.ZodOptional<z.ZodString>;
4494
+ statePreview: z.ZodOptional<z.ZodObject<{
4495
+ kind: z.ZodEnum<{
4496
+ ask: "ask";
4497
+ error: "error";
4498
+ permission: "permission";
4499
+ review: "review";
4500
+ }>;
4501
+ text: z.ZodString;
4502
+ }, z.core.$strip>>;
4482
4503
  worktreePath: z.ZodOptional<z.ZodString>;
4483
4504
  }, z.core.$strip>;
4484
4505
  export type RunSummary = z.infer<typeof runSummarySchema>;
@@ -4641,10 +4662,21 @@ export declare const runIndexEntrySchema: z.ZodObject<{
4641
4662
  currentStepId: z.ZodOptional<z.ZodString>;
4642
4663
  currentStepBackend: z.ZodOptional<z.ZodString>;
4643
4664
  error: z.ZodOptional<z.ZodString>;
4665
+ statePreview: z.ZodOptional<z.ZodObject<{
4666
+ kind: z.ZodEnum<{
4667
+ ask: "ask";
4668
+ error: "error";
4669
+ permission: "permission";
4670
+ review: "review";
4671
+ }>;
4672
+ text: z.ZodString;
4673
+ }, z.core.$strip>>;
4644
4674
  worktreePath: z.ZodOptional<z.ZodString>;
4645
4675
  projectId: z.ZodString;
4646
4676
  }, z.core.$strip>;
4647
4677
  export type RunIndexEntry = z.infer<typeof runIndexEntrySchema>;
4678
+ /** Derive a concise 1-line preview for urgent (`Needs you`) or failed runs without reading transcripts. */
4679
+ export declare function deriveRunStatePreview(run: Pick<RunRecord, 'status' | 'archived' | 'hasPendingPermission' | 'waits' | 'doneAccepted' | 'error' | 'autoResumeAt'>, waitingOn: WaitingOn | undefined): RunStatePreview | undefined;
4648
4680
  /**
4649
4681
  * The one projection from a run record to its list row (#817). Optional keys are copied only when
4650
4682
  * present, so the wire never carries an `undefined` the schema calls absent; `delegation` goes
@@ -4882,6 +4914,15 @@ export declare const archivedRunsResponseSchema: z.ZodObject<{
4882
4914
  currentStepId: z.ZodOptional<z.ZodString>;
4883
4915
  currentStepBackend: z.ZodOptional<z.ZodString>;
4884
4916
  error: z.ZodOptional<z.ZodString>;
4917
+ statePreview: z.ZodOptional<z.ZodObject<{
4918
+ kind: z.ZodEnum<{
4919
+ ask: "ask";
4920
+ error: "error";
4921
+ permission: "permission";
4922
+ review: "review";
4923
+ }>;
4924
+ text: z.ZodString;
4925
+ }, z.core.$strip>>;
4885
4926
  worktreePath: z.ZodOptional<z.ZodString>;
4886
4927
  }, z.core.$strip>>;
4887
4928
  nextCursor: z.ZodNullable<z.ZodString>;
@@ -5051,6 +5092,15 @@ export declare const runsSearchResponseSchema: z.ZodObject<{
5051
5092
  currentStepId: z.ZodOptional<z.ZodString>;
5052
5093
  currentStepBackend: z.ZodOptional<z.ZodString>;
5053
5094
  error: z.ZodOptional<z.ZodString>;
5095
+ statePreview: z.ZodOptional<z.ZodObject<{
5096
+ kind: z.ZodEnum<{
5097
+ ask: "ask";
5098
+ error: "error";
5099
+ permission: "permission";
5100
+ review: "review";
5101
+ }>;
5102
+ text: z.ZodString;
5103
+ }, z.core.$strip>>;
5054
5104
  worktreePath: z.ZodOptional<z.ZodString>;
5055
5105
  projectId: z.ZodString;
5056
5106
  }, z.core.$strip>>;
@@ -177,6 +177,15 @@ export declare const workspaceRunSummaryEventSchema: z.ZodObject<{
177
177
  currentStepId: z.ZodOptional<z.ZodString>;
178
178
  currentStepBackend: z.ZodOptional<z.ZodString>;
179
179
  error: z.ZodOptional<z.ZodString>;
180
+ statePreview: z.ZodOptional<z.ZodObject<{
181
+ kind: z.ZodEnum<{
182
+ ask: "ask";
183
+ error: "error";
184
+ permission: "permission";
185
+ review: "review";
186
+ }>;
187
+ text: z.ZodString;
188
+ }, z.core.$strip>>;
180
189
  worktreePath: z.ZodOptional<z.ZodString>;
181
190
  }, z.core.$strip>;
182
191
  relationships: z.ZodString;
@@ -367,6 +376,15 @@ export declare const runsIndexResponseSchema: z.ZodObject<{
367
376
  currentStepId: z.ZodOptional<z.ZodString>;
368
377
  currentStepBackend: z.ZodOptional<z.ZodString>;
369
378
  error: z.ZodOptional<z.ZodString>;
379
+ statePreview: z.ZodOptional<z.ZodObject<{
380
+ kind: z.ZodEnum<{
381
+ ask: "ask";
382
+ error: "error";
383
+ permission: "permission";
384
+ review: "review";
385
+ }>;
386
+ text: z.ZodString;
387
+ }, z.core.$strip>>;
370
388
  worktreePath: z.ZodOptional<z.ZodString>;
371
389
  projectId: z.ZodString;
372
390
  }, z.core.$strip>>;
@@ -2,18 +2,6 @@ import type { DelegationRoutes } from './routes.ts';
2
2
  export declare function createDelegationApp(routes: DelegationRoutes): import("hono/hono-base").HonoBase<import("hono/types").BlankEnv, import("hono/types").BlankSchema | import("hono/types").MergeSchemaPath<{
3
3
  "/list": {
4
4
  $get: {
5
- output: {
6
- error: string;
7
- code?: "invalid_input" | undefined;
8
- };
9
- outputFormat: "json";
10
- status: 400;
11
- input: {
12
- query: {
13
- offset?: string | undefined;
14
- };
15
- };
16
- } | {
17
5
  output: {
18
6
  workers: {
19
7
  workerId: string;
@@ -66,6 +54,18 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
66
54
  offset?: string | undefined;
67
55
  };
68
56
  };
57
+ } | {
58
+ output: {
59
+ error: string;
60
+ code?: "invalid_input" | undefined;
61
+ };
62
+ outputFormat: "json";
63
+ status: 400;
64
+ input: {
65
+ query: {
66
+ offset?: string | undefined;
67
+ };
68
+ };
69
69
  };
70
70
  };
71
71
  } & {
@@ -652,18 +652,6 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
652
652
  } & {
653
653
  "/:workerId": {
654
654
  $get: {
655
- output: {
656
- error: string;
657
- code?: "invalid_input" | undefined;
658
- };
659
- outputFormat: "json";
660
- status: 400;
661
- input: {
662
- param: {
663
- workerId: string;
664
- };
665
- };
666
- } | {
667
655
  output: {
668
656
  workerId: string;
669
657
  settled: boolean;
@@ -788,11 +776,7 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
788
776
  workerId: string;
789
777
  };
790
778
  };
791
- };
792
- };
793
- } & {
794
- "/:workerId/collect": {
795
- $post: {
779
+ } | {
796
780
  output: {
797
781
  error: string;
798
782
  code?: "invalid_input" | undefined;
@@ -803,10 +787,12 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
803
787
  param: {
804
788
  workerId: string;
805
789
  };
806
- } & {
807
- json: Record<string, never>;
808
790
  };
809
- } | {
791
+ };
792
+ };
793
+ } & {
794
+ "/:workerId/collect": {
795
+ $post: {
810
796
  output: {
811
797
  workerId: string;
812
798
  parentRunId: string;
@@ -929,11 +915,7 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
929
915
  } & {
930
916
  json: Record<string, never>;
931
917
  };
932
- };
933
- };
934
- } & {
935
- "/:workerId/steer": {
936
- $post: {
918
+ } | {
937
919
  output: {
938
920
  error: string;
939
921
  code?: "invalid_input" | undefined;
@@ -945,11 +927,13 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
945
927
  workerId: string;
946
928
  };
947
929
  } & {
948
- json: {
949
- text: string;
950
- };
930
+ json: Record<string, never>;
951
931
  };
952
- } | {
932
+ };
933
+ };
934
+ } & {
935
+ "/:workerId/steer": {
936
+ $post: {
953
937
  output: {
954
938
  workerId: string;
955
939
  state: "delivered" | "queued";
@@ -965,11 +949,7 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
965
949
  text: string;
966
950
  };
967
951
  };
968
- };
969
- };
970
- } & {
971
- "/:workerId/stop": {
972
- $post: {
952
+ } | {
973
953
  output: {
974
954
  error: string;
975
955
  code?: "invalid_input" | undefined;
@@ -981,9 +961,15 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
981
961
  workerId: string;
982
962
  };
983
963
  } & {
984
- json: Record<string, never>;
964
+ json: {
965
+ text: string;
966
+ };
985
967
  };
986
- } | {
968
+ };
969
+ };
970
+ } & {
971
+ "/:workerId/stop": {
972
+ $post: {
987
973
  output: {
988
974
  workerId: string;
989
975
  state: "stopping" | "terminated";
@@ -997,11 +983,7 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
997
983
  } & {
998
984
  json: Record<string, never>;
999
985
  };
1000
- };
1001
- };
1002
- } & {
1003
- "/:workerId/destroy": {
1004
- $post: {
986
+ } | {
1005
987
  output: {
1006
988
  error: string;
1007
989
  code?: "invalid_input" | undefined;
@@ -1013,11 +995,13 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
1013
995
  workerId: string;
1014
996
  };
1015
997
  } & {
1016
- json: {
1017
- discardWork?: true | undefined;
1018
- };
998
+ json: Record<string, never>;
1019
999
  };
1020
- } | {
1000
+ };
1001
+ };
1002
+ } & {
1003
+ "/:workerId/destroy": {
1004
+ $post: {
1021
1005
  output: {
1022
1006
  workerId: string;
1023
1007
  state: "complete" | "incomplete";
@@ -1046,6 +1030,22 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
1046
1030
  discardWork?: true | undefined;
1047
1031
  };
1048
1032
  };
1033
+ } | {
1034
+ output: {
1035
+ error: string;
1036
+ code?: "invalid_input" | undefined;
1037
+ };
1038
+ outputFormat: "json";
1039
+ status: 400;
1040
+ input: {
1041
+ param: {
1042
+ workerId: string;
1043
+ };
1044
+ } & {
1045
+ json: {
1046
+ discardWork?: true | undefined;
1047
+ };
1048
+ };
1049
1049
  } | {
1050
1050
  output: {
1051
1051
  workerId: string;
@@ -1081,11 +1081,13 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
1081
1081
  "/:workerId/diff": {
1082
1082
  $get: {
1083
1083
  output: {
1084
- error: string;
1085
- code?: "invalid_input" | undefined;
1084
+ workerId: string;
1085
+ baselineSha: string;
1086
+ diff: string;
1087
+ truncated: boolean;
1086
1088
  };
1087
1089
  outputFormat: "json";
1088
- status: 400;
1090
+ status: 200;
1089
1091
  input: {
1090
1092
  param: {
1091
1093
  workerId: string;
@@ -1093,13 +1095,11 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
1093
1095
  };
1094
1096
  } | {
1095
1097
  output: {
1096
- workerId: string;
1097
- baselineSha: string;
1098
- diff: string;
1099
- truncated: boolean;
1098
+ error: string;
1099
+ code?: "invalid_input" | undefined;
1100
1100
  };
1101
1101
  outputFormat: "json";
1102
- status: 200;
1102
+ status: 400;
1103
1103
  input: {
1104
1104
  param: {
1105
1105
  workerId: string;
@@ -22,6 +22,18 @@ export declare function createModelsRoutes(options: {
22
22
  profileId?: string | undefined;
23
23
  };
24
24
  };
25
+ } | {
26
+ output: {
27
+ error: string;
28
+ };
29
+ outputFormat: "json";
30
+ status: 400;
31
+ input: {
32
+ query: {
33
+ runner: string | string[];
34
+ profileId?: string | undefined;
35
+ };
36
+ };
25
37
  } | {
26
38
  output: {
27
39
  runner: string;
@@ -43,18 +55,6 @@ export declare function createModelsRoutes(options: {
43
55
  profileId?: string | undefined;
44
56
  };
45
57
  };
46
- } | {
47
- output: {
48
- error: string;
49
- };
50
- outputFormat: "json";
51
- status: 400;
52
- input: {
53
- query: {
54
- runner: string | string[];
55
- profileId?: string | undefined;
56
- };
57
- };
58
58
  };
59
59
  };
60
60
  }, "/", "/models">;
@@ -63,17 +63,6 @@ export declare function createProjectsRoutes(deps: ProjectsRouteDeps): import("h
63
63
  } & {
64
64
  "/projects": {
65
65
  $post: {
66
- output: {
67
- error: string;
68
- };
69
- outputFormat: "json";
70
- status: 400 | 500;
71
- input: {
72
- json: {
73
- root: string;
74
- };
75
- };
76
- } | {
77
66
  output: {
78
67
  project: {
79
68
  id: string;
@@ -104,10 +93,10 @@ export declare function createProjectsRoutes(deps: ProjectsRouteDeps): import("h
104
93
  agent: boolean;
105
94
  }[] | undefined;
106
95
  };
107
- error: string;
96
+ error?: string | undefined;
108
97
  };
109
98
  outputFormat: "json";
110
- status: 409;
99
+ status: 200;
111
100
  input: {
112
101
  json: {
113
102
  root: string;
@@ -144,10 +133,21 @@ export declare function createProjectsRoutes(deps: ProjectsRouteDeps): import("h
144
133
  agent: boolean;
145
134
  }[] | undefined;
146
135
  };
147
- error?: string | undefined;
136
+ error: string;
148
137
  };
149
138
  outputFormat: "json";
150
- status: 200;
139
+ status: 409;
140
+ input: {
141
+ json: {
142
+ root: string;
143
+ };
144
+ };
145
+ } | {
146
+ output: {
147
+ error: string;
148
+ };
149
+ outputFormat: "json";
150
+ status: 400 | 500;
151
151
  input: {
152
152
  json: {
153
153
  root: string;
@@ -306,7 +306,7 @@ export declare function createProjectsRoutes(deps: ProjectsRouteDeps): import("h
306
306
  error: string;
307
307
  };
308
308
  outputFormat: "json";
309
- status: 404;
309
+ status: 400;
310
310
  input: {
311
311
  param: {
312
312
  projectId: string;
@@ -317,7 +317,7 @@ export declare function createProjectsRoutes(deps: ProjectsRouteDeps): import("h
317
317
  error: string;
318
318
  };
319
319
  outputFormat: "json";
320
- status: 400;
320
+ status: 404;
321
321
  input: {
322
322
  param: {
323
323
  projectId: string;
@@ -342,27 +342,6 @@ export declare function createProjectsRoutes(deps: ProjectsRouteDeps): import("h
342
342
  } & {
343
343
  "/projects/:projectId/webhooks": {
344
344
  $post: {
345
- output: {
346
- error: string;
347
- };
348
- outputFormat: "json";
349
- status: 400 | 404 | 409 | 500;
350
- input: {
351
- json: {
352
- name: string;
353
- description?: string | undefined;
354
- url: string;
355
- token?: string | undefined;
356
- tasks?: boolean | undefined;
357
- triggers?: ("cancelled" | "done" | "failed" | "needs-you" | "running" | "waiting-ci" | "waiting-other" | "waiting-timer" | "waiting-workers")[] | undefined;
358
- agent?: boolean | undefined;
359
- };
360
- } & {
361
- param: {
362
- projectId: string;
363
- };
364
- };
365
- } | {
366
345
  output: {
367
346
  project: {
368
347
  id: string;
@@ -421,6 +400,27 @@ export declare function createProjectsRoutes(deps: ProjectsRouteDeps): import("h
421
400
  projectId: string;
422
401
  };
423
402
  };
403
+ } | {
404
+ output: {
405
+ error: string;
406
+ };
407
+ outputFormat: "json";
408
+ status: 400 | 404 | 409 | 500;
409
+ input: {
410
+ json: {
411
+ name: string;
412
+ description?: string | undefined;
413
+ url: string;
414
+ token?: string | undefined;
415
+ tasks?: boolean | undefined;
416
+ triggers?: ("cancelled" | "done" | "failed" | "needs-you" | "running" | "waiting-ci" | "waiting-other" | "waiting-timer" | "waiting-workers")[] | undefined;
417
+ agent?: boolean | undefined;
418
+ };
419
+ } & {
420
+ param: {
421
+ projectId: string;
422
+ };
423
+ };
424
424
  };
425
425
  };
426
426
  } & {
@@ -618,13 +618,10 @@ export declare function createProjectsRoutes(deps: ProjectsRouteDeps): import("h
618
618
  };
619
619
  } | {
620
620
  output: {
621
- ok: boolean;
622
- status?: number | undefined;
623
- error?: string | undefined;
624
- dryRun?: boolean | undefined;
621
+ error: string;
625
622
  };
626
623
  outputFormat: "json";
627
- status: import("hono/utils/http-status").ContentfulStatusCode;
624
+ status: 404;
628
625
  input: {
629
626
  param: {
630
627
  projectId: string;
@@ -633,10 +630,13 @@ export declare function createProjectsRoutes(deps: ProjectsRouteDeps): import("h
633
630
  };
634
631
  } | {
635
632
  output: {
636
- error: string;
633
+ ok: boolean;
634
+ status?: number | undefined;
635
+ error?: string | undefined;
636
+ dryRun?: boolean | undefined;
637
637
  };
638
638
  outputFormat: "json";
639
- status: 404;
639
+ status: import("hono/utils/http-status").ContentfulStatusCode;
640
640
  input: {
641
641
  param: {
642
642
  projectId: string;