@ampcode/plugin 0.0.0-20261114001205-ge2cc45a → 0.0.0-20261116001544-gd45788d

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 +23 -44
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -183,7 +183,9 @@ declare module '@ampcode/plugin' {
183
183
  onDispose(callback: () => void | Promise<void>): Subscription
184
184
 
185
185
  /**
186
- * Register a durable generic webhook for this plugin in an Amp-managed Orb.
186
+ * Register a durable generic webhook for this plugin in an Orb thread, including Orbs from a
187
+ * self-hosted Orb provider. Rejects anywhere else the plugin loads, such as a local Amp CLI
188
+ * session or `amp plugins list`, even when that command runs inside an Orb.
187
189
  *
188
190
  * Project threads owned by the same user share a registration for each plugin and key.
189
191
  * Threads without a project keep a separate registration for each thread. Re-registering
@@ -370,7 +372,7 @@ declare module '@ampcode/plugin' {
370
372
  export type BuiltinAgentMode = 'low' | 'medium' | 'high' | 'ultra' | 'smart' | 'deep' | 'rush'
371
373
 
372
374
  /**
373
- * A built-in agent mode or a coding model that plugins can run or extend. A coding model is
375
+ * A built-in agent mode or a coding model that plugins can run. A coding model is
374
376
  * the `provider/model` ID of a model in Amp's model picker, such as
375
377
  * `anthropic/claude-opus-5-5`: a thread on it runs that model with the model's own system
376
378
  * prompt, tools, and default reasoning effort. Other `provider/model` IDs are rejected.
@@ -383,10 +385,7 @@ declare module '@ampcode/plugin' {
383
385
  | {
384
386
  /** Tool names to include. Defaults to the agent's standard and external tools. */
385
387
  include?: readonly string[] | 'all'
386
- /**
387
- * Tool names added on top of the resolved include list. Use with `extends`
388
- * to add tools to the built-in mode's or model's tool list.
389
- */
388
+ /** Tool names added on top of the resolved include list, such as the model's tools. */
390
389
  add?: readonly string[]
391
390
  /** Tool names to exclude after applying include. */
392
391
  exclude?: readonly string[]
@@ -404,48 +403,34 @@ declare module '@ampcode/plugin' {
404
403
  * Optional agent identity. Amp includes this name in the base system prompt as
405
404
  * `You are <name>, a custom agent running in Amp.` It is also used for logs, UI,
406
405
  * and persisted run metadata. Omit it to avoid adding a named identity to the prompt.
407
- * Ignored when `extends` is set: the extended prompt carries no custom identity.
408
406
  */
409
407
  name?: string
410
408
  /**
411
- * Built-in agent mode or coding model this agent extends. Threads render that
412
- * mode's system prompt with `instructions` appended as agent instructions, and
413
- * `tools` defaults to the mode's tool list. When `model` is omitted, the agent
414
- * uses the mode's preferred model and reasoning effort. The agent is a separate
415
- * mode: the user's Tune Modes pins for the built-in mode do not change its
416
- * model. Deprecated modes (`smart`, `deep`, `rush`) resolve to their
417
- * replacement mode.
418
- *
419
- * A coding model's `provider/model` ID, such as `anthropic/claude-opus-5-5`,
420
- * extends a thread on that model: the agent uses the model's own system prompt
421
- * and tool list, and when `model` is omitted, that model at its default
422
- * reasoning effort.
409
+ * @deprecated Agents no longer build on a built-in mode. Ignored next to `model`;
410
+ * `createAgent` throws when it is set without one.
423
411
  */
424
- extends?: BuiltinAgentKey
412
+ extends?: string
425
413
  /**
426
414
  * Model identifier in `provider/model` format, such as `anthropic/claude-sonnet-4-6`.
427
- * Required unless `extends` is set, in which case it defaults to the extended
428
- * mode's preferred model, or to the extended coding model.
429
415
  *
430
416
  * Run `amp plugins show-agent-options --json` for the public model IDs intended for
431
417
  * plugin agents.
432
418
  */
433
- model?: PluginAgentModel
419
+ model: PluginAgentModel
434
420
  /**
435
- * Instructions appended to Amp's base agent prompt, or to the extended mode's
436
- * prompt when `extends` is set. Required unless `extends` is set.
421
+ * Instructions appended to Amp's base agent prompt. Omit them to run the model with
422
+ * Amp's own system prompt for it, the prompt a normal thread on that model gets.
437
423
  */
438
424
  instructions?: string
439
425
  /**
440
426
  * Set true to use `instructions` verbatim as the entire system prompt, without Amp's
441
427
  * base prompt, identity, environment, or workspace guidance. Defaults to false.
442
- * Overrides the prompt inherited through `extends`, but not its model or tools.
443
428
  * Tool definitions and conversation messages are unaffected.
444
429
  */
445
430
  omitDefaultSystemPrompt?: boolean
446
431
  /**
447
- * Tools available to this agent. Use 'all' for its provider-appropriate built-in tools
448
- * plus plugin, MCP, and remote tools available in its runtime.
432
+ * Tools available to this agent. Defaults to 'all': the built-in tools a normal thread
433
+ * on its model gets, plus plugin, MCP, and remote tools available in its runtime.
449
434
  *
450
435
  * An array or an explicit `include` array replaces the default tool list, including
451
436
  * delegation tools. Use `add` to extend the default list; `exclude` always wins.
@@ -475,8 +460,8 @@ declare module '@ampcode/plugin' {
475
460
  reasoningEffort?: AgentReasoningEffort
476
461
  /**
477
462
  * Estimated input-token count at which Amp automatically compacts the thread.
478
- * Must be a positive safe integer. When omitted, Amp uses the configured
479
- * percentage threshold, which defaults to 90%.
463
+ * Must be a positive safe integer. When omitted, Amp compacts at 90% of the
464
+ * model's input limit, or at the model's own token threshold when that is lower.
480
465
  */
481
466
  compactionThresholdTokens?: number
482
467
  /**
@@ -505,9 +490,7 @@ declare module '@ampcode/plugin' {
505
490
 
506
491
  export interface CustomAgentDefinition extends CreateAgentConfig {
507
492
  readonly kind: 'agent-definition'
508
- /** Resolved model. Filled from the extended mode or model when `model` was omitted. */
509
- model: PluginAgentModel
510
- /** Resolved instructions. Empty when omitted on an extending agent. */
493
+ /** Resolved instructions. Empty when omitted. */
511
494
  instructions: string
512
495
  }
513
496
 
@@ -2647,23 +2630,19 @@ declare module '@ampcode/plugin' {
2647
2630
  /** Label color as a hex RGB string, for example "#d97706". */
2648
2631
  color?: string
2649
2632
  /**
2650
- * Built-in agent mode this agent extends. Threads render that mode's system prompt with
2651
- * the agent's `instructions.md` appended as agent instructions, and `tools` defaults to
2652
- * the mode's tool list. When `model` is omitted, the agent uses the mode's preferred
2653
- * model and reasoning effort. The agent is a separate mode: the user's Tune Modes pins
2654
- * for the built-in mode do not change its model.
2633
+ * @deprecated Agents no longer build on a built-in mode. Ignored next to `model`; an
2634
+ * agent that sets it without `model` fails to load.
2655
2635
  */
2656
- extends?: 'low' | 'medium' | 'high' | 'ultra'
2636
+ extends?: string
2657
2637
  /**
2658
2638
  * Set true to use `instructions.md` verbatim as the entire system prompt, without
2659
2639
  * Amp's base prompt, identity, environment, workspace, or MCP server guidance.
2660
- * Defaults to false. Overrides the prompt inherited through `extends`, but not its
2661
- * model or tools. Tool definitions and conversation messages are unaffected.
2640
+ * Defaults to false. Tool definitions and conversation messages are unaffected.
2662
2641
  */
2663
2642
  omitDefaultSystemPrompt?: boolean
2664
2643
  /**
2665
2644
  * Model identifier in `provider/model` format, such as `anthropic/claude-sonnet-4-6`.
2666
- * Omit to use the default model, or the extended mode's model when `extends` is set.
2645
+ * Omit to use the Staff Pick, the model Amp's model picker recommends.
2667
2646
  */
2668
2647
  model?: PluginAIModel
2669
2648
  /** Run entirely on Amp's thread actor without creating or attaching an executor. */
@@ -2677,8 +2656,8 @@ declare module '@ampcode/plugin' {
2677
2656
  /**
2678
2657
  * Built-in tools available to this agent: 'all' for all tools available in its runtime,
2679
2658
  * a list of tool names with `*` suffix wildcards, or an object that adjusts the default
2680
- * list (`add` unions extra tools into it; `exclude` removes tools). Use `add` with
2681
- * `extends` to add tools on top of the built-in mode's tool list. `mcp__*` matches all
2659
+ * list, the tools a normal thread on the agent's model gets (`add` unions extra tools
2660
+ * into it; `exclude` removes tools). `mcp__*` matches all
2682
2661
  * MCP tools and `plugin__*` matches all plugin tools (also matched as
2683
2662
  * `plugin__<pluginName>__<toolName>`). MCP servers are reached through `tool_search` and
2684
2663
  * `code_exec`, which every agent gets unless `exclude` names them.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ampcode/plugin",
3
- "version": "0.0.0-20261114001205-ge2cc45a",
3
+ "version": "0.0.0-20261116001544-gd45788d",
4
4
  "description": "Amp Plugin API",
5
5
  "license": "Amp Commercial License",
6
6
  "homepage": "https://ampcode.com/docs/plugin-api",