Commit graph

20 commits

Author SHA1 Message Date
Virgil
3c0d9f853c feat(ai): add recent metrics events
All checks were successful
Security Scan / security (push) Successful in 10s
Test / test (push) Successful in 1m16s
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-01 05:35:56 +00:00
Claude
0d5d780bcc
chore: update dependencies to dappco.re tagged versions
All checks were successful
Security Scan / security (push) Successful in 11s
Test / test (push) Successful in 2m37s
Security Scan / security (pull_request) Successful in 8s
Test / test (pull_request) Successful in 49s
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 01:10:25 +00:00
Claude
8a68ed5160
chore: migrate to dappco.re vanity import path
Some checks failed
Security Scan / security (push) Successful in 9s
Test / test (push) Failing after 23s
Module path: forge.lthn.ai/core/go-ai -> dappco.re/go/core/ai

Updated all .go imports for migrated sibling packages:
- forge.lthn.ai/core/go-log -> dappco.re/go/core/log
- forge.lthn.ai/core/go-io -> dappco.re/go/core/io
- forge.lthn.ai/core/go-i18n -> dappco.re/go/core/i18n

Added //go:build ignore to cmd/lab/cmd_lab.go (pre-existing broken
import: forge.lthn.ai/lthn/lem/pkg/lab was removed from LEM).

Packages not yet migrated (left as-is): cli, go-rag, go-scm,
go-process, mcp, api, go-crypt, go-inference, go-ml, go-mlx.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 23:52:57 +00:00
Snider
569f553b1a fix(ai): DX audit — update CLAUDE.md, add tests, fix io consistency
Some checks failed
Security Scan / security (pull_request) Successful in 9s
Test / test (pull_request) Failing after 1m33s
- CLAUDE.md: remove deleted daemon/ entry, add embed-bench/ and lab/,
  fix build commands for go workspace (./... → module path),
  update error handling guidance to coreerr.E(), remove stale
  cli.AddDaemonCommand reference
- Replace os.MkdirAll with coreio.Local.EnsureDir in bench/test code
- Add 14 unit tests for metrics (Record, ReadEvents, Summary, sortedMap,
  readMetricsFile edge cases) — ai/ coverage 65.3% → 67.3%
- Add parseDuration tests for cmd/metrics — coverage 0% → 24.6%
- No fmt.Errorf or errors.New violations found
- No os.ReadFile/os.WriteFile violations found

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-17 08:01:21 +00:00
Snider
251d248026 refactor: replace fmt.Errorf/errors.New with coreerr.E()
Some checks failed
Security Scan / security (push) Successful in 8s
Test / test (push) Failing after 1m15s
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-16 21:59:21 +00:00
Snider
c9489fe3f6 fix: remove cmd/daemon (cli.AddDaemonCommand no longer exists)
Some checks failed
Security Scan / security (push) Successful in 9s
Test / test (push) Failing after 1m21s
Daemon management moved to go-process. This cmd/ referenced a
function that was removed during the cli library cleanup.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-16 19:20:02 +00:00
Snider
0202bec84a refactor: extract MCP server to core/mcp
Some checks failed
Security Scan / security (push) Successful in 9s
Test / test (push) Failing after 1m47s
Move mcp/, cmd/mcpcmd/, cmd/brain-seed/ to the new core/mcp repo.
Update daemon import to use forge.lthn.ai/core/mcp/pkg/mcp.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 18:40:50 +00:00
Snider
413c637d26 refactor: use generic cli.AddDaemonCommand, remove duplicated daemon lifecycle
Some checks failed
Security Scan / security (push) Successful in 12s
Test / test (push) Failing after 2m2s
Replace 260+ lines of hand-rolled start/stop/status/run logic with a thin
wrapper delegating to cli.AddDaemonCommand(). The MCP-specific config,
transport constants, and startMCP() function are preserved.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 14:09:02 +00:00
Snider
badcfe9a78 refactor: swap pkg imports to standalone modules
Some checks failed
Security Scan / security (push) Successful in 11s
Test / test (push) Failing after 1m37s
- pkg/ws → go-ws
- pkg/webview → go-webview
- pkg/lab → lthn/lem/pkg/lab
- pkg/process → go-process (from prior session)

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-06 13:48:09 +00:00
Snider
dfe474a239 refactor: swap pkg/{io,log,i18n} imports to go-io/go-log/go-i18n
Some checks failed
Security Scan / security (push) Successful in 9s
Test / test (push) Failing after 3m8s
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-06 12:35:42 +00:00
Snider
b36975097d feat: add brain-seed tool + TLS support for .lan domains
Some checks failed
Test / test (push) Failing after 43s
Security Scan / security (push) Failing after 14m3s
brain-seed imports Claude Code MEMORY.md files into OpenBrain by
embedding via Ollama and storing vectors in Qdrant. Supports dry-run,
plan docs, and configurable endpoints.

Also fixes embed-bench to use a shared HTTP client that trusts
self-signed certs for .lan domains behind Traefik.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-03 10:23:42 +00:00
Snider
ba6272d2aa feat: add embed-bench tool for comparing embedding models
Some checks failed
Security Scan / security (push) Successful in 7s
Test / test (push) Failing after 1m1s
Benchmarks embedding models head-to-head using cosine similarity
on agent memory corpus. Tests cluster separation and query recall
accuracy across 4 topic groups and 8 queries.

Results: EmbeddingGemma has 2x better separation gap (0.197 vs
0.112) than nomic-embed-text, both achieve 100% top-1 recall.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-03 10:10:08 +00:00
Claude
23d8cb4824
chore: fmt.Errorf(static) → errors.New
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 16:01:43 +00:00
Snider
71abac6415 feat: modernise to Go 1.26 iterators and stdlib helpers
Some checks failed
Security Scan / security (push) Successful in 12s
Test / test (push) Failing after 28s
Add ToolsSeq iterator on MCP server, use slices.SortFunc in registry,
slices.ContainsFunc and strings.SplitSeq in security scanner,
range-over-int in metric benchmarks.

Co-Authored-By: Gemini <noreply@google.com>
Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-23 05:59:29 +00:00
Snider
8a21d750bb refactor: migrate CLI imports from core/go to core/cli
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>
2026-02-22 23:29:44 +00:00
Snider
6298a84b8b refactor: remove init() + RegisterCommands pattern
Commands now register through Core framework lifecycle via
cli.WithCommands() instead of side-channel init() functions.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-21 22:07:10 +00:00
Snider
63d74568e2 feat: absorb lab command from CLI
LEM Lab launcher for local ML inference.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-21 21:46:59 +00:00
Snider
55e537a55c feat: migrate metrics command from CLI
Move AI metrics tracking command from core/cli cmd/ai into go-ai
where the metrics backend lives.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-21 20:42:17 +00:00
Snider
d962260b81 feat(cmd/rag): re-export go-rag CLI commands through go-ai
CLI should import RAG commands via go-ai (which already depends on
go-rag), not directly. This keeps the CLI's dependency tree clean.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-21 20:23:22 +00:00
Snider
c3de6c4935 feat: migrate daemon, mcpcmd, security commands from CLI
Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-21 19:38:04 +00:00