@agentuity/core 2.0.10 → 3.0.0-alpha.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.
Files changed (62) hide show
  1. package/dist/services/coder/agents.d.ts +172 -0
  2. package/dist/services/coder/agents.d.ts.map +1 -0
  3. package/dist/services/coder/agents.js +77 -0
  4. package/dist/services/coder/agents.js.map +1 -0
  5. package/dist/services/coder/api-reference.d.ts.map +1 -1
  6. package/dist/services/coder/api-reference.js +391 -39
  7. package/dist/services/coder/api-reference.js.map +1 -1
  8. package/dist/services/coder/client.d.ts +43 -1
  9. package/dist/services/coder/client.d.ts.map +1 -1
  10. package/dist/services/coder/client.js +87 -1
  11. package/dist/services/coder/client.js.map +1 -1
  12. package/dist/services/coder/close-codes.d.ts +76 -0
  13. package/dist/services/coder/close-codes.d.ts.map +1 -0
  14. package/dist/services/coder/close-codes.js +77 -0
  15. package/dist/services/coder/close-codes.js.map +1 -0
  16. package/dist/services/coder/index.d.ts +9 -2
  17. package/dist/services/coder/index.d.ts.map +1 -1
  18. package/dist/services/coder/index.js +6 -1
  19. package/dist/services/coder/index.js.map +1 -1
  20. package/dist/services/coder/protocol.d.ts +1855 -0
  21. package/dist/services/coder/protocol.d.ts.map +1 -0
  22. package/dist/services/coder/protocol.js +976 -0
  23. package/dist/services/coder/protocol.js.map +1 -0
  24. package/dist/services/coder/sessions.d.ts +9 -0
  25. package/dist/services/coder/sessions.d.ts.map +1 -1
  26. package/dist/services/coder/sessions.js +30 -6
  27. package/dist/services/coder/sessions.js.map +1 -1
  28. package/dist/services/coder/sse.d.ts +255 -0
  29. package/dist/services/coder/sse.d.ts.map +1 -0
  30. package/dist/services/coder/sse.js +676 -0
  31. package/dist/services/coder/sse.js.map +1 -0
  32. package/dist/services/coder/types.d.ts +1024 -0
  33. package/dist/services/coder/types.d.ts.map +1 -1
  34. package/dist/services/coder/types.js +230 -1
  35. package/dist/services/coder/types.js.map +1 -1
  36. package/dist/services/coder/websocket.d.ts +346 -0
  37. package/dist/services/coder/websocket.d.ts.map +1 -0
  38. package/dist/services/coder/websocket.js +791 -0
  39. package/dist/services/coder/websocket.js.map +1 -0
  40. package/dist/services/oauth/types.d.ts +10 -0
  41. package/dist/services/oauth/types.d.ts.map +1 -1
  42. package/dist/services/oauth/types.js +3 -0
  43. package/dist/services/oauth/types.js.map +1 -1
  44. package/dist/services/project/deploy.d.ts +56 -5
  45. package/dist/services/project/deploy.d.ts.map +1 -1
  46. package/dist/services/project/deploy.js +39 -4
  47. package/dist/services/project/deploy.js.map +1 -1
  48. package/dist/services/sandbox/run.d.ts +2 -2
  49. package/dist/services/sandbox/types.d.ts +2 -2
  50. package/package.json +183 -3
  51. package/src/services/coder/agents.ts +148 -0
  52. package/src/services/coder/api-reference.ts +409 -43
  53. package/src/services/coder/client.ts +131 -0
  54. package/src/services/coder/close-codes.ts +83 -0
  55. package/src/services/coder/index.ts +29 -1
  56. package/src/services/coder/protocol.ts +1200 -0
  57. package/src/services/coder/sessions.ts +40 -10
  58. package/src/services/coder/sse.ts +796 -0
  59. package/src/services/coder/types.ts +266 -1
  60. package/src/services/coder/websocket.ts +943 -0
  61. package/src/services/oauth/types.ts +3 -0
  62. package/src/services/project/deploy.ts +67 -26
