4runr-os 1.0.97 → 1.0.99

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.
Files changed (58) hide show
  1. package/dist/ui/v3/collectors/resources.d.ts +3 -3
  2. package/dist/ui/v3/collectors/resources.d.ts.map +1 -1
  3. package/dist/ui/v3/collectors/resources.js +13 -4
  4. package/dist/ui/v3/collectors/resources.js.map +1 -1
  5. package/dist/ui/v3/commands/commandEngine.d.ts +75 -0
  6. package/dist/ui/v3/commands/commandEngine.d.ts.map +1 -0
  7. package/dist/ui/v3/commands/commandEngine.js +292 -0
  8. package/dist/ui/v3/commands/commandEngine.js.map +1 -0
  9. package/dist/ui/v3/commands/router.js +3 -3
  10. package/dist/ui/v3/commands/router.js.map +1 -1
  11. package/dist/ui/v3/state/assertUiState.d.ts +27 -0
  12. package/dist/ui/v3/state/assertUiState.d.ts.map +1 -0
  13. package/dist/ui/v3/state/assertUiState.js +85 -0
  14. package/dist/ui/v3/state/assertUiState.js.map +1 -0
  15. package/dist/ui/v3/state/defaultState.d.ts +9 -2
  16. package/dist/ui/v3/state/defaultState.d.ts.map +1 -1
  17. package/dist/ui/v3/state/defaultState.js +15 -3
  18. package/dist/ui/v3/state/defaultState.js.map +1 -1
  19. package/dist/ui/v3/state/uiState.d.ts +13 -3
  20. package/dist/ui/v3/state/uiState.d.ts.map +1 -1
  21. package/dist/ui/v3/state/uiState.js +6 -1
  22. package/dist/ui/v3/state/uiState.js.map +1 -1
  23. package/dist/ui/v3/state/uiStateBuilder.d.ts +6 -1
  24. package/dist/ui/v3/state/uiStateBuilder.d.ts.map +1 -1
  25. package/dist/ui/v3/state/uiStateBuilder.js +18 -3
  26. package/dist/ui/v3/state/uiStateBuilder.js.map +1 -1
  27. package/dist/ui/v3/state/uiStateTypes.d.ts +52 -0
  28. package/dist/ui/v3/state/uiStateTypes.d.ts.map +1 -0
  29. package/dist/ui/v3/state/uiStateTypes.js +8 -0
  30. package/dist/ui/v3/state/uiStateTypes.js.map +1 -0
  31. package/dist/ui/v3/state/value.d.ts +40 -12
  32. package/dist/ui/v3/state/value.d.ts.map +1 -1
  33. package/dist/ui/v3/state/value.js +39 -6
  34. package/dist/ui/v3/state/value.js.map +1 -1
  35. package/dist/ui/v3/ui/panels/AssetsPanel.d.ts +16 -0
  36. package/dist/ui/v3/ui/panels/AssetsPanel.d.ts.map +1 -0
  37. package/dist/ui/v3/ui/panels/AssetsPanel.js +29 -0
  38. package/dist/ui/v3/ui/panels/AssetsPanel.js.map +1 -0
  39. package/dist/ui/v3/ui/panels/CapabilitiesPanel.d.ts +16 -0
  40. package/dist/ui/v3/ui/panels/CapabilitiesPanel.d.ts.map +1 -0
  41. package/dist/ui/v3/ui/panels/CapabilitiesPanel.js +27 -0
  42. package/dist/ui/v3/ui/panels/CapabilitiesPanel.js.map +1 -0
  43. package/dist/ui/v3/ui/panels/NetworkPanel.d.ts +16 -0
  44. package/dist/ui/v3/ui/panels/NetworkPanel.d.ts.map +1 -0
  45. package/dist/ui/v3/ui/panels/NetworkPanel.js +24 -0
  46. package/dist/ui/v3/ui/panels/NetworkPanel.js.map +1 -0
  47. package/dist/ui/v3/ui/panels/PosturePanel.d.ts +16 -0
  48. package/dist/ui/v3/ui/panels/PosturePanel.d.ts.map +1 -0
  49. package/dist/ui/v3/ui/panels/PosturePanel.js +24 -0
  50. package/dist/ui/v3/ui/panels/PosturePanel.js.map +1 -0
  51. package/dist/ui/v3/ui/panels/ResourcesPanel.d.ts +6 -3
  52. package/dist/ui/v3/ui/panels/ResourcesPanel.d.ts.map +1 -1
  53. package/dist/ui/v3/ui/panels/ResourcesPanel.js +25 -29
  54. package/dist/ui/v3/ui/panels/ResourcesPanel.js.map +1 -1
  55. package/dist/ui/v3/ui/phase1Runtime.d.ts.map +1 -1
  56. package/dist/ui/v3/ui/phase1Runtime.js +186 -32
  57. package/dist/ui/v3/ui/phase1Runtime.js.map +1 -1
  58. package/package.json +1 -1
