agent: rename reasoning → Agent

The inner struct that holds agent-specific state (history, runtime,
backend, tools, hooks) is now called Agent — because that's what it
is. A session owns an Agent; the Agent performs reasoning within
the session's environment.
This commit is contained in:
Levi Neely 2026-07-29 18:42:28 +02:00
parent e10319758b
commit 1aebc49d4e
2 changed files with 6 additions and 6 deletions

View File

@ -311,7 +311,7 @@ type AgentCoreConfig struct {
// but has no knowledge of how output is rendered. // but has no knowledge of how output is rendered.
type agent struct { type agent struct {
sess *session.Session sess *session.Session
r *reasoning r *Agent
log *olog.Logger log *olog.Logger
sessionsDir string sessionsDir string
readPlanStep func() string readPlanStep func() string
@ -459,7 +459,7 @@ func NewAgentCore(cfg AgentCoreConfig) Core {
Uname: cfg.Uname, Uname: cfg.Uname,
CWD: paths.ExpandHome(cfg.CWD), CWD: paths.ExpandHome(cfg.CWD),
}), }),
r: &reasoning{ r: &Agent{
history: cfg.History, history: cfg.History,
runtime: rt, runtime: rt,
agentName: cfg.AgentName, agentName: cfg.AgentName,

View File

@ -8,11 +8,11 @@ import (
"ollie/tools" "ollie/tools"
) )
// reasoning holds the state of the current reasoning entity (the "agent" // Agent holds the state of the current Agent entity (the "agent"
// in the traditional sense). It is swappable: when the user runs /agent, // in the traditional sense). It is swappable: when the user runs /agent,
// a new reasoning is built from the new agent config while the session // a new Agent is built from the new agent config while the session
// host remains stable. // host remains stable.
type reasoning struct { type Agent struct {
history *History history *History
runtime *Runtime runtime *Runtime
cfg agentConfig // per-turn config built from runtime cfg agentConfig // per-turn config built from runtime
@ -28,7 +28,7 @@ type reasoning struct {
} }
// Backend returns the active backend from the runtime. // Backend returns the active backend from the runtime.
func (r *reasoning) Backend() backend.Backend { func (r *Agent) Backend() backend.Backend {
if r.runtime == nil { if r.runtime == nil {
return nil return nil
} }