@tryarcanist/cli 0.1.211 → 0.1.213
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.js +12 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1934,6 +1934,14 @@ import { join as join3 } from "path";
|
|
|
1934
1934
|
var CODEX_SUBSCRIPTION_PATH = "/api/settings/codex-subscription";
|
|
1935
1935
|
var CODEX_SUBSCRIPTION_AUTH_JSON_PATH = "/api/settings/codex-subscription/auth-json";
|
|
1936
1936
|
var CODEX_SUBSCRIPTION_ENABLED_PATH = "/api/settings/codex-subscription/enabled";
|
|
1937
|
+
function describeCredentialStatus(credential) {
|
|
1938
|
+
if (!credential.isSet) return null;
|
|
1939
|
+
if (credential.lastValidationStatus === "invalid") {
|
|
1940
|
+
return "Expired. Upload a fresh auth.json in Settings, or run `arcanist codex login` if the Codex CLI is installed. `arcanist codex use off` falls back to your OpenAI key.";
|
|
1941
|
+
}
|
|
1942
|
+
if (credential.lastValidationStatus === "validated") return "Verified with OpenAI.";
|
|
1943
|
+
return "Saved, but not verified with OpenAI yet.";
|
|
1944
|
+
}
|
|
1937
1945
|
function resolveCodexPath(optionPath) {
|
|
1938
1946
|
return optionPath?.trim() || process.env.ARCANIST_CODEX_BIN?.trim() || "codex";
|
|
1939
1947
|
}
|
|
@@ -2017,7 +2025,8 @@ async function codexLoginCommand(options, command) {
|
|
|
2017
2025
|
console.log(
|
|
2018
2026
|
activated ? "Codex subscription auth saved and activated for OpenAI sessions." : "Codex subscription auth saved."
|
|
2019
2027
|
);
|
|
2020
|
-
|
|
2028
|
+
const status = describeCredentialStatus(payload);
|
|
2029
|
+
if (status) console.log(`Status: ${status}`);
|
|
2021
2030
|
if (!activated) {
|
|
2022
2031
|
console.log(`Could not activate it automatically${activationError ? ` (${activationError})` : ""}.`);
|
|
2023
2032
|
console.log("Run `arcanist codex use on` to start using it.");
|
|
@@ -2057,7 +2066,8 @@ async function codexStatusCommand(options, command) {
|
|
|
2057
2066
|
emit(command, options, payload, (state) => {
|
|
2058
2067
|
console.log(`Eligible: ${state.eligible ? "yes" : "no"}`);
|
|
2059
2068
|
console.log(`Auth.json saved: ${state.credential.isSet ? "yes" : "no"}`);
|
|
2060
|
-
|
|
2069
|
+
const status = describeCredentialStatus(state.credential);
|
|
2070
|
+
if (status) console.log(`Status: ${status}`);
|
|
2061
2071
|
});
|
|
2062
2072
|
}
|
|
2063
2073
|
async function codexLogoutCommand(options, command) {
|