@ampcode/plugin 0.0.0-20260916001641-g161c83a → 0.0.0-20260918001739-g7fec460
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.
- package/index.d.ts +12 -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
|
-
|
|
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.
|