@aiderdesk/extensions 0.10.0 → 0.12.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 +1 -0
- package/dist/index.d.ts +80 -2
- package/extensions.d.ts +80 -2
- package/extensions.json +9 -0
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -67,6 +67,7 @@ For comprehensive documentation on creating and using extensions, see the [Exten
|
|
|
67
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
68
|
| **[redact-secrets/](./extensions/redact-secrets/)** | Redacts secret values from `.env*` files in file read results | `security` |
|
|
69
69
|
| **[rtk/](./extensions/rtk/)** | Transparently rewrites shell commands to RTK equivalents, reducing LLM token consumption by 60-90% | `optimization`, `commands` |
|
|
70
|
+
| **[seek/](./extensions/seek/)** | Fast ranked code search using seek (zoekt) — replaces the internal grep tool | `tools`, `search` |
|
|
70
71
|
| **[sandbox/](./extensions/sandbox/)** | OS-level sandboxing for bash commands using `@anthropic-ai/sandbox-runtime` | `security` |
|
|
71
72
|
| **[sound-notification.ts](./extensions/sound-notification.ts)** | Plays a "Jobs Done" sound when a prompt finishes | `notifications` |
|
|
72
73
|
| **[theme.ts](./extensions/theme.ts)** | Adds `/theme` command to switch AiderDesk themes | `commands` |
|
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" | "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";
|
|
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" | string;
|
|
4
4
|
export interface LlmProviderBase {
|
|
5
5
|
name: LlmProviderName;
|
|
6
6
|
disableStreaming?: boolean;
|
|
@@ -167,7 +167,10 @@ export interface SyntheticProvider extends LlmProviderBase {
|
|
|
167
167
|
name: "synthetic";
|
|
168
168
|
apiKey: string;
|
|
169
169
|
}
|
|
170
|
-
export
|
|
170
|
+
export interface ExtensionLlmProvider extends LlmProviderBase {
|
|
171
|
+
[key: string]: unknown;
|
|
172
|
+
}
|
|
173
|
+
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 | ExtensionLlmProvider;
|
|
171
174
|
export type JSONValue = null | string | number | boolean | JSONObject | JSONArray;
|
|
172
175
|
export type JSONObject = {
|
|
173
176
|
[key: string]: JSONValue;
|
|
@@ -566,6 +569,7 @@ export interface TaskSettings {
|
|
|
566
569
|
taskNameModel?: string | null;
|
|
567
570
|
taskStateModel?: string | null;
|
|
568
571
|
commitMessageModel?: string | null;
|
|
572
|
+
defaultWorkingMode: WorkingMode;
|
|
569
573
|
}
|
|
570
574
|
export interface MemoryConfig {
|
|
571
575
|
enabled: boolean;
|
|
@@ -642,6 +646,12 @@ export interface ProviderProfile {
|
|
|
642
646
|
provider: LlmProvider;
|
|
643
647
|
headers?: Record<string, string>;
|
|
644
648
|
disabled?: boolean;
|
|
649
|
+
extensionId?: string;
|
|
650
|
+
}
|
|
651
|
+
export interface VoiceSession {
|
|
652
|
+
ephemeralToken: string;
|
|
653
|
+
model: string;
|
|
654
|
+
idleTimeoutMs: number;
|
|
645
655
|
}
|
|
646
656
|
export interface McpServerConfig {
|
|
647
657
|
command?: string;
|
|
@@ -650,6 +660,11 @@ export interface McpServerConfig {
|
|
|
650
660
|
url?: string;
|
|
651
661
|
headers?: Readonly<Record<string, string>>;
|
|
652
662
|
}
|
|
663
|
+
declare const WorkingModeSchema: z.ZodEnum<{
|
|
664
|
+
local: "local";
|
|
665
|
+
worktree: "worktree";
|
|
666
|
+
}>;
|
|
667
|
+
export type WorkingMode = z.infer<typeof WorkingModeSchema>;
|
|
653
668
|
declare const TaskDataSchema: z.ZodObject<{
|
|
654
669
|
id: z.ZodString;
|
|
655
670
|
baseDir: z.ZodString;
|
|
@@ -827,6 +842,61 @@ export interface ToolDefinition<TSchema extends z.ZodType = z.ZodType<Record<str
|
|
|
827
842
|
/** Execute function with type-safe args */
|
|
828
843
|
execute: (input: z.infer<TSchema>, signal: AbortSignal | undefined, context: ExtensionContext, allTools: Record<string, Tool>) => Promise<unknown>;
|
|
829
844
|
}
|
|
845
|
+
/**
|
|
846
|
+
* Response from loading models for a provider
|
|
847
|
+
*/
|
|
848
|
+
export interface LoadModelsResponse {
|
|
849
|
+
models: Model[];
|
|
850
|
+
success: boolean;
|
|
851
|
+
error?: string;
|
|
852
|
+
}
|
|
853
|
+
/**
|
|
854
|
+
* Aider-compatible model mapping with environment variables
|
|
855
|
+
*/
|
|
856
|
+
export interface AiderModelMapping {
|
|
857
|
+
modelName: string;
|
|
858
|
+
environmentVariables: Record<string, string>;
|
|
859
|
+
}
|
|
860
|
+
export interface CacheControl {
|
|
861
|
+
providerOptions: Record<string, Record<string, JSONValue>>;
|
|
862
|
+
placement?: "message" | "message-part";
|
|
863
|
+
}
|
|
864
|
+
/**
|
|
865
|
+
* Simplified provider strategy for extensions.
|
|
866
|
+
* Only `createLlm` and `loadModels` are required.
|
|
867
|
+
* All other methods are optional and will use built-in defaults when omitted.
|
|
868
|
+
*/
|
|
869
|
+
export interface ExtensionProviderStrategy {
|
|
870
|
+
createLlm: (profile: ProviderProfile, model: Model, settings: SettingsData, projectDir: string) => unknown | Promise<unknown>;
|
|
871
|
+
loadModels: (profile: ProviderProfile, settings: SettingsData) => Promise<LoadModelsResponse>;
|
|
872
|
+
getAiderMapping?: (provider: ProviderProfile, modelId: string, settings: SettingsData, projectDir: string) => AiderModelMapping;
|
|
873
|
+
getUsageReport?: (task: unknown, provider: ProviderProfile, model: Model, usage: unknown, providerMetadata?: unknown) => UsageReportData;
|
|
874
|
+
getProviderOptions?: (model: Model) => Record<string, Record<string, JSONValue>> | undefined;
|
|
875
|
+
getCacheControl?: (profile: AgentProfile) => CacheControl | undefined;
|
|
876
|
+
getProviderTools?: (model: Model) => Record<string, Tool> | Promise<Record<string, Tool>>;
|
|
877
|
+
getProviderParameters?: (model: Model) => Record<string, unknown>;
|
|
878
|
+
createVoiceSession?: (profile: ProviderProfile, settings: SettingsData) => Promise<VoiceSession>;
|
|
879
|
+
isRetryable?: (error: unknown) => boolean;
|
|
880
|
+
}
|
|
881
|
+
/**
|
|
882
|
+
* Definition of an LLM provider that can be registered by an extension.
|
|
883
|
+
* The extension fully owns the provider config — it is not UI-editable.
|
|
884
|
+
*/
|
|
885
|
+
export interface ProviderDefinition {
|
|
886
|
+
/** Unique provider identifier (e.g., 'my-provider') */
|
|
887
|
+
id: string;
|
|
888
|
+
/** Provider name — can be a new name or a built-in provider name to override it */
|
|
889
|
+
name: string;
|
|
890
|
+
/** Provider configuration (not UI-editable, extension-owned) */
|
|
891
|
+
provider: {
|
|
892
|
+
name: string;
|
|
893
|
+
[key: string]: unknown;
|
|
894
|
+
};
|
|
895
|
+
/** Provider strategy implementation */
|
|
896
|
+
strategy: ExtensionProviderStrategy;
|
|
897
|
+
/** Optional HTTP headers for API requests */
|
|
898
|
+
headers?: Record<string, string>;
|
|
899
|
+
}
|
|
830
900
|
/** Placement locations for extension UI components */
|
|
831
901
|
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" | "task-state-actions-all" | "welcome-page";
|
|
832
902
|
/**
|
|
@@ -1365,6 +1435,14 @@ export interface Extension {
|
|
|
1365
1435
|
* Extension-provided agents will be included in the list of all agents
|
|
1366
1436
|
*/
|
|
1367
1437
|
getAgents?(context: ExtensionContext): AgentProfile[];
|
|
1438
|
+
/**
|
|
1439
|
+
* Return array of LLM providers this extension provides
|
|
1440
|
+
* Each provider includes a strategy for LLM creation and model loading,
|
|
1441
|
+
* and a pre-configured provider profile.
|
|
1442
|
+
* Extension providers appear as read-only in the UI — the extension owns the configuration.
|
|
1443
|
+
* Provider names can override built-in providers (user responsibility to avoid conflicts between extensions).
|
|
1444
|
+
*/
|
|
1445
|
+
getProviders?(context: ExtensionContext): ProviderDefinition[];
|
|
1368
1446
|
/**
|
|
1369
1447
|
* Called when a user updates an extension-provided agent profile
|
|
1370
1448
|
* Extension should persist the updated profile and return it from future getAgents() calls
|
package/extensions.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
|
|
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";
|
|
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" | string;
|
|
4
4
|
export interface LlmProviderBase {
|
|
5
5
|
name: LlmProviderName;
|
|
6
6
|
disableStreaming?: boolean;
|
|
@@ -167,7 +167,10 @@ export interface SyntheticProvider extends LlmProviderBase {
|
|
|
167
167
|
name: "synthetic";
|
|
168
168
|
apiKey: string;
|
|
169
169
|
}
|
|
170
|
-
export
|
|
170
|
+
export interface ExtensionLlmProvider extends LlmProviderBase {
|
|
171
|
+
[key: string]: unknown;
|
|
172
|
+
}
|
|
173
|
+
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 | ExtensionLlmProvider;
|
|
171
174
|
export type JSONValue = null | string | number | boolean | JSONObject | JSONArray;
|
|
172
175
|
export type JSONObject = {
|
|
173
176
|
[key: string]: JSONValue;
|
|
@@ -566,6 +569,7 @@ export interface TaskSettings {
|
|
|
566
569
|
taskNameModel?: string | null;
|
|
567
570
|
taskStateModel?: string | null;
|
|
568
571
|
commitMessageModel?: string | null;
|
|
572
|
+
defaultWorkingMode: WorkingMode;
|
|
569
573
|
}
|
|
570
574
|
export interface MemoryConfig {
|
|
571
575
|
enabled: boolean;
|
|
@@ -642,6 +646,12 @@ export interface ProviderProfile {
|
|
|
642
646
|
provider: LlmProvider;
|
|
643
647
|
headers?: Record<string, string>;
|
|
644
648
|
disabled?: boolean;
|
|
649
|
+
extensionId?: string;
|
|
650
|
+
}
|
|
651
|
+
export interface VoiceSession {
|
|
652
|
+
ephemeralToken: string;
|
|
653
|
+
model: string;
|
|
654
|
+
idleTimeoutMs: number;
|
|
645
655
|
}
|
|
646
656
|
export interface McpServerConfig {
|
|
647
657
|
command?: string;
|
|
@@ -650,6 +660,11 @@ export interface McpServerConfig {
|
|
|
650
660
|
url?: string;
|
|
651
661
|
headers?: Readonly<Record<string, string>>;
|
|
652
662
|
}
|
|
663
|
+
declare const WorkingModeSchema: z.ZodEnum<{
|
|
664
|
+
local: "local";
|
|
665
|
+
worktree: "worktree";
|
|
666
|
+
}>;
|
|
667
|
+
export type WorkingMode = z.infer<typeof WorkingModeSchema>;
|
|
653
668
|
declare const TaskDataSchema: z.ZodObject<{
|
|
654
669
|
id: z.ZodString;
|
|
655
670
|
baseDir: z.ZodString;
|
|
@@ -827,6 +842,61 @@ export interface ToolDefinition<TSchema extends z.ZodType = z.ZodType<Record<str
|
|
|
827
842
|
/** Execute function with type-safe args */
|
|
828
843
|
execute: (input: z.infer<TSchema>, signal: AbortSignal | undefined, context: ExtensionContext, allTools: Record<string, Tool>) => Promise<unknown>;
|
|
829
844
|
}
|
|
845
|
+
/**
|
|
846
|
+
* Response from loading models for a provider
|
|
847
|
+
*/
|
|
848
|
+
export interface LoadModelsResponse {
|
|
849
|
+
models: Model[];
|
|
850
|
+
success: boolean;
|
|
851
|
+
error?: string;
|
|
852
|
+
}
|
|
853
|
+
/**
|
|
854
|
+
* Aider-compatible model mapping with environment variables
|
|
855
|
+
*/
|
|
856
|
+
export interface AiderModelMapping {
|
|
857
|
+
modelName: string;
|
|
858
|
+
environmentVariables: Record<string, string>;
|
|
859
|
+
}
|
|
860
|
+
export interface CacheControl {
|
|
861
|
+
providerOptions: Record<string, Record<string, JSONValue>>;
|
|
862
|
+
placement?: "message" | "message-part";
|
|
863
|
+
}
|
|
864
|
+
/**
|
|
865
|
+
* Simplified provider strategy for extensions.
|
|
866
|
+
* Only `createLlm` and `loadModels` are required.
|
|
867
|
+
* All other methods are optional and will use built-in defaults when omitted.
|
|
868
|
+
*/
|
|
869
|
+
export interface ExtensionProviderStrategy {
|
|
870
|
+
createLlm: (profile: ProviderProfile, model: Model, settings: SettingsData, projectDir: string) => unknown | Promise<unknown>;
|
|
871
|
+
loadModels: (profile: ProviderProfile, settings: SettingsData) => Promise<LoadModelsResponse>;
|
|
872
|
+
getAiderMapping?: (provider: ProviderProfile, modelId: string, settings: SettingsData, projectDir: string) => AiderModelMapping;
|
|
873
|
+
getUsageReport?: (task: unknown, provider: ProviderProfile, model: Model, usage: unknown, providerMetadata?: unknown) => UsageReportData;
|
|
874
|
+
getProviderOptions?: (model: Model) => Record<string, Record<string, JSONValue>> | undefined;
|
|
875
|
+
getCacheControl?: (profile: AgentProfile) => CacheControl | undefined;
|
|
876
|
+
getProviderTools?: (model: Model) => Record<string, Tool> | Promise<Record<string, Tool>>;
|
|
877
|
+
getProviderParameters?: (model: Model) => Record<string, unknown>;
|
|
878
|
+
createVoiceSession?: (profile: ProviderProfile, settings: SettingsData) => Promise<VoiceSession>;
|
|
879
|
+
isRetryable?: (error: unknown) => boolean;
|
|
880
|
+
}
|
|
881
|
+
/**
|
|
882
|
+
* Definition of an LLM provider that can be registered by an extension.
|
|
883
|
+
* The extension fully owns the provider config — it is not UI-editable.
|
|
884
|
+
*/
|
|
885
|
+
export interface ProviderDefinition {
|
|
886
|
+
/** Unique provider identifier (e.g., 'my-provider') */
|
|
887
|
+
id: string;
|
|
888
|
+
/** Provider name — can be a new name or a built-in provider name to override it */
|
|
889
|
+
name: string;
|
|
890
|
+
/** Provider configuration (not UI-editable, extension-owned) */
|
|
891
|
+
provider: {
|
|
892
|
+
name: string;
|
|
893
|
+
[key: string]: unknown;
|
|
894
|
+
};
|
|
895
|
+
/** Provider strategy implementation */
|
|
896
|
+
strategy: ExtensionProviderStrategy;
|
|
897
|
+
/** Optional HTTP headers for API requests */
|
|
898
|
+
headers?: Record<string, string>;
|
|
899
|
+
}
|
|
830
900
|
/** Placement locations for extension UI components */
|
|
831
901
|
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" | "task-state-actions-all" | "welcome-page";
|
|
832
902
|
/**
|
|
@@ -1365,6 +1435,14 @@ export interface Extension {
|
|
|
1365
1435
|
* Extension-provided agents will be included in the list of all agents
|
|
1366
1436
|
*/
|
|
1367
1437
|
getAgents?(context: ExtensionContext): AgentProfile[];
|
|
1438
|
+
/**
|
|
1439
|
+
* Return array of LLM providers this extension provides
|
|
1440
|
+
* Each provider includes a strategy for LLM creation and model loading,
|
|
1441
|
+
* and a pre-configured provider profile.
|
|
1442
|
+
* Extension providers appear as read-only in the UI — the extension owns the configuration.
|
|
1443
|
+
* Provider names can override built-in providers (user responsibility to avoid conflicts between extensions).
|
|
1444
|
+
*/
|
|
1445
|
+
getProviders?(context: ExtensionContext): ProviderDefinition[];
|
|
1368
1446
|
/**
|
|
1369
1447
|
* Called when a user updates an extension-provided agent profile
|
|
1370
1448
|
* Extension should persist the updated profile and return it from future getAgents() calls
|
package/extensions.json
CHANGED
|
@@ -205,6 +205,15 @@
|
|
|
205
205
|
"hasDependencies": true,
|
|
206
206
|
"capabilities": ["ui"]
|
|
207
207
|
},
|
|
208
|
+
{
|
|
209
|
+
"id": "seek",
|
|
210
|
+
"name": "Seek",
|
|
211
|
+
"description": "Fast ranked code search using seek (zoekt) — replaces the internal grep tool",
|
|
212
|
+
"folder": "seek",
|
|
213
|
+
"type": "folder",
|
|
214
|
+
"hasDependencies": true,
|
|
215
|
+
"capabilities": ["tools", "search"]
|
|
216
|
+
},
|
|
208
217
|
{
|
|
209
218
|
"id": "tps-counter",
|
|
210
219
|
"name": "TPS Counter",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aiderdesk/extensions",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "Type definitions and examples for AiderDesk extensions",
|
|
5
5
|
"author": "Hotovo",
|
|
6
6
|
"homepage": "https://aiderdesk.hotovo.com",
|
|
@@ -36,7 +36,9 @@
|
|
|
36
36
|
"scripts": {
|
|
37
37
|
"build": "dts-bundle-generator --external-imports zod node --project ../../tsconfig.node.json --no-check --no-banner -o extensions.d.ts ../../packages/common/src/extensions.ts && node scripts/build.mjs",
|
|
38
38
|
"typecheck": "tsc --noEmit",
|
|
39
|
-
"prepublishOnly": "npm run build"
|
|
39
|
+
"prepublishOnly": "npm run build",
|
|
40
|
+
"publish:next": "node scripts/publish-next.mjs",
|
|
41
|
+
"release:latest": "node scripts/release-latest.mjs"
|
|
40
42
|
},
|
|
41
43
|
"keywords": [
|
|
42
44
|
"aiderdesk",
|