@compilr-dev/cli 0.6.1 → 0.6.3
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/CHANGELOG.md +104 -0
- package/README.md +12 -0
- package/dist/commands-v2/handlers/core.js +2 -2
- package/dist/commands-v2/handlers/index.d.ts +1 -0
- package/dist/commands-v2/handlers/index.js +5 -2
- package/dist/commands-v2/handlers/perf.d.ts +9 -0
- package/dist/commands-v2/handlers/perf.js +66 -0
- package/dist/commands-v2/handlers/project.js +2 -3
- package/dist/compilr-diff-companion.vsix +0 -0
- package/dist/index.js +14 -8
- package/dist/repl-v2.js +5 -1
- package/dist/session/project-session-manager.js +1 -1
- package/dist/slash-autocomplete.js +18 -16
- package/dist/tabbed-menu.js +8 -7
- package/dist/ui/base/overlay-base.js +2 -1
- package/dist/ui/overlay/impl/artifact-detail-overlay-v2.js +12 -7
- package/dist/ui/overlay/impl/config-overlay-v2.js +2 -2
- package/dist/ui/overlay/impl/document-detail-overlay-v2.js +12 -8
- package/dist/ui/overlay/impl/pending-overlay-v2.js +4 -1
- package/dist/ui/overlay-manager.js +7 -6
- package/dist/ui/terminal-render-item.js +2 -1
- package/dist/ui/terminal-renderer.js +1 -2
- package/dist/ui/terminal-ui.js +6 -4
- package/dist/ui/terminal.d.ts +9 -0
- package/dist/ui/terminal.js +28 -15
- package/dist/utils/update-checker.d.ts +6 -1
- package/dist/utils/update-checker.js +16 -1
- package/package.json +5 -4
- package/dist/.tsbuildinfo.app +0 -1
- package/dist/.tsbuildinfo.data +0 -1
- package/dist/.tsbuildinfo.domain +0 -1
- package/dist/.tsbuildinfo.foundation +0 -1
- package/dist/guide/guide-content.d.ts +0 -23
- package/dist/guide/guide-content.js +0 -196
- package/dist/multi-agent/activity.d.ts +0 -21
- package/dist/multi-agent/activity.js +0 -34
- package/dist/multi-agent/agent-selection.d.ts +0 -55
- package/dist/multi-agent/agent-selection.js +0 -90
- package/dist/multi-agent/artifacts.d.ts +0 -197
- package/dist/multi-agent/artifacts.js +0 -379
- package/dist/multi-agent/collision-utils.d.ts +0 -16
- package/dist/multi-agent/collision-utils.js +0 -28
- package/dist/multi-agent/context-resolver.d.ts +0 -97
- package/dist/multi-agent/context-resolver.js +0 -316
- package/dist/multi-agent/mention-parser.d.ts +0 -64
- package/dist/multi-agent/mention-parser.js +0 -146
- package/dist/multi-agent/shared-context.d.ts +0 -293
- package/dist/multi-agent/shared-context.js +0 -671
- package/dist/multi-agent/skill-requirements.d.ts +0 -66
- package/dist/multi-agent/skill-requirements.js +0 -178
- package/dist/multi-agent/task-assignment.d.ts +0 -69
- package/dist/multi-agent/task-assignment.js +0 -123
- package/dist/multi-agent/task-suggestion.d.ts +0 -31
- package/dist/multi-agent/task-suggestion.js +0 -72
- package/dist/multi-agent/team-agent.d.ts +0 -201
- package/dist/multi-agent/team-agent.js +0 -488
- package/dist/multi-agent/team.d.ts +0 -286
- package/dist/multi-agent/team.js +0 -610
- package/dist/multi-agent/tool-config.d.ts +0 -110
- package/dist/multi-agent/tool-config.js +0 -661
- package/dist/multi-agent/types.d.ts +0 -211
- package/dist/multi-agent/types.js +0 -617
- package/dist/tools/guide-tool.d.ts +0 -12
- package/dist/tools/guide-tool.js +0 -59
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* clear/render and console output.
|
|
7
7
|
*/
|
|
8
8
|
import * as terminal from './terminal.js';
|
|
9
|
+
import { ttyWrite } from './terminal.js';
|
|
9
10
|
import { getVisibleLength } from './line-utils.js';
|
|
10
11
|
import { getStyles } from '../themes/index.js';
|
|
11
12
|
export class OverlayManager {
|
|
@@ -89,7 +90,7 @@ export class OverlayManager {
|
|
|
89
90
|
// ===========================================================================
|
|
90
91
|
enterFullscreenOverlayMode() {
|
|
91
92
|
this.host.clearFooter();
|
|
92
|
-
|
|
93
|
+
ttyWrite('\x1b[2J\x1b[H');
|
|
93
94
|
this.renderState = { lineCount: 0, maxLineCount: 0 };
|
|
94
95
|
}
|
|
95
96
|
enterInlineOverlayMode() {
|
|
@@ -127,9 +128,9 @@ export class OverlayManager {
|
|
|
127
128
|
clearOverlayRender() {
|
|
128
129
|
const linesToClear = this.renderState.maxLineCount;
|
|
129
130
|
if (linesToClear > 0) {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
131
|
+
ttyWrite(`\x1b[${String(linesToClear)}A`);
|
|
132
|
+
ttyWrite('\r');
|
|
133
|
+
ttyWrite('\x1b[J');
|
|
133
134
|
}
|
|
134
135
|
}
|
|
135
136
|
renderOverlay() {
|
|
@@ -179,9 +180,9 @@ export class OverlayManager {
|
|
|
179
180
|
const { line, column } = content.cursorPosition;
|
|
180
181
|
const linesFromEnd = paddedLines.length - 1 - line;
|
|
181
182
|
if (linesFromEnd > 0) {
|
|
182
|
-
|
|
183
|
+
ttyWrite(`\x1b[${String(linesFromEnd)}A`);
|
|
183
184
|
}
|
|
184
|
-
|
|
185
|
+
ttyWrite(`\x1b[${String(column)}G`);
|
|
185
186
|
}
|
|
186
187
|
terminal.showCursor();
|
|
187
188
|
}
|
|
@@ -229,7 +229,8 @@ export function renderItem(item, config) {
|
|
|
229
229
|
// If we add items that don't add trailing blanks, or if the rendering
|
|
230
230
|
// order changes, this could cause visual artifacts (overwriting content).
|
|
231
231
|
// If issues arise, consider tracking the last printed item type instead.
|
|
232
|
-
process.stdout.
|
|
232
|
+
if (process.stdout.isTTY)
|
|
233
|
+
process.stdout.write('\x1b[1A'); // Move up one line
|
|
233
234
|
}
|
|
234
235
|
// Show interrupted line with mascot
|
|
235
236
|
const suggestion = item.suggestion ?? 'What should I do instead?';
|
|
@@ -407,8 +407,7 @@ export class TerminalRenderer extends EventEmitter {
|
|
|
407
407
|
finally {
|
|
408
408
|
this.isRendering = false;
|
|
409
409
|
// Check if another render was requested during this one
|
|
410
|
-
//
|
|
411
|
-
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
410
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- renderPending can be flipped by callbacks during render
|
|
412
411
|
if (this.renderPending) {
|
|
413
412
|
this.requestRender();
|
|
414
413
|
}
|
package/dist/ui/terminal-ui.js
CHANGED
|
@@ -542,8 +542,9 @@ export class TerminalUI extends EventEmitter {
|
|
|
542
542
|
*/
|
|
543
543
|
reRenderConversationWithVerbosity(verbosity) {
|
|
544
544
|
const s = getStyles();
|
|
545
|
-
// Clear screen and scrollback buffer
|
|
546
|
-
process.stdout.
|
|
545
|
+
// Clear screen and scrollback buffer (TTY-only — keep piped output clean)
|
|
546
|
+
if (process.stdout.isTTY)
|
|
547
|
+
process.stdout.write('\x1b[2J\x1b[3J\x1b[H');
|
|
547
548
|
// Reset footer state
|
|
548
549
|
this.footer.resetRenderState();
|
|
549
550
|
// Show mode indicator at top for temp modes
|
|
@@ -641,8 +642,9 @@ export class TerminalUI extends EventEmitter {
|
|
|
641
642
|
* Called when verbose mode changes.
|
|
642
643
|
*/
|
|
643
644
|
reRenderConversation() {
|
|
644
|
-
// Clear screen AND scrollback buffer, then move to home
|
|
645
|
-
process.stdout.
|
|
645
|
+
// Clear screen AND scrollback buffer, then move to home (TTY-only — keep piped output clean)
|
|
646
|
+
if (process.stdout.isTTY)
|
|
647
|
+
process.stdout.write('\x1b[2J\x1b[3J\x1b[H');
|
|
646
648
|
// Reset footer state since we cleared everything
|
|
647
649
|
this.footer.resetRenderState();
|
|
648
650
|
// Show filter indicator if active
|
package/dist/ui/terminal.d.ts
CHANGED
|
@@ -3,7 +3,16 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Low-level terminal operations using ANSI escape codes.
|
|
5
5
|
* Pure functions with no state.
|
|
6
|
+
*
|
|
7
|
+
* All output is gated through `ttyWrite()` so that pipes and redirected
|
|
8
|
+
* streams don't get raw escape sequences. `compilr | tee output.log`
|
|
9
|
+
* should produce a clean log, not a binary mess.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Write a control sequence only when stdout is an interactive TTY.
|
|
13
|
+
* No-op when output is piped or redirected — keeps log files clean.
|
|
6
14
|
*/
|
|
15
|
+
export declare function ttyWrite(seq: string): void;
|
|
7
16
|
/**
|
|
8
17
|
* Set terminal window title
|
|
9
18
|
*/
|
package/dist/ui/terminal.js
CHANGED
|
@@ -3,7 +3,20 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Low-level terminal operations using ANSI escape codes.
|
|
5
5
|
* Pure functions with no state.
|
|
6
|
+
*
|
|
7
|
+
* All output is gated through `ttyWrite()` so that pipes and redirected
|
|
8
|
+
* streams don't get raw escape sequences. `compilr | tee output.log`
|
|
9
|
+
* should produce a clean log, not a binary mess.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Write a control sequence only when stdout is an interactive TTY.
|
|
13
|
+
* No-op when output is piped or redirected — keeps log files clean.
|
|
6
14
|
*/
|
|
15
|
+
export function ttyWrite(seq) {
|
|
16
|
+
if (process.stdout.isTTY) {
|
|
17
|
+
process.stdout.write(seq);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
7
20
|
// =============================================================================
|
|
8
21
|
// Terminal Title
|
|
9
22
|
// =============================================================================
|
|
@@ -11,7 +24,7 @@
|
|
|
11
24
|
* Set terminal window title
|
|
12
25
|
*/
|
|
13
26
|
export function setTitle(title) {
|
|
14
|
-
|
|
27
|
+
ttyWrite(`\x1b]0;${title}\x07`);
|
|
15
28
|
}
|
|
16
29
|
// =============================================================================
|
|
17
30
|
// Terminal Dimensions
|
|
@@ -36,7 +49,7 @@ export function getTerminalHeight() {
|
|
|
36
49
|
*/
|
|
37
50
|
export function moveCursorUp(n) {
|
|
38
51
|
if (n > 0) {
|
|
39
|
-
|
|
52
|
+
ttyWrite(`\x1b[${String(n)}A`);
|
|
40
53
|
}
|
|
41
54
|
}
|
|
42
55
|
/**
|
|
@@ -44,32 +57,32 @@ export function moveCursorUp(n) {
|
|
|
44
57
|
*/
|
|
45
58
|
export function moveCursorDown(n) {
|
|
46
59
|
if (n > 0) {
|
|
47
|
-
|
|
60
|
+
ttyWrite(`\x1b[${String(n)}B`);
|
|
48
61
|
}
|
|
49
62
|
}
|
|
50
63
|
/**
|
|
51
64
|
* Move cursor to column (1-indexed)
|
|
52
65
|
*/
|
|
53
66
|
export function moveCursorToColumn(col) {
|
|
54
|
-
|
|
67
|
+
ttyWrite(`\x1b[${String(col)}G`);
|
|
55
68
|
}
|
|
56
69
|
/**
|
|
57
70
|
* Move cursor to beginning of line
|
|
58
71
|
*/
|
|
59
72
|
export function moveCursorToLineStart() {
|
|
60
|
-
|
|
73
|
+
ttyWrite('\r');
|
|
61
74
|
}
|
|
62
75
|
/**
|
|
63
76
|
* Save cursor position
|
|
64
77
|
*/
|
|
65
78
|
export function saveCursor() {
|
|
66
|
-
|
|
79
|
+
ttyWrite('\x1b[s');
|
|
67
80
|
}
|
|
68
81
|
/**
|
|
69
82
|
* Restore cursor position
|
|
70
83
|
*/
|
|
71
84
|
export function restoreCursor() {
|
|
72
|
-
|
|
85
|
+
ttyWrite('\x1b[u');
|
|
73
86
|
}
|
|
74
87
|
// =============================================================================
|
|
75
88
|
// Cursor Visibility
|
|
@@ -78,13 +91,13 @@ export function restoreCursor() {
|
|
|
78
91
|
* Hide cursor
|
|
79
92
|
*/
|
|
80
93
|
export function hideCursor() {
|
|
81
|
-
|
|
94
|
+
ttyWrite('\x1b[?25l');
|
|
82
95
|
}
|
|
83
96
|
/**
|
|
84
97
|
* Show cursor
|
|
85
98
|
*/
|
|
86
99
|
export function showCursor() {
|
|
87
|
-
|
|
100
|
+
ttyWrite('\x1b[?25h');
|
|
88
101
|
}
|
|
89
102
|
// =============================================================================
|
|
90
103
|
// Clearing
|
|
@@ -93,13 +106,13 @@ export function showCursor() {
|
|
|
93
106
|
* Clear current line
|
|
94
107
|
*/
|
|
95
108
|
export function clearLine() {
|
|
96
|
-
|
|
109
|
+
ttyWrite('\r\x1b[K');
|
|
97
110
|
}
|
|
98
111
|
/**
|
|
99
112
|
* Clear from cursor to end of screen
|
|
100
113
|
*/
|
|
101
114
|
export function clearToEndOfScreen() {
|
|
102
|
-
|
|
115
|
+
ttyWrite('\x1b[J');
|
|
103
116
|
}
|
|
104
117
|
/**
|
|
105
118
|
* Clear N lines above cursor (including current line)
|
|
@@ -118,7 +131,7 @@ export function clearLinesAbove(count) {
|
|
|
118
131
|
* Clear entire screen
|
|
119
132
|
*/
|
|
120
133
|
export function clearScreen() {
|
|
121
|
-
|
|
134
|
+
ttyWrite('\x1b[2J\x1b[H');
|
|
122
135
|
}
|
|
123
136
|
/**
|
|
124
137
|
* Enter alternate screen buffer.
|
|
@@ -131,14 +144,14 @@ export function enterAlternateScreen() {
|
|
|
131
144
|
// \x1b[?1000l - disable mouse click tracking
|
|
132
145
|
// \x1b[?1002l - disable mouse drag tracking
|
|
133
146
|
// \x1b[?1003l - disable all mouse tracking
|
|
134
|
-
|
|
147
|
+
ttyWrite('\x1b[?1049h\x1b[?1000l\x1b[?1002l\x1b[?1003l');
|
|
135
148
|
}
|
|
136
149
|
/**
|
|
137
150
|
* Leave alternate screen buffer.
|
|
138
151
|
* Returns to main screen (previous content restored).
|
|
139
152
|
*/
|
|
140
153
|
export function leaveAlternateScreen() {
|
|
141
|
-
|
|
154
|
+
ttyWrite('\x1b[?1049l');
|
|
142
155
|
}
|
|
143
156
|
// =============================================================================
|
|
144
157
|
// Line Calculations
|
|
@@ -305,5 +318,5 @@ export function writeLine(text = '') {
|
|
|
305
318
|
* Ring terminal bell
|
|
306
319
|
*/
|
|
307
320
|
export function bell() {
|
|
308
|
-
|
|
321
|
+
ttyWrite('\x07');
|
|
309
322
|
}
|
|
@@ -11,7 +11,12 @@ export interface UpdateInfo {
|
|
|
11
11
|
npmUrl: string;
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
|
-
* Check npm registry for the latest version
|
|
14
|
+
* Check npm registry for the latest version.
|
|
15
|
+
*
|
|
16
|
+
* Honored opt-outs (any of these returns "no update available" without a network call):
|
|
17
|
+
* - COMPILR_NO_UPDATE_CHECK=1 (project-specific)
|
|
18
|
+
* - NO_UPDATE_NOTIFIER=1 (de-facto standard from update-notifier)
|
|
19
|
+
* - CI=true (don't nag in CI environments)
|
|
15
20
|
*/
|
|
16
21
|
export declare function checkForUpdates(): Promise<UpdateInfo>;
|
|
17
22
|
/**
|
|
@@ -5,10 +5,25 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { VERSION } from './version.js';
|
|
7
7
|
/**
|
|
8
|
-
* Check npm registry for the latest version
|
|
8
|
+
* Check npm registry for the latest version.
|
|
9
|
+
*
|
|
10
|
+
* Honored opt-outs (any of these returns "no update available" without a network call):
|
|
11
|
+
* - COMPILR_NO_UPDATE_CHECK=1 (project-specific)
|
|
12
|
+
* - NO_UPDATE_NOTIFIER=1 (de-facto standard from update-notifier)
|
|
13
|
+
* - CI=true (don't nag in CI environments)
|
|
9
14
|
*/
|
|
10
15
|
export async function checkForUpdates() {
|
|
11
16
|
const packageName = '@compilr-dev/cli';
|
|
17
|
+
// Respect well-known opt-outs and CI environments — never make a network call
|
|
18
|
+
if (process.env.COMPILR_NO_UPDATE_CHECK || process.env.NO_UPDATE_NOTIFIER || process.env.CI) {
|
|
19
|
+
return {
|
|
20
|
+
currentVersion: VERSION,
|
|
21
|
+
latestVersion: VERSION,
|
|
22
|
+
updateAvailable: false,
|
|
23
|
+
releaseUrl: '',
|
|
24
|
+
npmUrl: `https://www.npmjs.com/package/${packageName}`,
|
|
25
|
+
};
|
|
26
|
+
}
|
|
12
27
|
const registryUrl = `https://registry.npmjs.org/${packageName}/latest`;
|
|
13
28
|
try {
|
|
14
29
|
const response = await fetch(registryUrl, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@compilr-dev/cli",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.3",
|
|
4
4
|
"description": "AI-powered coding assistant CLI using @compilr-dev/agents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -47,10 +47,11 @@
|
|
|
47
47
|
"files": [
|
|
48
48
|
"dist",
|
|
49
49
|
"README.md",
|
|
50
|
-
"LICENSE"
|
|
50
|
+
"LICENSE",
|
|
51
|
+
"CHANGELOG.md"
|
|
51
52
|
],
|
|
52
53
|
"engines": {
|
|
53
|
-
"node": ">=
|
|
54
|
+
"node": ">=20.0.0"
|
|
54
55
|
},
|
|
55
56
|
"dependencies": {
|
|
56
57
|
"@anthropic-ai/sdk": "^0.74.0",
|
|
@@ -68,7 +69,7 @@
|
|
|
68
69
|
"marked": "^15.0.12",
|
|
69
70
|
"marked-terminal": "^7.3.0",
|
|
70
71
|
"picocolors": "^1.1.1",
|
|
71
|
-
"uuid": "^
|
|
72
|
+
"uuid": "^14.0.0"
|
|
72
73
|
},
|
|
73
74
|
"overrides": {
|
|
74
75
|
"minimatch": ">=10.2.1",
|