Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
contents: write
id-token: write
steps:
- uses: actions/checkout@v4
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ node_modules/
dist/
*.tgz
.env
docs/superpowers/
13 changes: 6 additions & 7 deletions src/auth/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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 {
Expand Down
Loading