Commit Graph

17 Commits

Author SHA1 Message Date
Mathias Bergqvist
a2889645fc fix: add Message field to session.Entry and check marshal error
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-17 20:43:01 +02:00
Mathias Bergqvist
9cfce8f700 feat: add tier and session_log MCP tools
Adds two new MCP skill packages:
- internal/skills/org: exposes the tier tool, calling an injected TierFn
  for testability; returns current operating tier as structured JSON
- internal/skills/sessionlog: exposes the session_log tool, appending
  structured JSONL entries to brain/sessions/{session_id}.jsonl; requires
  session_id, wraps internal/session.Append

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-17 20:40:50 +02:00
Mathias Bergqvist
e610e253ef fix(brain): pass type and domain fields to ingestion write endpoint
The write handler was building a hand-rolled map that dropped the type
and domain fields from writeArgs. Pass the struct directly so all fields
reach the ingestion server. Strengthen the test to assert the request
body contains the type field.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-17 20:38:38 +02:00
Mathias Bergqvist
275ba43df5 feat: add brain_query and brain_write MCP tools
Adds the brain skill that proxies HTTP calls to the ingestion server,
exposing brain_query (/query) and brain_write (/write) as MCP tools.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-17 20:36:39 +02:00
Mathias Bergqvist
5722532f7d fix: session log error handling and scanner buffer size
- Replace deprecated os.IsNotExist with errors.Is(err, fs.ErrNotExist)
- Capture Close error in Append by calling it explicitly instead of defer
- Increase scanner buffer to 1 MB per line to handle large JSONL entries

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-17 20:34:36 +02:00
Mathias Bergqvist
1b03532230 feat: add session log package (append/read JSONL)
Introduces internal/session with Entry and Attempt types, Append
(O_APPEND JSONL writer) and Read (line scanner, nil on missing file).
Raw material for retrospective and trainer workers.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-17 20:32:38 +02:00
Mathias Bergqvist
fa6c084cf0 fix: suppress errcheck on Body.Close in tier probe 2026-04-17 20:31:10 +02:00
Mathias Bergqvist
d09f7fe7d8 feat: add tier detection package
Probes Anthropic and LiteLLM endpoints to detect the current operating
tier (Full / LANOnly / Airplane) so downstream code can gate model
selection and managed-agent availability without manual configuration.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-17 20:28:29 +02:00
Mathias Bergqvist
48d2d7dd73 fix: remove committed binary and stop leaking API key in prompt
Remove cmd/supervisor/supervisor binary from git (was accidentally
committed) and add it to .gitignore. Move LITELLM_API_KEY from the
prompt string into the subprocess env, preventing it from appearing
in error log output when JSON parsing fails.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-17 08:49:44 +02:00
Mathias Bergqvist
1f79cb6cef feat: add TDD skill with red/green/refactor handlers 2026-04-17 07:44:04 +02:00
Mathias Bergqvist
8b3fd1d28b fix: initialize tools slice to empty rather than nil in registry 2026-04-17 07:41:00 +02:00
Mathias Bergqvist
edf47af8cf feat: add MCP HTTP server with JSON-RPC 2.0 transport 2026-04-17 07:40:57 +02:00
Mathias Bergqvist
4255514bab feat: add skill registry with tool routing 2026-04-17 07:40:20 +02:00
Mathias Bergqvist
91b98aed34 feat: add executor that spawns claude and parses JSON result 2026-04-17 07:39:26 +02:00
Mathias Bergqvist
4c00b55ca5 feat: add model routing table with three-layer priority 2026-04-17 07:37:43 +02:00
Mathias Bergqvist
8b8ada2676 feat: add config package with env-var loading 2026-04-17 07:37:19 +02:00
Mathias Bergqvist
d3d81cab20 feat: add Result type with JSON schema and validation 2026-04-17 07:33:06 +02:00