@ampcode/plugin 0.0.0-20261023001716-ge290a2a → 0.0.0-20261025001826-g01ee656

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 +18 -43
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -420,19 +420,6 @@ declare module '@ampcode/plugin' {
420
420
  tools?: AgentToolSelection
421
421
  /** Optional reasoning effort override for models that support it. */
422
422
  reasoningEffort?: AgentReasoningEffort
423
- /**
424
- * Model and reasoning effort for the Oracle consulted from threads running this
425
- * agent. Omitted fields keep Amp's automatic routing and default effort. An
426
- * unavailable model falls back to Amp's routing at run time.
427
- */
428
- oracle?: AgentSubagentPin
429
- /**
430
- * Model and reasoning effort for the other subagents spawned from threads running
431
- * this agent (Task workers, finder, thread reader, librarian). Omitted fields keep
432
- * Amp's automatic routing and default effort. An unavailable model falls back to
433
- * Amp's routing at run time.
434
- */
435
- subagents?: AgentSubagentPin
436
423
  /**
437
424
  * Estimated input-token count at which Amp automatically compacts the thread.
438
425
  * Must be a positive safe integer. When omitted, Amp uses the configured
@@ -455,20 +442,6 @@ declare module '@ampcode/plugin' {
455
442
  display?: AgentDisplay
456
443
  }
457
444
 
458
- /**
459
- * A model pin for one subagent role of a custom agent: the Oracle or the other subagents.
460
- * Each field overrides independently.
461
- */
462
- export interface AgentSubagentPin {
463
- /**
464
- * Model identifier in `provider/model` format, such as `anthropic/claude-sonnet-4-6`.
465
- * Omit to keep Amp's automatic model routing for the role.
466
- */
467
- model?: PluginAgentModel
468
- /** Reasoning effort for the role's model. Omit to keep the role's default effort. */
469
- effort?: AgentReasoningEffort
470
- }
471
-
472
445
  /** Display metadata for a plugin agent. */
473
446
  export interface AgentDisplay {
474
447
  /** Label shown in mode pickers and thread headers, 24 characters or less. */
@@ -1616,8 +1589,10 @@ declare module '@ampcode/plugin' {
1616
1589
  * How to show the field. Text fields are editable. Image fields show a read-only preview
1617
1590
  * of an HTTP(S) image URL. Link fields show a button that opens an HTTP(S) URL in the
1618
1591
  * browser, for example an approval page in another app; the dialog stays open so the user
1619
- * can still confirm or cancel afterwards. Image and link fields are omitted from the
1620
- * returned values. Defaults to `text`.
1592
+ * can still confirm or cancel afterwards. Attachment fields show a read-only card for the
1593
+ * file at an HTTP(S) URL, such as an email attachment: its name (`label`), type, and size,
1594
+ * with a preview where the client can render one. Image, link, and attachment fields are
1595
+ * omitted from the returned values unless they are `removable`. Defaults to `text`.
1621
1596
  *
1622
1597
  * File fields take a small text file, such as a key or certificate, and return its text
1623
1598
  * in place of a typed value. The web client shows a drop zone that also opens the file
@@ -1631,7 +1606,7 @@ declare module '@ampcode/plugin' {
1631
1606
  * only field is one link, the user must open it before they can confirm: the primary
1632
1607
  * button opens the link, then becomes the confirm button.
1633
1608
  */
1634
- type?: 'text' | 'image' | 'link' | 'file'
1609
+ type?: 'text' | 'image' | 'link' | 'file' | 'attachment'
1635
1610
 
1636
1611
  /**
1637
1612
  * File extensions a file field's picker offers, such as `['.p8']`. Advisory: the user can
@@ -1651,6 +1626,19 @@ declare module '@ampcode/plugin' {
1651
1626
  /** Allow a text field to span multiple lines */
1652
1627
  multiline?: boolean
1653
1628
 
1629
+ /** The MIME type of an attachment field's file, such as `application/pdf`; picks its preview */
1630
+ mimeType?: string
1631
+
1632
+ /** The size in bytes of an attachment field's file, shown on its card */
1633
+ sizeBytes?: number
1634
+
1635
+ /**
1636
+ * Let the user remove an image or attachment field before confirming, for example an
1637
+ * attachment they do not want to send. The returned values then include the field: its
1638
+ * `value` when kept, or an empty string when removed.
1639
+ */
1640
+ removable?: boolean
1641
+
1654
1642
  /** Allow a text field to be left empty. Text fields are required unless this is set. */
1655
1643
  optional?: boolean
1656
1644
 
@@ -2408,19 +2396,6 @@ declare module '@ampcode/plugin' {
2408
2396
  }
2409
2397
  /** Optional reasoning effort override for models that support it. */
2410
2398
  reasoningEffort?: AgentReasoningEffort
2411
- /**
2412
- * Model and reasoning effort for the Oracle consulted from threads running this
2413
- * agent. Omitted fields keep Amp's automatic routing and default effort. An
2414
- * unavailable model falls back to Amp's routing at run time.
2415
- */
2416
- oracle?: AgentSubagentPin
2417
- /**
2418
- * Model and reasoning effort for the other subagents spawned from threads running
2419
- * this agent (Task workers, finder, thread reader, librarian). Omitted fields keep
2420
- * Amp's automatic routing and default effort. An unavailable model falls back to
2421
- * Amp's routing at run time.
2422
- */
2423
- subagents?: AgentSubagentPin
2424
2399
  /** Features required on threads created from this agent. */
2425
2400
  features?: readonly AgentFeature[]
2426
2401
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ampcode/plugin",
3
- "version": "0.0.0-20261023001716-ge290a2a",
3
+ "version": "0.0.0-20261025001826-g01ee656",
4
4
  "description": "Amp Plugin API",
5
5
  "license": "Amp Commercial License",
6
6
  "homepage": "https://ampcode.com/docs/plugin-api",