From 263a7996ff4add9795d5ac6dbaabb136930a12c9 Mon Sep 17 00:00:00 2001 From: "kilo-maintainer[bot]" Date: Tue, 17 Feb 2026 17:09:50 +0000 Subject: [PATCH] chore: generate --- .../docs/non-agent-features/telemetry.md | 106 +++++++++--------- .../docs/opencode-migration-plan.md | 6 +- 2 files changed, 57 insertions(+), 55 deletions(-) diff --git a/packages/kilo-vscode/docs/non-agent-features/telemetry.md b/packages/kilo-vscode/docs/non-agent-features/telemetry.md index bfb4e5f5c34..91aec0ab37d 100644 --- a/packages/kilo-vscode/docs/non-agent-features/telemetry.md +++ b/packages/kilo-vscode/docs/non-agent-features/telemetry.md @@ -53,6 +53,7 @@ A single class that captures UI events from the extension host and webview, then ### 1.2 CLI-side: `kilo-telemetry` Package Already exists at `packages/kilo-telemetry/`. Handles: + - All PostHog communication (`posthog-node`) - OpenTelemetry integration for AI SDK spans - Identity management (machineId → email upgrade on auth) @@ -110,85 +111,85 @@ All events are defined in `TelemetryEventName` enum (`packages/types/src/telemet ### 3.1 Task Lifecycle -| Event | Properties | Capture Method | -|-------|-----------|-------------| -| `Task Created` | `taskId` | `captureTaskCreated()` | -| `Task Reopened` | `taskId` | `captureTaskRestarted()` | -| `Task Completed` | `taskId` | `captureTaskCompleted()` | +| Event | Properties | Capture Method | +| ---------------------- | ----------------------------------- | ------------------------------ | +| `Task Created` | `taskId` | `captureTaskCreated()` | +| `Task Reopened` | `taskId` | `captureTaskRestarted()` | +| `Task Completed` | `taskId` | `captureTaskCompleted()` | | `Conversation Message` | `taskId`, `source` (user/assistant) | `captureConversationMessage()` | ### 3.2 LLM & AI -| Event | Properties | -|-------|-----------| -| `LLM Completion` | `taskId`, `inputTokens`, `outputTokens`, `cacheWriteTokens`, `cacheReadTokens`, `cost`, `completionTime`, `inferenceProvider` | -| `Context Condensed` | `taskId`, `isAutomaticTrigger`, `usedCustomPrompt`, `usedCustomApiHandler` | -| `Sliding Window Truncation` | `taskId` | +| Event | Properties | +| --------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | +| `LLM Completion` | `taskId`, `inputTokens`, `outputTokens`, `cacheWriteTokens`, `cacheReadTokens`, `cost`, `completionTime`, `inferenceProvider` | +| `Context Condensed` | `taskId`, `isAutomaticTrigger`, `usedCustomPrompt`, `usedCustomApiHandler` | +| `Sliding Window Truncation` | `taskId` | ### 3.3 Tools & Modes -| Event | Properties | -|-------|-----------| -| `Tool Used` | `taskId`, `tool`, `toolProtocol` | -| `Mode Switched` | `taskId`, `newMode` | -| `Mode Setting Changed` | `settingName` | -| `Custom Mode Created` | `modeSlug`, `modeName` | -| `Code Action Used` | `actionType` | +| Event | Properties | +| ---------------------- | -------------------------------- | +| `Tool Used` | `taskId`, `tool`, `toolProtocol` | +| `Mode Switched` | `taskId`, `newMode` | +| `Mode Setting Changed` | `settingName` | +| `Custom Mode Created` | `modeSlug`, `modeName` | +| `Code Action Used` | `actionType` | ### 3.4 Checkpoints -| Event | Properties | -|-------|-----------| -| `Checkpoint Created` | `taskId` | -| `Checkpoint Restored` | `taskId` | -| `Checkpoint Diffed` | `taskId` | +| Event | Properties | +| --------------------- | ---------- | +| `Checkpoint Created` | `taskId` | +| `Checkpoint Restored` | `taskId` | +| `Checkpoint Diffed` | `taskId` | ### 3.5 UI Interactions -| Event | Properties | -|-------|-----------| -| `Tab Shown` | `tab` | -| `Title Button Clicked` | `button` | -| `Prompt Enhanced` | `taskId` (optional) | +| Event | Properties | +| ---------------------- | ------------------- | +| `Tab Shown` | `tab` | +| `Title Button Clicked` | `button` | +| `Prompt Enhanced` | `taskId` (optional) | ### 3.6 Marketplace -| Event | Properties | -|-------|-----------| +| Event | Properties | +| ---------------------------- | ------------------------------------------------------------ | | `Marketplace Item Installed` | `itemId`, `itemType`, `itemName`, `target`, additional props | -| `Marketplace Item Removed` | `itemId`, `itemType`, `itemName`, `target` | +| `Marketplace Item Removed` | `itemId`, `itemType`, `itemName`, `target` | ### 3.7 Account & Auth -| Event | Properties | -|-------|-----------| -| `Account Connect Clicked` | — | -| `Account Connect Success` | — | -| `Account Logout Clicked` | — | -| `Account Logout Success` | — | +| Event | Properties | +| ------------------------- | ---------- | +| `Account Connect Clicked` | — | +| `Account Connect Success` | — | +| `Account Logout Clicked` | — | +| `Account Logout Success` | — | ### 3.8 Error Tracking -| Event | Properties | -|-------|-----------| -| `Schema Validation Error` | `schemaName`, `error` (Zod formatted) | -| `Diff Application Error` | `taskId`, `consecutiveMistakeCount` | -| `Shell Integration Error` | `taskId` | -| `Consecutive Mistake Error` | `taskId` | +| Event | Properties | +| ----------------------------------- | --------------------------------------------------------------- | +| `Schema Validation Error` | `schemaName`, `error` (Zod formatted) | +| `Diff Application Error` | `taskId`, `consecutiveMistakeCount` | +| `Shell Integration Error` | `taskId` | +| `Consecutive Mistake Error` | `taskId` | | Exceptions via `captureException()` | Structured via `ApiProviderError` and `ConsecutiveMistakeError` | ### 3.9 Autocomplete (Kilo-specific) -| Event | Properties | -|-------|-----------| -| `Autocomplete Suggestion Requested` | `languageId`, `modelId`, `provider`, `autocompleteType` | -| `Autocomplete LLM Request Completed` | `latencyMs`, `cost`, `inputTokens`, `outputTokens`, context | -| `Autocomplete LLM Request Failed` | `latencyMs`, `error`, context | -| `Autocomplete LLM Suggestion Returned` | context, `suggestionLength` | -| `Autocomplete Suggestion Cache Hit` | `matchType`, `suggestionLength`, context | -| `Autocomplete Accept Suggestion` | `suggestionLength` | -| `Autocomplete Suggestion Filtered` | `reason`, context | -| `Autocomplete Unique Suggestion Shown` | context (only after 300ms visibility) | +| Event | Properties | +| -------------------------------------- | ----------------------------------------------------------- | +| `Autocomplete Suggestion Requested` | `languageId`, `modelId`, `provider`, `autocompleteType` | +| `Autocomplete LLM Request Completed` | `latencyMs`, `cost`, `inputTokens`, `outputTokens`, context | +| `Autocomplete LLM Request Failed` | `latencyMs`, `error`, context | +| `Autocomplete LLM Suggestion Returned` | context, `suggestionLength` | +| `Autocomplete Suggestion Cache Hit` | `matchType`, `suggestionLength`, context | +| `Autocomplete Accept Suggestion` | `suggestionLength` | +| `Autocomplete Suggestion Filtered` | `reason`, context | +| `Autocomplete Unique Suggestion Shown` | context (only after 300ms visibility) | ### 3.10 Other (Kilo-specific) @@ -363,6 +364,7 @@ The gateway already sends `X-KILOCODE-TASKID` (session ID) on every request, but If any telemetry events or properties are intentionally dropped, renamed, or have their semantics changed, the analytics team (Pedro) must be notified **before** the change ships. This allows analytics dashboards and queries to be updated in parallel. Checklist for schema changes: + - [ ] Document the change in this file - [ ] Create a GitHub issue tagged with `telemetry` - [ ] Notify @pedroheyerdahl in the PR description diff --git a/packages/kilo-vscode/docs/opencode-migration-plan.md b/packages/kilo-vscode/docs/opencode-migration-plan.md index c286de23502..2bc9f0df33c 100644 --- a/packages/kilo-vscode/docs/opencode-migration-plan.md +++ b/packages/kilo-vscode/docs/opencode-migration-plan.md @@ -95,9 +95,9 @@ The rebuild has a working foundation: | [Settings UI](non-agent-features/settings-ui.md) | 🔨 Partial | 15-tab settings shell exists. BrowserTab has real settings controls (enable/disable, system Chrome, headless toggles). LanguageTab has working locale selector. Remaining 13 tabs are stubs. [#170](https://github.com/Kilo-Org/kilo/issues/170) | CLI exposes config; extension provides settings forms | P1 | | [Skills System](non-agent-features/skills-system.md) | ❌ Not started | No skill discovery, management, or hot-reload in extension. | CLI has skills runtime; extension provides packaging/UI | P2 | | [Speech-to-Text](non-agent-features/speech-to-text.md) | ❌ Not started | No voice input or streaming STT. | Webview (mic capture); CLI-compatible STT optional | P3 | -| [Task History](non-agent-features/task-history.md) | 🔨 Partial | Session list exists but lacks search, metadata, and full persistence. [#167](https://github.com/Kilo-Org/kilo/issues/167) | CLI session storage; extension provides history UI | P1 | -| [Telemetry](non-agent-features/telemetry.md) | ❌ Not started | Dual-layer telemetry (PostHog Node server-side + PostHog JS client-side) for extension usage, errors, LLM completions, and AI interactions. Includes privacy controls, typed events, and structured error tracking. See detailed plan. | Extension-side (PostHog + kilo-telemetry) | P1 | -| [Terminal / Shell Integration](non-agent-features/terminal-shell-integration.md) | ❌ Not started | No VS Code terminal integration for command execution display, exit code tracking, or working directory changes. | CLI executes commands; extension provides terminal UX | P1 | +| [Task History](non-agent-features/task-history.md) | 🔨 Partial | Session list exists but lacks search, metadata, and full persistence. [#167](https://github.com/Kilo-Org/kilo/issues/167) | CLI session storage; extension provides history UI | P1 | +| [Telemetry](non-agent-features/telemetry.md) | ❌ Not started | Dual-layer telemetry (PostHog Node server-side + PostHog JS client-side) for extension usage, errors, LLM completions, and AI interactions. Includes privacy controls, typed events, and structured error tracking. See detailed plan. | Extension-side (PostHog + kilo-telemetry) | P1 | +| [Terminal / Shell Integration](non-agent-features/terminal-shell-integration.md) | ❌ Not started | No VS Code terminal integration for command execution display, exit code tracking, or working directory changes. | CLI executes commands; extension provides terminal UX | P1 | ---