@pellux/goodvibes-tui 0.18.12 → 0.18.17

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 (196) hide show
  1. package/CHANGELOG.md +172 -0
  2. package/README.md +1 -1
  3. package/docs/foundation-artifacts/operator-contract.json +1 -1
  4. package/package.json +3 -2
  5. package/src/config/index.ts +1 -138
  6. package/src/core/conversation-rendering.ts +3 -3
  7. package/src/core/conversation.ts +176 -423
  8. package/src/core/history.ts +45 -0
  9. package/src/core/orchestrator.ts +3 -735
  10. package/src/core/system-message-router.ts +19 -58
  11. package/src/daemon/cli.ts +82 -6
  12. package/src/input/command-registry.ts +2 -0
  13. package/src/input/commands/control-room-runtime.ts +1 -1
  14. package/src/input/commands/health-runtime.ts +1 -1
  15. package/src/input/commands/local-setup-review.ts +1 -1
  16. package/src/input/commands/platform-access-runtime.ts +1 -1
  17. package/src/input/commands/qrcode-runtime.ts +20 -0
  18. package/src/input/commands/subscription-runtime.ts +1 -1
  19. package/src/input/commands.ts +2 -0
  20. package/src/input/handler-content-actions.ts +2 -2
  21. package/src/input/handler-feed.ts +7 -1
  22. package/src/input/handler-modal-routes.ts +19 -2
  23. package/src/input/handler-modal-token-routes.ts +4 -1
  24. package/src/input/handler-picker-routes.ts +4 -2
  25. package/src/input/handler-ui-state.ts +1 -1
  26. package/src/input/handler.ts +1 -1
  27. package/src/input/model-picker.ts +11 -0
  28. package/src/input/search.ts +1 -1
  29. package/src/input/selection.ts +2 -2
  30. package/src/input/settings-modal.ts +31 -3
  31. package/src/main.ts +1 -1
  32. package/src/panels/agent-inspector-panel.ts +3 -3
  33. package/src/panels/agent-logs-panel.ts +26 -27
  34. package/src/panels/approval-panel.ts +2 -2
  35. package/src/panels/automation-control-panel.ts +3 -3
  36. package/src/panels/base-panel.ts +14 -14
  37. package/src/panels/builtin/operations.ts +1 -1
  38. package/src/panels/builtin/session.ts +67 -1
  39. package/src/panels/builtin/shared.ts +4 -4
  40. package/src/panels/cockpit-panel.ts +2 -2
  41. package/src/panels/communication-panel.ts +3 -3
  42. package/src/panels/context-visualizer-panel.ts +2 -2
  43. package/src/panels/control-plane-panel.ts +3 -3
  44. package/src/panels/cost-tracker-panel.ts +3 -3
  45. package/src/panels/debug-panel.ts +2 -2
  46. package/src/panels/diff-panel.ts +2 -2
  47. package/src/panels/docs-panel.ts +1 -1
  48. package/src/panels/eval-panel.ts +2 -2
  49. package/src/panels/file-explorer-panel.ts +3 -3
  50. package/src/panels/file-preview-panel.ts +3 -3
  51. package/src/panels/forensics-panel.ts +2 -2
  52. package/src/panels/git-panel.ts +1 -1
  53. package/src/panels/hooks-panel.ts +3 -3
  54. package/src/panels/incident-review-panel.ts +1 -1
  55. package/src/panels/intelligence-panel.ts +2 -2
  56. package/src/panels/knowledge-panel.ts +1 -1
  57. package/src/panels/local-auth-panel.ts +2 -2
  58. package/src/panels/marketplace-panel.ts +1 -1
  59. package/src/panels/mcp-panel.ts +3 -3
  60. package/src/panels/memory-panel.ts +1 -1
  61. package/src/panels/ops-control-panel.ts +3 -3
  62. package/src/panels/ops-strategy-panel.ts +2 -2
  63. package/src/panels/orchestration-panel.ts +2 -2
  64. package/src/panels/panel-list-panel.ts +6 -6
  65. package/src/panels/plan-dashboard-panel.ts +1 -1
  66. package/src/panels/plugins-panel.ts +2 -2
  67. package/src/panels/policy-panel.ts +2 -2
  68. package/src/panels/polish.ts +3 -3
  69. package/src/panels/provider-account-snapshot.ts +1 -1
  70. package/src/panels/provider-accounts-panel.ts +25 -29
  71. package/src/panels/provider-health-panel.ts +2 -2
  72. package/src/panels/provider-stats-panel.ts +3 -3
  73. package/src/panels/qr-panel.ts +182 -0
  74. package/src/panels/remote-panel.ts +3 -3
  75. package/src/panels/routes-panel.ts +3 -3
  76. package/src/panels/sandbox-panel.ts +2 -2
  77. package/src/panels/schedule-panel.ts +1 -1
  78. package/src/panels/scrollable-list-panel.ts +407 -0
  79. package/src/panels/security-panel.ts +2 -2
  80. package/src/panels/services-panel.ts +3 -3
  81. package/src/panels/session-browser-panel.ts +2 -2
  82. package/src/panels/settings-sync-panel.ts +2 -2
  83. package/src/panels/skills-panel.ts +6 -6
  84. package/src/panels/subscription-panel.ts +3 -3
  85. package/src/panels/symbol-outline-panel.ts +3 -3
  86. package/src/panels/system-messages-panel.ts +4 -4
  87. package/src/panels/tasks-panel.ts +2 -2
  88. package/src/panels/thinking-panel.ts +3 -3
  89. package/src/panels/token-budget-panel.ts +1 -1
  90. package/src/panels/tool-inspector-panel.ts +3 -3
  91. package/src/panels/types.ts +5 -5
  92. package/src/panels/watchers-panel.ts +3 -3
  93. package/src/panels/welcome-panel.ts +1 -1
  94. package/src/panels/worktree-panel.ts +22 -21
  95. package/src/panels/wrfc-panel.ts +3 -3
  96. package/src/permissions/prompt.ts +3 -22
  97. package/src/plugins/loader.ts +15 -304
  98. package/src/renderer/agent-detail-modal.ts +1 -1
  99. package/src/renderer/autocomplete-overlay.ts +2 -2
  100. package/src/renderer/bookmark-modal.ts +1 -1
  101. package/src/renderer/bottom-bar.ts +2 -2
  102. package/src/renderer/buffer.ts +1 -1
  103. package/src/renderer/code-block.ts +2 -2
  104. package/src/renderer/compositor.ts +2 -2
  105. package/src/renderer/context-inspector.ts +1 -1
  106. package/src/renderer/conversation-layout.ts +2 -2
  107. package/src/renderer/conversation-overlays.ts +1 -1
  108. package/src/renderer/conversation-surface.ts +2 -2
  109. package/src/renderer/diff-view.ts +2 -2
  110. package/src/renderer/diff.ts +1 -1
  111. package/src/renderer/file-picker-overlay.ts +2 -2
  112. package/src/renderer/file-tree.ts +2 -2
  113. package/src/renderer/help-overlay.ts +1 -1
  114. package/src/renderer/history-search-overlay.ts +2 -2
  115. package/src/renderer/live-tail-modal.ts +1 -1
  116. package/src/renderer/markdown.ts +2 -2
  117. package/src/renderer/modal-factory.ts +3 -3
  118. package/src/renderer/model-picker-overlay.ts +2 -2
  119. package/src/renderer/overlay-box.ts +2 -2
  120. package/src/renderer/panel-composite.ts +1 -1
  121. package/src/renderer/panel-picker-overlay.ts +2 -2
  122. package/src/renderer/panel-tab-bar.ts +1 -1
  123. package/src/renderer/panel-workspace-bar.ts +1 -1
  124. package/src/renderer/process-indicator.ts +2 -2
  125. package/src/renderer/process-modal.ts +1 -1
  126. package/src/renderer/profile-picker-modal.ts +2 -2
  127. package/src/renderer/progress.ts +2 -2
  128. package/src/renderer/qr-renderer.ts +117 -0
  129. package/src/renderer/search-overlay.ts +2 -2
  130. package/src/renderer/selection-modal-overlay.ts +2 -2
  131. package/src/renderer/session-picker-modal.ts +2 -2
  132. package/src/renderer/settings-modal-helpers.ts +122 -0
  133. package/src/renderer/settings-modal.ts +149 -113
  134. package/src/renderer/shell-surface.ts +1 -1
  135. package/src/renderer/system-message.ts +1 -1
  136. package/src/renderer/tab-strip.ts +2 -2
  137. package/src/renderer/text-layout.ts +1 -1
  138. package/src/renderer/thinking.ts +1 -1
  139. package/src/renderer/tool-call.ts +2 -2
  140. package/src/renderer/ui-factory.ts +2 -2
  141. package/src/runtime/bootstrap-command-context.ts +5 -6
  142. package/src/runtime/bootstrap-command-parts.ts +32 -18
  143. package/src/runtime/bootstrap-core.ts +3 -2
  144. package/src/runtime/bootstrap-hook-bridge.ts +15 -174
  145. package/src/runtime/bootstrap-shell.ts +4 -4
  146. package/src/runtime/bootstrap.ts +7 -2
  147. package/src/runtime/context.ts +4 -20
  148. package/src/runtime/diagnostics/panels/index.ts +6 -6
  149. package/src/runtime/diagnostics/panels/ops.ts +1 -1
  150. package/src/runtime/diagnostics/panels/panel-resources.ts +118 -0
  151. package/src/runtime/perf/panel-contracts.ts +32 -0
  152. package/src/runtime/perf/panel-health-monitor.ts +18 -0
  153. package/src/runtime/services.ts +5 -5
  154. package/src/runtime/store/domains/domain-read-matrix.ts +0 -2
  155. package/src/runtime/store/selectors/index.ts +11 -6
  156. package/src/runtime/store/state.ts +12 -4
  157. package/src/runtime/ui-events.ts +1 -0
  158. package/src/runtime/ui-read-model-helpers.ts +1 -32
  159. package/src/runtime/ui-read-models-observability-maintenance.ts +1 -81
  160. package/src/runtime/ui-read-models-observability-options.ts +1 -5
  161. package/src/runtime/ui-read-models-observability-remote.ts +1 -73
  162. package/src/runtime/ui-read-models-observability-security.ts +1 -172
  163. package/src/runtime/ui-read-models-observability-system.ts +1 -217
  164. package/src/runtime/ui-read-models-observability.ts +1 -59
  165. package/src/runtime/ui-service-queries.ts +1 -114
  166. package/src/runtime/ui-services.ts +1 -1
  167. package/src/shell/ui-openers.ts +1 -1
  168. package/src/tools/index.ts +1 -186
  169. package/src/types/grid.ts +48 -0
  170. package/src/utils/clipboard.ts +21 -0
  171. package/src/utils/splash-lines.ts +1 -1
  172. package/src/utils/terminal-width.ts +185 -0
  173. package/src/version.ts +1 -1
  174. package/src/config/service-registry.ts +0 -1
  175. package/src/config/subscription-providers.ts +0 -127
  176. package/src/daemon/facade-composition.ts +0 -398
  177. package/src/daemon/facade.ts +0 -638
  178. package/src/daemon/surface-policy.ts +0 -60
  179. package/src/daemon/types.ts +0 -191
  180. package/src/runtime/diagnostics/actions.ts +0 -776
  181. package/src/runtime/diagnostics/index.ts +0 -99
  182. package/src/runtime/diagnostics/panels/agents.ts +0 -252
  183. package/src/runtime/diagnostics/panels/events.ts +0 -188
  184. package/src/runtime/diagnostics/panels/health.ts +0 -242
  185. package/src/runtime/diagnostics/panels/tasks.ts +0 -251
  186. package/src/runtime/diagnostics/panels/tool-calls.ts +0 -267
  187. package/src/runtime/diagnostics/provider.ts +0 -262
  188. package/src/runtime/store/domains/conversation.ts +0 -181
  189. package/src/runtime/store/domains/permissions.ts +0 -143
  190. package/src/runtime/store/helpers/reducers/conversation.ts +0 -228
  191. package/src/runtime/store/helpers/reducers/lifecycle.ts +0 -440
  192. package/src/runtime/store/helpers/reducers/shared.ts +0 -60
  193. package/src/runtime/store/helpers/reducers/sync.ts +0 -555
  194. package/src/runtime/store/helpers/reducers.ts +0 -30
  195. package/src/runtime/ui-read-models-core.ts +0 -95
  196. package/src/runtime/ui-read-models-operations.ts +0 -203
