@aiderdesk/extensions 0.6.0 → 0.8.0
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/README.md +40 -26
- package/dist/cli.js +60 -14
- package/dist/index.d.ts +110 -50
- package/extensions.d.ts +110 -50
- package/extensions.json +26 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -50,39 +50,53 @@ For comprehensive documentation on creating and using extensions, see the [Exten
|
|
|
50
50
|
|
|
51
51
|
## Example Extensions
|
|
52
52
|
|
|
53
|
-
| Extension | Description |
|
|
54
|
-
|
|
55
|
-
| **[
|
|
56
|
-
| **[
|
|
57
|
-
| **[
|
|
58
|
-
| **[
|
|
59
|
-
| **[
|
|
60
|
-
| **[
|
|
61
|
-
| **[
|
|
62
|
-
| **[
|
|
63
|
-
| **[
|
|
64
|
-
| **[
|
|
65
|
-
| **[
|
|
66
|
-
| **[
|
|
67
|
-
| **[
|
|
68
|
-
| **[
|
|
69
|
-
| **[
|
|
70
|
-
| **[
|
|
53
|
+
| Extension | Description | Capabilities |
|
|
54
|
+
|-----------|-------------|--------------|
|
|
55
|
+
| **[chunkhound-on-semantic-search-tool/](./extensions/chunkhound-on-semantic-search-tool/)** | Overrides `power---semantic_search` to use ChunkHound for better semantic understanding | `search` |
|
|
56
|
+
| **[chunkhound-search/](./extensions/chunkhound-search/)** | Provides `chunkhound-search` tool using ChunkHound for semantic code search | `search`, `tools` |
|
|
57
|
+
| **[context-autocompletion-words/](./extensions/context-autocompletion-words/)** | Automatically extracts symbols from context files and adds them to autocompletion | `context` |
|
|
58
|
+
| **[external-rules.ts](./extensions/external-rules.ts)** | Includes rule files from Cursor, Claude Code, and Roo Code configurations | `context` |
|
|
59
|
+
| **[generate-tests.ts](./extensions/generate-tests.ts)** | Adds `/generate-tests` command to generate unit tests for files | `commands` |
|
|
60
|
+
| **[lsp/](./extensions/lsp/)** | LSP integration for automatic error detection after file edits and code intelligence tools (find references) | `tools`, `code-intelligence` |
|
|
61
|
+
| **[permission-gate.ts](./extensions/permission-gate.ts)** | Prompts for confirmation before running dangerous bash commands (`rm -rf`, `sudo`, `chmod/chown 777`) | `security` |
|
|
62
|
+
| **[pirate.ts](./extensions/pirate.ts)** | Adds a Pirate agent that speaks like a swashbuckling sea dog | `agents`, `example` |
|
|
63
|
+
| **[plan-mode.ts](./extensions/plan-mode.ts)** | Adds a Plan mode that enforces planning before coding | `modes` |
|
|
64
|
+
| **[plannotator/](./extensions/plannotator/)** | Plan-based development workflow with planning mode and plan review utilizing plannotator.ai | `modes`, `tools`, `commands`, `workflow` |
|
|
65
|
+
| **[programmatic-tool-calls/](./extensions/programmatic-tool-calls/)** | Execute JavaScript code in a sandbox with access to all tools as async functions | `tools` |
|
|
66
|
+
| **[protected-paths.ts](./extensions/protected-paths.ts)** | Blocks file operations on protected paths (`.env`, `.git/`, `node_modules/`) | `security` |
|
|
67
|
+
| **[providers-quota-extension/](./extensions/providers-quota-extension/)** | Displays API quota information for Synthetic and Z.AI providers in the task status bar | `ui` |
|
|
68
|
+
| **[redact-secrets/](./extensions/redact-secrets/)** | Redacts secret values from `.env*` files in file read results | `security` |
|
|
69
|
+
| **[rtk/](./extensions/rtk/)** | Transparently rewrites shell commands to RTK equivalents, reducing LLM token consumption by 60-90% | `optimization`, `commands` |
|
|
70
|
+
| **[sandbox/](./extensions/sandbox/)** | OS-level sandboxing for bash commands using `@anthropic-ai/sandbox-runtime` | `security` |
|
|
71
|
+
| **[sound-notification.ts](./extensions/sound-notification.ts)** | Plays a "Jobs Done" sound when a prompt finishes | `notifications` |
|
|
72
|
+
| **[theme.ts](./extensions/theme.ts)** | Adds `/theme` command to switch AiderDesk themes | `commands` |
|
|
73
|
+
| **[tree-sitter-repo-map/](./extensions/tree-sitter-repo-map/)** | Enhanced repository map using tree-sitter parsing with PageRank-based symbol ranking | `context`, `commands` |
|
|
74
|
+
| **[ultrathink.ts](./extensions/ultrathink.ts)** | Detects prompts like "ultrathink" / "think hard" and increases OpenAI/OpenAI-compatible reasoning effort (`xhigh` for `-max` models, otherwise `high`) | `optimization` |
|
|
75
|
+
| **[wakatime.ts](./extensions/wakatime.ts)** | Tracks coding activity by sending heartbeats to WakaTime via wakatime-cli | `tracking` |
|
|
76
|
+
| **[ui-placement-demo.ts](./extensions/ui-placement-demo.ts)** | Demonstrates all available UI component placement locations for extension development | `ui`, `example` |
|
|
77
|
+
| **[multi-model-run/](./extensions/multi-model-run/)** | Run the same prompt across multiple models simultaneously with a UI selector | `ui` |
|
|
71
78
|
|
|
72
79
|
## Quick Start
|
|
73
80
|
|
|
74
|
-
### 1.
|
|
81
|
+
### 1. Install an Extension
|
|
75
82
|
|
|
76
|
-
|
|
83
|
+
The easiest way to install extensions is using the CLI:
|
|
77
84
|
|
|
78
85
|
```bash
|
|
79
|
-
#
|
|
80
|
-
|
|
81
|
-
|
|
86
|
+
# Interactive selection - choose from all available extensions
|
|
87
|
+
npx @aiderdesk/extensions install
|
|
88
|
+
|
|
89
|
+
# Install a specific extension by ID
|
|
90
|
+
npx @aiderdesk/extensions install sound-notification
|
|
82
91
|
|
|
83
|
-
|
|
92
|
+
# Install to global extensions (available to all projects)
|
|
93
|
+
npx @aiderdesk/extensions install sound-notification --global
|
|
94
|
+
|
|
95
|
+
# Install from a URL (e.g., your own repository)
|
|
96
|
+
npx @aiderdesk/extensions install https://raw.githubusercontent.com/username/my-extension/main/my-extension.ts
|
|
97
|
+
```
|
|
84
98
|
|
|
85
|
-
|
|
99
|
+
Alternatively, manually copy extension files:
|
|
86
100
|
|
|
87
101
|
```bash
|
|
88
102
|
# Global extensions (available to all projects)
|
|
@@ -92,6 +106,6 @@ cp extensions/sound-notification.ts ~/.aider-desk/extensions/
|
|
|
92
106
|
cp extensions/sound-notification.ts .aider-desk/extensions/
|
|
93
107
|
```
|
|
94
108
|
|
|
95
|
-
###
|
|
109
|
+
### 2. Hot Reload
|
|
96
110
|
|
|
97
111
|
Extensions are automatically reloaded when files change. No restart needed!
|
package/dist/cli.js
CHANGED
|
@@ -117,6 +117,36 @@ async function loadExtensions() {
|
|
|
117
117
|
process.exit(1);
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
|
+
function getCloneUrl(webUrl) {
|
|
121
|
+
try {
|
|
122
|
+
const url = new URL(webUrl);
|
|
123
|
+
if (url.hostname !== "github.com") {
|
|
124
|
+
return null;
|
|
125
|
+
}
|
|
126
|
+
const pathParts = url.pathname.split("/").filter(Boolean);
|
|
127
|
+
if (pathParts.length < 2) {
|
|
128
|
+
return null;
|
|
129
|
+
}
|
|
130
|
+
const owner = pathParts[0];
|
|
131
|
+
const repo = pathParts[1];
|
|
132
|
+
return `https://github.com/${owner}/${repo}.git`;
|
|
133
|
+
} catch {
|
|
134
|
+
return null;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
function getExtensionsPath(repoUrl) {
|
|
138
|
+
try {
|
|
139
|
+
const url = new URL(repoUrl);
|
|
140
|
+
const pathParts = url.pathname.split("/").filter(Boolean);
|
|
141
|
+
if (pathParts.length > 4 && pathParts[2] === "tree") {
|
|
142
|
+
const extensionPath = pathParts.slice(4).join("/");
|
|
143
|
+
return extensionPath;
|
|
144
|
+
}
|
|
145
|
+
return null;
|
|
146
|
+
} catch {
|
|
147
|
+
return null;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
120
150
|
function getInstallDirectory(options) {
|
|
121
151
|
if (options.directory) {
|
|
122
152
|
return options.directory;
|
|
@@ -185,13 +215,18 @@ Installing ${ext.name} to: ${targetDir}
|
|
|
185
215
|
} else {
|
|
186
216
|
spinner.text = `Downloading ${ext.name} from GitHub...`;
|
|
187
217
|
const tempDir = join(process.cwd(), `.temp-ext-${Date.now()}`);
|
|
218
|
+
const extensionPath = `packages/extensions/extensions/${ext.folder}`;
|
|
188
219
|
try {
|
|
189
|
-
|
|
190
|
-
|
|
220
|
+
spinner.text = "Cloning repository with sparse checkout...";
|
|
221
|
+
await runCommand("git", ["clone", "--depth", "1", "--sparse", GITHUB_REPO, tempDir]);
|
|
222
|
+
spinner.text = "Configuring sparse checkout path...";
|
|
223
|
+
await runCommand("git", ["-C", tempDir, "sparse-checkout", "set", extensionPath]);
|
|
224
|
+
const sourceDir = join(tempDir, extensionPath);
|
|
191
225
|
const targetPath = join(targetDir, ext.folder);
|
|
192
226
|
if (!existsSync(sourceDir)) {
|
|
193
|
-
throw new Error(
|
|
227
|
+
throw new Error(`Extension folder not found in repository: ${extensionPath}`);
|
|
194
228
|
}
|
|
229
|
+
spinner.text = "Copying extension files...";
|
|
195
230
|
cpSync(sourceDir, targetPath, { recursive: true });
|
|
196
231
|
spinner.succeed(chalk.green(`\u2713 Installed ${ext.name} from GitHub`));
|
|
197
232
|
if (existsSync(join(targetPath, "package.json"))) {
|
|
@@ -233,20 +268,31 @@ async function installFromUrl(url, targetDir) {
|
|
|
233
268
|
} else {
|
|
234
269
|
spinner.text = "Downloading extension folder...";
|
|
235
270
|
if (url.includes("github.com")) {
|
|
271
|
+
const cloneUrl = getCloneUrl(url);
|
|
272
|
+
const extensionsPath = getExtensionsPath(url);
|
|
273
|
+
if (!cloneUrl) {
|
|
274
|
+
throw new Error("Invalid GitHub URL - could not extract repository URL");
|
|
275
|
+
}
|
|
276
|
+
if (!extensionsPath) {
|
|
277
|
+
throw new Error("Invalid GitHub URL - could not extract extension path from URL");
|
|
278
|
+
}
|
|
279
|
+
const extName = urlPath.split("/").pop() || "extension";
|
|
236
280
|
const tempDir = join(process.cwd(), `.temp-ext-${Date.now()}`);
|
|
237
281
|
try {
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
282
|
+
spinner.text = "Cloning repository with sparse checkout...";
|
|
283
|
+
await runCommand("git", ["clone", "--depth", "1", "--sparse", cloneUrl, tempDir]);
|
|
284
|
+
spinner.text = "Configuring sparse checkout path...";
|
|
285
|
+
await runCommand("git", ["-C", tempDir, "sparse-checkout", "set", extensionsPath]);
|
|
286
|
+
const sourceDir = join(tempDir, extensionsPath);
|
|
241
287
|
const targetPath = join(targetDir, extName);
|
|
242
|
-
if (existsSync(sourceDir)) {
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
288
|
+
if (!existsSync(sourceDir)) {
|
|
289
|
+
throw new Error(`Extension folder not found in repository: ${extensionsPath}`);
|
|
290
|
+
}
|
|
291
|
+
spinner.text = "Copying extension files...";
|
|
292
|
+
cpSync(sourceDir, targetPath, { recursive: true });
|
|
293
|
+
spinner.succeed(chalk.green(`\u2713 Installed ${extName} to ${targetDir}`));
|
|
294
|
+
if (existsSync(join(targetPath, "package.json"))) {
|
|
295
|
+
await installDependencies(targetPath);
|
|
250
296
|
}
|
|
251
297
|
} finally {
|
|
252
298
|
if (existsSync(tempDir)) {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
|
|
3
|
-
export type LlmProviderName = "anthropic" | "anthropic-compatible" | "azure" | "bedrock" | "cerebras" | "claude-agent-sdk" | "deepseek" | "gemini" | "gemini-cli" | "gpustack" | "groq" | "alibaba-plan" | "kimi-plan" | "litellm" | "lmstudio" | "minimax" | "ollama" | "openai" | "openai-compatible" | "opencode" | "openrouter" | "requesty" | "synthetic" | "vertex-ai" | "zai-plan";
|
|
3
|
+
export type LlmProviderName = "anthropic" | "anthropic-compatible" | "auggie" | "azure" | "bedrock" | "cerebras" | "claude-agent-sdk" | "deepseek" | "gemini" | "gemini-cli" | "gpustack" | "groq" | "alibaba-plan" | "kimi-plan" | "litellm" | "lmstudio" | "minimax" | "ollama" | "openai" | "openai-compatible" | "opencode" | "openrouter" | "requesty" | "synthetic" | "vertex-ai" | "zai-plan";
|
|
4
4
|
export interface LlmProviderBase {
|
|
5
5
|
name: LlmProviderName;
|
|
6
6
|
disableStreaming?: boolean;
|
|
@@ -45,6 +45,11 @@ export interface AnthropicCompatibleProvider extends LlmProviderBase {
|
|
|
45
45
|
apiKey: string;
|
|
46
46
|
baseUrl?: string;
|
|
47
47
|
}
|
|
48
|
+
export interface AuggieProvider extends LlmProviderBase {
|
|
49
|
+
name: "auggie";
|
|
50
|
+
apiKey: string;
|
|
51
|
+
apiUrl?: string;
|
|
52
|
+
}
|
|
48
53
|
export interface KimiPlanProvider extends LlmProviderBase {
|
|
49
54
|
name: "kimi-plan";
|
|
50
55
|
apiKey: string;
|
|
@@ -52,6 +57,8 @@ export interface KimiPlanProvider extends LlmProviderBase {
|
|
|
52
57
|
export interface AlibabaPlanProvider extends LlmProviderBase {
|
|
53
58
|
name: "alibaba-plan";
|
|
54
59
|
apiKey: string;
|
|
60
|
+
thinkingEnabled?: boolean;
|
|
61
|
+
thinkingBudget?: number;
|
|
55
62
|
}
|
|
56
63
|
declare enum GeminiVoiceModel {
|
|
57
64
|
GeminiLive25FlashNativeAudio = "gemini-2.5-flash-native-audio-preview-12-2025"
|
|
@@ -160,7 +167,7 @@ export interface SyntheticProvider extends LlmProviderBase {
|
|
|
160
167
|
name: "synthetic";
|
|
161
168
|
apiKey: string;
|
|
162
169
|
}
|
|
163
|
-
export type LlmProvider = OpenAiProvider | AnthropicProvider | AnthropicCompatibleProvider | AzureProvider | GeminiProvider | GeminiCliProvider | VertexAiProvider | LmStudioProvider | BedrockProvider | ClaudeAgentSdkProvider | DeepseekProvider | GroqProvider | GpustackProvider | CerebrasProvider | AlibabaPlanProvider | KimiPlanProvider | OpenAiCompatibleProvider | LitellmProvider | OllamaProvider | OpenCodeProvider | OpenRouterProvider | RequestyProvider | SyntheticProvider | ZaiPlanProvider | MinimaxProvider;
|
|
170
|
+
export type LlmProvider = OpenAiProvider | AnthropicProvider | AnthropicCompatibleProvider | AuggieProvider | AzureProvider | GeminiProvider | GeminiCliProvider | VertexAiProvider | LmStudioProvider | BedrockProvider | ClaudeAgentSdkProvider | DeepseekProvider | GroqProvider | GpustackProvider | CerebrasProvider | AlibabaPlanProvider | KimiPlanProvider | OpenAiCompatibleProvider | LitellmProvider | OllamaProvider | OpenCodeProvider | OpenRouterProvider | RequestyProvider | SyntheticProvider | ZaiPlanProvider | MinimaxProvider;
|
|
164
171
|
export type JSONValue = null | string | number | boolean | JSONObject | JSONArray;
|
|
165
172
|
export type JSONObject = {
|
|
166
173
|
[key: string]: JSONValue;
|
|
@@ -814,55 +821,72 @@ export interface ToolDefinition<TSchema extends z.ZodType = z.ZodType<Record<str
|
|
|
814
821
|
/** Execute function with type-safe args */
|
|
815
822
|
execute: (input: z.infer<TSchema>, signal: AbortSignal | undefined, context: ExtensionContext, allTools: Record<string, Tool>) => Promise<unknown>;
|
|
816
823
|
}
|
|
817
|
-
/** UI
|
|
818
|
-
export type
|
|
819
|
-
/** Placement locations for UI elements */
|
|
820
|
-
export declare enum UIPlacement {
|
|
821
|
-
/** Task sidebar area */
|
|
822
|
-
TaskSidebar = "task-sidebar",
|
|
823
|
-
/** Chat toolbar area */
|
|
824
|
-
ChatToolbar = "chat-toolbar",
|
|
825
|
-
/** Message action buttons */
|
|
826
|
-
MessageActions = "message-actions",
|
|
827
|
-
/** Global toolbar */
|
|
828
|
-
GlobalToolbar = "global-toolbar"
|
|
829
|
-
}
|
|
824
|
+
/** Placement locations for extension UI components */
|
|
825
|
+
export type UIComponentPlacement = "task-status-bar-left" | "task-status-bar-right" | "task-usage-info-bottom" | "task-messages-top" | "task-messages-bottom" | "header-left" | "header-right" | "task-input-above" | "task-input-toolbar-left" | "task-input-toolbar-right" | "tasks-sidebar-header" | "tasks-sidebar-bottom" | "task-message-above" | "task-message-below" | "task-message-bar" | "task-top-bar-left" | "task-top-bar-right" | "task-state-actions";
|
|
830
826
|
/**
|
|
831
|
-
* Definition of a UI
|
|
827
|
+
* Definition of a React UI component that can be registered by an extension.
|
|
828
|
+
* The component is defined as a JSX string and rendered using string-to-react-component.
|
|
829
|
+
*
|
|
830
|
+
* Available props for the component:
|
|
831
|
+
* - React: React object with hooks (useState, useEffect, useCallback, useMemo, useRef, etc.)
|
|
832
|
+
* - task: Current TaskData
|
|
833
|
+
* - projectDir: Project directory path
|
|
834
|
+
* - api: ApplicationAPI reference
|
|
835
|
+
* - mode: Current mode string
|
|
832
836
|
*
|
|
833
837
|
* @example
|
|
834
838
|
* ```typescript
|
|
835
|
-
* const
|
|
836
|
-
* id: '
|
|
837
|
-
*
|
|
838
|
-
*
|
|
839
|
-
*
|
|
840
|
-
*
|
|
841
|
-
*
|
|
842
|
-
*
|
|
843
|
-
*
|
|
839
|
+
* const myStatusComponent: UIComponentDefinition = {
|
|
840
|
+
* id: 'my-status-indicator',
|
|
841
|
+
* placement: UIComponentPlacement.TaskStatusBar,
|
|
842
|
+
* jsx: `
|
|
843
|
+
* <div className="flex items-center gap-2 text-xs text-text-secondary">
|
|
844
|
+
* <span>Task: {task.name}</span>
|
|
845
|
+
* <span>Mode: {mode}</span>
|
|
846
|
+
* </div>
|
|
847
|
+
* `,
|
|
844
848
|
* };
|
|
845
849
|
* ```
|
|
846
850
|
*/
|
|
847
|
-
export interface
|
|
848
|
-
/** Unique
|
|
851
|
+
export interface UIComponentDefinition {
|
|
852
|
+
/** Unique component identifier*/
|
|
849
853
|
id: string;
|
|
850
|
-
/**
|
|
851
|
-
|
|
852
|
-
/**
|
|
853
|
-
|
|
854
|
-
/** Optional
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
854
|
+
/** Where in UI to render this component */
|
|
855
|
+
placement: UIComponentPlacement;
|
|
856
|
+
/** JSX/TSX component as string to be parsed by string-to-react-component */
|
|
857
|
+
jsx: string;
|
|
858
|
+
/** Optional flag to indicate if the component should load data from the extension to be passed as a prop (default: false) */
|
|
859
|
+
loadData?: boolean;
|
|
860
|
+
}
|
|
861
|
+
/**
|
|
862
|
+
* Marker type for UI components provided by AiderDesk
|
|
863
|
+
* Actual component implementation is provided by renderer at runtime
|
|
864
|
+
*/
|
|
865
|
+
export type UIComponent = object;
|
|
866
|
+
/**
|
|
867
|
+
* Common UI components available to extension JSX components
|
|
868
|
+
*/
|
|
869
|
+
export interface UIComponents {
|
|
870
|
+
Button: UIComponent;
|
|
871
|
+
Checkbox: UIComponent;
|
|
872
|
+
Input: UIComponent;
|
|
873
|
+
Select: UIComponent;
|
|
874
|
+
TextArea: UIComponent;
|
|
875
|
+
IconButton: UIComponent;
|
|
876
|
+
RadioButton: UIComponent;
|
|
877
|
+
MultiSelect: UIComponent;
|
|
878
|
+
Slider: UIComponent;
|
|
879
|
+
DatePicker: UIComponent;
|
|
880
|
+
Chip: UIComponent;
|
|
881
|
+
ModelSelector: UIComponent;
|
|
882
|
+
}
|
|
883
|
+
export interface UIComponentProps {
|
|
884
|
+
projectDir?: string;
|
|
885
|
+
task?: TaskData;
|
|
886
|
+
agentProfile?: AgentProfile;
|
|
887
|
+
models: Model[];
|
|
888
|
+
providers: ProviderProfile[];
|
|
889
|
+
ui: UIComponents;
|
|
866
890
|
}
|
|
867
891
|
/**
|
|
868
892
|
* Definition of a command that can be registered by an extension
|
|
@@ -1227,6 +1251,26 @@ export interface ExtensionContext {
|
|
|
1227
1251
|
* @returns Promise that resolves when settings are saved
|
|
1228
1252
|
*/
|
|
1229
1253
|
updateSettings(updates: Partial<SettingsData>): Promise<void>;
|
|
1254
|
+
/**
|
|
1255
|
+
* Trigger a data refresh for UI components in the renderer
|
|
1256
|
+
* Use this when extension internal state changes and UI components need to re-fetch their data
|
|
1257
|
+
* @param componentId - Optional component ID to refresh only a specific component
|
|
1258
|
+
* @param taskId - Optional task ID to refresh only components for a specific task
|
|
1259
|
+
*/
|
|
1260
|
+
triggerUIDataRefresh(componentId?: string, taskId?: string): void;
|
|
1261
|
+
/**
|
|
1262
|
+
* Trigger a full reload of all UI component definitions for this extension
|
|
1263
|
+
* Use this when the component structure or definitions have changed
|
|
1264
|
+
*/
|
|
1265
|
+
triggerUIComponentsReload(): void;
|
|
1266
|
+
/**
|
|
1267
|
+
* Open a URL either in external browser, a new window, or a modal overlay
|
|
1268
|
+
* @param url - URL to open
|
|
1269
|
+
* @param target - Where to open: 'external' (system browser), 'window' (new Electron window), or 'modal-overlay' (iframe in modal)
|
|
1270
|
+
* In Node/Docker environments, 'window' falls back to 'external'
|
|
1271
|
+
* @returns Promise that resolves when URL is opened
|
|
1272
|
+
*/
|
|
1273
|
+
openUrl(url: string, target?: "external" | "window" | "modal-overlay"): Promise<void>;
|
|
1230
1274
|
}
|
|
1231
1275
|
/**
|
|
1232
1276
|
* Main extension interface that all extensions must implement
|
|
@@ -1303,6 +1347,29 @@ export interface Extension {
|
|
|
1303
1347
|
* @returns The updated agent profile
|
|
1304
1348
|
*/
|
|
1305
1349
|
onAgentProfileUpdated?(context: ExtensionContext, agentId: string, updatedProfile: AgentProfile): Promise<AgentProfile>;
|
|
1350
|
+
/**
|
|
1351
|
+
* Return array of React UI components this extension provides
|
|
1352
|
+
* Components are defined as JSX/TSX strings and rendered using string-to-react-component
|
|
1353
|
+
* Called when extension is loaded and when components need to be refreshed
|
|
1354
|
+
*/
|
|
1355
|
+
getUIComponents?(context: ExtensionContext): UIComponentDefinition[];
|
|
1356
|
+
/**
|
|
1357
|
+
* Return data for a specific UI component
|
|
1358
|
+
* Called when the component is mounted or when UI refresh is triggered
|
|
1359
|
+
* @param componentId - The ID of the component to get data for
|
|
1360
|
+
* @param context - Extension context
|
|
1361
|
+
* @returns Data to be passed to the component as `data` binding
|
|
1362
|
+
*/
|
|
1363
|
+
getUIExtensionData?(componentId: string, context: ExtensionContext): Promise<unknown>;
|
|
1364
|
+
/**
|
|
1365
|
+
* Handle an action triggered from a UI component via executeExtensionAction
|
|
1366
|
+
* @param componentId - The ID of the component that triggered the action
|
|
1367
|
+
* @param action - The action identifier
|
|
1368
|
+
* @param args - Additional arguments passed from the component
|
|
1369
|
+
* @param context - Extension context
|
|
1370
|
+
* @returns Result of the action execution
|
|
1371
|
+
*/
|
|
1372
|
+
executeUIExtensionAction?(componentId: string, action: string, args: unknown[], context: ExtensionContext): Promise<unknown>;
|
|
1306
1373
|
/**
|
|
1307
1374
|
* Called when a new task is created
|
|
1308
1375
|
* @returns void or partial event to modify task data
|
|
@@ -1478,12 +1545,5 @@ export interface Extension {
|
|
|
1478
1545
|
*/
|
|
1479
1546
|
onAiderPromptFinished?(event: AiderPromptFinishedEvent, context: ExtensionContext): Promise<void | Partial<AiderPromptFinishedEvent>>;
|
|
1480
1547
|
}
|
|
1481
|
-
/**
|
|
1482
|
-
* Constructor type for extension classes
|
|
1483
|
-
*/
|
|
1484
|
-
export interface ExtensionConstructor {
|
|
1485
|
-
new (): Extension;
|
|
1486
|
-
metadata?: ExtensionMetadata;
|
|
1487
|
-
}
|
|
1488
1548
|
|
|
1489
1549
|
export {};
|
package/extensions.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
|
|
3
|
-
export type LlmProviderName = "anthropic" | "anthropic-compatible" | "azure" | "bedrock" | "cerebras" | "claude-agent-sdk" | "deepseek" | "gemini" | "gemini-cli" | "gpustack" | "groq" | "alibaba-plan" | "kimi-plan" | "litellm" | "lmstudio" | "minimax" | "ollama" | "openai" | "openai-compatible" | "opencode" | "openrouter" | "requesty" | "synthetic" | "vertex-ai" | "zai-plan";
|
|
3
|
+
export type LlmProviderName = "anthropic" | "anthropic-compatible" | "auggie" | "azure" | "bedrock" | "cerebras" | "claude-agent-sdk" | "deepseek" | "gemini" | "gemini-cli" | "gpustack" | "groq" | "alibaba-plan" | "kimi-plan" | "litellm" | "lmstudio" | "minimax" | "ollama" | "openai" | "openai-compatible" | "opencode" | "openrouter" | "requesty" | "synthetic" | "vertex-ai" | "zai-plan";
|
|
4
4
|
export interface LlmProviderBase {
|
|
5
5
|
name: LlmProviderName;
|
|
6
6
|
disableStreaming?: boolean;
|
|
@@ -45,6 +45,11 @@ export interface AnthropicCompatibleProvider extends LlmProviderBase {
|
|
|
45
45
|
apiKey: string;
|
|
46
46
|
baseUrl?: string;
|
|
47
47
|
}
|
|
48
|
+
export interface AuggieProvider extends LlmProviderBase {
|
|
49
|
+
name: "auggie";
|
|
50
|
+
apiKey: string;
|
|
51
|
+
apiUrl?: string;
|
|
52
|
+
}
|
|
48
53
|
export interface KimiPlanProvider extends LlmProviderBase {
|
|
49
54
|
name: "kimi-plan";
|
|
50
55
|
apiKey: string;
|
|
@@ -52,6 +57,8 @@ export interface KimiPlanProvider extends LlmProviderBase {
|
|
|
52
57
|
export interface AlibabaPlanProvider extends LlmProviderBase {
|
|
53
58
|
name: "alibaba-plan";
|
|
54
59
|
apiKey: string;
|
|
60
|
+
thinkingEnabled?: boolean;
|
|
61
|
+
thinkingBudget?: number;
|
|
55
62
|
}
|
|
56
63
|
declare enum GeminiVoiceModel {
|
|
57
64
|
GeminiLive25FlashNativeAudio = "gemini-2.5-flash-native-audio-preview-12-2025"
|
|
@@ -160,7 +167,7 @@ export interface SyntheticProvider extends LlmProviderBase {
|
|
|
160
167
|
name: "synthetic";
|
|
161
168
|
apiKey: string;
|
|
162
169
|
}
|
|
163
|
-
export type LlmProvider = OpenAiProvider | AnthropicProvider | AnthropicCompatibleProvider | AzureProvider | GeminiProvider | GeminiCliProvider | VertexAiProvider | LmStudioProvider | BedrockProvider | ClaudeAgentSdkProvider | DeepseekProvider | GroqProvider | GpustackProvider | CerebrasProvider | AlibabaPlanProvider | KimiPlanProvider | OpenAiCompatibleProvider | LitellmProvider | OllamaProvider | OpenCodeProvider | OpenRouterProvider | RequestyProvider | SyntheticProvider | ZaiPlanProvider | MinimaxProvider;
|
|
170
|
+
export type LlmProvider = OpenAiProvider | AnthropicProvider | AnthropicCompatibleProvider | AuggieProvider | AzureProvider | GeminiProvider | GeminiCliProvider | VertexAiProvider | LmStudioProvider | BedrockProvider | ClaudeAgentSdkProvider | DeepseekProvider | GroqProvider | GpustackProvider | CerebrasProvider | AlibabaPlanProvider | KimiPlanProvider | OpenAiCompatibleProvider | LitellmProvider | OllamaProvider | OpenCodeProvider | OpenRouterProvider | RequestyProvider | SyntheticProvider | ZaiPlanProvider | MinimaxProvider;
|
|
164
171
|
export type JSONValue = null | string | number | boolean | JSONObject | JSONArray;
|
|
165
172
|
export type JSONObject = {
|
|
166
173
|
[key: string]: JSONValue;
|
|
@@ -814,55 +821,72 @@ export interface ToolDefinition<TSchema extends z.ZodType = z.ZodType<Record<str
|
|
|
814
821
|
/** Execute function with type-safe args */
|
|
815
822
|
execute: (input: z.infer<TSchema>, signal: AbortSignal | undefined, context: ExtensionContext, allTools: Record<string, Tool>) => Promise<unknown>;
|
|
816
823
|
}
|
|
817
|
-
/** UI
|
|
818
|
-
export type
|
|
819
|
-
/** Placement locations for UI elements */
|
|
820
|
-
export declare enum UIPlacement {
|
|
821
|
-
/** Task sidebar area */
|
|
822
|
-
TaskSidebar = "task-sidebar",
|
|
823
|
-
/** Chat toolbar area */
|
|
824
|
-
ChatToolbar = "chat-toolbar",
|
|
825
|
-
/** Message action buttons */
|
|
826
|
-
MessageActions = "message-actions",
|
|
827
|
-
/** Global toolbar */
|
|
828
|
-
GlobalToolbar = "global-toolbar"
|
|
829
|
-
}
|
|
824
|
+
/** Placement locations for extension UI components */
|
|
825
|
+
export type UIComponentPlacement = "task-status-bar-left" | "task-status-bar-right" | "task-usage-info-bottom" | "task-messages-top" | "task-messages-bottom" | "header-left" | "header-right" | "task-input-above" | "task-input-toolbar-left" | "task-input-toolbar-right" | "tasks-sidebar-header" | "tasks-sidebar-bottom" | "task-message-above" | "task-message-below" | "task-message-bar" | "task-top-bar-left" | "task-top-bar-right" | "task-state-actions";
|
|
830
826
|
/**
|
|
831
|
-
* Definition of a UI
|
|
827
|
+
* Definition of a React UI component that can be registered by an extension.
|
|
828
|
+
* The component is defined as a JSX string and rendered using string-to-react-component.
|
|
829
|
+
*
|
|
830
|
+
* Available props for the component:
|
|
831
|
+
* - React: React object with hooks (useState, useEffect, useCallback, useMemo, useRef, etc.)
|
|
832
|
+
* - task: Current TaskData
|
|
833
|
+
* - projectDir: Project directory path
|
|
834
|
+
* - api: ApplicationAPI reference
|
|
835
|
+
* - mode: Current mode string
|
|
832
836
|
*
|
|
833
837
|
* @example
|
|
834
838
|
* ```typescript
|
|
835
|
-
* const
|
|
836
|
-
* id: '
|
|
837
|
-
*
|
|
838
|
-
*
|
|
839
|
-
*
|
|
840
|
-
*
|
|
841
|
-
*
|
|
842
|
-
*
|
|
843
|
-
*
|
|
839
|
+
* const myStatusComponent: UIComponentDefinition = {
|
|
840
|
+
* id: 'my-status-indicator',
|
|
841
|
+
* placement: UIComponentPlacement.TaskStatusBar,
|
|
842
|
+
* jsx: `
|
|
843
|
+
* <div className="flex items-center gap-2 text-xs text-text-secondary">
|
|
844
|
+
* <span>Task: {task.name}</span>
|
|
845
|
+
* <span>Mode: {mode}</span>
|
|
846
|
+
* </div>
|
|
847
|
+
* `,
|
|
844
848
|
* };
|
|
845
849
|
* ```
|
|
846
850
|
*/
|
|
847
|
-
export interface
|
|
848
|
-
/** Unique
|
|
851
|
+
export interface UIComponentDefinition {
|
|
852
|
+
/** Unique component identifier*/
|
|
849
853
|
id: string;
|
|
850
|
-
/**
|
|
851
|
-
|
|
852
|
-
/**
|
|
853
|
-
|
|
854
|
-
/** Optional
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
854
|
+
/** Where in UI to render this component */
|
|
855
|
+
placement: UIComponentPlacement;
|
|
856
|
+
/** JSX/TSX component as string to be parsed by string-to-react-component */
|
|
857
|
+
jsx: string;
|
|
858
|
+
/** Optional flag to indicate if the component should load data from the extension to be passed as a prop (default: false) */
|
|
859
|
+
loadData?: boolean;
|
|
860
|
+
}
|
|
861
|
+
/**
|
|
862
|
+
* Marker type for UI components provided by AiderDesk
|
|
863
|
+
* Actual component implementation is provided by renderer at runtime
|
|
864
|
+
*/
|
|
865
|
+
export type UIComponent = object;
|
|
866
|
+
/**
|
|
867
|
+
* Common UI components available to extension JSX components
|
|
868
|
+
*/
|
|
869
|
+
export interface UIComponents {
|
|
870
|
+
Button: UIComponent;
|
|
871
|
+
Checkbox: UIComponent;
|
|
872
|
+
Input: UIComponent;
|
|
873
|
+
Select: UIComponent;
|
|
874
|
+
TextArea: UIComponent;
|
|
875
|
+
IconButton: UIComponent;
|
|
876
|
+
RadioButton: UIComponent;
|
|
877
|
+
MultiSelect: UIComponent;
|
|
878
|
+
Slider: UIComponent;
|
|
879
|
+
DatePicker: UIComponent;
|
|
880
|
+
Chip: UIComponent;
|
|
881
|
+
ModelSelector: UIComponent;
|
|
882
|
+
}
|
|
883
|
+
export interface UIComponentProps {
|
|
884
|
+
projectDir?: string;
|
|
885
|
+
task?: TaskData;
|
|
886
|
+
agentProfile?: AgentProfile;
|
|
887
|
+
models: Model[];
|
|
888
|
+
providers: ProviderProfile[];
|
|
889
|
+
ui: UIComponents;
|
|
866
890
|
}
|
|
867
891
|
/**
|
|
868
892
|
* Definition of a command that can be registered by an extension
|
|
@@ -1227,6 +1251,26 @@ export interface ExtensionContext {
|
|
|
1227
1251
|
* @returns Promise that resolves when settings are saved
|
|
1228
1252
|
*/
|
|
1229
1253
|
updateSettings(updates: Partial<SettingsData>): Promise<void>;
|
|
1254
|
+
/**
|
|
1255
|
+
* Trigger a data refresh for UI components in the renderer
|
|
1256
|
+
* Use this when extension internal state changes and UI components need to re-fetch their data
|
|
1257
|
+
* @param componentId - Optional component ID to refresh only a specific component
|
|
1258
|
+
* @param taskId - Optional task ID to refresh only components for a specific task
|
|
1259
|
+
*/
|
|
1260
|
+
triggerUIDataRefresh(componentId?: string, taskId?: string): void;
|
|
1261
|
+
/**
|
|
1262
|
+
* Trigger a full reload of all UI component definitions for this extension
|
|
1263
|
+
* Use this when the component structure or definitions have changed
|
|
1264
|
+
*/
|
|
1265
|
+
triggerUIComponentsReload(): void;
|
|
1266
|
+
/**
|
|
1267
|
+
* Open a URL either in external browser, a new window, or a modal overlay
|
|
1268
|
+
* @param url - URL to open
|
|
1269
|
+
* @param target - Where to open: 'external' (system browser), 'window' (new Electron window), or 'modal-overlay' (iframe in modal)
|
|
1270
|
+
* In Node/Docker environments, 'window' falls back to 'external'
|
|
1271
|
+
* @returns Promise that resolves when URL is opened
|
|
1272
|
+
*/
|
|
1273
|
+
openUrl(url: string, target?: "external" | "window" | "modal-overlay"): Promise<void>;
|
|
1230
1274
|
}
|
|
1231
1275
|
/**
|
|
1232
1276
|
* Main extension interface that all extensions must implement
|
|
@@ -1303,6 +1347,29 @@ export interface Extension {
|
|
|
1303
1347
|
* @returns The updated agent profile
|
|
1304
1348
|
*/
|
|
1305
1349
|
onAgentProfileUpdated?(context: ExtensionContext, agentId: string, updatedProfile: AgentProfile): Promise<AgentProfile>;
|
|
1350
|
+
/**
|
|
1351
|
+
* Return array of React UI components this extension provides
|
|
1352
|
+
* Components are defined as JSX/TSX strings and rendered using string-to-react-component
|
|
1353
|
+
* Called when extension is loaded and when components need to be refreshed
|
|
1354
|
+
*/
|
|
1355
|
+
getUIComponents?(context: ExtensionContext): UIComponentDefinition[];
|
|
1356
|
+
/**
|
|
1357
|
+
* Return data for a specific UI component
|
|
1358
|
+
* Called when the component is mounted or when UI refresh is triggered
|
|
1359
|
+
* @param componentId - The ID of the component to get data for
|
|
1360
|
+
* @param context - Extension context
|
|
1361
|
+
* @returns Data to be passed to the component as `data` binding
|
|
1362
|
+
*/
|
|
1363
|
+
getUIExtensionData?(componentId: string, context: ExtensionContext): Promise<unknown>;
|
|
1364
|
+
/**
|
|
1365
|
+
* Handle an action triggered from a UI component via executeExtensionAction
|
|
1366
|
+
* @param componentId - The ID of the component that triggered the action
|
|
1367
|
+
* @param action - The action identifier
|
|
1368
|
+
* @param args - Additional arguments passed from the component
|
|
1369
|
+
* @param context - Extension context
|
|
1370
|
+
* @returns Result of the action execution
|
|
1371
|
+
*/
|
|
1372
|
+
executeUIExtensionAction?(componentId: string, action: string, args: unknown[], context: ExtensionContext): Promise<unknown>;
|
|
1306
1373
|
/**
|
|
1307
1374
|
* Called when a new task is created
|
|
1308
1375
|
* @returns void or partial event to modify task data
|
|
@@ -1478,12 +1545,5 @@ export interface Extension {
|
|
|
1478
1545
|
*/
|
|
1479
1546
|
onAiderPromptFinished?(event: AiderPromptFinishedEvent, context: ExtensionContext): Promise<void | Partial<AiderPromptFinishedEvent>>;
|
|
1480
1547
|
}
|
|
1481
|
-
/**
|
|
1482
|
-
* Constructor type for extension classes
|
|
1483
|
-
*/
|
|
1484
|
-
export interface ExtensionConstructor {
|
|
1485
|
-
new (): Extension;
|
|
1486
|
-
metadata?: ExtensionMetadata;
|
|
1487
|
-
}
|
|
1488
1548
|
|
|
1489
1549
|
export {};
|
package/extensions.json
CHANGED
|
@@ -151,6 +151,32 @@
|
|
|
151
151
|
"type": "folder",
|
|
152
152
|
"hasDependencies": true,
|
|
153
153
|
"capabilities": ["onLoad", "onUnload", "onProjectStarted", "onProjectStopped", "getTools", "onToolFinished"]
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"id": "plannotator",
|
|
157
|
+
"name": "Plannotator",
|
|
158
|
+
"description": "Plan-based development workflow with visual review",
|
|
159
|
+
"folder": "plannotator",
|
|
160
|
+
"type": "folder",
|
|
161
|
+
"hasDependencies": true,
|
|
162
|
+
"capabilities": ["onLoad", "onAgentStarted", "onToolCalled", "onToolApproval"]
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"id": "programmatic-tool-calls",
|
|
166
|
+
"name": "Programmatic Tool Calls",
|
|
167
|
+
"description": "Execute JavaScript code in a sandbox with access to all tools as async functions",
|
|
168
|
+
"folder": "programmatic-tool-calls",
|
|
169
|
+
"type": "folder",
|
|
170
|
+
"hasDependencies": true,
|
|
171
|
+
"capabilities": ["getTools"]
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"id": "ui-placement-demo",
|
|
175
|
+
"name": "UI Placement Demo",
|
|
176
|
+
"description": "Demonstrates all available UI component placement locations in AiderDesk",
|
|
177
|
+
"file": "ui-placement-demo.ts",
|
|
178
|
+
"type": "single",
|
|
179
|
+
"capabilities": ["onLoad", "ui-components"]
|
|
154
180
|
}
|
|
155
181
|
]
|
|
156
182
|
}
|