(env = process.env, cwd = process.cwd())
| 904 | } |
| 905 | |
| 906 | export function getSessionRuntimeStatus(env = process.env, cwd = process.cwd()) { |
| 907 | const endpoint = env?.[BROKER_ENDPOINT_ENV] ?? loadBrokerSession(cwd)?.endpoint ?? null; |
| 908 | if (endpoint) { |
| 909 | return { |
| 910 | mode: "shared", |
| 911 | label: "shared session", |
| 912 | detail: "This Claude session is configured to reuse one shared Codex runtime.", |
| 913 | endpoint |
| 914 | }; |
| 915 | } |
| 916 | |
| 917 | return { |
| 918 | mode: "direct", |
| 919 | label: "direct startup", |
| 920 | detail: "No shared Codex runtime is active yet. The first review or task command will start one on demand.", |
| 921 | endpoint: null |
| 922 | }; |
| 923 | } |
| 924 | |
| 925 | export async function getCodexAuthStatus(cwd, options = {}) { |
| 926 | const availability = getCodexAvailability(cwd); |
no test coverage detected