Documentation
¶
Overview ¶
Package claudesessions adapts native Claude Agent SDK sessions to Orb events. Its host runs the official SDK and an unmodified Claude executable; Orb never reads, copies, refreshes or proxies Claude credentials.
Index ¶
- Constants
- func Configure(cfg *agent.SessionRuntimeConfig, agentDir string, env []string) (bind func(*agent.SessionRuntime), err error)
- func Factory(options Options) agent.CreateAgentSessionRuntimeFactory
- func Management(settings *config.SettingsManager, agentDir string, env []string) extensions.Factory
- func Model(provider, model *string, settings *config.SettingsManager) *ai.Model
- func RestoreSelection(state session.SessionContext, provider, model **string, ...)
- type Driver
- type Options
Constants ¶
const Name = "claude-sessions"
const SDKVersion = "0.3.278"
Variables ¶
This section is empty.
Functions ¶
func Configure ¶
func Configure(cfg *agent.SessionRuntimeConfig, agentDir string, env []string) (bind func(*agent.SessionRuntime), err error)
Configure composes a driver into the same runtime configuration used by all Orb hosts. bind must run before exposing the created runtime to controllers.
func Factory ¶
func Factory(options Options) agent.CreateAgentSessionRuntimeFactory
Factory rebuilds the plugin attachment for every SDK session replacement. The caller supplies storage in AgentSessionOptions and owns runtime disposal.
func Management ¶
func Management(settings *config.SettingsManager, agentDir string, env []string) extensions.Factory
Management exposes the dormant capability through a native command and palette entry. Installing dependencies and starting sessions are explicit user actions.
func Model ¶
func Model(provider, model *string, settings *config.SettingsManager) *ai.Model
Model selects this capability only for an explicit or restored Claude session.
func RestoreSelection ¶
func RestoreSelection(state session.SessionContext, provider, model **string, branch ...session.SessionEntry)
RestoreSelection retains the native executor even when a CLI host carries startup defaults for another provider. An executor change requires a new session.
Types ¶
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
func (*Driver) Loop ¶
func (d *Driver) Loop(ctx context.Context, prompts engine.AgentMessages, state engine.AgentContext, config engine.AgentLoopConfig, emit engine.EventSink) error
Loop owns the complete native turn. Orb queues are drained only between native turns, so no tool is executed twice by an outer Orb agent loop.