Commit Graph

420 Commits

Author SHA1 Message Date
Levi Neely d3d350efbb prompts: elevation requires proven failure first 2026-07-17 16:04:40 +02:00
Levi Neely b0f187aafb agent-copilot: aggressive no-questions format 2026-07-16 21:56:26 +02:00
Levi Neely aad89cddd9 agent-copilot: strict response format 2026-07-16 21:44:51 +02:00
Levi Neely c1b44f72d8 prompts: add agent-copilot.md 2026-07-16 21:42:01 +02:00
Levi Neely 2e4fdc38a2 prompts: clarify tools-elevate does NOT run as root 2026-07-16 21:08:04 +02:00
Levi Neely b82e4d857a prompts: add tools-image.md for image_read tool 2026-07-16 20:13:21 +02:00
Levi Neely 6c07c308e1 feat: implement 9P mount logic using core execute hooks
Created session/mount.go with all 9P FUSE mount logic previously in core.

Changes:
- New session/mount.go with MountPathFor(), WithMount9P(), and mount lifecycle functions
- WithMount9P() returns execute.Option that wires up OnEnvSet, OnPreDispatch, OnClose hooks
- Updated session.go to use WithMount9P() and MountPathFor() instead of execute.WithMount() and execute.MountPath()
- Mount logic encapsulated in mountState struct with proper synchronization

