@ampcode/plugin 0.0.0-20260508003052-g98e7690 → 0.0.0-20260510003105-g670fa0a

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 +36 -0
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -109,6 +109,42 @@ declare module '@ampcode/plugin' {
109
109
 
110
110
  /** AI helpers */
111
111
  ai: PluginAI
112
+
113
+ /**
114
+ * Experimental plugin APIs that are not stable and may change or be removed.
115
+ *
116
+ * Agents should only build on these APIs when the user explicitly approves the
117
+ * use of experimental Amp plugin APIs.
118
+ */
119
+ experimental?: ExperimentalPluginAPI
120
+ }
121
+
122
+ /**
123
+ * APIs under `PluginAPI.experimental` are not stable and may change or be removed.
124
+ */
125
+ export interface ExperimentalPluginAPI {
126
+ /**
127
+ * Create a status item shown near the prompt editor or status bar in the Amp client.
128
+ *
129
+ * If no initial value is provided, the item is hidden until its first update.
130
+ */
131
+ createStatusItem(initial?: StatusItemValue): StatusItem
132
+ }
133
+
134
+ /**
135
+ * A plugin status item shown in supported Amp clients.
136
+ */
137
+ export interface StatusItem extends Subscription {
138
+ /** Update the status item content. */
139
+ update(value: StatusItemValue): void
140
+ }
141
+
142
+ export interface StatusItemValue {
143
+ /** Text to show. */
144
+ text: string
145
+
146
+ /** URL to open when clicked, if any. */
147
+ url?: string
112
148
  }
113
149
 
114
150
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ampcode/plugin",
3
- "version": "0.0.0-20260508003052-g98e7690",
3
+ "version": "0.0.0-20260510003105-g670fa0a",
4
4
  "description": "Amp Plugin API",
5
5
  "homepage": "https://ampcode.com/manual/plugin-api",
6
6
  "author": {