arisa 2.3.47 → 2.3.49

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arisa",
3
- "version": "2.3.47",
3
+ "version": "2.3.49",
4
4
  "description": "Arisa - dynamic agent runtime with daemon/core architecture that evolves through user interaction",
5
5
  "keywords": [
6
6
  "tinyclaw",
@@ -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
- "Check the Arisa daemon logs now and complete the device-auth steps shown there."
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) {
@@ -24,10 +24,12 @@ const ready = await runSetup();
24
24
  if (!ready) process.exit(1);
25
25
 
26
26
  // Dynamic imports so config loads AFTER setup has written .env
27
+ console.log("Loading configuration...");
27
28
  const { config } = await import("../shared/config");
28
29
 
29
30
  // Initialize encrypted secrets
30
31
  await config.secrets.initialize();
32
+ console.log("Initializing modules...");
31
33
  const { createLogger } = await import("../shared/logger");
32
34
  const { serveWithRetry, claimProcess, releaseProcess, cleanupSocket } = await import("../shared/ports");
33
35
  const { TelegramChannel } = await import("./channels/telegram");
@@ -35,6 +37,7 @@ const { sendToCore } = await import("./bridge");
35
37
  // lifecycle/autofix removed — Core runs in-process, --watch handles restarts
36
38
  const { autoInstallMissingClis, setAutoInstallNotify } = await import("./auto-install");
37
39
  const { chunkMessage, markdownToTelegramHtml } = await import("../core/format");
40
+ console.log("Connecting to Telegram...");
38
41
  // Message records are saved via Core's /record endpoint to avoid dual-writer
39
42
  // conflicts (Daemon and Core sharing the same arisa.json through separate
40
43
  // in-memory DeepBase instances would cause one to overwrite the other's data).
@@ -289,9 +289,16 @@ 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: needs OPENAI_API_KEY
292
+ // Codex: has OPENAI_API_KEY or device-auth credentials
293
293
  if (cli === "codex") {
294
- return !!(process.env.OPENAI_API_KEY);
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));
295
302
  }
296
303
  return true;
297
304
  } catch {