Documentation
¶
Overview ¶
Package sessionmessenger owns source-side durable session-message delivery.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeliveryError ¶
DeliveryError preserves the caller-owned durable identity needed to retry an ambiguous transport or a post-delivery source-recording failure.
func (*DeliveryError) Error ¶
func (err *DeliveryError) Error() string
func (*DeliveryError) Unwrap ¶
func (err *DeliveryError) Unwrap() error
type Hooks ¶
type Hooks struct {
BeforeCourier func(sessionmove.MessageState) error
}
Hooks are test-only crash-boundary probes. Production callers leave them empty; they never change the durable protocol.
type Options ¶
type Options struct {
Store sessionmove.Store
ProjectsRoot string
TargetWBSessionID string
SourceSession session.Record
Kind sessionmove.MessageKind
Body string
MessageID string
ResumeMessageID string
Now func() time.Time
NewDeliverer func(sessionmove.SuccessorAddress, sessioncourier.MessageSynchestraOptions) (sessioncourier.MessageDeliverer, error)
RecordSent func(WorkLogRecord) error
Hooks Hooks
}
Options selects a successor solely by its durable WB session address. A fresh caller supplies MessageID; a retry supplies only ResumeMessageID and therefore cannot accidentally construct different bytes.
type Result ¶
type Result struct {
Message sessionmove.Message `json:"message"`
Digest sessionmove.Digest `json:"message_digest"`
Receipt sessionmove.MessageReceipt `json:"receipt"`
Address sessionmove.SuccessorAddress `json:"successor_address"`
Replay bool `json:"replay"`
}
Result identifies the exact durable outbox message and its target acknowledgement. Receipt means recorded+pasted, never agent-processed.
func Send ¶
Send persists exact message bytes before courier use, then records only an acknowledgement that those bytes were recorded and pasted at the verified successor pane. It holds the handoff execution fence across one courier attempt so concurrent local retries cannot create duplicate attempts.
type WorkLogRecord ¶
type WorkLogRecord struct {
ProjectsRoot string
Request sessionmove.Request
RequestDigest sessionmove.Digest
HandoffReceipt sessionmove.Receipt
Address sessionmove.SuccessorAddress
SourceSession session.Record
Message sessionmove.Message
Record sessionmove.MessageRecord
MessageReceipt sessionmove.MessageReceipt
}
WorkLogRecord is the exact source-side evidence recorded only after the target has acknowledged durable recording plus a successful tmux paste.