@hearsay-tools/squawk 0.19.0-pr4479.8818 → 0.19.0-pr4481.8829

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 (97) hide show
  1. package/dist/contract/index.d.ts +1 -0
  2. package/dist/contract/index.js +33 -7
  3. package/dist/contract/pull-request-urls.d.ts +20 -0
  4. package/dist/contract/runs.d.ts +10 -1
  5. package/dist/delegation/routes.d.ts +69 -69
  6. package/dist/delegation/transport.d.ts +4 -4
  7. package/dist/features/automations/automations-routes.d.ts +150 -150
  8. package/dist/runs/pull-requests.d.ts +10 -0
  9. package/dist/runs/pull-requests.js +30 -19
  10. package/dist/runs/pull-requests.js.map +1 -1
  11. package/dist/runs/run-archive.d.ts +1 -0
  12. package/dist/runs/run-archive.js +14 -4
  13. package/dist/runs/run-archive.js.map +1 -1
  14. package/dist/runs/run-decode.d.ts +74 -72
  15. package/dist/runs/run-exits.d.ts +6 -0
  16. package/dist/runs/run-references.d.ts +1 -0
  17. package/dist/runs/run-references.js +5 -3
  18. package/dist/runs/run-references.js.map +1 -1
  19. package/dist/runs/task-markers.js +1 -1
  20. package/dist/runs/task-markers.js.map +1 -1
  21. package/dist/runs/task-refs.d.ts +3 -2
  22. package/dist/runs/task-refs.js +15 -12
  23. package/dist/runs/task-refs.js.map +1 -1
  24. package/dist/server/completion-actions.js +3 -3
  25. package/dist/server/completion-actions.js.map +1 -1
  26. package/dist/server/forge/github-mutations.js +4 -2
  27. package/dist/server/forge/github-mutations.js.map +1 -1
  28. package/dist/server/provider-sign-in-routes.d.ts +2 -2
  29. package/dist/server/runners-routes.d.ts +10 -10
  30. package/dist/server/runs-routes.d.ts +9 -0
  31. package/dist/server/server.d.ts +26 -8
  32. package/dist/workflows/continuation-admission.d.ts +1 -0
  33. package/dist/workflows/run/wait-engine.d.ts +73 -72
  34. package/package.json +4 -4
  35. package/web/dist/assets/{accounts-section-CnQrgrlx.js → accounts-section-BULNNzUp.js} +1 -1
  36. package/web/dist/assets/{activity-motion-SZyZ3Vcd.js → activity-motion-b63VkoL7.js} +1 -1
  37. package/web/dist/assets/{activity-route-kA927mMd.js → activity-route-1BPPXfg0.js} +1 -1
  38. package/web/dist/assets/{agent-config-section-DZ9lz-oU.js → agent-config-section-DUFiYn_s.js} +1 -1
  39. package/web/dist/assets/{agent-defaults-section-CAyM93lD.js → agent-defaults-section-YDBBZLgz.js} +1 -1
  40. package/web/dist/assets/{appearance-jU-y46Hc.js → appearance-DtCghYVR.js} +1 -1
  41. package/web/dist/assets/{archive-on-merge-field-C5WFm3HO.js → archive-on-merge-field-D3OBzagt.js} +1 -1
  42. package/web/dist/assets/attention-DBS2iaFI.js +1 -0
  43. package/web/dist/assets/{automations-route-DzIrboEQ.js → automations-route-DSClQHpk.js} +1 -1
  44. package/web/dist/assets/{commit-list-JK2MEtR0.js → commit-list-C9GATxxl.js} +1 -1
  45. package/web/dist/assets/{diff-CC-HnvfR.js → diff-ER_oHiMa.js} +2 -2
  46. package/web/dist/assets/{diff-controls-CnrIcRRG.js → diff-controls-B_MFH4Kt.js} +1 -1
  47. package/web/dist/assets/{diff-view-Dzl9i4zr.js → diff-view-DiSP3-lY.js} +1 -1
  48. package/web/dist/assets/{file-preview-C1Nd5SH3.js → file-preview-BFgWEp5Q.js} +1 -1
  49. package/web/dist/assets/{folder-browser-ZmOa9z3j.js → folder-browser-BKpkblOg.js} +1 -1
  50. package/web/dist/assets/{git-toolbar-q-HOZgdL.js → git-toolbar-k_mkGLJa.js} +1 -1
  51. package/web/dist/assets/{github-RqiwU49D.js → github-DJv6cebT.js} +1 -1
  52. package/web/dist/assets/{global-activity-route-DTuWu-5a.js → global-activity-route-D2AXM4ol.js} +1 -1
  53. package/web/dist/assets/{index-6yHpyOyH.js → index-6zQe_0aQ.js} +5 -5
  54. package/web/dist/assets/{label-D91E4F0a.js → label-r2EmPWPF.js} +1 -1
  55. package/web/dist/assets/{markdown-NDbXgnqb.js → markdown-BgWVYVYg.js} +1 -1
  56. package/web/dist/assets/{notifications-section-CQ4HSyLK.js → notifications-section--Gyk7UKV.js} +1 -1
  57. package/web/dist/assets/{open-in-menu-CqNkccJr.js → open-in-menu-DURN-8Iq.js} +1 -1
  58. package/web/dist/assets/{preview-pane-connected-Dm-Ga2KN.js → preview-pane-connected-GmJbIAW5.js} +1 -1
  59. package/web/dist/assets/{project-location-CspXXtNm.js → project-location-BVh3MyY6.js} +1 -1
  60. package/web/dist/assets/{project-router-BifLGgRR.js → project-router-1ohBdsN0.js} +1 -1
  61. package/web/dist/assets/{projects-section-CKPqFZP7.js → projects-section-PXgWMbCg.js} +1 -1
  62. package/web/dist/assets/{prompt-templates-section-D9Tsgav9.js → prompt-templates-section-B4FEmqam.js} +1 -1
  63. package/web/dist/assets/{queries-D0v1z40Y.js → queries-ScB0s5Ar.js} +1 -1
  64. package/web/dist/assets/{reference-chip-CV_vG2eP.js → reference-chip-B_gqhu5D.js} +1 -1
  65. package/web/dist/assets/{remote-settings-notice-40uqklAG.js → remote-settings-notice-BNk1mBzq.js} +1 -1
  66. package/web/dist/assets/{repo-git-BBalirax.js → repo-git-Bjzf3q3L.js} +1 -1
  67. package/web/dist/assets/{report-reader-D3Heszz3.js → report-reader-B7AyB7C8.js} +1 -1
  68. package/web/dist/assets/{report-selection-CDlncYKI.js → report-selection-TxRk0uQB.js} +1 -1
  69. package/web/dist/assets/{reports-CEaxAigM.js → reports-DcVAE_Kl.js} +1 -1
  70. package/web/dist/assets/{resources-section-ohdWkreq.js → resources-section-SB3QaB4H.js} +1 -1
  71. package/web/dist/assets/{review-panel-CthaDvZO.js → review-panel-DKpPLRUv.js} +1 -1
  72. package/web/dist/assets/{run-detail-refresh-DkwIHh-c.js → run-detail-refresh-Dd21Z89D.js} +1 -1
  73. package/web/dist/assets/{run-header-9NNASXmJ.js → run-header-COYiWZM3.js} +1 -1
  74. package/web/dist/assets/{select-Bh7vwx79.js → select-BwWUe2Px.js} +1 -1
  75. package/web/dist/assets/{session-context-section-B5Ee7GbQ.js → session-context-section-FDmJqOKx.js} +1 -1
  76. package/web/dist/assets/{settings-agent-picker-DeczgUDV.js → settings-agent-picker-DccnW7PI.js} +1 -1
  77. package/web/dist/assets/{settings-shell-BvRwl06q.js → settings-shell-DoU_fUX5.js} +1 -1
  78. package/web/dist/assets/{sidebar-section-Bn1Uv9AQ.js → sidebar-section-T-de9wg7.js} +1 -1
  79. package/web/dist/assets/{skills-DMyaR3WX.js → skills-B6X4yU1R.js} +1 -1
  80. package/web/dist/assets/{tab-link-DAxoMsUp.js → tab-link-vUBbOMng.js} +1 -1
  81. package/web/dist/assets/{task-changes-ChM901cL.js → task-changes-B4J_Injz.js} +1 -1
  82. package/web/dist/assets/{task-commits-DOP65FDx.js → task-commits-Bk0Iy2bj.js} +1 -1
  83. package/web/dist/assets/{task-file-scope-emNQrzps.js → task-file-scope-zeMRtXh3.js} +1 -1
  84. package/web/dist/assets/{task-files-BYPCvDCO.js → task-files-DkA_UBcJ.js} +1 -1
  85. package/web/dist/assets/{task-github-item-CHGyiC4k.js → task-github-item-B7yTtACn.js} +1 -1
  86. package/web/dist/assets/{task-groups-BdayPxX3.js → task-groups-BHP2J8M9.js} +1 -1
  87. package/web/dist/assets/{task-thread-BI2pi8dZ.js → task-thread-DKI0y1Bc.js} +1 -1
  88. package/web/dist/assets/{tasks-table-BY5niMlY.js → tasks-table-Ddm8zmrJ.js} +1 -1
  89. package/web/dist/assets/{thread-state-CdKvrn7R.js → thread-state-5yYxjBaw.js} +1 -1
  90. package/web/dist/assets/toaster-CRikzxTs.js +4 -0
  91. package/web/dist/assets/{use-hand-to-agent-state-stc7Vzni.js → use-hand-to-agent-state-Bp3UhJv3.js} +1 -1
  92. package/web/dist/assets/{workflows-DagjPw_m.js → workflows-CRwy8Uqr.js} +1 -1
  93. package/web/dist/assets/{workspace-tools-BaLORh9B.js → workspace-tools-DGA5qye_.js} +1 -1
  94. package/web/dist/assets/{worktrees-section-CSERluzw.js → worktrees-section-EgSAm8FD.js} +1 -1
  95. package/web/dist/index.html +13 -13
  96. package/web/dist/assets/attention-Dt-QhJ3p.js +0 -1
  97. package/web/dist/assets/toaster-DMfiAEnw.js +0 -4
