Publish @roo-code/types v1.29.0 (#5084)

This commit is contained in:
Chris Estreich 2025-06-24 16:31:50 -07:00 committed by GitHub
parent da8b09e655
commit 3598e3c877
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 18 additions and 4 deletions

View file

@ -1,6 +1,6 @@
{
"name": "@roo-code/types",
"version": "1.28.0",
"version": "1.29.0",
"description": "TypeScript type definitions for Roo Code.",
"publishConfig": {
"access": "public",

View file

@ -89,12 +89,25 @@ export const taskPropertiesSchema = z.object({
isSubtask: z.boolean().optional(),
})
export const gitPropertiesSchema = z.object({
repositoryUrl: z.string().optional(),
repositoryName: z.string().optional(),
defaultBranch: z.string().optional(),
})
export const telemetryPropertiesSchema = z.object({
...appPropertiesSchema.shape,
...taskPropertiesSchema.shape,
...gitPropertiesSchema.shape,
})
export const cloudTelemetryPropertiesSchema = z.object({
...telemetryPropertiesSchema.shape,
})
export type TelemetryProperties = z.infer<typeof telemetryPropertiesSchema>
export type CloudTelemetryProperties = z.infer<typeof cloudTelemetryPropertiesSchema>
export type GitProperties = z.infer<typeof gitPropertiesSchema>
/**
* TelemetryEvent
@ -148,12 +161,12 @@ export const rooCodeTelemetryEventSchema = z.discriminatedUnion("type", [
TelemetryEventName.MODE_SETTINGS_CHANGED,
TelemetryEventName.CUSTOM_MODE_CREATED,
]),
properties: telemetryPropertiesSchema,
properties: cloudTelemetryPropertiesSchema,
}),
z.object({
type: z.literal(TelemetryEventName.TASK_MESSAGE),
properties: z.object({
...telemetryPropertiesSchema.shape,
...cloudTelemetryPropertiesSchema.shape,
taskId: z.string(),
message: clineMessageSchema,
}),
@ -161,7 +174,7 @@ export const rooCodeTelemetryEventSchema = z.discriminatedUnion("type", [
z.object({
type: z.literal(TelemetryEventName.LLM_COMPLETION),
properties: z.object({
...telemetryPropertiesSchema.shape,
...cloudTelemetryPropertiesSchema.shape,
inputTokens: z.number(),
outputTokens: z.number(),
cacheReadTokens: z.number().optional(),
@ -187,6 +200,7 @@ export type TelemetryEventSubscription =
export interface TelemetryPropertiesProvider {
getTelemetryProperties(): Promise<TelemetryProperties>
getCloudTelemetryProperties?(): Promise<CloudTelemetryProperties>
}
/**