Commit Graph

9 Commits

Author SHA1 Message Date
Levi Neely 267f438e9e clean up OLLIE_* env vars: replace with XDG conventions
- Remove all OLLIE_*_PATH vars (TOOLS_PATH, CFG_PATH, DATA_PATH, etc.)
  Use XDG_CONFIG_HOME/ollie/* and XDG_DATA_HOME/ollie/* instead
- Replace OLLIE_<TAG>_LOG per-component logging with single OLLIE_LOG={level}
- Remove Route()/RouteRequest/RouteResult (replaced by direct backend selection)
- Update sandbox config to use XDG paths instead of OLLIE_*_PATH tokens
- Update docs accordingly
2026-08-07 07:12:08 +02:00
Levi Neely 92619d4072 elevate: fix session ID passing, leaky bucket rate limit
- executeElevated: use e.sessionID instead of os.Getenv (process-global
  env is empty in multi-session olliesrv)
- executeElevated: merge envExtra into broker env map so session-scoped
  vars are visible to elevated commands
- Replace per-turn rate limit with x/time/rate leaky bucket:
  burst of 3, refills 1 token per 10s. Only denials/timeouts consume
  tokens; approvals are free.
2026-07-30 16:29:35 +02:00
Levi Neely a640257dbf registry: refresh schemas on tool_list and reload on tool_load
tool_load always re-reads the tool from disk (reload semantics).
tool_list calls RefreshLoaded to update schemas for all promoted tools.
Skills registry gets the same treatment: dynamic discovery, no cache.
2026-07-30 09:36:54 +02:00
Levi Neely 6fc2e001ac tools: promote reasoning_think to builtin
Zero-context-cost scratchpad tool. The thought is recorded in history
but returns empty — no output tokens wasted. Registered in ListTools
schema and builtins map.
2026-07-30 09:24:08 +02:00
Levi Neely 10bd60980a toolsrv: dynamic tool discovery, drop global cache
Registry.Summaries() and Load() now scan the tools directory on every
call instead of reading from a startup cache. New tools dropped into
the directory are immediately visible without restarting the server.

When tool_list is called, the OnToolsChanged hook fires and updates
the preamble's '# Available Tools' section in the live agent runtime.
No agent reload or session restart required.
2026-07-30 09:16:01 +02:00
Levi Neely 55a81f7709 delete dead code: GlobalToolNames, ExtractReturnSchema 2026-07-30 00:43:40 +02:00
Levi Neely 8e687b040d toolsrv: add Dial() with Addr type for unified construction
Addr{Network, Host, CWD} describes how to reach a tool server.
Dial dispatches to local (in-process) or ssh (remote) based on Network.
TODO comment describes future path: local via unix socket.
2026-07-29 23:29:23 +02:00
Levi Neely 47141c764d delete Decl/RemoteDecl — callers use New() directly 2026-07-29 23:23:51 +02:00
Levi Neely 18beb15698 split: toolsrv/ (server framework) + tools/ (builtin handlers)
toolsrv/ owns the Server struct, execution engine, registry, discovery.
tools/ owns the built-in handlers (Shell, ToolList, SkillLoad, etc.)

Dependency flows one way: tools/ imports toolsrv/.
Server.Dispatch uses a handler map populated via WithBuiltins().
2026-07-29 23:17:22 +02:00