This repository has been archived on 2026-08-16. You can view files and clone it, but cannot push or open issues or pull requests.
ollie-core/session
Levi Neely eef52beb74 session: move Submit/executeTurn to *Agent receiver
Agent now owns the full turn lifecycle: Submit, executeTurn, turnError,
autoCompactLimit, autoWarnLimit, spawnContext, and runCompact all live
on *Agent in turn.go.

Session.Submit is a thin dispatcher: slash commands are handled at
session level (they need sessionsDir, listHandlers, etc.), then
non-command input is delegated to Agent.Submit.

Session.IsRunning and Session.Interrupt delegate to Agent methods.

turnError is an overridable func field on Agent (default: hook-based
implementation in defaultTurnError). saveSession and flushSave are
injected as callbacks from Session into Agent at construction time.

This completes the agent/session ownership separation for the turn
execution path. The Agent is now a self-contained entity that can
run turns independently given its injected dependencies.
2026-07-29 21:16:59 +02:00
..
agent.go session: move Submit/executeTurn to *Agent receiver 2026-07-29 21:16:59 +02:00
agent_config.go session: rename config.go → agent_config.go, update README 2026-07-29 19:18:04 +02:00
commands.go session: move Submit/executeTurn to *Agent receiver 2026-07-29 21:16:59 +02:00
compaction.go rename agent/ → session/, absorb session.Session into harness 2026-07-29 19:13:26 +02:00
compaction_test.go rename agent/ → session/, absorb session.Session into harness 2026-07-29 19:13:26 +02:00
config_test.go rename agent/ → session/, absorb session.Session into harness 2026-07-29 19:13:26 +02:00
core_test.go session: move Submit/executeTurn to *Agent receiver 2026-07-29 21:16:59 +02:00
cost.go rename agent/ → session/, absorb session.Session into harness 2026-07-29 19:13:26 +02:00
cost_test.go rename agent/ → session/, absorb session.Session into harness 2026-07-29 19:13:26 +02:00
fifo.go session: new package for agent runtime environment 2026-07-29 18:23:04 +02:00
fifo_test.go rename agent/ → session/, absorb session.Session into harness 2026-07-29 19:13:26 +02:00
history.go session: rename PersistedSession → PersistedAgent 2026-07-29 20:57:13 +02:00
hooks.go rename agent/ → session/, absorb session.Session into harness 2026-07-29 19:13:26 +02:00
loop.go rename agent/ → session/, absorb session.Session into harness 2026-07-29 19:13:26 +02:00
loop_cache_test.go rename agent/ → session/, absorb session.Session into harness 2026-07-29 19:13:26 +02:00
loop_errlimit_test.go rename agent/ → session/, absorb session.Session into harness 2026-07-29 19:13:26 +02:00
loop_maxsteps_helpers_test.go rename agent/ → session/, absorb session.Session into harness 2026-07-29 19:13:26 +02:00
loop_maxsteps_test.go rename agent/ → session/, absorb session.Session into harness 2026-07-29 19:13:26 +02:00
loop_parallel_test.go rename agent/ → session/, absorb session.Session into harness 2026-07-29 19:13:26 +02:00
loop_truncate_test.go rename agent/ → session/, absorb session.Session into harness 2026-07-29 19:13:26 +02:00
loop_turnerror_test.go session: move Submit/executeTurn to *Agent receiver 2026-07-29 21:16:59 +02:00
prompt_resolver.go rename agent/ → session/, absorb session.Session into harness 2026-07-29 19:13:26 +02:00
runtime.go rename agent/ → session/, absorb session.Session into harness 2026-07-29 19:13:26 +02:00
session.go session: move Submit/executeTurn to *Agent receiver 2026-07-29 21:16:59 +02:00
state.go rename agent/ → session/, absorb session.Session into harness 2026-07-29 19:13:26 +02:00
turn.go session: move Submit/executeTurn to *Agent receiver 2026-07-29 21:16:59 +02:00
usage_log.go rename agent/ → session/, absorb session.Session into harness 2026-07-29 19:13:26 +02:00
waitchange_test.go session: move state/reply to Agent 2026-07-29 20:10:42 +02:00