@agentxjs/core 1.9.10-dev → 2.0.1

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 (142) hide show
  1. package/README.md +342 -0
  2. package/dist/{Processor-DT0N1qI6.d.ts → Processor-CeMyXtsX.d.ts} +1 -1
  3. package/dist/RpcClient-CMdhJxjS.d.ts +304 -0
  4. package/dist/agent/engine/internal/index.d.ts +22 -18
  5. package/dist/agent/engine/internal/index.js +1 -2
  6. package/dist/agent/engine/mealy/index.d.ts +4 -4
  7. package/dist/agent/engine/mealy/index.js +1 -2
  8. package/dist/agent/index.d.ts +92 -92
  9. package/dist/agent/index.js +16 -16
  10. package/dist/agent/types/index.d.ts +4 -4
  11. package/dist/agent/types/index.js +1 -2
  12. package/dist/bash/index.d.ts +29 -0
  13. package/dist/bash/index.js +7 -0
  14. package/dist/{bus-uF1DM2ox.d.ts → bus-C9FLWIu8.d.ts} +3 -1
  15. package/dist/{chunk-E5FPOAPO.js → chunk-22NTRYNO.js} +60 -60
  16. package/dist/chunk-22NTRYNO.js.map +1 -0
  17. package/dist/{chunk-7ZDX3O6I.js → chunk-AAFPAF67.js} +2 -2
  18. package/dist/{chunk-7ZDX3O6I.js.map → chunk-AAFPAF67.js.map} +1 -1
  19. package/dist/{chunk-EKHT54KN.js → chunk-APCBNCOW.js} +1 -1
  20. package/dist/{chunk-EKHT54KN.js.map → chunk-APCBNCOW.js.map} +1 -1
  21. package/dist/chunk-BHOD5PKR.js +55 -0
  22. package/dist/chunk-BHOD5PKR.js.map +1 -0
  23. package/dist/chunk-FI7WQFGV.js +37 -0
  24. package/dist/chunk-FI7WQFGV.js.map +1 -0
  25. package/dist/{chunk-AT5P47YA.js → chunk-RWIYC65R.js} +115 -115
  26. package/dist/chunk-RWIYC65R.js.map +1 -0
  27. package/dist/chunk-SKS7S2RY.js +1 -0
  28. package/dist/{chunk-I7GYR3MN.js → chunk-TUFZ2YH6.js} +77 -91
  29. package/dist/chunk-TUFZ2YH6.js.map +1 -0
  30. package/dist/{chunk-K6WXQ2RW.js → chunk-YSZG6XIM.js} +1 -2
  31. package/dist/chunk-YSZG6XIM.js.map +1 -0
  32. package/dist/{combinators-nEa5dD0T.d.ts → combinators-Dy-7lxKV.d.ts} +50 -50
  33. package/dist/common/logger/index.js +14 -16
  34. package/dist/common/logger/index.js.map +1 -1
  35. package/dist/container/index.d.ts +3 -4
  36. package/dist/container/index.js +0 -2
  37. package/dist/container/index.js.map +1 -1
  38. package/dist/driver/index.d.ts +2 -310
  39. package/dist/event/index.d.ts +4 -4
  40. package/dist/event/index.js +2 -3
  41. package/dist/event/types/index.d.ts +202 -208
  42. package/dist/event/types/index.js +1 -2
  43. package/dist/{event-CDuTzs__.d.ts → event-DNsF9EkO.d.ts} +5 -8
  44. package/dist/image/index.d.ts +9 -5
  45. package/dist/image/index.js +5 -2
  46. package/dist/image/index.js.map +1 -1
  47. package/dist/index--gxNpY5W.d.ts +609 -0
  48. package/dist/index.d.ts +4 -4
  49. package/dist/index.js +17 -17
  50. package/dist/{message-BMrMm1pq.d.ts → message-Dn-I2vr0.d.ts} +10 -33
  51. package/dist/mq/index.d.ts +25 -25
  52. package/dist/mq/index.js +1 -3
  53. package/dist/mq/index.js.map +1 -1
  54. package/dist/network/index.d.ts +59 -347
  55. package/dist/network/index.js +30 -41
  56. package/dist/network/index.js.map +1 -1
  57. package/dist/persistence/index.d.ts +2 -155
  58. package/dist/platform/index.d.ts +76 -0
  59. package/dist/platform/index.js.map +1 -0
  60. package/dist/runtime/index.d.ts +26 -59
  61. package/dist/runtime/index.js +117 -33
  62. package/dist/runtime/index.js.map +1 -1
  63. package/dist/session/index.d.ts +4 -52
  64. package/dist/session/index.js +4 -51
  65. package/dist/session/index.js.map +1 -1
  66. package/dist/types-Cb8tKM6Y.d.ts +90 -0
  67. package/package.json +10 -5
  68. package/src/agent/AgentStateMachine.ts +2 -2
  69. package/src/agent/__tests__/AgentStateMachine.test.ts +2 -2
  70. package/src/agent/__tests__/createAgent.test.ts +4 -4
  71. package/src/agent/__tests__/engine/internal/messageAssemblerProcessor.test.ts +301 -97
  72. package/src/agent/__tests__/engine/internal/stateEventProcessor.test.ts +6 -6
  73. package/src/agent/__tests__/engine/internal/turnTrackerProcessor.test.ts +59 -78
  74. package/src/agent/__tests__/engine/mealy/Mealy.test.ts +3 -3
  75. package/src/agent/__tests__/engine/mealy/Store.test.ts +1 -1
  76. package/src/agent/__tests__/engine/mealy/combinators.test.ts +4 -4
  77. package/src/agent/createAgent.ts +15 -15
  78. package/src/agent/engine/AgentProcessor.ts +7 -7
  79. package/src/agent/engine/MealyMachine.ts +4 -4
  80. package/src/agent/engine/internal/index.ts +11 -11
  81. package/src/agent/engine/internal/messageAssemblerProcessor.ts +113 -128
  82. package/src/agent/engine/internal/stateEventProcessor.ts +13 -15
  83. package/src/agent/engine/internal/turnTrackerProcessor.ts +27 -31
  84. package/src/agent/engine/mealy/Mealy.ts +2 -2
  85. package/src/agent/engine/mealy/combinators.ts +10 -10
  86. package/src/agent/engine/mealy/index.ts +9 -11
  87. package/src/agent/index.ts +30 -32
  88. package/src/agent/types/engine.ts +3 -3
  89. package/src/agent/types/event.ts +4 -12
  90. package/src/agent/types/index.ts +86 -88
  91. package/src/agent/types/message.ts +9 -43
  92. package/src/bash/index.ts +21 -0
  93. package/src/bash/tool.ts +57 -0
  94. package/src/bash/types.ts +108 -0
  95. package/src/common/logger/ConsoleLogger.ts +1 -1
  96. package/src/common/logger/LoggerFactoryImpl.ts +14 -14
  97. package/src/common/logger/index.ts +3 -3
  98. package/src/container/index.ts +4 -5
  99. package/src/container/types.ts +1 -1
  100. package/src/driver/index.ts +15 -16
  101. package/src/driver/types.ts +201 -73
  102. package/src/event/EventBus.ts +10 -10
  103. package/src/event/__tests__/EventBus.test.ts +2 -2
  104. package/src/event/index.ts +2 -3
  105. package/src/event/types/agent.ts +186 -191
  106. package/src/event/types/bus.ts +1 -1
  107. package/src/event/types/command.ts +293 -264
  108. package/src/event/types/container.ts +207 -222
  109. package/src/event/types/driver.ts +153 -155
  110. package/src/event/types/index.ts +6 -12
  111. package/src/event/types/session.ts +117 -130
  112. package/src/image/Image.ts +12 -2
  113. package/src/image/index.ts +4 -5
  114. package/src/image/types.ts +8 -2
  115. package/src/mq/OffsetGenerator.ts +1 -1
  116. package/src/mq/__tests__/OffsetGenerator.test.ts +1 -1
  117. package/src/mq/index.ts +4 -5
  118. package/src/network/RpcClient.ts +26 -25
  119. package/src/network/index.ts +41 -44
  120. package/src/network/jsonrpc.ts +5 -5
  121. package/src/persistence/index.ts +5 -5
  122. package/src/persistence/types.ts +5 -2
  123. package/src/platform/index.ts +21 -0
  124. package/src/platform/types.ts +84 -0
  125. package/src/runtime/AgentXRuntime.ts +188 -61
  126. package/src/runtime/__tests__/AgentXRuntime.test.ts +343 -0
  127. package/src/runtime/index.ts +12 -25
  128. package/src/runtime/types.ts +10 -62
  129. package/src/session/index.ts +2 -3
  130. package/dist/chunk-7D4SUZUM.js +0 -38
  131. package/dist/chunk-AT5P47YA.js.map +0 -1
  132. package/dist/chunk-E5FPOAPO.js.map +0 -1
  133. package/dist/chunk-I7GYR3MN.js.map +0 -1
  134. package/dist/chunk-K6WXQ2RW.js.map +0 -1
  135. package/dist/workspace/index.d.ts +0 -111
  136. package/dist/wrapper-Y3UTVU2E.js +0 -3635
  137. package/dist/wrapper-Y3UTVU2E.js.map +0 -1
  138. package/src/workspace/index.ts +0 -27
  139. package/src/workspace/types.ts +0 -131
  140. /package/dist/{workspace → bash}/index.js.map +0 -0
  141. /package/dist/{chunk-7D4SUZUM.js.map → chunk-SKS7S2RY.js.map} +0 -0
  142. /package/dist/{workspace → platform}/index.js +0 -0
