@vostride/agent-qa-subscription-auth 0.2.3 → 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,46 +1,42 @@
1
- import { OAuthTokens, TokenRefreshFn, LLMAuthProviderPlugin } from '@vostride/agent-qa-core';
2
-
3
- declare const ANTHROPIC_CLIENT_ID = "9d1c250a-e61b-44d9-88ed-5944d1962f5e";
4
- declare const ANTHROPIC_TOKEN_URL = "https://console.anthropic.com/v1/oauth/token";
5
- declare const ANTHROPIC_REDIRECT_URI = "https://console.anthropic.com/oauth/code/callback";
6
- declare const ANTHROPIC_SCOPES = "org:create_api_key user:profile user:inference";
7
- declare const ANTHROPIC_BETA_FLAGS = "oauth-2025-04-20,interleaved-thinking-2025-05-14";
8
- declare function anthropicAuthorizeUrl(options: {
9
- mode: 'max' | 'console';
10
- pkce: {
11
- verifier: string;
12
- challenge: string;
13
- };
14
- }): string;
15
- declare function anthropicExchangeCode(codeWithState: string, pkce: {
1
+ import { LLMAuthProviderPlugin, OAuthTokens, TokenRefreshFn } from "@vostride/agent-qa-core";
2
+ export declare const ANTHROPIC_CLIENT_ID = "9d1c250a-e61b-44d9-88ed-5944d1962f5e";
3
+ export declare const ANTHROPIC_TOKEN_URL = "https://console.anthropic.com/v1/oauth/token";
4
+ export declare const ANTHROPIC_REDIRECT_URI = "https://console.anthropic.com/oauth/code/callback";
5
+ export declare const ANTHROPIC_SCOPES = "org:create_api_key user:profile user:inference";
6
+ export declare const ANTHROPIC_BETA_FLAGS = "oauth-2025-04-20,interleaved-thinking-2025-05-14";
7
+ export declare function anthropicAuthorizeUrl(options: {
8
+ mode: 'max' | 'console';
9
+ pkce: {
16
10
  verifier: string;
11
+ challenge: string;
12
+ };
13
+ }): string;
14
+ export declare function anthropicExchangeCode(codeWithState: string, pkce: {
15
+ verifier: string;
17
16
  }): Promise<OAuthTokens>;
18
- declare const anthropicRefreshTokens: TokenRefreshFn;
19
- declare function createAnthropicAuthFetch(getTokens: () => Promise<OAuthTokens>, onRefreshed: (tokens: OAuthTokens) => Promise<void>): typeof globalThis.fetch;
20
-
21
- declare const CODEX_CLIENT_ID = "app_EMoamEEZ73f0CkXaXp7hrann";
22
- declare const CODEX_AUTH_BASE = "https://auth.openai.com";
23
- declare const CODEX_TOKEN_URL = "https://auth.openai.com/oauth/token";
24
- declare const CODEX_SCOPES = "openid profile email offline_access";
25
- declare const CODEX_API_URL = "https://chatgpt.com/backend-api/codex/responses";
26
- declare const CODEX_DEFAULT_PORT = 1455;
27
- declare function decodeJwtClaims(token: string): Record<string, unknown>;
28
- declare function codexExchangeCode(code: string, redirectUri: string, pkce: {
29
- verifier: string;
17
+ export declare const anthropicRefreshTokens: TokenRefreshFn;
18
+ export declare function createAnthropicAuthFetch(getTokens: () => Promise<OAuthTokens>, onRefreshed: (tokens: OAuthTokens) => Promise<void>): typeof globalThis.fetch;
19
+ export declare const CODEX_CLIENT_ID = "app_EMoamEEZ73f0CkXaXp7hrann";
20
+ export declare const CODEX_AUTH_BASE = "https://auth.openai.com";
21
+ export declare const CODEX_TOKEN_URL = "https://auth.openai.com/oauth/token";
22
+ export declare const CODEX_SCOPES = "openid profile email offline_access";
23
+ export declare const CODEX_API_URL = "https://chatgpt.com/backend-api/codex/responses";
24
+ export declare const CODEX_DEFAULT_PORT = 1455;
25
+ export declare function decodeJwtClaims(token: string): Record<string, unknown>;
26
+ export declare function codexExchangeCode(code: string, redirectUri: string, pkce: {
27
+ verifier: string;
30
28
  }): Promise<OAuthTokens>;
31
- declare const codexRefreshTokens: TokenRefreshFn;
32
- declare function codexBrowserAuth(options?: {
33
- port?: number;
34
- listenHost?: string;
29
+ export declare const codexRefreshTokens: TokenRefreshFn;
30
+ export declare function codexBrowserAuth(options?: {
31
+ port?: number;
32
+ listenHost?: string;
35
33
  }): Promise<{
36
- authorizeUrl: string;
37
- waitForCallback: Promise<OAuthTokens>;
38
- cleanup: () => void;
34
+ authorizeUrl: string;
35
+ waitForCallback: Promise<OAuthTokens>;
36
+ cleanup: () => void;
39
37
  }>;
40
- declare function createCodexAuthFetch(getTokens: () => Promise<OAuthTokens>, onRefreshed: (tokens: OAuthTokens) => Promise<void>): typeof globalThis.fetch;
41
-
42
- declare function createSubscriptionAuthPlugin(): {
43
- providers: LLMAuthProviderPlugin[];
38
+ export declare function createCodexAuthFetch(getTokens: () => Promise<OAuthTokens>, onRefreshed: (tokens: OAuthTokens) => Promise<void>): typeof globalThis.fetch;
39
+ export declare function createSubscriptionAuthPlugin(): {
40
+ providers: LLMAuthProviderPlugin[];
44
41
  };
45
-
46
- export { ANTHROPIC_BETA_FLAGS, ANTHROPIC_CLIENT_ID, ANTHROPIC_REDIRECT_URI, ANTHROPIC_SCOPES, ANTHROPIC_TOKEN_URL, CODEX_API_URL, CODEX_AUTH_BASE, CODEX_CLIENT_ID, CODEX_DEFAULT_PORT, CODEX_SCOPES, CODEX_TOKEN_URL, anthropicAuthorizeUrl, anthropicExchangeCode, anthropicRefreshTokens, codexBrowserAuth, codexExchangeCode, codexRefreshTokens, createAnthropicAuthFetch, createCodexAuthFetch, createSubscriptionAuthPlugin, decodeJwtClaims, createSubscriptionAuthPlugin as default };
42
+ export { createSubscriptionAuthPlugin as default };