@ampcode/plugin 0.0.0-20260908001747-gc3e098d → 0.0.0-20260910001659-g9b56c30
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 +19 -5
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -39,7 +39,7 @@ declare module '@ampcode/plugin' {
|
|
|
39
39
|
configuration: PluginConfiguration<Record<string, unknown>>
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
|
-
* Execute shell commands
|
|
42
|
+
* Execute shell commands with the plugin API's tagged-template shell runner.
|
|
43
43
|
* Unlike `ctx.$` in event handlers, this is not tied to a specific hook invocation.
|
|
44
44
|
*/
|
|
45
45
|
$: ShellFunction
|
|
@@ -369,6 +369,15 @@ declare module '@ampcode/plugin' {
|
|
|
369
369
|
* Tools available to this agent. Use 'all' for its provider-appropriate built-in tools
|
|
370
370
|
* plus plugin, MCP, and remote tools available in its runtime.
|
|
371
371
|
*
|
|
372
|
+
* An array or an explicit `include` array replaces the default tool list, including
|
|
373
|
+
* delegation tools. Use `add` to extend the default list; `exclude` always wins.
|
|
374
|
+
* Loading a skill does not grant tools omitted from an explicit list.
|
|
375
|
+
*
|
|
376
|
+
* Include `create_thread` for persistent child threads with a selected `agent_mode`,
|
|
377
|
+
* and the coordination tools your workflow needs: `list_agent_modes`, `get_thread_status`,
|
|
378
|
+
* `send_thread_message`, and `wait_for_threads`. `Task` runs a scoped subagent instead
|
|
379
|
+
* and does not accept a per-call agent mode.
|
|
380
|
+
*
|
|
372
381
|
* Explicit tool lists (arrays and `include`/`exclude` entries) match tool names as
|
|
373
382
|
* glob patterns: `mcp__*` matches all MCP tools (named `mcp__<server>__<tool>`), and
|
|
374
383
|
* `plugin__*` matches all plugin tools (also matched as `plugin__<pluginName>__<toolName>`
|
|
@@ -464,7 +473,10 @@ declare module '@ampcode/plugin' {
|
|
|
464
473
|
}
|
|
465
474
|
|
|
466
475
|
export interface RunAgentOptions {
|
|
467
|
-
/**
|
|
476
|
+
/**
|
|
477
|
+
* Maximum time to wait for the agent run to finish, in milliseconds (default 10 minutes).
|
|
478
|
+
* A timeout rejects the call but leaves the child running until its turn finishes.
|
|
479
|
+
*/
|
|
468
480
|
timeoutMs?: number
|
|
469
481
|
/**
|
|
470
482
|
* Parent thread for this run when the agent is being used as a subagent/tool.
|
|
@@ -881,7 +893,9 @@ declare module '@ampcode/plugin' {
|
|
|
881
893
|
}
|
|
882
894
|
|
|
883
895
|
/**
|
|
884
|
-
*
|
|
896
|
+
* Tagged-template shell command runner. It resolves with `exitCode`, `stdout`, and `stderr`,
|
|
897
|
+
* including when the command exits non-zero. Inspect `exitCode` to detect failure. This API does
|
|
898
|
+
* not provide Bun shell chaining methods such as `.nothrow()` or `.quiet()`.
|
|
885
899
|
*/
|
|
886
900
|
export type ShellFunction = (
|
|
887
901
|
strings: TemplateStringsArray,
|
|
@@ -1555,7 +1569,7 @@ declare module '@ampcode/plugin' {
|
|
|
1555
1569
|
/** Scoped logger for plugin output. Log messages are appended to the handler's trace span events. */
|
|
1556
1570
|
logger: PluginLogger
|
|
1557
1571
|
|
|
1558
|
-
/**
|
|
1572
|
+
/** Tagged-template shell command runner. See {@link ShellFunction}. */
|
|
1559
1573
|
$: ShellFunction
|
|
1560
1574
|
|
|
1561
1575
|
/** Platform UI capabilities */
|
|
@@ -1697,7 +1711,7 @@ declare module '@ampcode/plugin' {
|
|
|
1697
1711
|
/** System capabilities and information */
|
|
1698
1712
|
system: PluginSystem
|
|
1699
1713
|
|
|
1700
|
-
/**
|
|
1714
|
+
/** Tagged-template shell command runner. See {@link ShellFunction}. */
|
|
1701
1715
|
$: ShellFunction
|
|
1702
1716
|
|
|
1703
1717
|
/**
|