adapter

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package adapter is the Runtime wait-loop glue. Hosts use session.Runtime, not these functions.

Index

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

func AppendMessages(box []*tacklr.Message, msgs ...*tacklr.Message) []*tacklr.Message

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

func EncodeUserState(state map[string]any) (map[string]any, error)

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

func JobSteer(id, name, body string, failed bool) *tacklr.Message

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

func NormalizeSpawn(specialist, task string) (string, string, error)

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

func UnknownChild(id string) error

UnknownChild is cancel/wait with an id that is not this session's job.

Types

This section is empty.

Jump to

Keyboard shortcuts

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