4runr-os 2.1.46 → 2.1.49
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/USER-PRIVACY.md +81 -0
- package/dist/version-check.js +4 -4
- package/dist/version-check.js.map +1 -1
- package/mk3-tui/src/app.rs +2 -1
- package/mk3-tui/src/ui/layout.rs +24 -6
- package/package.json +4 -2
- package/scripts/cleanup-build-artifacts.js +101 -0
- package/scripts/postinstall-mk3.js +13 -0
- package/scripts/setup.js +17 -25
package/USER-PRIVACY.md
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# User Privacy & System Cleanliness
|
|
2
|
+
|
|
3
|
+
## What We Install
|
|
4
|
+
|
|
5
|
+
4runr-os **only installs what's necessary** and **respects your system**:
|
|
6
|
+
|
|
7
|
+
### ✅ What Gets Installed (Only if Missing)
|
|
8
|
+
|
|
9
|
+
1. **Rust** (optional)
|
|
10
|
+
- Only if not already installed
|
|
11
|
+
- **User must install manually** (we provide instructions, don't auto-install)
|
|
12
|
+
- Required for building mk3-tui binary
|
|
13
|
+
|
|
14
|
+
2. **MinGW/MSYS2** (Windows only, optional)
|
|
15
|
+
- Only if MSVC linker not available
|
|
16
|
+
- Only if not already installed
|
|
17
|
+
- Used for Rust GNU toolchain on Windows
|
|
18
|
+
|
|
19
|
+
3. **mk3-tui Binary**
|
|
20
|
+
- Built from source included in package
|
|
21
|
+
- Only if pre-built binary not available
|
|
22
|
+
- Stored in package directory (not system directories)
|
|
23
|
+
|
|
24
|
+
### ✅ What We Never Do
|
|
25
|
+
|
|
26
|
+
- ❌ Never install system-wide software without user consent
|
|
27
|
+
- ❌ Never modify system PATH permanently without asking
|
|
28
|
+
- ❌ Never download large files unnecessarily
|
|
29
|
+
- ❌ Never leave temporary files on your system
|
|
30
|
+
- ❌ Never modify registry or system settings
|
|
31
|
+
- ❌ Never auto-install Rust (user must do it manually)
|
|
32
|
+
|
|
33
|
+
### 🧹 Automatic Cleanup
|
|
34
|
+
|
|
35
|
+
The package automatically cleans up:
|
|
36
|
+
|
|
37
|
+
1. **Build Artifacts** (after building)
|
|
38
|
+
- Removes Rust debug builds (~200-300MB saved)
|
|
39
|
+
- Removes incremental compilation artifacts
|
|
40
|
+
- Keeps only the final release binary
|
|
41
|
+
|
|
42
|
+
2. **Old Versions** (during updates)
|
|
43
|
+
- Removes old npm package versions (keeps last 2)
|
|
44
|
+
- Prevents disk space overflow from version history
|
|
45
|
+
|
|
46
|
+
3. **No Temporary Files**
|
|
47
|
+
- All operations use existing directories
|
|
48
|
+
- No temp files created or left behind
|
|
49
|
+
|
|
50
|
+
### 📦 Package Contents
|
|
51
|
+
|
|
52
|
+
The npm package includes:
|
|
53
|
+
- ✅ Compiled TypeScript (dist/)
|
|
54
|
+
- ✅ Rust source code (for building if needed)
|
|
55
|
+
- ✅ Setup scripts (for one-time setup)
|
|
56
|
+
- ❌ Build artifacts (excluded via .npmignore)
|
|
57
|
+
- ❌ Source TypeScript (excluded - only dist/ included)
|
|
58
|
+
- ❌ Development files
|
|
59
|
+
|
|
60
|
+
### 🔒 What We Touch
|
|
61
|
+
|
|
62
|
+
**User's System:**
|
|
63
|
+
- ✅ npm global install directory (standard npm location)
|
|
64
|
+
- ✅ PATH environment variable (session-only, unless user approves permanent)
|
|
65
|
+
- ❌ System directories (we never touch system files)
|
|
66
|
+
- ❌ Registry/configuration files (Windows)
|
|
67
|
+
- ❌ User's home directory (except standard npm locations)
|
|
68
|
+
|
|
69
|
+
**User's Data:**
|
|
70
|
+
- ✅ Configuration file: `~/.4runr/config.json` (for user preferences)
|
|
71
|
+
- ❌ User's files or documents (never accessed)
|
|
72
|
+
- ❌ Browser data or history (never accessed)
|
|
73
|
+
- ❌ Personal information (never collected)
|
|
74
|
+
|
|
75
|
+
### 🛡️ Privacy Guarantee
|
|
76
|
+
|
|
77
|
+
- No telemetry or tracking
|
|
78
|
+
- No data collection
|
|
79
|
+
- No external network calls (except npm registry for updates)
|
|
80
|
+
- All operations are local
|
|
81
|
+
|
package/dist/version-check.js
CHANGED
|
@@ -93,11 +93,11 @@ export function promptUpdate(current, latest, packageName = '4runr-os') {
|
|
|
93
93
|
function cleanupOldVersions(packageName) {
|
|
94
94
|
try {
|
|
95
95
|
// Clean npm cache for this package (keeps cache size down)
|
|
96
|
+
// Only clean cache for this specific package, not entire cache
|
|
96
97
|
try {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
});
|
|
98
|
+
// npm cache clean doesn't work per-package, so we skip this
|
|
99
|
+
// to avoid clearing user's entire npm cache
|
|
100
|
+
// Users can run `npm cache clean --force` manually if needed
|
|
101
101
|
}
|
|
102
102
|
catch {
|
|
103
103
|
// Ignore cache clean errors - not critical
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version-check.js","sourceRoot":"","sources":["../src/version-check.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAE/B,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAQtC;;GAEG;AACH,SAAS,iBAAiB;IACxB,IAAI,CAAC;QACH,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC;QAC/D,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC;QACtE,OAAO,WAAW,CAAC,OAAO,IAAI,OAAO,CAAC;IACxC,C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,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,iDAAiD,CAAC,CAAC;YACxE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,iCAAiC,WAAW,WAAW,CAAC,CAAC;YAC9E,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,uCAAuC,WAAW,aAAa,CAAC,CAAC;QACxF,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,6BAA6B,QAAQ,IAAI,CAAC,CAAC;YAChE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,0CAA0C,WAAW,aAAa,CAAC,CAAC;QAC3F,CAAC;QACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,gBAAgB;IACnC,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,cAAsB,UAAU,EAAE,oBAA6B,IAAI;IACtG,oEAAoE;IACpE,IAAI,OAAO,CAAC,GAAG,CAAC,eAAe,KAAK,GAAG,EAAE,CAAC;QACxC,OAAO;IACT,CAAC;IAED,IAAI,CAAC;QACH,MAAM,WAAW,GAAG,MAAM,eAAe,CAAC,WAAW,CAAC,CAAC;QAEvD,IAAI,WAAW,CAAC,WAAW,EAAE,CAAC;YAC5B,IAAI,iBAAiB,EAAE,CAAC;gBACtB,oDAAoD;gBACpD,MAAM,UAAU,CAAC,WAAW,CAAC,CAAC;YAChC,CAAC;iBAAM,CAAC;gBACN,YAAY,CAAC,WAAW,CAAC,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;YACrE,CAAC;QACH,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,6DAA6D;IAC/D,CAAC;AACH,CAAC"}
|
package/mk3-tui/src/app.rs
CHANGED
|
@@ -282,8 +282,9 @@ impl App {
|
|
|
282
282
|
match key.code {
|
|
283
283
|
// Typing - ALL characters go to command input (with debounce)
|
|
284
284
|
KeyCode::Char(c) => {
|
|
285
|
-
|
|
285
|
+
// CRITICAL: Always set focused when typing to show cursor
|
|
286
286
|
self.state.command_focused = true;
|
|
287
|
+
self.state.command_input.push(c);
|
|
287
288
|
// Debounce: schedule render after delay
|
|
288
289
|
self.input_debounce = Some(Instant::now());
|
|
289
290
|
// Don't render immediately - let debounce handle it
|
package/mk3-tui/src/ui/layout.rs
CHANGED
|
@@ -40,6 +40,9 @@ fn render_separator(f: &mut Frame, area: Rect) {
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
pub fn render(f: &mut Frame, state: &AppState) {
|
|
43
|
+
// CRITICAL: Hide cursor by default at start of each render
|
|
44
|
+
// Only show it when explicitly set in render_command_box
|
|
45
|
+
// This prevents cursor from appearing in wrong places (like operations log)
|
|
43
46
|
let full_area = f.size();
|
|
44
47
|
f.render_widget(Clear, full_area);
|
|
45
48
|
|
|
@@ -598,13 +601,14 @@ fn render_command_box(f: &mut Frame, area: Rect, state: &AppState) {
|
|
|
598
601
|
// Just use spacing for visual separation
|
|
599
602
|
|
|
600
603
|
// Command prompt - Use ASCII > instead of Unicode ▶
|
|
601
|
-
|
|
604
|
+
// Note: We show a visual cursor character "_" in the text, but the real cursor
|
|
605
|
+
// position is handled separately below
|
|
602
606
|
let prompt_line = Line::from(vec![
|
|
603
607
|
Span::styled("> ", Style::default().fg(BRAND_PURPLE)), // ASCII > instead of Unicode ▶
|
|
604
608
|
Span::styled("4runr", Style::default().fg(BRAND_VIOLET).add_modifier(Modifier::BOLD)),
|
|
605
609
|
Span::styled(": ", Style::default().fg(TEXT_DIM)), // ASCII : instead of Unicode ›
|
|
606
610
|
Span::styled(&state.command_input, Style::default().fg(TEXT_PRIMARY)),
|
|
607
|
-
Span::styled(
|
|
611
|
+
Span::styled("_", Style::default().fg(CYBER_CYAN)), // Visual cursor indicator
|
|
608
612
|
]);
|
|
609
613
|
f.render_widget(Paragraph::new(prompt_line), Rect {
|
|
610
614
|
x: bar_area.x, y: bar_area.y + 1, width: bar_area.width, height: 1
|
|
@@ -623,12 +627,26 @@ fn render_command_box(f: &mut Frame, area: Rect, state: &AppState) {
|
|
|
623
627
|
x: bar_area.x, y: bar_area.y + 2, width: bar_area.width, height: 1
|
|
624
628
|
});
|
|
625
629
|
|
|
626
|
-
//
|
|
627
|
-
|
|
628
|
-
|
|
630
|
+
// CRITICAL FIX: Only set cursor position when user is actively typing
|
|
631
|
+
// This prevents cursor from appearing in wrong places (operations log, etc.)
|
|
632
|
+
// IMPORTANT: In Ratatui, set_cursor() shows the cursor, so we only call it here
|
|
633
|
+
if state.command_focused || !state.command_input.is_empty() {
|
|
634
|
+
// Calculate correct cursor position: "> 4runr: " = 9 chars
|
|
635
|
+
let prompt_len = 9u16; // "> 4runr: " = 9 characters ("> " + "4runr" + ": " = 2+5+2 = 9)
|
|
636
|
+
let input_len = state.command_input.len() as u16;
|
|
637
|
+
let cursor_x = bar_area.x + prompt_len + input_len;
|
|
629
638
|
let cursor_y = bar_area.y + 1;
|
|
630
|
-
|
|
639
|
+
|
|
640
|
+
// Ensure cursor doesn't go beyond the safe area (respects 15% margin)
|
|
641
|
+
let max_x = (bar_area.x + bar_area.width).saturating_sub(1);
|
|
642
|
+
let final_x = cursor_x.min(max_x);
|
|
643
|
+
|
|
644
|
+
// Only set cursor if we're actually at the input field
|
|
645
|
+
// This prevents cursor from appearing elsewhere (operations log, etc.)
|
|
646
|
+
f.set_cursor(final_x, cursor_y);
|
|
631
647
|
}
|
|
648
|
+
// IMPORTANT: If not focused and no input, we don't call set_cursor()
|
|
649
|
+
// This keeps the cursor hidden (hidden at start of main loop)
|
|
632
650
|
}
|
|
633
651
|
|
|
634
652
|
fn render_too_small(f: &mut Frame, viewport: &SafeViewport) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "4runr-os",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.49",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "4Runr AI Agent OS - Interactive terminal for managing AI agents",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -39,8 +39,10 @@
|
|
|
39
39
|
"mk3-tui/binaries/**/*",
|
|
40
40
|
"scripts/setup.js",
|
|
41
41
|
"scripts/postinstall-mk3.js",
|
|
42
|
+
"scripts/cleanup-build-artifacts.js",
|
|
42
43
|
"README.md",
|
|
43
|
-
"SETUP.md"
|
|
44
|
+
"SETUP.md",
|
|
45
|
+
"USER-PRIVACY.md"
|
|
44
46
|
],
|
|
45
47
|
"engines": {
|
|
46
48
|
"node": ">=18.0.0"
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Cleanup script: Remove unnecessary build artifacts to keep user's computer clean
|
|
4
|
+
* - Removes Rust debug builds (keep only release)
|
|
5
|
+
* - Removes incremental compilation artifacts
|
|
6
|
+
* - Keeps only the final release binary
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import * as fs from 'fs';
|
|
10
|
+
import * as path from 'path';
|
|
11
|
+
import { fileURLToPath } from 'url';
|
|
12
|
+
import { dirname } from 'path';
|
|
13
|
+
|
|
14
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
15
|
+
const __dirname = dirname(__filename);
|
|
16
|
+
|
|
17
|
+
const mk3Dir = path.join(__dirname, '..', 'mk3-tui');
|
|
18
|
+
const targetDir = path.join(mk3Dir, 'target');
|
|
19
|
+
|
|
20
|
+
if (!fs.existsSync(targetDir)) {
|
|
21
|
+
// No build artifacts to clean
|
|
22
|
+
process.exit(0);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const binaryName = process.platform === 'win32' ? 'mk3-tui.exe' : 'mk3-tui';
|
|
26
|
+
const releaseBinary = path.join(targetDir, 'release', binaryName);
|
|
27
|
+
|
|
28
|
+
// Check if release binary exists - if so, we can safely clean up
|
|
29
|
+
if (fs.existsSync(releaseBinary)) {
|
|
30
|
+
let cleanedSize = 0;
|
|
31
|
+
|
|
32
|
+
try {
|
|
33
|
+
// Remove debug build (if exists) - saves ~200-300MB
|
|
34
|
+
const debugDir = path.join(targetDir, 'debug');
|
|
35
|
+
if (fs.existsSync(debugDir)) {
|
|
36
|
+
const stats = getDirSize(debugDir);
|
|
37
|
+
fs.rmSync(debugDir, { recursive: true, force: true });
|
|
38
|
+
cleanedSize += stats;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// Remove incremental compilation artifacts (keeps builds faster but uses disk)
|
|
42
|
+
const incrementalDir = path.join(targetDir, 'release', '.fingerprint');
|
|
43
|
+
const incrementalDeps = path.join(targetDir, 'release', 'deps');
|
|
44
|
+
const incrementalIncremental = path.join(targetDir, 'incremental');
|
|
45
|
+
|
|
46
|
+
if (fs.existsSync(incrementalDir)) {
|
|
47
|
+
cleanedSize += getDirSize(incrementalDir);
|
|
48
|
+
fs.rmSync(incrementalDir, { recursive: true, force: true });
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Keep deps/ folder (needed for linking), but remove .fingerprint
|
|
52
|
+
// Remove incremental compilation metadata (can be rebuilt)
|
|
53
|
+
if (fs.existsSync(incrementalIncremental)) {
|
|
54
|
+
cleanedSize += getDirSize(incrementalIncremental);
|
|
55
|
+
fs.rmSync(incrementalIncremental, { recursive: true, force: true });
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// Calculate cleaned size in MB
|
|
59
|
+
const cleanedMB = (cleanedSize / (1024 * 1024)).toFixed(1);
|
|
60
|
+
if (cleanedMB > 0.1) {
|
|
61
|
+
// Only log if we cleaned something meaningful
|
|
62
|
+
// Silent cleanup - don't bother user with details
|
|
63
|
+
}
|
|
64
|
+
} catch (error) {
|
|
65
|
+
// Silent fail - cleanup is best-effort
|
|
66
|
+
// Don't break install if cleanup fails
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Calculate directory size recursively
|
|
72
|
+
*/
|
|
73
|
+
function getDirSize(dirPath) {
|
|
74
|
+
let size = 0;
|
|
75
|
+
try {
|
|
76
|
+
const entries = fs.readdirSync(dirPath, { withFileTypes: true });
|
|
77
|
+
for (const entry of entries) {
|
|
78
|
+
const entryPath = path.join(dirPath, entry.name);
|
|
79
|
+
if (entry.isDirectory()) {
|
|
80
|
+
size += getDirSize(entryPath);
|
|
81
|
+
} else {
|
|
82
|
+
try {
|
|
83
|
+
const stats = fs.statSync(entryPath);
|
|
84
|
+
size += stats.size;
|
|
85
|
+
} catch {
|
|
86
|
+
// Ignore errors
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
} catch {
|
|
91
|
+
// Ignore errors
|
|
92
|
+
}
|
|
93
|
+
return size;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// Export for use in other scripts
|
|
97
|
+
export function cleanupBuildArtifacts() {
|
|
98
|
+
// This runs the cleanup logic above
|
|
99
|
+
// (code is already executed when script runs directly)
|
|
100
|
+
}
|
|
101
|
+
|
|
@@ -44,6 +44,19 @@ try {
|
|
|
44
44
|
stdio: 'inherit',
|
|
45
45
|
});
|
|
46
46
|
console.log('✓ mk3-tui built successfully');
|
|
47
|
+
|
|
48
|
+
// Clean up build artifacts to save disk space (~300-400MB)
|
|
49
|
+
try {
|
|
50
|
+
const cleanupScript = path.join(__dirname, 'cleanup-build-artifacts.js');
|
|
51
|
+
if (fs.existsSync(cleanupScript)) {
|
|
52
|
+
execSync(`node "${cleanupScript}"`, {
|
|
53
|
+
cwd: path.dirname(__dirname),
|
|
54
|
+
stdio: 'ignore', // Silent cleanup
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
} catch {
|
|
58
|
+
// Silent - cleanup is optional, don't fail if it doesn't work
|
|
59
|
+
}
|
|
47
60
|
} catch (error) {
|
|
48
61
|
console.warn('⚠️ Failed to build mk3-tui. It will be built on first run.');
|
|
49
62
|
// Don't exit with error - allow install to complete
|
package/scripts/setup.js
CHANGED
|
@@ -65,30 +65,14 @@ try {
|
|
|
65
65
|
}
|
|
66
66
|
} catch {
|
|
67
67
|
console.log('⚠️ Rust not installed');
|
|
68
|
-
console.log('
|
|
68
|
+
console.log('\n Rust is required to build mk3-tui.');
|
|
69
|
+
console.log(' Install Rust: https://rustup.rs/');
|
|
70
|
+
console.log(' Or run: curl --proto "=https" --tlsv1.2 -sSf https://sh.rustup.rs | sh\n');
|
|
71
|
+
console.log(' After installing Rust, run 4runr-setup again.\n');
|
|
72
|
+
process.exit(1);
|
|
69
73
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
// Try winget
|
|
73
|
-
try {
|
|
74
|
-
execSync('winget install Rustlang.Rustup --accept-package-agreements --accept-source-agreements', { stdio: 'inherit' });
|
|
75
|
-
rustInstalled = true;
|
|
76
|
-
rustNeedsGNU = true; // Default to GNU on Windows
|
|
77
|
-
} catch {
|
|
78
|
-
console.error('❌ Failed to install Rust automatically');
|
|
79
|
-
console.error(' Please install manually: https://rustup.rs/');
|
|
80
|
-
process.exit(1);
|
|
81
|
-
}
|
|
82
|
-
} else {
|
|
83
|
-
// Linux/macOS
|
|
84
|
-
execSync('curl --proto "=https" --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y', { stdio: 'inherit' });
|
|
85
|
-
rustInstalled = true;
|
|
86
|
-
}
|
|
87
|
-
} catch {
|
|
88
|
-
console.error('❌ Failed to install Rust automatically');
|
|
89
|
-
console.error(' Please install manually: https://rustup.rs/');
|
|
90
|
-
process.exit(1);
|
|
91
|
-
}
|
|
74
|
+
// Note: We don't auto-install Rust anymore to avoid modifying user's system without explicit consent
|
|
75
|
+
// Users should install Rust themselves using the official installer
|
|
92
76
|
}
|
|
93
77
|
|
|
94
78
|
// Fix Rust toolchain on Windows (use GNU if MSVC not available)
|
|
@@ -324,13 +308,18 @@ try {
|
|
|
324
308
|
? path.join(npmPrefix, '4r.cmd')
|
|
325
309
|
: path.join(npmPrefix, 'bin', '4r');
|
|
326
310
|
|
|
327
|
-
|
|
311
|
+
// Also check for 4runr-os package in node_modules
|
|
312
|
+
const globalPackagePath = isWindows
|
|
313
|
+
? path.join(npmPrefix, 'node_modules', '4runr-os', 'package.json')
|
|
314
|
+
: path.join(npmPrefix, 'lib', 'node_modules', '4runr-os', 'package.json');
|
|
315
|
+
|
|
316
|
+
if (fs.existsSync(globalBinPath) || fs.existsSync(globalPackagePath)) {
|
|
328
317
|
console.log('✅ 4runr-os is installed');
|
|
329
318
|
} else {
|
|
330
319
|
throw new Error('4r not found');
|
|
331
320
|
}
|
|
332
321
|
} catch {
|
|
333
|
-
console.log('⚠️ 4runr-os not found
|
|
322
|
+
console.log('⚠️ 4runr-os not found');
|
|
334
323
|
console.log(' Installing 4runr-os...');
|
|
335
324
|
try {
|
|
336
325
|
execSync('npm install -g 4runr-os@latest', { stdio: 'inherit' });
|
|
@@ -371,6 +360,9 @@ try {
|
|
|
371
360
|
stdio: 'inherit',
|
|
372
361
|
});
|
|
373
362
|
console.log('✅ mk3-tui built successfully');
|
|
363
|
+
|
|
364
|
+
// Clean up build artifacts to save disk space (keep only release binary)
|
|
365
|
+
cleanupBuildArtifacts();
|
|
374
366
|
} catch (error) {
|
|
375
367
|
console.warn('⚠️ Failed to build mk3-tui');
|
|
376
368
|
console.warn(' The binary will be built automatically on first run of 4r');
|