@ampcode/plugin 0.0.0-20260624023801-gf6a0633 → 0.0.0-20260625023905-g22f8e42

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 +10 -6
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -129,9 +129,11 @@ declare module '@ampcode/plugin' {
129
129
  /**
130
130
  * Register a custom agent mode that clients may show alongside built-in modes.
131
131
  *
132
- * Web clients discover plugin modes from `// @amp-agent-mode ...` metadata
133
- * comments without executing plugin code. Include one comment for each
134
- * registered mode; multiple mode comments in one plugin file are supported.
132
+ * External plugins must include a matching `// @amp-agent-mode ...` metadata
133
+ * comment with the mode `key` and `label` for each registered mode. Clients
134
+ * use this static metadata to avoid silent drift between runtime registration
135
+ * and discovery, and warn when they are out of sync.
136
+ * Multiple mode comments in one plugin file are supported.
135
137
  */
136
138
  registerAgentMode(definition: PluginAgentModeDefinition): Subscription
137
139
 
@@ -186,9 +188,11 @@ declare module '@ampcode/plugin' {
186
188
  /**
187
189
  * Register a custom agent mode that clients may show alongside built-in modes.
188
190
  *
189
- * Web clients discover plugin modes from `// @amp-agent-mode ...` metadata
190
- * comments without executing plugin code. Include one comment for each
191
- * registered mode; multiple mode comments in one plugin file are supported.
191
+ * External plugins must include a matching `// @amp-agent-mode ...` metadata
192
+ * comment with the mode `key` and `label` for each registered mode. Clients
193
+ * use this static metadata to avoid silent drift between runtime registration
194
+ * and discovery, and warn when they are out of sync.
195
+ * Multiple mode comments in one plugin file are supported.
192
196
  */
193
197
  registerAgentMode(definition: PluginAgentModeDefinition): Subscription
194
198
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ampcode/plugin",
3
- "version": "0.0.0-20260624023801-gf6a0633",
3
+ "version": "0.0.0-20260625023905-g22f8e42",
4
4
  "description": "Amp Plugin API",
5
5
  "homepage": "https://ampcode.com/manual/plugin-api",
6
6
  "author": {