@hearsay-tools/squawk 0.19.0-pr4423.8659.2 → 0.19.0-pr4424.8672

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 (111) 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/routes.d.ts +65 -65
  5. package/dist/server/automations-routes.d.ts +150 -150
  6. package/dist/server/project-settings-routes.d.ts +107 -107
  7. package/dist/server/runners-routes.d.ts +10 -10
  8. package/dist/server/runs-routes.d.ts +24 -16
  9. package/dist/server/server.d.ts +32 -8
  10. package/dist/server/workspace-routes.d.ts +8 -0
  11. package/package.json +4 -4
  12. package/web/dist/assets/accounts-section-CzFhdKWy.js +1 -0
  13. package/web/dist/assets/activity-motion-D0Fch0mc.js +2 -0
  14. package/web/dist/assets/activity-route-Cvw0jXpy.js +1 -0
  15. package/web/dist/assets/agent-config-section-BCzxsvys.js +7 -0
  16. package/web/dist/assets/agent-defaults-section-DMRK-Qlp.js +1 -0
  17. package/web/dist/assets/{appearance-D-eyPi4y.js → appearance-Ew3vb_-K.js} +1 -1
  18. package/web/dist/assets/{archive-on-merge-field-C7_Fwy2A.js → archive-on-merge-field-g87CG6RL.js} +1 -1
  19. package/web/dist/assets/attention-80jX8HhC.js +1 -0
  20. package/web/dist/assets/automations-route-CRBtWEo1.js +2 -0
  21. package/web/dist/assets/{change-counts-npLATh-3.js → change-counts-CW7O8g5Y.js} +1 -1
  22. package/web/dist/assets/commit-list-Cd14tNSj.js +1 -0
  23. package/web/dist/assets/diff-D55N_7Ul.js +3 -0
  24. package/web/dist/assets/{diff-controls-Djy25_O_.js → diff-controls-CmYvdEGt.js} +1 -1
  25. package/web/dist/assets/diff-stat-U7DT4Ilj.js +1 -0
  26. package/web/dist/assets/{diff-view-CDHDVoee.js → diff-view-DV6muJdZ.js} +1 -1
  27. package/web/dist/assets/{file-preview-CCJPAIOx.js → file-preview-CTPfK-oR.js} +1 -1
  28. package/web/dist/assets/folder-browser-DnSFycbU.js +1 -0
  29. package/web/dist/assets/git-toolbar-Dc_o1nrh.js +1 -0
  30. package/web/dist/assets/github-WYk7bQID.js +1 -0
  31. package/web/dist/assets/global-activity-route-Dvx2uk8w.js +1 -0
  32. package/web/dist/assets/image-preview-2S3PEy8S.js +1 -0
  33. package/web/dist/assets/index-CGdnowj-.js +21 -0
  34. package/web/dist/assets/index-DAxuDJAo.css +1 -0
  35. package/web/dist/assets/{label-Bt8n7Spq.js → label-o_DsEmPt.js} +1 -1
  36. package/web/dist/assets/{live-reads-Crd6fVGH.js → live-reads-Cgk2XbiP.js} +1 -1
  37. package/web/dist/assets/{markdown-C1jbHzFz.js → markdown-CJzxFk0P.js} +1 -1
  38. package/web/dist/assets/nav-row-styles-DKeXbc4N.js +1 -0
  39. package/web/dist/assets/{notifications-section-UoGn2x5m.js → notifications-section-DNYO4sd4.js} +1 -1
  40. package/web/dist/assets/{open-in-menu-BPp88ouw.js → open-in-menu-Bzae69TK.js} +1 -1
  41. package/web/dist/assets/preview-pane-connected-CRooCkyb.js +3 -0
  42. package/web/dist/assets/{project-location-BRxXN249.js → project-location-D6riKh0Z.js} +1 -1
  43. package/web/dist/assets/{project-router-CLJTc7gv.js → project-router-CZ89wg-5.js} +1 -1
  44. package/web/dist/assets/{project-scope-context-Rv6S_BXt.js → project-scope-context-DIcqj4jJ.js} +2 -2
  45. package/web/dist/assets/projects-section-4rsb8E52.js +1 -0
  46. package/web/dist/assets/{prompt-templates-section-byuQ5r27.js → prompt-templates-section-G3dlAOXt.js} +1 -1
  47. package/web/dist/assets/{queries-qCF-eOqZ.js → queries-DZhNVAD_.js} +1 -1
  48. package/web/dist/assets/reference-chip-DSJSqjmO.js +1 -0
  49. package/web/dist/assets/{remote-settings-notice-DhAon4OW.js → remote-settings-notice-GNs7i0kP.js} +1 -1
  50. package/web/dist/assets/repo-git-CvZTTKFl.js +1 -0
  51. package/web/dist/assets/{report-reader-s1bYKFxb.js → report-reader-CLlNdsZG.js} +1 -1
  52. package/web/dist/assets/{reports-8s-OcBds.js → reports-sl2SMDG1.js} +1 -1
  53. package/web/dist/assets/{resources-section-D0Jh9A48.js → resources-section-DhEoaA0K.js} +1 -1
  54. package/web/dist/assets/{run-header-DfEfupCk.css → run-header-Ccnr9k0X.css} +1 -1
  55. package/web/dist/assets/run-header-DZoOLIBZ.js +2 -0
  56. package/web/dist/assets/{select-DGlSEHav.js → select-D3snxxoD.js} +1 -1
  57. package/web/dist/assets/{session-context-section-Dm2GppJf.js → session-context-section-esqZfONg.js} +2 -2
  58. package/web/dist/assets/settings-agent-picker-Dso2TmRM.js +1 -0
  59. package/web/dist/assets/settings-shell-CqiAPuLq.css +1 -0
  60. package/web/dist/assets/settings-shell-UO_0dSGl.js +1 -0
  61. package/web/dist/assets/{sidebar-section-CyF46d9t.js → sidebar-section-pp7e3AZa.js} +1 -1
  62. package/web/dist/assets/{skills-BtFolia6.js → skills-B99glme7.js} +1 -1
  63. package/web/dist/assets/{tab-link-BMcPED_U.js → tab-link-BGXFZZ_Z.js} +1 -1
  64. package/web/dist/assets/task-changes-Tn9M2OPH.js +1 -0
  65. package/web/dist/assets/task-commits-BHDMp1sO.js +1 -0
  66. package/web/dist/assets/{task-files-COJx_tfF.js → task-files-Csx1Bonx.js} +1 -1
  67. package/web/dist/assets/{task-github-item-BH55d2jr.js → task-github-item-D0kQ0K4S.js} +1 -1
  68. package/web/dist/assets/{task-groups-4tzKGROI.js → task-groups-DK0I9p71.js} +1 -1
  69. package/web/dist/assets/task-thread-DsMuGSug.js +9 -0
  70. package/web/dist/assets/{tasks-table-C5uoZMFs.js → tasks-table-BNFYIwtc.js} +1 -1
  71. package/web/dist/assets/{thread-state-CgbFXudX.js → thread-state-DMWi6eLk.js} +1 -1
  72. package/web/dist/assets/{toaster-BXnLIU3z.js → toaster-0sM0sfWx.js} +1 -1
  73. package/web/dist/assets/{use-hand-to-agent-state-BHaqyTxa.css → use-hand-to-agent-state-Ch0ok71s.css} +1 -1
  74. package/web/dist/assets/use-hand-to-agent-state-DqCW8Giu.js +1 -0
  75. package/web/dist/assets/workflows-CxJvAn6z.js +7 -0
  76. package/web/dist/assets/{workflows-FH3RBKvk.css → workflows-DsE0ExV6.css} +1 -1
  77. package/web/dist/assets/workspace-tools-DqJ8akIy.js +1 -0
  78. package/web/dist/assets/{worktrees-section-Dx6MnnKw.js → worktrees-section-DBZZlAe0.js} +1 -1
  79. package/web/dist/assets/{zoomable-image-6RTKhLGE.js → zoomable-image-CIQl1Wpe.js} +1 -1
  80. package/web/dist/index.html +17 -16
  81. package/web/dist/assets/accounts-section-D3yVNJzn.js +0 -1
  82. package/web/dist/assets/activity-motion-BMNce0aE.js +0 -2
  83. package/web/dist/assets/activity-route-Cq_CQ2qY.js +0 -1
  84. package/web/dist/assets/agent-config-section-DzJZJaRC.js +0 -7
  85. package/web/dist/assets/agent-defaults-section-D1v4-Uf8.js +0 -1
  86. package/web/dist/assets/attention-CBCeJN5w.js +0 -1
  87. package/web/dist/assets/automations-route-D-GKrEN-.js +0 -2
  88. package/web/dist/assets/commit-list-BOxshe8n.js +0 -1
  89. package/web/dist/assets/diff-CIjV1zsh.js +0 -3
  90. package/web/dist/assets/folder-browser-BztRo6t1.js +0 -1
  91. package/web/dist/assets/git-toolbar-P-Bizd61.js +0 -1
  92. package/web/dist/assets/github-BwiiZM8H.js +0 -1
  93. package/web/dist/assets/global-activity-route-DLKRmRUc.js +0 -1
  94. package/web/dist/assets/image-preview-Ci50YcnQ.js +0 -1
  95. package/web/dist/assets/index-DZhYjGaA.css +0 -1
  96. package/web/dist/assets/index-ejd2q2ph.js +0 -21
  97. package/web/dist/assets/nav-row-styles-D5HpOmDZ.js +0 -1
  98. package/web/dist/assets/preview-pane-connected-CUJzat80.js +0 -3
  99. package/web/dist/assets/projects-section-DmV2We0g.js +0 -1
  100. package/web/dist/assets/reference-chip-BcgJG9tf.js +0 -1
  101. package/web/dist/assets/repo-git-ZAEQkrKL.js +0 -1
  102. package/web/dist/assets/run-header-DMvl2o6K.js +0 -2
  103. package/web/dist/assets/settings-agent-picker-D0IvVSAo.js +0 -1
  104. package/web/dist/assets/settings-shell-AMRJAsgc.css +0 -1
  105. package/web/dist/assets/settings-shell-CSzdDva2.js +0 -1
  106. package/web/dist/assets/task-changes-HzgatpyP.js +0 -1
  107. package/web/dist/assets/task-commits-BVoxwVRd.js +0 -1
  108. package/web/dist/assets/task-thread-BVLscF_t.js +0 -9
  109. package/web/dist/assets/use-hand-to-agent-state-oNjdiDkh.js +0 -1
  110. package/web/dist/assets/workflows-CkGKcluD.js +0 -7
  111. package/web/dist/assets/workspace-tools-BGxpQuQJ.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>>;
