arisa 2.3.44 → 2.3.45

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.45",
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> {