@@ -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., github, gitlab)'),
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
+ enabledAgents: z
119
+ .array(z.string())
120
+ .optional()
121
+ .default([])
122
+ .describe('Effective agent roster stored on the 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,176 @@ 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_TOOLS = [
137
+ 'read',
138
+ 'ls',
139
+ 'find',
140
+ 'grep',
141
+ 'bash',
142
+ 'write',
143
+ 'edit',
144
+ ] as const;
145
+
146
+ export const CoderCustomAgentToolSchema = z
147
+ .enum(CODER_CUSTOM_AGENT_TOOLS)
148
+ .describe('Workspace tool available to a standalone custom agent');
149
+ export type CoderCustomAgentTool = z.infer<typeof CoderCustomAgentToolSchema>;
150
+
151
+ export const CoderCustomAgentToolResponseSchema = z
152
+ .union([CoderCustomAgentToolSchema, z.string()])
153
+ .describe('Workspace tool granted to a standalone custom agent');
154
+ export type CoderCustomAgentToolResponse = z.infer<typeof CoderCustomAgentToolResponseSchema>;
155
+
156
+ export const CODER_CUSTOM_AGENT_SERVICE_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 CoderCustomAgentServiceToolSchema = z
202
+ .enum(CODER_CUSTOM_AGENT_SERVICE_TOOLS)
203
+ .describe('Service tool available to a standalone custom agent');
204
+ export type CoderCustomAgentServiceTool = z.infer<typeof CoderCustomAgentServiceToolSchema>;
205
+
206
+ export const CoderCustomAgentServiceToolResponseSchema = z
207
+ .union([CoderCustomAgentServiceToolSchema, z.string()])
208
+ .describe('Service tool granted to a standalone custom agent');
209
+ export type CoderCustomAgentServiceToolResponse = z.infer<
210
+ typeof CoderCustomAgentServiceToolResponseSchema
211
+ >;
212
+
213
+ export const CoderCustomAgentSnapshotSchema = z
214
+ .object({
215
+ slug: z.string().describe('Stable custom agent slug'),
216
+ displayName: z.string().describe('Human-readable custom agent name'),
217
+ description: z.string().optional().describe('Optional custom agent description'),
218
+ instructions: z.string().describe('Standalone custom-agent system prompt'),
219
+ model: z.string().optional().describe('Optional model override'),
220
+ thinkingLevel: CoderCustomAgentThinkingLevelSchema.optional().describe(
221
+ 'Optional thinking level override'
222
+ ),
223
+ headlessCompatible: z
224
+ .boolean()
225
+ .describe('Whether the custom agent is safe for non-interactive callers'),
226
+ tools: z
227
+ .array(CoderCustomAgentToolResponseSchema)
228
+ .describe('Workspace tools granted to the custom agent'),
229
+ serviceTools: z
230
+ .array(CoderCustomAgentServiceToolResponseSchema)
231
+ .describe('Service tools granted to the custom agent'),
232
+ savedSkills: z
233
+ .array(CoderSkillRefSchema)
234
+ .describe('Frozen saved-skill refs attached to the custom agent snapshot'),
235
+ companionAgents: z
236
+ .array(z.string())
237
+ .default([])
238
+ .describe('Companion agents auto-included alongside this custom agent'),
239
+ })
240
+ .passthrough()
241
+ .describe('Custom agent snapshot returned by coder hub');
242
+ export type CoderCustomAgentSnapshot = z.infer<typeof CoderCustomAgentSnapshotSchema>;
243
+
244
+ export const CoderCustomAgentVersionSchema = CoderCustomAgentSnapshotSchema.extend({
245
+ id: z.string().describe('Published custom agent version identifier'),
246
+ agentId: z.string().describe('Parent custom agent identifier'),
247
+ version: z.number().int().describe('Published version number'),
248
+ createdByUserId: z.string().describe('User who published the version'),
249
+ createdAt: z.string().describe('Version creation timestamp (ISO-8601)'),
250
+ })
251
+ .passthrough()
252
+ .describe('Published custom agent version returned by coder hub');
253
+ export type CoderCustomAgentVersion = z.infer<typeof CoderCustomAgentVersionSchema>;
254
+
255
+ export const CoderCustomAgentSchema = CoderCustomAgentSnapshotSchema.extend({
256
+ id: z.string().describe('Custom agent record identifier'),
257
+ ownerUserId: z.string().describe('Owner user identifier'),
258
+ lifecycle: z
259
+ .enum(['draft', 'published', 'archived'])
260
+ .describe('Current lifecycle state for the custom agent'),
261
+ visibility: z.enum(['org', 'private_draft']).describe('Visibility tier for the custom agent'),
262
+ createdAt: z.string().describe('Creation timestamp (ISO-8601)'),
263
+ updatedAt: z.string().describe('Last update timestamp (ISO-8601)'),
264
+ hasPublishedVersion: z
265
+ .boolean()
266
+ .describe('Whether the agent has at least one published version'),
267
+ hasUnpublishedChanges: z
268
+ .boolean()
269
+ .describe('Whether the current draft differs from the latest published version'),
270
+ latestPublishedVersion: z.number().int().optional().describe('Latest published version number'),
271
+ latestPublishedAt: z.string().optional().describe('Latest published timestamp (ISO-8601)'),
272
+ published: CoderCustomAgentVersionSchema.optional().describe(
273
+ 'Latest published version snapshot'
274
+ ),
275
+ draft: CoderCustomAgentSnapshotSchema.optional().describe('Owner-visible draft snapshot'),
276
+ })
277
+ .passthrough()
278
+ .describe('Custom agent record returned by coder hub');
279
+ export type CoderCustomAgent = z.infer<typeof CoderCustomAgentSchema>;
280
+
281
+ export const CoderCustomAgentListResponseSchema = z
282
+ .object({
283
+ agents: z.array(CoderCustomAgentSchema).describe('Custom agents returned by coder hub'),
284
+ })
285
+ .passthrough()
286
+ .describe('Response payload for listing custom agents');
287
+ export type CoderCustomAgentListResponse = z.infer<typeof CoderCustomAgentListResponseSchema>;
288
+
289
+ export const CoderCustomAgentVersionListResponseSchema = z
290
+ .object({
291
+ versions: z
292
+ .array(CoderCustomAgentVersionSchema)
293
+ .describe('Published custom agent versions returned by coder hub'),
294
+ })
295
+ .passthrough()
296
+ .describe('Response payload for listing custom agent versions');
297
+ export type CoderCustomAgentVersionListResponse = z.infer<
298
+ typeof CoderCustomAgentVersionListResponseSchema
299
+ >;
300
+
126
301
  export const CoderSavedSkillListResponseSchema = z
