feat: foundation for the dbt Power User tools

HK
1d ago
+571-0

Issue for this PR

Closes #

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Lays the groundwork for the dbt Power User features. Separate follow-up PRs fill in each tool.

  • Registers nine new tools in the tool CLI allow-list: dbt_cost_estimate, dbt_cte_profile, dbt_defer_state, dbt_docs_coverage, dbt_health, dbt_map_relations, dbt_run_results, dbt_sql_graph, docs_share_comments. Each one is a stub with its final parameter schema. For now, running it returns success: false and the message "not implemented in this build", so callers can wire against the final names and shapes already.
  • Adds dbt-adapter-access.ts, the shared helper the tools will use to reach the dbt project and adapter.
  • Adds apiRequest() to the Altimate API client. It sends an authenticated call with the stored Bearer key and the x-tenant headers. When credentials are missing or can't be read, the error names the credentials file instead of failing with a generic message.

Changelog

  • Added: nine dbt Power User tools listed by altimate-code tool list. They are not implemented yet and report that when run.
  • Added: an internal authenticated Altimate API request helper with clearer errors for missing credentials.

How did you verify your code works?

  • bun typecheck in packages/opencode passes with no errors.
  • test/altimate/dbt-adapter-access.test.ts covers the adapter-access helper.
  • A multi-reviewer review loop runs on this PR next. Each finding gets a reply here.

Cost side effects

None. The new tools are stubs and make no model calls, warehouse queries or cloud requests. apiRequest only sends a request when a later tool calls it.

Screenshots / recordings

The demo recording will be added once review is done.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR
  • I checked for cost side effects (model calls, queries or cloud resources that grow with user data) and described them, or wrote "none"

Demo video

/Users/harish/.quikim/artifacts/pu-mods/videos/F.mp4 (82 s, local recording with F.cast beside it). Shows altimate tool list with the nine tools, a stub tool run failing with exit code 1, claude plugin test passing, and Claude Code loading the plugin with /lineage customers unchanged and a dbt Bash call going through the tool chain.

šŸ¤– Generated with Claude Code


Summary by cubic

Lays the groundwork for the dbt Power User tools: nine tools are now registered in the tool CLI allow-list with their final parameter schemas, and each returns "not implemented in this build" when run, so follow-up PRs can build each one without changing its name or shape.

  • Adds dbtAdapterFor (dbt-adapter-access.ts), the shared gate every adapter-backed tool goes through. It refuses read-only and plan-mode calls, sessions outside the adapter's dbt project, and adapters that don't start or load, with a bounded start wait that follows the call's abort signal.
  • Adds AltimateApi.apiRequest(), which sends an authenticated request with the stored Bearer key and x-tenant headers, and names the credentials file when credentials are missing or unreadable.