@@ -1,11 +1,23 @@
1
1
  /**
2
- * Default UiState (Phase 4)
2
+ * Section 4: Default UiState (Cold Boot State)
3
3
  *
4
4
  * Initial state before collectors run.
5
- * All fields start as UNAVAILABLE.
5
+ * All fields start as UNAVAILABLE with:
6
+ * - reason stating why
7
+ * - nextAction telling operator what to do next
8
+ *
9
+ * Hard requirements:
10
+ * - No key may be AVAILABLE in the default state
11
+ * - No key may be missing
12
+ * - All panels must have meaningful reason + nextAction (do not leave empty)
6
13
  */
7
14
  import { unavailable } from './value.js';
8
15
  export const defaultUiState = {
9
- resources: unavailable('Not initialized', 'Waiting for first collection cycle'),
16
+ posture: unavailable('Posture not initialized', 'Run "status" to check system state'),
17
+ resources: unavailable('Resources not collected', 'Waiting for first collection cycle'),
18
+ assets: unavailable('Asset registry not initialized', 'Start agent registry'),
19
+ network: unavailable('Network state unknown', 'Run "connect" to initialize Gateway'),
20
+ capabilities: unavailable('Capabilities not loaded', 'Run "status" after connecting'),
21
+ statusStrip: unavailable('Status not initialized', 'System starting up'),
10
22
  };
11
23
  //# sourceMappingURL=defaultState.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"defaultState.js","sourceRoot":"","sources":["../../../../src/ui/v3/state/defaultState.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,MAAM,CAAC,MAAM,cAAc,GAAY;IACrC,SAAS,EAAE,WAAW,CACpB,iBAAiB,EACjB,oCAAoC,CACrC;CACF,CAAC"}
