Documentation
¶
Index ¶
Constants ¶
View Source
const FileName = "context-trace.jsonl"
FileName is the canonical name for the context-trace artifact.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Event ¶
type Event struct {
Type EventType `json:"type"`
Timestamp string `json:"ts"`
Source SourceType `json:"source"`
// provided: what was loaded
Team string `json:"team,omitempty"`
Doc string `json:"doc,omitempty"`
Docs []string `json:"docs,omitempty"`
Section string `json:"section,omitempty"`
InlineTokens int `json:"inline_tokens,omitempty"`
ReadOnDemand bool `json:"read_on_demand,omitempty"`
// whisper fields (team-whisper, project-whisper)
From string `json:"from,omitempty"`
Topic string `json:"topic,omitempty"`
// influenced: what mattered
Decision string `json:"decision,omitempty"`
PlanStep int `json:"plan_step,omitempty"`
}
Event is a single context-trace entry.
func ReadEvents ¶
ReadEvents reads all events from a context-trace.jsonl file. Malformed lines are skipped. Returns nil, nil for a missing file.
type EventType ¶
type EventType string
EventType distinguishes what kind of context-trace event this is.
type SourceType ¶
type SourceType string
SourceType identifies where the context came from.
const ( SourceTeamContext SourceType = "team-context" SourceTeamMemory SourceType = "team-memory" SourceTeamDocs SourceType = "team-docs" SourceProjectConfig SourceType = "project-config" SourceTeamWhisper SourceType = "team-whisper" SourceProjectWhisper SourceType = "project-whisper" SourceOnDemand SourceType = "on-demand" )
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
Writer appends events to a context-trace.jsonl file.
func NewWriter ¶
NewWriter creates a Writer that appends to context-trace.jsonl in the given session dir.
Click to show internal directories.
Click to hide internal directories.