@open-vibe-lab/open-sub-auth 0.1.0 → 0.1.1
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/cli/{claude-3WKImhqM.mjs → claude-Bu4Vb3Sa.mjs} +18 -4
- package/dist/cli/{claude-3WKImhqM.mjs.map → claude-Bu4Vb3Sa.mjs.map} +1 -1
- package/dist/cli/{registry-Cp-_Ipc6.mjs → errors-BQeS4Q64.mjs} +11 -37
- package/dist/cli/errors-BQeS4Q64.mjs.map +1 -0
- package/dist/cli/export-CpcD-XlM.mjs +11 -0
- package/dist/cli/export-CpcD-XlM.mjs.map +1 -0
- package/dist/cli/import-BZDRd0Nj.mjs +40 -0
- package/dist/cli/import-BZDRd0Nj.mjs.map +1 -0
- package/dist/cli/index.mjs +61 -12
- package/dist/cli/index.mjs.map +1 -1
- package/dist/cli/{login-_HdTW5J_.mjs → login-DfG9kqBN.mjs} +7 -6
- package/dist/cli/login-DfG9kqBN.mjs.map +1 -0
- package/dist/cli/{logout-CZm-tSVH.mjs → logout-BdnhQ3aw.mjs} +7 -6
- package/dist/cli/logout-BdnhQ3aw.mjs.map +1 -0
- package/dist/cli/manager-C-RjavF0.mjs +129 -0
- package/dist/cli/manager-C-RjavF0.mjs.map +1 -0
- package/dist/cli/{oauth-pkce-Bi02-h23.mjs → oauth-pkce-CCKyG5wP.mjs} +4 -10
- package/dist/cli/{oauth-pkce-Bi02-h23.mjs.map → oauth-pkce-CCKyG5wP.mjs.map} +1 -1
- package/dist/cli/{openai-codex-DJi_Q6Zm.mjs → openai-codex-CKKY1Gu_.mjs} +3 -3
- package/dist/cli/{openai-codex-DJi_Q6Zm.mjs.map → openai-codex-CKKY1Gu_.mjs.map} +1 -1
- package/dist/cli/registry-Dv4TWuqv.mjs +39 -0
- package/dist/cli/registry-Dv4TWuqv.mjs.map +1 -0
- package/dist/cli/{status-C-vkcjVM.mjs → status-CvktIWmx.mjs} +6 -5
- package/dist/cli/status-CvktIWmx.mjs.map +1 -0
- package/dist/cli/{manager-CKGbp7Yz.mjs → store-57VEqlSz.mjs} +16 -132
- package/dist/cli/store-57VEqlSz.mjs.map +1 -0
- package/dist/cli/{token-DF_-h4Rb.mjs → token-Ce_FmqGM.mjs} +7 -6
- package/dist/cli/token-Ce_FmqGM.mjs.map +1 -0
- package/dist/index.cjs +271 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +67 -4
- package/dist/index.d.mts +67 -4
- package/dist/index.mjs +265 -16
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
- package/dist/cli/login-_HdTW5J_.mjs.map +0 -1
- package/dist/cli/logout-CZm-tSVH.mjs.map +0 -1
- package/dist/cli/manager-CKGbp7Yz.mjs.map +0 -1
- package/dist/cli/registry-Cp-_Ipc6.mjs.map +0 -1
- package/dist/cli/status-C-vkcjVM.mjs.map +0 -1
- package/dist/cli/token-DF_-h4Rb.mjs.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -5,6 +5,7 @@ import { dirname, join } from "node:path";
|
|
|
5
5
|
import { execFile } from "node:child_process";
|
|
6
6
|
import { createServer } from "node:http";
|
|
7
7
|
import { createInterface } from "node:readline";
|
|
8
|
+
import { EnvHttpProxyAgent, setGlobalDispatcher } from "node:undici";
|
|
8
9
|
//#region src/errors.ts
|
|
9
10
|
var OpenSubAuthError = class extends Error {
|
|
10
11
|
constructor(message) {
|
|
@@ -28,7 +29,8 @@ var TokenExpiredError = class extends OpenSubAuthError {
|
|
|
28
29
|
};
|
|
29
30
|
var TokenRefreshError = class extends OpenSubAuthError {
|
|
30
31
|
constructor(provider, cause_) {
|
|
31
|
-
|
|
32
|
+
const causeType = cause_ instanceof Error ? cause_.constructor.name : typeof cause_;
|
|
33
|
+
super(`Failed to refresh token for "${provider}" (${causeType}). Check logs for details.`);
|
|
32
34
|
this.provider = provider;
|
|
33
35
|
this.cause_ = cause_;
|
|
34
36
|
this.name = "TokenRefreshError";
|
|
@@ -397,16 +399,23 @@ var KeychainStore = class {
|
|
|
397
399
|
//#endregion
|
|
398
400
|
//#region src/storage/store.ts
|
|
399
401
|
/**
|
|
400
|
-
* Create a token store
|
|
401
|
-
*
|
|
402
|
+
* Create a token store.
|
|
403
|
+
*
|
|
404
|
+
* @param storeType
|
|
405
|
+
* - `"auto"` (default): try OS keychain first, fall back to encrypted file store
|
|
406
|
+
* - `"keychain"`: force OS keychain; throws AuthenticationError if unavailable
|
|
407
|
+
* - `"file"`: always use the encrypted file store (~/.open-sub-auth/credentials.json)
|
|
402
408
|
*/
|
|
403
|
-
async function createTokenStore(
|
|
404
|
-
if (
|
|
409
|
+
async function createTokenStore(storeType = "auto") {
|
|
410
|
+
if (storeType === "file") return new FileStore();
|
|
411
|
+
try {
|
|
405
412
|
const store = new KeychainStore();
|
|
406
413
|
await store.get("__probe__", "__probe__");
|
|
407
414
|
return store;
|
|
408
|
-
} catch {
|
|
409
|
-
|
|
415
|
+
} catch (err) {
|
|
416
|
+
if (storeType === "keychain") throw new AuthenticationError(`OS keychain is not available on this system: ${err instanceof Error ? err.message : String(err)}`);
|
|
417
|
+
return new FileStore();
|
|
418
|
+
}
|
|
410
419
|
}
|
|
411
420
|
//#endregion
|
|
412
421
|
//#region src/core/browser.ts
|
|
@@ -604,10 +613,7 @@ async function exchangeCode(config, code, codeVerifier, redirectUri, state) {
|
|
|
604
613
|
headers: { "Content-Type": useJson ? "application/json" : "application/x-www-form-urlencoded" },
|
|
605
614
|
body: useJson ? JSON.stringify(params) : new URLSearchParams(params).toString()
|
|
606
615
|
});
|
|
607
|
-
if (!response.ok) {
|
|
608
|
-
const errorText = await response.text();
|
|
609
|
-
throw new OAuthCallbackError(`Token exchange failed (${response.status}): ${errorText}`);
|
|
610
|
-
}
|
|
616
|
+
if (!response.ok) throw new OAuthCallbackError(`Token exchange failed (HTTP ${response.status})`);
|
|
611
617
|
return parseTokenResponse(await response.json());
|
|
612
618
|
}
|
|
613
619
|
/** Refresh an access token using a refresh token */
|
|
@@ -623,10 +629,7 @@ async function refreshAccessToken(config, refreshToken) {
|
|
|
623
629
|
headers: { "Content-Type": useJson ? "application/json" : "application/x-www-form-urlencoded" },
|
|
624
630
|
body: useJson ? JSON.stringify(params) : new URLSearchParams(params).toString()
|
|
625
631
|
});
|
|
626
|
-
if (!response.ok) {
|
|
627
|
-
const errorText = await response.text();
|
|
628
|
-
throw new OAuthCallbackError(`Token refresh failed (${response.status}): ${errorText}`);
|
|
629
|
-
}
|
|
632
|
+
if (!response.ok) throw new OAuthCallbackError(`Token refresh failed (HTTP ${response.status})`);
|
|
630
633
|
return parseTokenResponse(await response.json());
|
|
631
634
|
}
|
|
632
635
|
/** Execute the full PKCE flow: generate params, open browser, wait for callback, exchange code */
|
|
@@ -728,6 +731,20 @@ var ClaudeProvider = class {
|
|
|
728
731
|
}
|
|
729
732
|
getAccountLabel(_tokenSet) {}
|
|
730
733
|
};
|
|
734
|
+
/**
|
|
735
|
+
* Import a Claude OAuth token from the CLAUDE_CODE_OAUTH_TOKEN environment variable.
|
|
736
|
+
* This token is used directly as the access token for API calls.
|
|
737
|
+
*/
|
|
738
|
+
function importClaudeTokenFromEnv() {
|
|
739
|
+
const token = process.env.CLAUDE_CODE_OAUTH_TOKEN;
|
|
740
|
+
if (!token) return null;
|
|
741
|
+
return {
|
|
742
|
+
accessToken: token,
|
|
743
|
+
refreshToken: null,
|
|
744
|
+
expiresAt: Date.now() + 36e5,
|
|
745
|
+
tokenType: "bearer"
|
|
746
|
+
};
|
|
747
|
+
}
|
|
731
748
|
registerProvider("claude", () => new ClaudeProvider());
|
|
732
749
|
//#endregion
|
|
733
750
|
//#region src/token/jwt.ts
|
|
@@ -822,6 +839,238 @@ function importFromCodexCli() {
|
|
|
822
839
|
}
|
|
823
840
|
registerProvider("openai-codex", () => new OpenAICodexProvider());
|
|
824
841
|
//#endregion
|
|
825
|
-
|
|
842
|
+
//#region src/core/oauth-device.ts
|
|
843
|
+
/** Request a device code from the provider's device code endpoint */
|
|
844
|
+
async function requestDeviceCode(config) {
|
|
845
|
+
if (!config.deviceCodeEndpoint) throw new OAuthCallbackError(`Provider "${config.name}" has no device code endpoint`);
|
|
846
|
+
const params = { client_id: config.clientId };
|
|
847
|
+
if (config.scopes?.length) params.scope = config.scopes.join(" ");
|
|
848
|
+
const useJson = config.tokenBodyFormat === "json";
|
|
849
|
+
const response = await fetch(config.deviceCodeEndpoint, {
|
|
850
|
+
method: "POST",
|
|
851
|
+
headers: {
|
|
852
|
+
"Content-Type": useJson ? "application/json" : "application/x-www-form-urlencoded",
|
|
853
|
+
Accept: "application/json"
|
|
854
|
+
},
|
|
855
|
+
body: useJson ? JSON.stringify(params) : new URLSearchParams(params).toString()
|
|
856
|
+
});
|
|
857
|
+
if (!response.ok) throw new OAuthCallbackError(`Device code request failed (HTTP ${response.status})`);
|
|
858
|
+
const data = await response.json();
|
|
859
|
+
const deviceCode = data.device_code;
|
|
860
|
+
const userCode = data.user_code;
|
|
861
|
+
const verificationUri = data.verification_uri ?? data.verification_url;
|
|
862
|
+
if (!deviceCode || !userCode || !verificationUri) throw new OAuthCallbackError("Invalid device code response: missing required fields");
|
|
863
|
+
return {
|
|
864
|
+
deviceCode,
|
|
865
|
+
userCode,
|
|
866
|
+
verificationUri,
|
|
867
|
+
verificationUriComplete: data.verification_uri_complete ?? data.verification_url_complete,
|
|
868
|
+
expiresIn: data.expires_in ?? 900,
|
|
869
|
+
interval: data.interval ?? 5
|
|
870
|
+
};
|
|
871
|
+
}
|
|
872
|
+
/**
|
|
873
|
+
* Poll the token endpoint until authorization is granted, denied, or times out.
|
|
874
|
+
* Handles authorization_pending / slow_down / expired_token error codes per RFC 8628.
|
|
875
|
+
*/
|
|
876
|
+
async function pollForToken(config, deviceCode, interval, expiresIn) {
|
|
877
|
+
const params = {
|
|
878
|
+
client_id: config.clientId,
|
|
879
|
+
device_code: deviceCode,
|
|
880
|
+
grant_type: "urn:ietf:params:oauth:grant-type:device_code"
|
|
881
|
+
};
|
|
882
|
+
const useJson = config.tokenBodyFormat === "json";
|
|
883
|
+
const deadline = Date.now() + expiresIn * 1e3;
|
|
884
|
+
let pollIntervalMs = interval * 1e3;
|
|
885
|
+
while (Date.now() < deadline) {
|
|
886
|
+
await sleep(pollIntervalMs);
|
|
887
|
+
const data = await (await fetch(config.tokenEndpoint, {
|
|
888
|
+
method: "POST",
|
|
889
|
+
headers: {
|
|
890
|
+
"Content-Type": useJson ? "application/json" : "application/x-www-form-urlencoded",
|
|
891
|
+
Accept: "application/json"
|
|
892
|
+
},
|
|
893
|
+
body: useJson ? JSON.stringify(params) : new URLSearchParams(params).toString()
|
|
894
|
+
})).json();
|
|
895
|
+
if (data.access_token) return parseDeviceTokenResponse(data);
|
|
896
|
+
const error = data.error;
|
|
897
|
+
if (error === "authorization_pending") continue;
|
|
898
|
+
if (error === "slow_down") {
|
|
899
|
+
pollIntervalMs += 5e3;
|
|
900
|
+
continue;
|
|
901
|
+
}
|
|
902
|
+
if (error === "expired_token") throw new OAuthTimeoutError(expiresIn * 1e3);
|
|
903
|
+
if (error === "access_denied") throw new OAuthCallbackError("User denied device authorization");
|
|
904
|
+
throw new OAuthCallbackError(`Device code token polling failed: ${error ?? "unknown error"}`);
|
|
905
|
+
}
|
|
906
|
+
throw new OAuthTimeoutError(expiresIn * 1e3);
|
|
907
|
+
}
|
|
908
|
+
/** Execute the full device code flow: request code, display to user, poll for token */
|
|
909
|
+
async function executeDeviceCodeFlow(options) {
|
|
910
|
+
const { config, loginOptions } = options;
|
|
911
|
+
const deviceCode = await requestDeviceCode(config);
|
|
912
|
+
const displayInfo = {
|
|
913
|
+
userCode: deviceCode.userCode,
|
|
914
|
+
verificationUri: deviceCode.verificationUri,
|
|
915
|
+
expiresIn: deviceCode.expiresIn,
|
|
916
|
+
interval: deviceCode.interval
|
|
917
|
+
};
|
|
918
|
+
if (loginOptions?.onDeviceCode) loginOptions.onDeviceCode(displayInfo);
|
|
919
|
+
else {
|
|
920
|
+
openBrowser(deviceCode.verificationUriComplete ?? deviceCode.verificationUri);
|
|
921
|
+
process.stderr.write(`\nVisit: ${deviceCode.verificationUri}\nEnter code: ${deviceCode.userCode}\n\nWaiting for authorization...\n`);
|
|
922
|
+
}
|
|
923
|
+
return pollForToken(config, deviceCode.deviceCode, deviceCode.interval, deviceCode.expiresIn);
|
|
924
|
+
}
|
|
925
|
+
function sleep(ms) {
|
|
926
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
927
|
+
}
|
|
928
|
+
/**
|
|
929
|
+
* Parse device code token response.
|
|
930
|
+
* Note: GitHub uses comma-separated scopes (unlike space-separated in PKCE flow).
|
|
931
|
+
*/
|
|
932
|
+
function parseDeviceTokenResponse(data) {
|
|
933
|
+
const accessToken = data.access_token;
|
|
934
|
+
if (!accessToken) throw new OAuthCallbackError("No access_token in device code token response");
|
|
935
|
+
const expiresIn = data.expires_in;
|
|
936
|
+
const expiresAt = expiresIn ? Date.now() + expiresIn * 1e3 : Date.now() + 8 * 3600 * 1e3;
|
|
937
|
+
const rawScope = data.scope;
|
|
938
|
+
const scopes = rawScope ? rawScope.split(/[, ]+/).filter(Boolean) : void 0;
|
|
939
|
+
return {
|
|
940
|
+
accessToken,
|
|
941
|
+
refreshToken: data.refresh_token ?? null,
|
|
942
|
+
expiresAt,
|
|
943
|
+
tokenType: (data.token_type ?? "bearer").toLowerCase(),
|
|
944
|
+
scopes,
|
|
945
|
+
raw: data
|
|
946
|
+
};
|
|
947
|
+
}
|
|
948
|
+
//#endregion
|
|
949
|
+
//#region src/providers/github-copilot.ts
|
|
950
|
+
const GITHUB_COPILOT_CONFIG = {
|
|
951
|
+
name: "github-copilot",
|
|
952
|
+
displayName: "GitHub Copilot",
|
|
953
|
+
tokenEndpoint: "https://github.com/login/oauth/access_token",
|
|
954
|
+
deviceCodeEndpoint: "https://github.com/login/device/code",
|
|
955
|
+
clientId: "Iv1.b507a08c87ecfe98",
|
|
956
|
+
scopes: ["gist"],
|
|
957
|
+
grantType: "device_code"
|
|
958
|
+
};
|
|
959
|
+
/** Copilot session token endpoint (internal GitHub API) */
|
|
960
|
+
const COPILOT_SESSION_ENDPOINT = "https://api.github.com/copilot_internal/v2/token";
|
|
961
|
+
/** Fetch a short-lived Copilot session token using a GitHub OAuth access token */
|
|
962
|
+
async function fetchCopilotSessionToken(githubToken) {
|
|
963
|
+
const response = await fetch(COPILOT_SESSION_ENDPOINT, { headers: {
|
|
964
|
+
Authorization: `Bearer ${githubToken}`,
|
|
965
|
+
"Content-Type": "application/json"
|
|
966
|
+
} });
|
|
967
|
+
if (!response.ok) throw new OAuthCallbackError(`Copilot session token request failed (HTTP ${response.status})`);
|
|
968
|
+
const data = await response.json();
|
|
969
|
+
const token = data.token;
|
|
970
|
+
if (!token) throw new OAuthCallbackError("No token in Copilot session token response");
|
|
971
|
+
return {
|
|
972
|
+
token,
|
|
973
|
+
expiresAt: typeof data.expires_at === "number" ? data.expires_at * 1e3 : Date.now() + 1800 * 1e3
|
|
974
|
+
};
|
|
975
|
+
}
|
|
976
|
+
/** Fetch the authenticated GitHub user info for account labelling */
|
|
977
|
+
async function fetchGitHubUser(githubToken) {
|
|
978
|
+
try {
|
|
979
|
+
const response = await fetch("https://api.github.com/user", { headers: { Authorization: `Bearer ${githubToken}` } });
|
|
980
|
+
if (!response.ok) return { login: "unknown" };
|
|
981
|
+
return await response.json();
|
|
982
|
+
} catch {
|
|
983
|
+
return { login: "unknown" };
|
|
984
|
+
}
|
|
985
|
+
}
|
|
986
|
+
var GitHubCopilotProvider = class {
|
|
987
|
+
config = GITHUB_COPILOT_CONFIG;
|
|
988
|
+
async login(options) {
|
|
989
|
+
const githubTokenSet = await executeDeviceCodeFlow({
|
|
990
|
+
config: this.config,
|
|
991
|
+
loginOptions: options
|
|
992
|
+
});
|
|
993
|
+
const githubToken = githubTokenSet.accessToken;
|
|
994
|
+
const session = await fetchCopilotSessionToken(githubToken);
|
|
995
|
+
const user = await fetchGitHubUser(githubToken);
|
|
996
|
+
return {
|
|
997
|
+
accessToken: session.token,
|
|
998
|
+
refreshToken: githubToken,
|
|
999
|
+
expiresAt: session.expiresAt,
|
|
1000
|
+
tokenType: "bearer",
|
|
1001
|
+
scopes: githubTokenSet.scopes,
|
|
1002
|
+
raw: {
|
|
1003
|
+
githubToken,
|
|
1004
|
+
githubRefreshToken: githubTokenSet.refreshToken,
|
|
1005
|
+
login: user.login,
|
|
1006
|
+
name: user.name,
|
|
1007
|
+
email: user.email
|
|
1008
|
+
}
|
|
1009
|
+
};
|
|
1010
|
+
}
|
|
1011
|
+
/** Refresh by exchanging the stored GitHub OAuth token for a new Copilot session token */
|
|
1012
|
+
async refresh(refreshToken) {
|
|
1013
|
+
const session = await fetchCopilotSessionToken(refreshToken);
|
|
1014
|
+
return {
|
|
1015
|
+
accessToken: session.token,
|
|
1016
|
+
refreshToken,
|
|
1017
|
+
expiresAt: session.expiresAt,
|
|
1018
|
+
tokenType: "bearer"
|
|
1019
|
+
};
|
|
1020
|
+
}
|
|
1021
|
+
getAuthHeaders(accessToken) {
|
|
1022
|
+
return {
|
|
1023
|
+
authorization: `Bearer ${accessToken}`,
|
|
1024
|
+
"content-type": "application/json"
|
|
1025
|
+
};
|
|
1026
|
+
}
|
|
1027
|
+
getAccountId(tokenSet) {
|
|
1028
|
+
if (tokenSet.raw?.login && typeof tokenSet.raw.login === "string" && tokenSet.raw.login !== "unknown") return tokenSet.raw.login;
|
|
1029
|
+
const source = tokenSet.refreshToken ?? tokenSet.accessToken;
|
|
1030
|
+
return createHash("sha256").update(source).digest("hex").slice(0, 16);
|
|
1031
|
+
}
|
|
1032
|
+
getAccountLabel(tokenSet) {
|
|
1033
|
+
if (tokenSet.raw?.name && typeof tokenSet.raw.name === "string") return tokenSet.raw.name;
|
|
1034
|
+
if (tokenSet.raw?.login && typeof tokenSet.raw.login === "string" && tokenSet.raw.login !== "unknown") return tokenSet.raw.login;
|
|
1035
|
+
}
|
|
1036
|
+
};
|
|
1037
|
+
/**
|
|
1038
|
+
* Import a GitHub OAuth token from the COPILOT_GITHUB_TOKEN environment variable.
|
|
1039
|
+
* The GitHub OAuth token becomes the refresh token; the expired access token forces an
|
|
1040
|
+
* immediate Copilot session token fetch on the first call to getToken().
|
|
1041
|
+
*/
|
|
1042
|
+
function importCopilotTokenFromEnv() {
|
|
1043
|
+
const token = process.env.COPILOT_GITHUB_TOKEN;
|
|
1044
|
+
if (!token) return null;
|
|
1045
|
+
return {
|
|
1046
|
+
accessToken: "",
|
|
1047
|
+
refreshToken: token,
|
|
1048
|
+
expiresAt: 0,
|
|
1049
|
+
tokenType: "bearer"
|
|
1050
|
+
};
|
|
1051
|
+
}
|
|
1052
|
+
registerProvider("github-copilot", () => new GitHubCopilotProvider());
|
|
1053
|
+
//#endregion
|
|
1054
|
+
//#region src/core/proxy.ts
|
|
1055
|
+
/**
|
|
1056
|
+
* Initialize HTTP proxy support for all outgoing fetch() calls.
|
|
1057
|
+
*
|
|
1058
|
+
* Reads HTTPS_PROXY / HTTP_PROXY / NO_PROXY environment variables automatically.
|
|
1059
|
+
* If a proxyUrl is provided, it overrides those env vars before installing the dispatcher.
|
|
1060
|
+
*
|
|
1061
|
+
* Call this once at startup — CLI entry point or library init — before any network requests.
|
|
1062
|
+
*
|
|
1063
|
+
* @param proxyUrl - Optional explicit proxy URL (e.g. "http://proxy.corp:8080").
|
|
1064
|
+
* Sets both HTTPS_PROXY and HTTP_PROXY env vars when provided.
|
|
1065
|
+
*/
|
|
1066
|
+
function initProxy(proxyUrl) {
|
|
1067
|
+
if (proxyUrl) {
|
|
1068
|
+
process.env.HTTPS_PROXY = proxyUrl;
|
|
1069
|
+
process.env.HTTP_PROXY = proxyUrl;
|
|
1070
|
+
}
|
|
1071
|
+
setGlobalDispatcher(new EnvHttpProxyAgent());
|
|
1072
|
+
}
|
|
1073
|
+
//#endregion
|
|
1074
|
+
export { AuthenticationError, ClaudeProvider, FileStore, GitHubCopilotProvider, KeychainStore, NoCredentialError, OAuthCallbackError, OAuthTimeoutError, OpenAICodexProvider, OpenSubAuthError, ProviderNotFoundError, StateMismatchError, TokenExpiredError, TokenManager, TokenRefreshError, buildAuthorizationUrl, createTokenStore, decodeJWT, exchangeCode, executeDeviceCodeFlow, executePKCEFlow, generateCodeChallenge, generateCodeVerifier, generatePKCE, generateState, getProvider, importClaudeTokenFromEnv, importCopilotTokenFromEnv, importFromCodexCli, initProxy, listProviders, openBrowser, parseCodeAndState, pollForToken, promptForCode, refreshAccessToken, registerProvider, requestDeviceCode, startCallbackServer };
|
|
826
1075
|
|
|
827
1076
|
//# sourceMappingURL=index.mjs.map
|