feat: add altimate-dbt CLI and consolidate dbt skills into 5 focused skills#146
feat: add altimate-dbt CLI and consolidate dbt skills into 5 focused skills#146suryaiyer95 wants to merge 10000 commits intomainfrom
Conversation
feat: port Anthropic OAuth plugin in-tree
Co-Authored-By: Claude Opus 4.6 <[email protected]>
- Restore .trim() on models API JSON to prevent syntax error in generated models-snapshot.ts - Fix archive path for scoped package names (@altimate/cli-*) in release tarball/zip creation - Remove gh release upload from build.ts (handled by github-release job) - Add CHANGELOG.md entry for v0.1.5 Co-authored-by: Claude Opus 4.6 <[email protected]>
- Redesign M as 5-wide with visible V-valley to distinguish from A - Change E top from full bar to open-right, distinguishing from T - Fix T with full-width crossbar and I as narrow column - Fix D shape in CODE - Render CODE in theme.accent (purple) instead of theme.primary (peach) Co-authored-by: Claude Opus 4.6 <[email protected]>
Co-Authored-By: Claude Opus 4.6 <[email protected]>
- publish.ts: change glob from `*/package.json` to `**/package.json` to find scoped package directories (@altimate/cli-*) which are 2 levels deep - release.yml: add skip-existing to PyPI publish so it doesn't fail when the engine version hasn't changed between releases Co-authored-by: Claude Opus 4.6 <[email protected]>
Co-Authored-By: Claude Opus 4.6 <[email protected]>
The npm org is @AltimateAI, not @Altimate. Update all package names, workspace dependencies, imports, and documentation to use the correct scope so npm publish succeeds. Name mapping: - @altimate/cli → @altimateai/altimate-code - @altimate/cli-sdk → @altimateai/altimate-code-sdk - @altimate/cli-plugin → @altimateai/altimate-code-plugin - @altimate/cli-util → @altimateai/altimate-code-util - @altimate/cli-script → @altimateai/altimate-code-script Also updates publish.ts to emit the wrapper package as @altimateai/altimate-code (no -ai suffix) and hardcodes the bin entry to altimate-code. Co-authored-by: Claude Opus 4.6 <[email protected]>
Two issues: 1. TypeScript permission-task tests: test fixture wrote config to `opencode.json` but the config loader only looks for `altimate-code.json`. Updated fixture to use correct filename. 2. Python tests: `pytest: command not found` because pyproject.toml had no `dev` optional dependency group. Added `dev` extras with pytest and ruff. Co-authored-by: Claude Opus 4.6 <[email protected]>
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* fix: rename opencode references to altimate-code in all test files Update test files to use the correct names after the config loader was renamed from opencode to altimate-code: - `opencode.json` → `altimate-code.json` - `.opencode/` → `.altimate-code/` - `.git/opencode` → `.git/altimate-code` - `OPENCODE_*` env vars → `ALTIMATE_CLI_*` - Cache dir `opencode` → `altimate-code` - Schema URL `opencode.ai` → `altimate-code.dev` Co-Authored-By: Claude Opus 4.6 <[email protected]> * fix: resolve remaining test failures and build import issue - Fix build.ts solid-plugin import to use bare specifier for monorepo hoisting - Update agent tests: "build" → "builder", "plan" → "analyst" for disabled fallback - Fix well-known config mock URL in config.test.ts - Fix message-v2 test: "OpenCode" → "Altimate CLI" - Fix retry.test.ts: replace unsupported test.concurrent with test - Fix read.test.ts: update agent name to "builder" - Fix agent-color.test.ts: update config keys to "builder" - Fix registry.test.ts: remove unpublished plugin dep from test fixture - Skip adding plugin dependency in local dev mode (installDependencies) Co-Authored-By: Claude Opus 4.6 <[email protected]> * fix: address Sentry review comments and Python CI deps - Update theme schema URL from opencode.ai to altimate-code.dev (33 files) - Rename opencode references in ACP README.md and AGENTS.md docs - Update test fixture tmp dir prefix to altimate-code-test- - Install warehouse extras in Python CI for duckdb/boto3 test deps Co-Authored-By: Claude Opus 4.6 <[email protected]> * fix: Python CI — SqlGuardResult allows None data, restrict pytest to tests/ - Allow SqlGuardResult.data to be None (fixes lineage.check Pydantic error) - Set testpaths = ["tests"] in pyproject.toml to exclude src/test_local.py from pytest collection (it's a source module, not a test) Co-Authored-By: Claude Opus 4.6 <[email protected]> * fix: resolve ruff lint errors in Python engine - Remove unused imports in server.py (duplicate imports, unused models) - Remove unused `json` import in schema/cache.py - Remove unused `os` import in sql/feedback_store.py - Add noqa for keyring availability check import Co-Authored-By: Claude Opus 4.6 <[email protected]> --------- Co-authored-by: Claude Opus 4.6 <[email protected]>
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Use import.meta.resolve to find the @opentui/core package directory instead of hardcoding node_modules path, which fails with monorepo hoisting. Co-Authored-By: Claude Opus 4.6 <[email protected]>
…aming - Build: output binary as altimate-code instead of opencode - Bin wrapper: look for @altimateai/altimate-code-* scoped packages - Postinstall: resolve @AltimateAI scoped platform packages - Publish: update Docker/AUR/Homebrew refs to AltimateAI/altimate-code - Publish: make Docker/AUR/Homebrew non-fatal (infra not set up yet) - Dockerfile: update binary paths and names Co-Authored-By: Claude Opus 4.6 <[email protected]>
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Co-authored-by: Jérôme Benoit <[email protected]>
…sion (#15762) Co-authored-by: Test User <[email protected]> Co-authored-by: Shoubhit Dash <[email protected]>
* chore: use ARC self-hosted runner for CI * chore: use ARC self-hosted runner for release workflow * fix: harden ARC runner migration with security and reliability safeguards - Fall back to `ubuntu-latest` for fork PRs to prevent untrusted code execution on self-hosted ARC runners - Add `timeout-minutes: 60` to all CI and release jobs (self-hosted runners have no default timeout unlike GitHub-hosted 6h limit) - Write `NPM_TOKEN` to `$RUNNER_TEMP/.npmrc` instead of `~/.npmrc` to prevent secret persistence on self-hosted runners - Set `NPM_CONFIG_USERCONFIG` to point publish step to temp `.npmrc` - Add `concurrency` group to CI workflow to cancel superseded runs --------- Co-authored-by: anandgupta42 <[email protected]>
ci: switch Windows tests to ARC self-hosted runner
…ck required tools)
Co-Authored-By: Kai (Claude Opus 4.6) <[email protected]>
…onfig fix: restore TUI crash after upstream merge
fix: correct TEAM_MEMBERS ref from 'dev' to 'main' in pr-standards workflow
- Add `AltimateApi` client for datamate CRUD and integration resolution - Add `datamate` tool with 9 operations: list, show, create, update, delete, add (MCP connect), remove (MCP disconnect), list-integrations, status - Extract shared MCP config utilities (`resolveConfigPath`, `addMcpToConfig`, `removeMcpFromConfig`, `listMcpInConfig`) to `mcp/config.ts` - Add `/datamate-setup` skill for guided datamate onboarding - Register datamate tool in tool registry and TUI sync context - Add test suite for `AltimateApi` credential loading and API methods
feat: datamate manager — dynamic MCP server management
Replace arc-runner-altimate-code with ubuntu-latest across all workflows to eliminate security risk on public repo. Closes #109 Co-authored-by: Claude Opus 4.6 <[email protected]>
* feat: add `/feedback` command and `feedback_submit` tool (#86) - Add `feedback_submit` tool at `src/altimate/tools/feedback-submit.ts` with `try-catch` around all `Bun.$` calls (ENOENT safety) and buffer-based stdout/stderr capture for better error reporting - Add `/feedback` slash command with guided flow template - Register `FeedbackSubmitTool` in tool registry - Register feedback command in `command/index.ts` - Add 49 tests (tool + command integration) - Fix CI `pr-standards.yml`: change `ref: 'dev'` to `ref: 'main'` and wrap TEAM_MEMBERS lookup in `try-catch` for rebase resilience - Add `/feedback` to docs `commands.md` * fix: address code review findings in feedback-submit tool - Fix misleading error: `gh auth status` catch now returns `gh_auth_check_failed` instead of `gh_not_installed` (gh IS installed at that point) - Fix fragile version check: use `startsWith("gh version")` instead of `includes("not found")` for cross-platform correctness - Add `trim().min(1)` validation to `title` and `description` zod schemas to reject empty/whitespace-only inputs - Check `issueResult.exitCode !== 0` before stdout URL check on issue creation - Restore `Bun.$` in `afterAll` to prevent mock leaking across test files - Remove trailing `$ARGUMENTS` from end of feedback.txt template (duplicated from Step 1 pre-fill logic; could confuse model) - Add 8 new tests: empty/whitespace validation, `gh_auth_check_failed` path, non-zero exitCode with stdout scenario, and updated "not found" test name * test: fix Windows CI failures in install and bridge tests - Replace `/bin/echo` with `process.execPath` in bridge test — /bin/echo does not exist on Windows, causing ENOENT on spawn; process.execPath (the current Bun binary) exists on all platforms and exits quickly without speaking JSON-RPC as expected - Add `unixtest` guard to postinstall, bin-wrapper, and integration tests — on Windows, postinstall.mjs takes a different early-exit path that skips hard-link setup; dummy binaries are Unix shell scripts that cannot be executed on Windows; skip all Unix-specific test paths using the same `process.platform !== "win32" ? test : test.skip` pattern already used in fsmonitor.test.ts Co-Authored-By: Claude Sonnet 4.6 <[email protected]> --------- Co-authored-by: Claude Sonnet 4.6 <[email protected]>
- Bump engine version to 0.2.5 - Update CHANGELOG.md with v0.2.5 release notes
…eam rebase The upstream OpenCode rebase changed the package name from `@altimateai/altimate-code` to `opencode`, causing npm publish to fail with E403 (trying to publish to unscoped `opencode-*` packages). - Restore `name` field in `packages/opencode/package.json` - Remove upstream `opencode` bin entry - Update workspace reference in `packages/web/package.json`
npm v7+ silences postinstall stdout, so the `printWelcome()` banner was never visible to users despite running correctly. **Fixes:** - Postinstall now writes a `.installed-version` marker to `XDG_DATA_HOME` - CLI reads the marker on startup, displays a styled welcome banner, then removes it — works regardless of npm's output suppression - Fixed double-v bug (`vv0.2.4`) in `printWelcome()` version display **Tests (10 new):** - Postinstall: marker file creation, v-prefix stripping, missing version - Welcome module: marker cleanup, empty marker, fs error resilience
) (#133) After 20+ minutes idle, OAuth tokens expire and subsequent prompts show unhelpful "Error" with no context or retry. This commit fixes the issue across Anthropic and Codex OAuth plugins: - Add 3-attempt retry with backoff for token refresh (network/5xx only) - Fail fast on 4xx auth errors (permanent failures like revoked tokens) - Add 30-second proactive refresh buffer to prevent mid-request expiry - Update `currentAuth.expires` after successful refresh - Classify token refresh failures as `ProviderAuthError` for actionable error messages with recovery instructions - Make auth errors retryable at session level with user-facing guidance - Improve generic `Error` display (no more bare "Error" in TUI) Co-authored-by: Claude Opus 4.6 <[email protected]>
* chore: rebrand all user-facing references from OpenCode to Altimate Code Comprehensive rebranding of user-facing surfaces while preserving internal code names for upstream compatibility: - URLs: `opencode.ai` → `altimate.ai` - GitHub org: `anomalyco/opencode` → `AltimateAI/altimate-code` - Product name: "OpenCode" → "Altimate Code" in UI, prompts, docs - CLI binary: `opencode` → `altimate-code` in install scripts, nix - npm package: `opencode-ai` → `@altimateai/altimate-code` - Extensions: VSCode rebranded - Social: X handle → `@Altimateinc` - Brew tap: `AltimateAI/tap/altimate-code` - Container registry: `ghcr.io/AltimateAI` - All 20 localized READMEs Preserved internal names: `@opencode-ai/` scope, `packages/opencode/` dir, `OPENCODE_*` env vars, `.opencode/` config paths Co-Authored-By: Claude Opus 4.6 <[email protected]> * fix: additional user-facing branding fixes missed from upstream rebase - `.github/workflows/beta.yml`: "Install OpenCode" → "Install Altimate Code", `bun i -g opencode-ai` → `bun i -g @altimateai/altimate-code` - `.github/actions/setup-git-committer/action.yml`: descriptions updated from "OpenCode GitHub App" → "Altimate Code GitHub App" - `github/index.ts`: `spawn('opencode')` → `spawn('altimate-code')` Co-Authored-By: Claude Opus 4.6 <[email protected]> * feat: add upstream merge automation tooling Comprehensive automation for merging upstream OpenCode releases into the Altimate Code fork, inspired by Kilo-Org/kilocode's approach. Key scripts: - `merge.ts` — 11-step merge orchestration with auto-conflict resolution, branding transforms, version preservation, and `--continue` support - `analyze.ts` — `altimate_change` marker integrity audit + branding leak detection (CI-friendly exit codes) - `list-versions.ts` — upstream tag listing with merge status indicators - `verify-restructure.ts` — branch comparison verification Transforms (10 files): - Core branding engine with preservation-aware product name handling - `keepOurs` / `skipFiles` / lock file conflict auto-resolution - Specialized transforms for `package.json`, Nix, Tauri, i18n, extensions, web docs, workflows, and build scripts Configuration: - All branding rules in TypeScript (`utils/config.ts`) for type safety - URL, GitHub, registry, email, app ID, social, npm, brew mappings - Preserve patterns protect internal refs (`@opencode-ai/`, `OPENCODE_`) Co-Authored-By: Claude Opus 4.6 <[email protected]> * chore: remove upstream-only packages, workflows, and artifacts (Kilo-style cleanup) Remove upstream platform packages (app, console, containers, desktop, desktop-electron, docs, enterprise, extensions, function, identity, slack, storybook, ui, web), translated READMEs, upstream-only workflows, nix packaging (nix/, flake.nix, flake.lock), SST infra (sst.config.ts, sst-env.d.ts), specs/, and .signpath/ config. - Update workspaces from `packages/*` glob to explicit package list - Remove unused catalog entries and devDependencies (sst, @aws-sdk/client-s3) - Remove unused scripts (dev:desktop, dev:web, dev:storybook) - Remove `electron` from trustedDependencies - Remove `@opencode-ai/app#test` task from turbo.json - Update merge-config.json and config.ts skipFiles with new patterns Co-Authored-By: Claude Opus 4.6 <[email protected]> * chore: remove upstream SST `infra/` directory and add to skipFiles Co-Authored-By: Claude Opus 4.6 <[email protected]> * docs: rewrite upstream merge README as a practical runbook Reorganized around the step-by-step workflow someone would follow when doing an upstream merge. Covers fork strategy, prerequisites, the full merge process, configuration reference, and troubleshooting. Co-Authored-By: Claude Opus 4.6 <[email protected]> * test: add comprehensive branding, build integrity, and upstream merge guard tests Add 141 tests across 3 test files to prevent regressions: - `branding.test.ts` (33 tests): Verify all user-facing surfaces show Altimate branding — package metadata, CLI entry points, logo, welcome banner, install script, GitHub Action, VSCode extension, postinstall, and a full codebase leak scanner for `opencode.ai`/`anomalyco`/`opncd.ai` - `build-integrity.test.ts` (19 tests): Verify workspace config, turbo.json validity, package dependencies, binary entry points, skip/keepOurs consistency, and no orphaned package references - `upstream-guard.test.ts` (89 tests): Verify skipFiles/keepOurs config completeness, deleted upstream packages stay deleted, branding rules coverage, preserve patterns, and no upstream artifacts reappear Fix 14 upstream branding leaks found by the tests: - Replace `opencode.ai` URLs with `altimate.ai` in config.ts, retry.ts, dialog-provider.tsx, oauth-provider.ts, migrate-tui-config.ts - Replace `opncd.ai` with `altimate.ai` in share-next.ts and import.ts - Replace "OpenCode Go" with "Altimate Code Go" in dialog-provider.tsx Add CI enforcement: - New `branding-check.yml` workflow with branding audit + test jobs - Add `branding` job to existing `ci.yml` for PR checks Co-Authored-By: Claude Opus 4.6 <[email protected]> * chore: remove separate branding CI workflow — tests run with `bun test` The branding unit tests already run as part of the existing `typescript` CI job via `bun test`. A separate workflow and branding audit on every commit is overkill — the `analyze.ts --branding` audit is a merge-time tool, not a per-commit check. Co-Authored-By: Claude Opus 4.6 <[email protected]> * fix: persist version snapshot in merge state for `--continue` flow The `--continue` handler was re-snapshotting versions after the merge commit, capturing upstream versions instead of our pre-merge versions. Now the snapshot is saved in `.upstream-merge-state.json` and restored when resuming. Co-Authored-By: Claude Opus 4.6 <[email protected]> * fix: address code review — XSS, branding leaks, regex safety - Fix XSS in OAuth error page: escape HTML in error parameter - Fix branding: `client_name` and HTML titles/text in OAuth pages now show "Altimate Code" instead of "OpenCode" - Fix Anthropic plugin regex: add word boundaries (`\b`) to prevent replacing "opencode" inside URLs, paths, and identifiers Co-Authored-By: Claude Opus 4.6 <[email protected]> * ci: retry CI run --------- Co-authored-by: Claude Opus 4.6 <[email protected]>
New `packages/dbt-tools/` TypeScript package wrapping `@altimateai/dbt-integration` to provide one-shot dbt CLI operations (compile, build, test, execute, introspect). - 16 commands: init, doctor, info, compile, compile-query, build, run, test, build-project, execute, columns, columns-source, column-values, children, parents, deps, add-packages - Config at `~/.altimate-code/dbt.json`, auto-detected via `altimate-dbt init` - Prerequisite validation (`doctor`) checks Python, dbt-core, and project health - Structured JSON output to stdout, logs to stderr, `--format text` for humans - Graceful error handling with actionable `error` + `fix` fields - Patch `[email protected]` to fix `bluebird.promisifyAll` crash - Build with `bun build --target node` for Node.js runtime (Bun IPC bug workaround) - 11 tests covering config round-trip, CLI dispatch, error paths - `/dbt-cli` skill teaching AI agents when and how to invoke each command Co-Authored-By: Claude Opus 4.6 <[email protected]>
… bridge `bun build` bundles all JS into a single `dist/index.js`, causing `import.meta.url` to resolve to the bundle location instead of the original `@altimateai/dbt-integration/dist/` directory. This meant `PYTHONPATH` pointed to a nonexistent `altimate_python_packages/` dir, breaking `dbt_core_integration` imports. - Add `script/copy-python.ts` post-build step that copies `altimate_python_packages/` from the npm package into `dist/` - Remove developer-only build instructions from `/dbt-cli` skill Co-Authored-By: Claude Opus 4.6 <[email protected]>
…nces/` system Restructure all dbt-related skills for better AI routing and progressive context disclosure: **New skills (5):** - `dbt-develop` — model creation hub (merges model-scaffold, yaml-config, medallion-patterns, incremental-logic, dbt-cli) - `dbt-test` — schema tests, unit tests, custom tests (merges generate-tests + new content) - `dbt-troubleshoot` — diagnostic workflow for compilation, runtime, and test errors - `dbt-analyze` — downstream impact analysis using lineage (replaces impact-analysis) - `dbt-docs` — enhanced with `altimate-dbt` integration **Deleted skills (7):** - dbt-cli, model-scaffold, generate-tests, yaml-config, incremental-logic, medallion-patterns, impact-analysis **Architecture:** - Lean SKILL.md files for AI routing (When to Use / Do NOT Use sections) - Deep `references/` directories for on-demand knowledge (read only when needed) - Shared `altimate-dbt-commands.md` reference in every skill - Iron Rules, Common Mistakes tables, and Rationalizations to Resist patterns - All skills use `altimate-dbt` commands instead of raw `dbt` Co-Authored-By: Claude Opus 4.6 <[email protected]>
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 2 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
| case "children": | ||
| result = (await import("./commands/graph")).children(adapter, rest) | ||
| break | ||
| case "parents": | ||
| result = (await import("./commands/graph")).parents(adapter, rest) | ||
| break |
There was a problem hiding this comment.
Bug: The children and parents commands are not awaited in index.ts. This causes them to return an unresolved Promise instead of the expected lineage data.
Severity: CRITICAL
Suggested Fix
Add the await keyword to the children and parents command calls within the switch statement in index.ts. Also, ensure the children() and parents() functions in graph.ts are marked as async to correctly handle the Promises returned by the adapter methods.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: packages/dbt-tools/src/index.ts#L156-L161
Potential issue: In `index.ts`, the `switch` statement handling CLI commands is missing
the `await` keyword for the `children` and `parents` cases. The corresponding functions
in `graph.ts` return Promises from adapter calls. Because these Promises are not
awaited, they are passed directly to `JSON.stringify()`, which serializes them to an
empty object `"{}"`. This breaks the lineage analysis feature, causing the commands to
return no data. Additionally, this creates a race condition where `adapter.dispose()`
may be called before the async operation completes.
Did we get this right? 👍 / 👎 to inform future reviews.
🤖 Behavioral Analysis — 2 Finding(s)🟡 Warnings (2)
Analysis run | Powered by QA Autopilot |
✅ Tests — All PassedTypeScript — passedPython — passedTested at |
Summary
altimate-dbtCLI package (packages/dbt-tools/) — a Bun TypeScript wrapper around@altimateai/dbt-integrationfor dbt project operationsreferences/directories for progressive context disclosurealtimate-dbtcommands instead of rawdbtaltimate-dbt CLI (
packages/dbt-tools/)New package providing 16 commands for dbt project operations:
initdoctorinfocompile/compile-querybuild/run/test/build-projectexecutecolumns/columns-source/column-valueschildren/parentsdeps/add-packagesArchitecture: one-shot CLI (run command → print JSON → exit). No MCP, no server, no API key required. Wraps
@altimateai/dbt-integrationviaDBTProjectIntegrationAdapter.dbt Skills Consolidation
dbt-developdbt-testdbt-docsdbt-troubleshootdbt-analyzeDeleted:
dbt-cli,model-scaffold,generate-tests,yaml-config,incremental-logic,medallion-patterns,impact-analysisArchitecture: Lean SKILL.md for AI routing → deep
references/files loaded on-demand. Adopts patterns from dbt-labs/dbt-agent-skills: Iron Rules, Common Mistakes tables, explicit boundaries.Test plan
bun packages/dbt-tools/src/index.tsprints usagebun packages/dbt-tools/src/index.ts initdetects dbt projectbun test --cwd packages/dbt-toolspasses🤖 Generated with Claude Code