arisa 2.3.44 → 2.3.46
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 +10 -7
package/package.json
CHANGED
package/src/daemon/setup.ts
CHANGED
|
@@ -44,13 +44,16 @@ function saveEnv(vars: Record<string, string>) {
|
|
|
44
44
|
writeFileSync(ENV_PATH, content);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
//
|
|
47
|
+
// Robust readline that survives after child processes inherit stdin
|
|
48
48
|
async function readLine(question: string): Promise<string> {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
49
|
+
const rl = await import("node:readline");
|
|
50
|
+
const iface = rl.createInterface({ input: process.stdin, output: process.stdout });
|
|
51
|
+
return new Promise<string>((resolve) => {
|
|
52
|
+
iface.question(question, (answer) => {
|
|
53
|
+
iface.close();
|
|
54
|
+
resolve(answer.trim());
|
|
55
|
+
});
|
|
56
|
+
});
|
|
54
57
|
}
|
|
55
58
|
|
|
56
59
|
export async function runSetup(): Promise<boolean> {
|
|
@@ -338,7 +341,7 @@ async function runInteractiveLogin(cli: AgentCliName, vars: Record<string, strin
|
|
|
338
341
|
// `claude setup-token` prints a token but does NOT store it.
|
|
339
342
|
// Ask the user to paste it.
|
|
340
343
|
if (cli === "claude") {
|
|
341
|
-
console.log("\n Paste the token shown above (starts with sk-ant-):");
|
|
344
|
+
console.log("\n Paste the yellow token shown above (starts with sk-ant-):");
|
|
342
345
|
const token = (await readLine(" > ")).trim();
|
|
343
346
|
if (token.startsWith("sk-ant-") && token.length > 80) {
|
|
344
347
|
vars.CLAUDE_CODE_OAUTH_TOKEN = token;
|