@agentuity/core 2.0.9 → 2.0.11
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/coder/agents.d.ts +170 -0
- package/dist/services/coder/agents.d.ts.map +1 -0
- package/dist/services/coder/agents.js +77 -0
- package/dist/services/coder/agents.js.map +1 -0
- package/dist/services/coder/api-reference.d.ts.map +1 -1
- package/dist/services/coder/api-reference.js +393 -41
- package/dist/services/coder/api-reference.js.map +1 -1
- package/dist/services/coder/client.d.ts +44 -2
- package/dist/services/coder/client.d.ts.map +1 -1
- package/dist/services/coder/client.js +89 -3
- package/dist/services/coder/client.js.map +1 -1
- package/dist/services/coder/close-codes.d.ts +76 -0
- package/dist/services/coder/close-codes.d.ts.map +1 -0
- package/dist/services/coder/close-codes.js +77 -0
- package/dist/services/coder/close-codes.js.map +1 -0
- package/dist/services/coder/discover.d.ts +1 -1
- package/dist/services/coder/discover.js +2 -2
- package/dist/services/coder/discover.js.map +1 -1
- package/dist/services/coder/index.d.ts +9 -2
- package/dist/services/coder/index.d.ts.map +1 -1
- package/dist/services/coder/index.js +6 -1
- package/dist/services/coder/index.js.map +1 -1
- package/dist/services/coder/protocol.d.ts +1855 -0
- package/dist/services/coder/protocol.d.ts.map +1 -0
- package/dist/services/coder/protocol.js +976 -0
- package/dist/services/coder/protocol.js.map +1 -0
- package/dist/services/coder/sessions.d.ts +9 -0
- package/dist/services/coder/sessions.d.ts.map +1 -1
- package/dist/services/coder/sessions.js +30 -6
- package/dist/services/coder/sessions.js.map +1 -1
- package/dist/services/coder/sse.d.ts +255 -0
- package/dist/services/coder/sse.d.ts.map +1 -0
- package/dist/services/coder/sse.js +676 -0
- package/dist/services/coder/sse.js.map +1 -0
- package/dist/services/coder/types.d.ts +1013 -0
- package/dist/services/coder/types.d.ts.map +1 -1
- package/dist/services/coder/types.js +215 -1
- package/dist/services/coder/types.js.map +1 -1
- package/dist/services/coder/websocket.d.ts +346 -0
- package/dist/services/coder/websocket.d.ts.map +1 -0
- package/dist/services/coder/websocket.js +791 -0
- package/dist/services/coder/websocket.js.map +1 -0
- package/dist/services/oauth/types.d.ts +10 -0
- package/dist/services/oauth/types.d.ts.map +1 -1
- package/dist/services/oauth/types.js +3 -0
- package/dist/services/oauth/types.js.map +1 -1
- package/dist/services/project/deploy.d.ts +1 -1
- package/dist/services/sandbox/run.d.ts +2 -2
- package/dist/services/sandbox/types.d.ts +2 -2
- package/package.json +2 -2
- package/src/services/coder/agents.ts +148 -0
- package/src/services/coder/api-reference.ts +411 -45
- package/src/services/coder/client.ts +133 -2
- package/src/services/coder/close-codes.ts +83 -0
- package/src/services/coder/discover.ts +2 -2
- package/src/services/coder/index.ts +29 -1
- package/src/services/coder/protocol.ts +1200 -0
- package/src/services/coder/sessions.ts +40 -10
- package/src/services/coder/sse.ts +796 -0
- package/src/services/coder/types.ts +249 -1
- package/src/services/coder/websocket.ts +943 -0
- package/src/services/oauth/types.ts +3 -0
|
@@ -55,7 +55,7 @@ export type CoderSkillRef = z.infer<typeof CoderSkillRefSchema>;
|
|
|
55
55
|
export const CoderSessionRepositoryRefSchema = z
|
|
56
56
|
.object({
|
|
57
57
|
repoId: z.string().optional().describe('Repository identifier when available'),
|
|
58
|
-
type: z.string().optional().describe('Repository type (e.g.,
|
|
58
|
+
type: z.string().optional().describe('Repository type (e.g., GitHub, GitLab)'),
|
|
59
59
|
provider: z.string().optional().describe('Git provider identifier'),
|
|
60
60
|
owner: z.string().optional().describe('Repository owner or organization'),
|
|
61
61
|
name: z.string().optional().describe('Repository name'),
|
|
@@ -115,6 +115,11 @@ export const CoderWorkspaceDetailSchema = z
|
|
|
115
115
|
repoCount: z.number().describe('Number of repositories'),
|
|
116
116
|
savedSkillIds: z.array(z.string()).describe('Saved skill IDs in workspace'),
|
|
117
117
|
skillBucketIds: z.array(z.string()).describe('Skill bucket IDs in workspace'),
|
|
118
|
+
agentSlugs: z
|
|
119
|
+
.array(z.string())
|
|
120
|
+
.optional()
|
|
121
|
+
.default([])
|
|
122
|
+
.describe('Published custom agent slugs in workspace'),
|
|
118
123
|
selectionCount: z.number().describe('Total number of selections'),
|
|
119
124
|
createdAt: z.string().describe('Creation timestamp (ISO-8601)'),
|
|
120
125
|
updatedAt: z.string().describe('Last update timestamp (ISO-8601)'),
|
|
@@ -123,6 +128,170 @@ export const CoderWorkspaceDetailSchema = z
|
|
|
123
128
|
.describe('Workspace detail returned by coder hub');
|
|
124
129
|
export type CoderWorkspaceDetail = z.infer<typeof CoderWorkspaceDetailSchema>;
|
|
125
130
|
|
|
131
|
+
export const CoderCustomAgentThinkingLevelSchema = z
|
|
132
|
+
.enum(['off', 'minimal', 'low', 'medium', 'high', 'xhigh'])
|
|
133
|
+
.describe('Thinking level override for a custom agent');
|
|
134
|
+
export type CoderCustomAgentThinkingLevel = z.infer<typeof CoderCustomAgentThinkingLevelSchema>;
|
|
135
|
+
|
|
136
|
+
export const CODER_CUSTOM_AGENT_PI_TOOLS = [
|
|
137
|
+
'read',
|
|
138
|
+
'ls',
|
|
139
|
+
'find',
|
|
140
|
+
'grep',
|
|
141
|
+
'bash',
|
|
142
|
+
'write',
|
|
143
|
+
'edit',
|
|
144
|
+
] as const;
|
|
145
|
+
|
|
146
|
+
export const CoderCustomAgentPiToolSchema = z
|
|
147
|
+
.enum(CODER_CUSTOM_AGENT_PI_TOOLS)
|
|
148
|
+
.describe('Workspace tool available to a standalone custom agent');
|
|
149
|
+
export type CoderCustomAgentPiTool = z.infer<typeof CoderCustomAgentPiToolSchema>;
|
|
150
|
+
|
|
151
|
+
export const CoderCustomAgentPiToolResponseSchema = z
|
|
152
|
+
.union([CoderCustomAgentPiToolSchema, z.string()])
|
|
153
|
+
.describe('Pi workspace tool granted to a standalone custom agent');
|
|
154
|
+
export type CoderCustomAgentPiToolResponse = z.infer<typeof CoderCustomAgentPiToolResponseSchema>;
|
|
155
|
+
|
|
156
|
+
export const CODER_CUSTOM_AGENT_HUB_TOOLS = [
|
|
157
|
+
'session_dashboard',
|
|
158
|
+
'memory_service_search',
|
|
159
|
+
'memory_service_store',
|
|
160
|
+
'memory_service_get',
|
|
161
|
+
'memory_service_update',
|
|
162
|
+
'memory_service_delete',
|
|
163
|
+
'memory_service_list',
|
|
164
|
+
'memory_service_schema',
|
|
165
|
+
'memory_service_facets',
|
|
166
|
+
'context7_search',
|
|
167
|
+
'grep_app_search',
|
|
168
|
+
'web_search',
|
|
169
|
+
'fetch_content',
|
|
170
|
+
'product_prd_create',
|
|
171
|
+
'product_prd_get',
|
|
172
|
+
'product_prd_update',
|
|
173
|
+
'product_prd_list',
|
|
174
|
+
'product_task_comment',
|
|
175
|
+
'session_todo_create',
|
|
176
|
+
'session_todo_update',
|
|
177
|
+
'session_todo_list',
|
|
178
|
+
'session_todo_comment',
|
|
179
|
+
'session_todo_attach',
|
|
180
|
+
'product_generate_deck',
|
|
181
|
+
'sandbox_exec',
|
|
182
|
+
'loop_get_state',
|
|
183
|
+
'loop_update_state',
|
|
184
|
+
'coord_create_job',
|
|
185
|
+
'coord_add_task',
|
|
186
|
+
'coord_claim_task',
|
|
187
|
+
'coord_complete_task',
|
|
188
|
+
'coord_fail_task',
|
|
189
|
+
'coord_list_tasks',
|
|
190
|
+
'coord_job_status',
|
|
191
|
+
'coord_reserve_file',
|
|
192
|
+
'coord_release_file',
|
|
193
|
+
'coord_provide_contract',
|
|
194
|
+
'coord_check_contract',
|
|
195
|
+
'coord_send_message',
|
|
196
|
+
'coord_read_messages',
|
|
197
|
+
'coord_heartbeat',
|
|
198
|
+
'coord_spawn_workers',
|
|
199
|
+
] as const;
|
|
200
|
+
|
|
201
|
+
export const CoderCustomAgentHubToolSchema = z
|
|
202
|
+
.enum(CODER_CUSTOM_AGENT_HUB_TOOLS)
|
|
203
|
+
.describe('Hub-managed tool available to a standalone custom agent');
|
|
204
|
+
export type CoderCustomAgentHubTool = z.infer<typeof CoderCustomAgentHubToolSchema>;
|
|
205
|
+
|
|
206
|
+
export const CoderCustomAgentHubToolResponseSchema = z
|
|
207
|
+
.union([CoderCustomAgentHubToolSchema, z.string()])
|
|
208
|
+
.describe('Hub-managed tool granted to a standalone custom agent');
|
|
209
|
+
export type CoderCustomAgentHubToolResponse = z.infer<typeof CoderCustomAgentHubToolResponseSchema>;
|
|
210
|
+
|
|
211
|
+
export const CoderCustomAgentSnapshotSchema = z
|
|
212
|
+
.object({
|
|
213
|
+
slug: z.string().describe('Stable custom agent slug'),
|
|
214
|
+
displayName: z.string().describe('Human-readable custom agent name'),
|
|
215
|
+
description: z.string().optional().describe('Optional custom agent description'),
|
|
216
|
+
instructions: z.string().describe('Standalone custom-agent system prompt'),
|
|
217
|
+
model: z.string().optional().describe('Optional model override'),
|
|
218
|
+
thinkingLevel: CoderCustomAgentThinkingLevelSchema.optional().describe(
|
|
219
|
+
'Optional thinking level override'
|
|
220
|
+
),
|
|
221
|
+
headlessCompatible: z
|
|
222
|
+
.boolean()
|
|
223
|
+
.describe('Whether the custom agent is safe for non-interactive callers'),
|
|
224
|
+
piTools: z
|
|
225
|
+
.array(CoderCustomAgentPiToolResponseSchema)
|
|
226
|
+
.describe('Pi workspace tools granted to the custom agent'),
|
|
227
|
+
hubToolNames: z
|
|
228
|
+
.array(CoderCustomAgentHubToolResponseSchema)
|
|
229
|
+
.describe('Hub-managed tools granted to the custom agent'),
|
|
230
|
+
savedSkills: z
|
|
231
|
+
.array(CoderSkillRefSchema)
|
|
232
|
+
.describe('Frozen saved-skill refs attached to the custom agent snapshot'),
|
|
233
|
+
})
|
|
234
|
+
.passthrough()
|
|
235
|
+
.describe('Custom agent snapshot returned by coder hub');
|
|
236
|
+
export type CoderCustomAgentSnapshot = z.infer<typeof CoderCustomAgentSnapshotSchema>;
|
|
237
|
+
|
|
238
|
+
export const CoderCustomAgentVersionSchema = CoderCustomAgentSnapshotSchema.extend({
|
|
239
|
+
id: z.string().describe('Published custom agent version identifier'),
|
|
240
|
+
agentId: z.string().describe('Parent custom agent identifier'),
|
|
241
|
+
version: z.number().int().describe('Published version number'),
|
|
242
|
+
createdByUserId: z.string().describe('User who published the version'),
|
|
243
|
+
createdAt: z.string().describe('Version creation timestamp (ISO-8601)'),
|
|
244
|
+
})
|
|
245
|
+
.passthrough()
|
|
246
|
+
.describe('Published custom agent version returned by coder hub');
|
|
247
|
+
export type CoderCustomAgentVersion = z.infer<typeof CoderCustomAgentVersionSchema>;
|
|
248
|
+
|
|
249
|
+
export const CoderCustomAgentSchema = CoderCustomAgentSnapshotSchema.extend({
|
|
250
|
+
id: z.string().describe('Custom agent record identifier'),
|
|
251
|
+
ownerUserId: z.string().describe('Owner user identifier'),
|
|
252
|
+
lifecycle: z
|
|
253
|
+
.enum(['draft', 'published', 'archived'])
|
|
254
|
+
.describe('Current lifecycle state for the custom agent'),
|
|
255
|
+
visibility: z.enum(['org', 'private_draft']).describe('Visibility tier for the custom agent'),
|
|
256
|
+
createdAt: z.string().describe('Creation timestamp (ISO-8601)'),
|
|
257
|
+
updatedAt: z.string().describe('Last update timestamp (ISO-8601)'),
|
|
258
|
+
hasPublishedVersion: z
|
|
259
|
+
.boolean()
|
|
260
|
+
.describe('Whether the agent has at least one published version'),
|
|
261
|
+
hasUnpublishedChanges: z
|
|
262
|
+
.boolean()
|
|
263
|
+
.describe('Whether the current draft differs from the latest published version'),
|
|
264
|
+
latestPublishedVersion: z.number().int().optional().describe('Latest published version number'),
|
|
265
|
+
latestPublishedAt: z.string().optional().describe('Latest published timestamp (ISO-8601)'),
|
|
266
|
+
published: CoderCustomAgentVersionSchema.optional().describe(
|
|
267
|
+
'Latest published version snapshot'
|
|
268
|
+
),
|
|
269
|
+
draft: CoderCustomAgentSnapshotSchema.optional().describe('Owner-visible draft snapshot'),
|
|
270
|
+
})
|
|
271
|
+
.passthrough()
|
|
272
|
+
.describe('Custom agent record returned by coder hub');
|
|
273
|
+
export type CoderCustomAgent = z.infer<typeof CoderCustomAgentSchema>;
|
|
274
|
+
|
|
275
|
+
export const CoderCustomAgentListResponseSchema = z
|
|
276
|
+
.object({
|
|
277
|
+
agents: z.array(CoderCustomAgentSchema).describe('Custom agents returned by coder hub'),
|
|
278
|
+
})
|
|
279
|
+
.passthrough()
|
|
280
|
+
.describe('Response payload for listing custom agents');
|
|
281
|
+
export type CoderCustomAgentListResponse = z.infer<typeof CoderCustomAgentListResponseSchema>;
|
|
282
|
+
|
|
283
|
+
export const CoderCustomAgentVersionListResponseSchema = z
|
|
284
|
+
.object({
|
|
285
|
+
versions: z
|
|
286
|
+
.array(CoderCustomAgentVersionSchema)
|
|
287
|
+
.describe('Published custom agent versions returned by coder hub'),
|
|
288
|
+
})
|
|
289
|
+
.passthrough()
|
|
290
|
+
.describe('Response payload for listing custom agent versions');
|
|
291
|
+
export type CoderCustomAgentVersionListResponse = z.infer<
|
|
292
|
+
typeof CoderCustomAgentVersionListResponseSchema
|
|
293
|
+
>;
|
|
294
|
+
|
|
126
295
|
export const CoderSavedSkillListResponseSchema = z
|
|
127
296
|
.object({
|
|
128
297
|
skills: z.array(CoderSavedSkillSchema).describe('Saved skills returned by coder hub'),
|
|
@@ -155,10 +324,71 @@ export const CoderCreateWorkspaceRequestSchema = z
|
|
|
155
324
|
repos: z.array(CoderSessionRepositoryRefSchema).optional().describe('Repositories'),
|
|
156
325
|
savedSkillIds: z.array(z.string()).optional().describe('Saved skill IDs'),
|
|
157
326
|
skillBucketIds: z.array(z.string()).optional().describe('Skill bucket IDs'),
|
|
327
|
+
agentSlugs: z.array(z.string()).optional().describe('Published custom agent slugs'),
|
|
158
328
|
})
|
|
159
329
|
.describe('Request body for creating a workspace');
|
|
160
330
|
export type CoderCreateWorkspaceRequest = z.infer<typeof CoderCreateWorkspaceRequestSchema>;
|
|
161
331
|
|
|
332
|
+
export const CoderCreateCustomAgentRequestSchema = z
|
|
333
|
+
.object({
|
|
334
|
+
slug: z.string().describe('Stable custom agent slug'),
|
|
335
|
+
displayName: z.string().describe('Human-readable custom agent name'),
|
|
336
|
+
description: z.string().optional().describe('Optional custom agent description'),
|
|
337
|
+
instructions: z.string().describe('Standalone custom-agent system prompt'),
|
|
338
|
+
model: z.string().optional().describe('Optional model override'),
|
|
339
|
+
thinkingLevel: CoderCustomAgentThinkingLevelSchema.optional().describe(
|
|
340
|
+
'Optional thinking level override'
|
|
341
|
+
),
|
|
342
|
+
headlessCompatible: z
|
|
343
|
+
.boolean()
|
|
344
|
+
.optional()
|
|
345
|
+
.describe('Whether the custom agent is safe for non-interactive callers'),
|
|
346
|
+
piTools: z
|
|
347
|
+
.array(CoderCustomAgentPiToolSchema)
|
|
348
|
+
.optional()
|
|
349
|
+
.describe('Pi workspace tools to grant to the custom agent'),
|
|
350
|
+
hubToolNames: z
|
|
351
|
+
.array(CoderCustomAgentHubToolSchema)
|
|
352
|
+
.optional()
|
|
353
|
+
.describe('Hub-managed tools to grant to the custom agent'),
|
|
354
|
+
savedSkillIds: z
|
|
355
|
+
.array(z.string())
|
|
356
|
+
.optional()
|
|
357
|
+
.describe('Saved skill row ids to snapshot onto the custom agent'),
|
|
358
|
+
})
|
|
359
|
+
.describe('Request body for creating a custom agent draft');
|
|
360
|
+
export type CoderCreateCustomAgentRequest = z.infer<typeof CoderCreateCustomAgentRequestSchema>;
|
|
361
|
+
|
|
362
|
+
export const CoderUpdateCustomAgentRequestSchema = z
|
|
363
|
+
.object({
|
|
364
|
+
slug: z.string().optional().describe('Stable custom agent slug'),
|
|
365
|
+
displayName: z.string().optional().describe('Human-readable custom agent name'),
|
|
366
|
+
description: z.string().nullable().optional().describe('Optional custom agent description'),
|
|
367
|
+
instructions: z.string().optional().describe('Standalone custom-agent system prompt'),
|
|
368
|
+
model: z.string().nullable().optional().describe('Optional model override'),
|
|
369
|
+
thinkingLevel: CoderCustomAgentThinkingLevelSchema.nullable()
|
|
370
|
+
.optional()
|
|
371
|
+
.describe('Optional thinking level override'),
|
|
372
|
+
headlessCompatible: z
|
|
373
|
+
.boolean()
|
|
374
|
+
.optional()
|
|
375
|
+
.describe('Whether the custom agent is safe for non-interactive callers'),
|
|
376
|
+
piTools: z
|
|
377
|
+
.array(CoderCustomAgentPiToolSchema)
|
|
378
|
+
.optional()
|
|
379
|
+
.describe('Pi workspace tools to grant to the custom agent'),
|
|
380
|
+
hubToolNames: z
|
|
381
|
+
.array(CoderCustomAgentHubToolSchema)
|
|
382
|
+
.optional()
|
|
383
|
+
.describe('Hub-managed tools to grant to the custom agent'),
|
|
384
|
+
savedSkillIds: z
|
|
385
|
+
.array(z.string())
|
|
386
|
+
.optional()
|
|
387
|
+
.describe('Saved skill row ids to snapshot onto the custom agent'),
|
|
388
|
+
})
|
|
389
|
+
.describe('Request body for updating a custom agent draft');
|
|
390
|
+
export type CoderUpdateCustomAgentRequest = z.infer<typeof CoderUpdateCustomAgentRequestSchema>;
|
|
391
|
+
|
|
162
392
|
export const CoderSaveSkillRequestSchema = z
|
|
163
393
|
.object({
|
|
164
394
|
repo: z.string().describe('Repository identifier'),
|
|
@@ -209,10 +439,18 @@ export const CoderCreateSessionRequestSchema = z
|
|
|
209
439
|
task: z.string().describe('Primary task prompt for the session'),
|
|
210
440
|
label: z.string().optional().describe('Human-readable session label'),
|
|
211
441
|
agent: z.string().optional().describe('Default agent identifier to use for execution'),
|
|
442
|
+
defaultAgent: z
|
|
443
|
+
.string()
|
|
444
|
+
.optional()
|
|
445
|
+
.describe('Preferred default agent identifier for routing session prompts'),
|
|
212
446
|
visibility: CoderSessionVisibilitySchema.optional().describe('Session visibility setting'),
|
|
213
447
|
workflowMode: CoderWorkflowModeSchema.optional().describe('Workflow execution mode'),
|
|
214
448
|
loop: CoderSessionLoopConfigSchema.optional().describe('Loop mode settings for the session'),
|
|
215
449
|
tags: z.array(z.string()).optional().describe('Tags applied to the session for filtering'),
|
|
450
|
+
agentSlugs: z
|
|
451
|
+
.array(z.string())
|
|
452
|
+
.optional()
|
|
453
|
+
.describe('Published custom agent slugs to include in the session'),
|
|
216
454
|
savedSkillIds: z
|
|
217
455
|
.array(z.string())
|
|
218
456
|
.optional()
|
|
@@ -252,10 +490,15 @@ export const CoderUpdateSessionRequestSchema = z
|
|
|
252
490
|
.object({
|
|
253
491
|
label: z.string().optional().describe('Updated session label'),
|
|
254
492
|
agent: z.string().optional().describe('Updated default agent identifier'),
|
|
493
|
+
defaultAgent: z.string().optional().describe('Updated preferred default agent identifier'),
|
|
255
494
|
visibility: CoderSessionVisibilitySchema.optional().describe('Updated visibility setting'),
|
|
256
495
|
workflowMode: CoderWorkflowModeSchema.optional().describe('Updated workflow mode'),
|
|
257
496
|
loop: CoderSessionLoopConfigSchema.optional().describe('Updated loop mode configuration'),
|
|
258
497
|
tags: z.array(z.string()).optional().describe('Updated set of tags for the session'),
|
|
498
|
+
agentSlugs: z
|
|
499
|
+
.array(z.string())
|
|
500
|
+
.optional()
|
|
501
|
+
.describe('Updated published custom agent slugs included in the session'),
|
|
259
502
|
skills: z
|
|
260
503
|
.array(CoderSkillRefSchema)
|
|
261
504
|
.optional()
|
|
@@ -337,6 +580,11 @@ export const CoderSessionListItemSchema = z
|
|
|
337
580
|
participantCount: z.number().describe('Total number of participants in the session'),
|
|
338
581
|
tags: z.array(z.string()).describe('Tag values attached to the session'),
|
|
339
582
|
skills: z.array(CoderSkillRefSchema).describe('Skills attached to the session'),
|
|
583
|
+
agentSlugs: z
|
|
584
|
+
.array(z.string())
|
|
585
|
+
.optional()
|
|
586
|
+
.default([])
|
|
587
|
+
.describe('Published custom agent slugs attached to the session'),
|
|
340
588
|
defaultAgent: z.string().optional().describe('Default agent assigned to session operations'),
|
|
341
589
|
bucket: CoderSessionBucketSchema.describe('Derived bucket for session listing'),
|
|
342
590
|
runtimeAvailable: z.boolean().describe('Whether runtime is currently reachable'),
|