@aiderdesk/extensions 0.37.0 → 0.38.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
@@ -255,31 +255,37 @@ export type ToolResultOutput = {
255
255
  }>;
256
256
  };
257
257
  export interface TextPart {
258
+ providerOptions?: ProviderOptions;
258
259
  type: "text";
259
260
  text: string;
260
261
  }
261
262
  export interface ImagePart {
263
+ providerOptions?: ProviderOptions;
262
264
  type: "image";
263
265
  image: DataContent | URL;
264
266
  mediaType?: string;
265
267
  }
266
268
  export interface FilePart {
269
+ providerOptions?: ProviderOptions;
267
270
  type: "file";
268
271
  data: DataContent | URL;
269
272
  filename?: string;
270
273
  mediaType: string;
271
274
  }
272
275
  export interface ReasoningPart {
276
+ providerOptions?: ProviderOptions;
273
277
  type: "reasoning";
274
278
  text: string;
275
279
  }
276
280
  export interface ToolCallPart {
281
+ providerOptions?: ProviderOptions;
277
282
  type: "tool-call";
278
283
  toolCallId: string;
279
284
  toolName: string;
280
285
  input: unknown;
281
286
  }
282
287
  export interface ToolResultPart {
288
+ providerOptions?: ProviderOptions;
283
289
  type: "tool-result";
284
290
  toolCallId: string;
285
291
  toolName: string;
@@ -319,6 +325,7 @@ declare enum MessageRole {
319
325
  Assistant = "assistant"
320
326
  }
321
327
  export interface BaseContextMessage {
328
+ providerOptions?: ProviderOptions;
322
329
  id: string;
323
330
  timestamp?: number;
324
331
  usageReport?: UsageReportData;
@@ -474,6 +481,7 @@ export interface ResponseCompletedData {
474
481
  }
475
482
  export interface UpdatedFile {
476
483
  path: string;
484
+ previousPath?: string;
477
485
  additions: number;
478
486
  deletions: number;
479
487
  diff?: string;
@@ -870,6 +878,7 @@ export interface SwitchToLocalOptions {
870
878
  discardWorktreeChanges?: boolean;
871
879
  }
872
880
  export interface SwitchToWorktreeOptions {
881
+ baseBranch?: string;
873
882
  carryOverUncommittedChanges?: boolean;
874
883
  dropSourceChanges?: boolean;
875
884
  }
@@ -1387,11 +1396,22 @@ export interface AgentStepFinishedEvent {
1387
1396
  finishReason: "stop" | "length" | "content-filter" | "tool-calls" | "error" | "other";
1388
1397
  responseMessages: ContextMessage[];
1389
1398
  }
1390
- /** Event payload for message optimization events */
1399
+ /** Event payload for stored-context to model-message transformations. */
1400
+ export interface TransformMessagesEvent {
1401
+ readonly originalMessages: ContextMessage[];
1402
+ transformedMessages: ContextMessage[];
1403
+ }
1404
+ /** Event payload for optional optimizations. Original messages are the transformation stage's output. */
1391
1405
  export interface OptimizeMessagesEvent {
1392
1406
  readonly originalMessages: ContextMessage[];
1393
1407
  optimizedMessages: ContextMessage[];
1394
1408
  }
1409
+ /** Event payload after provider compatibility and default cache annotation. */
1410
+ export interface ApplyCacheControlEvent {
1411
+ readonly originalMessages: ContextMessage[];
1412
+ readonly cacheControl?: CacheControl;
1413
+ messages: ContextMessage[];
1414
+ }
1395
1415
  /** Event payload for important reminders events */
1396
1416
  export interface ImportantRemindersEvent {
1397
1417
  /** @deprecated Use `agentProfile` instead. Will be removed in a future version. */
@@ -1746,9 +1766,10 @@ export interface TaskContext {
1746
1766
  * Get the diff for a single updated file (lazily loaded from the backend)
1747
1767
  * @param filePath Path of the file (as returned by getUpdatedFiles)
1748
1768
  * @param commitHash Optional commit hash for per-commit diffs in grouped worktree mode
1769
+ * @param previousPath Optional original path for renamed files (as returned by getUpdatedFiles)
1749
1770
  * @returns Unified diff string (empty for binary files or on error)
1750
1771
  */
1751
- getUpdatedFileDiff(filePath: string, commitHash?: string): Promise<string>;
1772
+ getUpdatedFileDiff(filePath: string, commitHash?: string, previousPath?: string): Promise<string>;
1752
1773
  /**
1753
1774
  * Get the cached repository map string.
1754
1775
  * The repo map summarizes the codebase structure and is maintained by the Aider manager.
@@ -2687,9 +2708,20 @@ export interface Extension {
2687
2708
  * @returns void or partial event
2688
2709
  */
2689
2710
  onAgentStepFinished?(event: AgentStepFinishedEvent, context: ExtensionContext): Promise<void | Partial<AgentStepFinishedEvent>>;
2711
+ /**
2712
+ * Override default context transformations, including Aider and subagent result reduction.
2713
+ * Original messages include reminders. Transformations are not reapplied after this hook.
2714
+ */
2715
+ onTransformMessages?(event: TransformMessagesEvent, context: ExtensionContext): Promise<void | Partial<TransformMessagesEvent>>;
2716
+ /**
2717
+ * Override cache annotation after provider compatibility conversion, even without a default cache policy.
2718
+ * Return originalMessages as messages to disable default cache annotation.
2719
+ */
2720
+ onApplyCacheControl?(event: ApplyCacheControlEvent, context: ExtensionContext): Promise<void | Partial<ApplyCacheControlEvent>>;
2690
2721
  /**
2691
2722
  * Called when messages are optimized before being sent to the LLM
2692
- * Modify event.optimizedMessages to change the messages that will be sent
2723
+ * Original messages are the transformation output, not raw stored context.
2724
+ * Modify event.optimizedMessages to override optional optimizations
2693
2725
  * @returns void or partial event to modify optimized messages
2694
2726
  */
2695
2727
  onOptimizeMessages?(event: OptimizeMessagesEvent, context: ExtensionContext): Promise<void | Partial<OptimizeMessagesEvent>>;
package/extensions.d.ts CHANGED
@@ -255,31 +255,37 @@ export type ToolResultOutput = {
255
255
  }>;
256
256
  };
257
257
  export interface TextPart {
258
+ providerOptions?: ProviderOptions;
258
259
  type: "text";
259
260
  text: string;
260
261
  }
261
262
  export interface ImagePart {
263
+ providerOptions?: ProviderOptions;
262
264
  type: "image";
263
265
  image: DataContent | URL;
264
266
  mediaType?: string;
265
267
  }
266
268
  export interface FilePart {
269
+ providerOptions?: ProviderOptions;
267
270
  type: "file";
268
271
  data: DataContent | URL;
269
272
  filename?: string;
270
273
  mediaType: string;
271
274
  }
272
275
  export interface ReasoningPart {
276
+ providerOptions?: ProviderOptions;
273
277
  type: "reasoning";
274
278
  text: string;
275
279
  }
276
280
  export interface ToolCallPart {
281
+ providerOptions?: ProviderOptions;
277
282
  type: "tool-call";
278
283
  toolCallId: string;
279
284
  toolName: string;
280
285
  input: unknown;
281
286
  }
282
287
  export interface ToolResultPart {
288
+ providerOptions?: ProviderOptions;
283
289
  type: "tool-result";
284
290
  toolCallId: string;
285
291
  toolName: string;
@@ -319,6 +325,7 @@ declare enum MessageRole {
319
325
  Assistant = "assistant"
320
326
  }
321
327
  export interface BaseContextMessage {
328
+ providerOptions?: ProviderOptions;
322
329
  id: string;
323
330
  timestamp?: number;
324
331
  usageReport?: UsageReportData;
@@ -474,6 +481,7 @@ export interface ResponseCompletedData {
474
481
  }
475
482
  export interface UpdatedFile {
476
483
  path: string;
484
+ previousPath?: string;
477
485
  additions: number;
478
486
  deletions: number;
479
487
  diff?: string;
@@ -870,6 +878,7 @@ export interface SwitchToLocalOptions {
870
878
  discardWorktreeChanges?: boolean;
871
879
  }
872
880
  export interface SwitchToWorktreeOptions {
881
+ baseBranch?: string;
873
882
  carryOverUncommittedChanges?: boolean;
874
883
  dropSourceChanges?: boolean;
875
884
  }
@@ -1387,11 +1396,22 @@ export interface AgentStepFinishedEvent {
1387
1396
  finishReason: "stop" | "length" | "content-filter" | "tool-calls" | "error" | "other";
1388
1397
  responseMessages: ContextMessage[];
1389
1398
  }
1390
- /** Event payload for message optimization events */
1399
+ /** Event payload for stored-context to model-message transformations. */
1400
+ export interface TransformMessagesEvent {
1401
+ readonly originalMessages: ContextMessage[];
1402
+ transformedMessages: ContextMessage[];
1403
+ }
1404
+ /** Event payload for optional optimizations. Original messages are the transformation stage's output. */
1391
1405
  export interface OptimizeMessagesEvent {
1392
1406
  readonly originalMessages: ContextMessage[];
1393
1407
  optimizedMessages: ContextMessage[];
1394
1408
  }
1409
+ /** Event payload after provider compatibility and default cache annotation. */
1410
+ export interface ApplyCacheControlEvent {
1411
+ readonly originalMessages: ContextMessage[];
1412
+ readonly cacheControl?: CacheControl;
1413
+ messages: ContextMessage[];
1414
+ }
1395
1415
  /** Event payload for important reminders events */
1396
1416
  export interface ImportantRemindersEvent {
1397
1417
  /** @deprecated Use `agentProfile` instead. Will be removed in a future version. */
@@ -1746,9 +1766,10 @@ export interface TaskContext {
1746
1766
  * Get the diff for a single updated file (lazily loaded from the backend)
1747
1767
  * @param filePath Path of the file (as returned by getUpdatedFiles)
1748
1768
  * @param commitHash Optional commit hash for per-commit diffs in grouped worktree mode
1769
+ * @param previousPath Optional original path for renamed files (as returned by getUpdatedFiles)
1749
1770
  * @returns Unified diff string (empty for binary files or on error)
1750
1771
  */
1751
- getUpdatedFileDiff(filePath: string, commitHash?: string): Promise<string>;
1772
+ getUpdatedFileDiff(filePath: string, commitHash?: string, previousPath?: string): Promise<string>;
1752
1773
  /**
1753
1774
  * Get the cached repository map string.
1754
1775
  * The repo map summarizes the codebase structure and is maintained by the Aider manager.
@@ -2687,9 +2708,20 @@ export interface Extension {
2687
2708
  * @returns void or partial event
2688
2709
  */
2689
2710
  onAgentStepFinished?(event: AgentStepFinishedEvent, context: ExtensionContext): Promise<void | Partial<AgentStepFinishedEvent>>;
2711
+ /**
2712
+ * Override default context transformations, including Aider and subagent result reduction.
2713
+ * Original messages include reminders. Transformations are not reapplied after this hook.
2714
+ */
2715
+ onTransformMessages?(event: TransformMessagesEvent, context: ExtensionContext): Promise<void | Partial<TransformMessagesEvent>>;
2716
+ /**
2717
+ * Override cache annotation after provider compatibility conversion, even without a default cache policy.
2718
+ * Return originalMessages as messages to disable default cache annotation.
2719
+ */
2720
+ onApplyCacheControl?(event: ApplyCacheControlEvent, context: ExtensionContext): Promise<void | Partial<ApplyCacheControlEvent>>;
2690
2721
  /**
2691
2722
  * Called when messages are optimized before being sent to the LLM
2692
- * Modify event.optimizedMessages to change the messages that will be sent
2723
+ * Original messages are the transformation output, not raw stored context.
2724
+ * Modify event.optimizedMessages to override optional optimizations
2693
2725
  * @returns void or partial event to modify optimized messages
2694
2726
  */
2695
2727
  onOptimizeMessages?(event: OptimizeMessagesEvent, context: ExtensionContext): Promise<void | Partial<OptimizeMessagesEvent>>;
package/extensions.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "capabilities": [
11
11
  "tools"
12
12
  ],
13
- "installCount": 12
13
+ "installCount": 15
14
14
  },
15
15
  {
16
16
  "id": "binary-files",
@@ -23,7 +23,7 @@
23
23
  "tools",
24
24
  "ui"
25
25
  ],
26
- "installCount": 38
26
+ "installCount": 39
27
27
  },
28
28
  {
29
29
  "id": "wakatime",
@@ -71,7 +71,7 @@
71
71
  "commands",
72
72
  "ui"
73
73
  ],
74
- "installCount": 46
74
+ "installCount": 49
75
75
  },
76
76
  {
77
77
  "id": "theme",
@@ -93,7 +93,7 @@
93
93
  "capabilities": [
94
94
  "modes"
95
95
  ],
96
- "installCount": 99
96
+ "installCount": 104
97
97
  },
98
98
  {
99
99
  "id": "protected-paths",
@@ -105,7 +105,7 @@
105
105
  "capabilities": [
106
106
  "security"
107
107
  ],
108
- "installCount": 47
108
+ "installCount": 49
109
109
  },
110
110
  {
111
111
  "id": "permission-gate",
@@ -116,7 +116,7 @@
116
116
  "capabilities": [
117
117
  "security"
118
118
  ],
119
- "installCount": 36
119
+ "installCount": 37
120
120
  },
121
121
  {
122
122
  "id": "ultrathink",
@@ -127,7 +127,7 @@
127
127
  "capabilities": [
128
128
  "optimization"
129
129
  ],
130
- "installCount": 48
130
+ "installCount": 51
131
131
  },
132
132
  {
133
133
  "id": "external-rules",
@@ -151,7 +151,7 @@
151
151
  "capabilities": [
152
152
  "context"
153
153
  ],
154
- "installCount": 62
154
+ "installCount": 66
155
155
  },
156
156
  {
157
157
  "id": "learn",
@@ -164,7 +164,7 @@
164
164
  "commands",
165
165
  "tools"
166
166
  ],
167
- "installCount": 82
167
+ "installCount": 90
168
168
  },
169
169
  {
170
170
  "id": "legacy-system-prompt",
@@ -181,14 +181,14 @@
181
181
  {
182
182
  "id": "sound-notification",
183
183
  "name": "Sound Notification",
184
- "description": "Plays sound notifications using packs from og-packs",
184
+ "description": "Plays sound notifications using og-packs or custom audio files",
185
185
  "folder": "sound-notification",
186
186
  "type": "folder",
187
187
  "hasDependencies": false,
188
188
  "capabilities": [
189
189
  "notifications"
190
190
  ],
191
- "installCount": 28
191
+ "installCount": 32
192
192
  },
193
193
  {
194
194
  "id": "sandbox",
@@ -221,7 +221,7 @@
221
221
  "linux",
222
222
  "macos"
223
223
  ],
224
- "installCount": 29
224
+ "installCount": 30
225
225
  },
226
226
  {
227
227
  "id": "redact-secrets",
@@ -233,7 +233,7 @@
233
233
  "capabilities": [
234
234
  "security"
235
235
  ],
236
- "installCount": 29
236
+ "installCount": 30
237
237
  },
238
238
  {
239
239
  "id": "chunkhound-search",
@@ -245,7 +245,7 @@
245
245
  "capabilities": [
246
246
  "search"
247
247
  ],
248
- "installCount": 15
248
+ "installCount": 16
249
249
  },
250
250
  {
251
251
  "id": "chunkhound-on-semantic-search-tool",
@@ -257,7 +257,7 @@
257
257
  "capabilities": [
258
258
  "search"
259
259
  ],
260
- "installCount": 15
260
+ "installCount": 16
261
261
  },
262
262
  {
263
263
  "id": "tree-sitter-repo-map",
@@ -270,7 +270,7 @@
270
270
  "context",
271
271
  "commands"
272
272
  ],
273
- "installCount": 75
273
+ "installCount": 78
274
274
  },
275
275
  {
276
276
  "id": "context-autocompletion-words",
@@ -295,7 +295,7 @@
295
295
  "tools",
296
296
  "code-intelligence"
297
297
  ],
298
- "installCount": 80
298
+ "installCount": 86
299
299
  },
300
300
  {
301
301
  "id": "plannotator",
@@ -310,7 +310,7 @@
310
310
  "commands",
311
311
  "workflows"
312
312
  ],
313
- "installCount": 25
313
+ "installCount": 26
314
314
  },
315
315
  {
316
316
  "id": "programmatic-tool-calls",
@@ -322,7 +322,7 @@
322
322
  "capabilities": [
323
323
  "tools"
324
324
  ],
325
- "installCount": 33
325
+ "installCount": 38
326
326
  },
327
327
  {
328
328
  "id": "ui-placement-demo",
@@ -334,7 +334,7 @@
334
334
  "ui",
335
335
  "example"
336
336
  ],
337
- "installCount": 13
337
+ "installCount": 14
338
338
  },
339
339
  {
340
340
  "id": "multi-model-run",
@@ -371,7 +371,7 @@
371
371
  "capabilities": [
372
372
  "providers"
373
373
  ],
374
- "installCount": 30
374
+ "installCount": 31
375
375
  },
376
376
  {
377
377
  "id": "fff",
@@ -388,7 +388,7 @@
388
388
  "linux",
389
389
  "macos"
390
390
  ],
391
- "installCount": 37
391
+ "installCount": 39
392
392
  },
