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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arisa",
3
- "version": "2.3.44",
3
+ "version": "2.3.46",
4
4
  "description": "Arisa - dynamic agent runtime with daemon/core architecture that evolves through user interaction",
5
5
  "keywords": [
6
6
  "tinyclaw",
@@ -44,13 +44,16 @@ function saveEnv(vars: Record<string, string>) {
44
44
  writeFileSync(ENV_PATH, content);
45
45
  }
46
46
 
47
- // Fallback readline for non-TTY environments
47
+ // Robust readline that survives after child processes inherit stdin
48
48
  async function readLine(question: string): Promise<string> {
49
- process.stdout.write(question);
50
- for await (const line of console) {
51
- return line.trim();
52
- }
53
- return "";
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;