1
+ {"version":3,"file":"defaultState.js","sourceRoot":"","sources":["../../../../src/ui/v3/state/defaultState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,MAAM,CAAC,MAAM,cAAc,GAAY;IACrC,OAAO,EAAE,WAAW,CAClB,yBAAyB,EACzB,oCAAoC,CACrC;IACD,SAAS,EAAE,WAAW,CACpB,yBAAyB,EACzB,oCAAoC,CACrC;IACD,MAAM,EAAE,WAAW,CACjB,gCAAgC,EAChC,sBAAsB,CACvB;IACD,OAAO,EAAE,WAAW,CAClB,uBAAuB,EACvB,qCAAqC,CACtC;IACD,YAAY,EAAE,WAAW,CACvB,yBAAyB,EACzB,+BAA+B,CAChC;IACD,WAAW,EAAE,WAAW,CACtB,wBAAwB,EACxB,oBAAoB,CACrB;CACF,CAAC"}
@@ -1,12 +1,22 @@
1
1
  /**
2
- * UiState (Phase 4)
2
+ * Section 4: UiState Contract
3
3
  *
4
4
  * Single source of truth for UI state.
5
5
  * All panels render from UiState only.
6
+ *
7
+ * Rule: UiState keys are locked. If a developer tries to add a key,
8
+ * it should require deliberate refactor (not accidental).
9
+ *
10
+ * All keys must use Value<T> with strict type T for that panel.
6
11
  */
7
12
  import type { Value } from './value.js';
8
- import type { ResourcesData } from './resourcesData.js';
13
+ import type { PostureState, ResourcesState, AssetsState, NetworkState, CapabilitiesState, StatusStripState } from './uiStateTypes.js';
9
14
  export interface UiState {
10
- resources: Value<ResourcesData>;
15
+ posture: Value<PostureState>;
16
+ resources: Value<ResourcesState>;
17
+ assets: Value<AssetsState>;
18
+ network: Value<NetworkState>;
19
+ capabilities: Value<CapabilitiesState>;
20
+ statusStrip: Value<StatusStripState>;
11
21
  }
12
22
  //# sourceMappingURL=uiState.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"uiState.d.ts","sourceRoot":"","sources":["../../../../src/ui/v3/state/uiState.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,MAAM,WAAW,OAAO;IACtB,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC;CAKjC"}
1
+ {"version":3,"file":"uiState.d.ts","sourceRoot":"","sources":["../../../../src/ui/v3/state/uiState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,KAAK,EACV,YAAY,EACZ,cAAc,EACd,WAAW,EACX,YAAY,EACZ,iBAAiB,EACjB,gBAAgB,EACjB,MAAM,mBAAmB,CAAC;AAE3B,MAAM,WAAW,OAAO;IACtB,OAAO,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC;IAC7B,SAAS,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;IACjC,MAAM,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;IAC3B,OAAO,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC;IAC7B,YAAY,EAAE,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACvC,WAAW,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAC;CACtC"}
@@ -1,8 +1,13 @@
1
1
  /**
2
- * UiState (Phase 4)
2
+ * Section 4: UiState Contract
3
3
  *
4
4
  * Single source of truth for UI state.
5
5
  * All panels render from UiState only.
6
+ *
7
+ * Rule: UiState keys are locked. If a developer tries to add a key,
8
+ * it should require deliberate refactor (not accidental).
9
+ *
10
+ * All keys must use Value<T> with strict type T for that panel.
6
11
  */
7
12
  export {};
8
13
  //# sourceMappingURL=uiState.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"uiState.js","sourceRoot":"","sources":["../../../../src/ui/v3/state/uiState.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
1
+ {"version":3,"file":"uiState.js","sourceRoot":"","sources":["../../../../src/ui/v3/state/uiState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG"}
@@ -1,12 +1,17 @@
1
1
  /**
2
- * UiState Builder (Phase 4)
2
+ * Section 4: UiState Builder
3
3
  *
4
4
  * Builds the complete UiState from collectors.
5
5
  * This is the single source of truth for UI data.
6
+ *
7
+ * All panels must have data - no missing keys.
6
8
  */
7
9
  import type { UiState } from './uiState.js';
8
10
  /**
9
11
  * Build the current UiState
12
+ *
13
+ * Section 4: Must include all required keys
14
+ * All keys must use Value<T> structure
10
15
  */
11
16
  export declare function buildUiState(): Promise<UiState>;
12
17
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"uiStateBuilder.d.ts","sourceRoot":"","sources":["../../../../src/ui/v3/state/uiStateBuilder.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAa5C;;GAEG;AACH,wBAAsB,YAAY,IAAI,OAAO,CAAC,OAAO,CAAC,CAWrD;AAED;;GAEG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAEtC"}
1
+ {"version":3,"file":"uiStateBuilder.d.ts","sourceRoot":"","sources":["../../../../src/ui/v3/state/uiStateBuilder.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAe5C;;;;;GAKG;AACH,wBAAsB,YAAY,IAAI,OAAO,CAAC,OAAO,CAAC,CAoBrD;AAED;;GAEG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAEtC"}
@@ -1,11 +1,15 @@
1
1
  /**
2
- * UiState Builder (Phase 4)
2
+ * Section 4: UiState Builder
3
3
  *
4
4
  * Builds the complete UiState from collectors.
5
5
  * This is the single source of truth for UI data.
6
+ *
7
+ * All panels must have data - no missing keys.
6
8
  */
7
9
  import { defaultUiState } from './defaultState.js';
10
+ import { assertUiState } from './assertUiState.js';
8
11
  import { collectResources } from '../collectors/resources.js';
12
+ import { unavailable } from './value.js';
9
13
  /**
10
14
  * Build UiState from collectors
11
15
  *
@@ -15,14 +19,25 @@ const COLLECTOR_INTERVAL = 1500; // ms
15
19
  let lastState = defaultUiState;
16
20
  /**
17
21
  * Build the current UiState
22
+ *
23
+ * Section 4: Must include all required keys
24
+ * All keys must use Value<T> structure
18
25
  */
19
26
  export async function buildUiState() {
20
- // Collect resources
27
+ // Collect resources (only one collector for now)
21
28
  const resources = await collectResources();
22
- // Build state
29
+ // Build state with all required keys
30
+ // For now, most panels are UNAVAILABLE (will be populated by collectors in future)
23
31
  const state = {
32
+ posture: unavailable('Posture not initialized', 'Run "status" to check system state'),
24
33
  resources,
34
+ assets: unavailable('Asset registry not initialized', 'Start agent registry'),
35
+ network: unavailable('Network state unknown', 'Run "connect" to initialize Gateway'),
36
+ capabilities: unavailable('Capabilities not loaded', 'Run "status" after connecting'),
37
+ statusStrip: unavailable('Status not initialized', 'System starting up'),
25
38
  };
39
+ // Section 4: Validate state contract at runtime
40
+ assertUiState(state);
26
41
  lastState = state;
27
42
  return state;
28
43
  }
@@ -1 +1 @@
1
- {"version":3,"file":"uiStateBuilder.js","sourceRoot":"","sources":["../../../../src/ui/v3/state/uiStateBuilder.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAE9D;;;;GAIG;AACH,MAAM,kBAAkB,GAAG,IAAI,CAAC,CAAC,KAAK;AAEtC,IAAI,SAAS,GAAY,cAAc,CAAC;AAExC;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY;IAChC,oBAAoB;IACpB,MAAM,SAAS,GAAG,MAAM,gBAAgB,EAAE,CAAC;IAE3C,cAAc;IACd,MAAM,KAAK,GAAY;QACrB,SAAS;KACV,CAAC;IAEF,SAAS,GAAG,KAAK,CAAC;IAClB,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,YAAY;IAC1B,OAAO,SAAS,CAAC;AACnB,CAAC"}
1
+ {"version":3,"file":"uiStateBuilder.js","sourceRoot":"","sources":["../../../../src/ui/v3/state/uiStateBuilder.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC;;;;GAIG;AACH,MAAM,kBAAkB,GAAG,IAAI,CAAC,CAAC,KAAK;AAEtC,IAAI,SAAS,GAAY,cAAc,CAAC;AAExC;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY;IAChC,iDAAiD;IACjD,MAAM,SAAS,GAAG,MAAM,gBAAgB,EAAE,CAAC;IAE3C,qCAAqC;IACrC,mFAAmF;IACnF,MAAM,KAAK,GAAY;QACrB,OAAO,EAAE,WAAW,CAAC,yBAAyB,EAAE,oCAAoC,CAAC;QACrF,SAAS;QACT,MAAM,EAAE,WAAW,CAAC,gCAAgC,EAAE,sBAAsB,CAAC;QAC7E,OAAO,EAAE,WAAW,CAAC,uBAAuB,EAAE,qCAAqC,CAAC;QACpF,YAAY,EAAE,WAAW,CAAC,yBAAyB,EAAE,+BAA+B,CAAC;QACrF,WAAW,EAAE,WAAW,CAAC,wBAAwB,EAAE,oBAAoB,CAAC;KACzE,CAAC;IAEF,gDAAgD;IAChD,aAAa,CAAC,KAAK,CAAC,CAAC;IAErB,SAAS,GAAG,KAAK,CAAC;IAClB,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,YAAY;IAC1B,OAAO,SAAS,CAAC;AACnB,CAAC"}
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Section 4: UiState Type Definitions
3
+ *
4
+ * Strict type definitions for each panel's data.
5
+ * These are the T in Value<T> for each panel.
6
+ */
7
+ /**
8
+ * Posture state (minimal for now)
9
+ */
10
+ export type PostureState = {
11
+ mode: "HUB" | "UNKNOWN";
12
+ };
13
+ /**
14
+ * Resources state (system metrics)
15
+ */
16
+ export type ResourcesState = {
17
+ cpuPct: number;
18
+ ramUsedMB: number;
19
+ ramTotalMB: number;
20
+ diskUsedGB: number;
21
+ diskTotalGB: number;
22
+ uptime: string;
23
+ };
24
+ /**
25
+ * Assets state
26
+ */
27
+ export type AssetsState = {
28
+ total: number;
29
+ active: number;
30
+ idle: number;
31
+ error: number;
32
+ };
33
+ /**
34
+ * Network state
35
+ */
36
+ export type NetworkState = {
37
+ gateway: "CONNECTED" | "DISCONNECTED";
38
+ };
39
+ /**
40
+ * Capabilities state
41
+ */
42
+ export type CapabilitiesState = {
43
+ items: string[];
44
+ };
45
+ /**
46
+ * Status strip state
47
+ */
48
+ export type StatusStripState = {
49
+ left: string;
50
+ right: string;
51
+ };
52
+ //# sourceMappingURL=uiStateTypes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uiStateTypes.d.ts","sourceRoot":"","sources":["../../../../src/ui/v3/state/uiStateTypes.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,KAAK,GAAG,SAAS,CAAC;CACzB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,OAAO,EAAE,WAAW,GAAG,cAAc,CAAC;CACvC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Section 4: UiState Type Definitions
3
+ *
4
+ * Strict type definitions for each panel's data.
5
+ * These are the T in Value<T> for each panel.
6
+ */
7
+ export {};
8
+ //# sourceMappingURL=uiStateTypes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uiStateTypes.js","sourceRoot":"","sources":["../../../../src/ui/v3/state/uiStateTypes.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
@@ -1,39 +1,67 @@
1
1
  /**
2
- * Value Protocol (Phase 4)
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
- export type ValueStatus = 'AVAILABLE' | 'UNAVAILABLE';
12
+ export type Availability = "AVAILABLE" | "UNAVAILABLE" | "UNKNOWN";
8
13
  export type Value<T> = {
9
- status: 'AVAILABLE';
10
- data: T;
14
+ availability: "AVAILABLE";
15
+ value: T;
16
+ } | {
17
+ availability: "UNAVAILABLE";
18
+ reason?: string;
19
+ nextAction?: string;
11
20
  } | {
12
- status: 'UNAVAILABLE';
13
- reason: string;
21
+ availability: "UNKNOWN";
22
+ reason?: string;
14
23
  nextAction?: string;
15
24
  };
16
25
  /**
17
26
  * Create an AVAILABLE value
18
27
  */
19
- export declare function available<T>(data: T): Value<T>;
28
+ export declare function available<T>(value: T): Value<T>;
20
29
  /**
21
30
  * Create an UNAVAILABLE value
22
31
  */
23
- export declare function unavailable<T>(reason: string, nextAction?: string): Value<T>;
32
+ export declare function unavailable<T>(reason?: string, nextAction?: string): Value<T>;
33
+ /**
34
+ * Create an UNKNOWN value
35
+ */
36
+ export declare function unknown<T>(reason?: string, nextAction?: string): Value<T>;
24
37
  /**
25
38
  * Type guard: check if value is AVAILABLE
26
39
  */
27
40
  export declare function isAvailable<T>(value: Value<T>): value is {
28
- status: 'AVAILABLE';
29
- data: T;
41
+ availability: "AVAILABLE";
42
+ value: T;
30
43
  };
31
44
  /**
32
45
  * Type guard: check if value is UNAVAILABLE
33
46
  */
34
47
  export declare function isUnavailable<T>(value: Value<T>): value is {
35
- status: 'UNAVAILABLE';
36
- reason: string;
48
+ availability: "UNAVAILABLE";
49
+ reason?: string;
50
+ nextAction?: string;
51
+ };
52
+ /**
53
+ * Type guard: check if value is UNKNOWN
54
+ */
55
+ export declare function isUnknown<T>(value: Value<T>): value is {
56
+ availability: "UNKNOWN";
57
+ reason?: string;
37
58
  nextAction?: string;
38
59
  };
60
+ /**
61
+ * Section 4: Shared helper to render Value<T>
62
+ *
63
+ * Handles AVAILABLE, UNAVAILABLE, and UNKNOWN states consistently
64
+ * Never renders empty string - always shows meaningful content
65
+ */
66
+ export declare function renderValue<T>(v: Value<T>, renderAvailable: (t: T) => string): string;
39
67
  //# sourceMappingURL=value.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"value.d.ts","sourceRoot":"","sources":["../../../../src/ui/v3/state/value.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,MAAM,WAAW,GAAG,WAAW,GAAG,aAAa,CAAC;AAEtD,MAAM,MAAM,KAAK,CAAC,CAAC,IACf;IAAE,MAAM,EAAE,WAAW,CAAC;IAAC,IAAI,EAAE,CAAC,CAAA;CAAE,GAChC;IAAE,MAAM,EAAE,aAAa,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEnE;;GAEG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAE9C;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC,CAE5E;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,IAAI;IAAE,MAAM,EAAE,WAAW,CAAC;IAAC,IAAI,EAAE,CAAC,CAAA;CAAE,CAEzF;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,IAAI;IAAE,MAAM,EAAE,aAAa,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,CAEzH"}
1
+ {"version":3,"file":"value.d.ts","sourceRoot":"","sources":["../../../../src/ui/v3/state/value.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,MAAM,MAAM,YAAY,GAAG,WAAW,GAAG,aAAa,GAAG,SAAS,CAAC;AAEnE,MAAM,MAAM,KAAK,CAAC,CAAC,IACf;IAAE,YAAY,EAAE,WAAW,CAAC;IAAC,KAAK,EAAE,CAAC,CAAA;CAAE,GACvC;IAAE,YAAY,EAAE,aAAa,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,GACrE;IAAE,YAAY,EAAE,SAAS,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEtE;;GAEG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAE/C;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC,CAE7E;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC,CAEzE;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,IAAI;IAAE,YAAY,EAAE,WAAW,CAAC;IAAC,KAAK,EAAE,CAAC,CAAA;CAAE,CAEhG;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,IAAI;IAAE,YAAY,EAAE,aAAa,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,CAEhI;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,IAAI;IAAE,YAAY,EAAE,SAAS,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,CAExH;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAC3B,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,EACX,eAAe,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,MAAM,GAChC,MAAM,CAWR"}
@@ -1,31 +1,64 @@
1
1
  /**
2
- * Value Protocol (Phase 4)
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(data) {
11
- return { status: 'AVAILABLE', data };
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 { status: 'UNAVAILABLE', reason, nextAction };
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.status === 'AVAILABLE';
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.status === 'UNAVAILABLE';
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;;;;;GAKG;AAQH;;GAEG;AACH,MAAM,UAAU,SAAS,CAAI,IAAO;IAClC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;AACvC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,WAAW,CAAI,MAAc,EAAE,UAAmB;IAChE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC;AACvD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,WAAW,CAAI,KAAe;IAC5C,OAAO,KAAK,CAAC,MAAM,KAAK,WAAW,CAAC;AACtC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,aAAa,CAAI,KAAe;IAC9C,OAAO,KAAK,CAAC,MAAM,KAAK,aAAa,CAAC;AACxC,CAAC"}
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 (Phase 4)
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 { ResourcesData } from '../../state/resourcesData.js';
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<ResourcesData>): string[];
18
+ export declare function renderResourcesPanel(value: Value<ResourcesState>): string[];
16
19
  //# sourceMappingURL=ResourcesPanel.d.ts.map