4runr-os 1.3.62 → 1.4.1
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/ui/v3/index.d.ts +1 -1
- package/dist/ui/v3/index.d.ts.map +1 -1
- package/dist/ui/v3/index.js +2 -2
- package/dist/ui/v3/index.js.map +1 -1
- package/dist/ui/v3/ui/phase1RuntimeClean.d.ts +14 -0
- package/dist/ui/v3/ui/phase1RuntimeClean.d.ts.map +1 -0
- package/dist/ui/v3/ui/phase1RuntimeClean.js +655 -0
- package/dist/ui/v3/ui/phase1RuntimeClean.js.map +1 -0
- package/dist/ui/v3/ui/uiRuntime.d.ts +40 -0
- package/dist/ui/v3/ui/uiRuntime.d.ts.map +1 -0
- package/dist/ui/v3/ui/uiRuntime.js +60 -0
- package/dist/ui/v3/ui/uiRuntime.js.map +1 -0
- package/package.json +1 -1
package/dist/ui/v3/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/v3/index.ts"],"names":[],"mappings":";AACA;;;;GAIG;AAGH,OAAO,EAAE,kBAAkB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/v3/index.ts"],"names":[],"mappings":";AACA;;;;GAIG;AAGH,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC"}
|
package/dist/ui/v3/index.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Phase 1: Layout Skeleton + Dedicated Command Line
|
|
6
6
|
*/
|
|
7
7
|
// Export for use as a library
|
|
8
|
-
export { startPhase1Runtime } from './ui/
|
|
8
|
+
export { startPhase1Runtime } from './ui/phase1RuntimeClean.js';
|
|
9
9
|
// If run directly (not imported), start the TUI
|
|
10
10
|
const isMainModule = import.meta.url === `file://${process.argv[1]?.replace(/\\/g, '/')}` ||
|
|
11
11
|
process.argv[1]?.endsWith('index.js') ||
|
|
@@ -20,7 +20,7 @@ if (isMainModule) {
|
|
|
20
20
|
}
|
|
21
21
|
else {
|
|
22
22
|
// TUI mode (Phase 1)
|
|
23
|
-
const { startPhase1Runtime } = await import('./ui/
|
|
23
|
+
const { startPhase1Runtime } = await import('./ui/phase1RuntimeClean.js');
|
|
24
24
|
startPhase1Runtime().catch((error) => {
|
|
25
25
|
console.error('FATAL: TUI failed to start:', error);
|
|
26
26
|
process.exit(1);
|
package/dist/ui/v3/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ui/v3/index.ts"],"names":[],"mappings":";AACA;;;;GAIG;AAEH,8BAA8B;AAC9B,OAAO,EAAE,kBAAkB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ui/v3/index.ts"],"names":[],"mappings":";AACA;;;;GAIG;AAEH,8BAA8B;AAC9B,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAEhE,gDAAgD;AAChD,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,KAAK,UAAU,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE;IACpE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,UAAU,CAAC;IACrC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,UAAU,CAAC,CAAC;AAE3D,IAAI,YAAY,EAAE,CAAC;IACjB,wBAAwB;IACxB,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,KAAK,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;IAElF,IAAI,KAAK,EAAE,CAAC;QACV,oCAAoC;QACpC,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC;QAC3C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;SAAM,CAAC;QACN,qBAAqB;QACrB,MAAM,EAAE,kBAAkB,EAAE,GAAG,MAAM,MAAM,CAAC,4BAA4B,CAAC,CAAC;QAC1E,kBAAkB,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;YACnC,OAAO,CAAC,KAAK,CAAC,6BAA6B,EAAE,KAAK,CAAC,CAAC;YACpD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC,CAAC,CAAC;IACL,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Phase 1 Runtime - CLEAN IMPLEMENTATION
|
|
3
|
+
*
|
|
4
|
+
* Following strict lifecycle rules:
|
|
5
|
+
* - Single instance guard
|
|
6
|
+
* - Resize updates layout only (no recreate)
|
|
7
|
+
* - Zero stdout writes
|
|
8
|
+
* - Clean unbinding
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Step 1: Single instance guard
|
|
12
|
+
*/
|
|
13
|
+
export declare function startPhase1Runtime(): Promise<void>;
|
|
14
|
+
//# sourceMappingURL=phase1RuntimeClean.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"phase1RuntimeClean.d.ts","sourceRoot":"","sources":["../../../../src/ui/v3/ui/phase1RuntimeClean.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA+EH;;GAEG;AACH,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC,CAmKxD"}
|
|
@@ -0,0 +1,655 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Phase 1 Runtime - CLEAN IMPLEMENTATION
|
|
3
|
+
*
|
|
4
|
+
* Following strict lifecycle rules:
|
|
5
|
+
* - Single instance guard
|
|
6
|
+
* - Resize updates layout only (no recreate)
|
|
7
|
+
* - Zero stdout writes
|
|
8
|
+
* - Clean unbinding
|
|
9
|
+
*/
|
|
10
|
+
import blessed from 'neo-blessed';
|
|
11
|
+
import { computePhase1Layout, MIN_WIDTH, MIN_HEIGHT } from './layout/phase1Layout.js';
|
|
12
|
+
import { isUIMounted, setUIRuntime, getUIRuntime, destroyUIRuntime } from './uiRuntime.js';
|
|
13
|
+
import { feedStore } from '../core/feedStore.js';
|
|
14
|
+
import { eventBus } from '../core/eventBus.js';
|
|
15
|
+
import { enableTuiMode, disableBootPhase } from '../core/logger.js';
|
|
16
|
+
import { buildUiState } from '../state/uiStateBuilder.js';
|
|
17
|
+
import { defaultUiState } from '../state/defaultState.js';
|
|
18
|
+
import { initializePostureState } from '../state/initializePostureState.js';
|
|
19
|
+
import { renderResourcesPanel } from './panels/ResourcesPanel.js';
|
|
20
|
+
import { renderPosturePanel } from './panels/PosturePanel.js';
|
|
21
|
+
import { renderAssetsPanel } from './panels/AssetsPanel.js';
|
|
22
|
+
import { renderNetworkPanel } from './panels/NetworkPanel.js';
|
|
23
|
+
import { renderCapabilitiesPanel } from './panels/CapabilitiesPanel.js';
|
|
24
|
+
import { isAvailable } from '../state/value.js';
|
|
25
|
+
import { parse, execute, UiAction } from '../commands/commandEngine.js';
|
|
26
|
+
const blessedLib = blessed;
|
|
27
|
+
const PROMPT = '4runr> ';
|
|
28
|
+
// Current UI state
|
|
29
|
+
let currentUiState = {
|
|
30
|
+
...defaultUiState,
|
|
31
|
+
posture: initializePostureState()
|
|
32
|
+
};
|
|
33
|
+
// Command history
|
|
34
|
+
const commandHistory = [];
|
|
35
|
+
let historyIndex = -1;
|
|
36
|
+
// Input state
|
|
37
|
+
let commandInputValue = PROMPT;
|
|
38
|
+
let cursorPosition = PROMPT.length;
|
|
39
|
+
let scrollOffset = 0;
|
|
40
|
+
// Resize debounce
|
|
41
|
+
let resizeDebounceTimer = null;
|
|
42
|
+
const RESIZE_DEBOUNCE_MS = 100;
|
|
43
|
+
let lastResizeWidth = 0;
|
|
44
|
+
let lastResizeHeight = 0;
|
|
45
|
+
// Resize handler guard (Step 4A: bind once)
|
|
46
|
+
let resizeHandlerBound = false;
|
|
47
|
+
/**
|
|
48
|
+
* Step 3: Safe append helper - prevents duplicate appends
|
|
49
|
+
*/
|
|
50
|
+
function safeAppend(screen, widget) {
|
|
51
|
+
// If widget already has a parent, do not append again
|
|
52
|
+
if (widget.parent) {
|
|
53
|
+
eventBus.emit({
|
|
54
|
+
tag: 'SYS',
|
|
55
|
+
msg: `WARN: Widget already has parent, skipping append`,
|
|
56
|
+
level: 'WARN'
|
|
57
|
+
});
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
// Check if widget already in screen.children
|
|
61
|
+
const children = screen.children || [];
|
|
62
|
+
if (children.includes(widget)) {
|
|
63
|
+
eventBus.emit({
|
|
64
|
+
tag: 'SYS',
|
|
65
|
+
msg: `WARN: Widget already in screen.children, skipping append`,
|
|
66
|
+
level: 'WARN'
|
|
67
|
+
});
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
// Safe to append
|
|
71
|
+
screen.append(widget);
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Step 1: Single instance guard
|
|
75
|
+
*/
|
|
76
|
+
export async function startPhase1Runtime() {
|
|
77
|
+
// HARD GUARD: If UI already mounted, return immediately
|
|
78
|
+
if (isUIMounted()) {
|
|
79
|
+
// Step 7: Use eventBus, not logger (logger may write to stdout)
|
|
80
|
+
eventBus.emit({
|
|
81
|
+
tag: 'ERR',
|
|
82
|
+
msg: 'UI already mounted - cannot mount twice',
|
|
83
|
+
level: 'ERROR'
|
|
84
|
+
});
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
// Step 5: Enable TUI mode (routes console.log to eventBus)
|
|
88
|
+
enableTuiMode();
|
|
89
|
+
// Set up raw input
|
|
90
|
+
if (process.stdin.isTTY) {
|
|
91
|
+
process.stdin.setRawMode(true);
|
|
92
|
+
process.stdin.resume();
|
|
93
|
+
process.stdin.setEncoding('utf8');
|
|
94
|
+
}
|
|
95
|
+
// Create screen (ONCE)
|
|
96
|
+
const screen = blessedLib.screen({
|
|
97
|
+
smartCSR: false,
|
|
98
|
+
fastCSR: false,
|
|
99
|
+
title: '4Runr OS',
|
|
100
|
+
fullUnicode: true,
|
|
101
|
+
sendFocus: false,
|
|
102
|
+
warnings: false,
|
|
103
|
+
autoPadding: false,
|
|
104
|
+
dockBorders: false,
|
|
105
|
+
});
|
|
106
|
+
if (!screen) {
|
|
107
|
+
throw new Error('Failed to create screen');
|
|
108
|
+
}
|
|
109
|
+
// Hide cursor
|
|
110
|
+
if (screen.program?.hideCursor) {
|
|
111
|
+
screen.program.hideCursor();
|
|
112
|
+
}
|
|
113
|
+
// Check terminal size
|
|
114
|
+
const width = screen.width;
|
|
115
|
+
const height = screen.height;
|
|
116
|
+
const layoutResult = computePhase1Layout(width, height);
|
|
117
|
+
if (!layoutResult.ok || !layoutResult.layout) {
|
|
118
|
+
const errorMsg = layoutResult.errorMessage || 'Terminal too small';
|
|
119
|
+
screen.destroy();
|
|
120
|
+
throw new Error(errorMsg);
|
|
121
|
+
}
|
|
122
|
+
const layout = layoutResult.layout;
|
|
123
|
+
// Create all widgets ONCE
|
|
124
|
+
const widgets = {
|
|
125
|
+
posture: createPanel(screen, layout.posture, 'POSTURE'),
|
|
126
|
+
resources: createPanel(screen, layout.resources, 'RESOURCES'),
|
|
127
|
+
assets: createPanel(screen, layout.assets, 'ASSETS'),
|
|
128
|
+
operations: createPanel(screen, layout.operations, 'OPERATIONS'),
|
|
129
|
+
network: createPanel(screen, layout.network, 'NETWORK'),
|
|
130
|
+
capabilities: createPanel(screen, layout.capabilities, 'CAPABILITIES'),
|
|
131
|
+
statusStrip: createStatusStrip(screen, layout),
|
|
132
|
+
commandLine: createCommandLine(screen, layout),
|
|
133
|
+
};
|
|
134
|
+
// Step 3: Append all widgets ONCE using safeAppend
|
|
135
|
+
safeAppend(screen, widgets.posture);
|
|
136
|
+
safeAppend(screen, widgets.resources);
|
|
137
|
+
safeAppend(screen, widgets.assets);
|
|
138
|
+
safeAppend(screen, widgets.operations);
|
|
139
|
+
safeAppend(screen, widgets.network);
|
|
140
|
+
safeAppend(screen, widgets.capabilities);
|
|
141
|
+
safeAppend(screen, widgets.statusStrip);
|
|
142
|
+
safeAppend(screen, widgets.commandLine);
|
|
143
|
+
// Step 6: Debug - log initial widget count
|
|
144
|
+
const initialCount = screen.children?.length || 0;
|
|
145
|
+
eventBus.emit({
|
|
146
|
+
tag: 'SYS',
|
|
147
|
+
msg: `UI mounted: ${initialCount} widgets`,
|
|
148
|
+
level: 'INFO'
|
|
149
|
+
});
|
|
150
|
+
// Store unbind functions
|
|
151
|
+
const unbindFns = [];
|
|
152
|
+
// Step 6: Error handlers
|
|
153
|
+
const uncaughtHandler = (error) => {
|
|
154
|
+
eventBus.emit({
|
|
155
|
+
tag: 'ERR',
|
|
156
|
+
msg: `Uncaught: ${error.message}`,
|
|
157
|
+
level: 'ERROR'
|
|
158
|
+
});
|
|
159
|
+
};
|
|
160
|
+
const unhandledHandler = (reason) => {
|
|
161
|
+
eventBus.emit({
|
|
162
|
+
tag: 'ERR',
|
|
163
|
+
msg: `Unhandled rejection: ${reason}`,
|
|
164
|
+
level: 'ERROR'
|
|
165
|
+
});
|
|
166
|
+
};
|
|
167
|
+
process.on('uncaughtException', uncaughtHandler);
|
|
168
|
+
process.on('unhandledRejection', unhandledHandler);
|
|
169
|
+
unbindFns.push(() => {
|
|
170
|
+
process.removeListener('uncaughtException', uncaughtHandler);
|
|
171
|
+
process.removeListener('unhandledRejection', unhandledHandler);
|
|
172
|
+
});
|
|
173
|
+
// Setup input handling
|
|
174
|
+
setupInputHandling(screen, widgets.commandLine, unbindFns);
|
|
175
|
+
// Step 2 & 3: Setup resize handling (layout update only)
|
|
176
|
+
setupResizeHandling(screen, widgets, unbindFns);
|
|
177
|
+
// Setup signal handlers
|
|
178
|
+
const sigintHandler = () => cleanExit(0);
|
|
179
|
+
const sigtermHandler = () => cleanExit(0);
|
|
180
|
+
process.on('SIGINT', sigintHandler);
|
|
181
|
+
process.on('SIGTERM', sigtermHandler);
|
|
182
|
+
unbindFns.push(() => {
|
|
183
|
+
process.removeListener('SIGINT', sigintHandler);
|
|
184
|
+
process.removeListener('SIGTERM', sigtermHandler);
|
|
185
|
+
});
|
|
186
|
+
// Store runtime
|
|
187
|
+
const runtime = {
|
|
188
|
+
screen,
|
|
189
|
+
widgets,
|
|
190
|
+
isMounted: true,
|
|
191
|
+
unbindFns,
|
|
192
|
+
};
|
|
193
|
+
setUIRuntime(runtime);
|
|
194
|
+
// Subscribe to eventBus for Operations panel
|
|
195
|
+
eventBus.subscribe((event) => {
|
|
196
|
+
feedStore.push(event);
|
|
197
|
+
updateOperationsPanel(widgets.operations);
|
|
198
|
+
screen.render();
|
|
199
|
+
});
|
|
200
|
+
// Initial content update
|
|
201
|
+
updateAllPanels(widgets);
|
|
202
|
+
// Initial render
|
|
203
|
+
lastResizeWidth = width;
|
|
204
|
+
lastResizeHeight = height;
|
|
205
|
+
screen.render();
|
|
206
|
+
// Disable boot phase (enable strict stdout blocking)
|
|
207
|
+
disableBootPhase();
|
|
208
|
+
// Start background state updates
|
|
209
|
+
startBackgroundUpdates(widgets, screen);
|
|
210
|
+
// Log boot
|
|
211
|
+
eventBus.emit({
|
|
212
|
+
tag: 'SYS',
|
|
213
|
+
msg: 'TUI initialized',
|
|
214
|
+
level: 'INFO'
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Step 2: Resize handler - UPDATE LAYOUT ONLY
|
|
219
|
+
* Step 4A: Bind once guard
|
|
220
|
+
*/
|
|
221
|
+
function setupResizeHandling(screen, widgets, unbindFns) {
|
|
222
|
+
// Step 4A: Hard guard - resize handler bound exactly once
|
|
223
|
+
if (resizeHandlerBound) {
|
|
224
|
+
eventBus.emit({
|
|
225
|
+
tag: 'SYS',
|
|
226
|
+
msg: 'WARN: Resize handler already bound, skipping',
|
|
227
|
+
level: 'WARN'
|
|
228
|
+
});
|
|
229
|
+
return;
|
|
230
|
+
}
|
|
231
|
+
resizeHandlerBound = true;
|
|
232
|
+
const resizeHandler = () => {
|
|
233
|
+
const newWidth = screen.width;
|
|
234
|
+
const newHeight = screen.height;
|
|
235
|
+
// Step 3: Ignore no-op resizes
|
|
236
|
+
if (newWidth === lastResizeWidth && newHeight === lastResizeHeight) {
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
239
|
+
// Step 3: Debounce
|
|
240
|
+
if (resizeDebounceTimer) {
|
|
241
|
+
clearTimeout(resizeDebounceTimer);
|
|
242
|
+
}
|
|
243
|
+
resizeDebounceTimer = setTimeout(() => {
|
|
244
|
+
resizeDebounceTimer = null;
|
|
245
|
+
// Step 5: Read terminal size fresh (deterministic)
|
|
246
|
+
const currentWidth = screen.width;
|
|
247
|
+
const currentHeight = screen.height;
|
|
248
|
+
// Step 3: Ignore no-op resizes
|
|
249
|
+
if (currentWidth === lastResizeWidth && currentHeight === lastResizeHeight) {
|
|
250
|
+
return;
|
|
251
|
+
}
|
|
252
|
+
lastResizeWidth = currentWidth;
|
|
253
|
+
lastResizeHeight = currentHeight;
|
|
254
|
+
// Step 6: Debug - log widget count before resize
|
|
255
|
+
const widgetCountBefore = screen.children?.length || 0;
|
|
256
|
+
const commandLineCount = screen.children?.filter((w) => w === widgets.commandLine || w.name === 'commandLine').length || 0;
|
|
257
|
+
// Step 5: Make layout deterministic - read terminal size fresh
|
|
258
|
+
const terminalWidth = screen.width;
|
|
259
|
+
const terminalHeight = screen.height;
|
|
260
|
+
// Recompute layout from scratch (deterministic)
|
|
261
|
+
const newLayoutResult = computePhase1Layout(terminalWidth, terminalHeight);
|
|
262
|
+
if (!newLayoutResult.ok || !newLayoutResult.layout) {
|
|
263
|
+
eventBus.emit({
|
|
264
|
+
tag: 'SYS',
|
|
265
|
+
msg: `Terminal too small: ${currentWidth}x${currentHeight} (need ${MIN_WIDTH}x${MIN_HEIGHT})`,
|
|
266
|
+
level: 'WARN'
|
|
267
|
+
});
|
|
268
|
+
return;
|
|
269
|
+
}
|
|
270
|
+
const newLayout = newLayoutResult.layout;
|
|
271
|
+
// Step 2: Update widget positions/sizes ONLY (no recreate, no re-append)
|
|
272
|
+
// Step 5: Layout is deterministic - computed from scratch each time
|
|
273
|
+
updateWidgetLayout(widgets.posture, newLayout.posture);
|
|
274
|
+
updateWidgetLayout(widgets.resources, newLayout.resources);
|
|
275
|
+
updateWidgetLayout(widgets.assets, newLayout.assets);
|
|
276
|
+
updateWidgetLayout(widgets.operations, newLayout.operations);
|
|
277
|
+
updateWidgetLayout(widgets.network, newLayout.network);
|
|
278
|
+
updateWidgetLayout(widgets.capabilities, newLayout.capabilities);
|
|
279
|
+
// Update status strip and command line (Step 5: deterministic calculation)
|
|
280
|
+
const statusWidth = Math.floor(newLayout.commandLine.width * 0.2);
|
|
281
|
+
const commandWidth = newLayout.commandLine.width - statusWidth - 1;
|
|
282
|
+
updateWidgetLayout(widgets.statusStrip, {
|
|
283
|
+
top: newLayout.commandLine.top,
|
|
284
|
+
left: newLayout.commandLine.left,
|
|
285
|
+
width: statusWidth,
|
|
286
|
+
height: newLayout.commandLine.height,
|
|
287
|
+
});
|
|
288
|
+
updateWidgetLayout(widgets.commandLine, {
|
|
289
|
+
top: newLayout.commandLine.top,
|
|
290
|
+
left: newLayout.commandLine.left + statusWidth + 1,
|
|
291
|
+
width: commandWidth,
|
|
292
|
+
height: newLayout.commandLine.height,
|
|
293
|
+
});
|
|
294
|
+
// Update all panel content (may need to reflow for new width)
|
|
295
|
+
updateAllPanels(widgets);
|
|
296
|
+
// Render
|
|
297
|
+
screen.render();
|
|
298
|
+
// Step 6: Debug - log widget count after resize
|
|
299
|
+
const widgetCountAfter = screen.children?.length || 0;
|
|
300
|
+
const commandLineCountAfter = screen.children?.filter((w) => w === widgets.commandLine || w.name === 'commandLine').length || 0;
|
|
301
|
+
if (widgetCountAfter !== widgetCountBefore) {
|
|
302
|
+
eventBus.emit({
|
|
303
|
+
tag: 'ERR',
|
|
304
|
+
msg: `WIDGET COUNT CHANGED: ${widgetCountBefore} → ${widgetCountAfter} (duplication detected!)`,
|
|
305
|
+
level: 'ERROR'
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
if (commandLineCountAfter > 1) {
|
|
309
|
+
eventBus.emit({
|
|
310
|
+
tag: 'ERR',
|
|
311
|
+
msg: `DOUBLE COMMAND LINE: ${commandLineCountAfter} command lines detected!`,
|
|
312
|
+
level: 'ERROR'
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
eventBus.emit({
|
|
316
|
+
tag: 'SYS',
|
|
317
|
+
msg: `Resized to ${terminalWidth}x${terminalHeight} (widgets: ${widgetCountAfter})`,
|
|
318
|
+
level: 'INFO'
|
|
319
|
+
});
|
|
320
|
+
}, RESIZE_DEBOUNCE_MS);
|
|
321
|
+
};
|
|
322
|
+
screen.on('resize', resizeHandler);
|
|
323
|
+
unbindFns.push(() => {
|
|
324
|
+
// Use off() method (EventEmitter API) instead of removeListener
|
|
325
|
+
screen.off('resize', resizeHandler);
|
|
326
|
+
if (resizeDebounceTimer) {
|
|
327
|
+
clearTimeout(resizeDebounceTimer);
|
|
328
|
+
}
|
|
329
|
+
});
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* Update widget layout (geometry only)
|
|
333
|
+
*/
|
|
334
|
+
function updateWidgetLayout(widget, rect) {
|
|
335
|
+
widget.top = rect.top;
|
|
336
|
+
widget.left = rect.left;
|
|
337
|
+
widget.width = rect.width;
|
|
338
|
+
widget.height = rect.height;
|
|
339
|
+
}
|
|
340
|
+
/**
|
|
341
|
+
* Create a read-only panel
|
|
342
|
+
*/
|
|
343
|
+
function createPanel(screen, rect, title) {
|
|
344
|
+
const panel = blessedLib.box({
|
|
345
|
+
top: rect.top,
|
|
346
|
+
left: rect.left,
|
|
347
|
+
width: rect.width,
|
|
348
|
+
height: rect.height,
|
|
349
|
+
border: { type: 'line' },
|
|
350
|
+
tags: true,
|
|
351
|
+
content: '',
|
|
352
|
+
style: {
|
|
353
|
+
border: { fg: 'cyan' },
|
|
354
|
+
},
|
|
355
|
+
wrap: false,
|
|
356
|
+
scrollable: false,
|
|
357
|
+
clickable: false,
|
|
358
|
+
keys: false,
|
|
359
|
+
mouse: false,
|
|
360
|
+
input: false,
|
|
361
|
+
focusable: false,
|
|
362
|
+
});
|
|
363
|
+
panel.setLabel(` {cyan-fg}${title}{/}`);
|
|
364
|
+
return panel;
|
|
365
|
+
}
|
|
366
|
+
/**
|
|
367
|
+
* Create status strip
|
|
368
|
+
*/
|
|
369
|
+
function createStatusStrip(screen, layout) {
|
|
370
|
+
const statusWidth = Math.floor(layout.commandLine.width * 0.2);
|
|
371
|
+
const strip = blessedLib.box({
|
|
372
|
+
top: layout.commandLine.top,
|
|
373
|
+
left: layout.commandLine.left,
|
|
374
|
+
width: statusWidth,
|
|
375
|
+
height: layout.commandLine.height,
|
|
376
|
+
border: { type: 'line' },
|
|
377
|
+
tags: true,
|
|
378
|
+
content: ' OFFLINE',
|
|
379
|
+
style: {
|
|
380
|
+
border: { fg: 'grey' },
|
|
381
|
+
fg: 'grey',
|
|
382
|
+
},
|
|
383
|
+
clickable: false,
|
|
384
|
+
keys: false,
|
|
385
|
+
mouse: false,
|
|
386
|
+
input: false,
|
|
387
|
+
focusable: false,
|
|
388
|
+
});
|
|
389
|
+
strip.setLabel(' {grey-fg}STATUS{/}');
|
|
390
|
+
return strip;
|
|
391
|
+
}
|
|
392
|
+
/**
|
|
393
|
+
* Create command line
|
|
394
|
+
*/
|
|
395
|
+
function createCommandLine(screen, layout) {
|
|
396
|
+
const statusWidth = Math.floor(layout.commandLine.width * 0.2);
|
|
397
|
+
const cmdLine = blessedLib.box({
|
|
398
|
+
top: layout.commandLine.top,
|
|
399
|
+
left: layout.commandLine.left + statusWidth + 1,
|
|
400
|
+
width: layout.commandLine.width - statusWidth - 1,
|
|
401
|
+
height: layout.commandLine.height,
|
|
402
|
+
border: { type: 'line' },
|
|
403
|
+
tags: true,
|
|
404
|
+
content: PROMPT,
|
|
405
|
+
style: {
|
|
406
|
+
border: { fg: 'cyan' },
|
|
407
|
+
fg: 'white',
|
|
408
|
+
},
|
|
409
|
+
focusable: true,
|
|
410
|
+
keyable: true,
|
|
411
|
+
input: false,
|
|
412
|
+
keys: false,
|
|
413
|
+
});
|
|
414
|
+
cmdLine.setLabel(' {cyan-fg}COMMAND LINE{/}');
|
|
415
|
+
return cmdLine;
|
|
416
|
+
}
|
|
417
|
+
/**
|
|
418
|
+
* Setup input handling
|
|
419
|
+
*/
|
|
420
|
+
function setupInputHandling(screen, commandLine, unbindFns) {
|
|
421
|
+
const updateDisplay = () => {
|
|
422
|
+
const availableWidth = commandLine.width - 4;
|
|
423
|
+
const fullText = commandInputValue;
|
|
424
|
+
const cursorIndex = cursorPosition;
|
|
425
|
+
if (cursorIndex - scrollOffset >= availableWidth - 1) {
|
|
426
|
+
scrollOffset = cursorIndex - availableWidth + 2;
|
|
427
|
+
}
|
|
428
|
+
if (cursorIndex < scrollOffset) {
|
|
429
|
+
scrollOffset = Math.max(0, cursorIndex - 5);
|
|
430
|
+
}
|
|
431
|
+
const visibleStart = scrollOffset;
|
|
432
|
+
const visibleEnd = Math.min(fullText.length, visibleStart + availableWidth - 1);
|
|
433
|
+
let visibleText = fullText.substring(visibleStart, visibleEnd);
|
|
434
|
+
const cursorPosInVisible = cursorIndex - visibleStart;
|
|
435
|
+
const beforeCursor = visibleText.substring(0, cursorPosInVisible);
|
|
436
|
+
const afterCursor = visibleText.substring(cursorPosInVisible);
|
|
437
|
+
const displayValue = beforeCursor + '{inverse} {/}' + afterCursor;
|
|
438
|
+
commandLine.setContent(displayValue);
|
|
439
|
+
screen.render();
|
|
440
|
+
};
|
|
441
|
+
const handleSubmit = async (value) => {
|
|
442
|
+
const commandPart = value.startsWith(PROMPT) ? value.slice(PROMPT.length).trim() : value.trim();
|
|
443
|
+
if (!commandPart) {
|
|
444
|
+
return;
|
|
445
|
+
}
|
|
446
|
+
// Add to history
|
|
447
|
+
commandHistory.push(commandPart);
|
|
448
|
+
if (commandHistory.length > 100) {
|
|
449
|
+
commandHistory.shift();
|
|
450
|
+
}
|
|
451
|
+
historyIndex = -1;
|
|
452
|
+
// Clear input
|
|
453
|
+
commandInputValue = PROMPT;
|
|
454
|
+
cursorPosition = PROMPT.length;
|
|
455
|
+
scrollOffset = 0;
|
|
456
|
+
updateDisplay();
|
|
457
|
+
// Emit command event
|
|
458
|
+
eventBus.emit({
|
|
459
|
+
tag: 'CMD',
|
|
460
|
+
msg: commandPart,
|
|
461
|
+
level: 'INFO'
|
|
462
|
+
});
|
|
463
|
+
// Execute command
|
|
464
|
+
const parsed = parse(commandPart);
|
|
465
|
+
if (!parsed.name)
|
|
466
|
+
return;
|
|
467
|
+
const ctx = {};
|
|
468
|
+
try {
|
|
469
|
+
const result = await execute(parsed, ctx);
|
|
470
|
+
// Emit result events
|
|
471
|
+
for (const event of result.events) {
|
|
472
|
+
eventBus.emit(event);
|
|
473
|
+
}
|
|
474
|
+
// Handle UI state update
|
|
475
|
+
if (result.uiStateUpdate) {
|
|
476
|
+
currentUiState = result.uiStateUpdate(currentUiState);
|
|
477
|
+
const runtime = getUIRuntime();
|
|
478
|
+
updateAllPanels(runtime.widgets);
|
|
479
|
+
runtime.screen.render();
|
|
480
|
+
}
|
|
481
|
+
// Handle actions
|
|
482
|
+
if (result.action === UiAction.EXIT) {
|
|
483
|
+
cleanExit(0);
|
|
484
|
+
}
|
|
485
|
+
else if (result.action === UiAction.CLEAR_FEED) {
|
|
486
|
+
feedStore.clear();
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
catch (error) {
|
|
490
|
+
eventBus.emit({
|
|
491
|
+
tag: 'ERR',
|
|
492
|
+
msg: `Command error: ${error.message}`,
|
|
493
|
+
level: 'ERROR'
|
|
494
|
+
});
|
|
495
|
+
}
|
|
496
|
+
};
|
|
497
|
+
const stdinListener = (data) => {
|
|
498
|
+
const input = data.toString();
|
|
499
|
+
if (input === '\x03') { // Ctrl+C
|
|
500
|
+
cleanExit(0);
|
|
501
|
+
return;
|
|
502
|
+
}
|
|
503
|
+
if (input === '\r' || input === '\n') { // Enter
|
|
504
|
+
const cmd = commandInputValue.startsWith(PROMPT)
|
|
505
|
+
? commandInputValue.slice(PROMPT.length).trim()
|
|
506
|
+
: commandInputValue.trim();
|
|
507
|
+
if (cmd) {
|
|
508
|
+
handleSubmit(commandInputValue).catch(err => {
|
|
509
|
+
eventBus.emit({
|
|
510
|
+
tag: 'ERR',
|
|
511
|
+
msg: `Handler error: ${err.message}`,
|
|
512
|
+
level: 'ERROR'
|
|
513
|
+
});
|
|
514
|
+
});
|
|
515
|
+
}
|
|
516
|
+
else {
|
|
517
|
+
commandInputValue = PROMPT;
|
|
518
|
+
cursorPosition = PROMPT.length;
|
|
519
|
+
updateDisplay();
|
|
520
|
+
}
|
|
521
|
+
return;
|
|
522
|
+
}
|
|
523
|
+
if (input === '\x7f' || input === '\x08') { // Backspace
|
|
524
|
+
if (cursorPosition > PROMPT.length) {
|
|
525
|
+
commandInputValue = commandInputValue.substring(0, cursorPosition - 1) + commandInputValue.substring(cursorPosition);
|
|
526
|
+
cursorPosition--;
|
|
527
|
+
updateDisplay();
|
|
528
|
+
}
|
|
529
|
+
return;
|
|
530
|
+
}
|
|
531
|
+
if (input === '\x1b[D') { // Left arrow
|
|
532
|
+
if (cursorPosition > PROMPT.length) {
|
|
533
|
+
cursorPosition--;
|
|
534
|
+
updateDisplay();
|
|
535
|
+
}
|
|
536
|
+
return;
|
|
537
|
+
}
|
|
538
|
+
if (input === '\x1b[C') { // Right arrow
|
|
539
|
+
if (cursorPosition < commandInputValue.length) {
|
|
540
|
+
cursorPosition++;
|
|
541
|
+
updateDisplay();
|
|
542
|
+
}
|
|
543
|
+
return;
|
|
544
|
+
}
|
|
545
|
+
// Printable characters
|
|
546
|
+
if (input.length === 1 && input >= ' ' && input <= '~') {
|
|
547
|
+
commandInputValue = commandInputValue.substring(0, cursorPosition) + input + commandInputValue.substring(cursorPosition);
|
|
548
|
+
cursorPosition++;
|
|
549
|
+
updateDisplay();
|
|
550
|
+
}
|
|
551
|
+
};
|
|
552
|
+
process.stdin.on('data', stdinListener);
|
|
553
|
+
unbindFns.push(() => {
|
|
554
|
+
process.stdin.removeListener('data', stdinListener);
|
|
555
|
+
});
|
|
556
|
+
// Focus command line
|
|
557
|
+
commandLine.focus();
|
|
558
|
+
screen.focused = commandLine;
|
|
559
|
+
}
|
|
560
|
+
/**
|
|
561
|
+
* Update all panel content
|
|
562
|
+
*/
|
|
563
|
+
function updateAllPanels(widgets) {
|
|
564
|
+
updatePanel(widgets.posture, renderPosturePanel(currentUiState.posture));
|
|
565
|
+
updatePanel(widgets.resources, renderResourcesPanel(currentUiState.resources));
|
|
566
|
+
updatePanel(widgets.assets, renderAssetsPanel(currentUiState.assets));
|
|
567
|
+
updateOperationsPanel(widgets.operations);
|
|
568
|
+
updatePanel(widgets.network, renderNetworkPanel(currentUiState.network));
|
|
569
|
+
updatePanel(widgets.capabilities, renderCapabilitiesPanel(currentUiState.capabilities));
|
|
570
|
+
// Update status strip
|
|
571
|
+
const statusValue = currentUiState.statusStrip;
|
|
572
|
+
if (isAvailable(statusValue)) {
|
|
573
|
+
const data = statusValue.value;
|
|
574
|
+
widgets.statusStrip.setContent(` ${data.left} | ${data.right} `);
|
|
575
|
+
}
|
|
576
|
+
else {
|
|
577
|
+
widgets.statusStrip.setContent(' OFFLINE');
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
/**
|
|
581
|
+
* Update a panel with content lines
|
|
582
|
+
*/
|
|
583
|
+
function updatePanel(panel, lines) {
|
|
584
|
+
const panelWidth = panel.width;
|
|
585
|
+
const panelHeight = panel.height;
|
|
586
|
+
const innerWidth = Math.max(1, panelWidth - 4);
|
|
587
|
+
const innerHeight = Math.max(1, panelHeight - 2);
|
|
588
|
+
const truncatedLines = lines.slice(0, innerHeight).map(line => {
|
|
589
|
+
if (line.length > innerWidth) {
|
|
590
|
+
return line.substring(0, innerWidth - 3) + '...';
|
|
591
|
+
}
|
|
592
|
+
return line;
|
|
593
|
+
});
|
|
594
|
+
const content = '\n ' + truncatedLines.join('\n ');
|
|
595
|
+
panel.setContent(content);
|
|
596
|
+
}
|
|
597
|
+
/**
|
|
598
|
+
* Update operations panel
|
|
599
|
+
*/
|
|
600
|
+
function updateOperationsPanel(panel) {
|
|
601
|
+
const panelHeight = panel.height;
|
|
602
|
+
const panelWidth = panel.width;
|
|
603
|
+
const innerHeight = Math.max(1, panelHeight - 2);
|
|
604
|
+
const innerWidth = Math.max(1, panelWidth - 2);
|
|
605
|
+
const events = feedStore.getLatest(innerHeight);
|
|
606
|
+
const lines = [];
|
|
607
|
+
if (events.length === 0) {
|
|
608
|
+
lines.push('No operations yet');
|
|
609
|
+
}
|
|
610
|
+
else {
|
|
611
|
+
for (const event of events.slice(-innerHeight)) {
|
|
612
|
+
const time = new Date(event.ts).toLocaleTimeString();
|
|
613
|
+
const line = `${time} [${event.tag}] ${event.msg}`;
|
|
614
|
+
if (line.length > innerWidth) {
|
|
615
|
+
lines.push(line.substring(0, innerWidth - 3) + '...');
|
|
616
|
+
}
|
|
617
|
+
else {
|
|
618
|
+
lines.push(line);
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
const content = '\n ' + lines.join('\n ');
|
|
623
|
+
panel.setContent(content);
|
|
624
|
+
}
|
|
625
|
+
/**
|
|
626
|
+
* Start background state updates
|
|
627
|
+
*/
|
|
628
|
+
function startBackgroundUpdates(widgets, screen) {
|
|
629
|
+
const interval = setInterval(async () => {
|
|
630
|
+
try {
|
|
631
|
+
const newState = await buildUiState(currentUiState);
|
|
632
|
+
currentUiState = newState;
|
|
633
|
+
updateAllPanels(widgets);
|
|
634
|
+
screen.render();
|
|
635
|
+
}
|
|
636
|
+
catch (error) {
|
|
637
|
+
// Ignore errors
|
|
638
|
+
}
|
|
639
|
+
}, 1500);
|
|
640
|
+
const runtime = getUIRuntime();
|
|
641
|
+
runtime.unbindFns.push(() => clearInterval(interval));
|
|
642
|
+
}
|
|
643
|
+
/**
|
|
644
|
+
* Step 4: Clean exit
|
|
645
|
+
*/
|
|
646
|
+
function cleanExit(code) {
|
|
647
|
+
destroyUIRuntime();
|
|
648
|
+
// Restore terminal
|
|
649
|
+
if (process.stdout.isTTY) {
|
|
650
|
+
process.stdout.write('\x1b[?25h'); // Show cursor
|
|
651
|
+
process.stdout.write('\x1b[?1049l'); // Exit alternate screen
|
|
652
|
+
}
|
|
653
|
+
process.exit(code);
|
|
654
|
+
}
|
|
655
|
+
//# sourceMappingURL=phase1RuntimeClean.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"phase1RuntimeClean.js","sourceRoot":"","sources":["../../../../src/ui/v3/ui/phase1RuntimeClean.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,OAAO,MAAM,aAAa,CAAC;AAElC,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtF,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAkC,MAAM,gBAAgB,CAAC;AAC3H,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE/C,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,iBAAi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,OAAO,KAAK,EAAE,CAAC;YACf,gBAAgB;QAClB,CAAC;IACH,CAAC,EAAE,IAAI,CAAC,CAAC;IAET,MAAM,OAAO,GAAG,YAAY,EAAE,CAAC;IAC/B,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC;AACxD,CAAC;AAED;;GAEG;AACH,SAAS,SAAS,CAAC,IAAY;IAC7B,gBAAgB,EAAE,CAAC;IAEnB,mBAAmB;IACnB,IAAI,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;QACzB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,cAAc;QACjD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,wBAAwB;IAC/D,CAAC;IAED,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACrB,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UI Runtime Singleton
|
|
3
|
+
*
|
|
4
|
+
* Single instance guard and lifecycle management for the TUI.
|
|
5
|
+
* Ensures only one UI instance exists and handles clean shutdown.
|
|
6
|
+
*/
|
|
7
|
+
import type { Widgets } from 'neo-blessed';
|
|
8
|
+
export interface UIWidgets {
|
|
9
|
+
posture: Widgets.Box;
|
|
10
|
+
resources: Widgets.Box;
|
|
11
|
+
assets: Widgets.Box;
|
|
12
|
+
operations: Widgets.Box;
|
|
13
|
+
network: Widgets.Box;
|
|
14
|
+
capabilities: Widgets.Box;
|
|
15
|
+
statusStrip: Widgets.Box;
|
|
16
|
+
commandLine: Widgets.Box;
|
|
17
|
+
}
|
|
18
|
+
export interface UIRuntime {
|
|
19
|
+
screen: Widgets.Screen;
|
|
20
|
+
widgets: UIWidgets;
|
|
21
|
+
isMounted: boolean;
|
|
22
|
+
unbindFns: Array<() => void>;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Check if UI is already mounted
|
|
26
|
+
*/
|
|
27
|
+
export declare function isUIMounted(): boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Get the current UI runtime (throws if not mounted)
|
|
30
|
+
*/
|
|
31
|
+
export declare function getUIRuntime(): UIRuntime;
|
|
32
|
+
/**
|
|
33
|
+
* Set the UI runtime (only allowed once)
|
|
34
|
+
*/
|
|
35
|
+
export declare function setUIRuntime(runtime: UIRuntime): void;
|
|
36
|
+
/**
|
|
37
|
+
* Destroy the UI runtime and reset singleton
|
|
38
|
+
*/
|
|
39
|
+
export declare function destroyUIRuntime(): void;
|
|
40
|
+
//# sourceMappingURL=uiRuntime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uiRuntime.d.ts","sourceRoot":"","sources":["../../../../src/ui/v3/ui/uiRuntime.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE3C,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC;IACvB,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC,GAAG,CAAC;IACxB,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC;IACrB,YAAY,EAAE,OAAO,CAAC,GAAG,CAAC;IAC1B,WAAW,EAAE,OAAO,CAAC,GAAG,CAAC;IACzB,WAAW,EAAE,OAAO,CAAC,GAAG,CAAC;CAC1B;AAED,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC;IACvB,OAAO,EAAE,SAAS,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,KAAK,CAAC,MAAM,IAAI,CAAC,CAAC;CAC9B;AAKD;;GAEG;AACH,wBAAgB,WAAW,IAAI,OAAO,CAErC;AAED;;GAEG;AACH,wBAAgB,YAAY,IAAI,SAAS,CAKxC;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,SAAS,GAAG,IAAI,CAKrD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAuBvC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UI Runtime Singleton
|
|
3
|
+
*
|
|
4
|
+
* Single instance guard and lifecycle management for the TUI.
|
|
5
|
+
* Ensures only one UI instance exists and handles clean shutdown.
|
|
6
|
+
*/
|
|
7
|
+
// Global singleton guard
|
|
8
|
+
let uiRuntime = null;
|
|
9
|
+
/**
|
|
10
|
+
* Check if UI is already mounted
|
|
11
|
+
*/
|
|
12
|
+
export function isUIMounted() {
|
|
13
|
+
return uiRuntime !== null && uiRuntime.isMounted;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Get the current UI runtime (throws if not mounted)
|
|
17
|
+
*/
|
|
18
|
+
export function getUIRuntime() {
|
|
19
|
+
if (!uiRuntime || !uiRuntime.isMounted) {
|
|
20
|
+
throw new Error('UI not mounted');
|
|
21
|
+
}
|
|
22
|
+
return uiRuntime;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Set the UI runtime (only allowed once)
|
|
26
|
+
*/
|
|
27
|
+
export function setUIRuntime(runtime) {
|
|
28
|
+
if (uiRuntime !== null) {
|
|
29
|
+
throw new Error('UI already mounted - cannot mount twice');
|
|
30
|
+
}
|
|
31
|
+
uiRuntime = runtime;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Destroy the UI runtime and reset singleton
|
|
35
|
+
*/
|
|
36
|
+
export function destroyUIRuntime() {
|
|
37
|
+
if (!uiRuntime)
|
|
38
|
+
return;
|
|
39
|
+
// Call all unbind functions
|
|
40
|
+
for (const unbind of uiRuntime.unbindFns) {
|
|
41
|
+
try {
|
|
42
|
+
unbind();
|
|
43
|
+
}
|
|
44
|
+
catch (e) {
|
|
45
|
+
// Ignore errors during cleanup
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
// Destroy screen
|
|
49
|
+
try {
|
|
50
|
+
if (uiRuntime.screen) {
|
|
51
|
+
uiRuntime.screen.destroy();
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
catch (e) {
|
|
55
|
+
// Ignore errors
|
|
56
|
+
}
|
|
57
|
+
// Reset singleton
|
|
58
|
+
uiRuntime = null;
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=uiRuntime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uiRuntime.js","sourceRoot":"","sources":["../../../../src/ui/v3/ui/uiRuntime.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAsBH,yBAAyB;AACzB,IAAI,SAAS,GAAqB,IAAI,CAAC;AAEvC;;GAEG;AACH,MAAM,UAAU,WAAW;IACzB,OAAO,SAAS,KAAK,IAAI,IAAI,SAAS,CAAC,SAAS,CAAC;AACnD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,YAAY;IAC1B,IAAI,CAAC,SAAS,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,CAAC;QACvC,MAAM,IAAI,KAAK,CAAC,gBAAgB,CAAC,CAAC;IACpC,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,YAAY,CAAC,OAAkB;IAC7C,IAAI,SAAS,KAAK,IAAI,EAAE,CAAC;QACvB,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;IAC7D,CAAC;IACD,SAAS,GAAG,OAAO,CAAC;AACtB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB;IAC9B,IAAI,CAAC,SAAS;QAAE,OAAO;IAEvB,4BAA4B;IAC5B,KAAK,MAAM,MAAM,IAAI,SAAS,CAAC,SAAS,EAAE,CAAC;QACzC,IAAI,CAAC;YACH,MAAM,EAAE,CAAC;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