clanka 0.21.0 → 0.22.1
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/Acp.test.js +19 -7
- package/dist/Acp.test.js.map +1 -1
- package/dist/Agent.d.ts +4 -4
- package/dist/Agent.d.ts.map +1 -1
- package/dist/Agent.js +140 -99
- package/dist/Agent.js.map +1 -1
- package/dist/Agent.test.js +5 -4
- package/dist/Agent.test.js.map +1 -1
- package/dist/AgentBashJobs.test.js +47 -32
- package/dist/AgentBashJobs.test.js.map +1 -1
- package/dist/AgentCallerConfig.test.js +26 -7
- package/dist/AgentCallerConfig.test.js.map +1 -1
- package/dist/AgentExecutor.d.ts +71 -41
- package/dist/AgentExecutor.d.ts.map +1 -1
- package/dist/AgentExecutor.js +86 -79
- package/dist/AgentExecutor.js.map +1 -1
- package/dist/AgentExecutor.test.js +108 -83
- package/dist/AgentExecutor.test.js.map +1 -1
- package/dist/AgentExecutorImage.test.js +2 -2
- package/dist/AgentExecutorImage.test.js.map +1 -1
- package/dist/AgentImage.test.js +3 -2
- package/dist/AgentImage.test.js.map +1 -1
- package/dist/AgentSubagents.test.js +218 -29
- package/dist/AgentSubagents.test.js.map +1 -1
- package/dist/AgentTools.d.ts +318 -290
- package/dist/AgentTools.d.ts.map +1 -1
- package/dist/AgentTools.js +225 -199
- package/dist/AgentTools.js.map +1 -1
- package/dist/AgentTools.test.js +2 -2
- package/dist/AgentTools.test.js.map +1 -1
- package/dist/AgentToolsReadFile.test.js +8 -2
- package/dist/AgentToolsReadFile.test.js.map +1 -1
- package/dist/bin/cli.mjs +309 -289
- package/dist/bin/cli.mjs.map +1 -1
- package/package.json +1 -1
- package/src/Acp.test.ts +31 -10
- package/src/Agent.test.ts +5 -4
- package/src/Agent.ts +175 -140
- package/src/AgentBashJobs.test.ts +70 -38
- package/src/AgentCallerConfig.test.ts +39 -7
- package/src/AgentExecutor.test.ts +132 -91
- package/src/AgentExecutor.ts +120 -105
- package/src/AgentExecutorImage.test.ts +2 -2
- package/src/AgentImage.test.ts +4 -3
- package/src/AgentSubagents.test.ts +825 -562
- package/src/AgentTools.test.ts +2 -2
- package/src/AgentTools.ts +345 -288
- package/src/AgentToolsReadFile.test.ts +14 -3
package/dist/AgentTools.d.ts
CHANGED
|
@@ -35,106 +35,126 @@ declare const TaskCompleter_base: Context.ServiceClass<TaskCompleter, "clanka/Ag
|
|
|
35
35
|
export declare class TaskCompleter extends TaskCompleter_base {
|
|
36
36
|
}
|
|
37
37
|
/**
|
|
38
|
+
* What a task is: a background `bash` command or a sub-agent started with
|
|
39
|
+
* `delegate`.
|
|
40
|
+
*
|
|
38
41
|
* @since 1.0.0
|
|
39
42
|
* @category Models
|
|
40
43
|
*/
|
|
41
|
-
export declare const
|
|
42
|
-
/**
|
|
43
|
-
* @since 1.0.0
|
|
44
|
-
* @category Models
|
|
45
|
-
*/
|
|
46
|
-
export type SubagentStatus = typeof SubagentStatus.Type;
|
|
47
|
-
/**
|
|
48
|
-
* @since 1.0.0
|
|
49
|
-
* @category Models
|
|
50
|
-
*/
|
|
51
|
-
export declare const SubagentResult: Schema.Struct<{
|
|
52
|
-
readonly id: Schema.String;
|
|
53
|
-
readonly status: Schema.Literals<readonly ["completed", "running", "failed", "cancelled"]>;
|
|
54
|
-
readonly output: Schema.optional<Schema.String>;
|
|
55
|
-
}>;
|
|
44
|
+
export declare const TaskKind: Schema.Literals<readonly ["bash", "agent"]>;
|
|
56
45
|
/**
|
|
57
46
|
* @since 1.0.0
|
|
58
47
|
* @category Models
|
|
59
48
|
*/
|
|
60
|
-
export type
|
|
49
|
+
export type TaskKind = typeof TaskKind.Type;
|
|
61
50
|
/**
|
|
62
51
|
* @since 1.0.0
|
|
63
52
|
* @category Models
|
|
64
53
|
*/
|
|
65
|
-
export declare const
|
|
66
|
-
readonly id: Schema.String;
|
|
67
|
-
readonly output: Schema.optional<Schema.String>;
|
|
68
|
-
readonly status: Schema.Literals<readonly ["completed", "running"]>;
|
|
69
|
-
}>;
|
|
54
|
+
export declare const TaskStatus: Schema.Literals<readonly ["running", "completed", "failed", "stopped"]>;
|
|
70
55
|
/**
|
|
71
56
|
* @since 1.0.0
|
|
72
57
|
* @category Models
|
|
73
58
|
*/
|
|
74
|
-
export type
|
|
59
|
+
export type TaskStatus = typeof TaskStatus.Type;
|
|
75
60
|
/**
|
|
61
|
+
* A background `bash` command or a sub-agent, as returned by the task
|
|
62
|
+
* functions. Both kinds share one id space per executor.
|
|
63
|
+
*
|
|
76
64
|
* @since 1.0.0
|
|
77
65
|
* @category Models
|
|
78
66
|
*/
|
|
79
|
-
export declare const
|
|
67
|
+
export declare const Task: Schema.Struct<{
|
|
80
68
|
readonly id: Schema.String;
|
|
81
|
-
readonly
|
|
82
|
-
readonly
|
|
69
|
+
readonly kind: Schema.Literals<readonly ["bash", "agent"]>;
|
|
70
|
+
readonly status: Schema.Literals<readonly ["running", "completed", "failed", "stopped"]>;
|
|
71
|
+
/** The bash command, or the sub-agent's prompt. */
|
|
72
|
+
readonly description: Schema.String;
|
|
73
|
+
/** Output so far while running; the final output, or the error, once ended. */
|
|
74
|
+
readonly output: Schema.String;
|
|
75
|
+
/** bash only: set when the command exited on its own. */
|
|
76
|
+
readonly exitCode: Schema.optional<Schema.Number>;
|
|
83
77
|
}>;
|
|
84
78
|
/**
|
|
85
79
|
* @since 1.0.0
|
|
86
80
|
* @category Models
|
|
87
81
|
*/
|
|
88
|
-
export type
|
|
82
|
+
export type Task = typeof Task.Type;
|
|
89
83
|
/**
|
|
90
|
-
*
|
|
91
|
-
*
|
|
84
|
+
* The sub-agent side of the task functions, for one agent. The executor
|
|
85
|
+
* resolves bash tasks itself and hands agent tasks to these, so every
|
|
86
|
+
* function only receives ids of agents that this agent started.
|
|
92
87
|
*
|
|
93
88
|
* @since 1.0.0
|
|
94
89
|
* @category Models
|
|
95
90
|
*/
|
|
96
|
-
export interface
|
|
91
|
+
export interface AgentTasks {
|
|
97
92
|
/**
|
|
98
|
-
* Start a sub-agent
|
|
99
|
-
* finished, and dies if the agent failed.
|
|
100
|
-
* straight away with `status: "running"`.
|
|
93
|
+
* Start a sub-agent under the id the executor allocated. In the foreground
|
|
94
|
+
* it resolves once the agent has finished, and dies if the agent failed.
|
|
95
|
+
* In the background it resolves straight away with `status: "running"`.
|
|
101
96
|
*/
|
|
102
97
|
readonly delegate: (options: {
|
|
98
|
+
readonly id: string;
|
|
103
99
|
readonly prompt: string;
|
|
104
100
|
readonly background: boolean;
|
|
105
|
-
}) => Effect.Effect<
|
|
101
|
+
}) => Effect.Effect<Task>;
|
|
102
|
+
/**
|
|
103
|
+
* The agent's status and output so far. A final status counts as reported.
|
|
104
|
+
*/
|
|
105
|
+
readonly taskOutput: (id: string) => Effect.Effect<Task, string>;
|
|
106
106
|
/**
|
|
107
|
-
* Wait for the listed agents
|
|
108
|
-
*
|
|
107
|
+
* Wait up to `timeoutMs` for the listed agents to end, then report the
|
|
108
|
+
* ones that ended all at once. Agents still running at the deadline are
|
|
109
|
+
* returned as running and keep going. Failures are returned as tasks, not
|
|
110
|
+
* raised. The executor calls it once per batch, after waiting for any bash
|
|
111
|
+
* tasks in the batch, with the time left, so nothing is reported while the
|
|
112
|
+
* batch is still waiting.
|
|
109
113
|
*/
|
|
110
|
-
readonly
|
|
114
|
+
readonly waitTasks: (ids: ReadonlyArray<string>, options: {
|
|
115
|
+
readonly timeoutMs: number;
|
|
116
|
+
}) => Effect.Effect<ReadonlyArray<Task>, string>;
|
|
111
117
|
/**
|
|
112
118
|
* Steer a running agent, or start a new turn on a finished one.
|
|
113
119
|
*/
|
|
114
120
|
readonly messageAgent: (options: {
|
|
115
121
|
readonly id: string;
|
|
116
122
|
readonly message: string;
|
|
117
|
-
}) => Effect.Effect<
|
|
123
|
+
}) => Effect.Effect<void, string>;
|
|
118
124
|
/**
|
|
119
125
|
* Interrupt an agent and everything it spawned.
|
|
120
126
|
*/
|
|
121
|
-
readonly
|
|
122
|
-
|
|
127
|
+
readonly stopTask: (id: string) => Effect.Effect<Task, string>;
|
|
128
|
+
/**
|
|
129
|
+
* The agents this agent started.
|
|
130
|
+
*/
|
|
131
|
+
readonly listTasks: Effect.Effect<ReadonlyArray<Task>>;
|
|
123
132
|
}
|
|
124
|
-
declare const
|
|
133
|
+
declare const AgentTaskExecutor_base: Context.ServiceClass<AgentTaskExecutor, "clanka/AgentTools/AgentTaskExecutor", AgentTasks>;
|
|
125
134
|
/**
|
|
126
135
|
* @since 1.0.0
|
|
127
136
|
* @category Context
|
|
128
137
|
*/
|
|
129
|
-
export declare class
|
|
138
|
+
export declare class AgentTaskExecutor extends AgentTaskExecutor_base {
|
|
130
139
|
}
|
|
131
140
|
/**
|
|
132
|
-
*
|
|
141
|
+
* An `AgentTasks` implementation for contexts that cannot spawn agents.
|
|
133
142
|
*
|
|
134
143
|
* @since 1.0.0
|
|
135
144
|
* @category Context
|
|
136
145
|
*/
|
|
137
|
-
export declare const
|
|
146
|
+
export declare const agentTasksUnavailable: AgentTasks;
|
|
147
|
+
declare const TaskOwner_base: Context.Reference<string | undefined>;
|
|
148
|
+
/**
|
|
149
|
+
* The agent running the current script. Tasks are only visible to the agent
|
|
150
|
+
* that started them; scripts without an agent share the `undefined` owner.
|
|
151
|
+
* The executor sets it from `ExecuteOptions.agentId`.
|
|
152
|
+
*
|
|
153
|
+
* @since 1.0.0
|
|
154
|
+
* @category Context
|
|
155
|
+
*/
|
|
156
|
+
export declare class TaskOwner extends TaskOwner_base {
|
|
157
|
+
}
|
|
138
158
|
/**
|
|
139
159
|
* An image read by `readFile`, handed to the Agent so it can be spliced onto
|
|
140
160
|
* the Prompt for the next model turn.
|
|
@@ -155,63 +175,34 @@ declare const ImageAttacher_base: Context.ServiceClass<ImageAttacher, "clanka/Ag
|
|
|
155
175
|
export declare class ImageAttacher extends ImageAttacher_base {
|
|
156
176
|
}
|
|
157
177
|
/**
|
|
158
|
-
*
|
|
159
|
-
* @category Models
|
|
160
|
-
*/
|
|
161
|
-
export declare const BashJobStatus: Schema.Literals<readonly ["running", "completed", "failed", "stopped"]>;
|
|
162
|
-
/**
|
|
163
|
-
* @since 1.0.0
|
|
164
|
-
* @category Models
|
|
165
|
-
*/
|
|
166
|
-
export type BashJobStatus = typeof BashJobStatus.Type;
|
|
167
|
-
/**
|
|
168
|
-
* A `bash` command and its state: the task that `bash`, `jobOutput`,
|
|
169
|
-
* `waitJob` and `stopJob` return. `exitCode` is set once the command has
|
|
170
|
-
* exited; a non-zero exit is `failed`. A foreground `bash` command that
|
|
171
|
-
* fails rejects instead of returning a task.
|
|
172
|
-
*
|
|
173
|
-
* @since 1.0.0
|
|
174
|
-
* @category Models
|
|
175
|
-
*/
|
|
176
|
-
export declare const BashJob: Schema.Struct<{
|
|
177
|
-
readonly id: Schema.String;
|
|
178
|
-
readonly status: Schema.Literals<readonly ["running", "completed", "failed", "stopped"]>;
|
|
179
|
-
readonly exitCode: Schema.optional<Schema.Number>;
|
|
180
|
-
readonly output: Schema.String;
|
|
181
|
-
}>;
|
|
182
|
-
/**
|
|
183
|
-
* @since 1.0.0
|
|
184
|
-
* @category Models
|
|
185
|
-
*/
|
|
186
|
-
export type BashJob = typeof BashJob.Type;
|
|
187
|
-
/**
|
|
188
|
-
* A background `bash` job, handed to the `JobWatcher` when it starts.
|
|
178
|
+
* A task that has started, handed to the `TaskWatcher`.
|
|
189
179
|
*
|
|
190
180
|
* @since 1.0.0
|
|
191
181
|
* @category Models
|
|
192
182
|
*/
|
|
193
|
-
export interface
|
|
183
|
+
export interface TaskHandle {
|
|
194
184
|
readonly id: string;
|
|
195
|
-
|
|
196
|
-
|
|
185
|
+
readonly kind: TaskKind;
|
|
186
|
+
/** Waits for the task to end and succeeds with its final state. */
|
|
187
|
+
readonly await: Effect.Effect<Task>;
|
|
197
188
|
/**
|
|
198
|
-
* Marks the
|
|
199
|
-
* already was: by `
|
|
200
|
-
* an earlier `claim`.
|
|
189
|
+
* Marks the task's final state as reported. Succeeds with `false` when it
|
|
190
|
+
* already was: by `stopTask`, `waitTasks`, a `taskOutput` call that
|
|
191
|
+
* returned it, or an earlier `claim`.
|
|
201
192
|
*/
|
|
202
193
|
readonly claim: Effect.Effect<boolean>;
|
|
203
194
|
}
|
|
204
|
-
declare const
|
|
195
|
+
declare const TaskWatcher_base: Context.Reference<(task: TaskHandle) => Effect.Effect<void>>;
|
|
205
196
|
/**
|
|
206
|
-
* Receives every background `bash`
|
|
197
|
+
* Receives every background `bash` task as it starts: those started with
|
|
207
198
|
* `background: true` and those moved to the background at their timeout. A
|
|
208
199
|
* command that `bash` returns finished is never handed over.
|
|
209
|
-
* The executor sets it from `ExecuteOptions.
|
|
200
|
+
* The executor sets it from `ExecuteOptions.onTask`.
|
|
210
201
|
*
|
|
211
202
|
* @since 1.0.0
|
|
212
203
|
* @category Context
|
|
213
204
|
*/
|
|
214
|
-
export declare class
|
|
205
|
+
export declare class TaskWatcher extends TaskWatcher_base {
|
|
215
206
|
}
|
|
216
207
|
/**
|
|
217
208
|
* The `bash` timeout when the caller sets none.
|
|
@@ -259,9 +250,14 @@ export declare const makeBashTool: (timeout: Duration.Duration) => Tool.Tool<"ba
|
|
|
259
250
|
}>;
|
|
260
251
|
readonly success: Schema.Struct<{
|
|
261
252
|
readonly id: Schema.String;
|
|
253
|
+
readonly kind: Schema.Literals<readonly ["bash", "agent"]>;
|
|
262
254
|
readonly status: Schema.Literals<readonly ["running", "completed", "failed", "stopped"]>;
|
|
263
|
-
|
|
255
|
+
/** The bash command, or the sub-agent's prompt. */
|
|
256
|
+
readonly description: Schema.String;
|
|
257
|
+
/** Output so far while running; the final output, or the error, once ended. */
|
|
264
258
|
readonly output: Schema.String;
|
|
259
|
+
/** bash only: set when the command exited on its own. */
|
|
260
|
+
readonly exitCode: Schema.optional<Schema.Number>;
|
|
265
261
|
}>;
|
|
266
262
|
readonly failure: Schema.Never;
|
|
267
263
|
readonly failureMode: "error";
|
|
@@ -270,7 +266,7 @@ export declare const makeBashTool: (timeout: Duration.Duration) => Tool.Tool<"ba
|
|
|
270
266
|
* @since 1.0.0
|
|
271
267
|
* @category Context
|
|
272
268
|
*/
|
|
273
|
-
export declare const makeContextNoop: (cwd?: string) => Context.Context<CurrentDirectory | DirectoryChanger | ImageAttacher |
|
|
269
|
+
export declare const makeContextNoop: (cwd?: string) => Context.Context<AgentTaskExecutor | CurrentDirectory | DirectoryChanger | ImageAttacher | TaskCompleter>;
|
|
274
270
|
/**
|
|
275
271
|
* @since 1.0.0
|
|
276
272
|
* @category Toolkit
|
|
@@ -290,9 +286,14 @@ export declare const AgentTools: Toolkit.Toolkit<{
|
|
|
290
286
|
}>;
|
|
291
287
|
readonly success: Schema.Struct<{
|
|
292
288
|
readonly id: Schema.String;
|
|
289
|
+
readonly kind: Schema.Literals<readonly ["bash", "agent"]>;
|
|
293
290
|
readonly status: Schema.Literals<readonly ["running", "completed", "failed", "stopped"]>;
|
|
294
|
-
|
|
291
|
+
/** The bash command, or the sub-agent's prompt. */
|
|
292
|
+
readonly description: Schema.String;
|
|
293
|
+
/** Output so far while running; the final output, or the error, once ended. */
|
|
295
294
|
readonly output: Schema.String;
|
|
295
|
+
/** bash only: set when the command exited on its own. */
|
|
296
|
+
readonly exitCode: Schema.optional<Schema.Number>;
|
|
296
297
|
}>;
|
|
297
298
|
readonly failure: Schema.Never;
|
|
298
299
|
readonly failureMode: "error";
|
|
@@ -310,12 +311,18 @@ export declare const AgentTools: Toolkit.Toolkit<{
|
|
|
310
311
|
}>;
|
|
311
312
|
readonly success: Schema.Struct<{
|
|
312
313
|
readonly id: Schema.String;
|
|
313
|
-
readonly
|
|
314
|
-
readonly status: Schema.Literals<readonly ["completed", "
|
|
314
|
+
readonly kind: Schema.Literals<readonly ["bash", "agent"]>;
|
|
315
|
+
readonly status: Schema.Literals<readonly ["running", "completed", "failed", "stopped"]>;
|
|
316
|
+
/** The bash command, or the sub-agent's prompt. */
|
|
317
|
+
readonly description: Schema.String;
|
|
318
|
+
/** Output so far while running; the final output, or the error, once ended. */
|
|
319
|
+
readonly output: Schema.String;
|
|
320
|
+
/** bash only: set when the command exited on its own. */
|
|
321
|
+
readonly exitCode: Schema.optional<Schema.Number>;
|
|
315
322
|
}>;
|
|
316
323
|
readonly failure: Schema.String;
|
|
317
324
|
readonly failureMode: "error";
|
|
318
|
-
},
|
|
325
|
+
}, AgentTaskExecutor>;
|
|
319
326
|
readonly fetchMarkdown: Tool.Tool<"fetchMarkdown", {
|
|
320
327
|
readonly parameters: Schema.String;
|
|
321
328
|
readonly success: Schema.String;
|
|
@@ -334,27 +341,22 @@ export declare const AgentTools: Toolkit.Toolkit<{
|
|
|
334
341
|
readonly failure: Schema.Never;
|
|
335
342
|
readonly failureMode: "error";
|
|
336
343
|
}, CurrentDirectory>;
|
|
337
|
-
readonly
|
|
338
|
-
readonly parameters: Schema.String;
|
|
339
|
-
readonly success: Schema.Struct<{
|
|
340
|
-
readonly id: Schema.String;
|
|
341
|
-
readonly status: Schema.Literals<readonly ["running", "completed", "failed", "stopped"]>;
|
|
342
|
-
readonly exitCode: Schema.optional<Schema.Number>;
|
|
343
|
-
readonly output: Schema.String;
|
|
344
|
-
}>;
|
|
345
|
-
readonly failure: Schema.String;
|
|
346
|
-
readonly failureMode: "error";
|
|
347
|
-
}, never>;
|
|
348
|
-
readonly listAgents: Tool.Tool<"listAgents", {
|
|
344
|
+
readonly listTasks: Tool.Tool<"listTasks", {
|
|
349
345
|
readonly parameters: Schema.Void;
|
|
350
346
|
readonly success: Schema.$Array<Schema.Struct<{
|
|
351
347
|
readonly id: Schema.String;
|
|
352
|
-
readonly
|
|
353
|
-
readonly
|
|
348
|
+
readonly kind: Schema.Literals<readonly ["bash", "agent"]>;
|
|
349
|
+
readonly status: Schema.Literals<readonly ["running", "completed", "failed", "stopped"]>;
|
|
350
|
+
/** The bash command, or the sub-agent's prompt. */
|
|
351
|
+
readonly description: Schema.String;
|
|
352
|
+
/** Output so far while running; the final output, or the error, once ended. */
|
|
353
|
+
readonly output: Schema.String;
|
|
354
|
+
/** bash only: set when the command exited on its own. */
|
|
355
|
+
readonly exitCode: Schema.optional<Schema.Number>;
|
|
354
356
|
}>>;
|
|
355
357
|
readonly failure: Schema.Never;
|
|
356
358
|
readonly failureMode: "error";
|
|
357
|
-
},
|
|
359
|
+
}, AgentTaskExecutor>;
|
|
358
360
|
readonly ls: Tool.Tool<"ls", {
|
|
359
361
|
readonly parameters: Schema.String;
|
|
360
362
|
readonly success: Schema.$Array<Schema.String>;
|
|
@@ -366,14 +368,10 @@ export declare const AgentTools: Toolkit.Toolkit<{
|
|
|
366
368
|
readonly id: Schema.String;
|
|
367
369
|
readonly message: Schema.String;
|
|
368
370
|
}>;
|
|
369
|
-
readonly success: Schema.
|
|
370
|
-
readonly id: Schema.String;
|
|
371
|
-
readonly status: Schema.Literals<readonly ["completed", "running", "failed", "cancelled"]>;
|
|
372
|
-
readonly output: Schema.optional<Schema.String>;
|
|
373
|
-
}>;
|
|
371
|
+
readonly success: Schema.Void;
|
|
374
372
|
readonly failure: Schema.String;
|
|
375
373
|
readonly failureMode: "error";
|
|
376
|
-
},
|
|
374
|
+
}, AgentTaskExecutor>;
|
|
377
375
|
readonly readFile: Tool.Tool<"readFile", {
|
|
378
376
|
readonly parameters: Schema.Struct<{
|
|
379
377
|
readonly path: Schema.String;
|
|
@@ -417,57 +415,63 @@ export declare const AgentTools: Toolkit.Toolkit<{
|
|
|
417
415
|
readonly failure: Schema.Never;
|
|
418
416
|
readonly failureMode: "error";
|
|
419
417
|
}, never>;
|
|
420
|
-
readonly
|
|
421
|
-
readonly parameters: Schema.String;
|
|
422
|
-
readonly success: Schema.Struct<{
|
|
423
|
-
readonly id: Schema.String;
|
|
424
|
-
readonly status: Schema.Literals<readonly ["completed", "running", "failed", "cancelled"]>;
|
|
425
|
-
readonly output: Schema.optional<Schema.String>;
|
|
426
|
-
}>;
|
|
427
|
-
readonly failure: Schema.String;
|
|
428
|
-
readonly failureMode: "error";
|
|
429
|
-
}, SubagentExecutor>;
|
|
430
|
-
readonly stopJob: Tool.Tool<"stopJob", {
|
|
418
|
+
readonly stopTask: Tool.Tool<"stopTask", {
|
|
431
419
|
readonly parameters: Schema.String;
|
|
432
420
|
readonly success: Schema.Struct<{
|
|
433
421
|
readonly id: Schema.String;
|
|
422
|
+
readonly kind: Schema.Literals<readonly ["bash", "agent"]>;
|
|
434
423
|
readonly status: Schema.Literals<readonly ["running", "completed", "failed", "stopped"]>;
|
|
435
|
-
|
|
424
|
+
/** The bash command, or the sub-agent's prompt. */
|
|
425
|
+
readonly description: Schema.String;
|
|
426
|
+
/** Output so far while running; the final output, or the error, once ended. */
|
|
436
427
|
readonly output: Schema.String;
|
|
428
|
+
/** bash only: set when the command exited on its own. */
|
|
429
|
+
readonly exitCode: Schema.optional<Schema.Number>;
|
|
437
430
|
}>;
|
|
438
431
|
readonly failure: Schema.String;
|
|
439
432
|
readonly failureMode: "error";
|
|
440
|
-
},
|
|
433
|
+
}, AgentTaskExecutor>;
|
|
441
434
|
readonly taskComplete: Tool.Tool<"taskComplete", {
|
|
442
435
|
readonly parameters: Schema.String;
|
|
443
436
|
readonly success: Schema.Void;
|
|
444
437
|
readonly failure: Schema.String;
|
|
445
438
|
readonly failureMode: "error";
|
|
446
439
|
}, TaskCompleter>;
|
|
447
|
-
readonly
|
|
448
|
-
readonly parameters: Schema.
|
|
449
|
-
readonly success: Schema
|
|
440
|
+
readonly taskOutput: Tool.Tool<"taskOutput", {
|
|
441
|
+
readonly parameters: Schema.String;
|
|
442
|
+
readonly success: Schema.Struct<{
|
|
450
443
|
readonly id: Schema.String;
|
|
451
|
-
readonly
|
|
452
|
-
readonly
|
|
453
|
-
|
|
444
|
+
readonly kind: Schema.Literals<readonly ["bash", "agent"]>;
|
|
445
|
+
readonly status: Schema.Literals<readonly ["running", "completed", "failed", "stopped"]>;
|
|
446
|
+
/** The bash command, or the sub-agent's prompt. */
|
|
447
|
+
readonly description: Schema.String;
|
|
448
|
+
/** Output so far while running; the final output, or the error, once ended. */
|
|
449
|
+
readonly output: Schema.String;
|
|
450
|
+
/** bash only: set when the command exited on its own. */
|
|
451
|
+
readonly exitCode: Schema.optional<Schema.Number>;
|
|
452
|
+
}>;
|
|
454
453
|
readonly failure: Schema.String;
|
|
455
454
|
readonly failureMode: "error";
|
|
456
|
-
},
|
|
457
|
-
readonly
|
|
455
|
+
}, AgentTaskExecutor>;
|
|
456
|
+
readonly waitTasks: Tool.Tool<"waitTasks", {
|
|
458
457
|
readonly parameters: Schema.Struct<{
|
|
459
|
-
readonly
|
|
458
|
+
readonly ids: Schema.$Array<Schema.String>;
|
|
460
459
|
readonly timeoutMs: Schema.optional<Schema.Finite>;
|
|
461
460
|
}>;
|
|
462
|
-
readonly success: Schema.Struct<{
|
|
461
|
+
readonly success: Schema.$Array<Schema.Struct<{
|
|
463
462
|
readonly id: Schema.String;
|
|
463
|
+
readonly kind: Schema.Literals<readonly ["bash", "agent"]>;
|
|
464
464
|
readonly status: Schema.Literals<readonly ["running", "completed", "failed", "stopped"]>;
|
|
465
|
-
|
|
465
|
+
/** The bash command, or the sub-agent's prompt. */
|
|
466
|
+
readonly description: Schema.String;
|
|
467
|
+
/** Output so far while running; the final output, or the error, once ended. */
|
|
466
468
|
readonly output: Schema.String;
|
|
467
|
-
|
|
469
|
+
/** bash only: set when the command exited on its own. */
|
|
470
|
+
readonly exitCode: Schema.optional<Schema.Number>;
|
|
471
|
+
}>>;
|
|
468
472
|
readonly failure: Schema.String;
|
|
469
473
|
readonly failureMode: "error";
|
|
470
|
-
},
|
|
474
|
+
}, AgentTaskExecutor>;
|
|
471
475
|
readonly webSearch: Tool.Tool<"webSearch", {
|
|
472
476
|
readonly parameters: Schema.Struct<{
|
|
473
477
|
readonly query: Schema.String;
|
|
@@ -506,9 +510,14 @@ export declare const AgentToolsWithSearch: Toolkit.Toolkit<{
|
|
|
506
510
|
}>;
|
|
507
511
|
readonly success: Schema.Struct<{
|
|
508
512
|
readonly id: Schema.String;
|
|
513
|
+
readonly kind: Schema.Literals<readonly ["bash", "agent"]>;
|
|
509
514
|
readonly status: Schema.Literals<readonly ["running", "completed", "failed", "stopped"]>;
|
|
510
|
-
|
|
515
|
+
/** The bash command, or the sub-agent's prompt. */
|
|
516
|
+
readonly description: Schema.String;
|
|
517
|
+
/** Output so far while running; the final output, or the error, once ended. */
|
|
511
518
|
readonly output: Schema.String;
|
|
519
|
+
/** bash only: set when the command exited on its own. */
|
|
520
|
+
readonly exitCode: Schema.optional<Schema.Number>;
|
|
512
521
|
}>;
|
|
513
522
|
readonly failure: Schema.Never;
|
|
514
523
|
readonly failureMode: "error";
|
|
@@ -526,12 +535,18 @@ export declare const AgentToolsWithSearch: Toolkit.Toolkit<{
|
|
|
526
535
|
}>;
|
|
527
536
|
readonly success: Schema.Struct<{
|
|
528
537
|
readonly id: Schema.String;
|
|
529
|
-
readonly
|
|
530
|
-
readonly status: Schema.Literals<readonly ["completed", "
|
|
538
|
+
readonly kind: Schema.Literals<readonly ["bash", "agent"]>;
|
|
539
|
+
readonly status: Schema.Literals<readonly ["running", "completed", "failed", "stopped"]>;
|
|
540
|
+
/** The bash command, or the sub-agent's prompt. */
|
|
541
|
+
readonly description: Schema.String;
|
|
542
|
+
/** Output so far while running; the final output, or the error, once ended. */
|
|
543
|
+
readonly output: Schema.String;
|
|
544
|
+
/** bash only: set when the command exited on its own. */
|
|
545
|
+
readonly exitCode: Schema.optional<Schema.Number>;
|
|
531
546
|
}>;
|
|
532
547
|
readonly failure: Schema.String;
|
|
533
548
|
readonly failureMode: "error";
|
|
534
|
-
},
|
|
549
|
+
}, AgentTaskExecutor>;
|
|
535
550
|
readonly fetchMarkdown: Tool.Tool<"fetchMarkdown", {
|
|
536
551
|
readonly parameters: Schema.String;
|
|
537
552
|
readonly success: Schema.String;
|
|
@@ -550,27 +565,22 @@ export declare const AgentToolsWithSearch: Toolkit.Toolkit<{
|
|
|
550
565
|
readonly failure: Schema.Never;
|
|
551
566
|
readonly failureMode: "error";
|
|
552
567
|
}, CurrentDirectory>;
|
|
553
|
-
readonly
|
|
554
|
-
readonly parameters: Schema.String;
|
|
555
|
-
readonly success: Schema.Struct<{
|
|
556
|
-
readonly id: Schema.String;
|
|
557
|
-
readonly status: Schema.Literals<readonly ["running", "completed", "failed", "stopped"]>;
|
|
558
|
-
readonly exitCode: Schema.optional<Schema.Number>;
|
|
559
|
-
readonly output: Schema.String;
|
|
560
|
-
}>;
|
|
561
|
-
readonly failure: Schema.String;
|
|
562
|
-
readonly failureMode: "error";
|
|
563
|
-
}, never>;
|
|
564
|
-
readonly listAgents: Tool.Tool<"listAgents", {
|
|
568
|
+
readonly listTasks: Tool.Tool<"listTasks", {
|
|
565
569
|
readonly parameters: Schema.Void;
|
|
566
570
|
readonly success: Schema.$Array<Schema.Struct<{
|
|
567
571
|
readonly id: Schema.String;
|
|
568
|
-
readonly
|
|
569
|
-
readonly
|
|
572
|
+
readonly kind: Schema.Literals<readonly ["bash", "agent"]>;
|
|
573
|
+
readonly status: Schema.Literals<readonly ["running", "completed", "failed", "stopped"]>;
|
|
574
|
+
/** The bash command, or the sub-agent's prompt. */
|
|
575
|
+
readonly description: Schema.String;
|
|
576
|
+
/** Output so far while running; the final output, or the error, once ended. */
|
|
577
|
+
readonly output: Schema.String;
|
|
578
|
+
/** bash only: set when the command exited on its own. */
|
|
579
|
+
readonly exitCode: Schema.optional<Schema.Number>;
|
|
570
580
|
}>>;
|
|
571
581
|
readonly failure: Schema.Never;
|
|
572
582
|
readonly failureMode: "error";
|
|
573
|
-
},
|
|
583
|
+
}, AgentTaskExecutor>;
|
|
574
584
|
readonly ls: Tool.Tool<"ls", {
|
|
575
585
|
readonly parameters: Schema.String;
|
|
576
586
|
readonly success: Schema.$Array<Schema.String>;
|
|
@@ -582,14 +592,10 @@ export declare const AgentToolsWithSearch: Toolkit.Toolkit<{
|
|
|
582
592
|
readonly id: Schema.String;
|
|
583
593
|
readonly message: Schema.String;
|
|
584
594
|
}>;
|
|
585
|
-
readonly success: Schema.
|
|
586
|
-
readonly id: Schema.String;
|
|
587
|
-
readonly status: Schema.Literals<readonly ["completed", "running", "failed", "cancelled"]>;
|
|
588
|
-
readonly output: Schema.optional<Schema.String>;
|
|
589
|
-
}>;
|
|
595
|
+
readonly success: Schema.Void;
|
|
590
596
|
readonly failure: Schema.String;
|
|
591
597
|
readonly failureMode: "error";
|
|
592
|
-
},
|
|
598
|
+
}, AgentTaskExecutor>;
|
|
593
599
|
readonly readFile: Tool.Tool<"readFile", {
|
|
594
600
|
readonly parameters: Schema.Struct<{
|
|
595
601
|
readonly path: Schema.String;
|
|
@@ -639,57 +645,63 @@ export declare const AgentToolsWithSearch: Toolkit.Toolkit<{
|
|
|
639
645
|
readonly failure: Schema.Never;
|
|
640
646
|
readonly failureMode: "error";
|
|
641
647
|
}, never>;
|
|
642
|
-
readonly
|
|
643
|
-
readonly parameters: Schema.String;
|
|
644
|
-
readonly success: Schema.Struct<{
|
|
645
|
-
readonly id: Schema.String;
|
|
646
|
-
readonly status: Schema.Literals<readonly ["completed", "running", "failed", "cancelled"]>;
|
|
647
|
-
readonly output: Schema.optional<Schema.String>;
|
|
648
|
-
}>;
|
|
649
|
-
readonly failure: Schema.String;
|
|
650
|
-
readonly failureMode: "error";
|
|
651
|
-
}, SubagentExecutor>;
|
|
652
|
-
readonly stopJob: Tool.Tool<"stopJob", {
|
|
648
|
+
readonly stopTask: Tool.Tool<"stopTask", {
|
|
653
649
|
readonly parameters: Schema.String;
|
|
654
650
|
readonly success: Schema.Struct<{
|
|
655
651
|
readonly id: Schema.String;
|
|
652
|
+
readonly kind: Schema.Literals<readonly ["bash", "agent"]>;
|
|
656
653
|
readonly status: Schema.Literals<readonly ["running", "completed", "failed", "stopped"]>;
|
|
657
|
-
|
|
654
|
+
/** The bash command, or the sub-agent's prompt. */
|
|
655
|
+
readonly description: Schema.String;
|
|
656
|
+
/** Output so far while running; the final output, or the error, once ended. */
|
|
658
657
|
readonly output: Schema.String;
|
|
658
|
+
/** bash only: set when the command exited on its own. */
|
|
659
|
+
readonly exitCode: Schema.optional<Schema.Number>;
|
|
659
660
|
}>;
|
|
660
661
|
readonly failure: Schema.String;
|
|
661
662
|
readonly failureMode: "error";
|
|
662
|
-
},
|
|
663
|
+
}, AgentTaskExecutor>;
|
|
663
664
|
readonly taskComplete: Tool.Tool<"taskComplete", {
|
|
664
665
|
readonly parameters: Schema.String;
|
|
665
666
|
readonly success: Schema.Void;
|
|
666
667
|
readonly failure: Schema.String;
|
|
667
668
|
readonly failureMode: "error";
|
|
668
669
|
}, TaskCompleter>;
|
|
669
|
-
readonly
|
|
670
|
-
readonly parameters: Schema.
|
|
671
|
-
readonly success: Schema
|
|
670
|
+
readonly taskOutput: Tool.Tool<"taskOutput", {
|
|
671
|
+
readonly parameters: Schema.String;
|
|
672
|
+
readonly success: Schema.Struct<{
|
|
672
673
|
readonly id: Schema.String;
|
|
673
|
-
readonly
|
|
674
|
-
readonly
|
|
675
|
-
|
|
674
|
+
readonly kind: Schema.Literals<readonly ["bash", "agent"]>;
|
|
675
|
+
readonly status: Schema.Literals<readonly ["running", "completed", "failed", "stopped"]>;
|
|
676
|
+
/** The bash command, or the sub-agent's prompt. */
|
|
677
|
+
readonly description: Schema.String;
|
|
678
|
+
/** Output so far while running; the final output, or the error, once ended. */
|
|
679
|
+
readonly output: Schema.String;
|
|
680
|
+
/** bash only: set when the command exited on its own. */
|
|
681
|
+
readonly exitCode: Schema.optional<Schema.Number>;
|
|
682
|
+
}>;
|
|
676
683
|
readonly failure: Schema.String;
|
|
677
684
|
readonly failureMode: "error";
|
|
678
|
-
},
|
|
679
|
-
readonly
|
|
685
|
+
}, AgentTaskExecutor>;
|
|
686
|
+
readonly waitTasks: Tool.Tool<"waitTasks", {
|
|
680
687
|
readonly parameters: Schema.Struct<{
|
|
681
|
-
readonly
|
|
688
|
+
readonly ids: Schema.$Array<Schema.String>;
|
|
682
689
|
readonly timeoutMs: Schema.optional<Schema.Finite>;
|
|
683
690
|
}>;
|
|
684
|
-
readonly success: Schema.Struct<{
|
|
691
|
+
readonly success: Schema.$Array<Schema.Struct<{
|
|
685
692
|
readonly id: Schema.String;
|
|
693
|
+
readonly kind: Schema.Literals<readonly ["bash", "agent"]>;
|
|
686
694
|
readonly status: Schema.Literals<readonly ["running", "completed", "failed", "stopped"]>;
|
|
687
|
-
|
|
695
|
+
/** The bash command, or the sub-agent's prompt. */
|
|
696
|
+
readonly description: Schema.String;
|
|
697
|
+
/** Output so far while running; the final output, or the error, once ended. */
|
|
688
698
|
readonly output: Schema.String;
|
|
689
|
-
|
|
699
|
+
/** bash only: set when the command exited on its own. */
|
|
700
|
+
readonly exitCode: Schema.optional<Schema.Number>;
|
|
701
|
+
}>>;
|
|
690
702
|
readonly failure: Schema.String;
|
|
691
703
|
readonly failureMode: "error";
|
|
692
|
-
},
|
|
704
|
+
}, AgentTaskExecutor>;
|
|
693
705
|
readonly webSearch: Tool.Tool<"webSearch", {
|
|
694
706
|
readonly parameters: Schema.Struct<{
|
|
695
707
|
readonly query: Schema.String;
|
|
@@ -735,9 +747,14 @@ export declare const AgentToolHandlersNoDeps: Layer.Layer<Tool.HandlersFor<{
|
|
|
735
747
|
}>;
|
|
736
748
|
readonly success: Schema.Struct<{
|
|
737
749
|
readonly id: Schema.String;
|
|
750
|
+
readonly kind: Schema.Literals<readonly ["bash", "agent"]>;
|
|
738
751
|
readonly status: Schema.Literals<readonly ["running", "completed", "failed", "stopped"]>;
|
|
739
|
-
|
|
752
|
+
/** The bash command, or the sub-agent's prompt. */
|
|
753
|
+
readonly description: Schema.String;
|
|
754
|
+
/** Output so far while running; the final output, or the error, once ended. */
|
|
740
755
|
readonly output: Schema.String;
|
|
756
|
+
/** bash only: set when the command exited on its own. */
|
|
757
|
+
readonly exitCode: Schema.optional<Schema.Number>;
|
|
741
758
|
}>;
|
|
742
759
|
readonly failure: Schema.Never;
|
|
743
760
|
readonly failureMode: "error";
|
|
@@ -755,12 +772,18 @@ export declare const AgentToolHandlersNoDeps: Layer.Layer<Tool.HandlersFor<{
|
|
|
755
772
|
}>;
|
|
756
773
|
readonly success: Schema.Struct<{
|
|
757
774
|
readonly id: Schema.String;
|
|
758
|
-
readonly
|
|
759
|
-
readonly status: Schema.Literals<readonly ["completed", "
|
|
775
|
+
readonly kind: Schema.Literals<readonly ["bash", "agent"]>;
|
|
776
|
+
readonly status: Schema.Literals<readonly ["running", "completed", "failed", "stopped"]>;
|
|
777
|
+
/** The bash command, or the sub-agent's prompt. */
|
|
778
|
+
readonly description: Schema.String;
|
|
779
|
+
/** Output so far while running; the final output, or the error, once ended. */
|
|
780
|
+
readonly output: Schema.String;
|
|
781
|
+
/** bash only: set when the command exited on its own. */
|
|
782
|
+
readonly exitCode: Schema.optional<Schema.Number>;
|
|
760
783
|
}>;
|
|
761
784
|
readonly failure: Schema.String;
|
|
762
785
|
readonly failureMode: "error";
|
|
763
|
-
},
|
|
786
|
+
}, AgentTaskExecutor>;
|
|
764
787
|
readonly fetchMarkdown: Tool.Tool<"fetchMarkdown", {
|
|
765
788
|
readonly parameters: Schema.String;
|
|
766
789
|
readonly success: Schema.String;
|
|
@@ -779,27 +802,22 @@ export declare const AgentToolHandlersNoDeps: Layer.Layer<Tool.HandlersFor<{
|
|
|
779
802
|
readonly failure: Schema.Never;
|
|
780
803
|
readonly failureMode: "error";
|
|
781
804
|
}, CurrentDirectory>;
|
|
782
|
-
readonly
|
|
783
|
-
readonly parameters: Schema.String;
|
|
784
|
-
readonly success: Schema.Struct<{
|
|
785
|
-
readonly id: Schema.String;
|
|
786
|
-
readonly status: Schema.Literals<readonly ["running", "completed", "failed", "stopped"]>;
|
|
787
|
-
readonly exitCode: Schema.optional<Schema.Number>;
|
|
788
|
-
readonly output: Schema.String;
|
|
789
|
-
}>;
|
|
790
|
-
readonly failure: Schema.String;
|
|
791
|
-
readonly failureMode: "error";
|
|
792
|
-
}, never>;
|
|
793
|
-
readonly listAgents: Tool.Tool<"listAgents", {
|
|
805
|
+
readonly listTasks: Tool.Tool<"listTasks", {
|
|
794
806
|
readonly parameters: Schema.Void;
|
|
795
807
|
readonly success: Schema.$Array<Schema.Struct<{
|
|
796
808
|
readonly id: Schema.String;
|
|
797
|
-
readonly
|
|
798
|
-
readonly
|
|
809
|
+
readonly kind: Schema.Literals<readonly ["bash", "agent"]>;
|
|
810
|
+
readonly status: Schema.Literals<readonly ["running", "completed", "failed", "stopped"]>;
|
|
811
|
+
/** The bash command, or the sub-agent's prompt. */
|
|
812
|
+
readonly description: Schema.String;
|
|
813
|
+
/** Output so far while running; the final output, or the error, once ended. */
|
|
814
|
+
readonly output: Schema.String;
|
|
815
|
+
/** bash only: set when the command exited on its own. */
|
|
816
|
+
readonly exitCode: Schema.optional<Schema.Number>;
|
|
799
817
|
}>>;
|
|
800
818
|
readonly failure: Schema.Never;
|
|
801
819
|
readonly failureMode: "error";
|
|
802
|
-
},
|
|
820
|
+
}, AgentTaskExecutor>;
|
|
803
821
|
readonly ls: Tool.Tool<"ls", {
|
|
804
822
|
readonly parameters: Schema.String;
|
|
805
823
|
readonly success: Schema.$Array<Schema.String>;
|
|
@@ -811,14 +829,10 @@ export declare const AgentToolHandlersNoDeps: Layer.Layer<Tool.HandlersFor<{
|
|
|
811
829
|
readonly id: Schema.String;
|
|
812
830
|
readonly message: Schema.String;
|
|
813
831
|
}>;
|
|
814
|
-
readonly success: Schema.
|
|
815
|
-
readonly id: Schema.String;
|
|
816
|
-
readonly status: Schema.Literals<readonly ["completed", "running", "failed", "cancelled"]>;
|
|
817
|
-
readonly output: Schema.optional<Schema.String>;
|
|
818
|
-
}>;
|
|
832
|
+
readonly success: Schema.Void;
|
|
819
833
|
readonly failure: Schema.String;
|
|
820
834
|
readonly failureMode: "error";
|
|
821
|
-
},
|
|
835
|
+
}, AgentTaskExecutor>;
|
|
822
836
|
readonly readFile: Tool.Tool<"readFile", {
|
|
823
837
|
readonly parameters: Schema.Struct<{
|
|
824
838
|
readonly path: Schema.String;
|
|
@@ -868,57 +882,63 @@ export declare const AgentToolHandlersNoDeps: Layer.Layer<Tool.HandlersFor<{
|
|
|
868
882
|
readonly failure: Schema.Never;
|
|
869
883
|
readonly failureMode: "error";
|
|
870
884
|
}, never>;
|
|
871
|
-
readonly
|
|
872
|
-
readonly parameters: Schema.String;
|
|
873
|
-
readonly success: Schema.Struct<{
|
|
874
|
-
readonly id: Schema.String;
|
|
875
|
-
readonly status: Schema.Literals<readonly ["completed", "running", "failed", "cancelled"]>;
|
|
876
|
-
readonly output: Schema.optional<Schema.String>;
|
|
877
|
-
}>;
|
|
878
|
-
readonly failure: Schema.String;
|
|
879
|
-
readonly failureMode: "error";
|
|
880
|
-
}, SubagentExecutor>;
|
|
881
|
-
readonly stopJob: Tool.Tool<"stopJob", {
|
|
885
|
+
readonly stopTask: Tool.Tool<"stopTask", {
|
|
882
886
|
readonly parameters: Schema.String;
|
|
883
887
|
readonly success: Schema.Struct<{
|
|
884
888
|
readonly id: Schema.String;
|
|
889
|
+
readonly kind: Schema.Literals<readonly ["bash", "agent"]>;
|
|
885
890
|
readonly status: Schema.Literals<readonly ["running", "completed", "failed", "stopped"]>;
|
|
886
|
-
|
|
891
|
+
/** The bash command, or the sub-agent's prompt. */
|
|
892
|
+
readonly description: Schema.String;
|
|
893
|
+
/** Output so far while running; the final output, or the error, once ended. */
|
|
887
894
|
readonly output: Schema.String;
|
|
895
|
+
/** bash only: set when the command exited on its own. */
|
|
896
|
+
readonly exitCode: Schema.optional<Schema.Number>;
|
|
888
897
|
}>;
|
|
889
898
|
readonly failure: Schema.String;
|
|
890
899
|
readonly failureMode: "error";
|
|
891
|
-
},
|
|
900
|
+
}, AgentTaskExecutor>;
|
|
892
901
|
readonly taskComplete: Tool.Tool<"taskComplete", {
|
|
893
902
|
readonly parameters: Schema.String;
|
|
894
903
|
readonly success: Schema.Void;
|
|
895
904
|
readonly failure: Schema.String;
|
|
896
905
|
readonly failureMode: "error";
|
|
897
906
|
}, TaskCompleter>;
|
|
898
|
-
readonly
|
|
899
|
-
readonly parameters: Schema.
|
|
900
|
-
readonly success: Schema
|
|
907
|
+
readonly taskOutput: Tool.Tool<"taskOutput", {
|
|
908
|
+
readonly parameters: Schema.String;
|
|
909
|
+
readonly success: Schema.Struct<{
|
|
901
910
|
readonly id: Schema.String;
|
|
902
|
-
readonly
|
|
903
|
-
readonly
|
|
904
|
-
|
|
911
|
+
readonly kind: Schema.Literals<readonly ["bash", "agent"]>;
|
|
912
|
+
readonly status: Schema.Literals<readonly ["running", "completed", "failed", "stopped"]>;
|
|
913
|
+
/** The bash command, or the sub-agent's prompt. */
|
|
914
|
+
readonly description: Schema.String;
|
|
915
|
+
/** Output so far while running; the final output, or the error, once ended. */
|
|
916
|
+
readonly output: Schema.String;
|
|
917
|
+
/** bash only: set when the command exited on its own. */
|
|
918
|
+
readonly exitCode: Schema.optional<Schema.Number>;
|
|
919
|
+
}>;
|
|
905
920
|
readonly failure: Schema.String;
|
|
906
921
|
readonly failureMode: "error";
|
|
907
|
-
},
|
|
908
|
-
readonly
|
|
922
|
+
}, AgentTaskExecutor>;
|
|
923
|
+
readonly waitTasks: Tool.Tool<"waitTasks", {
|
|
909
924
|
readonly parameters: Schema.Struct<{
|
|
910
|
-
readonly
|
|
925
|
+
readonly ids: Schema.$Array<Schema.String>;
|
|
911
926
|
readonly timeoutMs: Schema.optional<Schema.Finite>;
|
|
912
927
|
}>;
|
|
913
|
-
readonly success: Schema.Struct<{
|
|
928
|
+
readonly success: Schema.$Array<Schema.Struct<{
|
|
914
929
|
readonly id: Schema.String;
|
|
930
|
+
readonly kind: Schema.Literals<readonly ["bash", "agent"]>;
|
|
915
931
|
readonly status: Schema.Literals<readonly ["running", "completed", "failed", "stopped"]>;
|
|
916
|
-
|
|
932
|
+
/** The bash command, or the sub-agent's prompt. */
|
|
933
|
+
readonly description: Schema.String;
|
|
934
|
+
/** Output so far while running; the final output, or the error, once ended. */
|
|
917
935
|
readonly output: Schema.String;
|
|
918
|
-
|
|
936
|
+
/** bash only: set when the command exited on its own. */
|
|
937
|
+
readonly exitCode: Schema.optional<Schema.Number>;
|
|
938
|
+
}>>;
|
|
919
939
|
readonly failure: Schema.String;
|
|
920
940
|
readonly failureMode: "error";
|
|
921
|
-
},
|
|
941
|
+
}, AgentTaskExecutor>;
|
|
922
942
|
readonly webSearch: Tool.Tool<"webSearch", {
|
|
923
943
|
readonly parameters: Schema.Struct<{
|
|
924
944
|
readonly query: Schema.String;
|
|
@@ -962,9 +982,14 @@ export declare const AgentToolHandlersTest: Layer.Layer<Tool.HandlersFor<{
|
|
|
962
982
|
}>;
|
|
963
983
|
readonly success: Schema.Struct<{
|
|
964
984
|
readonly id: Schema.String;
|
|
985
|
+
readonly kind: Schema.Literals<readonly ["bash", "agent"]>;
|
|
965
986
|
readonly status: Schema.Literals<readonly ["running", "completed", "failed", "stopped"]>;
|
|
966
|
-
|
|
987
|
+
/** The bash command, or the sub-agent's prompt. */
|
|
988
|
+
readonly description: Schema.String;
|
|
989
|
+
/** Output so far while running; the final output, or the error, once ended. */
|
|
967
990
|
readonly output: Schema.String;
|
|
991
|
+
/** bash only: set when the command exited on its own. */
|
|
992
|
+
readonly exitCode: Schema.optional<Schema.Number>;
|
|
968
993
|
}>;
|
|
969
994
|
readonly failure: Schema.Never;
|
|
970
995
|
readonly failureMode: "error";
|
|
@@ -982,12 +1007,18 @@ export declare const AgentToolHandlersTest: Layer.Layer<Tool.HandlersFor<{
|
|
|
982
1007
|
}>;
|
|
983
1008
|
readonly success: Schema.Struct<{
|
|
984
1009
|
readonly id: Schema.String;
|
|
985
|
-
readonly
|
|
986
|
-
readonly status: Schema.Literals<readonly ["completed", "
|
|
1010
|
+
readonly kind: Schema.Literals<readonly ["bash", "agent"]>;
|
|
1011
|
+
readonly status: Schema.Literals<readonly ["running", "completed", "failed", "stopped"]>;
|
|
1012
|
+
/** The bash command, or the sub-agent's prompt. */
|
|
1013
|
+
readonly description: Schema.String;
|
|
1014
|
+
/** Output so far while running; the final output, or the error, once ended. */
|
|
1015
|
+
readonly output: Schema.String;
|
|
1016
|
+
/** bash only: set when the command exited on its own. */
|
|
1017
|
+
readonly exitCode: Schema.optional<Schema.Number>;
|
|
987
1018
|
}>;
|
|
988
1019
|
readonly failure: Schema.String;
|
|
989
1020
|
readonly failureMode: "error";
|
|
990
|
-
},
|
|
1021
|
+
}, AgentTaskExecutor>;
|
|
991
1022
|
readonly fetchMarkdown: Tool.Tool<"fetchMarkdown", {
|
|
992
1023
|
readonly parameters: Schema.String;
|
|
993
1024
|
readonly success: Schema.String;
|
|
@@ -1006,27 +1037,22 @@ export declare const AgentToolHandlersTest: Layer.Layer<Tool.HandlersFor<{
|
|
|
1006
1037
|
readonly failure: Schema.Never;
|
|
1007
1038
|
readonly failureMode: "error";
|
|
1008
1039
|
}, CurrentDirectory>;
|
|
1009
|
-
readonly
|
|
1010
|
-
readonly parameters: Schema.String;
|
|
1011
|
-
readonly success: Schema.Struct<{
|
|
1012
|
-
readonly id: Schema.String;
|
|
1013
|
-
readonly status: Schema.Literals<readonly ["running", "completed", "failed", "stopped"]>;
|
|
1014
|
-
readonly exitCode: Schema.optional<Schema.Number>;
|
|
1015
|
-
readonly output: Schema.String;
|
|
1016
|
-
}>;
|
|
1017
|
-
readonly failure: Schema.String;
|
|
1018
|
-
readonly failureMode: "error";
|
|
1019
|
-
}, never>;
|
|
1020
|
-
readonly listAgents: Tool.Tool<"listAgents", {
|
|
1040
|
+
readonly listTasks: Tool.Tool<"listTasks", {
|
|
1021
1041
|
readonly parameters: Schema.Void;
|
|
1022
1042
|
readonly success: Schema.$Array<Schema.Struct<{
|
|
1023
1043
|
readonly id: Schema.String;
|
|
1024
|
-
readonly
|
|
1025
|
-
readonly
|
|
1044
|
+
readonly kind: Schema.Literals<readonly ["bash", "agent"]>;
|
|
1045
|
+
readonly status: Schema.Literals<readonly ["running", "completed", "failed", "stopped"]>;
|
|
1046
|
+
/** The bash command, or the sub-agent's prompt. */
|
|
1047
|
+
readonly description: Schema.String;
|
|
1048
|
+
/** Output so far while running; the final output, or the error, once ended. */
|
|
1049
|
+
readonly output: Schema.String;
|
|
1050
|
+
/** bash only: set when the command exited on its own. */
|
|
1051
|
+
readonly exitCode: Schema.optional<Schema.Number>;
|
|
1026
1052
|
}>>;
|
|
1027
1053
|
readonly failure: Schema.Never;
|
|
1028
1054
|
readonly failureMode: "error";
|
|
1029
|
-
},
|
|
1055
|
+
}, AgentTaskExecutor>;
|
|
1030
1056
|
readonly ls: Tool.Tool<"ls", {
|
|
1031
1057
|
readonly parameters: Schema.String;
|
|
1032
1058
|
readonly success: Schema.$Array<Schema.String>;
|
|
@@ -1038,14 +1064,10 @@ export declare const AgentToolHandlersTest: Layer.Layer<Tool.HandlersFor<{
|
|
|
1038
1064
|
readonly id: Schema.String;
|
|
1039
1065
|
readonly message: Schema.String;
|
|
1040
1066
|
}>;
|
|
1041
|
-
readonly success: Schema.
|
|
1042
|
-
readonly id: Schema.String;
|
|
1043
|
-
readonly status: Schema.Literals<readonly ["completed", "running", "failed", "cancelled"]>;
|
|
1044
|
-
readonly output: Schema.optional<Schema.String>;
|
|
1045
|
-
}>;
|
|
1067
|
+
readonly success: Schema.Void;
|
|
1046
1068
|
readonly failure: Schema.String;
|
|
1047
1069
|
readonly failureMode: "error";
|
|
1048
|
-
},
|
|
1070
|
+
}, AgentTaskExecutor>;
|
|
1049
1071
|
readonly readFile: Tool.Tool<"readFile", {
|
|
1050
1072
|
readonly parameters: Schema.Struct<{
|
|
1051
1073
|
readonly path: Schema.String;
|
|
@@ -1095,57 +1117,63 @@ export declare const AgentToolHandlersTest: Layer.Layer<Tool.HandlersFor<{
|
|
|
1095
1117
|
readonly failure: Schema.Never;
|
|
1096
1118
|
readonly failureMode: "error";
|
|
1097
1119
|
}, never>;
|
|
1098
|
-
readonly
|
|
1099
|
-
readonly parameters: Schema.String;
|
|
1100
|
-
readonly success: Schema.Struct<{
|
|
1101
|
-
readonly id: Schema.String;
|
|
1102
|
-
readonly status: Schema.Literals<readonly ["completed", "running", "failed", "cancelled"]>;
|
|
1103
|
-
readonly output: Schema.optional<Schema.String>;
|
|
1104
|
-
}>;
|
|
1105
|
-
readonly failure: Schema.String;
|
|
1106
|
-
readonly failureMode: "error";
|
|
1107
|
-
}, SubagentExecutor>;
|
|
1108
|
-
readonly stopJob: Tool.Tool<"stopJob", {
|
|
1120
|
+
readonly stopTask: Tool.Tool<"stopTask", {
|
|
1109
1121
|
readonly parameters: Schema.String;
|
|
1110
1122
|
readonly success: Schema.Struct<{
|
|
1111
1123
|
readonly id: Schema.String;
|
|
1124
|
+
readonly kind: Schema.Literals<readonly ["bash", "agent"]>;
|
|
1112
1125
|
readonly status: Schema.Literals<readonly ["running", "completed", "failed", "stopped"]>;
|
|
1113
|
-
|
|
1126
|
+
/** The bash command, or the sub-agent's prompt. */
|
|
1127
|
+
readonly description: Schema.String;
|
|
1128
|
+
/** Output so far while running; the final output, or the error, once ended. */
|
|
1114
1129
|
readonly output: Schema.String;
|
|
1130
|
+
/** bash only: set when the command exited on its own. */
|
|
1131
|
+
readonly exitCode: Schema.optional<Schema.Number>;
|
|
1115
1132
|
}>;
|
|
1116
1133
|
readonly failure: Schema.String;
|
|
1117
1134
|
readonly failureMode: "error";
|
|
1118
|
-
},
|
|
1135
|
+
}, AgentTaskExecutor>;
|
|
1119
1136
|
readonly taskComplete: Tool.Tool<"taskComplete", {
|
|
1120
1137
|
readonly parameters: Schema.String;
|
|
1121
1138
|
readonly success: Schema.Void;
|
|
1122
1139
|
readonly failure: Schema.String;
|
|
1123
1140
|
readonly failureMode: "error";
|
|
1124
1141
|
}, TaskCompleter>;
|
|
1125
|
-
readonly
|
|
1126
|
-
readonly parameters: Schema.
|
|
1127
|
-
readonly success: Schema
|
|
1142
|
+
readonly taskOutput: Tool.Tool<"taskOutput", {
|
|
1143
|
+
readonly parameters: Schema.String;
|
|
1144
|
+
readonly success: Schema.Struct<{
|
|
1128
1145
|
readonly id: Schema.String;
|
|
1129
|
-
readonly
|
|
1130
|
-
readonly
|
|
1131
|
-
|
|
1146
|
+
readonly kind: Schema.Literals<readonly ["bash", "agent"]>;
|
|
1147
|
+
readonly status: Schema.Literals<readonly ["running", "completed", "failed", "stopped"]>;
|
|
1148
|
+
/** The bash command, or the sub-agent's prompt. */
|
|
1149
|
+
readonly description: Schema.String;
|
|
1150
|
+
/** Output so far while running; the final output, or the error, once ended. */
|
|
1151
|
+
readonly output: Schema.String;
|
|
1152
|
+
/** bash only: set when the command exited on its own. */
|
|
1153
|
+
readonly exitCode: Schema.optional<Schema.Number>;
|
|
1154
|
+
}>;
|
|
1132
1155
|
readonly failure: Schema.String;
|
|
1133
1156
|
readonly failureMode: "error";
|
|
1134
|
-
},
|
|
1135
|
-
readonly
|
|
1157
|
+
}, AgentTaskExecutor>;
|
|
1158
|
+
readonly waitTasks: Tool.Tool<"waitTasks", {
|
|
1136
1159
|
readonly parameters: Schema.Struct<{
|
|
1137
|
-
readonly
|
|
1160
|
+
readonly ids: Schema.$Array<Schema.String>;
|
|
1138
1161
|
readonly timeoutMs: Schema.optional<Schema.Finite>;
|
|
1139
1162
|
}>;
|
|
1140
|
-
readonly success: Schema.Struct<{
|
|
1163
|
+
readonly success: Schema.$Array<Schema.Struct<{
|
|
1141
1164
|
readonly id: Schema.String;
|
|
1165
|
+
readonly kind: Schema.Literals<readonly ["bash", "agent"]>;
|
|
1142
1166
|
readonly status: Schema.Literals<readonly ["running", "completed", "failed", "stopped"]>;
|
|
1143
|
-
|
|
1167
|
+
/** The bash command, or the sub-agent's prompt. */
|
|
1168
|
+
readonly description: Schema.String;
|
|
1169
|
+
/** Output so far while running; the final output, or the error, once ended. */
|
|
1144
1170
|
readonly output: Schema.String;
|
|
1145
|
-
|
|
1171
|
+
/** bash only: set when the command exited on its own. */
|
|
1172
|
+
readonly exitCode: Schema.optional<Schema.Number>;
|
|
1173
|
+
}>>;
|
|
1146
1174
|
readonly failure: Schema.String;
|
|
1147
1175
|
readonly failureMode: "error";
|
|
1148
|
-
},
|
|
1176
|
+
}, AgentTaskExecutor>;
|
|
1149
1177
|
readonly webSearch: Tool.Tool<"webSearch", {
|
|
1150
1178
|
readonly parameters: Schema.Struct<{
|
|
1151
1179
|
readonly query: Schema.String;
|