feat: foundations — canonical types, Parse grammar, env DSNs, health, chains

Phase 1 of the majordomo build:
- llm/ canonical contract (messages, parts, tools, capabilities, streaming,
  Model/Provider, error classification)
- health/ clock-injected tracker (threshold bench, exponential capped
  cooldown, reset-on-success)
- root Registry + Parse (verbatim model ids, inline recursive alias
  expansion with cycle detection, chain dedup), LLM_* env-DSN providers
  (go-llm parity: lazy fallback + eager LoadEnv), health-aware chain
  executor behind the Model interface
- provider/fake scriptable test provider; hermetic test suite incl. the
  trailing-thinking chain and foreman:// env loading
- ADRs 0001-0008, CLAUDE.md, README (honest matrix), CI workflow,
  docs/phase-1-design.md

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-06-10 12:35:23 +02:00
parent 3025044817
commit dcd004289f
42 changed files with 3863 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
# majordomo example environment.
# Copy to .env and fill in real values. .env is gitignored — never commit it.
# Ollama Cloud API key (used by the ollama-cloud provider and live tests).
OLLAMA_API_KEY=your-ollama-cloud-key-here
# Built-in provider keys (each optional; only needed for the providers you use).
#OPENAI_API_KEY=sk-...
#ANTHROPIC_API_KEY=sk-ant-...
#GOOGLE_API_KEY=...
# LLM_* env-DSN provider definitions (go-llm parity).
# Format: LLM_<NAME>=scheme://[token@]host[/path]
# <NAME> becomes the provider's registry name (LLM_M1 -> "m1").
#LLM_M1=foreman://token@foreman-m1.example.com
#LLM_M5=foreman://token@foreman-m5.example.com