Documentation
¶
Overview ¶
Package sessionadapter adapts harness sessions to the terminal Agent contract.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter = sessionAdapter
Agent is the reusable harness-session adapter consumed by terminal applications.
func New ¶
func New(sess session.SessionController) *Adapter
New wraps a newly created session. Fresh sessions have no replay backlog. It is the plain test/explicitly-ephemeral constructor; production clients that promise enduring delivery must use NewWithReplay or Restore.
func NewWithReplay ¶
func NewWithReplay(ctx context.Context, sess session.SessionController, store ReplayOpener) (*Adapter, error)
NewWithReplay wraps a newly created session and cold-replays the public enduring events already committed during rig construction. It is intended for interactive clients that subscribe after primers have been created.
func Restore ¶
func Restore(ctx context.Context, sess session.SessionController, store ReplayOpener) (*Adapter, error)
Restore wraps a restored session and reconstructs its public enduring backlog and open-gate index before returning it to the TUI.
type GateNotOpenError ¶
GateNotOpenError reports that no open gate matches the (loop, tool-execution) a gate reply addressed. It is fail-secure: an Approve/Deny/ProvideAnswer for a call with no live gate touches nothing and returns this. It is errors.As-able.
func (*GateNotOpenError) Error ¶
func (e *GateNotOpenError) Error() string
type ReplayOpener ¶
type ReplayOpener interface {
OpenEventReplayer(uuid.UUID, sessionstore.ReplayRequest) (journal.EventReplayer, error)
}
replayOpener is the narrow slice of the session store the adapter needs: open a durable public event replayer for one session. *sessionstore.Store satisfies it.