@ampcode/plugin 0.0.0-20260720025147-ge982146 → 0.0.0-20260721002933-g2d16ff6

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 +19 -2
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -360,6 +360,11 @@ declare module '@ampcode/plugin' {
360
360
  parentThreadID?: ThreadID
361
361
  /** Show the created thread and make it active in the client when supported. */
362
362
  show?: boolean
363
+ /**
364
+ * Enable multiplayer for this many seconds. Multiplayer threads must run in an
365
+ * Orb and belong to a workspace. Valid values range from 5 minutes to 7 days.
366
+ */
367
+ multiplayerTTLSeconds?: number
363
368
  /**
364
369
  * Where the thread should execute. Defaults to `local`, which uses the current
365
370
  * client as the executor. Use `orb` for Amp's cloud sandbox or a runner target
@@ -1446,10 +1451,16 @@ declare module '@ampcode/plugin' {
1446
1451
  /** Stable server-owned event ID. Use this to make handler effects idempotent. */
1447
1452
  id: string
1448
1453
 
1449
- /** JSON-compatible request payload accepted by the generic webhook endpoint. */
1454
+ /** Exact bytes received in the HTTP request body. */
1455
+ body: Uint8Array
1456
+
1457
+ /** Requested HTTP headers, with lowercase names. */
1458
+ headers: Readonly<Record<string, string>>
1459
+
1460
+ /** @deprecated Use `body` instead. Internal JSON-compatible transport payload. */
1450
1461
  payload: unknown
1451
1462
 
1452
- /** Bounded string metadata recorded by the webhook ingress. */
1463
+ /** @deprecated Transport metadata retained for compatibility. */
1453
1464
  metadata: Readonly<Record<string, string>>
1454
1465
 
1455
1466
  /** ISO 8601 timestamp recorded when the server accepted the webhook. */
@@ -1470,6 +1481,12 @@ declare module '@ampcode/plugin' {
1470
1481
  /** Stable, non-whitespace-padded key within this plugin and thread (1-128 characters). */
1471
1482
  key: string
1472
1483
 
1484
+ /**
1485
+ * HTTP headers to preserve. Names are case-insensitive, and delivered names are lowercase.
1486
+ * Defaults to an empty list; no request headers are preserved implicitly.
1487
+ */
1488
+ headers?: readonly string[]
1489
+
1473
1490
  /** At-least-once handler for matching durable webhook events. */
1474
1491
  handler: (event: WebhookEvent, ctx: WebhookHandlerContext) => void | Promise<void>
1475
1492
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ampcode/plugin",
3
- "version": "0.0.0-20260720025147-ge982146",
3
+ "version": "0.0.0-20260721002933-g2d16ff6",
4
4
  "description": "Amp Plugin API",
5
5
  "homepage": "https://ampcode.com/manual/plugin-api",
6
6
  "author": {