Documentation
¶
Index ¶
- func BlameFile(db *sql.DB, runID, filePath string, out io.Writer) error
- func BlameFileJSON(db *sql.DB, runID, filePath string, out io.Writer) error
- func DiffFile(db *sql.DB, runID, filePath string, out io.Writer) error
- func DiffFileJSON(db *sql.DB, runID, filePath string, out io.Writer) error
- func Explain(db *sql.DB, opts ExplainOptions, out io.Writer) error
- func GraphLens(db *sql.DB, opts GraphLensOptions, out io.Writer) error
- func GraphLensJSON(db *sql.DB, opts GraphLensOptions, out io.Writer) error
- func HarvestTranscript(store ObjectStore, db *sql.DB, runID, path string) (int, error)
- func Log(db *sql.DB, runID string, out io.Writer) error
- func MaterializeLLMCalls(store ObjectStore, db *sql.DB, runID string) (int, error)
- func Objects(db *sql.DB, runID string, out io.Writer) error
- func ObjectsJSON(db *sql.DB, runID string, out io.Writer) error
- func ObjectsPage(db *sql.DB, opts ObjectListOptions, out io.Writer) error
- func ObjectsPageJSON(db *sql.DB, opts ObjectListOptions, out io.Writer) error
- func PrintBlameFile(out io.Writer, manifest FileBlameManifest)
- func PrintDiffFile(out io.Writer, manifest FileDiffManifest)
- func PrintExplainManifest(out io.Writer, manifest ExplainManifest) error
- func PrintExplainManifestJSON(out io.Writer, manifest ExplainManifest) error
- func PrintGraphLensManifest(out io.Writer, manifest GraphLensManifest) error
- func PrintGraphLensManifestJSON(out io.Writer, manifest GraphLensManifest) error
- func PrintMaterializeResult(out io.Writer, result MaterializeResult)
- func PrintReplayManifest(out io.Writer, manifest ReplayManifest)
- func PrintReplayManifestJSON(out io.Writer, manifest ReplayManifest) error
- func PrintTimeline(db *sql.DB, opts TimelineOptions, out io.Writer) error
- func PrintTimelineCausality(manifest TimelineManifest, out io.Writer) error
- func PrintTimelineJSON(db *sql.DB, opts TimelineOptions, out io.Writer) error
- func PrintTimelineManifest(manifest TimelineManifest, out io.Writer) error
- func PrintTrajectoryManifest(out io.Writer, manifest TrajectoryManifest)
- func PrintVerifyResult(out io.Writer, result VerifyResult)
- func PrintVerifyResultJSON(out io.Writer, result VerifyResult) error
- func Refs(db *sql.DB, runID string, out io.Writer) error
- func ReplayAttempt(db *sql.DB, attemptID string, out io.Writer) error
- func ReplayAttemptJSON(db *sql.DB, attemptID string, out io.Writer) error
- func ReplayRun(db *sql.DB, runID string, out io.Writer) error
- func ReplayRunJSON(db *sql.DB, runID string, out io.Writer) error
- func TraceArtifact(db *sql.DB, artifactRef string, out io.Writer) error
- func TraceAttempt(db *sql.DB, attemptID string, out io.Writer) error
- func TraceProcess(db *sql.DB, processID string, out io.Writer) error
- func TraceRun(db *sql.DB, runID string, out io.Writer) error
- func TraceToolCall(db *sql.DB, toolCallID string, out io.Writer) error
- func TrajectoriesRun(db *sql.DB, runID string, out io.Writer) error
- func TrajectoriesRunJSON(db *sql.DB, runID string, out io.Writer) error
- func VerifyRun(db *sql.DB, runID string, out io.Writer) error
- func VerifyRunJSON(db *sql.DB, runID string, out io.Writer) error
- type ArtifactState
- type ExecutionScope
- type ExplainEvent
- type ExplainEvidence
- type ExplainGraphEdge
- type ExplainManifest
- type ExplainObjectRef
- type ExplainOptions
- type ExplainProcessObservation
- type ExplainQuery
- type ExplainReplayRef
- type ExplainResponseAction
- type ExplainRisk
- type ExplainTarget
- type ExplainTelemetryBatch
- type ExternalObjectInput
- type ExternalObjectResult
- type FileBlameEntry
- type FileBlameManifest
- type FileChangeSummary
- type FileDiffAttempt
- type FileDiffManifest
- type GraphLensEdge
- type GraphLensManifest
- type GraphLensNode
- type GraphLensOptions
- type GraphLensOverlay
- type GraphLensQuery
- type MaterializeResult
- type ObjectListManifest
- type ObjectListOptions
- type ObjectRef
- type ObjectStore
- type RecordBatchItem
- type RecordBatchManifest
- type RecordBatchSummaryManifest
- type RecordManifest
- type RecordObservedProcess
- type ReplayArtifactDigest
- type ReplayAttemptPlan
- type ReplayEvent
- type ReplayExternalEffect
- type ReplayManifest
- type ReplayProcess
- type ReplayRollout
- type ReplaySnapshot
- type ReplayToolCall
- type TimelineEvent
- type TimelineFilter
- type TimelineManifest
- type TimelineOptions
- type TimelineSummary
- type Trajectory
- type TrajectoryEvidence
- type TrajectoryFileChange
- type TrajectoryManifest
- type TrajectoryRollout
- type VerifyIssue
- type VerifyResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GraphLensJSON ¶ added in v0.4.0
func HarvestTranscript ¶ added in v0.6.0
HarvestTranscript ingests a Claude Code session transcript (the JSONL file a hook's stdin points at via `transcript_path`) into the same llm_call graph model that TLS capture feeds -- so the agent-intent 4-stage flow renders the model's real prompt, reasoning, and tool decisions with ZERO instrumentation and on any platform (no eBPF/TLS needed). This is the cognitive-intent axis the contract-vs-effect diff deliberately cannot capture: what the model was asked, what it reasoned, and what it decided to do.
Each user→assistant turn becomes: an llm_message request object (the prompt), an llm_message response object (the assistant's reasoning + decided tools), an llm_call node linking them, and llm_caused edges to the syscalls the decided shell commands actually ran. Idempotent per run.
func MaterializeLLMCalls ¶ added in v0.6.0
MaterializeLLMCalls turns the captured LLM traffic into verifiable evidence: each reassembled tls_write/tls_read body (when full capture is on) is stored as a content-addressed `llm_message` object, and every paired request/response (from the ingest-time `llm_call` edge) becomes a first-class `llm_call` node that references the model's actual prompt and completion. Idempotent. Returns the number of llm_call nodes built.
func ObjectsPage ¶
func ObjectsPageJSON ¶
func PrintBlameFile ¶
func PrintBlameFile(out io.Writer, manifest FileBlameManifest)
func PrintDiffFile ¶
func PrintDiffFile(out io.Writer, manifest FileDiffManifest)
func PrintExplainManifest ¶
func PrintExplainManifest(out io.Writer, manifest ExplainManifest) error
func PrintExplainManifestJSON ¶
func PrintExplainManifestJSON(out io.Writer, manifest ExplainManifest) error
func PrintGraphLensManifest ¶ added in v0.4.0
func PrintGraphLensManifest(out io.Writer, manifest GraphLensManifest) error
func PrintGraphLensManifestJSON ¶ added in v0.4.0
func PrintGraphLensManifestJSON(out io.Writer, manifest GraphLensManifest) error
func PrintMaterializeResult ¶
func PrintMaterializeResult(out io.Writer, result MaterializeResult)
func PrintReplayManifest ¶
func PrintReplayManifest(out io.Writer, manifest ReplayManifest)
func PrintReplayManifestJSON ¶
func PrintReplayManifestJSON(out io.Writer, manifest ReplayManifest) error
func PrintTimeline ¶
func PrintTimelineCausality ¶
func PrintTimelineCausality(manifest TimelineManifest, out io.Writer) error
func PrintTimelineJSON ¶
func PrintTimelineManifest ¶
func PrintTimelineManifest(manifest TimelineManifest, out io.Writer) error
func PrintTrajectoryManifest ¶
func PrintTrajectoryManifest(out io.Writer, manifest TrajectoryManifest)
func PrintVerifyResult ¶
func PrintVerifyResult(out io.Writer, result VerifyResult)
func PrintVerifyResultJSON ¶
func PrintVerifyResultJSON(out io.Writer, result VerifyResult) error
Types ¶
type ArtifactState ¶ added in v0.7.0
type ExecutionScope ¶ added in v0.7.0
type ExecutionScope struct {
ID string `json:"execution_scope_id"`
RunID string `json:"run_id,omitempty"`
TrajectoryID string `json:"trajectory_id,omitempty"`
BaseStateID string `json:"base_state_id,omitempty"`
ToolCallID string `json:"tool_call_id,omitempty"`
SubstrateScopeID string `json:"substrate_scope_id,omitempty"`
Status string `json:"status,omitempty"`
RiskStatus string `json:"risk_status,omitempty"`
}
Domain terms used by public APIs and documentation.
The SQLite schema still contains older table/column names such as rollouts/fork_attempts/sessions/snapshots. Those names are treated as storage compatibility details. New code should prefer these domain terms at API and UI boundaries, then map to the physical schema in repository/query code.
func ExecutionScopeFromStorage ¶ added in v0.7.0
func ExecutionScopeFromStorage(runID, trajectoryID, baseStateID, executionScopeID, substrateScopeID, toolCallID, status, riskStatus string) ExecutionScope
type ExplainEvent ¶
type ExplainEvent struct {
ID string `json:"id"`
RunID string `json:"run_id"`
SessionID string `json:"session_id"`
ToolCallID string `json:"tool_call_id"`
ProcessID string `json:"process_id"`
SnapshotID string `json:"snapshot_id"`
Lane string `json:"lane,omitempty"`
CorrelationStatus string `json:"correlation_status,omitempty"`
RawEventID string `json:"raw_event_id"`
CorrelationMethod string `json:"correlation_method"`
CorrelationConfidence float64 `json:"correlation_confidence"`
ContainerID string `json:"container_id"`
CgroupID string `json:"cgroup_id"`
PID int64 `json:"pid"`
TGID int64 `json:"tgid"`
PPID int64 `json:"ppid"`
Source string `json:"source"`
EventType string `json:"event_type"`
Payload string `json:"payload"`
CreatedAt string `json:"created_at"`
Telemetry *telemetry.EventExplanation `json:"telemetry,omitempty"`
Drilldowns []string `json:"drilldowns,omitempty"`
}
type ExplainEvidence ¶
type ExplainEvidence struct {
ID string `json:"id"`
RunID string `json:"run_id"`
RolloutID string `json:"rollout_id"`
AttemptID string `json:"attempt_id"`
SessionID string `json:"session_id"`
ToolCallID string `json:"tool_call_id"`
ProcessID string `json:"process_id,omitempty"`
SnapshotID string `json:"snapshot_id"`
EventType string `json:"event_type"`
Priority string `json:"priority"`
Status string `json:"status"`
Payload string `json:"payload"`
CreatedAt string `json:"created_at"`
ProcessedAt string `json:"processed_at"`
}
type ExplainGraphEdge ¶
type ExplainManifest ¶
type ExplainManifest struct {
SchemaVersion string `json:"schema_version"`
Target ExplainTarget `json:"target"`
Query ExplainQuery `json:"query"`
Summary []string `json:"summary"`
Upstream []ExplainGraphEdge `json:"upstream,omitempty"`
Downstream []ExplainGraphEdge `json:"downstream,omitempty"`
CausalityPath []ExplainGraphEdge `json:"causality_path,omitempty"`
Evidence []ExplainEvidence `json:"evidence,omitempty"`
Objects []ExplainObjectRef `json:"objects,omitempty"`
Risks []ExplainRisk `json:"risks,omitempty"`
Responses []ExplainResponseAction `json:"responses,omitempty"`
ReplayRefs []ExplainReplayRef `json:"replay_refs,omitempty"`
ProcessObs []ExplainProcessObservation `json:"process_observations,omitempty"`
TelemetryBatches []ExplainTelemetryBatch `json:"telemetry_batches,omitempty"`
RuntimeEdges []ExplainGraphEdge `json:"runtime_edges,omitempty"`
RuntimeEvents []ExplainEvent `json:"runtime_events,omitempty"`
FileDiff *FileDiffManifest `json:"file_diff,omitempty"`
FileBlame *FileBlameManifest `json:"file_blame,omitempty"`
}
func BuildExplain ¶
func BuildExplain(db *sql.DB, opts ExplainOptions) (ExplainManifest, error)
type ExplainObjectRef ¶
type ExplainObjectRef struct {
Hash string `json:"hash"`
Type string `json:"type"`
SourceID string `json:"source_id"`
RunID string `json:"run_id"`
RolloutID string `json:"rollout_id"`
ParentHashes string `json:"parent_hashes"`
Path string `json:"path"`
SizeBytes int64 `json:"size_bytes"`
CreatedAt string `json:"created_at"`
}
type ExplainOptions ¶
type ExplainProcessObservation ¶
type ExplainProcessObservation struct {
PID int64 `json:"pid"`
PPID int64 `json:"ppid"`
Command string `json:"command"`
FirstSeen string `json:"first_seen"`
LastSeen string `json:"last_seen"`
OutlivedRoot bool `json:"outlived_root"`
Boundary string `json:"boundary"`
OrphanPolicy string `json:"orphan_policy"`
SourceEventID string `json:"source_event_id"`
ProcessID string `json:"process_id"`
ToolCallID string `json:"tool_call_id"`
EvidenceIDs []string `json:"evidence_ids,omitempty"`
PolicyDecisionIDs []string `json:"policy_decision_ids,omitempty"`
}
type ExplainQuery ¶
type ExplainQuery struct {
Depth int `json:"depth"`
Limit int `json:"limit"`
Cursor string `json:"cursor,omitempty"`
NextCursor string `json:"next_cursor,omitempty"`
ResultSetID string `json:"result_set_id,omitempty"`
PageHash string `json:"page_hash,omitempty"`
Truncated bool `json:"truncated"`
EdgeCount int `json:"edge_count"`
NodeCount int `json:"node_count"`
FrontierHit bool `json:"frontier_hit"`
}
type ExplainReplayRef ¶
type ExplainResponseAction ¶
type ExplainResponseAction struct {
ID string `json:"id"`
RunID string `json:"run_id"`
SessionID string `json:"session_id"`
ProcessID string `json:"process_id"`
SnapshotID string `json:"snapshot_id"`
RiskSignalID string `json:"risk_signal_id"`
PolicyDecisionID string `json:"policy_decision_id"`
ActionType string `json:"action_type"`
TargetType string `json:"target_type"`
TargetID string `json:"target_id"`
Status string `json:"status"`
ResultRef string `json:"result_ref"`
Payload string `json:"payload"`
CreatedAt string `json:"created_at"`
}
type ExplainRisk ¶
type ExplainTarget ¶
type ExplainTelemetryBatch ¶
type ExplainTelemetryBatch struct {
ID string `json:"id"`
RunID string `json:"run_id"`
Format string `json:"format"`
Path string `json:"path"`
FileSHA256 string `json:"file_sha256"`
Read int `json:"read"`
Ingested int `json:"ingested"`
Skipped int `json:"skipped"`
Failed int `json:"failed"`
EventIDs []string `json:"event_ids"`
EventIDsSHA256 string `json:"event_ids_sha256"`
CreatedAt string `json:"created_at"`
}
type ExternalObjectInput ¶
type ExternalObjectResult ¶
type FileBlameEntry ¶
type FileBlameEntry struct {
File string `json:"file"`
AttemptID string `json:"attempt_id"`
RolloutID string `json:"rollout_id"`
ToolCallID string `json:"tool_call_id"`
SnapshotID string `json:"snapshot_id"`
IsWinner bool `json:"is_winner"`
Changed bool `json:"changed"`
Reason string `json:"reason"`
SHA256 string `json:"sha256"`
Status string `json:"status"`
Strategy string `json:"strategy"`
Command string `json:"command"`
ArtifactRef string `json:"artifact_ref,omitempty"`
WorkspacePath string `json:"workspace_path"`
}
type FileBlameManifest ¶
type FileBlameManifest struct {
SchemaVersion string `json:"schema_version"`
RunID string `json:"run_id"`
File string `json:"file"`
BaseSnapshotID string `json:"base_snapshot_id"`
BaseSHA256 string `json:"base_sha256"`
Entries []FileBlameEntry `json:"entries"`
}
func BuildBlameFile ¶
func BuildBlameFile(db *sql.DB, runID, filePath string) (FileBlameManifest, error)
type FileChangeSummary ¶
type FileDiffAttempt ¶
type FileDiffAttempt struct {
AttemptID string `json:"attempt_id"`
RolloutID string `json:"rollout_id"`
ToolCallID string `json:"tool_call_id"`
SnapshotID string `json:"snapshot_id"`
WorkspacePath string `json:"workspace_path"`
Strategy string `json:"strategy"`
Command string `json:"command"`
Status string `json:"status"`
IsWinner bool `json:"is_winner"`
ArtifactRef string `json:"artifact_ref,omitempty"`
Changed bool `json:"changed"`
FileExists bool `json:"file_exists"`
FileSHA256 string `json:"file_sha256"`
UnifiedDiff []string `json:"unified_diff,omitempty"`
}
type FileDiffManifest ¶
type FileDiffManifest struct {
SchemaVersion string `json:"schema_version"`
RunID string `json:"run_id"`
File string `json:"file"`
BaseSnapshotID string `json:"base_snapshot_id"`
BasePath string `json:"base_path"`
BaseExists bool `json:"base_exists"`
BaseSHA256 string `json:"base_sha256"`
Attempts []FileDiffAttempt `json:"attempts"`
}
func BuildDiffFile ¶
func BuildDiffFile(db *sql.DB, runID, filePath string) (FileDiffManifest, error)
type GraphLensEdge ¶ added in v0.4.0
type GraphLensEdge struct {
ID string `json:"id,omitempty"`
FromID string `json:"from_id"`
ToID string `json:"to_id"`
EdgeType string `json:"edge_type"`
SourceEventID string `json:"source_event_id,omitempty"`
CreatedAt string `json:"created_at,omitempty"`
Derived bool `json:"derived"`
DerivationRule string `json:"derivation_rule,omitempty"`
Confidence float64 `json:"confidence,omitempty"`
EvidenceRefs []string `json:"evidence_refs,omitempty"`
Data map[string]any `json:"data,omitempty"`
}
type GraphLensManifest ¶ added in v0.4.0
type GraphLensManifest struct {
SchemaVersion string `json:"schema_version"`
RunID string `json:"run_id"`
Lens string `json:"lens"`
AvailableLenses []string `json:"available_lenses"`
Query GraphLensQuery `json:"query"`
Summary []string `json:"summary"`
Nodes []GraphLensNode `json:"nodes"`
Edges []GraphLensEdge `json:"edges"`
DerivedEdges []GraphLensEdge `json:"derived_edges,omitempty"`
Overlays []GraphLensOverlay `json:"overlays,omitempty"`
}
func BuildGraphLens ¶ added in v0.4.0
func BuildGraphLens(db *sql.DB, opts GraphLensOptions) (GraphLensManifest, error)
type GraphLensNode ¶ added in v0.4.0
type GraphLensOptions ¶ added in v0.4.0
type GraphLensOverlay ¶ added in v0.4.0
type GraphLensQuery ¶ added in v0.4.0
type GraphLensQuery struct {
Focus string `json:"focus,omitempty"`
Overlays []string `json:"overlays,omitempty"`
Limit int `json:"limit"`
Detail string `json:"detail"`
Truncated bool `json:"truncated"`
NodeCount int `json:"node_count"`
EdgeCount int `json:"edge_count"`
Derived int `json:"derived_edge_count"`
RawEventCount int `json:"raw_event_count"`
OmittedNodes int `json:"omitted_nodes,omitempty"`
OmittedEdges int `json:"omitted_edges,omitempty"`
LensRules []string `json:"lens_rules"`
LayoutHint string `json:"layout_hint"`
}
type MaterializeResult ¶
type ObjectListManifest ¶
type ObjectListManifest struct {
SchemaVersion string `json:"schema_version"`
RunID string `json:"run_id"`
Limit int `json:"limit"`
Cursor string `json:"cursor,omitempty"`
NextCursor string `json:"next_cursor,omitempty"`
HasMore bool `json:"has_more"`
ResultSetID string `json:"result_set_id"`
PageHash string `json:"page_hash"`
ObjectCount int `json:"object_count"`
Objects []ObjectRef `json:"objects"`
}
func ListObjects ¶
func ListObjects(db *sql.DB, runID string) (ObjectListManifest, error)
func ListObjectsPage ¶
func ListObjectsPage(db *sql.DB, opts ObjectListOptions) (ObjectListManifest, error)
type ObjectListOptions ¶
type ObjectRef ¶
type ObjectRef struct {
Hash string `json:"hash"`
Type string `json:"type"`
SourceID string `json:"source_id"`
RunID string `json:"run_id"`
RolloutID string `json:"rollout_id"`
ParentHashes string `json:"parent_hashes"`
Path string `json:"path"`
SizeBytes int64 `json:"size_bytes"`
CreatedAt string `json:"created_at"`
}
type ObjectStore ¶
func (ObjectStore) MaterializeRun ¶
func (s ObjectStore) MaterializeRun(runID string) (MaterializeResult, error)
func (ObjectStore) PutExternalObject ¶
func (s ObjectStore) PutExternalObject(input ExternalObjectInput) (ExternalObjectResult, error)
type RecordBatchItem ¶
type RecordBatchItem struct {
Index int `json:"index"`
JobID string `json:"job_id,omitempty"`
ShardID string `json:"shard_id,omitempty"`
RunID string `json:"run_id,omitempty"`
AttemptID string `json:"attempt_id,omitempty"`
ToolCallID string `json:"tool_call_id,omitempty"`
ProcessID string `json:"process_id,omitempty"`
Workdir string `json:"workdir,omitempty"`
Command string `json:"command,omitempty"`
Status string `json:"status"`
ExitCode int `json:"exit_code"`
WallMS int64 `json:"wall_ms"`
ChangedFileCount int `json:"changed_file_count"`
ChangedFiles []string `json:"changed_files,omitempty"`
Error string `json:"error,omitempty"`
EvidenceManifestCommand string `json:"evidence_manifest_command,omitempty"`
EvalContextCommand string `json:"eval_context_command,omitempty"`
ExplainCommand string `json:"explain_command,omitempty"`
}
type RecordBatchManifest ¶
type RecordBatchManifest struct {
SchemaVersion string `json:"schema_version"`
BatchID string `json:"batch_id"`
InputSHA256 string `json:"input_sha256"`
StartedAt string `json:"started_at"`
EndedAt string `json:"ended_at"`
JobCount int `json:"job_count"`
Passed int `json:"passed"`
Failed int `json:"failed"`
Skipped int `json:"skipped"`
StatusCounts map[string]int `json:"status_counts"`
RunIDs []string `json:"run_ids"`
Shards map[string]int `json:"shards,omitempty"`
Items []RecordBatchItem `json:"items"`
ResultSetID string `json:"result_set_id"`
PageHash string `json:"page_hash"`
CreatedAt string `json:"created_at"`
}
type RecordBatchSummaryManifest ¶
type RecordBatchSummaryManifest struct {
SchemaVersion string `json:"schema_version"`
BatchID string `json:"batch_id"`
RunID string `json:"run_id"`
ItemCount int `json:"item_count"`
Passed int `json:"passed"`
Failed int `json:"failed"`
Skipped int `json:"skipped"`
StatusCounts map[string]int `json:"status_counts"`
Shards map[string]int `json:"shards,omitempty"`
Items []RecordBatchItem `json:"items"`
ResultSetID string `json:"result_set_id"`
PageHash string `json:"page_hash"`
}
type RecordManifest ¶
type RecordManifest struct {
SchemaVersion string `json:"schema_version"`
RunID string `json:"run_id"`
RolloutID string `json:"rollout_id"`
BaseSnapshotID string `json:"base_snapshot_id"`
AttemptID string `json:"attempt_id"`
SessionID string `json:"session_id"`
ToolCallID string `json:"tool_call_id"`
ProcessID string `json:"process_id"`
Workdir string `json:"workdir"`
Command string `json:"command"`
Status string `json:"status"`
ExitCode int64 `json:"exit_code"`
WallMS int64 `json:"wall_ms"`
ChangedFiles []string `json:"changed_files"`
ChangedFileCount int `json:"changed_file_count"`
RootPID int64 `json:"root_pid"`
ObservedProcesses []RecordObservedProcess `json:"observed_processes,omitempty"`
OrphanPolicy string `json:"orphan_policy"`
PostRootGraceMS int64 `json:"post_root_grace_ms"`
CWD string `json:"cwd"`
ProcessTreeCount int `json:"process_tree_count"`
TimeWindow map[string]any `json:"time_window"`
ContextMode string `json:"context_mode"`
ScopeInference map[string]any `json:"scope_inference"`
}
func BuildRecordManifest ¶
func BuildRecordManifest(db *sql.DB, runID string) (RecordManifest, error)
type RecordObservedProcess ¶
type ReplayArtifactDigest ¶
type ReplayAttemptPlan ¶
type ReplayAttemptPlan struct {
ID string `json:"id"`
ExecutionID string `json:"execution_scope_id"`
BaseStateID string `json:"base_state_id,omitempty"`
SnapshotID string `json:"snapshot_id"`
ToolCallID string `json:"tool_call_id,omitempty"`
SubstrateScopeID string `json:"substrate_scope_id,omitempty"`
Workspace string `json:"workspace"`
Strategy string `json:"strategy"`
Command string `json:"command"`
Status string `json:"status"`
RiskStatus string `json:"risk_status"`
ArtifactResult string `json:"artifact_result,omitempty"`
ArtifactDigest *ReplayArtifactDigest `json:"artifact_digest,omitempty"`
IsWinner bool `json:"is_winner"`
BudgetExceeded bool `json:"budget_exceeded"`
ReplayBlocked bool `json:"replay_blocked"`
BlockReasons []string `json:"block_reasons,omitempty"`
Score float64 `json:"score"`
CostEstimate float64 `json:"cost_estimate"`
ToolCall *ReplayToolCall `json:"tool_call,omitempty"`
Processes []ReplayProcess `json:"processes,omitempty"`
ExternalEffects []ReplayExternalEffect `json:"external_effects,omitempty"`
Events []ReplayEvent `json:"events,omitempty"`
}
type ReplayEvent ¶
type ReplayEvent struct {
ID string `json:"id"`
EventType string `json:"event_type"`
Source string `json:"source"`
ProcessID string `json:"process_id,omitempty"`
SnapshotID string `json:"snapshot_id,omitempty"`
CorrelationMethod string `json:"correlation_method,omitempty"`
CorrelationConfidence float64 `json:"correlation_confidence"`
Payload string `json:"payload"`
}
type ReplayExternalEffect ¶
type ReplayExternalEffect struct {
ID string `json:"id"`
EffectType string `json:"effect_type"`
Target string `json:"target"`
Mode string `json:"mode"`
Decision string `json:"decision"`
CompensationRef string `json:"compensation_ref,omitempty"`
Status string `json:"status"`
Payload string `json:"payload"`
}
type ReplayManifest ¶
type ReplayManifest struct {
SchemaVersion string `json:"schema_version"`
Mode string `json:"mode"`
Scope string `json:"scope"`
RunID string `json:"run_id,omitempty"`
AttemptID string `json:"attempt_id,omitempty"`
ExecutionID string `json:"execution_scope_id,omitempty"`
Trajectories []ReplayRollout `json:"trajectories"`
Rollouts []ReplayRollout `json:"rollouts"`
}
func BuildReplayAttempt ¶
func BuildReplayAttempt(db *sql.DB, attemptID string) (ReplayManifest, error)
func BuildReplayRun ¶
func BuildReplayRun(db *sql.DB, runID string) (ReplayManifest, error)
type ReplayProcess ¶
type ReplayRollout ¶
type ReplayRollout struct {
ID string `json:"id"`
TrajectoryID string `json:"trajectory_id"`
RunID string `json:"run_id"`
BaseStateID string `json:"base_state_id"`
BaseSnapshotID string `json:"base_snapshot_id"`
Status string `json:"status"`
SelectedScopeID string `json:"selected_execution_scope_id"`
WinnerAttemptID string `json:"winner_attempt_id"`
PromotionID string `json:"promotion_id"`
RiskStatus string `json:"risk_status"`
BaseState *ReplaySnapshot `json:"base_state,omitempty"`
ExecutionScopes []ReplayAttemptPlan `json:"execution_scopes"`
BaseSnapshot *ReplaySnapshot `json:"base_snapshot,omitempty"`
Attempts []ReplayAttemptPlan `json:"attempts"`
}
type ReplaySnapshot ¶
type ReplaySnapshot struct {
ID string `json:"id"`
Name string `json:"name"`
Kind string `json:"kind"`
PhysicalType string `json:"physical_type"`
Path string `json:"path"`
ManifestHash string `json:"manifest_hash"`
FileCount int64 `json:"file_count"`
Bytes int64 `json:"bytes"`
Status string `json:"status"`
Tainted bool `json:"tainted"`
}
type ReplayToolCall ¶
type ReplayToolCall struct {
ID string `json:"id"`
SessionID string `json:"session_id"`
Command string `json:"command"`
Status string `json:"status"`
ExitCode int64 `json:"exit_code"`
WallMS int64 `json:"wall_ms"`
CostEstimate float64 `json:"cost_estimate"`
ResultRef string `json:"result_ref,omitempty"`
PolicyDecision string `json:"policy_decision"`
StartedAt string `json:"started_at"`
EndedAt string `json:"ended_at"`
}
type TimelineEvent ¶
type TimelineEvent struct {
Time string `json:"time"`
Type string `json:"type"`
Source string `json:"source"`
Lane string `json:"lane,omitempty"`
CorrelationStatus string `json:"correlation_status,omitempty"`
ID string `json:"id"`
RunID string `json:"run_id"`
SessionID string `json:"session_id,omitempty"`
AttemptID string `json:"attempt_id,omitempty"`
ToolCallID string `json:"tool_call_id,omitempty"`
ProcessID string `json:"process_id,omitempty"`
SnapshotID string `json:"snapshot_id,omitempty"`
ObjectRef string `json:"object_ref,omitempty"`
Summary string `json:"summary"`
Evidence map[string]any `json:"evidence,omitempty"`
Risk map[string]any `json:"risk,omitempty"`
ExplainReplayRefs []ExplainReplayRef `json:"replay_refs,omitempty"`
Drilldowns []string `json:"drilldowns,omitempty"`
}
type TimelineFilter ¶
type TimelineManifest ¶
type TimelineManifest struct {
SchemaVersion string `json:"schema_version"`
RunID string `json:"run_id"`
Filter TimelineFilter `json:"filter"`
View string `json:"view"`
Summary TimelineSummary `json:"summary"`
ResultSetID string `json:"result_set_id"`
PageHash string `json:"page_hash"`
Cursor string `json:"cursor,omitempty"`
NextCursor string `json:"next_cursor,omitempty"`
HasMore bool `json:"has_more"`
TotalCount int `json:"total_count"`
EventCount int `json:"event_count"`
Events []TimelineEvent `json:"events"`
}
func BuildTimeline ¶
func BuildTimeline(db *sql.DB, opts TimelineOptions) (TimelineManifest, error)
type TimelineOptions ¶
type TimelineSummary ¶
type Trajectory ¶ added in v0.7.0
type TrajectoryEvidence ¶
type TrajectoryEvidence struct {
RunID string `json:"run_id"`
RolloutID string `json:"rollout_id"`
AttemptID string `json:"attempt_id"`
SnapshotID string `json:"snapshot_id"`
ToolCallID string `json:"tool_call_id,omitempty"`
Workspace string `json:"workspace"`
Strategy string `json:"strategy"`
Command string `json:"command"`
Status string `json:"status"`
RiskStatus string `json:"risk_status"`
LocalCandidateEligible bool `json:"local_candidate_eligible"`
ReplayBlocked bool `json:"replay_blocked"`
BlockReasons []string `json:"block_reasons,omitempty"`
Score float64 `json:"score"`
CostEstimate float64 `json:"cost_estimate"`
ArtifactResult string `json:"artifact_result,omitempty"`
ArtifactDigest *ReplayArtifactDigest `json:"artifact_digest,omitempty"`
ToolCall *ReplayToolCall `json:"tool_call,omitempty"`
Processes []ReplayProcess `json:"processes,omitempty"`
RuntimeEvents []ReplayEvent `json:"runtime_events,omitempty"`
ExternalEffects []ReplayExternalEffect `json:"external_effects,omitempty"`
FileChanges []TrajectoryFileChange `json:"file_changes,omitempty"`
FileChangeSummary FileChangeSummary `json:"file_change_summary"`
}
type TrajectoryFileChange ¶
type TrajectoryFileChange struct {
Path string `json:"path"`
ChangeType string `json:"change_type"`
BaseExists bool `json:"base_exists"`
NextExists bool `json:"next_exists"`
BaseSHA256 string `json:"base_sha256"`
NextSHA256 string `json:"next_sha256"`
BaseBytes int64 `json:"base_bytes"`
NextBytes int64 `json:"next_bytes"`
UnifiedDiff []string `json:"unified_diff,omitempty"`
}
type TrajectoryManifest ¶
type TrajectoryManifest struct {
SchemaVersion string `json:"schema_version"`
RunID string `json:"run_id"`
DecisionOwner string `json:"decision_owner"`
Rollouts []TrajectoryRollout `json:"rollouts"`
Trajectories []TrajectoryEvidence `json:"trajectories"`
}
func BuildTrajectoriesRun ¶
func BuildTrajectoriesRun(db *sql.DB, runID string) (TrajectoryManifest, error)
type TrajectoryRollout ¶
type TrajectoryRollout struct {
ID string `json:"id"`
BaseSnapshotID string `json:"base_snapshot_id"`
Status string `json:"status"`
LocalCandidate string `json:"local_candidate,omitempty"`
PromotionID string `json:"promotion_id,omitempty"`
RiskStatus string `json:"risk_status"`
BaseSnapshot *ReplaySnapshot `json:"base_snapshot,omitempty"`
}