Snider
a6fb45da67
refactor: apply go fix modernizers for Go 1.26
...
Automated fixes: interface{} → any, range-over-int, t.Context(),
wg.Go(), strings.SplitSeq, strings.Builder, slices.Contains,
maps helpers, min/max builtins.
Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-22 21:00:16 +00:00
Snider
ef44f0ae25
refactor: unwrap Result.Text in expand, judge, agent_eval
...
Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-22 17:39:17 +00:00
Snider
12f3a1c79d
refactor: extract hardcoded values into package constants
...
Move magic numbers and strings into named constants in agent_config.go:
- EpochBase (was 1739577600 in 5 locations)
- 5 InfluxDB measurement names (capability_score, probe_score, etc.)
- 2 DuckDB table names (checkpoint_scores, probe_results)
- Probe defaults (temperature, max tokens, response truncation)
- InfluxBufferFile, LogSeparatorWidth, InterCheckpointDelay
Replace hardcoded probe counts ("23", "6") with len(CapabilityProbes),
len(ContentProbes). 7 files modified, no functional changes.
Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-20 03:18:19 +00:00
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