{"_rev":"4-d4a94f48131b703152bbd6de9f3e8673","time":{"created":"2026-05-07T22:19:01.694Z","modified":"2026-05-07T22:19:02.119Z","0.1.0":"2026-04-30T18:22:43.360Z","0.1.1":"2026-04-30T18:29:55.901Z","0.1.2":"2026-05-07T22:19:01.965Z"},"_id":"@bulga138/taco-plugin","name":"@bulga138/taco-plugin","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.2":{"name":"@bulga138/taco-plugin","version":"0.1.2","description":"OpenCode plugin that captures raw telemetry for TACO benchmarking","type":"module","main":"./dist/index.js","exports":{".":"./dist/index.js"},"scripts":{"build":"tsc","typecheck":"tsc --noEmit","test":"bun test","dev":"tsc --watch"},"peerDependencies":{"@opencode-ai/plugin":"^1.14.29"},"dependencies":{"gpt-tokenizer":"^3.4.0","@lenml/tokenizer-claude":"3.7.2","@lenml/tokenizer-deepseek_v3":"3.7.2"},"devDependencies":{"@opencode-ai/plugin":"1.14.29","@opencode-ai/sdk":"1.14.29","@types/bun":"1.3.0","typescript":"6.0.3"},"engines":{"bun":">=1.0.0"},"keywords":["opencode","plugin","taco","telemetry","benchmark"],"license":"MIT","gitHead":"68a12b61a0ded5cdda4eb0b5392e80b8bbafbf67","types":"./dist/index.d.ts","_id":"@bulga138/taco-plugin@0.1.2","_nodeVersion":"22.14.0","_npmVersion":"11.7.0","dist":{"integrity":"sha512-hs31RIMSYi5zeHRwMizNBXheou2OmO8yAzTSGcrpJ7mWn89wsK/9NIN6z2W/qXewuZJzhsuBSnP8jNICdUgNJg==","shasum":"8d53dcdda51de3622469c6dc2e7869f9cf571872","tarball":"https://registry.npmjs.org/@bulga138/taco-plugin/-/taco-plugin-0.1.2.tgz","fileCount":50,"unpackedSize":156725,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC0W8kodtQ8QeWniiofBziiQqG50eir1bhkPX3nZuof3wIgCbUvx0iOLSzCZwKRthPWu5ZqCWh6tA/5cHGDaEZscqs="}]},"_npmUser":{"name":"bulga138","email":"bulga.sl@hotmail.com"},"directories":{},"maintainers":[{"name":"bulga138","email":"bulga.sl@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/taco-plugin_0.1.2_1778192341811_0.3646074338128782"},"_hasShrinkwrap":false}},"maintainers":[{"name":"bulga138","email":"bulga.sl@hotmail.com"}],"description":"OpenCode plugin that captures raw telemetry for TACO benchmarking","keywords":["opencode","plugin","taco","telemetry","benchmark"],"license":"MIT","readme":"# taco-plugin\n\nOpenCode plugin that captures raw telemetry for TACO benchmarking.\n\nCaptures per-turn, per-tool, and per-step metrics into a SQLite database. TACO CLI reads this database to show cache efficiency, tool I/O detail, retrieval relevance, latency breakdowns, and benchmark comparisons.\n\nZero configuration — runs entirely on Bun built-ins.\n\n## Usage\n\nRegister in `opencode.json`:\n\n```json\n{ \"plugin\": [\"taco-plugin\"] }\n```\n\nOr from a local path during development:\n\n```json\n{ \"plugin\": [\"/path/to/taco-plugin\"] }\n```\n\nThen run:\n\n```bash\nbun install && bun run build\n```\n\n## Hooks\n\nThe plugin registers 6 OpenCode hooks:\n\n| Hook                                   | Fires When               | Writes To                                                 |\n| -------------------------------------- | ------------------------ | --------------------------------------------------------- |\n| `chat.params`                          | Before each LLM request  | `chat_params`, `token_estimates`                          |\n| `experimental.chat.system.transform`   | System prompt assembled  | `system_prompts`                                          |\n| `experimental.chat.messages.transform` | Context window assembled | `context_snapshots`                                       |\n| `tool.execute.before`                  | Tool call starts         | `tool_calls` (partial)                                    |\n| `tool.execute.after`                   | Tool call completes      | `tool_calls` (update), `tool_latency_breakdown`           |\n| `event`                                | SSE stream events        | `step_metrics`, `streaming_timing`, `retrieval_relevance` |\n\n## Database\n\nLocation: `~/.local/share/taco/plugin.db`\n\nUses WAL mode for concurrent reads from TACO CLI while the plugin writes.\n\n### Schema (12 tables)\n\n- `meta` — schema version tracking\n- `chat_params` — LLM request params per turn\n- `system_prompts` — deduplicated system prompt snapshots\n- `context_snapshots` — context window composition per turn\n- `tool_calls` — full tool call data (input/output/timing)\n- `step_metrics` — per-step token data from SSE events\n- `streaming_timing` — streaming latency milestones\n- `token_estimates` — multi-approach token estimates\n- `retrieval_relevance` — how much tool output the model used\n- `tool_latency_breakdown` — per-phase latency for tool calls\n- `benchmark_tasks` — benchmark task definitions\n- `benchmark_runs` — aggregated results per (task, session, strategy)\n\n## Tokenizers\n\nPriority-based token counting:\n\n| Model                     | Package                        | Accuracy   |\n| ------------------------- | ------------------------------ | ---------- |\n| OpenAI (GPT-4o, o-series) | `gpt-tokenizer`                | Exact      |\n| Claude                    | `@lenml/tokenizer-claude`      | Near-exact |\n| DeepSeek                  | `@lenml/tokenizer-deepseek_v3` | Near-exact |\n| Everything else           | Byte-ratio fallback (~3.8)     | Heuristic  |\n\nReturns `{ count, method, warning? }` for honest UI.\n\n## Commands\n\n```bash\nbun run build      # Compile TypeScript\nbun test         # Run tests\nbun run typecheck # Check types\n```\n\n## Dependencies\n\nRuntime:\n\n- `gpt-tokenizer` — exact for OpenAI models\n- `@lenml/tokenizer-claude` — near-exact for Claude\n- `@lenml/tokenizer-deepseek_v3` — near-exact for DeepSeek\n\nPeer: `@opencode-ai/plugin >= 1.14.29`\n\n## License\n\nMIT\n","readmeFilename":"README.md"}