Repository navigation
feat: DBA agent (Ask button on home, self-serve signup, MCP ask_dba, 2x cost guard) 0.3.0 - #5
Merged
Merged
Conversation
… ask_dba, 2x cost guard on paid fallback (0.3.0) - Home page: "Ask the DBA agent" in the playground asks about the editor's schema in place; personal link + top-up inline. - /api/signup: anyone gets a personal link (5/IP/hour, SIGNUP_CREDIT_CENTS). - MCP ask_dba / ask_dba_result with the personal token as Bearer. - c0mpute first; OpenAI/Claude only when price >= ASK_MIN_MARGIN (2) x the worst-case paid cost (incl. failed paid attempts). Haiku 5.5 rates 0.10/0.50. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DBA as a service on dbml.db, run by an AI agent grounded in the review engine.
POST /api/signupgives anyone a personal link (cookie set, 5 per IP per hour,SIGNUP_CREDIT_CENTSdefault 0)./asksigned-out page now has a "Get my personal link" button.ask_dba/ask_dba_resultwithAuthorization: Bearer <token>; API documented in /docs#dba and llms.txt.ASK_MIN_MARGIN(2) x (paid spend already burned on the question + worst-case cost of the next call: prompt at 3 chars/token, all 2,500 output tokens). Enforced via the router'sonlylist. Anthropic default rate corrected to claude-haiku-5-5 ($0.10/$0.50 per MTok).startAsk()so page, API and MCP run the same checks.Tests: 34/34 (new: margin guard,
onlylist, signup + rate limit, MCP ask_dba charge).🤖 Generated with Claude Code