MCPcopy Index your code
hub / github.com/openai/codex-plugin-cc / getCodexAuthStatus

Function getCodexAuthStatus

plugins/codex/scripts/lib/codex.mjs:925–958  ·  view source on GitHub ↗
(cwd, options = {})

Source from the content-addressed store, hash-verified

923}
924
925export async function getCodexAuthStatus(cwd, options = {}) {
926 const availability = getCodexAvailability(cwd);
927 if (!availability.available) {
928 return {
929 available: false,
930 loggedIn: false,
931 detail: availability.detail,
932 source: "availability",
933 authMethod: null,
934 verified: null,
935 requiresOpenaiAuth: null,
936 provider: null
937 };
938 }
939
940 let client = null;
941 try {
942 client = await CodexAppServerClient.connect(cwd, {
943 env: options.env,
944 reuseExistingBroker: true
945 });
946 return await getCodexAuthStatusFromClient(client, cwd);
947 } catch (error) {
948 return buildAuthStatus({
949 loggedIn: false,
950 detail: error instanceof Error ? error.message : String(error),
951 source: "app-server"
952 });
953 } finally {
954 if (client) {
955 await client.close().catch(() => {});
956 }
957 }
958}
959
960export async function interruptAppServerTurn(cwd, { threadId, turnId }) {
961 if (!threadId || !turnId) {

Callers 1

buildSetupReportFunction · 0.90

Calls 5

getCodexAvailabilityFunction · 0.85
buildAuthStatusFunction · 0.85
connectMethod · 0.80
closeMethod · 0.45

Tested by

no test coverage detected