@hearsay-tools/squawk 0.18.0-pr4168.8040 → 0.18.0-pr4170.8048

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 (137) hide show
  1. package/dist/automations/service.d.ts +21 -0
  2. package/dist/built-in-tool-definitions.d.ts +4 -0
  3. package/dist/built-in-tool-definitions.js +61 -0
  4. package/dist/built-in-tool-definitions.js.map +1 -0
  5. package/dist/built-in-tools.d.ts +3 -0
  6. package/dist/built-in-tools.js +9 -0
  7. package/dist/built-in-tools.js.map +1 -0
  8. package/dist/ci-wait/client.d.ts +75 -0
  9. package/dist/ci-wait/client.js +44 -13
  10. package/dist/ci-wait/client.js.map +1 -1
  11. package/dist/ci-wait/controller.d.ts +57 -1139
  12. package/dist/ci-wait/controller.js +56 -175
  13. package/dist/ci-wait/controller.js.map +1 -1
  14. package/dist/ci-wait/mcp.d.ts +1 -1
  15. package/dist/ci-wait/mcp.js +7 -5
  16. package/dist/ci-wait/mcp.js.map +1 -1
  17. package/dist/ci-wait/tool-catalog.d.ts +6 -528
  18. package/dist/ci-wait/tool-catalog.js +3 -7
  19. package/dist/ci-wait/tool-catalog.js.map +1 -1
  20. package/dist/ci-wait/tool-names.d.ts +1 -8
  21. package/dist/ci-wait/tool-names.js +8 -16
  22. package/dist/ci-wait/tool-names.js.map +1 -1
  23. package/dist/ci-wait/tool-registry.d.ts +64 -0
  24. package/dist/ci-wait/tool-registry.js +32 -0
  25. package/dist/ci-wait/tool-registry.js.map +1 -0
  26. package/dist/ci-wait/tools.d.ts +455 -8
  27. package/dist/ci-wait/tools.js +40 -28
  28. package/dist/ci-wait/tools.js.map +1 -1
  29. package/dist/contract/agent-tools.d.ts +51 -0
  30. package/dist/contract/automation-requests.d.ts +9 -0
  31. package/dist/contract/automation-storage.d.ts +9 -0
  32. package/dist/contract/automation-tool.d.ts +9 -0
  33. package/dist/contract/automations.d.ts +27 -0
  34. package/dist/contract/create-run-input.d.ts +3 -0
  35. package/dist/contract/index.d.ts +1 -0
  36. package/dist/contract/index.js +53 -7
  37. package/dist/contract/run-status.d.ts +1 -0
  38. package/dist/contract/runs.d.ts +20 -0
  39. package/dist/contract/workflow-file.d.ts +3 -0
  40. package/dist/contract/workflows.d.ts +19 -1
  41. package/dist/delegation/routes.d.ts +14 -14
  42. package/dist/delegation/service.js +2 -2
  43. package/dist/delegation/service.js.map +1 -1
  44. package/dist/delegation/transport.d.ts +21 -21
  45. package/dist/runs/run-archive.d.ts +5 -1
  46. package/dist/runs/run-decode.d.ts +12 -1
  47. package/dist/runs/run-exits.d.ts +362 -340
  48. package/dist/runs/store.d.ts +1 -1
  49. package/dist/server/server.d.ts +462 -194
  50. package/dist/subcommands.js +6 -0
  51. package/dist/subcommands.js.map +1 -1
  52. package/dist/workflows/continuation-admission.d.ts +77 -73
  53. package/dist/workflows/load.js +7 -0
  54. package/dist/workflows/load.js.map +1 -1
  55. package/dist/workflows/run/launch-read-resolver.d.ts +21 -0
  56. package/dist/workflows/run/launch-read-resolver.js +1 -1
  57. package/dist/workflows/run/launch-read-resolver.js.map +1 -1
  58. package/dist/workflows/run/queued-revival.js +1 -1
  59. package/dist/workflows/run/step-decisions.js +4 -3
  60. package/dist/workflows/run/step-decisions.js.map +1 -1
  61. package/dist/workflows/run/step-loop.js +32 -16
  62. package/dist/workflows/run/step-loop.js.map +1 -1
  63. package/dist/workflows/run/wait-engine.d.ts +5 -1
  64. package/dist/workflows/step-kind-registry.d.ts +43 -0
  65. package/dist/workflows/step-kind-registry.js +43 -0
  66. package/dist/workflows/step-kind-registry.js.map +1 -0
  67. package/dist/workflows/types.d.ts +4 -1
  68. package/dist/workflows/types.js +1 -1
  69. package/dist/workflows/types.js.map +1 -1
  70. package/package.json +4 -4
  71. package/scripts/benchmark-runtime.ts +6 -0
  72. package/scripts/measure-transcript-facts-health.mjs +6 -0
  73. package/scripts/mock-ci-tool.mjs +1 -1
  74. package/scripts/mock-wire-tools.mjs +4 -1
  75. package/scripts/omp-ci-wait.mjs +4 -14
  76. package/scripts/pi-ci-wait.mjs +3 -13
  77. package/web/dist/assets/{accounts-section-B-zlsH7k.js → accounts-section-D3P_Z-Nu.js} +1 -1
  78. package/web/dist/assets/{activity-motion-psm6jyeg.js → activity-motion-BW-0k8s7.js} +1 -1
  79. package/web/dist/assets/{activity-route-DeK0riM9.js → activity-route-Bpgblioe.js} +1 -1
  80. package/web/dist/assets/{agent-config-section-BvmWn_h-.js → agent-config-section-Cj3w7UIn.js} +1 -1
  81. package/web/dist/assets/{agent-defaults-section-DsuYOQpY.js → agent-defaults-section-BJ4poe9c.js} +1 -1
  82. package/web/dist/assets/{appearance-DNMXL1v0.js → appearance-BUsUTPF0.js} +1 -1
  83. package/web/dist/assets/{archive-on-merge-field-BovFB0t7.js → archive-on-merge-field-D_kgBFNv.js} +1 -1
  84. package/web/dist/assets/attention-lvUYNNvV.js +1 -0
  85. package/web/dist/assets/{automations-route-DyiKOd25.js → automations-route-CZaUrmDs.js} +1 -1
  86. package/web/dist/assets/{commit-diff-panel-DawdFJ6E.js → commit-diff-panel-xwLW6Ydr.js} +1 -1
  87. package/web/dist/assets/{diff-CfoXwmnl.js → diff-BB8SoL-s.js} +2 -2
  88. package/web/dist/assets/{diff-view-5xkdG47g.js → diff-view-O8lx1ztb.js} +1 -1
  89. package/web/dist/assets/{file-preview-DIVTxup4.js → file-preview-BS6M2tBo.js} +1 -1
  90. package/web/dist/assets/{folder-browser-BzVWaANT.js → folder-browser-Dsqz0Z1z.js} +1 -1
  91. package/web/dist/assets/{git-toolbar-BUViNmxj.js → git-toolbar-DoPFA36c.js} +1 -1
  92. package/web/dist/assets/{github-COe1nsmn.js → github-Bjy3WBvf.js} +1 -1
  93. package/web/dist/assets/{global-activity-route-B-cJo1pg.js → global-activity-route-BXBZKz_9.js} +1 -1
  94. package/web/dist/assets/{index-BZiixXpY.js → index-CmadQXcg.js} +5 -5
  95. package/web/dist/assets/{label-DVUPtyTI.js → label-CZp8t0zE.js} +1 -1
  96. package/web/dist/assets/{markdown-bvY77s5D.js → markdown-KHcncamw.js} +1 -1
  97. package/web/dist/assets/{notifications-section-Cet1mmEc.js → notifications-section-DD21Sd79.js} +1 -1
  98. package/web/dist/assets/{open-in-menu-BpSp2CJF.js → open-in-menu-DdKs6X5r.js} +1 -1
  99. package/web/dist/assets/{preview-pane-connected-BCrpsIIn.js → preview-pane-connected-BvTZv2SQ.js} +1 -1
  100. package/web/dist/assets/{project-location-ClZPnbBZ.js → project-location-B3LBvkz2.js} +1 -1
  101. package/web/dist/assets/{project-router-BYrAO9Ws.js → project-router-CIKODSHW.js} +1 -1
  102. package/web/dist/assets/project-scope-context-D1bpJixc.js +4 -0
  103. package/web/dist/assets/{projects-section-CdUdrEPd.js → projects-section-C0k8kyb-.js} +1 -1
  104. package/web/dist/assets/{prompt-templates-section-D3ojaPZw.js → prompt-templates-section-DNkosCni.js} +1 -1
  105. package/web/dist/assets/{queries--x5yVcip.js → queries-dHXhD3Hc.js} +1 -1
  106. package/web/dist/assets/{reference-chip-013dL8dQ.js → reference-chip-BWViAFIN.js} +1 -1
  107. package/web/dist/assets/{remote-settings-notice-BbBWWAm8.js → remote-settings-notice-DPCENbhz.js} +1 -1
  108. package/web/dist/assets/{repo-git-1hSBzyJQ.js → repo-git-jKOnO3ba.js} +1 -1
  109. package/web/dist/assets/{report-reader-BNtgxtSI.js → report-reader-DXYiKNcg.js} +1 -1
  110. package/web/dist/assets/{reports-C64cW2KP.js → reports-DEE0bHNv.js} +1 -1
  111. package/web/dist/assets/{resources-section-xAUouGNM.js → resources-section-lqXgYTrv.js} +1 -1
  112. package/web/dist/assets/{run-header-75eMWFhM.js → run-header-CXlUbvDO.js} +1 -1
  113. package/web/dist/assets/{runners-C4-xD5Cz.js → runners-CGQjSsir.js} +1 -1
  114. package/web/dist/assets/{settings-agent-picker-4P5j_ZP8.js → settings-agent-picker-BRvZn4kM.js} +1 -1
  115. package/web/dist/assets/{settings-shell-CME_R4D1.js → settings-shell-DTtd-vIa.js} +1 -1
  116. package/web/dist/assets/{sidebar-section-BQSB_KxK.js → sidebar-section-BFW4ZfBR.js} +1 -1
  117. package/web/dist/assets/{skills-RUJCWIve.js → skills-AImMlT1T.js} +1 -1
  118. package/web/dist/assets/{tab-link-DnbdjF4r.js → tab-link-CM6SDBtV.js} +1 -1
  119. package/web/dist/assets/{task-changes-Boec_UFj.js → task-changes-01Z_ppIw.js} +1 -1
  120. package/web/dist/assets/{task-commits-B6k-DdnE.js → task-commits-DRNIum3J.js} +1 -1
  121. package/web/dist/assets/{task-files-T731cz4q.js → task-files-Crz7Fo3C.js} +1 -1
  122. package/web/dist/assets/{task-github-item-iQd_C1Y4.js → task-github-item-psG2V47c.js} +1 -1
  123. package/web/dist/assets/{task-groups-BTMFLRHJ.js → task-groups-DF0XoB6U.js} +1 -1
  124. package/web/dist/assets/{task-thread-BaPz3rdA.js → task-thread-Bqg91ZVZ.js} +2 -2
  125. package/web/dist/assets/{tasks-table-BCuA9Kx7.js → tasks-table-DHTEGteC.js} +1 -1
  126. package/web/dist/assets/{thread-state-B3Ichxx9.js → thread-state-BWJ2YyXo.js} +1 -1
  127. package/web/dist/assets/{use-hand-to-agent-state-DIIBuX3r.js → use-hand-to-agent-state-DNROQerR.js} +1 -1
  128. package/web/dist/assets/{useInfiniteQuery-BxpPo6z-.js → useInfiniteQuery-qJeCNhM7.js} +1 -1
  129. package/web/dist/assets/useQuery-C3CQhXsT.js +1 -0
  130. package/web/dist/assets/{workflows-8HhOvPhw.js → workflows-Cx9lgrEo.js} +2 -2
  131. package/web/dist/assets/{workspace-tools-D6C2Yjat.js → workspace-tools-CVitt3kE.js} +1 -1
  132. package/web/dist/assets/{worktrees-section-Cm4JH128.js → worktrees-section-DxUg4l9n.js} +1 -1
  133. package/web/dist/assets/{ws-Iixb-QFR.js → ws-BisMp6U5.js} +1 -1
  134. package/web/dist/index.html +15 -15
  135. package/web/dist/assets/attention-DaLkUl4h.js +0 -1
  136. package/web/dist/assets/project-scope-context-BDU1qGx3.js +0 -4
  137. package/web/dist/assets/useQuery-DcVi2Spi.js +0 -1
