@ampcode/plugin 0.0.0-20260909001753-g82ca44d → 0.0.0-20260911001813-gd475de6

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 +10 -5
  2. 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 using Bun's shell.
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
@@ -473,7 +473,10 @@ declare module '@ampcode/plugin' {
473
473
  }
474
474
 
475
475
  export interface RunAgentOptions {
476
- /** Maximum time to wait for the agent run to finish, in milliseconds (default 10 minutes). */
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
+ */
477
480
  timeoutMs?: number
478
481
  /**
479
482
  * Parent thread for this run when the agent is being used as a subagent/tool.
@@ -890,7 +893,9 @@ declare module '@ampcode/plugin' {
890
893
  }
891
894
 
892
895
  /**
893
- * Bun shell function type (simplified version of Bun.$)
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()`.
894
899
  */
895
900
  export type ShellFunction = (
896
901
  strings: TemplateStringsArray,
@@ -1564,7 +1569,7 @@ declare module '@ampcode/plugin' {
1564
1569
  /** Scoped logger for plugin output. Log messages are appended to the handler's trace span events. */
1565
1570
  logger: PluginLogger
1566
1571
 
1567
- /** Bun's shell API for executing commands */
1572
+ /** Tagged-template shell command runner. See {@link ShellFunction}. */
1568
1573
  $: ShellFunction
1569
1574
 
1570
1575
  /** Platform UI capabilities */
@@ -1706,7 +1711,7 @@ declare module '@ampcode/plugin' {
1706
1711
  /** System capabilities and information */
1707
1712
  system: PluginSystem
1708
1713
 
1709
- /** Bun's shell API for executing commands */
1714
+ /** Tagged-template shell command runner. See {@link ShellFunction}. */
1710
1715
  $: ShellFunction
1711
1716
 
1712
1717
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ampcode/plugin",
3
- "version": "0.0.0-20260909001753-g82ca44d",
3
+ "version": "0.0.0-20260911001813-gd475de6",
4
4
  "description": "Amp Plugin API",
5
5
  "homepage": "https://ampcode.com/docs/plugin-api",
6
6
  "author": {