Documentation
¶
Overview ¶
Package messagecounts counts the messages of a Claude Code or Codex transcript the way the previous runtime's timeline/message-counts route did: user, assistant and tool messages, and the tools by name.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllowedJsonl ¶
AllowedJsonl: a .jsonl under Claude Code's projects or Codex's sessions in the home, the path resolved first.
Types ¶
type Counts ¶
Counts is the answer. Breakdown values are numbers, or strings where a tool is named after a property every JavaScript object inherits (the previous runtime added 1 to the inherited function).
type Route ¶
type Route struct {
// Home holds the transcripts the route may read (.claude/projects and .codex/sessions under it).
Home string
// Authorized is the old API's own check: a page session or the cli-token.
Authorized func(*http.Request) bool
// contains filtered or unexported fields
}
Route answers GET /api/timeline/message-counts?jsonlPath=. A transcript only grows, so each file's count is kept with the offset it reached, and a request reads only what was appended since; a file that shrank, was replaced or whose start changed is counted again from the start.