@duvoai/cli 0.0.1 → 0.1.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/README.md +61 -0
- package/dist/api/agent-schemas.d.ts +427 -0
- package/dist/api/agent-schemas.js +20 -0
- package/dist/api/run-schemas.d.ts +621 -0
- package/dist/api/run-schemas.js +91 -0
- package/dist/bin/create-program.js +8 -1
- package/dist/commands/agents/create.d.ts +2 -0
- package/dist/commands/agents/create.js +182 -0
- package/dist/commands/agents/get.js +5 -11
- package/dist/commands/agents/index.js +2 -0
- package/dist/commands/agents/list.js +5 -11
- package/dist/commands/api.js +5 -13
- package/dist/commands/runs/get.d.ts +2 -0
- package/dist/commands/runs/get.js +59 -0
- package/dist/commands/runs/index.d.ts +2 -0
- package/dist/commands/runs/index.js +17 -0
- package/dist/commands/runs/messages.d.ts +2 -0
- package/dist/commands/runs/messages.js +80 -0
- package/dist/commands/runs/respond.d.ts +2 -0
- package/dist/commands/runs/respond.js +105 -0
- package/dist/commands/runs/send-message.d.ts +2 -0
- package/dist/commands/runs/send-message.js +41 -0
- package/dist/commands/runs/start.d.ts +2 -0
- package/dist/commands/runs/start.js +54 -0
- package/dist/commands/runs/stop.d.ts +2 -0
- package/dist/commands/runs/stop.js +41 -0
- package/dist/commands/shared/require-auth.d.ts +12 -0
- package/dist/commands/shared/require-auth.js +18 -0
- package/dist/commands/whoami.js +2 -9
- package/dist/output/green.d.ts +5 -0
- package/dist/output/green.js +18 -0
- package/package.json +4 -2
package/README.md
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# @duvoai/cli
|
|
2
|
+
|
|
3
|
+
Command-line interface for the [Duvo](https://duvo.ai) public API.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g @duvoai/cli
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Requires Node.js ≥ 22.22.0.
|
|
12
|
+
|
|
13
|
+
## Quick start
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
# 1. Log in (prompts for your API key and saves it to a profile)
|
|
17
|
+
duvo login --name default
|
|
18
|
+
|
|
19
|
+
# 2. Verify you're logged in
|
|
20
|
+
duvo whoami
|
|
21
|
+
|
|
22
|
+
# 3. Create your first agent (interactive)
|
|
23
|
+
duvo agents create
|
|
24
|
+
|
|
25
|
+
# ...or create one non-interactively with flags
|
|
26
|
+
duvo agents create --name "My agent" --input "What this agent should do"
|
|
27
|
+
|
|
28
|
+
# 4. Kick off a run
|
|
29
|
+
duvo runs start --agent <agent-id>
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Grab an API key from your team settings: <https://app.duvo.ai/settings/api-keys>.
|
|
33
|
+
|
|
34
|
+
## Authentication
|
|
35
|
+
|
|
36
|
+
You can keep multiple profiles and switch between them:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
duvo login --name acme # prompts for the API key
|
|
40
|
+
duvo login --name team-2 # prompts for the API key
|
|
41
|
+
|
|
42
|
+
duvo profiles list # show saved profiles
|
|
43
|
+
duvo profiles use acme # set the default profile
|
|
44
|
+
duvo --profile team-2 whoami # one-off override for a single command
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Commands
|
|
48
|
+
|
|
49
|
+
| Command | Description |
|
|
50
|
+
| ------------------------------ | -------------------------------------- |
|
|
51
|
+
| `duvo login` | Store an API key under a named profile |
|
|
52
|
+
| `duvo logout` | Remove a profile |
|
|
53
|
+
| `duvo whoami` | Show the active profile and masked key |
|
|
54
|
+
| `duvo profiles <subcmd>` | `list`, `use`, `rename`, `remove` |
|
|
55
|
+
| `duvo agents list` | List agents on your team |
|
|
56
|
+
| `duvo agents get <id>` | Show details for one agent |
|
|
57
|
+
| `duvo agents create` | Create a new agent |
|
|
58
|
+
| `duvo runs start --agent <id>` | Start a new run for the given agent |
|
|
59
|
+
| `duvo api <method> <path>` | Make a raw authenticated API request |
|
|
60
|
+
|
|
61
|
+
Run `duvo <command> --help` for full flags on any command.
|
|
@@ -16,6 +16,29 @@ declare const publicAgentSchema: z.ZodObject<{
|
|
|
16
16
|
updated_at?: string | null | undefined;
|
|
17
17
|
}>;
|
|
18
18
|
export type PublicAgent = z.infer<typeof publicAgentSchema>;
|
|
19
|
+
declare const publicBuildSchema: z.ZodObject<{
|
|
20
|
+
id: z.ZodString;
|
|
21
|
+
agent_id: z.ZodString;
|
|
22
|
+
name: z.ZodString;
|
|
23
|
+
revision_number: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
24
|
+
created_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
25
|
+
updated_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
26
|
+
}, "strip", z.ZodTypeAny, {
|
|
27
|
+
id: string;
|
|
28
|
+
name: string;
|
|
29
|
+
agent_id: string;
|
|
30
|
+
created_at?: string | null | undefined;
|
|
31
|
+
updated_at?: string | null | undefined;
|
|
32
|
+
revision_number?: number | null | undefined;
|
|
33
|
+
}, {
|
|
34
|
+
id: string;
|
|
35
|
+
name: string;
|
|
36
|
+
agent_id: string;
|
|
37
|
+
created_at?: string | null | undefined;
|
|
38
|
+
updated_at?: string | null | undefined;
|
|
39
|
+
revision_number?: number | null | undefined;
|
|
40
|
+
}>;
|
|
41
|
+
export type PublicBuild = z.infer<typeof publicBuildSchema>;
|
|
19
42
|
export declare const listAgentsResponseSchema: z.ZodObject<{
|
|
20
43
|
agents: z.ZodArray<z.ZodObject<{
|
|
21
44
|
id: z.ZodString;
|
|
@@ -91,4 +114,408 @@ export declare const getAgentResponseSchema: z.ZodObject<{
|
|
|
91
114
|
};
|
|
92
115
|
}>;
|
|
93
116
|
export type GetAgentResponse = z.infer<typeof getAgentResponseSchema>;
|
|
117
|
+
export declare const createAgentResponseSchema: z.ZodObject<{
|
|
118
|
+
agent: z.ZodObject<{
|
|
119
|
+
id: z.ZodString;
|
|
120
|
+
name: z.ZodString;
|
|
121
|
+
created_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
122
|
+
updated_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
123
|
+
}, "strip", z.ZodTypeAny, {
|
|
124
|
+
id: string;
|
|
125
|
+
name: string;
|
|
126
|
+
created_at?: string | null | undefined;
|
|
127
|
+
updated_at?: string | null | undefined;
|
|
128
|
+
}, {
|
|
129
|
+
id: string;
|
|
130
|
+
name: string;
|
|
131
|
+
created_at?: string | null | undefined;
|
|
132
|
+
updated_at?: string | null | undefined;
|
|
133
|
+
}>;
|
|
134
|
+
build: z.ZodOptional<z.ZodObject<{
|
|
135
|
+
id: z.ZodString;
|
|
136
|
+
agent_id: z.ZodString;
|
|
137
|
+
name: z.ZodString;
|
|
138
|
+
revision_number: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
139
|
+
created_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
140
|
+
updated_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
141
|
+
}, "strip", z.ZodTypeAny, {
|
|
142
|
+
id: string;
|
|
143
|
+
name: string;
|
|
144
|
+
agent_id: string;
|
|
145
|
+
created_at?: string | null | undefined;
|
|
146
|
+
updated_at?: string | null | undefined;
|
|
147
|
+
revision_number?: number | null | undefined;
|
|
148
|
+
}, {
|
|
149
|
+
id: string;
|
|
150
|
+
name: string;
|
|
151
|
+
agent_id: string;
|
|
152
|
+
created_at?: string | null | undefined;
|
|
153
|
+
updated_at?: string | null | undefined;
|
|
154
|
+
revision_number?: number | null | undefined;
|
|
155
|
+
}>>;
|
|
156
|
+
}, "strip", z.ZodTypeAny, {
|
|
157
|
+
agent: {
|
|
158
|
+
id: string;
|
|
159
|
+
name: string;
|
|
160
|
+
created_at?: string | null | undefined;
|
|
161
|
+
updated_at?: string | null | undefined;
|
|
162
|
+
};
|
|
163
|
+
build?: {
|
|
164
|
+
id: string;
|
|
165
|
+
name: string;
|
|
166
|
+
agent_id: string;
|
|
167
|
+
created_at?: string | null | undefined;
|
|
168
|
+
updated_at?: string | null | undefined;
|
|
169
|
+
revision_number?: number | null | undefined;
|
|
170
|
+
} | undefined;
|
|
171
|
+
}, {
|
|
172
|
+
agent: {
|
|
173
|
+
id: string;
|
|
174
|
+
name: string;
|
|
175
|
+
created_at?: string | null | undefined;
|
|
176
|
+
updated_at?: string | null | undefined;
|
|
177
|
+
};
|
|
178
|
+
build?: {
|
|
179
|
+
id: string;
|
|
180
|
+
name: string;
|
|
181
|
+
agent_id: string;
|
|
182
|
+
created_at?: string | null | undefined;
|
|
183
|
+
updated_at?: string | null | undefined;
|
|
184
|
+
revision_number?: number | null | undefined;
|
|
185
|
+
} | undefined;
|
|
186
|
+
}>;
|
|
187
|
+
export type CreateAgentResponse = z.infer<typeof createAgentResponseSchema>;
|
|
188
|
+
export declare const buildConfigSchema: z.ZodObject<{
|
|
189
|
+
version: z.ZodLiteral<"v2">;
|
|
190
|
+
data: z.ZodObject<{
|
|
191
|
+
models: z.ZodObject<{
|
|
192
|
+
agent: z.ZodObject<{
|
|
193
|
+
model: z.ZodEnum<["claude-sonnet-4-6", "claude-sonnet-4-6[1m]", "claude-opus-4-6", "claude-opus-4-6[1m]", "claude-opus-4-7", "claude-opus-4-7[1m]", "d1-max", "duvo-1-max", "duvo-1-max-sonnet-1m", "duvo-1-max-sonnet-4.5", "duvo-1-max-sonnet-4.5-1m", "duvo-1-max-opus", "duvo-1-max-opus-4.5", "gpt-4.1", "gpt-4o", "gpt-4o-mini", "gpt-5", "gpt-5.1", "claude-sonnet-4-20250514", "claude-sonnet-4-20250514[1m]", "claude-sonnet-4-5-20250929", "claude-sonnet-4-5-20250929[1m]", "claude-opus-4-1-20250805", "claude-opus-4-5-20251101"]>;
|
|
194
|
+
}, "strip", z.ZodTypeAny, {
|
|
195
|
+
model: "claude-sonnet-4-6" | "claude-sonnet-4-6[1m]" | "claude-opus-4-6" | "claude-opus-4-6[1m]" | "claude-opus-4-7" | "claude-opus-4-7[1m]" | "d1-max" | "duvo-1-max" | "duvo-1-max-sonnet-1m" | "duvo-1-max-sonnet-4.5" | "duvo-1-max-sonnet-4.5-1m" | "duvo-1-max-opus" | "duvo-1-max-opus-4.5" | "gpt-4.1" | "gpt-4o" | "gpt-4o-mini" | "gpt-5" | "gpt-5.1" | "claude-sonnet-4-20250514" | "claude-sonnet-4-20250514[1m]" | "claude-sonnet-4-5-20250929" | "claude-sonnet-4-5-20250929[1m]" | "claude-opus-4-1-20250805" | "claude-opus-4-5-20251101";
|
|
196
|
+
}, {
|
|
197
|
+
model: "claude-sonnet-4-6" | "claude-sonnet-4-6[1m]" | "claude-opus-4-6" | "claude-opus-4-6[1m]" | "claude-opus-4-7" | "claude-opus-4-7[1m]" | "d1-max" | "duvo-1-max" | "duvo-1-max-sonnet-1m" | "duvo-1-max-sonnet-4.5" | "duvo-1-max-sonnet-4.5-1m" | "duvo-1-max-opus" | "duvo-1-max-opus-4.5" | "gpt-4.1" | "gpt-4o" | "gpt-4o-mini" | "gpt-5" | "gpt-5.1" | "claude-sonnet-4-20250514" | "claude-sonnet-4-20250514[1m]" | "claude-sonnet-4-5-20250929" | "claude-sonnet-4-5-20250929[1m]" | "claude-opus-4-1-20250805" | "claude-opus-4-5-20251101";
|
|
198
|
+
}>;
|
|
199
|
+
browsing: z.ZodObject<{
|
|
200
|
+
provider: z.ZodEnum<["google", "anthropic"]>;
|
|
201
|
+
model: z.ZodEnum<["gemini-2.5-pro", "gemini-2.5-flash", "gemini-3-pro-preview", "claude-haiku-4-5", "claude-sonnet-4-5", "claude-opus-4-1"]>;
|
|
202
|
+
}, "strip", z.ZodTypeAny, {
|
|
203
|
+
model: "gemini-2.5-pro" | "gemini-2.5-flash" | "gemini-3-pro-preview" | "claude-haiku-4-5" | "claude-sonnet-4-5" | "claude-opus-4-1";
|
|
204
|
+
provider: "google" | "anthropic";
|
|
205
|
+
}, {
|
|
206
|
+
model: "gemini-2.5-pro" | "gemini-2.5-flash" | "gemini-3-pro-preview" | "claude-haiku-4-5" | "claude-sonnet-4-5" | "claude-opus-4-1";
|
|
207
|
+
provider: "google" | "anthropic";
|
|
208
|
+
}>;
|
|
209
|
+
}, "strip", z.ZodTypeAny, {
|
|
210
|
+
agent: {
|
|
211
|
+
model: "claude-sonnet-4-6" | "claude-sonnet-4-6[1m]" | "claude-opus-4-6" | "claude-opus-4-6[1m]" | "claude-opus-4-7" | "claude-opus-4-7[1m]" | "d1-max" | "duvo-1-max" | "duvo-1-max-sonnet-1m" | "duvo-1-max-sonnet-4.5" | "duvo-1-max-sonnet-4.5-1m" | "duvo-1-max-opus" | "duvo-1-max-opus-4.5" | "gpt-4.1" | "gpt-4o" | "gpt-4o-mini" | "gpt-5" | "gpt-5.1" | "claude-sonnet-4-20250514" | "claude-sonnet-4-20250514[1m]" | "claude-sonnet-4-5-20250929" | "claude-sonnet-4-5-20250929[1m]" | "claude-opus-4-1-20250805" | "claude-opus-4-5-20251101";
|
|
212
|
+
};
|
|
213
|
+
browsing: {
|
|
214
|
+
model: "gemini-2.5-pro" | "gemini-2.5-flash" | "gemini-3-pro-preview" | "claude-haiku-4-5" | "claude-sonnet-4-5" | "claude-opus-4-1";
|
|
215
|
+
provider: "google" | "anthropic";
|
|
216
|
+
};
|
|
217
|
+
}, {
|
|
218
|
+
agent: {
|
|
219
|
+
model: "claude-sonnet-4-6" | "claude-sonnet-4-6[1m]" | "claude-opus-4-6" | "claude-opus-4-6[1m]" | "claude-opus-4-7" | "claude-opus-4-7[1m]" | "d1-max" | "duvo-1-max" | "duvo-1-max-sonnet-1m" | "duvo-1-max-sonnet-4.5" | "duvo-1-max-sonnet-4.5-1m" | "duvo-1-max-opus" | "duvo-1-max-opus-4.5" | "gpt-4.1" | "gpt-4o" | "gpt-4o-mini" | "gpt-5" | "gpt-5.1" | "claude-sonnet-4-20250514" | "claude-sonnet-4-20250514[1m]" | "claude-sonnet-4-5-20250929" | "claude-sonnet-4-5-20250929[1m]" | "claude-opus-4-1-20250805" | "claude-opus-4-5-20251101";
|
|
220
|
+
};
|
|
221
|
+
browsing: {
|
|
222
|
+
model: "gemini-2.5-pro" | "gemini-2.5-flash" | "gemini-3-pro-preview" | "claude-haiku-4-5" | "claude-sonnet-4-5" | "claude-opus-4-1";
|
|
223
|
+
provider: "google" | "anthropic";
|
|
224
|
+
};
|
|
225
|
+
}>;
|
|
226
|
+
input: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodObject<{
|
|
227
|
+
role: z.ZodEnum<["system", "user", "assistant"]>;
|
|
228
|
+
content: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
229
|
+
type: z.ZodLiteral<"input_text">;
|
|
230
|
+
text: z.ZodString;
|
|
231
|
+
}, "strip", z.ZodTypeAny, {
|
|
232
|
+
type: "input_text";
|
|
233
|
+
text: string;
|
|
234
|
+
}, {
|
|
235
|
+
type: "input_text";
|
|
236
|
+
text: string;
|
|
237
|
+
}>, z.ZodObject<{
|
|
238
|
+
type: z.ZodLiteral<"input_image">;
|
|
239
|
+
detail: z.ZodOptional<z.ZodNullable<z.ZodEnum<["low", "high", "auto"]>>>;
|
|
240
|
+
file_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
241
|
+
url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
242
|
+
}, "strip", z.ZodTypeAny, {
|
|
243
|
+
type: "input_image";
|
|
244
|
+
detail?: "low" | "high" | "auto" | null | undefined;
|
|
245
|
+
file_id?: string | null | undefined;
|
|
246
|
+
url?: string | null | undefined;
|
|
247
|
+
}, {
|
|
248
|
+
type: "input_image";
|
|
249
|
+
detail?: "low" | "high" | "auto" | null | undefined;
|
|
250
|
+
file_id?: string | null | undefined;
|
|
251
|
+
url?: string | null | undefined;
|
|
252
|
+
}>, z.ZodObject<{
|
|
253
|
+
type: z.ZodLiteral<"input_file">;
|
|
254
|
+
file_id: z.ZodString;
|
|
255
|
+
}, "strip", z.ZodTypeAny, {
|
|
256
|
+
type: "input_file";
|
|
257
|
+
file_id: string;
|
|
258
|
+
}, {
|
|
259
|
+
type: "input_file";
|
|
260
|
+
file_id: string;
|
|
261
|
+
}>]>, "many">]>;
|
|
262
|
+
type: z.ZodOptional<z.ZodNullable<z.ZodLiteral<"message">>>;
|
|
263
|
+
}, "strip", z.ZodTypeAny, {
|
|
264
|
+
role: "system" | "user" | "assistant";
|
|
265
|
+
content: string | ({
|
|
266
|
+
type: "input_text";
|
|
267
|
+
text: string;
|
|
268
|
+
} | {
|
|
269
|
+
type: "input_image";
|
|
270
|
+
detail?: "low" | "high" | "auto" | null | undefined;
|
|
271
|
+
file_id?: string | null | undefined;
|
|
272
|
+
url?: string | null | undefined;
|
|
273
|
+
} | {
|
|
274
|
+
type: "input_file";
|
|
275
|
+
file_id: string;
|
|
276
|
+
})[];
|
|
277
|
+
type?: "message" | null | undefined;
|
|
278
|
+
}, {
|
|
279
|
+
role: "system" | "user" | "assistant";
|
|
280
|
+
content: string | ({
|
|
281
|
+
type: "input_text";
|
|
282
|
+
text: string;
|
|
283
|
+
} | {
|
|
284
|
+
type: "input_image";
|
|
285
|
+
detail?: "low" | "high" | "auto" | null | undefined;
|
|
286
|
+
file_id?: string | null | undefined;
|
|
287
|
+
url?: string | null | undefined;
|
|
288
|
+
} | {
|
|
289
|
+
type: "input_file";
|
|
290
|
+
file_id: string;
|
|
291
|
+
})[];
|
|
292
|
+
type?: "message" | null | undefined;
|
|
293
|
+
}>, "many">]>;
|
|
294
|
+
files: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>>;
|
|
295
|
+
skills: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>>;
|
|
296
|
+
plugins: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>>;
|
|
297
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
298
|
+
browserProvider: z.ZodOptional<z.ZodEnum<["browserbase", "browser-use"]>>;
|
|
299
|
+
evaluationSchemaId: z.ZodOptional<z.ZodString>;
|
|
300
|
+
benchmarkExpectedOutcomes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
301
|
+
description: z.ZodString;
|
|
302
|
+
criteria: z.ZodString;
|
|
303
|
+
}, "strip", z.ZodTypeAny, {
|
|
304
|
+
description: string;
|
|
305
|
+
criteria: string;
|
|
306
|
+
}, {
|
|
307
|
+
description: string;
|
|
308
|
+
criteria: string;
|
|
309
|
+
}>, "many">>;
|
|
310
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
311
|
+
browserProvider: z.ZodOptional<z.ZodEnum<["browserbase", "browser-use"]>>;
|
|
312
|
+
evaluationSchemaId: z.ZodOptional<z.ZodString>;
|
|
313
|
+
benchmarkExpectedOutcomes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
314
|
+
description: z.ZodString;
|
|
315
|
+
criteria: z.ZodString;
|
|
316
|
+
}, "strip", z.ZodTypeAny, {
|
|
317
|
+
description: string;
|
|
318
|
+
criteria: string;
|
|
319
|
+
}, {
|
|
320
|
+
description: string;
|
|
321
|
+
criteria: string;
|
|
322
|
+
}>, "many">>;
|
|
323
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
324
|
+
browserProvider: z.ZodOptional<z.ZodEnum<["browserbase", "browser-use"]>>;
|
|
325
|
+
evaluationSchemaId: z.ZodOptional<z.ZodString>;
|
|
326
|
+
benchmarkExpectedOutcomes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
327
|
+
description: z.ZodString;
|
|
328
|
+
criteria: z.ZodString;
|
|
329
|
+
}, "strip", z.ZodTypeAny, {
|
|
330
|
+
description: string;
|
|
331
|
+
criteria: string;
|
|
332
|
+
}, {
|
|
333
|
+
description: string;
|
|
334
|
+
criteria: string;
|
|
335
|
+
}>, "many">>;
|
|
336
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
337
|
+
}, "strip", z.ZodTypeAny, {
|
|
338
|
+
models: {
|
|
339
|
+
agent: {
|
|
340
|
+
model: "claude-sonnet-4-6" | "claude-sonnet-4-6[1m]" | "claude-opus-4-6" | "claude-opus-4-6[1m]" | "claude-opus-4-7" | "claude-opus-4-7[1m]" | "d1-max" | "duvo-1-max" | "duvo-1-max-sonnet-1m" | "duvo-1-max-sonnet-4.5" | "duvo-1-max-sonnet-4.5-1m" | "duvo-1-max-opus" | "duvo-1-max-opus-4.5" | "gpt-4.1" | "gpt-4o" | "gpt-4o-mini" | "gpt-5" | "gpt-5.1" | "claude-sonnet-4-20250514" | "claude-sonnet-4-20250514[1m]" | "claude-sonnet-4-5-20250929" | "claude-sonnet-4-5-20250929[1m]" | "claude-opus-4-1-20250805" | "claude-opus-4-5-20251101";
|
|
341
|
+
};
|
|
342
|
+
browsing: {
|
|
343
|
+
model: "gemini-2.5-pro" | "gemini-2.5-flash" | "gemini-3-pro-preview" | "claude-haiku-4-5" | "claude-sonnet-4-5" | "claude-opus-4-1";
|
|
344
|
+
provider: "google" | "anthropic";
|
|
345
|
+
};
|
|
346
|
+
};
|
|
347
|
+
input: string | {
|
|
348
|
+
role: "system" | "user" | "assistant";
|
|
349
|
+
content: string | ({
|
|
350
|
+
type: "input_text";
|
|
351
|
+
text: string;
|
|
352
|
+
} | {
|
|
353
|
+
type: "input_image";
|
|
354
|
+
detail?: "low" | "high" | "auto" | null | undefined;
|
|
355
|
+
file_id?: string | null | undefined;
|
|
356
|
+
url?: string | null | undefined;
|
|
357
|
+
} | {
|
|
358
|
+
type: "input_file";
|
|
359
|
+
file_id: string;
|
|
360
|
+
})[];
|
|
361
|
+
type?: "message" | null | undefined;
|
|
362
|
+
}[];
|
|
363
|
+
files: string[] | null;
|
|
364
|
+
skills: string[] | null;
|
|
365
|
+
plugins: string[] | null;
|
|
366
|
+
options?: z.objectOutputType<{
|
|
367
|
+
browserProvider: z.ZodOptional<z.ZodEnum<["browserbase", "browser-use"]>>;
|
|
368
|
+
evaluationSchemaId: z.ZodOptional<z.ZodString>;
|
|
369
|
+
benchmarkExpectedOutcomes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
370
|
+
description: z.ZodString;
|
|
371
|
+
criteria: z.ZodString;
|
|
372
|
+
}, "strip", z.ZodTypeAny, {
|
|
373
|
+
description: string;
|
|
374
|
+
criteria: string;
|
|
375
|
+
}, {
|
|
376
|
+
description: string;
|
|
377
|
+
criteria: string;
|
|
378
|
+
}>, "many">>;
|
|
379
|
+
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
380
|
+
}, {
|
|
381
|
+
models: {
|
|
382
|
+
agent: {
|
|
383
|
+
model: "claude-sonnet-4-6" | "claude-sonnet-4-6[1m]" | "claude-opus-4-6" | "claude-opus-4-6[1m]" | "claude-opus-4-7" | "claude-opus-4-7[1m]" | "d1-max" | "duvo-1-max" | "duvo-1-max-sonnet-1m" | "duvo-1-max-sonnet-4.5" | "duvo-1-max-sonnet-4.5-1m" | "duvo-1-max-opus" | "duvo-1-max-opus-4.5" | "gpt-4.1" | "gpt-4o" | "gpt-4o-mini" | "gpt-5" | "gpt-5.1" | "claude-sonnet-4-20250514" | "claude-sonnet-4-20250514[1m]" | "claude-sonnet-4-5-20250929" | "claude-sonnet-4-5-20250929[1m]" | "claude-opus-4-1-20250805" | "claude-opus-4-5-20251101";
|
|
384
|
+
};
|
|
385
|
+
browsing: {
|
|
386
|
+
model: "gemini-2.5-pro" | "gemini-2.5-flash" | "gemini-3-pro-preview" | "claude-haiku-4-5" | "claude-sonnet-4-5" | "claude-opus-4-1";
|
|
387
|
+
provider: "google" | "anthropic";
|
|
388
|
+
};
|
|
389
|
+
};
|
|
390
|
+
input: string | {
|
|
391
|
+
role: "system" | "user" | "assistant";
|
|
392
|
+
content: string | ({
|
|
393
|
+
type: "input_text";
|
|
394
|
+
text: string;
|
|
395
|
+
} | {
|
|
396
|
+
type: "input_image";
|
|
397
|
+
detail?: "low" | "high" | "auto" | null | undefined;
|
|
398
|
+
file_id?: string | null | undefined;
|
|
399
|
+
url?: string | null | undefined;
|
|
400
|
+
} | {
|
|
401
|
+
type: "input_file";
|
|
402
|
+
file_id: string;
|
|
403
|
+
})[];
|
|
404
|
+
type?: "message" | null | undefined;
|
|
405
|
+
}[];
|
|
406
|
+
options?: z.objectInputType<{
|
|
407
|
+
browserProvider: z.ZodOptional<z.ZodEnum<["browserbase", "browser-use"]>>;
|
|
408
|
+
evaluationSchemaId: z.ZodOptional<z.ZodString>;
|
|
409
|
+
benchmarkExpectedOutcomes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
410
|
+
description: z.ZodString;
|
|
411
|
+
criteria: z.ZodString;
|
|
412
|
+
}, "strip", z.ZodTypeAny, {
|
|
413
|
+
description: string;
|
|
414
|
+
criteria: string;
|
|
415
|
+
}, {
|
|
416
|
+
description: string;
|
|
417
|
+
criteria: string;
|
|
418
|
+
}>, "many">>;
|
|
419
|
+
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
420
|
+
files?: string[] | null | undefined;
|
|
421
|
+
skills?: string[] | null | undefined;
|
|
422
|
+
plugins?: string[] | null | undefined;
|
|
423
|
+
}>;
|
|
424
|
+
}, "strip", z.ZodTypeAny, {
|
|
425
|
+
data: {
|
|
426
|
+
models: {
|
|
427
|
+
agent: {
|
|
428
|
+
model: "claude-sonnet-4-6" | "claude-sonnet-4-6[1m]" | "claude-opus-4-6" | "claude-opus-4-6[1m]" | "claude-opus-4-7" | "claude-opus-4-7[1m]" | "d1-max" | "duvo-1-max" | "duvo-1-max-sonnet-1m" | "duvo-1-max-sonnet-4.5" | "duvo-1-max-sonnet-4.5-1m" | "duvo-1-max-opus" | "duvo-1-max-opus-4.5" | "gpt-4.1" | "gpt-4o" | "gpt-4o-mini" | "gpt-5" | "gpt-5.1" | "claude-sonnet-4-20250514" | "claude-sonnet-4-20250514[1m]" | "claude-sonnet-4-5-20250929" | "claude-sonnet-4-5-20250929[1m]" | "claude-opus-4-1-20250805" | "claude-opus-4-5-20251101";
|
|
429
|
+
};
|
|
430
|
+
browsing: {
|
|
431
|
+
model: "gemini-2.5-pro" | "gemini-2.5-flash" | "gemini-3-pro-preview" | "claude-haiku-4-5" | "claude-sonnet-4-5" | "claude-opus-4-1";
|
|
432
|
+
provider: "google" | "anthropic";
|
|
433
|
+
};
|
|
434
|
+
};
|
|
435
|
+
input: string | {
|
|
436
|
+
role: "system" | "user" | "assistant";
|
|
437
|
+
content: string | ({
|
|
438
|
+
type: "input_text";
|
|
439
|
+
text: string;
|
|
440
|
+
} | {
|
|
441
|
+
type: "input_image";
|
|
442
|
+
detail?: "low" | "high" | "auto" | null | undefined;
|
|
443
|
+
file_id?: string | null | undefined;
|
|
444
|
+
url?: string | null | undefined;
|
|
445
|
+
} | {
|
|
446
|
+
type: "input_file";
|
|
447
|
+
file_id: string;
|
|
448
|
+
})[];
|
|
449
|
+
type?: "message" | null | undefined;
|
|
450
|
+
}[];
|
|
451
|
+
files: string[] | null;
|
|
452
|
+
skills: string[] | null;
|
|
453
|
+
plugins: string[] | null;
|
|
454
|
+
options?: z.objectOutputType<{
|
|
455
|
+
browserProvider: z.ZodOptional<z.ZodEnum<["browserbase", "browser-use"]>>;
|
|
456
|
+
evaluationSchemaId: z.ZodOptional<z.ZodString>;
|
|
457
|
+
benchmarkExpectedOutcomes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
458
|
+
description: z.ZodString;
|
|
459
|
+
criteria: z.ZodString;
|
|
460
|
+
}, "strip", z.ZodTypeAny, {
|
|
461
|
+
description: string;
|
|
462
|
+
criteria: string;
|
|
463
|
+
}, {
|
|
464
|
+
description: string;
|
|
465
|
+
criteria: string;
|
|
466
|
+
}>, "many">>;
|
|
467
|
+
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
468
|
+
};
|
|
469
|
+
version: "v2";
|
|
470
|
+
}, {
|
|
471
|
+
data: {
|
|
472
|
+
models: {
|
|
473
|
+
agent: {
|
|
474
|
+
model: "claude-sonnet-4-6" | "claude-sonnet-4-6[1m]" | "claude-opus-4-6" | "claude-opus-4-6[1m]" | "claude-opus-4-7" | "claude-opus-4-7[1m]" | "d1-max" | "duvo-1-max" | "duvo-1-max-sonnet-1m" | "duvo-1-max-sonnet-4.5" | "duvo-1-max-sonnet-4.5-1m" | "duvo-1-max-opus" | "duvo-1-max-opus-4.5" | "gpt-4.1" | "gpt-4o" | "gpt-4o-mini" | "gpt-5" | "gpt-5.1" | "claude-sonnet-4-20250514" | "claude-sonnet-4-20250514[1m]" | "claude-sonnet-4-5-20250929" | "claude-sonnet-4-5-20250929[1m]" | "claude-opus-4-1-20250805" | "claude-opus-4-5-20251101";
|
|
475
|
+
};
|
|
476
|
+
browsing: {
|
|
477
|
+
model: "gemini-2.5-pro" | "gemini-2.5-flash" | "gemini-3-pro-preview" | "claude-haiku-4-5" | "claude-sonnet-4-5" | "claude-opus-4-1";
|
|
478
|
+
provider: "google" | "anthropic";
|
|
479
|
+
};
|
|
480
|
+
};
|
|
481
|
+
input: string | {
|
|
482
|
+
role: "system" | "user" | "assistant";
|
|
483
|
+
content: string | ({
|
|
484
|
+
type: "input_text";
|
|
485
|
+
text: string;
|
|
486
|
+
} | {
|
|
487
|
+
type: "input_image";
|
|
488
|
+
detail?: "low" | "high" | "auto" | null | undefined;
|
|
489
|
+
file_id?: string | null | undefined;
|
|
490
|
+
url?: string | null | undefined;
|
|
491
|
+
} | {
|
|
492
|
+
type: "input_file";
|
|
493
|
+
file_id: string;
|
|
494
|
+
})[];
|
|
495
|
+
type?: "message" | null | undefined;
|
|
496
|
+
}[];
|
|
497
|
+
options?: z.objectInputType<{
|
|
498
|
+
browserProvider: z.ZodOptional<z.ZodEnum<["browserbase", "browser-use"]>>;
|
|
499
|
+
evaluationSchemaId: z.ZodOptional<z.ZodString>;
|
|
500
|
+
benchmarkExpectedOutcomes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
501
|
+
description: z.ZodString;
|
|
502
|
+
criteria: z.ZodString;
|
|
503
|
+
}, "strip", z.ZodTypeAny, {
|
|
504
|
+
description: string;
|
|
505
|
+
criteria: string;
|
|
506
|
+
}, {
|
|
507
|
+
description: string;
|
|
508
|
+
criteria: string;
|
|
509
|
+
}>, "many">>;
|
|
510
|
+
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
511
|
+
files?: string[] | null | undefined;
|
|
512
|
+
skills?: string[] | null | undefined;
|
|
513
|
+
plugins?: string[] | null | undefined;
|
|
514
|
+
};
|
|
515
|
+
version: "v2";
|
|
516
|
+
}>;
|
|
517
|
+
export type BuildConfig = z.input<typeof buildConfigSchema>;
|
|
518
|
+
export declare const DEFAULT_NEW_AGENT_NAME = "New Assignment";
|
|
519
|
+
export declare const DEFAULT_BUILD_NAME = "Initial build";
|
|
520
|
+
export declare const DEFAULT_BUILD_CONFIG: BuildConfig;
|
|
94
521
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AGENT_CONFIG_VERSION, DEFAULT_AGENT_CONFIG, DEFAULT_AGENT_NAME, StoredAgentConfigSchemaV2, } from "@taskcrew/shared";
|
|
1
2
|
import { z } from "zod";
|
|
2
3
|
const publicAgentSchema = z.object({
|
|
3
4
|
id: z.string(),
|
|
@@ -5,6 +6,14 @@ const publicAgentSchema = z.object({
|
|
|
5
6
|
created_at: z.string().nullish(),
|
|
6
7
|
updated_at: z.string().nullish(),
|
|
7
8
|
});
|
|
9
|
+
const publicBuildSchema = z.object({
|
|
10
|
+
id: z.string(),
|
|
11
|
+
agent_id: z.string(),
|
|
12
|
+
name: z.string(),
|
|
13
|
+
revision_number: z.number().nullish(),
|
|
14
|
+
created_at: z.string().nullish(),
|
|
15
|
+
updated_at: z.string().nullish(),
|
|
16
|
+
});
|
|
8
17
|
export const listAgentsResponseSchema = z.object({
|
|
9
18
|
agents: z.array(publicAgentSchema),
|
|
10
19
|
total: z.number().nullish(),
|
|
@@ -14,3 +23,14 @@ export const listAgentsResponseSchema = z.object({
|
|
|
14
23
|
export const getAgentResponseSchema = z.object({
|
|
15
24
|
agent: publicAgentSchema,
|
|
16
25
|
});
|
|
26
|
+
export const createAgentResponseSchema = z.object({
|
|
27
|
+
agent: publicAgentSchema,
|
|
28
|
+
build: publicBuildSchema.optional(),
|
|
29
|
+
});
|
|
30
|
+
export const buildConfigSchema = StoredAgentConfigSchemaV2;
|
|
31
|
+
export const DEFAULT_NEW_AGENT_NAME = DEFAULT_AGENT_NAME;
|
|
32
|
+
export const DEFAULT_BUILD_NAME = "Initial build";
|
|
33
|
+
export const DEFAULT_BUILD_CONFIG = {
|
|
34
|
+
version: AGENT_CONFIG_VERSION,
|
|
35
|
+
data: DEFAULT_AGENT_CONFIG,
|
|
36
|
+
};
|