@@ -27,6 +27,18 @@ export declare function delegationFailure(error: unknown): {
27
27
  export declare function createDelegationRoutes(service: DelegationService, credentials: CredentialRegistry): import("hono/hono-base").HonoBase<Env, {
28
28
  "/list": {
29
29
  $get: {
30
+ output: {
31
+ error: string;
32
+ code?: "invalid_input" | undefined;
33
+ };
34
+ outputFormat: "json";
35
+ status: 400;
36
+ input: {
37
+ query: {
38
+ offset?: string | undefined;
39
+ };
40
+ };
41
+ } | {
30
42
  output: {
31
43
  workers: {
32
44
  workerId: string;
@@ -79,18 +91,6 @@ export declare function createDelegationRoutes(service: DelegationService, crede
79
91
  offset?: string | undefined;
80
92
  };
81
93
  };
82
- } | {
83
- output: {
84
- error: string;
85
- code?: "invalid_input" | undefined;
86
- };
87
- outputFormat: "json";
88
- status: 400;
89
- input: {
90
- query: {
91
- offset?: string | undefined;
92
- };
93
- };
94
94
  };
95
95
  };
96
96
  } & {
@@ -677,6 +677,18 @@ export declare function createDelegationRoutes(service: DelegationService, crede
677
677
  } & {
678
678
  "/:workerId": {
679
679
  $get: {
680
+ output: {
681
+ error: string;
682
+ code?: "invalid_input" | undefined;
683
+ };
684
+ outputFormat: "json";
685
+ status: 400;
686
+ input: {
687
+ param: {
688
+ workerId: string;
689
+ };
690
+ };
691
+ } | {
680
692
  output: {
681
693
  workerId: string;
682
694
  settled: boolean;
@@ -801,7 +813,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
801
813
  workerId: string;
802
814
  };
803
815
  };
804
- } | {
816
+ };
817
+ };
818
+ } & {
819
+ "/:workerId/collect": {
820
+ $post: {
805
821
  output: {
806
822
  error: string;
807
823
  code?: "invalid_input" | undefined;
@@ -812,12 +828,10 @@ export declare function createDelegationRoutes(service: DelegationService, crede
812
828
  param: {
813
829
  workerId: string;
814
830
  };
831
+ } & {
832
+ json: Record<string, never>;
815
833
  };
816
- };
817
- };
818
- } & {
819
- "/:workerId/collect": {
820
- $post: {
834
+ } | {
821
835
  output: {
822
836
  workerId: string;
823
837
  parentRunId: string;
@@ -940,7 +954,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
940
954
  } & {
941
955
  json: Record<string, never>;
942
956
  };
943
- } | {
957
+ };
958
+ };
959
+ } & {
960
+ "/:workerId/steer": {
961
+ $post: {
944
962
  output: {
945
963
  error: string;
946
964
  code?: "invalid_input" | undefined;
@@ -952,13 +970,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
952
970
  workerId: string;
953
971
  };
954
972
  } & {
955
- json: Record<string, never>;
973
+ json: {
974
+ text: string;
975
+ };
956
976
  };
957
- };
958
- };
959
- } & {
960
- "/:workerId/steer": {
961
- $post: {
977
+ } | {
962
978
  output: {
963
979
  workerId: string;
964
980
  state: "delivered" | "queued";
@@ -974,7 +990,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
974
990
  text: string;
975
991
  };
976
992
  };
977
- } | {
993
+ };
994
+ };
995
+ } & {
996
+ "/:workerId/stop": {
997
+ $post: {
978
998
  output: {
979
999
  error: string;
980
1000
  code?: "invalid_input" | undefined;
@@ -986,15 +1006,9 @@ export declare function createDelegationRoutes(service: DelegationService, crede
986
1006
  workerId: string;
987
1007
  };
988
1008
  } & {
989
- json: {
990
- text: string;
991
- };
1009
+ json: Record<string, never>;
992
1010
  };
993
- };
994
- };
995
- } & {
996
- "/:workerId/stop": {
997
- $post: {
1011
+ } | {
998
1012
  output: {
999
1013
  workerId: string;
1000
1014
  state: "stopping" | "terminated";
@@ -1008,7 +1022,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
1008
1022
  } & {
1009
1023
  json: Record<string, never>;
1010
1024
  };
1011
- } | {
1025
+ };
1026
+ };
1027
+ } & {
1028
+ "/:workerId/destroy": {
1029
+ $post: {
1012
1030
  output: {
1013
1031
  error: string;
1014
1032
  code?: "invalid_input" | undefined;
@@ -1020,13 +1038,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
1020
1038
  workerId: string;
1021
1039
  };
1022
1040
  } & {
1023
- json: Record<string, never>;
1041
+ json: {
1042
+ discardWork?: true | undefined;
1043
+ };
1024
1044
  };
1025
- };
1026
- };
1027
- } & {
1028
- "/:workerId/destroy": {
1029
- $post: {
1045
+ } | {
1030
1046
  output: {
1031
1047
  workerId: string;
1032
1048
  state: "complete" | "incomplete";
@@ -1055,22 +1071,6 @@ export declare function createDelegationRoutes(service: DelegationService, crede
1055
1071
  discardWork?: true | undefined;
1056
1072
  };
1057
1073
  };
1058
- } | {
1059
- output: {
1060
- error: string;
1061
- code?: "invalid_input" | undefined;
1062
- };
1063
- outputFormat: "json";
1064
- status: 400;
1065
- input: {
1066
- param: {
1067
- workerId: string;
1068
- };
1069
- } & {
1070
- json: {
1071
- discardWork?: true | undefined;
1072
- };
1073
- };
1074
1074
  } | {
1075
1075
  output: {
1076
1076
  workerId: string;
@@ -1106,13 +1106,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
1106
1106
  "/:workerId/diff": {
1107
1107
  $get: {
1108
1108
  output: {
1109
- workerId: string;
1110
- baselineSha: string;
1111
- diff: string;
1112
- truncated: boolean;
1109
+ error: string;
1110
+ code?: "invalid_input" | undefined;
1113
1111
  };
1114
1112
  outputFormat: "json";
1115
- status: 200;
1113
+ status: 400;
1116
1114
  input: {
1117
1115
  param: {
1118
1116
  workerId: string;
@@ -1120,11 +1118,13 @@ export declare function createDelegationRoutes(service: DelegationService, crede
1120
1118
  };
1121
1119
  } | {
1122
1120
  output: {
1123
- error: string;
1124
- code?: "invalid_input" | undefined;
1121
+ workerId: string;
1122
+ baselineSha: string;
1123
+ diff: string;
1124
+ truncated: boolean;
1125
1125
  };
1126
1126
  outputFormat: "json";
1127
- status: 400;
1127
+ status: 200;
1128
1128
  input: {
1129
1129
  param: {
1130
1130
  workerId: string;