sessionparkreceive

package
v0.67.14 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package sessionparkreceive owns target-side admission and atomic execution of one parked multi-worktree bundle.

Index

Constants

View Source
const (
	PhaseReceived         = "received"
	PhaseMembersReady     = "members_ready"
	PhaseClaimsReady      = "claims_ready"
	PhaseSuccessorStarted = "successor_started"
	PhaseCompleted        = "completed"
)

Variables

This section is empty.

Functions

func TargetStoreRoot

func TargetStoreRoot(home string) string

Types

type Options

type Options struct {
	Store        sessionpark.TargetStore
	ProjectsRoot string
	LocalMachine string
	RawEnvelope  []byte
	Now          func() time.Time

	ReceiveMember    func(context.Context, worktrees.SessionMemberReceiveOptions) (worktrees.SessionReceiveResult, error)
	VerifyMember     func(context.Context, worktrees.SessionMemberReceiveOptions) (worktrees.SessionReceiveResult, error)
	StartSuccessor   func(context.Context, sessionlaunch.Options) (sessionlaunch.Result, error)
	InspectSuccessor func(context.Context, sessionlaunch.Options) (sessionlaunch.Result, error)
	PrepareMember    func(context.Context, worktrees.ParkedSessionWorkLogPrepareOptions) (worktrees.ParkedSessionWorkLogPrepareResult, error)
	CompleteMember   func(worktrees.ParkedTargetCompletionOptions) (worktrees.LocalWorkLogEvent, error)

	AfterMembersReady     func() error
	AfterClaimsReady      func() error
	AfterSuccessorStarted func() error
	AfterReceipt          func() error
}

type Result

type Result struct {
	ResumeID string               `json:"resume_id"`
	Digest   sessionmove.Digest   `json:"request_digest"`
	Phase    string               `json:"phase"`
	Receipt  *sessionpark.Receipt `json:"receipt,omitempty"`
	Replay   bool                 `json:"replay"`
}

Result intentionally omits the request and continuation. Normal JSON/text output may expose only the durable receipt and high-level phase.

func Receive

func Receive(ctx context.Context, options Options) (Result, error)

Jump to

Keyboard shortcuts

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