@ampcode/plugin 0.0.0-20260709003202-g32d9f9d → 0.0.0-20260711002658-g78d5e54

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 +38 -8
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -120,9 +120,11 @@ declare module '@ampcode/plugin' {
120
120
  createAgent(config: CreateAgentConfig): Agent
121
121
 
122
122
  /**
123
- * Get an agent handle for one of Amp's built-in agent modes (`smart`,
124
- * `deep`, or `rush`). Threads spawned from the handle run the built-in
125
- * mode's prompt and tools, like a thread the user started in that mode.
123
+ * Get an agent handle for one of Amp's built-in agent modes (`low`,
124
+ * `medium`, `high`, or `ultra`). Threads spawned from the handle run the
125
+ * built-in mode's prompt and tools, like a thread the user started in that
126
+ * mode. Deprecated modes (`smart`, `deep`, `rush`) are accepted for
127
+ * backward compatibility and spawn threads in their replacement mode.
126
128
  */
127
129
  getBuiltinAgent(mode: BuiltinAgentMode, options?: GetBuiltinAgentOptions): Agent
128
130
 
@@ -179,9 +181,11 @@ declare module '@ampcode/plugin' {
179
181
  createAgent(config: CreateAgentConfig): Agent
180
182
 
181
183
  /**
182
- * Get an agent handle for one of Amp's built-in agent modes (`smart`,
183
- * `deep`, or `rush`). Threads spawned from the handle run the built-in
184
- * mode's prompt and tools, like a thread the user started in that mode.
184
+ * Get an agent handle for one of Amp's built-in agent modes (`low`,
185
+ * `medium`, `high`, or `ultra`). Threads spawned from the handle run the
186
+ * built-in mode's prompt and tools, like a thread the user started in that
187
+ * mode. Deprecated modes (`smart`, `deep`, `rush`) are accepted for
188
+ * backward compatibility and spawn threads in their replacement mode.
185
189
  */
186
190
  getBuiltinAgent(mode: BuiltinAgentMode, options?: GetBuiltinAgentOptions): Agent
187
191
 
@@ -231,8 +235,13 @@ declare module '@ampcode/plugin' {
231
235
  | 'xhigh'
232
236
  | 'max'
233
237
 
234
- /** Amp built-in agent modes available to plugins. */
235
- export type BuiltinAgentMode = 'smart' | 'deep' | 'rush'
238
+ /**
239
+ * Amp built-in agent modes available to plugins. The `smart`, `deep`, and
240
+ * `rush` modes are deprecated: existing threads in those modes keep working,
241
+ * but new threads spawned from them start in the replacement mode
242
+ * (`rush` → `low`; `smart`/`deep` → `medium`).
243
+ */
244
+ export type BuiltinAgentMode = 'low' | 'medium' | 'high' | 'ultra' | 'smart' | 'deep' | 'rush'
236
245
 
237
246
  export type AgentToolSelection =
238
247
  | readonly string[]
@@ -300,6 +309,15 @@ declare module '@ampcode/plugin' {
300
309
  reasoningEffort?: AgentReasoningEffort
301
310
  }
302
311
 
312
+ export type AgentThreadExecutor =
313
+ | 'local'
314
+ | 'orb'
315
+ | {
316
+ type: 'runner'
317
+ /** Stable ID of a live Amp runner process. */
318
+ id: string
319
+ }
320
+
303
321
  export interface RunAgentOptions {
304
322
  /** Maximum time to wait for the agent run to finish, in milliseconds (default 10 minutes). */
305
323
  timeoutMs?: number
@@ -308,6 +326,12 @@ declare module '@ampcode/plugin' {
308
326
  * When omitted, the thread is created without a parent.
309
327
  */
310
328
  parentThreadID?: ThreadID
329
+ /**
330
+ * Where the thread should execute. Defaults to `local`, which uses the current
331
+ * client as the executor. Use `orb` for Amp's cloud sandbox or a runner target
332
+ * for a live Amp runner process such as `amp --no-tui`.
333
+ */
334
+ executor?: AgentThreadExecutor
311
335
  }
312
336
 
313
337
  export interface CreateAgentThreadOptions {
@@ -318,6 +342,12 @@ declare module '@ampcode/plugin' {
318
342
  parentThreadID?: ThreadID
319
343
  /** Show the created thread and make it active in the client when supported. */
320
344
  show?: boolean
345
+ /**
346
+ * Where the thread should execute. Defaults to `local`, which uses the current
347
+ * client as the executor. Use `orb` for Amp's cloud sandbox or a runner target
348
+ * for a live Amp runner process such as `amp --no-tui`.
349
+ */
350
+ executor?: AgentThreadExecutor
321
351
  }
322
352
 
323
353
  /** Thread handle returned by {@link Agent.createThread}. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ampcode/plugin",
3
- "version": "0.0.0-20260709003202-g32d9f9d",
3
+ "version": "0.0.0-20260711002658-g78d5e54",
4
4
  "description": "Amp Plugin API",
5
5
  "homepage": "https://ampcode.com/manual/plugin-api",
6
6
  "author": {