@ampcode/plugin 0.0.0-20260915001808-g793ad3d → 0.0.0-20260917001655-g68a7530

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 -2
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -1562,9 +1562,19 @@ declare module '@ampcode/plugin' {
1562
1562
  * Result returned from an agent.end handler.
1563
1563
  * Allows starting a new agent turn by returning a user message.
1564
1564
  */
1565
- export type AgentEndResult =
1565
+ export type AgentEndResult = {
1566
1566
  /** Automatically send a follow-up user message to start a new agent turn */
1567
- { action: 'continue'; userMessage: string } | void
1567
+ action: 'continue'
1568
+ userMessage: string
1569
+ /**
1570
+ * How many plugin `continue` turns may run in a row after the last user-sent
1571
+ * message. Amp ignores `continue` once this many consecutive plugin continuations
1572
+ * have already happened. Defaults to 5. Any message the user sends resets the count.
1573
+ * Raise it deliberately, for example in a plugin that drives long-running work
1574
+ * toward a goal, and keep your own stop condition.
1575
+ */
1576
+ maxContinuations?: number
1577
+ } | void
1568
1578
 
1569
1579
  /**
1570
1580
  * Map of event names to their payload types.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ampcode/plugin",
3
- "version": "0.0.0-20260915001808-g793ad3d",
3
+ "version": "0.0.0-20260917001655-g68a7530",
4
4
  "description": "Amp Plugin API",
5
5
  "homepage": "https://ampcode.com/docs/plugin-api",
6
6
  "author": {