@agentxjs/core 2.0.0 → 2.0.2

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 (112) hide show
  1. package/dist/{Processor-DT0N1qI6.d.ts → Processor-CeMyXtsX.d.ts} +1 -1
  2. package/dist/agent/engine/internal/index.d.ts +4 -5
  3. package/dist/agent/engine/internal/index.js +1 -1
  4. package/dist/agent/engine/mealy/index.d.ts +4 -4
  5. package/dist/agent/engine/mealy/index.js +1 -1
  6. package/dist/agent/index.d.ts +91 -91
  7. package/dist/agent/index.js +6 -6
  8. package/dist/agent/types/index.d.ts +4 -4
  9. package/dist/agent/types/index.js +1 -1
  10. package/dist/bash/index.d.ts +4 -4
  11. package/dist/{chunk-LTVNPHST.js → chunk-22NTRYNO.js} +60 -60
  12. package/dist/chunk-22NTRYNO.js.map +1 -0
  13. package/dist/{chunk-7ZDX3O6I.js → chunk-AAFPAF67.js} +2 -2
  14. package/dist/{chunk-7ZDX3O6I.js.map → chunk-AAFPAF67.js.map} +1 -1
  15. package/dist/{chunk-EKHT54KN.js → chunk-APCBNCOW.js} +1 -1
  16. package/dist/{chunk-EKHT54KN.js.map → chunk-APCBNCOW.js.map} +1 -1
  17. package/dist/{chunk-JTKCV7IS.js → chunk-RWIYC65R.js} +111 -111
  18. package/dist/{chunk-JTKCV7IS.js.map → chunk-RWIYC65R.js.map} +1 -1
  19. package/dist/{chunk-DEAR6N3O.js → chunk-TUFZ2YH6.js} +1 -1
  20. package/dist/chunk-TUFZ2YH6.js.map +1 -0
  21. package/dist/{chunk-23UUBQXR.js → chunk-YSZG6XIM.js} +1 -1
  22. package/dist/chunk-YSZG6XIM.js.map +1 -0
  23. package/dist/{combinators-nEa5dD0T.d.ts → combinators-Dy-7lxKV.d.ts} +50 -50
  24. package/dist/common/logger/index.js +14 -14
  25. package/dist/common/logger/index.js.map +1 -1
  26. package/dist/container/index.d.ts +3 -3
  27. package/dist/driver/index.d.ts +2 -2
  28. package/dist/event/index.d.ts +1 -1
  29. package/dist/event/index.js +2 -2
  30. package/dist/event/types/index.d.ts +199 -199
  31. package/dist/event/types/index.js +1 -1
  32. package/dist/{event-DNWOBSBO.d.ts → event-DNsF9EkO.d.ts} +4 -6
  33. package/dist/image/index.d.ts +3 -3
  34. package/dist/image/index.js.map +1 -1
  35. package/dist/{index-CuS1i5V-.d.ts → index--gxNpY5W.d.ts} +2 -2
  36. package/dist/index.d.ts +4 -4
  37. package/dist/index.js +6 -6
  38. package/dist/{message-03TJzvIX.d.ts → message-Dn-I2vr0.d.ts} +1 -1
  39. package/dist/mq/index.d.ts +25 -25
  40. package/dist/mq/index.js +1 -1
  41. package/dist/mq/index.js.map +1 -1
  42. package/dist/network/index.d.ts +2 -220
  43. package/dist/network/index.js +27 -27
  44. package/dist/network/index.js.map +1 -1
  45. package/dist/persistence/index.d.ts +2 -2
  46. package/dist/platform/index.d.ts +14 -6
  47. package/dist/runtime/index.d.ts +5 -5
  48. package/dist/runtime/index.js +6 -6
  49. package/dist/runtime/index.js.map +1 -1
  50. package/dist/session/index.d.ts +3 -3
  51. package/dist/{RpcClient-BcJ_zAGu.d.ts → types-CTV8Z9PI.d.ts} +225 -7
  52. package/dist/{types-aE74Eo6G.d.ts → types-Cb8tKM6Y.d.ts} +1 -1
  53. package/package.json +1 -1
  54. package/src/agent/AgentStateMachine.ts +2 -2
  55. package/src/agent/__tests__/AgentStateMachine.test.ts +2 -2
  56. package/src/agent/__tests__/createAgent.test.ts +4 -4
  57. package/src/agent/__tests__/engine/internal/messageAssemblerProcessor.test.ts +10 -10
  58. package/src/agent/__tests__/engine/internal/stateEventProcessor.test.ts +6 -6
  59. package/src/agent/__tests__/engine/internal/turnTrackerProcessor.test.ts +4 -4
  60. package/src/agent/__tests__/engine/mealy/Mealy.test.ts +3 -3
  61. package/src/agent/__tests__/engine/mealy/Store.test.ts +1 -1
  62. package/src/agent/__tests__/engine/mealy/combinators.test.ts +4 -4
  63. package/src/agent/createAgent.ts +15 -15
  64. package/src/agent/engine/AgentProcessor.ts +7 -7
  65. package/src/agent/engine/MealyMachine.ts +3 -3
  66. package/src/agent/engine/internal/index.ts +11 -11
  67. package/src/agent/engine/internal/messageAssemblerProcessor.ts +14 -14
  68. package/src/agent/engine/internal/stateEventProcessor.ts +13 -15
  69. package/src/agent/engine/internal/turnTrackerProcessor.ts +4 -4
  70. package/src/agent/engine/mealy/Mealy.ts +2 -2
  71. package/src/agent/engine/mealy/combinators.ts +10 -10
  72. package/src/agent/engine/mealy/index.ts +9 -11
  73. package/src/agent/index.ts +30 -32
  74. package/src/agent/types/engine.ts +3 -3
  75. package/src/agent/types/event.ts +4 -8
  76. package/src/agent/types/index.ts +85 -85
  77. package/src/bash/index.ts +1 -1
  78. package/src/common/logger/ConsoleLogger.ts +1 -1
  79. package/src/common/logger/LoggerFactoryImpl.ts +14 -14
  80. package/src/common/logger/index.ts +3 -3
  81. package/src/container/index.ts +4 -5
  82. package/src/container/types.ts +1 -1
  83. package/src/driver/index.ts +15 -17
  84. package/src/driver/types.ts +89 -79
  85. package/src/event/EventBus.ts +10 -10
  86. package/src/event/__tests__/EventBus.test.ts +1 -1
  87. package/src/event/index.ts +2 -3
  88. package/src/event/types/agent.ts +186 -180
  89. package/src/event/types/bus.ts +1 -1
  90. package/src/event/types/command.ts +292 -265
  91. package/src/event/types/container.ts +207 -222
  92. package/src/event/types/driver.ts +153 -155
  93. package/src/event/types/index.ts +6 -12
  94. package/src/event/types/session.ts +117 -130
  95. package/src/image/Image.ts +1 -1
  96. package/src/image/index.ts +4 -5
  97. package/src/mq/OffsetGenerator.ts +1 -1
  98. package/src/mq/__tests__/OffsetGenerator.test.ts +1 -1
  99. package/src/mq/index.ts +4 -5
  100. package/src/network/RpcClient.ts +10 -10
  101. package/src/network/index.ts +41 -44
  102. package/src/network/jsonrpc.ts +5 -5
  103. package/src/persistence/index.ts +5 -5
  104. package/src/platform/types.ts +15 -5
  105. package/src/runtime/AgentXRuntime.ts +15 -15
  106. package/src/runtime/__tests__/AgentXRuntime.test.ts +5 -5
  107. package/src/runtime/index.ts +5 -6
  108. package/src/runtime/types.ts +1 -1
  109. package/src/session/index.ts +2 -3
  110. package/dist/chunk-23UUBQXR.js.map +0 -1
  111. package/dist/chunk-DEAR6N3O.js.map +0 -1
  112. package/dist/chunk-LTVNPHST.js.map +0 -1
