@roo-code/types 1.6.0 → 1.8.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@roo-code/types",
3
- "version": "1.6.0",
3
+ "version": "1.8.0",
4
4
  "description": "TypeScript type definitions for Roo Code",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -20,20 +20,23 @@
20
20
  "roo-code",
21
21
  "ai"
22
22
  ],
23
- "main": "./dist/index.js",
24
- "module": "./dist/index.mjs",
25
- "types": "./dist/index.d.ts",
23
+ "main": "./src/index.js",
24
+ "types": "./src/index.d.ts",
26
25
  "files": [
27
- "dist"
26
+ "src"
28
27
  ],
29
28
  "packageManager": "pnpm@10.8.1",
30
29
  "scripts": {
31
- "build": "tsup",
30
+ "build": "echo 'no-op'",
32
31
  "prepublishOnly": "pnpm run build",
33
32
  "check-types": "tsc --noEmit",
34
33
  "release:test": "dotenvx run -f .env.local -- semantic-release --dry-run",
34
+ "release:prepare": "dotenvx run -f .env.local -- semantic-release --no-ci prepare",
35
35
  "release": "dotenvx run -f .env.local -- semantic-release --no-ci"
36
36
  },
37
+ "dependencies": {
38
+ "zod": "^3.24.4"
39
+ },
37
40
  "devDependencies": {
38
41
  "@dotenvx/dotenvx": "^1.44.0",
39
42
  "@types/node": "^22.15.17",
@@ -69,6 +69,7 @@ type GlobalSettings = {
69
69
  diffEnabled?: boolean | undefined;
70
70
  fuzzyMatchThreshold?: number | undefined;
71
71
  experiments?: {
72
+ autoCondenseContext: boolean;
72
73
  powerSteering: boolean;
73
74
  } | undefined;
74
75
  language?: ("ca" | "de" | "en" | "es" | "fr" | "hi" | "it" | "ja" | "ko" | "nl" | "pl" | "pt-BR" | "ru" | "tr" | "vi" | "zh-CN" | "zh-TW") | undefined;
@@ -83,6 +84,7 @@ type GlobalSettings = {
83
84
  slug: string;
84
85
  name: string;
85
86
  roleDefinition: string;
87
+ whenToUse?: string | undefined;
86
88
  customInstructions?: string | undefined;
87
89
  groups: (("read" | "edit" | "browser" | "command" | "mcp" | "modes") | [
88
90
  "read" | "edit" | "browser" | "command" | "mcp" | "modes",
@@ -96,6 +98,7 @@ type GlobalSettings = {
96
98
  customModePrompts?: {
97
99
  [x: string]: {
98
100
  roleDefinition?: string | undefined;
101
+ whenToUse?: string | undefined;
99
102
  customInstructions?: string | undefined;
100
103
  } | undefined;
101
104
  } | undefined;
@@ -105,6 +108,9 @@ type GlobalSettings = {
105
108
  enhancementApiConfigId?: string | undefined;
106
109
  historyPreviewCollapsed?: boolean | undefined;
107
110
  };
111
+
112
+ type ProviderName = "anthropic" | "glama" | "openrouter" | "bedrock" | "vertex" | "openai" | "ollama" | "vscode-lm" | "lmstudio" | "gemini" | "openai-native" | "mistral" | "deepseek" | "unbound" | "requesty" | "human-relay" | "fake-ai" | "xai" | "groq" | "chutes" | "litellm";
113
+
108
114
  type ProviderSettings = {
109
115
  apiProvider?: ("anthropic" | "glama" | "openrouter" | "bedrock" | "vertex" | "openai" | "ollama" | "vscode-lm" | "lmstudio" | "gemini" | "openai-native" | "mistral" | "deepseek" | "unbound" | "requesty" | "human-relay" | "fake-ai" | "xai" | "groq" | "chutes" | "litellm") | undefined;
110
116
  includeMaxTokens?: boolean | undefined;
@@ -209,11 +215,13 @@ type ProviderSettings = {
209
215
  litellmApiKey?: string | undefined;
210
216
  litellmModelId?: string | undefined;
211
217
  };
218
+
212
219
  type ProviderSettingsEntry = {
213
220
  id: string;
214
221
  name: string;
215
222
  apiProvider?: ("anthropic" | "glama" | "openrouter" | "bedrock" | "vertex" | "openai" | "ollama" | "vscode-lm" | "lmstudio" | "gemini" | "openai-native" | "mistral" | "deepseek" | "unbound" | "requesty" | "human-relay" | "fake-ai" | "xai" | "groq" | "chutes" | "litellm") | undefined;
216
223
  };
224
+
217
225
  type ClineMessage = {
218
226
  ts: number;
219
227
  type: "ask" | "say";
@@ -232,6 +240,7 @@ type ClineMessage = {
232
240
  text?: string | undefined;
233
241
  } | undefined;
234
242
  };
243
+
235
244
  type TokenUsage = {
236
245
  totalTokensIn: number;
237
246
  totalTokensOut: number;
@@ -240,6 +249,7 @@ type TokenUsage = {
240
249
  totalCost: number;
241
250
  contextTokens: number;
242
251
  };
252
+
243
253
  type RooCodeEvents = {
244
254
  message: [
245
255
  {
@@ -265,14 +275,32 @@ type RooCodeEvents = {
265
275
  };
266
276
  }
267
277
  ];
268
- taskCreated: [string];
269
- taskStarted: [string];
270
- taskModeSwitched: [string, string];
271
- taskPaused: [string];
272
- taskUnpaused: [string];
273
- taskAskResponded: [string];
274
- taskAborted: [string];
275
- taskSpawned: [string, string];
278
+ taskCreated: [
279
+ string
280
+ ];
281
+ taskStarted: [
282
+ string
283
+ ];
284
+ taskModeSwitched: [
285
+ string,
286
+ string
287
+ ];
288
+ taskPaused: [
289
+ string
290
+ ];
291
+ taskUnpaused: [
292
+ string
293
+ ];
294
+ taskAskResponded: [
295
+ string
296
+ ];
297
+ taskAborted: [
298
+ string
299
+ ];
300
+ taskSpawned: [
301
+ string,
302
+ string
303
+ ];
276
304
  taskCompleted: [
277
305
  string,
278
306
  {
@@ -303,10 +331,11 @@ type RooCodeEvents = {
303
331
  ];
304
332
  taskToolFailed: [
305
333
  string,
306
- ("execute_command" | "read_file" | "write_to_file" | "apply_diff" | "insert_content" | "search_and_replace" | "search_files" | "list_files" | "list_code_definition_names" | "browser_action" | "use_mcp_tool" | "access_mcp_resource" | "ask_followup_question" | "attempt_completion" | "switch_mode" | "new_task" | "fetch_instructions"),
334
+ "execute_command" | "read_file" | "write_to_file" | "apply_diff" | "insert_content" | "search_and_replace" | "search_files" | "list_files" | "list_code_definition_names" | "browser_action" | "use_mcp_tool" | "access_mcp_resource" | "ask_followup_question" | "attempt_completion" | "switch_mode" | "new_task" | "fetch_instructions",
307
335
  string
308
336
  ];
309
337
  };
338
+
310
339
  type IpcMessage = {
311
340
  type: "Ack";
312
341
  origin: "server";
@@ -489,6 +518,7 @@ type IpcMessage = {
489
518
  terminalZdotdir?: boolean | undefined;
490
519
  terminalCompressProgressBar?: boolean | undefined;
491
520
  experiments?: {
521
+ autoCondenseContext: boolean;
492
522
  powerSteering: boolean;
493
523
  } | undefined;
494
524
  language?: ("ca" | "de" | "en" | "es" | "fr" | "hi" | "it" | "ja" | "ko" | "nl" | "pl" | "pt-BR" | "ru" | "tr" | "vi" | "zh-CN" | "zh-TW") | undefined;
@@ -503,6 +533,7 @@ type IpcMessage = {
503
533
  slug: string;
504
534
  name: string;
505
535
  roleDefinition: string;
536
+ whenToUse?: string | undefined;
506
537
  customInstructions?: string | undefined;
507
538
  groups: (("read" | "edit" | "browser" | "command" | "mcp" | "modes") | [
508
539
  "read" | "edit" | "browser" | "command" | "mcp" | "modes",
@@ -516,6 +547,7 @@ type IpcMessage = {
516
547
  customModePrompts?: {
517
548
  [x: string]: {
518
549
  roleDefinition?: string | undefined;
550
+ whenToUse?: string | undefined;
519
551
  customInstructions?: string | undefined;
520
552
  } | undefined;
521
553
  } | undefined;
@@ -568,28 +600,46 @@ type IpcMessage = {
568
600
  ];
569
601
  } | {
570
602
  eventName: "taskCreated";
571
- payload: [string];
603
+ payload: [
604
+ string
605
+ ];
572
606
  } | {
573
607
  eventName: "taskStarted";
574
- payload: [string];
608
+ payload: [
609
+ string
610
+ ];
575
611
  } | {
576
612
  eventName: "taskModeSwitched";
577
- payload: [string, string];
613
+ payload: [
614
+ string,
615
+ string
616
+ ];
578
617
  } | {
579
618
  eventName: "taskPaused";
580
- payload: [string];
619
+ payload: [
620
+ string
621
+ ];
581
622
  } | {
582
623
  eventName: "taskUnpaused";
583
- payload: [string];
624
+ payload: [
625
+ string
626
+ ];
584
627
  } | {
585
628
  eventName: "taskAskResponded";
586
- payload: [string];
629
+ payload: [
630
+ string
631
+ ];
587
632
  } | {
588
633
  eventName: "taskAborted";
589
- payload: [string];
634
+ payload: [
635
+ string
636
+ ];
590
637
  } | {
591
638
  eventName: "taskSpawned";
592
- payload: [string, string];
639
+ payload: [
640
+ string,
641
+ string
642
+ ];
593
643
  } | {
594
644
  eventName: "taskCompleted";
595
645
  payload: [
@@ -624,6 +674,7 @@ type IpcMessage = {
624
674
  ];
625
675
  };
626
676
  };
677
+
627
678
  type TaskCommand = {
628
679
  commandName: "StartNewTask";
629
680
  data: {
@@ -794,6 +845,7 @@ type TaskCommand = {
794
845
  terminalZdotdir?: boolean | undefined;
795
846
  terminalCompressProgressBar?: boolean | undefined;
796
847
  experiments?: {
848
+ autoCondenseContext: boolean;
797
849
  powerSteering: boolean;
798
850
  } | undefined;
799
851
  language?: ("ca" | "de" | "en" | "es" | "fr" | "hi" | "it" | "ja" | "ko" | "nl" | "pl" | "pt-BR" | "ru" | "tr" | "vi" | "zh-CN" | "zh-TW") | undefined;
@@ -808,6 +860,7 @@ type TaskCommand = {
808
860
  slug: string;
809
861
  name: string;
810
862
  roleDefinition: string;
863
+ whenToUse?: string | undefined;
811
864
  customInstructions?: string | undefined;
812
865
  groups: (("read" | "edit" | "browser" | "command" | "mcp" | "modes") | [
813
866
  "read" | "edit" | "browser" | "command" | "mcp" | "modes",
@@ -821,6 +874,7 @@ type TaskCommand = {
821
874
  customModePrompts?: {
822
875
  [x: string]: {
823
876
  roleDefinition?: string | undefined;
877
+ whenToUse?: string | undefined;
824
878
  customInstructions?: string | undefined;
825
879
  } | undefined;
826
880
  } | undefined;
@@ -841,6 +895,7 @@ type TaskCommand = {
841
895
  commandName: "CloseTask";
842
896
  data: string;
843
897
  };
898
+
844
899
  type TaskEvent = {
845
900
  eventName: "message";
846
901
  payload: [
@@ -869,28 +924,46 @@ type TaskEvent = {
869
924
  ];
870
925
  } | {
871
926
  eventName: "taskCreated";
872
- payload: [string];
927
+ payload: [
928
+ string
929
+ ];
873
930
  } | {
874
931
  eventName: "taskStarted";
875
- payload: [string];
932
+ payload: [
933
+ string
934
+ ];
876
935
  } | {
877
936
  eventName: "taskModeSwitched";
878
- payload: [string, string];
937
+ payload: [
938
+ string,
939
+ string
940
+ ];
879
941
  } | {
880
942
  eventName: "taskPaused";
881
- payload: [string];
943
+ payload: [
944
+ string
945
+ ];
882
946
  } | {
883
947
  eventName: "taskUnpaused";
884
- payload: [string];
948
+ payload: [
949
+ string
950
+ ];
885
951
  } | {
886
952
  eventName: "taskAskResponded";
887
- payload: [string];
953
+ payload: [
954
+ string
955
+ ];
888
956
  } | {
889
957
  eventName: "taskAborted";
890
- payload: [string];
958
+ payload: [
959
+ string
960
+ ];
891
961
  } | {
892
962
  eventName: "taskSpawned";
893
- payload: [string, string];
963
+ payload: [
964
+ string,
965
+ string
966
+ ];
894
967
  } | {
895
968
  eventName: "taskCompleted";
896
969
  payload: [
@@ -924,6 +997,11 @@ type TaskEvent = {
924
997
  }
925
998
  ];
926
999
  };
1000
+
1001
+ /**
1002
+ * ProviderName
1003
+ */
1004
+ declare const providerNames: readonly ["anthropic", "glama", "openrouter", "bedrock", "vertex", "openai", "ollama", "vscode-lm", "lmstudio", "gemini", "openai-native", "mistral", "deepseek", "unbound", "requesty", "human-relay", "fake-ai", "xai", "groq", "chutes", "litellm"];
927
1005
  /**
928
1006
  * RooCodeEvent
929
1007
  */
@@ -955,6 +1033,7 @@ declare enum IpcOrigin {
955
1033
  Client = "client",
956
1034
  Server = "server"
957
1035
  }
1036
+
958
1037
  /**
959
1038
  * RooCodeAPI
960
1039
  */
@@ -1097,4 +1176,4 @@ interface RooCodeIpcServer extends EventEmitter<IpcServerEvents> {
1097
1176
  get isListening(): boolean;
1098
1177
  }
1099
1178
 
1100
- export { type ClineMessage, type GlobalSettings, type IpcMessage, IpcMessageType, IpcOrigin, type IpcServerEvents, type ProviderSettings, type ProviderSettingsEntry, type RooCodeAPI, RooCodeEventName, type RooCodeEvents, type RooCodeIpcServer, type RooCodeSettings, type TaskCommand, type TaskEvent, type TokenUsage };
1179
+ export { type ClineMessage, type GlobalSettings, type IpcMessage, IpcMessageType, IpcOrigin, type IpcServerEvents, type ProviderName, type ProviderSettings, type ProviderSettingsEntry, type RooCodeAPI, RooCodeEventName, type RooCodeEvents, type RooCodeIpcServer, type RooCodeSettings, type TaskCommand, type TaskEvent, type TokenUsage, providerNames };