Commit Graph

4 Commits

Author SHA1 Message Date
Ollie Agent 42cae9ee2e human-friendliness: self-describing ctl, structured errors, status, overview
Make the namespace explain itself instead of requiring prior knowledge.

- ctl is self-describing: reading it (empty write) or writing 'help'
  returns the valid verbs with one-line descriptions; an unknown verb
  errors with the valid list. Refactor dispatch to an ordered []ctlCmd
  carrying descriptions; drop the undocumented '.' alias and the
  drift-prone hardcoded help verb. Keep 'i' (drop 'inject') for fast
  injects. o's ctl usage now reads the live listing.
- Errors carry severity + remediation. backend.ClassifyError maps the
  typed errors to transient/config/fatal with a one-line fix; the error
  event renders [[[error:<severity>]]] and a 'remediation:' line so a
  human knows whether to wait or intervene.
- Add a human status file: 'thinking · 12s', 'calling shell · 3s',
  'idle' — distinct from the machine-facing raw state. Wire the TUI bar
  to it.
- Bare 'o' shows an overview of running sessions/agents with status, so
  you don't need to know any names to get oriented.

Tests: dispatch help/unknown/routing, ClassifyError severity table.
2026-09-07 13:55:45 +02:00
Levi Neely d936ec29a8 format: remove agent dependency from FormatEvent
FormatEvent now takes primitive string arguments instead of agent.Event.
This fixes the dependency direction - format/ should be a leaf package
that agent/, session/, and fs/ depend on, not the other way around.
2026-08-07 10:16:28 +02:00
Levi Neely 21e46b9895 refactor: consolidate event formatting, remove log validator
- Move FormatEvent to format/ package for reuse by both live handler
  and replay
- Move LoadConfig to agent/ package where it belongs
- Remove log validator (was noisy, not essential)
- Update replay to use FormatEvent for consistent output format
- Update kde submodule with GUI streaming fix
2026-08-07 10:11:48 +02:00
Ollie Agent c7f1bec71c refactor: extract format package, ctl dispatcher, and log structure validator
- Extract all [[[block]]] formatting constants/helpers into format/format.go
  (EndTag, RoleDelim, ToolDelim, CallDelim, BlockHeader, ParseBlockHeader, IsEndMarker)
- Replace switch/case ctl dispatchers in fs/handlers.go with generic
  ctlDispatch() from new fs/ctl.go
- Add LogValidator state machine to AgentLog enforcing:
  - Every [[[block]]] MUST have an [[[end]]] marker
  - Blocks SHALL NOT be nested
  - Streaming line buffering across partial writes
  - Fatal failure on first violation with line-number reporting
  - UnclosedAtTeardown() for session/agent teardown checks
- Fix kde/kate ollie_ghost compile: stripPrefixEcho signature mismatch
2026-08-07 08:59:07 +02:00