393
393
  {
394
394
  "id": "searxng-search",
@@ -401,7 +401,7 @@
401
401
  "tools",
402
402
  "search"
403
403
  ],
404
- "installCount": 28
404
+ "installCount": 29
405
405
  },
406
406
  {
407
407
  "id": "seek",
@@ -418,7 +418,7 @@
418
418
  "linux",
419
419
  "macos"
420
420
  ],
421
- "installCount": 16
421
+ "installCount": 17
422
422
  },
423
423
  {
424
424
  "id": "tps-counter",
@@ -430,7 +430,7 @@
430
430
  "capabilities": [
431
431
  "metrics"
432
432
  ],
433
- "installCount": 91
433
+ "installCount": 96
434
434
  },
435
435
  {
436
436
  "id": "verifier",
@@ -443,7 +443,7 @@
443
443
  "workflows",
444
444
  "ui"
445
445
  ],
446
- "installCount": 52
446
+ "installCount": 54
447
447
  },
448
448
  {
449
449
  "id": "bmad",
@@ -456,7 +456,7 @@
456
456
  "modes",
457
457
  "ui"
458
458
  ],
459
- "installCount": 16
459
+ "installCount": 18
460
460
  },
461
461
  {
462
462
  "id": "claude-agent-sdk",
@@ -469,7 +469,7 @@
469
469
  "providers",
470
470
  "agent-loop"
471
471
  ],
