Move backend-result-type plan to docs/plans/completed/ with summary.
Unified Result struct now used across all ML backends.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add DiscoverCheckpointsIter, FindUnscoredIter (iter.Seq2/iter.Seq)
- Add BackendsIter on Service
- Replace sort.Slice with slices.SortFunc, sort.Strings with slices.Sort
- Replace manual map-key-collect-sort with slices.Sorted(maps.Keys(...))
- Refactor ProbeCategories to use slices.Sorted with inline iterator
- Existing slice-returning methods preserved, backed by new iterators
Co-Authored-By: Gemini <noreply@google.com>
Co-Authored-By: Virgil <virgil@lethean.io>
Uses reusable workflows from core/go-devops for Go testing
(with race detector and coverage) and security scanning
(govulncheck, gitleaks, trivy).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update imports from forge.lthn.ai/core/go/pkg/cli to
forge.lthn.ai/core/cli/pkg/cli following CLI package split.
Co-Authored-By: Virgil <virgil@lethean.io>
Go 1.26 rejects non-semver version strings (like 'main') in go.mod.
Tags v0.0.1 now exist on all forge repos — workspace still overrides
for local development.
Co-Authored-By: Virgil <virgil@lethean.io>
Forge module versions now use main branch resolution via ~/Code/go.work
workspace. Removes local replace directives — the central go.work handles
all cross-repo resolution during development.
Co-Authored-By: Virgil <virgil@lethean.io>
Pre-existing issue: cmd/cmd_benchmark.go imports go-i18n/reversal
but the dependency was absent from go.mod.
Co-Authored-By: Virgil <virgil@lethean.io>
All Backend.Generate/Chat calls now return Result. Test assertions
updated to use .Text and check .Metrics where appropriate.
Co-Authored-By: Virgil <virgil@lethean.io>
InferenceAdapter.Generate and Chat now return Result{Text, Metrics}
where Metrics is populated from the underlying TextModel.Metrics().
Co-Authored-By: Virgil <virgil@lethean.io>
Backend.Generate and Backend.Chat now return (Result, error) instead of
(string, error). Result carries the response text and optional
inference.GenerateMetrics for backends that support them.
Co-Authored-By: Virgil <virgil@lethean.io>
Move all 40 ML command files from core/cli/cmd/ml to go-ml/cmd/.
Commands self-register via init() + cli.RegisterCommands().
- Fixed stale go-ai/ml import in cmd_ab.go (now uses go-ml + go-mlx)
- Disabled cmd_train.go (needs go-mlx training API export)
- Removed all local replace directives, deps resolve from forge
- go build ./... passes cleanly
Co-Authored-By: Virgil <virgil@lethean.io>
Implements RouteGroup and StreamGroup interfaces from go-api, exposing
ML inference service methods as REST endpoints: GET /backends, GET /status,
POST /generate. Includes 12 integration tests covering interface satisfaction,
engine registration, envelope format, and error handling.
Co-Authored-By: Virgil <virgil@lethean.io>
Replace internal task tracking (TODO.md, FINDINGS.md) with structured
documentation in docs/. Trim CLAUDE.md to agent instructions only.
Co-Authored-By: Virgil <virgil@lethean.io>
Memory controls handled by go-mlx internally. Integration smoke test
covered by Phase 4 mock tests; real-model test deferred to LEM Lab.
Co-Authored-By: Virgil <virgil@lethean.io>
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>
- Replace Message struct with type alias for inference.Message (backward compat)
- Remove convertMessages() — types are now identical via alias
- Extend GenOpts with TopK, TopP, RepeatPenalty (mapped in convertOpts)
- Deprecate StreamingBackend with doc comment (only 2 callers, both in cli/)
- Simplify HTTPTextModel.Chat() — pass messages directly
- Update CLAUDE.md with Backend Architecture section
- Add 2 new tests, remove 1 obsolete test
Co-Authored-By: Virgil <virgil@lethean.io>
Full audit of StreamingBackend usage across ecosystem:
- Only 2 callers (both in host-uk/cli, out of go-ml scope)
- All other consumers use Backend.Generate() (non-streaming)
- GenOpts vs GenerateConfig field comparison documented
- backend_mlx.go dead imports marked as FIXED (Phase 1)
Co-Authored-By: Virgil <virgil@lethean.io>
Based on comprehensive codebase analysis:
- Only 2 files use StreamingBackend (both in host-uk/cli)
- All other consumers use Backend.Generate() (non-streaming)
- Precise steps: type alias Message, extend GenOpts, deprecate StreamingBackend
Co-Authored-By: Virgil <virgil@lethean.io>