@hearsay-tools/squawk 0.18.0-dev.5935 → 0.18.0-dev.5982

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 (94) hide show
  1. package/dist/automations/service.d.ts +1 -1
  2. package/dist/automations/service.js +1 -1
  3. package/dist/ci-wait/controller.d.ts +4 -4
  4. package/dist/ci-wait/controller.js +1 -1
  5. package/dist/ci-wait/controller.js.map +1 -1
  6. package/dist/ci-wait/tool-catalog.d.ts +1054 -0
  7. package/dist/ci-wait/tool-catalog.js +151 -0
  8. package/dist/ci-wait/tool-catalog.js.map +1 -0
  9. package/dist/ci-wait/tools.d.ts +6 -548
  10. package/dist/ci-wait/tools.js +7 -147
  11. package/dist/ci-wait/tools.js.map +1 -1
  12. package/dist/contract/automation-schedule.d.ts +9 -0
  13. package/dist/contract/automations.d.ts +1 -9
  14. package/dist/contract/index.js +1956 -1960
  15. package/dist/contract/run-status.d.ts +32 -0
  16. package/dist/contract/runs.d.ts +1 -21
  17. package/dist/core/claude-cli-runner.js +1 -1
  18. package/dist/core/claude-cli-runner.js.map +1 -1
  19. package/dist/core/codex-app-server-runner.js +1 -1
  20. package/dist/core/codex-app-server-runner.js.map +1 -1
  21. package/dist/core/cursor-print-runner.js +1 -1
  22. package/dist/core/cursor-print-runner.js.map +1 -1
  23. package/dist/core/omp-runner.js +1 -1
  24. package/dist/core/omp-runner.js.map +1 -1
  25. package/dist/core/pi-runner.js +1 -1
  26. package/dist/core/pi-runner.js.map +1 -1
  27. package/dist/delegation/routes.d.ts +20 -20
  28. package/dist/delegation/service.d.ts +1 -1
  29. package/dist/delegation/service.js +1 -1
  30. package/dist/delegation/transport.d.ts +13 -13
  31. package/dist/discovery/catalog.d.ts +2 -9
  32. package/dist/discovery/catalog.js +1 -18
  33. package/dist/discovery/catalog.js.map +1 -1
  34. package/dist/discovery/choices.d.ts +10 -0
  35. package/dist/discovery/choices.js +19 -0
  36. package/dist/discovery/choices.js.map +1 -0
  37. package/dist/preview/agent-address.js +1 -1
  38. package/dist/preview/agent-address.js.map +1 -1
  39. package/dist/preview/run-tools.js +1 -1
  40. package/dist/preview/run-tools.js.map +1 -1
  41. package/dist/runs/run-exits.d.ts +290 -290
  42. package/dist/serve-command.d.ts +1 -1
  43. package/dist/serve-command.js +1 -1
  44. package/dist/serve-command.js.map +1 -1
  45. package/dist/server/preview-cdp-socket.js +1 -1
  46. package/dist/server/preview-cdp-socket.js.map +1 -1
  47. package/dist/server/preview-socket.js +1 -1
  48. package/dist/server/preview-socket.js.map +1 -1
  49. package/dist/server/server.d.ts +34 -34
  50. package/dist/workflows/run/wait-engine.d.ts +72 -72
  51. package/package.json +4 -4
  52. package/web/dist/assets/{activity-motion-XsGcc9eM.js → activity-motion-Bqd8S9Xy.js} +2 -2
  53. package/web/dist/assets/{activity-route-DIDXHV7J.js → activity-route-DQI_8J09.js} +1 -1
  54. package/web/dist/assets/{agent-accounts-CuRvwNoA.js → agent-accounts-C6eyz75V.js} +1 -1
  55. package/web/dist/assets/{cez-idle-DtpdVf_5.js → cez-idle-NomdGTfa.js} +1 -1
  56. package/web/dist/assets/{commit-diff-panel-DtHg36xc.js → commit-diff-panel-C7BUSPzE.js} +1 -1
  57. package/web/dist/assets/{control-locations-CljaLD_b.js → control-locations-DlrUP5vD.js} +1 -1
  58. package/web/dist/assets/{diff-ImdJ4tPA.js → diff-Bwy0qFul.js} +2 -2
  59. package/web/dist/assets/{diff-view-BMqNpcSH.js → diff-view-B9kgeZTm.js} +1 -1
  60. package/web/dist/assets/{file-preview-C58stPPw.js → file-preview-DrXgM1-S.js} +1 -1
  61. package/web/dist/assets/{git-toolbar-Dzp24LO7.js → git-toolbar-B1gOn_1U.js} +1 -1
  62. package/web/dist/assets/{github-Cn0hlJsH.js → github-g-ZOTwHQ.js} +1 -1
  63. package/web/dist/assets/{github-sidebar-model-BSNdxNKJ.js → github-sidebar-model-BdoLA7qT.js} +1 -1
  64. package/web/dist/assets/{global-activity-route-D5ke1ZQa.js → global-activity-route-CZ_xwiz3.js} +1 -1
  65. package/web/dist/assets/index-75IttVLX.js +17 -0
  66. package/web/dist/assets/{live-protocol-BAiIX_Mf.js → live-protocol-DBPXI6ks.js} +1 -1
  67. package/web/dist/assets/{live-refetch-CstQIN6c.js → live-refetch-pzhdhNS_.js} +1 -1
  68. package/web/dist/assets/{preview-pane-connected-Cl-W1pDv.js → preview-pane-connected-Cx8q-Yrh.js} +1 -1
  69. package/web/dist/assets/{project-router-Dd63wBeA.js → project-router-BFKfAFvq.js} +1 -1
  70. package/web/dist/assets/project-scope-context-DSkcNKO7.js +4 -0
  71. package/web/dist/assets/{queries-BPdWfTBN.js → queries-BtScxiQP.js} +1 -1
  72. package/web/dist/assets/{repo-git-YYivBJ2x.js → repo-git-DgZuI4FP.js} +1 -1
  73. package/web/dist/assets/{report-reader-gGAlVnKU.js → report-reader-CeBtx_Sf.js} +1 -1
  74. package/web/dist/assets/reports-CRPxIRMM.js +1 -0
  75. package/web/dist/assets/{run-header-CxRJxVsR.js → run-header-C8Eeonkx.js} +2 -2
  76. package/web/dist/assets/{skills-CEFXcZA5.js → skills-DDoJCcmD.js} +1 -1
  77. package/web/dist/assets/{tab-link-CDrve3Rf.js → tab-link-DDpdYMnv.js} +1 -1
  78. package/web/dist/assets/{task-changes-Bm4gjXBb.js → task-changes-XAcKfebn.js} +1 -1
  79. package/web/dist/assets/{task-commits-DYHV533w.js → task-commits-D5V0Q0au.js} +1 -1
  80. package/web/dist/assets/{task-files-Bqvj0rbX.js → task-files-CkPJZE0w.js} +1 -1
  81. package/web/dist/assets/{task-github-item-YkTV2--_.js → task-github-item-CbCOKkvp.js} +1 -1
  82. package/web/dist/assets/{task-thread-CempX7k0.js → task-thread-DyR8HsDz.js} +5 -5
  83. package/web/dist/assets/{thread-state-BpcneWuV.js → thread-state-BtmIMbkZ.js} +1 -1
  84. package/web/dist/assets/{use-hand-to-agent-state-B9qtivFb.js → use-hand-to-agent-state-BUpbMYM9.js} +1 -1
  85. package/web/dist/assets/{useInfiniteQuery-hrWYY8aw.js → useInfiniteQuery-BmfExLUr.js} +1 -1
  86. package/web/dist/assets/useQuery-8pHkglP4.js +1 -0
  87. package/web/dist/assets/{workflows-z-CqJ0JW.js → workflows-CEFtJj_h.js} +1 -1
  88. package/web/dist/assets/{ws-Cn8d-Fu-.js → ws-CEQH0TUT.js} +1 -1
  89. package/web/dist/index.html +13 -13
  90. package/web/dist/live-worker.js +1 -1
  91. package/web/dist/assets/index-lMBPAedr.js +0 -17
  92. package/web/dist/assets/project-scope-context-wlB-Y0ii.js +0 -4
  93. package/web/dist/assets/reports-B_xpuTvK.js +0 -1
  94. package/web/dist/assets/useQuery-BHmKi9_o.js +0 -1