127
302
  .object({
128
303
  skills: z.array(CoderSavedSkillSchema).describe('Saved skills returned by coder hub'),
@@ -155,10 +330,82 @@ export const CoderCreateWorkspaceRequestSchema = z
155
330
  repos: z.array(CoderSessionRepositoryRefSchema).optional().describe('Repositories'),
156
331
  savedSkillIds: z.array(z.string()).optional().describe('Saved skill IDs'),
157
332
  skillBucketIds: z.array(z.string()).optional().describe('Skill bucket IDs'),
333
+ enabledAgents: z
334
+ .array(z.string())
335
+ .optional()
336
+ .describe('Effective agent roster to store on the workspace'),
158
337
  })
159
338
  .describe('Request body for creating a workspace');
160
339
  export type CoderCreateWorkspaceRequest = z.infer<typeof CoderCreateWorkspaceRequestSchema>;
161
340
 
341
+ export const CoderCreateCustomAgentRequestSchema = z
342
+ .object({
343
+ slug: z.string().describe('Stable custom agent slug'),
344
+ displayName: z.string().describe('Human-readable custom agent name'),
345
+ description: z.string().optional().describe('Optional custom agent description'),
346
+ instructions: z.string().describe('Standalone custom-agent system prompt'),
347
+ model: z.string().optional().describe('Optional model override'),
348
+ thinkingLevel: CoderCustomAgentThinkingLevelSchema.optional().describe(
349
+ 'Optional thinking level override'
350
+ ),
351
+ headlessCompatible: z
352
+ .boolean()
353
+ .optional()
354
+ .describe('Whether the custom agent is safe for non-interactive callers'),
355
+ tools: z
356
+ .array(CoderCustomAgentToolSchema)
357
+ .optional()
358
+ .describe('Workspace tools to grant to the custom agent'),
359
+ serviceTools: z
360
+ .array(CoderCustomAgentServiceToolSchema)
361
+ .optional()
362
+ .describe('Service tools to grant to the custom agent'),
363
+ savedSkillIds: z
364
+ .array(z.string())
365
+ .optional()
366
+ .describe('Saved skill row ids to snapshot onto the custom agent'),
367
+ companionAgents: z
368
+ .array(z.string())
369
+ .optional()
370
+ .describe('Agent names to auto-include alongside this custom agent'),
371
+ })
372
+ .describe('Request body for creating a custom agent draft');
373
+ export type CoderCreateCustomAgentRequest = z.infer<typeof CoderCreateCustomAgentRequestSchema>;
374
+
375
+ export const CoderUpdateCustomAgentRequestSchema = z
376
+ .object({
377
+ slug: z.string().optional().describe('Stable custom agent slug'),
378
+ displayName: z.string().optional().describe('Human-readable custom agent name'),
379
+ description: z.string().nullable().optional().describe('Optional custom agent description'),
380
+ instructions: z.string().optional().describe('Standalone custom-agent system prompt'),
381
+ model: z.string().nullable().optional().describe('Optional model override'),
382
+ thinkingLevel: CoderCustomAgentThinkingLevelSchema.nullable()
383
+ .optional()
384
+ .describe('Optional thinking level override'),
385
+ headlessCompatible: z
386
+ .boolean()
387
+ .optional()
388
+ .describe('Whether the custom agent is safe for non-interactive callers'),
389
+ tools: z
390
+ .array(CoderCustomAgentToolSchema)
391
+ .optional()
392
+ .describe('Workspace tools to grant to the custom agent'),
393
+ serviceTools: z
394
+ .array(CoderCustomAgentServiceToolSchema)
395
+ .optional()
396
+ .describe('Service tools to grant to the custom agent'),
397
+ savedSkillIds: z
398
+ .array(z.string())
399
+ .optional()
400
+ .describe('Saved skill row ids to snapshot onto the custom agent'),
401
+ companionAgents: z
402
+ .array(z.string())
403
+ .optional()
404
+ .describe('Agent names to auto-include alongside this custom agent'),
405
+ })
406
+ .describe('Request body for updating a custom agent draft');
407
+ export type CoderUpdateCustomAgentRequest = z.infer<typeof CoderUpdateCustomAgentRequestSchema>;
408
+
162
409
  export const CoderSaveSkillRequestSchema = z
