From 268881c6c403a43a3121dc968edc5f7c81e2b513 Mon Sep 17 00:00:00 2001 From: Kiet Ho Date: Tue, 4 Aug 2026 22:21:15 -0700 Subject: [PATCH 1/7] docs(readme): add License & what's free forever section --- README.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5e1b525f442..cb9c900c342 100644 --- a/README.md +++ b/README.md @@ -318,6 +318,15 @@ Join the Superset community to get help, share feedback, and connect with other [![Kiet Twitter](https://img.shields.io/badge/Kiet-@flyakiet-555?logo=x)](https://x.com/flyakiet) [![Satya Twitter](https://img.shields.io/badge/Satya-@saddle__paddle-555?logo=x)](https://x.com/saddle_paddle) -## License +## License & what's free forever -Distributed under the Elastic License 2.0 (ELv2). See [LICENSE.md](LICENSE.md) for more information. +Superset is source available under the Elastic License 2.0 (ELv2). The full text is in [LICENSE.md](LICENSE.md), but here is what it means in practice: + +- **Use it for free.** Run Superset for yourself, your team, or your company. No payment required. +- **Read and modify the source.** The entire app is in this repo. Fork it, patch it, build it yourself. +- **Self-host it.** Run it on your own machines or your company's infrastructure at no cost. +- **The one restriction:** you may not offer Superset itself to third parties as a hosted or managed service. This clause blocks reselling Superset as a product. It does not affect using it, modifying it, or self-hosting it. + +Beyond that, ELv2 has the standard housekeeping terms: keep the license and copyright notices intact, state your changes if you distribute a modified copy, and don't circumvent license keys. + +**Our commitment: the core desktop app is free forever.** Orchestrating agents in parallel workspaces on your own machine will never require payment. Anything we charge for will be optional services on top, not the app itself. From e770d0bd7e5386af67046ecbafaf0df527cb334d Mon Sep 17 00:00:00 2001 From: Kiet Ho Date: Wed, 5 Aug 2026 00:02:12 -0700 Subject: [PATCH 2/7] docs(readme): tighten ELv2 summary accuracy per review The managed-service restriction applies regardless of payment, not just to reselling. Also notes the pass-along-terms requirement and the non-sublicensable/non-transferable grant, and points to LICENSE.md as controlling. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index cb9c900c342..ce6da5e2cdc 100644 --- a/README.md +++ b/README.md @@ -325,8 +325,8 @@ Superset is source available under the Elastic License 2.0 (ELv2). The full text - **Use it for free.** Run Superset for yourself, your team, or your company. No payment required. - **Read and modify the source.** The entire app is in this repo. Fork it, patch it, build it yourself. - **Self-host it.** Run it on your own machines or your company's infrastructure at no cost. -- **The one restriction:** you may not offer Superset itself to third parties as a hosted or managed service. This clause blocks reselling Superset as a product. It does not affect using it, modifying it, or self-hosting it. +- **The one restriction:** you may not provide Superset to third parties as a hosted or managed service that gives them a substantial set of its features. This applies whether or not you charge for it. It does not affect using it, modifying it, or self-hosting it for yourself, your team, or your company. -Beyond that, ELv2 has the standard housekeeping terms: keep the license and copyright notices intact, state your changes if you distribute a modified copy, and don't circumvent license keys. +ELv2 also has housekeeping terms worth knowing: keep the license and copyright notices intact, state your changes if you distribute a modified copy, pass these terms along to anyone you give a copy to, and don't circumvent license keys. The grant is non-sublicensable and non-transferable. This summary is not the license, so read [LICENSE.md](LICENSE.md) if anything here matters to your situation. **Our commitment: the core desktop app is free forever.** Orchestrating agents in parallel workspaces on your own machine will never require payment. Anything we charge for will be optional services on top, not the app itself. From 55b6eaf215ae127d1edabbdfad6028d1878a51ae Mon Sep 17 00:00:00 2001 From: Kiet Ho Date: Wed, 5 Aug 2026 00:06:01 -0700 Subject: [PATCH 3/7] docs(readme): show Elastic License 2.0 on the license badge GitHub's license detector does not recognize ELv2, so the auto-detecting badge rendered NOASSERTION. Use a static badge naming the license. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ce6da5e2cdc..6cd61e07f42 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ [![GitHub stars](https://img.shields.io/github/stars/superset-sh/superset?style=flat&logo=github)](https://github.com/superset-sh/superset/stargazers) [![GitHub release](https://img.shields.io/github/v/release/superset-sh/superset?style=flat&logo=github)](https://github.com/superset-sh/superset/releases) -[![License](https://img.shields.io/github/license/superset-sh/superset?style=flat)](LICENSE.md) +[![License](https://img.shields.io/badge/license-Elastic%20License%202.0-blue?style=flat)](LICENSE.md) [![Twitter](https://img.shields.io/badge/@superset__sh-555?logo=x)](https://x.com/superset_sh) [![Discord](https://img.shields.io/badge/Discord-555?logo=discord)](https://discord.gg/cZeD9WYcV7) From 9a195fd0dbbb9c5deae857b5567b263805ddad07 Mon Sep 17 00:00:00 2001 From: Kiet Ho Date: Wed, 5 Aug 2026 00:19:34 -0700 Subject: [PATCH 4/7] docs: correct platform, license, and requirements claims across README and docs - README told users to install Bun and Caddy before downloading the app; neither is a runtime dependency. Install now states the real requirement (Git, optionally gh) and links per-platform builds. - README and docs said Linux builds were unavailable, but CI has built and published an x64 AppImage every release (86 downloads on 1.18.3). Now listed as experimental. - Docs overview and the marketing LLM copy called Superset open source; it is source-available under ELv2. - Added Grok and Kimi Code to the supported agents table; both are shipped builtins. - Corrected the Bun version floor (pinned in .bun-version, not v1.0+), the CLI install platform list (Intel mac and arm64 Linux were omitted), two wrong command descriptions in DEVELOPMENT.md, and the FAQ account answer. --- DEVELOPMENT.md | 7 +++--- README.md | 23 ++++++++----------- .../docs/content/docs/cli/getting-started.mdx | 6 ++--- apps/docs/content/docs/faq.mdx | 4 ++-- apps/docs/content/docs/overview.mdx | 6 ++--- apps/marketing/src/app/index.md/route.ts | 2 +- apps/marketing/src/app/llms-full.txt/route.ts | 2 +- apps/marketing/src/lib/llms.ts | 2 +- 8 files changed, 25 insertions(+), 27 deletions(-) diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index dca0dbf6025..1b6a38893ea 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -6,7 +6,7 @@ This guide is for contributors building Superset from source. If you just want t | Tool | Install | |:-----|:--------| -| [Bun](https://bun.sh/) (v1.0+) | `curl -fsSL https://bun.sh/install \| bash` | +| [Bun](https://bun.sh/) (the version pinned in `.bun-version`) | `curl -fsSL https://bun.sh/install \| bash` | | [Docker](https://docs.docker.com/get-docker/) | Docker Desktop or OrbStack | | `jq` | `brew install jq` | | [Caddy](https://caddyserver.com/docs/install) | `brew install caddy && caddy trust` | @@ -83,11 +83,12 @@ open apps/desktop/release ## Common commands ```bash -bun dev # Start all dev servers +bun dev # Start the api, web, desktop, and electric-proxy dev servers +bun run dev:all # Start every dev server in the monorepo bun test # Run tests bun run lint:fix # Fix lint + format bun run typecheck # Type-check all packages -bun run build # Build all packages +bun run build # Build the desktop app ``` See [`AGENTS.md`](./AGENTS.md) for repo structure, monorepo conventions, and database/migration workflow. diff --git a/README.md b/README.md index 6cd61e07f42..0c94b3bf036 100644 --- a/README.md +++ b/README.md @@ -179,6 +179,8 @@ Superset works with any CLI-based coding agent, including: | Droid  [Droid](https://www.factory.ai/) | Fully supported | | Gemini CLI  [Gemini CLI](https://github.com/google-gemini/gemini-cli) | Fully supported | | GitHub Copilot  [GitHub Copilot](https://github.com/features/copilot) | Fully supported | +| Grok  [Grok](https://x.ai/) | Fully supported | +| Kimi Code  [Kimi Code](https://www.kimi.com/) | Fully supported | | Mastra Code  [Mastra Code](https://mastra.ai/) | Fully supported | | Mistral Vibe  [Mistral Vibe](https://mistral.ai/) | Fully supported | | OpenCode  [OpenCode](https://github.com/opencode-ai/opencode) | Fully supported | @@ -217,21 +219,16 @@ brew install superset-sh/tap/superset An iOS app is coming soon so you can check on your agents from your phone. -## Requirements - -| Requirement | Details | -|:------------|:--------| -| **OS** | macOS (Windows/Linux untested) | -| **Runtime** | [Bun](https://bun.sh/) v1.0+ | -| **Version Control** | Git 2.20+ | -| **GitHub CLI** | [gh](https://cli.github.com/) | -| **Caddy** | [caddy](https://caddyserver.com/docs/install) (for dev server) | - ## Install -**[Download Superset for macOS](https://github.com/superset-sh/superset/releases/latest)** +Download the desktop app: + +- **macOS**: [Apple Silicon (.dmg)](https://github.com/superset-sh/superset/releases/latest/download/Superset-arm64.dmg) · [Intel (.dmg)](https://github.com/superset-sh/superset/releases/latest/download/Superset-x64.dmg) +- **Linux**: [x64 AppImage](https://github.com/superset-sh/superset/releases/latest/download/Superset-x86_64.AppImage) (experimental; macOS is the primary target) +- **Windows**: not yet available +- [All builds](https://github.com/superset-sh/superset/releases/latest) -Builds for Windows and Linux are not yet available. +All you need installed is [Git](https://git-scm.com/). [gh](https://cli.github.com/) is optional and unlocks the PR workflows; Superset offers to install it for you. ## Development @@ -257,7 +254,7 @@ No Neon account or third-party credentials are needed. `setup.local.sh` brings up a local Postgres + Electric stack via Docker and seeds a dev account. Sign in with the **"Sign in as dev"** button (or `admin@local.test` / `supersetdev`). -Prereqs: `bun`, `docker`, `jq`, `caddy` (`brew install jq caddy && caddy trust`). +Prereqs: [Bun](https://bun.sh/) (the version in `.bun-version`), `docker`, and `jq`, all required. `caddy` is optional and only used by the dev server (`brew install jq caddy && caddy trust`). See [**DEVELOPMENT.md**](./DEVELOPMENT.md) for the full guide: what the setup script does, manual setup against real services, common commands, troubleshooting, and how to build the desktop app. Contribution process lives in [**CONTRIBUTING.md**](./CONTRIBUTING.md). diff --git a/apps/docs/content/docs/cli/getting-started.mdx b/apps/docs/content/docs/cli/getting-started.mdx index 1280ca330f9..4e144a4375d 100644 --- a/apps/docs/content/docs/cli/getting-started.mdx +++ b/apps/docs/content/docs/cli/getting-started.mdx @@ -32,9 +32,9 @@ export PATH="$HOME/.superset/bin:$PATH" curl -fsSL https://superset.sh/cli/install.sh | sh ``` -The script auto-detects your platform (macOS Apple Silicon or Linux x86_64), -installs Superset under `~/superset` by default, and adds `~/superset/bin` -to your shell `PATH`. +The script auto-detects your platform (macOS on Apple Silicon or Intel, Linux on +x64 or arm64), installs Superset under `~/superset` by default, and adds +`~/superset/bin` to your shell `PATH`. ### Homebrew diff --git a/apps/docs/content/docs/faq.mdx b/apps/docs/content/docs/faq.mdx index 79354f29df7..12d6eceece1 100644 --- a/apps/docs/content/docs/faq.mdx +++ b/apps/docs/content/docs/faq.mdx @@ -6,13 +6,13 @@ description: Frequently asked questions ## General **What platforms?** -macOS only. Windows/Linux coming soon. +macOS (Apple Silicon and Intel) is the primary target. A Linux x64 AppImage ships with each release and is experimental. Windows is not yet available. The CLI additionally supports Linux arm64. **How does it work?** Uses git worktrees to give each branch its own directory. **Do I need an account?** -Yes, for team features and settings sync. +Yes. Superset requires signing in before you reach the app. ## Workspaces diff --git a/apps/docs/content/docs/overview.mdx b/apps/docs/content/docs/overview.mdx index 9dea6b39d48..f58bebbaef2 100644 --- a/apps/docs/content/docs/overview.mdx +++ b/apps/docs/content/docs/overview.mdx @@ -3,7 +3,7 @@ title: Overview description: Get started with Superset. --- -Superset is an open source AI coding platform. It's available as a desktop IDE, a command-line interface, or an MCP server. +Superset is a source-available AI coding platform, licensed under the Elastic License 2.0. It's available as a desktop IDE, a command-line interface, or an MCP server. @@ -11,9 +11,9 @@ Each git branch gets its own isolated workspace via git worktrees: no stashing, ## Requirements -- macOS (Apple Silicon or Intel). Windows and Linux coming soon. +- macOS (Apple Silicon or Intel), or Linux x64 via the experimental AppImage. Windows is not yet available. - Git installed -- GitHub CLI authenticated (`gh auth status`) +- GitHub CLI (`gh`) for the PR workflows. Optional; Superset offers to install it for you. ## Install desktop app diff --git a/apps/marketing/src/app/index.md/route.ts b/apps/marketing/src/app/index.md/route.ts index 388c924a853..e79ae87565b 100644 --- a/apps/marketing/src/app/index.md/route.ts +++ b/apps/marketing/src/app/index.md/route.ts @@ -13,7 +13,7 @@ export async function GET() { const lines: string[] = [ `# ${COMPANY.NAME} — Run 10+ parallel coding agents on your machine`, "", - `${COMPANY.NAME} is an open-source desktop application that lets developers run multiple AI coding agents in parallel, each in its own isolated Git worktree. It works with any CLI-based agent including Claude Code, OpenCode, and OpenAI Codex. Agents can work on different branches or features simultaneously without conflicts. ${COMPANY.NAME} is free, does not proxy API calls, and supports macOS with Windows and Linux coming soon.`, + `${COMPANY.NAME} is a source-available desktop application (Elastic License 2.0) that lets developers run multiple AI coding agents in parallel, each in its own isolated Git worktree. It works with any CLI-based agent including Claude Code, OpenCode, and OpenAI Codex. Agents can work on different branches or features simultaneously without conflicts. ${COMPANY.NAME} is free, does not proxy API calls, and supports macOS, with an experimental Linux AppImage and Windows not yet available.`, "", "## Features", "", diff --git a/apps/marketing/src/app/llms-full.txt/route.ts b/apps/marketing/src/app/llms-full.txt/route.ts index 2f59bee9497..4568694c641 100644 --- a/apps/marketing/src/app/llms-full.txt/route.ts +++ b/apps/marketing/src/app/llms-full.txt/route.ts @@ -19,7 +19,7 @@ export async function GET() { "", "> Run 10+ parallel coding agents on your machine", "", - `${COMPANY.NAME} is an open-source desktop application that lets developers run multiple AI coding agents in parallel, each in its own isolated Git worktree. It works with any CLI-based agent including Claude Code, OpenCode, and OpenAI Codex. Agents can work on different branches or features simultaneously without conflicts. ${COMPANY.NAME} is free, does not proxy API calls, and supports macOS with Windows and Linux coming soon.`, + `${COMPANY.NAME} is a source-available desktop application (Elastic License 2.0) that lets developers run multiple AI coding agents in parallel, each in its own isolated Git worktree. It works with any CLI-based agent including Claude Code, OpenCode, and OpenAI Codex. Agents can work on different branches or features simultaneously without conflicts. ${COMPANY.NAME} is free, does not proxy API calls, and supports macOS, with an experimental Linux AppImage and Windows not yet available.`, "", "## Docs", "", diff --git a/apps/marketing/src/lib/llms.ts b/apps/marketing/src/lib/llms.ts index 8ed5c70fbbe..386021cd696 100644 --- a/apps/marketing/src/lib/llms.ts +++ b/apps/marketing/src/lib/llms.ts @@ -26,7 +26,7 @@ export function buildLlmsHeader(): string[] { "", "> Run 10+ parallel coding agents on your machine", "", - `${COMPANY.NAME} is an open-source desktop application that lets developers run multiple AI coding agents in parallel, each in its own isolated Git worktree. It works with any CLI-based agent including Claude Code, OpenCode, and OpenAI Codex. Agents can work on different branches or features simultaneously without conflicts. ${COMPANY.NAME} is free, does not proxy API calls, and supports macOS with Windows and Linux coming soon.`, + `${COMPANY.NAME} is a source-available desktop application (Elastic License 2.0) that lets developers run multiple AI coding agents in parallel, each in its own isolated Git worktree. It works with any CLI-based agent including Claude Code, OpenCode, and OpenAI Codex. Agents can work on different branches or features simultaneously without conflicts. ${COMPANY.NAME} is free, does not proxy API calls, and supports macOS, with an experimental Linux AppImage and Windows not yet available.`, ]; } From 5a8d0db9a635712025388908dfcde8f51cc88c9f Mon Sep 17 00:00:00 2001 From: Kiet Ho Date: Wed, 5 Aug 2026 00:33:18 -0700 Subject: [PATCH 5/7] docs(marketing): dedupe the product summary into one constant The license and platform sentence was copied into llms.ts, index.md, and llms-full.txt, which is why the inaccurate 'open source' claim existed in three places. Export it once as PRODUCT_SUMMARY. Also pin the Bun floor to the concrete version. --- DEVELOPMENT.md | 2 +- README.md | 2 +- apps/marketing/src/app/index.md/route.ts | 3 ++- apps/marketing/src/app/llms-full.txt/route.ts | 4 ++-- apps/marketing/src/lib/llms.ts | 6 +++++- 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 1b6a38893ea..fa55db95f61 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -6,7 +6,7 @@ This guide is for contributors building Superset from source. If you just want t | Tool | Install | |:-----|:--------| -| [Bun](https://bun.sh/) (the version pinned in `.bun-version`) | `curl -fsSL https://bun.sh/install \| bash` | +| [Bun](https://bun.sh/) v1.3.14+ (pinned in `.bun-version`) | `curl -fsSL https://bun.sh/install \| bash` | | [Docker](https://docs.docker.com/get-docker/) | Docker Desktop or OrbStack | | `jq` | `brew install jq` | | [Caddy](https://caddyserver.com/docs/install) | `brew install caddy && caddy trust` | diff --git a/README.md b/README.md index 0c94b3bf036..6c7d1af517e 100644 --- a/README.md +++ b/README.md @@ -254,7 +254,7 @@ No Neon account or third-party credentials are needed. `setup.local.sh` brings up a local Postgres + Electric stack via Docker and seeds a dev account. Sign in with the **"Sign in as dev"** button (or `admin@local.test` / `supersetdev`). -Prereqs: [Bun](https://bun.sh/) (the version in `.bun-version`), `docker`, and `jq`, all required. `caddy` is optional and only used by the dev server (`brew install jq caddy && caddy trust`). +Prereqs: [Bun](https://bun.sh/) v1.3.14+ (pinned in `.bun-version`), `docker`, and `jq`, all required. `caddy` is optional and only used by the dev server (`brew install jq caddy && caddy trust`). See [**DEVELOPMENT.md**](./DEVELOPMENT.md) for the full guide: what the setup script does, manual setup against real services, common commands, troubleshooting, and how to build the desktop app. Contribution process lives in [**CONTRIBUTING.md**](./CONTRIBUTING.md). diff --git a/apps/marketing/src/app/index.md/route.ts b/apps/marketing/src/app/index.md/route.ts index e79ae87565b..f7519d80545 100644 --- a/apps/marketing/src/app/index.md/route.ts +++ b/apps/marketing/src/app/index.md/route.ts @@ -4,6 +4,7 @@ import { buildDeveloperResourcesSection, buildWhenToUseSection, MARKDOWN_HEADERS, + PRODUCT_SUMMARY, } from "@/lib/llms"; export async function GET() { @@ -13,7 +14,7 @@ export async function GET() { const lines: string[] = [ `# ${COMPANY.NAME} — Run 10+ parallel coding agents on your machine`, "", - `${COMPANY.NAME} is a source-available desktop application (Elastic License 2.0) that lets developers run multiple AI coding agents in parallel, each in its own isolated Git worktree. It works with any CLI-based agent including Claude Code, OpenCode, and OpenAI Codex. Agents can work on different branches or features simultaneously without conflicts. ${COMPANY.NAME} is free, does not proxy API calls, and supports macOS, with an experimental Linux AppImage and Windows not yet available.`, + PRODUCT_SUMMARY, "", "## Features", "", diff --git a/apps/marketing/src/app/llms-full.txt/route.ts b/apps/marketing/src/app/llms-full.txt/route.ts index 4568694c641..369be9306c7 100644 --- a/apps/marketing/src/app/llms-full.txt/route.ts +++ b/apps/marketing/src/app/llms-full.txt/route.ts @@ -1,7 +1,7 @@ import { COMPANY } from "@superset/shared/constants"; import { getBlogPosts } from "@/lib/blog"; import { getComparisonPages } from "@/lib/compare"; -import { stripMdxSyntax } from "@/lib/llms"; +import { PRODUCT_SUMMARY, stripMdxSyntax } from "@/lib/llms"; import { FAQ_ITEMS } from "../components/FAQSection/constants"; export async function GET() { @@ -19,7 +19,7 @@ export async function GET() { "", "> Run 10+ parallel coding agents on your machine", "", - `${COMPANY.NAME} is a source-available desktop application (Elastic License 2.0) that lets developers run multiple AI coding agents in parallel, each in its own isolated Git worktree. It works with any CLI-based agent including Claude Code, OpenCode, and OpenAI Codex. Agents can work on different branches or features simultaneously without conflicts. ${COMPANY.NAME} is free, does not proxy API calls, and supports macOS, with an experimental Linux AppImage and Windows not yet available.`, + PRODUCT_SUMMARY, "", "## Docs", "", diff --git a/apps/marketing/src/lib/llms.ts b/apps/marketing/src/lib/llms.ts index 386021cd696..45364f9eaf0 100644 --- a/apps/marketing/src/lib/llms.ts +++ b/apps/marketing/src/lib/llms.ts @@ -20,13 +20,17 @@ export function stripMdxSyntax(content: string): string { ); } +// Single source of truth: the license and platform claims here are checked against +// LICENSE.md and the release targets, so keep them in one place. +export const PRODUCT_SUMMARY = `${COMPANY.NAME} is a source-available desktop application (Elastic License 2.0) that lets developers run multiple AI coding agents in parallel, each in its own isolated Git worktree. It works with any CLI-based agent including Claude Code, OpenCode, and OpenAI Codex. Agents can work on different branches or features simultaneously without conflicts. ${COMPANY.NAME} is free, does not proxy API calls, and supports macOS, with an experimental Linux AppImage and Windows not yet available.`; + export function buildLlmsHeader(): string[] { return [ `# ${COMPANY.NAME}`, "", "> Run 10+ parallel coding agents on your machine", "", - `${COMPANY.NAME} is a source-available desktop application (Elastic License 2.0) that lets developers run multiple AI coding agents in parallel, each in its own isolated Git worktree. It works with any CLI-based agent including Claude Code, OpenCode, and OpenAI Codex. Agents can work on different branches or features simultaneously without conflicts. ${COMPANY.NAME} is free, does not proxy API calls, and supports macOS, with an experimental Linux AppImage and Windows not yet available.`, + PRODUCT_SUMMARY, ]; } From 6bf6ac46c850a4e8afa79c05728c2556d606c0c4 Mon Sep 17 00:00:00 2001 From: Kiet Ho Date: Wed, 5 Aug 2026 01:05:14 -0700 Subject: [PATCH 6/7] docs: correct Caddy and ELv2 restriction wording, drop out-of-scope spec - bun dev runs caddy unconditionally, so caddy is required for the dev flow, not optional. - ELv2 has three limitations, not one. Name the license-key and notice terms as limitations rather than folding them into housekeeping. - Remove plans/account-switcher-rate-limit-spec.md from this PR; it belongs with SUPER-1769, not a docs accuracy change. --- README.md | 6 +- plans/account-switcher-rate-limit-spec.md | 113 ---------------------- 2 files changed, 3 insertions(+), 116 deletions(-) delete mode 100644 plans/account-switcher-rate-limit-spec.md diff --git a/README.md b/README.md index 6c7d1af517e..e2b6c628ef6 100644 --- a/README.md +++ b/README.md @@ -254,7 +254,7 @@ No Neon account or third-party credentials are needed. `setup.local.sh` brings up a local Postgres + Electric stack via Docker and seeds a dev account. Sign in with the **"Sign in as dev"** button (or `admin@local.test` / `supersetdev`). -Prereqs: [Bun](https://bun.sh/) v1.3.14+ (pinned in `.bun-version`), `docker`, and `jq`, all required. `caddy` is optional and only used by the dev server (`brew install jq caddy && caddy trust`). +Prereqs: [Bun](https://bun.sh/) v1.3.14+ (pinned in `.bun-version`), `docker`, `jq`, and `caddy`, which `bun dev` runs as the local HTTPS proxy (`brew install jq caddy && caddy trust`). See [**DEVELOPMENT.md**](./DEVELOPMENT.md) for the full guide: what the setup script does, manual setup against real services, common commands, troubleshooting, and how to build the desktop app. Contribution process lives in [**CONTRIBUTING.md**](./CONTRIBUTING.md). @@ -322,8 +322,8 @@ Superset is source available under the Elastic License 2.0 (ELv2). The full text - **Use it for free.** Run Superset for yourself, your team, or your company. No payment required. - **Read and modify the source.** The entire app is in this repo. Fork it, patch it, build it yourself. - **Self-host it.** Run it on your own machines or your company's infrastructure at no cost. -- **The one restriction:** you may not provide Superset to third parties as a hosted or managed service that gives them a substantial set of its features. This applies whether or not you charge for it. It does not affect using it, modifying it, or self-hosting it for yourself, your team, or your company. +- **The restriction that matters:** you may not provide Superset to third parties as a hosted or managed service that gives them a substantial set of its features. This applies whether or not you charge for it. It does not affect using it, modifying it, or self-hosting it for yourself, your team, or your company. -ELv2 also has housekeeping terms worth knowing: keep the license and copyright notices intact, state your changes if you distribute a modified copy, pass these terms along to anyone you give a copy to, and don't circumvent license keys. The grant is non-sublicensable and non-transferable. This summary is not the license, so read [LICENSE.md](LICENSE.md) if anything here matters to your situation. +ELv2 sets out two further limitations: don't circumvent license-key functionality, and don't alter, remove, or obscure licensing or copyright notices. It also asks that you state your changes if you distribute a modified copy and pass these terms along to anyone you give a copy to, and the grant is non-sublicensable and non-transferable. This summary is not the license, so read [LICENSE.md](LICENSE.md) if anything here matters to your situation. **Our commitment: the core desktop app is free forever.** Orchestrating agents in parallel workspaces on your own machine will never require payment. Anything we charge for will be optional services on top, not the app itself. diff --git a/plans/account-switcher-rate-limit-spec.md b/plans/account-switcher-rate-limit-spec.md deleted file mode 100644 index e7ecc1a6754..00000000000 --- a/plans/account-switcher-rate-limit-spec.md +++ /dev/null @@ -1,113 +0,0 @@ -# Account Switcher + Live Rate-Limit Meter — Implementation Spec - -Playbook item 7 ([Orca Growth Playbook](https://app.notion.com/p/3b3b9d5bf6168118b9d2f87119572e67), in Notion under Growth). Orca's most screenshot-able feature; every multi-account user's pain, timed to Anthropic/OpenAI limit tightening. - -Mechanics cross-checked against Orca's shipped implementation (MIT, `stablyai/orca`) on 2026-08-05 — used as a reference for provider behavior and hazards only; all code here is ours. - -## Problem - -- Users with multiple Claude Code / Codex subscriptions (personal + work, or several Max accounts) can't pick which account an agent session runs under. The CLI silently uses whatever `~/.claude` / `~/.codex` holds; switching means `/logout` + `/login` globally, killing every other session's auth. -- There is no visibility into rate-limit consumption. Users discover a exhausted 5h window only when the agent stalls mid-task, and have no timer for when it resets. -- Nothing in the product touches this today: `CLAUDE_CONFIG_DIR`/`CODEX_HOME` appear only in tests, and the only credential-aware code is read-only detection (`packages/host-service/src/providers/model-providers/LocalModelProvider/utils/resolveAnthropicCredential.ts:22-60`). - -## Key insight (why this is cheap here) - -Both CLIs scope **all** state — auth, sessions, settings — to one env var: `CLAUDE_CONFIG_DIR` (Claude Code) and `CODEX_HOME` (Codex). An "account" is just an isolated config dir plus that env var at launch. Superset already has every layer needed: - -- `HostAgentConfig.env` persists per-config env and is applied at launch as a shell prefix: `envOverlayPrefix({ ...config.env, ...modelEnv })` at `packages/host-service/src/trpc/router/agents/agents.ts:329`. -- `buildAgentModelEnv` (`packages/shared/src/agent-models.ts:306`) is the exact precedent for a per-launch env overlay keyed by presetId. -- The OpenCode wrapper already exports a scoped config dir (`apps/desktop/src/main/lib/agent-setup/agent-wrappers-claude-codex-opencode.ts:500-507`) — same pattern, different var. - -## Proposed UX - -1. **Accounts manager** — new "Accounts" section in Settings → Agents (`apps/desktop/src/renderer/routes/_authenticated/settings/agents/components/V2AgentsSettings/`). Per provider (Claude, Codex): list accounts with label + plan tier + usage bar; "Add account" opens a terminal with the profile's config dir pre-set and runs the CLI's login (`CLAUDE_CONFIG_DIR= claude /login`); the existing `~/.claude` becomes the implicit "Default" account (no env override). -2. **Pick account at launch** — account submenu on preset-bar items (`.../v2-workspace/$workspaceId/components/V2PresetsBar/V2PresetsBar.tsx`) and a default-account per agent config. Plain launch uses the account marked default. -3. **Per-session switcher** — account chip in the terminal pane title row next to `TerminalSessionDropdown` (`.../hooks/usePaneRegistry/usePaneRegistry.tsx:352-363`). Clicking opens a dropdown of accounts, each row showing its live usage meter. Selecting another account **relaunches the CLI in the same terminal** under the new env, using `claude --continue` / `codex resume --last` to keep the conversation (env is fixed at process start; there is no true in-process swap — see open questions). -4. **Rate-limit meter** — small chip in `TerminalPaneHeaderExtras` (`.../TerminalPane/components/TerminalPaneHeaderExtras/TerminalPaneHeaderExtras.tsx:24-64`), patterned on `TerminalConnectionIndicator` (amber/red severity dot) and `ResourceConsumption`'s `MetricBadge`/`UsageSeverityBadge` (`.../TopBar/components/ResourceConsumption/`). Shows `62% · resets 2h 10m`; popover breaks down 5h window / weekly / plan tier. When a session's account crosses ~90%, the chip goes amber and the switcher suggests the least-used account. - -## Data model - -New host-service SQLite table (accounts live on the host, next to `hostAgentConfigs` in `packages/host-service/src/db/schema.ts:154`): - -``` -agent_accounts - id text PK - preset_id text -- "claude" | "codex" (builtin ids from packages/shared/src/builtin-terminal-agents.ts) - label text -- "Personal Max", "Work" - config_dir text -- absolute; null = provider default (~/.claude, ~/.codex) - is_default integer - created_at / last_used_at -``` - -- Managed config dirs live under `~/.superset/agent-accounts///`. -- Env mapping is a static per-preset function: claude → `{ CLAUDE_CONFIG_DIR: dir }`, codex → `{ CODEX_HOME: dir }` (mirror `buildAgentModelEnv`, e.g. `buildAgentAccountEnv(presetId, account)` in `packages/shared`). -- Which account a live session runs under: add `accountId` to the terminal-agent binding (`packages/host-service/src/trpc/router/terminal-agents/terminal-agents.ts:40-136`) — bindings are already the per-terminal agent state channel the renderer reads (`apps/desktop/src/renderer/hooks/host-service/useTerminalAgentBindings/`). -- Usage snapshots: in-memory cache in host-service keyed by accountId (`{ windows: [{label, usedPercent, resetsAt}], planTier, fetchedAt }`); no table needed for v1. - -### Rate-limit data sources (verified locally 2026-08-04; cross-checked against Orca's shipped source 2026-08-05) - -**Claude — HTTP usage endpoint (primary)** -- `GET https://api.anthropic.com/api/oauth/usage`, headers `Authorization: Bearer `, `anthropic-beta: oauth-2025-04-20`, `User-Agent: claude-code/`. -- Response shape (from Orca's parser): `five_hour` and `seven_day` objects each `{utilization | used_percentage, resets_at}`, plus a newer `limits[]` array of `{kind, percent, resets_at, is_active, scope.model.display_name}` where `kind === 'weekly_scoped'` carries the per-model (Opus-tier) weekly window; older builds expose that window as separate legacy top-level fields instead. Prefer `limits[]`, fall back to legacy fields. `resets_at` is epoch seconds or ms (disambiguate at a 1e10 threshold) or an ISO string. **No plan tier in this response.** Exact field names shift across CLI versions — pin them against the installed CLI at implementation time and treat unknown fields as absent, not as errors. -- Missing windows + a valid token means API-key billing, not an error: render "no subscription plan" rather than a broken meter. -- Ignore the locally stored `expiresAt` for this call; credentials often still authenticate past it. Let the server decide. - -**Claude — statusline live feed (free, no polling)** -- Recent Claude Code builds pipe `rate_limits: {five_hour, seven_day}` into the configured `statusLine` command on every turn. Installing a managed statusline script that POSTs this to a local endpoint gives live in-session usage with zero API calls, attributed by the session's `CLAUDE_CONFIG_DIR`. Orca does exactly this and suppresses HTTP polling whenever a statusline post is fresher than 5 minutes. Worth doing in M3 — it is the cheapest source and the only truly live one. - -**Claude — PTY fallback** -- When OAuth fails or creds are API-key-only, usage can be scraped from a hidden `claude` PTY driven to `/usage`. Orca also uses it to supplement the Opus weekly window when the endpoint omits it. Expensive and brittle (TUI regex parsing); treat as last resort, and see the PTY hazards under "Answered by Orca's source". - -**Codex** -- Preferred: JSON-RPC against `codex app-server` (`codex -s read-only -a untrusted app-server`, method `account/rateLimits/read`). Scope the account by setting `CODEX_HOME` on the spawned child only. -- Supplement: `GET https://chatgpt.com/backend-api/wham/usage` with the bearer token and `ChatGPT-Account-Id` from that home's `auth.json` — needed because older app-servers return only the weekly window, and it is the only source of `plan_type` and reset credits. -- Rollout-JSONL tailing (`$CODEX_HOME/sessions/**/rollout-*.jsonl` → `rate_limits`) still works and needs no subprocess. Cheapest option for v1; the RPC/HTTP paths are the upgrade if JSONL proves stale between sessions. -- Serialize probes per home: two concurrent probes against one `auth.json` can race a token refresh. - -**Poll cadence** (Orca's, worth copying): 15 min interval, and only while the app window is visible and focused. Refresh on focus/resume if data is older than 5 min. Per-provider exponential backoff on failure (30s doubling, capped at the poll interval). Honor `Retry-After` on 429 and keep serving the stale snapshot (they extend staleness tolerance from 30 min to 24h while rate-limited). Force a refresh on account add/remove/switch. Our agent Stop/StopFailure hooks are an additional trigger Orca lacks. - -## Integration points - -| Layer | Where | Change | -|---|---|---| -| Launch env (Paths B/C/D: agents.run, automations, SDK/MCP/CLI, workspace-create chain) | `packages/host-service/src/trpc/router/agents/agents.ts:329` (`buildTerminalAgentLaunch`) | merge `...accountEnv` into `envOverlayPrefix({ ...config.env, ...modelEnv })`; add optional `accountId` to `AgentRunInput` (`agents.ts:157`) | -| Launch env (Path A: preset bar, no prompt) | `apps/desktop/src/renderer/lib/agent-launch-command.ts:37` (`getAgentCommandText`) + `useV2PresetExecution` → `useV2TerminalLauncher.ts:42-48` | accept env overlay when composing the command string; preset schema already links `agentId` (`.../CollectionsProvider/dashboardSidebarLocal/schema.ts:213-232`) | -| Env prefix helper | `packages/shared/src/agent-prompt-launch.ts:51` (`envOverlayPrefix`) | reuse as-is; `CLAUDE_CONFIG_DIR`/`CODEX_HOME` pass the PTY env-strip untouched (`packages/host-service/src/terminal/env-strip.ts` strips only `SUPERSET_*`/runtime keys) | -| Accounts CRUD + usage API | new `agentAccounts` router beside `packages/host-service/src/trpc/router/settings/agent-configs.ts:174`, registered in `router.ts:27-54` | `list / add / remove / setDefault / usage` (+ subscription for meter updates) | -| Session→account binding | `packages/host-service/src/trpc/router/terminal-agents/terminal-agents.ts:108` (`getOrCreate`) | carry `accountId` on the binding | -| Switcher UI | `usePaneRegistry.tsx:352-363` (`renderTitle`) | account chip + dropdown; relaunch = write `--continue` launch into existing session (`queueInitialCommand` pattern, `packages/host-service/src/terminal/terminal.ts:857-886`) | -| Meter UI | `TerminalPaneHeaderExtras.tsx:24-64`; pattern from `ResourceConsumption/components/{MetricBadge,UsageSeverityBadge}` | severity chip + popover | -| Settings UI | `V2AgentsSettings.tsx` + `AgentDetail.tsx` | Accounts section; default-account select per config | -| Credential read | `LocalModelProvider/utils/resolveAnthropicCredential.ts:22-60` (+ `resolveOpenAICredential.ts`) | parameterize config dir; reuse for usage polling | - -Non-goals for v1: v1 desktop UI (sunset), other agents (gemini/copilot/etc. can follow the same env-var pattern later), team/cloud account sharing, API-key accounts (OAuth subscriptions only). - -## Answered by Orca's source (studied 2026-08-05, MIT — reference only, we write our own) - -1. **macOS Keychain — isolation works, with a catch.** Claude Code 2.1+ scopes the Keychain item per config dir: service name is `Claude Code-credentials-`, with the unsuffixed legacy service as fallback. So two accounts under two `CLAUDE_CONFIG_DIR`s do **not** clobber each other on current CLIs. Read via `security find-generic-password -s -a $USER -w`; try scoped first, then legacy. Older CLIs ignore `CLAUDE_CONFIG_DIR` and write the legacy item, so a login flow must snapshot the legacy item before login and detect a change to attribute the new creds. Note Orca's own model differs from ours: they materialize one selected account into the shared `~/.claude` + Keychain rather than launching per-account config dirs. Our env-overlay approach is simpler and avoids their whole read-back/ownership-marker apparatus — keep it, and rely on the scoped Keychain service for isolation. -2. **Hot-swap: don't.** Orca does not swap live sessions. On switch they scan for live panes on the old account and show a blocking per-pane overlay ("still signed in as X, restart to use Y, it stays on the old account until you do") with Restart / Keep-old-account, and the restart drops the in-flight conversation entirely. Adopt the honest-prompt UX; our `--continue` / `resume --last` relaunch is strictly better than their bare restart, so offer it as the restart path rather than promising a seamless swap. -3. **Usage endpoint stability + token refresh.** Ship graceful degrade: classify errors and react per class — 429 is terminal for the window (honor `Retry-After`), 401 means stale token (repair, then retry), 403 mentioning a missing scope is terminal, 5xx/network/parse fall back to another source. Orca refreshes OAuth themselves against `POST https://platform.claude.com/v1/oauth/token` (`grant_type=refresh_token`, form-encoded) with Claude Code's public client id, precisely because refresh tokens are **single-use** and must be rotated and persisted atomically. Critical consequence: **never refresh while a live Claude PTY is running** for that account — the CLI will rotate the same single-use token and one of you loses. Orca defers the refresh and retries when the last live PTY for that account exits. If we would rather not own refresh at all, the alternative is their "delegated refresh": spawn the CLI, let it refresh, re-read creds, retry. -4. **Adopted sessions**: unchanged from our analysis, and Orca hits the same issue — they persist a pane→account registry and re-detect stale panes after an app restart. Read the account off the binding, never off the current default. -5. **Default account stays in place.** Orca's Codex overhaul landed on exactly this: the default account runs directly against the user's own `~/.codex` with no env injection, and only non-default accounts get a self-contained `CODEX_HOME` (mirroring the real home's config in, never mutating it). Same for Claude with `CLAUDE_CONFIG_DIR`. Confirms our lean. -6. **Meter placement — and where to leapfrog.** Orca puts per-provider chips in a status bar plus a roster popover listing one row per agent, sorted worst-first, with the account switcher inline (each inactive account showing mini usage bars, fetched lazily on dropdown open with a 60s debounce). Severity: neutral below 60%, amber 60–79%, red 80%+. They show plan tier for Codex only. **They have no aggregate view across accounts** — every surface is scoped to the active account per provider, and their architecture actively avoids keeping inactive accounts fresh. This is the gap their users complain about, so a real "all accounts, all windows" summary is our differentiator, not a stretch goal. - -### Hazards to inherit for free (learned from their code) - -- Hidden PTY probes: disable on Windows (ConPTY crashes), send the command and the Enter keystroke as separate writes (a single write coalesces into a paste), expect to nudge periodically because the prompt character never reliably anchors, and on cleanup kill before destroy — neutralizing the terminal's `kill` first, since node-pty's destroy re-kills and pid reuse can signal an innocent process. -- Never mutate `process.env` to scope an account; set the env on the spawned child only. -- Guard against a raced in-flight fetch overwriting a just-switched account (generation counter or provenance tag on each snapshot). -- Strip inherited auth env (`ANTHROPIC_API_KEY`, `ANTHROPIC_AUTH_TOKEN`, `CLAUDE_CODE_OAUTH_TOKEN`, and friends) when launching under a managed account, or the key silently wins over the account. - -## Remaining open questions - -1. Do we own OAuth refresh (atomic, needs the client id, must respect the live-PTY rule) or use delegated refresh via the CLI? Leaning delegated for v1: less to get wrong, no client-id dependency. -2. Statusline live feed in v1 or v3? It is the cheapest and most live source, but it means installing a managed statusline script into each account's settings — a write into user config we should be deliberate about. -3. Aggregate meter scope: all accounts of one provider, or true cross-provider "here is every quota you own"? The second is the actual differentiator and needs the inactive-account polling Orca refuses to do (their reason: rotating refresh tokens — mitigated if we use read-only sources like JSONL/statusline for inactive accounts). - -## Milestones - -- **M0 — Spike (half day, was 1–2 d)**: the Keychain question is answered in principle, so this is now confirmation not investigation. Two real Claude logins under separate `CLAUDE_CONFIG_DIR`s; verify the scoped Keychain service name against the installed CLI version; pin the live `/api/oauth/usage` field names; codex login under a custom `CODEX_HOME`; confirm `--continue` / `resume --last` behave across config dirs. -- **M1 — Accounts backend (2–3 d)**: `agent_accounts` table + router; `buildAgentAccountEnv`; overlay at `agents.ts:329` + `AgentRunInput.accountId`; add-account login flow (temp config dir → login → capture creds → persist); strip inherited auth env under a managed account. -- **M2 — Switcher UI (2–3 d)**: settings Accounts section; pane-title account chip + restart-to-switch flow (honest prompt, `--continue` relaunch); account on binding, surviving adopt/restart; Path A (preset bar) env threading. -- **M3 — Rate-limit meter (2–3 d)**: host-service usage poller (Claude endpoint + Codex JSONL, 15 min / focus-gated / backoff / Retry-After); error classification; `agentAccounts.usage` query/subscription; header chip + popover + switcher meters; 60/80 thresholds. -- **M4 — Aggregate view + launch polish (2 d)**: the cross-account "every quota you own" summary Orca does not have; "limit hit → switch account" suggestion on StopFailure; changelog + demo video (the screenshot: two accounts, live meters, one-click swap mid-session). From aa1d4f83728d4c231e5a26447649b60ab39cb241 Mon Sep 17 00:00:00 2001 From: Kiet Ho Date: Wed, 5 Aug 2026 01:13:09 -0700 Subject: [PATCH 7/7] docs(readme): make the license section short and positive Review feedback had grown it into a legal disclaimer. Lead with free-forever, state the freedoms in one line, and leave the terms to LICENSE.md. --- README.md | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index e2b6c628ef6..ee74e261c28 100644 --- a/README.md +++ b/README.md @@ -317,13 +317,6 @@ Join the Superset community to get help, share feedback, and connect with other ## License & what's free forever -Superset is source available under the Elastic License 2.0 (ELv2). The full text is in [LICENSE.md](LICENSE.md), but here is what it means in practice: +**The desktop app is free forever.** Running agents in parallel on your own machine will never require payment. Anything we charge for will be an optional service on top. -- **Use it for free.** Run Superset for yourself, your team, or your company. No payment required. -- **Read and modify the source.** The entire app is in this repo. Fork it, patch it, build it yourself. -- **Self-host it.** Run it on your own machines or your company's infrastructure at no cost. -- **The restriction that matters:** you may not provide Superset to third parties as a hosted or managed service that gives them a substantial set of its features. This applies whether or not you charge for it. It does not affect using it, modifying it, or self-hosting it for yourself, your team, or your company. - -ELv2 sets out two further limitations: don't circumvent license-key functionality, and don't alter, remove, or obscure licensing or copyright notices. It also asks that you state your changes if you distribute a modified copy and pass these terms along to anyone you give a copy to, and the grant is non-sublicensable and non-transferable. This summary is not the license, so read [LICENSE.md](LICENSE.md) if anything here matters to your situation. - -**Our commitment: the core desktop app is free forever.** Orchestrating agents in parallel workspaces on your own machine will never require payment. Anything we charge for will be optional services on top, not the app itself. +The whole app is in this repo under the [Elastic License 2.0](LICENSE.md): use it, fork it, modify it, self-host it for your team. The only thing off the table is repackaging Superset itself as a service you sell to others.