Commit Graph

12 Commits

Author SHA1 Message Date
Ollie Agent fbe8059cf5 maintainability: docs, contracts, structural cleanup
- doc/boot-sequence.md: init chain from main → fs.NewRoot → session.Init
- Event protocol: comprehensive table on Event struct (all roles, semantics)
- RPC server moved from cmd/ollie-remote into toolsrv/rpcserver.go
  (binary is now a 93-line thin wrapper)
- SetSessionEnv folded into NewAgent (no post-construction wiring needed)
- AgentCfg → AgentParams (distinguish from AgentConfig JSON schema)
- ToolResult/ToolResultContent shared types in toolsrv/rpcwire.go
- toolsrv/shell.go → toolsrv/exec.go (name matches purpose)
- Resume unified: single path, always through Keeper
- AGENTS.md: fix fs/builder.go → fsedsl/builder.go, handlers_*.go
- fsedsl/Tree: document dual-mode (EDSL lazy vs Manual Mount)
- Truncation stack documented at defaultToolResultMaxBytes
- Integration test rewritten to use srv.ServeRPC directly
2026-08-09 21:45:56 +02:00
Ollie Agent f5efd90fbe refactor: audit fsedsl exports — remove dead code, unexport internals
Dead code removed:
- CreateFile option + FsNodeDecl.Create field (never set in production)
- Alias option function (Binding.Aliases field retained — used by fs/)
- FileTree interface (unused anywhere)
- Validation for Create-on-non-dir (no longer possible)

Unexported (internal-only plumbing):
- NewTree → newTree, TreeOption → treeOption
- WithLister/Creator/Deleter/Renamer/Opener/Stat/Readdir → with*
- FileConfig → fileConfig
- SyntheticEntry → syntheticEntry
- FileEntry/DirEntry → fileEntry/dirEntry

Retained (used by fs/):
- Tree, BuildTree, FsNodeDecl, File, SyntheticFileInfo
- All active NodeOptions (Read/Write/Stream/BlockOnce/Request/
  RemoveNode/StatOverride/UID/GID/Bind/Doc)
- Perm* constants, Binding, Each, DirNode, FileNode
- GenerateHelp, NodeOption type
2026-08-09 12:34:40 +02:00
Ollie Agent 9c90cb8954 refactor: reduce redundancy, remove dead code, improve structure
- Fix CodeWhisperer SetModel cache invalidation bug
- Remove dead code: gemini stub, orphaned comments, kiroMetadataEvent
- Extract paths.NewUUID() replacing 3 duplicate UUID implementations
- Export toolsrv.BuildToolListing, deduplicate tool listing render
- Extract baseBackend struct (Name/Model/SetModel) embedded in all backends
- Unify backend factory post-processing (7 if-blocks → 1)
- Split fs/handlers.go (888 lines) into handlers_{root,session,agent}.go
- Strip dead filesystem-backed tree code from fsedsl (WithReadOnly,
  WithIndex, WithResolver, ValidateReadMode, resolve/writePath fallbacks)
2026-08-09 11:23:25 +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 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 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 6c232c7bb7 Add explicit Adapter pattern to fsedsl
- Add Adapter[Ctx] type that provides all EDSL methods specialized for a context type
- NewAdapter[Ctx]() creates an adapter instance
- Update ollie/fs/edsl.go to use the adapter explicitly
- Update README with adapter-based examples

The adapter makes it explicit that we're building a type-specialized
interface to the generic EDSL library.
2026-08-04 12:06:44 +02:00
Levi Neely 882fc598d4 Extract EDSL to fsedsl/ library
- Create fsedsl/ as embedded library with generic types:
  - FsNodeDecl[Ctx], Binding[Ctx], NodeOption[Ctx]
  - BuildTree[Ctx], GenerateHelp[Ctx]
  - Tree, File, FileConfig, SyntheticFileInfo

- Update ollie/fs to use fsedsl via type aliases:
  - type FsNodeDecl = fsedsl.FsNodeDecl[HandlerCtx]
  - Wrapper functions for constructors and options

- Migrate binding functions to Applier pattern:
  - Binding.Applier replaces direct field assignment
  - Cleanly separates EDSL mechanics from domain types

- Add replace directive in go.mod for local module

The library can be extracted to a separate repo later by
changing the module path and removing the replace directive.
2026-08-04 12:02:32 +02:00