@@ -1,203 +0,0 @@
1
- import type { ControlPlaneRecentEvent, SharedApprovalRecord, SharedSessionRecord } from '@pellux/goodvibes-sdk/platform/control-plane/index';
2
- import type { RuntimeServices } from './services.ts';
3
- import type { AutomationJob } from '@pellux/goodvibes-sdk/platform/automation/jobs';
4
- import type { AutomationRun } from '@pellux/goodvibes-sdk/platform/automation/runs';
5
- import type { AutomationRouteBinding } from '@pellux/goodvibes-sdk/platform/automation/routes';
6
- import type { WatcherRecord } from '@pellux/goodvibes-sdk/platform/runtime/store/domains/watchers';
7
- import type { OrchestrationGraphRecord } from '@pellux/goodvibes-sdk/platform/runtime/store/domains/orchestration';
8
- import type { RuntimeCommunicationRecord } from '@pellux/goodvibes-sdk/platform/runtime/store/domains/communication';
9
- import type { ControlPlaneClientRecord } from '@pellux/goodvibes-sdk/platform/runtime/store/domains/control-plane';
10
- import type { AcpConnection } from '@pellux/goodvibes-sdk/platform/runtime/store/domains/acp';
11
- import { combineSubscriptions, createStoreBackedReadModel } from '@pellux/goodvibes-sdk/platform/runtime/ui-read-model-helpers';
12
- import type { UiReadModel } from '@pellux/goodvibes-sdk/platform/runtime/ui-read-models-base';
13
-
14
- export interface UiAutomationSnapshot {
15
- readonly jobs: readonly AutomationJob[];
16
- readonly runs: readonly AutomationRun[];
17
- readonly totalJobs: number;
18
- readonly totalRuns: number;
19
- readonly activeRunIds: readonly string[];
20
- readonly totalFailed: number;
21
- readonly sourceCount: number;
22
- readonly deliveryTotals: {
23
- readonly succeeded: number;
24
- readonly failed: number;
25
- readonly deadLettered: number;
26
- };
27
- }
28
-
29
- export interface UiRoutesSnapshot {
30
- readonly bindings: readonly AutomationRouteBinding[];
31
- readonly bindingIdsBySurface: Readonly<Record<string, readonly string[]>>;
32
- readonly totalBindings: number;
33
- readonly activeBindingIds: readonly string[];
34
- readonly totalResolved: number;
35
- readonly totalFailures: number;
36
- }
37
-
38
- export interface UiWatchersSnapshot {
39
- readonly watchers: readonly WatcherRecord[];
40
- readonly totalWatchers: number;
41
- readonly activeWatcherIds: readonly string[];
42
- readonly totalDegraded: number;
43
- readonly totalLagged: number;
44
- }
45
-
46
- export interface UiOrchestrationSnapshot {
47
- readonly graphs: readonly OrchestrationGraphRecord[];
48
- readonly totalGraphs: number;
49
- readonly activeGraphIds: readonly string[];
50
- readonly totalCompletedGraphs: number;
51
- readonly totalFailedGraphs: number;
52
- readonly recursionGuardTrips: number;
53
- }
54
-
55
- export interface UiCommunicationSnapshot {
56
- readonly records: readonly RuntimeCommunicationRecord[];
57
- readonly totalSent: number;
58
- readonly totalDelivered: number;
59
- readonly totalBlocked: number;
60
- }
61
-
62
- export interface UiControlPlaneSnapshot {
63
- readonly connectionState: string;
64
- readonly activeClientIds: readonly string[];
65
- readonly requestCount: number;
66
- readonly errorCount: number;
67
- readonly host: string;
68
- readonly port: number;
69
- readonly clients: readonly ControlPlaneClientRecord[];
70
- readonly approvals: readonly SharedApprovalRecord[];
71
- readonly sessions: readonly SharedSessionRecord[];
72
- readonly recentEvents: readonly ControlPlaneRecentEvent[];
73
- }
74
-
75
- export interface UiOperationsReadModels {
76
- readonly automation: UiReadModel<UiAutomationSnapshot>;
77
- readonly routes: UiReadModel<UiRoutesSnapshot>;
78
- readonly watchers: UiReadModel<UiWatchersSnapshot>;
79
- readonly orchestration: UiReadModel<UiOrchestrationSnapshot>;
80
- readonly communication: UiReadModel<UiCommunicationSnapshot>;
81
- readonly controlPlane: UiReadModel<UiControlPlaneSnapshot>;
82
- }
83
-
84
- export interface UiOperationsReadModelOptions {
85
- readonly getControlPlaneRecentEvents?: (limit: number) => readonly ControlPlaneRecentEvent[];
86
- }
87
-
88
- export function createOperationsReadModels(
89
- runtimeServices: RuntimeServices,
90
- options: UiOperationsReadModelOptions = {},
91
- ): UiOperationsReadModels {
92
- const { runtimeStore } = runtimeServices;
93
-
94
- return {
95
- automation: createStoreBackedReadModel(runtimeServices, () => {
96
- const state = runtimeStore.getState();
97
- const jobs = state.automation.jobIds
98
- .map((id) => state.automation.jobs.get(id))
99
- .filter((job): job is AutomationJob => job !== undefined)
100
- .sort((a, b) => (b.nextRunAt ?? 0) - (a.nextRunAt ?? 0) || a.name.localeCompare(b.name));
101
- const runs = state.automation.runIds
102
- .map((id) => state.automation.runs.get(id))
103
- .filter((run): run is AutomationRun => run !== undefined)
104
- .sort((a, b) => b.queuedAt - a.queuedAt || a.id.localeCompare(b.id));
105
- return {
106
- jobs,
107
- runs,
108
- totalJobs: state.automation.totalJobs,
109
- totalRuns: state.automation.totalRuns,
110
- activeRunIds: state.automation.activeRunIds,
111
- totalFailed: state.automation.totalFailed,
112
- sourceCount: state.automation.sourceIds.length,
113
- deliveryTotals: {
114
- succeeded: state.deliveries.totalSucceeded,
115
- failed: state.deliveries.totalFailed,
116
- deadLettered: state.deliveries.totalDeadLettered,
117
- },
118
- };
119
- }),
120
- routes: createStoreBackedReadModel(runtimeServices, () => {
121
- const state = runtimeStore.getState().routes;
122
- const bindings = state.bindingIds
123
- .map((id) => state.bindings.get(id))
124
- .filter((binding): binding is AutomationRouteBinding => binding !== undefined)
125
- .sort((a, b) => b.lastSeenAt - a.lastSeenAt || a.id.localeCompare(b.id));
126
- return {
127
- bindings,
128
- bindingIdsBySurface: state.bindingIdsBySurface,
129
- totalBindings: state.totalBindings,
130
- activeBindingIds: state.activeBindingIds,
131
- totalResolved: state.totalResolved,
132
- totalFailures: state.totalFailures,
133
- };
134
- }),
135
- watchers: createStoreBackedReadModel(runtimeServices, () => {
136
- const state = runtimeStore.getState().watchers;
137
- const watchers = state.watcherIds
138
- .map((id) => state.watchers.get(id))
139
- .filter((watcher): watcher is WatcherRecord => watcher !== undefined)
140
- .sort((a, b) => (b.lastHeartbeatAt ?? 0) - (a.lastHeartbeatAt ?? 0) || a.id.localeCompare(b.id));
141
- return {
142
- watchers,
143
- totalWatchers: state.watcherIds.length,
144
- activeWatcherIds: state.activeWatcherIds,
145
- totalDegraded: state.totalDegraded,
146
- totalLagged: state.totalLagged,
147
- };
148
- }),
149
- orchestration: createStoreBackedReadModel(runtimeServices, () => {
150
- const state = runtimeStore.getState().orchestration;
151
- const graphs = [...state.graphs.values()].sort((a, b) => b.createdAt - a.createdAt);
152
- return {
153
- graphs,
154
- totalGraphs: state.totalGraphs,
155
- activeGraphIds: state.activeGraphIds,
156
- totalCompletedGraphs: state.totalCompletedGraphs,
157
- totalFailedGraphs: state.totalFailedGraphs,
158
- recursionGuardTrips: state.recursionGuardTrips,
159
- };
160
- }),
161
- communication: createStoreBackedReadModel(runtimeServices, () => {
162
- const state = runtimeStore.getState().communication;
163
- const records = state.recentRecordIds
164
- .map((id) => state.records.get(id))
165
- .filter((record): record is RuntimeCommunicationRecord => record !== undefined)
166
- .sort((a, b) => b.timestamp - a.timestamp);
167
- return {
168
- records,
169
- totalSent: state.totalSent,
170
- totalDelivered: state.totalDelivered,
171
- totalBlocked: state.totalBlocked,
172
- };
173
- }),
174
- controlPlane: {
175
- getSnapshot() {
176
- const state = runtimeStore.getState().controlPlane;
177
- const clients = state.clientIds
178
- .map((id) => state.clients.get(id))
179
- .filter((client): client is ControlPlaneClientRecord => client !== undefined)
180
- .sort((a, b) => (b.lastSeenAt ?? 0) - (a.lastSeenAt ?? 0) || a.id.localeCompare(b.id));
181
- return {
182
- connectionState: state.connectionState,
183
- activeClientIds: state.activeClientIds,
184
- requestCount: state.requestCount,
185
- errorCount: state.errorCount,
186
- host: state.host,
187
- port: state.port,
188
- clients,
189
- approvals: runtimeServices.approvalBroker.listApprovals(6),
190
- sessions: runtimeServices.sessionBroker.listSessions(6),
191
- recentEvents: options.getControlPlaneRecentEvents?.(6) ?? [],
192
- };
193
- },
194
- subscribe(listener) {
195
- const unsubs = [
196
- runtimeStore.subscribe(listener),
197
- runtimeServices.approvalBroker.subscribe(listener),
198
- ];
199
- return combineSubscriptions(...unsubs);
200
- },
201
- },
202
- };
203
- }