@ampcode/plugin 0.0.0-20261019001835-g91990d5 → 0.0.0-20261020212114-g2a60ebc

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.
package/LICENSE.md ADDED
@@ -0,0 +1 @@
1
+ © Sourcegraph Inc. All rights reserved. Use of Amp is subject to Amp's [Terms of Service](https://ampcode.com/terms), or separate Amp terms that you have signed with Sourcegraph Inc.
package/index.d.ts CHANGED
@@ -1540,7 +1540,7 @@ declare module '@ampcode/plugin' {
1540
1540
  /** Help text/description shown below the title */
1541
1541
  helpText?: string
1542
1542
 
1543
- /** Initial text value in the input field */
1543
+ /** Initial text value in the input field. Not allowed with `secret`: the request fails. */
1544
1544
  initialValue?: string
1545
1545
 
1546
1546
  /** Text for the submit button (default: "Submit") */
@@ -1615,7 +1615,8 @@ declare module '@ampcode/plugin' {
1615
1615
  /**
1616
1616
  * Treat a text field's value as a secret, as `secret` does for `ui.input`: clients let the
1617
1617
  * user hide it, only the thread owner can answer the dialog, and the answer is returned only
1618
- * to the requester. A secret field is single-line.
1618
+ * to the requester. A secret field is single-line, and its `value` must be empty: the
1619
+ * request fails otherwise.
1619
1620
  */
1620
1621
  secret?: boolean
1621
1622
  }
@@ -2077,7 +2078,12 @@ declare module '@ampcode/plugin' {
2077
2078
  export type FilePathFromURI = (uri: URI) => string
2078
2079
 
2079
2080
  /**
2080
- * Determines whether an instance of Error indicates that no Plugin UI is available.
2081
+ * Determines whether an error thrown by `ui.input`, `ui.confirm`, or `ui.select` means the
2082
+ * dialog could not be shown to anyone, as opposed to being shown and dismissed. This happens
2083
+ * when the client has no UI (for example `amp -x`) and when the tool was called from a
2084
+ * code_exec run that cannot wait for a person, such as one inside a subagent. A dismissed
2085
+ * dialog never throws; it resolves to
2086
+ * `undefined` or `false`.
2081
2087
  */
2082
2088
  export type IsPluginUINotAvailableError = (error: Error) => boolean
2083
2089
 
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@ampcode/plugin",
3
- "version": "0.0.0-20261019001835-g91990d5",
3
+ "version": "0.0.0-20261020212114-g2a60ebc",
4
4
  "description": "Amp Plugin API",
5
+ "license": "Amp Commercial License",
5
6
  "homepage": "https://ampcode.com/docs/plugin-api",
6
7
  "author": {
7
8
  "name": "The Amp Team",