@hearsay-tools/squawk 0.18.0-pr3435.6000.2 → 0.18.0-pr3437.6046
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.
- package/dist/ci-wait/client.d.ts +5 -5
- package/dist/ci-wait/client.js +10 -10
- package/dist/ci-wait/client.js.map +1 -1
- package/dist/ci-wait/controller.d.ts +48 -48
- package/dist/ci-wait/controller.js +9 -9
- package/dist/ci-wait/controller.js.map +1 -1
- package/dist/ci-wait/injection.js +2 -2
- package/dist/ci-wait/injection.js.map +1 -1
- package/dist/ci-wait/mcp.js +3 -3
- package/dist/ci-wait/mcp.js.map +1 -1
- package/dist/ci-wait/tool-catalog.d.ts +3 -3
- package/dist/ci-wait/tool-catalog.js +10 -10
- package/dist/ci-wait/tool-catalog.js.map +1 -1
- package/dist/ci-wait/tools.d.ts +7 -7
- package/dist/ci-wait/tools.js +11 -11
- package/dist/ci-wait/tools.js.map +1 -1
- package/dist/contract/ask-schema.d.ts +1 -1
- package/dist/contract/index.js +16 -16
- package/dist/contract/waits.d.ts +17 -17
- package/dist/core/agent-runner.d.ts +1 -1
- package/dist/core/agent-runner.js +1 -1
- package/dist/core/agent-runner.js.map +1 -1
- package/dist/core/claude-cli-runner.js +14 -14
- package/dist/core/claude-cli-runner.js.map +1 -1
- package/dist/core/claude-stream.d.ts +1 -1
- package/dist/core/claude-stream.js +2 -2
- package/dist/core/claude-stream.js.map +1 -1
- package/dist/core/codex-app-server-runner.js +15 -15
- package/dist/core/codex-app-server-runner.js.map +1 -1
- package/dist/core/codex-approvals.d.ts +2 -2
- package/dist/core/codex-approvals.js +5 -5
- package/dist/core/codex-approvals.js.map +1 -1
- package/dist/core/codex-native-frames.d.ts +4 -4
- package/dist/core/codex-native-frames.js +5 -5
- package/dist/core/codex-native-frames.js.map +1 -1
- package/dist/core/cursor-print-runner.js +7 -7
- package/dist/core/cursor-print-runner.js.map +1 -1
- package/dist/core/omp-runner.d.ts +1 -1
- package/dist/core/omp-runner.js +13 -13
- package/dist/core/omp-runner.js.map +1 -1
- package/dist/core/opencode-server-runner.js +4 -4
- package/dist/core/opencode-server-runner.js.map +1 -1
- package/dist/core/pi-rpc-turn.d.ts +1 -1
- package/dist/core/pi-rpc-turn.js +1 -1
- package/dist/core/pi-rpc-turn.js.map +1 -1
- package/dist/core/pi-runner.js +14 -14
- package/dist/core/pi-runner.js.map +1 -1
- package/dist/delegation/park-notice.js +2 -2
- package/dist/delegation/park-notice.js.map +1 -1
- package/dist/home/boundary.js +4 -4
- package/dist/home/boundary.js.map +1 -1
- package/dist/home/home.js +2 -2
- package/dist/home/home.js.map +1 -1
- package/dist/home/install-marker.js +3 -3
- package/dist/home/install-marker.js.map +1 -1
- package/dist/home/migrate.js +2 -2
- package/dist/home/migrate.js.map +1 -1
- package/dist/home/migration-plan.d.ts +1 -1
- package/dist/home/migration-plan.js +1 -1
- package/dist/home/migration-plan.js.map +1 -1
- package/dist/home/store.js +2 -2
- package/dist/home/store.js.map +1 -1
- package/dist/managed-install/launcher.js +3 -3
- package/dist/managed-install/launcher.js.map +1 -1
- package/dist/paths.d.ts +1 -1
- package/dist/paths.js +1 -1
- package/dist/paths.js.map +1 -1
- package/dist/preview/registration.d.ts +1 -1
- package/dist/preview/registration.js +1 -1
- package/dist/preview/registration.js.map +1 -1
- package/dist/preview/run-tools.d.ts +2 -2
- package/dist/preview/run-tools.js +5 -5
- package/dist/preview/run-tools.js.map +1 -1
- package/dist/serve-command.js +4 -3
- package/dist/serve-command.js.map +1 -1
- package/dist/server/project-context.d.ts +6 -2
- package/dist/server/project-context.js +8 -5
- package/dist/server/project-context.js.map +1 -1
- package/dist/server/server.d.ts +5 -3
- package/dist/server/server.js +9 -10
- package/dist/server/server.js.map +1 -1
- package/dist/server/start-run-options.d.ts +2 -1
- package/dist/server/start-run-options.js +1 -1
- package/dist/server/start-run-options.js.map +1 -1
- package/dist/server/workspace-projects.d.ts +2 -2
- package/dist/server/workspace-projects.js +1 -0
- package/dist/server/workspace-projects.js.map +1 -1
- package/dist/server-install/platforms/macosx-ngrok.d.ts +2 -2
- package/dist/server-install/platforms/macosx-ngrok.js +8 -8
- package/dist/server-install/platforms/macosx-ngrok.js.map +1 -1
- package/dist/server-install/platforms/ubuntu-vps-migration.d.ts +1 -1
- package/dist/server-install/platforms/ubuntu-vps-migration.js +1 -1
- package/dist/server-install/platforms/ubuntu-vps-migration.js.map +1 -1
- package/dist/server-install/platforms/ubuntu-vps-redeploy.d.ts +1 -1
- package/dist/server-install/platforms/ubuntu-vps-redeploy.js +1 -1
- package/dist/server-install/platforms/ubuntu-vps-redeploy.js.map +1 -1
- package/dist/server-install/platforms/ubuntu-vps.js +11 -11
- package/dist/server-install/platforms/ubuntu-vps.js.map +1 -1
- package/dist/workflows/completion-policy.d.ts +2 -2
- package/dist/workflows/run/compose.d.ts +8 -8
- package/dist/workflows/run/compose.js +6 -6
- package/dist/workflows/run/compose.js.map +1 -1
- package/dist/workflows/run/continuation-session.js +2 -2
- package/dist/workflows/run/continuation-session.js.map +1 -1
- package/dist/workflows/run/human-waits.d.ts +5 -5
- package/dist/workflows/run/human-waits.js +10 -10
- package/dist/workflows/run/human-waits.js.map +1 -1
- package/dist/workflows/run/run-finish.d.ts +2 -2
- package/dist/workflows/run/run-finish.js +3 -3
- package/dist/workflows/run/run-finish.js.map +1 -1
- package/dist/workflows/run/run-recovery.js +3 -3
- package/dist/workflows/run/run-recovery.js.map +1 -1
- package/dist/workflows/run/run-settlement.js +1 -1
- package/dist/workflows/run/run-settlement.js.map +1 -1
- package/dist/workflows/run/{cezar-tools.d.ts → squawk-tools.d.ts} +7 -7
- package/dist/workflows/run/{cezar-tools.js → squawk-tools.js} +3 -3
- package/dist/workflows/run/squawk-tools.js.map +1 -0
- package/dist/workflows/run/step-loop.js +1 -1
- package/dist/workflows/run/step-loop.js.map +1 -1
- package/dist/workflows/run/step-session.js +1 -1
- package/dist/workflows/run/step-session.js.map +1 -1
- package/dist/workflows/run/turn-settler.js +5 -5
- package/dist/workflows/run/turn-settler.js.map +1 -1
- package/dist/workflows/run/wait-engine.d.ts +1 -1
- package/dist/workflows/run/wait-engine.js +1 -1
- package/dist/workflows/run/wait-engine.js.map +1 -1
- package/dist/workflows/run/wait-kinds.d.ts +19 -19
- package/dist/workflows/run/wait-kinds.js +2 -2
- package/dist/workflows/run/wait-kinds.js.map +1 -1
- package/dist/workflows/run/wait-registration-tool.d.ts +3 -3
- package/dist/workflows/run/wait-registration-tool.js +2 -2
- package/dist/workflows/run/wait-registration-tool.js.map +1 -1
- package/dist/workflows/run/wait-registration.d.ts +2 -2
- package/dist/workflows/run/wait-registration.js.map +1 -1
- package/dist/workflows/run/wait-registry.d.ts +3 -3
- package/dist/workflows/run/wait-registry.js +4 -4
- package/dist/workflows/run/wait-registry.js.map +1 -1
- package/dist/workflows/run/worker-questions.d.ts +1 -1
- package/dist/workflows/run/worker-questions.js +2 -2
- package/dist/workflows/run/worker-questions.js.map +1 -1
- package/dist/workflows/run-states.js +1 -1
- package/dist/workflows/run-states.js.map +1 -1
- package/dist/workflows/run.d.ts +6 -6
- package/dist/workflows/run.js +6 -6
- package/dist/workflows/run.js.map +1 -1
- package/dist/workflows/turn-end.d.ts +1 -1
- package/dist/workflows/turn-end.js +1 -1
- package/dist/workflows/turn-end.js.map +1 -1
- package/dist/workflows/wait-scope.d.ts +2 -2
- package/dist/workflows/wait-scope.js.map +1 -1
- package/dist/workflows/waits.d.ts +1 -1
- package/dist/workflows/waits.js +3 -3
- package/dist/workflows/waits.js.map +1 -1
- package/dist/workspace/backups.js +6 -6
- package/dist/workspace/backups.js.map +1 -1
- package/package.json +4 -4
- package/scripts/benchmark-run-store.ts +2 -1
- package/scripts/benchmark-workspace-events.ts +2 -1
- package/scripts/measure-transcript-facts-health.mjs +2 -1
- package/scripts/mock-ci-tool.mjs +9 -9
- package/scripts/mock-codex-app-server.mjs +4 -4
- package/scripts/omp-ci-wait.mjs +2 -2
- package/scripts/opencode-task-scope.d.mts +1 -1
- package/scripts/opencode-task-scope.mjs +1 -1
- package/scripts/pi-ci-wait.mjs +2 -2
- package/web/dist/assets/activity-motion-Dld5ms7x.js +2 -0
- package/web/dist/assets/{activity-route-DQI_8J09.js → activity-route-CNZPeNfz.js} +1 -1
- package/web/dist/assets/{agent-accounts-C6eyz75V.js → agent-accounts-B-Gpf8IN.js} +1 -1
- package/web/dist/assets/attention-VmnPpwJx.js +1 -0
- package/web/dist/assets/{commit-diff-panel-C7BUSPzE.js → commit-diff-panel-NClCG68F.js} +1 -1
- package/web/dist/assets/control-locations-B88tMDqg.js +1 -0
- package/web/dist/assets/diff-nIehE-T6.js +3 -0
- package/web/dist/assets/{diff-view-B9kgeZTm.js → diff-view-DcvEkA3I.js} +1 -1
- package/web/dist/assets/{file-preview-DrXgM1-S.js → file-preview-D5OEhi_p.js} +1 -1
- package/web/dist/assets/{git-toolbar-B1gOn_1U.js → git-toolbar-6nOTPb_C.js} +1 -1
- package/web/dist/assets/github-kqE3kY6l.js +1 -0
- package/web/dist/assets/github-sidebar-model-DkUAF09l.js +1 -0
- package/web/dist/assets/{global-activity-route-CZ_xwiz3.js → global-activity-route-BExanylS.js} +1 -1
- package/web/dist/assets/{index-75IttVLX.js → index-DBNT3CYH.js} +11 -11
- package/web/dist/assets/live-refetch-CZb2VOyu.js +1 -0
- package/web/dist/assets/popover-G6KGT-qq.js +1 -0
- package/web/dist/assets/{preview-pane-connected-Cx8q-Yrh.js → preview-pane-connected-BN0BWrKD.js} +1 -1
- package/web/dist/assets/queries-D2MPDhtr.js +1 -0
- package/web/dist/assets/repo-git-CPEbNCTy.js +1 -0
- package/web/dist/assets/{report-reader-CeBtx_Sf.js → report-reader-Ltc8JdIV.js} +1 -1
- package/web/dist/assets/{reports-CRPxIRMM.js → reports-DHuR8gwU.js} +1 -1
- package/web/dist/assets/run-header-BDtR-uVy.js +2 -0
- package/web/dist/assets/{skills-DDoJCcmD.js → skills-DTowIB5z.js} +1 -1
- package/web/dist/assets/task-changes-NqJ_-tod.js +1 -0
- package/web/dist/assets/task-commits-BbhrfhCT.js +1 -0
- package/web/dist/assets/{task-files-CkPJZE0w.js → task-files-n29-eIMD.js} +1 -1
- package/web/dist/assets/task-github-item-BwS8ltjs.js +1 -0
- package/web/dist/assets/task-thread-DkF28KyV.js +9 -0
- package/web/dist/assets/{thread-state-BtmIMbkZ.js → thread-state-C8XI1WNf.js} +1 -1
- package/web/dist/assets/use-hand-to-agent-state-CY43kvaa.js +1 -0
- package/web/dist/assets/workflows-CWFMDlCn.js +7 -0
- package/web/dist/index.html +10 -9
- package/dist/workflows/run/cezar-tools.js.map +0 -1
- package/web/dist/assets/activity-motion-Bqd8S9Xy.js +0 -2
- package/web/dist/assets/control-locations-DlrUP5vD.js +0 -1
- package/web/dist/assets/diff-Bwy0qFul.js +0 -3
- package/web/dist/assets/github-g-ZOTwHQ.js +0 -1
- package/web/dist/assets/github-sidebar-model-BdoLA7qT.js +0 -1
- package/web/dist/assets/live-refetch-pzhdhNS_.js +0 -1
- package/web/dist/assets/popover-N-u5z2xh.js +0 -1
- package/web/dist/assets/queries-BtScxiQP.js +0 -1
- package/web/dist/assets/repo-git-DgZuI4FP.js +0 -1
- package/web/dist/assets/run-header-C8Eeonkx.js +0 -2
- package/web/dist/assets/task-changes-XAcKfebn.js +0 -1
- package/web/dist/assets/task-commits-D5V0Q0au.js +0 -1
- package/web/dist/assets/task-github-item-CbCOKkvp.js +0 -1
- package/web/dist/assets/task-thread-DyR8HsDz.js +0 -9
- package/web/dist/assets/use-hand-to-agent-state-BUpbMYM9.js +0 -1
- package/web/dist/assets/workflows-CEFtJj_h.js +0 -7
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { productEnv } from '../core/product-env.js';
|
|
2
|
-
import {
|
|
2
|
+
import { squawkAskRequestSchema, squawkCancelWaitRequestSchema, squawkDoneRequestSchema, squawkWaitRequestSchema } from '../contract/index.js';
|
|
3
3
|
import { ASK_LIMITS } from '../contract/index.js';
|
|
4
4
|
import { previewStopRequestSchema, previewServeRequestSchema } from '../contract/index.js';
|
|
5
5
|
import { scheduleTaskRequestSchema, scheduledTasksRequestSchema } from '../contract/index.js';
|
|
@@ -21,14 +21,14 @@ function flatWaitInputSchema() {
|
|
|
21
21
|
const properties = {};
|
|
22
22
|
// `timeout_seconds` is in the pr, worker, request, peer and process kinds: the pr schema's bounds
|
|
23
23
|
// (1–7200, default 1800) are the advertised ones, and the others ride in the description.
|
|
24
|
-
for (const option of [...
|
|
24
|
+
for (const option of [...squawkWaitRequestSchema.options].reverse()) {
|
|
25
25
|
Object.assign(properties, z.toJSONSchema(option, { io: 'input' }).properties);
|
|
26
26
|
}
|
|
27
27
|
const field = (key, description) => ({ ...properties[key], description });
|
|
28
28
|
return {
|
|
29
29
|
type: 'object',
|
|
30
30
|
properties: {
|
|
31
|
-
kind: { type: 'string', enum:
|
|
31
|
+
kind: { type: 'string', enum: squawkWaitRequestSchema.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.' },
|
|
32
32
|
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.'),
|
|
33
33
|
pr: field('pr', 'kind "pr": the HTTPS GitHub pull request URL.'),
|
|
34
34
|
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.'),
|
|
@@ -74,19 +74,19 @@ export const waitToolDefinition = {
|
|
|
74
74
|
export const askToolDefinition = {
|
|
75
75
|
name: 'cezar_ask',
|
|
76
76
|
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.`,
|
|
77
|
-
inputSchema: { ...z.toJSONSchema(
|
|
77
|
+
inputSchema: { ...z.toJSONSchema(squawkAskRequestSchema, { io: 'input' }), type: 'object' },
|
|
78
78
|
};
|
|
79
79
|
export const cancelWaitToolDefinition = {
|
|
80
80
|
name: 'cezar_cancel_wait',
|
|
81
81
|
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.',
|
|
82
|
-
inputSchema: { ...z.toJSONSchema(
|
|
82
|
+
inputSchema: { ...z.toJSONSchema(squawkCancelWaitRequestSchema, { io: 'input' }), type: 'object' },
|
|
83
83
|
};
|
|
84
84
|
/** hearsay-tools/cezarion#1234: the agent declares the task (or step) done; since
|
|
85
85
|
* hearsay-tools/cezarion#2397 it is the only way to. */
|
|
86
86
|
export const doneToolDefinition = {
|
|
87
87
|
name: 'cezar_done',
|
|
88
88
|
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.',
|
|
89
|
-
inputSchema: { ...z.toJSONSchema(
|
|
89
|
+
inputSchema: { ...z.toJSONSchema(squawkDoneRequestSchema, { io: 'input' }), type: 'object' },
|
|
90
90
|
};
|
|
91
91
|
export const previewToolDefinition = {
|
|
92
92
|
name: 'cezar_preview_serve',
|
|
@@ -130,21 +130,21 @@ export const scheduledTasksToolDefinition = {
|
|
|
130
130
|
inputSchema: flatScheduledTasksInputSchema(),
|
|
131
131
|
};
|
|
132
132
|
/** Tool definitions in the same order every adapter advertises them. */
|
|
133
|
-
export function
|
|
133
|
+
export function squawkToolDefinitions(env = process.env) {
|
|
134
134
|
return [
|
|
135
135
|
waitToolDefinition, askToolDefinition, cancelWaitToolDefinition, doneToolDefinition,
|
|
136
136
|
...(previewToolEnabled(env) ? [previewToolDefinition, previewStopToolDefinition] : []),
|
|
137
137
|
...(automationsToolEnabled(env) ? [scheduleTaskToolDefinition, scheduledTasksToolDefinition] : []),
|
|
138
138
|
];
|
|
139
139
|
}
|
|
140
|
-
export function
|
|
141
|
-
return
|
|
140
|
+
export function squawkToolNames(env = process.env) {
|
|
141
|
+
return squawkToolDefinitions(env).map(tool => tool.name);
|
|
142
142
|
}
|
|
143
143
|
/**
|
|
144
144
|
* Env names a harness must forward to the adapter process. Several harnesses spawn MCP servers
|
|
145
145
|
* from an allowlist, so preview opt-in and automations opt-out must both reach the adapter.
|
|
146
146
|
*/
|
|
147
|
-
export function
|
|
147
|
+
export function squawkToolEnvNames(env = process.env) {
|
|
148
148
|
return ['CEZ_TOOL_TOKEN', 'CEZ_TOOL_SOCKET', 'CEZ_AUTOMATIONS', ...(previewToolEnabled(env) ? ['CEZ_PREVIEW'] : [])]
|
|
149
149
|
.flatMap(name => { const preferred = name.replace(/^CEZ_/, 'HSQ_'); return env[preferred] === undefined ? [name] : [name, preferred]; });
|
|
150
150
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-catalog.js","sourceRoot":"","sources":["../../src/ci-wait/tool-catalog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"tool-catalog.js","sourceRoot":"","sources":["../../src/ci-wait/tool-catalog.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,CAAC,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC7I,CAAC"}
|
package/dist/ci-wait/tools.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export { previewToolEnabled, automationsToolEnabled, waitToolDefinition, askToolDefinition, cancelWaitToolDefinition, doneToolDefinition, previewToolDefinition, previewStopToolDefinition, scheduleTaskToolDefinition, scheduledTasksToolDefinition,
|
|
1
|
+
import type { SquawkAskAnswer, SquawkWaitAnswer } from '../contract/index.js';
|
|
2
|
+
export { previewToolEnabled, automationsToolEnabled, waitToolDefinition, askToolDefinition, cancelWaitToolDefinition, doneToolDefinition, previewToolDefinition, previewStopToolDefinition, scheduleTaskToolDefinition, scheduledTasksToolDefinition, squawkToolNames, squawkToolEnvNames } from './tool-catalog.ts';
|
|
3
3
|
/**
|
|
4
4
|
* The one list of cezar tools (#781). The MCP adapter lists it, Pi's extension registers it, and
|
|
5
5
|
* every allow-list or admission site reads its names, so adding a tool is one edit here.
|
|
@@ -12,7 +12,7 @@ type ToolResult = {
|
|
|
12
12
|
isError?: boolean;
|
|
13
13
|
details: unknown;
|
|
14
14
|
};
|
|
15
|
-
export type
|
|
15
|
+
export type SquawkTool = {
|
|
16
16
|
definition: {
|
|
17
17
|
name: string;
|
|
18
18
|
description: string;
|
|
@@ -32,7 +32,7 @@ export type CezarTool = {
|
|
|
32
32
|
* hearsay-tools/cezarion#1428: agents asked about drafts they never sent, and treated the context
|
|
33
33
|
* they cut from a rejected card as sent. Both hints say where that context belongs: `context`.
|
|
34
34
|
*/
|
|
35
|
-
export declare function askAnswerHint(answer:
|
|
35
|
+
export declare function askAnswerHint(answer: SquawkAskAnswer): string;
|
|
36
36
|
export declare function invokeAskTool(input: unknown): Promise<{
|
|
37
37
|
content: {
|
|
38
38
|
type: 'text';
|
|
@@ -69,7 +69,7 @@ export declare function invokeAskTool(input: unknown): Promise<{
|
|
|
69
69
|
};
|
|
70
70
|
}>;
|
|
71
71
|
/** JSON first, then one hint sentence, as `invokePreviewTool` answers. */
|
|
72
|
-
export declare function waitAnswerHint(answer:
|
|
72
|
+
export declare function waitAnswerHint(answer: SquawkWaitAnswer): string;
|
|
73
73
|
export declare function invokeWaitTool(input: unknown): Promise<{
|
|
74
74
|
content: {
|
|
75
75
|
type: 'text';
|
|
@@ -299,5 +299,5 @@ export declare function invokeScheduledTasksTool(input: unknown): Promise<{
|
|
|
299
299
|
};
|
|
300
300
|
};
|
|
301
301
|
}>;
|
|
302
|
-
export declare function
|
|
303
|
-
export declare function
|
|
302
|
+
export declare function squawkTools(env?: NodeJS.ProcessEnv): SquawkTool[];
|
|
303
|
+
export declare function squawkServerInstructions(env?: NodeJS.ProcessEnv): string;
|
package/dist/ci-wait/tools.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { previewToolEnabled, automationsToolEnabled, waitToolDefinition, askToolDefinition, cancelWaitToolDefinition, doneToolDefinition, previewToolDefinition, previewStopToolDefinition, scheduleTaskToolDefinition, scheduledTasksToolDefinition,
|
|
3
|
-
import {
|
|
1
|
+
import { squawkToolDefinitions, waitToolDefinition, askToolDefinition, cancelWaitToolDefinition, doneToolDefinition, previewToolDefinition, previewStopToolDefinition, scheduleTaskToolDefinition, scheduledTasksToolDefinition } from './tool-catalog.js';
|
|
2
|
+
export { previewToolEnabled, automationsToolEnabled, waitToolDefinition, askToolDefinition, cancelWaitToolDefinition, doneToolDefinition, previewToolDefinition, previewStopToolDefinition, scheduleTaskToolDefinition, scheduledTasksToolDefinition, squawkToolNames, squawkToolEnvNames } from './tool-catalog.js';
|
|
3
|
+
import { callSquawkAsk, callSquawkCancelWait, callSquawkDone, callSquawkWait, callPreviewServe, callPreviewStop, callScheduleTask, callScheduledTasks } from './client.js';
|
|
4
4
|
/**
|
|
5
5
|
* hearsay-tools/cezarion#1428: agents asked about drafts they never sent, and treated the context
|
|
6
6
|
* they cut from a rejected card as sent. Both hints say where that context belongs: `context`.
|
|
@@ -13,7 +13,7 @@ export function askAnswerHint(answer) {
|
|
|
13
13
|
return 'Not asked. Fix the call from the message, or continue without asking.';
|
|
14
14
|
}
|
|
15
15
|
export async function invokeAskTool(input) {
|
|
16
|
-
const answer = await
|
|
16
|
+
const answer = await callSquawkAsk(input);
|
|
17
17
|
return { content: [{ type: 'text', text: `${JSON.stringify(answer)}\n${askAnswerHint(answer)}` }], isError: !answer.ok, details: answer };
|
|
18
18
|
}
|
|
19
19
|
/** JSON first, then one hint sentence, as `invokePreviewTool` answers. */
|
|
@@ -30,17 +30,17 @@ export function waitAnswerHint(answer) {
|
|
|
30
30
|
: 'Registered. End your turn to wait; any open wait wakes you when it resolves.';
|
|
31
31
|
}
|
|
32
32
|
export async function invokeWaitTool(input) {
|
|
33
|
-
const answer = await
|
|
33
|
+
const answer = await callSquawkWait(input);
|
|
34
34
|
const hint = waitAnswerHint(answer);
|
|
35
35
|
return { content: [{ type: 'text', text: `${JSON.stringify(answer)}\n${hint}` }], isError: !answer.ok, details: answer };
|
|
36
36
|
}
|
|
37
37
|
export async function invokeCancelWaitTool(input) {
|
|
38
|
-
const answer = await
|
|
38
|
+
const answer = await callSquawkCancelWait(input);
|
|
39
39
|
const hint = answer.cancelled ? 'Cancelled. The waits in open_waits stay open.' : 'Not cancelled. Check the message and the waits in open_waits.';
|
|
40
40
|
return { content: [{ type: 'text', text: `${JSON.stringify(answer)}\n${hint}` }], isError: !answer.cancelled, details: answer };
|
|
41
41
|
}
|
|
42
42
|
export async function invokeDoneTool(input) {
|
|
43
|
-
const answer = await
|
|
43
|
+
const answer = await callSquawkDone(input);
|
|
44
44
|
const hint = !answer.ok ? 'Not finished. Do what the message says, then call cezar_done again.'
|
|
45
45
|
: answer.completes === 'step' ? `Accepted. End your turn; Cezar completes this step at its end and starts "${answer.next_step}".`
|
|
46
46
|
: 'Accepted. End your turn; Cezar finishes the task at its end.';
|
|
@@ -80,13 +80,13 @@ const TOOLS_BY_NAME = new Map([
|
|
|
80
80
|
WAIT_TOOL, ASK_TOOL, CANCEL_WAIT_TOOL, DONE_TOOL,
|
|
81
81
|
PREVIEW_TOOL, PREVIEW_STOP_TOOL, SCHEDULE_TASK_TOOL, SCHEDULED_TASKS_TOOL,
|
|
82
82
|
].map(tool => [tool.definition.name, tool]));
|
|
83
|
-
export function
|
|
84
|
-
return
|
|
83
|
+
export function squawkTools(env = process.env) {
|
|
84
|
+
return squawkToolDefinitions(env).map(definition => TOOLS_BY_NAME.get(definition.name));
|
|
85
85
|
}
|
|
86
|
-
export function
|
|
86
|
+
export function squawkServerInstructions(env = process.env) {
|
|
87
87
|
return [
|
|
88
88
|
'The interface to Cezarion, the orchestrator running this session. Load a tool below when its situation comes up.',
|
|
89
|
-
...
|
|
89
|
+
...squawkTools(env).map(tool => `- ${tool.definition.name}: ${tool.trigger}`),
|
|
90
90
|
].join('\n');
|
|
91
91
|
}
|
|
92
92
|
//# sourceMappingURL=tools.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../../src/ci-wait/tools.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../../src/ci-wait/tools.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,0BAA0B,EAAE,4BAA4B,EAAE,MAAM,mBAAmB,CAAC;AAC3P,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,0BAA0B,EAAE,4BAA4B,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACrT,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,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AG,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,IAAI,CAAC,UAAU,CAAC,IAAI,KAAK,IAAI,CAAC,OAAO,EAAE,CAAC;KAC9E,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
|
|
@@ -31,7 +31,7 @@ export declare const askQuestionSchema: z.ZodObject<{
|
|
|
31
31
|
multiSelect: z.ZodOptional<z.ZodBoolean>;
|
|
32
32
|
}, z.core.$strict>;
|
|
33
33
|
/** The stored shape: asks recorded before hearsay-tools/cezarion#1458, saved asks from the retired
|
|
34
|
-
* `CEZ:ASK` marker and a routed question may carry no context. `cezar_ask` requires it (`
|
|
34
|
+
* `CEZ:ASK` marker and a routed question may carry no context. `cezar_ask` requires it (`squawkAskRequestSchema`). */
|
|
35
35
|
export declare const askRequestSchema: z.ZodObject<{
|
|
36
36
|
context: z.ZodOptional<z.ZodString>;
|
|
37
37
|
questions: z.ZodArray<z.ZodObject<{
|
package/dist/contract/index.js
CHANGED
|
@@ -2039,7 +2039,7 @@ var oneModeTakesOneId = (ids, mode, ctx) => {
|
|
|
2039
2039
|
};
|
|
2040
2040
|
var waitTimeoutSeconds = z17.number().int().min(1).max(PEER_WAIT_MAX_SECONDS).default(PEER_WAIT_DEFAULT_SECONDS);
|
|
2041
2041
|
var registrationFields = { operation_id: z17.uuid().optional() };
|
|
2042
|
-
var
|
|
2042
|
+
var squawkWaitRequestSchema = z17.discriminatedUnion("kind", [
|
|
2043
2043
|
ciWaitRequestSchema.extend({ kind: z17.literal("pr"), ...registrationFields }).strict(),
|
|
2044
2044
|
z17.object({
|
|
2045
2045
|
kind: z17.literal("worker"),
|
|
@@ -2076,7 +2076,7 @@ var cezarWaitRequestSchema = z17.discriminatedUnion("kind", [
|
|
|
2076
2076
|
note: z17.string().max(NOTE_MAX).optional()
|
|
2077
2077
|
}).strict()
|
|
2078
2078
|
]);
|
|
2079
|
-
var
|
|
2079
|
+
var squawkCancelWaitRequestSchema = z17.object({ wait_id: z17.uuid() }).strict();
|
|
2080
2080
|
var openWaitFields = { wait_id: z17.uuid(), summary: z17.string().max(256) };
|
|
2081
2081
|
var openWaitSchema = z17.discriminatedUnion("kind", [
|
|
2082
2082
|
z17.object({ ...openWaitFields, kind: z17.enum(["pr", "timer", "worker", "process", "peer", "subagent"]), deadline: z17.iso.datetime() }).strict(),
|
|
@@ -2107,7 +2107,7 @@ var waitRegistrationReceiptSchema = z17.object({
|
|
|
2107
2107
|
var registrationAnswerFields = {
|
|
2108
2108
|
operation_id: z17.uuid().optional()
|
|
2109
2109
|
};
|
|
2110
|
-
var
|
|
2110
|
+
var squawkWaitAnswerSchema = z17.discriminatedUnion("ok", [
|
|
2111
2111
|
z17.object({
|
|
2112
2112
|
ok: z17.literal(true),
|
|
2113
2113
|
...registrationAnswerFields,
|
|
@@ -2131,7 +2131,7 @@ var cezarWaitAnswerSchema = z17.discriminatedUnion("ok", [
|
|
|
2131
2131
|
open_waits: z17.array(openWaitSchema).max(WAIT_LIMIT).optional()
|
|
2132
2132
|
}).strict()
|
|
2133
2133
|
]);
|
|
2134
|
-
var
|
|
2134
|
+
var squawkAskRequestSchema = askRequestSchema.extend({ context: askContextSchema });
|
|
2135
2135
|
var askErrorCodeSchema = z17.enum([
|
|
2136
2136
|
"invalid_request",
|
|
2137
2137
|
"capacity",
|
|
@@ -2153,7 +2153,7 @@ var askErrorCodeSchema = z17.enum([
|
|
|
2153
2153
|
"worker_execution_stopped",
|
|
2154
2154
|
"root_finish_pending"
|
|
2155
2155
|
]);
|
|
2156
|
-
var
|
|
2156
|
+
var squawkAskAnswerSchema = z17.discriminatedUnion("ok", [
|
|
2157
2157
|
z17.object({ ok: z17.literal(true), wait_id: z17.uuid(), open_waits: z17.array(openWaitSchema).max(WAIT_LIMIT) }).strict(),
|
|
2158
2158
|
z17.object({
|
|
2159
2159
|
ok: z17.literal(false),
|
|
@@ -2162,7 +2162,7 @@ var cezarAskAnswerSchema = z17.discriminatedUnion("ok", [
|
|
|
2162
2162
|
open_waits: z17.array(openWaitSchema).max(WAIT_LIMIT).optional()
|
|
2163
2163
|
}).strict()
|
|
2164
2164
|
]);
|
|
2165
|
-
var
|
|
2165
|
+
var squawkCancelWaitAnswerSchema = z17.discriminatedUnion("cancelled", [
|
|
2166
2166
|
z17.object({
|
|
2167
2167
|
cancelled: z17.literal(true),
|
|
2168
2168
|
wait_id: z17.uuid(),
|
|
@@ -2175,7 +2175,7 @@ var cezarCancelWaitAnswerSchema = z17.discriminatedUnion("cancelled", [
|
|
|
2175
2175
|
open_waits: z17.array(openWaitSchema).max(WAIT_LIMIT).optional()
|
|
2176
2176
|
}).strict()
|
|
2177
2177
|
]);
|
|
2178
|
-
var
|
|
2178
|
+
var squawkDoneRequestSchema = z17.object({ summary: z17.string().max(2e3).optional() }).strict();
|
|
2179
2179
|
var doneErrorCodeSchema = z17.enum([
|
|
2180
2180
|
"workers_outstanding",
|
|
2181
2181
|
"workers_uncollected",
|
|
@@ -2204,7 +2204,7 @@ var doneAccepted = {
|
|
|
2204
2204
|
finishes: z17.literal("at_turn_end"),
|
|
2205
2205
|
open_waits: z17.array(openWaitSchema).max(WAIT_LIMIT)
|
|
2206
2206
|
};
|
|
2207
|
-
var
|
|
2207
|
+
var squawkDoneAnswerSchema = z17.discriminatedUnion("ok", [
|
|
2208
2208
|
z17.discriminatedUnion("completes", [
|
|
2209
2209
|
z17.object({ ...doneAccepted, completes: z17.literal("task") }).strict(),
|
|
2210
2210
|
z17.object({ ...doneAccepted, completes: z17.literal("step"), next_step: z17.string().min(1) }).strict()
|
|
@@ -6079,14 +6079,6 @@ export {
|
|
|
6079
6079
|
cancelAutoResumeResponseSchema,
|
|
6080
6080
|
cancelResponseSchema,
|
|
6081
6081
|
capabilitiesSchema,
|
|
6082
|
-
cezarAskAnswerSchema,
|
|
6083
|
-
cezarAskRequestSchema,
|
|
6084
|
-
cezarCancelWaitAnswerSchema,
|
|
6085
|
-
cezarCancelWaitRequestSchema,
|
|
6086
|
-
cezarDoneAnswerSchema,
|
|
6087
|
-
cezarDoneRequestSchema,
|
|
6088
|
-
cezarWaitAnswerSchema,
|
|
6089
|
-
cezarWaitRequestSchema,
|
|
6090
6082
|
changedFileSchema,
|
|
6091
6083
|
changesPayloadSchema,
|
|
6092
6084
|
checkoutProgressEventSchema,
|
|
@@ -6462,6 +6454,14 @@ export {
|
|
|
6462
6454
|
skillSchema,
|
|
6463
6455
|
skillsRepoKind,
|
|
6464
6456
|
sqlPrefilterTokens,
|
|
6457
|
+
squawkAskAnswerSchema,
|
|
6458
|
+
squawkAskRequestSchema,
|
|
6459
|
+
squawkCancelWaitAnswerSchema,
|
|
6460
|
+
squawkCancelWaitRequestSchema,
|
|
6461
|
+
squawkDoneAnswerSchema,
|
|
6462
|
+
squawkDoneRequestSchema,
|
|
6463
|
+
squawkWaitAnswerSchema,
|
|
6464
|
+
squawkWaitRequestSchema,
|
|
6465
6465
|
statusEntrySchema,
|
|
6466
6466
|
stepKindSchema,
|
|
6467
6467
|
stepStateSchema,
|
package/dist/contract/waits.d.ts
CHANGED
|
@@ -954,7 +954,7 @@ export declare const waitSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
954
954
|
}, z.core.$strict>>;
|
|
955
955
|
}, z.core.$strict>], "kind">;
|
|
956
956
|
export type Wait = z.infer<typeof waitSchema>;
|
|
957
|
-
export declare const
|
|
957
|
+
export declare const squawkWaitRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
958
958
|
pr: z.ZodString;
|
|
959
959
|
until: z.ZodDefault<z.ZodEnum<{
|
|
960
960
|
checks: "checks";
|
|
@@ -1003,13 +1003,13 @@ export declare const cezarWaitRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
|
|
|
1003
1003
|
timeout_seconds: z.ZodDefault<z.ZodNumber>;
|
|
1004
1004
|
note: z.ZodOptional<z.ZodString>;
|
|
1005
1005
|
}, z.core.$strict>], "kind">;
|
|
1006
|
-
export type
|
|
1006
|
+
export type SquawkWaitRequest = z.infer<typeof squawkWaitRequestSchema>;
|
|
1007
1007
|
/** What a caller may send: the defaults (`until`, `wake_on_conflict`, `timeout_seconds`) still unset. */
|
|
1008
|
-
export type
|
|
1009
|
-
export declare const
|
|
1008
|
+
export type SquawkWaitRequestInput = z.input<typeof squawkWaitRequestSchema>;
|
|
1009
|
+
export declare const squawkCancelWaitRequestSchema: z.ZodObject<{
|
|
1010
1010
|
wait_id: z.ZodUUID;
|
|
1011
1011
|
}, z.core.$strict>;
|
|
1012
|
-
export type
|
|
1012
|
+
export type SquawkCancelWaitRequest = z.infer<typeof squawkCancelWaitRequestSchema>;
|
|
1013
1013
|
export declare const openWaitSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1014
1014
|
wait_id: z.ZodUUID;
|
|
1015
1015
|
summary: z.ZodString;
|
|
@@ -1471,7 +1471,7 @@ export declare const waitRegistrationReceiptSchema: z.ZodObject<{
|
|
|
1471
1471
|
deduplicated: z.ZodBoolean;
|
|
1472
1472
|
}, z.core.$strict>;
|
|
1473
1473
|
export type WaitRegistrationReceipt = z.infer<typeof waitRegistrationReceiptSchema>;
|
|
1474
|
-
export declare const
|
|
1474
|
+
export declare const squawkWaitAnswerSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1475
1475
|
operation_id: z.ZodOptional<z.ZodUUID>;
|
|
1476
1476
|
ok: z.ZodLiteral<true>;
|
|
1477
1477
|
effect: z.ZodOptional<z.ZodEnum<{
|
|
@@ -1598,13 +1598,13 @@ export declare const cezarWaitAnswerSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
1598
1598
|
kind: z.ZodLiteral<"human">;
|
|
1599
1599
|
}, z.core.$strict>], "kind">>>;
|
|
1600
1600
|
}, z.core.$strict>], "ok">;
|
|
1601
|
-
export type
|
|
1601
|
+
export type SquawkWaitAnswer = z.infer<typeof squawkWaitAnswerSchema>;
|
|
1602
1602
|
/**
|
|
1603
1603
|
* `cezar_ask` (hearsay-tools/cezarion#1234): the user's answer, asked with a card. A question
|
|
1604
1604
|
* without options is open, and the user types its answer. The wait it opens has no deadline.
|
|
1605
1605
|
* `context` is required here (hearsay-tools/cezarion#1458), optional in every stored shape.
|
|
1606
1606
|
*/
|
|
1607
|
-
export declare const
|
|
1607
|
+
export declare const squawkAskRequestSchema: z.ZodObject<{
|
|
1608
1608
|
questions: z.ZodArray<z.ZodObject<{
|
|
1609
1609
|
id: z.ZodOptional<z.ZodString>;
|
|
1610
1610
|
header: z.ZodString;
|
|
@@ -1617,7 +1617,7 @@ export declare const cezarAskRequestSchema: z.ZodObject<{
|
|
|
1617
1617
|
}, z.core.$strict>>;
|
|
1618
1618
|
context: z.ZodString;
|
|
1619
1619
|
}, z.core.$strict>;
|
|
1620
|
-
export type
|
|
1620
|
+
export type SquawkAskRequest = z.infer<typeof squawkAskRequestSchema>;
|
|
1621
1621
|
/** The refusals a question can meet: the session's, the run's capacity, and an autonomous run. */
|
|
1622
1622
|
export declare const askErrorCodeSchema: z.ZodEnum<{
|
|
1623
1623
|
autonomous_run: "autonomous_run";
|
|
@@ -1641,7 +1641,7 @@ export declare const askErrorCodeSchema: z.ZodEnum<{
|
|
|
1641
1641
|
worker_wait_pending: "worker_wait_pending";
|
|
1642
1642
|
}>;
|
|
1643
1643
|
export type AskErrorCode = z.infer<typeof askErrorCodeSchema>;
|
|
1644
|
-
export declare const
|
|
1644
|
+
export declare const squawkAskAnswerSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1645
1645
|
ok: z.ZodLiteral<true>;
|
|
1646
1646
|
wait_id: z.ZodUUID;
|
|
1647
1647
|
open_waits: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -1703,10 +1703,10 @@ export declare const cezarAskAnswerSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
1703
1703
|
kind: z.ZodLiteral<"human">;
|
|
1704
1704
|
}, z.core.$strict>], "kind">>>;
|
|
1705
1705
|
}, z.core.$strict>], "ok">;
|
|
1706
|
-
export type
|
|
1706
|
+
export type SquawkAskAnswer = z.infer<typeof squawkAskAnswerSchema>;
|
|
1707
1707
|
/** `already_resolved`: the result is owed and arrives with the next wake; cancelling is a no-op.
|
|
1708
1708
|
* `human_question`: the question already reached the user, so only their answer ends it. */
|
|
1709
|
-
export declare const
|
|
1709
|
+
export declare const squawkCancelWaitAnswerSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1710
1710
|
cancelled: z.ZodLiteral<true>;
|
|
1711
1711
|
wait_id: z.ZodUUID;
|
|
1712
1712
|
open_waits: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -1754,12 +1754,12 @@ export declare const cezarCancelWaitAnswerSchema: z.ZodDiscriminatedUnion<[z.Zod
|
|
|
1754
1754
|
kind: z.ZodLiteral<"human">;
|
|
1755
1755
|
}, z.core.$strict>], "kind">>>;
|
|
1756
1756
|
}, z.core.$strict>], "cancelled">;
|
|
1757
|
-
export type
|
|
1757
|
+
export type SquawkCancelWaitAnswer = z.infer<typeof squawkCancelWaitAnswerSchema>;
|
|
1758
1758
|
/** `cezar_done`: the run finishes when this turn ends. The summary becomes the closing note. */
|
|
1759
|
-
export declare const
|
|
1759
|
+
export declare const squawkDoneRequestSchema: z.ZodObject<{
|
|
1760
1760
|
summary: z.ZodOptional<z.ZodString>;
|
|
1761
1761
|
}, z.core.$strict>;
|
|
1762
|
-
export type
|
|
1762
|
+
export type SquawkDoneRequest = z.infer<typeof squawkDoneRequestSchema>;
|
|
1763
1763
|
export declare const doneErrorCodeSchema: z.ZodEnum<{
|
|
1764
1764
|
capability_revoked: "capability_revoked";
|
|
1765
1765
|
finish_requested: "finish_requested";
|
|
@@ -1786,7 +1786,7 @@ export declare const doneErrorCodeSchema: z.ZodEnum<{
|
|
|
1786
1786
|
export type DoneErrorCode = z.infer<typeof doneErrorCodeSchema>;
|
|
1787
1787
|
/** An accepted done finishes the task, or, in a workflow step that is not the last, completes that
|
|
1788
1788
|
* step and starts `next_step`, named as the run's rail names it (hearsay-tools/cezarion#1620). */
|
|
1789
|
-
export declare const
|
|
1789
|
+
export declare const squawkDoneAnswerSchema: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1790
1790
|
ok: z.ZodLiteral<true>;
|
|
1791
1791
|
finishes: z.ZodLiteral<"at_turn_end">;
|
|
1792
1792
|
open_waits: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -1881,7 +1881,7 @@ export declare const cezarDoneAnswerSchema: z.ZodDiscriminatedUnion<[z.ZodDiscri
|
|
|
1881
1881
|
kind: z.ZodLiteral<"human">;
|
|
1882
1882
|
}, z.core.$strict>], "kind">>>;
|
|
1883
1883
|
}, z.core.$strict>], "ok">;
|
|
1884
|
-
export type
|
|
1884
|
+
export type SquawkDoneAnswer = z.infer<typeof squawkDoneAnswerSchema>;
|
|
1885
1885
|
/** Stored summaries written before hearsay-tools/cezarion#1425 carry `{ kind: 'ci' }`: a checks wait. */
|
|
1886
1886
|
export declare const waitingOnSchema: z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1887
1887
|
kind: z.ZodLiteral<"human">;
|
|
@@ -20,7 +20,7 @@ export interface AgentRunSpec {
|
|
|
20
20
|
/** Appended to the CLI's default system prompt (`--append-system-prompt`). */
|
|
21
21
|
systemPrompt?: string;
|
|
22
22
|
/** Private bundled tool server; capability values belong only in env. */
|
|
23
|
-
|
|
23
|
+
squawkTools?: {
|
|
24
24
|
name: string;
|
|
25
25
|
command: string;
|
|
26
26
|
args: string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-runner.js","sourceRoot":"","sources":["../../src/core/agent-runner.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH;;;GAGG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,Q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{ RUNNER_FACTS } from './runner-facts.js';
|
|
|
9
9
|
import { isSignalTerminationExit, trackChildExit, unknownToolGrant } from './agent-runner.js';
|
|
10
10
|
import { signalSession, spawnSessionLeader, waitForEofExit } from './session-process.js';
|
|
11
11
|
import { buildChildEnv } from './agent-env.js';
|
|
12
|
-
import {
|
|
12
|
+
import { squawkToolEnvNames, squawkToolNames } from '../ci-wait/tool-catalog.js';
|
|
13
13
|
import { costWeightedTokens } from './usage.js';
|
|
14
14
|
import { readNdjson } from './ndjson.js';
|
|
15
15
|
import { InputSubmissions } from './input-submissions.js';
|
|
@@ -34,7 +34,7 @@ import { claudeTurnStarted, createClaudeUiState, mapClaudeMessage, stringifyTool
|
|
|
34
34
|
* the harness parity matrix; change a row only with the mapping in `buildArgs`.
|
|
35
35
|
*/
|
|
36
36
|
export const CLAUDE_SPEC_SUPPORT = {
|
|
37
|
-
|
|
37
|
+
squawkTools: { honored: true, via: '--mcp-config and generated --allowedTools name' },
|
|
38
38
|
systemPrompt: { honored: true, via: '--append-system-prompt' },
|
|
39
39
|
userPrompt: { honored: true, via: 'text block of the first stream-json user message on stdin' },
|
|
40
40
|
images: { honored: true, via: 'image blocks ahead of the text in the first stdin message' },
|
|
@@ -215,11 +215,11 @@ export class ClaudeCliRunner {
|
|
|
215
215
|
// wall-clock kill switch. claude installs its own SIGTERM handler and exits
|
|
216
216
|
// 143 instead of dying from the signal, so without this flag our own
|
|
217
217
|
// teardown reads as an agent failure (#703).
|
|
218
|
-
let
|
|
218
|
+
let terminatedBySquawk = false;
|
|
219
219
|
let explicitEnd = false;
|
|
220
220
|
let automaticCleanupStarted = false;
|
|
221
221
|
const signalChild = (signal, intentional = true) => {
|
|
222
|
-
|
|
222
|
+
terminatedBySquawk ||= intentional;
|
|
223
223
|
signalSession(child, signal);
|
|
224
224
|
};
|
|
225
225
|
// Every watchdog below asks "is the child still alive?" — and that question
|
|
@@ -230,7 +230,7 @@ export class ClaudeCliRunner {
|
|
|
230
230
|
const end = () => {
|
|
231
231
|
if (!hasExited()) {
|
|
232
232
|
explicitEnd = true;
|
|
233
|
-
|
|
233
|
+
terminatedBySquawk ||= automaticCleanupStarted;
|
|
234
234
|
}
|
|
235
235
|
if (!stdinOpen)
|
|
236
236
|
return;
|
|
@@ -255,7 +255,7 @@ export class ClaudeCliRunner {
|
|
|
255
255
|
};
|
|
256
256
|
const interrupt = (intentional = true) => {
|
|
257
257
|
if (!hasExited())
|
|
258
|
-
|
|
258
|
+
terminatedBySquawk ||= intentional;
|
|
259
259
|
stdinOpen = false;
|
|
260
260
|
cancelRefusalRetry();
|
|
261
261
|
if (hasExited() || killTimer)
|
|
@@ -360,7 +360,7 @@ export class ClaudeCliRunner {
|
|
|
360
360
|
attemptDidWork = true;
|
|
361
361
|
return reportedModel && reportedSession ? JSON.stringify([reportedSession, reportedModel]) : undefined;
|
|
362
362
|
};
|
|
363
|
-
const retryableRefusal = (msg, identity) => !
|
|
363
|
+
const retryableRefusal = (msg, identity) => !terminatedBySquawk && stdinOpen && !attemptDidWork
|
|
364
364
|
&& msg.type === 'result' && msg.is_error === true
|
|
365
365
|
&& identity !== undefined && identity === successfulIdentity
|
|
366
366
|
&& selectedModelRefusal(msg.result) === reportedModel
|
|
@@ -425,7 +425,7 @@ export class ClaudeCliRunner {
|
|
|
425
425
|
// describes the intentional stop rather than an agent failure.
|
|
426
426
|
// Normalize only this precise wire shape so genuine result errors
|
|
427
427
|
// (authentication, limits, malformed sessions) stay authoritative.
|
|
428
|
-
const mappedMessage = normalizeIntentionalTeardownResult(originalRefusal ? { ...msg, result: originalRefusal } : msg,
|
|
428
|
+
const mappedMessage = normalizeIntentionalTeardownResult(originalRefusal ? { ...msg, result: originalRefusal } : msg, terminatedBySquawk);
|
|
429
429
|
emitUi((state) => mapClaudeMessage(mappedMessage, state));
|
|
430
430
|
let delta = 0;
|
|
431
431
|
try {
|
|
@@ -524,7 +524,7 @@ export class ClaudeCliRunner {
|
|
|
524
524
|
clearTimeout(deadline);
|
|
525
525
|
if (autoEndTimer)
|
|
526
526
|
clearTimeout(autoEndTimer);
|
|
527
|
-
if (refusalRetry && stdinOpen && !
|
|
527
|
+
if (refusalRetry && stdinOpen && !terminatedBySquawk && !timedOut) {
|
|
528
528
|
onEvent?.({ type: 'error', message: refusalRetry.message });
|
|
529
529
|
}
|
|
530
530
|
stdinOpen = false;
|
|
@@ -569,7 +569,7 @@ export class ClaudeCliRunner {
|
|
|
569
569
|
// A session cezar itself tore down (EOF watchdog after `end()`, or a
|
|
570
570
|
// cancel) exits 143/137 — that is our own signal coming back, not an
|
|
571
571
|
// agent failure, so it settles on the normal path with a note (#703).
|
|
572
|
-
if (
|
|
572
|
+
if (terminatedBySquawk && (isSignalTerminationExit(exitCode) || (exitCode === null && child.signalCode !== null))) {
|
|
573
573
|
onEvent?.({
|
|
574
574
|
type: 'note',
|
|
575
575
|
message: `claude CLI did not exit on its own after close; terminated by cezar (${exitCode === null ? child.signalCode : `code ${exitCode}`})`,
|
|
@@ -754,14 +754,14 @@ function claudeToolArgs(spec) {
|
|
|
754
754
|
// ListAgents also reach the session's own subagents, so no deny applies; inbound messages
|
|
755
755
|
// from other sessions stay refused on every launch (crossSessionInbound, D3).
|
|
756
756
|
const allowed = claudeAllowedTools(spec.toolGrant);
|
|
757
|
-
if (spec.
|
|
758
|
-
const { name, command, args: toolArgs } = spec.
|
|
757
|
+
if (spec.squawkTools) {
|
|
758
|
+
const { name, command, args: toolArgs } = spec.squawkTools;
|
|
759
759
|
args.push('--mcp-config', JSON.stringify({ mcpServers: { [name]: {
|
|
760
760
|
command, args: toolArgs,
|
|
761
|
-
env: Object.fromEntries(
|
|
761
|
+
env: Object.fromEntries(squawkToolEnvNames(spec.env ?? {}).map(key => [key, `\${${key}}`])),
|
|
762
762
|
} } }));
|
|
763
763
|
if (allowed.length > 0)
|
|
764
|
-
allowed.push(...
|
|
764
|
+
allowed.push(...squawkToolNames(spec.env ?? {}).map(tool => `mcp__${name}__${tool}`));
|
|
765
765
|
}
|
|
766
766
|
if (allowed.length > 0) {
|
|
767
767
|
args.push('--allowedTools', allowed.join(','));
|