Skip to content

feat: add Oh My Pi and Grok Build collectors - #4

Open
Tab-ome wants to merge 1 commit into
briqt:mainfrom
Tab-ome:feat/omp-grok-collectors
Open

feat: add Oh My Pi and Grok Build collectors#4
Tab-ome wants to merge 1 commit into
briqt:mainfrom
Tab-ome:feat/omp-grok-collectors

Conversation

@Tab-ome

@Tab-ome Tab-ome commented Sep 1, 2026

Copy link
Copy Markdown

Summary

  • add an Oh My Pi collector for exact assistant-message usage under ~/.omp/agent/sessions, including nested subagent transcripts
  • add a Grok Build collector for completed-turn usage under ~/.grok/sessions, with cache normalization, per-model attribution, API call counts, and server-reported cost conversion at 1e10 ticks per USD
  • handle very large Grok JSONL events without a fixed Scanner token limit
  • expose both sources in config, Docker examples, dashboard filters, and bilingual documentation

Accounting semantics

  • OMP input, cache read, cache write, output, and reasoning fields map directly to the repositories non-overlapping token model
  • Grok inputTokens includes cached input, so non-cached input is clamped after subtracting cachedReadTokens and cacheCreationTokens
  • incomplete or partial Grok costs are not trusted; normal pricing fallback remains available
  • source-prefixed session IDs and source-scoped dedup keys avoid collisions with Pi and other collectors

Validation

  • go test ./...
  • go vet ./...
  • git diff --check
  • real-format smoke scan against local OMP and Grok Build session trees
  • Linux ARM64 static build and Docker runtime version smoke

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants