arisa 2.3.38 → 2.3.39
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/daemon/setup.ts +6 -1
package/package.json
CHANGED
package/src/daemon/setup.ts
CHANGED
|
@@ -348,7 +348,12 @@ async function runInteractiveLogin(cli: AgentCliName, vars: Record<string, strin
|
|
|
348
348
|
}
|
|
349
349
|
|
|
350
350
|
// Extract token from output (format: sk-ant-oat01-...)
|
|
351
|
-
|
|
351
|
+
// The CLI wraps long tokens across multiple lines — collect until blank line, strip whitespace.
|
|
352
|
+
const tokenStartIdx = output.indexOf("sk-ant-oat01-");
|
|
353
|
+
const tokenArea = tokenStartIdx >= 0
|
|
354
|
+
? output.substring(tokenStartIdx, output.indexOf("\n\n", tokenStartIdx) >>> 0 || tokenStartIdx + 200)
|
|
355
|
+
: "";
|
|
356
|
+
const tokenMatch = tokenArea ? tokenArea.replace(/\s+/g, "").match(/(sk-ant-oat01-[A-Za-z0-9_-]+)/) : null;
|
|
352
357
|
if (tokenMatch) {
|
|
353
358
|
const token = tokenMatch[1];
|
|
354
359
|
console.log(` [token] ${token.slice(0, 20)}...${token.slice(-6)} (${token.length} chars)`);
|