record

package
v0.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 9, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ObservedProcess

type ObservedProcess 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"`
}

type Request

type Request struct {
	RunID            string   `json:"run_id"`
	Name             string   `json:"name"`
	Workdir          string   `json:"workdir"`
	Command          []string `json:"command"`
	SampleIntervalMS int64    `json:"sample_interval_ms"`
	PostRootGraceMS  int64    `json:"post_root_grace_ms"`
	// DisableSnapshot skips the pre-exec base-directory copy and the post-exec
	// file diff. `record` keeps it off (file diff is core zero-SDK evidence), but
	// `launch` turns it on: wrapping an interactive agent in a real repo would
	// otherwise copy the entire working tree (node_modules, build output, ...) on
	// every run, dominating startup and disk. On Linux the kernel sensor's
	// file_write events already capture what changed at higher fidelity.
	DisableSnapshot bool `json:"disable_snapshot"`
}

type Result

type Result struct {
	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"`
	ExitCode         int               `json:"exit_code"`
	Status           string            `json:"status"`
	WallMS           int64             `json:"wall_ms"`
	ChangedFiles     []string          `json:"changed_files"`
	RootPID          int64             `json:"root_pid"`
	Observed         []ObservedProcess `json:"observed"`
	OrphanPolicy     string            `json:"orphan_policy"`
	SampleIntervalMS int64             `json:"sample_interval_ms"`
	PostRootGraceMS  int64             `json:"post_root_grace_ms"`
	CWD              string            `json:"cwd"`
	StartedAt        string            `json:"started_at"`
	EndedAt          string            `json:"ended_at"`
	FailureReason    string            `json:"failure_reason"`
}

type Service

type Service struct {
	DB    *sql.DB
	Paths store.Paths
}

func (Service) Run

func (s Service) Run(req Request) (Result, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL