arisa 2.3.46 → 2.3.48
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/package.json +1 -1
- package/src/core/processor.ts +1 -1
- package/src/daemon/setup.ts +11 -1
package/package.json
CHANGED
package/src/core/processor.ts
CHANGED
|
@@ -26,7 +26,7 @@ const PROMPT_PREVIEW_MAX = 220;
|
|
|
26
26
|
export const CLAUDE_RATE_LIMIT_MESSAGE = "Claude is out of credits right now. Please try again in a few minutes.";
|
|
27
27
|
export const CODEX_AUTH_REQUIRED_MESSAGE = [
|
|
28
28
|
"Codex login is required.",
|
|
29
|
-
"
|
|
29
|
+
"Run: codex login --device-auth (or set OPENAI_API_KEY in ~/.arisa/.env) then restart Arisa."
|
|
30
30
|
].join("\n");
|
|
31
31
|
|
|
32
32
|
function logActivity(backend: string, model: string | null, durationMs: number, status: string) {
|
package/src/daemon/setup.ts
CHANGED
|
@@ -289,7 +289,17 @@ async function isCliAuthenticated(cli: AgentCliName): Promise<boolean> {
|
|
|
289
289
|
const exitCode = await proc.exited;
|
|
290
290
|
return exitCode === 0 && stdout.includes('"loggedIn": true');
|
|
291
291
|
}
|
|
292
|
-
// Codex:
|
|
292
|
+
// Codex: has OPENAI_API_KEY or device-auth credentials
|
|
293
|
+
if (cli === "codex") {
|
|
294
|
+
if (process.env.OPENAI_API_KEY) return true;
|
|
295
|
+
// device-auth stores config in ~/.codex/ — try a quick dry-run
|
|
296
|
+
const cmd = buildBunWrappedAgentCliCommand("codex", ["--help"], { skipPreload: true });
|
|
297
|
+
const proc = Bun.spawn(cmd, { stdout: "pipe", stderr: "pipe" });
|
|
298
|
+
const stderr = await new Response(proc.stderr).text();
|
|
299
|
+
await proc.exited;
|
|
300
|
+
// If stderr mentions login/auth, not authenticated
|
|
301
|
+
return !(/login|authenticate|OPENAI_API_KEY/i.test(stderr));
|
|
302
|
+
}
|
|
293
303
|
return true;
|
|
294
304
|
} catch {
|
|
295
305
|
return false;
|