@pellux/goodvibes-tui 0.18.12 → 0.18.13
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/CHANGELOG.md +50 -0
- package/README.md +1 -1
- package/docs/foundation-artifacts/operator-contract.json +1 -1
- package/package.json +2 -2
- package/src/config/index.ts +1 -138
- package/src/config/subscription-providers.ts +1 -127
- package/src/core/conversation-rendering.ts +3 -3
- package/src/core/conversation.ts +176 -423
- package/src/core/history.ts +45 -0
- package/src/core/orchestrator.ts +3 -735
- package/src/core/system-message-router.ts +19 -58
- package/src/input/handler-content-actions.ts +2 -2
- package/src/input/handler-feed.ts +1 -1
- package/src/input/handler-modal-token-routes.ts +1 -1
- package/src/input/handler-ui-state.ts +1 -1
- package/src/input/handler.ts +1 -1
- package/src/input/search.ts +1 -1
- package/src/input/selection.ts +2 -2
- package/src/main.ts +1 -1
- package/src/panels/agent-inspector-panel.ts +3 -3
- package/src/panels/agent-logs-panel.ts +3 -3
- package/src/panels/approval-panel.ts +2 -2
- package/src/panels/automation-control-panel.ts +3 -3
- package/src/panels/base-panel.ts +14 -14
- package/src/panels/builtin/operations.ts +1 -1
- package/src/panels/builtin/session.ts +1 -1
- package/src/panels/builtin/shared.ts +3 -3
- package/src/panels/cockpit-panel.ts +2 -2
- package/src/panels/communication-panel.ts +3 -3
- package/src/panels/context-visualizer-panel.ts +2 -2
- package/src/panels/control-plane-panel.ts +3 -3
- package/src/panels/cost-tracker-panel.ts +3 -3
- package/src/panels/debug-panel.ts +2 -2
- package/src/panels/diff-panel.ts +2 -2
- package/src/panels/docs-panel.ts +1 -1
- package/src/panels/eval-panel.ts +2 -2
- package/src/panels/file-explorer-panel.ts +3 -3
- package/src/panels/file-preview-panel.ts +3 -3
- package/src/panels/forensics-panel.ts +2 -2
- package/src/panels/git-panel.ts +1 -1
- package/src/panels/hooks-panel.ts +3 -3
- package/src/panels/incident-review-panel.ts +1 -1
- package/src/panels/intelligence-panel.ts +2 -2
- package/src/panels/knowledge-panel.ts +1 -1
- package/src/panels/local-auth-panel.ts +2 -2
- package/src/panels/marketplace-panel.ts +1 -1
- package/src/panels/mcp-panel.ts +3 -3
- package/src/panels/memory-panel.ts +1 -1
- package/src/panels/ops-control-panel.ts +3 -3
- package/src/panels/ops-strategy-panel.ts +2 -2
- package/src/panels/orchestration-panel.ts +2 -2
- package/src/panels/panel-list-panel.ts +6 -6
- package/src/panels/plan-dashboard-panel.ts +1 -1
- package/src/panels/plugins-panel.ts +2 -2
- package/src/panels/policy-panel.ts +2 -2
- package/src/panels/polish.ts +3 -3
- package/src/panels/provider-accounts-panel.ts +2 -2
- package/src/panels/provider-health-panel.ts +2 -2
- package/src/panels/provider-stats-panel.ts +3 -3
- package/src/panels/remote-panel.ts +3 -3
- package/src/panels/routes-panel.ts +3 -3
- package/src/panels/sandbox-panel.ts +2 -2
- package/src/panels/schedule-panel.ts +1 -1
- package/src/panels/security-panel.ts +2 -2
- package/src/panels/services-panel.ts +2 -2
- package/src/panels/session-browser-panel.ts +2 -2
- package/src/panels/settings-sync-panel.ts +2 -2
- package/src/panels/skills-panel.ts +6 -6
- package/src/panels/subscription-panel.ts +2 -2
- package/src/panels/symbol-outline-panel.ts +3 -3
- package/src/panels/system-messages-panel.ts +4 -4
- package/src/panels/tasks-panel.ts +2 -2
- package/src/panels/thinking-panel.ts +3 -3
- package/src/panels/token-budget-panel.ts +1 -1
- package/src/panels/tool-inspector-panel.ts +3 -3
- package/src/panels/types.ts +5 -5
- package/src/panels/watchers-panel.ts +3 -3
- package/src/panels/welcome-panel.ts +1 -1
- package/src/panels/worktree-panel.ts +2 -2
- package/src/panels/wrfc-panel.ts +3 -3
- package/src/permissions/prompt.ts +3 -22
- package/src/plugins/loader.ts +15 -304
- package/src/renderer/agent-detail-modal.ts +1 -1
- package/src/renderer/autocomplete-overlay.ts +2 -2
- package/src/renderer/bookmark-modal.ts +1 -1
- package/src/renderer/bottom-bar.ts +2 -2
- package/src/renderer/buffer.ts +1 -1
- package/src/renderer/code-block.ts +2 -2
- package/src/renderer/compositor.ts +2 -2
- package/src/renderer/context-inspector.ts +1 -1
- package/src/renderer/conversation-layout.ts +2 -2
- package/src/renderer/conversation-overlays.ts +1 -1
- package/src/renderer/conversation-surface.ts +2 -2
- package/src/renderer/diff-view.ts +2 -2
- package/src/renderer/diff.ts +1 -1
- package/src/renderer/file-picker-overlay.ts +2 -2
- package/src/renderer/file-tree.ts +2 -2
- package/src/renderer/help-overlay.ts +1 -1
- package/src/renderer/history-search-overlay.ts +2 -2
- package/src/renderer/live-tail-modal.ts +1 -1
- package/src/renderer/markdown.ts +2 -2
- package/src/renderer/modal-factory.ts +3 -3
- package/src/renderer/model-picker-overlay.ts +2 -2
- package/src/renderer/overlay-box.ts +2 -2
- package/src/renderer/panel-composite.ts +1 -1
- package/src/renderer/panel-picker-overlay.ts +2 -2
- package/src/renderer/panel-tab-bar.ts +1 -1
- package/src/renderer/panel-workspace-bar.ts +1 -1
- package/src/renderer/process-indicator.ts +2 -2
- package/src/renderer/process-modal.ts +1 -1
- package/src/renderer/profile-picker-modal.ts +2 -2
- package/src/renderer/progress.ts +2 -2
- package/src/renderer/search-overlay.ts +2 -2
- package/src/renderer/selection-modal-overlay.ts +2 -2
- package/src/renderer/session-picker-modal.ts +2 -2
- package/src/renderer/settings-modal.ts +2 -2
- package/src/renderer/shell-surface.ts +1 -1
- package/src/renderer/system-message.ts +1 -1
- package/src/renderer/tab-strip.ts +2 -2
- package/src/renderer/text-layout.ts +1 -1
- package/src/renderer/thinking.ts +1 -1
- package/src/renderer/tool-call.ts +2 -2
- package/src/renderer/ui-factory.ts +2 -2
- package/src/runtime/bootstrap-command-context.ts +4 -5
- package/src/runtime/bootstrap-command-parts.ts +1 -3
- package/src/runtime/bootstrap-core.ts +3 -2
- package/src/runtime/bootstrap-hook-bridge.ts +15 -174
- package/src/runtime/bootstrap-shell.ts +4 -4
- package/src/runtime/bootstrap.ts +1 -1
- package/src/runtime/context.ts +4 -20
- package/src/runtime/diagnostics/panels/index.ts +1 -1
- package/src/runtime/diagnostics/panels/ops.ts +1 -1
- package/src/runtime/diagnostics/panels/panel-resources.ts +118 -0
- package/src/runtime/perf/panel-contracts.ts +32 -0
- package/src/runtime/perf/panel-health-monitor.ts +18 -0
- package/src/runtime/services.ts +4 -4
- package/src/runtime/store/domains/conversation.ts +1 -181
- package/src/runtime/store/domains/permissions.ts +1 -143
- package/src/runtime/store/helpers/reducers/conversation.ts +1 -228
- package/src/runtime/store/helpers/reducers/lifecycle.ts +1 -440
- package/src/runtime/store/selectors/index.ts +11 -6
- package/src/runtime/store/state.ts +12 -4
- package/src/runtime/ui-events.ts +46 -0
- package/src/runtime/ui-services.ts +1 -1
- package/src/shell/ui-openers.ts +1 -1
- package/src/tools/index.ts +1 -186
- package/src/types/grid.ts +48 -0
- package/src/utils/clipboard.ts +21 -0
- package/src/utils/splash-lines.ts +1 -1
- package/src/utils/terminal-width.ts +185 -0
- package/src/version.ts +1 -1
- package/src/daemon/facade-composition.ts +0 -398
- package/src/daemon/facade.ts +0 -638
- package/src/daemon/surface-policy.ts +0 -60
- package/src/daemon/types.ts +0 -191
- package/src/runtime/ui-read-models-core.ts +0 -95
- package/src/runtime/ui-read-models-operations.ts +0 -203
|
@@ -32,43 +32,19 @@ import { getConfigSnapshot } from '../config/index.ts';
|
|
|
32
32
|
import type { ConfigManager } from '@pellux/goodvibes-sdk/platform/config/manager';
|
|
33
33
|
import type { ConversationManager } from './conversation';
|
|
34
34
|
import type { SystemMessagesPanel, SystemMessagePriority } from '../panels/system-messages-panel.ts';
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
* Classify a message as high or low priority based on content.
|
|
49
|
-
* Used by routeAuto() when the caller doesn't specify priority.
|
|
50
|
-
*
|
|
51
|
-
* @internal
|
|
52
|
-
*/
|
|
53
|
-
function classifyPriority(message: string): SystemMessagePriority {
|
|
54
|
-
return HIGH_PRIORITY_RE.test(message) ? 'high' : 'low';
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export type SystemMessageKind = 'system' | 'operational' | 'wrfc';
|
|
58
|
-
export type SystemMessageTarget = 'conversation' | 'panel' | 'both';
|
|
59
|
-
|
|
60
|
-
function defaultTargetForKind(kind: SystemMessageKind): SystemMessageTarget {
|
|
61
|
-
if (kind === 'wrfc') return 'both';
|
|
62
|
-
return 'panel';
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
function classifyKind(message: string): SystemMessageKind {
|
|
66
|
-
if (/^\[WRFC\]/i.test(message)) return 'wrfc';
|
|
67
|
-
if (/^\[(Scan|Local|Agents|MCP|Plugin|Hook|Tool|Exec|Remote|Bridge|Approval)\]/i.test(message)) {
|
|
68
|
-
return 'operational';
|
|
69
|
-
}
|
|
70
|
-
return 'system';
|
|
71
|
-
}
|
|
35
|
+
import {
|
|
36
|
+
classifySystemMessageKind,
|
|
37
|
+
classifySystemMessagePriority,
|
|
38
|
+
defaultSystemMessageTarget,
|
|
39
|
+
resolveSystemMessageDelivery,
|
|
40
|
+
type SystemMessageKind,
|
|
41
|
+
type SystemMessageTarget,
|
|
42
|
+
} from '@pellux/goodvibes-sdk/platform/runtime/system-message-policy';
|
|
43
|
+
|
|
44
|
+
export type {
|
|
45
|
+
SystemMessageKind,
|
|
46
|
+
SystemMessageTarget,
|
|
47
|
+
} from '@pellux/goodvibes-sdk/platform/runtime/system-message-policy';
|
|
72
48
|
|
|
73
49
|
function targetForKind(
|
|
74
50
|
configManager: Pick<ConfigManager, 'getRaw'>,
|
|
@@ -80,21 +56,6 @@ function targetForKind(
|
|
|
80
56
|
return ui.systemMessages;
|
|
81
57
|
}
|
|
82
58
|
|
|
83
|
-
function resolveDelivery(
|
|
84
|
-
target: SystemMessageTarget,
|
|
85
|
-
hasPanel: boolean,
|
|
86
|
-
): { readonly toPanel: boolean; readonly toConversation: boolean } {
|
|
87
|
-
if (target === 'both') {
|
|
88
|
-
return { toPanel: hasPanel, toConversation: true };
|
|
89
|
-
}
|
|
90
|
-
if (target === 'conversation') {
|
|
91
|
-
return { toPanel: false, toConversation: true };
|
|
92
|
-
}
|
|
93
|
-
return hasPanel
|
|
94
|
-
? { toPanel: true, toConversation: false }
|
|
95
|
-
: { toPanel: false, toConversation: true };
|
|
96
|
-
}
|
|
97
|
-
|
|
98
59
|
// ---------------------------------------------------------------------------
|
|
99
60
|
// SystemMessageRouter
|
|
100
61
|
// ---------------------------------------------------------------------------
|
|
@@ -107,7 +68,7 @@ export class SystemMessageRouter {
|
|
|
107
68
|
constructor(
|
|
108
69
|
private readonly conversation: ConversationManager,
|
|
109
70
|
private panel: SystemMessagesPanel | null,
|
|
110
|
-
private readonly getTargetForKind: (kind: SystemMessageKind) => SystemMessageTarget =
|
|
71
|
+
private readonly getTargetForKind: (kind: SystemMessageKind) => SystemMessageTarget = defaultSystemMessageTarget,
|
|
111
72
|
) {}
|
|
112
73
|
|
|
113
74
|
// ── Public API ────────────────────────────────────────────────────────────
|
|
@@ -127,7 +88,7 @@ export class SystemMessageRouter {
|
|
|
127
88
|
kind: SystemMessageKind,
|
|
128
89
|
): void {
|
|
129
90
|
const target = this.getTargetForKind(kind);
|
|
130
|
-
const delivery =
|
|
91
|
+
const delivery = resolveSystemMessageDelivery(target, this.panel !== null);
|
|
131
92
|
if (delivery.toPanel) {
|
|
132
93
|
this.panel?.push(message, priority);
|
|
133
94
|
}
|
|
@@ -137,7 +98,7 @@ export class SystemMessageRouter {
|
|
|
137
98
|
}
|
|
138
99
|
|
|
139
100
|
routeSystemMessage(message: string, priority: SystemMessagePriority): void {
|
|
140
|
-
this.routeTypedSystemMessage(message, priority,
|
|
101
|
+
this.routeTypedSystemMessage(message, priority, classifySystemMessageKind(message));
|
|
141
102
|
}
|
|
142
103
|
|
|
143
104
|
/**
|
|
@@ -149,8 +110,8 @@ export class SystemMessageRouter {
|
|
|
149
110
|
* @param message - Message text.
|
|
150
111
|
*/
|
|
151
112
|
routeAuto(message: string): void {
|
|
152
|
-
const priority =
|
|
153
|
-
this.routeTypedSystemMessage(message, priority,
|
|
113
|
+
const priority: SystemMessagePriority = classifySystemMessagePriority(message);
|
|
114
|
+
this.routeTypedSystemMessage(message, priority, classifySystemMessageKind(message));
|
|
154
115
|
}
|
|
155
116
|
|
|
156
117
|
/**
|
|
@@ -204,7 +165,7 @@ export class SystemMessageRouter {
|
|
|
204
165
|
export function createSystemMessageRouter(
|
|
205
166
|
conversation: ConversationManager,
|
|
206
167
|
panel: SystemMessagesPanel | null = null,
|
|
207
|
-
getTargetForKind: (kind: SystemMessageKind) => SystemMessageTarget =
|
|
168
|
+
getTargetForKind: (kind: SystemMessageKind) => SystemMessageTarget = defaultSystemMessageTarget,
|
|
208
169
|
): SystemMessageRouter {
|
|
209
170
|
return new SystemMessageRouter(conversation, panel, getTargetForKind);
|
|
210
171
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { readFileSync, writeFileSync, existsSync } from 'node:fs';
|
|
2
|
-
import { copyToClipboard, pasteFromClipboard, pasteImageFromClipboard } from '
|
|
3
|
-
import type { InfiniteBuffer } from '
|
|
2
|
+
import { copyToClipboard, pasteFromClipboard, pasteImageFromClipboard } from '../utils/clipboard.ts';
|
|
3
|
+
import type { InfiniteBuffer } from '../core/history.ts';
|
|
4
4
|
import type { ConversationManager } from '../core/conversation';
|
|
5
5
|
import type { PermissionCategory } from '@pellux/goodvibes-sdk/platform/permissions/manager';
|
|
6
6
|
import type { ContentPart } from '@pellux/goodvibes-sdk/platform/providers/interface';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { InputToken } from '@pellux/goodvibes-sdk/platform/core/tokenizer';
|
|
2
|
-
import type { InfiniteBuffer } from '
|
|
2
|
+
import type { InfiniteBuffer } from '../core/history.ts';
|
|
3
3
|
import type { CommandContext, CommandRegistry } from './command-registry.ts';
|
|
4
4
|
import { AutocompleteEngine } from './autocomplete.ts';
|
|
5
5
|
import { FilePickerModal } from './file-picker.ts';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { InputToken } from '@pellux/goodvibes-sdk/platform/core/tokenizer';
|
|
2
|
-
import type { InfiniteBuffer } from '
|
|
2
|
+
import type { InfiniteBuffer } from '../core/history.ts';
|
|
3
3
|
import type { SelectionResult, SelectionModal } from './selection-modal.ts';
|
|
4
4
|
import type { BookmarkModal } from './bookmark-modal.ts';
|
|
5
5
|
import type { SettingsModal } from './settings-modal.ts';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { InputToken } from '@pellux/goodvibes-sdk/platform/core/tokenizer';
|
|
2
|
-
import type { InfiniteBuffer } from '
|
|
2
|
+
import type { InfiniteBuffer } from '../core/history.ts';
|
|
3
3
|
import type { SearchManager } from './search.ts';
|
|
4
4
|
import type { HistorySearch } from './input-history.ts';
|
|
5
5
|
|
package/src/input/handler.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { InputTokenizer } from '@pellux/goodvibes-sdk/platform/core/tokenizer';
|
|
2
2
|
import { SelectionManager } from './selection.ts';
|
|
3
|
-
import type { InfiniteBuffer } from '
|
|
3
|
+
import type { InfiniteBuffer } from '../core/history.ts';
|
|
4
4
|
import type { CommandRegistry, CommandContext } from './command-registry.ts';
|
|
5
5
|
import { AutocompleteEngine } from './autocomplete.ts';
|
|
6
6
|
import { FilePickerModal } from './file-picker.ts';
|
package/src/input/search.ts
CHANGED
package/src/input/selection.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { InfiniteBuffer } from '
|
|
2
|
-
import type { Cell } from '
|
|
1
|
+
import type { InfiniteBuffer } from '../core/history.ts';
|
|
2
|
+
import type { Cell } from '../types/grid.ts';
|
|
3
3
|
|
|
4
4
|
export interface SelectionPoint {
|
|
5
5
|
col: number;
|
package/src/main.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { homedir } from 'node:os';
|
|
5
5
|
import { join } from 'node:path';
|
|
6
6
|
import { Compositor } from './renderer/compositor.ts';
|
|
7
|
-
import { type Line } from '
|
|
7
|
+
import { type Line } from './types/grid.ts';
|
|
8
8
|
import { UIFactory } from './renderer/ui-factory.ts';
|
|
9
9
|
import { Orchestrator } from './core/orchestrator';
|
|
10
10
|
import { InputHandler } from './input/handler.ts';
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
|
|
6
6
|
import { join } from 'node:path';
|
|
7
7
|
import { readFile } from 'node:fs/promises';
|
|
8
|
-
import type { Line } from '
|
|
9
|
-
import { createEmptyLine } from '
|
|
8
|
+
import type { Line } from '../types/grid.ts';
|
|
9
|
+
import { createEmptyLine } from '../types/grid.ts';
|
|
10
10
|
import { BasePanel } from './base-panel.ts';
|
|
11
11
|
import type { AgentManager, AgentRecord } from '@pellux/goodvibes-sdk/platform/tools/agent/index';
|
|
12
12
|
import type { AgentMessageBus } from '@pellux/goodvibes-sdk/platform/agents/message-bus';
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
resolveScrollablePanelSection,
|
|
22
22
|
DEFAULT_PANEL_PALETTE,
|
|
23
23
|
} from './polish.ts';
|
|
24
|
-
import { truncateDisplay } from '
|
|
24
|
+
import { truncateDisplay } from '../utils/terminal-width.ts';
|
|
25
25
|
import { summarizeError } from '@pellux/goodvibes-sdk/platform/utils/error-display';
|
|
26
26
|
import {
|
|
27
27
|
type AgentDisplayRow as DisplayRow,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { readFileSync, existsSync, watch, type FSWatcher } from 'fs';
|
|
2
|
-
import type { Line } from '
|
|
3
|
-
import { createEmptyLine, createStyledCell } from '
|
|
2
|
+
import type { Line } from '../types/grid.ts';
|
|
3
|
+
import { createEmptyLine, createStyledCell } from '../types/grid.ts';
|
|
4
4
|
import { BasePanel } from './base-panel.ts';
|
|
5
5
|
import type { AgentManager, AgentRecord } from '@pellux/goodvibes-sdk/platform/tools/agent/index';
|
|
6
6
|
import type { AgentEvent } from '@pellux/goodvibes-sdk/platform/runtime/events/index';
|
|
7
|
-
import type { UiEventFeed } from '
|
|
7
|
+
import type { UiEventFeed } from '../runtime/ui-events.ts';
|
|
8
8
|
import {
|
|
9
9
|
buildEmptyState,
|
|
10
10
|
buildPanelLine,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Line } from '
|
|
2
|
-
import { createEmptyLine } from '
|
|
1
|
+
import type { Line } from '../types/grid.ts';
|
|
2
|
+
import { createEmptyLine } from '../types/grid.ts';
|
|
3
3
|
import { BasePanel } from './base-panel.ts';
|
|
4
4
|
import {
|
|
5
5
|
buildGuidanceLine,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { Line } from '
|
|
2
|
-
import { createEmptyLine } from '
|
|
1
|
+
import type { Line } from '../types/grid.ts';
|
|
2
|
+
import { createEmptyLine } from '../types/grid.ts';
|
|
3
3
|
import { BasePanel } from './base-panel.ts';
|
|
4
4
|
import type { UiAutomationSnapshot, UiReadModel } from '../runtime/ui-read-models.ts';
|
|
5
|
-
import { truncateDisplay } from '
|
|
5
|
+
import { truncateDisplay } from '../utils/terminal-width.ts';
|
|
6
6
|
import {
|
|
7
7
|
buildEmptyState,
|
|
8
8
|
buildGuidanceLine,
|
package/src/panels/base-panel.ts
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import type { Line } from '
|
|
1
|
+
import type { Line } from '../types/grid.ts';
|
|
2
2
|
import type { Panel, PanelCategory } from './types.ts';
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
3
|
+
import type { ComponentResourceContract, ComponentHealthState } from '../runtime/perf/panel-contracts.ts';
|
|
4
|
+
import type { ComponentHealthMonitor } from '../runtime/perf/panel-health-monitor.ts';
|
|
5
5
|
|
|
6
6
|
export abstract class BasePanel implements Panel {
|
|
7
7
|
public needsRender = true;
|
|
8
8
|
public isTransient = false;
|
|
9
9
|
public isPinned = false;
|
|
10
|
-
protected readonly
|
|
10
|
+
protected readonly componentHealthMonitor?: ComponentHealthMonitor;
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Optional resource contract for this panel.
|
|
14
14
|
* Override in subclasses to declare a custom contract; leave undefined
|
|
15
|
-
* to use the category default enforced by
|
|
15
|
+
* to use the category default enforced by ComponentHealthMonitor.
|
|
16
16
|
*/
|
|
17
|
-
public resourceContract: Readonly<
|
|
17
|
+
public resourceContract: Readonly<ComponentResourceContract> | undefined = undefined;
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
|
-
* Live health state populated by
|
|
20
|
+
* Live health state populated by ComponentHealthMonitor.
|
|
21
21
|
* Read-only from outside the monitor.
|
|
22
22
|
*/
|
|
23
|
-
public get healthState(): Readonly<
|
|
24
|
-
return this.
|
|
23
|
+
public get healthState(): Readonly<ComponentHealthState> | undefined {
|
|
24
|
+
return this.componentHealthMonitor?.getHealth(this.id);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
constructor(
|
|
@@ -29,9 +29,9 @@ export abstract class BasePanel implements Panel {
|
|
|
29
29
|
public readonly name: string,
|
|
30
30
|
public readonly icon: string,
|
|
31
31
|
public readonly category: PanelCategory,
|
|
32
|
-
|
|
32
|
+
componentHealthMonitor?: ComponentHealthMonitor,
|
|
33
33
|
) {
|
|
34
|
-
this.
|
|
34
|
+
this.componentHealthMonitor = componentHealthMonitor;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
onActivate(): void { this.needsRender = true; }
|
|
@@ -45,7 +45,7 @@ export abstract class BasePanel implements Panel {
|
|
|
45
45
|
/**
|
|
46
46
|
* Check whether the panel is currently permitted to render.
|
|
47
47
|
*
|
|
48
|
-
* Consults the shared
|
|
48
|
+
* Consults the shared ComponentHealthMonitor. Returns true if not registered
|
|
49
49
|
* (unthrottled) or if the monitor permits a render at this moment.
|
|
50
50
|
*
|
|
51
51
|
* Call this inside render() or before invoking render() to skip
|
|
@@ -59,7 +59,7 @@ export abstract class BasePanel implements Panel {
|
|
|
59
59
|
* ```
|
|
60
60
|
*/
|
|
61
61
|
protected canRenderNow(now: number = Date.now()): boolean {
|
|
62
|
-
return this.
|
|
62
|
+
return this.componentHealthMonitor?.canRender(this.id, now) ?? true;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
/**
|
|
@@ -67,6 +67,6 @@ export abstract class BasePanel implements Panel {
|
|
|
67
67
|
* Call this at the end of render() after measuring wall-clock cost.
|
|
68
68
|
*/
|
|
69
69
|
protected reportRenderDuration(durationMs: number, now: number = Date.now()): void {
|
|
70
|
-
this.
|
|
70
|
+
this.componentHealthMonitor?.recordRender(this.id, durationMs, now);
|
|
71
71
|
}
|
|
72
72
|
}
|
|
@@ -97,7 +97,7 @@ export function registerOperationsPanels(manager: PanelManager, deps: ResolvedBu
|
|
|
97
97
|
category: 'monitoring',
|
|
98
98
|
description: 'Project-local and global skill discovery with origin and dependency details',
|
|
99
99
|
factory: () => new SkillsPanel({
|
|
100
|
-
|
|
100
|
+
componentHealthMonitor: deps.componentHealthMonitor,
|
|
101
101
|
shellPaths: ui.environment.shellPaths,
|
|
102
102
|
}),
|
|
103
103
|
});
|
|
@@ -31,7 +31,7 @@ export function registerSessionPanels(manager: PanelManager, deps: ResolvedBuilt
|
|
|
31
31
|
icon: 'L',
|
|
32
32
|
category: 'session',
|
|
33
33
|
description: 'Browse all registered panels grouped by category, with open/closed status and Enter-to-open',
|
|
34
|
-
factory: () => new PanelListPanel(manager, deps.
|
|
34
|
+
factory: () => new PanelListPanel(manager, deps.componentHealthMonitor),
|
|
35
35
|
});
|
|
36
36
|
|
|
37
37
|
manager.registerType({
|
|
@@ -21,7 +21,7 @@ import type { SessionMemoryStore } from '@pellux/goodvibes-sdk/platform/core/ses
|
|
|
21
21
|
import type { ExecutionPlanManager } from '@pellux/goodvibes-sdk/platform/core/execution-plan';
|
|
22
22
|
import type { AdaptivePlanner } from '@pellux/goodvibes-sdk/platform/core/adaptive-planner';
|
|
23
23
|
import type { ApiTokenAuditor } from '@pellux/goodvibes-sdk/platform/security/token-audit';
|
|
24
|
-
import type {
|
|
24
|
+
import type { ComponentHealthMonitor } from '../../runtime/perf/panel-health-monitor.ts';
|
|
25
25
|
import type { WorktreeRegistry } from '@pellux/goodvibes-sdk/platform/runtime/worktree/registry';
|
|
26
26
|
import type { SandboxSessionRegistry } from '@pellux/goodvibes-sdk/platform/runtime/sandbox/session-registry';
|
|
27
27
|
|
|
@@ -72,8 +72,8 @@ export interface BuiltinPanelDeps {
|
|
|
72
72
|
getControlPlaneRecentEvents?: (limit: number) => readonly ControlPlaneRecentEvent[];
|
|
73
73
|
/** Token auditor for the security control-room panel. */
|
|
74
74
|
tokenAuditor: ApiTokenAuditor;
|
|
75
|
-
/** Shared
|
|
76
|
-
|
|
75
|
+
/** Shared component-health monitor for rate-limited panels and diagnostics. */
|
|
76
|
+
componentHealthMonitor: ComponentHealthMonitor;
|
|
77
77
|
/** Shared worktree registry for worktree surfaces. */
|
|
78
78
|
worktreeRegistry: WorktreeRegistry;
|
|
79
79
|
/** Shared sandbox session registry for sandbox surfaces and tools. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Line } from '
|
|
2
|
-
import { createEmptyLine } from '
|
|
1
|
+
import type { Line } from '../types/grid.ts';
|
|
2
|
+
import { createEmptyLine } from '../types/grid.ts';
|
|
3
3
|
import { BasePanel } from './base-panel.ts';
|
|
4
4
|
import type { UiCockpitSnapshot, UiReadModel } from '../runtime/ui-read-models.ts';
|
|
5
5
|
import {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { Line } from '
|
|
2
|
-
import { createEmptyLine } from '
|
|
1
|
+
import type { Line } from '../types/grid.ts';
|
|
2
|
+
import { createEmptyLine } from '../types/grid.ts';
|
|
3
3
|
import { BasePanel } from './base-panel.ts';
|
|
4
4
|
import type { UiCommunicationSnapshot, UiReadModel } from '../runtime/ui-read-models.ts';
|
|
5
|
-
import { truncateDisplay } from '
|
|
5
|
+
import { truncateDisplay } from '../utils/terminal-width.ts';
|
|
6
6
|
import {
|
|
7
7
|
buildBodyText,
|
|
8
8
|
buildEmptyState,
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
// ---------------------------------------------------------------------------
|
|
4
4
|
|
|
5
5
|
import type { ConfigManager } from '@pellux/goodvibes-sdk/platform/config/manager';
|
|
6
|
-
import type { Line } from '
|
|
6
|
+
import type { Line } from '../types/grid.ts';
|
|
7
7
|
import { BasePanel } from './base-panel.ts';
|
|
8
8
|
import { evaluateSessionMaintenance } from '@pellux/goodvibes-sdk/platform/runtime/session-maintenance';
|
|
9
9
|
import type { TurnEvent } from '@pellux/goodvibes-sdk/platform/runtime/events/index';
|
|
10
|
-
import type { UiEventFeed } from '
|
|
10
|
+
import type { UiEventFeed } from '../runtime/ui-events.ts';
|
|
11
11
|
import type { UiReadModel, UiSessionSnapshot } from '../runtime/ui-read-models.ts';
|
|
12
12
|
import type { SessionMemoryQuery } from '../runtime/ui-service-queries.ts';
|
|
13
13
|
import {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { Line } from '
|
|
2
|
-
import { createEmptyLine } from '
|
|
1
|
+
import type { Line } from '../types/grid.ts';
|
|
2
|
+
import { createEmptyLine } from '../types/grid.ts';
|
|
3
3
|
import { BasePanel } from './base-panel.ts';
|
|
4
4
|
import type { UiControlPlaneSnapshot, UiReadModel } from '../runtime/ui-read-models.ts';
|
|
5
|
-
import { truncateDisplay } from '
|
|
5
|
+
import { truncateDisplay } from '../utils/terminal-width.ts';
|
|
6
6
|
import {
|
|
7
7
|
buildEmptyState,
|
|
8
8
|
buildGuidanceLine,
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
// CostTrackerPanel — per-session / per-agent / per-plan cost estimates
|
|
3
3
|
// ---------------------------------------------------------------------------
|
|
4
4
|
|
|
5
|
-
import type { Line } from '
|
|
6
|
-
import { createStyledCell, createEmptyLine } from '
|
|
5
|
+
import type { Line } from '../types/grid.ts';
|
|
6
|
+
import { createStyledCell, createEmptyLine } from '../types/grid.ts';
|
|
7
7
|
import { BasePanel } from './base-panel.ts';
|
|
8
8
|
import type { AgentEvent, TurnEvent } from '@pellux/goodvibes-sdk/platform/runtime/events/index';
|
|
9
|
-
import type { UiEventFeed } from '
|
|
9
|
+
import type { UiEventFeed } from '../runtime/ui-events.ts';
|
|
10
10
|
import {
|
|
11
11
|
buildEmptyState,
|
|
12
12
|
buildPanelLine,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BasePanel } from './base-panel.ts';
|
|
2
|
-
import { createEmptyLine, createStyledCell, type Line } from '
|
|
2
|
+
import { createEmptyLine, createStyledCell, type Line } from '../types/grid.ts';
|
|
3
3
|
import type { TurnEvent } from '@pellux/goodvibes-sdk/platform/runtime/events/index';
|
|
4
|
-
import type { UiEventFeed } from '
|
|
4
|
+
import type { UiEventFeed } from '../runtime/ui-events.ts';
|
|
5
5
|
import type { Orchestrator } from '../core/orchestrator';
|
|
6
6
|
import {
|
|
7
7
|
buildEmptyState,
|
package/src/panels/diff-panel.ts
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
// DiffPanel — unified diff view of agent file changes
|
|
3
3
|
// ---------------------------------------------------------------------------
|
|
4
4
|
|
|
5
|
-
import type { Line } from '
|
|
6
|
-
import { createStyledCell, createEmptyLine } from '
|
|
5
|
+
import type { Line } from '../types/grid.ts';
|
|
6
|
+
import { createStyledCell, createEmptyLine } from '../types/grid.ts';
|
|
7
7
|
import { BasePanel } from './base-panel.ts';
|
|
8
8
|
import {
|
|
9
9
|
buildBodyText,
|
package/src/panels/docs-panel.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// DocsPanel — tool list, model capabilities, and keyboard shortcut reference.
|
|
3
3
|
// ---------------------------------------------------------------------------
|
|
4
4
|
|
|
5
|
-
import type { Line } from '
|
|
5
|
+
import type { Line } from '../types/grid.ts';
|
|
6
6
|
import { BasePanel } from './base-panel.ts';
|
|
7
7
|
import { buildPanelLine, buildPanelWorkspace, buildSearchInputLine, resolveScrollablePanelSection, DEFAULT_PANEL_PALETTE } from './polish.ts';
|
|
8
8
|
import type { ProviderModelCatalogQuery, ToolCatalogQuery } from '../runtime/ui-service-queries.ts';
|
package/src/panels/eval-panel.ts
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { BasePanel } from './base-panel.ts';
|
|
9
|
-
import type { Line } from '
|
|
10
|
-
import { createEmptyLine } from '
|
|
9
|
+
import type { Line } from '../types/grid.ts';
|
|
10
|
+
import { createEmptyLine } from '../types/grid.ts';
|
|
11
11
|
import {
|
|
12
12
|
buildEmptyState,
|
|
13
13
|
buildPanelLine,
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
import { readdirSync, statSync } from 'node:fs';
|
|
6
6
|
import { join, relative, basename } from 'node:path';
|
|
7
|
-
import type { Line } from '
|
|
8
|
-
import { createEmptyLine } from '
|
|
7
|
+
import type { Line } from '../types/grid.ts';
|
|
8
|
+
import { createEmptyLine } from '../types/grid.ts';
|
|
9
9
|
import { BasePanel } from './base-panel.ts';
|
|
10
10
|
import {
|
|
11
11
|
buildEmptyState,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
resolveScrollablePanelSection,
|
|
17
17
|
DEFAULT_PANEL_PALETTE,
|
|
18
18
|
} from './polish.ts';
|
|
19
|
-
import { getDisplayWidth } from '
|
|
19
|
+
import { getDisplayWidth } from '../utils/terminal-width.ts';
|
|
20
20
|
import {
|
|
21
21
|
getPanelSearchFocusTransition,
|
|
22
22
|
isPanelSearchBackspace,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as fs from 'node:fs';
|
|
2
2
|
import * as path from 'node:path';
|
|
3
|
-
import type { Line, Cell } from '
|
|
4
|
-
import { createStyledCell, createEmptyLine } from '
|
|
3
|
+
import type { Line, Cell } from '../types/grid.ts';
|
|
4
|
+
import { createStyledCell, createEmptyLine } from '../types/grid.ts';
|
|
5
5
|
import { BasePanel } from './base-panel.ts';
|
|
6
6
|
import { SyntaxHighlighter, type SyntaxToken } from '../renderer/syntax-highlighter.ts';
|
|
7
|
-
import { getDisplayWidth } from '
|
|
7
|
+
import { getDisplayWidth } from '../utils/terminal-width.ts';
|
|
8
8
|
import {
|
|
9
9
|
buildEmptyState,
|
|
10
10
|
buildPanelLine,
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
*
|
|
7
7
|
* Open via /forensics or the panel picker.
|
|
8
8
|
*/
|
|
9
|
-
import type { Line } from '
|
|
9
|
+
import type { Line } from '../types/grid.ts';
|
|
10
10
|
import type { ForensicsRegistry } from '@pellux/goodvibes-sdk/platform/runtime/forensics/registry';
|
|
11
11
|
import type { FailureReport, CausalChainEntry, PhaseTimingEntry } from '@pellux/goodvibes-sdk/platform/runtime/forensics/types';
|
|
12
12
|
import { ForensicsDataPanel } from '@pellux/goodvibes-sdk/platform/runtime/diagnostics/panels/forensics';
|
|
13
13
|
import { BasePanel } from './base-panel.ts';
|
|
14
|
-
import { createEmptyLine } from '
|
|
14
|
+
import { createEmptyLine } from '../types/grid.ts';
|
|
15
15
|
import {
|
|
16
16
|
buildEmptyState,
|
|
17
17
|
buildPanelLine,
|
package/src/panels/git-panel.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BasePanel } from './base-panel.ts';
|
|
2
|
-
import { createEmptyLine, createStyledCell, type Line } from '
|
|
2
|
+
import { createEmptyLine, createStyledCell, type Line } from '../types/grid.ts';
|
|
3
3
|
import { GitService } from '@pellux/goodvibes-sdk/platform/git/service';
|
|
4
4
|
import { logger } from '@pellux/goodvibes-sdk/platform/utils/logger';
|
|
5
5
|
import { summarizeError } from '@pellux/goodvibes-sdk/platform/utils/error-display';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Line } from '
|
|
2
|
-
import { createEmptyLine } from '
|
|
1
|
+
import type { Line } from '../types/grid.ts';
|
|
2
|
+
import { createEmptyLine } from '../types/grid.ts';
|
|
3
3
|
import { BasePanel } from './base-panel.ts';
|
|
4
4
|
import { listHookPointContracts } from '@pellux/goodvibes-sdk/platform/hooks/index';
|
|
5
5
|
import type { HookDispatcher } from '@pellux/goodvibes-sdk/platform/hooks/dispatcher';
|
|
@@ -8,7 +8,7 @@ import type { HookActivityRecord, HookActivityTracker } from '@pellux/goodvibes-
|
|
|
8
8
|
import type { HookAuthoringAction, HookSimulationResult } from '@pellux/goodvibes-sdk/platform/hooks/workbench';
|
|
9
9
|
import type { HookChain, HookDefinition } from '@pellux/goodvibes-sdk/platform/hooks/types';
|
|
10
10
|
import type { HookWorkbench } from '@pellux/goodvibes-sdk/platform/hooks/workbench';
|
|
11
|
-
import { truncateDisplay } from '
|
|
11
|
+
import { truncateDisplay } from '../utils/terminal-width.ts';
|
|
12
12
|
import {
|
|
13
13
|
buildEmptyState,
|
|
14
14
|
buildPanelLine,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Line } from '
|
|
1
|
+
import type { Line } from '../types/grid.ts';
|
|
2
2
|
import type { ForensicsRegistry } from '@pellux/goodvibes-sdk/platform/runtime/forensics/registry';
|
|
3
3
|
import { BasePanel } from './base-panel.ts';
|
|
4
4
|
import {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Line } from '
|
|
2
|
-
import { createEmptyLine } from '
|
|
1
|
+
import type { Line } from '../types/grid.ts';
|
|
2
|
+
import { createEmptyLine } from '../types/grid.ts';
|
|
3
3
|
import { BasePanel } from './base-panel.ts';
|
|
4
4
|
import type { UiIntelligenceSnapshot, UiReadModel } from '../runtime/ui-read-models.ts';
|
|
5
5
|
import {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Line } from '
|
|
1
|
+
import type { Line } from '../types/grid.ts';
|
|
2
2
|
import { BasePanel } from './base-panel.ts';
|
|
3
3
|
import type { MemoryClass, MemoryRecord, MemoryRegistry, MemoryReviewState } from '@pellux/goodvibes-sdk/platform/state/memory-store';
|
|
4
4
|
import {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Line } from '
|
|
2
|
-
import { createEmptyLine } from '
|
|
1
|
+
import type { Line } from '../types/grid.ts';
|
|
2
|
+
import { createEmptyLine } from '../types/grid.ts';
|
|
3
3
|
import { BasePanel } from './base-panel.ts';
|
|
4
4
|
import {
|
|
5
5
|
buildDetailBlock,
|
package/src/panels/mcp-panel.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { Line } from '
|
|
2
|
-
import { createEmptyLine } from '
|
|
1
|
+
import type { Line } from '../types/grid.ts';
|
|
2
|
+
import { createEmptyLine } from '../types/grid.ts';
|
|
3
3
|
import { BasePanel } from './base-panel.ts';
|
|
4
4
|
import type { McpRegistry } from '@pellux/goodvibes-sdk/platform/mcp/registry';
|
|
5
5
|
import type { McpDecisionRecord } from '@pellux/goodvibes-sdk/platform/runtime/mcp/types';
|
|
6
|
-
import { truncateDisplay } from '
|
|
6
|
+
import { truncateDisplay } from '../utils/terminal-width.ts';
|
|
7
7
|
import {
|
|
8
8
|
buildEmptyState,
|
|
9
9
|
buildGuidanceLine,
|