vibecodingmachine-cli 2026.3.10-1807 → 2026.3.14-1528
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/README.md +85 -85
- package/bin/vibecodingmachine.js +3 -0
- package/package.json +4 -3
- package/scripts/postinstall.js +161 -161
- package/src/commands/auth.js +100 -100
- package/src/commands/auto-direct.js +16 -5
- package/src/commands/auto-execution.js +25 -0
- package/src/commands/auto-requirement-management.js +8 -8
- package/src/commands/auto-status-helpers.js +5 -3
- package/src/commands/computers.js +318 -318
- package/src/commands/feature.js +123 -123
- package/src/commands/locale.js +72 -72
- package/src/commands/repo.js +163 -163
- package/src/commands/setup.js +93 -93
- package/src/commands/sync.js +287 -287
- package/src/index.js +5 -5
- package/src/utils/agent-selector.js +50 -50
- package/src/utils/asset-cleanup.js +60 -60
- package/src/utils/auto-mode-ansi-ui.js +237 -237
- package/src/utils/auto-mode-simple-ui.js +141 -141
- package/src/utils/copy-with-progress.js +167 -167
- package/src/utils/download-with-progress.js +84 -84
- package/src/utils/keyboard-handler.js +153 -153
- package/src/utils/kiro-installer.js +178 -178
- package/src/utils/logger.js +4 -4
- package/src/utils/persistent-header.js +114 -114
- package/src/utils/prompt-helper.js +63 -63
- package/src/utils/provider-checker/agent-checker.js +25 -1
- package/src/utils/provider-checker/agent-runner.js +115 -37
- package/src/utils/provider-checker/agents-manager.js +210 -0
- package/src/utils/provider-checker/provider-validator.js +5 -49
- package/src/utils/provider-checker/requirements-manager.js +86 -65
- package/src/utils/provider-checker/test-requirements.js +25 -17
- package/src/utils/status-card.js +121 -121
- package/src/utils/stdout-interceptor.js +127 -127
- package/src/utils/user-tracking.js +299 -299
|
@@ -1,127 +1,127 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Intercept stdout and stderr to capture console output
|
|
3
|
-
* Allows routing output to custom handlers (like blessed UI) while optionally preserving original output
|
|
4
|
-
*/
|
|
5
|
-
class StdoutInterceptor {
|
|
6
|
-
constructor() {
|
|
7
|
-
this.originalStdoutWrite = null;
|
|
8
|
-
this.originalStderrWrite = null;
|
|
9
|
-
this.outputHandlers = [];
|
|
10
|
-
this.isIntercepting = false;
|
|
11
|
-
this.buffer = '<span style="color: white;">';
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Add a handler that will receive output
|
|
16
|
-
* @param {function} handler - Function that receives output strings
|
|
17
|
-
*/
|
|
18
|
-
addHandler(handler) {
|
|
19
|
-
this.outputHandlers.push(handler);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Remove a handler
|
|
24
|
-
* @param {function} handler - Handler to remove
|
|
25
|
-
*/
|
|
26
|
-
removeHandler(handler) {
|
|
27
|
-
const index = this.outputHandlers.indexOf(handler);
|
|
28
|
-
if (index > -1) {
|
|
29
|
-
this.outputHandlers.splice(index, 1);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Start intercepting stdout/stderr
|
|
35
|
-
* @param {boolean} passthrough - If true, still write to original stdout/stderr
|
|
36
|
-
*/
|
|
37
|
-
start(passthrough = false) {
|
|
38
|
-
if (this.isIntercepting) {
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
this.isIntercepting = true;
|
|
43
|
-
|
|
44
|
-
// Save original write functions
|
|
45
|
-
this.originalStdoutWrite = process.stdout.write;
|
|
46
|
-
this.originalStderrWrite = process.stderr.write;
|
|
47
|
-
|
|
48
|
-
// Intercept stdout
|
|
49
|
-
process.stdout.write = (chunk, encoding, callback) => {
|
|
50
|
-
const str = chunk.toString();
|
|
51
|
-
|
|
52
|
-
// Call all registered handlers
|
|
53
|
-
this.outputHandlers.forEach(handler => {
|
|
54
|
-
try {
|
|
55
|
-
handler(str);
|
|
56
|
-
} catch (error) {
|
|
57
|
-
// Silently ignore handler errors to prevent breaking the interceptor
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
// Optionally pass through to original stdout
|
|
62
|
-
if (passthrough && this.originalStdoutWrite) {
|
|
63
|
-
return this.originalStdoutWrite.call(process.stdout, chunk, encoding, callback);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
// If not passing through, still call the callback if provided
|
|
67
|
-
if (typeof callback === 'function') {
|
|
68
|
-
callback();
|
|
69
|
-
}
|
|
70
|
-
return true;
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
// Intercept stderr
|
|
74
|
-
process.stderr.write = (chunk, encoding, callback) => {
|
|
75
|
-
const str = chunk.toString();
|
|
76
|
-
|
|
77
|
-
// Call all registered handlers
|
|
78
|
-
this.outputHandlers.forEach(handler => {
|
|
79
|
-
try {
|
|
80
|
-
handler(str);
|
|
81
|
-
} catch (error) {
|
|
82
|
-
// Silently ignore handler errors
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
|
|
86
|
-
// Optionally pass through to original stderr
|
|
87
|
-
if (passthrough && this.originalStderrWrite) {
|
|
88
|
-
return this.originalStderrWrite.call(process.stderr, chunk, encoding, callback);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
// If not passing through, still call the callback if provided
|
|
92
|
-
if (typeof callback === 'function') {
|
|
93
|
-
callback();
|
|
94
|
-
}
|
|
95
|
-
return true;
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* Stop intercepting and restore original stdout/stderr
|
|
101
|
-
*/
|
|
102
|
-
stop() {
|
|
103
|
-
if (!this.isIntercepting) {
|
|
104
|
-
return;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
if (this.originalStdoutWrite) {
|
|
108
|
-
process.stdout.write = this.originalStdoutWrite;
|
|
109
|
-
}
|
|
110
|
-
if (this.originalStderrWrite) {
|
|
111
|
-
process.stderr.write = this.originalStderrWrite;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
this.isIntercepting = false;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* Clear all handlers
|
|
119
|
-
*/
|
|
120
|
-
clearHandlers() {
|
|
121
|
-
this.outputHandlers = [];
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
module.exports = {
|
|
126
|
-
StdoutInterceptor
|
|
127
|
-
};
|
|
1
|
+
/**
|
|
2
|
+
* Intercept stdout and stderr to capture console output
|
|
3
|
+
* Allows routing output to custom handlers (like blessed UI) while optionally preserving original output
|
|
4
|
+
*/
|
|
5
|
+
class StdoutInterceptor {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.originalStdoutWrite = null;
|
|
8
|
+
this.originalStderrWrite = null;
|
|
9
|
+
this.outputHandlers = [];
|
|
10
|
+
this.isIntercepting = false;
|
|
11
|
+
this.buffer = '<span style="color: white;">';
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Add a handler that will receive output
|
|
16
|
+
* @param {function} handler - Function that receives output strings
|
|
17
|
+
*/
|
|
18
|
+
addHandler(handler) {
|
|
19
|
+
this.outputHandlers.push(handler);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Remove a handler
|
|
24
|
+
* @param {function} handler - Handler to remove
|
|
25
|
+
*/
|
|
26
|
+
removeHandler(handler) {
|
|
27
|
+
const index = this.outputHandlers.indexOf(handler);
|
|
28
|
+
if (index > -1) {
|
|
29
|
+
this.outputHandlers.splice(index, 1);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Start intercepting stdout/stderr
|
|
35
|
+
* @param {boolean} passthrough - If true, still write to original stdout/stderr
|
|
36
|
+
*/
|
|
37
|
+
start(passthrough = false) {
|
|
38
|
+
if (this.isIntercepting) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
this.isIntercepting = true;
|
|
43
|
+
|
|
44
|
+
// Save original write functions
|
|
45
|
+
this.originalStdoutWrite = process.stdout.write;
|
|
46
|
+
this.originalStderrWrite = process.stderr.write;
|
|
47
|
+
|
|
48
|
+
// Intercept stdout
|
|
49
|
+
process.stdout.write = (chunk, encoding, callback) => {
|
|
50
|
+
const str = chunk.toString();
|
|
51
|
+
|
|
52
|
+
// Call all registered handlers
|
|
53
|
+
this.outputHandlers.forEach(handler => {
|
|
54
|
+
try {
|
|
55
|
+
handler(str);
|
|
56
|
+
} catch (error) {
|
|
57
|
+
// Silently ignore handler errors to prevent breaking the interceptor
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
// Optionally pass through to original stdout
|
|
62
|
+
if (passthrough && this.originalStdoutWrite) {
|
|
63
|
+
return this.originalStdoutWrite.call(process.stdout, chunk, encoding, callback);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// If not passing through, still call the callback if provided
|
|
67
|
+
if (typeof callback === 'function') {
|
|
68
|
+
callback();
|
|
69
|
+
}
|
|
70
|
+
return true;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
// Intercept stderr
|
|
74
|
+
process.stderr.write = (chunk, encoding, callback) => {
|
|
75
|
+
const str = chunk.toString();
|
|
76
|
+
|
|
77
|
+
// Call all registered handlers
|
|
78
|
+
this.outputHandlers.forEach(handler => {
|
|
79
|
+
try {
|
|
80
|
+
handler(str);
|
|
81
|
+
} catch (error) {
|
|
82
|
+
// Silently ignore handler errors
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
// Optionally pass through to original stderr
|
|
87
|
+
if (passthrough && this.originalStderrWrite) {
|
|
88
|
+
return this.originalStderrWrite.call(process.stderr, chunk, encoding, callback);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// If not passing through, still call the callback if provided
|
|
92
|
+
if (typeof callback === 'function') {
|
|
93
|
+
callback();
|
|
94
|
+
}
|
|
95
|
+
return true;
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Stop intercepting and restore original stdout/stderr
|
|
101
|
+
*/
|
|
102
|
+
stop() {
|
|
103
|
+
if (!this.isIntercepting) {
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
if (this.originalStdoutWrite) {
|
|
108
|
+
process.stdout.write = this.originalStdoutWrite;
|
|
109
|
+
}
|
|
110
|
+
if (this.originalStderrWrite) {
|
|
111
|
+
process.stderr.write = this.originalStderrWrite;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
this.isIntercepting = false;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Clear all handlers
|
|
119
|
+
*/
|
|
120
|
+
clearHandlers() {
|
|
121
|
+
this.outputHandlers = [];
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
module.exports = {
|
|
126
|
+
StdoutInterceptor
|
|
127
|
+
};
|