UNPKG

claude-flow

Version:

Ruflo - Enterprise AI agent orchestration for Claude Code. Deploy 60+ specialized agents in coordinated swarms with self-learning, fault-tolerant consensus, vector memory, and MCP integration

24 lines 1.24 kB
/** * Smoke tests for grounded_query.ts — ADR-135 / iter-33 * * All tests are mock-based using groundedQueryTestHooks for ESM-safe injection. * NO live API calls are made. * * Coverage: * 1. resolveGoogleAIApiKey — returns key from env var * 2. resolveGoogleAIApiKey — throws when env var absent and gcloud unavailable * 3. parseGeminiResponse — well-formed response → correct GroundedQueryResult shape * 4. parseGeminiResponse — empty grounding metadata → grounded=false, empty sources * 5. parseGeminiResponse — deduplicates sources by URI * 6. parseGeminiResponse — cost calculation uses token counts * 7. GroundedQueryTool.execute — happy path: answer + sources in output * 8. GroundedQueryTool.execute — HTTP 4xx surfaces useful error message * 9. GroundedQueryTool.execute — ungrounded response includes note in output * 10. GroundedQueryTool.execute — rejects empty query * 11. GroundedQueryTool.execute — max_tokens clamped to 8192 * 12. GroundedQueryTool.execute — uses injected apiKey from constructor * * Run with: npx tsx grounded_query.smoke.ts (from gaia-tools directory) */ export {}; //# sourceMappingURL=grounded_query.smoke.d.ts.map