archymedes-cli 2.5.0 → 2.6.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/dist/{archymedes-d3azqkay.mjs → archymedes-086xsz64.mjs} +2 -2
- package/dist/{archymedes-a3ms7jvr.mjs → archymedes-1jcn326m.mjs} +2 -2
- package/dist/{archymedes-5vhvv8kr.mjs → archymedes-kn6wtq32.mjs} +1 -1
- package/dist/archymedes-main.mjs +227 -19
- package/dist/{archymedes-130jt0wr.mjs → archymedes-s4qcy0q4.mjs} +20 -1
- package/dist/{archymedes-138genyy.mjs → archymedes-t1jtzkmp.mjs} +3 -3
- package/dist/{archymedes-bmtdqqwt.mjs → archymedes-twanftqk.mjs} +1 -1
- package/dist/{archymedes-2kvjaajw.mjs → archymedes-zvcs68bv.mjs} +2 -2
- package/dist/{editor-screen-e01mn7dd.mjs → editor-screen-pf252j2r.mjs} +3 -3
- package/dist/{file-screen-stcxznwy.mjs → file-screen-1j65f7b4.mjs} +3 -3
- package/dist/{guide-screen-w5nb9sry.mjs → guide-screen-9vxsk83x.mjs} +4 -4
- package/dist/{workspace-screen-62k6hnq7.mjs → workspace-screen-ntdcgfq9.mjs} +4 -4
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
note,
|
|
5
5
|
panel,
|
|
6
6
|
rule
|
|
7
|
-
} from "./archymedes-
|
|
7
|
+
} from "./archymedes-twanftqk.mjs";
|
|
8
8
|
import {
|
|
9
9
|
BOLD,
|
|
10
10
|
DIM,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
paint,
|
|
13
13
|
paintAll,
|
|
14
14
|
visibleWidth
|
|
15
|
-
} from "./archymedes-
|
|
15
|
+
} from "./archymedes-s4qcy0q4.mjs";
|
|
16
16
|
|
|
17
17
|
// packages/archymedes-cli/src/terminal/viewport.ts
|
|
18
18
|
function newViewport(lines, height) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SpringAnimator,
|
|
3
3
|
paginator
|
|
4
|
-
} from "./archymedes-
|
|
4
|
+
} from "./archymedes-kn6wtq32.mjs";
|
|
5
5
|
import {
|
|
6
6
|
UNICODE_GLYPHS,
|
|
7
7
|
clipTo,
|
|
8
8
|
visibleWidth
|
|
9
|
-
} from "./archymedes-
|
|
9
|
+
} from "./archymedes-s4qcy0q4.mjs";
|
|
10
10
|
|
|
11
11
|
// packages/archymedes-cli/src/ui/chooser.ts
|
|
12
12
|
var ALL_CHROME = { title: true, status: true, pagination: true, help: true };
|
package/dist/archymedes-main.mjs
CHANGED
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
suggestionsFor,
|
|
26
26
|
t,
|
|
27
27
|
visibleLines
|
|
28
|
-
} from "./archymedes-
|
|
28
|
+
} from "./archymedes-086xsz64.mjs";
|
|
29
29
|
import {
|
|
30
30
|
INITIAL_CHOOSER_STATE,
|
|
31
31
|
filterItems,
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
runChooser,
|
|
34
34
|
terminalColumns,
|
|
35
35
|
windowStart
|
|
36
|
-
} from "./archymedes-
|
|
36
|
+
} from "./archymedes-1jcn326m.mjs";
|
|
37
37
|
import {
|
|
38
38
|
EventJournal,
|
|
39
39
|
OwnershipHeldError,
|
|
@@ -89,7 +89,7 @@ import {
|
|
|
89
89
|
renderCode,
|
|
90
90
|
renderDiff,
|
|
91
91
|
renderFileChange
|
|
92
|
-
} from "./archymedes-
|
|
92
|
+
} from "./archymedes-zvcs68bv.mjs";
|
|
93
93
|
import {
|
|
94
94
|
PaneActivity,
|
|
95
95
|
barChart,
|
|
@@ -99,7 +99,7 @@ import {
|
|
|
99
99
|
plotSeries,
|
|
100
100
|
scatterChart,
|
|
101
101
|
waveLine
|
|
102
|
-
} from "./archymedes-
|
|
102
|
+
} from "./archymedes-t1jtzkmp.mjs";
|
|
103
103
|
import {
|
|
104
104
|
CountdownTimer,
|
|
105
105
|
MarkdownStream,
|
|
@@ -132,7 +132,7 @@ import {
|
|
|
132
132
|
table,
|
|
133
133
|
terminalStream,
|
|
134
134
|
wrapPlain
|
|
135
|
-
} from "./archymedes-
|
|
135
|
+
} from "./archymedes-kn6wtq32.mjs";
|
|
136
136
|
import {
|
|
137
137
|
GUTTER,
|
|
138
138
|
clip,
|
|
@@ -143,7 +143,7 @@ import {
|
|
|
143
143
|
panel,
|
|
144
144
|
rule,
|
|
145
145
|
toneCode
|
|
146
|
-
} from "./archymedes-
|
|
146
|
+
} from "./archymedes-twanftqk.mjs";
|
|
147
147
|
import {
|
|
148
148
|
ANSI_PALETTE,
|
|
149
149
|
ASCII_GLYPHS,
|
|
@@ -176,7 +176,7 @@ import {
|
|
|
176
176
|
setCodeStyle,
|
|
177
177
|
visibleWidth,
|
|
178
178
|
withFullScreen
|
|
179
|
-
} from "./archymedes-
|
|
179
|
+
} from "./archymedes-s4qcy0q4.mjs";
|
|
180
180
|
import {
|
|
181
181
|
__require
|
|
182
182
|
} from "./archymedes-x67v3n58.mjs";
|
|
@@ -15625,6 +15625,11 @@ class PinnedScreen {
|
|
|
15625
15625
|
return;
|
|
15626
15626
|
this.stream.write(`\x1B7\x1B[?25l\x1B[${this.layout.promptBottomRow};1H\x1B[2K${text}\x1B8\x1B[?25h`);
|
|
15627
15627
|
}
|
|
15628
|
+
renderInput(text) {
|
|
15629
|
+
if (!this.holdRegion || !this.layout.inputRow)
|
|
15630
|
+
return;
|
|
15631
|
+
this.stream.write(`\x1B7\x1B[?25l\x1B[${this.layout.inputRow};1H\x1B[2K${text}\x1B8\x1B[?25h`);
|
|
15632
|
+
}
|
|
15628
15633
|
positionInput() {
|
|
15629
15634
|
if (!this.holdRegion || !this.layout.inputRow)
|
|
15630
15635
|
return;
|
|
@@ -16740,6 +16745,13 @@ var expandables = new ExpandableStore;
|
|
|
16740
16745
|
function contentWidth() {
|
|
16741
16746
|
return screen?.current.contentWidth ?? (process.stdout.columns ?? 80);
|
|
16742
16747
|
}
|
|
16748
|
+
function wrapNote(lead, text) {
|
|
16749
|
+
const columns = screen?.current.columns ?? process.stdout.columns ?? 80;
|
|
16750
|
+
const indent = " ".repeat(visibleWidth(lead));
|
|
16751
|
+
const lines = wrapPlain(text, Math.max(20, columns - indent.length - 1));
|
|
16752
|
+
return lines.map((line, index) => `${index === 0 ? lead : indent}${line}`).join(`
|
|
16753
|
+
`);
|
|
16754
|
+
}
|
|
16743
16755
|
var activity = {
|
|
16744
16756
|
awaitingFirstDelta: false,
|
|
16745
16757
|
toolCalls: 0,
|
|
@@ -16888,11 +16900,11 @@ ${rule(sectionStyle(), { label: label3, tone: "accent" })}
|
|
|
16888
16900
|
}
|
|
16889
16901
|
const probability2 = verdict.outcomeProbabilities[verdict.outcome]?.toFixed(2) ?? "?";
|
|
16890
16902
|
if (verdict.outcome === "blocked") {
|
|
16891
|
-
out.write(style.yellow(` ${glyphs.elbow} jev: blocked (${probability2}) · sensitive action ${verdict.sensitiveAction.toFixed(2)} — review before building on this turn; /undo restores the checkpoint
|
|
16903
|
+
out.write(style.yellow(`${wrapNote(` ${glyphs.elbow} `, `jev: blocked (${probability2}) · sensitive action ${verdict.sensitiveAction.toFixed(2)} — review before building on this turn; /undo restores the checkpoint`)}
|
|
16892
16904
|
`));
|
|
16893
16905
|
return;
|
|
16894
16906
|
}
|
|
16895
|
-
out.write(style.dim(` ${glyphs.elbow} jev: ${verdict.outcome} (${probability2}) · sensitive action ${verdict.sensitiveAction.toFixed(2)}
|
|
16907
|
+
out.write(style.dim(`${wrapNote(` ${glyphs.elbow} `, `jev: ${verdict.outcome} (${probability2}) · sensitive action ${verdict.sensitiveAction.toFixed(2)}`)}
|
|
16896
16908
|
`));
|
|
16897
16909
|
return;
|
|
16898
16910
|
}
|
|
@@ -21587,6 +21599,119 @@ ${style2.bold("Free mode setup")}
|
|
|
21587
21599
|
return;
|
|
21588
21600
|
}
|
|
21589
21601
|
|
|
21602
|
+
// packages/archymedes-cli/src/app/turn-composer.ts
|
|
21603
|
+
import { Writable } from "node:stream";
|
|
21604
|
+
function createTurnComposer(options) {
|
|
21605
|
+
const rl = options.readline;
|
|
21606
|
+
let active = false;
|
|
21607
|
+
let realOutput;
|
|
21608
|
+
let realQuestion;
|
|
21609
|
+
let asking = false;
|
|
21610
|
+
const sink = () => {
|
|
21611
|
+
const writable = new Writable({ write(_chunk, _encoding, done) {
|
|
21612
|
+
done();
|
|
21613
|
+
} });
|
|
21614
|
+
Object.defineProperty(writable, "columns", { get: () => realOutput?.columns ?? 80 });
|
|
21615
|
+
return writable;
|
|
21616
|
+
};
|
|
21617
|
+
const repaint = () => {
|
|
21618
|
+
if (!active || asking)
|
|
21619
|
+
return;
|
|
21620
|
+
options.paint?.(rl.line ?? "", options.queued);
|
|
21621
|
+
};
|
|
21622
|
+
const clearDraft = () => {
|
|
21623
|
+
rl.write(null, { ctrl: true, name: "u" });
|
|
21624
|
+
rl.write(null, { ctrl: true, name: "k" });
|
|
21625
|
+
};
|
|
21626
|
+
const onKeypress = (_str, key) => {
|
|
21627
|
+
if (!active || asking)
|
|
21628
|
+
return;
|
|
21629
|
+
if (key?.name === "escape" && !key.ctrl && !options.escapeTaken?.()) {
|
|
21630
|
+
if ((rl.line ?? "") !== "")
|
|
21631
|
+
clearDraft();
|
|
21632
|
+
else
|
|
21633
|
+
options.interrupt();
|
|
21634
|
+
}
|
|
21635
|
+
setImmediate(repaint);
|
|
21636
|
+
};
|
|
21637
|
+
const onLine = (line) => {
|
|
21638
|
+
if (!active || asking)
|
|
21639
|
+
return;
|
|
21640
|
+
if (line.trim() !== "")
|
|
21641
|
+
options.queued.push(line);
|
|
21642
|
+
setImmediate(repaint);
|
|
21643
|
+
};
|
|
21644
|
+
return {
|
|
21645
|
+
get active() {
|
|
21646
|
+
return active;
|
|
21647
|
+
},
|
|
21648
|
+
begin() {
|
|
21649
|
+
if (active)
|
|
21650
|
+
return;
|
|
21651
|
+
active = true;
|
|
21652
|
+
realOutput = rl.output;
|
|
21653
|
+
rl.output = sink();
|
|
21654
|
+
realQuestion = rl.question;
|
|
21655
|
+
const original = realQuestion.bind(rl);
|
|
21656
|
+
rl.question = (query, questionOptions) => {
|
|
21657
|
+
asking = true;
|
|
21658
|
+
const draft = rl.line ?? "";
|
|
21659
|
+
if (draft)
|
|
21660
|
+
clearDraft();
|
|
21661
|
+
rl.output = realOutput;
|
|
21662
|
+
return original(query, questionOptions).finally(() => {
|
|
21663
|
+
asking = false;
|
|
21664
|
+
if (!active)
|
|
21665
|
+
return;
|
|
21666
|
+
rl.output = sink();
|
|
21667
|
+
if (draft)
|
|
21668
|
+
rl.write(draft);
|
|
21669
|
+
repaint();
|
|
21670
|
+
});
|
|
21671
|
+
};
|
|
21672
|
+
options.input.on("keypress", onKeypress);
|
|
21673
|
+
rl.on("line", onLine);
|
|
21674
|
+
repaint();
|
|
21675
|
+
},
|
|
21676
|
+
end() {
|
|
21677
|
+
if (!active)
|
|
21678
|
+
return;
|
|
21679
|
+
active = false;
|
|
21680
|
+
options.input.off("keypress", onKeypress);
|
|
21681
|
+
rl.off("line", onLine);
|
|
21682
|
+
if (realQuestion)
|
|
21683
|
+
rl.question = realQuestion;
|
|
21684
|
+
if (realOutput)
|
|
21685
|
+
rl.output = realOutput;
|
|
21686
|
+
realOutput = undefined;
|
|
21687
|
+
realQuestion = undefined;
|
|
21688
|
+
}
|
|
21689
|
+
};
|
|
21690
|
+
}
|
|
21691
|
+
function turnComposerHint(queued) {
|
|
21692
|
+
const waiting = queued.length === 0 ? "" : ` · ${queued.length} queued`;
|
|
21693
|
+
return `type your next message · Enter queues it · Esc interrupts${waiting}`;
|
|
21694
|
+
}
|
|
21695
|
+
|
|
21696
|
+
// packages/archymedes-cli/src/text/text-width.ts
|
|
21697
|
+
var ANSI2 = /\x1b\[[0-9;]*m/g;
|
|
21698
|
+
var PRINTABLE_ASCII2 = /^[\x20-\x7e]*$/;
|
|
21699
|
+
function visibleWidth2(text) {
|
|
21700
|
+
if (PRINTABLE_ASCII2.test(text))
|
|
21701
|
+
return text.length;
|
|
21702
|
+
let width = 0;
|
|
21703
|
+
for (const character of text.includes("\x1B") ? text.replace(ANSI2, "") : text) {
|
|
21704
|
+
const code = character.codePointAt(0) ?? 0;
|
|
21705
|
+
if (code >= 768 && code <= 879)
|
|
21706
|
+
continue;
|
|
21707
|
+
width += isWide(code) ? 2 : 1;
|
|
21708
|
+
}
|
|
21709
|
+
return width;
|
|
21710
|
+
}
|
|
21711
|
+
function isWide(code) {
|
|
21712
|
+
return code >= 4352 && code <= 4447 || code >= 11904 && code <= 42191 || code >= 44032 && code <= 55203 || code >= 63744 && code <= 64255 || code >= 65072 && code <= 65135 || code >= 65280 && code <= 65376 || code >= 127744 && code <= 129535;
|
|
21713
|
+
}
|
|
21714
|
+
|
|
21590
21715
|
// packages/archymedes-cli/src/session/history.ts
|
|
21591
21716
|
import { promises as fs18 } from "node:fs";
|
|
21592
21717
|
import path25 from "node:path";
|
|
@@ -21982,6 +22107,24 @@ var ARCHYMEDES = `
|
|
|
21982
22107
|
--border-focus: #e7bb78;
|
|
21983
22108
|
}
|
|
21984
22109
|
`;
|
|
22110
|
+
var ARCHYMEDES_BLUE = `
|
|
22111
|
+
/* Solarized Dark with an Archymedes-blue line — calm, high-contrast hues; the default. */
|
|
22112
|
+
@theme archymedes-blue {
|
|
22113
|
+
--primary: #268bd2;
|
|
22114
|
+
--secondary: #2aa198;
|
|
22115
|
+
--accent: #b58900;
|
|
22116
|
+
--bg: #002b36;
|
|
22117
|
+
--surface: #073642;
|
|
22118
|
+
--text: #93a1a1;
|
|
22119
|
+
--text-muted: #657b83;
|
|
22120
|
+
--success: #859900;
|
|
22121
|
+
--warning: #cb4b16;
|
|
22122
|
+
--error: #dc322f;
|
|
22123
|
+
--border: round;
|
|
22124
|
+
--border-color: #586e75;
|
|
22125
|
+
--border-focus: #268bd2;
|
|
22126
|
+
}
|
|
22127
|
+
`;
|
|
21985
22128
|
var RAINBOW = `
|
|
21986
22129
|
/* Every hue at once — the opening art and the thinking spinner sweep the full spectrum. */
|
|
21987
22130
|
@theme rainbow {
|
|
@@ -22001,6 +22144,7 @@ var RAINBOW = `
|
|
|
22001
22144
|
}
|
|
22002
22145
|
`;
|
|
22003
22146
|
var BUILTIN_THEME_SOURCES2 = {
|
|
22147
|
+
"archymedes-blue": ARCHYMEDES_BLUE,
|
|
22004
22148
|
archymedes: ARCHYMEDES,
|
|
22005
22149
|
blueprint: BLUEPRINT,
|
|
22006
22150
|
parchment: PARCHMENT,
|
|
@@ -22008,7 +22152,7 @@ var BUILTIN_THEME_SOURCES2 = {
|
|
|
22008
22152
|
"high-contrast": HIGH_CONTRAST,
|
|
22009
22153
|
rainbow: RAINBOW
|
|
22010
22154
|
};
|
|
22011
|
-
var DEFAULT_THEME_NAME = "archymedes";
|
|
22155
|
+
var DEFAULT_THEME_NAME = "archymedes-blue";
|
|
22012
22156
|
var NAMED_COLORS = {
|
|
22013
22157
|
black: 0,
|
|
22014
22158
|
red: 1,
|
|
@@ -23370,6 +23514,13 @@ var expandables2 = new ExpandableStore;
|
|
|
23370
23514
|
function contentWidth2() {
|
|
23371
23515
|
return screen2?.current.contentWidth ?? (process.stdout.columns ?? 80);
|
|
23372
23516
|
}
|
|
23517
|
+
function wrapNote2(lead, text) {
|
|
23518
|
+
const columns = screen2?.current.columns ?? process.stdout.columns ?? 80;
|
|
23519
|
+
const indent = " ".repeat(visibleWidth(lead));
|
|
23520
|
+
const lines = wrapPlain(text, Math.max(20, columns - indent.length - 1));
|
|
23521
|
+
return lines.map((line, index) => `${index === 0 ? lead : indent}${line}`).join(`
|
|
23522
|
+
`);
|
|
23523
|
+
}
|
|
23373
23524
|
var activity2 = {
|
|
23374
23525
|
awaitingFirstDelta: false,
|
|
23375
23526
|
toolCalls: 0,
|
|
@@ -23664,10 +23815,25 @@ async function questionWithEscape(ask, input = process.stdin) {
|
|
|
23664
23815
|
function isReadlineExit(error) {
|
|
23665
23816
|
return error instanceof Error && (error.name === "AbortError" || /aborted with ctrl\+d|readline was closed/i.test(error.message));
|
|
23666
23817
|
}
|
|
23818
|
+
function maskedEcho(length, cap = 24) {
|
|
23819
|
+
if (length <= 0)
|
|
23820
|
+
return "";
|
|
23821
|
+
return length <= cap ? "•".repeat(length) : `${"•".repeat(cap)} ${length} characters`;
|
|
23822
|
+
}
|
|
23667
23823
|
async function hiddenQuestion(readline, question, signal) {
|
|
23668
|
-
|
|
23824
|
+
const hint = style2.dim("(input hidden) ");
|
|
23825
|
+
process.stdout.write(`${question}${hint}`);
|
|
23669
23826
|
const stdout = process.stdout;
|
|
23670
23827
|
const original = stdout.write;
|
|
23828
|
+
let shown = -1;
|
|
23829
|
+
const redraw = () => setImmediate(() => {
|
|
23830
|
+
const length = readline.line?.length ?? 0;
|
|
23831
|
+
if (length === shown)
|
|
23832
|
+
return;
|
|
23833
|
+
shown = length;
|
|
23834
|
+
original.call(process.stdout, `\r\x1B[K${question}${hint}${style2.dim(maskedEcho(length))}`);
|
|
23835
|
+
});
|
|
23836
|
+
process.stdin.on("keypress", redraw);
|
|
23671
23837
|
try {
|
|
23672
23838
|
stdout.write = () => true;
|
|
23673
23839
|
const answer = await readline.question("", signal ? { signal } : {});
|
|
@@ -23679,6 +23845,7 @@ async function hiddenQuestion(readline, question, signal) {
|
|
|
23679
23845
|
}
|
|
23680
23846
|
return answer;
|
|
23681
23847
|
} finally {
|
|
23848
|
+
process.stdin.off("keypress", redraw);
|
|
23682
23849
|
stdout.write = original;
|
|
23683
23850
|
original.call(process.stdout, `
|
|
23684
23851
|
`);
|
|
@@ -25554,7 +25721,7 @@ import { createInterface as createInterface3 } from "node:readline/promises";
|
|
|
25554
25721
|
// packages/archymedes-cli/package.json
|
|
25555
25722
|
var package_default = {
|
|
25556
25723
|
name: "archymedes-cli",
|
|
25557
|
-
version: "2.
|
|
25724
|
+
version: "2.6.0",
|
|
25558
25725
|
description: "Archymedes CLI — a coding agent that shows its work. Runs against your working tree or an isolated remote sandbox, with guarded approvals, git checkpoints, and exact, measured cost accounting.",
|
|
25559
25726
|
keywords: [
|
|
25560
25727
|
"cli",
|
|
@@ -26344,10 +26511,25 @@ async function questionWithEscape2(ask, input = process.stdin) {
|
|
|
26344
26511
|
function isReadlineExit2(error) {
|
|
26345
26512
|
return error instanceof Error && (error.name === "AbortError" || /aborted with ctrl\+d|readline was closed/i.test(error.message));
|
|
26346
26513
|
}
|
|
26514
|
+
function maskedEcho2(length, cap = 24) {
|
|
26515
|
+
if (length <= 0)
|
|
26516
|
+
return "";
|
|
26517
|
+
return length <= cap ? "•".repeat(length) : `${"•".repeat(cap)} ${length} characters`;
|
|
26518
|
+
}
|
|
26347
26519
|
async function hiddenQuestion2(readline, question, signal) {
|
|
26348
|
-
|
|
26520
|
+
const hint = style2.dim("(input hidden) ");
|
|
26521
|
+
process.stdout.write(`${question}${hint}`);
|
|
26349
26522
|
const stdout = process.stdout;
|
|
26350
26523
|
const original = stdout.write;
|
|
26524
|
+
let shown = -1;
|
|
26525
|
+
const redraw = () => setImmediate(() => {
|
|
26526
|
+
const length = readline.line?.length ?? 0;
|
|
26527
|
+
if (length === shown)
|
|
26528
|
+
return;
|
|
26529
|
+
shown = length;
|
|
26530
|
+
original.call(process.stdout, `\r\x1B[K${question}${hint}${style2.dim(maskedEcho2(length))}`);
|
|
26531
|
+
});
|
|
26532
|
+
process.stdin.on("keypress", redraw);
|
|
26351
26533
|
try {
|
|
26352
26534
|
stdout.write = () => true;
|
|
26353
26535
|
const answer = await readline.question("", signal ? { signal } : {});
|
|
@@ -26359,6 +26541,7 @@ async function hiddenQuestion2(readline, question, signal) {
|
|
|
26359
26541
|
}
|
|
26360
26542
|
return answer;
|
|
26361
26543
|
} finally {
|
|
26544
|
+
process.stdin.off("keypress", redraw);
|
|
26362
26545
|
stdout.write = original;
|
|
26363
26546
|
original.call(process.stdout, `
|
|
26364
26547
|
`);
|
|
@@ -27252,7 +27435,7 @@ ${content}` }
|
|
|
27252
27435
|
let saved;
|
|
27253
27436
|
let autosaved;
|
|
27254
27437
|
const outcome = await withFullScreen(options.screenCapabilities(), options.terminalControls(), async () => {
|
|
27255
|
-
const { runEditorScreen } = await import("./editor-screen-
|
|
27438
|
+
const { runEditorScreen } = await import("./editor-screen-pf252j2r.mjs");
|
|
27256
27439
|
saved = await runEditorScreen({
|
|
27257
27440
|
columns: process.stdout.columns ?? 80,
|
|
27258
27441
|
rows: process.stdout.rows ?? 24,
|
|
@@ -27866,7 +28049,7 @@ async function runTurnPreflight(request, context) {
|
|
|
27866
28049
|
}
|
|
27867
28050
|
try {
|
|
27868
28051
|
const prediction = await state.agent.estimate(request);
|
|
27869
|
-
out2.write(style2.dim(
|
|
28052
|
+
out2.write(style2.dim(`${wrapNote2(" ", state.ledger.formatPrediction(prediction))}
|
|
27870
28053
|
`));
|
|
27871
28054
|
const trackedBalance = currentBalance();
|
|
27872
28055
|
if (trackedBalance && state.prices) {
|
|
@@ -27952,6 +28135,7 @@ function createTurnRunner(context) {
|
|
|
27952
28135
|
state.sessionRequest ??= request;
|
|
27953
28136
|
state.streamedAnswer = false;
|
|
27954
28137
|
if (screen2) {
|
|
28138
|
+
screen2.clearSuggestions();
|
|
27955
28139
|
screen2.parkInTranscript();
|
|
27956
28140
|
out2.write(`${renderUserTurn2(request)}
|
|
27957
28141
|
`);
|
|
@@ -27995,6 +28179,7 @@ function createTurnRunner(context) {
|
|
|
27995
28179
|
}
|
|
27996
28180
|
state.turnActive = true;
|
|
27997
28181
|
state.currentTurnAbort = new AbortController;
|
|
28182
|
+
context.composer?.begin();
|
|
27998
28183
|
recoveryState.last = { request, status: "failed", toolCalls: 0, changedFiles: 0 };
|
|
27999
28184
|
try {
|
|
28000
28185
|
const spendBeforeTurn = sessionSpend() ?? 0;
|
|
@@ -28123,6 +28308,7 @@ ${result.status === "completed" ? asMarkdown(result.summary) : style2.yellow(res
|
|
|
28123
28308
|
} catch (error) {
|
|
28124
28309
|
return await handleTurnFailure(error, request, context);
|
|
28125
28310
|
} finally {
|
|
28311
|
+
context.composer?.end();
|
|
28126
28312
|
state.turnActive = false;
|
|
28127
28313
|
state.currentTurnAbort = undefined;
|
|
28128
28314
|
state.lastTurnEndedAt = Date.now();
|
|
@@ -29827,7 +30013,7 @@ async function dispatchViewCommand(input, context) {
|
|
|
29827
30013
|
if (input === "/workspace" || input === "/panel") {
|
|
29828
30014
|
const activity3 = new PaneActivity;
|
|
29829
30015
|
const outcome = await withFullScreen(screenCapabilities(), terminalControls(), async () => {
|
|
29830
|
-
const { runWorkspace } = await import("./workspace-screen-
|
|
30016
|
+
const { runWorkspace } = await import("./workspace-screen-ntdcgfq9.mjs");
|
|
29831
30017
|
await runWorkspace({
|
|
29832
30018
|
read: () => buildWorkspaceSnapshot({
|
|
29833
30019
|
views: tabs.views(describeTab2),
|
|
@@ -29852,7 +30038,7 @@ async function dispatchViewCommand(input, context) {
|
|
|
29852
30038
|
if (guideCommand) {
|
|
29853
30039
|
await runGuideCommand(guideCommand, {
|
|
29854
30040
|
openScreen: async () => (await withFullScreen(screenCapabilities(), terminalControls(), async () => {
|
|
29855
|
-
const { runGuideScreen } = await import("./guide-screen-
|
|
30041
|
+
const { runGuideScreen } = await import("./guide-screen-9vxsk83x.mjs");
|
|
29856
30042
|
await runGuideScreen({ columns: process.stdout.columns ?? 80, rows: process.stdout.rows ?? 24, palette: palette2 });
|
|
29857
30043
|
})).ok,
|
|
29858
30044
|
fold: (label3, text, hidden) => expandables2.add(label3, text, hidden),
|
|
@@ -29868,7 +30054,7 @@ async function dispatchViewCommand(input, context) {
|
|
|
29868
30054
|
if (input === "/files") {
|
|
29869
30055
|
let picked;
|
|
29870
30056
|
const outcome = await withFullScreen(screenCapabilities(), terminalControls(), async () => {
|
|
29871
|
-
const { runFileScreen } = await import("./file-screen-
|
|
30057
|
+
const { runFileScreen } = await import("./file-screen-1j65f7b4.mjs");
|
|
29872
30058
|
picked = await runFileScreen({
|
|
29873
30059
|
columns: process.stdout.columns ?? 80,
|
|
29874
30060
|
rows: process.stdout.rows ?? 24,
|
|
@@ -33418,7 +33604,25 @@ async function main() {
|
|
|
33418
33604
|
const recoveryState = { last: null };
|
|
33419
33605
|
let lastTurnEndedAt;
|
|
33420
33606
|
const queuedInput = [];
|
|
33607
|
+
const composer = interactive && ttyMode ? createTurnComposer({
|
|
33608
|
+
readline,
|
|
33609
|
+
input: process.stdin,
|
|
33610
|
+
queued: queuedInput,
|
|
33611
|
+
interrupt: () => {
|
|
33612
|
+
readline.emit("SIGINT");
|
|
33613
|
+
},
|
|
33614
|
+
escapeTaken: () => screen instanceof WorkspaceFrame2 && screen.browsing,
|
|
33615
|
+
paint: (draft, queued) => {
|
|
33616
|
+
if (!screen?.pinned)
|
|
33617
|
+
return;
|
|
33618
|
+
const prefix = promptFrame(idleStatusLine()).prefix.replace(glyphs.caret, glyphs.ellipsis);
|
|
33619
|
+
const room = Math.max(8, screen.current.columns - visibleWidth2(prefix) - 2);
|
|
33620
|
+
const shown = draft.length > room ? `\u2026${draft.slice(-(room - 1))}` : draft;
|
|
33621
|
+
screen.renderInput(`${prefix}${shown || style.dim(turnComposerHint(queued))}`);
|
|
33622
|
+
}
|
|
33623
|
+
}) : undefined;
|
|
33421
33624
|
const runTurn = createTurnRunner({
|
|
33625
|
+
composer,
|
|
33422
33626
|
args,
|
|
33423
33627
|
environment,
|
|
33424
33628
|
readline,
|
|
@@ -33546,8 +33750,12 @@ async function main() {
|
|
|
33546
33750
|
screen?.positionInput();
|
|
33547
33751
|
let rawInput;
|
|
33548
33752
|
const queued = queuedInput.shift();
|
|
33549
|
-
if (queued !== undefined) {
|
|
33753
|
+
if (queued !== undefined && (!screen || queued.trimStart().startsWith("/"))) {
|
|
33550
33754
|
out.write(`${renderUserTurn(queued)}
|
|
33755
|
+
`);
|
|
33756
|
+
} else if (queued !== undefined) {
|
|
33757
|
+
screen?.parkInTranscript();
|
|
33758
|
+
out.write(`
|
|
33551
33759
|
`);
|
|
33552
33760
|
}
|
|
33553
33761
|
try {
|
|
@@ -89,6 +89,24 @@ var ARCHYMEDES = `
|
|
|
89
89
|
--border-focus: #e7bb78;
|
|
90
90
|
}
|
|
91
91
|
`;
|
|
92
|
+
var ARCHYMEDES_BLUE = `
|
|
93
|
+
/* Solarized Dark with an Archymedes-blue line — calm, high-contrast hues; the default. */
|
|
94
|
+
@theme archymedes-blue {
|
|
95
|
+
--primary: #268bd2;
|
|
96
|
+
--secondary: #2aa198;
|
|
97
|
+
--accent: #b58900;
|
|
98
|
+
--bg: #002b36;
|
|
99
|
+
--surface: #073642;
|
|
100
|
+
--text: #93a1a1;
|
|
101
|
+
--text-muted: #657b83;
|
|
102
|
+
--success: #859900;
|
|
103
|
+
--warning: #cb4b16;
|
|
104
|
+
--error: #dc322f;
|
|
105
|
+
--border: round;
|
|
106
|
+
--border-color: #586e75;
|
|
107
|
+
--border-focus: #268bd2;
|
|
108
|
+
}
|
|
109
|
+
`;
|
|
92
110
|
var RAINBOW = `
|
|
93
111
|
/* Every hue at once — the opening art and the thinking spinner sweep the full spectrum. */
|
|
94
112
|
@theme rainbow {
|
|
@@ -108,6 +126,7 @@ var RAINBOW = `
|
|
|
108
126
|
}
|
|
109
127
|
`;
|
|
110
128
|
var BUILTIN_THEME_SOURCES = {
|
|
129
|
+
"archymedes-blue": ARCHYMEDES_BLUE,
|
|
111
130
|
archymedes: ARCHYMEDES,
|
|
112
131
|
blueprint: BLUEPRINT,
|
|
113
132
|
parchment: PARCHMENT,
|
|
@@ -115,7 +134,7 @@ var BUILTIN_THEME_SOURCES = {
|
|
|
115
134
|
"high-contrast": HIGH_CONTRAST,
|
|
116
135
|
rainbow: RAINBOW
|
|
117
136
|
};
|
|
118
|
-
var DEFAULT_THEME_NAME = "archymedes";
|
|
137
|
+
var DEFAULT_THEME_NAME = "archymedes-blue";
|
|
119
138
|
var NAMED_COLORS = {
|
|
120
139
|
black: 0,
|
|
121
140
|
red: 1,
|
|
@@ -4,15 +4,15 @@ import {
|
|
|
4
4
|
scrollIndicator,
|
|
5
5
|
scrollPercent,
|
|
6
6
|
sliceToWidth
|
|
7
|
-
} from "./archymedes-
|
|
7
|
+
} from "./archymedes-kn6wtq32.mjs";
|
|
8
8
|
import {
|
|
9
9
|
clip
|
|
10
|
-
} from "./archymedes-
|
|
10
|
+
} from "./archymedes-twanftqk.mjs";
|
|
11
11
|
import {
|
|
12
12
|
ASCII_GLYPHS,
|
|
13
13
|
UNICODE_GLYPHS,
|
|
14
14
|
visibleWidth
|
|
15
|
-
} from "./archymedes-
|
|
15
|
+
} from "./archymedes-s4qcy0q4.mjs";
|
|
16
16
|
|
|
17
17
|
// packages/archymedes-cli/src/render/canvas.ts
|
|
18
18
|
var BRAILLE_DOTS = [
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
GUTTER,
|
|
3
3
|
clip,
|
|
4
4
|
panel
|
|
5
|
-
} from "./archymedes-
|
|
5
|
+
} from "./archymedes-twanftqk.mjs";
|
|
6
6
|
import {
|
|
7
7
|
BOLD,
|
|
8
8
|
DIM,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
paintAll,
|
|
15
15
|
roleCode,
|
|
16
16
|
visibleWidth
|
|
17
|
-
} from "./archymedes-
|
|
17
|
+
} from "./archymedes-s4qcy0q4.mjs";
|
|
18
18
|
|
|
19
19
|
// packages/archymedes-cli/src/render/code-view.ts
|
|
20
20
|
var MAX_DIFF_CELLS = 250000;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
diffLines,
|
|
3
3
|
languageOf
|
|
4
|
-
} from "./archymedes-
|
|
5
|
-
import"./archymedes-
|
|
4
|
+
} from "./archymedes-zvcs68bv.mjs";
|
|
5
|
+
import"./archymedes-twanftqk.mjs";
|
|
6
6
|
import {
|
|
7
7
|
NO_COLOR_PALETTE,
|
|
8
8
|
exitTopTermUIApp
|
|
9
|
-
} from "./archymedes-
|
|
9
|
+
} from "./archymedes-s4qcy0q4.mjs";
|
|
10
10
|
import {
|
|
11
11
|
__require
|
|
12
12
|
} from "./archymedes-x67v3n58.mjs";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
windowStart
|
|
3
|
-
} from "./archymedes-
|
|
3
|
+
} from "./archymedes-1jcn326m.mjs";
|
|
4
4
|
import {
|
|
5
5
|
joinHorizontal,
|
|
6
6
|
padToWidth,
|
|
7
7
|
paginator
|
|
8
|
-
} from "./archymedes-
|
|
8
|
+
} from "./archymedes-kn6wtq32.mjs";
|
|
9
9
|
import {
|
|
10
10
|
NO_COLOR_PALETTE,
|
|
11
11
|
UNICODE_GLYPHS,
|
|
12
12
|
exitTopTermUIApp
|
|
13
|
-
} from "./archymedes-
|
|
13
|
+
} from "./archymedes-s4qcy0q4.mjs";
|
|
14
14
|
import {
|
|
15
15
|
__require
|
|
16
16
|
} from "./archymedes-x67v3n58.mjs";
|
|
@@ -4,20 +4,20 @@ import {
|
|
|
4
4
|
newViewport,
|
|
5
5
|
visibleLines,
|
|
6
6
|
wrapText
|
|
7
|
-
} from "./archymedes-
|
|
7
|
+
} from "./archymedes-086xsz64.mjs";
|
|
8
8
|
import {
|
|
9
9
|
joinHorizontal,
|
|
10
10
|
padToWidth,
|
|
11
11
|
scrollIndicator,
|
|
12
12
|
scrollPercent,
|
|
13
13
|
sliceToWidth
|
|
14
|
-
} from "./archymedes-
|
|
15
|
-
import"./archymedes-
|
|
14
|
+
} from "./archymedes-kn6wtq32.mjs";
|
|
15
|
+
import"./archymedes-twanftqk.mjs";
|
|
16
16
|
import {
|
|
17
17
|
NO_COLOR_PALETTE,
|
|
18
18
|
exitTopTermUIApp,
|
|
19
19
|
visibleWidth
|
|
20
|
-
} from "./archymedes-
|
|
20
|
+
} from "./archymedes-s4qcy0q4.mjs";
|
|
21
21
|
import {
|
|
22
22
|
__require
|
|
23
23
|
} from "./archymedes-x67v3n58.mjs";
|
|
@@ -2,12 +2,12 @@ import {
|
|
|
2
2
|
applyAction,
|
|
3
3
|
composeFrame,
|
|
4
4
|
keyToAction
|
|
5
|
-
} from "./archymedes-
|
|
6
|
-
import"./archymedes-
|
|
7
|
-
import"./archymedes-
|
|
5
|
+
} from "./archymedes-t1jtzkmp.mjs";
|
|
6
|
+
import"./archymedes-kn6wtq32.mjs";
|
|
7
|
+
import"./archymedes-twanftqk.mjs";
|
|
8
8
|
import {
|
|
9
9
|
exitTopTermUIApp
|
|
10
|
-
} from "./archymedes-
|
|
10
|
+
} from "./archymedes-s4qcy0q4.mjs";
|
|
11
11
|
import {
|
|
12
12
|
__require
|
|
13
13
|
} from "./archymedes-x67v3n58.mjs";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "archymedes-cli",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.0",
|
|
4
4
|
"description": "Archymedes CLI — a coding agent that shows its work. Runs against your working tree or an isolated remote sandbox, with guarded approvals, git checkpoints, and exact, measured cost accounting.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|