472
- "installCount": 24
472
+ "installCount": 27
473
473
  },
474
474
  {
475
475
  "id": "auggie-sdk",
@@ -493,7 +493,7 @@
493
493
  "capabilities": [
494
494
  "providers"
495
495
  ],
496
- "installCount": 10
496
+ "installCount": 11
497
497
  },
498
498
  {
499
499
  "id": "cursor-sdk",
@@ -519,7 +519,7 @@
519
519
  "providers",
520
520
  "agent-loop"
521
521
  ],
522
- "installCount": 10
522
+ "installCount": 11
523
523
  },
524
524
  {
525
525
  "id": "checkpoints",
@@ -532,7 +532,7 @@
532
532
  "events",
533
533
  "ui"
534
534
  ],
535
- "installCount": 39
535
+ "installCount": 41
536
536
  },
537
537
  {
538
538
  "id": "codegraph",
@@ -545,7 +545,7 @@
545
545
  "tools",
546
546
  "search"
547
547
  ],
548
- "installCount": 72
548
+ "installCount": 79
549
549
  },
550
550
  {
551
551
  "id": "kanban",
@@ -557,7 +557,7 @@
557
557
  "capabilities": [
558
558
  "ui"
559
559
  ],
560
- "installCount": 45
560
+ "installCount": 49
561
561
  },
