@ampcode/plugin 0.0.0-20260705003305-gf754af9 → 0.0.0-20260707003429-g69640bc
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 +18 -3
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -275,7 +275,7 @@ declare module '@ampcode/plugin' {
|
|
|
275
275
|
|
|
276
276
|
/** Display metadata for a plugin agent. */
|
|
277
277
|
export interface AgentDisplay {
|
|
278
|
-
/** Label shown in mode pickers and thread headers,
|
|
278
|
+
/** Label shown in mode pickers and thread headers, 24 characters or less. */
|
|
279
279
|
label: string
|
|
280
280
|
/** Optional label color as a hex RGB string, for example "#d97706". */
|
|
281
281
|
color?: string
|
|
@@ -316,7 +316,7 @@ declare module '@ampcode/plugin' {
|
|
|
316
316
|
* subagent/tool. When omitted, the thread is created without a parent.
|
|
317
317
|
*/
|
|
318
318
|
parentThreadID?: ThreadID
|
|
319
|
-
/** Show the created thread in the client when supported. */
|
|
319
|
+
/** Show the created thread and make it active in the client when supported. */
|
|
320
320
|
show?: boolean
|
|
321
321
|
}
|
|
322
322
|
|
|
@@ -676,6 +676,16 @@ declare module '@ampcode/plugin' {
|
|
|
676
676
|
*/
|
|
677
677
|
open(url: string | URL): Promise<void>
|
|
678
678
|
|
|
679
|
+
/**
|
|
680
|
+
* Root of the workspace or repository the user has open, or null when Amp is
|
|
681
|
+
* running without a workspace. This is stable for the plugin process lifetime;
|
|
682
|
+
* plugins are reloaded when the workspace changes.
|
|
683
|
+
*
|
|
684
|
+
* Use {@link PluginAPI.helpers.filePathFromURI} to convert this file URI to a
|
|
685
|
+
* local filesystem path before running workspace-relative shell commands.
|
|
686
|
+
*/
|
|
687
|
+
readonly workspaceRoot: URI | null
|
|
688
|
+
|
|
679
689
|
/**
|
|
680
690
|
* Get the effective Amp base URL currently used by this Amp client.
|
|
681
691
|
* This reflects the active runtime configuration (for example, custom domains via `AMP_URL`).
|
|
@@ -1334,7 +1344,12 @@ declare module '@ampcode/plugin' {
|
|
|
1334
1344
|
/** Bun's shell API for executing commands */
|
|
1335
1345
|
$: ShellFunction
|
|
1336
1346
|
|
|
1337
|
-
/**
|
|
1347
|
+
/**
|
|
1348
|
+
* Current thread context if a thread is active, or `undefined` when the
|
|
1349
|
+
* user has not started one yet. To create a thread from a command, use
|
|
1350
|
+
* `amp.getBuiltinAgent(...)` or `amp.createAgent(...)` and call
|
|
1351
|
+
* `agent.createThread({ show: true })`, then append to the returned thread.
|
|
1352
|
+
*/
|
|
1338
1353
|
thread?: PluginThread
|
|
1339
1354
|
}
|
|
1340
1355
|
|