Ollie Agent
|
2b4d577e39
|
refactor: architectural cleanup (5 items)
1. Standardize ctl dispatch: hoist rootCtlHandlers and sessionCtlHandlers
to package-level vars, matching the agent pattern.
2. Fix error wrapping: %v → %w in toolsrv/shell.go (only 2 instances;
backend/ was already clean).
3. Canonicalize tool server access: LoadTool now only uses
session.ToolsConn() — removed fallback to agent.ToolServer().
4. Centralize event handler wiring: wireAgentEvents(sessID, ag, al)
replaces separate SetOutput + wireAgentStateEvents calls. Documents
the contract.
5. Split toolsrv/shell.go: validation patterns, ValidateCode, and rate
limiting moved to shell_validate.go (86 lines). shell.go retains
execution logic (594 lines).
|
2026-08-09 12:46:36 +02:00 |