@hearsay-tools/squawk 0.18.0-pr4352.8504 → 0.18.0-pr4353.8518
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/controller.d.ts +7 -7
- package/dist/delegation/provision.d.ts +1 -2
- package/dist/delegation/provision.js +26 -45
- package/dist/delegation/provision.js.map +1 -1
- package/dist/delegation/routes.d.ts +65 -65
- package/dist/delegation/transport.d.ts +65 -65
- package/dist/runners/antigravity/acp/events.d.ts +1 -9
- package/dist/runners/antigravity/acp/events.js +11 -52
- package/dist/runners/antigravity/acp/events.js.map +1 -1
- package/dist/runners/antigravity/acp/protocol.d.ts +1 -12
- package/dist/runners/antigravity/acp/protocol.js.map +1 -1
- package/dist/runners/antigravity/acp/session.d.ts +0 -3
- package/dist/runners/antigravity/acp/session.js +0 -9
- package/dist/runners/antigravity/acp/session.js.map +1 -1
- package/dist/runners/antigravity/antigravity-runner.d.ts +2 -2
- package/dist/runners/antigravity/antigravity-session.d.ts +4 -4
- package/dist/runners/antigravity/antigravity-session.js +20 -48
- package/dist/runners/antigravity/antigravity-session.js.map +1 -1
- package/dist/runners/antigravity/antigravity-ui-mapper.d.ts +0 -2
- package/dist/runners/antigravity/antigravity-ui-mapper.js +3 -11
- package/dist/runners/antigravity/antigravity-ui-mapper.js.map +1 -1
- package/dist/runners/antigravity/facts.d.ts +2 -2
- package/dist/runners/antigravity/facts.js +5 -7
- package/dist/runners/antigravity/facts.js.map +1 -1
- package/dist/runners/antigravity/mock.d.ts +2 -4
- package/dist/runners/antigravity/mock.js +2 -3
- package/dist/runners/antigravity/mock.js.map +1 -1
- package/dist/runners/antigravity/spec-support.js +1 -1
- package/dist/runners/antigravity/spec-support.js.map +1 -1
- package/dist/runners/antigravity/subagent-guard.d.ts +17 -0
- package/dist/runners/antigravity/subagent-guard.js +38 -0
- package/dist/runners/antigravity/subagent-guard.js.map +1 -0
- package/dist/runners/antigravity/tool-normalization.d.ts +0 -2
- package/dist/runners/antigravity/tool-normalization.js +2 -44
- package/dist/runners/antigravity/tool-normalization.js.map +1 -1
- package/dist/runners/antigravity/tool-transcript.d.ts +50 -24
- package/dist/runners/antigravity/tool-transcript.js +192 -88
- package/dist/runners/antigravity/tool-transcript.js.map +1 -1
- package/dist/runners/antigravity/wire-updates.d.ts +6 -4
- package/dist/runners/antigravity/wire-updates.js +3 -25
- package/dist/runners/antigravity/wire-updates.js.map +1 -1
- package/dist/server/automations-routes.d.ts +150 -150
- package/dist/server/project-settings-routes.d.ts +107 -107
- package/dist/server/projects-routes.d.ts +45 -45
- package/dist/server/provider-sign-in-routes.d.ts +2 -2
- package/dist/server/runner-install-routes.d.ts +10 -10
- package/dist/server/runners-routes.d.ts +10 -10
- package/dist/server/runs-routes.d.ts +304 -304
- package/dist/workflows/run/continuation-session.js +1 -1
- package/dist/workflows/run/continuation-session.js.map +1 -1
- package/dist/workflows/run/launch-context.d.ts +1 -1
- package/dist/workflows/run/launch-context.js +2 -2
- package/dist/workflows/run/launch-context.js.map +1 -1
- package/dist/workflows/run/session-events.d.ts +2 -2
- package/dist/workflows/run/session-events.js +2 -2
- package/dist/workflows/run/session-events.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-states.js +1 -1
- package/dist/workflows/run-states.js.map +1 -1
- package/package.json +4 -4
- package/scripts/mock-acp.mjs +15 -128
- package/dist/runners/antigravity/subagent-tracker.d.ts +0 -50
- package/dist/runners/antigravity/subagent-tracker.js +0 -152
- package/dist/runners/antigravity/subagent-tracker.js.map +0 -1
- package/dist/runners/antigravity/subagent-transcript.d.ts +0 -41
- package/dist/runners/antigravity/subagent-transcript.js +0 -185
- package/dist/runners/antigravity/subagent-transcript.js.map +0 -1
- package/dist/runners/antigravity/transcript-tailer.d.ts +0 -56
- package/dist/runners/antigravity/transcript-tailer.js +0 -175
- package/dist/runners/antigravity/transcript-tailer.js.map +0 -1
|
@@ -121,12 +121,9 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
121
121
|
} & {
|
|
122
122
|
"/api/v1/tools/:name": {
|
|
123
123
|
$post: {
|
|
124
|
-
output:
|
|
125
|
-
code: string;
|
|
126
|
-
message: string;
|
|
127
|
-
};
|
|
124
|
+
output: never;
|
|
128
125
|
outputFormat: "json";
|
|
129
|
-
status:
|
|
126
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
130
127
|
input: {
|
|
131
128
|
json: unknown;
|
|
132
129
|
} & {
|
|
@@ -149,9 +146,12 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
149
146
|
};
|
|
150
147
|
};
|
|
151
148
|
} | {
|
|
152
|
-
output:
|
|
149
|
+
output: {
|
|
150
|
+
code: string;
|
|
151
|
+
message: string;
|
|
152
|
+
};
|
|
153
153
|
outputFormat: "json";
|
|
154
|
-
status:
|
|
154
|
+
status: 401;
|
|
155
155
|
input: {
|
|
156
156
|
json: unknown;
|
|
157
157
|
} & {
|
|
@@ -8,7 +8,7 @@ export type DelegationSession = {
|
|
|
8
8
|
instructions: string;
|
|
9
9
|
revoke(): void;
|
|
10
10
|
};
|
|
11
|
-
export type DelegationProvisioner = (runId: string
|
|
11
|
+
export type DelegationProvisioner = (runId: string) => DelegationSession | undefined;
|
|
12
12
|
export declare function bundledWorkerInvocation(command?: 'worker' | 'discover' | 'message'): string;
|
|
13
13
|
export declare function provisionDelegationSession(options: {
|
|
14
14
|
projectId: string;
|
|
@@ -16,7 +16,6 @@ export declare function provisionDelegationSession(options: {
|
|
|
16
16
|
store: RunStore;
|
|
17
17
|
credentials: CredentialRegistry;
|
|
18
18
|
url: string;
|
|
19
|
-
runner?: string;
|
|
20
19
|
}): DelegationSession | undefined;
|
|
21
20
|
/** Owns one invisible loopback listener in this controller, for cockpit AND headless use. */
|
|
22
21
|
export declare class DelegationController {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { commandText } from '../home/command.js';
|
|
2
2
|
import { productEnvEntries } from '../core/product-env.js';
|
|
3
|
-
import {
|
|
4
|
-
import { isRegisteredRunner, knownRunnerIds, runnersSealed } from '../core/runner-registry.js';
|
|
3
|
+
import { knownRunnerIds } from '../core/runner-registry.js';
|
|
5
4
|
import { randomUUID } from 'node:crypto';
|
|
6
5
|
import { fileURLToPath } from 'node:url';
|
|
7
6
|
import { CredentialRegistry } from './credentials.js';
|
|
@@ -21,37 +20,6 @@ export function bundledWorkerInvocation(command = 'worker') {
|
|
|
21
20
|
const entry = fileURLToPath(new URL(source ? '../index.ts' : '../index.js', import.meta.url));
|
|
22
21
|
return [process.execPath, ...(source ? ['--import', import.meta.resolve('tsx')] : []), entry].map(quote).join(' ') + ` ${command}`;
|
|
23
22
|
}
|
|
24
|
-
function nativeSubagentsEnabled(runner) {
|
|
25
|
-
if (!runner || !runnersSealed() || !isRegisteredRunner(runner))
|
|
26
|
-
return true;
|
|
27
|
-
return RUNNER_FACTS[runner]?.nativeSubagents !== 'none';
|
|
28
|
-
}
|
|
29
|
-
function nativeSubagentCopy(allow, messaging) {
|
|
30
|
-
const only = allow
|
|
31
|
-
? `You may use native subagents and message them with your runner's tools. No agent channel to another task exists: tell the user instead.`
|
|
32
|
-
: `No agent channel to another task exists: tell the user instead.`;
|
|
33
|
-
const channel = [
|
|
34
|
-
...(allow ? [`You may message your own native subagents with your runner's tools.`] : []),
|
|
35
|
-
`Reach another Squawk task only through ${messaging}; never use your runner's native tools for that.`,
|
|
36
|
-
].join(' ');
|
|
37
|
-
return { only, channel };
|
|
38
|
-
}
|
|
39
|
-
function workerSessionInstructions(run, invocation, conversationGuidance, allowNativeSubagents, subagentMessaging) {
|
|
40
|
-
const notice = run.delegation?.role === 'worker' ? workspaceKind(run.delegation.workspace).workerNotice : undefined;
|
|
41
|
-
return [
|
|
42
|
-
`You are an owned Squawk worker. Your parent run ID is ${supervisorIdOf(run)}.`,
|
|
43
|
-
...(notice ? [notice] : []),
|
|
44
|
-
conversationGuidance,
|
|
45
|
-
`${maySpawn(run) ? `You may start one shared-workspace Squawk worker at a time; destroy it before you start the next. Run ${invocation} spawn --help first.` : `You cannot spawn Squawk workers.`} You cannot control peers, merge automatically, or accept your own review.`,
|
|
46
|
-
commandText(supervisedByFamilyRecord(run)
|
|
47
|
-
? `Follow your assigned task and selected input context. Ask your parent with cez message request; any question you raise goes to your parent too, never to a human. Your parent answers or asks the human itself; do not wait for a human.`
|
|
48
|
-
: `Follow your assigned task and selected input context. Send every question to your parent as a request with cez message request and wait for its reply: no question card reaches your parent or a human. Do not wait for a human.`),
|
|
49
|
-
...(allowNativeSubagents ? [`You may use native subagents for research, code reading and focused analysis.`] : []),
|
|
50
|
-
subagentMessaging,
|
|
51
|
-
`Commit reviewed work before your parent deliberately integrates it; report the summary, commits, tests and remaining concerns.`,
|
|
52
|
-
`When you park before finishing while your parent waits on you, Squawk tells your parent what you wait on and quotes your last message: end such a turn by saying what you wait on and what you have done.`,
|
|
53
|
-
].join(' ');
|
|
54
|
-
}
|
|
55
23
|
export function provisionDelegationSession(options) {
|
|
56
24
|
delegationEndpoint(options.url);
|
|
57
25
|
const run = options.store.getRun(options.runId);
|
|
@@ -59,7 +27,6 @@ export function provisionDelegationSession(options) {
|
|
|
59
27
|
return;
|
|
60
28
|
const invocation = bundledWorkerInvocation();
|
|
61
29
|
const messaging = bundledWorkerInvocation('message');
|
|
62
|
-
const allowNativeSubagents = nativeSubagentsEnabled(options.runner ?? run.runner);
|
|
63
30
|
const conversationGuidance = [
|
|
64
31
|
`For task conversations, use ${messaging}. Root tasks can message peer root tasks in the same project and their owned workers; a worker may address only its parent and a worker it started. Use ${messaging} tasks [--all] [--offset <n>] to discover peers (32 per page); workers cannot list peers. Peer review/terminal tasks need their human to continue them; messages never resume a peer.`,
|
|
65
32
|
`Use ${messaging} request <recipient-run-id> '<text>' --id <message-UUID> to request an explicit reply; use ${messaging} progress <recipient-run-id> '<text>' --id <message-UUID> for an update without an obligation.`,
|
|
@@ -78,8 +45,12 @@ export function provisionDelegationSession(options) {
|
|
|
78
45
|
`Controller persistence prevents duplicate queue entries; a crash between provider acceptance and its delivery checkpoint can still make delivery ambiguous.`,
|
|
79
46
|
`Credentials stay in the environment: never read, echo, forward, or persist them.`,
|
|
80
47
|
].join(' ');
|
|
81
|
-
// hearsay-tools/cezarion#2279: native subagents are allowed
|
|
82
|
-
const
|
|
48
|
+
// hearsay-tools/cezarion#2279: native subagents are allowed; tasks talk only through cez message.
|
|
49
|
+
const subagentOnly = `You may use native subagents and message them with your runner's tools. No agent channel to another task exists: tell the user instead.`;
|
|
50
|
+
const subagentMessaging = [
|
|
51
|
+
`You may message your own native subagents with your runner's tools.`,
|
|
52
|
+
`Reach another Squawk task only through ${messaging}; never use your runner's native tools for that.`,
|
|
53
|
+
].join(' ');
|
|
83
54
|
/** What the task may do only to workers it started itself: both the workers-on and the workers-off prompt say it. */
|
|
84
55
|
const ownWorkersOnly = 'Message, steer and diff apply to workers you started yourself; a worker that one of your workers started is reached through that worker.';
|
|
85
56
|
const worker = run.delegation?.role === 'worker';
|
|
@@ -102,13 +73,11 @@ export function provisionDelegationSession(options) {
|
|
|
102
73
|
options.store.commitDelegation([{ id: run.id, delegation: rootDelegation() }]);
|
|
103
74
|
const messagingOff = messagingOn ? [] : [`Task messaging is off for this task: you cannot list, message or wait on peer tasks; a human can turn it on in the task menu. Messages with your own workers, and replies to peer requests accepted earlier, still work.`];
|
|
104
75
|
const rootInstructions = () => workersOn ? [
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
`For example, a subagent reads the parser and summarizes how it handles errors.`,
|
|
108
|
-
] : []),
|
|
76
|
+
`Use native subagents for work that needs no separate worktree: research, code reading and focused analysis.`,
|
|
77
|
+
`For example, a subagent reads the parser and summarizes how it handles errors.`,
|
|
109
78
|
`Use Squawk workers for work that needs its own worktree, its own commits or a lifecycle Squawk tracks.`,
|
|
110
79
|
`Also use a Squawk worker when the task needs a model available only through another runner, even if the work is research or analysis.`,
|
|
111
|
-
|
|
80
|
+
`Native subagents need no Squawk worker, worktree, collection or destruction.`,
|
|
112
81
|
subagentMessaging,
|
|
113
82
|
`Owned workers are available through the bundled command ${invocation}.`,
|
|
114
83
|
`Commands return JSON.`,
|
|
@@ -158,7 +127,7 @@ export function provisionDelegationSession(options) {
|
|
|
158
127
|
`A worker may start one shared-workspace worker of its own at a time. ${ownWorkersOnly} Workers cannot message peers.`,
|
|
159
128
|
`This is cooperative local supervision, not process isolation.`,
|
|
160
129
|
] : [
|
|
161
|
-
|
|
130
|
+
`Use native subagents for research, code reading and focused analysis.`,
|
|
162
131
|
subagentMessaging,
|
|
163
132
|
WORKERS_OFF,
|
|
164
133
|
...(owned ? [`You still manage the workers you own with ${invocation} list, inspect, collect, steer, stop, destroy, diff and wait. ${ownWorkersOnly} Collect the latest settled revision of every worker before completing.`] : []),
|
|
@@ -172,7 +141,19 @@ export function provisionDelegationSession(options) {
|
|
|
172
141
|
restrictCrossSessionMessaging: true,
|
|
173
142
|
env: { ...productEnvEntries('DELEGATION_URL', options.url), ...productEnvEntries('DELEGATION_TOKEN', token) },
|
|
174
143
|
instructions: run.delegation?.role === 'worker'
|
|
175
|
-
?
|
|
144
|
+
? [
|
|
145
|
+
`You are an owned Squawk worker. Your parent run ID is ${supervisorIdOf(run)}.`,
|
|
146
|
+
...(workspaceKind(run.delegation.workspace).workerNotice ? [workspaceKind(run.delegation.workspace).workerNotice] : []),
|
|
147
|
+
conversationGuidance,
|
|
148
|
+
`${maySpawn(run) ? `You may start one shared-workspace Squawk worker at a time; destroy it before you start the next. Run ${invocation} spawn --help first.` : `You cannot spawn Squawk workers.`} You cannot control peers, merge automatically, or accept your own review.`,
|
|
149
|
+
commandText(supervisedByFamilyRecord(run)
|
|
150
|
+
? `Follow your assigned task and selected input context. Ask your parent with cez message request; any question you raise goes to your parent too, never to a human. Your parent answers or asks the human itself; do not wait for a human.`
|
|
151
|
+
: `Follow your assigned task and selected input context. Send every question to your parent as a request with cez message request and wait for its reply: no question card reaches your parent or a human. Do not wait for a human.`),
|
|
152
|
+
`You may use native subagents for research, code reading and focused analysis.`,
|
|
153
|
+
subagentMessaging,
|
|
154
|
+
`Commit reviewed work before your parent deliberately integrates it; report the summary, commits, tests and remaining concerns.`,
|
|
155
|
+
`When you park before finishing while your parent waits on you, Squawk tells your parent what you wait on and quotes your last message: end such a turn by saying what you wait on and what you have done.`,
|
|
156
|
+
].join(' ')
|
|
176
157
|
: rootInstructions().join(' '),
|
|
177
158
|
revoke: () => options.credentials.revoke(run.id, generation),
|
|
178
159
|
};
|
|
@@ -210,11 +191,11 @@ export class DelegationController {
|
|
|
210
191
|
return () => { };
|
|
211
192
|
this.projects.get(project.id)?.detach();
|
|
212
193
|
const unregister = this.service.registerProject(project);
|
|
213
|
-
const clear = project.manager.setDelegationProvisioner(
|
|
194
|
+
const clear = project.manager.setDelegationProvisioner(runId => {
|
|
214
195
|
if (this.closed || !this.transport)
|
|
215
196
|
return;
|
|
216
197
|
try {
|
|
217
|
-
return provisionDelegationSession({ projectId: project.id, runId, store: project.store, credentials: this.credentials, url: this.transport.url
|
|
198
|
+
return provisionDelegationSession({ projectId: project.id, runId, store: project.store, credentials: this.credentials, url: this.transport.url });
|
|
218
199
|
}
|
|
219
200
|
catch {
|
|
220
201
|
this.credentials.revoke(runId);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provision.js","sourceRoot":"","sources":["../../src/delegation/provision.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"provision.js","sourceRoot":"","sources":["../../src/delegation/provision.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE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M,EAAE,CAAC,CAAC;QACnD,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,KAAK,CAAC,KAAK;QACT,IAAI,IAAI,CAAC,MAAM;YAAE,OAAO;QACxB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QACnB,KAAK,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;YAAE,MAAM,EAAE,CAAC;QAC/D,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,CAAC;QACzB,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;QAAC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC7D,MAAM,SAAS,EAAE,KAAK,EAAE,CAAC;IAC3B,CAAC;CACF"}
|
|
@@ -27,6 +27,18 @@ export declare function delegationFailure(error: unknown): {
|
|
|
27
27
|
export declare function createDelegationRoutes(service: DelegationService, credentials: CredentialRegistry): import("hono/hono-base").HonoBase<Env, {
|
|
28
28
|
"/list": {
|
|
29
29
|
$get: {
|
|
30
|
+
output: {
|
|
31
|
+
error: string;
|
|
32
|
+
code?: "invalid_input" | undefined;
|
|
33
|
+
};
|
|
34
|
+
outputFormat: "json";
|
|
35
|
+
status: 400;
|
|
36
|
+
input: {
|
|
37
|
+
query: {
|
|
38
|
+
offset?: string | undefined;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
} | {
|
|
30
42
|
output: {
|
|
31
43
|
workers: {
|
|
32
44
|
workerId: string;
|
|
@@ -79,18 +91,6 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
79
91
|
offset?: string | undefined;
|
|
80
92
|
};
|
|
81
93
|
};
|
|
82
|
-
} | {
|
|
83
|
-
output: {
|
|
84
|
-
error: string;
|
|
85
|
-
code?: "invalid_input" | undefined;
|
|
86
|
-
};
|
|
87
|
-
outputFormat: "json";
|
|
88
|
-
status: 400;
|
|
89
|
-
input: {
|
|
90
|
-
query: {
|
|
91
|
-
offset?: string | undefined;
|
|
92
|
-
};
|
|
93
|
-
};
|
|
94
94
|
};
|
|
95
95
|
};
|
|
96
96
|
} & {
|
|
@@ -677,6 +677,18 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
677
677
|
} & {
|
|
678
678
|
"/:workerId": {
|
|
679
679
|
$get: {
|
|
680
|
+
output: {
|
|
681
|
+
error: string;
|
|
682
|
+
code?: "invalid_input" | undefined;
|
|
683
|
+
};
|
|
684
|
+
outputFormat: "json";
|
|
685
|
+
status: 400;
|
|
686
|
+
input: {
|
|
687
|
+
param: {
|
|
688
|
+
workerId: string;
|
|
689
|
+
};
|
|
690
|
+
};
|
|
691
|
+
} | {
|
|
680
692
|
output: {
|
|
681
693
|
workerId: string;
|
|
682
694
|
settled: boolean;
|
|
@@ -801,7 +813,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
801
813
|
workerId: string;
|
|
802
814
|
};
|
|
803
815
|
};
|
|
804
|
-
}
|
|
816
|
+
};
|
|
817
|
+
};
|
|
818
|
+
} & {
|
|
819
|
+
"/:workerId/collect": {
|
|
820
|
+
$post: {
|
|
805
821
|
output: {
|
|
806
822
|
error: string;
|
|
807
823
|
code?: "invalid_input" | undefined;
|
|
@@ -812,12 +828,10 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
812
828
|
param: {
|
|
813
829
|
workerId: string;
|
|
814
830
|
};
|
|
831
|
+
} & {
|
|
832
|
+
json: Record<string, never>;
|
|
815
833
|
};
|
|
816
|
-
}
|
|
817
|
-
};
|
|
818
|
-
} & {
|
|
819
|
-
"/:workerId/collect": {
|
|
820
|
-
$post: {
|
|
834
|
+
} | {
|
|
821
835
|
output: {
|
|
822
836
|
workerId: string;
|
|
823
837
|
parentRunId: string;
|
|
@@ -940,7 +954,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
940
954
|
} & {
|
|
941
955
|
json: Record<string, never>;
|
|
942
956
|
};
|
|
943
|
-
}
|
|
957
|
+
};
|
|
958
|
+
};
|
|
959
|
+
} & {
|
|
960
|
+
"/:workerId/steer": {
|
|
961
|
+
$post: {
|
|
944
962
|
output: {
|
|
945
963
|
error: string;
|
|
946
964
|
code?: "invalid_input" | undefined;
|
|
@@ -952,13 +970,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
952
970
|
workerId: string;
|
|
953
971
|
};
|
|
954
972
|
} & {
|
|
955
|
-
json:
|
|
973
|
+
json: {
|
|
974
|
+
text: string;
|
|
975
|
+
};
|
|
956
976
|
};
|
|
957
|
-
}
|
|
958
|
-
};
|
|
959
|
-
} & {
|
|
960
|
-
"/:workerId/steer": {
|
|
961
|
-
$post: {
|
|
977
|
+
} | {
|
|
962
978
|
output: {
|
|
963
979
|
workerId: string;
|
|
964
980
|
state: "delivered" | "queued";
|
|
@@ -974,7 +990,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
974
990
|
text: string;
|
|
975
991
|
};
|
|
976
992
|
};
|
|
977
|
-
}
|
|
993
|
+
};
|
|
994
|
+
};
|
|
995
|
+
} & {
|
|
996
|
+
"/:workerId/stop": {
|
|
997
|
+
$post: {
|
|
978
998
|
output: {
|
|
979
999
|
error: string;
|
|
980
1000
|
code?: "invalid_input" | undefined;
|
|
@@ -986,15 +1006,9 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
986
1006
|
workerId: string;
|
|
987
1007
|
};
|
|
988
1008
|
} & {
|
|
989
|
-
json:
|
|
990
|
-
text: string;
|
|
991
|
-
};
|
|
1009
|
+
json: Record<string, never>;
|
|
992
1010
|
};
|
|
993
|
-
}
|
|
994
|
-
};
|
|
995
|
-
} & {
|
|
996
|
-
"/:workerId/stop": {
|
|
997
|
-
$post: {
|
|
1011
|
+
} | {
|
|
998
1012
|
output: {
|
|
999
1013
|
workerId: string;
|
|
1000
1014
|
state: "stopping" | "terminated";
|
|
@@ -1008,7 +1022,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
1008
1022
|
} & {
|
|
1009
1023
|
json: Record<string, never>;
|
|
1010
1024
|
};
|
|
1011
|
-
}
|
|
1025
|
+
};
|
|
1026
|
+
};
|
|
1027
|
+
} & {
|
|
1028
|
+
"/:workerId/destroy": {
|
|
1029
|
+
$post: {
|
|
1012
1030
|
output: {
|
|
1013
1031
|
error: string;
|
|
1014
1032
|
code?: "invalid_input" | undefined;
|
|
@@ -1020,13 +1038,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
1020
1038
|
workerId: string;
|
|
1021
1039
|
};
|
|
1022
1040
|
} & {
|
|
1023
|
-
json:
|
|
1041
|
+
json: {
|
|
1042
|
+
discardWork?: true | undefined;
|
|
1043
|
+
};
|
|
1024
1044
|
};
|
|
1025
|
-
}
|
|
1026
|
-
};
|
|
1027
|
-
} & {
|
|
1028
|
-
"/:workerId/destroy": {
|
|
1029
|
-
$post: {
|
|
1045
|
+
} | {
|
|
1030
1046
|
output: {
|
|
1031
1047
|
workerId: string;
|
|
1032
1048
|
state: "complete" | "incomplete";
|
|
@@ -1055,22 +1071,6 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
1055
1071
|
discardWork?: true | undefined;
|
|
1056
1072
|
};
|
|
1057
1073
|
};
|
|
1058
|
-
} | {
|
|
1059
|
-
output: {
|
|
1060
|
-
error: string;
|
|
1061
|
-
code?: "invalid_input" | undefined;
|
|
1062
|
-
};
|
|
1063
|
-
outputFormat: "json";
|
|
1064
|
-
status: 400;
|
|
1065
|
-
input: {
|
|
1066
|
-
param: {
|
|
1067
|
-
workerId: string;
|
|
1068
|
-
};
|
|
1069
|
-
} & {
|
|
1070
|
-
json: {
|
|
1071
|
-
discardWork?: true | undefined;
|
|
1072
|
-
};
|
|
1073
|
-
};
|
|
1074
1074
|
} | {
|
|
1075
1075
|
output: {
|
|
1076
1076
|
workerId: string;
|
|
@@ -1106,13 +1106,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
1106
1106
|
"/:workerId/diff": {
|
|
1107
1107
|
$get: {
|
|
1108
1108
|
output: {
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
diff: string;
|
|
1112
|
-
truncated: boolean;
|
|
1109
|
+
error: string;
|
|
1110
|
+
code?: "invalid_input" | undefined;
|
|
1113
1111
|
};
|
|
1114
1112
|
outputFormat: "json";
|
|
1115
|
-
status:
|
|
1113
|
+
status: 400;
|
|
1116
1114
|
input: {
|
|
1117
1115
|
param: {
|
|
1118
1116
|
workerId: string;
|
|
@@ -1120,11 +1118,13 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
1120
1118
|
};
|
|
1121
1119
|
} | {
|
|
1122
1120
|
output: {
|
|
1123
|
-
|
|
1124
|
-
|
|
1121
|
+
workerId: string;
|
|
1122
|
+
baselineSha: string;
|
|
1123
|
+
diff: string;
|
|
1124
|
+
truncated: boolean;
|
|
1125
1125
|
};
|
|
1126
1126
|
outputFormat: "json";
|
|
1127
|
-
status:
|
|
1127
|
+
status: 200;
|
|
1128
1128
|
input: {
|
|
1129
1129
|
param: {
|
|
1130
1130
|
workerId: string;
|