Commit Graph

1742 Commits

Author SHA1 Message Date
Ollie Agent e375126adf o tui: clear chat pane before tail 2026-08-04 18:54:16 +02:00
Ollie Agent cd18539280 o tui: add /quit and /q slash commands 2026-08-04 18:53:01 +02:00
Ollie Agent 0923633624 o tui: remove shell pane, replace state pane with tmux status bar 2026-08-04 18:52:01 +02:00
Levi Neely 853117758c fs: add trailing newlines to all static read/request handlers
POSIX compliance - text files should end with newlines.

Fixed handlers:
- requestComplete, requestGenerate, requestRoute
- readSessionName, readSessionID
- readAgentCost, readAgentSystemprompt, readAgentName, readAgentID
2026-08-04 17:27:32 +02:00
Levi Neely 0f29757dac o: add generate command for one-shot prompts
Uses /generate 9P file - no session/agent context needed.
Example: o generate 'explain monads'
2026-08-04 17:25:17 +02:00
Levi Neely 865378c150 docs: fix SLOC count (kde gui only, note on comparison) 2026-08-04 17:21:13 +02:00
Levi Neely 01951ff1ef docs: add SLOC summary for Aug 4 2026-08-04 17:20:20 +02:00
Levi Neely 52f2a36ccf docs: clarify EDSL was created Aug 2, extracted Aug 3 2026-08-04 17:18:58 +02:00
Levi Neely 836fb2c8b7 docs: fix ollie-watchdog removal reason (9P client, not systemd) 2026-08-04 17:17:46 +02:00
Levi Neely cc2a96b78f docs: fix mount/ removal reason (ollie-9p, not ollie-remount) 2026-08-04 17:17:26 +02:00
Levi Neely 86d3b35d38 docs: clarify acme frontend reason 2026-08-04 17:16:50 +02:00
Levi Neely 00f546bb25 docs: fix acme frontend replacement (o CLI, not ollie-9p) 2026-08-04 17:16:28 +02:00
Levi Neely be7c48ea07 docs: add Phase 19 to evolution.md (Aug 3-4)
- fsedsl library extraction
- fs/ package consolidation (flat, by scope)
- Session/Agent split refactors
- Dead code removal (cmd/Ollie, mount/, ollie-watchdog)
- o CLI improvements (explicit context, TUI percentages)
- Update gantt chart to Aug 4
2026-08-04 17:15:32 +02:00
Levi Neely 59fb7d5561 o tui: use percentage-based layout instead of fixed sizes
- Right column: 25% width
- State/shell: 50/50 split
- Prompt: 20% height
- Adapts to terminal size
2026-08-04 17:09:53 +02:00
Levi Neely 77d589f98b o tui: filter out [[[...]]] block markers from chat stream 2026-08-04 17:05:52 +02:00
Levi Neely 69fc98099c docs: update for o CLI changes and remove mount/watchdog references
- Remove mount/ from repo layout (no longer exists)
- Remove ollie-watchdog references (removed)
- Update o CLI docs: explicit context required, no auto-select
- Add path resolution section explaining root/session/agent paths
- Add write and readloop commands to table
- Fix o tui to show readloop statewait (not read)
2026-08-04 17:04:38 +02:00
Levi Neely abdc91d097 remove mount/ package references and ollie-watchdog
- mount/ package no longer exists, remove from build/test rules
- remove ollie-watchdog script (unused)
- keep ollie-remount (still needed for FUSE recovery)
2026-08-04 16:58:44 +02:00
Levi Neely 05517c384a o: simplify path resolution, remove auto-session/agent
- Remove auto-resolution of session/agent (was slow, unexpected)
- Path classification determines required context level immediately
- Errors are fast and actionable with clear fix instructions
- Root-level paths work without any context
- o env now just prints export statements without requiring context
2026-08-04 16:57:01 +02:00
Levi Neely 214242ba44 Remove outdated doc files 2026-08-04 16:41:20 +02:00
Levi Neely 68f0fe8ef9 Rename doc/ files to lowercase kebab-case 2026-08-04 16:41:07 +02:00
Levi Neely 111f1f89e2 Remove doc/experiments/ - too historical 2026-08-04 16:39:45 +02:00
Levi Neely 6b3913a524 Remove experiments/ - concept proven 2026-08-04 16:39:15 +02:00
Levi Neely 593584a673 Move mount/ package to ollie-9p
FUSE mount is a client-side QoL feature, not a server concern.
Usage: ollie-9p mount <address> [mountpoint]
2026-08-04 16:38:44 +02:00
Levi Neely c6152688bc Update kde submodule: remove sidebar state dots 2026-08-04 16:33:41 +02:00
Levi Neely fbb2a767f6 session: pause/resume persistence, restore paused sessions without spawning processes
- Skip SetupToolServer for paused sessions during restore
- Pause() and Resume() now persist state to disk
- Resume() sets up tool server from scratch for sessions restored paused
- IsConnected() returns false when paused
- Add SetPaused(), SetToolServer() methods
- ProcessKeeper.SetContext() for resume after pause
- Session index sorts active-first, paused-last
- CreateAgent accepts name= parameter
- Remove duplicate SetCwd method
2026-08-04 16:05:22 +02:00
Levi Neely d200fbad05 refactor: promote remote to session level
- CreateEmpty(name, remote) now spawns remote toolsrv when remote is set
- requestSessionNew parses remote= argument
- Add Session.SetRemote() method
- Update kde submodule
2026-08-04 15:22:18 +02:00
Levi Neely e1b732f09a fix: wire up agent state change events to event bus
SetOnStateChange was defined but never called. Now agents publish
state changes to 'session.{sid}.agent.{aid}.state' which eventwait
can receive.
2026-08-04 14:40:30 +02:00
Levi Neely f21cd99845 fix: eventwait should use BlockOnce, not Stream
eventwait returns a single event then closes, like statewait.
Stream is for continuous data like chat.
2026-08-04 14:39:26 +02:00
Levi Neely 86f7c54805 refactor: rename saveSession/flushSave to save/flush, remove legacy restore
- Rename AgentCfg.SaveSession/FlushSave to Save/Flush for brevity
- Remove restoreLegacySession — all sessions now use multi-agent format
- Pass Save/Flush callbacks to agents in CreateAgent and restore paths
- Add AuditLog fallback warning in NewAgent
2026-08-04 14:38:09 +02:00
Levi Neely f348b968a2 fix: wire up event handler so chat stream receives events
After the fs/session refactor, NewEventHandler was defined but never
called. Agents created via session restore or CreateAgent had nil
output handlers, so emit() was a no-op and the chat stream stayed empty.

