@cortexkit/anthropic-auth-core
Advanced tools
+5
-4
@@ -1,2 +0,2 @@ | ||
| import { AUTHORIZE_URLS, CLIENT_ID, CODE_CALLBACK_URL, OAUTH_SCOPES, TOKEN_URL, } from "./constants.js"; | ||
| import { AUTHORIZE_URLS, AXIOS_USER_AGENT, CLIENT_ID, CODE_CALLBACK_URL, OAUTH_SCOPES, REFRESH_SCOPE, TOKEN_URL, } from "./constants.js"; | ||
| import { generatePKCE } from "./pkce.js"; | ||
@@ -53,4 +53,4 @@ function parseRetryAfterHeader(value) { | ||
| 'Content-Type': 'application/json', | ||
| Accept: 'application/json', | ||
| 'User-Agent': 'axios/1.13.6', | ||
| Accept: 'application/json, text/plain, */*', | ||
| 'User-Agent': AXIOS_USER_AGENT, | ||
| }, | ||
@@ -61,2 +61,3 @@ body: JSON.stringify({ | ||
| client_id: CLIENT_ID, | ||
| scope: REFRESH_SCOPE, | ||
| }), | ||
@@ -125,3 +126,3 @@ }); | ||
| Accept: 'application/json, text/plain, */*', | ||
| 'User-Agent': 'axios/1.13.6', | ||
| 'User-Agent': AXIOS_USER_AGENT, | ||
| }, | ||
@@ -128,0 +129,0 @@ body: JSON.stringify({ |
@@ -10,3 +10,3 @@ export type ClaudeCodeIdentity = { | ||
| export declare function applyClaudeCodeMetadata(body: Record<string, unknown>, identity: ClaudeCodeIdentity): boolean; | ||
| export declare const CLAUDE_CODE_FULL_AGENT_BETAS: readonly ["claude-code-20250219", "oauth-2025-04-20", "interleaved-thinking-2025-05-14", "context-management-2025-06-27", "prompt-caching-scope-2026-01-05", "advisor-tool-2026-03-01", "advanced-tool-use-2025-11-20", "context-1m-2025-08-07", "effort-2025-11-24", "extended-cache-ttl-2025-04-11", "cache-diagnosis-2026-04-07"]; | ||
| export declare const CLAUDE_CODE_FULL_AGENT_BETAS: readonly ["oauth-2025-04-20", "interleaved-thinking-2025-05-14", "thinking-token-count-2026-05-13", "context-management-2025-06-27", "prompt-caching-scope-2026-01-05", "claude-code-20250219", "advisor-tool-2026-03-01", "advanced-tool-use-2025-11-20", "extended-cache-ttl-2025-04-11", "cache-diagnosis-2026-04-07"]; | ||
| export declare function selectClaudeCodeBetas(body?: Record<string, unknown> | null, extraBetas?: string[]): string; | ||
@@ -13,0 +13,0 @@ export declare function applyClaudeCodeHeaders(headers: Headers, accessToken: string, options?: { |
@@ -133,11 +133,10 @@ import { randomBytes, randomUUID } from 'node:crypto'; | ||
| export const CLAUDE_CODE_FULL_AGENT_BETAS = [ | ||
| 'claude-code-20250219', | ||
| 'oauth-2025-04-20', | ||
| 'interleaved-thinking-2025-05-14', | ||
| 'thinking-token-count-2026-05-13', | ||
| 'context-management-2025-06-27', | ||
| 'prompt-caching-scope-2026-01-05', | ||
| 'claude-code-20250219', | ||
| 'advisor-tool-2026-03-01', | ||
| 'advanced-tool-use-2025-11-20', | ||
| 'context-1m-2025-08-07', | ||
| 'effort-2025-11-24', | ||
| 'extended-cache-ttl-2025-04-11', | ||
@@ -149,2 +148,3 @@ 'cache-diagnosis-2026-04-07', | ||
| 'interleaved-thinking-2025-05-14', | ||
| 'thinking-token-count-2026-05-13', | ||
| 'context-management-2025-06-27', | ||
@@ -159,5 +159,8 @@ 'prompt-caching-scope-2026-01-05', | ||
| 'interleaved-thinking-2025-05-14', | ||
| 'thinking-token-count-2026-05-13', | ||
| 'context-management-2025-06-27', | ||
| 'prompt-caching-scope-2026-01-05', | ||
| 'advisor-tool-2026-03-01', | ||
| 'advanced-tool-use-2025-11-20', | ||
| 'extended-cache-ttl-2025-04-11', | ||
| 'cache-diagnosis-2026-04-07', | ||
@@ -164,0 +167,0 @@ ]; |
| export declare const CLIENT_ID = "9d1c250a-e61b-44d9-88ed-5944d1962f5e"; | ||
| export declare const AUTHORIZE_URLS: { | ||
| readonly console: "https://platform.claude.com/oauth/authorize"; | ||
| readonly max: "https://claude.ai/oauth/authorize"; | ||
| readonly max: "https://claude.com/cai/oauth/authorize"; | ||
| }; | ||
| export declare const CODE_CALLBACK_URL = "https://platform.claude.com/oauth/code/callback"; | ||
| export declare const TOKEN_URL = "https://platform.claude.com/v1/oauth/token"; | ||
| export declare const AXIOS_USER_AGENT = "axios/1.15.2"; | ||
| export declare const OAUTH_SCOPES: string[]; | ||
| export declare const REFRESH_SCOPE = "user:profile user:inference user:sessions:claude_code user:mcp_servers user:file_upload"; | ||
| export declare const TOOL_PREFIX = "mcp_"; | ||
@@ -15,12 +17,12 @@ export declare const REQUIRED_BETAS: string[]; | ||
| export declare const OPENCODE_IDENTITY_PREFIX = "You are OpenCode"; | ||
| export declare const CLAUDE_CODE_IDENTITY = "You are a Claude agent, built on Anthropic's Claude Agent SDK."; | ||
| export declare const CLAUDE_CODE_IDENTITY = "You are Claude Code, Anthropic's official CLI for Claude."; | ||
| export declare const PARALLEL_TOOL_CALLS_SYSTEM_PROMPT: string; | ||
| export declare const CCH_SALT = "59cf53e54c78"; | ||
| export declare const CCH_POSITIONS: number[]; | ||
| export declare const CLAUDE_CODE_VERSION = "2.1.141"; | ||
| export declare const CLAUDE_CODE_BUILD_HASH = "67b"; | ||
| export declare const CLAUDE_CODE_ENTRYPOINT = "sdk-cli"; | ||
| export declare const CLAUDE_CODE_VERSION = "2.1.177"; | ||
| export declare const CLAUDE_CODE_BUILD_HASH = "3bf"; | ||
| export declare const CLAUDE_CODE_ENTRYPOINT = "cli"; | ||
| export declare const CLAUDE_CODE_STAINLESS_PACKAGE_VERSION = "0.94.0"; | ||
| export declare const CLAUDE_CODE_STAINLESS_RUNTIME_VERSION = "v24.3.0"; | ||
| export declare const USER_AGENT = "claude-cli/2.1.141 (external, sdk-cli)"; | ||
| export declare const USER_AGENT = "claude-cli/2.1.177 (external, cli)"; | ||
| export declare const CACHE_1H_MODES: readonly ["explicit", "automatic", "hybrid"]; | ||
@@ -27,0 +29,0 @@ export type Cache1hMode = (typeof CACHE_1H_MODES)[number]; |
| export const CLIENT_ID = '9d1c250a-e61b-44d9-88ed-5944d1962f5e'; | ||
| export const AUTHORIZE_URLS = { | ||
| console: 'https://platform.claude.com/oauth/authorize', | ||
| max: 'https://claude.ai/oauth/authorize', | ||
| max: 'https://claude.com/cai/oauth/authorize', | ||
| }; | ||
| export const CODE_CALLBACK_URL = 'https://platform.claude.com/oauth/code/callback'; | ||
| export const TOKEN_URL = 'https://platform.claude.com/v1/oauth/token'; | ||
| export const AXIOS_USER_AGENT = 'axios/1.15.2'; | ||
| export const OAUTH_SCOPES = [ | ||
@@ -16,2 +17,3 @@ 'org:create_api_key', | ||
| ]; | ||
| export const REFRESH_SCOPE = 'user:profile user:inference user:sessions:claude_code user:mcp_servers user:file_upload'; | ||
| export const TOOL_PREFIX = 'mcp_'; | ||
@@ -37,3 +39,3 @@ export const REQUIRED_BETAS = [ | ||
| export const OPENCODE_IDENTITY_PREFIX = 'You are OpenCode'; | ||
| export const CLAUDE_CODE_IDENTITY = "You are a Claude agent, built on Anthropic's Claude Agent SDK."; | ||
| export const CLAUDE_CODE_IDENTITY = "You are Claude Code, Anthropic's official CLI for Claude."; | ||
| export const PARALLEL_TOOL_CALLS_SYSTEM_PROMPT = [ | ||
@@ -48,8 +50,8 @@ '<use_parallel_tool_calls>', | ||
| export const CCH_POSITIONS = [4, 7, 20]; | ||
| export const CLAUDE_CODE_VERSION = '2.1.141'; | ||
| export const CLAUDE_CODE_BUILD_HASH = '67b'; | ||
| export const CLAUDE_CODE_ENTRYPOINT = 'sdk-cli'; | ||
| export const CLAUDE_CODE_VERSION = '2.1.177'; | ||
| export const CLAUDE_CODE_BUILD_HASH = '3bf'; | ||
| export const CLAUDE_CODE_ENTRYPOINT = 'cli'; | ||
| export const CLAUDE_CODE_STAINLESS_PACKAGE_VERSION = '0.94.0'; | ||
| export const CLAUDE_CODE_STAINLESS_RUNTIME_VERSION = 'v24.3.0'; | ||
| export const USER_AGENT = 'claude-cli/2.1.141 (external, sdk-cli)'; | ||
| export const USER_AGENT = 'claude-cli/2.1.177 (external, cli)'; | ||
| export const CACHE_1H_MODES = ['explicit', 'automatic', 'hybrid']; | ||
@@ -56,0 +58,0 @@ export const DEFAULT_CACHE_1H_MODE = 'explicit'; |
+1
-1
| { | ||
| "name": "@cortexkit/anthropic-auth-core", | ||
| "version": "1.9.3", | ||
| "version": "1.9.4", | ||
| "type": "module", | ||
@@ -5,0 +5,0 @@ "repository": { |
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
246383
0.23%5997
0.13%