@aiderdesk/extensions 0.25.0 → 0.26.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
@@ -4,6 +4,7 @@ export type LlmProviderName = "anthropic" | "anthropic-compatible" | "azure" | "
4
4
  export interface LlmProviderBase {
5
5
  name: LlmProviderName;
6
6
  disableStreaming?: boolean;
7
+ disableToolCallStreaming?: boolean;
7
8
  voiceEnabled?: boolean;
8
9
  }
9
10
  export interface VoiceControlSettings {
@@ -184,27 +185,58 @@ export type JSONObject = {
184
185
  };
185
186
  export type JSONArray = JSONValue[];
186
187
  export type DataContent = string | Uint8Array | ArrayBuffer | Buffer;
188
+ export type FileDataData = {
189
+ type: "data";
190
+ data: DataContent;
191
+ };
192
+ export type ProviderReference = Record<string, string> & {
193
+ type?: never;
194
+ };
195
+ export type FileDataReference = {
196
+ type: "reference";
197
+ reference: ProviderReference;
198
+ };
199
+ export type FileDataUrl = {
200
+ type: "url";
201
+ url: URL;
202
+ };
203
+ export type FileDataText = {
204
+ type: "text";
205
+ text: string;
206
+ };
207
+ export type FileData = FileDataData | FileDataUrl | FileDataReference | FileDataText;
208
+ export type ProviderOptions = Record<string, JSONObject>;
187
209
  export type ToolResultOutput = {
188
210
  type: "text";
189
211
  value: string;
212
+ providerOptions?: ProviderOptions;
190
213
  } | {
191
214
  type: "json";
192
215
  value: JSONValue;
216
+ providerOptions?: ProviderOptions;
193
217
  } | {
194
218
  type: "error-text";
195
219
  value: string;
220
+ providerOptions?: ProviderOptions;
196
221
  } | {
197
222
  type: "error-json";
198
223
  value: JSONValue;
224
+ providerOptions?: ProviderOptions;
199
225
  } | {
200
226
  type: "content";
201
227
  value: Array<{
202
228
  type: "text";
203
229
  text: string;
230
+ providerOptions?: ProviderOptions;
204
231
  } | {
205
- type: "media";
206
- data: string;
232
+ type: "file";
233
+ data: FileData;
207
234
  mediaType: string;
235
+ filename?: string;
236
+ providerOptions?: ProviderOptions;
237
+ } | {
238
+ type: "custom";
239
+ providerOptions?: ProviderOptions;
208
240
  }>;
209
241
  };
210
242
  export interface TextPart {
@@ -973,7 +1005,7 @@ export interface ExtensionProviderStrategy {
973
1005
  loadModels: (profile: ProviderProfile, settings: SettingsData) => Promise<LoadModelsResponse>;
974
1006
  getAiderMapping?: (provider: ProviderProfile, modelId: string, settings: SettingsData, projectDir: string) => AiderModelMapping;
975
1007
  getUsageReport?: (task: unknown, provider: ProviderProfile, model: Model, usage: unknown, providerMetadata?: unknown) => UsageReportData;
976
- getProviderOptions?: (model: Model) => Record<string, Record<string, JSONValue>> | undefined;
1008
+ getProviderOptions?: (model: Model) => Record<string, Record<string, JSONValue | undefined>> | undefined;
977
1009
  getCacheControl?: (model: Model) => CacheControl | undefined;
978
1010
  getProviderTools?: (model: Model) => Record<string, Tool> | Promise<Record<string, Tool>>;
979
1011
  getProviderParameters?: (model: Model) => Record<string, unknown>;
@@ -1214,7 +1246,7 @@ export interface AgentStepFinishedEvent {
1214
1246
  readonly agentProfile: AgentProfile;
1215
1247
  readonly currentResponseId: string;
1216
1248
  readonly stepResult: AgentStepResult;
1217
- finishReason: "stop" | "length" | "content-filter" | "tool-calls" | "error" | "other" | "unknown";
1249
+ finishReason: "stop" | "length" | "content-filter" | "tool-calls" | "error" | "other";
1218
1250
  responseMessages: ContextMessage[];
1219
1251
  }
1220
1252
  /** Event payload for message optimization events */
package/dist/index.js CHANGED
@@ -1,4 +1,16 @@
1
1
  // src/runtime.ts
2
+ var OS = /* @__PURE__ */ ((OS2) => {
3
+ OS2["Windows"] = "windows";
4
+ OS2["Linux"] = "linux";
5
+ OS2["MacOS"] = "macos";
6
+ return OS2;
7
+ })(OS || {});
8
+ var AutonomyMode = /* @__PURE__ */ ((AutonomyMode2) => {
9
+ AutonomyMode2["Manual"] = "manual";
10
+ AutonomyMode2["Guided"] = "guided";
11
+ AutonomyMode2["Autonomous"] = "autonomous";
12
+ return AutonomyMode2;
13
+ })(AutonomyMode || {});
2
14
  var ToolApprovalState = /* @__PURE__ */ ((ToolApprovalState2) => {
3
15
  ToolApprovalState2["Always"] = "always";
4
16
  ToolApprovalState2["Never"] = "never";
@@ -17,7 +29,9 @@ var ContextMemoryMode = /* @__PURE__ */ ((ContextMemoryMode2) => {
17
29
  return ContextMemoryMode2;
18
30
  })(ContextMemoryMode || {});
19
31
  export {
32
+ AutonomyMode,
20
33
  ContextMemoryMode,
21
34
  InvocationMode,
35
+ OS,
22
36
  ToolApprovalState
23
37
  };
package/extensions.d.ts CHANGED
@@ -4,6 +4,7 @@ export type LlmProviderName = "anthropic" | "anthropic-compatible" | "azure" | "
4
4
  export interface LlmProviderBase {
5
5
  name: LlmProviderName;
6
6
  disableStreaming?: boolean;
7
+ disableToolCallStreaming?: boolean;
7
8
  voiceEnabled?: boolean;
8
9
  }
9
10
  export interface VoiceControlSettings {
@@ -184,27 +185,58 @@ export type JSONObject = {
184
185
  };
185
186
  export type JSONArray = JSONValue[];
186
187
  export type DataContent = string | Uint8Array | ArrayBuffer | Buffer;
188
+ export type FileDataData = {
189
+ type: "data";
190
+ data: DataContent;
191
+ };
192
+ export type ProviderReference = Record<string, string> & {
193
+ type?: never;
194
+ };
195
+ export type FileDataReference = {
196
+ type: "reference";
197
+ reference: ProviderReference;
198
+ };
199
+ export type FileDataUrl = {
200
+ type: "url";
201
+ url: URL;
202
+ };
203
+ export type FileDataText = {
204
+ type: "text";
205
+ text: string;
206
+ };
207
+ export type FileData = FileDataData | FileDataUrl | FileDataReference | FileDataText;
208
+ export type ProviderOptions = Record<string, JSONObject>;
187
209
  export type ToolResultOutput = {
188
210
  type: "text";
189
211
  value: string;
212
+ providerOptions?: ProviderOptions;
190
213
  } | {
191
214
  type: "json";
192
215
  value: JSONValue;
216
+ providerOptions?: ProviderOptions;
193
217
  } | {
194
218
  type: "error-text";
195
219
  value: string;
220
+ providerOptions?: ProviderOptions;
196
221
  } | {
197
222
  type: "error-json";
198
223
  value: JSONValue;
224
+ providerOptions?: ProviderOptions;
199
225
  } | {
200
226
  type: "content";
201
227
  value: Array<{
202
228
  type: "text";
203
229
  text: string;
230
+ providerOptions?: ProviderOptions;
204
231
  } | {
205
- type: "media";
206
- data: string;
232
+ type: "file";
233
+ data: FileData;
207
234
  mediaType: string;
235
+ filename?: string;
236
+ providerOptions?: ProviderOptions;
237
+ } | {
238
+ type: "custom";
239
+ providerOptions?: ProviderOptions;
208
240
  }>;
209
241
  };
210
242
  export interface TextPart {
@@ -973,7 +1005,7 @@ export interface ExtensionProviderStrategy {
973
1005
  loadModels: (profile: ProviderProfile, settings: SettingsData) => Promise<LoadModelsResponse>;
974
1006
  getAiderMapping?: (provider: ProviderProfile, modelId: string, settings: SettingsData, projectDir: string) => AiderModelMapping;
975
1007
  getUsageReport?: (task: unknown, provider: ProviderProfile, model: Model, usage: unknown, providerMetadata?: unknown) => UsageReportData;
976
- getProviderOptions?: (model: Model) => Record<string, Record<string, JSONValue>> | undefined;
1008
+ getProviderOptions?: (model: Model) => Record<string, Record<string, JSONValue | undefined>> | undefined;
977
1009
  getCacheControl?: (model: Model) => CacheControl | undefined;
978
1010
  getProviderTools?: (model: Model) => Record<string, Tool> | Promise<Record<string, Tool>>;
979
1011
  getProviderParameters?: (model: Model) => Record<string, unknown>;
@@ -1214,7 +1246,7 @@ export interface AgentStepFinishedEvent {
1214
1246
  readonly agentProfile: AgentProfile;
1215
1247
  readonly currentResponseId: string;
1216
1248
  readonly stepResult: AgentStepResult;
1217
- finishReason: "stop" | "length" | "content-filter" | "tool-calls" | "error" | "other" | "unknown";
1249
+ finishReason: "stop" | "length" | "content-filter" | "tool-calls" | "error" | "other";
1218
1250
  responseMessages: ContextMessage[];
1219
1251
  }
1220
1252
  /** Event payload for message optimization events */
package/extensions.json CHANGED
@@ -219,6 +219,15 @@
219
219
  "hasDependencies": true,
220
220
  "capabilities": ["ui"]
221
221
  },
222
+ {
223
+ "id": "openai-codex",
224
+ "name": "OpenAI Codex Auth",
225
+ "description": "OpenAI Codex provider using ChatGPT Plus/Pro OAuth authentication",
226
+ "folder": "openai-codex",
227
+ "type": "folder",
228
+ "hasDependencies": true,
229
+ "capabilities": ["providers"]
230
+ },
222
231
  {
223
232
  "id": "fff",
224
233
  "name": "FFF",
@@ -364,6 +373,15 @@
364
373
  "type": "folder",
365
374
  "hasDependencies": false,
366
375
  "capabilities": ["agents", "example"]
376
+ },
377
+ {
378
+ "id": "destructive-command-guard",
379
+ "name": "Destructive Command Guard",
380
+ "description": "Blocks dangerous git and shell commands from being executed by agents using dcg",
381
+ "folder": "destructive-command-guard",
382
+ "type": "folder",
383
+ "hasDependencies": false,
384
+ "capabilities": ["security", "commands"]
367
385
  }
368
386
  ]
369
387
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiderdesk/extensions",
3
- "version": "0.25.0",
3
+ "version": "0.26.0",
4
4
  "description": "Type definitions and examples for AiderDesk extensions",
5
5
  "author": "Hotovo",
6
6
  "homepage": "https://aiderdesk.hotovo.com",