- Add Agent.SetOutput() to allow setting the event handler post-creation
- Wire up SetOutput(NewEventHandler(al)) in fs/newroot.go for restored sessions
- Wire up SetOutput(NewEventHandler(al)) in fs/handlers.go for new agents
- Also includes expanded UsageStats fields and TaskState persistence
2026-08-04 14:21:45 +02:00
Levi Neely 3cfbd14203 fix: unify session persistence to preserve name on restart
- flushSave and SaveSession now use PersistSession instead of
  agent.SaveFull, ensuring the multi-agent format with Name field
  is consistently written
- Rename now calls PersistSession immediately so renamed sessions
  survive server restart

The previous approach had two save formats (legacy single-agent via
agent.SaveFull, and new multi-agent via PersistSession) writing to
the same file. Since flushSave ran on every turn, it would overwrite
the Name field with the legacy format that didn't preserve it.
2026-08-04 14:11:14 +02:00
Levi Neely 5a9d605840 fix: persist session name correctly
flushSave and SaveSession were passing empty string instead of
a.Name() as the sessionName argument to agent.SaveFull, causing
the session name to be lost on restart.
2026-08-04 14:08:02 +02:00
Levi Neely 5678ee723a remove: acme backend (cmd/Ollie)
Replaced by the 'o' command which provides a simpler interface.
2026-08-04 14:04:26 +02:00
Levi Neely b1c74d3121 refactor: remove fs/persist.go, inline calls to session package
- Delete fs/persist.go (thin wrappers no longer needed)
- handlers.go: call session.PersistSession() directly
- newroot.go: inline restore logic with AgentLog creation
2026-08-04 14:03:23 +02:00
Levi Neely 4ae1584887 refactor: move persistence to session/, support multi-agent sessions
session/persist.go:
- New multi-agent format: PersistedSession with []PersistedAgent
- PersistSession saves ALL agents, not just first
- RestoreAllSessions returns []RestoredSession with []RestoredAgent
- Backward compatible: restores legacy single-agent format

fs/persist.go:
- Thin wrapper that creates AgentLogs for each restored agent
- Delegates to session.PersistSession/RestoreAllSessions

agent/agent.go:
- Added Messages() to get conversation history
- Added Usage() to get token/cost stats

agent/history.go:
- Added RestoreHistoryFromMessages for multi-agent restore

session/session.go:
- Added Remote() getter
2026-08-04 14:02:15 +02:00
Levi Neely 7fc183c5cb refactor: eliminate Manager type, use package-level session registry
- session/registry.go: package-level vars + functions replace Manager struct
- session.Init() initializes package config
- session.Sessions(), Lookup(), Register(), Kill(), Rename() etc are now top-level
- fs/ calls session.X() directly instead of rs.Manager.X()
- Same thread safety via package-level sync.RWMutex
2026-08-04 13:55:45 +02:00
Levi Neely 2aa7db8445 refactor: split fs/ and session/ packages
session/ now owns all session business logic:
- Manager: session lifecycle (create, kill, rename, lookup)
- CreateAgent: agent creation within sessions
- SetupToolServer, BuildPromptLayers, LoadAutoLoadTools
- PublishEvent for SSE notifications
- NextUname generation