@@ -1,82 +1,6 @@
1
- import { productEnv } from '../core/product-env.js';
2
- import { cezarAskRequestSchema, cezarCancelWaitRequestSchema, cezarDoneRequestSchema, cezarWaitRequestSchema } from '../contract/index.js';
3
- import { ASK_LIMITS } from '../contract/index.js';
4
- import { previewStopRequestSchema, previewServeRequestSchema } from '../contract/index.js';
5
- import { scheduleTaskRequestSchema, scheduledTasksRequestSchema } from '../contract/index.js';
6
- import { z } from 'zod';
1
+ import { cezarToolDefinitions, waitToolDefinition, askToolDefinition, cancelWaitToolDefinition, doneToolDefinition, previewToolDefinition, previewStopToolDefinition, scheduleTaskToolDefinition, scheduledTasksToolDefinition } from './tool-catalog.js';
2
+ export { previewToolEnabled, automationsToolEnabled, waitToolDefinition, askToolDefinition, cancelWaitToolDefinition, doneToolDefinition, previewToolDefinition, previewStopToolDefinition, scheduleTaskToolDefinition, scheduledTasksToolDefinition, cezarToolNames, cezarToolEnvNames } from './tool-catalog.js';
7
3
  import { callCezarAsk, callCezarCancelWait, callCezarDone, callCezarWait, callPreviewServe, callPreviewStop, callScheduleTask, callScheduledTasks } from './client.js';
