Documentation
¶
Index ¶
- Constants
- func SaveCaptureSettings(ctx context.Context, db *sql.DB, paths store.Paths, run string, ...) error
- func SaveRuntimeCapture(db *sql.DB, paths store.Paths, report *RuntimeCaptureReport) error
- type BaselineSummary
- type CaptureSettings
- type CaptureSnapshot
- type ContextSummary
- type CorrelationGap
- type CoverageOptions
- type CoverageReport
- type CoverageSummary
- type EventContext
- type EventDetail
- type EventOptions
- type EventReport
- type EvidenceSummary
- type FlowItem
- type FlowOptions
- type FlowReport
- type ProcessDetail
- type ProcessOptions
- type ProcessReport
- type QuerySurface
- type ResponseSummary
- type RiskSummary
- type RuntimeCaptureReport
- type RuntimeCoverage
- type RuntimeSummary
- type ScopeSummary
- type ScopesOptions
- type ScopesReport
- type SignalSummary
- type Summary
- type SummaryOptions
- type WindowSummary
Constants ¶
const CaptureSettingsVersion = "agentprovenance.capture_settings/v1"
const CoverageSchemaVersion = "agentprovenance.observability_coverage/v1"
const EventSchemaVersion = "agentprovenance.observability_event/v1"
const FlowSchemaVersion = "agentprovenance.observability_flow/v1"
const ProcessSchemaVersion = "agentprovenance.observability_process/v1"
const RuntimeCaptureSchema = "agentprovenance.runtime_capture/v1"
const ScopesSchemaVersion = "agentprovenance.observability_scopes/v1"
const SummarySchemaVersion = "agentprovenance.observability_summary/v1"
Variables ¶
This section is empty.
Functions ¶
func SaveCaptureSettings ¶ added in v0.10.0
func SaveCaptureSettings(ctx context.Context, db *sql.DB, paths store.Paths, run string, settings CaptureSettings) error
SaveCaptureSettings runs before launch starts any collector or workload. It stores only a fixed allowlist of options, never environment values or paths.
func SaveRuntimeCapture ¶ added in v0.9.0
Types ¶
type BaselineSummary ¶
type CaptureSettings ¶ added in v0.10.0
type CaptureSettings struct {
Version string `json:"version"`
Source string `json:"source"`
SensorMode string `json:"sensor_mode"`
WorkspaceSnapshot *bool `json:"workspace_snapshot"`
TLSFullBody *bool `json:"tls_full_body"`
AgentContext *bool `json:"agent_context"`
Ref string `json:"ref,omitempty"`
}
CaptureSettings records launch-owned options, not successful probe coverage. Unknown historical settings are absent; false is an explicitly saved choice.
func ReadCaptureSettings ¶ added in v0.10.0
func ReadCaptureSettings(ctx context.Context, db captureSettingsReader, run string) (*CaptureSettings, error)
type CaptureSnapshot ¶ added in v0.9.0
type CaptureSnapshot struct {
ObservedAt time.Time
Native *telemetry.NativeStreamStatus
Capabilities *sensor.CapabilityReport
Issues []string
Rejections []telemetry.NativeRejection
}
CaptureSnapshot is sampled only by the capture lifecycle, never when a historical run is queried or imported on another machine.
type ContextSummary ¶
type CorrelationGap ¶
type CorrelationGap struct {
EventID string `json:"event_id"`
RawEventID string `json:"raw_event_id,omitempty"`
Source string `json:"source"`
Type string `json:"type"`
Missing []string `json:"missing"`
CorrelationMethod string `json:"correlation_method,omitempty"`
CorrelationConfidence float64 `json:"correlation_confidence"`
ContainerID string `json:"container_id,omitempty"`
CgroupID string `json:"cgroup_id,omitempty"`
PID int64 `json:"pid,omitempty"`
PPID int64 `json:"ppid,omitempty"`
CreatedAt string `json:"created_at"`
SuggestedBinding string `json:"suggested_binding"`
}
type CoverageOptions ¶
type CoverageReport ¶
type CoverageReport struct {
SchemaVersion string `json:"schema_version"`
RunID string `json:"run_id"`
ResultSetID string `json:"result_set_id"`
PageHash string `json:"page_hash"`
Summary CoverageSummary `json:"summary"`
MissingFields map[string]int `json:"missing_fields"`
BySource map[string]int `json:"by_source"`
ByType map[string]int `json:"by_type"`
Gaps []CorrelationGap `json:"gaps,omitempty"`
NextSteps []string `json:"next_steps"`
}
func BuildCoverage ¶
func BuildCoverage(db *sql.DB, opts CoverageOptions) (CoverageReport, error)
func BuildCoverageContext ¶ added in v0.9.0
func BuildCoverageContext(ctx context.Context, db *sql.DB, opts CoverageOptions) (CoverageReport, error)
Count the full selection without retaining event payloads. Only the gap examples are bounded; the summary must not describe just the first page.
func BuildCoverageFromEvents ¶
func BuildCoverageFromEvents(runID string, events []telemetry.EventRecord, opts CoverageOptions) CoverageReport
type CoverageSummary ¶
type CoverageSummary struct {
RuntimeEvents int `json:"runtime_events"`
MissingSession int `json:"missing_session"`
MissingToolCall int `json:"missing_tool_call"`
MissingProcess int `json:"missing_process"`
ToolCallCoverageRatio float64 `json:"tool_call_coverage_ratio"`
ProcessCoverageRatio float64 `json:"process_coverage_ratio"`
CorrelationGapCount int `json:"correlation_gap_count"`
}
type EventContext ¶
type EventDetail ¶
type EventDetail struct {
ID string `json:"id"`
Type string `json:"type"`
Source string `json:"source"`
Time string `json:"time"`
Summary string `json:"summary"`
ObjectRef string `json:"object_ref,omitempty"`
CorrelationMethod string `json:"correlation_method,omitempty"`
CorrelationConfidence float64 `json:"correlation_confidence,omitempty"`
Evidence map[string]any `json:"evidence,omitempty"`
}
type EventOptions ¶
type EventReport ¶
type EventReport struct {
SchemaVersion string `json:"schema_version"`
RunID string `json:"run_id"`
ResultSetID string `json:"result_set_id"`
PageHash string `json:"page_hash"`
Event EventDetail `json:"event"`
Context EventContext `json:"context"`
Query QuerySurface `json:"query"`
RelatedRisks []EvidenceSummary `json:"related_risks,omitempty"`
RelatedPolicies []EvidenceSummary `json:"related_policies,omitempty"`
RelatedResponses []EvidenceSummary `json:"related_responses,omitempty"`
RecommendedViews []string `json:"recommended_views"`
}
func BuildEvent ¶
func BuildEvent(db *sql.DB, opts EventOptions) (EventReport, error)
func BuildEventFromTimeline ¶
func BuildEventFromTimeline(manifest provenance.TimelineManifest, opts EventOptions) (EventReport, error)
type EvidenceSummary ¶
type FlowItem ¶
type FlowItem struct {
Time string `json:"time"`
Lane string `json:"lane,omitempty"`
Correlation string `json:"correlation_status,omitempty"`
ToolCallID string `json:"tool_call_id,omitempty"`
ProcessID string `json:"process_id,omitempty"`
EventID string `json:"event_id"`
EventType string `json:"event_type"`
EventSource string `json:"event_source"`
RiskSignals []string `json:"risk_signals,omitempty"`
PolicyDecisions []string `json:"policy_decisions,omitempty"`
ResponseActions []string `json:"response_actions,omitempty"`
Summary string `json:"summary"`
Drilldowns []string `json:"drilldowns"`
}
type FlowOptions ¶
type FlowReport ¶
type FlowReport struct {
SchemaVersion string `json:"schema_version"`
RunID string `json:"run_id"`
ResultSetID string `json:"result_set_id"`
PageHash string `json:"page_hash"`
FlowCount int `json:"flow_count"`
Flows []FlowItem `json:"flows"`
}
func BuildFlow ¶
func BuildFlow(db *sql.DB, opts FlowOptions) (FlowReport, error)
func BuildFlowFromTimeline ¶
func BuildFlowFromTimeline(manifest provenance.TimelineManifest, opts FlowOptions) FlowReport
type ProcessDetail ¶
type ProcessOptions ¶
type ProcessReport ¶
type ProcessReport struct {
SchemaVersion string `json:"schema_version"`
RunID string `json:"run_id"`
ResultSetID string `json:"result_set_id"`
PageHash string `json:"page_hash"`
Process ProcessDetail `json:"process"`
Context EventContext `json:"context"`
Query QuerySurface `json:"query"`
RuntimeEvents []EvidenceSummary `json:"runtime_events,omitempty"`
RelatedRisks []EvidenceSummary `json:"related_risks,omitempty"`
RelatedPolicies []EvidenceSummary `json:"related_policies,omitempty"`
RelatedResponses []EvidenceSummary `json:"related_responses,omitempty"`
RecommendedViews []string `json:"recommended_views"`
}
func BuildProcess ¶
func BuildProcess(db *sql.DB, opts ProcessOptions) (ProcessReport, error)
func BuildProcessFromTimeline ¶
func BuildProcessFromTimeline(manifest provenance.TimelineManifest, opts ProcessOptions) (ProcessReport, error)
type QuerySurface ¶
type ResponseSummary ¶
type RiskSummary ¶
type RuntimeCaptureReport ¶ added in v0.9.0
type RuntimeCaptureReport struct {
SchemaVersion string `json:"schema_version"`
RunID string `json:"run_id"`
Status string `json:"status"`
Scope string `json:"scope"`
KernelState string `json:"kernel_state"`
StartedAt string `json:"started_at,omitempty"`
EndedAt string `json:"ended_at,omitempty"`
NodeCounterDelta map[string]int64 `json:"node_counter_delta"`
NodePendingEvents *int64 `json:"node_pending_events"`
NodeQueuedBytes *int64 `json:"node_queued_bytes"`
RunDroppedEvents *int64 `json:"run_dropped_events"`
RunImpact string `json:"run_impact"`
CapabilitiesStart *sensor.CapabilityReport `json:"capabilities_start,omitempty"`
CapabilitiesEnd *sensor.CapabilityReport `json:"capabilities_end,omitempty"`
Issues []string `json:"issues"`
Limitations []string `json:"limitations,omitempty"`
RejectionExamples []telemetry.NativeRejection `json:"rejection_examples,omitempty"`
Ref string `json:"ref,omitempty"`
}
func BuildRuntimeCapture ¶ added in v0.9.0
func BuildRuntimeCapture(runID, kernelState string, before, after CaptureSnapshot, cleanStop bool) RuntimeCaptureReport
KernelState is disabled, unavailable, or observed. An observed interval is bounded by launch's readiness/exit checks, not a claim of continuous health.
type RuntimeCoverage ¶ added in v0.9.0
type RuntimeCoverage struct {
SchemaVersion string `json:"schema_version"`
RunID string `json:"run_id"`
Capture RuntimeCaptureReport `json:"capture"`
Correlation CoverageReport `json:"correlation"`
}
RuntimeCoverage separates a saved capture interval from a fresh query over stored events. Neither correlation ratios nor signatures prove completeness.
func ReadRuntimeCoverage ¶ added in v0.9.0
type RuntimeSummary ¶
type RuntimeSummary struct {
Events int `json:"events"`
EventsWithSession int `json:"events_with_session"`
EventsWithToolCall int `json:"events_with_tool_call"`
EventsWithProcess int `json:"events_with_process"`
ToolCallCoverageRatio float64 `json:"tool_call_coverage_ratio"`
ProcessCoverageRatio float64 `json:"process_coverage_ratio"`
}
type ScopeSummary ¶
type ScopeSummary struct {
ToolCallID string `json:"tool_call_id"`
SessionID string `json:"session_id,omitempty"`
AttemptID string `json:"attempt_id,omitempty"`
Command string `json:"command,omitempty"`
Status string `json:"status,omitempty"`
StartedAt string `json:"started_at,omitempty"`
EndedAt string `json:"ended_at,omitempty"`
ProcessCount int `json:"process_count"`
RuntimeEvents int `json:"runtime_events"`
RuntimeEventsByType map[string]int `json:"runtime_events_by_type,omitempty"`
RiskSignals int `json:"risk_signals"`
RiskBySeverity map[string]int `json:"risk_by_severity,omitempty"`
PolicyDecisions int `json:"policy_decisions"`
ResponseActions int `json:"response_actions"`
ResponseByAction map[string]int `json:"response_by_action,omitempty"`
EvidenceRefs []EvidenceSummary `json:"evidence_refs,omitempty"`
RecommendedDrilldowns []string `json:"recommended_drilldowns"`
}
type ScopesOptions ¶
type ScopesReport ¶
type ScopesReport struct {
SchemaVersion string `json:"schema_version"`
RunID string `json:"run_id"`
ResultSetID string `json:"result_set_id"`
PageHash string `json:"page_hash"`
ScopeCount int `json:"scope_count"`
Scopes []ScopeSummary `json:"scopes"`
}
func BuildScopes ¶
func BuildScopes(db *sql.DB, opts ScopesOptions) (ScopesReport, error)
func BuildScopesFromTimeline ¶
func BuildScopesFromTimeline(manifest provenance.TimelineManifest, opts ScopesOptions) ScopesReport
type SignalSummary ¶
type SignalSummary struct {
Total int `json:"total"`
ByDimension map[string]int `json:"by_dimension,omitempty"`
}
SignalSummary is the per-dimension rollup of the unified signal model (behavior/cost/quality/security), surfacing the two-pillars-plus-cost shape in the primary observability output.
type Summary ¶
type Summary struct {
SchemaVersion string `json:"schema_version"`
RunID string `json:"run_id"`
ResultSetID string `json:"result_set_id"`
PageHash string `json:"page_hash"`
EventCount int `json:"event_count"`
Application ContextSummary `json:"application"`
Runtime RuntimeSummary `json:"runtime"`
Windows WindowSummary `json:"windows"`
Risk RiskSummary `json:"risk"`
Baseline BaselineSummary `json:"baseline"`
Response ResponseSummary `json:"response"`
Signals SignalSummary `json:"signals"`
EventTypes map[string]int `json:"event_types"`
Sources map[string]int `json:"sources"`
TopEvidenceRefs []EvidenceSummary `json:"top_evidence_refs,omitempty"`
RecommendedViews []string `json:"recommended_views"`
}
func BuildSummary ¶
func BuildSummary(db *sql.DB, opts SummaryOptions) (Summary, error)
func BuildSummaryFromTimeline ¶
func BuildSummaryFromTimeline(manifest provenance.TimelineManifest, opts SummaryOptions) Summary
type SummaryOptions ¶
type WindowSummary ¶
type WindowSummary struct {
WindowCount int `json:"window_count"`
WindowSeconds []int `json:"window_seconds,omitempty"`
AggregateWindow int `json:"aggregate_window_seconds,omitempty"`
EventCount int `json:"event_count"`
ResolvedCount int `json:"resolved_count"`
UnresolvedCount int `json:"unresolved_count"`
HighRiskCount int `json:"high_risk_count"`
ByType map[string]int `json:"by_type,omitempty"`
BySource map[string]int `json:"by_source,omitempty"`
LatestWindowStart string `json:"latest_window_start,omitempty"`
}
func BuildWindowSummary ¶
func BuildWindowSummary(db *sql.DB, runID string) (WindowSummary, error)