mirror of
https://github.com/getpaseo/paseo.git
synced 2026-12-01 04:36:26 +00:00
When Claude or Codex runs through a wrapper command (such as TeamClaude or a per-profile proxy wrapper) or an explicit login environment token (CLAUDE_CODE_OAUTH_TOKEN, ANTHROPIC_API_KEY, ANTHROPIC_AUTH_TOKEN, CODEX_API_KEY, CODEX_ACCESS_TOKEN), Paseo previously fell back to reading local ~/.claude / macOS Keychain or ~/.codex/auth.json from disk and showed another account's quota card or a rejected-login error. - Add buildProviderUsageLaunch and expose resolved launch metadata from ClaudeAgentClient/ClaudeAgentSession, CodexAppServerAgentClient/CodexAppServerAgentSession, and ProviderSnapshotManager.listProviderEnvironments. - Allow built-in claude and codex usage sources to declare provider so PluginService attaches resolved launch metadata on global discovery. - Suppress local ~/.claude / Keychain and ~/.codex/auth.json fallback across global discovery, configured-provider host discovery (selectProviderUsageEnv), and agent session discovery when launched via a wrapper command, login token override, or foreign endpoint/cloud backend. - Preserve plain OPENAI_API_KEY without OPENAI_BASE_URL for Codex (matching Codex load_auth precedence), legitimate custom CLAUDE_CONFIG_DIR / CODEX_HOME profiles, custom paths to the default claude / codex binary, and independent OpenCode/Pi/OMP harness routes. Closes #3228
18 lines
522 B
TypeScript
18 lines
522 B
TypeScript
import type { PluginServerContext } from "@getpaseo/plugin/server";
|
|
import { inputSchema } from "./shared/input.js";
|
|
import { discover, fetchUsage } from "./server/usage.js";
|
|
|
|
export default function contribute(server: PluginServerContext) {
|
|
server.registerUsageSource({
|
|
id: "codex",
|
|
label: "Codex",
|
|
icon: "icon.svg",
|
|
provider: "codex",
|
|
providers: ["codex", "opencode", "pi", "omp"],
|
|
input: inputSchema,
|
|
discover: (scope) => discover(scope),
|
|
fetch: fetchUsage,
|
|
});
|
|
return () => {};
|
|
}
|