@ampcode/plugin 0.0.0-20261112001220-gbe68d4b → 0.0.0-20261113001202-g919feb0

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 +40 -23
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -227,12 +227,14 @@ declare module '@ampcode/plugin' {
227
227
 
228
228
  /**
229
229
  * Get an agent handle for one of Amp's built-in agent modes (`low`,
230
- * `medium`, `high`, or `ultra`). Threads spawned from the handle run the
231
- * built-in mode's prompt and tools, like a thread the user started in that
232
- * mode. Deprecated modes (`smart`, `deep`, `rush`) are accepted for
233
- * backward compatibility and spawn threads in their replacement mode.
230
+ * `medium`, `high`, or `ultra`) or coding models (a `provider/model` ID such as
231
+ * `anthropic/claude-opus-5-5`). Threads spawned from the handle run like a thread
232
+ * the user started in that mode, or on that model in the model picker: the same
233
+ * system prompt, tools, model, and default reasoning effort. Deprecated modes
234
+ * (`smart`, `deep`, `rush`) are accepted for backward compatibility and spawn
235
+ * threads in their replacement mode. Throws for any other key.
234
236
  */
235
- getBuiltinAgent(mode: BuiltinAgentMode): Agent
237
+ getBuiltinAgent(mode: BuiltinAgentKey): Agent
236
238
 
237
239
  /**
238
240
  * Register a custom agent mode that clients may show alongside built-in modes.
@@ -288,12 +290,14 @@ declare module '@ampcode/plugin' {
288
290
 
289
291
  /**
290
292
  * Get an agent handle for one of Amp's built-in agent modes (`low`,
291
- * `medium`, `high`, or `ultra`). Threads spawned from the handle run the
292
- * built-in mode's prompt and tools, like a thread the user started in that
293
- * mode. Deprecated modes (`smart`, `deep`, `rush`) are accepted for
294
- * backward compatibility and spawn threads in their replacement mode.
293
+ * `medium`, `high`, or `ultra`) or coding models (a `provider/model` ID such as
294
+ * `anthropic/claude-opus-5-5`). Threads spawned from the handle run like a thread
295
+ * the user started in that mode, or on that model in the model picker: the same
296
+ * system prompt, tools, model, and default reasoning effort. Deprecated modes
297
+ * (`smart`, `deep`, `rush`) are accepted for backward compatibility and spawn
298
+ * threads in their replacement mode. Throws for any other key.
295
299
  */
296
- getBuiltinAgent(mode: BuiltinAgentMode): Agent
300
+ getBuiltinAgent(mode: BuiltinAgentKey): Agent
297
301
 
298
302
  /**
299
303
  * Register a custom agent mode that clients may show alongside built-in modes.
@@ -352,6 +356,14 @@ declare module '@ampcode/plugin' {
352
356
  */
353
357
  export type BuiltinAgentMode = 'low' | 'medium' | 'high' | 'ultra' | 'smart' | 'deep' | 'rush'
354
358
 
359
+ /**
360
+ * A built-in agent mode or a coding model that plugins can run or extend. A coding model is
361
+ * the `provider/model` ID of a model in Amp's model picker, such as
362
+ * `anthropic/claude-opus-5-5`: a thread on it runs that model with the model's own system
363
+ * prompt, tools, and default reasoning effort. Other `provider/model` IDs are rejected.
364
+ */
365
+ export type BuiltinAgentKey = BuiltinAgentMode | PluginAgentModel
366
+
355
367
  export type AgentToolSelection =
356
368
  | readonly string[]
357
369
  | 'all'
@@ -360,7 +372,7 @@ declare module '@ampcode/plugin' {
360
372
  include?: readonly string[] | 'all'
361
373
  /**
362
374
  * Tool names added on top of the resolved include list. Use with `extends`
363
- * to add tools to the built-in mode's tool list.
375
+ * to add tools to the built-in mode's or model's tool list.
364
376
  */
365
377
  add?: readonly string[]
366
378
  /** Tool names to exclude after applying include. */
@@ -379,23 +391,28 @@ declare module '@ampcode/plugin' {
379
391
  * Optional agent identity. Amp includes this name in the base system prompt as
380
392
  * `You are <name>, a custom agent running in Amp.` It is also used for logs, UI,
381
393
  * and persisted run metadata. Omit it to avoid adding a named identity to the prompt.
382
- * Ignored when `extends` is set: the built-in mode's prompt carries no custom identity.
394
+ * Ignored when `extends` is set: the extended prompt carries no custom identity.
383
395
  */
384
396
  name?: string
385
397
  /**
386
- * Built-in agent mode this agent extends. Threads render that mode's system
387
- * prompt with `instructions` appended as agent instructions, and `tools`
388
- * defaults to the mode's tool list. When `model` is omitted, the agent uses
389
- * the mode's preferred model and reasoning effort. The agent is a separate
398
+ * Built-in agent mode or coding model this agent extends. Threads render that
399
+ * mode's system prompt with `instructions` appended as agent instructions, and
400
+ * `tools` defaults to the mode's tool list. When `model` is omitted, the agent
401
+ * uses the mode's preferred model and reasoning effort. The agent is a separate
390
402
  * mode: the user's Tune Modes pins for the built-in mode do not change its
391
- * model. Deprecated modes
392
- * (`smart`, `deep`, `rush`) resolve to their replacement mode.
403
+ * model. Deprecated modes (`smart`, `deep`, `rush`) resolve to their
404
+ * replacement mode.
405
+ *
406
+ * A coding model's `provider/model` ID, such as `anthropic/claude-opus-5-5`,
407
+ * extends a thread on that model: the agent uses the model's own system prompt
408
+ * and tool list, and when `model` is omitted, that model at its default
409
+ * reasoning effort.
393
410
  */
394
- extends?: BuiltinAgentMode
411
+ extends?: BuiltinAgentKey
395
412
  /**
396
413
  * Model identifier in `provider/model` format, such as `anthropic/claude-sonnet-4-6`.
397
414
  * Required unless `extends` is set, in which case it defaults to the extended
398
- * mode's preferred model.
415
+ * mode's preferred model, or to the extended coding model.
399
416
  *
400
417
  * Run `amp plugins show-agent-options --json` for the public model IDs intended for
401
418
  * plugin agents.
@@ -475,16 +492,16 @@ declare module '@ampcode/plugin' {
475
492
 
476
493
  export interface CustomAgentDefinition extends CreateAgentConfig {
477
494
  readonly kind: 'agent-definition'
478
- /** Resolved model. Filled from the extended mode when `model` was omitted. */
495
+ /** Resolved model. Filled from the extended mode or model when `model` was omitted. */
479
496
  model: PluginAgentModel
480
497
  /** Resolved instructions. Empty when omitted on an extending agent. */
481
498
  instructions: string
482
499
  }
483
500
 
484
- /** Reference to one of Amp's built-in agent modes. */
501
+ /** Reference to one of Amp's built-in agent modes or coding models. */
485
502
  export interface BuiltinAgentDefinition {
486
503
  readonly kind: 'builtin-agent'
487
- mode: BuiltinAgentMode
504
+ mode: BuiltinAgentKey
488
505
  }
489
506
 
490
507
  export type AgentDefinition = CustomAgentDefinition | BuiltinAgentDefinition
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ampcode/plugin",
3
- "version": "0.0.0-20261112001220-gbe68d4b",
3
+ "version": "0.0.0-20261113001202-g919feb0",
4
4
  "description": "Amp Plugin API",
5
5
  "license": "Amp Commercial License",
6
6
  "homepage": "https://ampcode.com/docs/plugin-api",