4runr-os 1.0.98 → 1.0.100
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/collectors/resources.d.ts +3 -3
- package/dist/ui/v3/collectors/resources.d.ts.map +1 -1
- package/dist/ui/v3/collectors/resources.js +13 -4
- package/dist/ui/v3/collectors/resources.js.map +1 -1
- package/dist/ui/v3/commands/router.js +3 -3
- package/dist/ui/v3/commands/router.js.map +1 -1
- package/dist/ui/v3/state/assertUiState.d.ts +27 -0
- package/dist/ui/v3/state/assertUiState.d.ts.map +1 -0
- package/dist/ui/v3/state/assertUiState.js +85 -0
- package/dist/ui/v3/state/assertUiState.js.map +1 -0
- package/dist/ui/v3/state/defaultState.d.ts +9 -2
- package/dist/ui/v3/state/defaultState.d.ts.map +1 -1
- package/dist/ui/v3/state/defaultState.js +15 -3
- package/dist/ui/v3/state/defaultState.js.map +1 -1
- package/dist/ui/v3/state/uiState.d.ts +13 -3
- package/dist/ui/v3/state/uiState.d.ts.map +1 -1
- package/dist/ui/v3/state/uiState.js +6 -1
- package/dist/ui/v3/state/uiState.js.map +1 -1
- package/dist/ui/v3/state/uiStateBuilder.d.ts +6 -1
- package/dist/ui/v3/state/uiStateBuilder.d.ts.map +1 -1
- package/dist/ui/v3/state/uiStateBuilder.js +18 -3
- package/dist/ui/v3/state/uiStateBuilder.js.map +1 -1
- package/dist/ui/v3/state/uiStateTypes.d.ts +52 -0
- package/dist/ui/v3/state/uiStateTypes.d.ts.map +1 -0
- package/dist/ui/v3/state/uiStateTypes.js +8 -0
- package/dist/ui/v3/state/uiStateTypes.js.map +1 -0
- package/dist/ui/v3/state/value.d.ts +40 -12
- package/dist/ui/v3/state/value.d.ts.map +1 -1
- package/dist/ui/v3/state/value.js +39 -6
- package/dist/ui/v3/state/value.js.map +1 -1
- package/dist/ui/v3/ui/panels/AssetsPanel.d.ts +16 -0
- package/dist/ui/v3/ui/panels/AssetsPanel.d.ts.map +1 -0
- package/dist/ui/v3/ui/panels/AssetsPanel.js +29 -0
- package/dist/ui/v3/ui/panels/AssetsPanel.js.map +1 -0
- package/dist/ui/v3/ui/panels/CapabilitiesPanel.d.ts +16 -0
- package/dist/ui/v3/ui/panels/CapabilitiesPanel.d.ts.map +1 -0
- package/dist/ui/v3/ui/panels/CapabilitiesPanel.js +27 -0
- package/dist/ui/v3/ui/panels/CapabilitiesPanel.js.map +1 -0
- package/dist/ui/v3/ui/panels/NetworkPanel.d.ts +16 -0
- package/dist/ui/v3/ui/panels/NetworkPanel.d.ts.map +1 -0
- package/dist/ui/v3/ui/panels/NetworkPanel.js +24 -0
- package/dist/ui/v3/ui/panels/NetworkPanel.js.map +1 -0
- package/dist/ui/v3/ui/panels/PosturePanel.d.ts +16 -0
- package/dist/ui/v3/ui/panels/PosturePanel.d.ts.map +1 -0
- package/dist/ui/v3/ui/panels/PosturePanel.js +24 -0
- package/dist/ui/v3/ui/panels/PosturePanel.js.map +1 -0
- package/dist/ui/v3/ui/panels/ResourcesPanel.d.ts +6 -3
- package/dist/ui/v3/ui/panels/ResourcesPanel.d.ts.map +1 -1
- package/dist/ui/v3/ui/panels/ResourcesPanel.js +25 -29
- package/dist/ui/v3/ui/panels/ResourcesPanel.js.map +1 -1
- package/dist/ui/v3/ui/phase1Runtime.d.ts.map +1 -1
- package/dist/ui/v3/ui/phase1Runtime.js +163 -18
- package/dist/ui/v3/ui/phase1Runtime.js.map +1 -1
- package/dist/ui/v3/v1Adapters/__tests__/smoke.test.d.ts +16 -0
- package/dist/ui/v3/v1Adapters/__tests__/smoke.test.d.ts.map +1 -0
- package/dist/ui/v3/v1Adapters/__tests__/smoke.test.js +141 -0
- package/dist/ui/v3/v1Adapters/__tests__/smoke.test.js.map +1 -0
- package/dist/ui/v3/v1Adapters/agents.d.ts +52 -0
- package/dist/ui/v3/v1Adapters/agents.d.ts.map +1 -0
- package/dist/ui/v3/v1Adapters/agents.js +134 -0
- package/dist/ui/v3/v1Adapters/agents.js.map +1 -0
- package/dist/ui/v3/v1Adapters/config.d.ts +62 -0
- package/dist/ui/v3/v1Adapters/config.d.ts.map +1 -0
- package/dist/ui/v3/v1Adapters/config.js +79 -0
- package/dist/ui/v3/v1Adapters/config.js.map +1 -0
- package/dist/ui/v3/v1Adapters/connect.d.ts +49 -0
- package/dist/ui/v3/v1Adapters/connect.d.ts.map +1 -0
- package/dist/ui/v3/v1Adapters/connect.js +118 -0
- package/dist/ui/v3/v1Adapters/connect.js.map +1 -0
- package/dist/ui/v3/v1Adapters/runs.d.ts +38 -0
- package/dist/ui/v3/v1Adapters/runs.d.ts.map +1 -0
- package/dist/ui/v3/v1Adapters/runs.js +93 -0
- package/dist/ui/v3/v1Adapters/runs.js.map +1 -0
- package/package.json +1 -1
|
@@ -1,31 +1,64 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Value Protocol
|
|
2
|
+
* Section 4: Value Protocol
|
|
3
3
|
*
|
|
4
4
|
* Explicit availability semantics for data.
|
|
5
5
|
* Prevents fake values and blank panels.
|
|
6
|
+
*
|
|
7
|
+
* Hard rules:
|
|
8
|
+
* - AVAILABLE must include value
|
|
9
|
+
* - UNAVAILABLE/UNKNOWN must not include value
|
|
10
|
+
* - No other fields
|
|
6
11
|
*/
|
|
7
12
|
/**
|
|
8
13
|
* Create an AVAILABLE value
|
|
9
14
|
*/
|
|
10
|
-
export function available(
|
|
11
|
-
return {
|
|
15
|
+
export function available(value) {
|
|
16
|
+
return { availability: "AVAILABLE", value };
|
|
12
17
|
}
|
|
13
18
|
/**
|
|
14
19
|
* Create an UNAVAILABLE value
|
|
15
20
|
*/
|
|
16
21
|
export function unavailable(reason, nextAction) {
|
|
17
|
-
return {
|
|
22
|
+
return { availability: "UNAVAILABLE", reason, nextAction };
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Create an UNKNOWN value
|
|
26
|
+
*/
|
|
27
|
+
export function unknown(reason, nextAction) {
|
|
28
|
+
return { availability: "UNKNOWN", reason, nextAction };
|
|
18
29
|
}
|
|
19
30
|
/**
|
|
20
31
|
* Type guard: check if value is AVAILABLE
|
|
21
32
|
*/
|
|
22
33
|
export function isAvailable(value) {
|
|
23
|
-
return value.
|
|
34
|
+
return value.availability === "AVAILABLE";
|
|
24
35
|
}
|
|
25
36
|
/**
|
|
26
37
|
* Type guard: check if value is UNAVAILABLE
|
|
27
38
|
*/
|
|
28
39
|
export function isUnavailable(value) {
|
|
29
|
-
return value.
|
|
40
|
+
return value.availability === "UNAVAILABLE";
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Type guard: check if value is UNKNOWN
|
|
44
|
+
*/
|
|
45
|
+
export function isUnknown(value) {
|
|
46
|
+
return value.availability === "UNKNOWN";
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Section 4: Shared helper to render Value<T>
|
|
50
|
+
*
|
|
51
|
+
* Handles AVAILABLE, UNAVAILABLE, and UNKNOWN states consistently
|
|
52
|
+
* Never renders empty string - always shows meaningful content
|
|
53
|
+
*/
|
|
54
|
+
export function renderValue(v, renderAvailable) {
|
|
55
|
+
if (isAvailable(v)) {
|
|
56
|
+
return renderAvailable(v.value);
|
|
57
|
+
}
|
|
58
|
+
// UNAVAILABLE or UNKNOWN - render standard unavailable block
|
|
59
|
+
const reason = v.reason || "Not initialized";
|
|
60
|
+
const nextAction = v.nextAction || 'Run "help"';
|
|
61
|
+
const status = v.availability;
|
|
62
|
+
return `UNAVAILABLE\nReason: ${reason}\nNext: ${nextAction}`;
|
|
30
63
|
}
|
|
31
64
|
//# sourceMappingURL=value.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"value.js","sourceRoot":"","sources":["../../../../src/ui/v3/state/value.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"value.js","sourceRoot":"","sources":["../../../../src/ui/v3/state/value.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AASH;;GAEG;AACH,MAAM,UAAU,SAAS,CAAI,KAAQ;IACnC,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC;AAC9C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,WAAW,CAAI,MAAe,EAAE,UAAmB;IACjE,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC;AAC7D,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,OAAO,CAAI,MAAe,EAAE,UAAmB;IAC7D,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC;AACzD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,WAAW,CAAI,KAAe;IAC5C,OAAO,KAAK,CAAC,YAAY,KAAK,WAAW,CAAC;AAC5C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,aAAa,CAAI,KAAe;IAC9C,OAAO,KAAK,CAAC,YAAY,KAAK,aAAa,CAAC;AAC9C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,SAAS,CAAI,KAAe;IAC1C,OAAO,KAAK,CAAC,YAAY,KAAK,SAAS,CAAC;AAC1C,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,WAAW,CACzB,CAAW,EACX,eAAiC;IAEjC,IAAI,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC;QACnB,OAAO,eAAe,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IAClC,CAAC;IAED,6DAA6D;IAC7D,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,IAAI,iBAAiB,CAAC;IAC7C,MAAM,UAAU,GAAG,CAAC,CAAC,UAAU,IAAI,YAAY,CAAC;IAChD,MAAM,MAAM,GAAG,CAAC,CAAC,YAAY,CAAC;IAE9B,OAAO,wBAAwB,MAAM,WAAW,UAAU,EAAE,CAAC;AAC/D,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Section 4: Assets Panel Renderer
|
|
3
|
+
*
|
|
4
|
+
* Renders the ASSETS panel content.
|
|
5
|
+
* Handles Value<AssetsState> correctly - no blank panels.
|
|
6
|
+
*/
|
|
7
|
+
import type { Value } from '../../state/value.js';
|
|
8
|
+
import type { AssetsState } from '../../state/uiStateTypes.js';
|
|
9
|
+
/**
|
|
10
|
+
* Render Assets panel content
|
|
11
|
+
*
|
|
12
|
+
* Returns array of lines
|
|
13
|
+
* Uses renderValue helper for consistent UNAVAILABLE/UNKNOWN handling
|
|
14
|
+
*/
|
|
15
|
+
export declare function renderAssetsPanel(value: Value<AssetsState>): string[];
|
|
16
|
+
//# sourceMappingURL=AssetsPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AssetsPanel.d.ts","sourceRoot":"","sources":["../../../../../src/ui/v3/ui/panels/AssetsPanel.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAe/D;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,GAAG,MAAM,EAAE,CAGrE"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Section 4: Assets Panel Renderer
|
|
3
|
+
*
|
|
4
|
+
* Renders the ASSETS panel content.
|
|
5
|
+
* Handles Value<AssetsState> correctly - no blank panels.
|
|
6
|
+
*/
|
|
7
|
+
import { renderValue } from '../../state/value.js';
|
|
8
|
+
/**
|
|
9
|
+
* Render Assets panel content when AVAILABLE
|
|
10
|
+
*/
|
|
11
|
+
function renderAvailable(data) {
|
|
12
|
+
const lines = [];
|
|
13
|
+
lines.push(`Total: ${data.total}`);
|
|
14
|
+
lines.push(`Active: ${data.active}`);
|
|
15
|
+
lines.push(`Idle: ${data.idle}`);
|
|
16
|
+
lines.push(`Error: ${data.error}`);
|
|
17
|
+
return lines.join('\n');
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Render Assets panel content
|
|
21
|
+
*
|
|
22
|
+
* Returns array of lines
|
|
23
|
+
* Uses renderValue helper for consistent UNAVAILABLE/UNKNOWN handling
|
|
24
|
+
*/
|
|
25
|
+
export function renderAssetsPanel(value) {
|
|
26
|
+
const content = renderValue(value, renderAvailable);
|
|
27
|
+
return content.split('\n');
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=AssetsPanel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AssetsPanel.js","sourceRoot":"","sources":["../../../../../src/ui/v3/ui/panels/AssetsPanel.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD;;GAEG;AACH,SAAS,eAAe,CAAC,IAAiB;IACxC,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,KAAK,CAAC,IAAI,CAAC,UAAU,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;IACnC,KAAK,CAAC,IAAI,CAAC,WAAW,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;IACrC,KAAK,CAAC,IAAI,CAAC,SAAS,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;IACjC,KAAK,CAAC,IAAI,CAAC,UAAU,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;IACnC,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAC,KAAyB;IACzD,MAAM,OAAO,GAAG,WAAW,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC;IACpD,OAAO,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAC7B,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Section 4: Capabilities Panel Renderer
|
|
3
|
+
*
|
|
4
|
+
* Renders the CAPABILITIES panel content.
|
|
5
|
+
* Handles Value<CapabilitiesState> correctly - no blank panels.
|
|
6
|
+
*/
|
|
7
|
+
import type { Value } from '../../state/value.js';
|
|
8
|
+
import type { CapabilitiesState } from '../../state/uiStateTypes.js';
|
|
9
|
+
/**
|
|
10
|
+
* Render Capabilities panel content
|
|
11
|
+
*
|
|
12
|
+
* Returns array of lines
|
|
13
|
+
* Uses renderValue helper for consistent UNAVAILABLE/UNKNOWN handling
|
|
14
|
+
*/
|
|
15
|
+
export declare function renderCapabilitiesPanel(value: Value<CapabilitiesState>): string[];
|
|
16
|
+
//# sourceMappingURL=CapabilitiesPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CapabilitiesPanel.d.ts","sourceRoot":"","sources":["../../../../../src/ui/v3/ui/panels/CapabilitiesPanel.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAarE;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,KAAK,CAAC,iBAAiB,CAAC,GAAG,MAAM,EAAE,CAGjF"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Section 4: Capabilities Panel Renderer
|
|
3
|
+
*
|
|
4
|
+
* Renders the CAPABILITIES panel content.
|
|
5
|
+
* Handles Value<CapabilitiesState> correctly - no blank panels.
|
|
6
|
+
*/
|
|
7
|
+
import { renderValue } from '../../state/value.js';
|
|
8
|
+
/**
|
|
9
|
+
* Render Capabilities panel content when AVAILABLE
|
|
10
|
+
*/
|
|
11
|
+
function renderAvailable(data) {
|
|
12
|
+
if (data.items.length === 0) {
|
|
13
|
+
return 'No capabilities';
|
|
14
|
+
}
|
|
15
|
+
return data.items.join('\n');
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Render Capabilities panel content
|
|
19
|
+
*
|
|
20
|
+
* Returns array of lines
|
|
21
|
+
* Uses renderValue helper for consistent UNAVAILABLE/UNKNOWN handling
|
|
22
|
+
*/
|
|
23
|
+
export function renderCapabilitiesPanel(value) {
|
|
24
|
+
const content = renderValue(value, renderAvailable);
|
|
25
|
+
return content.split('\n');
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=CapabilitiesPanel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CapabilitiesPanel.js","sourceRoot":"","sources":["../../../../../src/ui/v3/ui/panels/CapabilitiesPanel.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD;;GAEG;AACH,SAAS,eAAe,CAAC,IAAuB;IAC9C,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC5B,OAAO,iBAAiB,CAAC;IAC3B,CAAC;IACD,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC/B,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,uBAAuB,CAAC,KAA+B;IACrE,MAAM,OAAO,GAAG,WAAW,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC;IACpD,OAAO,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAC7B,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Section 4: Network Panel Renderer
|
|
3
|
+
*
|
|
4
|
+
* Renders the NETWORK panel content.
|
|
5
|
+
* Handles Value<NetworkState> correctly - no blank panels.
|
|
6
|
+
*/
|
|
7
|
+
import type { Value } from '../../state/value.js';
|
|
8
|
+
import type { NetworkState } from '../../state/uiStateTypes.js';
|
|
9
|
+
/**
|
|
10
|
+
* Render Network panel content
|
|
11
|
+
*
|
|
12
|
+
* Returns array of lines
|
|
13
|
+
* Uses renderValue helper for consistent UNAVAILABLE/UNKNOWN handling
|
|
14
|
+
*/
|
|
15
|
+
export declare function renderNetworkPanel(value: Value<NetworkState>): string[];
|
|
16
|
+
//# sourceMappingURL=NetworkPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NetworkPanel.d.ts","sourceRoot":"","sources":["../../../../../src/ui/v3/ui/panels/NetworkPanel.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAUhE;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,KAAK,CAAC,YAAY,CAAC,GAAG,MAAM,EAAE,CAGvE"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Section 4: Network Panel Renderer
|
|
3
|
+
*
|
|
4
|
+
* Renders the NETWORK panel content.
|
|
5
|
+
* Handles Value<NetworkState> correctly - no blank panels.
|
|
6
|
+
*/
|
|
7
|
+
import { renderValue } from '../../state/value.js';
|
|
8
|
+
/**
|
|
9
|
+
* Render Network panel content when AVAILABLE
|
|
10
|
+
*/
|
|
11
|
+
function renderAvailable(data) {
|
|
12
|
+
return `Gateway: ${data.gateway}`;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Render Network panel content
|
|
16
|
+
*
|
|
17
|
+
* Returns array of lines
|
|
18
|
+
* Uses renderValue helper for consistent UNAVAILABLE/UNKNOWN handling
|
|
19
|
+
*/
|
|
20
|
+
export function renderNetworkPanel(value) {
|
|
21
|
+
const content = renderValue(value, renderAvailable);
|
|
22
|
+
return content.split('\n');
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=NetworkPanel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NetworkPanel.js","sourceRoot":"","sources":["../../../../../src/ui/v3/ui/panels/NetworkPanel.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD;;GAEG;AACH,SAAS,eAAe,CAAC,IAAkB;IACzC,OAAO,YAAY,IAAI,CAAC,OAAO,EAAE,CAAC;AACpC,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAA0B;IAC3D,MAAM,OAAO,GAAG,WAAW,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC;IACpD,OAAO,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAC7B,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Section 4: Posture Panel Renderer
|
|
3
|
+
*
|
|
4
|
+
* Renders the POSTURE panel content.
|
|
5
|
+
* Handles Value<PostureState> correctly - no blank panels.
|
|
6
|
+
*/
|
|
7
|
+
import type { Value } from '../../state/value.js';
|
|
8
|
+
import type { PostureState } from '../../state/uiStateTypes.js';
|
|
9
|
+
/**
|
|
10
|
+
* Render Posture panel content
|
|
11
|
+
*
|
|
12
|
+
* Returns array of lines
|
|
13
|
+
* Uses renderValue helper for consistent UNAVAILABLE/UNKNOWN handling
|
|
14
|
+
*/
|
|
15
|
+
export declare function renderPosturePanel(value: Value<PostureState>): string[];
|
|
16
|
+
//# sourceMappingURL=PosturePanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PosturePanel.d.ts","sourceRoot":"","sources":["../../../../../src/ui/v3/ui/panels/PosturePanel.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAUhE;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,KAAK,CAAC,YAAY,CAAC,GAAG,MAAM,EAAE,CAGvE"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Section 4: Posture Panel Renderer
|
|
3
|
+
*
|
|
4
|
+
* Renders the POSTURE panel content.
|
|
5
|
+
* Handles Value<PostureState> correctly - no blank panels.
|
|
6
|
+
*/
|
|
7
|
+
import { renderValue } from '../../state/value.js';
|
|
8
|
+
/**
|
|
9
|
+
* Render Posture panel content when AVAILABLE
|
|
10
|
+
*/
|
|
11
|
+
function renderAvailable(data) {
|
|
12
|
+
return `MODE: ${data.mode}`;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Render Posture panel content
|
|
16
|
+
*
|
|
17
|
+
* Returns array of lines
|
|
18
|
+
* Uses renderValue helper for consistent UNAVAILABLE/UNKNOWN handling
|
|
19
|
+
*/
|
|
20
|
+
export function renderPosturePanel(value) {
|
|
21
|
+
const content = renderValue(value, renderAvailable);
|
|
22
|
+
return content.split('\n');
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=PosturePanel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PosturePanel.js","sourceRoot":"","sources":["../../../../../src/ui/v3/ui/panels/PosturePanel.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD;;GAEG;AACH,SAAS,eAAe,CAAC,IAAkB;IACzC,OAAO,SAAS,IAAI,CAAC,IAAI,EAAE,CAAC;AAC9B,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAA0B;IAC3D,MAAM,OAAO,GAAG,WAAW,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC;IACpD,OAAO,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAC7B,CAAC"}
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Resources Panel Renderer
|
|
2
|
+
* Section 4: Resources Panel Renderer
|
|
3
3
|
*
|
|
4
4
|
* Renders the RESOURCES panel content.
|
|
5
|
+
* Handles Value<ResourcesState> correctly - no blank panels.
|
|
5
6
|
* Line-budgeted, truncation-safe.
|
|
6
7
|
*/
|
|
7
8
|
import type { Value } from '../../state/value.js';
|
|
8
|
-
import type {
|
|
9
|
+
import type { ResourcesState } from '../../state/uiStateTypes.js';
|
|
9
10
|
/**
|
|
10
11
|
* Render Resources panel content
|
|
11
12
|
*
|
|
12
13
|
* Returns array of lines (max ~6 lines)
|
|
13
14
|
* Lines will be truncated to panel width in updateResourcesPanel()
|
|
15
|
+
*
|
|
16
|
+
* Section 4: Uses renderValue helper for consistent UNAVAILABLE/UNKNOWN handling
|
|
14
17
|
*/
|
|
15
|
-
export declare function renderResourcesPanel(value: Value<
|
|
18
|
+
export declare function renderResourcesPanel(value: Value<ResourcesState>): string[];
|
|
16
19
|
//# sourceMappingURL=ResourcesPanel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResourcesPanel.d.ts","sourceRoot":"","sources":["../../../../../src/ui/v3/ui/panels/ResourcesPanel.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"ResourcesPanel.d.ts","sourceRoot":"","sources":["../../../../../src/ui/v3/ui/panels/ResourcesPanel.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AA+BlE;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,MAAM,EAAE,CAG3E"}
|
|
@@ -1,46 +1,42 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Resources Panel Renderer
|
|
2
|
+
* Section 4: Resources Panel Renderer
|
|
3
3
|
*
|
|
4
4
|
* Renders the RESOURCES panel content.
|
|
5
|
+
* Handles Value<ResourcesState> correctly - no blank panels.
|
|
5
6
|
* Line-budgeted, truncation-safe.
|
|
6
7
|
*/
|
|
7
|
-
import {
|
|
8
|
+
import { renderValue } from '../../state/value.js';
|
|
8
9
|
/**
|
|
9
|
-
* Format uptime
|
|
10
|
+
* Format uptime string (already formatted in ResourcesState)
|
|
10
11
|
*/
|
|
11
|
-
function formatUptime(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
function formatUptime(uptime) {
|
|
13
|
+
return uptime; // Already formatted as HH:MM:SS
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Render Resources panel content when AVAILABLE
|
|
17
|
+
*/
|
|
18
|
+
function renderAvailable(data) {
|
|
19
|
+
const lines = [];
|
|
20
|
+
// Line 1: CPU
|
|
21
|
+
lines.push(`CPU: ${data.cpuPct.toFixed(1)}%`);
|
|
22
|
+
// Line 2: RAM
|
|
23
|
+
lines.push(`RAM: ${data.ramUsedMB} / ${data.ramTotalMB} MB`);
|
|
24
|
+
// Line 3: Disk
|
|
25
|
+
lines.push(`DISK: ${data.diskUsedGB} / ${data.diskTotalGB} GB`);
|
|
26
|
+
// Line 4: Uptime
|
|
27
|
+
lines.push(`UP: ${data.uptime}`);
|
|
28
|
+
return lines.join('\n');
|
|
16
29
|
}
|
|
17
30
|
/**
|
|
18
31
|
* Render Resources panel content
|
|
19
32
|
*
|
|
20
33
|
* Returns array of lines (max ~6 lines)
|
|
21
34
|
* Lines will be truncated to panel width in updateResourcesPanel()
|
|
35
|
+
*
|
|
36
|
+
* Section 4: Uses renderValue helper for consistent UNAVAILABLE/UNKNOWN handling
|
|
22
37
|
*/
|
|
23
38
|
export function renderResourcesPanel(value) {
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
const data = value.data;
|
|
27
|
-
// Line 1: CPU and Load
|
|
28
|
-
lines.push(`CPU: ${data.cpuPercent.toFixed(1)}% | Load1: ${data.load1.toFixed(2)}`);
|
|
29
|
-
// Line 2: RAM
|
|
30
|
-
lines.push(`RAM: ${data.ramUsedMB} / ${data.ramTotalMB} MB`);
|
|
31
|
-
// Line 3: Disk
|
|
32
|
-
lines.push(`DISK: ${data.diskUsedGB} / ${data.diskTotalGB} GB`);
|
|
33
|
-
// Line 4: Uptime
|
|
34
|
-
lines.push(`UP: ${formatUptime(data.uptimeSeconds)}`);
|
|
35
|
-
}
|
|
36
|
-
else {
|
|
37
|
-
// UNAVAILABLE state
|
|
38
|
-
lines.push('STATUS: UNAVAILABLE');
|
|
39
|
-
lines.push(`REASON: ${value.reason}`);
|
|
40
|
-
if (value.nextAction) {
|
|
41
|
-
lines.push(`NEXT: ${value.nextAction}`);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
return lines;
|
|
39
|
+
const content = renderValue(value, renderAvailable);
|
|
40
|
+
return content.split('\n');
|
|
45
41
|
}
|
|
46
42
|
//# sourceMappingURL=ResourcesPanel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResourcesPanel.js","sourceRoot":"","sources":["../../../../../src/ui/v3/ui/panels/ResourcesPanel.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"ResourcesPanel.js","sourceRoot":"","sources":["../../../../../src/ui/v3/ui/panels/ResourcesPanel.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,EAAe,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEhE;;GAEG;AACH,SAAS,YAAY,CAAC,MAAc;IAClC,OAAO,MAAM,CAAC,CAAC,gCAAgC;AACjD,CAAC;AAED;;GAEG;AACH,SAAS,eAAe,CAAC,IAAoB;IAC3C,MAAM,KAAK,GAAa,EAAE,CAAC;IAE3B,cAAc;IACd,KAAK,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IAE9C,cAAc;IACd,KAAK,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,SAAS,MAAM,IAAI,CAAC,UAAU,KAAK,CAAC,CAAC;IAE7D,eAAe;IACf,KAAK,CAAC,IAAI,CAAC,SAAS,IAAI,CAAC,UAAU,MAAM,IAAI,CAAC,WAAW,KAAK,CAAC,CAAC;IAEhE,iBAAiB;IACjB,KAAK,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;IAEjC,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,oBAAoB,CAAC,KAA4B;IAC/D,MAAM,OAAO,GAAG,WAAW,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC;IACpD,OAAO,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAC7B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"phase1Runtime.d.ts","sourceRoot":"","sources":["../../../../src/ui/v3/ui/phase1Runtime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;
|
|
1
|
+
{"version":3,"file":"phase1Runtime.d.ts","sourceRoot":"","sources":["../../../../src/ui/v3/ui/phase1Runtime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAyhBH;;GAEG;AACH,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC,CAu6BxD"}
|