Documentation
¶
Overview ¶
Package export writes Caprock's normalized record out as a flat table.
Five agents write five undocumented formats — Claude Code JSONL and hooks, Codex rollouts, OpenCode's SQLite, Gemini's telemetry file, DeepSeek — and ingest turns all of them into the same rows. This package is the way back out: one stable, documented column set (docs/schema.md) per table, so a spreadsheet, a notebook or a warehouse reads every agent the same way.
It reads the database directly and read-only. That is what lets it run with the daemon down, and it is why it never writes: the export is a view of the record, not a second owner of it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( Tables = []string{"events", "sessions"} Formats = []string{"tsv", "csv", "jsonl"} Agents = []string{"claude", "codex", "opencode", "gemini", "deepseek"} )
Tables and formats the command accepts.
Functions ¶
func OpenReadOnly ¶
OpenReadOnly opens the database at path without the ability to write it. The path goes through a file: URI so a space (macOS "Application Support"), a '#' or a '?' cannot be read as part of the query string, and a Windows drive path is spelled the way SQLite's URI parser expects (file:///C:/…).
func ParseSince ¶
ParseSince reads "30d", "12h", "90m" (relative to now) or a date "2006-01-02" (midnight, local time).
Types ¶
type Options ¶
type Options struct {
Table string // "events" (default) or "sessions"
Format string // "tsv" (default), "csv" or "jsonl"
Since time.Time // zero: everything
Agent string // empty: every agent
Payload bool // events only, jsonl only: include the raw source payload
}
Options selects what is written.