Virgil split go-ai into standalone modules (go-agentic, go-ml, go-mlx, go-rag). This migrates all CLI imports to the new module paths and fixes API mismatches from the split. Key changes: - go-ai/agentic → go-agentic (cmd/ai, cmd/dev) - go-ai/ml → go-ml (31 files in cmd/ml) - go-ai/rag → go-rag (3 files in cmd/rag) - go-ai/mlx → go-mlx (1 file) - Fix go.work path (../core → ../go) - Add all split repos to go.work and go.mod - Simplify daemon to goroutine-based MCP (remove missing supervisor) - Wire go-agentic SQLiteRegistry into dispatch watch (--agent-id flag) - Add `core ai agent fleet` command for local registry status - Fix rag collections API (PointCount, Status string) - Fix ml live/expand-status to use available go-ml API Co-Authored-By: Charon <charon@lethean.io>
41 lines
1.4 KiB
Go
41 lines
1.4 KiB
Go
package ml
|
|
|
|
import (
|
|
"forge.lthn.ai/core/go/pkg/cli"
|
|
"forge.lthn.ai/core/go-ml"
|
|
)
|
|
|
|
var (
|
|
consolidateM3Host string
|
|
consolidateRemoteDir string
|
|
consolidatePattern string
|
|
consolidateOutputDir string
|
|
consolidateMergedOut string
|
|
)
|
|
|
|
var consolidateCmd = &cli.Command{
|
|
Use: "consolidate",
|
|
Short: "Pull and merge response JSONL files from M3",
|
|
Long: "Pulls JSONL response files from M3 via SSH/SCP, merges them by idx, deduplicates, and writes a single merged JSONL output.",
|
|
RunE: runConsolidate,
|
|
}
|
|
|
|
func init() {
|
|
consolidateCmd.Flags().StringVar(&consolidateM3Host, "m3-host", "m3", "M3 SSH host")
|
|
consolidateCmd.Flags().StringVar(&consolidateRemoteDir, "remote", "/Volumes/Data/lem/responses", "Remote response directory")
|
|
consolidateCmd.Flags().StringVar(&consolidatePattern, "pattern", "gold*.jsonl", "File glob pattern")
|
|
consolidateCmd.Flags().StringVar(&consolidateOutputDir, "output", "", "Local output directory (default: responses)")
|
|
consolidateCmd.Flags().StringVar(&consolidateMergedOut, "merged", "", "Merged output path (default: gold-merged.jsonl in parent of output dir)")
|
|
}
|
|
|
|
func runConsolidate(cmd *cli.Command, args []string) error {
|
|
cfg := ml.ConsolidateConfig{
|
|
M3Host: consolidateM3Host,
|
|
RemoteDir: consolidateRemoteDir,
|
|
Pattern: consolidatePattern,
|
|
OutputDir: consolidateOutputDir,
|
|
MergedOut: consolidateMergedOut,
|
|
}
|
|
|
|
return ml.Consolidate(cfg, cmd.OutOrStdout())
|
|
}
|