163
410
  .object({
164
411
  repo: z.string().describe('Repository identifier'),
@@ -209,10 +456,18 @@ export const CoderCreateSessionRequestSchema = z
209
456
  task: z.string().describe('Primary task prompt for the session'),
210
457
  label: z.string().optional().describe('Human-readable session label'),
211
458
  agent: z.string().optional().describe('Default agent identifier to use for execution'),
459
+ defaultAgent: z
460
+ .string()
461
+ .optional()
462
+ .describe('Preferred default agent identifier for routing session prompts'),
212
463
  visibility: CoderSessionVisibilitySchema.optional().describe('Session visibility setting'),
213
464
  workflowMode: CoderWorkflowModeSchema.optional().describe('Workflow execution mode'),
214
465
  loop: CoderSessionLoopConfigSchema.optional().describe('Loop mode settings for the session'),
215
466
  tags: z.array(z.string()).optional().describe('Tags applied to the session for filtering'),
467
+ enabledAgents: z
468
+ .array(z.string())
469
+ .optional()
470
+ .describe('Enabled agent roster to include in the session'),
216
471
  savedSkillIds: z
217
472
  .array(z.string())
218
473
  .optional()
@@ -252,10 +507,15 @@ export const CoderUpdateSessionRequestSchema = z
252
507
  .object({
253
508
  label: z.string().optional().describe('Updated session label'),
254
509
  agent: z.string().optional().describe('Updated default agent identifier'),
510
+ defaultAgent: z.string().optional().describe('Updated preferred default agent identifier'),
255
511
  visibility: CoderSessionVisibilitySchema.optional().describe('Updated visibility setting'),
256
512
  workflowMode: CoderWorkflowModeSchema.optional().describe('Updated workflow mode'),
257
513
  loop: CoderSessionLoopConfigSchema.optional().describe('Updated loop mode configuration'),
258
514
  tags: z.array(z.string()).optional().describe('Updated set of tags for the session'),
515
+ enabledAgents: z
516
+ .array(z.string())
517
+ .optional()
518
+ .describe('Updated enabled agent roster for the session'),
259
519
  skills: z
260
520
  .array(CoderSkillRefSchema)
261
521
  .optional()
@@ -337,6 +597,11 @@ export const CoderSessionListItemSchema = z
337
597
  participantCount: z.number().describe('Total number of participants in the session'),
338
598
  tags: z.array(z.string()).describe('Tag values attached to the session'),
339
599
  skills: z.array(CoderSkillRefSchema).describe('Skills attached to the session'),
600
+ enabledAgents: z
601
+ .array(z.string())
602
+ .optional()
603
+ .default([])
604
+ .describe('Enabled agent roster attached to the session'),
340
605
  defaultAgent: z.string().optional().describe('Default agent assigned to session operations'),
341
606
  bucket: CoderSessionBucketSchema.describe('Derived bucket for session listing'),
342
607
  runtimeAvailable: z.boolean().describe('Whether runtime is currently reachable'),