8
- /** Live preview is on under the exact value `1` only (spec 2026-10-02-live-preview-v1). */
9
- export function previewToolEnabled(env = process.env) {
10
- return productEnv('PREVIEW', env) === '1';
11
- }
12
- /** Automations are on unless the value is exactly `0` (spec 2026-10-02-scheduled-automations). */
13
- export function automationsToolEnabled(env = process.env) {
14
- return productEnv('AUTOMATIONS', env) !== '0';
15
- }
16
- /**
17
- * The Anthropic tool API refuses a top-level `oneOf`/`anyOf`/`allOf`, so `cezar_wait` advertises
18
- * one flat object: every kind's fields side by side, with `kind` as an enum. Each field's bounds
19
- * come from its kind's own schema; the discriminated union validates on the server.
20
- */
21
- function flatWaitInputSchema() {
22
- const properties = {};
23
- // `timeout_seconds` is in the pr, worker, request, peer and process kinds: the pr schema's bounds
24
- // (1–7200, default 1800) are the advertised ones, and the others ride in the description.
25
- for (const option of [...cezarWaitRequestSchema.options].reverse()) {
26
- Object.assign(properties, z.toJSONSchema(option, { io: 'input' }).properties);
27
- }
28
- const field = (key, description) => ({ ...properties[key], description });
29
- return {
30
- type: 'object',
31
- properties: {
32
- kind: { type: 'string', enum: cezarWaitRequestSchema.options.map(option => option.shape.kind.value), description: '"pr" waits for a GitHub pull request: its checks or its merge (see `until`); "worker" waits for workers you own; "request" waits for replies to requests you sent; "peer" waits for named peer tasks to message you or settle; "timer" wakes you after `seconds`; "process" wakes you when a background command ends.' },
33
- operation_id: field('operation_id', 'Optional retry identity. Reuse it with exactly the same arguments after an unknown outcome; never use it for a different registration.'),
34
- pr: field('pr', 'kind "pr": the HTTPS GitHub pull request URL.'),
35
- until: field('until', 'kind "pr": "checks" (default) watches checks; "merge" waits for merge or closure and ignores queue removal. After requesting a merge, use "merge_or_blocked": wakes on merge, closure, conflict, or neither queue membership nor enabled auto-merge remaining. Pending checks or a queue slot alone do not end it. All targets retain their deadline and query-error exits. Only "merged" confirms success; "blocked" requires inspection and grants no permission to retry or merge.'),
36
- wake_on_conflict: field('wake_on_conflict', 'kind "pr": Default true for "checks" and "merge". Set false when your work depends on another PR merging and you want to ignore its conflicts. "merge_or_blocked" always reports conflicts, regardless of this setting. With "checks", a conflicting PR may have no checks, ending as no_checks or deadline.'),
37
- worker_ids: field('worker_ids', 'kind "worker": the workers you own to wait for (1–32 unique ids).'),
38
- request_ids: field('request_ids', 'kind "request": the requests you sent, to a worker, your parent or a peer task, to wait for a reply to (1–32 unique ids).'),
39
- peer_ids: field('peer_ids', 'kind "peer": the peer root tasks of this project to wait for (1–32 unique task ids; find them with `hsq message tasks`). A message from one of them, or one of them settling, ends the wait; other messages wake you and keep it open.'),
40
- mode: field('mode', 'kind "worker" or "request": "any" wakes you when one selected id settles (default), "all" when every one has, "one" takes exactly one id.'),
41
- timeout_seconds: field('timeout_seconds', 'The deadline in seconds. kind "pr": 1–7200, default 1800. kind "worker", "request" or "peer": 1–7200, default 600 (the default shown is the pr one). kind "process": 1–7200, default 1800.'),
42
- seconds: field('seconds', 'kind "timer": seconds until the wake (60–7200).'),
43
- pid: field('pid', 'kind "process": the PID of the background command: the `pid` the job start command printed.'),
44
- exit_file: field('exit_file', 'kind "process": optional. Only a file that your own wrapper writes the exit code to, in $TMPDIR or the worktree, with a new name for each command. Leave it out for a command that is already running or that writes its status file somewhere else.'),
45
- note: field('note', 'kind "timer" or "process": what to re-check, handed back to you at the wake.'),
46
- },
47
- required: ['kind'],
48
- additionalProperties: false,
49
- };
50
- }
51
- export const waitToolDefinition = {
52
- name: 'cezar_wait',
53
- description: 'Open a wait on something outside this turn: a GitHub pull request\'s checks or its merge (kind "pr"), workers you own (kind "worker"), the replies to requests you sent (kind "request"), named peer tasks that may message you or settle (kind "peer"), a timer (kind "timer"), or a background command (kind "process"). End your turn after it answers; Cezar wakes you when any open wait resolves, with its result. A human message wakes you too and closes no wait; only a message from a peer that a peer wait names closes that wait. Several waits can be open at once; the answer lists them. To wait for the user, call cezar_ask. A checks observation is not merge approval; only a merge wait\'s "merged" outcome means the PR merged. Times in the answers, such as `deadline`, are UTC. ' +
54
- // hearsay-tools/cezarion#3097: Codex ends a command's process group when the command returns,
55
- // so a plain `&` job dies there, and `setsid … & echo $!` prints a dead PID under Claude.
56
- 'kind "process" wakes you when a background command ends. To start one yourself, run ' +
57
- '`hsq job start <name> -- <command> [args...]` (your instructions give the full command for this session under "Long commands") ' +
58
- 'and pass the `pid` and `exitFile` it prints as `pid` and `exit_file`, so the wake reports the exit code. ' +
59
- 'It writes the command\'s output to the `log` file it prints, refuses a name that still runs, and the job outlives this session; Cezar does not stop it. ' +
60
- 'Its files are in $TMPDIR, which Cezar removes when the task ends: for a job that must outlive the task, add `--dir <a git-ignored directory in the worktree>` before `--`. ' +
61
- 'Do not start a long command with `&`, `nohup`, `setsid` or your own background-task tool: it can end with the shell call or the session, or leave you a PID that is not the command\'s. ' +
62
- // A batch that writes its exit file outside $TMPDIR made agents start a watcher to copy it in.
63
- 'For a command that is already running, or that writes its own status file somewhere else, pass only its `pid` and leave `exit_file` out. ' +
64
- 'The wake then reports `exited` without a code: read the command\'s own log or status file after it. ' +
65
- 'Never start a watcher or helper process to copy a file into $TMPDIR. ' +
66
- 'An unchanged repeat names the retained wait. A changed timeout is refused and keeps that wait active; do not cancel it as a duplicate. On an unknown outcome retry the same operation_id and arguments, without a fallback timer.',
67
- inputSchema: flatWaitInputSchema(),
68
- };
69
- /**
70
- * hearsay-tools/cezarion#1234: the user's answer gets its own tool, so its card is required and
71
- * `cezar_wait` never has to explain a field only one kind takes. hearsay-tools/cezarion#1458: the
72
- * texts are research task 77dfb5c4's tested ones; on Claude, prose between tool calls may never
73
- * reach the user, so the content rides in `context`.
74
- */
75
- export const askToolDefinition = {
76
- name: 'cezar_ask',
77
- description: `Ask the user for a decision or missing input. Put the full draft, findings, evidence and option meanings needed for the decision in context. Cezar renders context as Markdown above the question card. The user cannot see your reasoning or rejected tool calls. The question is a short choice, not the place for supporting detail. Each question takes a header of at most ${ASK_LIMITS.header} characters, a short question of at most ${ASK_LIMITS.question} characters, and ${ASK_LIMITS.minOptions}–${ASK_LIMITS.maxOptions} options shown as choices; leave the options out to let the user type the answer. The user can always type a reply of their own. Other open waits keep running while you wait. Then end your turn; the user's answer wakes you.`,
78
- inputSchema: { ...z.toJSONSchema(cezarAskRequestSchema, { io: 'input' }), type: 'object' },
79
- };
80
4
  /**
81
5
  * hearsay-tools/cezarion#1428: agents asked about drafts they never sent, and treated the context
82
6
  * they cut from a rejected card as sent. Both hints say where that context belongs: `context`.
@@ -92,11 +16,6 @@ export async function invokeAskTool(input) {
92
16
  const answer = await callCezarAsk(input);
93
17
  return { content: [{ type: 'text', text: `${JSON.stringify(answer)}\n${askAnswerHint(answer)}` }], isError: !answer.ok, details: answer };
94
18
  }
95
- export const cancelWaitToolDefinition = {
96
- name: 'cezar_cancel_wait',
97
- description: 'Close a wait you opened with cezar_wait (PR, worker, request, peer, process or timer) or cezar_ask, by its wait_id, so it never wakes you. A question the user already sees cannot be cancelled; only their answer ends it. A wait that already resolved is delivered with your next wake anyway; the answer says so and lists the waits still open.',
98
- inputSchema: { ...z.toJSONSchema(cezarCancelWaitRequestSchema, { io: 'input' }), type: 'object' },
99
- };
100
19
  /** JSON first, then one hint sentence, as `invokePreviewTool` answers. */