The mount implementation is now fully contained in the 9p module.
2026-07-08 15:55:23 +02:00
Levi Neely 9ab0fe58b7 add prompts, skills, tools (moved from monorepo root) 2026-07-07 12:07:35 +02:00
Levi Neely 542834b3e4 session: remove $OLLIE mount dependency
- Wire ReadPlanStep directly from sess.plan (no filesystem read)
- Add ListHandlers to ManagerConfig; passed through to AgentCoreConfig
- Hoist skillTree in main.go; populate ListHandlers for tools+skills
- Add ListHandlers to ManagerConfig
2026-06-16 12:30:42 +02:00
Levi Neely 32e8b4fc10 skip auto-mount when running with -tcp 2026-06-16 06:59:10 +02:00
Levi Neely 80c3f20609 add GNU Makefile mirroring mkfile 2026-06-16 06:50:55 +02:00
Levi Neely 23dd7fc490 remove FUSE mount responsibility from olliesrv 2026-06-15 13:31:10 +02:00
Levi Neely 921d46d2e5 Update main.go 2026-06-01 09:53:08 +02:00
ollie 60da0bbfde token efficiency: expose compactionModel in 9p cfg, fix test stubs
- Add compactionModel= to cfg read/write
- Add CompactionModel/SetCompactionModel stubs to test stubCore
- Fix NewSessionTree calls with missing invalidateModels arg
2026-05-28 18:44:57 +02:00
Levi Neely d8bd47c545 chat log: switch from line-prefix to [role] header block format 2026-05-25 23:15:02 +02:00
Levi Neely 200cb52e29 Add model cache with async prefetch and invalidate command
- Add ModelCache that prefetches models from all backends at startup
- Cache models in memory, refresh on demand via Invalidate()
- Add global /ctl file with 'invalidate' command
- Add 'invalidate' ctl command and /invalidate slash command in sessions
- Fix filePerm to query rootStore for root-level file permissions
- Add 'models' to root directory listing
2026-05-22 10:08:11 +02:00
Levi Neely 5d952633f8 add /models endpoint to root store 2026-05-21 18:49:38 +02:00
Levi Neely e7dd3987ef refactor session handling 2026-05-21 14:42:39 +02:00
Levi Neely 06a3e0f503 update session handling 2026-05-21 12:33:11 +02:00
Levi Neely 09e4f0f678 fs: centralized permission registry; FUSE mutating operations 2026-05-21 11:50:34 +02:00
Levi Neely e77c5a09f4 Format exec events with $ prefix instead of code blocks 2026-05-20 17:24:12 +02:00
Levi Neely e101db2079 session: format exec events with code fences 2026-05-20 16:49:44 +02:00
Levi Neely afb531c936 session: subscribe to event bus for chat log, drop handler from Submit
- NewSession subscribes to bus "event" topic for chat log writing
- Remove makePublish/handler threading from all Submit call sites
- Adapt tests to new bus-based event delivery
2026-05-20 16:45:37 +02:00
Levi Neely 518a31a1e2 mkfile: install ollie-9p-mount to $HOME/bin 2026-05-20 14:16:16 +02:00
Ollie 79313c2796 Deploy ollie-9p-mount to $HOME/.config/ollie/scripts/x 2026-05-20 13:59:55 +02:00
Levi Neely ab909b1fec Revert "sessionfile: prompt 0446 (r--r--rw-)"
This reverts commit 6994b9bc3e.
2026-05-20 11:10:26 +02:00
Levi Neely 6994b9bc3e sessionfile: prompt 0446 (r--r--rw-) 2026-05-20 11:10:12 +02:00
Levi Neely b381fa4b13 ollie-9p-mount: pass through actual 9P permissions
p9File.Getattr was hardcoding 0666 for all files, breaking
permission visibility in per-session mounts. Use the actual
mode from the 9P stat response instead.
2026-05-20 11:08:48 +02:00
Levi Neely 06ddf36de3 openStore: use sess.id instead of captured variable 2026-05-20 10:57:10 +02:00
Levi Neely 35e7b98e22 sessionfile: update ctl mode to 0666 2026-05-20 10:43:22 +02:00
Levi Neely baa7ca66e6 makeStat: delegate file modes to backing tree
Remove hardcoded permission switch in makeStat and delegate to
the underlying FileTree.Stat() instead. This makes FileList in
sessionfile.go the single source of truth for session file modes.
2026-05-20 10:42:29 +02:00
Levi Neely fe6e2c04a8 cfg: add name field, support name= writes as rename 2026-05-20 09:59:30 +02:00
Levi Neely 3df852b6de cfg: remove state field (use state file instead) 2026-05-20 09:53:39 +02:00
Levi Neely 57eb330d16 purge all 'store' vocabulary from code and comments 2026-05-19 18:40:33 +02:00
Levi Neely 038dc4b0bf purge Store/FileStore vocabulary: use Tree everywhere
- Manager.Store() → Manager.Tree()
- SessionFileStore → removed (use *fs.Tree)
- NewFileStore → NewSessionTree
- storeRead/storeWrite → readFile/writeFile
- storeRoutes → routes, routeStore → route
- SkillStore → SkillTree, ToolStore → ToolTree
- No more 'store' in public API
2026-05-19 18:39:02 +02:00
Levi Neely 46b01c759d inline root.go and tool.go into main.go 2026-05-19 18:33:39 +02:00
Levi Neely 2e0adffa75 main.go owns wiring: constructs all trees, passes Config to server
- server.New takes server.Config (no more internal construction)
- OnRename removed: wstat handles all fid rewriting directly
- WithStrict/WithYolo removed (passed via ManagerConfig)
- Default dir functions moved to main.go
- tool.go and root.go in main package (wiring)
- Server is now a pure protocol handler
2026-05-19 18:32:19 +02:00
Levi Neely 21f39c1d55 move tool.go and root.go into server/ (they're server wiring, not fs abstractions) 2026-05-19 18:21:14 +02:00
Levi Neely a9e9538015 rename to 9P vocabulary: store/ → fs/, DirStore → Tree, StoreEntry → File
- Package: store → fs
- Type: DirStore → Tree, StoreEntry → File, EntryConfig → FileConfig
- Constructor: NewDirStore → NewTree, NewFileStore → NewSynth
- Methods: ListDir → Readdir, WithListDir → WithReaddir
- Interface: Store → FileTree
- Files: dirstore.go → tree.go, filestore.go → synth.go, store.go → fs.go
- Test: store_test.go → fs_test.go
2026-05-19 18:19:37 +02:00
Levi Neely 56bcb87ff6 server/server.go: 9P server in its own package
- server.New, server.Option, server.WithStrict, server.WithYolo
- main.go is now just wiring and CLI
- Clean package boundary: server/ = protocol, session/ = lifecycle, store/ = abstraction
2026-05-19 18:12:32 +02:00
Levi Neely d0ce8a108e session/session.go: session logic in its own package
- session.Manager (was SessionManager)
- session.ManagerConfig (was SessionManagerConfig)
- session.Session, session.NewSession
- session.FileStore, session.NewFileStore
- session.FileMode, session.FileList
- session.FormatEvent, session.FormatParams, session.ParseParams
- server.go imports olliesrv/session
- Clean package boundary: session/ = lifecycle, store/ = abstraction
2026-05-19 18:10:36 +02:00
Levi Neely 5ca93e685f remove test binary 2026-05-19 18:07:10 +02:00
Levi Neely 52ad150c22 restructure: session logic out of store/, stores into store/
- session.go, sessionfile.go: moved to main package (lifecycle)
- store/tool.go, store/root.go: store constructors where they belong
- main_test.go: session tests in main package
- store/store_test.go: only store-level tests remain
- Removed: root.go, tools.go from main (moved to store/)
- Clean separation: store/ = abstraction, main = domain
2026-05-19 18:07:00 +02:00
Levi Neely 6b1ba9a998 split store constructors into own files: tools.go, root.go 2026-05-19 17:47:13 +02:00
Levi Neely 46c025b594 fix empty session directories: add WithListDir hook
DirStore.ListDir now uses listDirFn when set.
SessionManager wires ListDir through the hook so
session subdirectory listing works via the DirStore view.
2026-05-19 17:43:48 +02:00
Levi Neely 18aaddd8b1 fix wstat panic on session rename
OnRename callback already rewrites fid paths, so by the time
wstat's fid update runs, f.path has changed. Use relPath for
the new path computation instead of slicing f.path.
2026-05-19 17:40:26 +02:00
Levi Neely 4faa341558 rename sessionStore field to sessionMgr 2026-05-19 17:34:14 +02:00
Levi Neely 60d140acba separate SessionManager (lifecycle) from DirStore (view)
SessionManager no longer embeds *DirStore. Instead:
- SessionManager.Store() returns the DirStore view
- Server uses mgr.Store() in route table, mgr for lifecycle
- DirStore gains WithStat hook for custom stat logic
- Removed: RunnableStore interface, storeConfig type
- Tests updated to use .Store() for store operations
2026-05-19 17:33:31 +02:00
Levi Neely f5841c4a0f one store type: DirStore is the only concrete Store implementation
- RunFileStore replaced by NewFileStore() returning *DirStore
- SessionStore now embeds *DirStore with hooks
- Removed: storeConfig, RunnableStore, RunFileStore, runfilestore.go
- New filestore.go: NewFileStore builds DirStore from FileSpec table
- DirStore.Stat uses opener for synthetic files
- Runnable concern stays on Session (not on store)
2026-05-19 17:21:16 +02:00
Levi Neely 30e171c1ba DirStore: add sub-store mounting (Mount/Unmount/Child)
All methods delegate to children when path contains '/'.
Children appear as directory entries in List().
Enables hierarchical namespace composition.
2026-05-19 17:14:11 +02:00