@ampcode/plugin 0.0.0-20260410002056-g3e80595 → 0.0.0-20260412002224-ga44bd86

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 +11 -1
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -338,6 +338,9 @@ declare module '@ampcode/plugin' {
338
338
  * Thread API for manipulating the current thread.
339
339
  */
340
340
  export interface PluginThread {
341
+ /** Active thread ID when available in the current invocation context */
342
+ id?: ThreadID
343
+
341
344
  /**
342
345
  * Append a user message to the thread.
343
346
  */
@@ -415,14 +418,21 @@ declare module '@ampcode/plugin' {
415
418
 
416
419
  /**
417
420
  * Event payload for session.start event.
421
+ * Fired when the plugin session starts and before the first event for each thread.
418
422
  */
419
- export type SessionStartEvent = Record<string, never>
423
+ export interface SessionStartEvent {
424
+ /** The active thread for this session, when available */
425
+ thread?: { id: ThreadID }
426
+ }
420
427
 
421
428
  /**
422
429
  * Event payload for tool.call event.
423
430
  * This is a request that expects a response from the handler.
424
431
  */
425
432
  export interface ToolCallEvent {
433
+ /** The active thread for this tool invocation, when available */
434
+ thread?: { id: ThreadID }
435
+
426
436
  /** Unique identifier for this tool use (e.g., "toolu_xxx") */
427
437
  toolUseID: string
428
438
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ampcode/plugin",
3
- "version": "0.0.0-20260410002056-g3e80595",
3
+ "version": "0.0.0-20260412002224-ga44bd86",
4
4
  "description": "Amp Plugin API",
5
5
  "homepage": "https://ampcode.com/manual/plugin-api",
6
6
  "author": {