(cwd)
| 884 | } |
| 885 | |
| 886 | export function getCodexAvailability(cwd) { |
| 887 | const versionStatus = binaryAvailable("codex", ["--version"], { cwd }); |
| 888 | if (!versionStatus.available) { |
| 889 | return versionStatus; |
| 890 | } |
| 891 | |
| 892 | const appServerStatus = binaryAvailable("codex", ["app-server", "--help"], { cwd }); |
| 893 | if (!appServerStatus.available) { |
| 894 | return { |
| 895 | available: false, |
| 896 | detail: `${versionStatus.detail}; advanced runtime unavailable: ${appServerStatus.detail}` |
| 897 | }; |
| 898 | } |
| 899 | |
| 900 | return { |
| 901 | available: true, |
| 902 | detail: `${versionStatus.detail}; advanced runtime available` |
| 903 | }; |
| 904 | } |
| 905 | |
| 906 | export function getSessionRuntimeStatus(env = process.env, cwd = process.cwd()) { |
| 907 | const endpoint = env?.[BROKER_ENDPOINT_ENV] ?? loadBrokerSession(cwd)?.endpoint ?? null; |
no test coverage detected