Commit graph

2 commits

Author SHA1 Message Date
Snider
1c2a6a6902 feat: add RemoteTransport interface for SSH abstraction
Introduce RemoteTransport interface (Run, CopyFrom, CopyTo) with
SSHTransport implementation using ssh/scp binaries. AgentConfig gains
a Transport field with lazy initialization from M3 credentials.

All internal callers (DiscoverCheckpoints, processMLXNative,
processWithConversion) now use cfg.transport() instead of global
SSHCommand/SCPFrom. Old functions preserved as deprecated wrappers.

Enables mock injection for testing agent loop without real SSH.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-20 03:09:42 +00:00
Snider
eae9ec9b38 refactor: split agent.go (1070 LOC) into 5 focused files
Decompose monolithic agent.go into concern-based files:
- agent_config.go (97 LOC): AgentConfig, Checkpoint, model maps
- agent_execute.go (215 LOC): RunAgentLoop, discovery, scoring dispatch
- agent_eval.go (397 LOC): MLX native + conversion eval, capability/content probes
- agent_influx.go (291 LOC): InfluxDB scoring push, buffer/replay
- agent_ssh.go (102 LOC): SSH/SCP helpers, env utilities

No functional changes. All tests pass.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-20 03:05:11 +00:00