@roo-code/types 1.7.0 → 1.9.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.7.0",
3
+ "version": "1.9.0",
4
4
  "description": "TypeScript type definitions for Roo Code",
5
5
  "publishConfig": {
6
6
  "access": "public"
package/src/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { EventEmitter } from 'events';
2
2
  import { Socket } from 'node:net';
3
+ import { z } from 'zod';
3
4
 
4
5
  type GlobalSettings = {
5
6
  currentApiConfigName?: string | undefined;
@@ -69,6 +70,7 @@ type GlobalSettings = {
69
70
  diffEnabled?: boolean | undefined;
70
71
  fuzzyMatchThreshold?: number | undefined;
71
72
  experiments?: {
73
+ autoCondenseContext: boolean;
72
74
  powerSteering: boolean;
73
75
  } | undefined;
74
76
  language?: ("ca" | "de" | "en" | "es" | "fr" | "hi" | "it" | "ja" | "ko" | "nl" | "pl" | "pt-BR" | "ru" | "tr" | "vi" | "zh-CN" | "zh-TW") | undefined;
@@ -83,6 +85,7 @@ type GlobalSettings = {
83
85
  slug: string;
84
86
  name: string;
85
87
  roleDefinition: string;
88
+ whenToUse?: string | undefined;
86
89
  customInstructions?: string | undefined;
87
90
  groups: (("read" | "edit" | "browser" | "command" | "mcp" | "modes") | [
88
91
  "read" | "edit" | "browser" | "command" | "mcp" | "modes",
@@ -96,6 +99,7 @@ type GlobalSettings = {
96
99
  customModePrompts?: {
97
100
  [x: string]: {
98
101
  roleDefinition?: string | undefined;
102
+ whenToUse?: string | undefined;
99
103
  customInstructions?: string | undefined;
100
104
  } | undefined;
101
105
  } | undefined;
@@ -106,6 +110,8 @@ type GlobalSettings = {
106
110
  historyPreviewCollapsed?: boolean | undefined;
107
111
  };
108
112
 
113
+ 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";
114
+
109
115
  type ProviderSettings = {
110
116
  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;
111
117
  includeMaxTokens?: boolean | undefined;
@@ -513,6 +519,7 @@ type IpcMessage = {
513
519
  terminalZdotdir?: boolean | undefined;
514
520
  terminalCompressProgressBar?: boolean | undefined;
515
521
  experiments?: {
522
+ autoCondenseContext: boolean;
516
523
  powerSteering: boolean;
517
524
  } | undefined;
518
525
  language?: ("ca" | "de" | "en" | "es" | "fr" | "hi" | "it" | "ja" | "ko" | "nl" | "pl" | "pt-BR" | "ru" | "tr" | "vi" | "zh-CN" | "zh-TW") | undefined;
@@ -527,6 +534,7 @@ type IpcMessage = {
527
534
  slug: string;
528
535
  name: string;
529
536
  roleDefinition: string;
537
+ whenToUse?: string | undefined;
530
538
  customInstructions?: string | undefined;
531
539
  groups: (("read" | "edit" | "browser" | "command" | "mcp" | "modes") | [
532
540
  "read" | "edit" | "browser" | "command" | "mcp" | "modes",
@@ -540,6 +548,7 @@ type IpcMessage = {
540
548
  customModePrompts?: {
541
549
  [x: string]: {
542
550
  roleDefinition?: string | undefined;
551
+ whenToUse?: string | undefined;
543
552
  customInstructions?: string | undefined;
544
553
  } | undefined;
545
554
  } | undefined;
@@ -837,6 +846,7 @@ type TaskCommand = {
837
846
  terminalZdotdir?: boolean | undefined;
838
847
  terminalCompressProgressBar?: boolean | undefined;
839
848
  experiments?: {
849
+ autoCondenseContext: boolean;
840
850
  powerSteering: boolean;
841
851
  } | undefined;
842
852
  language?: ("ca" | "de" | "en" | "es" | "fr" | "hi" | "it" | "ja" | "ko" | "nl" | "pl" | "pt-BR" | "ru" | "tr" | "vi" | "zh-CN" | "zh-TW") | undefined;
@@ -851,6 +861,7 @@ type TaskCommand = {
851
861
  slug: string;
852
862
  name: string;
853
863
  roleDefinition: string;
864
+ whenToUse?: string | undefined;
854
865
  customInstructions?: string | undefined;
855
866
  groups: (("read" | "edit" | "browser" | "command" | "mcp" | "modes") | [
856
867
  "read" | "edit" | "browser" | "command" | "mcp" | "modes",
@@ -864,6 +875,7 @@ type TaskCommand = {
864
875
  customModePrompts?: {
865
876
  [x: string]: {
866
877
  roleDefinition?: string | undefined;
878
+ whenToUse?: string | undefined;
867
879
  customInstructions?: string | undefined;
868
880
  } | undefined;
869
881
  } | undefined;
@@ -987,6 +999,10 @@ type TaskEvent = {
987
999
  ];
988
1000
  };
989
1001
 
1002
+ /**
1003
+ * ProviderName
1004
+ */
1005
+ 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"];
990
1006
  /**
991
1007
  * RooCodeEvent
992
1008
  */
@@ -1018,11 +1034,201 @@ declare enum IpcOrigin {
1018
1034
  Client = "client",
1019
1035
  Server = "server"
1020
1036
  }
1037
+ /**
1038
+ * TelemetryEventName
1039
+ */
1040
+ declare enum TelemetryEventName {
1041
+ TASK_CREATED = "Task Created",
1042
+ TASK_RESTARTED = "Task Reopened",
1043
+ TASK_COMPLETED = "Task Completed",
1044
+ TASK_CONVERSATION_MESSAGE = "Conversation Message",
1045
+ LLM_COMPLETION = "LLM Completion",
1046
+ MODE_SWITCH = "Mode Switched",
1047
+ TOOL_USED = "Tool Used",
1048
+ CHECKPOINT_CREATED = "Checkpoint Created",
1049
+ CHECKPOINT_RESTORED = "Checkpoint Restored",
1050
+ CHECKPOINT_DIFFED = "Checkpoint Diffed",
1051
+ CODE_ACTION_USED = "Code Action Used",
1052
+ PROMPT_ENHANCED = "Prompt Enhanced",
1053
+ TITLE_BUTTON_CLICKED = "Title Button Clicked",
1054
+ AUTHENTICATION_INITIATED = "Authentication Initiated",
1055
+ SCHEMA_VALIDATION_ERROR = "Schema Validation Error",
1056
+ DIFF_APPLICATION_ERROR = "Diff Application Error",
1057
+ SHELL_INTEGRATION_ERROR = "Shell Integration Error",
1058
+ CONSECUTIVE_MISTAKE_ERROR = "Consecutive Mistake Error"
1059
+ }
1060
+ declare const rooCodeTelemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1061
+ type: z.ZodEnum<[TelemetryEventName.TASK_CREATED, TelemetryEventName.TASK_RESTARTED, TelemetryEventName.TASK_COMPLETED, TelemetryEventName.TASK_CONVERSATION_MESSAGE, TelemetryEventName.MODE_SWITCH, TelemetryEventName.TOOL_USED, TelemetryEventName.CHECKPOINT_CREATED, TelemetryEventName.CHECKPOINT_RESTORED, TelemetryEventName.CHECKPOINT_DIFFED, TelemetryEventName.CODE_ACTION_USED, TelemetryEventName.PROMPT_ENHANCED, TelemetryEventName.TITLE_BUTTON_CLICKED, TelemetryEventName.AUTHENTICATION_INITIATED, TelemetryEventName.SCHEMA_VALIDATION_ERROR, TelemetryEventName.DIFF_APPLICATION_ERROR, TelemetryEventName.SHELL_INTEGRATION_ERROR, TelemetryEventName.CONSECUTIVE_MISTAKE_ERROR]>;
1062
+ properties: z.ZodObject<{
1063
+ taskId: z.ZodOptional<z.ZodString>;
1064
+ apiProvider: z.ZodOptional<z.ZodEnum<["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"]>>;
1065
+ modelId: z.ZodOptional<z.ZodString>;
1066
+ diffStrategy: z.ZodOptional<z.ZodString>;
1067
+ isSubtask: z.ZodOptional<z.ZodBoolean>;
1068
+ appVersion: z.ZodString;
1069
+ vscodeVersion: z.ZodString;
1070
+ platform: z.ZodString;
1071
+ editorName: z.ZodString;
1072
+ language: z.ZodString;
1073
+ mode: z.ZodString;
1074
+ }, "strip", z.ZodTypeAny, {
1075
+ language: string;
1076
+ mode: string;
1077
+ appVersion: string;
1078
+ vscodeVersion: string;
1079
+ platform: string;
1080
+ editorName: string;
1081
+ 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;
1082
+ taskId?: string | undefined;
1083
+ modelId?: string | undefined;
1084
+ diffStrategy?: string | undefined;
1085
+ isSubtask?: boolean | undefined;
1086
+ }, {
1087
+ language: string;
1088
+ mode: string;
1089
+ appVersion: string;
1090
+ vscodeVersion: string;
1091
+ platform: string;
1092
+ editorName: string;
1093
+ 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;
1094
+ taskId?: string | undefined;
1095
+ modelId?: string | undefined;
1096
+ diffStrategy?: string | undefined;
1097
+ isSubtask?: boolean | undefined;
1098
+ }>;
1099
+ }, "strip", z.ZodTypeAny, {
1100
+ type: TelemetryEventName.TASK_CREATED | TelemetryEventName.TASK_RESTARTED | TelemetryEventName.TASK_COMPLETED | TelemetryEventName.TASK_CONVERSATION_MESSAGE | TelemetryEventName.MODE_SWITCH | TelemetryEventName.TOOL_USED | TelemetryEventName.CHECKPOINT_CREATED | TelemetryEventName.CHECKPOINT_RESTORED | TelemetryEventName.CHECKPOINT_DIFFED | TelemetryEventName.CODE_ACTION_USED | TelemetryEventName.PROMPT_ENHANCED | TelemetryEventName.TITLE_BUTTON_CLICKED | TelemetryEventName.AUTHENTICATION_INITIATED | TelemetryEventName.SCHEMA_VALIDATION_ERROR | TelemetryEventName.DIFF_APPLICATION_ERROR | TelemetryEventName.SHELL_INTEGRATION_ERROR | TelemetryEventName.CONSECUTIVE_MISTAKE_ERROR;
1101
+ properties: {
1102
+ language: string;
1103
+ mode: string;
1104
+ appVersion: string;
1105
+ vscodeVersion: string;
1106
+ platform: string;
1107
+ editorName: string;
1108
+ 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;
1109
+ taskId?: string | undefined;
1110
+ modelId?: string | undefined;
1111
+ diffStrategy?: string | undefined;
1112
+ isSubtask?: boolean | undefined;
1113
+ };
1114
+ }, {
1115
+ type: TelemetryEventName.TASK_CREATED | TelemetryEventName.TASK_RESTARTED | TelemetryEventName.TASK_COMPLETED | TelemetryEventName.TASK_CONVERSATION_MESSAGE | TelemetryEventName.MODE_SWITCH | TelemetryEventName.TOOL_USED | TelemetryEventName.CHECKPOINT_CREATED | TelemetryEventName.CHECKPOINT_RESTORED | TelemetryEventName.CHECKPOINT_DIFFED | TelemetryEventName.CODE_ACTION_USED | TelemetryEventName.PROMPT_ENHANCED | TelemetryEventName.TITLE_BUTTON_CLICKED | TelemetryEventName.AUTHENTICATION_INITIATED | TelemetryEventName.SCHEMA_VALIDATION_ERROR | TelemetryEventName.DIFF_APPLICATION_ERROR | TelemetryEventName.SHELL_INTEGRATION_ERROR | TelemetryEventName.CONSECUTIVE_MISTAKE_ERROR;
1116
+ properties: {
1117
+ language: string;
1118
+ mode: string;
1119
+ appVersion: string;
1120
+ vscodeVersion: string;
1121
+ platform: string;
1122
+ editorName: string;
1123
+ 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;
1124
+ taskId?: string | undefined;
1125
+ modelId?: string | undefined;
1126
+ diffStrategy?: string | undefined;
1127
+ isSubtask?: boolean | undefined;
1128
+ };
1129
+ }>, z.ZodObject<{
1130
+ type: z.ZodLiteral<TelemetryEventName.LLM_COMPLETION>;
1131
+ properties: z.ZodObject<{
1132
+ inputTokens: z.ZodNumber;
1133
+ outputTokens: z.ZodNumber;
1134
+ cacheReadTokens: z.ZodOptional<z.ZodNumber>;
1135
+ cacheWriteTokens: z.ZodOptional<z.ZodNumber>;
1136
+ cost: z.ZodOptional<z.ZodNumber>;
1137
+ taskId: z.ZodOptional<z.ZodString>;
1138
+ apiProvider: z.ZodOptional<z.ZodEnum<["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"]>>;
1139
+ modelId: z.ZodOptional<z.ZodString>;
1140
+ diffStrategy: z.ZodOptional<z.ZodString>;
1141
+ isSubtask: z.ZodOptional<z.ZodBoolean>;
1142
+ appVersion: z.ZodString;
1143
+ vscodeVersion: z.ZodString;
1144
+ platform: z.ZodString;
1145
+ editorName: z.ZodString;
1146
+ language: z.ZodString;
1147
+ mode: z.ZodString;
1148
+ }, "strip", z.ZodTypeAny, {
1149
+ language: string;
1150
+ mode: string;
1151
+ appVersion: string;
1152
+ vscodeVersion: string;
1153
+ platform: string;
1154
+ editorName: string;
1155
+ inputTokens: number;
1156
+ outputTokens: number;
1157
+ 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;
1158
+ taskId?: string | undefined;
1159
+ modelId?: string | undefined;
1160
+ diffStrategy?: string | undefined;
1161
+ isSubtask?: boolean | undefined;
1162
+ cacheReadTokens?: number | undefined;
1163
+ cacheWriteTokens?: number | undefined;
1164
+ cost?: number | undefined;
1165
+ }, {
1166
+ language: string;
1167
+ mode: string;
1168
+ appVersion: string;
1169
+ vscodeVersion: string;
1170
+ platform: string;
1171
+ editorName: string;
1172
+ inputTokens: number;
1173
+ outputTokens: number;
1174
+ 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;
1175
+ taskId?: string | undefined;
1176
+ modelId?: string | undefined;
1177
+ diffStrategy?: string | undefined;
1178
+ isSubtask?: boolean | undefined;
1179
+ cacheReadTokens?: number | undefined;
1180
+ cacheWriteTokens?: number | undefined;
1181
+ cost?: number | undefined;
1182
+ }>;
1183
+ }, "strip", z.ZodTypeAny, {
1184
+ type: TelemetryEventName.LLM_COMPLETION;
1185
+ properties: {
1186
+ language: string;
1187
+ mode: string;
1188
+ appVersion: string;
1189
+ vscodeVersion: string;
1190
+ platform: string;
1191
+ editorName: string;
1192
+ inputTokens: number;
1193
+ outputTokens: number;
1194
+ 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;
1195
+ taskId?: string | undefined;
1196
+ modelId?: string | undefined;
1197
+ diffStrategy?: string | undefined;
1198
+ isSubtask?: boolean | undefined;
1199
+ cacheReadTokens?: number | undefined;
1200
+ cacheWriteTokens?: number | undefined;
1201
+ cost?: number | undefined;
1202
+ };
1203
+ }, {
1204
+ type: TelemetryEventName.LLM_COMPLETION;
1205
+ properties: {
1206
+ language: string;
1207
+ mode: string;
1208
+ appVersion: string;
1209
+ vscodeVersion: string;
1210
+ platform: string;
1211
+ editorName: string;
1212
+ inputTokens: number;
1213
+ outputTokens: number;
1214
+ 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;
1215
+ taskId?: string | undefined;
1216
+ modelId?: string | undefined;
1217
+ diffStrategy?: string | undefined;
1218
+ isSubtask?: boolean | undefined;
1219
+ cacheReadTokens?: number | undefined;
1220
+ cacheWriteTokens?: number | undefined;
1221
+ cost?: number | undefined;
1222
+ };
1223
+ }>]>;
1021
1224
 
1022
1225
  /**
1023
- * RooCodeAPI
1226
+ * RooCodeSettings
1024
1227
  */
1025
1228
  type RooCodeSettings = GlobalSettings & ProviderSettings;
1229
+ /**
1230
+ * RooCodeAPI
1231
+ */
1026
1232
  interface RooCodeAPI extends EventEmitter<RooCodeEvents> {
1027
1233
  /**
1028
1234
  * Starts a new task with an optional initial message and images.
@@ -1161,4 +1367,4 @@ interface RooCodeIpcServer extends EventEmitter<IpcServerEvents> {
1161
1367
  get isListening(): boolean;
1162
1368
  }
1163
1369
 
1164
- 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 };
1370
+ 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, rooCodeTelemetryEventSchema };
package/src/index.js CHANGED
@@ -22,7 +22,9 @@ var interface_exports = {};
22
22
  __export(interface_exports, {
23
23
  IpcMessageType: () => IpcMessageType,
24
24
  IpcOrigin: () => IpcOrigin,
25
- RooCodeEventName: () => RooCodeEventName
25
+ RooCodeEventName: () => RooCodeEventName,
26
+ providerNames: () => providerNames,
27
+ rooCodeTelemetryEventSchema: () => rooCodeTelemetryEventSchema
26
28
  });
27
29
  module.exports = __toCommonJS(interface_exports);
28
30
 
@@ -154,6 +156,7 @@ var modeConfigSchema = import_zod.z.object({
154
156
  slug: import_zod.z.string().regex(/^[a-zA-Z0-9-]+$/, "Slug must contain only letters numbers and dashes"),
155
157
  name: import_zod.z.string().min(1, "Name is required"),
156
158
  roleDefinition: import_zod.z.string().min(1, "Role definition is required"),
159
+ whenToUse: import_zod.z.string().optional(),
157
160
  customInstructions: import_zod.z.string().optional(),
158
161
  groups: groupEntryArraySchema,
159
162
  source: import_zod.z.enum(["global", "project"]).optional()
@@ -177,6 +180,7 @@ var customModesSettingsSchema = import_zod.z.object({
177
180
  });
178
181
  var promptComponentSchema = import_zod.z.object({
179
182
  roleDefinition: import_zod.z.string().optional(),
183
+ whenToUse: import_zod.z.string().optional(),
180
184
  customInstructions: import_zod.z.string().optional()
181
185
  });
182
186
  var customModePromptsSchema = import_zod.z.record(import_zod.z.string(), promptComponentSchema.optional());
@@ -203,9 +207,10 @@ var commandExecutionStatusSchema = import_zod.z.discriminatedUnion("status", [
203
207
  status: import_zod.z.literal("fallback")
204
208
  })
205
209
  ]);
206
- var experimentIds = ["powerSteering"];
210
+ var experimentIds = ["autoCondenseContext", "powerSteering"];
207
211
  var experimentIdsSchema = import_zod.z.enum(experimentIds);
208
212
  var experimentsSchema = import_zod.z.object({
213
+ autoCondenseContext: import_zod.z.boolean(),
209
214
  powerSteering: import_zod.z.boolean()
210
215
  });
211
216
  var providerSettingsEntrySchema = import_zod.z.object({
@@ -837,9 +842,72 @@ var ipcMessageSchema = import_zod.z.discriminatedUnion("type", [
837
842
  data: taskEventSchema
838
843
  })
839
844
  ]);
845
+ var appPropertiesSchema = import_zod.z.object({
846
+ appVersion: import_zod.z.string(),
847
+ vscodeVersion: import_zod.z.string(),
848
+ platform: import_zod.z.string(),
849
+ editorName: import_zod.z.string(),
850
+ language: import_zod.z.string(),
851
+ mode: import_zod.z.string()
852
+ });
853
+ var taskPropertiesSchema = import_zod.z.object({
854
+ taskId: import_zod.z.string().optional(),
855
+ apiProvider: import_zod.z.enum(providerNames).optional(),
856
+ modelId: import_zod.z.string().optional(),
857
+ diffStrategy: import_zod.z.string().optional(),
858
+ isSubtask: import_zod.z.boolean().optional()
859
+ });
860
+ var telemetryPropertiesSchema = import_zod.z.object({
861
+ ...appPropertiesSchema.shape,
862
+ ...taskPropertiesSchema.shape
863
+ });
864
+ var completionPropertiesSchema = import_zod.z.object({
865
+ inputTokens: import_zod.z.number(),
866
+ outputTokens: import_zod.z.number(),
867
+ cacheReadTokens: import_zod.z.number().optional(),
868
+ cacheWriteTokens: import_zod.z.number().optional(),
869
+ cost: import_zod.z.number().optional()
870
+ });
871
+ var rooCodeTelemetryEventSchema = import_zod.z.discriminatedUnion("type", [
872
+ import_zod.z.object({
873
+ type: import_zod.z.enum([
874
+ "Task Created" /* TASK_CREATED */,
875
+ "Task Reopened" /* TASK_RESTARTED */,
876
+ "Task Completed" /* TASK_COMPLETED */,
877
+ "Conversation Message" /* TASK_CONVERSATION_MESSAGE */,
878
+ "Mode Switched" /* MODE_SWITCH */,
879
+ "Tool Used" /* TOOL_USED */,
880
+ "Checkpoint Created" /* CHECKPOINT_CREATED */,
881
+ "Checkpoint Restored" /* CHECKPOINT_RESTORED */,
882
+ "Checkpoint Diffed" /* CHECKPOINT_DIFFED */,
883
+ "Code Action Used" /* CODE_ACTION_USED */,
884
+ "Prompt Enhanced" /* PROMPT_ENHANCED */,
885
+ "Title Button Clicked" /* TITLE_BUTTON_CLICKED */,
886
+ "Authentication Initiated" /* AUTHENTICATION_INITIATED */,
887
+ "Schema Validation Error" /* SCHEMA_VALIDATION_ERROR */,
888
+ "Diff Application Error" /* DIFF_APPLICATION_ERROR */,
889
+ "Shell Integration Error" /* SHELL_INTEGRATION_ERROR */,
890
+ "Consecutive Mistake Error" /* CONSECUTIVE_MISTAKE_ERROR */
891
+ ]),
892
+ properties: import_zod.z.object({
893
+ ...appPropertiesSchema.shape,
894
+ ...taskPropertiesSchema.shape
895
+ })
896
+ }),
897
+ import_zod.z.object({
898
+ type: import_zod.z.literal("LLM Completion" /* LLM_COMPLETION */),
899
+ properties: import_zod.z.object({
900
+ ...appPropertiesSchema.shape,
901
+ ...taskPropertiesSchema.shape,
902
+ ...completionPropertiesSchema.shape
903
+ })
904
+ })
905
+ ]);
840
906
  // Annotate the CommonJS export names for ESM import in node:
841
907
  0 && (module.exports = {
842
908
  IpcMessageType,
843
909
  IpcOrigin,
844
- RooCodeEventName
910
+ RooCodeEventName,
911
+ providerNames,
912
+ rooCodeTelemetryEventSchema
845
913
  });