0072aa41bd
feat(07-01): ResearchAgent worker, trigger endpoint, main.go wiring
...
- internal/research/agent.go: Agent with RunOnce+Start, sanitizeQuery, interface adapters
- internal/research/agent_test.go: stub-based unit tests (sanitize, enrich, skip, empty)
- internal/ai/client.go: TierClient.TextComplete for text-only LLM calls
- internal/api/handlers/research.go: POST /api/research/trigger handler (202 Accepted)
- internal/api/router.go: researchHandler param + /api/research/trigger route
- cmd/hwlab/main.go: research agent goroutine started with 10min interval
2026-04-10 07:51:13 +00:00
7b02e67365
feat(06-lab-advisor-02): add InventoryContextBuilder with 60s cache
...
- internal/advisor/context.go: BuildContext assembles compact NetBox
summary (item count, category breakdown, recent 20 items)
- Caches result under sync.Mutex for defaultTTL=60s
- Stale cache returned on NetBox error rather than propagating failure
- internal/ai/types.go: add Tier3 TierConfig field to AIConfig
(required by AdvisorHandler for OpenRouter Claude Opus access)
2026-04-10 07:35:43 +00:00
799acd26ef
feat(02-02): three-tier orchestrator with confidence routing and research stub
...
- Orchestrator.Analyze: tier1 → confidence check → tier2 escalation if < threshold
- CatalogStatus mapped from confidence: >= threshold → StatusIndexed, else StatusNeedsResearch
- Both tiers fail gracefully: returns zero-value IntakeResult + StatusNeedsResearch, err nil
- ResearchClient interface + NoOpResearchClient stub for Phase 7 SearXNG
- 5 TestOrchestrator* tests all passing (TDD green)
2026-04-10 05:47:41 +00:00
8c03780230
feat(02-01): AI package foundation — types, interface, mock, prompts, config extension
...
- internal/ai/types.go: IntakeRequest, IntakeResult, TierConfig, AIConfig domain types
- internal/ai/client.go: AIClient interface + TierClient (go-openai, BaseURL tier-routing)
- internal/ai/mock.go: MockAIClient test double with HighConfidenceResult/LowConfidenceResult fixtures
- internal/ai/prompts/intake.go: BuildIntakePrompt() JSON-extraction prompt template
- internal/config/config.go: Config.AI AIConfig field, tier defaults, env bindings, ai_config.json merge
- ai_config.json: template config with placeholder Tier2 API key
- .gitignore: add ai_config.local.json pattern for real keys (T-02-01 mitigation)
- All tests pass: TestMockAIClient, TestMockAIClientError, TestTierClientConstruction, TestAIConfigDefaults
2026-04-10 05:45:13 +00:00