@wrongstack/tui 1.0.17 → 1.0.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app-action-type.d.ts +31 -0
- package/dist/app-key-handler.d.ts +1 -1
- package/dist/app-panel-state.d.ts +536 -0
- package/dist/app-props.d.ts +1 -1
- package/dist/app-state.d.ts +8 -534
- package/dist/app-status-region.d.ts +2 -1
- package/dist/app-ui-state.d.ts +2 -0
- package/dist/app-view-pickers.d.ts +2 -1
- package/dist/app-view-state.d.ts +2 -0
- package/dist/app.d.ts +2 -2
- package/dist/auth-panel-model.d.ts +1 -0
- package/dist/components/agent-monitor-presentation.d.ts +61 -0
- package/dist/components/agents-monitor.d.ts +3 -49
- package/dist/components/audit-panel.d.ts +2 -1
- package/dist/components/auth-panel.d.ts +3 -1
- package/dist/components/brain-panel.d.ts +3 -1
- package/dist/components/checkpoint-timeline.d.ts +1 -1
- package/dist/components/confirm-prompt.d.ts +6 -7
- package/dist/components/connections-panel.d.ts +2 -1
- package/dist/components/context-panel-sections.d.ts +53 -0
- package/dist/components/context-panel-types.d.ts +66 -0
- package/dist/components/context-panel.d.ts +2 -66
- package/dist/components/exit-confirm-panel.d.ts +2 -0
- package/dist/components/file-picker.d.ts +2 -1
- package/dist/components/help-panel.d.ts +5 -3
- package/dist/components/history/utils.d.ts +3 -9
- package/dist/components/history/visual-tool-output.d.ts +8 -0
- package/dist/components/input.d.ts +1 -1
- package/dist/components/inspect-overlay.d.ts +1 -1
- package/dist/components/kanban-panel-presentation.d.ts +114 -0
- package/dist/components/kanban-panel.d.ts +2 -47
- package/dist/components/mailbox-panel.d.ts +2 -1
- package/dist/components/mcp-picker.d.ts +3 -1
- package/dist/components/mode-picker.d.ts +3 -1
- package/dist/components/model-picker.d.ts +1 -1
- package/dist/components/monitor-shell.d.ts +14 -3
- package/dist/components/plugin-picker.d.ts +3 -1
- package/dist/components/powerline-rail.d.ts +6 -3
- package/dist/components/provider-colors.d.ts +2 -12
- package/dist/components/refine-countdown-panel.d.ts +4 -3
- package/dist/components/settings-picker-row-list.d.ts +2 -1
- package/dist/components/settings-picker.d.ts +3 -1
- package/dist/components/shadow-panel.d.ts +2 -1
- package/dist/components/sidebar-content.d.ts +1 -47
- package/dist/components/sidebar-ipc-icons.d.ts +9 -0
- package/dist/components/sidebar-presentation.d.ts +98 -0
- package/dist/components/sidebar.d.ts +3 -1
- package/dist/components/skill-picker.d.ts +2 -1
- package/dist/components/slash-confirm-panel.d.ts +2 -0
- package/dist/components/slash-menu.d.ts +2 -1
- package/dist/components/slash-modal-frame.d.ts +9 -0
- package/dist/components/status-bar.d.ts +1 -1
- package/dist/components/statusline-picker.d.ts +2 -2
- package/dist/components/tools-picker.d.ts +3 -1
- package/dist/components/user-input-prompt.d.ts +4 -2
- package/dist/connection-actions.d.ts +20 -0
- package/dist/connections-health.d.ts +8 -1
- package/dist/esc-close-panels.d.ts +0 -1
- package/dist/f-key-panels.d.ts +4 -0
- package/dist/hooks/use-active-theme.d.ts +2 -1
- package/dist/hooks/use-app-panels-state.d.ts +1 -1
- package/dist/hooks/use-app-picker-keys.d.ts +2 -1
- package/dist/hooks/use-fleet-generation-gate.d.ts +4 -3
- package/dist/hooks/use-panel-controllers.d.ts +1 -1
- package/dist/hooks/use-picker-keys-types.d.ts +1 -0
- package/dist/hooks/use-shadow-panel.d.ts +1 -1
- package/dist/hooks/use-sidebar-panel-data.d.ts +7 -5
- package/dist/hooks/use-skill-mention-picker.d.ts +6 -0
- package/dist/hooks/use-statusbar-view-model.d.ts +2 -2
- package/dist/hooks/use-windowed-picker.d.ts +3 -4
- package/dist/index.js +9799 -7534
- package/dist/ink.d.ts +4 -4
- package/dist/input-graphemes.d.ts +4 -0
- package/dist/input-key-router.d.ts +2 -0
- package/dist/input-tokens.d.ts +10 -0
- package/dist/input-validation/action-types.d.ts +1 -1
- package/dist/input-validation-coordination.d.ts +9 -0
- package/dist/kanban-arguments.d.ts +48 -0
- package/dist/kanban-audit.d.ts +1 -1
- package/dist/kanban-command-types.d.ts +53 -0
- package/dist/kanban-reports.d.ts +42 -0
- package/dist/kanban-slash.d.ts +4 -125
- package/dist/key-routes/key-route-overlay.d.ts +2 -2
- package/dist/on-panel-open.d.ts +1 -1
- package/dist/picker-text-input.d.ts +4 -0
- package/dist/reducers/composer.d.ts +1 -1
- package/dist/reducers/panel-pickers.d.ts +1 -1
- package/dist/reducers/workspace-panels.d.ts +1 -1
- package/dist/run-tui-options.d.ts +1 -1
- package/dist/statusline-palette.d.ts +4 -0
- package/dist/theme-utils.d.ts +1 -1
- package/dist/ui-contracts.d.ts +1 -0
- package/dist/use-app-controller.d.ts +157 -0
- package/package.json +7 -7
|
@@ -11,12 +11,14 @@ export interface ToolPickerItem {
|
|
|
11
11
|
description: string;
|
|
12
12
|
}
|
|
13
13
|
interface ToolsPickerProps {
|
|
14
|
+
maxRows?: number | undefined;
|
|
15
|
+
columns?: number | undefined;
|
|
14
16
|
items: ToolPickerItem[];
|
|
15
17
|
selected: number;
|
|
16
18
|
busy?: boolean | undefined;
|
|
17
19
|
hint?: string | undefined;
|
|
18
20
|
filter?: string | undefined;
|
|
19
21
|
}
|
|
20
|
-
export declare function ToolsPicker({ items, selected, busy, hint, filter, }: ToolsPickerProps): React.ReactElement;
|
|
22
|
+
export declare function ToolsPicker({ items, selected, busy, hint, filter, maxRows, columns, }: ToolsPickerProps): React.ReactElement;
|
|
21
23
|
export {};
|
|
22
24
|
//# sourceMappingURL=tools-picker.d.ts.map
|
|
@@ -14,9 +14,11 @@ type AnswerDraft = {
|
|
|
14
14
|
};
|
|
15
15
|
type Draft = Record<string, AnswerDraft>;
|
|
16
16
|
export declare function usePendingUserInput(events: EventBus): PendingUserInput | null;
|
|
17
|
-
|
|
17
|
+
interface UserInputPromptProps {
|
|
18
18
|
pending: PendingUserInput;
|
|
19
|
-
|
|
19
|
+
onInterrupt?: (() => void) | undefined;
|
|
20
|
+
}
|
|
21
|
+
export declare function UserInputPrompt(props: UserInputPromptProps): React.ReactElement;
|
|
20
22
|
export declare function initialDraft(request: UserInputRequest): Draft;
|
|
21
23
|
export declare function validateDraft(questions: UserInputQuestion[], draft: Draft): {
|
|
22
24
|
valid: boolean;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ConnectionHealthServiceId } from './connections-health.js';
|
|
2
|
+
export interface ConnectionActionResult {
|
|
3
|
+
serviceId: ConnectionHealthServiceId;
|
|
4
|
+
action: 'shutdown' | 'restart';
|
|
5
|
+
success: boolean;
|
|
6
|
+
message: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const RESTARTABLE_SERVICES: readonly ConnectionHealthServiceId[];
|
|
9
|
+
export declare function isRestartableService(serviceId: ConnectionHealthServiceId): boolean;
|
|
10
|
+
export declare function isEndpointAlive(endpoint: string): Promise<boolean>;
|
|
11
|
+
export declare function waitForShutdown(probe?: () => Promise<boolean> | boolean): Promise<void>;
|
|
12
|
+
export declare function executeConnectionAction(serviceId: ConnectionHealthServiceId, action: 'shutdown' | 'restart', projectRoot: string, indexDir?: string | undefined): Promise<ConnectionActionResult>;
|
|
13
|
+
export declare function restartAllConnectionServices(projectRoot: string, indexDir?: string | undefined): Promise<ConnectionActionResult[]>;
|
|
14
|
+
export declare function killSessionCatalogServer(projectRoot: string, action: 'shutdown' | 'restart'): Promise<ConnectionActionResult>;
|
|
15
|
+
export declare function killKanbanServer(projectRoot: string, action: 'shutdown' | 'restart'): Promise<ConnectionActionResult>;
|
|
16
|
+
export declare function killSageServer(projectRoot: string, action: 'shutdown' | 'restart'): Promise<ConnectionActionResult>;
|
|
17
|
+
export declare function killChronicleServer(projectRoot: string, action: 'shutdown' | 'restart'): Promise<ConnectionActionResult>;
|
|
18
|
+
export declare function killCodebaseIndexServer(projectRoot: string, indexDir: string | undefined, action: 'shutdown' | 'restart'): Promise<ConnectionActionResult>;
|
|
19
|
+
export declare function killMailboxServer(projectRoot: string, action: 'shutdown' | 'restart'): Promise<ConnectionActionResult>;
|
|
20
|
+
//# sourceMappingURL=connection-actions.d.ts.map
|
|
@@ -9,8 +9,9 @@
|
|
|
9
9
|
* `@wrongstack/tools`).
|
|
10
10
|
*/
|
|
11
11
|
export type ConnectionHealthStatus = 'healthy' | 'degraded' | 'offline' | 'unavailable' | 'error';
|
|
12
|
+
export type ConnectionHealthServiceId = 'session-catalog' | 'chronicle' | 'codebase-index' | 'sage' | 'kanban' | 'mailbox' | 'governance';
|
|
12
13
|
export interface ConnectionHealthService {
|
|
13
|
-
id:
|
|
14
|
+
id: ConnectionHealthServiceId;
|
|
14
15
|
label: string;
|
|
15
16
|
status: ConnectionHealthStatus;
|
|
16
17
|
required: boolean;
|
|
@@ -29,6 +30,12 @@ export interface ConnectionHealthService {
|
|
|
29
30
|
watchedFiles?: number | undefined;
|
|
30
31
|
} | undefined;
|
|
31
32
|
lastError?: string | undefined;
|
|
33
|
+
control?: 'restart' | 'none' | undefined;
|
|
34
|
+
advisory?: {
|
|
35
|
+
code: string;
|
|
36
|
+
operatorAction: string;
|
|
37
|
+
executionDisposition: string;
|
|
38
|
+
} | undefined;
|
|
32
39
|
}
|
|
33
40
|
export interface ConnectionsHealthReport {
|
|
34
41
|
checkedAt: number;
|
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
*
|
|
15
15
|
* Excluded panels (own their own Esc):
|
|
16
16
|
* - worktreeMonitor — `isWorktreeMonitorCloseKey` in WorktreeMonitor.tsx
|
|
17
|
-
* - goalRun monitor — PhaseMonitor owns Esc via its own useInput
|
|
18
17
|
* - kanbanPanel — `key.escape || 'q' → onClose` in KanbanPanel.tsx
|
|
19
18
|
* - goalKanbanPanel — `key.escape || 'q' → onClose` in GoalKanbanPanel.tsx
|
|
20
19
|
*
|
package/dist/f-key-panels.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import type { Action } from './app-action-type.js';
|
|
2
|
+
import type { State } from './app-state.js';
|
|
2
3
|
import type { StatuslineItem } from './components/statusline-picker.js';
|
|
4
|
+
import type { PanelPositionMap } from './ui-contracts.js';
|
|
5
|
+
/** The bottom panel owns input; sidebar twins leave the composer available. */
|
|
6
|
+
export declare function activeBottomFKeyPanel(state: State, positions: PanelPositionMap): number | null;
|
|
3
7
|
export type FKeyPanelAction = 'projectPickerOpen' | 'toggleMonitor' | 'toggleAgentsMonitor' | 'toggleWorktreeMonitor' | 'togglePlanPanel' | 'toggleTodosMonitor' | 'toggleQueuePanel' | 'toggleProcessList' | 'toggleKanbanPanel' | 'toggleGoalPanel' | 'toggleSessionsPanel' | 'toggleCoordinatorMonitor' | 'toggleCronMonitor' | 'toggleConnectionsPanel' | 'statuslineOpen';
|
|
4
8
|
/** Host-side action keys that require work beyond a reducer dispatch. */
|
|
5
9
|
type FKeyHostAction = 'openProjectPicker' | 'loadLiveSessions' | 'openStatuslinePicker';
|
|
@@ -4,7 +4,8 @@ import { type Theme } from '../theme.js';
|
|
|
4
4
|
* current `theme` snapshot. Used by the App shell to force a re-render
|
|
5
5
|
* when `setActiveTheme()` mutates the global theme — child components
|
|
6
6
|
* read `theme` directly via destructuring, so the parent re-render
|
|
7
|
-
* propagates the new palette into
|
|
7
|
+
* propagates the new palette into ordinary children. Memoized boundaries
|
|
8
|
+
* subscribe separately: unchanged props must not keep an old palette alive.
|
|
8
9
|
*
|
|
9
10
|
* The hook itself returns the live `theme` reference; callers don't
|
|
10
11
|
* typically need to use it (they can keep reading `theme` directly),
|
|
@@ -46,7 +46,7 @@ export declare function useAppPanelsState(params: {
|
|
|
46
46
|
brainCtl: import("./use-brain-panel.js").BrainPanelController;
|
|
47
47
|
openBrainPanel: () => void;
|
|
48
48
|
changeBrainRisk: (delta: number) => void;
|
|
49
|
-
openShadowPanel: () =>
|
|
49
|
+
openShadowPanel: () => boolean;
|
|
50
50
|
handleShadowStart: () => Promise<void>;
|
|
51
51
|
handleShadowStop: () => Promise<void>;
|
|
52
52
|
subagentModelsCtl: import("./use-subagent-models-panel.js").SubagentModelsPanelController;
|
|
@@ -11,6 +11,7 @@ import type { usePanelControllers } from './use-panel-controllers.js';
|
|
|
11
11
|
import type { useStatusbarViewModel } from './use-statusbar-view-model.js';
|
|
12
12
|
import type { useTuiEnvironmentState } from './use-tui-environment-state.js';
|
|
13
13
|
interface UseAppPickerKeysOptions {
|
|
14
|
+
sessionGenerationRef?: MutableRefObject<number> | undefined;
|
|
14
15
|
host: AppProps;
|
|
15
16
|
state: State;
|
|
16
17
|
dispatch: Dispatch<Action>;
|
|
@@ -36,6 +37,6 @@ interface UseAppPickerKeysOptions {
|
|
|
36
37
|
onThemePickerEnter?: () => void;
|
|
37
38
|
setPromptFavorite: (slug: string, favorite: boolean) => Promise<void>;
|
|
38
39
|
}
|
|
39
|
-
export declare function useAppPickerKeys({ host, state, dispatch, environment, statusbar, panelControllers, authPanelController, brainController, lastEnterAtRef, inputGateRef, submitRef, promptUsageRef, setDraft, acceptSlashPickerSelection, changeBrainRisk, handleModelPicked, handleShadowStart, handleShadowStop, subagentModelsController, statuslineHiddenForPicker, onPickerEnter, onThemePickerEnter, setPromptFavorite, }: UseAppPickerKeysOptions): (input: string, key: import("../components/input.js").KeyEvent, isEnter: boolean) => boolean;
|
|
40
|
+
export declare function useAppPickerKeys({ sessionGenerationRef, host, state, dispatch, environment, statusbar, panelControllers, authPanelController, brainController, lastEnterAtRef, inputGateRef, submitRef, promptUsageRef, setDraft, acceptSlashPickerSelection, changeBrainRisk, handleModelPicked, handleShadowStart, handleShadowStop, subagentModelsController, statuslineHiddenForPicker, onPickerEnter, onThemePickerEnter, setPromptFavorite, }: UseAppPickerKeysOptions): (input: string, key: import("../components/input.js").KeyEvent, isEnter: boolean) => boolean;
|
|
40
41
|
export {};
|
|
41
42
|
//# sourceMappingURL=use-app-picker-keys.d.ts.map
|
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Fleet event bridges must discard events from subagents that were spawned
|
|
5
5
|
* before the last `/clear`. This shared hook encapsulates that logic so any
|
|
6
|
-
* bridge can apply it consistently.
|
|
7
|
-
*
|
|
8
|
-
*
|
|
6
|
+
* bridge can apply it consistently. Both consumers wire it: `useDirectorFleetBridge`
|
|
7
|
+
* (Director FleetBus streaming) and `useSubagentEvents` (EventBus lifecycle —
|
|
8
|
+
* instantiated at use-subagent-events.ts:126, `gate.track` on spawn, `gate.isLive`
|
|
9
|
+
* on every subagent event handler, `gate.forget` on removal).
|
|
9
10
|
*
|
|
10
11
|
* Usage:
|
|
11
12
|
* ```ts
|
|
@@ -14,7 +14,7 @@ interface PanelControllersOptions {
|
|
|
14
14
|
openAuthPanel: (view?: 'list' | 'oauth') => boolean;
|
|
15
15
|
openModePicker: () => void | Promise<void>;
|
|
16
16
|
openBrainPanel: () => void | Promise<void>;
|
|
17
|
-
openShadowPanel: () => void |
|
|
17
|
+
openShadowPanel: () => void | boolean;
|
|
18
18
|
/** Opens the `/subagent-models` lane panel; omitted when the host wires no plan. */
|
|
19
19
|
openSubagentModelsPanel?: (() => void) | undefined;
|
|
20
20
|
openHelpPanel: () => void | Promise<void>;
|
|
@@ -43,6 +43,7 @@ export interface PickerKeysHost {
|
|
|
43
43
|
onResumePickerEnter: (() => Promise<void>) | undefined;
|
|
44
44
|
onSessionsPanelEnter: (() => Promise<void>) | undefined;
|
|
45
45
|
onProjectPickerEnter: (() => Promise<void>) | undefined;
|
|
46
|
+
onSkillMentionPick?: ((name: string) => void) | undefined;
|
|
46
47
|
onSlashPickerEnter: (() => void) | undefined;
|
|
47
48
|
onSettingsPickerEnter: (() => void) | undefined;
|
|
48
49
|
onPluginPickerToggle: (() => Promise<void> | void) | undefined;
|
|
@@ -10,7 +10,7 @@ interface ShadowPanelHost {
|
|
|
10
10
|
onShadowStop?: (() => Promise<string | undefined>) | undefined;
|
|
11
11
|
}
|
|
12
12
|
export declare function useShadowPanel(dispatch: React.Dispatch<Action>, host: ShadowPanelHost): {
|
|
13
|
-
openShadowPanel: () =>
|
|
13
|
+
openShadowPanel: () => boolean;
|
|
14
14
|
handleShadowStart: () => Promise<void>;
|
|
15
15
|
handleShadowStop: () => Promise<void>;
|
|
16
16
|
};
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
* Each hook is self-contained: it manages its own refresh interval and
|
|
10
10
|
* cleanup. The hooks must be called unconditionally (rules of hooks), but
|
|
11
11
|
* polling is gated by the `enabled` flag — app-view passes whether the
|
|
12
|
-
* twin currently occupies a visible sidebar slot.
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
12
|
+
* twin currently occupies a visible sidebar slot. Connections also supplies
|
|
13
|
+
* the persistent icon strip, so it polls whenever the sidebar is visible.
|
|
14
|
+
* Hidden surfaces do not poll (bottom panels run their own polling when open).
|
|
15
|
+
* Each hook performs an immediate
|
|
16
16
|
* first read when enabled, so data is fresh the moment the twin mounts.
|
|
17
17
|
*/
|
|
18
18
|
interface SidebarProcess {
|
|
@@ -30,7 +30,9 @@ export declare function useSidebarProcessList(enabled?: boolean): {
|
|
|
30
30
|
totalCount: number;
|
|
31
31
|
processes: readonly SidebarProcess[];
|
|
32
32
|
};
|
|
33
|
-
interface SidebarConnection {
|
|
33
|
+
export interface SidebarConnection {
|
|
34
|
+
id?: import('../connections-health.js').ConnectionHealthServiceId | undefined;
|
|
35
|
+
healthStatus?: import('../connections-health.js').ConnectionHealthStatus | undefined;
|
|
34
36
|
name: string;
|
|
35
37
|
status: 'ok' | 'warn' | 'down' | 'unknown';
|
|
36
38
|
latencyMs?: number | undefined;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { SkillLoader } from '@wrongstack/core/types';
|
|
2
|
+
import { type Dispatch } from 'react';
|
|
3
|
+
import type { Action } from '../app-action-type.js';
|
|
4
|
+
import type { State } from '../app-state.js';
|
|
5
|
+
export declare function useSkillMentionPicker(state: State, loader: SkillLoader | undefined, dispatch: Dispatch<Action>): void;
|
|
6
|
+
//# sourceMappingURL=use-skill-mention-picker.d.ts.map
|
|
@@ -34,12 +34,12 @@ interface StatusbarViewModelOptions {
|
|
|
34
34
|
*/
|
|
35
35
|
tokenRefresh?: TokenRefreshData;
|
|
36
36
|
}
|
|
37
|
-
interface PlanCounts {
|
|
37
|
+
export interface PlanCounts {
|
|
38
38
|
open: number;
|
|
39
39
|
inProgress: number;
|
|
40
40
|
done: number;
|
|
41
41
|
}
|
|
42
|
-
interface TaskCounts {
|
|
42
|
+
export interface TaskCounts {
|
|
43
43
|
pending: number;
|
|
44
44
|
inProgress: number;
|
|
45
45
|
completed: number;
|
|
@@ -61,7 +61,7 @@ export interface UseWindowedPickerOptions {
|
|
|
61
61
|
* 24-row terminal even when the input bar or status bar grows.
|
|
62
62
|
*/
|
|
63
63
|
readonly maxRows?: number | undefined;
|
|
64
|
-
/**
|
|
64
|
+
/** Legacy minimum without a measured maxRows budget. Defaults to 3. */
|
|
65
65
|
readonly minVisible?: number | undefined;
|
|
66
66
|
}
|
|
67
67
|
export interface WindowedPickerSlice {
|
|
@@ -82,9 +82,8 @@ export interface WindowedPickerSlice {
|
|
|
82
82
|
* Behavior contract:
|
|
83
83
|
* - Visible count is `floor((available - chrome - markers) / rowSpan)`
|
|
84
84
|
* where `available` is either `maxRows` (measured) or
|
|
85
|
-
* `rows - shellReservedRows` (guessed)
|
|
86
|
-
*
|
|
87
|
-
* that overflows — better to bleed than to hide the focused row.
|
|
85
|
+
* `rows - shellReservedRows` (guessed). Measured budgets show at least
|
|
86
|
+
* one focused option; only the legacy guessed budget uses minVisible.
|
|
88
87
|
* - The window stays centered on `selected` once the picker is past the
|
|
89
88
|
* first page; on the first page it stays top-aligned so the user sees
|
|
90
89
|
* the list start. `selected < 0 || selected >= total` is treated as no
|