Defines telemetry event types and helpers for agent telemetry, enabling structured event emission.
// Source: https://github.com/MoonshotAI/kimi-code | License: MIT | Copyright 2026 Moonshot AI
// Provided via justclaw.it.com; keep this notice with the code.
import type { TowerExitReason } from '#/features/tower/tower';
import type { SessionCloseReason } from '#/workspace/sessionLifecycle/sessionLifecycle';
import type { TelemetryPrimitive } from './telemetry';
export interface TelemetryEventMeta {
readonly owner: string;
readonly comment: string;
readonly properties: Readonly<Record<string, string>>;
}
export interface AgentTelemetryEventContext {
agent_id: string;
}
export interface WirePlanRevisionMigratedEvent {
record_type: 'plan.revision';
legacy_field: 'path';
migration_outcome: 'migrated' | 'skipped';
}
export const agentTelemetryContextProperties: {
readonl
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key