101
20
  export function waitAnswerHint(answer) {
102
21
  if (!answer.ok)
@@ -120,13 +39,6 @@ export async function invokeCancelWaitTool(input) {
120
39
  const hint = answer.cancelled ? 'Cancelled. The waits in open_waits stay open.' : 'Not cancelled. Check the message and the waits in open_waits.';
121
40
  return { content: [{ type: 'text', text: `${JSON.stringify(answer)}\n${hint}` }], isError: !answer.cancelled, details: answer };
122
41
  }
123
- /** hearsay-tools/cezarion#1234: the agent declares the task (or step) done; since
124
- * hearsay-tools/cezarion#2397 it is the only way to. */
125
- export const doneToolDefinition = {
126
- name: 'cezar_done',
127
- description: 'Finish the task, or in a workflow step that is not the last, finish that step. Call it when the goal is fully achieved and verified and you have no question for the user; end your turn after it answers. Cezar closes the session at the end of this turn and cancels every open wait; after a step, Cezar starts the next step, and the answer names it. It refuses, naming what to do first, while owned workers are live or uncollected, a worker question is unanswered, or your question to the user is still pending.',
128
- inputSchema: { ...z.toJSONSchema(cezarDoneRequestSchema, { io: 'input' }), type: 'object' },
129
- };
130
42
  export async function invokeDoneTool(input) {
131
43
  const answer = await callCezarDone(input);
132
44
  const hint = !answer.ok ? 'Not finished. Do what the message says, then call cezar_done again.'
@@ -134,57 +46,16 @@ export async function invokeDoneTool(input) {
134
46
  : 'Accepted. End your turn; Cezar finishes the task at its end.';
135
47
  return { content: [{ type: 'text', text: `${JSON.stringify(answer)}\n${hint}` }], isError: !answer.ok, details: answer };
136
48
  }
137
- export const previewToolDefinition = {
138
- name: 'cezar_preview_serve',
139
- description: 'Register a web dev server of this task so the user can click through it in the cockpit\'s live preview. Always pin the port (`vite --strictPort`, `next dev -p`) so the server comes up on the port you register. Cezar starts the command itself when the user opens the preview; do not wait for the user. ' +
140
- 'To drive the browser the user sees, connect to `$CEZ_PREVIEW_CDP_URL` when it is set, e.g. `agent-browser --cdp "$CEZ_PREVIEW_CDP_URL" --pin-tab open http://localhost:5173`; the user watches your page live. `agent-browser record` needs ffmpeg on PATH.',
141
- inputSchema: { ...z.toJSONSchema(previewServeRequestSchema, { io: 'input' }), type: 'object' },
142
- };
143
49
  /** JSON first, then the hint as a plain sentence: the shape every cezar tool answers in. */
144
50
  export async function invokePreviewTool(input) {
145
51
  const result = await callPreviewServe(input);
146
52
  return { content: [{ type: 'text', text: `${JSON.stringify(result)}\n${result.hint}` }], isError: !result.ok, details: result };
147
53
  }
148
- export const previewStopToolDefinition = {
149
- name: 'cezar_preview_stop',
150
- description: 'Stop a preview server Cezar started for your own task. Set restart to true to reuse the unchanged command the owner approved, including after a crash. Adopted servers cannot be stopped; changed registrations need the owner to press Run and open again.',
151
- inputSchema: { ...z.toJSONSchema(previewStopRequestSchema, { io: 'input' }), type: 'object' },
152
- };
153
54
  export async function invokePreviewStopTool(input) {
154
55
  const result = await callPreviewStop(input);
155
56
  return { content: [{ type: 'text', text: `${JSON.stringify(result)}\n${result.hint}` }], isError: !result.ok, details: result };
156
57
  }
157
58
  const PREVIEW_STOP_TOOL = { definition: previewStopToolDefinition, trigger: 'load when your Cezar-started preview server needs stopping or restarting.', label: 'Stop live preview', invoke: invokePreviewStopTool };
158
- /**
159
- * hearsay-tools/cezarion#1465: a one-time schedule starts later as an ordinary task, so the agent
160
- * does not keep a session parked on timers for days. `cezar_scheduled_tasks` takes one action per
161
- * call; its union is advertised as one flat object for the same reason as `cezar_wait`.
162
- */
163
- export const scheduleTaskToolDefinition = {
164
- name: 'cezar_schedule_task',
165
- description: 'Schedule a new task to start once, later, in this project: give a name, the full prompt the task starts from, and either `at` (a UTC time YYYY-MM-DDTHH:MMZ, like every time in Cezar tools) or `delay` (30m, 6h, 7d of elapsed time from now). For a relative time ("in 2 hours"), use `delay`. For a clock time that the user names, convert it from the user\'s time zone to UTC. `latest_start` (10m to 30d) bounds how late it may still start after Cezarion was down; past it the schedule is marked missed. Pass enable: true only when the user\'s request asks for the work to run later; otherwise it is created paused for the user to enable. The new task does not see this conversation, so put every detail it needs in the prompt. The answer gives `due_at` in UTC. The cockpit shows the schedule in local time.',
166
- inputSchema: { ...z.toJSONSchema(scheduleTaskRequestSchema, { io: 'input' }), type: 'object' },
167
- };
168
- function flatScheduledTasksInputSchema() {
169
- const properties = {};
170
- for (const option of scheduledTasksRequestSchema.options)
171
- Object.assign(properties, z.toJSONSchema(option, { io: 'input' }).properties);
172
- return {
173
- type: 'object',
174
- properties: {
175
- ...properties,
176
- action: { type: 'string', enum: scheduledTasksRequestSchema.options.map(option => option.shape.action.value), description: '"list" lists the one-time schedules of this project; "show", "update", "pause", "enable" and "cancel" take the `id` a list or a create answered.' },
177
- archived: { ...properties.archived, description: 'action "list": "include" adds the archived schedules, "only" lists just them.' },
178
- },
179
- required: ['action'],
180
- additionalProperties: false,
181
- };
182
- }
183
- export const scheduledTasksToolDefinition = {
184
- name: 'cezar_scheduled_tasks',
185
- description: 'List, show, update, pause, enable or cancel the one-time scheduled tasks of this project, one action per call. Change only the schedules the user asked you to manage. "update" takes the same fields as cezar_schedule_task; a new `at` or `delay` must be in the future. "cancel" archives the schedule so it never starts; an archived schedule cannot change.',
186
- inputSchema: flatScheduledTasksInputSchema(),
187
- };
188
59
  function scheduleHint(answer) {
189
60
  if (answer.ok)
190
61
  return 'Done. due_at is UTC: tell the user that time in their time zone, and name the zone.';
@@ -205,23 +76,12 @@ const ASK_TOOL = { definition: askToolDefinition, trigger: 'load for a user deci
205
76
  const CANCEL_WAIT_TOOL = { definition: cancelWaitToolDefinition, trigger: 'load when a wait you registered is no longer needed.', label: 'Cancel wait', invoke: invokeCancelWaitTool };
206
77
  const DONE_TOOL = { definition: doneToolDefinition, trigger: 'load when the task is complete and verified.', label: 'Done', invoke: invokeDoneTool };
207
78
  const PREVIEW_TOOL = { definition: previewToolDefinition, trigger: 'load when you have started, or are about to start, a web server the user should click through.', label: 'Live preview', invoke: invokePreviewTool };
79
+ const TOOLS_BY_NAME = new Map([
80
+ WAIT_TOOL, ASK_TOOL, CANCEL_WAIT_TOOL, DONE_TOOL,
81
+ PREVIEW_TOOL, PREVIEW_STOP_TOOL, SCHEDULE_TASK_TOOL, SCHEDULED_TASKS_TOOL,
82
+ ].map(tool => [tool.definition.name, tool]));
208
83
  export function cezarTools(env = process.env) {
209
- return [
210
- WAIT_TOOL, ASK_TOOL, CANCEL_WAIT_TOOL, DONE_TOOL,
211
- ...(previewToolEnabled(env) ? [PREVIEW_TOOL, PREVIEW_STOP_TOOL] : []),
212
- ...(automationsToolEnabled(env) ? [SCHEDULE_TASK_TOOL, SCHEDULED_TASKS_TOOL] : []),
213
- ];
214
- }
215
- export function cezarToolNames(env = process.env) {
216
- return cezarTools(env).map(tool => tool.definition.name);
217
- }
218
- /**
219
- * Env names a harness must forward to the adapter process. Several harnesses spawn MCP servers
220
- * from an allowlist, so preview opt-in and automations opt-out must both reach the adapter.
221
- */
222
- export function cezarToolEnvNames(env = process.env) {
223
- return ['CEZ_TOOL_TOKEN', 'CEZ_TOOL_SOCKET', 'CEZ_AUTOMATIONS', ...(previewToolEnabled(env) ? ['CEZ_PREVIEW'] : [])]
224
- .flatMap(name => { const preferred = name.replace(/^CEZ_/, 'HSQ_'); return env[preferred] === undefined ? [name] : [name, preferred]; });
84
+ return cezarToolDefinitions(env).map(definition => TOOLS_BY_NAME.get(definition.name));
225
85
  }
226
86
  export function cezarServerInstructions(env = process.env) {
227
87
  return [
@@ -1 +1 @@
1
- {"version":3,"file":"tools.js","sourceRoot":"","sources":["../../src/ci-wait/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,qBAAqB,EAAE,4BAA4B,EAAE,sBAAsB,EAAE,sBAAsB,EAA6C,MAAM,oCAAoC,CAAC;AACpM,OAAO,EAAE,UAAU,EAAE,MAAM,yCAAyC,CAAC;AACrE,OAAO,EAAE,wBAAwB,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AAC3G,OAAO,EAAE,yBAAyB,EAAE,2BAA2B,EAAsD,MAAM,8CAA8C,CAAC;AAC1K,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,aAAa,EAAE,aAAa,EAAE,gBAAgB,EAAE,eAAe,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAgBvK,2FAA2F;AAC3F,MAAM,UAAU,kBAAkB,CAAC,GAAG,GAAsB,OAAO,CAAC,GAAG;IACrE,OAAO,UAAU,CAAC,SAAS,EAAE,GAAG,CAAC,KAAK,GAAG,CAAC;AAC5C,CAAC;AAED,kGAAkG;AAClG,MAAM,UAAU,sBAAsB,CAAC,GAAG,GAAsB,OAAO,CAAC,GAAG;IACzE,OAAO,UAAU,CAAC,aAAa,EAAE,GAAG,CAAC,KAAK,GAAG,CAAC;AAChD,CAAC;AAED;;;;GAIG;AACH,SAAS,mBAAmB;IAC1B,MAAM,UAAU,GAA4B,EAAE,CAAC;IAC/C,kGAAkG;IAClG,0FAA0F;IAC1F,KAAK,MAAM,MAAM,IAAI,CAAC,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AAgB,EAAE,SAAS;IAChD,YAAY,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,oBAAoB;CAC1E,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;AAE7C,MAAM,UAAU,UAAU,CAAC,GAAG,GAAsB,OAAO,CAAC,GAAG;IAC7D,OAAO,oBAAoB,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC,aAAa,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,CAAE,CAAC,CAAC;AAC1F,CAAC;AAED,MAAM,UAAU,uBAAuB,CAAC,GAAG,GAAsB,OAAO,CAAC,GAAG;IAC1E,OAAO;QACL,kHAAkH;QAClH,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,IAAI,CAAC,UAAU,CAAC,IAAI,KAAK,IAAI,CAAC,OAAO,EAAE,CAAC;KAC7E,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
@@ -15,6 +15,15 @@ export declare const ONCE_MIN_LATEST_START_MINUTES = 10;
15
15
  export declare const ONCE_MAX_LATEST_START_MINUTES = 43200;
16
16
  /** The refusal of a one-time schedule whose time has passed: the server's 400 and the editor's field message. */
17
17
  export declare const ONCE_PAST_DUE_MESSAGE = "the due time has passed; choose a later time or use Run now";
18
+ /** Where a one-time schedule stands, derived by the server so clients never re-derive it. */
19
+ export declare const onceStatusSchema: z.ZodEnum<{
20
+ archived: "archived";
21
+ failed: "failed";
22
+ missed: "missed";
23
+ paused: "paused";
24
+ waiting: "waiting";
25
+ }>;
26
+ export type OnceStatus = z.infer<typeof onceStatusSchema>;
18
27
  export declare function unknownTimeZoneMessage(zone: string): string;
19
28
  export declare const automationScheduleSchema: z.ZodObject<{
20
29
  type: z.ZodEnum<{
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ export { onceStatusSchema, type OnceStatus } from './automation-schedule.ts';
2
3
  /**
3
4
  * Closed automation wire schemas. Storage schemas preserve unknown keys separately. Parity
4
5
  * checks compare named response fields in both directions; open storage catchalls limit
@@ -124,15 +125,6 @@ export declare const automationArchiveSchema: z.ZodObject<{
124
125
  }>>;
125
126
  }, z.core.$strip>;
126
127
  export type AutomationArchive = z.infer<typeof automationArchiveSchema>;
127
- /** Where a one-time schedule stands, derived by the server so clients never re-derive it. */
128
- export declare const onceStatusSchema: z.ZodEnum<{
129
- archived: "archived";
130
- failed: "failed";
131
- missed: "missed";
132
- paused: "paused";
133
- waiting: "waiting";
134
- }>;
135
- export type OnceStatus = z.infer<typeof onceStatusSchema>;
136
128
  /** One stored automation, as every route that answers a single definition serves it. */
137
129
  export declare const automationDefinitionSchema: z.ZodObject<{
138
130
  id: z.ZodString;