@ampcode/plugin 0.0.0-20260923001649-g009f5d9 → 0.0.0-20260925001753-g49e7366

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 +18 -9
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -510,7 +510,7 @@ declare module '@ampcode/plugin' {
510
510
  /**
511
511
  * Enable multiplayer for this many seconds, or set `null` to create it disabled. A
512
512
  * child thread inherits its parent's remaining multiplayer window when omitted, so set this
513
- * explicitly to opt out. This option requires an Orb executor. Multiplayer threads must
513
+ * explicitly to opt out. This option requires an Orb or shared runner executor. Multiplayer threads must
514
514
  * belong to a workspace. Valid numeric values range from 5 minutes to 7 days.
515
515
  */
516
516
  multiplayerTTLSeconds?: number | null
@@ -547,7 +547,7 @@ declare module '@ampcode/plugin' {
547
547
  /**
548
548
  * Enable multiplayer for this many seconds, or set `null` to create it disabled. A
549
549
  * child thread inherits its parent's remaining multiplayer window when omitted, so set this
550
- * explicitly to opt out. This option requires an Orb executor. Multiplayer threads must
550
+ * explicitly to opt out. This option requires an Orb or shared runner executor. Multiplayer threads must
551
551
  * belong to a workspace. Valid numeric values range from 5 minutes to 7 days.
552
552
  */
553
553
  multiplayerTTLSeconds?: number | null
@@ -1215,7 +1215,7 @@ declare module '@ampcode/plugin' {
1215
1215
 
1216
1216
  /**
1217
1217
  * Enable multiplayer for the given number of seconds, or disable it with `null`.
1218
- * Enabling multiplayer requires an Orb thread that is already shared. Valid
1218
+ * Enabling multiplayer requires an Orb or shared runner thread that is already shared. Valid
1219
1219
  * durations range from 5 minutes to 7 days.
1220
1220
  */
1221
1221
  setMultiplayer(options: { ttlSeconds: number | null }): Promise<void>
@@ -1276,11 +1276,14 @@ declare module '@ampcode/plugin' {
1276
1276
  */
1277
1277
  export interface PluginDialogOptions {
1278
1278
  /**
1279
- * Mark this dialog as one only the thread owner may answer in person. Without it, an agent
1280
- * acting for the owner, such as a Puck thread that created and supervises this thread, may
1281
- * be allowed to answer on the owner's behalf. Set this when the dialog is a deterministic
1282
- * gate, such as a permission or approval prompt, so that only a human can pass it. Agents
1283
- * can still see what the dialog asks. Secret inputs (`secret: true`) always require a human.
1279
+ * Require a human response rather than an agent response. The thread owner can answer these
1280
+ * dialogs. While multiplayer is active, human contributors can also answer interactive
1281
+ * selections, confirmations, and non-secret inputs, including dialogs with `requireHuman: true`.
1282
+ * Secret inputs (`secret: true`) remain owner-only and always require a human. Dialogs targeted
1283
+ * to a specific connection are not shared with contributors.
1284
+ *
1285
+ * Use this for approval and permission prompts. It does not grant agents access to dialogs
1286
+ * or enable them to answer on the owner's behalf.
1284
1287
  */
1285
1288
  requireHuman?: boolean
1286
1289
  }
@@ -1983,7 +1986,13 @@ declare module '@ampcode/plugin' {
1983
1986
  [key: string]: unknown
1984
1987
  }
1985
1988
 
1986
- /** Execute the tool with the given input and return a result */
1989
+ /**
1990
+ * Execute the tool with the given input and return a result.
1991
+ *
1992
+ * Returning nothing is allowed and is shown to the model as `(no tool output)`. Throw an
1993
+ * error to report a failure; the model then sees a tool error instead of a successful
1994
+ * empty result.
1995
+ */
1987
1996
  execute: (
1988
1997
  input: Record<string, unknown>,
1989
1998
  ctx: PluginToolContext,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ampcode/plugin",
3
- "version": "0.0.0-20260923001649-g009f5d9",
3
+ "version": "0.0.0-20260925001753-g49e7366",
4
4
  "description": "Amp Plugin API",
5
5
  "homepage": "https://ampcode.com/docs/plugin-api",
6
6
  "author": {