* Obtain a bearer token for this daemon — shared by the terminal client and `codeoid mcp headers`, so both resolve credentials the same way. Precedence: a local-mode token for the daemon's port (a `--local` daemon is listening there right now), then the configured API key — excha
// Source: https://github.com/highflame-ai/codeoid | License: MIT | Copyright 2026 Codeoid
// Provided via justclaw.it.com; keep this notice with the code.
/**
* Obtain a bearer token for this daemon — shared by the terminal client and
* `codeoid mcp headers`, so both resolve credentials the same way.
*
* Precedence: a local-mode token for the daemon's port (a `--local` daemon is
* listening there right now), then the configured API key — exchanged at
* ZeroID for a short-lived JWT when it is a `zid_sk_` key, used as-is
* otherwise (an operator who already holds a JWT).
*/
import { isLoopbackUrl, resolveLocalToken, type CodeoidConfig } from "../config.js";
import { CONTROL_MCP_PATH } from "../daemon/mcp/control-path.js";
import { ALL_SCOPES_STRING, SCOPES, type Scope } from "../pr
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key