@ampcode/plugin 0.0.0-20260305001732-gd462169 → 0.0.0-20260306002157-g627c2bb
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/index.d.ts +19 -18
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -27,8 +27,8 @@ declare module '@ampcode/plugin' {
|
|
|
27
27
|
/** Logger scoped to this plugin */
|
|
28
28
|
logger: PluginLogger
|
|
29
29
|
|
|
30
|
-
/**
|
|
31
|
-
|
|
30
|
+
/** System capabilities and environment information */
|
|
31
|
+
system: PluginSystem
|
|
32
32
|
|
|
33
33
|
/** Observable configuration that streams changes */
|
|
34
34
|
configuration: PluginConfiguration<Record<string, unknown>>
|
|
@@ -218,6 +218,18 @@ declare module '@ampcode/plugin' {
|
|
|
218
218
|
stderr: string
|
|
219
219
|
}
|
|
220
220
|
|
|
221
|
+
/**
|
|
222
|
+
* Where plugin code is running relative to the interactive UI.
|
|
223
|
+
*/
|
|
224
|
+
export type PluginExecutorKind = 'local' | 'remote' | 'unknown'
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Information about the executor running plugin code.
|
|
228
|
+
*/
|
|
229
|
+
export interface PluginExecutor {
|
|
230
|
+
readonly kind: PluginExecutorKind
|
|
231
|
+
}
|
|
232
|
+
|
|
221
233
|
/**
|
|
222
234
|
* System capabilities provided to plugins.
|
|
223
235
|
*/
|
|
@@ -233,6 +245,11 @@ declare module '@ampcode/plugin' {
|
|
|
233
245
|
* This reflects the active runtime configuration (for example, custom domains via `AMP_URL`).
|
|
234
246
|
*/
|
|
235
247
|
readonly ampURL: URL
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* Information about the executor that is running this plugin.
|
|
251
|
+
*/
|
|
252
|
+
readonly executor: PluginExecutor
|
|
236
253
|
}
|
|
237
254
|
|
|
238
255
|
/** @internal */
|
|
@@ -622,22 +639,6 @@ declare module '@ampcode/plugin' {
|
|
|
622
639
|
*/
|
|
623
640
|
export type FilesModifiedByToolCall = (event: ToolCallEvent | ToolResultEvent) => URI[] | null
|
|
624
641
|
|
|
625
|
-
/**
|
|
626
|
-
* The client environment kind.
|
|
627
|
-
*/
|
|
628
|
-
export type PluginClientKind = 'terminal' | 'editor' | 'web'
|
|
629
|
-
|
|
630
|
-
/**
|
|
631
|
-
* Information about the client running the plugin.
|
|
632
|
-
*/
|
|
633
|
-
export interface PluginClient {
|
|
634
|
-
/** The kind of client environment */
|
|
635
|
-
kind: PluginClientKind
|
|
636
|
-
|
|
637
|
-
/** The version of the client */
|
|
638
|
-
version: string
|
|
639
|
-
}
|
|
640
|
-
|
|
641
642
|
/**
|
|
642
643
|
* Options for registering a command.
|
|
643
644
|
*/
|