@llm4ts/shell 2.45.0 → 2.47.0
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/Cli.d.ts +3 -7
- package/dist/Cli.d.ts.map +1 -1
- package/dist/Cli.js +20 -4
- package/dist/Cli.js.map +1 -1
- package/dist/FlowLaunch.d.ts +2 -16
- package/dist/FlowLaunch.d.ts.map +1 -1
- package/dist/FlowLaunch.js +20 -66
- package/dist/FlowLaunch.js.map +1 -1
- package/dist/FlowProcess.d.ts +67 -0
- package/dist/FlowProcess.d.ts.map +1 -0
- package/dist/FlowProcess.js +175 -0
- package/dist/FlowProcess.js.map +1 -0
- package/dist/Menu.d.ts +1 -1
- package/dist/Menu.d.ts.map +1 -1
- package/dist/OperatorActTools.d.ts +170 -0
- package/dist/OperatorActTools.d.ts.map +1 -0
- package/dist/OperatorActTools.js +332 -0
- package/dist/OperatorActTools.js.map +1 -0
- package/dist/OperatorConfig.d.ts +44 -0
- package/dist/OperatorConfig.d.ts.map +1 -0
- package/dist/OperatorConfig.js +88 -0
- package/dist/OperatorConfig.js.map +1 -0
- package/dist/OperatorNode.d.ts +45 -0
- package/dist/OperatorNode.d.ts.map +1 -0
- package/dist/OperatorNode.js +103 -0
- package/dist/OperatorNode.js.map +1 -0
- package/dist/OperatorRuns.d.ts +76 -0
- package/dist/OperatorRuns.d.ts.map +1 -0
- package/dist/OperatorRuns.js +146 -0
- package/dist/OperatorRuns.js.map +1 -0
- package/dist/OperatorServer.d.ts +160 -0
- package/dist/OperatorServer.d.ts.map +1 -0
- package/dist/OperatorServer.js +123 -0
- package/dist/OperatorServer.js.map +1 -0
- package/dist/OperatorTools.d.ts +558 -0
- package/dist/OperatorTools.d.ts.map +1 -0
- package/dist/OperatorTools.js +398 -0
- package/dist/OperatorTools.js.map +1 -0
- package/dist/Refine.d.ts +2 -2
- package/dist/Refine.d.ts.map +1 -1
- package/dist/Refine.js +3 -5
- package/dist/Refine.js.map +1 -1
- package/dist/RunSupervisor.d.ts +51 -0
- package/dist/RunSupervisor.d.ts.map +1 -0
- package/dist/RunSupervisor.js +282 -0
- package/dist/RunSupervisor.js.map +1 -0
- package/dist/ShellErrors.d.ts +9 -0
- package/dist/ShellErrors.d.ts.map +1 -0
- package/dist/ShellErrors.js +7 -0
- package/dist/ShellErrors.js.map +1 -0
- package/flows/epic-mvp.js +21 -0
- package/flows/lib/epic-mvp.js +451 -0
- package/flows/lib/epic-stories.js +88 -48
- package/flows/port-guide.js +4 -1
- package/package.json +13 -4
- package/src/Cli.ts +64 -3
- package/src/FlowLaunch.ts +20 -66
- package/src/FlowProcess.ts +239 -0
- package/src/OperatorActTools.ts +407 -0
- package/src/OperatorConfig.ts +148 -0
- package/src/OperatorNode.ts +147 -0
- package/src/OperatorRuns.ts +270 -0
- package/src/OperatorServer.ts +192 -0
- package/src/OperatorTools.ts +610 -0
- package/src/Refine.ts +4 -7
- package/src/RunSupervisor.ts +403 -0
- package/src/ShellErrors.ts +6 -0
|
@@ -0,0 +1,558 @@
|
|
|
1
|
+
import * as Effect from "effect/Effect";
|
|
2
|
+
import * as Schema from "effect/Schema";
|
|
3
|
+
import * as Tool from "effect/ai/Tool";
|
|
4
|
+
import * as Toolkit from "effect/ai/Toolkit";
|
|
5
|
+
import { type FlowError } from "@llm4ts/flow/FlowError";
|
|
6
|
+
import { TraceLine } from "@llm4ts/flow/FlowRecorder";
|
|
7
|
+
import { CostsOut, Diagnosis, OperatorRun, PreflightResult, ReadFailed, RunStatus, StoryDetail, UnknownEpic, UnknownRepo, UnknownRun, UnknownStory } from "@llm4ts/flow/OperatorSchemas";
|
|
8
|
+
import { CostsResult } from "@llm4ts/runner/Costs";
|
|
9
|
+
import type { DoctorReport } from "@llm4ts/runner/Doctor";
|
|
10
|
+
import type { RosterReport } from "@llm4ts/runner/ExecutorRoster";
|
|
11
|
+
import { TraceUnreadable } from "@llm4ts/runner/RunReaders";
|
|
12
|
+
import { type TranscriptFiles } from "@llm4ts/runner/Transcripts";
|
|
13
|
+
import type { DiscoveredFlow } from "./FlowCatalog.ts";
|
|
14
|
+
import type { OperatorConfig } from "./OperatorConfig.ts";
|
|
15
|
+
import { type RunLookupDeps } from "./OperatorRuns.ts";
|
|
16
|
+
/**
|
|
17
|
+
* The operator's read-only MCP tools (`llm4ts mcp`, ADR 0041): answers about
|
|
18
|
+
* repositories, epics and runs from the files they write, over an
|
|
19
|
+
* `OperatorDeps` record so tests call the handlers directly on memory stores
|
|
20
|
+
* and fakes. A client never names a path: repositories, epics and runs are
|
|
21
|
+
* ids resolved against the configuration and the files found on disk
|
|
22
|
+
* (`OperatorRuns.ts`).
|
|
23
|
+
*/
|
|
24
|
+
export interface OperatorDeps extends RunLookupDeps {
|
|
25
|
+
readonly config: OperatorConfig;
|
|
26
|
+
/** Relative paths of every regular file under a directory, recursively; none when absent. */
|
|
27
|
+
readonly listFiles: (directory: string) => ReadonlyArray<string>;
|
|
28
|
+
readonly transcripts: TranscriptFiles;
|
|
29
|
+
readonly doctor: Effect.Effect<DoctorReport>;
|
|
30
|
+
readonly roster: (repoPath: string) => Effect.Effect<RosterReport, FlowError>;
|
|
31
|
+
readonly probe: (url: string) => Effect.Effect<boolean>;
|
|
32
|
+
readonly flows: (repoPath: string) => Effect.Effect<ReadonlyArray<DiscoveredFlow>, unknown>;
|
|
33
|
+
readonly now: Effect.Effect<number>;
|
|
34
|
+
readonly environment: Readonly<Record<string, string | undefined>>;
|
|
35
|
+
}
|
|
36
|
+
/** The repository a tool call means; the id may be left out when the server serves one. */
|
|
37
|
+
export declare const resolveRepo: (config: OperatorConfig, id: string | undefined) => Effect.Effect<{
|
|
38
|
+
id: string;
|
|
39
|
+
path: string;
|
|
40
|
+
}, UnknownRepo>;
|
|
41
|
+
export declare const preflight: Tool.Tool<"preflight", {
|
|
42
|
+
readonly parameters: Schema.Struct<{
|
|
43
|
+
readonly repo: Schema.optional<Schema.String>;
|
|
44
|
+
}>;
|
|
45
|
+
readonly success: typeof PreflightResult;
|
|
46
|
+
readonly failure: Schema.Union<readonly [typeof UnknownRepo]>;
|
|
47
|
+
readonly failureMode: "error";
|
|
48
|
+
}, never>;
|
|
49
|
+
export declare const FlowOut: Schema.Struct<{
|
|
50
|
+
readonly name: Schema.String;
|
|
51
|
+
readonly tier: Schema.String;
|
|
52
|
+
readonly description: Schema.optionalKey<Schema.String>;
|
|
53
|
+
readonly kit: Schema.optionalKey<Schema.String>;
|
|
54
|
+
}>;
|
|
55
|
+
export declare const list_flows: Tool.Tool<"list_flows", {
|
|
56
|
+
readonly parameters: Schema.Struct<{
|
|
57
|
+
readonly repo: Schema.optional<Schema.String>;
|
|
58
|
+
}>;
|
|
59
|
+
readonly success: Schema.$Array<Schema.Struct<{
|
|
60
|
+
readonly name: Schema.String;
|
|
61
|
+
readonly tier: Schema.String;
|
|
62
|
+
readonly description: Schema.optionalKey<Schema.String>;
|
|
63
|
+
readonly kit: Schema.optionalKey<Schema.String>;
|
|
64
|
+
}>>;
|
|
65
|
+
readonly failure: Schema.Union<readonly [typeof UnknownRepo, typeof ReadFailed]>;
|
|
66
|
+
readonly failureMode: "error";
|
|
67
|
+
}, never>;
|
|
68
|
+
export declare const EpicOut: Schema.Struct<{
|
|
69
|
+
readonly id: Schema.String;
|
|
70
|
+
readonly title: Schema.String;
|
|
71
|
+
readonly stories: Schema.Int;
|
|
72
|
+
readonly board: Schema.$Array<Schema.Struct<{
|
|
73
|
+
readonly id: Schema.String;
|
|
74
|
+
readonly status: Schema.Literals<readonly ["planned", "active", "waiting", "done", "failed", "skipped"]>;
|
|
75
|
+
}>>;
|
|
76
|
+
readonly lastRun: Schema.optionalKey<Schema.Struct<{
|
|
77
|
+
readonly runId: Schema.String;
|
|
78
|
+
readonly startedAt: Schema.Number;
|
|
79
|
+
readonly action: Schema.String;
|
|
80
|
+
}>>;
|
|
81
|
+
}>;
|
|
82
|
+
export declare const list_epics: Tool.Tool<"list_epics", {
|
|
83
|
+
readonly parameters: Schema.Struct<{
|
|
84
|
+
readonly repo: Schema.optional<Schema.String>;
|
|
85
|
+
}>;
|
|
86
|
+
readonly success: Schema.$Array<Schema.Struct<{
|
|
87
|
+
readonly id: Schema.String;
|
|
88
|
+
readonly title: Schema.String;
|
|
89
|
+
readonly stories: Schema.Int;
|
|
90
|
+
readonly board: Schema.$Array<Schema.Struct<{
|
|
91
|
+
readonly id: Schema.String;
|
|
92
|
+
readonly status: Schema.Literals<readonly ["planned", "active", "waiting", "done", "failed", "skipped"]>;
|
|
93
|
+
}>>;
|
|
94
|
+
readonly lastRun: Schema.optionalKey<Schema.Struct<{
|
|
95
|
+
readonly runId: Schema.String;
|
|
96
|
+
readonly startedAt: Schema.Number;
|
|
97
|
+
readonly action: Schema.String;
|
|
98
|
+
}>>;
|
|
99
|
+
}>>;
|
|
100
|
+
readonly failure: Schema.Union<readonly [typeof UnknownRepo, typeof ReadFailed]>;
|
|
101
|
+
readonly failureMode: "error";
|
|
102
|
+
}, never>;
|
|
103
|
+
export declare const list_runs: Tool.Tool<"list_runs", {
|
|
104
|
+
readonly parameters: Schema.Struct<{
|
|
105
|
+
readonly repo: Schema.optional<Schema.String>;
|
|
106
|
+
readonly epic: Schema.optional<Schema.String>;
|
|
107
|
+
readonly limit: Schema.optional<Schema.Int>;
|
|
108
|
+
}>;
|
|
109
|
+
readonly success: Schema.$Array<typeof OperatorRun>;
|
|
110
|
+
readonly failure: Schema.Union<readonly [typeof UnknownRepo, typeof UnknownEpic, typeof ReadFailed]>;
|
|
111
|
+
readonly failureMode: "error";
|
|
112
|
+
}, never>;
|
|
113
|
+
export declare const run_status: Tool.Tool<"run_status", {
|
|
114
|
+
readonly parameters: Schema.Struct<{
|
|
115
|
+
readonly runId: Schema.String;
|
|
116
|
+
}>;
|
|
117
|
+
readonly success: typeof RunStatus;
|
|
118
|
+
readonly failure: Schema.Union<readonly [typeof UnknownRun, typeof TraceUnreadable, typeof ReadFailed]>;
|
|
119
|
+
readonly failureMode: "error";
|
|
120
|
+
}, never>;
|
|
121
|
+
export declare const run_events: Tool.Tool<"run_events", {
|
|
122
|
+
readonly parameters: Schema.Struct<{
|
|
123
|
+
readonly runId: Schema.String;
|
|
124
|
+
readonly sinceSeq: Schema.optional<Schema.Int>;
|
|
125
|
+
readonly kinds: Schema.optional<Schema.$Array<Schema.String>>;
|
|
126
|
+
readonly limit: Schema.optional<Schema.Int>;
|
|
127
|
+
}>;
|
|
128
|
+
readonly success: Schema.$Array<typeof TraceLine>;
|
|
129
|
+
readonly failure: Schema.Union<readonly [typeof UnknownRun, typeof TraceUnreadable, typeof ReadFailed]>;
|
|
130
|
+
readonly failureMode: "error";
|
|
131
|
+
}, never>;
|
|
132
|
+
export declare const RunLogOut: Schema.Struct<{
|
|
133
|
+
readonly stdout: Schema.$Array<Schema.String>;
|
|
134
|
+
readonly stderr: Schema.$Array<Schema.String>;
|
|
135
|
+
}>;
|
|
136
|
+
export declare const run_log: Tool.Tool<"run_log", {
|
|
137
|
+
readonly parameters: Schema.Struct<{
|
|
138
|
+
readonly runId: Schema.String;
|
|
139
|
+
readonly lines: Schema.optional<Schema.Int>;
|
|
140
|
+
}>;
|
|
141
|
+
readonly success: Schema.Struct<{
|
|
142
|
+
readonly stdout: Schema.$Array<Schema.String>;
|
|
143
|
+
readonly stderr: Schema.$Array<Schema.String>;
|
|
144
|
+
}>;
|
|
145
|
+
readonly failure: Schema.Union<readonly [typeof UnknownRun, typeof ReadFailed]>;
|
|
146
|
+
readonly failureMode: "error";
|
|
147
|
+
}, never>;
|
|
148
|
+
export declare const story_detail: Tool.Tool<"story_detail", {
|
|
149
|
+
readonly parameters: Schema.Struct<{
|
|
150
|
+
readonly repo: Schema.optional<Schema.String>;
|
|
151
|
+
readonly epic: Schema.String;
|
|
152
|
+
readonly story: Schema.String;
|
|
153
|
+
}>;
|
|
154
|
+
readonly success: typeof StoryDetail;
|
|
155
|
+
readonly failure: Schema.Union<readonly [typeof UnknownRepo, typeof UnknownEpic, typeof UnknownStory, typeof ReadFailed]>;
|
|
156
|
+
readonly failureMode: "error";
|
|
157
|
+
}, never>;
|
|
158
|
+
export declare const diagnose: Tool.Tool<"diagnose", {
|
|
159
|
+
readonly parameters: Schema.Struct<{
|
|
160
|
+
readonly runId: Schema.String;
|
|
161
|
+
readonly story: Schema.optional<Schema.String>;
|
|
162
|
+
readonly chars: Schema.optional<Schema.Int>;
|
|
163
|
+
}>;
|
|
164
|
+
readonly success: typeof Diagnosis;
|
|
165
|
+
readonly failure: Schema.Union<readonly [typeof UnknownRun, typeof UnknownStory, typeof TraceUnreadable, typeof ReadFailed]>;
|
|
166
|
+
readonly failureMode: "error";
|
|
167
|
+
}, never>;
|
|
168
|
+
export declare const transcript_tail: Tool.Tool<"transcript_tail", {
|
|
169
|
+
readonly parameters: Schema.Struct<{
|
|
170
|
+
readonly runId: Schema.String;
|
|
171
|
+
readonly lane: Schema.String;
|
|
172
|
+
readonly entries: Schema.optional<Schema.Int>;
|
|
173
|
+
readonly role: Schema.optional<Schema.String>;
|
|
174
|
+
}>;
|
|
175
|
+
readonly success: Schema.$Array<Schema.String>;
|
|
176
|
+
readonly failure: Schema.Union<readonly [typeof UnknownRun, typeof ReadFailed]>;
|
|
177
|
+
readonly failureMode: "error";
|
|
178
|
+
}, never>;
|
|
179
|
+
export declare const costs: Tool.Tool<"costs", {
|
|
180
|
+
readonly parameters: Schema.Struct<{
|
|
181
|
+
readonly repo: Schema.optional<Schema.String>;
|
|
182
|
+
readonly runId: Schema.optional<Schema.String>;
|
|
183
|
+
}>;
|
|
184
|
+
readonly success: Schema.Union<readonly [typeof CostsOut, typeof CostsResult]>;
|
|
185
|
+
readonly failure: Schema.Union<readonly [typeof UnknownRepo, typeof UnknownRun, typeof TraceUnreadable, typeof ReadFailed]>;
|
|
186
|
+
readonly failureMode: "error";
|
|
187
|
+
}, never>;
|
|
188
|
+
export declare const profile: Tool.Tool<"profile", {
|
|
189
|
+
readonly parameters: Schema.Struct<{
|
|
190
|
+
readonly runId: Schema.String;
|
|
191
|
+
}>;
|
|
192
|
+
readonly success: Schema.Struct<{
|
|
193
|
+
readonly estimated: Schema.Boolean;
|
|
194
|
+
readonly wallMs: Schema.Number;
|
|
195
|
+
readonly stories: Schema.$Array<Schema.Struct<{
|
|
196
|
+
readonly id: Schema.String;
|
|
197
|
+
readonly executor: Schema.optionalKey<Schema.String>;
|
|
198
|
+
readonly status: Schema.Literals<readonly ["done", "failed", "running"]>;
|
|
199
|
+
readonly wallMs: Schema.Number;
|
|
200
|
+
readonly queuedMs: Schema.optionalKey<Schema.Number>;
|
|
201
|
+
readonly time: Schema.Struct<{
|
|
202
|
+
readonly model: Schema.Number;
|
|
203
|
+
readonly tools: Schema.Number;
|
|
204
|
+
readonly gates: Schema.Number;
|
|
205
|
+
readonly merge: Schema.Number;
|
|
206
|
+
readonly waiting: Schema.Number;
|
|
207
|
+
readonly unaccounted: Schema.Number;
|
|
208
|
+
}>;
|
|
209
|
+
readonly turns: Schema.Struct<{
|
|
210
|
+
readonly count: Schema.Int;
|
|
211
|
+
readonly avgMs: Schema.Number;
|
|
212
|
+
readonly maxMs: Schema.Number;
|
|
213
|
+
readonly firstPrompt: Schema.optionalKey<Schema.Int>;
|
|
214
|
+
readonly lastPrompt: Schema.optionalKey<Schema.Int>;
|
|
215
|
+
readonly maxPrompt: Schema.optionalKey<Schema.Int>;
|
|
216
|
+
readonly promptGrowth: Schema.Boolean;
|
|
217
|
+
readonly avgSteps: Schema.Number;
|
|
218
|
+
readonly avgStepMs: Schema.Number;
|
|
219
|
+
}>;
|
|
220
|
+
readonly gaps: Schema.$Array<Schema.Struct<{
|
|
221
|
+
readonly ms: Schema.Number;
|
|
222
|
+
readonly after: Schema.String;
|
|
223
|
+
readonly before: Schema.String;
|
|
224
|
+
}>>;
|
|
225
|
+
readonly openTurnMs: Schema.Number;
|
|
226
|
+
readonly openTurnTools: Schema.Int;
|
|
227
|
+
readonly toolCalls: Schema.Struct<{
|
|
228
|
+
readonly explore: Schema.Int;
|
|
229
|
+
readonly edit: Schema.Int;
|
|
230
|
+
readonly test: Schema.Int;
|
|
231
|
+
readonly other: Schema.Int;
|
|
232
|
+
}>;
|
|
233
|
+
readonly tasks: Schema.Int;
|
|
234
|
+
readonly firstEditMs: Schema.optionalKey<Schema.Number>;
|
|
235
|
+
readonly exploreBeforeEdit: Schema.Int;
|
|
236
|
+
readonly unverifiedClaims: Schema.Int;
|
|
237
|
+
readonly lowConfidenceTasks: Schema.Int;
|
|
238
|
+
}>>;
|
|
239
|
+
readonly skipped: Schema.$Array<Schema.String>;
|
|
240
|
+
readonly totals: Schema.Struct<{
|
|
241
|
+
readonly model: Schema.Number;
|
|
242
|
+
readonly tools: Schema.Number;
|
|
243
|
+
readonly gates: Schema.Number;
|
|
244
|
+
readonly merge: Schema.Number;
|
|
245
|
+
readonly waiting: Schema.Number;
|
|
246
|
+
readonly unaccounted: Schema.Number;
|
|
247
|
+
}>;
|
|
248
|
+
readonly models: Schema.$Array<Schema.Struct<{
|
|
249
|
+
readonly role: Schema.String;
|
|
250
|
+
readonly executor: Schema.optionalKey<Schema.String>;
|
|
251
|
+
readonly calls: Schema.Int;
|
|
252
|
+
readonly ms: Schema.Number;
|
|
253
|
+
readonly avgMs: Schema.Number;
|
|
254
|
+
readonly avgFirstMs: Schema.optionalKey<Schema.Number>;
|
|
255
|
+
readonly apiMs: Schema.optionalKey<Schema.Number>;
|
|
256
|
+
readonly toolMs: Schema.optionalKey<Schema.Number>;
|
|
257
|
+
}>>;
|
|
258
|
+
readonly gates: Schema.$Array<Schema.Struct<{
|
|
259
|
+
readonly command: Schema.String;
|
|
260
|
+
readonly runs: Schema.Int;
|
|
261
|
+
readonly ms: Schema.Number;
|
|
262
|
+
readonly avgMs: Schema.Number;
|
|
263
|
+
readonly failed: Schema.Int;
|
|
264
|
+
}>>;
|
|
265
|
+
readonly tools: Schema.$Array<Schema.Struct<{
|
|
266
|
+
readonly label: Schema.String;
|
|
267
|
+
readonly count: Schema.Int;
|
|
268
|
+
readonly ms: Schema.Number;
|
|
269
|
+
}>>;
|
|
270
|
+
readonly toolCategories: Schema.$Array<Schema.Struct<{
|
|
271
|
+
readonly label: Schema.String;
|
|
272
|
+
readonly count: Schema.Int;
|
|
273
|
+
readonly ms: Schema.Number;
|
|
274
|
+
}>>;
|
|
275
|
+
readonly waits: Schema.$Array<Schema.Struct<{
|
|
276
|
+
readonly label: Schema.String;
|
|
277
|
+
readonly count: Schema.Int;
|
|
278
|
+
readonly ms: Schema.Number;
|
|
279
|
+
}>>;
|
|
280
|
+
readonly outside: Schema.$Array<Schema.Struct<{
|
|
281
|
+
readonly label: Schema.String;
|
|
282
|
+
readonly count: Schema.Int;
|
|
283
|
+
readonly ms: Schema.Number;
|
|
284
|
+
}>>;
|
|
285
|
+
readonly findings: Schema.$Array<Schema.Struct<{
|
|
286
|
+
readonly text: Schema.String;
|
|
287
|
+
readonly ms: Schema.optionalKey<Schema.Number>;
|
|
288
|
+
}>>;
|
|
289
|
+
}>;
|
|
290
|
+
readonly failure: Schema.Union<readonly [typeof UnknownRun, typeof TraceUnreadable, typeof ReadFailed]>;
|
|
291
|
+
readonly failureMode: "error";
|
|
292
|
+
}, never>;
|
|
293
|
+
export declare const RetroOut: Schema.Struct<{
|
|
294
|
+
readonly runId: Schema.String;
|
|
295
|
+
readonly at: Schema.Number;
|
|
296
|
+
readonly approved: Schema.Boolean;
|
|
297
|
+
readonly applied: Schema.Boolean;
|
|
298
|
+
}>;
|
|
299
|
+
export declare const retro_list: Tool.Tool<"retro_list", {
|
|
300
|
+
readonly parameters: Schema.Struct<{
|
|
301
|
+
readonly repo: Schema.optional<Schema.String>;
|
|
302
|
+
readonly epic: Schema.String;
|
|
303
|
+
}>;
|
|
304
|
+
readonly success: Schema.$Array<Schema.Struct<{
|
|
305
|
+
readonly runId: Schema.String;
|
|
306
|
+
readonly at: Schema.Number;
|
|
307
|
+
readonly approved: Schema.Boolean;
|
|
308
|
+
readonly applied: Schema.Boolean;
|
|
309
|
+
}>>;
|
|
310
|
+
readonly failure: Schema.Union<readonly [typeof UnknownRepo, typeof UnknownEpic]>;
|
|
311
|
+
readonly failureMode: "error";
|
|
312
|
+
}, never>;
|
|
313
|
+
export declare const readToolkit: Toolkit.Toolkit<{
|
|
314
|
+
readonly preflight: Tool.Tool<"preflight", {
|
|
315
|
+
readonly parameters: Schema.Struct<{
|
|
316
|
+
readonly repo: Schema.optional<Schema.String>;
|
|
317
|
+
}>;
|
|
318
|
+
readonly success: typeof PreflightResult;
|
|
319
|
+
readonly failure: Schema.Union<readonly [typeof UnknownRepo]>;
|
|
320
|
+
readonly failureMode: "error";
|
|
321
|
+
}, never>;
|
|
322
|
+
readonly list_flows: Tool.Tool<"list_flows", {
|
|
323
|
+
readonly parameters: Schema.Struct<{
|
|
324
|
+
readonly repo: Schema.optional<Schema.String>;
|
|
325
|
+
}>;
|
|
326
|
+
readonly success: Schema.$Array<Schema.Struct<{
|
|
327
|
+
readonly name: Schema.String;
|
|
328
|
+
readonly tier: Schema.String;
|
|
329
|
+
readonly description: Schema.optionalKey<Schema.String>;
|
|
330
|
+
readonly kit: Schema.optionalKey<Schema.String>;
|
|
331
|
+
}>>;
|
|
332
|
+
readonly failure: Schema.Union<readonly [typeof UnknownRepo, typeof ReadFailed]>;
|
|
333
|
+
readonly failureMode: "error";
|
|
334
|
+
}, never>;
|
|
335
|
+
readonly list_epics: Tool.Tool<"list_epics", {
|
|
336
|
+
readonly parameters: Schema.Struct<{
|
|
337
|
+
readonly repo: Schema.optional<Schema.String>;
|
|
338
|
+
}>;
|
|
339
|
+
readonly success: Schema.$Array<Schema.Struct<{
|
|
340
|
+
readonly id: Schema.String;
|
|
341
|
+
readonly title: Schema.String;
|
|
342
|
+
readonly stories: Schema.Int;
|
|
343
|
+
readonly board: Schema.$Array<Schema.Struct<{
|
|
344
|
+
readonly id: Schema.String;
|
|
345
|
+
readonly status: Schema.Literals<readonly ["planned", "active", "waiting", "done", "failed", "skipped"]>;
|
|
346
|
+
}>>;
|
|
347
|
+
readonly lastRun: Schema.optionalKey<Schema.Struct<{
|
|
348
|
+
readonly runId: Schema.String;
|
|
349
|
+
readonly startedAt: Schema.Number;
|
|
350
|
+
readonly action: Schema.String;
|
|
351
|
+
}>>;
|
|
352
|
+
}>>;
|
|
353
|
+
readonly failure: Schema.Union<readonly [typeof UnknownRepo, typeof ReadFailed]>;
|
|
354
|
+
readonly failureMode: "error";
|
|
355
|
+
}, never>;
|
|
356
|
+
readonly list_runs: Tool.Tool<"list_runs", {
|
|
357
|
+
readonly parameters: Schema.Struct<{
|
|
358
|
+
readonly repo: Schema.optional<Schema.String>;
|
|
359
|
+
readonly epic: Schema.optional<Schema.String>;
|
|
360
|
+
readonly limit: Schema.optional<Schema.Int>;
|
|
361
|
+
}>;
|
|
362
|
+
readonly success: Schema.$Array<typeof OperatorRun>;
|
|
363
|
+
readonly failure: Schema.Union<readonly [typeof UnknownRepo, typeof UnknownEpic, typeof ReadFailed]>;
|
|
364
|
+
readonly failureMode: "error";
|
|
365
|
+
}, never>;
|
|
366
|
+
readonly run_status: Tool.Tool<"run_status", {
|
|
367
|
+
readonly parameters: Schema.Struct<{
|
|
368
|
+
readonly runId: Schema.String;
|
|
369
|
+
}>;
|
|
370
|
+
readonly success: typeof RunStatus;
|
|
371
|
+
readonly failure: Schema.Union<readonly [typeof UnknownRun, typeof TraceUnreadable, typeof ReadFailed]>;
|
|
372
|
+
readonly failureMode: "error";
|
|
373
|
+
}, never>;
|
|
374
|
+
readonly run_events: Tool.Tool<"run_events", {
|
|
375
|
+
readonly parameters: Schema.Struct<{
|
|
376
|
+
readonly runId: Schema.String;
|
|
377
|
+
readonly sinceSeq: Schema.optional<Schema.Int>;
|
|
378
|
+
readonly kinds: Schema.optional<Schema.$Array<Schema.String>>;
|
|
379
|
+
readonly limit: Schema.optional<Schema.Int>;
|
|
380
|
+
}>;
|
|
381
|
+
readonly success: Schema.$Array<typeof TraceLine>;
|
|
382
|
+
readonly failure: Schema.Union<readonly [typeof UnknownRun, typeof TraceUnreadable, typeof ReadFailed]>;
|
|
383
|
+
readonly failureMode: "error";
|
|
384
|
+
}, never>;
|
|
385
|
+
readonly run_log: Tool.Tool<"run_log", {
|
|
386
|
+
readonly parameters: Schema.Struct<{
|
|
387
|
+
readonly runId: Schema.String;
|
|
388
|
+
readonly lines: Schema.optional<Schema.Int>;
|
|
389
|
+
}>;
|
|
390
|
+
readonly success: Schema.Struct<{
|
|
391
|
+
readonly stdout: Schema.$Array<Schema.String>;
|
|
392
|
+
readonly stderr: Schema.$Array<Schema.String>;
|
|
393
|
+
}>;
|
|
394
|
+
readonly failure: Schema.Union<readonly [typeof UnknownRun, typeof ReadFailed]>;
|
|
395
|
+
readonly failureMode: "error";
|
|
396
|
+
}, never>;
|
|
397
|
+
readonly story_detail: Tool.Tool<"story_detail", {
|
|
398
|
+
readonly parameters: Schema.Struct<{
|
|
399
|
+
readonly repo: Schema.optional<Schema.String>;
|
|
400
|
+
readonly epic: Schema.String;
|
|
401
|
+
readonly story: Schema.String;
|
|
402
|
+
}>;
|
|
403
|
+
readonly success: typeof StoryDetail;
|
|
404
|
+
readonly failure: Schema.Union<readonly [typeof UnknownRepo, typeof UnknownEpic, typeof UnknownStory, typeof ReadFailed]>;
|
|
405
|
+
readonly failureMode: "error";
|
|
406
|
+
}, never>;
|
|
407
|
+
readonly diagnose: Tool.Tool<"diagnose", {
|
|
408
|
+
readonly parameters: Schema.Struct<{
|
|
409
|
+
readonly runId: Schema.String;
|
|
410
|
+
readonly story: Schema.optional<Schema.String>;
|
|
411
|
+
readonly chars: Schema.optional<Schema.Int>;
|
|
412
|
+
}>;
|
|
413
|
+
readonly success: typeof Diagnosis;
|
|
414
|
+
readonly failure: Schema.Union<readonly [typeof UnknownRun, typeof UnknownStory, typeof TraceUnreadable, typeof ReadFailed]>;
|
|
415
|
+
readonly failureMode: "error";
|
|
416
|
+
}, never>;
|
|
417
|
+
readonly transcript_tail: Tool.Tool<"transcript_tail", {
|
|
418
|
+
readonly parameters: Schema.Struct<{
|
|
419
|
+
readonly runId: Schema.String;
|
|
420
|
+
readonly lane: Schema.String;
|
|
421
|
+
readonly entries: Schema.optional<Schema.Int>;
|
|
422
|
+
readonly role: Schema.optional<Schema.String>;
|
|
423
|
+
}>;
|
|
424
|
+
readonly success: Schema.$Array<Schema.String>;
|
|
425
|
+
readonly failure: Schema.Union<readonly [typeof UnknownRun, typeof ReadFailed]>;
|
|
426
|
+
readonly failureMode: "error";
|
|
427
|
+
}, never>;
|
|
428
|
+
readonly costs: Tool.Tool<"costs", {
|
|
429
|
+
readonly parameters: Schema.Struct<{
|
|
430
|
+
readonly repo: Schema.optional<Schema.String>;
|
|
431
|
+
readonly runId: Schema.optional<Schema.String>;
|
|
432
|
+
}>;
|
|
433
|
+
readonly success: Schema.Union<readonly [typeof CostsOut, typeof CostsResult]>;
|
|
434
|
+
readonly failure: Schema.Union<readonly [typeof UnknownRepo, typeof UnknownRun, typeof TraceUnreadable, typeof ReadFailed]>;
|
|
435
|
+
readonly failureMode: "error";
|
|
436
|
+
}, never>;
|
|
437
|
+
readonly profile: Tool.Tool<"profile", {
|
|
438
|
+
readonly parameters: Schema.Struct<{
|
|
439
|
+
readonly runId: Schema.String;
|
|
440
|
+
}>;
|
|
441
|
+
readonly success: Schema.Struct<{
|
|
442
|
+
readonly estimated: Schema.Boolean;
|
|
443
|
+
readonly wallMs: Schema.Number;
|
|
444
|
+
readonly stories: Schema.$Array<Schema.Struct<{
|
|
445
|
+
readonly id: Schema.String;
|
|
446
|
+
readonly executor: Schema.optionalKey<Schema.String>;
|
|
447
|
+
readonly status: Schema.Literals<readonly ["done", "failed", "running"]>;
|
|
448
|
+
readonly wallMs: Schema.Number;
|
|
449
|
+
readonly queuedMs: Schema.optionalKey<Schema.Number>;
|
|
450
|
+
readonly time: Schema.Struct<{
|
|
451
|
+
readonly model: Schema.Number;
|
|
452
|
+
readonly tools: Schema.Number;
|
|
453
|
+
readonly gates: Schema.Number;
|
|
454
|
+
readonly merge: Schema.Number;
|
|
455
|
+
readonly waiting: Schema.Number;
|
|
456
|
+
readonly unaccounted: Schema.Number;
|
|
457
|
+
}>;
|
|
458
|
+
readonly turns: Schema.Struct<{
|
|
459
|
+
readonly count: Schema.Int;
|
|
460
|
+
readonly avgMs: Schema.Number;
|
|
461
|
+
readonly maxMs: Schema.Number;
|
|
462
|
+
readonly firstPrompt: Schema.optionalKey<Schema.Int>;
|
|
463
|
+
readonly lastPrompt: Schema.optionalKey<Schema.Int>;
|
|
464
|
+
readonly maxPrompt: Schema.optionalKey<Schema.Int>;
|
|
465
|
+
readonly promptGrowth: Schema.Boolean;
|
|
466
|
+
readonly avgSteps: Schema.Number;
|
|
467
|
+
readonly avgStepMs: Schema.Number;
|
|
468
|
+
}>;
|
|
469
|
+
readonly gaps: Schema.$Array<Schema.Struct<{
|
|
470
|
+
readonly ms: Schema.Number;
|
|
471
|
+
readonly after: Schema.String;
|
|
472
|
+
readonly before: Schema.String;
|
|
473
|
+
}>>;
|
|
474
|
+
readonly openTurnMs: Schema.Number;
|
|
475
|
+
readonly openTurnTools: Schema.Int;
|
|
476
|
+
readonly toolCalls: Schema.Struct<{
|
|
477
|
+
readonly explore: Schema.Int;
|
|
478
|
+
readonly edit: Schema.Int;
|
|
479
|
+
readonly test: Schema.Int;
|
|
480
|
+
readonly other: Schema.Int;
|
|
481
|
+
}>;
|
|
482
|
+
readonly tasks: Schema.Int;
|
|
483
|
+
readonly firstEditMs: Schema.optionalKey<Schema.Number>;
|
|
484
|
+
readonly exploreBeforeEdit: Schema.Int;
|
|
485
|
+
readonly unverifiedClaims: Schema.Int;
|
|
486
|
+
readonly lowConfidenceTasks: Schema.Int;
|
|
487
|
+
}>>;
|
|
488
|
+
readonly skipped: Schema.$Array<Schema.String>;
|
|
489
|
+
readonly totals: Schema.Struct<{
|
|
490
|
+
readonly model: Schema.Number;
|
|
491
|
+
readonly tools: Schema.Number;
|
|
492
|
+
readonly gates: Schema.Number;
|
|
493
|
+
readonly merge: Schema.Number;
|
|
494
|
+
readonly waiting: Schema.Number;
|
|
495
|
+
readonly unaccounted: Schema.Number;
|
|
496
|
+
}>;
|
|
497
|
+
readonly models: Schema.$Array<Schema.Struct<{
|
|
498
|
+
readonly role: Schema.String;
|
|
499
|
+
readonly executor: Schema.optionalKey<Schema.String>;
|
|
500
|
+
readonly calls: Schema.Int;
|
|
501
|
+
readonly ms: Schema.Number;
|
|
502
|
+
readonly avgMs: Schema.Number;
|
|
503
|
+
readonly avgFirstMs: Schema.optionalKey<Schema.Number>;
|
|
504
|
+
readonly apiMs: Schema.optionalKey<Schema.Number>;
|
|
505
|
+
readonly toolMs: Schema.optionalKey<Schema.Number>;
|
|
506
|
+
}>>;
|
|
507
|
+
readonly gates: Schema.$Array<Schema.Struct<{
|
|
508
|
+
readonly command: Schema.String;
|
|
509
|
+
readonly runs: Schema.Int;
|
|
510
|
+
readonly ms: Schema.Number;
|
|
511
|
+
readonly avgMs: Schema.Number;
|
|
512
|
+
readonly failed: Schema.Int;
|
|
513
|
+
}>>;
|
|
514
|
+
readonly tools: Schema.$Array<Schema.Struct<{
|
|
515
|
+
readonly label: Schema.String;
|
|
516
|
+
readonly count: Schema.Int;
|
|
517
|
+
readonly ms: Schema.Number;
|
|
518
|
+
}>>;
|
|
519
|
+
readonly toolCategories: Schema.$Array<Schema.Struct<{
|
|
520
|
+
readonly label: Schema.String;
|
|
521
|
+
readonly count: Schema.Int;
|
|
522
|
+
readonly ms: Schema.Number;
|
|
523
|
+
}>>;
|
|
524
|
+
readonly waits: Schema.$Array<Schema.Struct<{
|
|
525
|
+
readonly label: Schema.String;
|
|
526
|
+
readonly count: Schema.Int;
|
|
527
|
+
readonly ms: Schema.Number;
|
|
528
|
+
}>>;
|
|
529
|
+
readonly outside: Schema.$Array<Schema.Struct<{
|
|
530
|
+
readonly label: Schema.String;
|
|
531
|
+
readonly count: Schema.Int;
|
|
532
|
+
readonly ms: Schema.Number;
|
|
533
|
+
}>>;
|
|
534
|
+
readonly findings: Schema.$Array<Schema.Struct<{
|
|
535
|
+
readonly text: Schema.String;
|
|
536
|
+
readonly ms: Schema.optionalKey<Schema.Number>;
|
|
537
|
+
}>>;
|
|
538
|
+
}>;
|
|
539
|
+
readonly failure: Schema.Union<readonly [typeof UnknownRun, typeof TraceUnreadable, typeof ReadFailed]>;
|
|
540
|
+
readonly failureMode: "error";
|
|
541
|
+
}, never>;
|
|
542
|
+
readonly retro_list: Tool.Tool<"retro_list", {
|
|
543
|
+
readonly parameters: Schema.Struct<{
|
|
544
|
+
readonly repo: Schema.optional<Schema.String>;
|
|
545
|
+
readonly epic: Schema.String;
|
|
546
|
+
}>;
|
|
547
|
+
readonly success: Schema.$Array<Schema.Struct<{
|
|
548
|
+
readonly runId: Schema.String;
|
|
549
|
+
readonly at: Schema.Number;
|
|
550
|
+
readonly approved: Schema.Boolean;
|
|
551
|
+
readonly applied: Schema.Boolean;
|
|
552
|
+
}>>;
|
|
553
|
+
readonly failure: Schema.Union<readonly [typeof UnknownRepo, typeof UnknownEpic]>;
|
|
554
|
+
readonly failureMode: "error";
|
|
555
|
+
}, never>;
|
|
556
|
+
}>;
|
|
557
|
+
export declare const readHandlers: (deps: OperatorDeps) => Toolkit.HandlersFrom<Toolkit.Tools<typeof readToolkit>>;
|
|
558
|
+
//# sourceMappingURL=OperatorTools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OperatorTools.d.ts","sourceRoot":"","sources":["../src/OperatorTools.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,IAAI,MAAM,gBAAgB,CAAA;AACtC,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAA;AAI5C,OAAO,EAAqB,KAAK,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAC1E,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AACrD,OAAO,EACL,QAAQ,EACR,SAAS,EACT,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