@hearsay-tools/squawk 0.18.0-dev.8050 → 0.18.0-dev.8057
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/automations/agent-tools.d.ts +2 -0
- package/dist/automations/agent-tools.js +24 -0
- package/dist/automations/agent-tools.js.map +1 -0
- package/dist/automations/tool-catalog.d.ts +119 -0
- package/dist/automations/tool-catalog.js +48 -0
- package/dist/automations/tool-catalog.js.map +1 -0
- package/dist/automations/tool-client.d.ts +9 -0
- package/dist/automations/tool-client.js +19 -0
- package/dist/automations/tool-client.js.map +1 -0
- package/dist/automations/tool-env.d.ts +1 -0
- package/dist/automations/tool-env.js +3 -0
- package/dist/automations/tool-env.js.map +1 -0
- package/dist/automations/tool-errors.d.ts +9 -0
- package/dist/automations/tool-errors.js +34 -0
- package/dist/automations/tool-errors.js.map +1 -0
- package/dist/automations/tool-session.d.ts +5 -0
- package/dist/automations/tool-session.js +19 -0
- package/dist/automations/tool-session.js.map +1 -0
- package/dist/automations/tools.d.ts +325 -0
- package/dist/automations/tools.js +30 -0
- package/dist/automations/tools.js.map +1 -0
- package/dist/built-in-tool-definitions.d.ts +0 -2
- package/dist/built-in-tool-definitions.js +3 -35
- package/dist/built-in-tool-definitions.js.map +1 -1
- package/dist/built-in-tools.js +4 -2
- package/dist/built-in-tools.js.map +1 -1
- package/dist/built-in-wait-kinds.d.ts +3 -0
- package/dist/built-in-wait-kinds.js +10 -0
- package/dist/built-in-wait-kinds.js.map +1 -0
- package/dist/ci-wait/client.d.ts +0 -17
- package/dist/ci-wait/client.js +0 -31
- package/dist/ci-wait/client.js.map +1 -1
- package/dist/ci-wait/controller.js +1 -2
- package/dist/ci-wait/controller.js.map +1 -1
- package/dist/ci-wait/errors.d.ts +1 -14
- package/dist/ci-wait/errors.js +0 -68
- package/dist/ci-wait/errors.js.map +1 -1
- package/dist/ci-wait/tool-catalog.d.ts +13 -313
- package/dist/ci-wait/tool-catalog.js +14 -89
- package/dist/ci-wait/tool-catalog.js.map +1 -1
- package/dist/ci-wait/tool-definition.d.ts +21 -0
- package/dist/ci-wait/tool-definition.js +9 -0
- package/dist/ci-wait/tool-definition.js.map +1 -0
- package/dist/ci-wait/tool-registry.d.ts +2 -0
- package/dist/ci-wait/tool-registry.js.map +1 -1
- package/dist/ci-wait/tools.d.ts +2 -381
- package/dist/ci-wait/tools.js +3 -46
- package/dist/ci-wait/tools.js.map +1 -1
- package/dist/delegation/park-notice.js +2 -2
- package/dist/delegation/park-notice.js.map +1 -1
- package/dist/delegation/routes.d.ts +79 -79
- package/dist/delegation/transport.d.ts +12 -12
- package/dist/preview/agent-address.js +1 -1
- package/dist/preview/agent-address.js.map +1 -1
- package/dist/preview/agent-tools.d.ts +2 -0
- package/dist/preview/agent-tools.js +18 -0
- package/dist/preview/agent-tools.js.map +1 -0
- package/dist/preview/registration.js +1 -1
- package/dist/preview/registration.js.map +1 -1
- package/dist/preview/run-tools.d.ts +1 -0
- package/dist/preview/run-tools.js +2 -1
- package/dist/preview/run-tools.js.map +1 -1
- package/dist/preview/tool-catalog.d.ts +146 -0
- package/dist/preview/tool-catalog.js +14 -0
- package/dist/preview/tool-catalog.js.map +1 -0
- package/dist/preview/tool-client.d.ts +8 -0
- package/dist/preview/tool-client.js +16 -0
- package/dist/preview/tool-client.js.map +1 -0
- package/dist/preview/tool-env.d.ts +2 -0
- package/dist/preview/tool-env.js +4 -0
- package/dist/preview/tool-env.js.map +1 -0
- package/dist/preview/tool-errors.d.ts +7 -0
- package/dist/preview/tool-errors.js +36 -0
- package/dist/preview/tool-errors.js.map +1 -0
- package/dist/preview/tool-session.d.ts +6 -0
- package/dist/preview/tool-session.js +9 -0
- package/dist/preview/tool-session.js.map +1 -0
- package/dist/preview/tools.d.ts +57 -0
- package/dist/preview/tools.js +18 -0
- package/dist/preview/tools.js.map +1 -0
- package/dist/runs/run-archive.d.ts +72 -72
- package/dist/serve-command.d.ts +1 -1
- package/dist/serve-command.js +1 -1
- package/dist/server/live-routes.d.ts +6 -6
- package/dist/server/preview-cdp-socket.js +1 -1
- package/dist/server/preview-socket.js +1 -1
- package/dist/server/reports-api.d.ts +2 -2
- package/dist/server/runner-install-routes.d.ts +10 -10
- package/dist/server/server.d.ts +64 -64
- package/dist/server/workspace-live-routes.d.ts +6 -6
- package/dist/subcommands.js +3 -0
- package/dist/subcommands.js.map +1 -1
- package/dist/workflows/continuation-admission.d.ts +72 -72
- package/dist/workflows/run/compose.d.ts +1 -1
- package/dist/workflows/run/compose.js +2 -2
- 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/done-accepted.js +4 -4
- package/dist/workflows/run/done-accepted.js.map +1 -1
- package/dist/workflows/run/input-batch.js +2 -2
- package/dist/workflows/run/input-batch.js.map +1 -1
- package/dist/workflows/run/input-delivery.js +2 -2
- package/dist/workflows/run/input-delivery.js.map +1 -1
- package/dist/workflows/run/squawk-tools.d.ts +7 -10
- package/dist/workflows/run/squawk-tools.js +8 -18
- package/dist/workflows/run/squawk-tools.js.map +1 -1
- package/dist/workflows/run/step-loop.js +2 -2
- package/dist/workflows/run/step-loop.js.map +1 -1
- package/dist/workflows/run/subagent-waits.js +2 -2
- package/dist/workflows/run/subagent-waits.js.map +1 -1
- package/dist/workflows/run/turn-settler.js +2 -2
- package/dist/workflows/run/turn-settler.js.map +1 -1
- package/dist/workflows/run/wait-engine.d.ts +75 -73
- package/dist/workflows/run/wait-engine.js +50 -6
- package/dist/workflows/run/wait-engine.js.map +1 -1
- package/dist/workflows/run/wait-input-descriptors.d.ts +3 -0
- package/dist/workflows/run/wait-input-descriptors.js +30 -0
- package/dist/workflows/run/wait-input-descriptors.js.map +1 -0
- package/dist/workflows/run/wait-kind-registry.d.ts +73 -0
- package/dist/workflows/run/wait-kind-registry.js +35 -0
- package/dist/workflows/run/wait-kind-registry.js.map +1 -0
- package/dist/workflows/run/wait-kinds.d.ts +1033 -4
- package/dist/workflows/run/wait-kinds.js +45 -9
- package/dist/workflows/run/wait-kinds.js.map +1 -1
- package/dist/workflows/run/wait-registration-tool.js +3 -3
- package/dist/workflows/run/wait-registration-tool.js.map +1 -1
- package/dist/workflows/run/wait-registration.js +13 -8
- package/dist/workflows/run/wait-registration.js.map +1 -1
- package/dist/workflows/run/wait-registry.d.ts +5 -1
- package/dist/workflows/run/wait-registry.js +42 -2
- package/dist/workflows/run/wait-registry.js.map +1 -1
- package/dist/workflows/run/wake-admission.js +7 -3
- package/dist/workflows/run/wake-admission.js.map +1 -1
- package/dist/workflows/run.d.ts +1 -1
- package/dist/workflows/run.js.map +1 -1
- package/dist/workflows/waits.d.ts +3 -8
- package/dist/workflows/waits.js +10 -15
- package/dist/workflows/waits.js.map +1 -1
- package/package.json +4 -4
- package/scripts/benchmark-runtime.ts +3 -0
- package/scripts/measure-transcript-facts-health.mjs +3 -0
- package/scripts/mock-wire-tools.mjs +3 -0
- package/dist/ci-wait/tool-env.d.ts +0 -4
- package/dist/ci-wait/tool-env.js +0 -11
- package/dist/ci-wait/tool-env.js.map +0 -1
|
@@ -1,45 +1,25 @@
|
|
|
1
1
|
import { agentToolMetadata, enabledAgentTools } from './tool-registry.js';
|
|
2
|
-
import {
|
|
3
|
-
import { squawkAskRequestSchema, squawkCancelWaitRequestSchema, squawkDoneRequestSchema, builtInSquawkWaitRequestSchema } from '../contract/index.js';
|
|
2
|
+
import { squawkAskRequestSchema, squawkCancelWaitRequestSchema, squawkDoneRequestSchema } from '../contract/index.js';
|
|
4
3
|
import { ASK_LIMITS } from '../contract/index.js';
|
|
5
|
-
import {
|
|
6
|
-
import { scheduleTaskRequestSchema, scheduledTasksRequestSchema } from '../contract/index.js';
|
|
4
|
+
import { registeredWaitKinds } from '../workflows/run/wait-kind-registry.js';
|
|
7
5
|
import { z } from 'zod';
|
|
8
6
|
/**
|
|
9
7
|
* The Anthropic tool API refuses a top-level `oneOf`/`anyOf`/`allOf`, so `cezar_wait` advertises
|
|
10
8
|
* one flat object: every kind's fields side by side, with `kind` as an enum. Each field's bounds
|
|
11
9
|
* come from its kind's own schema; the discriminated union validates on the server.
|
|
12
10
|
*/
|
|
13
|
-
function flatWaitInputSchema() {
|
|
11
|
+
export function flatWaitInputSchema() {
|
|
12
|
+
const inputs = registeredWaitKinds().flatMap(row => row.inputs ?? []).sort((a, b) => a.order - b.order);
|
|
14
13
|
const properties = {};
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
for (const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
kind: { type: 'string', enum: builtInSquawkWaitRequestSchema.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.' },
|
|
25
|
-
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.'),
|
|
26
|
-
pr: field('pr', 'kind "pr": the HTTPS GitHub pull request URL.'),
|
|
27
|
-
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.'),
|
|
28
|
-
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.'),
|
|
29
|
-
head_sha: field('head_sha', 'kind "pr": optional. Right after you push, pass the pushed commit (`git rev-parse HEAD`): the wait watches it while GitHub still shows the previous head, for up to 60 seconds.'),
|
|
30
|
-
worker_ids: field('worker_ids', 'kind "worker": the workers you own to wait for (1–32 unique ids).'),
|
|
31
|
-
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).'),
|
|
32
|
-
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.'),
|
|
33
|
-
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.'),
|
|
34
|
-
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.'),
|
|
35
|
-
seconds: field('seconds', 'kind "timer": seconds until the wake (60–7200).'),
|
|
36
|
-
pid: field('pid', 'kind "process": the PID of the background command: the `pid` the job start command printed.'),
|
|
37
|
-
exit_file: field('exit_file', 'kind "process": optional. The `exitFile` that `hsq job start` printed for this `pid`, in any `--dir`, or 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.'),
|
|
38
|
-
note: field('note', 'kind "timer" or "process": what to re-check, handed back to you at the wake.'),
|
|
39
|
-
},
|
|
40
|
-
required: ['kind'],
|
|
41
|
-
additionalProperties: false,
|
|
42
|
-
};
|
|
14
|
+
for (const input of [...inputs].reverse())
|
|
15
|
+
Object.assign(properties, input.properties);
|
|
16
|
+
for (const input of inputs)
|
|
17
|
+
for (const [key, description] of Object.entries(input.descriptions ?? {})) {
|
|
18
|
+
if (key in properties)
|
|
19
|
+
properties[key] = { ...properties[key], description };
|
|
20
|
+
}
|
|
21
|
+
properties.kind = { type: 'string', enum: inputs.map(input => input.kind), description: inputs.map(input => input.description).join('; ') };
|
|
22
|
+
return { type: 'object', properties, required: ['kind'], additionalProperties: false };
|
|
43
23
|
}
|
|
44
24
|
export const waitToolDefinition = {
|
|
45
25
|
name: 'cezar_wait',
|
|
@@ -59,7 +39,7 @@ export const waitToolDefinition = {
|
|
|
59
39
|
'The wake then reports `exited` without a code: read the command\'s own log or status file after it. ' +
|
|
60
40
|
'Never start a watcher or helper process to copy a file into $TMPDIR. ' +
|
|
61
41
|
'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.',
|
|
62
|
-
inputSchema
|
|
42
|
+
get inputSchema() { return flatWaitInputSchema(); },
|
|
63
43
|
};
|
|
64
44
|
/**
|
|
65
45
|
* hearsay-tools/cezarion#1234: the user's answer gets its own tool, so its card is required and
|
|
@@ -84,61 +64,6 @@ export const doneToolDefinition = {
|
|
|
84
64
|
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. Squawk closes the session at the end of this turn and cancels every open wait; after a step, Squawk 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, your question to the user is still pending, or input for you is still to be delivered (input_pending, listed in owed). A result or message that arrives after it is accepted is delivered with a note, and the task still finishes when that turn ends; a new message from the user, a new request or instruction, a failed result, or a wait or question you register withdraws it, so call cezar_done again when the task is complete.`,
|
|
85
65
|
inputSchema: { ...z.toJSONSchema(squawkDoneRequestSchema, { io: 'input' }), type: 'object' },
|
|
86
66
|
};
|
|
87
|
-
export const previewToolDefinition = {
|
|
88
|
-
name: 'cezar_preview_serve',
|
|
89
|
-
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. Squawk starts the command itself when the user opens the preview; do not wait for the user. ` +
|
|
90
|
-
'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.',
|
|
91
|
-
inputSchema: { ...z.toJSONSchema(previewServeRequestSchema, { io: 'input' }), type: 'object' },
|
|
92
|
-
};
|
|
93
|
-
export const previewStopToolDefinition = {
|
|
94
|
-
name: 'cezar_preview_stop',
|
|
95
|
-
description: `Stop a preview server Squawk 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.`,
|
|
96
|
-
inputSchema: { ...z.toJSONSchema(previewStopRequestSchema, { io: 'input' }), type: 'object' },
|
|
97
|
-
};
|
|
98
|
-
/**
|
|
99
|
-
* hearsay-tools/cezarion#1465: a one-time schedule starts later as an ordinary task, so the agent
|
|
100
|
-
* does not keep a session parked on timers for days. `cezar_scheduled_tasks` takes one action per
|
|
101
|
-
* call; its union is advertised as one flat object for the same reason as `cezar_wait`.
|
|
102
|
-
*/
|
|
103
|
-
export const scheduleTaskToolDefinition = {
|
|
104
|
-
name: 'cezar_schedule_task',
|
|
105
|
-
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 Squawk 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 Squawk 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.`,
|
|
106
|
-
inputSchema: { ...z.toJSONSchema(scheduleTaskRequestSchema, { io: 'input' }), type: 'object' },
|
|
107
|
-
};
|
|
108
|
-
function flatScheduledTasksInputSchema() {
|
|
109
|
-
const properties = {};
|
|
110
|
-
for (const option of scheduledTasksRequestSchema.options)
|
|
111
|
-
Object.assign(properties, z.toJSONSchema(option, { io: 'input' }).properties);
|
|
112
|
-
return {
|
|
113
|
-
type: 'object',
|
|
114
|
-
properties: {
|
|
115
|
-
...properties,
|
|
116
|
-
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.' },
|
|
117
|
-
archived: { ...properties.archived, description: 'action "list": "include" adds the archived schedules, "only" lists just them.' },
|
|
118
|
-
},
|
|
119
|
-
required: ['action'],
|
|
120
|
-
additionalProperties: false,
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
|
-
export const scheduledTasksToolDefinition = {
|
|
124
|
-
name: 'cezar_scheduled_tasks',
|
|
125
|
-
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.',
|
|
126
|
-
inputSchema: flatScheduledTasksInputSchema(),
|
|
127
|
-
};
|
|
128
|
-
function flatAutomationInputSchema() {
|
|
129
|
-
const properties = {};
|
|
130
|
-
for (const option of automationToolRequestSchema.options)
|
|
131
|
-
Object.assign(properties, z.toJSONSchema(option, { io: 'input' }).properties);
|
|
132
|
-
return { type: 'object', properties: {
|
|
133
|
-
...properties,
|
|
134
|
-
action: { type: 'string', enum: automationToolRequestSchema.options.map(option => option.shape.action.value) },
|
|
135
|
-
}, required: ['action'], additionalProperties: false };
|
|
136
|
-
}
|
|
137
|
-
export const automationToolDefinition = {
|
|
138
|
-
name: 'cezar_automation',
|
|
139
|
-
description: 'Create, show, preview or enable a repeating automation in this project. "create" takes definition: a GitHub poll (kind github, events, intervalSeconds, filters and task) or repeating schedule (kind schedule, schedule and task). Creation is always paused. The Automations system instructions give the absolute CLI command: run its schema subcommand on demand for definition fields, bounds and prompt placeholders before creating. "show", "preview" and "enable" take its id. "preview" checks a GitHub poll without launching tasks. "enable" requires explicit: true, only when the user explicitly asked to switch it on; a poll also needs a successful preview of its current definition in this session. Autonomy is not enable consent. Report the url and preview matches, or next_run_at for a schedule (UTC; convert to the user’s zone). On refusal stop and report the error; never substitute a cron job, GitHub Action or polling script. Use cezar_schedule_task and cezar_scheduled_tasks for one-time schedules. Leave task.archiveWhenDone and task.autoMergePr off unless the user asks for each completion action.',
|
|
140
|
-
inputSchema: flatAutomationInputSchema(),
|
|
141
|
-
};
|
|
142
67
|
/** Tool definitions in registration order, evaluated only after boot seals. */
|
|
143
68
|
export function squawkToolDefinitions(env = process.env) {
|
|
144
69
|
return enabledAgentTools(env).map(agentToolMetadata);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-catalog.js","sourceRoot":"","sources":["../../src/ci-wait/tool-catalog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"tool-catalog.js","sourceRoot":"","sources":["../../src/ci-wait/tool-catalog.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { z } from 'zod';
|
|
2
|
+
import type { SquawkToolHandlers } from './controller.ts';
|
|
3
|
+
import type { SquawkTool } from './tools.ts';
|
|
4
|
+
/** The controller validates once with this schema before dispatching the typed callback. */
|
|
5
|
+
export declare function bind<S extends z.ZodType>(schema: S, handle: (handlers: SquawkToolHandlers, input: z.output<S>, signal: AbortSignal) => Promise<unknown>): {
|
|
6
|
+
schema: S;
|
|
7
|
+
handle: (handlers: SquawkToolHandlers, input: unknown, signal: AbortSignal) => Promise<unknown>;
|
|
8
|
+
};
|
|
9
|
+
export declare function metadata<S extends z.ZodType>(tool: SquawkTool, schema: S, format: (answer: z.output<S>) => import('./tool-registry.ts').AgentToolResult): {
|
|
10
|
+
name: string;
|
|
11
|
+
description: () => string;
|
|
12
|
+
inputSchema: () => {
|
|
13
|
+
[key: string]: unknown;
|
|
14
|
+
type: 'object';
|
|
15
|
+
properties?: Record<string, unknown>;
|
|
16
|
+
};
|
|
17
|
+
trigger: string;
|
|
18
|
+
label: string;
|
|
19
|
+
invoke: (input: unknown) => Promise<import("./tool-registry.ts").AgentToolResult>;
|
|
20
|
+
format: (answer: unknown) => import("./tool-registry.ts").AgentToolResult;
|
|
21
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** The controller validates once with this schema before dispatching the typed callback. */
|
|
2
|
+
export function bind(schema, handle) {
|
|
3
|
+
return { schema, handle: (handlers, input, signal) => handle(handlers, input, signal) };
|
|
4
|
+
}
|
|
5
|
+
export function metadata(tool, schema, format) {
|
|
6
|
+
return { name: tool.definition.name, description: () => tool.definition.description, inputSchema: () => tool.definition.inputSchema, trigger: tool.trigger, label: tool.label, invoke: tool.invoke,
|
|
7
|
+
format: (answer) => format(schema.parse(answer)) };
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=tool-definition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-definition.js","sourceRoot":"","sources":["../../src/ci-wait/tool-definition.ts"],"names":[],"mappings":"AAGA,4FAA4F;AAC5F,MAAM,UAAU,IAAI,CAAsB,MAAS,EAAE,MAAmG;IACtJ,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,QAA4B,EAAE,KAAc,EAAE,MAAmB,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,EAAE,KAAoB,EAAE,MAAM,CAAC,EAAE,CAAC;AACnJ,CAAC;AACD,MAAM,UAAU,QAAQ,CAAsB,IAAgB,EAAE,MAAS,EAAE,MAA6E;IACtJ,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,WAAW,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,WAAW,EAAE,WAAW,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,WAAW,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM;QAChM,MAAM,EAAE,CAAC,MAAe,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC;AAChE,CAAC"}
|
|
@@ -21,6 +21,8 @@ export interface AgentToolDefinition {
|
|
|
21
21
|
trigger: string;
|
|
22
22
|
label: string;
|
|
23
23
|
enabled?(env: NodeJS.ProcessEnv): boolean;
|
|
24
|
+
sessionHandlers?(runId: string, host: import('../workflows/run/squawk-tools.ts').ToolHost): Partial<SquawkToolHandlers>;
|
|
25
|
+
sessionEnv?(env: NodeJS.ProcessEnv): Record<string, string>;
|
|
24
26
|
envNames?(env: NodeJS.ProcessEnv): string[];
|
|
25
27
|
maxBodyBytes?: number;
|
|
26
28
|
timeoutMs?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-registry.js","sourceRoot":"","sources":["../../src/ci-wait/tool-registry.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"tool-registry.js","sourceRoot":"","sources":["../../src/ci-wait/tool-registry.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AA6B1D,MAAM,QAAQ,GAAG,mBAAmB,CAA8B;IAChE,IAAI,EAAE,qBAAqB,EAAE,YAAY,EAAE,CAAC,SAAS,CAAC,EAAE,QAAQ,EAAE,6DAA6D;CAChI,CAAC,CAAC;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,IAAyB,EAAQ,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AACzG,MAAM,CAAC,MAAM,cAAc,GAAG,QAAQ,CAAC,IAAI,CAAC;AAC5C,MAAM,CAAC,MAAM,gBAAgB,GAAG,QAAQ,CAAC,QAAQ,CAAC;AAClD,MAAM,CAAC,MAAM,oBAAoB,GAAG,QAAQ,CAAC,MAAM,CAAC;AACpD,MAAM,CAAC,MAAM,SAAS,GAAG,QAAQ,CAAC,GAAG,CAAC;AACtC,MAAM,CAAC,MAAM,cAAc,GAAG,QAAQ,CAAC,IAAI,CAAC;AAC5C,MAAM,UAAU,iBAAiB,CAAC,GAAG,GAAsB,OAAO,CAAC,GAAG;IACpE,OAAO,oBAAoB,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;AACnF,CAAC;AACD,MAAM,UAAU,iBAAiB,CAAC,IAAyB;IACzD,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,WAAW,EAAE,OAAO,IAAI,CAAC,WAAW,KAAK,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW;QACnH,WAAW,EAAE,OAAO,IAAI,CAAC,WAAW,KAAK,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW;QAC3F,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC;AAC/C,CAAC;AACD,MAAM,UAAU,qBAAqB,CAAC,KAA+C;IACnF,OAAO,CAAC,gHAAgH;QACtH,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACxE,CAAC;AAED,2FAA2F;AAC3F,MAAM,UAAU,kBAAkB,CAAC,IAAyB;IAC1D,MAAM,MAAM,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;IAClC,OAAO,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,IAAI,MAAM;QAC1C,WAAW,EAAE,qBAAqB,CAAC,IAAI,EAAE,MAAM,CAAC,EAAE,CAAC;AACvD,CAAC;AACD,MAAM,UAAU,qBAAqB,CAAC,IAAyB,EAAE,MAAe;IAC9E,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;AAC5H,CAAC"}
|
package/dist/ci-wait/tools.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { type AgentToolResult } from './tool-registry.ts';
|
|
2
2
|
import type { SquawkAskAnswer, SquawkWaitAnswer } from '../contract/index.js';
|
|
3
|
-
export { waitToolDefinition, askToolDefinition, cancelWaitToolDefinition, doneToolDefinition
|
|
4
|
-
export { previewToolEnabled, automationsToolEnabled } from './tool-env.ts';
|
|
3
|
+
export { waitToolDefinition, askToolDefinition, cancelWaitToolDefinition, doneToolDefinition } from './tool-catalog.ts';
|
|
5
4
|
export { squawkToolNames, squawkToolEnvNames } from './tool-names.ts';
|
|
6
|
-
import { callSquawkAsk, callSquawkCancelWait, callSquawkDone, callSquawkWait
|
|
5
|
+
import { callSquawkAsk, callSquawkCancelWait, callSquawkDone, callSquawkWait } from './client.ts';
|
|
7
6
|
/**
|
|
8
7
|
* The one list of Squawk tools (#781). The MCP adapter lists it, Pi's extension registers it, and
|
|
9
8
|
* every allow-list or admission site reads its names, so adding a tool is one edit here.
|
|
@@ -540,387 +539,9 @@ export declare function formatDoneTool(answer: Awaited<ReturnType<typeof callSqu
|
|
|
540
539
|
})[] | undefined;
|
|
541
540
|
};
|
|
542
541
|
};
|
|
543
|
-
/** JSON first, then the hint as a plain sentence: the shape every Squawk tool answers in. */
|
|
544
|
-
export declare function invokePreviewTool(input: unknown): Promise<{
|
|
545
|
-
content: {
|
|
546
|
-
type: 'text';
|
|
547
|
-
text: string;
|
|
548
|
-
}[];
|
|
549
|
-
isError: boolean;
|
|
550
|
-
details: {
|
|
551
|
-
ok: boolean;
|
|
552
|
-
code: "cezar_port" | "cwd_outside_worktree" | "headless" | "invalid_input" | "port_held" | "preview_disabled" | "registered" | "replaced" | "too_many" | "unavailable" | "worktree_missing";
|
|
553
|
-
message: string;
|
|
554
|
-
hint: string;
|
|
555
|
-
};
|
|
556
|
-
}>;
|
|
557
|
-
export declare function formatPreviewTool(result: Awaited<ReturnType<typeof callPreviewServe>>): {
|
|
558
|
-
content: {
|
|
559
|
-
type: 'text';
|
|
560
|
-
text: string;
|
|
561
|
-
}[];
|
|
562
|
-
isError: boolean;
|
|
563
|
-
details: {
|
|
564
|
-
ok: boolean;
|
|
565
|
-
code: "cezar_port" | "cwd_outside_worktree" | "headless" | "invalid_input" | "port_held" | "preview_disabled" | "registered" | "replaced" | "too_many" | "unavailable" | "worktree_missing";
|
|
566
|
-
message: string;
|
|
567
|
-
hint: string;
|
|
568
|
-
};
|
|
569
|
-
};
|
|
570
|
-
export declare function invokePreviewStopTool(input: unknown): Promise<{
|
|
571
|
-
content: {
|
|
572
|
-
type: 'text';
|
|
573
|
-
text: string;
|
|
574
|
-
}[];
|
|
575
|
-
isError: boolean;
|
|
576
|
-
details: {
|
|
577
|
-
ok: boolean;
|
|
578
|
-
code: "adopted" | "approval_required" | "headless" | "invalid_input" | "not_registered" | "port_held" | "port_in_use" | "preview_disabled" | "restarted" | "stopped" | "unavailable" | "worktree_missing";
|
|
579
|
-
message: string;
|
|
580
|
-
hint: string;
|
|
581
|
-
};
|
|
582
|
-
}>;
|
|
583
|
-
export declare function formatPreviewStopTool(result: Awaited<ReturnType<typeof callPreviewStop>>): {
|
|
584
|
-
content: {
|
|
585
|
-
type: 'text';
|
|
586
|
-
text: string;
|
|
587
|
-
}[];
|
|
588
|
-
isError: boolean;
|
|
589
|
-
details: {
|
|
590
|
-
ok: boolean;
|
|
591
|
-
code: "adopted" | "approval_required" | "headless" | "invalid_input" | "not_registered" | "port_held" | "port_in_use" | "preview_disabled" | "restarted" | "stopped" | "unavailable" | "worktree_missing";
|
|
592
|
-
message: string;
|
|
593
|
-
hint: string;
|
|
594
|
-
};
|
|
595
|
-
};
|
|
596
|
-
export declare const PREVIEW_STOP_TOOL: SquawkTool;
|
|
597
|
-
export declare function invokeScheduleTaskTool(input: unknown): Promise<{
|
|
598
|
-
content: {
|
|
599
|
-
type: 'text';
|
|
600
|
-
text: string;
|
|
601
|
-
}[];
|
|
602
|
-
isError: boolean;
|
|
603
|
-
details: {
|
|
604
|
-
ok: true;
|
|
605
|
-
task: {
|
|
606
|
-
id: string;
|
|
607
|
-
name: string;
|
|
608
|
-
status: "archived" | "failed" | "missed" | "paused" | "waiting";
|
|
609
|
-
due_at: string;
|
|
610
|
-
latest_start_minutes?: number | undefined;
|
|
611
|
-
run_id?: string | undefined;
|
|
612
|
-
url?: string | undefined;
|
|
613
|
-
};
|
|
614
|
-
note: string;
|
|
615
|
-
} | {
|
|
616
|
-
ok: false;
|
|
617
|
-
code: "automations_off" | "conflict" | "invalid_request" | "not_found" | "unavailable";
|
|
618
|
-
message: string;
|
|
619
|
-
};
|
|
620
|
-
}>;
|
|
621
|
-
export declare function formatScheduleTaskTool(answer: Awaited<ReturnType<typeof callScheduleTask>>): {
|
|
622
|
-
content: {
|
|
623
|
-
type: 'text';
|
|
624
|
-
text: string;
|
|
625
|
-
}[];
|
|
626
|
-
isError: boolean;
|
|
627
|
-
details: {
|
|
628
|
-
ok: true;
|
|
629
|
-
task: {
|
|
630
|
-
id: string;
|
|
631
|
-
name: string;
|
|
632
|
-
status: "archived" | "failed" | "missed" | "paused" | "waiting";
|
|
633
|
-
due_at: string;
|
|
634
|
-
latest_start_minutes?: number | undefined;
|
|
635
|
-
run_id?: string | undefined;
|
|
636
|
-
url?: string | undefined;
|
|
637
|
-
};
|
|
638
|
-
note: string;
|
|
639
|
-
} | {
|
|
640
|
-
ok: false;
|
|
641
|
-
code: "automations_off" | "conflict" | "invalid_request" | "not_found" | "unavailable";
|
|
642
|
-
message: string;
|
|
643
|
-
};
|
|
644
|
-
};
|
|
645
|
-
export declare function invokeScheduledTasksTool(input: unknown): Promise<{
|
|
646
|
-
content: {
|
|
647
|
-
type: 'text';
|
|
648
|
-
text: string;
|
|
649
|
-
}[];
|
|
650
|
-
isError: boolean;
|
|
651
|
-
details: {
|
|
652
|
-
ok: false;
|
|
653
|
-
code: "automations_off" | "conflict" | "invalid_request" | "not_found" | "unavailable";
|
|
654
|
-
message: string;
|
|
655
|
-
} | {
|
|
656
|
-
ok: true;
|
|
657
|
-
tasks: {
|
|
658
|
-
id: string;
|
|
659
|
-
name: string;
|
|
660
|
-
status: "archived" | "failed" | "missed" | "paused" | "waiting";
|
|
661
|
-
due_at: string;
|
|
662
|
-
latest_start_minutes?: number | undefined;
|
|
663
|
-
run_id?: string | undefined;
|
|
664
|
-
url?: string | undefined;
|
|
665
|
-
}[];
|
|
666
|
-
} | {
|
|
667
|
-
ok: true;
|
|
668
|
-
task: {
|
|
669
|
-
id: string;
|
|
670
|
-
name: string;
|
|
671
|
-
status: "archived" | "failed" | "missed" | "paused" | "waiting";
|
|
672
|
-
due_at: string;
|
|
673
|
-
latest_start_minutes?: number | undefined;
|
|
674
|
-
run_id?: string | undefined;
|
|
675
|
-
url?: string | undefined;
|
|
676
|
-
};
|
|
677
|
-
};
|
|
678
|
-
}>;
|
|
679
|
-
export declare function formatScheduledTasksTool(answer: Awaited<ReturnType<typeof callScheduledTasks>>): {
|
|
680
|
-
content: {
|
|
681
|
-
type: 'text';
|
|
682
|
-
text: string;
|
|
683
|
-
}[];
|
|
684
|
-
isError: boolean;
|
|
685
|
-
details: {
|
|
686
|
-
ok: false;
|
|
687
|
-
code: "automations_off" | "conflict" | "invalid_request" | "not_found" | "unavailable";
|
|
688
|
-
message: string;
|
|
689
|
-
} | {
|
|
690
|
-
ok: true;
|
|
691
|
-
tasks: {
|
|
692
|
-
id: string;
|
|
693
|
-
name: string;
|
|
694
|
-
status: "archived" | "failed" | "missed" | "paused" | "waiting";
|
|
695
|
-
due_at: string;
|
|
696
|
-
latest_start_minutes?: number | undefined;
|
|
697
|
-
run_id?: string | undefined;
|
|
698
|
-
url?: string | undefined;
|
|
699
|
-
}[];
|
|
700
|
-
} | {
|
|
701
|
-
ok: true;
|
|
702
|
-
task: {
|
|
703
|
-
id: string;
|
|
704
|
-
name: string;
|
|
705
|
-
status: "archived" | "failed" | "missed" | "paused" | "waiting";
|
|
706
|
-
due_at: string;
|
|
707
|
-
latest_start_minutes?: number | undefined;
|
|
708
|
-
run_id?: string | undefined;
|
|
709
|
-
url?: string | undefined;
|
|
710
|
-
};
|
|
711
|
-
};
|
|
712
|
-
};
|
|
713
|
-
export declare function invokeAutomationTool(input: unknown): Promise<{
|
|
714
|
-
content: {
|
|
715
|
-
type: 'text';
|
|
716
|
-
text: string;
|
|
717
|
-
}[];
|
|
718
|
-
isError: boolean;
|
|
719
|
-
details: {
|
|
720
|
-
ok: true;
|
|
721
|
-
automation: {
|
|
722
|
-
[x: string]: unknown;
|
|
723
|
-
id: string;
|
|
724
|
-
revision: number;
|
|
725
|
-
name: string;
|
|
726
|
-
description?: string | undefined;
|
|
727
|
-
enabled: boolean;
|
|
728
|
-
kind: "github" | "schedule";
|
|
729
|
-
events?: ("issue.labeled" | "issue.opened" | "issue.unlabeled" | "pull_request.opened")[] | undefined;
|
|
730
|
-
intervalSeconds?: number | undefined;
|
|
731
|
-
filters?: {
|
|
732
|
-
[x: string]: unknown;
|
|
733
|
-
includeExisting?: boolean | undefined;
|
|
734
|
-
requireCurrentLabels?: boolean | undefined;
|
|
735
|
-
authors?: string[] | undefined;
|
|
736
|
-
assignees?: string[] | undefined;
|
|
737
|
-
allLabels?: string[] | undefined;
|
|
738
|
-
anyLabels?: string[] | undefined;
|
|
739
|
-
excludeLabels?: string[] | undefined;
|
|
740
|
-
changedLabels?: string[] | undefined;
|
|
741
|
-
lookbackDays: number;
|
|
742
|
-
maxRecords: number;
|
|
743
|
-
} | undefined;
|
|
744
|
-
schedule?: {
|
|
745
|
-
[x: string]: unknown;
|
|
746
|
-
type: "daily" | "hours" | "once" | "weekdays" | "weekly";
|
|
747
|
-
hour?: number | undefined;
|
|
748
|
-
minute?: number | undefined;
|
|
749
|
-
day?: number | undefined;
|
|
750
|
-
every?: 1 | 2 | 3 | 4 | 6 | 8 | 12 | undefined;
|
|
751
|
-
at?: string | undefined;
|
|
752
|
-
timeZone?: string | undefined;
|
|
753
|
-
latestStartMinutes?: number | undefined;
|
|
754
|
-
} | undefined;
|
|
755
|
-
task: {
|
|
756
|
-
[x: string]: unknown;
|
|
757
|
-
archiveWhenDone?: boolean | undefined;
|
|
758
|
-
autoMergePr?: boolean | undefined;
|
|
759
|
-
allowWorkers?: boolean | undefined;
|
|
760
|
-
allowMessaging?: boolean | undefined;
|
|
761
|
-
prompt: string;
|
|
762
|
-
workflow?: string | undefined;
|
|
763
|
-
steps?: {
|
|
764
|
-
id: string;
|
|
765
|
-
name?: string | undefined;
|
|
766
|
-
prompt?: string | undefined;
|
|
767
|
-
skill?: string | undefined;
|
|
768
|
-
model?: string | undefined;
|
|
769
|
-
effort?: string | undefined;
|
|
770
|
-
timeoutMs?: number | undefined;
|
|
771
|
-
runner?: string | undefined;
|
|
772
|
-
agentProfile?: string | undefined;
|
|
773
|
-
allowedTools?: string[] | undefined;
|
|
774
|
-
bashAllowlist?: string[] | undefined;
|
|
775
|
-
kind?: "plugin" | undefined;
|
|
776
|
-
pluginKind?: string | undefined;
|
|
777
|
-
config?: Record<string, unknown> | undefined;
|
|
778
|
-
command?: string | undefined;
|
|
779
|
-
onFail?: {
|
|
780
|
-
retry: string;
|
|
781
|
-
max: number;
|
|
782
|
-
} | undefined;
|
|
783
|
-
}[] | undefined;
|
|
784
|
-
runner?: string | undefined;
|
|
785
|
-
model?: string | undefined;
|
|
786
|
-
effort?: string | undefined;
|
|
787
|
-
variants?: 1 | 2 | 3 | undefined;
|
|
788
|
-
worktree?: boolean | undefined;
|
|
789
|
-
autonomous?: boolean | undefined;
|
|
790
|
-
systemPrompt?: string | undefined;
|
|
791
|
-
};
|
|
792
|
-
archived?: {
|
|
793
|
-
[x: string]: unknown;
|
|
794
|
-
at: string;
|
|
795
|
-
outcome: "cancelled" | "launched";
|
|
796
|
-
runId?: string | undefined;
|
|
797
|
-
receiptId?: string | undefined;
|
|
798
|
-
trigger?: "late" | "manual" | "retry" | "schedule" | undefined;
|
|
799
|
-
} | undefined;
|
|
800
|
-
createdAt: string;
|
|
801
|
-
updatedAt: string;
|
|
802
|
-
};
|
|
803
|
-
url?: string | undefined;
|
|
804
|
-
next_run_at?: string | undefined;
|
|
805
|
-
preview?: {
|
|
806
|
-
matches: number;
|
|
807
|
-
truncated: boolean;
|
|
808
|
-
} | undefined;
|
|
809
|
-
} | {
|
|
810
|
-
ok: false;
|
|
811
|
-
code: "automations_off" | "conflict" | "explicit_required" | "invalid_request" | "not_found" | "preview_required" | "unavailable";
|
|
812
|
-
message: string;
|
|
813
|
-
};
|
|
814
|
-
}>;
|
|
815
|
-
export declare function formatAutomationTool(answer: Awaited<ReturnType<typeof callAutomation>>): {
|
|
816
|
-
content: {
|
|
817
|
-
type: 'text';
|
|
818
|
-
text: string;
|
|
819
|
-
}[];
|
|
820
|
-
isError: boolean;
|
|
821
|
-
details: {
|
|
822
|
-
ok: true;
|
|
823
|
-
automation: {
|
|
824
|
-
[x: string]: unknown;
|
|
825
|
-
id: string;
|
|
826
|
-
revision: number;
|
|
827
|
-
name: string;
|
|
828
|
-
description?: string | undefined;
|
|
829
|
-
enabled: boolean;
|
|
830
|
-
kind: "github" | "schedule";
|
|
831
|
-
events?: ("issue.labeled" | "issue.opened" | "issue.unlabeled" | "pull_request.opened")[] | undefined;
|
|
832
|
-
intervalSeconds?: number | undefined;
|
|
833
|
-
filters?: {
|
|
834
|
-
[x: string]: unknown;
|
|
835
|
-
includeExisting?: boolean | undefined;
|
|
836
|
-
requireCurrentLabels?: boolean | undefined;
|
|
837
|
-
authors?: string[] | undefined;
|
|
838
|
-
assignees?: string[] | undefined;
|
|
839
|
-
allLabels?: string[] | undefined;
|
|
840
|
-
anyLabels?: string[] | undefined;
|
|
841
|
-
excludeLabels?: string[] | undefined;
|
|
842
|
-
changedLabels?: string[] | undefined;
|
|
843
|
-
lookbackDays: number;
|
|
844
|
-
maxRecords: number;
|
|
845
|
-
} | undefined;
|
|
846
|
-
schedule?: {
|
|
847
|
-
[x: string]: unknown;
|
|
848
|
-
type: "daily" | "hours" | "once" | "weekdays" | "weekly";
|
|
849
|
-
hour?: number | undefined;
|
|
850
|
-
minute?: number | undefined;
|
|
851
|
-
day?: number | undefined;
|
|
852
|
-
every?: 1 | 2 | 3 | 4 | 6 | 8 | 12 | undefined;
|
|
853
|
-
at?: string | undefined;
|
|
854
|
-
timeZone?: string | undefined;
|
|
855
|
-
latestStartMinutes?: number | undefined;
|
|
856
|
-
} | undefined;
|
|
857
|
-
task: {
|
|
858
|
-
[x: string]: unknown;
|
|
859
|
-
archiveWhenDone?: boolean | undefined;
|
|
860
|
-
autoMergePr?: boolean | undefined;
|
|
861
|
-
allowWorkers?: boolean | undefined;
|
|
862
|
-
allowMessaging?: boolean | undefined;
|
|
863
|
-
prompt: string;
|
|
864
|
-
workflow?: string | undefined;
|
|
865
|
-
steps?: {
|
|
866
|
-
id: string;
|
|
867
|
-
name?: string | undefined;
|
|
868
|
-
prompt?: string | undefined;
|
|
869
|
-
skill?: string | undefined;
|
|
870
|
-
model?: string | undefined;
|
|
871
|
-
effort?: string | undefined;
|
|
872
|
-
timeoutMs?: number | undefined;
|
|
873
|
-
runner?: string | undefined;
|
|
874
|
-
agentProfile?: string | undefined;
|
|
875
|
-
allowedTools?: string[] | undefined;
|
|
876
|
-
bashAllowlist?: string[] | undefined;
|
|
877
|
-
kind?: "plugin" | undefined;
|
|
878
|
-
pluginKind?: string | undefined;
|
|
879
|
-
config?: Record<string, unknown> | undefined;
|
|
880
|
-
command?: string | undefined;
|
|
881
|
-
onFail?: {
|
|
882
|
-
retry: string;
|
|
883
|
-
max: number;
|
|
884
|
-
} | undefined;
|
|
885
|
-
}[] | undefined;
|
|
886
|
-
runner?: string | undefined;
|
|
887
|
-
model?: string | undefined;
|
|
888
|
-
effort?: string | undefined;
|
|
889
|
-
variants?: 1 | 2 | 3 | undefined;
|
|
890
|
-
worktree?: boolean | undefined;
|
|
891
|
-
autonomous?: boolean | undefined;
|
|
892
|
-
systemPrompt?: string | undefined;
|
|
893
|
-
};
|
|
894
|
-
archived?: {
|
|
895
|
-
[x: string]: unknown;
|
|
896
|
-
at: string;
|
|
897
|
-
outcome: "cancelled" | "launched";
|
|
898
|
-
runId?: string | undefined;
|
|
899
|
-
receiptId?: string | undefined;
|
|
900
|
-
trigger?: "late" | "manual" | "retry" | "schedule" | undefined;
|
|
901
|
-
} | undefined;
|
|
902
|
-
createdAt: string;
|
|
903
|
-
updatedAt: string;
|
|
904
|
-
};
|
|
905
|
-
url?: string | undefined;
|
|
906
|
-
next_run_at?: string | undefined;
|
|
907
|
-
preview?: {
|
|
908
|
-
matches: number;
|
|
909
|
-
truncated: boolean;
|
|
910
|
-
} | undefined;
|
|
911
|
-
} | {
|
|
912
|
-
ok: false;
|
|
913
|
-
code: "automations_off" | "conflict" | "explicit_required" | "invalid_request" | "not_found" | "preview_required" | "unavailable";
|
|
914
|
-
message: string;
|
|
915
|
-
};
|
|
916
|
-
};
|
|
917
|
-
export declare const AUTOMATION_TOOL: SquawkTool;
|
|
918
|
-
export declare const SCHEDULE_TASK_TOOL: SquawkTool;
|
|
919
|
-
export declare const SCHEDULED_TASKS_TOOL: SquawkTool;
|
|
920
542
|
export declare const WAIT_TOOL: SquawkTool;
|
|
921
543
|
export declare const ASK_TOOL: SquawkTool;
|
|
922
544
|
export declare const CANCEL_WAIT_TOOL: SquawkTool;
|
|
923
545
|
export declare const DONE_TOOL: SquawkTool;
|
|
924
|
-
export declare const PREVIEW_TOOL: SquawkTool;
|
|
925
546
|
export declare function squawkTools(env?: NodeJS.ProcessEnv): SquawkTool[];
|
|
926
547
|
export declare function squawkServerInstructions(env?: NodeJS.ProcessEnv): string;
|