Documentation
¶
Overview ¶
Package runlog records privacy-safe telemetry for commands launched through `wb run --`. The log lives inside a managed worktree so an agent can write it without access to the user's home directory and so lifecycle tooling can later publish or aggregate it with the worktree's other local evidence.
Index ¶
Constants ¶
const ( EventSchemaVersion = 1 OperationIDEnv = "WB_OPERATION_ID" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Event ¶
type Event struct {
SchemaVersion int `json:"schema_version"`
Timestamp time.Time `json:"timestamp"`
OperationID string `json:"operation_id"`
State string `json:"state"`
Kind string `json:"kind"`
ArgsSHA256 string `json:"args_sha256"`
ArgumentCount int `json:"argument_count"`
Repository string `json:"repository,omitempty"`
EffortID string `json:"effort_id,omitempty"`
RunID string `json:"run_id,omitempty"`
DurationMS int64 `json:"duration_ms,omitempty"`
UserCPUMS int64 `json:"user_cpu_ms,omitempty"`
SystemCPUMS int64 `json:"system_cpu_ms,omitempty"`
QueueWaitMS int64 `json:"queue_wait_ms,omitempty"`
CPUUnits int `json:"cpu_units,omitempty"`
ExitCode *int `json:"exit_code,omitempty"`
}
Event is one immutable command lifecycle observation. It deliberately omits raw arguments and output; ArgsSHA256 supports correlation without copying prompts, commit messages, paths, tokens, or source into the log.
type KindSummary ¶
type Recorder ¶
type Recorder struct {
OperationID string
Path string
StartedAt time.Time
// contains filtered or unexported fields
}
Recorder owns one operation ID and its optional managed-worktree log.
func Begin ¶
Begin records a requested operation when cwd belongs to a managed worktree. Unmanaged directories still get an operation ID but no filesystem side effect; WB can therefore wrap diagnostics outside a worktree safely.