Documentation
¶
Index ¶
- Constants
- Variables
- func MarshalHead(h Head) ([]byte, error)
- func MarshalManifest(m Manifest) ([]byte, error)
- func MarshalObject(kind ObjectKind, payload []byte) (ports.SnapshotObject, error)
- type Head
- type Manifest
- type ManifestPane
- type ManifestTab
- type ObjectKind
- type ObjectRef
- type Pane
- type Process
- type ProcessOpts
- type Session
- type SnapshotDigest
- type Tab
Constants ¶
const (
ManifestVersion = uint16(3)
)
Variables ¶
var ( ErrBadMagic = errors.New("snapshot: bad magic") ErrBadVersion = errors.New("snapshot: bad version") ErrBadCRC = errors.New("snapshot: bad crc") ErrShortPayload = errors.New("snapshot: payload too short") ErrTrailingBytes = errors.New("snapshot: trailing bytes") ErrUnknownPane = errors.New("snapshot: tree references unknown pane") ErrInvalidData = errors.New("snapshot: invalid data") )
Functions ¶
func MarshalHead ¶
MarshalHead encodes the deterministic, strict VEVH generation pointer.
func MarshalManifest ¶
func MarshalObject ¶
func MarshalObject(kind ObjectKind, payload []byte) (ports.SnapshotObject, error)
MarshalObject frames payload as VEVO and returns the bytes together with the SHA-256 address of those complete bytes.
Types ¶
type Head ¶
type Head struct {
Generation uint64
ManifestDigest SnapshotDigest
}
Head is the repository-owned generation pointer. It is deliberately not a VEVM payload; adapters produce and atomically manage HEAD later.
func UnmarshalHead ¶
UnmarshalHead decodes a complete VEVH generation pointer.
type Manifest ¶
type Manifest struct {
Generation uint64
IncarnationID domain.IncarnationID
ParentCheckpoint *domain.CheckpointRef
Name string
CreatedAt uint64
Active uint16
Tabs []ManifestTab
}
Manifest is the complete VEVM payload carried directly in a publication.
func UnmarshalManifest ¶
type ManifestPane ¶
type ManifestTab ¶
type ObjectKind ¶
type ObjectKind uint8
const ( HistoryChunk ObjectKind = iota + 1 HistoryTail RecoveryTranscript )
func PreflightObject ¶
func PreflightObject(encoded []byte) (ObjectKind, []byte, error)
PreflightObject verifies VEVO framing and declared payload size without copying; the returned payload aliases encoded and is only valid while it is.
func UnmarshalObject ¶
func UnmarshalObject(encoded []byte) (ObjectKind, []byte, error)
type ObjectRef ¶
type ObjectRef struct {
Kind ObjectKind
Digest SnapshotDigest
Size uint32
}
type Pane ¶
type Pane struct {
ID layout.PaneID
StableID string
Cwd string
SealedChunks [][]byte // oldest-first, each a self-contained canonical history blob
Tail []byte // mandatory nonempty canonical history blob
Transcript []byte // mandatory nonempty canonical history blob
Process *Process
}
Pane captures terminal state as opaque, canonical VT blobs. Snapshot owns their length framing and order; pkg/vt owns their contents and validation.
type Process ¶
type Process struct {
Argv []string
Strategy string
Opts ProcessOpts
}
Process captures restorable foreground process metadata.
type ProcessOpts ¶
type ProcessOpts struct {
AgentSessionID string
}
ProcessOpts captures strategy-specific process restore options.
type SnapshotDigest ¶
type SnapshotDigest = ports.SnapshotDigest
SnapshotDigest is the shared content-address type used by the repository.
func ManifestDigest ¶
func ManifestDigest(encoded []byte) SnapshotDigest