@@ -87,7 +87,7 @@ export interface McpServerConfig {
87
87
  * Image metadata for storing provider-specific data
88
88
  */
89
89
  export interface ImageMetadata {
90
- claudeSdkSessionId?: string;
90
+ driverSessionId?: string;
91
91
  }
92
92
 
93
93
  /**
@@ -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,18 +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
- };
377
- }
378
- > {}
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
+ > {}
379
392
 
380
393
  /**
381
394
  * Response to image creation
@@ -383,178 +396,194 @@ export interface ImageCreateRequest extends BaseCommandRequest<
383
396
  * Includes __subscriptions with the new image's sessionId for auto-subscription.
384
397
  * Note: record is optional because it may be undefined on error.
385
398
  */
386
- export interface ImageCreateResponse extends BaseCommandResponse<
387
- "image_create_response",
388
- AgentXResponse & {
389
- record?: ImageRecord;
390
- }
391
- > {}
399
+ export interface ImageCreateResponse
400
+ extends BaseCommandResponse<
401
+ "image_create_response",
402
+ AgentXResponse & {
403
+ record?: ImageRecord;
404
+ }
405
+ > {}
392
406
 
393
407
  /**
394
408
  * Request to run an image (create or reuse agent)
395
409
  */
396
- export interface ImageRunRequest extends BaseCommandRequest<
397
- "image_run_request",
398
- {
399
- requestId: string;
400
- imageId: string;
401
- }
402
- > {}
410
+ export interface ImageRunRequest
411
+ extends BaseCommandRequest<
412
+ "image_run_request",
413
+ {
414
+ requestId: string;
415
+ imageId: string;
416
+ }
417
+ > {}
403
418
 
404
419
  /**
405
420
  * Response to image run
406
421
  */
407
- export interface ImageRunResponse extends BaseCommandResponse<
408
- "image_run_response",
409
- AgentXResponse & {
410
- imageId: string;
411
- agentId: string;
412
- /** true if reusing existing agent, false if newly created */
413
- reused: boolean;
414
- }
415
- > {}
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
+ > {}
416
432
 
417
433
  /**
418
434
  * Request to stop an image (destroy agent, keep image)
419
435
  */
420
- export interface ImageStopRequest extends BaseCommandRequest<
421
- "image_stop_request",
422
- {
423
- requestId: string;
424
- imageId: string;
425
- }
426
- > {}
436
+ export interface ImageStopRequest
437
+ extends BaseCommandRequest<
438
+ "image_stop_request",
439
+ {
440
+ requestId: string;
441
+ imageId: string;
442
+ }
443
+ > {}
427
444
 
428
445
  /**
429
446
  * Response to image stop
430
447
  */
431
- export interface ImageStopResponse extends BaseCommandResponse<
432
- "image_stop_response",
433
- AgentXResponse & {
434
- imageId: string;
435
- }
436
- > {}
448
+ export interface ImageStopResponse
449
+ extends BaseCommandResponse<
450
+ "image_stop_response",
451
+ AgentXResponse & {
452
+ imageId: string;
453
+ }
454
+ > {}
437
455
 
438
456
  /**
439
457
  * Request to update an image (name, description, etc.)
440
458
  */
441
- export interface ImageUpdateRequest extends BaseCommandRequest<
442
- "image_update_request",
443
- {
444
- requestId: string;
445
- imageId: string;
446
- updates: {
447
- name?: string;
448
- description?: string;
449
- };
450
- }
451
- > {}
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
+ > {}
452
472
 
453
473
  /**
454
474
  * Response to image update
455
475
  *
456
476
  * Note: record is optional because it may be undefined on error.
457
477
  */
458
- export interface ImageUpdateResponse extends BaseCommandResponse<
459
- "image_update_response",
460
- AgentXResponse & {
461
- record?: ImageRecord;
462
- }
463
- > {}
478
+ export interface ImageUpdateResponse
479
+ extends BaseCommandResponse<
480
+ "image_update_response",
481
+ AgentXResponse & {
482
+ record?: ImageRecord;
483
+ }
484
+ > {}
464
485
 
465
486
  /**
466
487
  * Request to list all images
467
488
  */
468
- export interface ImageListRequest extends BaseCommandRequest<
469
- "image_list_request",
470
- {
471
- requestId: string;
472
- containerId?: string;
473
- }
474
- > {}
489
+ export interface ImageListRequest
490
+ extends BaseCommandRequest<
491
+ "image_list_request",
492
+ {
493
+ requestId: string;
494
+ containerId?: string;
495
+ }
496
+ > {}
475
497
 
476
498
  /**
477
499
  * Response to image list
478
500
  *
479
501
  * Includes __subscriptions with all images' sessionIds for auto-subscription.
480
502
  */
481
- export interface ImageListResponse extends BaseCommandResponse<
482
- "image_list_response",
483
- AgentXResponse & {
484
- records: ImageListItem[];
485
- }
486
- > {}
503
+ export interface ImageListResponse
504
+ extends BaseCommandResponse<
505
+ "image_list_response",
506
+ AgentXResponse & {
507
+ records: ImageListItem[];
508
+ }
509
+ > {}
487
510
 
488
511
  /**
489
512
  * Request to get an image by ID
490
513
  */
491
- export interface ImageGetRequest extends BaseCommandRequest<
492
- "image_get_request",
493
- {
494
- requestId: string;
495
- imageId: string;
496
- }
497
- > {}
514
+ export interface ImageGetRequest
515
+ extends BaseCommandRequest<
516
+ "image_get_request",
517
+ {
518
+ requestId: string;
519
+ imageId: string;
520
+ }
521
+ > {}
498
522
 
499
523
  /**
500
524
  * Response to image get
501
525
  *
502
526
  * Includes __subscriptions with the image's sessionId for auto-subscription.
503
527
  */
504
- export interface ImageGetResponse extends BaseCommandResponse<
505
- "image_get_response",
506
- AgentXResponse & {
507
- record?: ImageListItem | null;
508
- }
509
- > {}
528
+ export interface ImageGetResponse
529
+ extends BaseCommandResponse<
530
+ "image_get_response",
531
+ AgentXResponse & {
532
+ record?: ImageListItem | null;
533
+ }
534
+ > {}
510
535
 
511
536
  /**
512
537
  * Request to delete an image
513
538
  */
514
- export interface ImageDeleteRequest extends BaseCommandRequest<
515
- "image_delete_request",
516
- {
517
- requestId: string;
518
- imageId: string;
519
- }
520
- > {}
539
+ export interface ImageDeleteRequest
540
+ extends BaseCommandRequest<
541
+ "image_delete_request",
542
+ {
543
+ requestId: string;
544
+ imageId: string;
545
+ }
546
+ > {}
521
547
 
522
548
  /**
523
549
  * Response to image delete
524
550
  */
525
- export interface ImageDeleteResponse extends BaseCommandResponse<
526
- "image_delete_response",
527
- AgentXResponse & {
528
- imageId: string;
529
- }
530
- > {}
551
+ export interface ImageDeleteResponse
552
+ extends BaseCommandResponse<
553
+ "image_delete_response",
554
+ AgentXResponse & {
555
+ imageId: string;
556
+ }
557
+ > {}
531
558
 
532
559
  /**
533
560
  * Request to get messages for an image
534
561
  */
535
- export interface ImageMessagesRequest extends BaseCommandRequest<
536
- "image_messages_request",
537
- {
538
- requestId: string;
539
- imageId: string;
540
- }
541
- > {}
562
+ export interface ImageMessagesRequest
563
+ extends BaseCommandRequest<
564
+ "image_messages_request",
565
+ {
566
+ requestId: string;
567
+ imageId: string;
568
+ }
569
+ > {}
542
570
 
543
571
  /**
544
572
  * Response to image messages request
545
573
  */
546
- export interface ImageMessagesResponse extends BaseCommandResponse<
547
- "image_messages_response",
548
- AgentXResponse & {
549
- imageId: string;
550
- messages: Array<{
551
- id: string;
552
- role: "user" | "assistant" | "tool_call" | "tool_result";
553
- content: unknown;
554
- timestamp: number;
555
- }>;
556
- }
557
- > {}
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
+ > {}
558
587
 
559
588
  // ============================================================================
560
589
  // Command Union Types