@ampcode/plugin 0.0.0-20260930001919-g9299b2d → 0.0.0-20261002001904-gdc609b2

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 +19 -8
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -407,6 +407,11 @@ declare module '@ampcode/plugin' {
407
407
  * even though plugin tools are registered under their bare names). Include such an entry
408
408
  * in explicit lists so the user's plugin and MCP tools stay available.
409
409
  *
410
+ * MCP tools are not sent to the model as individual tools. Every agent gets `tool_search`
411
+ * and `code_exec` (unless `exclude` names them) and reaches all MCP servers through them as
412
+ * deferred code-mode modules, so a large MCP catalog does not fill the context window.
413
+ * Exclude both to send the MCP tools the list selects directly instead.
414
+ *
410
415
  * Run `amp plugins show-agent-options --json` for built-in tool names intended for
411
416
  * plugin agents.
412
417
  */
@@ -685,6 +690,7 @@ declare module '@ampcode/plugin' {
685
690
  | 'meta'
686
691
  | 'minimax'
687
692
  | 'moonshotai'
693
+ | 'ollama-cloud'
688
694
  | 'openai'
689
695
  | 'thinkingmachines'
690
696
  | 'xai'
@@ -1344,17 +1350,20 @@ declare module '@ampcode/plugin' {
1344
1350
  export interface PluginConfirmField {
1345
1351
  /**
1346
1352
  * How to show the field. Text fields are editable. Image fields show a read-only preview
1347
- * of an HTTP(S) image URL and are omitted from the returned values. Defaults to `text`.
1353
+ * of an HTTP(S) image URL. Link fields show a button that opens an HTTP(S) URL in the
1354
+ * browser, for example an approval page in another app; the dialog stays open so the user
1355
+ * can still confirm or cancel afterwards. Image and link fields are omitted from the
1356
+ * returned values. Defaults to `text`.
1348
1357
  */
1349
- type?: 'text' | 'image'
1358
+ type?: 'text' | 'image' | 'link'
1350
1359
 
1351
1360
  /** Stable key used in the returned record */
1352
1361
  name: string
1353
1362
 
1354
- /** Label shown above the field */
1363
+ /** Label shown above a text or image field, or the button text of a link field */
1355
1364
  label: string
1356
1365
 
1357
- /** Initial text value or, for an image field, an HTTP(S) image URL */
1366
+ /** Initial text value or, for an image or link field, an HTTP(S) URL */
1358
1367
  value: string
1359
1368
 
1360
1369
  /** Allow a text field to span multiple lines */
@@ -1405,9 +1414,10 @@ declare module '@ampcode/plugin' {
1405
1414
  input(options: PluginInputOptions): Promise<string | undefined>
1406
1415
 
1407
1416
  /**
1408
- * Show editable text fields and read-only image previews in a confirmation dialog.
1409
- * @returns The edited text values by field name, or undefined if cancelled. Image fields
1410
- * are omitted.
1417
+ * Show editable text fields, read-only image previews, and link buttons in a confirmation
1418
+ * dialog.
1419
+ * @returns The edited text values by field name, or undefined if cancelled. Image and link
1420
+ * fields are omitted.
1411
1421
  */
1412
1422
  confirm(options: PluginEditableConfirmOptions): Promise<Record<string, string> | undefined>
1413
1423
  /**
@@ -2055,7 +2065,8 @@ declare module '@ampcode/plugin' {
2055
2065
  * list (`add` unions extra tools into it; `exclude` removes tools). Use `add` with
2056
2066
  * `extends` to add tools on top of the built-in mode's tool list. `mcp__*` matches all
2057
2067
  * MCP tools and `plugin__*` matches all plugin tools (also matched as
2058
- * `plugin__<pluginName>__<toolName>`).
2068
+ * `plugin__<pluginName>__<toolName>`). MCP servers are reached through `tool_search` and
2069
+ * `code_exec`, which every agent gets unless `exclude` names them.
2059
2070
  */
2060
2071
  tools?:
2061
2072
  | 'all'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ampcode/plugin",
3
- "version": "0.0.0-20260930001919-g9299b2d",
3
+ "version": "0.0.0-20261002001904-gdc609b2",
4
4
  "description": "Amp Plugin API",
5
5
  "homepage": "https://ampcode.com/docs/plugin-api",
6
6
  "author": {