Documentation
¶
Overview ¶
Package adapter is the Runtime wait-loop glue. Hosts use durable.Runtime, not these functions.
Index ¶
- func ApplyAuth(recipes []durable.MountRecipe, auth durable.AuthContext) []durable.MountRecipe
- func BindingsForTurn(recipes []durable.MountRecipe, auth durable.AuthContext) []vfs.Binding
- func ChildState(st durable.SessionState) string
- func ChildrenNudge(rows []durable.SessionStatus) string
- func CloseTurnTrees(workspace, skills *vfs.MountSession, sessionID, reason string)
- func CloseTurnVFS(ms *vfs.MountSession, sessionID, reason string)
- func EncodeUserState(state map[string]any) (map[string]any, error)
- func MergeUserState(base, overlay map[string]any) map[string]any
- func NormalizeSpawn(specialist, task string) (string, string, error)
- func OpenSkillsVFS(ctx context.Context, threadID string, spec durable.AgentSpec) (*vfs.MountSession, error)
- func OpenTurnSessions(ctx context.Context, threadID string, spec durable.AgentSpec, ...) (workspace, skills *vfs.MountSession, err error)
- func OpenTurnVFS(ctx context.Context, threadID string, spec durable.AgentSpec, ...) (*vfs.MountSession, error)
- func OverlaySpecialist(parent durable.AgentSpec, specialist string) (durable.AgentSpec, error)
- func UnknownChild(id string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyAuth ¶
func ApplyAuth(recipes []durable.MountRecipe, auth durable.AuthContext) []durable.MountRecipe
ApplyAuth updates cached recipes from a work-item AuthContext. Drop is applied first. Bindings with an alias upsert that recipe. Tokens are not stored on the returned recipes.
func BindingsForTurn ¶
func BindingsForTurn(recipes []durable.MountRecipe, auth durable.AuthContext) []vfs.Binding
BindingsForTurn builds the secret-bearing mounts for one activity/turn. Each cached recipe is included when a token for its provider is on auth.
func ChildState ¶
func ChildState(st durable.SessionState) string
ChildState is the tool-facing running/completed/failed for a session.
func ChildrenNudge ¶
func ChildrenNudge(rows []durable.SessionStatus) string
ChildrenNudge is injected when inference would complete while children remain.
func CloseTurnTrees ¶
func CloseTurnTrees(workspace, skills *vfs.MountSession, sessionID, reason string)
CloseTurnTrees closes the agent workspace tree and the host-only skills tree.
func CloseTurnVFS ¶
func CloseTurnVFS(ms *vfs.MountSession, sessionID, reason string)
CloseTurnVFS unmounts a turn-scoped MountSession (FUSE telemetry, Close, host dir).
func EncodeUserState ¶
EncodeUserState JSON-roundtrips host session state so checkpoint types are stable (numbers become float64) and non-serializable values fail now.
func MergeUserState ¶
MergeUserState copies overlay onto a clone of base. Overlay wins on conflict.
func NormalizeSpawn ¶
NormalizeSpawn trims spawn_specialist arguments. Specialist is required; empty task allowed for idempotent retry of the same callID.
func OpenSkillsVFS ¶
func OpenSkillsVFS(ctx context.Context, threadID string, spec durable.AgentSpec) (*vfs.MountSession, error)
OpenSkillsVFS builds the host-only skills MountSession from AgentSpec.OpenSkills. It does not attach a FUSE projection. The agent never receives this session.
func OpenTurnSessions ¶
func OpenTurnSessions(ctx context.Context, threadID string, spec durable.AgentSpec, bindings []vfs.Binding, proj vfs.Projection) (workspace, skills *vfs.MountSession, err error)
OpenTurnSessions opens the agent workspace and the host-only skills tree. On OpenSkills failure the workspace session is closed.
func OpenTurnVFS ¶
func OpenTurnVFS(ctx context.Context, threadID string, spec durable.AgentSpec, bindings []vfs.Binding, proj vfs.Projection) (*vfs.MountSession, error)
OpenTurnVFS builds the turn-scoped MountSession from AgentSpec.OpenVFS. Nil when OpenVFS is nil or the projection is unavailable.
func OverlaySpecialist ¶
OverlaySpecialist copies the parent catalog spec and applies the named Specialist.
func UnknownChild ¶
UnknownChild is get_child/cancel_child with an id that is not this session's child.
Types ¶
This section is empty.