@@ -124,13 +124,8 @@ export interface ImageListItem extends ImageRecord {
124
124
  /**
125
125
  * Base interface for Command request events
126
126
  */
127
- interface BaseCommandRequest<T extends string, D = unknown> extends SystemEvent<
128
- T,
129
- D,
130
- "command",
131
- "request",
132
- "request"
133
- > {}
127
+ interface BaseCommandRequest<T extends string, D = unknown>
128
+ extends SystemEvent<T, D, "command", "request", "request"> {}
134
129
 
135
130
  /**
136
131
  * Base interface for Command response events
@@ -139,10 +134,8 @@ interface BaseCommandRequest<T extends string, D = unknown> extends SystemEvent<
139
134
  * - Consistent structure (requestId, error)
140
135
  * - Automatic client-side handling (__subscriptions, etc.)
141
136
  */
142
- interface BaseCommandResponse<
143
- T extends string,
144
- D extends AgentXResponse = AgentXResponse,
145
- > extends SystemEvent<T, D, "command", "response", "result"> {}
137
+ interface BaseCommandResponse<T extends string, D extends AgentXResponse = AgentXResponse>
138
+ extends SystemEvent<T, D, "command", "response", "result"> {}
146
139
 
147
140
  // ============================================================================
148
141
  // Container Commands
@@ -151,65 +144,71 @@ interface BaseCommandResponse<
151
144
  /**
152
145
  * Request to create a container
153
146
  */
154
- export interface ContainerCreateRequest extends BaseCommandRequest<
155
- "container_create_request",
156
- {
157
- requestId: string;
158
- containerId: string;
159
- }
160
- > {}
147
+ export interface ContainerCreateRequest
148
+ extends BaseCommandRequest<
149
+ "container_create_request",
150
+ {
151
+ requestId: string;
152
+ containerId: string;
153
+ }
154
+ > {}
161
155
 
162
156
  /**
163
157
  * Response to container creation
164
158
  */
165
- export interface ContainerCreateResponse extends BaseCommandResponse<
166
- "container_create_response",
167
- AgentXResponse & {
168
- containerId: string;
169
- }
170
- > {}
159
+ export interface ContainerCreateResponse
160
+ extends BaseCommandResponse<
161
+ "container_create_response",
162
+ AgentXResponse & {
163
+ containerId: string;
164
+ }
165
+ > {}
171
166
 
172
167
  /**
173
168
  * Request to get a container
174
169
  */
175
- export interface ContainerGetRequest extends BaseCommandRequest<
176
- "container_get_request",
177
- {
178
- requestId: string;
179
- containerId: string;
180
- }
181
- > {}
170
+ export interface ContainerGetRequest
171
+ extends BaseCommandRequest<
172
+ "container_get_request",
173
+ {
174
+ requestId: string;
175
+ containerId: string;
176
+ }
177
+ > {}
182
178
 
183
179
  /**
184
180
  * Response to container get
185
181
  */
186
- export interface ContainerGetResponse extends BaseCommandResponse<
187
- "container_get_response",
188
- AgentXResponse & {
189
- containerId?: string;
190
- exists: boolean;
191
- }
192
- > {}
182
+ export interface ContainerGetResponse
183
+ extends BaseCommandResponse<
184
+ "container_get_response",
185
+ AgentXResponse & {
186
+ containerId?: string;
187
+ exists: boolean;
188
+ }
189
+ > {}
193
190
 
194
191
  /**
195
192
  * Request to list containers
196
193
  */
197
- export interface ContainerListRequest extends BaseCommandRequest<
198
- "container_list_request",
199
- {
200
- requestId: string;
201
- }
202
- > {}
194
+ export interface ContainerListRequest
195
+ extends BaseCommandRequest<
196
+ "container_list_request",
197
+ {
198
+ requestId: string;
199
+ }
200
+ > {}
203
201
 
204
202
  /**
205
203
  * Response to container list
206
204
  */
207
- export interface ContainerListResponse extends BaseCommandResponse<
208
- "container_list_response",
209
- AgentXResponse & {
210
- containerIds: string[];
211
- }
212
- > {}
205
+ export interface ContainerListResponse
206
+ extends BaseCommandResponse<
207
+ "container_list_response",
208
+ AgentXResponse & {
209
+ containerIds: string[];
210
+ }
211
+ > {}
213
212
 
214
213
  // ============================================================================
215
214
  // Agent Commands
@@ -218,144 +217,156 @@ export interface ContainerListResponse extends BaseCommandResponse<
218
217
  /**
219
218
  * Request to get an agent
220
219
  */
221
- export interface AgentGetRequest extends BaseCommandRequest<
222
- "agent_get_request",
223
- {
224
- requestId: string;
225
- agentId: string;
226
- }
227
- > {}
220
+ export interface AgentGetRequest
221
+ extends BaseCommandRequest<
222
+ "agent_get_request",
223
+ {
224
+ requestId: string;
225
+ agentId: string;
226
+ }
227
+ > {}
228
228
 
229
229
  /**
230
230
  * Response to agent get
231
231
  */
232
- export interface AgentGetResponse extends BaseCommandResponse<
233
- "agent_get_response",
234
- AgentXResponse & {
235
- agentId?: string;
236
- containerId?: string;
237
- exists: boolean;
238
- }
239
- > {}
232
+ export interface AgentGetResponse
233
+ extends BaseCommandResponse<
234
+ "agent_get_response",
235
+ AgentXResponse & {
236
+ agentId?: string;
237
+ containerId?: string;
238
+ exists: boolean;
239
+ }
240
+ > {}
240
241
 
241
242
  /**
242
243
  * Request to list agents
243
244
  */
244
- export interface AgentListRequest extends BaseCommandRequest<
245
- "agent_list_request",
246
- {
247
- requestId: string;
248
- containerId: string;
249
- }
250
- > {}
245
+ export interface AgentListRequest
246
+ extends BaseCommandRequest<
247
+ "agent_list_request",
248
+ {
249
+ requestId: string;
250
+ containerId: string;
251
+ }
252
+ > {}
251
253
 
252
254
  /**
253
255
  * Response to agent list
254
256
  */
255
- export interface AgentListResponse extends BaseCommandResponse<
256
- "agent_list_response",
257
- AgentXResponse & {
258
- agents: Array<{ agentId: string; containerId: string; imageId: string }>;
259
- }
260
- > {}
257
+ export interface AgentListResponse
258
+ extends BaseCommandResponse<
259
+ "agent_list_response",
260
+ AgentXResponse & {
261
+ agents: Array<{ agentId: string; containerId: string; imageId: string }>;
262
+ }
263
+ > {}
261
264
 
262
265
  /**
263
266
  * Request to destroy an agent
264
267
  */
265
- export interface AgentDestroyRequest extends BaseCommandRequest<
266
- "agent_destroy_request",
267
- {
268
- requestId: string;
269
- agentId: string;
270
- }
271
- > {}
268
+ export interface AgentDestroyRequest
269
+ extends BaseCommandRequest<
270
+ "agent_destroy_request",
271
+ {
272
+ requestId: string;
273
+ agentId: string;
274
+ }
275
+ > {}
272
276
 
273
277
  /**
274
278
  * Response to agent destroy
275
279
  */
276
- export interface AgentDestroyResponse extends BaseCommandResponse<
277
- "agent_destroy_response",
278
- AgentXResponse & {
279
- agentId: string;
280
- success: boolean;
281
- }
282
- > {}
280
+ export interface AgentDestroyResponse
281
+ extends BaseCommandResponse<
282
+ "agent_destroy_response",
283
+ AgentXResponse & {
284
+ agentId: string;
285
+ success: boolean;
286
+ }
287
+ > {}
283
288
 
284
289
  /**
285
290
  * Request to destroy all agents in a container
286
291
  */
287
- export interface AgentDestroyAllRequest extends BaseCommandRequest<
288
- "agent_destroy_all_request",
289
- {
290
- requestId: string;
291
- containerId: string;
292
- }
293
- > {}
292
+ export interface AgentDestroyAllRequest
293
+ extends BaseCommandRequest<
294
+ "agent_destroy_all_request",
295
+ {
296
+ requestId: string;
297
+ containerId: string;
298
+ }
299
+ > {}
294
300
 
295
301
  /**
296
302
  * Response to destroy all agents
297
303
  */
298
- export interface AgentDestroyAllResponse extends BaseCommandResponse<
299
- "agent_destroy_all_response",
300
- AgentXResponse & {
301
- containerId: string;
302
- }
303
- > {}
304
+ export interface AgentDestroyAllResponse
305
+ extends BaseCommandResponse<
306
+ "agent_destroy_all_response",
307
+ AgentXResponse & {
308
+ containerId: string;
309
+ }
310
+ > {}
304
311
 
305
312
  /**
306
313
  * Request to send a message
307
314
  * Can use either imageId (preferred) or agentId
308
315
  * If using imageId and agent is not running, it will be auto-activated
309
316
  */
310
- export interface MessageSendRequest extends BaseCommandRequest<
311
- "message_send_request",
312
- {
313
- requestId: string;
314
- /** Image ID (preferred) - will auto-activate if offline */
315
- imageId?: string;
316
- /** Agent ID (legacy) - must be already running */
317
- agentId?: string;
318
- /** Message content (text-only or multimodal) */
319
- content: string | UserContentPart[];
320
- }
321
- > {}
317
+ export interface MessageSendRequest
318
+ extends BaseCommandRequest<
319
+ "message_send_request",
320
+ {
321
+ requestId: string;
322
+ /** Image ID (preferred) - will auto-activate if offline */
323
+ imageId?: string;
324
+ /** Agent ID (legacy) - must be already running */
325
+ agentId?: string;
326
+ /** Message content (text-only or multimodal) */
327
+ content: string | UserContentPart[];
328
+ }
329
+ > {}
322
330
 
323
331
  /**
324
332
  * Response to message send (acknowledges message received, not completion)
325
333
  */
326
- export interface MessageSendResponse extends BaseCommandResponse<
327
- "message_send_response",
328
- AgentXResponse & {
329
- imageId?: string;
330
- agentId: string;
331
- }
332
- > {}
334
+ export interface MessageSendResponse
335
+ extends BaseCommandResponse<
336
+ "message_send_response",
337
+ AgentXResponse & {
338
+ imageId?: string;
339
+ agentId: string;
340
+ }
341
+ > {}
333
342
 
334
343
  /**
335
344
  * Request to interrupt an agent
336
345
  * Can use either imageId or agentId
337
346
  */
338
- export interface AgentInterruptRequest extends BaseCommandRequest<
339
- "agent_interrupt_request",
340
- {
341
- requestId: string;
342
- /** Image ID (preferred) */
343
- imageId?: string;
344
- /** Agent ID (legacy) */
345
- agentId?: string;
346
- }
347
- > {}
347
+ export interface AgentInterruptRequest
348
+ extends BaseCommandRequest<
349
+ "agent_interrupt_request",
350
+ {
351
+ requestId: string;
352
+ /** Image ID (preferred) */
353
+ imageId?: string;
354
+ /** Agent ID (legacy) */
355
+ agentId?: string;
356
+ }
357
+ > {}
348
358
 
349
359
  /**
350
360
  * Response to agent interrupt
351
361
  */
352
- export interface AgentInterruptResponse extends BaseCommandResponse<
353
- "agent_interrupt_response",
354
- AgentXResponse & {
355
- imageId?: string;
356
- agentId?: string;
357
- }
358
- > {}
362
+ export interface AgentInterruptResponse
363
+ extends BaseCommandResponse<
364
+ "agent_interrupt_response",
365
+ AgentXResponse & {
366
+ imageId?: string;
367
+ agentId?: string;
368
+ }
369
+ > {}
359
370
 
360
371
  // ============================================================================
361
372
  // Image Commands
@@ -364,19 +375,20 @@ export interface AgentInterruptResponse extends BaseCommandResponse<
364
375
  /**
365
376
  * Request to create a new image (conversation)
366
377
  */
367
- export interface ImageCreateRequest extends BaseCommandRequest<
368
- "image_create_request",
369
- {
370
- requestId: string;
371
- containerId: string;
372
- config: {
373
- name?: string;
374
- description?: string;
375
- systemPrompt?: string;
376
- customData?: Record<string, unknown>;
377
- };
378
- }
379
- > {}
378
+ export interface ImageCreateRequest
379
+ extends BaseCommandRequest<
380
+ "image_create_request",
381
+ {
382
+ requestId: string;
383
+ containerId: string;
384
+ config: {
385
+ name?: string;
386
+ description?: string;
387
+ systemPrompt?: string;
388
+ customData?: Record<string, unknown>;
389
+ };
390
+ }
391
+ > {}
380
392
 
381
393
  /**
382
394
  * Response to image creation
@@ -384,179 +396,194 @@ export interface ImageCreateRequest extends BaseCommandRequest<
384
396
  * Includes __subscriptions with the new image's sessionId for auto-subscription.
385
397
  * Note: record is optional because it may be undefined on error.
386
398
  */
387
- export interface ImageCreateResponse extends BaseCommandResponse<
388
- "image_create_response",
389
- AgentXResponse & {
390
- record?: ImageRecord;
391
- }
392
- > {}
399
+ export interface ImageCreateResponse
400
+ extends BaseCommandResponse<
401
+ "image_create_response",
402
+ AgentXResponse & {
403
+ record?: ImageRecord;
404
+ }
405
+ > {}
393
406
 
394
407
  /**
395
408
  * Request to run an image (create or reuse agent)
396
409
  */
397
- export interface ImageRunRequest extends BaseCommandRequest<
398
- "image_run_request",
399
- {
400
- requestId: string;
401
- imageId: string;
402
- }
403
- > {}
410
+ export interface ImageRunRequest
411
+ extends BaseCommandRequest<
412
+ "image_run_request",
413
+ {
414
+ requestId: string;
415
+ imageId: string;
416
+ }
417
+ > {}
404
418
 
405
419
  /**
406
420
  * Response to image run
407
421
  */
408
- export interface ImageRunResponse extends BaseCommandResponse<
409
- "image_run_response",
410
- AgentXResponse & {
411
- imageId: string;
412
- agentId: string;
413
- /** true if reusing existing agent, false if newly created */
414
- reused: boolean;
415
- }
416
- > {}
422
+ export interface ImageRunResponse
423
+ extends BaseCommandResponse<
424
+ "image_run_response",
425
+ AgentXResponse & {
426
+ imageId: string;
427
+ agentId: string;
428
+ /** true if reusing existing agent, false if newly created */
429
+ reused: boolean;
430
+ }
431
+ > {}
417
432
 
418
433
  /**
419
434
  * Request to stop an image (destroy agent, keep image)
420
435
  */
421
- export interface ImageStopRequest extends BaseCommandRequest<
422
- "image_stop_request",
423
- {
424
- requestId: string;
425
- imageId: string;
426
- }
427
- > {}
436
+ export interface ImageStopRequest
437
+ extends BaseCommandRequest<
438
+ "image_stop_request",
439
+ {
440
+ requestId: string;
441
+ imageId: string;
442
+ }
443
+ > {}
428
444
 
429
445
  /**
430
446
  * Response to image stop
431
447
  */
432
- export interface ImageStopResponse extends BaseCommandResponse<
433
- "image_stop_response",
434
- AgentXResponse & {
435
- imageId: string;
436
- }
437
- > {}
448
+ export interface ImageStopResponse
449
+ extends BaseCommandResponse<
450
+ "image_stop_response",
451
+ AgentXResponse & {
452
+ imageId: string;
453
+ }
454
+ > {}
438
455
 
439
456
  /**
440
457
  * Request to update an image (name, description, etc.)
441
458
  */
442
- export interface ImageUpdateRequest extends BaseCommandRequest<
443
- "image_update_request",
444
- {
445
- requestId: string;
446
- imageId: string;
447
- updates: {
448
- name?: string;
449
- description?: string;
450
- customData?: Record<string, unknown>;
451
- };
452
- }
453
- > {}
459
+ export interface ImageUpdateRequest
460
+ extends BaseCommandRequest<
461
+ "image_update_request",
462
+ {
463
+ requestId: string;
464
+ imageId: string;
465
+ updates: {
466
+ name?: string;
467
+ description?: string;
468
+ customData?: Record<string, unknown>;
469
+ };
470
+ }
471
+ > {}
454
472
 
455
473
  /**
456
474
  * Response to image update
457
475
  *
458
476
  * Note: record is optional because it may be undefined on error.
459
477
  */
460
- export interface ImageUpdateResponse extends BaseCommandResponse<
461
- "image_update_response",
462
- AgentXResponse & {
463
- record?: ImageRecord;
464
- }
465
- > {}
478
+ export interface ImageUpdateResponse
479
+ extends BaseCommandResponse<
480
+ "image_update_response",
481
+ AgentXResponse & {
482
+ record?: ImageRecord;
483
+ }
484
+ > {}
466
485
 
467
486
  /**
468
487
  * Request to list all images
469
488
  */
470
- export interface ImageListRequest extends BaseCommandRequest<
471
- "image_list_request",
472
- {
473
- requestId: string;
474
- containerId?: string;
475
- }
476
- > {}
489
+ export interface ImageListRequest
490
+ extends BaseCommandRequest<
491
+ "image_list_request",
492
+ {
493
+ requestId: string;
494
+ containerId?: string;
495
+ }
496
+ > {}
477
497
 
478
498
  /**
479
499
  * Response to image list
480
500
  *
481
501
  * Includes __subscriptions with all images' sessionIds for auto-subscription.
482
502
  */
483
- export interface ImageListResponse extends BaseCommandResponse<
484
- "image_list_response",
485
- AgentXResponse & {
486
- records: ImageListItem[];
487
- }
488
- > {}
503
+ export interface ImageListResponse
504
+ extends BaseCommandResponse<
505
+ "image_list_response",
506
+ AgentXResponse & {
507
+ records: ImageListItem[];
508
+ }
509
+ > {}
489
510
 
490
511
  /**
491
512
  * Request to get an image by ID
492
513
  */
493
- export interface ImageGetRequest extends BaseCommandRequest<
494
- "image_get_request",
495
- {
496
- requestId: string;
497
- imageId: string;
498
- }
499
- > {}
514
+ export interface ImageGetRequest
515
+ extends BaseCommandRequest<
516
+ "image_get_request",
517
+ {
518
+ requestId: string;
519
+ imageId: string;
520
+ }
521
+ > {}
500
522
 
501
523
  /**
502
524
  * Response to image get
503
525
  *
504
526
  * Includes __subscriptions with the image's sessionId for auto-subscription.
505
527
  */
506
- export interface ImageGetResponse extends BaseCommandResponse<
507
- "image_get_response",
508
- AgentXResponse & {
509
- record?: ImageListItem | null;
510
- }
511
- > {}
528
+ export interface ImageGetResponse
529
+ extends BaseCommandResponse<
530
+ "image_get_response",
531
+ AgentXResponse & {
532
+ record?: ImageListItem | null;
533
+ }
534
+ > {}
512
535
 
513
536
  /**
514
537
  * Request to delete an image
515
538
  */
516
- export interface ImageDeleteRequest extends BaseCommandRequest<
517
- "image_delete_request",
518
- {
519
- requestId: string;
520
- imageId: string;
521
- }
522
- > {}
539
+ export interface ImageDeleteRequest
540
+ extends BaseCommandRequest<
541
+ "image_delete_request",
542
+ {
543
+ requestId: string;
544
+ imageId: string;
545
+ }
546
+ > {}
523
547
 
524
548
  /**
525
549
  * Response to image delete
526
550
  */
527
- export interface ImageDeleteResponse extends BaseCommandResponse<
528
- "image_delete_response",
529
- AgentXResponse & {
530
- imageId: string;
531
- }
532
- > {}
551
+ export interface ImageDeleteResponse
552
+ extends BaseCommandResponse<
553
+ "image_delete_response",
554
+ AgentXResponse & {
555
+ imageId: string;
556
+ }
557
+ > {}
533
558
 
534
559
  /**
535
560
  * Request to get messages for an image
536
561
  */
537
- export interface ImageMessagesRequest extends BaseCommandRequest<
538
- "image_messages_request",
539
- {
540
- requestId: string;
541
- imageId: string;
542
- }
543
- > {}
562
+ export interface ImageMessagesRequest
563
+ extends BaseCommandRequest<
564
+ "image_messages_request",
565
+ {
566
+ requestId: string;
567
+ imageId: string;
568
+ }
569
+ > {}
544
570
 
545
571
  /**
546
572
  * Response to image messages request
547
573
  */
548
- export interface ImageMessagesResponse extends BaseCommandResponse<
549
- "image_messages_response",
550
- AgentXResponse & {
551
- imageId: string;
552
- messages: Array<{
553
- id: string;
554
- role: "user" | "assistant" | "tool_call" | "tool_result";
555
- content: unknown;
556
- timestamp: number;
557
- }>;
558
- }
559
- > {}
574
+ export interface ImageMessagesResponse
575
+ extends BaseCommandResponse<
576
+ "image_messages_response",
577
+ AgentXResponse & {
578
+ imageId: string;
579
+ messages: Array<{
580
+ id: string;
581
+ role: "user" | "assistant" | "tool_call" | "tool_result";
582
+ content: unknown;
583
+ timestamp: number;
584
+ }>;
585
+ }
586
+ > {}
560
587
 
561
588
  // ============================================================================
562
589
  // Command Union Types