aether-code 0.36.2 → 0.36.4

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.
@@ -28,7 +28,7 @@ import {
28
28
  import readline from "node:readline";
29
29
  import { c, errorLine, divider, setTerminalTitle } from "../src/render.js";
30
30
 
31
- const VERSION = "0.36.2";
31
+ const VERSION = "0.36.4";
32
32
 
33
33
  /**
34
34
  * Try to start MCP servers from ~/.aether/mcp.json. Returns a started
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aether-code",
3
- "version": "0.36.2",
3
+ "version": "0.36.4",
4
4
  "description": "Uncensored AI coding agent for your terminal — Claude Code alternative with MCP support. Reads code, writes files, runs commands. Drives IDA Pro, Roblox Studio, Wireshark, Blender, and any MCP server. No refusal layer.",
5
5
  "homepage": "https://trynoguard.com",
6
6
  "repository": {
package/src/repl.js CHANGED
@@ -9,7 +9,7 @@ import { c, errorLine, turnStats } from "./render.js";
9
9
  import { autoUpdate } from "./update-check.js";
10
10
  import { promptBox, EXIT_SIGNAL } from "./box-input.js";
11
11
 
12
- const VERSION = "0.36.2";
12
+ const VERSION = "0.36.4";
13
13
  const MODEL_NAME = "Aether Core";
14
14
 
15
15
  const MODEL_ALIASES = {
@@ -35,6 +35,37 @@ ${c.gray("Conversation history is kept across messages until you /clear.")}
35
35
 
36
36
  const stripAnsi = (s) => s.replace(/\x1b\[[0-9;]*m/g, "");
37
37
 
38
+ function getVisibleRows() {
39
+ let rows = process.stdout.rows || 24;
40
+ if (process.platform === "win32" && !process.env.WT_SESSION && rows > 60) {
41
+ rows = 24;
42
+ }
43
+ return rows;
44
+ }
45
+
46
+ function pushPromptToBottom(contentLines) {
47
+ const visibleRows = getVisibleRows();
48
+ const promptHeight = 4;
49
+ const gap = Math.max(0, visibleRows - contentLines - promptHeight);
50
+ if (gap > 0) process.stdout.write("\n".repeat(gap));
51
+ }
52
+
53
+ function drawStaticPrompt(startRow, state) {
54
+ const termCols = process.stdout.columns || 80;
55
+ const ruleStr = `\x1b[36m ${"─".repeat(Math.max(0, termCols - 2))}\x1b[0m`;
56
+ const modeStr = state.autoYes ? "auto-yes" : "review";
57
+ const blkFn = (code) => `\x1b[${code}m \x1b[0m`;
58
+ const statusBar = blkFn(46) + blkFn(44) +
59
+ `\x1b[2m ${modeStr} mode \xB7 ? for shortcuts \xB7 @file for images\x1b[0m`;
60
+ process.stdout.write(
61
+ `\x1b[${startRow};1H` +
62
+ ruleStr + "\n" +
63
+ `\x1b[2m> \x1b[0m` + "\n" +
64
+ ruleStr + "\n" +
65
+ statusBar,
66
+ );
67
+ }
68
+
38
69
  export async function runRepl({ cwd: initialCwd, autoYes: initialAutoYes, unsafePaths: initialUnsafePaths, maxTurns: initialMaxTurns, model: initialModel = null, mcpManager = null }) {
39
70
  const initialAlias = Object.values(MODEL_ALIASES).find((a) => a.id === initialModel);
40
71
  const state = {
@@ -88,18 +119,7 @@ export async function runRepl({ cwd: initialCwd, autoYes: initialAutoYes, unsafe
88
119
  let extraLines = 0;
89
120
  if (updateMsg) { console.log(updateMsg); extraLines++; }
90
121
 
91
- // Push prompt to bottom of visible viewport using newline padding.
92
- // process.stdout.rows is accurate on Windows Terminal (WT_SESSION set),
93
- // macOS, and Linux. On raw cmd.exe/conhost it returns the scroll-buffer
94
- // height (~300) instead of the visible viewport — detect and fall back.
95
- let visibleRows = process.stdout.rows || 24;
96
- if (process.platform === "win32" && !process.env.WT_SESSION && visibleRows > 60) {
97
- visibleRows = 24;
98
- }
99
- const promptHeight = 4;
100
- const contentEnd = bannerLineCount + extraLines;
101
- const gap = Math.max(0, visibleRows - contentEnd - promptHeight);
102
- if (gap > 0) process.stdout.write("\n".repeat(gap));
122
+ pushPromptToBottom(bannerLineCount + extraLines);
103
123
 
104
124
  const inputHistory = [];
105
125
 
@@ -124,19 +144,39 @@ export async function runRepl({ cwd: initialCwd, autoYes: initialAutoYes, unsafe
124
144
  const echoLen = echoDisplay.length + 2;
125
145
  const echoPad = Math.max(0, echoCols - echoLen);
126
146
  const echoBar = `\x1b[48;5;236m ${echoDisplay}${" ".repeat(echoPad)}\x1b[0m`;
127
- process.stdout.write("\x1b[2J\x1b[H" + bLines.join("\n") + "\n" + echoBar + "\n");
147
+
148
+ const vr = getVisibleRows();
149
+ const scrollEnd = Math.max(4, vr - 4);
150
+ const promptRow = scrollEnd + 1;
151
+
152
+ // Clear screen, print banner + echo, draw static prompt at bottom,
153
+ // then set scroll region so agent output stays above the prompt.
154
+ process.stdout.write(
155
+ "\x1b[r" +
156
+ "\x1b[2J\x1b[H" +
157
+ bLines.join("\n") + "\n" + echoBar + "\n",
158
+ );
159
+ drawStaticPrompt(promptRow, state);
160
+
161
+ const agentRow = Math.min(bLines.length + 2, scrollEnd);
162
+ process.stdout.write(`\x1b[1;${scrollEnd}r\x1b[${agentRow};1H`);
128
163
 
129
164
  const t0 = Date.now();
130
- const result = await runAgent({
131
- initialPrompt: line,
132
- priorMessages: state.messages.length > 0 ? state.messages : undefined,
133
- cwd: state.cwd,
134
- autoYes: state.autoYes,
135
- unsafePaths: state.unsafePaths,
136
- model: state.model,
137
- maxTurns: state.maxTurns,
138
- mcpManager,
139
- });
165
+ let result;
166
+ try {
167
+ result = await runAgent({
168
+ initialPrompt: line,
169
+ priorMessages: state.messages.length > 0 ? state.messages : undefined,
170
+ cwd: state.cwd,
171
+ autoYes: state.autoYes,
172
+ unsafePaths: state.unsafePaths,
173
+ model: state.model,
174
+ maxTurns: state.maxTurns,
175
+ mcpManager,
176
+ });
177
+ } finally {
178
+ process.stdout.write("\x1b[r");
179
+ }
140
180
  const elapsed = Date.now() - t0;
141
181
 
142
182
  state.sessionCredits += result.totalCredits ?? 0;
@@ -158,6 +198,9 @@ export async function runRepl({ cwd: initialCwd, autoYes: initialAutoYes, unsafe
158
198
  });
159
199
  if (stats) console.log(stats);
160
200
  console.log("");
201
+
202
+ // Position cursor at prompt area for the interactive prompt
203
+ process.stdout.write(`\x1b[${promptRow};1H\x1b[J`);
161
204
  }
162
205
  }
163
206