@wrongstack/tui 0.310.0 → 0.313.0

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.
@@ -42,6 +42,44 @@ export interface SidebarConnection {
42
42
  * into the sidebar's 4-state enum so the sidebar twin stays simple.
43
43
  */
44
44
  export declare function useSidebarConnections(projectRoot: string, enabled?: boolean): readonly SidebarConnection[];
45
+ /**
46
+ * Status returned by the WrongProxy sidebar twin. Mirrors the
47
+ * 4-state shape used by `useSidebarConnections` so the sidebar frame's
48
+ * pill / glyph / row coloring stay uniform across panels.
49
+ */
50
+ export type SidebarWrongProxyStatus = 'ok' | 'warn' | 'down' | 'unknown';
51
+ export interface SidebarWrongProxy {
52
+ url: string;
53
+ status: SidebarWrongProxyStatus;
54
+ latencyMs?: number | undefined;
55
+ detail?: string | undefined;
56
+ /**
57
+ * WrongTrace IPC endpoint, read from the `/api/health` body's
58
+ * `socket_path` field (named pipe / UDS the daemon listens on).
59
+ * Undefined when the daemon is down or does not expose a socket —
60
+ * the sidebar then omits the IPC rows entirely.
61
+ */
62
+ socketPath?: string | undefined;
63
+ /** Daemon version from the `/api/health` body, when reported. */
64
+ version?: string | undefined;
65
+ }
66
+ /**
67
+ * Probe the WrongProxy daemon. Refreshes every 8 seconds while
68
+ * `enabled` is true; returns `null` when `enabled` is false so the
69
+ * sidebar twin (and its slot reservation) stop participating in the
70
+ * `SIDEBAR_PANEL_LIMIT` race — the panel is then rendered as `null`
71
+ * by `app-view-sidebar.tsx`. The probe hits `<base>/api/health`, the
72
+ * canonical endpoint shared with the runtime probe in
73
+ * `packages/cli/src/wiring/proxy-probe.ts`; we deliberately do NOT
74
+ * share the runtime probe's mutable `active` flag because the sidebar
75
+ * twin needs its own observable state (latency, error detail) to
76
+ * paint a useful panel — the runtime probe only flips a boolean.
77
+ *
78
+ * Errors stay silent: failures populate `status: 'down'` so the card
79
+ * shows "unreachable" without spamming the console, matching the
80
+ * no-throw contract used by every other sidebar probe.
81
+ */
82
+ export declare function useSidebarWrongProxy(url: string | undefined, enabled?: boolean): SidebarWrongProxy | null;
45
83
  export interface SidebarKanbanColumn {
46
84
  name: string;
47
85
  count: number;