Documentation
¶
Overview ¶
Package adapter is the Runtime wait-loop glue. Hosts use session.Runtime, not these functions.
Index ¶
- func AbandonTurn(h *tacklr.TurnManager, workspace *vfs.MountSession)
- func AbsorbAll(ctx context.Context, ...) (consumed int, err error)
- func AppendMessages(box []*tacklr.Message, msgs ...*tacklr.Message) []*tacklr.Message
- func ChildJobMessage(st session.SessionStatus) *tacklr.Message
- func CloseTurnVFS(ms *vfs.MountSession)
- func ConstructTurn(ctx context.Context, agent tacklr.AgentOptions, threadID string, ...) (*tacklr.TurnManager, *vfs.MountSession, error)
- func EncodeUserState(state map[string]any) (map[string]any, error)
- func HasSpecialist(agent tacklr.AgentOptions, name string) bool
- func JobSteer(id, name, body string, failed bool) *tacklr.Message
- func NormalizeSpawn(specialist, task string) (string, string, error)
- func OpenTurnVFS(ctx context.Context, threadID string, agent tacklr.AgentOptions, ...) (*vfs.MountSession, error)
- func OverlaySpecialist(parent tacklr.AgentOptions, specialist string) (tacklr.AgentOptions, error)
- func RestoreTurn(ctx context.Context, store session.SnapshotStore, id session.SessionID, ...) (session.Revision, error)
- func UnknownChild(id string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AbandonTurn ¶
func AbandonTurn(h *tacklr.TurnManager, workspace *vfs.MountSession)
AbandonTurn closes a harness and its turn-scoped trees after a failed construct.
func AbsorbAll ¶
func AbsorbAll(ctx context.Context, absorb func(context.Context, *tacklr.Message, chan tacklr.StreamEvent) error, msgs []*tacklr.Message, out chan tacklr.StreamEvent) (consumed int, err error)
AbsorbAll writes msgs into the window in order. consumed is how many absorb calls ran (including a failed one). Absorb failure is terminal for the batch: leftover messages are not put back.
func AppendMessages ¶
AppendMessages is the unlocked FIFO append. Temporal wait-loop only.
func ChildJobMessage ¶
func ChildJobMessage(st session.SessionStatus) *tacklr.Message
ChildJobMessage is JobSteer for a nested session job.
func CloseTurnVFS ¶
func CloseTurnVFS(ms *vfs.MountSession)
CloseTurnVFS unmounts a turn-scoped MountSession (FUSE telemetry, Close, host dir).
func ConstructTurn ¶
func ConstructTurn(ctx context.Context, agent tacklr.AgentOptions, threadID string, bindings []vfs.Binding, proj vfs.Projection, extraMCP []mcp.MCPConfig) (*tacklr.TurnManager, *vfs.MountSession, error)
ConstructTurn opens VFS trees and builds a TurnManager. On NewTurnManager failure the trees are closed.
func EncodeUserState ¶
EncodeUserState JSON-roundtrips host session state so checkpoint types are stable (numbers become float64) and non-serializable values fail now.
func HasSpecialist ¶
func HasSpecialist(agent tacklr.AgentOptions, name string) bool
HasSpecialist reports whether the agent defines this assistant.
func JobSteer ¶
JobSteer is the RoleUser inbox text when a non-blocking job reaches complete or failed. It is a new message, not a second RoleTool for the schedule call_id.
func NormalizeSpawn ¶
NormalizeSpawn trims spawn_specialist arguments. Specialist is required; empty task allowed for idempotent retry of the same callID.
func OpenTurnVFS ¶
func OpenTurnVFS(ctx context.Context, threadID string, agent tacklr.AgentOptions, bindings []vfs.Binding, proj vfs.Projection) (*vfs.MountSession, error)
OpenTurnVFS builds the turn-scoped MountSession from AgentOptions.OpenVFS. Nil OpenVFS returns nil. A nil projection leaves the session in-process.
func OverlaySpecialist ¶
func OverlaySpecialist(parent tacklr.AgentOptions, specialist string) (tacklr.AgentOptions, error)
OverlaySpecialist copies the named specialist onto the parent agent.
func RestoreTurn ¶
func RestoreTurn(ctx context.Context, store session.SnapshotStore, id session.SessionID, h *tacklr.TurnManager, state map[string]any) (session.Revision, error)
RestoreTurn reloads a snapshot (if any) and applies host session state.
func UnknownChild ¶
UnknownChild is cancel/wait with an id that is not this session's job.
Types ¶
This section is empty.