@hearsay-tools/squawk 0.18.0-dev.7010 → 0.18.0-dev.7023
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 +20 -20
- 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,UAAU;QACvF,+FAA+F;QAC/F,kFA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 @@
|
|
|
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,18 +27,6 @@ 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
|
-
} | {
|
|
42
30
|
output: {
|
|
43
31
|
workers: {
|
|
44
32
|
workerId: string;
|
|
@@ -76,21 +64,24 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
76
64
|
offset?: string | undefined;
|
|
77
65
|
};
|
|
78
66
|
};
|
|
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,18 +613,6 @@ 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
|
-
} | {
|
|
628
616
|
output: {
|
|
629
617
|
workerId: string;
|
|
630
618
|
parentRunId: string;
|
|
@@ -732,11 +720,7 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
732
720
|
workerId: string;
|
|
733
721
|
};
|
|
734
722
|
};
|
|
735
|
-
}
|
|
736
|
-
};
|
|
737
|
-
} & {
|
|
738
|
-
"/:workerId/collect": {
|
|
739
|
-
$post: {
|
|
723
|
+
} | {
|
|
740
724
|
output: {
|
|
741
725
|
error: string;
|
|
742
726
|
code?: "invalid_input" | undefined;
|
|
@@ -747,10 +731,12 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
747
731
|
param: {
|
|
748
732
|
workerId: string;
|
|
749
733
|
};
|
|
750
|
-
} & {
|
|
751
|
-
json: Record<string, never>;
|
|
752
734
|
};
|
|
753
|
-
}
|
|
735
|
+
};
|
|
736
|
+
};
|
|
737
|
+
} & {
|
|
738
|
+
"/:workerId/collect": {
|
|
739
|
+
$post: {
|
|
754
740
|
output: {
|
|
755
741
|
workerId: string;
|
|
756
742
|
parentRunId: string;
|
|
@@ -852,11 +838,7 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
852
838
|
} & {
|
|
853
839
|
json: Record<string, never>;
|
|
854
840
|
};
|
|
855
|
-
}
|
|
856
|
-
};
|
|
857
|
-
} & {
|
|
858
|
-
"/:workerId/steer": {
|
|
859
|
-
$post: {
|
|
841
|
+
} | {
|
|
860
842
|
output: {
|
|
861
843
|
error: string;
|
|
862
844
|
code?: "invalid_input" | undefined;
|
|
@@ -868,11 +850,13 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
868
850
|
workerId: string;
|
|
869
851
|
};
|
|
870
852
|
} & {
|
|
871
|
-
json:
|
|
872
|
-
text: string;
|
|
873
|
-
};
|
|
853
|
+
json: Record<string, never>;
|
|
874
854
|
};
|
|
875
|
-
}
|
|
855
|
+
};
|
|
856
|
+
};
|
|
857
|
+
} & {
|
|
858
|
+
"/:workerId/steer": {
|
|
859
|
+
$post: {
|
|
876
860
|
output: {
|
|
877
861
|
workerId: string;
|
|
878
862
|
state: "delivered" | "queued";
|
|
@@ -888,11 +872,7 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
888
872
|
text: string;
|
|
889
873
|
};
|
|
890
874
|
};
|
|
891
|
-
}
|
|
892
|
-
};
|
|
893
|
-
} & {
|
|
894
|
-
"/:workerId/stop": {
|
|
895
|
-
$post: {
|
|
875
|
+
} | {
|
|
896
876
|
output: {
|
|
897
877
|
error: string;
|
|
898
878
|
code?: "invalid_input" | undefined;
|
|
@@ -904,9 +884,15 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
904
884
|
workerId: string;
|
|
905
885
|
};
|
|
906
886
|
} & {
|
|
907
|
-
json:
|
|
887
|
+
json: {
|
|
888
|
+
text: string;
|
|
889
|
+
};
|
|
908
890
|
};
|
|
909
|
-
}
|
|
891
|
+
};
|
|
892
|
+
};
|
|
893
|
+
} & {
|
|
894
|
+
"/:workerId/stop": {
|
|
895
|
+
$post: {
|
|
910
896
|
output: {
|
|
911
897
|
workerId: string;
|
|
912
898
|
state: "stopping" | "terminated";
|
|
@@ -920,11 +906,7 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
920
906
|
} & {
|
|
921
907
|
json: Record<string, never>;
|
|
922
908
|
};
|
|
923
|
-
}
|
|
924
|
-
};
|
|
925
|
-
} & {
|
|
926
|
-
"/:workerId/destroy": {
|
|
927
|
-
$post: {
|
|
909
|
+
} | {
|
|
928
910
|
output: {
|
|
929
911
|
error: string;
|
|
930
912
|
code?: "invalid_input" | undefined;
|
|
@@ -938,7 +920,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
938
920
|
} & {
|
|
939
921
|
json: Record<string, never>;
|
|
940
922
|
};
|
|
941
|
-
}
|
|
923
|
+
};
|
|
924
|
+
};
|
|
925
|
+
} & {
|
|
926
|
+
"/:workerId/destroy": {
|
|
927
|
+
$post: {
|
|
942
928
|
output: {
|
|
943
929
|
workerId: string;
|
|
944
930
|
state: "complete" | "incomplete";
|
|
@@ -961,6 +947,20 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
961
947
|
} & {
|
|
962
948
|
json: Record<string, never>;
|
|
963
949
|
};
|
|
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,11 +990,13 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
990
990
|
"/:workerId/diff": {
|
|
991
991
|
$get: {
|
|
992
992
|
output: {
|
|
993
|
-
|
|
994
|
-
|
|
993
|
+
workerId: string;
|
|
994
|
+
baselineSha: string;
|
|
995
|
+
diff: string;
|
|
996
|
+
truncated: boolean;
|
|
995
997
|
};
|
|
996
998
|
outputFormat: "json";
|
|
997
|
-
status:
|
|
999
|
+
status: 200;
|
|
998
1000
|
input: {
|
|
999
1001
|
param: {
|
|
1000
1002
|
workerId: string;
|
|
@@ -1002,13 +1004,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
1002
1004
|
};
|
|
1003
1005
|
} | {
|
|
1004
1006
|
output: {
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
diff: string;
|
|
1008
|
-
truncated: boolean;
|
|
1007
|
+
error: string;
|
|
1008
|
+
code?: "invalid_input" | undefined;
|
|
1009
1009
|
};
|
|
1010
1010
|
outputFormat: "json";
|
|
1011
|
-
status:
|
|
1011
|
+
status: 400;
|
|
1012
1012
|
input: {
|
|
1013
1013
|
param: {
|
|
1014
1014
|
workerId: string;
|
|
@@ -57,16 +57,14 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
57
57
|
"/discover": {
|
|
58
58
|
$post: {
|
|
59
59
|
output: {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
60
|
+
scope: "host-default-account";
|
|
61
|
+
runners: {
|
|
62
|
+
status: "connected" | "disconnected" | "not-installed" | "unknown";
|
|
63
|
+
enabled?: boolean | undefined;
|
|
64
|
+
hint?: string | undefined;
|
|
65
|
+
authFailureId?: string | undefined;
|
|
66
|
+
runner: "claude" | "codex" | "omp" | "opencode" | "pi";
|
|
66
67
|
}[];
|
|
67
|
-
source: "cache" | "live" | "unavailable";
|
|
68
|
-
stale: boolean;
|
|
69
|
-
reason?: string | undefined;
|
|
70
68
|
} | {
|
|
71
69
|
tasks: {
|
|
72
70
|
id: string;
|
|
@@ -80,14 +78,16 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
80
78
|
}[];
|
|
81
79
|
nextOffset?: number | undefined;
|
|
82
80
|
} | {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
runner: "claude" | "codex" | "omp" | "opencode" | "pi";
|
|
81
|
+
runner: "claude" | "codex" | "omp" | "opencode" | "pi";
|
|
82
|
+
models: {
|
|
83
|
+
id: string;
|
|
84
|
+
label: string;
|
|
85
|
+
description: string;
|
|
86
|
+
effortLevels?: ("high" | "low" | "max" | "medium" | "xhigh")[] | undefined;
|
|
90
87
|
}[];
|
|
88
|
+
source: "cache" | "live" | "unavailable";
|
|
89
|
+
stale: boolean;
|
|
90
|
+
reason?: string | undefined;
|
|
91
91
|
};
|
|
92
92
|
outputFormat: "json";
|
|
93
93
|
status: 200;
|
|
@@ -196,13 +196,13 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
196
196
|
status: 200;
|
|
197
197
|
input: {
|
|
198
198
|
json: {
|
|
199
|
-
requestIds: string[];
|
|
200
|
-
mode?: "all" | "any" | "one" | undefined;
|
|
201
|
-
timeoutSeconds?: number | undefined;
|
|
202
|
-
} | {
|
|
203
199
|
workerIds: string[];
|
|
204
200
|
timeoutSeconds?: number | undefined;
|
|
205
201
|
mode?: "all" | "any" | "one" | undefined;
|
|
202
|
+
} | {
|
|
203
|
+
requestIds: string[];
|
|
204
|
+
mode?: "all" | "any" | "one" | undefined;
|
|
205
|
+
timeoutSeconds?: number | undefined;
|
|
206
206
|
} | {
|
|
207
207
|
peerIds: string[];
|
|
208
208
|
timeoutSeconds?: number | undefined;
|