sessbind

package
v0.3.29 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AgentBind

AgentBind returns the per-session agent override, or "" when unset.

func GlobalAgentBind

func GlobalAgentBind(ctx context.Context, ws workspace.Service) (agentkit.AgentID, error)

GlobalAgentBind returns the workspace-wide default agent id, or "" when unset.

func GlobalModelBind

func GlobalModelBind(ctx context.Context, ws workspace.Service, agentID agentkit.AgentID) (string, error)

GlobalModelBind returns the global default model for agentID, or "" when unset.

func ModelBind

func ModelBind(ctx context.Context, store agentkit.SessionStore, id agentkit.SessionID) (string, error)

ModelBind returns the per-session model override, or "" when unset.

func ResolveActiveSessionID

func ResolveActiveSessionID(ctx context.Context, store agentkit.SessionStore, entryKey agentkit.SessionID) (agentkit.SessionID, error)

ResolveActiveSessionID maps a stable active-session entry key to the current history SessionID. When no /new mapping exists, entryKey is returned unchanged.

func ResolveAgentID

func ResolveAgentID(
	ctx context.Context,
	store agentkit.SessionStore,
	ws workspace.Service,
	sessionID agentkit.SessionID,
	eventAgent agentkit.AgentID,
) (effective, sessionBind, globalBind agentkit.AgentID, err error)

ResolveAgentID applies session bind, global default, then explicit event agent id.

func ResolveEffectiveModel

func ResolveEffectiveModel(
	ctx context.Context,
	store agentkit.SessionStore,
	ws workspace.Service,
	sessionID agentkit.SessionID,
	agentID agentkit.AgentID,
	defaultModel string,
) (effective, sessionOverride, globalOverride string, err error)

ResolveEffectiveModel applies session override, then global (per agent), then defaultModel.

func RuntimeStore

RuntimeStore returns the session runtime overlay capability when present.

func SetGlobalAgentBind

func SetGlobalAgentBind(ctx context.Context, ws workspace.Service, agent agentkit.AgentID) error

SetGlobalAgentBind sets or clears the workspace-wide default agent id.

func SetGlobalModelBind

func SetGlobalModelBind(ctx context.Context, ws workspace.Service, agentID agentkit.AgentID, model string) error

SetGlobalModelBind sets or clears the global default model for agentID.

func SetSessionAgentBind

func SetSessionAgentBind(ctx context.Context, store agentkit.SessionStore, id agentkit.SessionID, agent agentkit.AgentID) error

SetSessionAgentBind sets or clears the per-session agent override.

func SetSessionModelBind

func SetSessionModelBind(ctx context.Context, store agentkit.SessionStore, id agentkit.SessionID, model string) error

SetSessionModelBind sets or clears the per-session model override.

Types

type GlobalRuntimeData

type GlobalRuntimeData struct {
	AgentID agentkit.AgentID  `json:"agentId,omitempty"`
	Models  map[string]string `json:"models,omitempty"`
}

GlobalRuntimeData holds workspace-wide dynamic overrides.

Jump to

Keyboard shortcuts

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