@ampcode/plugin 0.0.0-20260501003203-gcbffc58 → 0.0.0-20260502002909-g5fc25db

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 (2) hide show
  1. package/index.d.ts +12 -6
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -258,6 +258,12 @@ declare module '@ampcode/plugin' {
258
258
 
259
259
  export type ThreadID = `T-${string}`
260
260
 
261
+ /**
262
+ * Message IDs are numeric in legacy TUI threads and stable string IDs in Neo
263
+ * thread-actor threads.
264
+ */
265
+ export type ThreadMessageID = number | string
266
+
261
267
  /**
262
268
  * A text content block in a message.
263
269
  */
@@ -301,7 +307,7 @@ declare module '@ampcode/plugin' {
301
307
  role: 'user'
302
308
 
303
309
  /** The message ID, which is unique in the thread. */
304
- id: number
310
+ id: ThreadMessageID
305
311
 
306
312
  content: (ThreadTextBlock | ThreadToolResultBlock)[]
307
313
  }
@@ -313,7 +319,7 @@ declare module '@ampcode/plugin' {
313
319
  role: 'assistant'
314
320
 
315
321
  /** The message ID, which is unique in the thread. */
316
- id: number
322
+ id: ThreadMessageID
317
323
 
318
324
  content: (ThreadTextBlock | ThreadThinkingBlock | ThreadToolUseBlock)[]
319
325
  }
@@ -325,7 +331,7 @@ declare module '@ampcode/plugin' {
325
331
  role: 'info'
326
332
 
327
333
  /** The message ID, which is unique in the thread. */
328
- id: number
334
+ id: ThreadMessageID
329
335
 
330
336
  content: ThreadTextBlock[]
331
337
  }
@@ -577,7 +583,7 @@ declare module '@ampcode/plugin' {
577
583
  message: string
578
584
 
579
585
  /** The message ID */
580
- id: number
586
+ id: ThreadMessageID
581
587
  }
582
588
 
583
589
  /**
@@ -604,10 +610,10 @@ declare module '@ampcode/plugin' {
604
610
  message: string
605
611
 
606
612
  /** The message ID that started this turn */
607
- id: number
613
+ id: ThreadMessageID
608
614
 
609
615
  /** The outcome of the agent's turn */
610
- status: 'done' | 'error' | 'interrupted'
616
+ status: 'done' | 'error' | 'cancelled'
611
617
 
612
618
  /** All messages since the agent.start event (including the user message that started this turn) */
613
619
  messages: ThreadMessage[]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ampcode/plugin",
3
- "version": "0.0.0-20260501003203-gcbffc58",
3
+ "version": "0.0.0-20260502002909-g5fc25db",
4
4
  "description": "Amp Plugin API",
5
5
  "homepage": "https://ampcode.com/manual/plugin-api",
6
6
  "author": {