sessionarchive

package
v0.1.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatSize

func FormatSize(size int64) string

func NativeDir

func NativeDir(appRoot, sandboxID, agent string) string

Types

type Event

type Event struct {
	Sequence   int             `json:"sequence"`
	Timestamp  string          `json:"timestamp,omitempty"`
	Kind       string          `json:"kind"`
	Role       string          `json:"role,omitempty"`
	Content    string          `json:"content,omitempty"`
	ToolName   string          `json:"tool_name,omitempty"`
	ToolCallID string          `json:"tool_call_id,omitempty"`
	Input      json.RawMessage `json:"input,omitempty"`
	Output     json.RawMessage `json:"output,omitempty"`
	Status     string          `json:"status,omitempty"`
	NativeType string          `json:"native_type,omitempty"`
}

type Manifest

type Manifest struct {
	SchemaVersion   int              `json:"schema_version"`
	ID              string           `json:"id"`
	AgentType       string           `json:"agent_type"`
	NativeSessionID string           `json:"native_session_id"`
	Title           string           `json:"title,omitempty"`
	Status          string           `json:"status"`
	AdapterVersion  int              `json:"adapter_version"`
	Sources         []ManifestSource `json:"sources"`
}

type ManifestSource

type ManifestSource struct {
	SandboxID   string `json:"sandbox_id"`
	SandboxName string `json:"sandbox_name"`
	RawFile     string `json:"raw_file"`
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func New

func New(appRoot string, db *sql.DB) *Service

func (*Service) BeginLaunch

func (s *Service) BeginLaunch(ctx context.Context, box *sandtypes.Box) (string, error)

func (*Service) Delete

func (s *Service) Delete(ctx context.Context, id string) error

func (*Service) EndLaunch

func (s *Service) EndLaunch(ctx context.Context, id string) error

func (*Service) EndSandboxLaunches

func (s *Service) EndSandboxLaunches(ctx context.Context, sandboxID string) error

func (*Service) Export

func (s *Service) Export(ctx context.Context, id, format, destination string) error

func (*Service) List

func (s *Service) List(ctx context.Context, agent, sandbox string) ([]sandtypes.AgentSession, error)

func (*Service) Read

func (s *Service) Read(ctx context.Context, id, format string, w io.Writer) error

func (*Service) Resolve

func (s *Service) Resolve(ctx context.Context, id string) (sandtypes.AgentSession, error)

func (*Service) ScrubCredentials

func (s *Service) ScrubCredentials(box *sandtypes.Box) error

ScrubCredentials removes co-located authentication state after a sandbox is removed. Transcript snapshots never include these files.

func (*Service) Sync

func (s *Service) Sync(ctx context.Context, box *sandtypes.Box) error

Jump to

Keyboard shortcuts

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