@@ -37,6 +37,7 @@ export * from './scheduled-tasks.ts';
37
37
  export * from './preview.ts';
38
38
  export * from './conversations.ts';
39
39
  export * from './ci-wait.ts';
40
+ export * from './pull-request-urls.ts';
40
41
  export * from './waits.ts';
41
42
  export * from './wait-tools.ts';
42
43
  export * from './run-predicates.ts';
@@ -1448,6 +1448,24 @@ function runWorkflowLabel(run) {
1448
1448
  var ARCHIVED_RUNS_PAGE_DEFAULT = 50;
1449
1449
  var ARCHIVED_RUNS_PAGE_MAX = 200;
1450
1450
 
1451
+ // ../contract/src/pull-request-urls.ts
1452
+ var DEFAULT_PULL_REQUEST_HOST = "github.com";
1453
+ var PULL_REQUEST_URL = /^(https?):\/\/([a-z0-9](?:[a-z0-9.-]*[a-z0-9])?)(?::([0-9]+))?\/([a-z0-9_.-]+)\/([a-z0-9_.-]+)\/pulls?\/([1-9][0-9]*)\/?(?:[?#][^\s]*)?$/i;
1454
+ function pullRequestUrlParts(value) {
1455
+ const match = PULL_REQUEST_URL.exec(value);
1456
+ if (!match) return void 0;
1457
+ const [, scheme, hostname, port2, owner, repo, digits] = match;
1458
+ const host = hostname.toLowerCase();
1459
+ const number = Number(digits);
1460
+ if (host === DEFAULT_PULL_REQUEST_HOST ? port2 !== void 0 : scheme.toLowerCase() !== "https" || port2 !== void 0 && !serverPort(port2)) return void 0;
1461
+ if ([owner, repo].some((segment) => segment === "." || segment === "..") || !Number.isSafeInteger(number)) return void 0;
1462
+ return { host: port2 === void 0 ? host : `${host}:${port2}`, owner, repo, number };
1463
+ }
1464
+ function serverPort(port2) {
1465
+ const value = Number(port2);
1466
+ return /^[1-9][0-9]*$/.test(port2) && value <= 65535 && value !== 443;
1467
+ }
1468
+
1451
1469
  // ../contract/src/queued-messages.ts
1452
1470
  import { z as z19 } from "zod";
1453
1471
  var queuedMessageSchema = z19.object({
@@ -1513,11 +1531,11 @@ function utf8Bytes(value) {
1513
1531
  // ../contract/src/ci-wait.ts
1514
1532
  var CI_WAIT_LIMITATION = "Passing reported checks does not prove that every expected workflow has appeared or that the PR is merge-ready. This observation is not merge approval.";
1515
1533
  var CI_WAIT_RECEIPT_INSTRUCTION = "End your turn to wait for CI; no marker is needed. " + CI_WAIT_LIMITATION;
1516
- var prPattern = /^https:\/\/([a-zA-Z0-9](?:[a-zA-Z0-9.-]*[a-zA-Z0-9])?)\/([a-zA-Z0-9_-]+)\/([a-zA-Z0-9_.-]+)\/pull\/([1-9][0-9]*)$/;
1517
- var ciPrUrlSchema = z20.string().max(2048).regex(prPattern).refine((value) => {
1518
- const match = prPattern.exec(value);
1519
- return !!match && Number.isSafeInteger(Number(match[4])) && match[3] !== "." && match[3] !== "..";
1520
- }, "Expected an HTTPS GitHub PR URL with a positive integer PR number");
1534
+ var prPattern = /^https:\/\/[a-zA-Z0-9](?:[a-zA-Z0-9.-]*[a-zA-Z0-9])?(?::[0-9]+)?\/[a-zA-Z0-9_-]+\/[a-zA-Z0-9_.-]+\/pulls?\/[1-9][0-9]*$/;
1535
+ var ciPrUrlSchema = z20.string().max(2048).regex(prPattern).refine(
1536
+ (value) => pullRequestUrlParts(value) !== void 0,
1537
+ "Expected an HTTPS PR URL with a positive integer PR number"
1538
+ );
1521
1539
  var prWaitUntilSchema = z20.enum(["checks", "merge", "merge_or_blocked"]);
1522
1540
  var prWaitChecksSchema = z20.enum(["required", "all"]);
1523
1541
  var ciWaitRequestSchema = z20.object({
@@ -2079,6 +2097,7 @@ function nextLineIndex(text, index) {
2079
2097
 
2080
2098
  // ../contract/src/runs.ts
2081
2099
  var archivePullRequestIdentitySchema = z23.object({
2100
+ host: z23.string().min(1).optional(),
2082
2101
  owner: z23.string().min(1),
2083
2102
  repo: z23.string().min(1),
2084
2103
  number: z23.number().int().positive()
@@ -2168,11 +2187,16 @@ var runWorktreeSetupSchema = z23.object({
2168
2187
  /** One line: "`npm ci` exited 1", "`npm ci` timed out after 900s", "invalid config: …". */
2169
2188
  error: z23.string().optional()
2170
2189
  });
2190
+ var SAVED_GITHUB_PULL_REQUEST_URL = /^https?:\/\/github\.com\/[a-z0-9_.-]+\/[a-z0-9_.-]+\/pull\/(\d+)\/?(?:[?#][^\s]*)?$/i;
2191
+ function recordUrlNumber(url) {
2192
+ const saved = SAVED_GITHUB_PULL_REQUEST_URL.exec(url);
2193
+ return pullRequestUrlParts(url)?.number ?? (saved ? Number(saved[1]) : void 0);
2194
+ }
2171
2195
  var runPullRequestSchema = z23.object({
2172
2196
  number: z23.number().int().positive().lt(1e7),
2173
- url: z23.string().regex(/^https?:\/\/github\.com\/[a-z0-9_.-]+\/[a-z0-9_.-]+\/pull\/\d+\/?(?:[?#][^\s]*)?$/i).optional(),
2197
+ url: z23.string().refine((url) => recordUrlNumber(url) !== void 0, { message: "Expected a PR URL" }).optional(),
2174
2198
  source: z23.enum(["declared", "created"])
2175
- }).refine((entry) => entry.url === void 0 || Number(/\/pull\/(\d+)/i.exec(entry.url)?.[1]) === entry.number, { message: "PR URL and number must agree" });
2199
+ }).refine((entry) => entry.url === void 0 || recordUrlNumber(entry.url) === entry.number, { message: "PR URL and number must agree" });
2176
2200
  var workflowCursorSchema = z23.object({ stepId: z23.string(), mode: z23.enum(["resume", "start"]) });
2177
2201
  var doneAcceptedSchema = z23.object({
2178
2202
  session: z23.string(),
@@ -6427,6 +6451,7 @@ export {
6427
6451
  CONVERSATION_PAGE_MESSAGES,
6428
6452
  DEFAULT_AGENT_ACCOUNT_ID,
6429
6453
  DEFAULT_CONVERSATION_REQUEST_SECONDS,
6454
+ DEFAULT_PULL_REQUEST_HOST,
6430
6455
  DEFAULT_WEBHOOK_TRIGGERS,
6431
6456
  EFFORT_LEVELS,
6432
6457
  FILE_ATTACHMENT_MEDIA_TYPES,
@@ -6897,6 +6922,7 @@ export {
6897
6922
  providerStatusSchema,
6898
6923
  providersRequiredByWorkflow,
6899
6924
  publishedArtifactSchema,
6925
+ pullRequestUrlParts,
6900
6926
  queryRunnerSchema,
6901
6927
  queryValue,
6902
6928
  queuedMessagePatchSchema,
@@ -0,0 +1,20 @@
1
+ /**
2
+ * PR web URLs on any forge host (hearsay-tools/squawk#4472). Node-free: the run record, the PR
3
+ * wait request and the service's PR identity parser (`runs/pull-requests.ts`) share this grammar.
4
+ */
5
+ /** The host a PR URL or identity names when it names none. */
6
+ export declare const DEFAULT_PULL_REQUEST_HOST = "github.com";
7
+ /** The parts of a PR web URL (decision 7 of `.ai/specs/2026-11-28-forge-plugin-seam.md`). */
8
+ export interface PullRequestUrlParts {
9
+ host: string;
10
+ owner: string;
11
+ repo: string;
12
+ number: number;
13
+ }
14
+ /**
15
+ * `https://<host>/<owner>/<repo>/pull/N` or `.../pulls/N`, with an optional trailing slash,
16
+ * query or fragment. The host keeps a non-default port (`git.example.com:3000`); an explicit
17
+ * `:443` is refused. `github.com` takes no port and also `http`, as saved records hold it. A
18
+ * GitLab `/-/merge_requests/N` path is refused. Host is lowercase; owner and repo keep their case.
19
+ */
20
+ export declare function pullRequestUrlParts(value: string): PullRequestUrlParts | undefined;
@@ -19,14 +19,19 @@ export { runStatusSchema, type RunStatus, stepStatusSchema, type StepStatus, ste
19
19
  * keys. The client narrows on which key is present, and the DTO's flattened shape allowed
20
20
  * `{}` — a payload the route cannot produce.
21
21
  */
22
- /** Canonical GitHub authority retained with an automatic archive receipt. */
22
+ /**
23
+ * Canonical PR authority retained with an automatic archive receipt. A missing `host` means
24
+ * `github.com`, so identities saved before hosts existed read unchanged (hearsay-tools/squawk#4472).
25
+ */
23
26
  export declare const archivePullRequestIdentitySchema: z.ZodObject<{
27
+ host: z.ZodOptional<z.ZodString>;
24
28
  owner: z.ZodString;
25
29
  repo: z.ZodString;
26
30
  number: z.ZodNumber;
27
31
  }, z.core.$strip>;
28
32
  export type ArchivePullRequestIdentity = z.infer<typeof archivePullRequestIdentitySchema>;
29
33
  export declare const mergedPullRequestSchema: z.ZodObject<{
34
+ host: z.ZodOptional<z.ZodString>;
30
35
  owner: z.ZodString;
31
36
  repo: z.ZodString;
32
37
  number: z.ZodNumber;
@@ -38,6 +43,7 @@ export declare const autoArchiveReceiptSchema: z.ZodObject<{
38
43
  archivedAt: z.ZodString;
39
44
  fingerprint: z.ZodString;
40
45
  pullRequests: z.ZodArray<z.ZodObject<{
46
+ host: z.ZodOptional<z.ZodString>;
41
47
  owner: z.ZodString;
42
48
  repo: z.ZodString;
43
49
  number: z.ZodNumber;
@@ -2139,6 +2145,7 @@ export declare const runRecordSchema: z.ZodObject<{
2139
2145
  archivedAt: z.ZodString;
2140
2146
  fingerprint: z.ZodString;
2141
2147
  pullRequests: z.ZodArray<z.ZodObject<{
2148
+ host: z.ZodOptional<z.ZodString>;
2142
2149
  owner: z.ZodString;
2143
2150
  repo: z.ZodString;
2144
2151
  number: z.ZodNumber;
@@ -4204,6 +4211,7 @@ export declare const apiRunSchema: z.ZodObject<{
4204
4211
  archivedAt: z.ZodString;
4205
4212
  fingerprint: z.ZodString;
4206
4213
  pullRequests: z.ZodArray<z.ZodObject<{
4214
+ host: z.ZodOptional<z.ZodString>;
4207
4215
  owner: z.ZodString;
4208
4216
  repo: z.ZodString;
4209
4217
  number: z.ZodNumber;
@@ -7070,6 +7078,7 @@ export declare const createRunResponseSchema: z.ZodObject<{
7070
7078
  archivedAt: z.ZodString;
7071
7079
  fingerprint: z.ZodString;
7072
7080
  pullRequests: z.ZodArray<z.ZodObject<{
7081
+ host: z.ZodOptional<z.ZodString>;
7073
7082
  owner: z.ZodString;
7074
7083
  repo: z.ZodString;
7075
7084
  number: z.ZodNumber;
@@ -27,18 +27,6 @@ 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
- } | {
42
30
  output: {
43
31
  workers: {
44
32
  workerId: string;
@@ -91,6 +79,18 @@ export declare function createDelegationRoutes(service: DelegationService, crede
91
79
  offset?: string | undefined;
92
80
  };
93
81
  };
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
  } & {
@@ -247,13 +247,13 @@ export declare function createDelegationRoutes(service: DelegationService, crede
247
247
  status: 200;
248
248
  input: {
249
249
  json: {
250
- workerIds: string[];
251
- timeoutSeconds?: number | undefined;
252
- mode?: "all" | "any" | "one" | undefined;
253
- } | {
254
250
  requestIds: string[];
255
251
  mode?: "all" | "any" | "one" | undefined;
256
252
  timeoutSeconds?: number | undefined;
253
+ } | {
254
+ workerIds: string[];
255
+ timeoutSeconds?: number | undefined;
256
+ mode?: "all" | "any" | "one" | undefined;
257
257
  } | {
258
258
  peerIds: string[];
259
259
  timeoutSeconds?: number | undefined;
@@ -677,18 +677,6 @@ 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
- } | {
692
680
  output: {
693
681
  workerId: string;
694
682
  settled: boolean;
@@ -813,11 +801,7 @@ export declare function createDelegationRoutes(service: DelegationService, crede
813
801
  workerId: string;
814
802
  };
815
803
  };
816
- };
817
- };
818
- } & {
819
- "/:workerId/collect": {
820
- $post: {
804
+ } | {
821
805
  output: {
822
806
  error: string;
823
807
  code?: "invalid_input" | undefined;
@@ -828,10 +812,12 @@ export declare function createDelegationRoutes(service: DelegationService, crede
828
812
  param: {
829
813
  workerId: string;
830
814
  };
831
- } & {
832
- json: Record<string, never>;
833
815
  };
834
- } | {
816
+ };
817
+ };
818
+ } & {
819
+ "/:workerId/collect": {
820
+ $post: {
835
821
  output: {
836
822
  workerId: string;
837
823
  parentRunId: string;
@@ -954,11 +940,7 @@ export declare function createDelegationRoutes(service: DelegationService, crede
954
940
  } & {
955
941
  json: Record<string, never>;
956
942
  };
957
- };
958
- };
959
- } & {
960
- "/:workerId/steer": {
961
- $post: {
943
+ } | {
962
944
  output: {
963
945
  error: string;
964
946
  code?: "invalid_input" | undefined;
@@ -970,11 +952,13 @@ export declare function createDelegationRoutes(service: DelegationService, crede
970
952
  workerId: string;
971
953
  };
972
954
  } & {
973
- json: {
974
- text: string;
975
- };
955
+ json: Record<string, never>;
976
956
  };
977
- } | {
957
+ };
958
+ };
959
+ } & {
960
+ "/:workerId/steer": {
961
+ $post: {
978
962
  output: {
979
963
  workerId: string;
980
964
  state: "delivered" | "queued";
@@ -990,11 +974,7 @@ export declare function createDelegationRoutes(service: DelegationService, crede
990
974
  text: string;
991
975
  };
992
976
  };
993
- };
994
- };
995
- } & {
996
- "/:workerId/stop": {
997
- $post: {
977
+ } | {
998
978
  output: {
999
979
  error: string;
1000
980
  code?: "invalid_input" | undefined;
@@ -1006,9 +986,15 @@ export declare function createDelegationRoutes(service: DelegationService, crede
1006
986
  workerId: string;
1007
987
  };
1008
988
  } & {
1009
- json: Record<string, never>;
989
+ json: {
990
+ text: string;
991
+ };
1010
992
  };
1011
- } | {
993
+ };
994
+ };
995
+ } & {
996
+ "/:workerId/stop": {
997
+ $post: {
1012
998
  output: {
1013
999
  workerId: string;
1014
1000
  state: "stopping" | "terminated";
@@ -1022,11 +1008,7 @@ export declare function createDelegationRoutes(service: DelegationService, crede
1022
1008
  } & {
1023
1009
  json: Record<string, never>;
1024
1010
  };
1025
- };
1026
- };
1027
- } & {
1028
- "/:workerId/destroy": {
1029
- $post: {
1011
+ } | {
1030
1012
  output: {
1031
1013
  error: string;
1032
1014
  code?: "invalid_input" | undefined;
@@ -1038,11 +1020,13 @@ export declare function createDelegationRoutes(service: DelegationService, crede
1038
1020
  workerId: string;
1039
1021
  };
1040
1022
  } & {
1041
- json: {
1042
- discardWork?: true | undefined;
1043
- };
1023
+ json: Record<string, never>;
1044
1024
  };
1045
- } | {
1025
+ };
1026
+ };
1027
+ } & {
1028
+ "/:workerId/destroy": {
1029
+ $post: {
1046
1030
  output: {
1047
1031
  workerId: string;
1048
1032
  state: "complete" | "incomplete";
@@ -1071,6 +1055,22 @@ export declare function createDelegationRoutes(service: DelegationService, crede
1071
1055
  discardWork?: true | undefined;
1072
1056
  };
1073
1057
  };
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,11 +1106,13 @@ export declare function createDelegationRoutes(service: DelegationService, crede
1106
1106
  "/:workerId/diff": {
1107
1107
  $get: {
1108
1108
  output: {
1109
- error: string;
1110
- code?: "invalid_input" | undefined;
1109
+ workerId: string;
1110
+ baselineSha: string;
1111
+ diff: string;
1112
+ truncated: boolean;
1111
1113
  };
1112
1114
  outputFormat: "json";
1113
- status: 400;
1115
+ status: 200;
1114
1116
  input: {
1115
1117
  param: {
1116
1118
  workerId: string;
@@ -1118,13 +1120,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
1118
1120
  };
1119
1121
  } | {
1120
1122
  output: {
1121
- workerId: string;
1122
- baselineSha: string;
1123
- diff: string;
1124
- truncated: boolean;
1123
+ error: string;
1124
+ code?: "invalid_input" | undefined;
1125
1125
  };
1126
1126
  outputFormat: "json";
1127
- status: 200;
1127
+ status: 400;
1128
1128
  input: {
1129
1129
  param: {
1130
1130
  workerId: string;
@@ -222,13 +222,13 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
222
222
  status: 200;
223
223
  input: {
224
224
  json: {
225
- requestIds: string[];
226
- mode?: "all" | "any" | "one" | undefined;
227
- timeoutSeconds?: number | undefined;
228
- } | {
229
225
  workerIds: string[];
230
226
  timeoutSeconds?: number | undefined;
231
227
  mode?: "all" | "any" | "one" | undefined;
228
+ } | {
229
+ requestIds: string[];
230
+ mode?: "all" | "any" | "one" | undefined;
231
+ timeoutSeconds?: number | undefined;
232
232
  } | {
233
233
  peerIds: string[];
234
234
  timeoutSeconds?: number | undefined;