Skip to content

Commit 3598e3c

Browse files
authored
Publish @roo-code/types v1.29.0 (#5084)
1 parent da8b09e commit 3598e3c

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

packages/types/npm/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@roo-code/types",
3-
"version": "1.28.0",
3+
"version": "1.29.0",
44
"description": "TypeScript type definitions for Roo Code.",
55
"publishConfig": {
66
"access": "public",

packages/types/src/telemetry.ts

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,25 @@ export const taskPropertiesSchema = z.object({
8989
isSubtask: z.boolean().optional(),
9090
})
9191

92+
export const gitPropertiesSchema = z.object({
93+
repositoryUrl: z.string().optional(),
94+
repositoryName: z.string().optional(),
95+
defaultBranch: z.string().optional(),
96+
})
97+
9298
export const telemetryPropertiesSchema = z.object({
9399
...appPropertiesSchema.shape,
94100
...taskPropertiesSchema.shape,
101+
...gitPropertiesSchema.shape,
102+
})
103+
104+
export const cloudTelemetryPropertiesSchema = z.object({
105+
...telemetryPropertiesSchema.shape,
95106
})
96107

97108
export type TelemetryProperties = z.infer<typeof telemetryPropertiesSchema>
109+
export type CloudTelemetryProperties = z.infer<typeof cloudTelemetryPropertiesSchema>
110+
export type GitProperties = z.infer<typeof gitPropertiesSchema>
98111

99112
/**
100113
* TelemetryEvent
@@ -148,20 +161,20 @@ export const rooCodeTelemetryEventSchema = z.discriminatedUnion("type", [
148161
TelemetryEventName.MODE_SETTINGS_CHANGED,
149162
TelemetryEventName.CUSTOM_MODE_CREATED,
150163
]),
151-
properties: telemetryPropertiesSchema,
164+
properties: cloudTelemetryPropertiesSchema,
152165
}),
153166
z.object({
154167
type: z.literal(TelemetryEventName.TASK_MESSAGE),
155168
properties: z.object({
156-
...telemetryPropertiesSchema.shape,
169+
...cloudTelemetryPropertiesSchema.shape,
157170
taskId: z.string(),
158171
message: clineMessageSchema,
159172
}),
160173
}),
161174
z.object({
162175
type: z.literal(TelemetryEventName.LLM_COMPLETION),
163176
properties: z.object({
164-
...telemetryPropertiesSchema.shape,
177+
...cloudTelemetryPropertiesSchema.shape,
165178
inputTokens: z.number(),
166179
outputTokens: z.number(),
167180
cacheReadTokens: z.number().optional(),
@@ -187,6 +200,7 @@ export type TelemetryEventSubscription =
187200

188201
export interface TelemetryPropertiesProvider {
189202
getTelemetryProperties(): Promise<TelemetryProperties>
203+
getCloudTelemetryProperties?(): Promise<CloudTelemetryProperties>
190204
}
191205

192206
/**

0 commit comments

Comments
 (0)