@hearsay-tools/squawk 0.18.0-pr3778.7014 → 0.18.0-pr3778.7019
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 +42 -42
- package/dist/core/agent-runner.d.ts +13 -1
- package/dist/core/agent-runner.js +1 -0
- package/dist/core/agent-runner.js.map +1 -1
- package/dist/core/claude-cli-runner.d.ts +3 -0
- package/dist/core/claude-cli-runner.js +13 -6
- package/dist/core/claude-cli-runner.js.map +1 -1
- package/dist/core/codex-app-server-runner.d.ts +4 -18
- package/dist/core/codex-app-server-runner.js +43 -45
- package/dist/core/codex-app-server-runner.js.map +1 -1
- package/dist/core/codex-turn-config.d.ts +19 -0
- package/dist/core/codex-turn-config.js +30 -0
- package/dist/core/codex-turn-config.js.map +1 -0
- package/dist/core/omp-runner.d.ts +3 -0
- package/dist/core/omp-runner.js +32 -16
- package/dist/core/omp-runner.js.map +1 -1
- package/dist/core/omp-ui-mapper.d.ts +2 -2
- package/dist/core/omp-ui-mapper.js +21 -2
- package/dist/core/omp-ui-mapper.js.map +1 -1
- package/dist/core/opencode-http.d.ts +2 -0
- package/dist/core/opencode-http.js +25 -0
- package/dist/core/opencode-http.js.map +1 -0
- package/dist/core/opencode-questions.d.ts +3 -0
- package/dist/core/opencode-questions.js +66 -0
- package/dist/core/opencode-questions.js.map +1 -0
- package/dist/core/opencode-server-runner.d.ts +3 -0
- package/dist/core/opencode-server-runner.js +89 -98
- package/dist/core/opencode-server-runner.js.map +1 -1
- package/dist/core/pi-rpc-turn.d.ts +21 -6
- package/dist/core/pi-rpc-turn.js +42 -17
- package/dist/core/pi-rpc-turn.js.map +1 -1
- package/dist/core/pi-rpc-wire.d.ts +5 -0
- package/dist/core/pi-rpc-wire.js +27 -2
- package/dist/core/pi-rpc-wire.js.map +1 -1
- package/dist/core/pi-runner.d.ts +3 -0
- package/dist/core/pi-runner.js +21 -15
- package/dist/core/pi-runner.js.map +1 -1
- package/dist/core/runner-facts.d.ts +21 -0
- package/dist/core/runner-facts.js +5 -0
- package/dist/core/runner-facts.js.map +1 -1
- package/dist/core/skill-trigger.d.ts +10 -0
- package/dist/core/skill-trigger.js +32 -0
- package/dist/core/skill-trigger.js.map +1 -0
- package/dist/core/ui-events.d.ts +7 -0
- package/dist/delegation/routes.d.ts +75 -75
- package/dist/delegation/transport.d.ts +82 -82
- package/dist/server/reports-api.d.ts +2 -2
- package/dist/server/server.d.ts +1630 -1630
- package/dist/workflows/run/session-events.js +1 -1
- package/dist/workflows/run/session-events.js.map +1 -1
- package/package.json +4 -4
- package/scripts/mock-claude.mjs +18 -3
- package/scripts/mock-codex-app-server.mjs +14 -0
- package/scripts/mock-omp-rpc.mjs +10 -2
- package/scripts/mock-opencode-serve.mjs +37 -0
- package/scripts/mock-pi-rpc.mjs +16 -4
- package/scripts/mock-skill-trigger-data.mjs +168 -0
- package/scripts/mock-skill-trigger.mjs +34 -0
- package/web/dist/assets/{activity-motion-CXY7UQb8.js → activity-motion-DAjCyDzm.js} +1 -1
- package/web/dist/assets/{activity-route-CWdkKOcU.js → activity-route-6spKzFa-.js} +1 -1
- package/web/dist/assets/{commit-diff-panel-CilF4ucO.js → commit-diff-panel-uoyOydBG.js} +1 -1
- package/web/dist/assets/{diff-wu8MI0pe.js → diff-BefwAEc1.js} +2 -2
- package/web/dist/assets/{diff-view-BOeIj6fq.js → diff-view-CXtKy-02.js} +1 -1
- package/web/dist/assets/{file-preview-DDISrpoK.js → file-preview-TYTU1SBo.js} +1 -1
- package/web/dist/assets/{git-toolbar-DSFDBGUd.js → git-toolbar-BwD-ShUL.js} +1 -1
- package/web/dist/assets/{github-DBRyp_7V.js → github-DKC9GSOG.js} +1 -1
- package/web/dist/assets/{global-activity-route-8gXrkEI5.js → global-activity-route-BnUvjKgI.js} +1 -1
- package/web/dist/assets/{index-1Zw2w-1r.js → index-C6UoXbYK.js} +3 -3
- package/web/dist/assets/{preview-pane-connected-B_yXVXFs.js → preview-pane-connected-ZAr18goj.js} +3 -3
- package/web/dist/assets/{repo-git-cpVcsnni.js → repo-git-Y7MKcjLs.js} +1 -1
- package/web/dist/assets/{report-reader-BRw4X5KH.js → report-reader-CIcjK2_U.js} +1 -1
- package/web/dist/assets/{reports-BK0543bM.js → reports-SBr0VYKU.js} +1 -1
- package/web/dist/assets/{run-header-CZhtodUg.js → run-header-BSohU_tW.js} +1 -1
- package/web/dist/assets/{skills-0Az8jsnI.js → skills-B_NKCTPq.js} +1 -1
- package/web/dist/assets/{task-changes-jjPRV2ul.js → task-changes-Ozgv3HxN.js} +1 -1
- package/web/dist/assets/{task-commits-CxJKFd3j.js → task-commits-BxAERDIz.js} +1 -1
- package/web/dist/assets/{task-files-Ddk24Oe-.js → task-files-V84lmxj2.js} +1 -1
- package/web/dist/assets/{task-github-item-D49mwA5b.js → task-github-item-CByJ7mYg.js} +1 -1
- package/web/dist/assets/{task-thread-BlVvC3Mo.js → task-thread-C6v4ddX-.js} +9 -9
- package/web/dist/assets/thread-state-ni3Us7DE.js +4 -0
- package/web/dist/assets/{use-hand-to-agent-state-Cgc4s3aK.js → use-hand-to-agent-state-W5nhKd6-.js} +1 -1
- package/web/dist/assets/{workflows-BW6W8C0F.js → workflows-Cb0BDqy5.js} +1 -1
- package/web/dist/index.html +1 -1
- package/web/dist/assets/thread-state-DfIi2HR7.js +0 -4
|
@@ -8,6 +8,12 @@ import { type InputDelivery, type RunnerId, type SystemPromptOnResume } from './
|
|
|
8
8
|
* id. A test that must not load the runner classes reads the same row here.
|
|
9
9
|
*/
|
|
10
10
|
export interface RunnerFacts {
|
|
11
|
+
/** A native skill can be triggered while a turn is running. */
|
|
12
|
+
readonly skillTriggerMidTurn: boolean;
|
|
13
|
+
/** What the native trigger does with an unknown id. */
|
|
14
|
+
readonly skillUnknownName: 'error' | 'silent';
|
|
15
|
+
/** Whether an existing session sees later skill additions. */
|
|
16
|
+
readonly skillsSeenBySession: 'live' | 'at-start';
|
|
11
17
|
/** How the runner admits input while a turn runs (`InputDelivery`, hearsay-tools/cezarion#505). */
|
|
12
18
|
readonly inputDelivery: InputDelivery;
|
|
13
19
|
/** How the runner carries `spec.systemPrompt` onto a resumed session (hearsay-tools/cezarion#790). */
|
|
@@ -80,6 +86,9 @@ export interface RunnerFacts {
|
|
|
80
86
|
}
|
|
81
87
|
export declare const RUNNER_FACTS: {
|
|
82
88
|
readonly claude: {
|
|
89
|
+
readonly skillTriggerMidTurn: false;
|
|
90
|
+
readonly skillUnknownName: 'silent';
|
|
91
|
+
readonly skillsSeenBySession: 'at-start';
|
|
83
92
|
readonly childWork: 'nested';
|
|
84
93
|
readonly hookEvents: 'reported';
|
|
85
94
|
readonly nativePermission: 'none';
|
|
@@ -102,6 +111,9 @@ export declare const RUNNER_FACTS: {
|
|
|
102
111
|
readonly turnStart: 'on-write';
|
|
103
112
|
};
|
|
104
113
|
readonly codex: {
|
|
114
|
+
readonly skillTriggerMidTurn: false;
|
|
115
|
+
readonly skillUnknownName: 'silent';
|
|
116
|
+
readonly skillsSeenBySession: 'live';
|
|
105
117
|
readonly childWork: 'nested';
|
|
106
118
|
readonly hookEvents: 'reported';
|
|
107
119
|
readonly nativePermission: 'in-turn';
|
|
@@ -124,6 +136,9 @@ export declare const RUNNER_FACTS: {
|
|
|
124
136
|
readonly turnStart: 'on-wire';
|
|
125
137
|
};
|
|
126
138
|
readonly opencode: {
|
|
139
|
+
readonly skillTriggerMidTurn: false;
|
|
140
|
+
readonly skillUnknownName: 'error';
|
|
141
|
+
readonly skillsSeenBySession: 'at-start';
|
|
127
142
|
readonly childWork: 'nested';
|
|
128
143
|
readonly hookEvents: 'none';
|
|
129
144
|
readonly nativePermission: 'after-turn';
|
|
@@ -146,6 +161,9 @@ export declare const RUNNER_FACTS: {
|
|
|
146
161
|
readonly turnStart: 'on-wire';
|
|
147
162
|
};
|
|
148
163
|
readonly pi: {
|
|
164
|
+
readonly skillTriggerMidTurn: true;
|
|
165
|
+
readonly skillUnknownName: 'silent';
|
|
166
|
+
readonly skillsSeenBySession: 'at-start';
|
|
149
167
|
readonly childWork: 'none';
|
|
150
168
|
readonly hookEvents: 'none';
|
|
151
169
|
readonly nativePermission: 'none';
|
|
@@ -168,6 +186,9 @@ export declare const RUNNER_FACTS: {
|
|
|
168
186
|
readonly turnStart: 'on-write';
|
|
169
187
|
};
|
|
170
188
|
readonly omp: {
|
|
189
|
+
readonly skillTriggerMidTurn: true;
|
|
190
|
+
readonly skillUnknownName: 'silent';
|
|
191
|
+
readonly skillsSeenBySession: 'at-start';
|
|
171
192
|
readonly childWork: 'nested';
|
|
172
193
|
readonly hookEvents: 'none';
|
|
173
194
|
readonly nativePermission: 'none';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { RUNNER_IDS } from './agent-runner.js';
|
|
2
2
|
export const RUNNER_FACTS = {
|
|
3
3
|
claude: {
|
|
4
|
+
skillTriggerMidTurn: false, skillUnknownName: 'silent', skillsSeenBySession: 'at-start',
|
|
4
5
|
// childWork: a subagent's stream-json messages carry parent_tool_use_id (claude-ui-mapper.ts).
|
|
5
6
|
// hookEvents: --include-hook-events streams each hook run (claude-cli-runner.ts).
|
|
6
7
|
// nativePermission: print mode settles every permission inside Claude under its headless
|
|
@@ -21,6 +22,7 @@ export const RUNNER_FACTS = {
|
|
|
21
22
|
turnStart: 'on-write',
|
|
22
23
|
},
|
|
23
24
|
codex: {
|
|
25
|
+
skillTriggerMidTurn: false, skillUnknownName: 'silent', skillsSeenBySession: 'live',
|
|
24
26
|
// childWork: a child thread's items nest under its spawnAgent item through collabParentItemId
|
|
25
27
|
// (codex-hook-mapper.ts).
|
|
26
28
|
// hookEvents: app-server sends hook/started and hook/completed (codex-hook-mapper.ts).
|
|
@@ -44,6 +46,7 @@ export const RUNNER_FACTS = {
|
|
|
44
46
|
turnStart: 'on-wire',
|
|
45
47
|
},
|
|
46
48
|
opencode: {
|
|
49
|
+
skillTriggerMidTurn: false, skillUnknownName: 'error', skillsSeenBySession: 'at-start',
|
|
47
50
|
// childWork: a subtask's child-session parts nest under the subtask part (opencode-ui-mapper.ts).
|
|
48
51
|
// hookEvents: OpenCode 1.18.35 runs plugin hooks in-process; its SSE wire carries no hook event.
|
|
49
52
|
// nativePermission: a main-session permission.asked after session.idle means the server started
|
|
@@ -64,6 +67,7 @@ export const RUNNER_FACTS = {
|
|
|
64
67
|
turnStart: 'on-wire',
|
|
65
68
|
},
|
|
66
69
|
pi: {
|
|
70
|
+
skillTriggerMidTurn: true, skillUnknownName: 'silent', skillsSeenBySession: 'at-start',
|
|
67
71
|
// childWork: Pi RPC has no child session; a task tool is a plain tool call on the parent
|
|
68
72
|
// session (__fixtures__/pi/rpc-lifecycle.expected.json).
|
|
69
73
|
// hookEvents: Pi 1.0.4 runs extensions in-process; its RPC wire reports only extension_error.
|
|
@@ -83,6 +87,7 @@ export const RUNNER_FACTS = {
|
|
|
83
87
|
turnStart: 'on-write',
|
|
84
88
|
},
|
|
85
89
|
omp: {
|
|
90
|
+
skillTriggerMidTurn: true, skillUnknownName: 'silent', skillsSeenBySession: 'at-start',
|
|
86
91
|
// childWork: subagent_event frames carry subagent_lifecycle.parentToolCallId of their task call
|
|
87
92
|
// (omp-subagent-rows.ts).
|
|
88
93
|
// hookEvents: OMP 18.8.0 shares Pi's RPC wire: extensions run in-process and report only
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runner-facts.js","sourceRoot":"","sources":["../../src/core/runner-facts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAgE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"runner-facts.js","sourceRoot":"","sources":["../../src/core/runner-facts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAgE,MAAM,mBAAmB,CAAC;AAwF7G,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,MAAM,EAAE;QACN,mBAAmB,EAAE,KAAK,EAAE,gBAAgB,EAAE,QAAQ,EAAE,mBAAmB,EAAE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C5D,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { AgentRunSpec, ContentBlock, SkillTrigger } from './agent-runner.ts';
|
|
2
|
+
/** Adapters reject misplaced triggers before writing any native input. */
|
|
3
|
+
export declare function validSkillMessage(content: readonly ContentBlock[]): boolean;
|
|
4
|
+
export declare function skillOf(content: readonly ContentBlock[]): SkillTrigger | undefined;
|
|
5
|
+
/** Only adapters use this; shared workflow code does not send triggers yet. */
|
|
6
|
+
export declare function openingContent(spec: AgentRunSpec): ContentBlock[];
|
|
7
|
+
/** pi splits the name at the first space, so a newline cannot be the first argument. */
|
|
8
|
+
export declare function slashSkillPrompt(skill: SkillTrigger, context: string): string;
|
|
9
|
+
/** Claude expands only the last text block, with context before it. */
|
|
10
|
+
export declare function claudeSkillContent(content: ContentBlock[], allowed: boolean): ContentBlock[] | false;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/** Adapters reject misplaced triggers before writing any native input. */
|
|
2
|
+
export function validSkillMessage(content) {
|
|
3
|
+
return content.every((block, index) => block.type !== 'skill' || index === 0);
|
|
4
|
+
}
|
|
5
|
+
export function skillOf(content) {
|
|
6
|
+
return content[0]?.type === 'skill' ? content[0] : undefined;
|
|
7
|
+
}
|
|
8
|
+
/** Only adapters use this; shared workflow code does not send triggers yet. */
|
|
9
|
+
export function openingContent(spec) {
|
|
10
|
+
return [
|
|
11
|
+
...(spec.skill ? [{ type: 'skill', ...spec.skill }] : []),
|
|
12
|
+
...(spec.images ?? []),
|
|
13
|
+
{ type: 'text', text: spec.userPrompt },
|
|
14
|
+
];
|
|
15
|
+
}
|
|
16
|
+
/** pi splits the name at the first space, so a newline cannot be the first argument. */
|
|
17
|
+
export function slashSkillPrompt(skill, context) {
|
|
18
|
+
const args = skill.args.split('\n')[0]?.trim() ? skill.args : `Continue.${skill.args ? ` ${skill.args}` : ''}`;
|
|
19
|
+
return `/skill:${skill.id} ${args}${context ? `\n\n${context}` : ''}`;
|
|
20
|
+
}
|
|
21
|
+
/** Claude expands only the last text block, with context before it. */
|
|
22
|
+
export function claudeSkillContent(content, allowed) {
|
|
23
|
+
if (!validSkillMessage(content))
|
|
24
|
+
return false;
|
|
25
|
+
const skill = skillOf(content);
|
|
26
|
+
if (!skill)
|
|
27
|
+
return content;
|
|
28
|
+
if (!allowed)
|
|
29
|
+
return false;
|
|
30
|
+
return [...content.slice(1), { type: 'text', text: `/${skill.id}${skill.args ? ` ${skill.args}` : ''}` }];
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=skill-trigger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skill-trigger.js","sourceRoot":"","sources":["../../src/core/skill-trigger.ts"],"names":[],"mappings":"AAEA,0EAA0E;AAC1E,MAAM,UAAU,iBAAiB,CAAC,OAAgC;IAChE,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK,OAAO,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC;AAChF,CAAC;AAED,MAAM,UAAU,OAAO,CAAC,OAAgC;IACtD,OAAO,OAAO,CAAC,CAAC,CAAC,EAAE,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAC/D,CAAC;AAED,+EAA+E;AAC/E,MAAM,UAAU,cAAc,CAAC,IAAkB;IAC/C,OAAO;QACL,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,OAAgB,EAAE,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAClE,GAAG,CAAC,IAAI,CAAC,MAAM,IAAI,EAAE,CAAC;QACtB,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,UAAU,EAAE;KACxC,CAAC;AACJ,CAAC;AAED,wFAAwF;AACxF,MAAM,UAAU,gBAAgB,CAAC,KAAmB,EAAE,OAAe;IACnE,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,YAAY,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;IAC/G,OAAO,UAAU,KAAK,CAAC,EAAE,IAAI,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,OAAO,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;AACxE,CAAC;AAED,uEAAuE;AACvE,MAAM,UAAU,kBAAkB,CAAC,OAAuB,EAAE,OAAgB;IAC1E,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC;QAAE,OAAO,KAAK,CAAC;IAC9C,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC/B,IAAI,CAAC,KAAK;QAAE,OAAO,OAAO,CAAC;IAC3B,IAAI,CAAC,OAAO;QAAE,OAAO,KAAK,CAAC;IAC3B,OAAO,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,KAAK,CAAC,EAAE,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC5G,CAAC"}
|
package/dist/core/ui-events.d.ts
CHANGED
|
@@ -95,6 +95,11 @@ export interface ToolLocation {
|
|
|
95
95
|
/** A choice offered by a permission request (ACP option kinds). */
|
|
96
96
|
export type PermissionOptionKind = ContractPermissionOptionKind;
|
|
97
97
|
export type PermissionOption = ContractPermissionOption;
|
|
98
|
+
/** Adapter-local identity of a submitted skill prompt; absent in old saved events. */
|
|
99
|
+
export interface SkillInputIdentity {
|
|
100
|
+
id: string;
|
|
101
|
+
source: 'opening' | 'human' | 'agent';
|
|
102
|
+
}
|
|
98
103
|
/**
|
|
99
104
|
* A chat message.
|
|
100
105
|
* claude: `assistant` `text` blocks (whole-block, or true deltas via
|
|
@@ -106,6 +111,8 @@ export interface UiMessageItem {
|
|
|
106
111
|
id: string;
|
|
107
112
|
role: 'assistant' | 'user';
|
|
108
113
|
text: string;
|
|
114
|
+
/** The expansion echoes this submitted input; its display text is not its identity. */
|
|
115
|
+
skillInput?: SkillInputIdentity;
|
|
109
116
|
phase?: 'commentary' | 'final';
|
|
110
117
|
parentItemId?: string;
|
|
111
118
|
}
|
|
@@ -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;
|
|
@@ -64,33 +76,12 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
64
76
|
offset?: string | undefined;
|
|
65
77
|
};
|
|
66
78
|
};
|
|
67
|
-
} | {
|
|
68
|
-
output: {
|
|
69
|
-
error: string;
|
|
70
|
-
code?: "invalid_input" | undefined;
|
|
71
|
-
};
|
|
72
|
-
outputFormat: "json";
|
|
73
|
-
status: 400;
|
|
74
|
-
input: {
|
|
75
|
-
query: {
|
|
76
|
-
offset?: string | undefined;
|
|
77
|
-
};
|
|
78
|
-
};
|
|
79
79
|
};
|
|
80
80
|
};
|
|
81
81
|
} & {
|
|
82
82
|
"/discover": {
|
|
83
83
|
$post: {
|
|
84
84
|
output: {
|
|
85
|
-
scope: "host-default-account";
|
|
86
|
-
runners: {
|
|
87
|
-
status: "connected" | "disconnected" | "not-installed" | "unknown";
|
|
88
|
-
enabled?: boolean | undefined;
|
|
89
|
-
hint?: string | undefined;
|
|
90
|
-
authFailureId?: string | undefined;
|
|
91
|
-
runner: "claude" | "codex" | "omp" | "opencode" | "pi";
|
|
92
|
-
}[];
|
|
93
|
-
} | {
|
|
94
85
|
runner: "claude" | "codex" | "omp" | "opencode" | "pi";
|
|
95
86
|
models: {
|
|
96
87
|
id: string;
|
|
@@ -113,6 +104,15 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
113
104
|
reason?: string | undefined;
|
|
114
105
|
}[];
|
|
115
106
|
nextOffset?: number | undefined;
|
|
107
|
+
} | {
|
|
108
|
+
scope: "host-default-account";
|
|
109
|
+
runners: {
|
|
110
|
+
status: "connected" | "disconnected" | "not-installed" | "unknown";
|
|
111
|
+
enabled?: boolean | undefined;
|
|
112
|
+
hint?: string | undefined;
|
|
113
|
+
authFailureId?: string | undefined;
|
|
114
|
+
runner: "claude" | "codex" | "omp" | "opencode" | "pi";
|
|
115
|
+
}[];
|
|
116
116
|
};
|
|
117
117
|
outputFormat: "json";
|
|
118
118
|
status: 200;
|
|
@@ -221,13 +221,13 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
221
221
|
status: 200;
|
|
222
222
|
input: {
|
|
223
223
|
json: {
|
|
224
|
-
workerIds: string[];
|
|
225
|
-
timeoutSeconds?: number | undefined;
|
|
226
|
-
mode?: "all" | "any" | "one" | undefined;
|
|
227
|
-
} | {
|
|
228
224
|
requestIds: string[];
|
|
229
225
|
mode?: "all" | "any" | "one" | undefined;
|
|
230
226
|
timeoutSeconds?: number | undefined;
|
|
227
|
+
} | {
|
|
228
|
+
workerIds: string[];
|
|
229
|
+
timeoutSeconds?: number | undefined;
|
|
230
|
+
mode?: "all" | "any" | "one" | undefined;
|
|
231
231
|
} | {
|
|
232
232
|
peerIds: string[];
|
|
233
233
|
timeoutSeconds?: number | undefined;
|
|
@@ -613,6 +613,18 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
613
613
|
} & {
|
|
614
614
|
"/:workerId": {
|
|
615
615
|
$get: {
|
|
616
|
+
output: {
|
|
617
|
+
error: string;
|
|
618
|
+
code?: "invalid_input" | undefined;
|
|
619
|
+
};
|
|
620
|
+
outputFormat: "json";
|
|
621
|
+
status: 400;
|
|
622
|
+
input: {
|
|
623
|
+
param: {
|
|
624
|
+
workerId: string;
|
|
625
|
+
};
|
|
626
|
+
};
|
|
627
|
+
} | {
|
|
616
628
|
output: {
|
|
617
629
|
workerId: string;
|
|
618
630
|
parentRunId: string;
|
|
@@ -720,7 +732,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
720
732
|
workerId: string;
|
|
721
733
|
};
|
|
722
734
|
};
|
|
723
|
-
}
|
|
735
|
+
};
|
|
736
|
+
};
|
|
737
|
+
} & {
|
|
738
|
+
"/:workerId/collect": {
|
|
739
|
+
$post: {
|
|
724
740
|
output: {
|
|
725
741
|
error: string;
|
|
726
742
|
code?: "invalid_input" | undefined;
|
|
@@ -731,12 +747,10 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
731
747
|
param: {
|
|
732
748
|
workerId: string;
|
|
733
749
|
};
|
|
750
|
+
} & {
|
|
751
|
+
json: Record<string, never>;
|
|
734
752
|
};
|
|
735
|
-
}
|
|
736
|
-
};
|
|
737
|
-
} & {
|
|
738
|
-
"/:workerId/collect": {
|
|
739
|
-
$post: {
|
|
753
|
+
} | {
|
|
740
754
|
output: {
|
|
741
755
|
workerId: string;
|
|
742
756
|
parentRunId: string;
|
|
@@ -838,7 +852,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
838
852
|
} & {
|
|
839
853
|
json: Record<string, never>;
|
|
840
854
|
};
|
|
841
|
-
}
|
|
855
|
+
};
|
|
856
|
+
};
|
|
857
|
+
} & {
|
|
858
|
+
"/:workerId/steer": {
|
|
859
|
+
$post: {
|
|
842
860
|
output: {
|
|
843
861
|
error: string;
|
|
844
862
|
code?: "invalid_input" | undefined;
|
|
@@ -850,13 +868,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
850
868
|
workerId: string;
|
|
851
869
|
};
|
|
852
870
|
} & {
|
|
853
|
-
json:
|
|
871
|
+
json: {
|
|
872
|
+
text: string;
|
|
873
|
+
};
|
|
854
874
|
};
|
|
855
|
-
}
|
|
856
|
-
};
|
|
857
|
-
} & {
|
|
858
|
-
"/:workerId/steer": {
|
|
859
|
-
$post: {
|
|
875
|
+
} | {
|
|
860
876
|
output: {
|
|
861
877
|
workerId: string;
|
|
862
878
|
state: "delivered" | "queued";
|
|
@@ -872,7 +888,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
872
888
|
text: string;
|
|
873
889
|
};
|
|
874
890
|
};
|
|
875
|
-
}
|
|
891
|
+
};
|
|
892
|
+
};
|
|
893
|
+
} & {
|
|
894
|
+
"/:workerId/stop": {
|
|
895
|
+
$post: {
|
|
876
896
|
output: {
|
|
877
897
|
error: string;
|
|
878
898
|
code?: "invalid_input" | undefined;
|
|
@@ -884,15 +904,9 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
884
904
|
workerId: string;
|
|
885
905
|
};
|
|
886
906
|
} & {
|
|
887
|
-
json:
|
|
888
|
-
text: string;
|
|
889
|
-
};
|
|
907
|
+
json: Record<string, never>;
|
|
890
908
|
};
|
|
891
|
-
}
|
|
892
|
-
};
|
|
893
|
-
} & {
|
|
894
|
-
"/:workerId/stop": {
|
|
895
|
-
$post: {
|
|
909
|
+
} | {
|
|
896
910
|
output: {
|
|
897
911
|
workerId: string;
|
|
898
912
|
state: "stopping" | "terminated";
|
|
@@ -906,7 +920,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
906
920
|
} & {
|
|
907
921
|
json: Record<string, never>;
|
|
908
922
|
};
|
|
909
|
-
}
|
|
923
|
+
};
|
|
924
|
+
};
|
|
925
|
+
} & {
|
|
926
|
+
"/:workerId/destroy": {
|
|
927
|
+
$post: {
|
|
910
928
|
output: {
|
|
911
929
|
error: string;
|
|
912
930
|
code?: "invalid_input" | undefined;
|
|
@@ -920,11 +938,7 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
920
938
|
} & {
|
|
921
939
|
json: Record<string, never>;
|
|
922
940
|
};
|
|
923
|
-
}
|
|
924
|
-
};
|
|
925
|
-
} & {
|
|
926
|
-
"/:workerId/destroy": {
|
|
927
|
-
$post: {
|
|
941
|
+
} | {
|
|
928
942
|
output: {
|
|
929
943
|
workerId: string;
|
|
930
944
|
state: "complete" | "incomplete";
|
|
@@ -947,20 +961,6 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
947
961
|
} & {
|
|
948
962
|
json: Record<string, never>;
|
|
949
963
|
};
|
|
950
|
-
} | {
|
|
951
|
-
output: {
|
|
952
|
-
error: string;
|
|
953
|
-
code?: "invalid_input" | undefined;
|
|
954
|
-
};
|
|
955
|
-
outputFormat: "json";
|
|
956
|
-
status: 400;
|
|
957
|
-
input: {
|
|
958
|
-
param: {
|
|
959
|
-
workerId: string;
|
|
960
|
-
};
|
|
961
|
-
} & {
|
|
962
|
-
json: Record<string, never>;
|
|
963
|
-
};
|
|
964
964
|
} | {
|
|
965
965
|
output: {
|
|
966
966
|
workerId: string;
|
|
@@ -990,13 +990,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
990
990
|
"/:workerId/diff": {
|
|
991
991
|
$get: {
|
|
992
992
|
output: {
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
diff: string;
|
|
996
|
-
truncated: boolean;
|
|
993
|
+
error: string;
|
|
994
|
+
code?: "invalid_input" | undefined;
|
|
997
995
|
};
|
|
998
996
|
outputFormat: "json";
|
|
999
|
-
status:
|
|
997
|
+
status: 400;
|
|
1000
998
|
input: {
|
|
1001
999
|
param: {
|
|
1002
1000
|
workerId: string;
|
|
@@ -1004,11 +1002,13 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
1004
1002
|
};
|
|
1005
1003
|
} | {
|
|
1006
1004
|
output: {
|
|
1007
|
-
|
|
1008
|
-
|
|
1005
|
+
workerId: string;
|
|
1006
|
+
baselineSha: string;
|
|
1007
|
+
diff: string;
|
|
1008
|
+
truncated: boolean;
|
|
1009
1009
|
};
|
|
1010
1010
|
outputFormat: "json";
|
|
1011
|
-
status:
|
|
1011
|
+
status: 200;
|
|
1012
1012
|
input: {
|
|
1013
1013
|
param: {
|
|
1014
1014
|
workerId: string;
|