diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml new file mode 100644 index 0000000..3fa26a7 --- /dev/null +++ b/.github/workflows/release-please.yml @@ -0,0 +1,16 @@ +name: Release Please + +on: + push: + branches: [main] + +jobs: + release-please: + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + steps: + - uses: googleapis/release-please-action@v4 + with: + release-type: node diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 65c7a26..66fa58c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,7 +7,7 @@ jobs: publish: runs-on: ubuntu-latest permissions: - contents: read + contents: write id-token: write steps: - uses: actions/checkout@v4 diff --git a/.gitignore b/.gitignore index 6f3dd62..d6a9833 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ node_modules/ dist/ *.tgz .env +docs/superpowers/ diff --git a/src/auth/config.ts b/src/auth/config.ts index ec5dba0..69e0c2f 100644 --- a/src/auth/config.ts +++ b/src/auth/config.ts @@ -4,7 +4,6 @@ import * as os from "node:os"; const DEFAULT_ENDPOINT = "https://ai-api.eterna.exchange"; const AUTH_ISSUER = "https://ai-auth.eterna.exchange"; -const DEFAULT_MCP_ENDPOINT = "https://mcp.eterna.exchange"; export interface EternaConfig { endpoint: string; @@ -27,12 +26,12 @@ export function getAuthIssuer(): string { } export function getMcpEndpoint(): string { - if (process.env.ETERNA_MCP_URL) return process.env.ETERNA_MCP_URL; - // Derive from ETERNA_ENDPOINT so staging users don't need a separate var. - // https://ai-api.eterna.exchange → https://mcp.eterna.exchange - // https://ai-api.staging.eterna.exchange → https://mcp.staging.eterna.exchange - const endpoint = process.env.ETERNA_ENDPOINT ?? DEFAULT_ENDPOINT; - return endpoint.replace("ai-api.", "mcp."); + const raw = process.env.ETERNA_MCP_URL + ?? (process.env.ETERNA_ENDPOINT ?? DEFAULT_ENDPOINT).replace("ai-api.", "mcp."); + // Strip trailing /mcp if present — users sometimes copy the full MCP protocol + // URL from their Claude config (e.g. https://mcp.eterna.exchange/mcp), but + // REST endpoints like /migrate/link-legacy-key live at the base URL. + return raw.replace(/\/mcp$/, ""); } function ensureConfigDir(): void {