fs/ is now a thin 9P presentation layer:
- SessionNode wraps session.Session, adds AgentLogs and models cache
- RootState caches SessionNodes (GetOrCreateNode pattern)
- Handlers delegate to session.Manager
- persist.go uses session package for restore logic
2026-08-04 13:52:28 +02:00
Levi Neely 757d81a4ba fs: pass sessID and uname to LoadAutoLoadTools for tool server env setup 2026-08-04 13:21:37 +02:00
Levi Neely bf80a63e8a fs: extract session setup, remove dead code and adapter
- Extract SetupToolServer, BuildPromptLayers, LoadAutoLoadTools into setup.go
- Deduplicate session infrastructure setup between CreateAgent and restoreSession
- Delete adapter.go, move HandlerCtx and type aliases into spec.go
- Delete session.go (only contained unused Get/All functions)
- Remove unused: GlobalRootState, PostEvent, LookupByUname, AddSession,
  CreateAgentFromRoot, KillFromRoot, RenameFromRoot, Session.Interrupt,
  Session.SetDisallowTools, Session.RunnableID
- Replace RunnableID() calls with ID()
- Remove comment banners

Net: -131 lines, better DRY compliance
2026-08-04 13:04:31 +02:00
Levi Neely 1f173f1b41 fs: delete redundant tree_test.go (covered by fsedsl) 2026-08-04 12:52:02 +02:00
Levi Neely edc38f7353 fsedsl: simplify README usage section 2026-08-04 12:48:39 +02:00
Levi Neely aaacae40a8 fs: simplify adapter to type aliases only
- Remove wrapper functions from adapter.go (212 → 91 lines)
- Delete redundant adapter_test.go (fsedsl has 94.8% coverage)
- Add local function aliases in spec.go for clean EDSL usage
- Update handlers.go, newroot.go, tree_test.go to use fsedsl directly
- Update fsedsl README with cleaner integration pattern
2026-08-04 12:47:17 +02:00
Levi Neely 19e255c869 fs: remove unnecessary type parameters where inference works
Go can infer [HandlerCtx] from function argument types. Only DirNode
needs explicit type parameter since its args are ...any.
2026-08-04 12:35:50 +02:00
Levi Neely ae6b833d1e fsedsl: remove Adapter, use generic functions directly
The Adapter was pure boilerplate - every method just delegated to the
package-level generic function. Removing it simplifies the API:

- Delete fsedsl/adapter.go
- Update fs/adapter.go to call fsedsl functions directly
- Update README.md to document direct usage
- Remove adapter tests (now redundant)

Coverage remains at 94.8%.
2026-08-04 12:33:03 +02:00
Levi Neely 44f5238538 fsedsl: comprehensive test coverage (95.8%)
- Add tests for Adapter methods (NewAdapter, all wrapper methods)
- Add tests for all NodeOption functions (Stream, BlockOnce, Request,
  CreateFile, RemoveNode, StatOverride, UID, GID, Alias, Bind)
- Add tests for Tree mount/child/split operations
- Add tests for FileConfig methods and mode validation
- Add tests for SyntheticFileInfo and SyntheticEntry
- Add tests for builder delete/rename operations
- Add tests for blocking/streaming read modes in openLeaf
- Add tests for validation panics
- Add tree_test.go for filesystem-backed Tree operations:
  - Create, Delete, Rename, MkdirAll
  - ReadOnly mode enforcement
  - Union directories
  - Child delegation
  - Resolver and opener fallbacks

Coverage improved from 45.5% to 95.8%
2026-08-04 12:27:47 +02:00
Levi Neely 2c8cbe23ca Rename fs/edsl_test.go -> fs/adapter_test.go 2026-08-04 12:15:43 +02:00
Levi Neely 6b5b2830ef Make fsedsl description protocol-agnostic
The EDSL is not specific to 9P - it produces a generic Tree
that works with any filesystem protocol or as in-memory storage.
2026-08-04 12:11:36 +02:00
Levi Neely 0d50898bd7 Fix fsedsl installation instructions
The library is embedded in ollie, not published separately yet.
Document how to use replace directives to import it.
2026-08-04 12:10:01 +02:00
Levi Neely 5ec5f31135 Update fsedsl README with integration guide
- Add step-by-step integration guide for other projects
- Document the adapter pattern with complete examples
- Add API reference with tables for constructors and options
- Document Binding struct and Tree operations
- Link to ollie/fs/adapter.go as real-world example
2026-08-04 12:09:33 +02:00
Levi Neely 94d0c18b01 Rename fs/edsl.go -> fs/adapter.go
The file builds an fsedsl adapter - the name should reflect that.
2026-08-04 12:07:40 +02:00