@aiderdesk/extensions 0.22.0 → 0.24.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
 
3
- export type LlmProviderName = "anthropic" | "anthropic-compatible" | "azure" | "bedrock" | "cerebras" | "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;
3
+ export type LlmProviderName = "anthropic" | "anthropic-compatible" | "azure" | "bedrock" | "cerebras" | "deepseek" | "gemini" | "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;
@@ -98,10 +98,6 @@ export interface CerebrasProvider extends LlmProviderBase {
98
98
  name: "cerebras";
99
99
  apiKey: string;
100
100
  }
101
- export interface GeminiCliProvider extends LlmProviderBase {
102
- name: "gemini-cli";
103
- projectId?: string;
104
- }
105
101
  export interface BedrockProvider extends LlmProviderBase {
106
102
  name: "bedrock";
107
103
  accessKeyId: string;
@@ -152,6 +148,7 @@ export interface ZaiPlanProvider extends LlmProviderBase {
152
148
  name: "zai-plan";
153
149
  apiKey: string;
154
150
  thinkingEnabled?: boolean;
151
+ reasoningEffort?: ReasoningEffort;
155
152
  }
156
153
  export interface MinimaxProvider extends LlmProviderBase {
157
154
  name: "minimax";
@@ -164,6 +161,7 @@ export interface MistralProvider extends LlmProviderBase {
164
161
  export interface NeuralwattProvider extends LlmProviderBase {
165
162
  name: "neuralwatt";
166
163
  apiKey: string;
164
+ reasoningEffort?: ReasoningEffort;
167
165
  }
168
166
  export interface SyntheticProvider extends LlmProviderBase {
169
167
  name: "synthetic";
@@ -172,7 +170,7 @@ export interface SyntheticProvider extends LlmProviderBase {
172
170
  export interface ExtensionLlmProvider extends LlmProviderBase {
173
171
  [key: string]: unknown;
174
172
  }
175
- export type LlmProvider = OpenAiProvider | AnthropicProvider | AnthropicCompatibleProvider | AzureProvider | GeminiProvider | GeminiCliProvider | VertexAiProvider | LmStudioProvider | BedrockProvider | DeepseekProvider | GroqProvider | GpustackProvider | CerebrasProvider | AlibabaPlanProvider | KimiPlanProvider | OpenAiCompatibleProvider | LitellmProvider | OllamaProvider | OpenCodeProvider | OpenRouterProvider | RequestyProvider | SyntheticProvider | ZaiPlanProvider | MinimaxProvider | MistralProvider | NeuralwattProvider | ExtensionLlmProvider;
173
+ export type LlmProvider = OpenAiProvider | AnthropicProvider | AnthropicCompatibleProvider | AzureProvider | GeminiProvider | VertexAiProvider | LmStudioProvider | BedrockProvider | DeepseekProvider | GroqProvider | GpustackProvider | CerebrasProvider | AlibabaPlanProvider | KimiPlanProvider | OpenAiCompatibleProvider | LitellmProvider | OllamaProvider | OpenCodeProvider | OpenRouterProvider | RequestyProvider | SyntheticProvider | ZaiPlanProvider | MinimaxProvider | MistralProvider | NeuralwattProvider | ExtensionLlmProvider;
176
174
  export type JSONValue = null | string | number | boolean | JSONObject | JSONArray;
177
175
  export type JSONObject = {
178
176
  [key: string]: JSONValue;
@@ -303,6 +301,10 @@ export declare enum ContextMemoryMode {
303
301
  FullContext = "full-context",
304
302
  LastMessage = "last-message"
305
303
  }
304
+ export interface WorktreeUncommittedFiles {
305
+ count: number;
306
+ files: string[];
307
+ }
306
308
  export interface ModeDefinition {
307
309
  name: Mode;
308
310
  label: string;
@@ -326,6 +328,7 @@ declare enum MessageViewMode {
326
328
  Compact = "compact"
327
329
  }
328
330
  declare enum ReasoningEffort {
331
+ Max = "max",
329
332
  XHigh = "xhigh",
330
333
  High = "high",
331
334
  Medium = "medium",
@@ -685,6 +688,7 @@ export interface SettingsData {
685
688
  proxy: {
686
689
  enabled: boolean;
687
690
  url: string;
691
+ noProxy: string;
688
692
  };
689
693
  fileWatchMode?: FileWatchMode;
690
694
  }
@@ -713,6 +717,15 @@ declare const WorkingModeSchema: z.ZodEnum<{
713
717
  worktree: "worktree";
714
718
  }>;
715
719
  export type WorkingMode = z.infer<typeof WorkingModeSchema>;
720
+ export interface SwitchToLocalOptions {
721
+ mergeBeforeSwitch?: boolean;
722
+ targetBranch?: string;
723
+ switchAllInWorktree?: boolean;
724
+ }
725
+ export interface SwitchToWorktreeOptions {
726
+ carryOverUncommittedChanges?: boolean;
727
+ dropSourceChanges?: boolean;
728
+ }
716
729
  declare const TaskDataSchema: z.ZodObject<{
717
730
  id: z.ZodString;
718
731
  baseDir: z.ZodString;
@@ -976,7 +989,7 @@ export interface ProviderDefinition {
976
989
  headers?: Record<string, string>;
977
990
  }
978
991
  /** Placement locations for extension UI components */
979
- 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-top-bar-left" | "task-top-bar-right" | "task-state-actions" | "task-state-actions-all" | "welcome-page" | "floating";
992
+ 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-top-bar-left" | "task-top-bar-right" | "task-state-actions" | "task-state-actions-all" | "welcome-page" | "task-floating" | "project-floating" | "app-floating";
980
993
  /**
981
994
  * Definition of a React UI component that can be registered by an extension.
982
995
  * The component is defined as a JSX string and rendered using string-to-react-component.
@@ -1166,6 +1179,8 @@ export interface AgentStartedEvent {
1166
1179
  contextMessages: ContextMessage[];
1167
1180
  contextFiles: ContextFile[];
1168
1181
  blocked?: boolean;
1182
+ images?: string[];
1183
+ skillsToActivate?: string[];
1169
1184
  }
1170
1185
  /** Event payload for agent finished events */
1171
1186
  export interface AgentFinishedEvent {
@@ -1733,6 +1748,39 @@ export interface TaskContext {
1733
1748
  * @returns True if a pending question was answered, false if no question is pending
1734
1749
  */
1735
1750
  answerQuestion(answer: string, userInput?: string): Promise<boolean>;
1751
+ /**
1752
+ * Switch the task to worktree working mode, optionally carrying over uncommitted changes
1753
+ * from the project root (or current worktree) into the new worktree.
1754
+ * Stashes uncommitted changes, creates a git worktree, applies the stash to the new worktree,
1755
+ * and optionally re-applies to the source if `dropSourceChanges` is false.
1756
+ * @param options - Optional configuration: `carryOverUncommittedChanges` to transfer uncommitted
1757
+ * changes, `dropSourceChanges` to keep (false) or remove (true, default) them from the source
1758
+ */
1759
+ switchToWorktreeWorkingMode(options?: SwitchToWorktreeOptions): Promise<void>;
1760
+ /**
1761
+ * Switch the task to local working mode, optionally merging the worktree branch first.
1762
+ * @param options - Optional configuration: `mergeBeforeSwitch` to merge worktree to main before
1763
+ * switching, `targetBranch` to specify a merge target, `switchAllInWorktree` to switch all
1764
+ * tasks sharing the same worktree
1765
+ */
1766
+ switchToLocalWorkingMode(options?: SwitchToLocalOptions): Promise<void>;
1767
+ /**
1768
+ * Get uncommitted files from the project's main repository (not from a worktree).
1769
+ * @returns Object containing arrays of unstaged, staged, and untracked file paths
1770
+ */
1771
+ getLocalUncommittedFiles(): Promise<WorktreeUncommittedFiles>;
1772
+ /**
1773
+ * Apply uncommitted changes from the task's worktree to a target branch in the main repository.
1774
+ * @param targetBranch - Optional target branch name (defaults to the project's main branch)
1775
+ */
1776
+ applyUncommittedChanges(targetBranch?: string): Promise<void>;
1777
+ /**
1778
+ * Merge commits and optionally uncommitted changes from this task's worktree to a target worktree directory.
1779
+ * Useful for carrying over changes between worktrees when running multiple models.
1780
+ * @param targetWorktreeDir - The absolute path to the target worktree directory
1781
+ * @param includeUncommitted - Whether to include uncommitted changes (default: false)
1782
+ */
1783
+ mergeWorktreeToWorktree(targetWorktreeDir: string, includeUncommitted?: boolean): Promise<void>;
1736
1784
  }
1737
1785
  /**
1738
1786
  * Safe subset of Project capabilities exposed to extensions.
@@ -1820,6 +1868,68 @@ export interface ProjectContext {
1820
1868
  */
1821
1869
  getInputHistory(): Promise<string[]>;
1822
1870
  }
1871
+ /**
1872
+ * A narrow subset of Electron's `App` object, exposed to extensions via
1873
+ * {@link ExtensionContext.getElectronApp}.
1874
+ *
1875
+ * This is a hand-maintained interface (not imported from the `electron`
1876
+ * package) so that it can be published in `@aiderdesk/extensions` without
1877
+ * adding `electron` as a dependency. When running inside Electron the real
1878
+ * `App` object is structurally assignable to this interface; when running
1879
+ * outside Electron `getElectronApp()` returns `null`.
1880
+ */
1881
+ export interface ElectronApp {
1882
+ /**
1883
+ * Returns an array of `ProcessMetric` objects that correspond to memory
1884
+ * and CPU usage statistics of all the processes associated with the app.
1885
+ *
1886
+ * Each metric's `memory.workingSetSize` is expressed in **kilobytes**.
1887
+ */
1888
+ getAppMetrics(): ElectronProcessMetric[];
1889
+ /** The current application version. */
1890
+ getVersion(): string;
1891
+ /** The current application name. */
1892
+ getName(): string;
1893
+ /** A boolean that is true when the application has finished initializing. */
1894
+ isReady(): boolean;
1895
+ }
1896
+ /** CPU usage statistics for a single Electron process. */
1897
+ export interface ElectronCPUUsage {
1898
+ /** Percentage of CPU used since the last call (0–100). */
1899
+ percentCPUUsage?: number;
1900
+ /** Cumulative CPU time in seconds since process start. */
1901
+ cumulativeCPUUsage?: number;
1902
+ }
1903
+ /** Memory usage statistics for a single Electron process. */
1904
+ export interface ElectronMemoryInfo {
1905
+ /** Working set size in **kilobytes**. */
1906
+ workingSetSize?: number;
1907
+ /** Peak working set size in **kilobytes**. */
1908
+ peakWorkingSetSize?: number;
1909
+ }
1910
+ /**
1911
+ * Process metric returned by {@link ElectronApp.getAppMetrics}.
1912
+ *
1913
+ * All fields are optional because Electron may omit some of them depending
1914
+ * on the process type and platform.
1915
+ */
1916
+ export interface ElectronProcessMetric {
1917
+ /** Process ID. */
1918
+ pid?: number;
1919
+ /**
1920
+ * One of: `Browser` (main process), `Renderer`, `GPU`, `Utility`,
1921
+ * `ForkedWorker`, `ServiceWorker`, etc.
1922
+ */
1923
+ type?: string;
1924
+ /** Service name (only present for utility processes). */
1925
+ serviceName?: string;
1926
+ /** Display name of the process. */
1927
+ name?: string;
1928
+ /** CPU usage breakdown. */
1929
+ cpu?: ElectronCPUUsage;
1930
+ /** Memory usage breakdown. */
1931
+ memory?: ElectronMemoryInfo;
1932
+ }
1823
1933
  /**
1824
1934
  * Context object passed to extension methods providing access to AiderDesk APIs.
1825
1935
  *
@@ -1927,6 +2037,18 @@ export interface ExtensionContext {
1927
2037
  * @returns true if opened successfully, false if it failed (e.g., not in Electron environment)
1928
2038
  */
1929
2039
  openPath(path: string): Promise<boolean>;
2040
+ /**
2041
+ * Get a narrowed Electron `App` object for accessing host-level APIs
2042
+ * (e.g. `getAppMetrics()` for CPU/memory statistics).
2043
+ *
2044
+ * Only available when AiderDesk is running as an Electron desktop
2045
+ * application. Returns `null` when running in Node.js server / headless
2046
+ * mode, so extensions should perform a null-check before use.
2047
+ *
2048
+ * @returns Promise resolving to an {@link ElectronApp} instance, or
2049
+ * `null` if Electron is not available.
2050
+ */
2051
+ getElectronApp(): Promise<ElectronApp | null>;
1930
2052
  /**
1931
2053
  * Get the memory context for vector store operations (store, retrieve, update, delete memories).
1932
2054
  * Uses the same underlying vector store as the built-in memory tools.
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" | "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;
3
+ export type LlmProviderName = "anthropic" | "anthropic-compatible" | "azure" | "bedrock" | "cerebras" | "deepseek" | "gemini" | "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;
@@ -98,10 +98,6 @@ export interface CerebrasProvider extends LlmProviderBase {
98
98
  name: "cerebras";
99
99
  apiKey: string;
100
100
  }
101
- export interface GeminiCliProvider extends LlmProviderBase {
102
- name: "gemini-cli";
103
- projectId?: string;
104
- }
105
101
  export interface BedrockProvider extends LlmProviderBase {
106
102
  name: "bedrock";
107
103
  accessKeyId: string;
@@ -152,6 +148,7 @@ export interface ZaiPlanProvider extends LlmProviderBase {
152
148
  name: "zai-plan";
153
149
  apiKey: string;
154
150
  thinkingEnabled?: boolean;
151
+ reasoningEffort?: ReasoningEffort;
155
152
  }
156
153
  export interface MinimaxProvider extends LlmProviderBase {
157
154
  name: "minimax";
@@ -164,6 +161,7 @@ export interface MistralProvider extends LlmProviderBase {
164
161
  export interface NeuralwattProvider extends LlmProviderBase {
165
162
  name: "neuralwatt";
166
163
  apiKey: string;
164
+ reasoningEffort?: ReasoningEffort;
167
165
  }
168
166
  export interface SyntheticProvider extends LlmProviderBase {
169
167
  name: "synthetic";
@@ -172,7 +170,7 @@ export interface SyntheticProvider extends LlmProviderBase {
172
170
  export interface ExtensionLlmProvider extends LlmProviderBase {
173
171
  [key: string]: unknown;
174
172
  }
175
- export type LlmProvider = OpenAiProvider | AnthropicProvider | AnthropicCompatibleProvider | AzureProvider | GeminiProvider | GeminiCliProvider | VertexAiProvider | LmStudioProvider | BedrockProvider | DeepseekProvider | GroqProvider | GpustackProvider | CerebrasProvider | AlibabaPlanProvider | KimiPlanProvider | OpenAiCompatibleProvider | LitellmProvider | OllamaProvider | OpenCodeProvider | OpenRouterProvider | RequestyProvider | SyntheticProvider | ZaiPlanProvider | MinimaxProvider | MistralProvider | NeuralwattProvider | ExtensionLlmProvider;
173
+ export type LlmProvider = OpenAiProvider | AnthropicProvider | AnthropicCompatibleProvider | AzureProvider | GeminiProvider | VertexAiProvider | LmStudioProvider | BedrockProvider | DeepseekProvider | GroqProvider | GpustackProvider | CerebrasProvider | AlibabaPlanProvider | KimiPlanProvider | OpenAiCompatibleProvider | LitellmProvider | OllamaProvider | OpenCodeProvider | OpenRouterProvider | RequestyProvider | SyntheticProvider | ZaiPlanProvider | MinimaxProvider | MistralProvider | NeuralwattProvider | ExtensionLlmProvider;
176
174
  export type JSONValue = null | string | number | boolean | JSONObject | JSONArray;
177
175
  export type JSONObject = {
178
176
  [key: string]: JSONValue;
@@ -303,6 +301,10 @@ export declare enum ContextMemoryMode {
303
301
  FullContext = "full-context",
304
302
  LastMessage = "last-message"
305
303
  }
304
+ export interface WorktreeUncommittedFiles {
305
+ count: number;
306
+ files: string[];
307
+ }
306
308
  export interface ModeDefinition {
307
309
  name: Mode;
308
310
  label: string;
@@ -326,6 +328,7 @@ declare enum MessageViewMode {
326
328
  Compact = "compact"
327
329
  }
328
330
  declare enum ReasoningEffort {
331
+ Max = "max",
329
332
  XHigh = "xhigh",
330
333
  High = "high",
331
334
  Medium = "medium",
@@ -685,6 +688,7 @@ export interface SettingsData {
685
688
  proxy: {
686
689
  enabled: boolean;
687
690
  url: string;
691
+ noProxy: string;
688
692
  };
689
693
  fileWatchMode?: FileWatchMode;
690
694
  }
@@ -713,6 +717,15 @@ declare const WorkingModeSchema: z.ZodEnum<{
713
717
  worktree: "worktree";
714
718
  }>;
715
719
  export type WorkingMode = z.infer<typeof WorkingModeSchema>;
720
+ export interface SwitchToLocalOptions {
721
+ mergeBeforeSwitch?: boolean;
722
+ targetBranch?: string;
723
+ switchAllInWorktree?: boolean;
724
+ }
725
+ export interface SwitchToWorktreeOptions {
726
+ carryOverUncommittedChanges?: boolean;
727
+ dropSourceChanges?: boolean;
728
+ }
716
729
  declare const TaskDataSchema: z.ZodObject<{
717
730
  id: z.ZodString;
718
731
  baseDir: z.ZodString;
@@ -976,7 +989,7 @@ export interface ProviderDefinition {
976
989
  headers?: Record<string, string>;
977
990
  }
978
991
  /** Placement locations for extension UI components */
979
- 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-top-bar-left" | "task-top-bar-right" | "task-state-actions" | "task-state-actions-all" | "welcome-page" | "floating";
992
+ 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-top-bar-left" | "task-top-bar-right" | "task-state-actions" | "task-state-actions-all" | "welcome-page" | "task-floating" | "project-floating" | "app-floating";
980
993
  /**
981
994
  * Definition of a React UI component that can be registered by an extension.
982
995
  * The component is defined as a JSX string and rendered using string-to-react-component.
@@ -1166,6 +1179,8 @@ export interface AgentStartedEvent {
1166
1179
  contextMessages: ContextMessage[];
1167
1180
  contextFiles: ContextFile[];
1168
1181
  blocked?: boolean;
1182
+ images?: string[];
1183
+ skillsToActivate?: string[];
1169
1184
  }
1170
1185
  /** Event payload for agent finished events */
1171
1186
  export interface AgentFinishedEvent {
@@ -1733,6 +1748,39 @@ export interface TaskContext {
1733
1748
  * @returns True if a pending question was answered, false if no question is pending
1734
1749
  */
1735
1750
  answerQuestion(answer: string, userInput?: string): Promise<boolean>;
1751
+ /**
1752
+ * Switch the task to worktree working mode, optionally carrying over uncommitted changes
1753
+ * from the project root (or current worktree) into the new worktree.
1754
+ * Stashes uncommitted changes, creates a git worktree, applies the stash to the new worktree,
1755
+ * and optionally re-applies to the source if `dropSourceChanges` is false.
1756
+ * @param options - Optional configuration: `carryOverUncommittedChanges` to transfer uncommitted
1757
+ * changes, `dropSourceChanges` to keep (false) or remove (true, default) them from the source
1758
+ */
1759
+ switchToWorktreeWorkingMode(options?: SwitchToWorktreeOptions): Promise<void>;
1760
+ /**
1761
+ * Switch the task to local working mode, optionally merging the worktree branch first.
1762
+ * @param options - Optional configuration: `mergeBeforeSwitch` to merge worktree to main before
1763
+ * switching, `targetBranch` to specify a merge target, `switchAllInWorktree` to switch all
1764
+ * tasks sharing the same worktree
1765
+ */
1766
+ switchToLocalWorkingMode(options?: SwitchToLocalOptions): Promise<void>;
1767
+ /**
1768
+ * Get uncommitted files from the project's main repository (not from a worktree).
1769
+ * @returns Object containing arrays of unstaged, staged, and untracked file paths
1770
+ */
1771
+ getLocalUncommittedFiles(): Promise<WorktreeUncommittedFiles>;
1772
+ /**
1773
+ * Apply uncommitted changes from the task's worktree to a target branch in the main repository.
1774
+ * @param targetBranch - Optional target branch name (defaults to the project's main branch)
1775
+ */
1776
+ applyUncommittedChanges(targetBranch?: string): Promise<void>;
1777
+ /**
1778
+ * Merge commits and optionally uncommitted changes from this task's worktree to a target worktree directory.
1779
+ * Useful for carrying over changes between worktrees when running multiple models.
1780
+ * @param targetWorktreeDir - The absolute path to the target worktree directory
1781
+ * @param includeUncommitted - Whether to include uncommitted changes (default: false)
1782
+ */
1783
+ mergeWorktreeToWorktree(targetWorktreeDir: string, includeUncommitted?: boolean): Promise<void>;
1736
1784
  }
1737
1785
  /**
1738
1786
  * Safe subset of Project capabilities exposed to extensions.
@@ -1820,6 +1868,68 @@ export interface ProjectContext {
1820
1868
  */
1821
1869
  getInputHistory(): Promise<string[]>;
1822
1870
  }
1871
+ /**
1872
+ * A narrow subset of Electron's `App` object, exposed to extensions via
1873
+ * {@link ExtensionContext.getElectronApp}.
1874
+ *
1875
+ * This is a hand-maintained interface (not imported from the `electron`
1876
+ * package) so that it can be published in `@aiderdesk/extensions` without
1877
+ * adding `electron` as a dependency. When running inside Electron the real
1878
+ * `App` object is structurally assignable to this interface; when running
1879
+ * outside Electron `getElectronApp()` returns `null`.
1880
+ */
1881
+ export interface ElectronApp {
1882
+ /**
1883
+ * Returns an array of `ProcessMetric` objects that correspond to memory
1884
+ * and CPU usage statistics of all the processes associated with the app.
1885
+ *
1886
+ * Each metric's `memory.workingSetSize` is expressed in **kilobytes**.
1887
+ */
1888
+ getAppMetrics(): ElectronProcessMetric[];
1889
+ /** The current application version. */
1890
+ getVersion(): string;
1891
+ /** The current application name. */
1892
+ getName(): string;
1893
+ /** A boolean that is true when the application has finished initializing. */
1894
+ isReady(): boolean;
1895
+ }
1896
+ /** CPU usage statistics for a single Electron process. */
1897
+ export interface ElectronCPUUsage {
1898
+ /** Percentage of CPU used since the last call (0–100). */
1899
+ percentCPUUsage?: number;
1900
+ /** Cumulative CPU time in seconds since process start. */
1901
+ cumulativeCPUUsage?: number;
1902
+ }
1903
+ /** Memory usage statistics for a single Electron process. */
1904
+ export interface ElectronMemoryInfo {
1905
+ /** Working set size in **kilobytes**. */
1906
+ workingSetSize?: number;
1907
+ /** Peak working set size in **kilobytes**. */
1908
+ peakWorkingSetSize?: number;
1909
+ }
1910
+ /**
1911
+ * Process metric returned by {@link ElectronApp.getAppMetrics}.
1912
+ *
1913
+ * All fields are optional because Electron may omit some of them depending
1914
+ * on the process type and platform.
1915
+ */
1916
+ export interface ElectronProcessMetric {
1917
+ /** Process ID. */
1918
+ pid?: number;
1919
+ /**
1920
+ * One of: `Browser` (main process), `Renderer`, `GPU`, `Utility`,
1921
+ * `ForkedWorker`, `ServiceWorker`, etc.
1922
+ */
1923
+ type?: string;
1924
+ /** Service name (only present for utility processes). */
1925
+ serviceName?: string;
1926
+ /** Display name of the process. */
1927
+ name?: string;
1928
+ /** CPU usage breakdown. */
1929
+ cpu?: ElectronCPUUsage;
1930
+ /** Memory usage breakdown. */
1931
+ memory?: ElectronMemoryInfo;
1932
+ }
1823
1933
  /**
1824
1934
  * Context object passed to extension methods providing access to AiderDesk APIs.
1825
1935
  *
@@ -1927,6 +2037,18 @@ export interface ExtensionContext {
1927
2037
  * @returns true if opened successfully, false if it failed (e.g., not in Electron environment)
1928
2038
  */
1929
2039
  openPath(path: string): Promise<boolean>;
2040
+ /**
2041
+ * Get a narrowed Electron `App` object for accessing host-level APIs
2042
+ * (e.g. `getAppMetrics()` for CPU/memory statistics).
2043
+ *
2044
+ * Only available when AiderDesk is running as an Electron desktop
2045
+ * application. Returns `null` when running in Node.js server / headless
2046
+ * mode, so extensions should perform a null-check before use.
2047
+ *
2048
+ * @returns Promise resolving to an {@link ElectronApp} instance, or
2049
+ * `null` if Electron is not available.
2050
+ */
2051
+ getElectronApp(): Promise<ElectronApp | null>;
1930
2052
  /**
1931
2053
  * Get the memory context for vector store operations (store, retrieve, update, delete memories).
1932
2054
  * Uses the same underlying vector store as the built-in memory tools.
package/extensions.json CHANGED
@@ -52,9 +52,10 @@
52
52
  {
53
53
  "id": "protected-paths",
54
54
  "name": "Protected Paths",
55
- "description": "Blocks file operations on protected paths (.env, .git/, node_modules/)",
56
- "file": "protected-paths.ts",
57
- "type": "single",
55
+ "description": "Blocks file operations on sensitive files and protected directories (.env*, *.pem, .ssh/, .aws/, .git/, system dirs, etc.)",
56
+ "folder": "protected-paths",
57
+ "type": "folder",
58
+ "hasDependencies": false,
58
59
  "capabilities": ["security"]
59
60
  },
60
61
  {
@@ -123,7 +124,7 @@
123
124
  {
124
125
  "id": "redact-secrets",
125
126
  "name": "Redact Secrets",
126
- "description": "Redacts secret values from .env* files in file read results",
127
+ "description": "Redacts secrets from file read results using regex patterns and .env* file values",
127
128
  "folder": "redact-secrets",
128
129
  "type": "folder",
129
130
  "hasDependencies": true,
@@ -292,10 +293,19 @@
292
293
  "hasDependencies": true,
293
294
  "capabilities": ["providers"]
294
295
  },
296
+ {
297
+ "id": "cursor",
298
+ "name": "Cursor",
299
+ "description": "Integrates Cursor as a provider via a local OpenAI-compatible proxy with full tool approval control",
300
+ "folder": "cursor",
301
+ "type": "folder",
302
+ "hasDependencies": true,
303
+ "capabilities": ["providers"]
304
+ },
295
305
  {
296
306
  "id": "cursor-sdk",
297
307
  "name": "Cursor SDK",
298
- "description": "Integrates the Cursor SDK as a provider with cursor/ prefix, overriding the agent loop to run Cursor agents",
308
+ "description": "Integrates the Cursor SDK as a provider with cursor-sdk/ prefix, overriding the agent loop to run Cursor agents",
299
309
  "folder": "cursor-sdk",
300
310
  "type": "folder",
301
311
  "hasDependencies": true,
@@ -336,6 +346,15 @@
336
346
  "type": "folder",
337
347
  "hasDependencies": false,
338
348
  "capabilities": ["ui"]
349
+ },
350
+ {
351
+ "id": "doom",
352
+ "name": "Doom",
353
+ "description": "Play DOOM in a floating panel",
354
+ "folder": "doom",
355
+ "type": "folder",
356
+ "hasDependencies": false,
357
+ "capabilities": ["ui"]
339
358
  }
340
359
  ]
341
360
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiderdesk/extensions",
3
- "version": "0.22.0",
3
+ "version": "0.24.0",
4
4
  "description": "Type definitions and examples for AiderDesk extensions",
5
5
  "author": "Hotovo",
6
6
  "homepage": "https://aiderdesk.hotovo.com",
@@ -36,6 +36,7 @@
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
+ "test": "vitest run --no-color",
39
40
  "prepublishOnly": "npm run build",
40
41
  "publish:next": "node scripts/publish-next.mjs",
41
42
  "release:latest": "node scripts/release-latest.mjs"