@agentuity/core 2.0.11 → 2.0.13
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/services/api.d.ts +1 -1
- package/dist/services/api.d.ts.map +1 -1
- package/dist/services/api.js +4 -6
- package/dist/services/api.js.map +1 -1
- package/dist/services/coder/agents.d.ts +6 -4
- package/dist/services/coder/agents.d.ts.map +1 -1
- package/dist/services/coder/api-reference.d.ts.map +1 -1
- package/dist/services/coder/api-reference.js +78 -10
- package/dist/services/coder/api-reference.js.map +1 -1
- package/dist/services/coder/client.d.ts +17 -1
- package/dist/services/coder/client.d.ts.map +1 -1
- package/dist/services/coder/client.js +30 -2
- package/dist/services/coder/client.js.map +1 -1
- package/dist/services/coder/index.d.ts +2 -2
- package/dist/services/coder/index.d.ts.map +1 -1
- package/dist/services/coder/index.js +1 -1
- package/dist/services/coder/index.js.map +1 -1
- package/dist/services/coder/protocol.d.ts +385 -15
- package/dist/services/coder/protocol.d.ts.map +1 -1
- package/dist/services/coder/protocol.js +148 -2
- package/dist/services/coder/protocol.js.map +1 -1
- package/dist/services/coder/sessions.d.ts +24 -2
- package/dist/services/coder/sessions.d.ts.map +1 -1
- package/dist/services/coder/sessions.js +10 -1
- package/dist/services/coder/sessions.js.map +1 -1
- package/dist/services/coder/sse.d.ts +2 -2
- package/dist/services/coder/sse.d.ts.map +1 -1
- package/dist/services/coder/sse.js +290 -178
- package/dist/services/coder/sse.js.map +1 -1
- package/dist/services/coder/types.d.ts +680 -42
- package/dist/services/coder/types.d.ts.map +1 -1
- package/dist/services/coder/types.js +284 -40
- package/dist/services/coder/types.js.map +1 -1
- package/dist/services/coder/websocket.d.ts +13 -1
- package/dist/services/coder/websocket.d.ts.map +1 -1
- package/dist/services/coder/websocket.js +91 -19
- package/dist/services/coder/websocket.js.map +1 -1
- package/dist/services/coder/workspaces.d.ts +11 -1
- package/dist/services/coder/workspaces.d.ts.map +1 -1
- package/dist/services/coder/workspaces.js +34 -1
- package/dist/services/coder/workspaces.js.map +1 -1
- package/dist/services/sandbox/api-reference.js +8 -8
- package/dist/services/sandbox/api-reference.js.map +1 -1
- package/dist/services/sandbox/client.d.ts +3 -2
- package/dist/services/sandbox/client.d.ts.map +1 -1
- package/dist/services/sandbox/client.js.map +1 -1
- package/dist/services/sandbox/create.d.ts +5 -0
- package/dist/services/sandbox/create.d.ts.map +1 -1
- package/dist/services/sandbox/create.js +8 -0
- package/dist/services/sandbox/create.js.map +1 -1
- package/dist/services/sandbox/get.d.ts +8 -4
- package/dist/services/sandbox/get.d.ts.map +1 -1
- package/dist/services/sandbox/get.js +28 -3
- package/dist/services/sandbox/get.js.map +1 -1
- package/dist/services/sandbox/getStatus.d.ts +2 -0
- package/dist/services/sandbox/getStatus.d.ts.map +1 -1
- package/dist/services/sandbox/getStatus.js +17 -1
- package/dist/services/sandbox/getStatus.js.map +1 -1
- package/dist/services/sandbox/index.d.ts +1 -1
- package/dist/services/sandbox/index.d.ts.map +1 -1
- package/dist/services/sandbox/list.d.ts +3 -0
- package/dist/services/sandbox/list.d.ts.map +1 -1
- package/dist/services/sandbox/list.js +5 -0
- package/dist/services/sandbox/list.js.map +1 -1
- package/dist/services/sandbox/pause.d.ts +17 -1
- package/dist/services/sandbox/pause.d.ts.map +1 -1
- package/dist/services/sandbox/pause.js +21 -3
- package/dist/services/sandbox/pause.js.map +1 -1
- package/dist/services/sandbox/run.d.ts +3 -2
- package/dist/services/sandbox/run.d.ts.map +1 -1
- package/dist/services/sandbox/run.js +145 -85
- package/dist/services/sandbox/run.js.map +1 -1
- package/dist/services/sandbox/types.d.ts +11 -4
- package/dist/services/sandbox/types.d.ts.map +1 -1
- package/dist/services/sandbox/types.js +12 -0
- package/dist/services/sandbox/types.js.map +1 -1
- package/dist/services/stream/namespaces.d.ts +2 -2
- package/dist/services/stream/namespaces.js +2 -2
- package/dist/services/stream/namespaces.js.map +1 -1
- package/package.json +2 -2
- package/src/services/api.ts +6 -7
- package/src/services/coder/api-reference.ts +79 -9
- package/src/services/coder/client.ts +46 -0
- package/src/services/coder/index.ts +3 -0
- package/src/services/coder/protocol.ts +166 -2
- package/src/services/coder/sessions.ts +26 -0
- package/src/services/coder/sse.ts +343 -184
- package/src/services/coder/types.ts +350 -44
- package/src/services/coder/websocket.ts +120 -21
- package/src/services/coder/workspaces.ts +74 -0
- package/src/services/sandbox/api-reference.ts +8 -8
- package/src/services/sandbox/client.ts +4 -4
- package/src/services/sandbox/create.ts +10 -0
- package/src/services/sandbox/get.ts +32 -3
- package/src/services/sandbox/getStatus.ts +20 -1
- package/src/services/sandbox/index.ts +1 -1
- package/src/services/sandbox/list.ts +5 -0
- package/src/services/sandbox/pause.ts +38 -4
- package/src/services/sandbox/run.ts +202 -108
- package/src/services/sandbox/types.ts +17 -2
- package/src/services/stream/namespaces.ts +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/services/coder/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAE3B,eAAO,MAAM,4BAA4B;;;;EAES,CAAC;AACnD,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAUlF;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,sBAAsB,CAQzE;AAED,eAAO,MAAM,uBAAuB;;;EAEqB,CAAC;AAC1D,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,eAAO,MAAM,sBAAsB;;;EAEiB,CAAC;AACrD,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,eAAO,MAAM,wBAAwB;;;;;EAEgC,CAAC;AACtE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC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B,CAAC,CAAC;AAMlF,eAAO,MAAM,wBAAwB;;;;;;;iBAU+B,CAAC;AACrE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,eAAO,MAAM,oCAAoC;;;;;;;;;;;;iBAQS,CAAC;AAC3D,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oCAAoC,CAAC,CAAC;AAMlG,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;iBAqBa,CAAC;AACtD,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,eAAO,MAAM,uCAAuC;;;;;;;;;;;;;;;;;;;iBAOU,CAAC;AAC/D,MAAM,MAAM,iCAAiC,GAAG,CAAC,CAAC,KAAK,CACtD,OAAO,uCAAuC,CAC9C,CAAC;AAMF,eAAO,MAAM,eAAe;;;;;;;;;iBAakB,CAAC;AAC/C,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAExD,eAAO,MAAM,0BAA0B;;;;;iBAOe,CAAC;AACvD,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;iBAOG,CAAC;AAC7C,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC"}
|
|
@@ -92,13 +92,40 @@ export const CoderWorkspaceDetailSchema = z
|
|
|
92
92
|
ownerUserId: z.string().describe('Owner user ID'),
|
|
93
93
|
repos: z.array(CoderSessionRepositoryRefSchema).describe('Repositories in workspace'),
|
|
94
94
|
repoCount: z.number().describe('Number of repositories'),
|
|
95
|
+
dependencies: z
|
|
96
|
+
.array(z.string())
|
|
97
|
+
.optional()
|
|
98
|
+
.default([])
|
|
99
|
+
.describe('APT package dependencies installed into workspace snapshots'),
|
|
100
|
+
setupScript: z
|
|
101
|
+
.string()
|
|
102
|
+
.optional()
|
|
103
|
+
.default('')
|
|
104
|
+
.describe('Shell script run while preparing workspace snapshots'),
|
|
105
|
+
snapshot: z
|
|
106
|
+
.object({
|
|
107
|
+
status: z.string().describe('Workspace snapshot build status'),
|
|
108
|
+
snapshotId: z.string().optional().describe('Created sandbox snapshot ID'),
|
|
109
|
+
snapshotRef: z.string().optional().describe('Snapshot reference used for sessions'),
|
|
110
|
+
baseSnapshotRef: z.string().optional().describe('Base session snapshot reference'),
|
|
111
|
+
baseDriverVersion: z.string().optional().describe('Base driver version stamp'),
|
|
112
|
+
configHash: z.string().optional().describe('Workspace snapshot input hash'),
|
|
113
|
+
buildId: z.string().optional().describe('Workspace snapshot build identifier'),
|
|
114
|
+
requestedAt: z.string().optional().describe('Snapshot build request timestamp'),
|
|
115
|
+
updatedAt: z.string().optional().describe('Snapshot build update timestamp'),
|
|
116
|
+
createdAt: z.string().optional().describe('Snapshot creation timestamp'),
|
|
117
|
+
error: z.string().optional().describe('Snapshot build error message'),
|
|
118
|
+
})
|
|
119
|
+
.passthrough()
|
|
120
|
+
.optional()
|
|
121
|
+
.describe('Workspace snapshot metadata'),
|
|
95
122
|
savedSkillIds: z.array(z.string()).describe('Saved skill IDs in workspace'),
|
|
96
123
|
skillBucketIds: z.array(z.string()).describe('Skill bucket IDs in workspace'),
|
|
97
|
-
|
|
124
|
+
enabledAgents: z
|
|
98
125
|
.array(z.string())
|
|
99
126
|
.optional()
|
|
100
127
|
.default([])
|
|
101
|
-
.describe('
|
|
128
|
+
.describe('Effective agent roster stored on the workspace'),
|
|
102
129
|
selectionCount: z.number().describe('Total number of selections'),
|
|
103
130
|
createdAt: z.string().describe('Creation timestamp (ISO-8601)'),
|
|
104
131
|
updatedAt: z.string().describe('Last update timestamp (ISO-8601)'),
|
|
@@ -108,7 +135,7 @@ export const CoderWorkspaceDetailSchema = z
|
|
|
108
135
|
export const CoderCustomAgentThinkingLevelSchema = z
|
|
109
136
|
.enum(['off', 'minimal', 'low', 'medium', 'high', 'xhigh'])
|
|
110
137
|
.describe('Thinking level override for a custom agent');
|
|
111
|
-
export const
|
|
138
|
+
export const CODER_CUSTOM_AGENT_TOOLS = [
|
|
112
139
|
'read',
|
|
113
140
|
'ls',
|
|
114
141
|
'find',
|
|
@@ -117,13 +144,13 @@ export const CODER_CUSTOM_AGENT_PI_TOOLS = [
|
|
|
117
144
|
'write',
|
|
118
145
|
'edit',
|
|
119
146
|
];
|
|
120
|
-
export const
|
|
121
|
-
.enum(
|
|
147
|
+
export const CoderCustomAgentToolSchema = z
|
|
148
|
+
.enum(CODER_CUSTOM_AGENT_TOOLS)
|
|
122
149
|
.describe('Workspace tool available to a standalone custom agent');
|
|
123
|
-
export const
|
|
124
|
-
.union([
|
|
125
|
-
.describe('
|
|
126
|
-
export const
|
|
150
|
+
export const CoderCustomAgentToolResponseSchema = z
|
|
151
|
+
.union([CoderCustomAgentToolSchema, z.string()])
|
|
152
|
+
.describe('Workspace tool granted to a standalone custom agent');
|
|
153
|
+
export const CODER_CUSTOM_AGENT_SERVICE_TOOLS = [
|
|
127
154
|
'session_dashboard',
|
|
128
155
|
'memory_service_search',
|
|
129
156
|
'memory_service_store',
|
|
@@ -167,12 +194,12 @@ export const CODER_CUSTOM_AGENT_HUB_TOOLS = [
|
|
|
167
194
|
'coord_heartbeat',
|
|
168
195
|
'coord_spawn_workers',
|
|
169
196
|
];
|
|
170
|
-
export const
|
|
171
|
-
.enum(
|
|
172
|
-
.describe('
|
|
173
|
-
export const
|
|
174
|
-
.union([
|
|
175
|
-
.describe('
|
|
197
|
+
export const CoderCustomAgentServiceToolSchema = z
|
|
198
|
+
.enum(CODER_CUSTOM_AGENT_SERVICE_TOOLS)
|
|
199
|
+
.describe('Service tool available to a standalone custom agent');
|
|
200
|
+
export const CoderCustomAgentServiceToolResponseSchema = z
|
|
201
|
+
.union([CoderCustomAgentServiceToolSchema, z.string()])
|
|
202
|
+
.describe('Service tool granted to a standalone custom agent');
|
|
176
203
|
export const CoderCustomAgentSnapshotSchema = z
|
|
177
204
|
.object({
|
|
178
205
|
slug: z.string().describe('Stable custom agent slug'),
|
|
@@ -184,15 +211,19 @@ export const CoderCustomAgentSnapshotSchema = z
|
|
|
184
211
|
headlessCompatible: z
|
|
185
212
|
.boolean()
|
|
186
213
|
.describe('Whether the custom agent is safe for non-interactive callers'),
|
|
187
|
-
|
|
188
|
-
.array(
|
|
189
|
-
.describe('
|
|
190
|
-
|
|
191
|
-
.array(
|
|
192
|
-
.describe('
|
|
214
|
+
tools: z
|
|
215
|
+
.array(CoderCustomAgentToolResponseSchema)
|
|
216
|
+
.describe('Workspace tools granted to the custom agent'),
|
|
217
|
+
serviceTools: z
|
|
218
|
+
.array(CoderCustomAgentServiceToolResponseSchema)
|
|
219
|
+
.describe('Service tools granted to the custom agent'),
|
|
193
220
|
savedSkills: z
|
|
194
221
|
.array(CoderSkillRefSchema)
|
|
195
222
|
.describe('Frozen saved-skill refs attached to the custom agent snapshot'),
|
|
223
|
+
companionAgents: z
|
|
224
|
+
.array(z.string())
|
|
225
|
+
.default([])
|
|
226
|
+
.describe('Companion agents auto-included alongside this custom agent'),
|
|
196
227
|
})
|
|
197
228
|
.passthrough()
|
|
198
229
|
.describe('Custom agent snapshot returned by coder hub');
|
|
@@ -259,17 +290,84 @@ export const CoderWorkspaceListResponseSchema = z
|
|
|
259
290
|
})
|
|
260
291
|
.passthrough()
|
|
261
292
|
.describe('Response payload for listing workspaces');
|
|
293
|
+
function hasWorkspaceSelections(input) {
|
|
294
|
+
return ((input.repos?.length ?? 0) > 0 ||
|
|
295
|
+
(input.dependencies?.length ?? 0) > 0 ||
|
|
296
|
+
Boolean(input.setupScript?.trim()) ||
|
|
297
|
+
(input.savedSkillIds?.length ?? 0) > 0 ||
|
|
298
|
+
(input.skillBucketIds?.length ?? 0) > 0 ||
|
|
299
|
+
(input.enabledAgents?.length ?? 0) > 0);
|
|
300
|
+
}
|
|
262
301
|
export const CoderCreateWorkspaceRequestSchema = z
|
|
263
302
|
.object({
|
|
264
303
|
name: z.string().describe('Workspace name'),
|
|
265
304
|
description: z.string().optional().describe('Workspace description'),
|
|
266
305
|
scope: z.enum(['user', 'org']).optional().describe('Workspace scope'),
|
|
267
306
|
repos: z.array(CoderSessionRepositoryRefSchema).optional().describe('Repositories'),
|
|
307
|
+
dependencies: z
|
|
308
|
+
.array(z.string())
|
|
309
|
+
.optional()
|
|
310
|
+
.describe('APT package dependencies installed into workspace snapshots'),
|
|
311
|
+
setupScript: z
|
|
312
|
+
.string()
|
|
313
|
+
.optional()
|
|
314
|
+
.describe('Shell script run while preparing workspace snapshots'),
|
|
268
315
|
savedSkillIds: z.array(z.string()).optional().describe('Saved skill IDs'),
|
|
269
316
|
skillBucketIds: z.array(z.string()).optional().describe('Skill bucket IDs'),
|
|
270
|
-
|
|
317
|
+
enabledAgents: z
|
|
318
|
+
.array(z.string())
|
|
319
|
+
.optional()
|
|
320
|
+
.describe('Effective agent roster to store on the workspace'),
|
|
321
|
+
})
|
|
322
|
+
.refine(hasWorkspaceSelections, {
|
|
323
|
+
message: 'A workspace needs at least one repo, dependency, setup script, saved skill, skill bucket, or agent',
|
|
271
324
|
})
|
|
272
325
|
.describe('Request body for creating a workspace');
|
|
326
|
+
export const CoderUpdateWorkspaceRequestSchema = z
|
|
327
|
+
.object({
|
|
328
|
+
name: z.string().optional().describe('Workspace name'),
|
|
329
|
+
description: z.string().optional().describe('Workspace description'),
|
|
330
|
+
scope: z.enum(['user', 'org']).optional().describe('Workspace scope'),
|
|
331
|
+
repos: z.array(CoderSessionRepositoryRefSchema).optional().describe('Repositories'),
|
|
332
|
+
dependencies: z
|
|
333
|
+
.array(z.string())
|
|
334
|
+
.optional()
|
|
335
|
+
.describe('APT package dependencies installed into workspace snapshots'),
|
|
336
|
+
setupScript: z
|
|
337
|
+
.string()
|
|
338
|
+
.optional()
|
|
339
|
+
.describe('Shell script run while preparing workspace snapshots'),
|
|
340
|
+
savedSkillIds: z.array(z.string()).optional().describe('Saved skill IDs'),
|
|
341
|
+
skillBucketIds: z.array(z.string()).optional().describe('Skill bucket IDs'),
|
|
342
|
+
enabledAgents: z
|
|
343
|
+
.array(z.string())
|
|
344
|
+
.optional()
|
|
345
|
+
.describe('Effective agent roster to store on the workspace'),
|
|
346
|
+
})
|
|
347
|
+
.refine((input) => Object.keys(input).length > 0, {
|
|
348
|
+
message: 'At least one workspace field must be provided',
|
|
349
|
+
})
|
|
350
|
+
.describe('Request body for updating a workspace');
|
|
351
|
+
export const CoderWorkspaceDependencyValidationResponseSchema = z
|
|
352
|
+
.object({
|
|
353
|
+
valid: z.array(z.string()).describe('Valid dependency package specs'),
|
|
354
|
+
invalid: z
|
|
355
|
+
.array(z
|
|
356
|
+
.object({
|
|
357
|
+
package: z.string().describe('Invalid dependency package spec'),
|
|
358
|
+
error: z.string().describe('Validation error'),
|
|
359
|
+
requestedVersion: z.string().optional().describe('Requested package version'),
|
|
360
|
+
availableVersions: z
|
|
361
|
+
.array(z.string())
|
|
362
|
+
.optional()
|
|
363
|
+
.describe('Available package versions returned by validation'),
|
|
364
|
+
searchUrl: z.string().describe('Package search URL'),
|
|
365
|
+
})
|
|
366
|
+
.passthrough())
|
|
367
|
+
.describe('Invalid dependency package specs'),
|
|
368
|
+
})
|
|
369
|
+
.passthrough()
|
|
370
|
+
.describe('Workspace dependency validation result');
|
|
273
371
|
export const CoderCreateCustomAgentRequestSchema = z
|
|
274
372
|
.object({
|
|
275
373
|
slug: z.string().describe('Stable custom agent slug'),
|
|
@@ -282,18 +380,22 @@ export const CoderCreateCustomAgentRequestSchema = z
|
|
|
282
380
|
.boolean()
|
|
283
381
|
.optional()
|
|
284
382
|
.describe('Whether the custom agent is safe for non-interactive callers'),
|
|
285
|
-
|
|
286
|
-
.array(
|
|
383
|
+
tools: z
|
|
384
|
+
.array(CoderCustomAgentToolSchema)
|
|
287
385
|
.optional()
|
|
288
|
-
.describe('
|
|
289
|
-
|
|
290
|
-
.array(
|
|
386
|
+
.describe('Workspace tools to grant to the custom agent'),
|
|
387
|
+
serviceTools: z
|
|
388
|
+
.array(CoderCustomAgentServiceToolSchema)
|
|
291
389
|
.optional()
|
|
292
|
-
.describe('
|
|
390
|
+
.describe('Service tools to grant to the custom agent'),
|
|
293
391
|
savedSkillIds: z
|
|
294
392
|
.array(z.string())
|
|
295
393
|
.optional()
|
|
296
394
|
.describe('Saved skill row ids to snapshot onto the custom agent'),
|
|
395
|
+
companionAgents: z
|
|
396
|
+
.array(z.string())
|
|
397
|
+
.optional()
|
|
398
|
+
.describe('Agent names to auto-include alongside this custom agent'),
|
|
297
399
|
})
|
|
298
400
|
.describe('Request body for creating a custom agent draft');
|
|
299
401
|
export const CoderUpdateCustomAgentRequestSchema = z
|
|
@@ -310,18 +412,22 @@ export const CoderUpdateCustomAgentRequestSchema = z
|
|
|
310
412
|
.boolean()
|
|
311
413
|
.optional()
|
|
312
414
|
.describe('Whether the custom agent is safe for non-interactive callers'),
|
|
313
|
-
|
|
314
|
-
.array(
|
|
415
|
+
tools: z
|
|
416
|
+
.array(CoderCustomAgentToolSchema)
|
|
315
417
|
.optional()
|
|
316
|
-
.describe('
|
|
317
|
-
|
|
318
|
-
.array(
|
|
418
|
+
.describe('Workspace tools to grant to the custom agent'),
|
|
419
|
+
serviceTools: z
|
|
420
|
+
.array(CoderCustomAgentServiceToolSchema)
|
|
319
421
|
.optional()
|
|
320
|
-
.describe('
|
|
422
|
+
.describe('Service tools to grant to the custom agent'),
|
|
321
423
|
savedSkillIds: z
|
|
322
424
|
.array(z.string())
|
|
323
425
|
.optional()
|
|
324
426
|
.describe('Saved skill row ids to snapshot onto the custom agent'),
|
|
427
|
+
companionAgents: z
|
|
428
|
+
.array(z.string())
|
|
429
|
+
.optional()
|
|
430
|
+
.describe('Agent names to auto-include alongside this custom agent'),
|
|
325
431
|
})
|
|
326
432
|
.describe('Request body for updating a custom agent draft');
|
|
327
433
|
export const CoderSaveSkillRequestSchema = z
|
|
@@ -376,10 +482,10 @@ export const CoderCreateSessionRequestSchema = z
|
|
|
376
482
|
workflowMode: CoderWorkflowModeSchema.optional().describe('Workflow execution mode'),
|
|
377
483
|
loop: CoderSessionLoopConfigSchema.optional().describe('Loop mode settings for the session'),
|
|
378
484
|
tags: z.array(z.string()).optional().describe('Tags applied to the session for filtering'),
|
|
379
|
-
|
|
485
|
+
enabledAgents: z
|
|
380
486
|
.array(z.string())
|
|
381
487
|
.optional()
|
|
382
|
-
.describe('
|
|
488
|
+
.describe('Enabled agent roster to include in the session'),
|
|
383
489
|
savedSkillIds: z
|
|
384
490
|
.array(z.string())
|
|
385
491
|
.optional()
|
|
@@ -411,6 +517,52 @@ export const CoderCreateSessionRequestSchema = z
|
|
|
411
517
|
.describe('Arbitrary metadata associated with the session'),
|
|
412
518
|
})
|
|
413
519
|
.describe('Request body for creating a coder session');
|
|
520
|
+
function inferCoderAgentBuilderSessionMode(input) {
|
|
521
|
+
if (input.mode)
|
|
522
|
+
return input.mode;
|
|
523
|
+
if (input.sourceSessionId)
|
|
524
|
+
return 'from_session';
|
|
525
|
+
if (input.targetAgentId || input.targetAgentSlug)
|
|
526
|
+
return 'edit';
|
|
527
|
+
return 'new';
|
|
528
|
+
}
|
|
529
|
+
export const CoderCreateAgentBuilderSessionRequestSchema = z
|
|
530
|
+
.object({
|
|
531
|
+
label: z.string().optional().describe('Builder session label override'),
|
|
532
|
+
prompt: z.string().optional().describe('Optional user focus for the builder session kickoff'),
|
|
533
|
+
mode: z
|
|
534
|
+
.enum(['new', 'edit', 'from_session'])
|
|
535
|
+
.optional()
|
|
536
|
+
.describe('Builder launch mode override'),
|
|
537
|
+
visibility: CoderSessionVisibilitySchema.optional().describe('Builder session visibility'),
|
|
538
|
+
sourceSessionId: z
|
|
539
|
+
.string()
|
|
540
|
+
.optional()
|
|
541
|
+
.describe('Source session identifier for build-from-session launches'),
|
|
542
|
+
targetAgentId: z
|
|
543
|
+
.string()
|
|
544
|
+
.optional()
|
|
545
|
+
.describe('Target custom-agent identifier for edit launches'),
|
|
546
|
+
targetAgentSlug: z.string().optional().describe('Target custom-agent slug for edit launches'),
|
|
547
|
+
})
|
|
548
|
+
.superRefine((value, ctx) => {
|
|
549
|
+
const mode = inferCoderAgentBuilderSessionMode(value);
|
|
550
|
+
if (mode === 'from_session' && !value.sourceSessionId?.trim()) {
|
|
551
|
+
ctx.addIssue({
|
|
552
|
+
code: z.ZodIssueCode.custom,
|
|
553
|
+
path: ['sourceSessionId'],
|
|
554
|
+
message: 'sourceSessionId is required for from-session builder launches.',
|
|
555
|
+
});
|
|
556
|
+
}
|
|
557
|
+
if (mode === 'edit' && !value.targetAgentId?.trim() && !value.targetAgentSlug?.trim()) {
|
|
558
|
+
ctx.addIssue({
|
|
559
|
+
code: z.ZodIssueCode.custom,
|
|
560
|
+
path: ['targetAgentId'],
|
|
561
|
+
message: 'targetAgentId or targetAgentSlug is required for edit launches.',
|
|
562
|
+
});
|
|
563
|
+
}
|
|
564
|
+
})
|
|
565
|
+
.describe('Request body for creating an agent-builder session');
|
|
414
566
|
export const CoderUpdateSessionRequestSchema = z
|
|
415
567
|
.object({
|
|
416
568
|
label: z.string().optional().describe('Updated session label'),
|
|
@@ -420,10 +572,10 @@ export const CoderUpdateSessionRequestSchema = z
|
|
|
420
572
|
workflowMode: CoderWorkflowModeSchema.optional().describe('Updated workflow mode'),
|
|
421
573
|
loop: CoderSessionLoopConfigSchema.optional().describe('Updated loop mode configuration'),
|
|
422
574
|
tags: z.array(z.string()).optional().describe('Updated set of tags for the session'),
|
|
423
|
-
|
|
575
|
+
enabledAgents: z
|
|
424
576
|
.array(z.string())
|
|
425
577
|
.optional()
|
|
426
|
-
.describe('Updated
|
|
578
|
+
.describe('Updated enabled agent roster for the session'),
|
|
427
579
|
skills: z
|
|
428
580
|
.array(CoderSkillRefSchema)
|
|
429
581
|
.optional()
|
|
@@ -457,6 +609,96 @@ export const CoderSessionWorkspaceSchema = z
|
|
|
457
609
|
scope: z.enum(['user', 'org']).describe('Workspace ownership scope'),
|
|
458
610
|
})
|
|
459
611
|
.describe('Workspace associated with a coder session');
|
|
612
|
+
export const CoderAgentBuilderSessionModeSchema = z
|
|
613
|
+
.enum(['new', 'edit', 'from_session'])
|
|
614
|
+
.describe('Agent-builder launch mode for a builder session');
|
|
615
|
+
export const CoderAgentBuilderActionKindSchema = z
|
|
616
|
+
.enum(['create_draft', 'update_draft', 'publish'])
|
|
617
|
+
.describe('Durable builder action emitted by an agent-builder session');
|
|
618
|
+
export const CoderAgentBuilderSourceSessionSchema = z
|
|
619
|
+
.object({
|
|
620
|
+
sessionId: z.string().describe('Source session identifier linked to the builder session'),
|
|
621
|
+
label: z.string().optional().describe('Source session label when available'),
|
|
622
|
+
})
|
|
623
|
+
.describe('Source session reference used by agent-builder flows');
|
|
624
|
+
export const CoderAgentBuilderTargetAgentSchema = z
|
|
625
|
+
.object({
|
|
626
|
+
agentId: z.string().optional().describe('Target custom-agent identifier when editing'),
|
|
627
|
+
slug: z.string().describe('Target custom-agent slug'),
|
|
628
|
+
displayName: z.string().optional().describe('Target custom-agent display name'),
|
|
629
|
+
})
|
|
630
|
+
.describe('Target custom-agent reference for agent-builder edit flows');
|
|
631
|
+
export const CoderAgentBuilderProposalSchema = z
|
|
632
|
+
.object({
|
|
633
|
+
slug: z.string().optional().describe('Proposed custom-agent slug'),
|
|
634
|
+
displayName: z.string().optional().describe('Proposed custom-agent name'),
|
|
635
|
+
description: z.string().optional().describe('Proposed custom-agent description'),
|
|
636
|
+
instructions: z.string().optional().describe('Proposed custom-agent system prompt'),
|
|
637
|
+
model: z.string().optional().describe('Proposed model override'),
|
|
638
|
+
thinkingLevel: CoderCustomAgentThinkingLevelSchema.optional().describe('Proposed thinking level override'),
|
|
639
|
+
headlessCompatible: z
|
|
640
|
+
.boolean()
|
|
641
|
+
.optional()
|
|
642
|
+
.describe('Whether the proposed agent is safe for non-interactive callers'),
|
|
643
|
+
tools: z
|
|
644
|
+
.array(CoderCustomAgentToolResponseSchema)
|
|
645
|
+
.default([])
|
|
646
|
+
.describe('Proposed workspace tools for the agent'),
|
|
647
|
+
serviceTools: z
|
|
648
|
+
.array(CoderCustomAgentServiceToolResponseSchema)
|
|
649
|
+
.default([])
|
|
650
|
+
.describe('Proposed service tools for the agent'),
|
|
651
|
+
savedSkills: z
|
|
652
|
+
.array(CoderSkillRefSchema)
|
|
653
|
+
.default([])
|
|
654
|
+
.describe('Proposed frozen skill refs to attach'),
|
|
655
|
+
companionAgents: z
|
|
656
|
+
.array(z.string())
|
|
657
|
+
.default([])
|
|
658
|
+
.describe('Proposed companion agents to auto-include'),
|
|
659
|
+
})
|
|
660
|
+
.passthrough()
|
|
661
|
+
.describe('Session-scoped agent-builder proposal state');
|
|
662
|
+
export const CoderAgentBuilderDurableStateSchema = z
|
|
663
|
+
.object({
|
|
664
|
+
draftAgentId: z.string().optional().describe('Linked draft custom-agent identifier'),
|
|
665
|
+
draftAgentSlug: z.string().optional().describe('Linked draft custom-agent slug'),
|
|
666
|
+
lastPublishedVersion: z
|
|
667
|
+
.number()
|
|
668
|
+
.int()
|
|
669
|
+
.optional()
|
|
670
|
+
.describe('Latest published version created through the builder flow'),
|
|
671
|
+
})
|
|
672
|
+
.describe('Durable agent-library state associated with a builder session');
|
|
673
|
+
export const CoderAgentBuilderActionStateSchema = z
|
|
674
|
+
.object({
|
|
675
|
+
kind: CoderAgentBuilderActionKindSchema.describe('Last durable builder action'),
|
|
676
|
+
status: z.enum(['completed', 'failed']).describe('Result of the last durable builder action'),
|
|
677
|
+
occurredAt: z.string().describe('Timestamp of the last durable builder action'),
|
|
678
|
+
message: z.string().optional().describe('Human-readable builder action result summary'),
|
|
679
|
+
agentId: z.string().optional().describe('Affected custom-agent identifier'),
|
|
680
|
+
agentSlug: z.string().optional().describe('Affected custom-agent slug'),
|
|
681
|
+
publishedVersion: z
|
|
682
|
+
.number()
|
|
683
|
+
.int()
|
|
684
|
+
.optional()
|
|
685
|
+
.describe('Published version number when publish succeeded'),
|
|
686
|
+
})
|
|
687
|
+
.describe('Latest durable action emitted by a builder session');
|
|
688
|
+
export const CoderAgentBuilderSessionSummarySchema = z
|
|
689
|
+
.object({
|
|
690
|
+
mode: CoderAgentBuilderSessionModeSchema.describe('Builder session mode'),
|
|
691
|
+
sourceSession: CoderAgentBuilderSourceSessionSchema.optional().describe('Linked source session when the builder was launched from an existing session'),
|
|
692
|
+
targetAgent: CoderAgentBuilderTargetAgentSchema.optional().describe('Target agent baseline when the builder is editing an existing custom agent'),
|
|
693
|
+
durable: CoderAgentBuilderDurableStateSchema.optional().describe('Linked durable draft/publish state'),
|
|
694
|
+
lastAction: CoderAgentBuilderActionStateSchema.optional().describe('Most recent durable builder action'),
|
|
695
|
+
})
|
|
696
|
+
.describe('Projected builder-session summary returned in session listings');
|
|
697
|
+
export const CoderAgentBuilderSessionStateSchema = CoderAgentBuilderSessionSummarySchema.extend({
|
|
698
|
+
proposal: CoderAgentBuilderProposalSchema.optional().describe('Full builder proposal state projected in session detail responses'),
|
|
699
|
+
})
|
|
700
|
+
.passthrough()
|
|
701
|
+
.describe('Full builder-session state returned in session details');
|
|
460
702
|
export const CoderSessionListItemSchema = z
|
|
461
703
|
.object({
|
|
462
704
|
sessionId: z.string().describe('Unique session identifier'),
|
|
@@ -495,11 +737,12 @@ export const CoderSessionListItemSchema = z
|
|
|
495
737
|
participantCount: z.number().describe('Total number of participants in the session'),
|
|
496
738
|
tags: z.array(z.string()).describe('Tag values attached to the session'),
|
|
497
739
|
skills: z.array(CoderSkillRefSchema).describe('Skills attached to the session'),
|
|
498
|
-
|
|
740
|
+
enabledAgents: z
|
|
499
741
|
.array(z.string())
|
|
500
742
|
.optional()
|
|
501
743
|
.default([])
|
|
502
|
-
.describe('
|
|
744
|
+
.describe('Enabled agent roster attached to the session'),
|
|
745
|
+
builder: CoderAgentBuilderSessionSummarySchema.optional().describe('Projected builder-session summary when this session is an agent-builder flow'),
|
|
503
746
|
defaultAgent: z.string().optional().describe('Default agent assigned to session operations'),
|
|
504
747
|
bucket: CoderSessionBucketSchema.describe('Derived bucket for session listing'),
|
|
505
748
|
runtimeAvailable: z.boolean().describe('Whether runtime is currently reachable'),
|
|
@@ -529,6 +772,7 @@ export const CoderSessionSchema = CoderSessionListItemSchema.extend({
|
|
|
529
772
|
.string()
|
|
530
773
|
.optional()
|
|
531
774
|
.describe('Last update timestamp for session metadata (ISO-8601)'),
|
|
775
|
+
builder: CoderAgentBuilderSessionStateSchema.optional().describe('Full builder-session state when this session is an agent-builder flow'),
|
|
532
776
|
// These fields are present in list items but may be absent in detail responses
|
|
533
777
|
lastActivityAt: z.string().optional().describe('Timestamp of most recent activity (ISO-8601)'),
|
|
534
778
|
taskCount: z.number().optional().describe('Number of tasks associated with the session'),
|