562
562
  {
563
563
  "id": "doom",
@@ -582,7 +582,7 @@
582
582
  "agents",
583
583
  "example"
584
584
  ],
585
- "installCount": 52
585
+ "installCount": 57
586
586
  },
587
587
  {
588
588
  "id": "wigolo",
@@ -595,7 +595,7 @@
595
595
  "tools",
596
596
  "search"
597
597
  ],
598
- "installCount": 62
598
+ "installCount": 64
599
599
  },
600
600
  {
601
601
  "id": "destructive-command-guard",
@@ -608,7 +608,7 @@
608
608
  "security",
609
609
  "commands"
610
610
  ],
611
- "installCount": 46
611
+ "installCount": 49
612
612
  },
613
613
  {
614
614
  "id": "git-log",
@@ -620,7 +620,7 @@
620
620
  "capabilities": [
621
621
  "ui"
622
622
  ],
623
- "installCount": 51
623
+ "installCount": 52
624
624
  },
625
625
  {
626
626
  "id": "skill-gallery",
@@ -632,7 +632,7 @@
632
632
  "capabilities": [
633
633
  "ui"
634
634
  ],
635
- "installCount": 126
635
+ "installCount": 142
636
636
  },
637
637
  {
638
638
  "id": "task-scheduler",
@@ -646,7 +646,7 @@
646
646
  "commands",
647
647
  "events"
648
648
  ],
649
- "installCount": 26
649
+ "installCount": 29
650
650
  },
651
651
  {
652
652
  "id": "reasoning-selector",
@@ -658,7 +658,7 @@
658
658
  "capabilities": [
659
659
  "ui"
660
660
  ],
661
- "installCount": 120
661
+ "installCount": 124
662
662
  },
663
663
  {
664
664
  "id": "dbx",
@@ -683,7 +683,7 @@
683
683
  "ui",
684
684
  "commands"
685
685
  ],
686
- "installCount": 11
686
+ "installCount": 13
687
687
  }
688
688
  ]
689
689
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiderdesk/extensions",
3
- "version": "0.37.0",
3
+ "version": "0.38.0",
4
4
  "description": "Type definitions and examples for AiderDesk extensions",
5
5
  "author": "Hotovo",
6
6
  "homepage": "https://aiderdesk.hotovo.com",