arisa 2.3.42 → 2.3.43

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.42",
3
+ "version": "2.3.43",
4
4
  "description": "Arisa - dynamic agent runtime with daemon/core architecture that evolves through user interaction",
5
5
  "keywords": [
6
6
  "tinyclaw",
@@ -356,11 +356,18 @@ async function runInteractiveLogin(cli: AgentCliName, vars: Record<string, strin
356
356
  // `claude setup-token` prints a long-lived (1 year) token but does NOT
357
357
  // store it. Extract from captured output and save to .env.
358
358
  if (isClaudeSetupToken) {
359
+ // Ink CLI embeds ANSI escape sequences (cursor, colors, OSC) even with
360
+ // NO_COLOR. Strip everything non-printable before searching for the token.
361
+ const clean = output
362
+ .replace(/\x1b\[[0-9;]*[A-Za-z]/g, "") // CSI sequences
363
+ .replace(/\x1b\][^\x07]*\x07/g, "") // OSC sequences
364
+ .replace(/\x1b[()][A-Z0-9]/g, "") // Charset sequences
365
+ .replace(/\r/g, ""); // Carriage returns
366
+
359
367
  // Token lines are purely [A-Za-z0-9_-] with no spaces.
360
- // Stop collecting when we hit a line with spaces (e.g. "Store this token...")
361
- const idx = output.indexOf("sk-ant-");
368
+ const idx = clean.indexOf("sk-ant-");
362
369
  if (idx >= 0) {
363
- const lines = output.substring(idx).split("\n");
370
+ const lines = clean.substring(idx).split("\n");
364
371
  let token = "";
365
372
  for (const line of lines) {
366
373
  const trimmed = line.trim();