@@ -1,3 +1,4 @@
1
+ import { type AgentToolDefinition } from './tool-registry.ts';
1
2
  import { type AutomationToolRequest, type AutomationToolAnswer } from '../contract/index.js';
2
3
  export { ToolsUnavailableError } from './errors.ts';
3
4
  import { type ScheduleTaskAnswer, type ScheduleTaskRequest, type ScheduledTasksAnswer, type ScheduledTasksRequest } from '../contract/index.js';
@@ -24,6 +25,7 @@ type PreviewRegistration = (request: PreviewServeRequest, signal: AbortSignal) =
24
25
  type PreviewStop = (request: PreviewStopRequest, signal: AbortSignal) => Promise<PreviewStopResult>;
25
26
  /** The session's trusted callbacks: run identity comes from here, never from the model's arguments. */
26
27
  export type SquawkToolHandlers = {
28
+ tools?: Record<string, (input: unknown, signal: AbortSignal) => Promise<unknown>>;
27
29
  /** `via` names the tool that opened the wait. */
28
30
  registerWait: (request: SquawkWaitRequestInput, via: WaitVia, signal: AbortSignal) => Promise<WaitRegistration>;
29
31
  /** `cezar_ask` (hearsay-tools/cezarion#1234): opens the run's human wait with its card. */
@@ -41,6 +43,7 @@ export type SquawkToolHandlers = {
41
43
  };
42
44
  type Capability = SquawkToolHandlers & {
43
45
  lifetime: AbortController;
46
+ env: NodeJS.ProcessEnv;
44
47
  };
45
48
  export type CiToolSession = {
46
49
  descriptor: NonNullable<AgentRunSpec['squawkTools']>;
@@ -60,1197 +63,112 @@ export declare class CiToolController {
60
63
  provision(handlers: SquawkToolHandlers): CiToolSession;
61
64
  close(): Promise<void>;
62
65
  }
63
- /**
64
- * Typed private route inventory: GET ci-wait holds adapter lifetime (the path is historical; its POST
65
- * went with `cezar_wait_for_ci` in hearsay-tools/cezarion#1236); POST wait opens a CI, worker or
66
- * timer wait and POST cancel-wait closes one (hearsay-tools/cezarion#1233); POST ask opens the human
67
- * wait and POST done finishes the task at the turn's end (hearsay-tools/cezarion#1234); POST
68
- * preview-serve registers a dev server (#781); preview-stop controls its approved process (#803);
69
- * POST schedule-task and scheduled-tasks create and manage one-time schedules (hearsay-tools/cezarion#1465).
70
- */
66
+ /** The private IPC catalog and registered dispatch share the capability boundary. */
71
67
  export declare function ciToolRoutes(capabilities: Map<string, Capability>): import("hono/hono-base").HonoBase<{
72
68
  Variables: {
73
69
  capability: Capability;
70
+ tool: AgentToolDefinition;
74
71
  };
75
72
  } & {
76
73
  Variables: {
77
74
  capability: Capability;
75
+ tool: AgentToolDefinition;
78
76
  };
79
77
  }, {
80
- "/api/v1/tools/ci-wait": {
78
+ "/api/v1/tools": {
81
79
  $get: {
82
- output: {};
83
- outputFormat: string;
84
- status: import("hono/utils/http-status").StatusCode;
85
- input: {};
86
- };
87
- };
88
- } & {
89
- "/api/v1/tools/wait": {
90
- $post: {
91
80
  output: {
92
- code: 'capability_revoked';
93
- message: string;
94
- };
95
- outputFormat: "json";
96
- status: 401;
97
- input: {
98
- json: {
99
- pr: string;
100
- until?: "checks" | "merge" | "merge_or_blocked" | undefined;
101
- wake_on_conflict?: boolean | undefined;
102
- timeout_seconds?: number | undefined;
103
- head_sha?: string | undefined;
104
- operation_id?: string | undefined;
105
- kind: "pr";
106
- } | {
107
- operation_id?: string | undefined;
108
- kind: "worker";
109
- worker_ids: string[];
110
- mode?: "all" | "any" | "one" | undefined;
111
- timeout_seconds?: number | undefined;
112
- } | {
113
- operation_id?: string | undefined;
114
- kind: "request";
115
- request_ids: string[];
116
- mode?: "all" | "any" | "one" | undefined;
117
- timeout_seconds?: number | undefined;
118
- } | {
119
- operation_id?: string | undefined;
120
- kind: "peer";
121
- peer_ids: string[];
122
- timeout_seconds?: number | undefined;
123
- } | {
124
- operation_id?: string | undefined;
125
- kind: "timer";
126
- seconds: number;
127
- note?: string | undefined;
128
- } | {
129
- operation_id?: string | undefined;
130
- kind: "process";
131
- pid: number;
132
- exit_file?: string | undefined;
133
- timeout_seconds?: number | undefined;
134
- note?: string | undefined;
135
- } | {
136
- [x: string]: unknown;
137
- operation_id?: string | undefined;
138
- kind: string;
139
- };
140
- };
141
- } | {
142
- output: {
143
- operation_id?: string | undefined;
144
- ok: true;
145
- effect?: "applied" | "unchanged" | undefined;
146
- deduplicated?: boolean | undefined;
147
- replayed?: boolean | undefined;
148
- wait_phase?: "cancelled" | "delivered" | "open" | "resolved" | "unavailable" | undefined;
149
- wait_id: string;
150
- kind: string;
151
- deadline?: string | undefined;
152
- open_waits: ({
153
- wait_id: string;
154
- summary: string;
155
- kind: "peer" | "pr" | "process" | "subagent" | "timer" | "worker";
156
- deadline: string;
157
- } | {
158
- wait_id: string;
159
- summary: string;
160
- kind: "human";
161
- } | {
162
- wait_id: string;
163
- summary: string;
164
- kind: "plugin";
165
- pluginKind: string;
166
- deadline?: string | undefined;
167
- })[];
168
- } | {
169
- operation_id?: string | undefined;
170
- ok: false;
171
- effect?: "refused" | "unknown" | undefined;
172
- retained_wait?: {
173
- wait_id: string;
174
- summary: string;
175
- kind: "peer" | "pr" | "process" | "subagent" | "timer" | "worker";
176
- deadline: string;
177
- } | {
178
- wait_id: string;
179
- summary: string;
180
- kind: "human";
181
- } | {
182
- wait_id: string;
183
- summary: string;
184
- kind: "plugin";
185
- pluginKind: string;
186
- deadline?: string | undefined;
187
- } | undefined;
188
- code: "authentication" | "capability_revoked" | "capacity" | "command_failed" | "denied_scope" | "duplicate_deadline" | "exit_file_outside" | "finish_requested" | "generation_mismatch" | "gh_missing" | "inaccessible_pr" | "invalid_request" | "malformed_data" | "manager_disposed" | "messaging_off" | "operation_conflict" | "outcome_unknown" | "output_limit" | "persistence" | "process_not_allowed" | "process_not_owned" | "query_timeout" | "registration_aborted" | "root_finish_pending" | "run_cancelled" | "run_missing" | "run_not_running" | "run_stopping" | "session_closed" | "session_replaced" | "timers_disabled" | "turn_changed" | "unauthorized" | "unavailable" | "unsupported_host" | "wait_conflict" | "wake_budget_spent" | "worker_execution_stopped" | "worker_wait_pending";
189
- message: string;
190
- open_waits?: ({
191
- wait_id: string;
192
- summary: string;
193
- kind: "peer" | "pr" | "process" | "subagent" | "timer" | "worker";
194
- deadline: string;
195
- } | {
196
- wait_id: string;
197
- summary: string;
198
- kind: "human";
199
- } | {
200
- wait_id: string;
201
- summary: string;
202
- kind: "plugin";
203
- pluginKind: string;
204
- deadline?: string | undefined;
205
- })[] | undefined;
206
- };
207
- outputFormat: "json";
208
- status: import("hono/utils/http-status").ContentfulStatusCode;
209
- input: {
210
- json: {
211
- pr: string;
212
- until?: "checks" | "merge" | "merge_or_blocked" | undefined;
213
- wake_on_conflict?: boolean | undefined;
214
- timeout_seconds?: number | undefined;
215
- head_sha?: string | undefined;
216
- operation_id?: string | undefined;
217
- kind: "pr";
218
- } | {
219
- operation_id?: string | undefined;
220
- kind: "worker";
221
- worker_ids: string[];
222
- mode?: "all" | "any" | "one" | undefined;
223
- timeout_seconds?: number | undefined;
224
- } | {
225
- operation_id?: string | undefined;
226
- kind: "request";
227
- request_ids: string[];
228
- mode?: "all" | "any" | "one" | undefined;
229
- timeout_seconds?: number | undefined;
230
- } | {
231
- operation_id?: string | undefined;
232
- kind: "peer";
233
- peer_ids: string[];
234
- timeout_seconds?: number | undefined;
235
- } | {
236
- operation_id?: string | undefined;
237
- kind: "timer";
238
- seconds: number;
239
- note?: string | undefined;
240
- } | {
241
- operation_id?: string | undefined;
242
- kind: "process";
243
- pid: number;
244
- exit_file?: string | undefined;
245
- timeout_seconds?: number | undefined;
246
- note?: string | undefined;
247
- } | {
248
- [x: string]: unknown;
249
- operation_id?: string | undefined;
250
- kind: string;
251
- };
252
- };
253
- } | {
254
- output: {
255
- ok: false;
256
- effect: 'refused';
257
- code: "authentication" | "capability_revoked" | "capacity" | "command_failed" | "finish_requested" | "generation_mismatch" | "gh_missing" | "inaccessible_pr" | "invalid_request" | "malformed_data" | "manager_disposed" | "output_limit" | "persistence" | "query_timeout" | "registration_aborted" | "root_finish_pending" | "run_cancelled" | "run_missing" | "run_not_running" | "run_stopping" | "session_closed" | "session_replaced" | "turn_changed" | "unauthorized" | "unavailable" | "unsupported_host" | "wait_conflict" | "worker_execution_stopped" | "worker_wait_pending";
258
- message: string;
259
- operation_id: string | undefined;
260
- } | {
261
- ok: false;
262
- effect: 'unknown';
263
- code: 'outcome_unknown';
264
- message: string;
265
- operation_id: string | undefined;
266
- };
267
- outputFormat: "json";
268
- status: import("hono/utils/http-status").ContentfulStatusCode;
269
- input: {
270
- json: {
271
- pr: string;
272
- until?: "checks" | "merge" | "merge_or_blocked" | undefined;
273
- wake_on_conflict?: boolean | undefined;
274
- timeout_seconds?: number | undefined;
275
- head_sha?: string | undefined;
276
- operation_id?: string | undefined;
277
- kind: "pr";
278
- } | {
279
- operation_id?: string | undefined;
280
- kind: "worker";
281
- worker_ids: string[];
282
- mode?: "all" | "any" | "one" | undefined;
283
- timeout_seconds?: number | undefined;
284
- } | {
285
- operation_id?: string | undefined;
286
- kind: "request";
287
- request_ids: string[];
288
- mode?: "all" | "any" | "one" | undefined;
289
- timeout_seconds?: number | undefined;
290
- } | {
291
- operation_id?: string | undefined;
292
- kind: "peer";
293
- peer_ids: string[];
294
- timeout_seconds?: number | undefined;
295
- } | {
296
- operation_id?: string | undefined;
297
- kind: "timer";
298
- seconds: number;
299
- note?: string | undefined;
300
- } | {
301
- operation_id?: string | undefined;
302
- kind: "process";
303
- pid: number;
304
- exit_file?: string | undefined;
305
- timeout_seconds?: number | undefined;
306
- note?: string | undefined;
307
- } | {
308
- [x: string]: unknown;
309
- operation_id?: string | undefined;
310
- kind: string;
311
- };
312
- };
313
- };
314
- };
315
- } & {
316
- "/api/v1/tools/ask": {
317
- $post: {
318
- output: {
319
- ok: false;
320
- code: 'unavailable';
321
- message: string;
322
- };
323
- outputFormat: "json";
324
- status: import("hono/utils/http-status").ContentfulStatusCode;
325
- input: {
326
- json: {
327
- questions: {
328
- id?: string | undefined;
329
- header: string;
330
- question: string;
331
- options?: {
332
- label: string;
333
- description?: string | undefined;
334
- }[] | undefined;
335
- multiSelect?: boolean | undefined;
336
- allowFreeText?: boolean | undefined;
337
- }[];
338
- context: string;
339
- };
340
- };
341
- } | {
342
- output: {
343
- code: 'capability_revoked';
344
- message: string;
345
- };
346
- outputFormat: "json";
347
- status: 401;
348
- input: {
349
- json: {
350
- questions: {
351
- id?: string | undefined;
352
- header: string;
353
- question: string;
354
- options?: {
355
- label: string;
356
- description?: string | undefined;
357
- }[] | undefined;
358
- multiSelect?: boolean | undefined;
359
- allowFreeText?: boolean | undefined;
360
- }[];
361
- context: string;
362
- };
363
- };
364
- } | {
365
- output: {
366
- ok: true;
367
- wait_id: string;
368
- open_waits: ({
369
- wait_id: string;
370
- summary: string;
371
- kind: "peer" | "pr" | "process" | "subagent" | "timer" | "worker";
372
- deadline: string;
373
- } | {
374
- wait_id: string;
375
- summary: string;
376
- kind: "human";
377
- } | {
378
- wait_id: string;
379
- summary: string;
380
- kind: "plugin";
381
- pluginKind: string;
382
- deadline?: string | undefined;
383
- })[];
384
- } | {
385
- ok: false;
386
- code: "autonomous_run" | "capability_revoked" | "capacity" | "finish_requested" | "generation_mismatch" | "invalid_request" | "manager_disposed" | "persistence" | "root_finish_pending" | "run_cancelled" | "run_missing" | "run_not_running" | "run_stopping" | "session_closed" | "session_replaced" | "supervisor_is_worker" | "unauthorized" | "unavailable" | "worker_execution_stopped" | "worker_wait_pending";
387
- message: string;
388
- open_waits?: ({
389
- wait_id: string;
390
- summary: string;
391
- kind: "peer" | "pr" | "process" | "subagent" | "timer" | "worker";
392
- deadline: string;
393
- } | {
394
- wait_id: string;
395
- summary: string;
396
- kind: "human";
397
- } | {
398
- wait_id: string;
399
- summary: string;
400
- kind: "plugin";
401
- pluginKind: string;
402
- deadline?: string | undefined;
403
- })[] | undefined;
404
- };
405
- outputFormat: "json";
406
- status: import("hono/utils/http-status").ContentfulStatusCode;
407
- input: {
408
- json: {
409
- questions: {
410
- id?: string | undefined;
411
- header: string;
412
- question: string;
413
- options?: {
414
- label: string;
415
- description?: string | undefined;
416
- }[] | undefined;
417
- multiSelect?: boolean | undefined;
418
- allowFreeText?: boolean | undefined;
419
- }[];
420
- context: string;
421
- };
422
- };
423
- };
424
- };
425
- } & {
426
- "/api/v1/tools/cancel-wait": {
427
- $post: {
428
- output: {
429
- cancelled: false;
430
- code: 'unavailable';
431
- message: string;
432
- };
433
- outputFormat: "json";
434
- status: import("hono/utils/http-status").ContentfulStatusCode;
435
- input: {
436
- json: {
437
- wait_id: string;
438
- };
439
- };
440
- } | {
441
- output: {
442
- code: 'capability_revoked';
443
- message: string;
444
- };
445
- outputFormat: "json";
446
- status: 401;
447
- input: {
448
- json: {
449
- wait_id: string;
450
- };
451
- };
452
- } | {
453
- output: {
454
- cancelled: true;
455
- wait_id: string;
456
- open_waits: ({
457
- wait_id: string;
458
- summary: string;
459
- kind: "peer" | "pr" | "process" | "subagent" | "timer" | "worker";
460
- deadline: string;
461
- } | {
462
- wait_id: string;
463
- summary: string;
464
- kind: "human";
465
- } | {
466
- wait_id: string;
467
- summary: string;
468
- kind: "plugin";
469
- pluginKind: string;
470
- deadline?: string | undefined;
471
- })[];
472
- } | {
473
- cancelled: false;
474
- code: "already_resolved" | "human_question" | "invalid_request" | "not_found" | "unavailable";
475
- message: string;
476
- open_waits?: ({
477
- wait_id: string;
478
- summary: string;
479
- kind: "peer" | "pr" | "process" | "subagent" | "timer" | "worker";
480
- deadline: string;
481
- } | {
482
- wait_id: string;
483
- summary: string;
484
- kind: "human";
485
- } | {
486
- wait_id: string;
487
- summary: string;
488
- kind: "plugin";
489
- pluginKind: string;
490
- deadline?: string | undefined;
491
- })[] | undefined;
492
- };
493
- outputFormat: "json";
494
- status: import("hono/utils/http-status").ContentfulStatusCode;
495
- input: {
496
- json: {
497
- wait_id: string;
498
- };
499
- };
500
- };
501
- };
502
- } & {
503
- "/api/v1/tools/done": {
504
- $post: {
505
- output: {
506
- ok: false;
507
- code: 'unavailable';
508
- message: string;
509
- };
510
- outputFormat: "json";
511
- status: import("hono/utils/http-status").ContentfulStatusCode;
512
- input: {
513
- json: {
514
- summary?: string | undefined;
515
- };
516
- };
517
- } | {
518
- output: {
519
- code: 'capability_revoked';
520
- message: string;
521
- };
522
- outputFormat: "json";
523
- status: 401;
524
- input: {
525
- json: {
526
- summary?: string | undefined;
527
- };
528
- };
529
- } | {
530
- output: {
531
- ok: true;
532
- finishes: "at_turn_end";
533
- open_waits: ({
534
- wait_id: string;
535
- summary: string;
536
- kind: "peer" | "pr" | "process" | "subagent" | "timer" | "worker";
537
- deadline: string;
538
- } | {
539
- wait_id: string;
540
- summary: string;
541
- kind: "human";
542
- } | {
543
- wait_id: string;
544
- summary: string;
545
- kind: "plugin";
546
- pluginKind: string;
547
- deadline?: string | undefined;
548
- })[];
549
- completes: "task";
550
- } | {
551
- ok: true;
552
- finishes: "at_turn_end";
553
- open_waits: ({
554
- wait_id: string;
555
- summary: string;
556
- kind: "peer" | "pr" | "process" | "subagent" | "timer" | "worker";
557
- deadline: string;
558
- } | {
559
- wait_id: string;
560
- summary: string;
561
- kind: "human";
562
- } | {
563
- wait_id: string;
564
- summary: string;
565
- kind: "plugin";
566
- pluginKind: string;
567
- deadline?: string | undefined;
568
- })[];
569
- completes: "step";
570
- next_step: string;
571
- } | {
572
- ok: false;
573
- code: "capability_revoked" | "finish_requested" | "generation_mismatch" | "human_question_pending" | "input_pending" | "invalid_request" | "manager_disposed" | "not_final_step" | "requests_outstanding" | "requests_unanswered" | "root_finish_pending" | "run_cancelled" | "run_missing" | "run_not_running" | "run_stopping" | "session_closed" | "session_replaced" | "unavailable" | "worker_questions" | "worker_wait_pending" | "workers_outstanding" | "workers_uncollected";
574
- message: string;
575
- workers?: {
576
- worker_id: string;
577
- reason: "outstanding" | "question" | "uncollected";
578
- }[] | undefined;
579
- open_waits?: ({
580
- wait_id: string;
581
- summary: string;
582
- kind: "peer" | "pr" | "process" | "subagent" | "timer" | "worker";
583
- deadline: string;
584
- } | {
585
- wait_id: string;
586
- summary: string;
587
- kind: "human";
588
- } | {
589
- wait_id: string;
590
- summary: string;
591
- kind: "plugin";
592
- pluginKind: string;
593
- deadline?: string | undefined;
594
- })[] | undefined;
595
- owed?: ({
596
- kind: "wait_result";
597
- wait_id: string;
598
- wait_kind: string;
599
- } | {
600
- kind: "queued";
601
- input_id?: string | undefined;
602
- source: string;
603
- } | {
604
- kind: "in_flight";
605
- input_id: string;
606
- } | {
607
- kind: "unread";
608
- input_id: string;
609
- })[] | undefined;
610
- };
611
- outputFormat: "json";
612
- status: import("hono/utils/http-status").ContentfulStatusCode;
613
- input: {
614
- json: {
615
- summary?: string | undefined;
616
- };
617
- };
618
- };
619
- };
620
- } & {
621
- "/api/v1/tools/preview-stop": {
622
- $post: {
623
- output: {
624
- ok: boolean;
625
- code: "adopted" | "approval_required" | "headless" | "invalid_input" | "not_registered" | "port_held" | "port_in_use" | "preview_disabled" | "restarted" | "stopped" | "unavailable" | "worktree_missing";
626
- message: string;
627
- hint: string;
81
+ tools: {
82
+ name: string;
83
+ description: string;
84
+ inputSchema: {
85
+ [x: string]: import("hono/utils/types").JSONValue;
86
+ type: 'object';
87
+ properties?: {
88
+ [x: string]: import("hono/utils/types").JSONValue;
89
+ } | undefined;
90
+ };
91
+ trigger: string;
92
+ label: string;
93
+ timeoutMs: number;
94
+ unavailable: {
95
+ content: {
96
+ type: 'text';
97
+ text: string;
98
+ }[];
99
+ isError?: boolean | undefined;
100
+ details: import("hono/utils/types").JSONValue;
101
+ };
102
+ }[];
103
+ instructions: string;
628
104
  };
629
105
  outputFormat: "json";
630
106
  status: import("hono/utils/http-status").ContentfulStatusCode;
631
- input: {
632
- json: {
633
- port: number;
634
- restart?: boolean | undefined;
635
- };
636
- };
637
- } | {
638
- output: {
639
- code: 'capability_revoked';
640
- message: string;
641
- };
642
- outputFormat: "json";
643
- status: 401;
644
- input: {
645
- json: {
646
- port: number;
647
- restart?: boolean | undefined;
648
- };
649
- };
107
+ input: {};
650
108
  };
651
109
  };
652
110
  } & {
653
- "/api/v1/tools/preview-serve": {
654
- $post: {
655
- output: {
656
- ok: boolean;
657
- code: "cezar_port" | "cwd_outside_worktree" | "headless" | "invalid_input" | "port_held" | "preview_disabled" | "registered" | "replaced" | "too_many" | "unavailable" | "worktree_missing";
658
- message: string;
659
- hint: string;
660
- };
661
- outputFormat: "json";
662
- status: import("hono/utils/http-status").ContentfulStatusCode;
663
- input: {
664
- json: {
665
- command: string;
666
- port: number;
667
- cwd?: string | undefined;
668
- label?: string | undefined;
669
- path?: string | undefined;
670
- };
671
- };
672
- } | {
673
- output: {
674
- code: 'capability_revoked';
675
- message: string;
676
- };
677
- outputFormat: "json";
678
- status: 401;
679
- input: {
680
- json: {
681
- command: string;
682
- port: number;
683
- cwd?: string | undefined;
684
- label?: string | undefined;
685
- path?: string | undefined;
686
- };
687
- };
111
+ "/api/v1/tools/ci-wait": {
112
+ $get: {
113
+ output: {};
114
+ outputFormat: string;
115
+ status: import("hono/utils/http-status").StatusCode;
116
+ input: {};
688
117
  };
689
118
  };
690
119
  } & {
691
- "/api/v1/tools/automation": {
120
+ "/api/v1/tools/:name": {
692
121
  $post: {
693
- output: {
694
- ok: false;
695
- code: import('../contract/index.js').ScheduledTaskRefusalCode;
696
- message: string;
697
- };
122
+ output: never;
698
123
  outputFormat: "json";
699
124
  status: import("hono/utils/http-status").ContentfulStatusCode;
700
125
  input: {
701
- json: {
702
- action: "create";
703
- definition: {
704
- name: string;
705
- description?: string | undefined;
706
- kind?: "github" | "schedule" | undefined;
707
- events?: ("issue.labeled" | "issue.opened" | "issue.unlabeled" | "pull_request.opened")[] | undefined;
708
- intervalSeconds?: number | undefined;
709
- filters?: {
710
- [x: string]: unknown;
711
- includeExisting?: boolean | undefined;
712
- requireCurrentLabels?: boolean | undefined;
713
- authors?: string[] | undefined;
714
- assignees?: string[] | undefined;
715
- allLabels?: string[] | undefined;
716
- anyLabels?: string[] | undefined;
717
- excludeLabels?: string[] | undefined;
718
- changedLabels?: string[] | undefined;
719
- lookbackDays?: number | undefined;
720
- maxRecords?: number | undefined;
721
- } | undefined;
722
- schedule?: {
723
- type: "daily" | "hours" | "once" | "weekdays" | "weekly";
724
- hour?: number | undefined;
725
- minute?: number | undefined;
726
- day?: number | undefined;
727
- every?: 1 | 2 | 3 | 4 | 6 | 8 | 12 | undefined;
728
- at?: string | undefined;
729
- timeZone?: string | undefined;
730
- latestStartMinutes?: number | undefined;
731
- } | undefined;
732
- task: {
733
- archiveWhenDone?: boolean | undefined;
734
- autoMergePr?: boolean | undefined;
735
- allowWorkers?: boolean | undefined;
736
- allowMessaging?: boolean | undefined;
737
- prompt: string;
738
- workflow?: string | undefined;
739
- steps?: {
740
- id: string;
741
- name?: string | undefined;
742
- prompt?: string | undefined;
743
- skill?: string | undefined;
744
- model?: string | undefined;
745
- effort?: string | undefined;
746
- timeoutMs?: number | undefined;
747
- runner?: string | undefined;
748
- agentProfile?: string | undefined;
749
- allowedTools?: string[] | undefined;
750
- bashAllowlist?: string[] | undefined;
751
- command?: string | undefined;
752
- onFail?: {
753
- retry: string;
754
- max?: number | undefined;
755
- } | undefined;
756
- }[] | undefined;
757
- runner?: string | undefined;
758
- model?: string | undefined;
759
- effort?: string | undefined;
760
- worktree?: boolean | undefined;
761
- autonomous?: boolean | undefined;
762
- systemPrompt?: string | undefined;
763
- };
764
- };
765
- } | {
766
- action: "show";
767
- id: string;
768
- } | {
769
- action: "preview";
770
- id: string;
771
- } | {
772
- action: "enable";
773
- id: string;
774
- explicit?: boolean | undefined;
775
- };
776
- };
777
- } | {
778
- output: {
779
- code: 'capability_revoked';
780
- message: string;
781
- };
782
- outputFormat: "json";
783
- status: 401;
784
- input: {
785
- json: {
786
- action: "create";
787
- definition: {
788
- name: string;
789
- description?: string | undefined;
790
- kind?: "github" | "schedule" | undefined;
791
- events?: ("issue.labeled" | "issue.opened" | "issue.unlabeled" | "pull_request.opened")[] | undefined;
792
- intervalSeconds?: number | undefined;
793
- filters?: {
794
- [x: string]: unknown;
795
- includeExisting?: boolean | undefined;
796
- requireCurrentLabels?: boolean | undefined;
797
- authors?: string[] | undefined;
798
- assignees?: string[] | undefined;
799
- allLabels?: string[] | undefined;
800
- anyLabels?: string[] | undefined;
801
- excludeLabels?: string[] | undefined;
802
- changedLabels?: string[] | undefined;
803
- lookbackDays?: number | undefined;
804
- maxRecords?: number | undefined;
805
- } | undefined;
806
- schedule?: {
807
- type: "daily" | "hours" | "once" | "weekdays" | "weekly";
808
- hour?: number | undefined;
809
- minute?: number | undefined;
810
- day?: number | undefined;
811
- every?: 1 | 2 | 3 | 4 | 6 | 8 | 12 | undefined;
812
- at?: string | undefined;
813
- timeZone?: string | undefined;
814
- latestStartMinutes?: number | undefined;
815
- } | undefined;
816
- task: {
817
- archiveWhenDone?: boolean | undefined;
818
- autoMergePr?: boolean | undefined;
819
- allowWorkers?: boolean | undefined;
820
- allowMessaging?: boolean | undefined;
821
- prompt: string;
822
- workflow?: string | undefined;
823
- steps?: {
824
- id: string;
825
- name?: string | undefined;
826
- prompt?: string | undefined;
827
- skill?: string | undefined;
828
- model?: string | undefined;
829
- effort?: string | undefined;
830
- timeoutMs?: number | undefined;
831
- runner?: string | undefined;
832
- agentProfile?: string | undefined;
833
- allowedTools?: string[] | undefined;
834
- bashAllowlist?: string[] | undefined;
835
- command?: string | undefined;
836
- onFail?: {
837
- retry: string;
838
- max?: number | undefined;
839
- } | undefined;
840
- }[] | undefined;
841
- runner?: string | undefined;
842
- model?: string | undefined;
843
- effort?: string | undefined;
844
- worktree?: boolean | undefined;
845
- autonomous?: boolean | undefined;
846
- systemPrompt?: string | undefined;
847
- };
848
- };
849
- } | {
850
- action: "show";
851
- id: string;
852
- } | {
853
- action: "preview";
854
- id: string;
855
- } | {
856
- action: "enable";
857
- id: string;
858
- explicit?: boolean | undefined;
859
- };
860
- };
861
- } | {
862
- output: {
863
- ok: true;
864
- automation: {
865
- [x: string]: import("hono/utils/types").JSONValue;
866
- id: string;
867
- revision: number;
126
+ json: unknown;
127
+ } & {
128
+ param: {
868
129
  name: string;
869
- description?: string | undefined;
870
- enabled: boolean;
871
- kind: "github" | "schedule";
872
- events?: ("issue.labeled" | "issue.opened" | "issue.unlabeled" | "pull_request.opened")[] | undefined;
873
- intervalSeconds?: number | undefined;
874
- filters?: {
875
- [x: string]: import("hono/utils/types").JSONValue;
876
- includeExisting?: boolean | undefined;
877
- requireCurrentLabels?: boolean | undefined;
878
- authors?: string[] | undefined;
879
- assignees?: string[] | undefined;
880
- allLabels?: string[] | undefined;
881
- anyLabels?: string[] | undefined;
882
- excludeLabels?: string[] | undefined;
883
- changedLabels?: string[] | undefined;
884
- lookbackDays: number;
885
- maxRecords: number;
886
- } | undefined;
887
- schedule?: {
888
- [x: string]: import("hono/utils/types").JSONValue;
889
- type: "daily" | "hours" | "once" | "weekdays" | "weekly";
890
- hour?: number | undefined;
891
- minute?: number | undefined;
892
- day?: number | undefined;
893
- every?: 1 | 2 | 3 | 4 | 6 | 8 | 12 | undefined;
894
- at?: string | undefined;
895
- timeZone?: string | undefined;
896
- latestStartMinutes?: number | undefined;
897
- } | undefined;
898
- task: {
899
- [x: string]: import("hono/utils/types").JSONValue;
900
- archiveWhenDone?: boolean | undefined;
901
- autoMergePr?: boolean | undefined;
902
- allowWorkers?: boolean | undefined;
903
- allowMessaging?: boolean | undefined;
904
- prompt: string;
905
- workflow?: string | undefined;
906
- steps?: {
907
- id: string;
908
- name?: string | undefined;
909
- prompt?: string | undefined;
910
- skill?: string | undefined;
911
- model?: string | undefined;
912
- effort?: string | undefined;
913
- timeoutMs?: number | undefined;
914
- runner?: string | undefined;
915
- agentProfile?: string | undefined;
916
- allowedTools?: string[] | undefined;
917
- bashAllowlist?: string[] | undefined;
918
- command?: string | undefined;
919
- onFail?: {
920
- retry: string;
921
- max: number;
922
- } | undefined;
923
- }[] | undefined;
924
- runner?: string | undefined;
925
- model?: string | undefined;
926
- effort?: string | undefined;
927
- variants?: 1 | 2 | 3 | undefined;
928
- worktree?: boolean | undefined;
929
- autonomous?: boolean | undefined;
930
- systemPrompt?: string | undefined;
931
- };
932
- archived?: {
933
- [x: string]: import("hono/utils/types").JSONValue;
934
- at: string;
935
- outcome: "cancelled" | "launched";
936
- runId?: string | undefined;
937
- receiptId?: string | undefined;
938
- trigger?: "late" | "manual" | "retry" | "schedule" | undefined;
939
- } | undefined;
940
- createdAt: string;
941
- updatedAt: string;
942
- };
943
- url?: string | undefined;
944
- next_run_at?: string | undefined;
945
- preview?: {
946
- matches: number;
947
- truncated: boolean;
948
- } | undefined;
949
- } | {
950
- ok: false;
951
- code: "automations_off" | "conflict" | "explicit_required" | "invalid_request" | "not_found" | "preview_required" | "unavailable";
952
- message: string;
953
- };
954
- outputFormat: "json";
955
- status: import("hono/utils/http-status").ContentfulStatusCode;
956
- input: {
957
- json: {
958
- action: "create";
959
- definition: {
960
- name: string;
961
- description?: string | undefined;
962
- kind?: "github" | "schedule" | undefined;
963
- events?: ("issue.labeled" | "issue.opened" | "issue.unlabeled" | "pull_request.opened")[] | undefined;
964
- intervalSeconds?: number | undefined;
965
- filters?: {
966
- [x: string]: unknown;
967
- includeExisting?: boolean | undefined;
968
- requireCurrentLabels?: boolean | undefined;
969
- authors?: string[] | undefined;
970
- assignees?: string[] | undefined;
971
- allLabels?: string[] | undefined;
972
- anyLabels?: string[] | undefined;
973
- excludeLabels?: string[] | undefined;
974
- changedLabels?: string[] | undefined;
975
- lookbackDays?: number | undefined;
976
- maxRecords?: number | undefined;
977
- } | undefined;
978
- schedule?: {
979
- type: "daily" | "hours" | "once" | "weekdays" | "weekly";
980
- hour?: number | undefined;
981
- minute?: number | undefined;
982
- day?: number | undefined;
983
- every?: 1 | 2 | 3 | 4 | 6 | 8 | 12 | undefined;
984
- at?: string | undefined;
985
- timeZone?: string | undefined;
986
- latestStartMinutes?: number | undefined;
987
- } | undefined;
988
- task: {
989
- archiveWhenDone?: boolean | undefined;
990
- autoMergePr?: boolean | undefined;
991
- allowWorkers?: boolean | undefined;
992
- allowMessaging?: boolean | undefined;
993
- prompt: string;
994
- workflow?: string | undefined;
995
- steps?: {
996
- id: string;
997
- name?: string | undefined;
998
- prompt?: string | undefined;
999
- skill?: string | undefined;
1000
- model?: string | undefined;
1001
- effort?: string | undefined;
1002
- timeoutMs?: number | undefined;
1003
- runner?: string | undefined;
1004
- agentProfile?: string | undefined;
1005
- allowedTools?: string[] | undefined;
1006
- bashAllowlist?: string[] | undefined;
1007
- command?: string | undefined;
1008
- onFail?: {
1009
- retry: string;
1010
- max?: number | undefined;
1011
- } | undefined;
1012
- }[] | undefined;
1013
- runner?: string | undefined;
1014
- model?: string | undefined;
1015
- effort?: string | undefined;
1016
- worktree?: boolean | undefined;
1017
- autonomous?: boolean | undefined;
1018
- systemPrompt?: string | undefined;
1019
- };
1020
- };
1021
- } | {
1022
- action: "show";
1023
- id: string;
1024
- } | {
1025
- action: "preview";
1026
- id: string;
1027
- } | {
1028
- action: "enable";
1029
- id: string;
1030
- explicit?: boolean | undefined;
1031
130
  };
1032
131
  };
1033
- };
1034
- };
1035
- } & {
1036
- "/api/v1/tools/schedule-task": {
1037
- $post: {
132
+ } | {
1038
133
  output: {
1039
- ok: false;
1040
- code: import('../contract/index.js').ScheduledTaskRefusalCode;
134
+ code: string;
1041
135
  message: string;
1042
136
  };
1043
137
  outputFormat: "json";
1044
- status: import("hono/utils/http-status").ContentfulStatusCode;
138
+ status: 404;
1045
139
  input: {
1046
- json: {
1047
- at?: string | undefined;
1048
- delay?: string | undefined;
1049
- latest_start?: string | undefined;
1050
- workflow?: string | undefined;
1051
- runner?: string | undefined;
1052
- model?: string | undefined;
1053
- effort?: string | undefined;
140
+ json: unknown;
141
+ } & {
142
+ param: {
1054
143
  name: string;
1055
- prompt: string;
1056
- enable?: boolean | undefined;
1057
144
  };
1058
145
  };
1059
146
  } | {
1060
147
  output: {
1061
- code: 'capability_revoked';
148
+ code: string;
1062
149
  message: string;
1063
150
  };
1064
151
  outputFormat: "json";
1065
152
  status: 401;
1066
153
  input: {
1067
- json: {
1068
- at?: string | undefined;
1069
- delay?: string | undefined;
1070
- latest_start?: string | undefined;
1071
- workflow?: string | undefined;
1072
- runner?: string | undefined;
1073
- model?: string | undefined;
1074
- effort?: string | undefined;
154
+ json: unknown;
155
+ } & {
156
+ param: {
1075
157
  name: string;
1076
- prompt: string;
1077
- enable?: boolean | undefined;
1078
158
  };
1079
159
  };
1080
160
  } | {
1081
- output: {
1082
- ok: false;
1083
- code: "automations_off" | "conflict" | "invalid_request" | "not_found" | "unavailable";
1084
- message: string;
1085
- } | {
1086
- ok: true;
1087
- task: {
1088
- id: string;
1089
- name: string;
1090
- status: "archived" | "failed" | "missed" | "paused" | "waiting";
1091
- due_at: string;
1092
- latest_start_minutes?: number | undefined;
1093
- run_id?: string | undefined;
1094
- url?: string | undefined;
1095
- };
1096
- note: string;
1097
- };
1098
- outputFormat: "json";
1099
- status: import("hono/utils/http-status").ContentfulStatusCode;
1100
- input: {
1101
- json: {
1102
- at?: string | undefined;
1103
- delay?: string | undefined;
1104
- latest_start?: string | undefined;
1105
- workflow?: string | undefined;
1106
- runner?: string | undefined;
1107
- model?: string | undefined;
1108
- effort?: string | undefined;
1109
- name: string;
1110
- prompt: string;
1111
- enable?: boolean | undefined;
1112
- };
1113
- };
1114
- };
1115
- };
1116
- } & {
1117
- "/api/v1/tools/scheduled-tasks": {
1118
- $post: {
1119
- output: {
1120
- ok: false;
1121
- code: import('../contract/index.js').ScheduledTaskRefusalCode;
1122
- message: string;
1123
- };
161
+ output: import("hono/utils/types").JSONValue;
1124
162
  outputFormat: "json";
1125
163
  status: import("hono/utils/http-status").ContentfulStatusCode;
1126
164
  input: {
1127
- json: {
1128
- at?: string | undefined;
1129
- delay?: string | undefined;
1130
- latest_start?: string | undefined;
1131
- workflow?: string | undefined;
1132
- runner?: string | undefined;
1133
- model?: string | undefined;
1134
- effort?: string | undefined;
1135
- action: "update";
1136
- id: string;
1137
- name?: string | undefined;
1138
- prompt?: string | undefined;
1139
- } | {
1140
- action: "list";
1141
- archived?: "include" | "only" | undefined;
1142
- } | {
1143
- action: "show";
1144
- id: string;
1145
- } | {
1146
- action: "pause";
1147
- id: string;
1148
- } | {
1149
- action: "enable";
1150
- id: string;
1151
- } | {
1152
- action: "cancel";
1153
- id: string;
1154
- };
1155
- };
1156
- } | {
1157
- output: {
1158
- code: 'capability_revoked';
1159
- message: string;
1160
- };
1161
- outputFormat: "json";
1162
- status: 401;
1163
- input: {
1164
- json: {
1165
- at?: string | undefined;
1166
- delay?: string | undefined;
1167
- latest_start?: string | undefined;
1168
- workflow?: string | undefined;
1169
- runner?: string | undefined;
1170
- model?: string | undefined;
1171
- effort?: string | undefined;
1172
- action: "update";
1173
- id: string;
1174
- name?: string | undefined;
1175
- prompt?: string | undefined;
1176
- } | {
1177
- action: "list";
1178
- archived?: "include" | "only" | undefined;
1179
- } | {
1180
- action: "show";
1181
- id: string;
1182
- } | {
1183
- action: "pause";
1184
- id: string;
1185
- } | {
1186
- action: "enable";
1187
- id: string;
1188
- } | {
1189
- action: "cancel";
1190
- id: string;
1191
- };
1192
- };
1193
- } | {
1194
- output: {
1195
- ok: false;
1196
- code: "automations_off" | "conflict" | "invalid_request" | "not_found" | "unavailable";
1197
- message: string;
1198
- } | {
1199
- ok: true;
1200
- tasks: {
1201
- id: string;
1202
- name: string;
1203
- status: "archived" | "failed" | "missed" | "paused" | "waiting";
1204
- due_at: string;
1205
- latest_start_minutes?: number | undefined;
1206
- run_id?: string | undefined;
1207
- url?: string | undefined;
1208
- }[];
1209
- } | {
1210
- ok: true;
1211
- task: {
1212
- id: string;
165
+ json: unknown;
166
+ } & {
167
+ param: {
1213
168
  name: string;
1214
- status: "archived" | "failed" | "missed" | "paused" | "waiting";
1215
- due_at: string;
1216
- latest_start_minutes?: number | undefined;
1217
- run_id?: string | undefined;
1218
- url?: string | undefined;
1219
- };
1220
- };
1221
- outputFormat: "json";
1222
- status: import("hono/utils/http-status").ContentfulStatusCode;
1223
- input: {
1224
- json: {
1225
- at?: string | undefined;
1226
- delay?: string | undefined;
1227
- latest_start?: string | undefined;
1228
- workflow?: string | undefined;
1229
- runner?: string | undefined;
1230
- model?: string | undefined;
1231
- effort?: string | undefined;
1232
- action: "update";
1233
- id: string;
1234
- name?: string | undefined;
1235
- prompt?: string | undefined;
1236
- } | {
1237
- action: "list";
1238
- archived?: "include" | "only" | undefined;
1239
- } | {
1240
- action: "show";
1241
- id: string;
1242
- } | {
1243
- action: "pause";
1244
- id: string;
1245
- } | {
1246
- action: "enable";
1247
- id: string;
1248
- } | {
1249
- action: "cancel";
1250
- id: string;
1251
169
  };
1252
170
  };
1253
171
  };
1254
172
  };
1255
- }, "/", "/api/v1/tools/scheduled-tasks">;
173
+ }, "/", "/api/v1/tools/:name">;
1256
174
  export type CiToolApp = ReturnType<typeof ciToolRoutes>;