@aiderdesk/extensions 0.41.0 → 0.43.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/cli.js CHANGED
File without changes
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" | "clinepass" | "deepseek" | "gemini" | "gpustack" | "groq" | "alibaba-plan" | "kimi-plan" | "litellm" | "llmapi" | "lmstudio" | "minimax" | "mistral" | "neuralwatt" | "ollama" | "openai" | "openai-compatible" | "opencode" | "opencode-go" | "openrouter" | "requesty" | "synthetic" | "vertex-ai" | "zai-plan" | string;
3
+ export type LlmProviderName = "anthropic" | "anthropic-compatible" | "atlascloud" | "azure" | "bedrock" | "cerebras" | "clinepass" | "deepseek" | "gemini" | "gpustack" | "groq" | "alibaba-plan" | "kimi-plan" | "litellm" | "llmapi" | "lmstudio" | "minimax" | "mistral" | "neuralwatt" | "ollama" | "openai" | "openai-compatible" | "opencode" | "opencode-go" | "openllm" | "openrouter" | "requesty" | "synthetic" | "vertex-ai" | "zai-plan" | string;
4
4
  export interface LlmProviderBase {
5
5
  name: LlmProviderName;
6
6
  disableStreaming?: boolean;
@@ -187,14 +187,23 @@ export interface SyntheticProvider extends LlmProviderBase {
187
187
  name: "synthetic";
188
188
  apiKey: string;
189
189
  }
190
+ export interface AtlasCloudProvider extends LlmProviderBase {
191
+ name: "atlascloud";
192
+ apiKey: string;
193
+ }
190
194
  export interface LlmApiProvider extends LlmProviderBase {
191
195
  name: "llmapi";
192
196
  apiKey: string;
193
197
  }
198
+ export interface OpenLlmProvider extends LlmProviderBase {
199
+ name: "openllm";
200
+ baseUrl: string;
201
+ apiKey: string;
202
+ }
194
203
  export interface ExtensionLlmProvider extends LlmProviderBase {
195
204
  [key: string]: unknown;
196
205
  }
197
- export type LlmProvider = OpenAiProvider | AnthropicProvider | AnthropicCompatibleProvider | AzureProvider | GeminiProvider | VertexAiProvider | LmStudioProvider | BedrockProvider | DeepseekProvider | GroqProvider | GpustackProvider | CerebrasProvider | ClinePassProvider | AlibabaPlanProvider | KimiPlanProvider | OpenAiCompatibleProvider | LitellmProvider | OllamaProvider | OpenCodeProvider | OpenCodeGoProvider | OpenRouterProvider | RequestyProvider | SyntheticProvider | ZaiPlanProvider | MinimaxProvider | MistralProvider | NeuralwattProvider | LlmApiProvider | ExtensionLlmProvider;
206
+ export type LlmProvider = OpenAiProvider | AnthropicProvider | AnthropicCompatibleProvider | AzureProvider | GeminiProvider | VertexAiProvider | LmStudioProvider | BedrockProvider | DeepseekProvider | GroqProvider | GpustackProvider | CerebrasProvider | ClinePassProvider | AlibabaPlanProvider | KimiPlanProvider | OpenAiCompatibleProvider | LitellmProvider | OllamaProvider | OpenCodeProvider | OpenCodeGoProvider | OpenRouterProvider | RequestyProvider | SyntheticProvider | ZaiPlanProvider | MinimaxProvider | MistralProvider | NeuralwattProvider | LlmApiProvider | AtlasCloudProvider | OpenLlmProvider | ExtensionLlmProvider;
198
207
  export type JSONValue = null | string | number | boolean | JSONObject | JSONArray;
199
208
  export type JSONObject = {
200
209
  [key: string]: JSONValue;
@@ -528,6 +537,7 @@ export interface UpdatedFile {
528
537
  commitMessage?: string;
529
538
  hasConflicts?: boolean;
530
539
  isUntracked?: boolean;
540
+ isDeleted?: boolean;
531
541
  }
532
542
  export interface CommandsData {
533
543
  baseDir: string;
@@ -843,7 +853,7 @@ export interface MemoryConfig {
843
853
  maxDistance: number;
844
854
  }
845
855
  export interface ExtensionsConfig {
846
- repositories: string[];
856
+ customRepositories: string[];
847
857
  disabled: string[];
848
858
  }
849
859
  export interface SettingsData {
@@ -924,12 +934,28 @@ export interface VoiceSession {
924
934
  model: string;
925
935
  idleTimeoutMs: number;
926
936
  }
937
+ declare enum McpServerScope {
938
+ /** One connector per task working directory. Use for working-directory-dependent servers to keep worktree tasks isolated. */
939
+ Task = "task",
940
+ /** One connector shared by all tasks of the same project, including worktree tasks (default for stdio servers). */
941
+ Project = "project",
942
+ /** One connector shared across all projects (default for remote url servers). */
943
+ Global = "global"
944
+ }
927
945
  export interface McpServerConfig {
928
946
  command?: string;
929
947
  args?: string[];
930
948
  env?: Readonly<Record<string, string>>;
931
949
  url?: string;
932
950
  headers?: Readonly<Record<string, string>>;
951
+ /**
952
+ * Connector sharing scope. Defaults to `Project` for stdio servers (one shared process per project,
953
+ * reused across the project's tasks and worktrees) and `Global` for remote (url) servers. Set to
954
+ * `Task` for a working-directory-dependent server (e.g. a filesystem server with a relative path) so
955
+ * each worktree task gets its own process in its own working directory; a `${taskDir}` placeholder
956
+ * implies `Task`. An explicit value always wins.
957
+ */
958
+ scope?: McpServerScope;
933
959
  }
934
960
  declare enum ModelModality {
935
961
  Text = "text",
@@ -1024,6 +1050,12 @@ export interface CreateTaskParams {
1024
1050
  workingMode?: WorkingMode;
1025
1051
  addInitialContextFiles?: boolean;
1026
1052
  }
1053
+ export interface TaskStateDefinition {
1054
+ id: string;
1055
+ name: string;
1056
+ color: string;
1057
+ priority: number;
1058
+ }
1027
1059
  export interface TodoItem {
1028
1060
  name: string;
1029
1061
  completed: boolean;
@@ -1078,6 +1110,22 @@ export interface MemoryEntry {
1078
1110
  projectId?: string;
1079
1111
  timestamp: number;
1080
1112
  }
1113
+ export type InputPromptType = "password" | "text" | "confirmation";
1114
+ export interface InputPromptData {
1115
+ id: string;
1116
+ dismissed?: boolean;
1117
+ title?: string;
1118
+ titleParams?: Record<string, string | number>;
1119
+ message: string;
1120
+ messageParams?: Record<string, string | number>;
1121
+ type?: InputPromptType;
1122
+ placeholder?: string;
1123
+ defaultValue?: string;
1124
+ allowRememberSession?: boolean;
1125
+ rememberSessionLabel?: string;
1126
+ confirmLabel?: string;
1127
+ cancelLabel?: string;
1128
+ }
1081
1129
  export type SkillLocation = "global" | "project" | "builtin" | "extension";
1082
1130
  export interface SkillDefinition {
1083
1131
  name: string;
@@ -1124,6 +1172,13 @@ export interface ContextGenerationResult<T> {
1124
1172
  }
1125
1173
  export type AgentStepResult = unknown;
1126
1174
  export declare const AIDER_DESK_EXTENSIONS_REPO_URL = "https://github.com/magiksoft/aider-desk/tree/main/packages/extensions/extensions/";
1175
+ export declare const AIDER_DESK_COMMUNITY_EXTENSIONS_REPO_URLS: string[];
1176
+ /**
1177
+ * Returns the full list of extension repositories: the official repo, the known community
1178
+ * repos, and the user-added custom repos stored in settings. Official and community repos
1179
+ * are never stored in settings — they are merged in at read time.
1180
+ */
1181
+ export declare const getExtensionRepositories: (settings?: Pick<SettingsData, "extensions">) => string[];
1127
1182
  export interface ResponseMessage {
1128
1183
  id: string;
1129
1184
  content: string;
@@ -1271,7 +1326,7 @@ export interface ProviderDefinition {
1271
1326
  headers?: Record<string, string>;
1272
1327
  }
1273
1328
  /** Placement locations for extension UI components */
1274
- 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" | "task-message-above" | "task-message-below" | "task-message-bar" | "task-message-bar-menu" | "task-top-bar-left" | "task-top-bar-right" | "task-state-actions" | "task-state-actions-all" | "task-sidebar-item-badges" | "welcome-page" | "task-floating" | "project-floating" | "app-floating";
1329
+ 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" | "task-message-above" | "task-message-below" | "task-message-bar" | "task-message-bar-menu" | "task-top-bar-left" | "task-top-bar-right" | "task-state-actions" | "task-state-actions-all" | "task-sidebar-item-badges" | "workspace-section" | "welcome-page" | "task-floating" | "project-floating" | "app-floating";
1275
1330
  /**
1276
1331
  * Definition of a React UI component that can be registered by an extension.
1277
1332
  * The component is defined as a JSX string and rendered using string-to-react-component.
@@ -1534,10 +1589,25 @@ export interface AgentStepStartedEvent {
1534
1589
  export interface AgentStepFinishedEvent {
1535
1590
  readonly mode: Mode;
1536
1591
  readonly agentProfile: AgentProfile;
1592
+ readonly providerId: string;
1593
+ readonly model: string;
1537
1594
  readonly currentResponseId: string;
1538
- readonly stepResult: AgentStepResult;
1595
+ readonly iterationCount: number;
1596
+ readonly retryCount: number;
1597
+ /** Present when the step completed and produced a result; undefined when the step failed before completing. */
1598
+ readonly stepResult?: AgentStepResult;
1599
+ /** Present when the step failed with a model or stream error. */
1600
+ readonly error?: unknown;
1601
+ /** True if text or reasoning output was emitted during this step. */
1602
+ readonly hasOutput?: boolean;
1603
+ /** True if any tool input or execution started during this step. */
1604
+ readonly hasToolCalls?: boolean;
1539
1605
  finishReason: "stop" | "length" | "content-filter" | "tool-calls" | "error" | "other" | "interrupted";
1540
1606
  responseMessages: ContextMessage[];
1607
+ /** Override loop continuation: true forces another iteration (including retrying an error step), false stops the run. */
1608
+ continue?: boolean;
1609
+ /** Optional replacement model in 'provider-profile-id/model-id' format for subsequent steps in this run. */
1610
+ modelId?: string;
1541
1611
  }
1542
1612
  /** Event payload for stored-context to model-message transformations. */
1543
1613
  export interface TransformMessagesEvent {
@@ -1581,12 +1651,30 @@ export interface ToolCalledEvent {
1581
1651
  input: Record<string, unknown> | undefined;
1582
1652
  output?: unknown;
1583
1653
  }
1654
+ /** Ephemeral execution configuration, dispatched after bash approval. Never persisted in tool history. */
1655
+ export interface BashExecutionEvent {
1656
+ readonly toolCallId: string;
1657
+ readonly command: string;
1658
+ readonly cwd: string;
1659
+ readonly shell: string;
1660
+ readonly abortSignal?: AbortSignal;
1661
+ /** Trusted shell setup run after shell initialization, never added to persisted command arguments. */
1662
+ commandPrefix?: string;
1663
+ env: Record<string, string | undefined>;
1664
+ /** Register cleanup before allocating resources; runs on completion, failure, cancellation or timeout. */
1665
+ readonly addCleanup: (cleanup: () => void | Promise<void>) => void;
1666
+ }
1667
+ export interface ExtensionInputResponse {
1668
+ value: string | null;
1669
+ rememberSession: boolean;
1670
+ }
1584
1671
  /** Event payload for tool finished events */
1585
1672
  export interface ToolFinishedEvent {
1586
1673
  readonly toolCallId: string;
1587
1674
  readonly toolName: string;
1588
1675
  readonly agentProfile: AgentProfile;
1589
1676
  readonly input: Record<string, unknown> | undefined;
1677
+ readonly abortSignal?: AbortSignal;
1590
1678
  output: unknown;
1591
1679
  }
1592
1680
  /** A tool entry as exposed to extensions in toolset events */
@@ -1833,6 +1921,16 @@ export interface TaskContext {
1833
1921
  * @param updateContextInfo - If true, refreshes the context info summary after adding
1834
1922
  */
1835
1923
  addContextMessage(message: ContextMessage, updateContextInfo?: boolean): Promise<void>;
1924
+ /**
1925
+ * Activate a user-invocable skill using core validation and content loading.
1926
+ * Persists its assistant/tool messages and updates the UI. Returns null if already active.
1927
+ * Extensions owning the agent loop should call this after persisting the user message
1928
+ * for each name in AgentStartedEvent.skillsToActivate and pass the content to their agent.
1929
+ */
1930
+ activateSkill(skillName: string): Promise<[
1931
+ ContextAssistantMessage,
1932
+ ContextToolMessage
1933
+ ] | null>;
1836
1934
  /**
1837
1935
  * Remove a specific message from the context by its ID.
1838
1936
  * Reloads connector messages and updates context info after removal.
@@ -1911,6 +2009,14 @@ export interface TaskContext {
1911
2009
  * @returns Absolute filesystem path to the task's working directory
1912
2010
  */
1913
2011
  getTaskDir(): string;
2012
+ /**
2013
+ * Get the directory where this task's data is stored.
2014
+ * This is `<project base dir>/.aider-desk/tasks/<task id>` and is independent of the
2015
+ * task's working directory (worktree or project dir), so files saved here never
2016
+ * pollute the working repository.
2017
+ * @returns Absolute filesystem path to the task's data directory
2018
+ */
2019
+ getTaskDataDir(): string;
1914
2020
  /**
1915
2021
  * Get a list of files that can be added to the task's context.
1916
2022
  * Returns all files in the task directory that are not already in the context,
@@ -2481,6 +2587,8 @@ export interface ExtensionContext {
2481
2587
  * @param type - Log level: 'info' (default), 'error', 'warn', or 'debug'
2482
2588
  */
2483
2589
  log(message: string, type?: "info" | "error" | "warn" | "debug"): void;
2590
+ /** Request masked or plain input outside conversation history. Null means cancelled or timed out. */
2591
+ requestInput(prompt: Omit<InputPromptData, "id">, signal?: AbortSignal): Promise<ExtensionInputResponse>;
2484
2592
  /**
2485
2593
  * Get the current project directory path.
2486
2594
  * Only available when the context is created within a project scope (e.g., event handlers,
@@ -2562,6 +2670,8 @@ export interface ExtensionContext {
2562
2670
  * No-op if the EventManager is not available.
2563
2671
  */
2564
2672
  triggerUIComponentsReload(): void;
2673
+ /** Re-fetch task-state definitions in this context's project, or all projects for a global context. */
2674
+ triggerTaskStatesRefresh(): void;
2565
2675
  /**
2566
2676
  * Open a URL in the specified target.
2567
2677
  * - 'external': Opens in the system's default browser via `shell.openExternal`.
@@ -2737,6 +2847,13 @@ export interface Extension {
2737
2847
  * @param context - Extension context
2738
2848
  */
2739
2849
  getSkills?(context: ExtensionContext): SkillDefinition[];
2850
+ /**
2851
+ * Additional project-scoped task states. Built-in IDs cannot be overridden.
2852
+ * Colors must be hex (#RGB, #RGBA, #RRGGBB, #RRGGBBAA); priority is finite and sorts ascending.
2853
+ * IDs must match [A-Za-z0-9][A-Za-z0-9_-]*; names must be non-empty and trimmed.
2854
+ * Call triggerTaskStatesRefresh() after changing definitions outside saveConfigData().
2855
+ */
2856
+ getTaskStates?(context: ExtensionContext): TaskStateDefinition[];
2740
2857
  /**
2741
2858
  * Called when a user updates an extension-provided agent profile
2742
2859
  * Extension should persist the updated profile and return it from future getAgents() calls
@@ -2887,7 +3004,8 @@ export interface Extension {
2887
3004
  */
2888
3005
  onAgentStepStarted?(event: AgentStepStartedEvent, context: ExtensionContext): Promise<void | Partial<AgentStepStartedEvent>>;
2889
3006
  /**
2890
- * Called after each agent step completes
3007
+ * Called after each agent step completes or fails with a model/stream error.
3008
+ * Return `continue` to control loop continuation or `modelId` ('provider-profile-id/model-id') to switch models for subsequent steps.
2891
3009
  * @returns void or partial event
2892
3010
  */
2893
3011
  onAgentStepFinished?(event: AgentStepFinishedEvent, context: ExtensionContext): Promise<void | Partial<AgentStepFinishedEvent>>;
@@ -2931,6 +3049,8 @@ export interface Extension {
2931
3049
  * @returns void or partial event to modify tool call
2932
3050
  */
2933
3051
  onToolCalled?(event: ToolCalledEvent, context: ExtensionContext): Promise<void | Partial<ToolCalledEvent>>;
3052
+ /** Configure a single approved Power bash execution. Handler errors prevent execution. */
3053
+ onBashExecution?(event: BashExecutionEvent, context: ExtensionContext): Promise<void | Partial<BashExecutionEvent>>;
2934
3054
  /**
2935
3055
  * Called after tool execution completes
2936
3056
  * Use modifiedResult to change the result
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" | "clinepass" | "deepseek" | "gemini" | "gpustack" | "groq" | "alibaba-plan" | "kimi-plan" | "litellm" | "llmapi" | "lmstudio" | "minimax" | "mistral" | "neuralwatt" | "ollama" | "openai" | "openai-compatible" | "opencode" | "opencode-go" | "openrouter" | "requesty" | "synthetic" | "vertex-ai" | "zai-plan" | string;
3
+ export type LlmProviderName = "anthropic" | "anthropic-compatible" | "atlascloud" | "azure" | "bedrock" | "cerebras" | "clinepass" | "deepseek" | "gemini" | "gpustack" | "groq" | "alibaba-plan" | "kimi-plan" | "litellm" | "llmapi" | "lmstudio" | "minimax" | "mistral" | "neuralwatt" | "ollama" | "openai" | "openai-compatible" | "opencode" | "opencode-go" | "openllm" | "openrouter" | "requesty" | "synthetic" | "vertex-ai" | "zai-plan" | string;
4
4
  export interface LlmProviderBase {
5
5
  name: LlmProviderName;
6
6
  disableStreaming?: boolean;
@@ -187,14 +187,23 @@ export interface SyntheticProvider extends LlmProviderBase {
187
187
  name: "synthetic";
188
188
  apiKey: string;
189
189
  }
190
+ export interface AtlasCloudProvider extends LlmProviderBase {
191
+ name: "atlascloud";
192
+ apiKey: string;
193
+ }
190
194
  export interface LlmApiProvider extends LlmProviderBase {
191
195
  name: "llmapi";
192
196
  apiKey: string;
193
197
  }
198
+ export interface OpenLlmProvider extends LlmProviderBase {
199
+ name: "openllm";
200
+ baseUrl: string;
201
+ apiKey: string;
202
+ }
194
203
  export interface ExtensionLlmProvider extends LlmProviderBase {
195
204
  [key: string]: unknown;
196
205
  }
197
- export type LlmProvider = OpenAiProvider | AnthropicProvider | AnthropicCompatibleProvider | AzureProvider | GeminiProvider | VertexAiProvider | LmStudioProvider | BedrockProvider | DeepseekProvider | GroqProvider | GpustackProvider | CerebrasProvider | ClinePassProvider | AlibabaPlanProvider | KimiPlanProvider | OpenAiCompatibleProvider | LitellmProvider | OllamaProvider | OpenCodeProvider | OpenCodeGoProvider | OpenRouterProvider | RequestyProvider | SyntheticProvider | ZaiPlanProvider | MinimaxProvider | MistralProvider | NeuralwattProvider | LlmApiProvider | ExtensionLlmProvider;
206
+ export type LlmProvider = OpenAiProvider | AnthropicProvider | AnthropicCompatibleProvider | AzureProvider | GeminiProvider | VertexAiProvider | LmStudioProvider | BedrockProvider | DeepseekProvider | GroqProvider | GpustackProvider | CerebrasProvider | ClinePassProvider | AlibabaPlanProvider | KimiPlanProvider | OpenAiCompatibleProvider | LitellmProvider | OllamaProvider | OpenCodeProvider | OpenCodeGoProvider | OpenRouterProvider | RequestyProvider | SyntheticProvider | ZaiPlanProvider | MinimaxProvider | MistralProvider | NeuralwattProvider | LlmApiProvider | AtlasCloudProvider | OpenLlmProvider | ExtensionLlmProvider;
198
207
  export type JSONValue = null | string | number | boolean | JSONObject | JSONArray;
199
208
  export type JSONObject = {
200
209
  [key: string]: JSONValue;
@@ -528,6 +537,7 @@ export interface UpdatedFile {
528
537
  commitMessage?: string;
529
538
  hasConflicts?: boolean;
530
539
  isUntracked?: boolean;
540
+ isDeleted?: boolean;
531
541
  }
532
542
  export interface CommandsData {
533
543
  baseDir: string;
@@ -843,7 +853,7 @@ export interface MemoryConfig {
843
853
  maxDistance: number;
844
854
  }
845
855
  export interface ExtensionsConfig {
846
- repositories: string[];
856
+ customRepositories: string[];
847
857
  disabled: string[];
848
858
  }
849
859
  export interface SettingsData {
@@ -924,12 +934,28 @@ export interface VoiceSession {
924
934
  model: string;
925
935
  idleTimeoutMs: number;
926
936
  }
937
+ declare enum McpServerScope {
938
+ /** One connector per task working directory. Use for working-directory-dependent servers to keep worktree tasks isolated. */
939
+ Task = "task",
940
+ /** One connector shared by all tasks of the same project, including worktree tasks (default for stdio servers). */
941
+ Project = "project",
942
+ /** One connector shared across all projects (default for remote url servers). */
943
+ Global = "global"
944
+ }
927
945
  export interface McpServerConfig {
928
946
  command?: string;
929
947
  args?: string[];
930
948
  env?: Readonly<Record<string, string>>;
931
949
  url?: string;
932
950
  headers?: Readonly<Record<string, string>>;
951
+ /**
952
+ * Connector sharing scope. Defaults to `Project` for stdio servers (one shared process per project,
953
+ * reused across the project's tasks and worktrees) and `Global` for remote (url) servers. Set to
954
+ * `Task` for a working-directory-dependent server (e.g. a filesystem server with a relative path) so
955
+ * each worktree task gets its own process in its own working directory; a `${taskDir}` placeholder
956
+ * implies `Task`. An explicit value always wins.
957
+ */
958
+ scope?: McpServerScope;
933
959
  }
934
960
  declare enum ModelModality {
935
961
  Text = "text",
@@ -1024,6 +1050,12 @@ export interface CreateTaskParams {
1024
1050
  workingMode?: WorkingMode;
1025
1051
  addInitialContextFiles?: boolean;
1026
1052
  }
1053
+ export interface TaskStateDefinition {
1054
+ id: string;
1055
+ name: string;
1056
+ color: string;
1057
+ priority: number;
1058
+ }
1027
1059
  export interface TodoItem {
1028
1060
  name: string;
1029
1061
  completed: boolean;
@@ -1078,6 +1110,22 @@ export interface MemoryEntry {
1078
1110
  projectId?: string;
1079
1111
  timestamp: number;
1080
1112
  }
1113
+ export type InputPromptType = "password" | "text" | "confirmation";
1114
+ export interface InputPromptData {
1115
+ id: string;
1116
+ dismissed?: boolean;
1117
+ title?: string;
1118
+ titleParams?: Record<string, string | number>;
1119
+ message: string;
1120
+ messageParams?: Record<string, string | number>;
1121
+ type?: InputPromptType;
1122
+ placeholder?: string;
1123
+ defaultValue?: string;
1124
+ allowRememberSession?: boolean;
1125
+ rememberSessionLabel?: string;
1126
+ confirmLabel?: string;
1127
+ cancelLabel?: string;
1128
+ }
1081
1129
  export type SkillLocation = "global" | "project" | "builtin" | "extension";
1082
1130
  export interface SkillDefinition {
1083
1131
  name: string;
@@ -1124,6 +1172,13 @@ export interface ContextGenerationResult<T> {
1124
1172
  }
1125
1173
  export type AgentStepResult = unknown;
1126
1174
  export declare const AIDER_DESK_EXTENSIONS_REPO_URL = "https://github.com/magiksoft/aider-desk/tree/main/packages/extensions/extensions/";
1175
+ export declare const AIDER_DESK_COMMUNITY_EXTENSIONS_REPO_URLS: string[];
1176
+ /**
1177
+ * Returns the full list of extension repositories: the official repo, the known community
1178
+ * repos, and the user-added custom repos stored in settings. Official and community repos
1179
+ * are never stored in settings — they are merged in at read time.
1180
+ */
1181
+ export declare const getExtensionRepositories: (settings?: Pick<SettingsData, "extensions">) => string[];
1127
1182
  export interface ResponseMessage {
1128
1183
  id: string;
1129
1184
  content: string;
@@ -1271,7 +1326,7 @@ export interface ProviderDefinition {
1271
1326
  headers?: Record<string, string>;
1272
1327
  }
1273
1328
  /** Placement locations for extension UI components */
1274
- 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" | "task-message-above" | "task-message-below" | "task-message-bar" | "task-message-bar-menu" | "task-top-bar-left" | "task-top-bar-right" | "task-state-actions" | "task-state-actions-all" | "task-sidebar-item-badges" | "welcome-page" | "task-floating" | "project-floating" | "app-floating";
1329
+ 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" | "task-message-above" | "task-message-below" | "task-message-bar" | "task-message-bar-menu" | "task-top-bar-left" | "task-top-bar-right" | "task-state-actions" | "task-state-actions-all" | "task-sidebar-item-badges" | "workspace-section" | "welcome-page" | "task-floating" | "project-floating" | "app-floating";
1275
1330
  /**
1276
1331
  * Definition of a React UI component that can be registered by an extension.
1277
1332
  * The component is defined as a JSX string and rendered using string-to-react-component.
@@ -1534,10 +1589,25 @@ export interface AgentStepStartedEvent {
1534
1589
  export interface AgentStepFinishedEvent {
1535
1590
  readonly mode: Mode;
1536
1591
  readonly agentProfile: AgentProfile;
1592
+ readonly providerId: string;
1593
+ readonly model: string;
1537
1594
  readonly currentResponseId: string;
1538
- readonly stepResult: AgentStepResult;
1595
+ readonly iterationCount: number;
1596
+ readonly retryCount: number;
1597
+ /** Present when the step completed and produced a result; undefined when the step failed before completing. */
1598
+ readonly stepResult?: AgentStepResult;
1599
+ /** Present when the step failed with a model or stream error. */
1600
+ readonly error?: unknown;
1601
+ /** True if text or reasoning output was emitted during this step. */
1602
+ readonly hasOutput?: boolean;
1603
+ /** True if any tool input or execution started during this step. */
1604
+ readonly hasToolCalls?: boolean;
1539
1605
  finishReason: "stop" | "length" | "content-filter" | "tool-calls" | "error" | "other" | "interrupted";
1540
1606
  responseMessages: ContextMessage[];
1607
+ /** Override loop continuation: true forces another iteration (including retrying an error step), false stops the run. */
1608
+ continue?: boolean;
1609
+ /** Optional replacement model in 'provider-profile-id/model-id' format for subsequent steps in this run. */
1610
+ modelId?: string;
1541
1611
  }
1542
1612
  /** Event payload for stored-context to model-message transformations. */
1543
1613
  export interface TransformMessagesEvent {
@@ -1581,12 +1651,30 @@ export interface ToolCalledEvent {
1581
1651
  input: Record<string, unknown> | undefined;
1582
1652
  output?: unknown;
1583
1653
  }
1654
+ /** Ephemeral execution configuration, dispatched after bash approval. Never persisted in tool history. */
1655
+ export interface BashExecutionEvent {
1656
+ readonly toolCallId: string;
1657
+ readonly command: string;
1658
+ readonly cwd: string;
1659
+ readonly shell: string;
1660
+ readonly abortSignal?: AbortSignal;
1661
+ /** Trusted shell setup run after shell initialization, never added to persisted command arguments. */
1662
+ commandPrefix?: string;
1663
+ env: Record<string, string | undefined>;
1664
+ /** Register cleanup before allocating resources; runs on completion, failure, cancellation or timeout. */
1665
+ readonly addCleanup: (cleanup: () => void | Promise<void>) => void;
1666
+ }
1667
+ export interface ExtensionInputResponse {
1668
+ value: string | null;
1669
+ rememberSession: boolean;
1670
+ }
1584
1671
  /** Event payload for tool finished events */
1585
1672
  export interface ToolFinishedEvent {
1586
1673
  readonly toolCallId: string;
1587
1674
  readonly toolName: string;
1588
1675
  readonly agentProfile: AgentProfile;
1589
1676
  readonly input: Record<string, unknown> | undefined;
1677
+ readonly abortSignal?: AbortSignal;
1590
1678
  output: unknown;
1591
1679
  }
1592
1680
  /** A tool entry as exposed to extensions in toolset events */
@@ -1833,6 +1921,16 @@ export interface TaskContext {
1833
1921
  * @param updateContextInfo - If true, refreshes the context info summary after adding
1834
1922
  */
1835
1923
  addContextMessage(message: ContextMessage, updateContextInfo?: boolean): Promise<void>;
1924
+ /**
1925
+ * Activate a user-invocable skill using core validation and content loading.
1926
+ * Persists its assistant/tool messages and updates the UI. Returns null if already active.
1927
+ * Extensions owning the agent loop should call this after persisting the user message
1928
+ * for each name in AgentStartedEvent.skillsToActivate and pass the content to their agent.
1929
+ */
1930
+ activateSkill(skillName: string): Promise<[
1931
+ ContextAssistantMessage,
1932
+ ContextToolMessage
1933
+ ] | null>;
1836
1934
  /**
1837
1935
  * Remove a specific message from the context by its ID.
1838
1936
  * Reloads connector messages and updates context info after removal.
@@ -1911,6 +2009,14 @@ export interface TaskContext {
1911
2009
  * @returns Absolute filesystem path to the task's working directory
1912
2010
  */
1913
2011
  getTaskDir(): string;
2012
+ /**
2013
+ * Get the directory where this task's data is stored.
2014
+ * This is `<project base dir>/.aider-desk/tasks/<task id>` and is independent of the
2015
+ * task's working directory (worktree or project dir), so files saved here never
2016
+ * pollute the working repository.
2017
+ * @returns Absolute filesystem path to the task's data directory
2018
+ */
2019
+ getTaskDataDir(): string;
1914
2020
  /**
1915
2021
  * Get a list of files that can be added to the task's context.
1916
2022
  * Returns all files in the task directory that are not already in the context,
@@ -2481,6 +2587,8 @@ export interface ExtensionContext {
2481
2587
  * @param type - Log level: 'info' (default), 'error', 'warn', or 'debug'
2482
2588
  */
2483
2589
  log(message: string, type?: "info" | "error" | "warn" | "debug"): void;
2590
+ /** Request masked or plain input outside conversation history. Null means cancelled or timed out. */
2591
+ requestInput(prompt: Omit<InputPromptData, "id">, signal?: AbortSignal): Promise<ExtensionInputResponse>;
2484
2592
  /**
2485
2593
  * Get the current project directory path.
2486
2594
  * Only available when the context is created within a project scope (e.g., event handlers,
@@ -2562,6 +2670,8 @@ export interface ExtensionContext {
2562
2670
  * No-op if the EventManager is not available.
2563
2671
  */
2564
2672
  triggerUIComponentsReload(): void;
2673
+ /** Re-fetch task-state definitions in this context's project, or all projects for a global context. */
2674
+ triggerTaskStatesRefresh(): void;
2565
2675
  /**
2566
2676
  * Open a URL in the specified target.
2567
2677
  * - 'external': Opens in the system's default browser via `shell.openExternal`.
@@ -2737,6 +2847,13 @@ export interface Extension {
2737
2847
  * @param context - Extension context
2738
2848
  */
2739
2849
  getSkills?(context: ExtensionContext): SkillDefinition[];
2850
+ /**
2851
+ * Additional project-scoped task states. Built-in IDs cannot be overridden.
2852
+ * Colors must be hex (#RGB, #RGBA, #RRGGBB, #RRGGBBAA); priority is finite and sorts ascending.
2853
+ * IDs must match [A-Za-z0-9][A-Za-z0-9_-]*; names must be non-empty and trimmed.
2854
+ * Call triggerTaskStatesRefresh() after changing definitions outside saveConfigData().
2855
+ */
2856
+ getTaskStates?(context: ExtensionContext): TaskStateDefinition[];
2740
2857
  /**
2741
2858
  * Called when a user updates an extension-provided agent profile
2742
2859
  * Extension should persist the updated profile and return it from future getAgents() calls
@@ -2887,7 +3004,8 @@ export interface Extension {
2887
3004
  */
2888
3005
  onAgentStepStarted?(event: AgentStepStartedEvent, context: ExtensionContext): Promise<void | Partial<AgentStepStartedEvent>>;
2889
3006
  /**
2890
- * Called after each agent step completes
3007
+ * Called after each agent step completes or fails with a model/stream error.
3008
+ * Return `continue` to control loop continuation or `modelId` ('provider-profile-id/model-id') to switch models for subsequent steps.
2891
3009
  * @returns void or partial event
2892
3010
  */
2893
3011
  onAgentStepFinished?(event: AgentStepFinishedEvent, context: ExtensionContext): Promise<void | Partial<AgentStepFinishedEvent>>;
@@ -2931,6 +3049,8 @@ export interface Extension {
2931
3049
  * @returns void or partial event to modify tool call
2932
3050
  */
2933
3051
  onToolCalled?(event: ToolCalledEvent, context: ExtensionContext): Promise<void | Partial<ToolCalledEvent>>;
3052
+ /** Configure a single approved Power bash execution. Handler errors prevent execution. */
3053
+ onBashExecution?(event: BashExecutionEvent, context: ExtensionContext): Promise<void | Partial<BashExecutionEvent>>;
2934
3054
  /**
2935
3055
  * Called after tool execution completes
2936
3056
  * Use modifiedResult to change the result
package/extensions.json CHANGED
@@ -1,5 +1,46 @@
1
1
  {
2
2
  "extensions": [
3
+ {
4
+ "id": "a2ui",
5
+ "name": "A2UI",
6
+ "description": "Generative UI cards in task chat via the A2UI protocol — the agent composes interactive interfaces from a locked component catalog",
7
+ "folder": "a2ui",
8
+ "type": "folder",
9
+ "hasDependencies": true,
10
+ "capabilities": [
11
+ "tools",
12
+ "ui",
13
+ "commands"
14
+ ],
15
+ "installCount": 0
16
+ },
17
+ {
18
+ "id": "custom-task-statuses",
19
+ "name": "Custom Task Statuses",
20
+ "description": "Manage custom task states, colors, and ordering alongside read-only built-in states",
21
+ "folder": "custom-task-statuses",
22
+ "type": "folder",
23
+ "hasDependencies": true,
24
+ "capabilities": [
25
+ "task-states",
26
+ "commands",
27
+ "ui"
28
+ ],
29
+ "installCount": 2
30
+ },
31
+ {
32
+ "id": "sudo",
33
+ "name": "Sudo",
34
+ "description": "Linux sudo password dialog with optional in-memory session remembering for Power bash",
35
+ "folder": "sudo",
36
+ "type": "folder",
37
+ "hasDependencies": false,
38
+ "capabilities": [
39
+ "commands",
40
+ "security"
41
+ ],
42
+ "installCount": 0
43
+ },
3
44
  {
4
45
  "id": "opencode-free",
5
46
  "name": "OpenCode Free",
@@ -10,7 +51,7 @@
10
51
  "capabilities": [
11
52
  "providers"
12
53
  ],
13
- "installCount": 9
54
+ "installCount": 12
14
55
  },
15
56
  {
16
57
  "id": "jev",
@@ -22,7 +63,7 @@
22
63
  "capabilities": [
23
64
  "tools"
24
65
  ],
25
- "installCount": 20
66
+ "installCount": 22
26
67
  },
27
68
  {
28
69
  "id": "binary-files",
@@ -35,7 +76,7 @@
35
76
  "tools",
36
77
  "ui"
37
78
  ],
38
- "installCount": 46
79
+ "installCount": 52
39
80
  },
40
81
  {
41
82
  "id": "wakatime",
@@ -46,7 +87,7 @@
46
87
  "capabilities": [
47
88
  "tracking"
48
89
  ],
49
- "installCount": 15
90
+ "installCount": 16
50
91
  },
51
92
  {
52
93
  "id": "pirate",
@@ -75,15 +116,16 @@
75
116
  {
76
117
  "id": "questions",
77
118
  "name": "Questions",
78
- "description": "Extract questions from messages and display as interactive questionnaire",
119
+ "description": "Ask multiple-choice questions and extract free-form questionnaires from messages",
79
120
  "folder": "questions",
80
121
  "type": "folder",
81
122
  "hasDependencies": false,
82
123
  "capabilities": [
83
124
  "commands",
125
+ "tools",
84
126
  "ui"
85
127
  ],
86
- "installCount": 53
128
+ "installCount": 59
87
129
  },
88
130
  {
89
131
  "id": "theme",
@@ -105,7 +147,7 @@
105
147
  "capabilities": [
106
148
  "modes"
107
149
  ],
108
- "installCount": 125
150
+ "installCount": 140
109
151
  },
110
152
  {
111
153
  "id": "protected-paths",
@@ -117,7 +159,7 @@
117
159
  "capabilities": [
118
160
  "security"
119
161
  ],
120
- "installCount": 58
162
+ "installCount": 62
121
163
  },
122
164
  {
123
165
  "id": "permission-gate",
@@ -139,7 +181,7 @@
139
181
  "capabilities": [
140
182
  "optimization"
141
183
  ],
142
- "installCount": 56
184
+ "installCount": 60
143
185
  },
144
186
  {
145
187
  "id": "external-rules",
@@ -151,7 +193,7 @@
151
193
  "capabilities": [
152
194
  "context"
153
195
  ],
154
- "installCount": 33
196
+ "installCount": 34
155
197
  },
156
198
  {
157
199
  "id": "external-skills",
@@ -163,7 +205,7 @@
163
205
  "capabilities": [
164
206
  "context"
165
207
  ],
166
- "installCount": 81
208
+ "installCount": 88
167
209
  },
168
210
  {
169
211
  "id": "learn",
@@ -176,7 +218,7 @@
176
218
  "commands",
177
219
  "tools"
178
220
  ],
179
- "installCount": 109
221
+ "installCount": 117
180
222
  },
181
223
  {
182
224
  "id": "legacy-system-prompt",
@@ -200,7 +242,7 @@
200
242
  "capabilities": [
201
243
  "notifications"
202
244
  ],
203
- "installCount": 38
245
+ "installCount": 44
204
246
  },
205
247
  {
206
248
  "id": "sandbox",
@@ -233,7 +275,7 @@
233
275
  "linux",
234
276
  "macos"
235
277
  ],
236
- "installCount": 35
278
+ "installCount": 40
237
279
  },
238
280
  {
239
281
  "id": "redact-secrets",
@@ -245,7 +287,7 @@
245
287
  "capabilities": [
246
288
  "security"
247
289
  ],
248
- "installCount": 33
290
+ "installCount": 36
249
291
  },
250
292
  {
251
293
  "id": "chunkhound-search",
@@ -282,7 +324,7 @@
282
324
  "context",
283
325
  "commands"
284
326
  ],
285
- "installCount": 88
327
+ "installCount": 93
286
328
  },
287
329
  {
288
330
  "id": "context-autocompletion-words",
@@ -294,7 +336,7 @@
294
336
  "capabilities": [
295
337
  "context"
296
338
  ],
297
- "installCount": 29
339
+ "installCount": 32
298
340
  },
299
341
  {
300
342
  "id": "lsp",
@@ -307,7 +349,7 @@
307
349
  "tools",
308
350
  "code-intelligence"
309
351
  ],
310
- "installCount": 97
352
+ "installCount": 102
311
353
  },
312
354
  {
313
355
  "id": "plannotator",
@@ -322,7 +364,7 @@
322
364
  "commands",
323
365
  "workflows"
324
366
  ],
325
- "installCount": 30
367
+ "installCount": 34
326
368
  },
327
369
  {
328
370
  "id": "programmatic-tool-calls",
@@ -334,7 +376,7 @@
334
376
  "capabilities": [
335
377
  "tools"
336
378
  ],
337
- "installCount": 45
379
+ "installCount": 46
338
380
  },
339
381
  {
340
382
  "id": "ui-placement-demo",
@@ -346,7 +388,7 @@
346
388
  "ui",
347
389
  "example"
348
390
  ],
349
- "installCount": 21
391
+ "installCount": 23
350
392
  },
351
393
  {
352
394
  "id": "multi-model-run",
@@ -359,7 +401,7 @@
359
401
  "ui",
360
402
  "workflows"
361
403
  ],
362
- "installCount": 18
404
+ "installCount": 21
363
405
  },
364
406
  {
365
407
  "id": "providers-quota-extension",
@@ -383,7 +425,7 @@
383
425
  "capabilities": [
384
426
  "providers"
385
427
  ],
386
- "installCount": 39
428
+ "installCount": 44
387
429
  },
388
430
  {
389
431
  "id": "fff",
@@ -400,7 +442,7 @@
400
442
  "linux",
401
443
  "macos"
402
444
  ],
403
- "installCount": 45
445
+ "installCount": 53
404
446
  },
405
447
  {
406
448
  "id": "searxng-search",
@@ -413,7 +455,7 @@
413
455
  "tools",
414
456
  "search"
415
457
  ],
416
- "installCount": 35
458
+ "installCount": 39
417
459
  },
418
460
  {
419
461
  "id": "seek",
@@ -430,7 +472,7 @@
430
472
  "linux",
431
473
  "macos"
432
474
  ],
433
- "installCount": 20
475
+ "installCount": 21
434
476
  },
435
477
  {
436
478
  "id": "tps-counter",
@@ -442,7 +484,7 @@
442
484
  "capabilities": [
443
485
  "metrics"
444
486
  ],
445
- "installCount": 118
487
+ "installCount": 129
446
488
  },
447
489
  {
448
490
  "id": "verifier",
@@ -455,7 +497,7 @@
455
497
  "workflows",
456
498
  "ui"
457
499
  ],
458
- "installCount": 66
500
+ "installCount": 71
459
501
  },
460
502
  {
461
503
  "id": "bmad",
@@ -468,7 +510,7 @@
468
510
  "modes",
469
511
  "ui"
470
512
  ],
471
- "installCount": 19
513
+ "installCount": 20
472
514
  },
473
515
  {
474
516
  "id": "claude-agent-sdk",
@@ -481,7 +523,7 @@
481
523
  "providers",
482
524
  "agent-loop"
483
525
  ],
484
- "installCount": 30
526
+ "installCount": 33
485
527
  },
486
528
  {
487
529
  "id": "auggie-sdk",
@@ -544,7 +586,7 @@
544
586
  "events",
545
587
  "ui"
546
588
  ],
547
- "installCount": 45
589
+ "installCount": 48
548
590
  },
549
591
  {
550
592
  "id": "codegraph",
@@ -557,7 +599,7 @@
557
599
  "tools",
558
600
  "search"
559
601
  ],
560
- "installCount": 92
602
+ "installCount": 99
561
603
  },
562
604
  {
563
605
  "id": "kanban",
@@ -569,7 +611,7 @@
569
611
  "capabilities": [
570
612
  "ui"
571
613
  ],
572
- "installCount": 55
614
+ "installCount": 63
573
615
  },
574
616
  {
575
617
  "id": "doom",
@@ -594,7 +636,7 @@
594
636
  "agents",
595
637
  "example"
596
638
  ],
597
- "installCount": 75
639
+ "installCount": 80
598
640
  },
599
641
  {
600
642
  "id": "wigolo",
@@ -607,7 +649,7 @@
607
649
  "tools",
608
650
  "search"
609
651
  ],
610
- "installCount": 75
652
+ "installCount": 78
611
653
  },
612
654
  {
613
655
  "id": "destructive-command-guard",
@@ -620,7 +662,7 @@
620
662
  "security",
621
663
  "commands"
622
664
  ],
623
- "installCount": 56
665
+ "installCount": 57
624
666
  },
625
667
  {
626
668
  "id": "git-log",
@@ -632,7 +674,7 @@
632
674
  "capabilities": [
633
675
  "ui"
634
676
  ],
635
- "installCount": 62
677
+ "installCount": 65
636
678
  },
637
679
  {
638
680
  "id": "skill-gallery",
@@ -644,7 +686,7 @@
644
686
  "capabilities": [
645
687
  "ui"
646
688
  ],
647
- "installCount": 177
689
+ "installCount": 190
648
690
  },
649
691
  {
650
692
  "id": "task-scheduler",
@@ -658,7 +700,7 @@
658
700
  "commands",
659
701
  "events"
660
702
  ],
661
- "installCount": 33
703
+ "installCount": 37
662
704
  },
663
705
  {
664
706
  "id": "reasoning-selector",
@@ -670,7 +712,7 @@
670
712
  "capabilities": [
671
713
  "ui"
672
714
  ],
673
- "installCount": 154
715
+ "installCount": 173
674
716
  },
675
717
  {
676
718
  "id": "dbx",
@@ -682,7 +724,7 @@
682
724
  "capabilities": [
683
725
  "ui"
684
726
  ],
685
- "installCount": 4
727
+ "installCount": 5
686
728
  },
687
729
  {
688
730
  "id": "compaction-studio",
@@ -695,7 +737,21 @@
695
737
  "ui",
696
738
  "commands"
697
739
  ],
698
- "installCount": 20
740
+ "installCount": 27
741
+ },
742
+ {
743
+ "id": "model-fallback",
744
+ "name": "Model Fallback",
745
+ "description": "Continue the current agent run with a secondary model after quota or rate-limit errors",
746
+ "folder": "model-fallback",
747
+ "type": "folder",
748
+ "hasDependencies": false,
749
+ "capabilities": [
750
+ "models",
751
+ "ui"
752
+ ],
753
+ "iconUrl": "https://raw.githubusercontent.com/magiksoft/aider-desk/refs/heads/main/packages/extensions/extensions/model-fallback/icon.png",
754
+ "installCount": 0
699
755
  }
700
756
  ]
701
757
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiderdesk/extensions",
3
- "version": "0.41.0",
3
+ "version": "0.43.0",
4
4
  "description": "Type definitions and examples for AiderDesk extensions",
5
5
  "author": "Magiksoft s.r.o.",
6
6
  "homepage": "https://aiderdesk.dev",