@ampcode/plugin 0.0.0-20261008001818-g5d841b4 → 0.0.0-20261009001947-g229e998

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 +27 -1
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -1489,13 +1489,23 @@ declare module '@ampcode/plugin' {
1489
1489
  * Require a human response rather than an agent response. The thread owner can answer these
1490
1490
  * dialogs. While multiplayer is active, human contributors can also answer interactive
1491
1491
  * selections, confirmations, and non-secret inputs, including dialogs with `requireHuman: true`.
1492
- * Secret inputs (`secret: true`) remain owner-only and always require a human. Dialogs targeted
1492
+ * Secret inputs (`secret: true`) and confirmations with a secret field remain owner-only and
1493
+ * always require a human. Dialogs targeted
1493
1494
  * to a specific connection are not shared with contributors.
1494
1495
  *
1495
1496
  * Use this for approval and permission prompts. It does not grant agents access to dialogs
1496
1497
  * or enable them to answer on the owner's behalf.
1497
1498
  */
1498
1499
  requireHuman?: boolean
1500
+
1501
+ /**
1502
+ * Do not show the dialog when nobody who can answer it has the thread open, for example in
1503
+ * a scheduled or Slack-started thread nobody is watching. The dialog then resolves at once
1504
+ * as dismissed (`undefined`) instead of waiting and marking the thread as needing action.
1505
+ * Use this for prompts that are useful only while someone is watching. In the terminal
1506
+ * app the user is always present, so the dialog is always shown.
1507
+ */
1508
+ skipIfUnwatched?: boolean
1499
1509
  }
1500
1510
 
1501
1511
  /**
@@ -1514,6 +1524,9 @@ declare module '@ampcode/plugin' {
1514
1524
  /** Text for the submit button (default: "Submit") */
1515
1525
  submitButtonText?: string
1516
1526
 
1527
+ /** Placeholder shown in the empty input field */
1528
+ placeholder?: string
1529
+
1517
1530
  /**
1518
1531
  * Treat the entered text as a secret such as an API key or password. Clients present the
1519
1532
  * text as sensitive (the TUI masks it; the web dialog lets the user hide it), and the value
@@ -1553,6 +1566,9 @@ declare module '@ampcode/plugin' {
1553
1566
  * browser, for example an approval page in another app; the dialog stays open so the user
1554
1567
  * can still confirm or cancel afterwards. Image and link fields are omitted from the
1555
1568
  * returned values. Defaults to `text`.
1569
+ *
1570
+ * When a link field comes before a text field, clients show the fields as numbered steps:
1571
+ * for example "open the sign-in page", then "paste the URL it ends on".
1556
1572
  */
1557
1573
  type?: 'text' | 'image' | 'link'
1558
1574
 
@@ -1570,6 +1586,16 @@ declare module '@ampcode/plugin' {
1570
1586
 
1571
1587
  /** Allow a text field to be left empty. Text fields are required unless this is set. */
1572
1588
  optional?: boolean
1589
+
1590
+ /** Placeholder shown in an empty text field */
1591
+ placeholder?: string
1592
+
1593
+ /**
1594
+ * Treat a text field's value as a secret, as `secret` does for `ui.input`: clients let the
1595
+ * user hide it, only the thread owner can answer the dialog, and the answer is returned only
1596
+ * to the requester. A secret field is single-line.
1597
+ */
1598
+ secret?: boolean
1573
1599
  }
1574
1600
 
1575
1601
  /** Options for a confirmation dialog that returns edited field values. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ampcode/plugin",
3
- "version": "0.0.0-20261008001818-g5d841b4",
3
+ "version": "0.0.0-20261009001947-g229e998",
4
4
  "description": "Amp Plugin API",
5
5
  "homepage": "https://ampcode.com/docs/plugin-api",
6
6
  "author": {