@aiderdesk/extensions 0.16.0 → 0.18.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/dist/index.d.ts +73 -8
- package/extensions.d.ts +73 -8
- package/extensions.json +17 -4
- package/package.json +1 -1
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" | "mistral" | "ollama" | "openai" | "openai-compatible" | "opencode" | "openrouter" | "requesty" | "synthetic" | "vertex-ai" | "zai-plan" | string;
|
|
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" | "mistral" | "neuralwatt" | "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;
|
|
@@ -171,6 +171,10 @@ export interface MistralProvider extends LlmProviderBase {
|
|
|
171
171
|
name: "mistral";
|
|
172
172
|
apiKey: string;
|
|
173
173
|
}
|
|
174
|
+
export interface NeuralwattProvider extends LlmProviderBase {
|
|
175
|
+
name: "neuralwatt";
|
|
176
|
+
apiKey: string;
|
|
177
|
+
}
|
|
174
178
|
export interface SyntheticProvider extends LlmProviderBase {
|
|
175
179
|
name: "synthetic";
|
|
176
180
|
apiKey: string;
|
|
@@ -178,7 +182,7 @@ export interface SyntheticProvider extends LlmProviderBase {
|
|
|
178
182
|
export interface ExtensionLlmProvider extends LlmProviderBase {
|
|
179
183
|
[key: string]: unknown;
|
|
180
184
|
}
|
|
181
|
-
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 | MistralProvider | ExtensionLlmProvider;
|
|
185
|
+
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 | MistralProvider | NeuralwattProvider | ExtensionLlmProvider;
|
|
182
186
|
export type JSONValue = null | string | number | boolean | JSONObject | JSONArray;
|
|
183
187
|
export type JSONObject = {
|
|
184
188
|
[key: string]: JSONValue;
|
|
@@ -273,6 +277,7 @@ declare enum MessageRole {
|
|
|
273
277
|
}
|
|
274
278
|
export interface BaseContextMessage {
|
|
275
279
|
id: string;
|
|
280
|
+
timestamp?: number;
|
|
276
281
|
usageReport?: UsageReportData;
|
|
277
282
|
promptContext?: PromptContext;
|
|
278
283
|
}
|
|
@@ -316,6 +321,11 @@ export interface ModeDefinition {
|
|
|
316
321
|
icon?: string;
|
|
317
322
|
}
|
|
318
323
|
export type Mode = string;
|
|
324
|
+
export declare enum AutonomyMode {
|
|
325
|
+
Manual = "manual",
|
|
326
|
+
Guided = "guided",
|
|
327
|
+
Autonomous = "autonomous"
|
|
328
|
+
}
|
|
319
329
|
declare enum DiffViewMode {
|
|
320
330
|
SideBySide = "side-by-side",
|
|
321
331
|
Unified = "unified",
|
|
@@ -355,6 +365,7 @@ export interface ResponseCompletedData {
|
|
|
355
365
|
usageReport?: UsageReportData;
|
|
356
366
|
sequenceNumber?: number;
|
|
357
367
|
promptContext?: PromptContext;
|
|
368
|
+
timestamp?: number;
|
|
358
369
|
}
|
|
359
370
|
export interface UpdatedFile {
|
|
360
371
|
path: string;
|
|
@@ -391,6 +402,11 @@ export interface QueuedPromptData {
|
|
|
391
402
|
mode: Mode;
|
|
392
403
|
timestamp: number;
|
|
393
404
|
}
|
|
405
|
+
export declare enum OS {
|
|
406
|
+
Windows = "windows",
|
|
407
|
+
Linux = "linux",
|
|
408
|
+
MacOS = "macos"
|
|
409
|
+
}
|
|
394
410
|
declare const ProjectSettingsSchema: z.ZodObject<{
|
|
395
411
|
mainModel: z.ZodString;
|
|
396
412
|
weakModel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -408,7 +424,7 @@ declare const ProjectSettingsSchema: z.ZodObject<{
|
|
|
408
424
|
thinkingTokens: z.ZodOptional<z.ZodString>;
|
|
409
425
|
currentMode: z.ZodString;
|
|
410
426
|
weakModelLocked: z.ZodOptional<z.ZodBoolean>;
|
|
411
|
-
|
|
427
|
+
autonomyModeLocked: z.ZodOptional<z.ZodBoolean>;
|
|
412
428
|
updatedFilesGroupMode: z.ZodDefault<z.ZodEnum<{
|
|
413
429
|
grouped: "grouped";
|
|
414
430
|
flat: "flat";
|
|
@@ -579,6 +595,11 @@ declare enum ContextCompactionType {
|
|
|
579
595
|
Handoff = "handoff",
|
|
580
596
|
Smart = "smart"
|
|
581
597
|
}
|
|
598
|
+
declare enum FileWatchMode {
|
|
599
|
+
Auto = "auto",
|
|
600
|
+
Native = "native",
|
|
601
|
+
Polling = "polling"
|
|
602
|
+
}
|
|
582
603
|
export interface TaskSettings {
|
|
583
604
|
smartTaskState: boolean;
|
|
584
605
|
autoGenerateTaskName: boolean;
|
|
@@ -672,6 +693,7 @@ export interface SettingsData {
|
|
|
672
693
|
enabled: boolean;
|
|
673
694
|
url: string;
|
|
674
695
|
};
|
|
696
|
+
fileWatchMode?: FileWatchMode;
|
|
675
697
|
}
|
|
676
698
|
export interface ProviderProfile {
|
|
677
699
|
id: string;
|
|
@@ -731,7 +753,7 @@ declare const TaskDataSchema: z.ZodObject<{
|
|
|
731
753
|
}, z.core.$strip>>;
|
|
732
754
|
aiderTotalCost: z.ZodNumber;
|
|
733
755
|
agentTotalCost: z.ZodNumber;
|
|
734
|
-
|
|
756
|
+
autonomyMode: z.ZodOptional<z.ZodEnum<typeof AutonomyMode>>;
|
|
735
757
|
agentProfileId: z.ZodOptional<z.ZodString>;
|
|
736
758
|
provider: z.ZodOptional<z.ZodString>;
|
|
737
759
|
model: z.ZodOptional<z.ZodString>;
|
|
@@ -751,7 +773,7 @@ export type TaskData = z.infer<typeof TaskDataSchema>;
|
|
|
751
773
|
export interface CreateTaskParams {
|
|
752
774
|
parentId?: string | null;
|
|
753
775
|
name?: string;
|
|
754
|
-
|
|
776
|
+
autonomyMode?: AutonomyMode;
|
|
755
777
|
activate?: boolean;
|
|
756
778
|
handoff?: boolean;
|
|
757
779
|
sendEvent?: boolean;
|
|
@@ -795,7 +817,7 @@ export interface CommandArgument {
|
|
|
795
817
|
export interface CustomCommand extends Command {
|
|
796
818
|
template: string;
|
|
797
819
|
includeContext?: boolean;
|
|
798
|
-
|
|
820
|
+
autonomyMode?: AutonomyMode;
|
|
799
821
|
skills?: string[];
|
|
800
822
|
}
|
|
801
823
|
declare enum MemoryEntryType {
|
|
@@ -829,6 +851,7 @@ export interface ResponseMessage {
|
|
|
829
851
|
finished: boolean;
|
|
830
852
|
usageReport?: UsageReportData;
|
|
831
853
|
promptContext?: PromptContext;
|
|
854
|
+
timestamp?: number;
|
|
832
855
|
}
|
|
833
856
|
/**
|
|
834
857
|
* Metadata describing an extension
|
|
@@ -846,6 +869,8 @@ export interface ExtensionMetadata {
|
|
|
846
869
|
capabilities?: string[];
|
|
847
870
|
/** Optional URL to an icon image for the extension */
|
|
848
871
|
iconUrl?: string;
|
|
872
|
+
/** Optional list of supported operating systems. If undefined, all OSes are supported. */
|
|
873
|
+
supportedOS?: OS[];
|
|
849
874
|
}
|
|
850
875
|
/**
|
|
851
876
|
* Result returned by tool execution
|
|
@@ -956,7 +981,7 @@ export interface ProviderDefinition {
|
|
|
956
981
|
headers?: Record<string, string>;
|
|
957
982
|
}
|
|
958
983
|
/** Placement locations for extension UI components */
|
|
959
|
-
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";
|
|
984
|
+
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" | "tasks-sidebar-actions-left" | "tasks-sidebar-actions-right" | "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";
|
|
960
985
|
/**
|
|
961
986
|
* Definition of a React UI component that can be registered by an extension.
|
|
962
987
|
* The component is defined as a JSX string and rendered using string-to-react-component.
|
|
@@ -1017,6 +1042,7 @@ export interface UIComponents {
|
|
|
1017
1042
|
Tooltip: UIComponent;
|
|
1018
1043
|
LoadingOverlay: UIComponent;
|
|
1019
1044
|
ConfirmDialog: UIComponent;
|
|
1045
|
+
ModalOverlayLayout: UIComponent;
|
|
1020
1046
|
}
|
|
1021
1047
|
export interface UIComponentProps {
|
|
1022
1048
|
projectDir?: string;
|
|
@@ -1026,6 +1052,8 @@ export interface UIComponentProps {
|
|
|
1026
1052
|
providers: ProviderProfile[];
|
|
1027
1053
|
ui: UIComponents;
|
|
1028
1054
|
icons: Record<string, unknown>;
|
|
1055
|
+
libraries: Record<string, Record<string, unknown>>;
|
|
1056
|
+
activateTask?: (taskId: string) => void;
|
|
1029
1057
|
}
|
|
1030
1058
|
/**
|
|
1031
1059
|
* Definition of a command that can be registered by an extension
|
|
@@ -1176,6 +1204,7 @@ export interface ToolApprovalEvent {
|
|
|
1176
1204
|
}
|
|
1177
1205
|
/** Event payload for tool called events */
|
|
1178
1206
|
export interface ToolCalledEvent {
|
|
1207
|
+
readonly toolCallId: string;
|
|
1179
1208
|
readonly toolName: string;
|
|
1180
1209
|
readonly agentProfile: AgentProfile;
|
|
1181
1210
|
readonly abortSignal?: AbortSignal;
|
|
@@ -1184,6 +1213,7 @@ export interface ToolCalledEvent {
|
|
|
1184
1213
|
}
|
|
1185
1214
|
/** Event payload for tool finished events */
|
|
1186
1215
|
export interface ToolFinishedEvent {
|
|
1216
|
+
readonly toolCallId: string;
|
|
1187
1217
|
readonly toolName: string;
|
|
1188
1218
|
readonly agentProfile: AgentProfile;
|
|
1189
1219
|
readonly input: Record<string, unknown> | undefined;
|
|
@@ -1233,6 +1263,7 @@ export interface SubagentFinishedEvent {
|
|
|
1233
1263
|
/** Event payload for question asked events */
|
|
1234
1264
|
export interface QuestionAskedEvent {
|
|
1235
1265
|
question: QuestionData;
|
|
1266
|
+
readonly storedAnswer?: string;
|
|
1236
1267
|
answer?: string;
|
|
1237
1268
|
}
|
|
1238
1269
|
/** Event payload for question answered events */
|
|
@@ -1261,7 +1292,7 @@ export interface AiderPromptStartedEvent {
|
|
|
1261
1292
|
messages: ConnectorMessage[];
|
|
1262
1293
|
files: ContextFile[];
|
|
1263
1294
|
blocked?: boolean;
|
|
1264
|
-
|
|
1295
|
+
autonomyMode?: AutonomyMode;
|
|
1265
1296
|
denyCommands?: boolean;
|
|
1266
1297
|
}
|
|
1267
1298
|
/** Event payload for aider prompt finished events */
|
|
@@ -1884,6 +1915,21 @@ export interface ExtensionContext {
|
|
|
1884
1915
|
* @throws Error if the MemoryManager is not available
|
|
1885
1916
|
*/
|
|
1886
1917
|
getMemoryContext(): MemoryContext;
|
|
1918
|
+
/**
|
|
1919
|
+
* Truncate a tool result string that exceeds size limits.
|
|
1920
|
+
* Checks line count, byte size, and token count against the provided limits.
|
|
1921
|
+
* When content exceeds any limit, it is truncated with head/tail preservation
|
|
1922
|
+
* and a notice indicating the truncation reason.
|
|
1923
|
+
* The full content is saved to a temporary file referenced in the notice.
|
|
1924
|
+
* @param content - The text content to potentially truncate
|
|
1925
|
+
* @param maxLines - Maximum number of lines before truncation (default: 1000)
|
|
1926
|
+
* @param maxSizeKB - Maximum size in kilobytes before truncation (default: 50)
|
|
1927
|
+
* @param maxTokens - Maximum token count before truncation (defaut: 50000)
|
|
1928
|
+
* @param saveToFile - Whether to save the full content to a file and include a reference in the notice (default: true)
|
|
1929
|
+
* @param truncationSuffix - Optional custom suffix to append to truncated content (default: autogenerated notice)
|
|
1930
|
+
* @returns Promise resolving to the original or truncated content
|
|
1931
|
+
*/
|
|
1932
|
+
truncateToolResult(content: string, maxLines?: number, maxSizeKB?: number, maxTokens?: number, saveToFile?: boolean, truncationSuffix?: string): Promise<string>;
|
|
1887
1933
|
}
|
|
1888
1934
|
/**
|
|
1889
1935
|
* Memory context providing access to AiderDesk's memory system.
|
|
@@ -2022,6 +2068,22 @@ export interface Extension {
|
|
|
2022
2068
|
* Called when extension is loaded and when components need to be refreshed
|
|
2023
2069
|
*/
|
|
2024
2070
|
getUIComponents?(context: ExtensionContext): UIComponentDefinition[];
|
|
2071
|
+
/**
|
|
2072
|
+
* Return list of npm packages that this extension's UI components need.
|
|
2073
|
+
* Libraries are resolved via esm.sh and cached to disk for offline reuse.
|
|
2074
|
+
* Resolved libraries are passed to UI components as `props.libraries.<key>`.
|
|
2075
|
+
*
|
|
2076
|
+
* @example
|
|
2077
|
+
* ```typescript
|
|
2078
|
+
* getUIComponentsLibraries(): Record<string, string> {
|
|
2079
|
+
* return {
|
|
2080
|
+
* kanban: 'react-kanban-kit@^1.0.0',
|
|
2081
|
+
* lodash: 'lodash@^4.17.0',
|
|
2082
|
+
* };
|
|
2083
|
+
* }
|
|
2084
|
+
* ```
|
|
2085
|
+
*/
|
|
2086
|
+
getUIComponentsLibraries?(): Record<string, string>;
|
|
2025
2087
|
/**
|
|
2026
2088
|
* Return data for a specific UI component
|
|
2027
2089
|
* Called when the component is mounted or when UI refresh is triggered
|
|
@@ -2217,6 +2279,9 @@ export interface Extension {
|
|
|
2217
2279
|
onSubagentFinished?(event: SubagentFinishedEvent, context: ExtensionContext): Promise<void | Partial<SubagentFinishedEvent>>;
|
|
2218
2280
|
/**
|
|
2219
2281
|
* Called when a question is asked to the user
|
|
2282
|
+
* The event includes an optional `storedAnswer` field — when present, the question
|
|
2283
|
+
* already has a cached/auto answer and extensions may choose to skip side effects
|
|
2284
|
+
* (e.g., sound notifications) since the user will not be prompted.
|
|
2220
2285
|
* @returns void or partial event to modify question
|
|
2221
2286
|
*/
|
|
2222
2287
|
onQuestionAsked?(event: QuestionAskedEvent, context: ExtensionContext): Promise<void | Partial<QuestionAskedEvent>>;
|
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" | "mistral" | "ollama" | "openai" | "openai-compatible" | "opencode" | "openrouter" | "requesty" | "synthetic" | "vertex-ai" | "zai-plan" | string;
|
|
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" | "mistral" | "neuralwatt" | "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;
|
|
@@ -171,6 +171,10 @@ export interface MistralProvider extends LlmProviderBase {
|
|
|
171
171
|
name: "mistral";
|
|
172
172
|
apiKey: string;
|
|
173
173
|
}
|
|
174
|
+
export interface NeuralwattProvider extends LlmProviderBase {
|
|
175
|
+
name: "neuralwatt";
|
|
176
|
+
apiKey: string;
|
|
177
|
+
}
|
|
174
178
|
export interface SyntheticProvider extends LlmProviderBase {
|
|
175
179
|
name: "synthetic";
|
|
176
180
|
apiKey: string;
|
|
@@ -178,7 +182,7 @@ export interface SyntheticProvider extends LlmProviderBase {
|
|
|
178
182
|
export interface ExtensionLlmProvider extends LlmProviderBase {
|
|
179
183
|
[key: string]: unknown;
|
|
180
184
|
}
|
|
181
|
-
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 | MistralProvider | ExtensionLlmProvider;
|
|
185
|
+
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 | MistralProvider | NeuralwattProvider | ExtensionLlmProvider;
|
|
182
186
|
export type JSONValue = null | string | number | boolean | JSONObject | JSONArray;
|
|
183
187
|
export type JSONObject = {
|
|
184
188
|
[key: string]: JSONValue;
|
|
@@ -273,6 +277,7 @@ declare enum MessageRole {
|
|
|
273
277
|
}
|
|
274
278
|
export interface BaseContextMessage {
|
|
275
279
|
id: string;
|
|
280
|
+
timestamp?: number;
|
|
276
281
|
usageReport?: UsageReportData;
|
|
277
282
|
promptContext?: PromptContext;
|
|
278
283
|
}
|
|
@@ -316,6 +321,11 @@ export interface ModeDefinition {
|
|
|
316
321
|
icon?: string;
|
|
317
322
|
}
|
|
318
323
|
export type Mode = string;
|
|
324
|
+
export declare enum AutonomyMode {
|
|
325
|
+
Manual = "manual",
|
|
326
|
+
Guided = "guided",
|
|
327
|
+
Autonomous = "autonomous"
|
|
328
|
+
}
|
|
319
329
|
declare enum DiffViewMode {
|
|
320
330
|
SideBySide = "side-by-side",
|
|
321
331
|
Unified = "unified",
|
|
@@ -355,6 +365,7 @@ export interface ResponseCompletedData {
|
|
|
355
365
|
usageReport?: UsageReportData;
|
|
356
366
|
sequenceNumber?: number;
|
|
357
367
|
promptContext?: PromptContext;
|
|
368
|
+
timestamp?: number;
|
|
358
369
|
}
|
|
359
370
|
export interface UpdatedFile {
|
|
360
371
|
path: string;
|
|
@@ -391,6 +402,11 @@ export interface QueuedPromptData {
|
|
|
391
402
|
mode: Mode;
|
|
392
403
|
timestamp: number;
|
|
393
404
|
}
|
|
405
|
+
export declare enum OS {
|
|
406
|
+
Windows = "windows",
|
|
407
|
+
Linux = "linux",
|
|
408
|
+
MacOS = "macos"
|
|
409
|
+
}
|
|
394
410
|
declare const ProjectSettingsSchema: z.ZodObject<{
|
|
395
411
|
mainModel: z.ZodString;
|
|
396
412
|
weakModel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -408,7 +424,7 @@ declare const ProjectSettingsSchema: z.ZodObject<{
|
|
|
408
424
|
thinkingTokens: z.ZodOptional<z.ZodString>;
|
|
409
425
|
currentMode: z.ZodString;
|
|
410
426
|
weakModelLocked: z.ZodOptional<z.ZodBoolean>;
|
|
411
|
-
|
|
427
|
+
autonomyModeLocked: z.ZodOptional<z.ZodBoolean>;
|
|
412
428
|
updatedFilesGroupMode: z.ZodDefault<z.ZodEnum<{
|
|
413
429
|
grouped: "grouped";
|
|
414
430
|
flat: "flat";
|
|
@@ -579,6 +595,11 @@ declare enum ContextCompactionType {
|
|
|
579
595
|
Handoff = "handoff",
|
|
580
596
|
Smart = "smart"
|
|
581
597
|
}
|
|
598
|
+
declare enum FileWatchMode {
|
|
599
|
+
Auto = "auto",
|
|
600
|
+
Native = "native",
|
|
601
|
+
Polling = "polling"
|
|
602
|
+
}
|
|
582
603
|
export interface TaskSettings {
|
|
583
604
|
smartTaskState: boolean;
|
|
584
605
|
autoGenerateTaskName: boolean;
|
|
@@ -672,6 +693,7 @@ export interface SettingsData {
|
|
|
672
693
|
enabled: boolean;
|
|
673
694
|
url: string;
|
|
674
695
|
};
|
|
696
|
+
fileWatchMode?: FileWatchMode;
|
|
675
697
|
}
|
|
676
698
|
export interface ProviderProfile {
|
|
677
699
|
id: string;
|
|
@@ -731,7 +753,7 @@ declare const TaskDataSchema: z.ZodObject<{
|
|
|
731
753
|
}, z.core.$strip>>;
|
|
732
754
|
aiderTotalCost: z.ZodNumber;
|
|
733
755
|
agentTotalCost: z.ZodNumber;
|
|
734
|
-
|
|
756
|
+
autonomyMode: z.ZodOptional<z.ZodEnum<typeof AutonomyMode>>;
|
|
735
757
|
agentProfileId: z.ZodOptional<z.ZodString>;
|
|
736
758
|
provider: z.ZodOptional<z.ZodString>;
|
|
737
759
|
model: z.ZodOptional<z.ZodString>;
|
|
@@ -751,7 +773,7 @@ export type TaskData = z.infer<typeof TaskDataSchema>;
|
|
|
751
773
|
export interface CreateTaskParams {
|
|
752
774
|
parentId?: string | null;
|
|
753
775
|
name?: string;
|
|
754
|
-
|
|
776
|
+
autonomyMode?: AutonomyMode;
|
|
755
777
|
activate?: boolean;
|
|
756
778
|
handoff?: boolean;
|
|
757
779
|
sendEvent?: boolean;
|
|
@@ -795,7 +817,7 @@ export interface CommandArgument {
|
|
|
795
817
|
export interface CustomCommand extends Command {
|
|
796
818
|
template: string;
|
|
797
819
|
includeContext?: boolean;
|
|
798
|
-
|
|
820
|
+
autonomyMode?: AutonomyMode;
|
|
799
821
|
skills?: string[];
|
|
800
822
|
}
|
|
801
823
|
declare enum MemoryEntryType {
|
|
@@ -829,6 +851,7 @@ export interface ResponseMessage {
|
|
|
829
851
|
finished: boolean;
|
|
830
852
|
usageReport?: UsageReportData;
|
|
831
853
|
promptContext?: PromptContext;
|
|
854
|
+
timestamp?: number;
|
|
832
855
|
}
|
|
833
856
|
/**
|
|
834
857
|
* Metadata describing an extension
|
|
@@ -846,6 +869,8 @@ export interface ExtensionMetadata {
|
|
|
846
869
|
capabilities?: string[];
|
|
847
870
|
/** Optional URL to an icon image for the extension */
|
|
848
871
|
iconUrl?: string;
|
|
872
|
+
/** Optional list of supported operating systems. If undefined, all OSes are supported. */
|
|
873
|
+
supportedOS?: OS[];
|
|
849
874
|
}
|
|
850
875
|
/**
|
|
851
876
|
* Result returned by tool execution
|
|
@@ -956,7 +981,7 @@ export interface ProviderDefinition {
|
|
|
956
981
|
headers?: Record<string, string>;
|
|
957
982
|
}
|
|
958
983
|
/** Placement locations for extension UI components */
|
|
959
|
-
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";
|
|
984
|
+
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" | "tasks-sidebar-actions-left" | "tasks-sidebar-actions-right" | "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";
|
|
960
985
|
/**
|
|
961
986
|
* Definition of a React UI component that can be registered by an extension.
|
|
962
987
|
* The component is defined as a JSX string and rendered using string-to-react-component.
|
|
@@ -1017,6 +1042,7 @@ export interface UIComponents {
|
|
|
1017
1042
|
Tooltip: UIComponent;
|
|
1018
1043
|
LoadingOverlay: UIComponent;
|
|
1019
1044
|
ConfirmDialog: UIComponent;
|
|
1045
|
+
ModalOverlayLayout: UIComponent;
|
|
1020
1046
|
}
|
|
1021
1047
|
export interface UIComponentProps {
|
|
1022
1048
|
projectDir?: string;
|
|
@@ -1026,6 +1052,8 @@ export interface UIComponentProps {
|
|
|
1026
1052
|
providers: ProviderProfile[];
|
|
1027
1053
|
ui: UIComponents;
|
|
1028
1054
|
icons: Record<string, unknown>;
|
|
1055
|
+
libraries: Record<string, Record<string, unknown>>;
|
|
1056
|
+
activateTask?: (taskId: string) => void;
|
|
1029
1057
|
}
|
|
1030
1058
|
/**
|
|
1031
1059
|
* Definition of a command that can be registered by an extension
|
|
@@ -1176,6 +1204,7 @@ export interface ToolApprovalEvent {
|
|
|
1176
1204
|
}
|
|
1177
1205
|
/** Event payload for tool called events */
|
|
1178
1206
|
export interface ToolCalledEvent {
|
|
1207
|
+
readonly toolCallId: string;
|
|
1179
1208
|
readonly toolName: string;
|
|
1180
1209
|
readonly agentProfile: AgentProfile;
|
|
1181
1210
|
readonly abortSignal?: AbortSignal;
|
|
@@ -1184,6 +1213,7 @@ export interface ToolCalledEvent {
|
|
|
1184
1213
|
}
|
|
1185
1214
|
/** Event payload for tool finished events */
|
|
1186
1215
|
export interface ToolFinishedEvent {
|
|
1216
|
+
readonly toolCallId: string;
|
|
1187
1217
|
readonly toolName: string;
|
|
1188
1218
|
readonly agentProfile: AgentProfile;
|
|
1189
1219
|
readonly input: Record<string, unknown> | undefined;
|
|
@@ -1233,6 +1263,7 @@ export interface SubagentFinishedEvent {
|
|
|
1233
1263
|
/** Event payload for question asked events */
|
|
1234
1264
|
export interface QuestionAskedEvent {
|
|
1235
1265
|
question: QuestionData;
|
|
1266
|
+
readonly storedAnswer?: string;
|
|
1236
1267
|
answer?: string;
|
|
1237
1268
|
}
|
|
1238
1269
|
/** Event payload for question answered events */
|
|
@@ -1261,7 +1292,7 @@ export interface AiderPromptStartedEvent {
|
|
|
1261
1292
|
messages: ConnectorMessage[];
|
|
1262
1293
|
files: ContextFile[];
|
|
1263
1294
|
blocked?: boolean;
|
|
1264
|
-
|
|
1295
|
+
autonomyMode?: AutonomyMode;
|
|
1265
1296
|
denyCommands?: boolean;
|
|
1266
1297
|
}
|
|
1267
1298
|
/** Event payload for aider prompt finished events */
|
|
@@ -1884,6 +1915,21 @@ export interface ExtensionContext {
|
|
|
1884
1915
|
* @throws Error if the MemoryManager is not available
|
|
1885
1916
|
*/
|
|
1886
1917
|
getMemoryContext(): MemoryContext;
|
|
1918
|
+
/**
|
|
1919
|
+
* Truncate a tool result string that exceeds size limits.
|
|
1920
|
+
* Checks line count, byte size, and token count against the provided limits.
|
|
1921
|
+
* When content exceeds any limit, it is truncated with head/tail preservation
|
|
1922
|
+
* and a notice indicating the truncation reason.
|
|
1923
|
+
* The full content is saved to a temporary file referenced in the notice.
|
|
1924
|
+
* @param content - The text content to potentially truncate
|
|
1925
|
+
* @param maxLines - Maximum number of lines before truncation (default: 1000)
|
|
1926
|
+
* @param maxSizeKB - Maximum size in kilobytes before truncation (default: 50)
|
|
1927
|
+
* @param maxTokens - Maximum token count before truncation (defaut: 50000)
|
|
1928
|
+
* @param saveToFile - Whether to save the full content to a file and include a reference in the notice (default: true)
|
|
1929
|
+
* @param truncationSuffix - Optional custom suffix to append to truncated content (default: autogenerated notice)
|
|
1930
|
+
* @returns Promise resolving to the original or truncated content
|
|
1931
|
+
*/
|
|
1932
|
+
truncateToolResult(content: string, maxLines?: number, maxSizeKB?: number, maxTokens?: number, saveToFile?: boolean, truncationSuffix?: string): Promise<string>;
|
|
1887
1933
|
}
|
|
1888
1934
|
/**
|
|
1889
1935
|
* Memory context providing access to AiderDesk's memory system.
|
|
@@ -2022,6 +2068,22 @@ export interface Extension {
|
|
|
2022
2068
|
* Called when extension is loaded and when components need to be refreshed
|
|
2023
2069
|
*/
|
|
2024
2070
|
getUIComponents?(context: ExtensionContext): UIComponentDefinition[];
|
|
2071
|
+
/**
|
|
2072
|
+
* Return list of npm packages that this extension's UI components need.
|
|
2073
|
+
* Libraries are resolved via esm.sh and cached to disk for offline reuse.
|
|
2074
|
+
* Resolved libraries are passed to UI components as `props.libraries.<key>`.
|
|
2075
|
+
*
|
|
2076
|
+
* @example
|
|
2077
|
+
* ```typescript
|
|
2078
|
+
* getUIComponentsLibraries(): Record<string, string> {
|
|
2079
|
+
* return {
|
|
2080
|
+
* kanban: 'react-kanban-kit@^1.0.0',
|
|
2081
|
+
* lodash: 'lodash@^4.17.0',
|
|
2082
|
+
* };
|
|
2083
|
+
* }
|
|
2084
|
+
* ```
|
|
2085
|
+
*/
|
|
2086
|
+
getUIComponentsLibraries?(): Record<string, string>;
|
|
2025
2087
|
/**
|
|
2026
2088
|
* Return data for a specific UI component
|
|
2027
2089
|
* Called when the component is mounted or when UI refresh is triggered
|
|
@@ -2217,6 +2279,9 @@ export interface Extension {
|
|
|
2217
2279
|
onSubagentFinished?(event: SubagentFinishedEvent, context: ExtensionContext): Promise<void | Partial<SubagentFinishedEvent>>;
|
|
2218
2280
|
/**
|
|
2219
2281
|
* Called when a question is asked to the user
|
|
2282
|
+
* The event includes an optional `storedAnswer` field — when present, the question
|
|
2283
|
+
* already has a cached/auto answer and extensions may choose to skip side effects
|
|
2284
|
+
* (e.g., sound notifications) since the user will not be prompted.
|
|
2220
2285
|
* @returns void or partial event to modify question
|
|
2221
2286
|
*/
|
|
2222
2287
|
onQuestionAsked?(event: QuestionAskedEvent, context: ExtensionContext): Promise<void | Partial<QuestionAskedEvent>>;
|
package/extensions.json
CHANGED
|
@@ -106,7 +106,8 @@
|
|
|
106
106
|
"folder": "sandbox",
|
|
107
107
|
"type": "folder",
|
|
108
108
|
"hasDependencies": true,
|
|
109
|
-
"capabilities": ["security"]
|
|
109
|
+
"capabilities": ["security"],
|
|
110
|
+
"supportedOS": ["linux", "macos"]
|
|
110
111
|
},
|
|
111
112
|
{
|
|
112
113
|
"id": "rtk",
|
|
@@ -115,7 +116,8 @@
|
|
|
115
116
|
"folder": "rtk",
|
|
116
117
|
"type": "folder",
|
|
117
118
|
"hasDependencies": false,
|
|
118
|
-
"capabilities": ["optimization", "commands"]
|
|
119
|
+
"capabilities": ["optimization", "commands"],
|
|
120
|
+
"supportedOS": ["linux", "macos"]
|
|
119
121
|
},
|
|
120
122
|
{
|
|
121
123
|
"id": "redact-secrets",
|
|
@@ -222,7 +224,8 @@
|
|
|
222
224
|
"folder": "fff",
|
|
223
225
|
"type": "folder",
|
|
224
226
|
"hasDependencies": true,
|
|
225
|
-
"capabilities": ["tools", "search"]
|
|
227
|
+
"capabilities": ["tools", "search"],
|
|
228
|
+
"supportedOS": ["linux", "macos"]
|
|
226
229
|
},
|
|
227
230
|
{
|
|
228
231
|
"id": "seek",
|
|
@@ -231,7 +234,8 @@
|
|
|
231
234
|
"folder": "seek",
|
|
232
235
|
"type": "folder",
|
|
233
236
|
"hasDependencies": true,
|
|
234
|
-
"capabilities": ["tools", "search"]
|
|
237
|
+
"capabilities": ["tools", "search"],
|
|
238
|
+
"supportedOS": ["linux", "macos"]
|
|
235
239
|
},
|
|
236
240
|
{
|
|
237
241
|
"id": "tps-counter",
|
|
@@ -268,6 +272,15 @@
|
|
|
268
272
|
"type": "folder",
|
|
269
273
|
"hasDependencies": true,
|
|
270
274
|
"capabilities": ["providers", "agent-loop"]
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
"id": "checkpoints",
|
|
278
|
+
"name": "Checkpoints",
|
|
279
|
+
"description": "Git-based checkpoints for file edits — revert to the state before any edit",
|
|
280
|
+
"folder": "checkpoints",
|
|
281
|
+
"type": "folder",
|
|
282
|
+
"hasDependencies": false,
|
|
283
|
+
"capabilities": ["events", "ui"]
|
|
271
284
|
}
|
|
272
285
|
]
|
|
273
286
|
}
|