Commit Graph

6 Commits

Author SHA1 Message Date
Levi Neely d9920b42c7 session: merge harness.go into session.go
The Session struct is defined in session.go — named after what it is.
No more 'harness' concept; that was an artifact of the interface+impl
pattern we removed.
2026-07-29 19:29:49 +02:00
Levi Neely 5db3eb5138 session: remove Session interface, export concrete struct
Session is now an exported struct with unexported fields.
Methods ARE the API — no interface declaration in the package.
Consumers that need mockability define their own interface
(implicit satisfaction, standard Go pattern).
2026-07-29 19:25:14 +02:00
Levi Neely 916b31ee89 session: rename exports for clean public API
- Core interface → Session interface
- NewAgentCore → New
- AgentCoreConfig → Config
- Config (agent JSON) → AgentConfig
- types.go → session.go (defines Session interface)
- session.go → history.go (History type, persistence)
2026-07-29 19:17:00 +02:00
Levi Neely 6ee949bd7c rename agent/ → session/, absorb session.Session into harness
The agent/ package is now session/ — because a session is the
top-level concept. The package contains:
- harness: implements Core, the session orchestrator
- Agent: the reasoning entity (history, runtime, tools)
- History: conversation accumulator
- Fifo, loop, compaction, hooks, commands

The old session/ package (which just held extracted fields) is
dissolved back into the harness. One package, clean ownership.
2026-07-29 19:13:26 +02:00
Levi Neely e10319758b session: add plan, prevPrompt, peers to Session
Extend the core session with fields that are genuinely session
concerns currently duplicated in 9p/session:
- Plan (markdown checklist, survives compaction)
- PrevPrompt (last submitted prompt text)
- Peers (bidirectional session links)

The 9p/session layer can delegate to these in a future change.
2026-07-29 18:36:59 +02:00
Levi Neely 457ec2312f session: new package for agent runtime environment
Defines Session (ID, CWD, state, env, bus, FIFO) as the runtime
environment that hosts an agent. This is the foundation for separating
session concerns from agent reasoning concerns.
2026-07-29 18:23:04 +02:00