Skip to content

Commit 8d68825

Browse files
committed
Publish @roo-code/types v1.29.0
1 parent ba5033e commit 8d68825

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
@@ -78,12 +78,25 @@ export const taskPropertiesSchema = z.object({
7878
isSubtask: z.boolean().optional(),
7979
})
8080

81+
export const gitPropertiesSchema = z.object({
82+
repositoryUrl: z.string().optional(),
83+
repositoryName: z.string().optional(),
84+
defaultBranch: z.string().optional(),
85+
})
86+
8187
export const telemetryPropertiesSchema = z.object({
8288
...appPropertiesSchema.shape,
8389
...taskPropertiesSchema.shape,
90+
...gitPropertiesSchema.shape,
91+
})
92+
93+
export const cloudTelemetryPropertiesSchema = z.object({
94+
...telemetryPropertiesSchema.shape,
8495
})
8596

8697
export type TelemetryProperties = z.infer<typeof telemetryPropertiesSchema>
98+
export type CloudTelemetryProperties = z.infer<typeof cloudTelemetryPropertiesSchema>
99+
export type GitProperties = z.infer<typeof gitPropertiesSchema>
87100

88101
/**
89102
* TelemetryEvent
@@ -127,20 +140,20 @@ export const rooCodeTelemetryEventSchema = z.discriminatedUnion("type", [
127140
TelemetryEventName.MODE_SETTINGS_CHANGED,
128141
TelemetryEventName.CUSTOM_MODE_CREATED,
129142
]),
130-
properties: telemetryPropertiesSchema,
143+
properties: cloudTelemetryPropertiesSchema,
131144
}),
132145
z.object({
133146
type: z.literal(TelemetryEventName.TASK_MESSAGE),
134147
properties: z.object({
135-
...telemetryPropertiesSchema.shape,
148+
...cloudTelemetryPropertiesSchema.shape,
136149
taskId: z.string(),
137150
message: clineMessageSchema,
138151
}),
139152
}),
140153
z.object({
141154
type: z.literal(TelemetryEventName.LLM_COMPLETION),
142155
properties: z.object({
143-
...telemetryPropertiesSchema.shape,
156+
...cloudTelemetryPropertiesSchema.shape,
144157
inputTokens: z.number(),
145158
outputTokens: z.number(),
146159
cacheReadTokens: z.number().optional(),
@@ -166,6 +179,7 @@ export type TelemetryEventSubscription =
166179

167180
export interface TelemetryPropertiesProvider {
168181
getTelemetryProperties(): Promise<TelemetryProperties>
182+
getCloudTelemetryProperties?(): Promise<CloudTelemetryProperties>
169183
}
170184

171185
/**

0 commit comments

Comments
 (0)