aether-code 0.21.0 → 0.22.0
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/bin/aether-code.js +1 -1
- package/package.json +1 -1
- package/src/agent.js +5 -4
- package/src/diff.js +1 -1
- package/src/render.js +21 -5
- package/src/repl.js +9 -17
- package/src/tools.js +3 -6
package/bin/aether-code.js
CHANGED
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
import readline from "node:readline";
|
|
27
27
|
import { c, errorLine, divider, setTerminalTitle } from "../src/render.js";
|
|
28
28
|
|
|
29
|
-
const VERSION = "0.
|
|
29
|
+
const VERSION = "0.22.0";
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
32
|
* 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.
|
|
3
|
+
"version": "0.22.0",
|
|
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/agent.js
CHANGED
|
@@ -79,8 +79,9 @@ export async function runAgent({
|
|
|
79
79
|
let lastBalance = null;
|
|
80
80
|
|
|
81
81
|
for (let i = 0; i < maxTurns; i++) {
|
|
82
|
-
//
|
|
83
|
-
|
|
82
|
+
// No turn header and no leading blank here — each step (assistant text and
|
|
83
|
+
// each tool label) begins with its own "\n● ", so spacing stays exactly one
|
|
84
|
+
// blank line per step instead of stacking up.
|
|
84
85
|
|
|
85
86
|
// Stream the assistant's response. Print text deltas as they arrive,
|
|
86
87
|
// along with tool-call announcements as soon as the model commits to
|
|
@@ -107,7 +108,7 @@ export async function runAgent({
|
|
|
107
108
|
const clean = stripper.push(text);
|
|
108
109
|
if (!clean) return;
|
|
109
110
|
if (!lastWasText) {
|
|
110
|
-
process.stdout.write(c.cyan("● "));
|
|
111
|
+
process.stdout.write("\n" + c.cyan("● "));
|
|
111
112
|
lastWasText = true;
|
|
112
113
|
}
|
|
113
114
|
process.stdout.write(clean);
|
|
@@ -133,7 +134,7 @@ export async function runAgent({
|
|
|
133
134
|
// Flush any held-back partial token, then close the line.
|
|
134
135
|
const tail = stripper.flush();
|
|
135
136
|
if (tail) {
|
|
136
|
-
if (!lastWasText) { process.stdout.write(c.cyan("● ")); lastWasText = true; }
|
|
137
|
+
if (!lastWasText) { process.stdout.write("\n" + c.cyan("● ")); lastWasText = true; }
|
|
137
138
|
process.stdout.write(tail);
|
|
138
139
|
}
|
|
139
140
|
if (lastWasText) process.stdout.write("\n");
|
package/src/diff.js
CHANGED
|
@@ -24,7 +24,7 @@ export function unifiedDiff(oldText, newText, filename) {
|
|
|
24
24
|
const changedNew = newLines.slice(prefix, newLines.length - suffix);
|
|
25
25
|
|
|
26
26
|
const lines = [];
|
|
27
|
-
|
|
27
|
+
// No "@@ file @@" header — the "● write <file>" label already names the file.
|
|
28
28
|
if (prefix > 0) lines.push(c.gray(` …${prefix} unchanged line${prefix === 1 ? "" : "s"} above…`));
|
|
29
29
|
for (const l of changedOld) lines.push(c.red(`- ${l}`));
|
|
30
30
|
for (const l of changedNew) lines.push(c.green(`+ ${l}`));
|
package/src/render.js
CHANGED
|
@@ -24,6 +24,21 @@ export function divider() {
|
|
|
24
24
|
return c.gray("─".repeat(Math.min(60, w)));
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
const stripAnsi = (s) => s.replace(/\x1b\[[0-9;]*m/g, "");
|
|
28
|
+
|
|
29
|
+
// Draw a bordered box around content lines. Light box-drawing chars — same
|
|
30
|
+
// Unicode block as the rules we already render, so it's safe in cmd.exe.
|
|
31
|
+
export function box(lines, { color = c.gray, padX = 2 } = {}) {
|
|
32
|
+
const inner = Math.max(0, ...lines.map((l) => stripAnsi(l).length));
|
|
33
|
+
const w = inner + padX * 2;
|
|
34
|
+
const top = color("╭" + "─".repeat(w) + "╮");
|
|
35
|
+
const bot = color("╰" + "─".repeat(w) + "╯");
|
|
36
|
+
const mid = lines.map(
|
|
37
|
+
(l) => color("│") + " ".repeat(padX) + l + " ".repeat(inner - stripAnsi(l).length + padX) + color("│"),
|
|
38
|
+
);
|
|
39
|
+
return [top, ...mid, bot].join("\n");
|
|
40
|
+
}
|
|
41
|
+
|
|
27
42
|
export function turn(n) {
|
|
28
43
|
return c.gray(`turn ${n}`);
|
|
29
44
|
}
|
|
@@ -70,20 +85,21 @@ export function setTerminalTitle(title) {
|
|
|
70
85
|
// plan) just get a check — the detail was already printed.
|
|
71
86
|
export function toolSummary(name, result) {
|
|
72
87
|
const ok = result.ok;
|
|
73
|
-
|
|
88
|
+
// A tree branch links the result to the action above it (modern CLI style).
|
|
89
|
+
const branch = ok ? c.green("└─") : c.red("└─");
|
|
74
90
|
const out = result.output ?? "";
|
|
75
91
|
const firstLine = out.split("\n").find((l) => l.trim()) ?? "";
|
|
76
92
|
|
|
77
93
|
if (name === "run_shell") {
|
|
78
94
|
let code = null;
|
|
79
95
|
try { code = JSON.parse(out).exit_code; } catch { /* ignore */ }
|
|
80
|
-
return ` ${
|
|
96
|
+
return ` ${branch} ${c.gray(code === null ? (ok ? "done" : "failed") : `exit ${code}`)}`;
|
|
81
97
|
}
|
|
82
|
-
if (name === "todo_write") return ""; // the Plan
|
|
98
|
+
if (name === "todo_write") return ""; // the Plan is its own feedback
|
|
83
99
|
if (name === "ask_user") return ""; // the menu already showed the answer
|
|
84
100
|
if (name === "write_file" || name === "edit_file") {
|
|
85
101
|
// Handler already printed the diff; echo its short status line.
|
|
86
|
-
return ` ${
|
|
102
|
+
return ` ${branch} ${c.gray(ellip(firstLine, 100))}`;
|
|
87
103
|
}
|
|
88
104
|
let summary = "";
|
|
89
105
|
try {
|
|
@@ -95,7 +111,7 @@ export function toolSummary(name, result) {
|
|
|
95
111
|
if (!summary) {
|
|
96
112
|
summary = name === "read_file" ? `${out.split("\n").length} lines` : ellip(firstLine, 100);
|
|
97
113
|
}
|
|
98
|
-
return ` ${
|
|
114
|
+
return ` ${branch} ${c.gray(summary)}`;
|
|
99
115
|
}
|
|
100
116
|
|
|
101
117
|
// Strip model "harmony"/channel control tokens (<|channel|>, <|message|>,
|
package/src/repl.js
CHANGED
|
@@ -13,11 +13,11 @@ import path from "node:path";
|
|
|
13
13
|
import { runAgent } from "./agent.js";
|
|
14
14
|
import { fetchBalance, AetherError } from "./api.js";
|
|
15
15
|
import { runSetup } from "./setup.js";
|
|
16
|
-
import { c, errorLine } from "./render.js";
|
|
16
|
+
import { c, errorLine, box } from "./render.js";
|
|
17
17
|
import { checkForUpdate } from "./update-check.js";
|
|
18
18
|
import { promptBoxed, EXIT_SIGNAL } from "./ink-input.js";
|
|
19
19
|
|
|
20
|
-
const VERSION = "0.
|
|
20
|
+
const VERSION = "0.22.0";
|
|
21
21
|
const MODEL_NAME = "Aether Core";
|
|
22
22
|
|
|
23
23
|
const SHORTCUTS = `
|
|
@@ -272,24 +272,16 @@ const visLen = (s) => s.replace(/\x1b\[[0-9;]*m/g, "").length;
|
|
|
272
272
|
const shortenPath = (p, max) => (p.length <= max ? p : "..." + p.slice(p.length - max + 3));
|
|
273
273
|
|
|
274
274
|
function printBanner(state) {
|
|
275
|
-
const cols = process.stdout.columns || 80;
|
|
276
|
-
const W = Math.max(40, Math.min(cols - 1, 64));
|
|
277
|
-
// Brand-coloured rules top + bottom; content is indented with no right
|
|
278
|
-
// border, so nothing can misalign regardless of terminal font/width.
|
|
279
|
-
const rule = c.magenta("─".repeat(W));
|
|
280
275
|
const mode = state.autoYes ? (state.unsafePaths ? "skip-permissions" : "auto-yes") : "review mode";
|
|
281
|
-
|
|
276
|
+
const credits = state.balance != null ? `${state.balance.toLocaleString()} credits · ` : "";
|
|
277
|
+
const lines = [
|
|
278
|
+
c.bold(c.magenta("aether")) + c.gray(" · ") + c.bold(MODEL_NAME) + c.gray(" v" + VERSION),
|
|
279
|
+
c.gray("1M context · uncensored · " + mode),
|
|
280
|
+
c.gray(credits + shortenPath(state.cwd, 52)),
|
|
281
|
+
];
|
|
282
282
|
console.log("");
|
|
283
|
-
console.log(
|
|
284
|
-
console.log(` ${c.bold(c.magenta("aether-code"))}${c.gray(" v" + VERSION)}`);
|
|
285
|
-
console.log(` ${c.gray(`${MODEL_NAME} · 1M context · uncensored`)}`);
|
|
286
|
-
console.log(` ${c.gray(mode)}${state.balance != null ? c.gray(` · ${state.balance.toLocaleString()} credits`) : ""}`);
|
|
287
|
-
console.log(` ${c.gray(shortenPath(state.cwd, W - 2))}`);
|
|
288
|
-
console.log(rule);
|
|
283
|
+
console.log(box(lines, { color: c.magenta, padX: 2 }));
|
|
289
284
|
console.log("");
|
|
290
|
-
// No bottom status bar here — the Ink input box renders its own persistent
|
|
291
|
-
// status bar beneath it (one bar, Claude-style). The readline fallback prints
|
|
292
|
-
// a one-line hint instead (see runRepl).
|
|
293
285
|
}
|
|
294
286
|
|
|
295
287
|
function printStatusLine(state) {
|
package/src/tools.js
CHANGED
|
@@ -557,8 +557,7 @@ async function writeFile(args, opts) {
|
|
|
557
557
|
if (exists && oldContent === args.content) {
|
|
558
558
|
return { ok: true, output: `(no change — file already matches)` };
|
|
559
559
|
}
|
|
560
|
-
// Show diff + confirm
|
|
561
|
-
console.log("");
|
|
560
|
+
// Show diff + confirm (the "● write <file>" label already spaced this block)
|
|
562
561
|
console.log(summarizeWrite(oldContent, args.content, path.relative(opts.cwd, abs)));
|
|
563
562
|
console.log(unifiedDiff(oldContent ?? "", args.content, path.relative(opts.cwd, abs)));
|
|
564
563
|
const approved = await confirm(c.yellow("Apply this write?"), opts.autoYes);
|
|
@@ -593,7 +592,6 @@ async function editFile(args, opts) {
|
|
|
593
592
|
? oldContent.split(args.find).join(args.replace)
|
|
594
593
|
: oldContent.replace(args.find, args.replace);
|
|
595
594
|
const rel = path.relative(opts.cwd, abs);
|
|
596
|
-
console.log("");
|
|
597
595
|
console.log(c.dim(`edit ${rel}${args.replace_all ? ` (${occurrences} occurrences)` : ""}`));
|
|
598
596
|
console.log(unifiedDiff(oldContent, newContent, rel));
|
|
599
597
|
const approved = await confirm(c.yellow("Apply this edit?"), opts.autoYes);
|
|
@@ -722,7 +720,6 @@ export function htmlToText(html) {
|
|
|
722
720
|
async function runShell(args, opts) {
|
|
723
721
|
if (typeof args.command !== "string") return { ok: false, output: "command is required" };
|
|
724
722
|
const cwd = args.cwd ? resolveSafe(args.cwd, opts) : opts.cwd;
|
|
725
|
-
console.log("");
|
|
726
723
|
console.log(c.yellow("$ ") + c.bold(args.command) + (args.cwd ? c.dim(` (cwd: ${args.cwd})`) : ""));
|
|
727
724
|
const approved = await confirm(c.yellow("Run this command?"), opts.autoYes);
|
|
728
725
|
if (!approved) return { ok: false, output: "User declined the command." };
|
|
@@ -829,7 +826,7 @@ function todoWrite(args, opts) {
|
|
|
829
826
|
function renderTodos(todos) {
|
|
830
827
|
if (!process.stdout.isTTY) return; // skip render in non-TTY (CI, piped, tests)
|
|
831
828
|
console.log("");
|
|
832
|
-
console.log(c.
|
|
829
|
+
console.log(c.cyan("●") + " " + c.bold("Plan"));
|
|
833
830
|
for (const t of todos) {
|
|
834
831
|
const icon =
|
|
835
832
|
t.status === "completed"
|
|
@@ -842,7 +839,7 @@ function renderTodos(todos) {
|
|
|
842
839
|
? c.dim(t.content)
|
|
843
840
|
: t.status === "in_progress"
|
|
844
841
|
? c.bold(t.content)
|
|
845
|
-
: t.content;
|
|
842
|
+
: c.gray(t.content);
|
|
846
843
|
console.log(` ${icon} ${text}`);
|
|
847
844
|
}
|
|
848
845
|
console.log("");
|