4runr-os 2.10.39 → 2.10.41
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/apps/gateway/dist/apps/gateway/src/index.js +14 -4
- package/apps/gateway/dist/apps/gateway/src/index.js.map +1 -1
- package/apps/gateway/dist/apps/gateway/src/metrics/monitoring-detail.d.ts +18 -0
- package/apps/gateway/dist/apps/gateway/src/metrics/monitoring-detail.d.ts.map +1 -0
- package/apps/gateway/dist/apps/gateway/src/metrics/monitoring-detail.js +117 -0
- package/apps/gateway/dist/apps/gateway/src/metrics/monitoring-detail.js.map +1 -0
- package/apps/gateway/dist/apps/gateway/src/middleware/log-capture.d.ts +2 -0
- package/apps/gateway/dist/apps/gateway/src/middleware/log-capture.d.ts.map +1 -0
- package/apps/gateway/dist/apps/gateway/src/middleware/log-capture.js +54 -0
- package/apps/gateway/dist/apps/gateway/src/middleware/log-capture.js.map +1 -0
- package/apps/gateway/dist/apps/gateway/src/routes/monitoring.d.ts +15 -0
- package/apps/gateway/dist/apps/gateway/src/routes/monitoring.d.ts.map +1 -0
- package/apps/gateway/dist/apps/gateway/src/routes/monitoring.js +164 -0
- package/apps/gateway/dist/apps/gateway/src/routes/monitoring.js.map +1 -0
- package/apps/gateway/package-lock.json +204 -353
- package/apps/gateway/src/index.ts +27 -8
- package/apps/gateway/src/metrics/monitoring-detail.ts +162 -0
- package/apps/gateway/src/middleware/log-capture.ts +70 -0
- package/apps/gateway/src/routes/monitoring.ts +298 -0
- package/dist/gateway-client.d.ts +2 -0
- package/dist/gateway-client.d.ts.map +1 -1
- package/dist/gateway-client.js +22 -0
- package/dist/gateway-client.js.map +1 -1
- package/dist/tui-handlers.js +498 -0
- package/dist/tui-handlers.js.map +1 -1
- package/mk3-tui/src/app/render_scheduler.rs +111 -112
- package/mk3-tui/src/app.rs +1078 -295
- package/mk3-tui/src/debug_log.rs +131 -124
- package/mk3-tui/src/io/mod.rs +63 -66
- package/mk3-tui/src/io/protocol.rs +14 -15
- package/mk3-tui/src/io/stdio.rs +31 -32
- package/mk3-tui/src/io/ws.rs +25 -32
- package/mk3-tui/src/main.rs +774 -212
- package/mk3-tui/src/monitoring/mod.rs +428 -0
- package/mk3-tui/src/screens/mod.rs +53 -39
- package/mk3-tui/src/storage/cache.rs +221 -224
- package/mk3-tui/src/storage/mod.rs +5 -6
- package/mk3-tui/src/ui/agent_builder.rs +1148 -922
- package/mk3-tui/src/ui/agent_list.rs +344 -295
- package/mk3-tui/src/ui/boot.rs +145 -148
- package/mk3-tui/src/ui/connection_portal.rs +121 -98
- package/mk3-tui/src/ui/help.rs +340 -284
- package/mk3-tui/src/ui/layout.rs +966 -803
- package/mk3-tui/src/ui/mod.rs +1 -1
- package/mk3-tui/src/ui/portal_monitoring.rs +1027 -147
- package/mk3-tui/src/ui/run_manager.rs +784 -764
- package/mk3-tui/src/ui/safe_viewport.rs +236 -235
- package/mk3-tui/src/ui/settings.rs +414 -362
- package/mk3-tui/src/ui/setup_portal.rs +158 -101
- package/mk3-tui/src/websocket.rs +315 -308
- package/package.json +2 -2
package/mk3-tui/src/ui/boot.rs
CHANGED
|
@@ -1,148 +1,145 @@
|
|
|
1
|
-
use crate::app::AppState;
|
|
2
|
-
use ratatui::prelude::*;
|
|
3
|
-
use ratatui::widgets::{Block, Borders, Gauge, Paragraph};
|
|
4
|
-
|
|
5
|
-
// Color constants matching the TUI palette (exact match from layout.rs)
|
|
6
|
-
const BRAND_PURPLE: Color = Color::Rgb(138, 43, 226);
|
|
7
|
-
#[allow(dead_code)]
|
|
8
|
-
const BRAND_VIOLET: Color = Color::Rgb(148, 103, 189);
|
|
9
|
-
const CYBER_CYAN: Color = Color::Rgb(0, 255, 255);
|
|
10
|
-
const NEON_GREEN: Color = Color::Rgb(57, 255, 20);
|
|
11
|
-
const TEXT_PRIMARY: Color = Color::Rgb(230, 230, 240);
|
|
12
|
-
const TEXT_DIM: Color = Color::Rgb(100, 100, 120);
|
|
13
|
-
#[allow(dead_code)]
|
|
14
|
-
const TEXT_MUTED: Color = Color::Rgb(60, 60, 80);
|
|
15
|
-
const BG_PANEL: Color = Color::Rgb(18, 18, 25);
|
|
16
|
-
|
|
17
|
-
/// Exact logo from requirements (monospace, preserve spacing)
|
|
18
|
-
const LOGO: &str = r#"██╗ ██╗██████╗ ██╗ ██╗███╗ ██╗██████╗ ██████╗ ███████╗
|
|
19
|
-
██║ ██║██╔══██╗██║ ██║████╗ ██║██╔══██╗ ██╔═══██╗██╔════╝
|
|
20
|
-
███████║██████╔╝██║ ██║██╔██╗ ██║██████╔╝ ██║ ██║███████╗
|
|
21
|
-
╚════██║██╔══██╗██║ ██║██║╚██╗██║██╔══██╗ ██║ ██║╚════██║
|
|
22
|
-
██║██║ ██║╚██████╔╝██║ ╚████║██║ ██║ ╚██████╔╝███████║
|
|
23
|
-
╚═╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝╚═╝ ╚═╝ ╚═════╝ ╚══════╝"#;
|
|
24
|
-
|
|
25
|
-
pub fn render_boot(f: &mut Frame, area: Rect, state: &AppState) {
|
|
26
|
-
// Clear background
|
|
27
|
-
f.render_widget(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
let
|
|
36
|
-
|
|
37
|
-
//
|
|
38
|
-
let
|
|
39
|
-
|
|
40
|
-
//
|
|
41
|
-
let
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
let
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
let
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
)
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
);
|
|
147
|
-
}
|
|
148
|
-
}
|
|
1
|
+
use crate::app::AppState;
|
|
2
|
+
use ratatui::prelude::*;
|
|
3
|
+
use ratatui::widgets::{Block, Borders, Gauge, Paragraph};
|
|
4
|
+
|
|
5
|
+
// Color constants matching the TUI palette (exact match from layout.rs)
|
|
6
|
+
const BRAND_PURPLE: Color = Color::Rgb(138, 43, 226);
|
|
7
|
+
#[allow(dead_code)]
|
|
8
|
+
const BRAND_VIOLET: Color = Color::Rgb(148, 103, 189);
|
|
9
|
+
const CYBER_CYAN: Color = Color::Rgb(0, 255, 255);
|
|
10
|
+
const NEON_GREEN: Color = Color::Rgb(57, 255, 20);
|
|
11
|
+
const TEXT_PRIMARY: Color = Color::Rgb(230, 230, 240);
|
|
12
|
+
const TEXT_DIM: Color = Color::Rgb(100, 100, 120);
|
|
13
|
+
#[allow(dead_code)]
|
|
14
|
+
const TEXT_MUTED: Color = Color::Rgb(60, 60, 80);
|
|
15
|
+
const BG_PANEL: Color = Color::Rgb(18, 18, 25);
|
|
16
|
+
|
|
17
|
+
/// Exact logo from requirements (monospace, preserve spacing)
|
|
18
|
+
const LOGO: &str = r#"██╗ ██╗██████╗ ██╗ ██╗███╗ ██╗██████╗ ██████╗ ███████╗
|
|
19
|
+
██║ ██║██╔══██╗██║ ██║████╗ ██║██╔══██╗ ██╔═══██╗██╔════╝
|
|
20
|
+
███████║██████╔╝██║ ██║██╔██╗ ██║██████╔╝ ██║ ██║███████╗
|
|
21
|
+
╚════██║██╔══██╗██║ ██║██║╚██╗██║██╔══██╗ ██║ ██║╚════██║
|
|
22
|
+
██║██║ ██║╚██████╔╝██║ ╚████║██║ ██║ ╚██████╔╝███████║
|
|
23
|
+
╚═╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝╚═╝ ╚═╝ ╚═════╝ ╚══════╝"#;
|
|
24
|
+
|
|
25
|
+
pub fn render_boot(f: &mut Frame, area: Rect, state: &AppState) {
|
|
26
|
+
// Clear background
|
|
27
|
+
f.render_widget(Block::default().style(Style::default().bg(BG_PANEL)), area);
|
|
28
|
+
|
|
29
|
+
// Fixed layout: logo stays at fixed position, elements below it
|
|
30
|
+
let logo_height: u16 = 6; // Logo is 6 lines
|
|
31
|
+
let boot_logs_height: u16 = 5; // Fixed height for logs (not dynamic)
|
|
32
|
+
let progress_height: u16 = 3;
|
|
33
|
+
|
|
34
|
+
// Logo starts at a fixed position from top (about 1/4 down the screen)
|
|
35
|
+
let logo_start_y: u16 = area.height / 4;
|
|
36
|
+
|
|
37
|
+
// === LOGO (centered horizontally, fixed vertical position) ===
|
|
38
|
+
let logo_lines: Vec<&str> = LOGO.lines().collect();
|
|
39
|
+
let logo_width: u16 = logo_lines.iter().map(|l| l.len()).max().unwrap_or(0) as u16;
|
|
40
|
+
// Center horizontally: (area.width - logo_width) / 2
|
|
41
|
+
let logo_x: u16 = area.x + (area.width.saturating_sub(logo_width)) / 2;
|
|
42
|
+
|
|
43
|
+
for (i, line) in logo_lines.iter().enumerate() {
|
|
44
|
+
let line_y = logo_start_y + i as u16;
|
|
45
|
+
if line_y < area.height {
|
|
46
|
+
// Center each line within the available width
|
|
47
|
+
let line_rect = Rect {
|
|
48
|
+
x: logo_x,
|
|
49
|
+
y: line_y,
|
|
50
|
+
width: logo_width.min(area.width.saturating_sub(logo_x)),
|
|
51
|
+
height: 1,
|
|
52
|
+
};
|
|
53
|
+
f.render_widget(
|
|
54
|
+
Paragraph::new(*line)
|
|
55
|
+
.style(Style::default().fg(BRAND_PURPLE))
|
|
56
|
+
.alignment(Alignment::Center), // Center alignment for perfect centering
|
|
57
|
+
line_rect,
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
let current_y = logo_start_y + logo_height + 2;
|
|
63
|
+
|
|
64
|
+
// === BOOT LOGS ===
|
|
65
|
+
if !state.boot_lines.is_empty() && current_y < area.height {
|
|
66
|
+
// Center logs horizontally
|
|
67
|
+
let logs_width: u16 = (area.width * 60 / 100).min(area.width.saturating_sub(40)); // 60% width, safe margins
|
|
68
|
+
let logs_x: u16 = area.x + (area.width.saturating_sub(logs_width)) / 2;
|
|
69
|
+
|
|
70
|
+
let logs_area = Rect {
|
|
71
|
+
x: logs_x,
|
|
72
|
+
y: current_y,
|
|
73
|
+
width: logs_width,
|
|
74
|
+
height: boot_logs_height,
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
let mut log_text = String::new();
|
|
78
|
+
for line in state.boot_lines.iter() {
|
|
79
|
+
log_text.push_str(line);
|
|
80
|
+
log_text.push('\n');
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
f.render_widget(
|
|
84
|
+
Paragraph::new(log_text.trim())
|
|
85
|
+
.style(Style::default().fg(TEXT_PRIMARY))
|
|
86
|
+
.alignment(Alignment::Center), // Center logs too
|
|
87
|
+
logs_area,
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
let current_y = current_y + boot_logs_height + 2;
|
|
92
|
+
|
|
93
|
+
// === PROGRESS BAR ===
|
|
94
|
+
if current_y < area.height {
|
|
95
|
+
// Center progress bar horizontally
|
|
96
|
+
let progress_width: u16 = (area.width * 60 / 100).min(area.width.saturating_sub(40));
|
|
97
|
+
let progress_x: u16 = area.x + (area.width.saturating_sub(progress_width)) / 2;
|
|
98
|
+
|
|
99
|
+
let progress_area = Rect {
|
|
100
|
+
x: progress_x,
|
|
101
|
+
y: current_y,
|
|
102
|
+
width: progress_width,
|
|
103
|
+
height: 3,
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
let progress_label = if state.boot_done {
|
|
107
|
+
"System Ready"
|
|
108
|
+
} else {
|
|
109
|
+
"Booting..."
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
f.render_widget(
|
|
113
|
+
Gauge::default()
|
|
114
|
+
.block(
|
|
115
|
+
Block::default()
|
|
116
|
+
.borders(Borders::NONE)
|
|
117
|
+
.title(progress_label)
|
|
118
|
+
.title_style(Style::default().fg(CYBER_CYAN)),
|
|
119
|
+
)
|
|
120
|
+
.gauge_style(Style::default().fg(NEON_GREEN))
|
|
121
|
+
.percent(state.boot_progress as u16)
|
|
122
|
+
.label(format!("{}%", state.boot_progress)),
|
|
123
|
+
progress_area,
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
let current_y = current_y + progress_height + 2;
|
|
128
|
+
|
|
129
|
+
// === FOOTER: "Press any key to continue" (only when boot done) ===
|
|
130
|
+
if state.boot_done && current_y < area.height {
|
|
131
|
+
let footer_area = Rect {
|
|
132
|
+
x: area.x,
|
|
133
|
+
y: current_y,
|
|
134
|
+
width: area.width,
|
|
135
|
+
height: 1,
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
f.render_widget(
|
|
139
|
+
Paragraph::new("Press any key to continue...")
|
|
140
|
+
.style(Style::default().fg(TEXT_DIM))
|
|
141
|
+
.alignment(Alignment::Center),
|
|
142
|
+
footer_area,
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
}
|