@wrongstack/tui 0.300.0 → 0.302.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.
- package/dist/app-action-type.d.ts +12 -1
- package/dist/app-key-handler.d.ts +17 -14
- package/dist/app-settings-type.d.ts +2 -0
- package/dist/app-state.d.ts +11 -0
- package/dist/app-status-region.d.ts +2 -3
- package/dist/app-ui-state.d.ts +33 -40
- package/dist/app-view-contract.d.ts +3 -1
- package/dist/app-view-state.d.ts +9 -0
- package/dist/app.d.ts +2 -2
- package/dist/brain-panel-model.d.ts +13 -1
- package/dist/components/connections-panel.d.ts +1 -1
- package/dist/components/coordinator-panel.d.ts +1 -0
- package/dist/components/cron-jobs.d.ts +12 -0
- package/dist/components/history/assistant.d.ts +0 -22
- package/dist/components/history/index.d.ts +1 -1
- package/dist/components/history.d.ts +1 -1
- package/dist/components/monitor-shell.d.ts +3 -0
- package/dist/components/powerline-rail.d.ts +21 -0
- package/dist/components/settings-picker-model.d.ts +1 -1
- package/dist/components/settings-picker.d.ts +3 -1
- package/dist/components/sidebar-content.d.ts +33 -3
- package/dist/components/sidebar-panels.d.ts +11 -7
- package/dist/components/status-bar-chips.d.ts +1 -4
- package/dist/components/status-bar-format.d.ts +15 -26
- package/dist/components/status-bar-types.d.ts +18 -7
- package/dist/components/status-bar.d.ts +2 -2
- package/dist/components/statusline-detail-panel.d.ts +1 -1
- package/dist/components/statusline-picker.d.ts +8 -2
- package/dist/components/topic-check-panel.d.ts +7 -0
- package/dist/esc-close-panels.d.ts +11 -1
- package/dist/f-key-panels.d.ts +1 -1
- package/dist/hooks/use-app-picker-keys.d.ts +2 -2
- package/dist/hooks/use-git-session-status.d.ts +9 -1
- package/dist/hooks/use-next-steps-auto-submit.d.ts +2 -2
- package/dist/hooks/use-statusbar-view-model.d.ts +9 -1
- package/dist/hooks/use-subagent-events.d.ts +11 -0
- package/dist/hooks/use-terminal-size.d.ts +57 -0
- package/dist/hooks/use-tui-activity.d.ts +5 -2
- package/dist/index.js +34337 -33812
- package/dist/input-validation/action-types.d.ts +1 -1
- package/dist/input-validation.d.ts +1 -1
- package/dist/markdown-table.d.ts +5 -20
- package/dist/markdown.d.ts +0 -9
- package/dist/memory-slash-format.d.ts +1 -1
- package/dist/overlay-key-router.d.ts +27 -6
- package/dist/reducers/dialogs.d.ts +1 -1
- package/dist/settings-contracts.d.ts +7 -0
- package/dist/sidebar-sizing.d.ts +34 -0
- package/dist/submit-controller.d.ts +2 -2
- package/dist/submit-prompt-refinement.d.ts +1 -1
- package/dist/terminal-width.d.ts +18 -6
- package/dist/topic-shift-advisor.d.ts +2 -0
- package/dist/ui-contracts.d.ts +15 -4
- package/package.json +8 -7
- package/dist/hooks/use-terminal-render-lifecycle.d.ts +0 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/** Known reducer action types — exact, compile-time checked allow-list. */
|
|
2
|
-
export declare const ALLOWED_ACTION_TYPES: readonly ["addEntry", "archiveLoaded", "startArchiveLoad", "authBusy", "authCatalog", "authClose", "authConfirmEnd", "authConfirmStart", "authFilter", "authFlowDone", "authFlowLog", "authFlowStart", "authHint", "authMove", "authOpen", "authPromptChange", "authPromptEnd", "authPromptStart", "authProviders", "authView", "autonomyPickerClose", "autonomyPickerHint", "autonomyPickerMove", "autonomyPickerOpen", "brainBusy", "brainClose", "brainHint", "brainMove", "brainOpen", "brainPromptClear", "brainPromptSet", "brainRiskChange", "brainRowMove", "brainSetLog", "brainSettingsLoaded", "brainStatus", "brainView", "checkpointReceived", "clearConfirmClose", "clearConfirmOpen", "clearConfirmSetValue", "clearHistory", "clearInput", "clearInputHistory", "closeAllPanels", "collabBugFound", "collabEvalComplete", "sidebarScroll", "sidebarScrollReset", "toggleSidebarFocus", "collabPlanEmitted", "collabSessionDone", "collabSubagentSpawned", "compactHistory", "confirmClearAll", "confirmClose", "confirmOpen", "continueConfirmClose", "continueConfirmOpen", "copiedNotice", "coordinatorEvent", "countdownEnded", "countdownTick", "debugStreamStats", "debugStreamStatsClear", "dequeueFirst", "designPickerClose", "designPickerMove", "designPickerOpen", "designPickerStack", "enhanceBusy", "enhanceClose", "enhanceOpen", "enhanceSet", "enqueue", "escConfirmClose", "escConfirmOpen", "fallbackOverlayClose", "fallbackOverlayMove", "fallbackOverlayOpen", "eternalStage", "exitConfirmClose", "exitConfirmOpen", "fKeyPickerClose", "fKeyPickerMove", "fKeyPickerOpen", "fleetBatch", "fleetBudgetExtended", "fleetBudgetWarning", "fleetConcurrency", "fleetCost", "fleetCtxPct", "fleetDelta", "fleetDone", "fleetMessage", "fleetRemove", "fleetSeed", "fleetSpawn", "fleetStart", "fleetTool", "fleetToolEnd", "fleetToolStart", "fleetUsage", "goalRunElapsed", "goalRunInit", "goalRunMonitorToggle", "goalRunPhaseUpdate", "goalRunReset", "goalRunRunningPhases", "goalRunTaskActive", "goalSummary", "helpClose", "helpFilter", "helpHint", "helpMove", "helpOpen", "hint", "historyDown", "historyPush", "historyUp", "interrupt", "leaderCtxPct", "leaderIterEnd", "leaderIterStart", "leaderToolEnd", "leaderToolStart", "mcpPickerBusy", "mcpPickerClose", "mcpPickerHint", "mcpPickerMove", "mcpPickerOpen", "mcpPickerSetItems", "modePickerClose", "modePickerHint", "modePickerMove", "modePickerOpen", "modelPickerBack", "modelPickerClose", "modelPickerHint", "modelPickerMove", "modelPickerOpen", "modelPickerPickProvider", "modelPickerSearch", "pickerClose", "pickerMove", "pickerOpen", "pickerSetMatches", "pluginPickerBusy", "pluginPickerClose", "pluginPickerHint", "pluginPickerMove", "pluginPickerOpen", "pluginPickerSetItems", "projectPickerClose", "projectPickerFilter", "projectPickerHint", "projectPickerMove", "projectPickerOpen", "promptPickerCategory", "promptPickerClose", "promptPickerMove", "promptPickerOpen", "queueClear", "queueDelete", "queueToggleRefine", "refineCountdownClose", "refineCountdownOpen", "refineFailureClose", "refineFailureOpen", "replaceHistory", "resetContextChip", "resetInterrupts", "resumePickerBusy", "resumePickerClose", "resumePickerError", "resumePickerHint", "resumePickerMove", "resumePickerOpen", "rewindOverlayClose", "rewindOverlayMove", "rewindOverlayOpen", "sddBoardSnapshot", "sddBoardFocusNext", "sddBoardFocusPrev", "sendModePickerClose", "sendModePickerMove", "sendModePickerOpen", "sessionResumeConfirmClear", "sessionResumeConfirmSet", "sessionRewound", "sessionsPanelBusy", "sessionsPanelMove", "sessionsPanelSet", "setBuffer", "setFleetChat", "setHistoryScrolled", "setInputHistory", "setViewportRows", "settingsClose", "settingsFieldMove", "settingsFieldSet", "settingsFilterSet", "settingsHint", "settingsOpen", "settingsThinkingEditCancel", "settingsThinkingEditChange", "settingsThinkingEditCommit", "settingsThinkingEditStart", "settingsValueChange", "settingsValueSet", "shadowClose", "shadowHint", "shadowOpen", "shadowUpdate", "shellCommandWarningClose", "shellCommandWarningOpen", "slashConfirmClose", "slashConfirmOpen", "slashPickerClose", "slashPickerMove", "slashPickerOpen", "status", "statuslineChipExpire", "statuslineChipShow", "statuslineClose", "statuslineFieldMove", "statuslineFieldSet", "statuslineHint", "statuslineOpen", "statuslineToggle", "statuslineVisibleChipsSync", "steerConsume", "steerStart", "streamDelta", "streamReset", "toggleAgentsMonitor", "toggleAuditPanel", "toggleContextPanel", "toggleConnectionsPanel", "toggleCoordinatorMonitor", "toggleCronMonitor", "toggleGoalKanbanPanel", "toggleGoalPanel", "toggleHelp", "toggleKanbanPanel", "toggleMonitor", "togglePlanPanel", "toggleProcessList", "toggleQueuePanel", "toggleSddBoardMonitor", "toggleSessionsPanel", "toggleTodosMonitor", "toggleWorktreeMonitor", "toolEnded", "toolStarted", "toolStreamAppend", "toolStreamClear", "toolsPickerBusy", "toolsPickerClose", "toolsPickerFilter", "toolsPickerHint", "toolsPickerMove", "toolsPickerOpen", "toolsPickerSetItems", "toolsPickerToggle", "worktreeRemove", "worktreeUpsert"];
|
|
2
|
+
export declare const ALLOWED_ACTION_TYPES: readonly ["addEntry", "archiveLoaded", "startArchiveLoad", "authBusy", "authCatalog", "authClose", "authConfirmEnd", "authConfirmStart", "authFilter", "authFlowDone", "authFlowLog", "authFlowStart", "authHint", "authMove", "authOpen", "authPromptChange", "authPromptEnd", "authPromptStart", "authProviders", "authView", "autonomyPickerClose", "autonomyPickerHint", "autonomyPickerMove", "autonomyPickerOpen", "brainBusy", "brainClose", "brainHint", "brainMove", "brainOpen", "brainPromptClear", "brainPromptSet", "brainRiskChange", "brainRowMove", "brainSetLog", "brainSettingsLoaded", "brainStatus", "brainView", "checkpointReceived", "clearConfirmClose", "clearConfirmOpen", "clearConfirmSetValue", "clearHistory", "clearInput", "clearInputHistory", "closeAllPanels", "collabBugFound", "collabEvalComplete", "sidebarScroll", "sidebarScrollReset", "toggleSidebarFocus", "collabPlanEmitted", "collabSessionDone", "collabSubagentSpawned", "compactHistory", "confirmClearAll", "confirmClose", "confirmOpen", "continueConfirmClose", "continueConfirmOpen", "copiedNotice", "coordinatorEvent", "countdownEnded", "countdownTick", "debugStreamStats", "debugStreamStatsClear", "dequeueFirst", "designPickerClose", "designPickerMove", "designPickerOpen", "designPickerStack", "enhanceBusy", "enhanceClose", "enhanceOpen", "enhanceSet", "enqueue", "escConfirmClose", "escConfirmOpen", "fallbackOverlayClose", "fallbackOverlayMove", "fallbackOverlayOpen", "eternalStage", "exitConfirmClose", "exitConfirmOpen", "fKeyPickerClose", "fKeyPickerMove", "fKeyPickerOpen", "fleetBatch", "fleetBudgetExtended", "fleetBudgetWarning", "fleetConcurrency", "fleetCost", "fleetCtxPct", "fleetDelta", "fleetDone", "fleetMessage", "fleetRemove", "fleetSeed", "fleetSpawn", "fleetStart", "fleetTool", "fleetToolEnd", "fleetToolStart", "fleetUsage", "goalRunElapsed", "goalRunInit", "goalRunMonitorToggle", "goalRunPhaseUpdate", "goalRunReset", "goalRunRunningPhases", "goalRunTaskActive", "goalSummary", "helpClose", "helpFilter", "helpHint", "helpMove", "helpOpen", "hint", "historyDown", "historyPush", "historyUp", "interrupt", "leaderCtxPct", "leaderIterEnd", "leaderIterStart", "leaderToolEnd", "leaderToolStart", "mcpPickerBusy", "mcpPickerClose", "mcpPickerHint", "mcpPickerMove", "mcpPickerOpen", "mcpPickerSetItems", "modePickerClose", "modePickerHint", "modePickerMove", "modePickerOpen", "modelPickerBack", "modelPickerClose", "modelPickerHint", "modelPickerMove", "modelPickerOpen", "modelPickerPickProvider", "modelPickerSearch", "pickerClose", "pickerMove", "pickerOpen", "pickerSetMatches", "pluginPickerBusy", "pluginPickerClose", "pluginPickerHint", "pluginPickerMove", "pluginPickerOpen", "pluginPickerSetItems", "projectPickerClose", "projectPickerFilter", "projectPickerHint", "projectPickerMove", "projectPickerOpen", "promptPickerCategory", "promptPickerClose", "promptPickerMove", "promptPickerOpen", "queueClear", "queueDelete", "queueToggleRefine", "refineCountdownClose", "refineCountdownOpen", "refineFailureClose", "refineFailureOpen", "replaceHistory", "resetContextChip", "resetInterrupts", "resumePickerBusy", "resumePickerClose", "resumePickerError", "resumePickerHint", "resumePickerMove", "resumePickerOpen", "rewindOverlayClose", "rewindOverlayMove", "rewindOverlayOpen", "sddBoardSnapshot", "sddBoardFocusNext", "sddBoardFocusPrev", "sendModePickerClose", "sendModePickerMove", "sendModePickerOpen", "sessionResumeConfirmClear", "sessionResumeConfirmSet", "sessionRewound", "sessionsPanelBusy", "sessionsPanelMove", "sessionsPanelSet", "setBuffer", "setFleetChat", "setHistoryScrolled", "setInputHistory", "setViewportRows", "settingsClose", "settingsFieldMove", "settingsFieldSet", "settingsFilterSet", "settingsHint", "settingsOpen", "settingsThinkingEditCancel", "settingsThinkingEditChange", "settingsThinkingEditCommit", "settingsThinkingEditStart", "settingsValueChange", "settingsValueSet", "shadowClose", "shadowHint", "shadowOpen", "shadowUpdate", "shellCommandWarningClose", "shellCommandWarningOpen", "slashConfirmClose", "slashConfirmOpen", "slashPickerClose", "slashPickerMove", "slashPickerOpen", "status", "statuslineChipExpire", "statuslineChipShow", "statuslineClose", "statuslineFieldMove", "statuslineFieldSet", "statuslineHint", "statuslineOpen", "statuslineToggle", "statuslineVisibleChipsSync", "steerConsume", "steerStart", "streamDelta", "streamReset", "toggleAgentsMonitor", "toggleAuditPanel", "toggleContextPanel", "toggleConnectionsPanel", "toggleCoordinatorMonitor", "toggleCronMonitor", "toggleGoalKanbanPanel", "toggleGoalPanel", "toggleHelp", "toggleKanbanPanel", "toggleMonitor", "togglePlanPanel", "toggleProcessList", "toggleQueuePanel", "toggleSddBoardMonitor", "toggleSessionsPanel", "toggleTodosMonitor", "toggleWorktreeMonitor", "toolEnded", "toolStarted", "toolStreamAppend", "toolStreamClear", "topicCheckBusy", "toolsPickerBusy", "toolsPickerClose", "toolsPickerFilter", "toolsPickerHint", "toolsPickerMove", "toolsPickerOpen", "toolsPickerSetItems", "toolsPickerToggle", "worktreeRemove", "worktreeUpsert"];
|
|
3
3
|
export type AllowedActionType = (typeof ALLOWED_ACTION_TYPES)[number];
|
|
4
4
|
//# sourceMappingURL=action-types.d.ts.map
|
|
@@ -55,8 +55,8 @@ export { ALLOWED_ACTION_TYPES, type AllowedActionType, } from './input-validatio
|
|
|
55
55
|
export { ALLOWED_AUTONOMY_MODES, ALLOWED_CAPABILITY_FIELDS, ALLOWED_COLLAB_VERDICTS, ALLOWED_ENTRY_KINDS, ALLOWED_FLEET_CHAT_MODES, ALLOWED_FLEET_STATUSES, ALLOWED_KEY_EVENT_FIELDS, ALLOWED_MOUSE_BUTTONS, ALLOWED_MOUSE_KINDS, ALLOWED_PICKER_KINDS, ALLOWED_SCROLL_DIRS, ALLOWED_SDD_OPS, ALLOWED_SEND_MODES, TEXT_BEARING_ENTRY_KINDS, } from './input-validation/allow-lists.js';
|
|
56
56
|
export { MAX_ACTION_DEPTH, MAX_ACTION_STRING_FIELD, MAX_BATCHED_ACTIONS, MAX_ENTRY_TEXT_CHARS, MAX_FLEET_ENTRIES, MAX_HISTORY_ENTRIES, MAX_HOST_STRING_FIELD, MAX_INPUT_BUFFER_CHARS, MAX_PASTE_CHARS, MAX_PASTE_FRAGMENT_CHARS, MAX_PICKER_MATCHES, MAX_RECENT_MESSAGES, MAX_RECENT_TOOLS, } from './input-validation/limits.js';
|
|
57
57
|
export type { ValidationError, ValidationOk, ValidationResult, } from './input-validation/result.js';
|
|
58
|
-
export { validateKeyEventFields, validateMouseEvent, validatePasteContent, validateStdinFragment, } from './input-validation/terminal.js';
|
|
59
58
|
export { validateFleetEntry, validateRestoreEntry } from './input-validation/state-entries.js';
|
|
59
|
+
export { validateKeyEventFields, validateMouseEvent, validatePasteContent, validateStdinFragment, } from './input-validation/terminal.js';
|
|
60
60
|
export declare function validateAction(action: {
|
|
61
61
|
type: string;
|
|
62
62
|
[key: string]: unknown;
|
package/dist/markdown-table.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { breakTerminalLigatures, displayWidth } from './terminal-width.js';
|
|
1
2
|
/**
|
|
2
3
|
* Scan a body of prose for GitHub-flavoured markdown tables and replace
|
|
3
4
|
* each one with a Unicode box-drawing rendering that fits the terminal
|
|
@@ -22,24 +23,8 @@
|
|
|
22
23
|
export declare function renderMarkdownTables(text: string, maxWidth: number): string;
|
|
23
24
|
export declare function detectTable(lines: string[], start: number): number;
|
|
24
25
|
export declare function renderTable(tableLines: string[], maxWidth: number): string;
|
|
25
|
-
/**
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
*/
|
|
30
|
-
export declare function breakLigatures(text: string): string;
|
|
31
|
-
/**
|
|
32
|
-
* Return the number of terminal columns a string occupies.
|
|
33
|
-
*
|
|
34
|
-
* Handles Unicode properly:
|
|
35
|
-
* - ANSI escape sequences (SGR codes like \x1b[1m, \x1b[0m) are zero-width.
|
|
36
|
-
* - ZWJ emoji sequences (👨👩👧, 🧑🏫) count as 2 columns total.
|
|
37
|
-
* - Variation selectors (U+FE0F, U+FE0E) contribute zero width.
|
|
38
|
-
* - Zero-width characters (ZWJ U+200D, ZWSP U+200B, etc.) contribute zero width.
|
|
39
|
-
* - Emoji blocks count as 2 columns.
|
|
40
|
-
* - East Asian Wide/Fullwidth characters count as 2 columns.
|
|
41
|
-
* - ASCII printable characters count as 1.
|
|
42
|
-
* - Control characters count as 0.
|
|
43
|
-
*/
|
|
44
|
-
export declare function strWidth(s: string): number;
|
|
26
|
+
/** Same width implementation used by Ink's own Yoga measurement/output path. */
|
|
27
|
+
export declare const strWidth: typeof displayWidth;
|
|
28
|
+
/** Backward-compatible table export; ligature handling now lives centrally. */
|
|
29
|
+
export declare const breakLigatures: typeof breakTerminalLigatures;
|
|
45
30
|
//# sourceMappingURL=markdown-table.d.ts.map
|
package/dist/markdown.d.ts
CHANGED
|
@@ -8,15 +8,6 @@ export interface InlineToken {
|
|
|
8
8
|
/** Markdown link target (the URL part of [text](url)). */
|
|
9
9
|
link?: boolean | undefined;
|
|
10
10
|
}
|
|
11
|
-
/**
|
|
12
|
-
* Parse one line of prose into inline-emphasis tokens. Markers are stripped
|
|
13
|
-
* (this is display text, not length-preserving). `_..._` is intentionally NOT
|
|
14
|
-
* treated as italic so snake_case / file_names aren't mangled. An unterminated
|
|
15
|
-
* marker is emitted literally so no text is ever lost.
|
|
16
|
-
*
|
|
17
|
-
* Results are memoized: repeated calls with the same text return the identical
|
|
18
|
-
* cached array, eliminating redundant parsing on every TUI re-render.
|
|
19
|
-
*/
|
|
20
11
|
export declare function parseInline(text: string): InlineToken[];
|
|
21
12
|
/**
|
|
22
13
|
* Render assistant prose with markdown emphasis + block formatting. Tables are
|
|
@@ -4,7 +4,7 @@ export declare const TYPE_EMOJI: Record<MemoryType, string>;
|
|
|
4
4
|
export declare const PRIORITY_EMOJI: Record<MemoryPriority, string>;
|
|
5
5
|
export declare const KIND_EMOJI: Record<string, string>;
|
|
6
6
|
export declare function parseDate(ts: string): Date | null;
|
|
7
|
-
export declare function daysAgo(ts: string): number | null;
|
|
7
|
+
export declare function daysAgo(ts: string, now?: number): number | null;
|
|
8
8
|
export declare function fmtDate(ts: string): string;
|
|
9
9
|
export declare function recencyLabel(days: number | null): string;
|
|
10
10
|
//# sourceMappingURL=memory-slash-format.d.ts.map
|
|
@@ -3,7 +3,20 @@ import type { Action, State } from './app-reducer.js';
|
|
|
3
3
|
import type { KeyEvent } from './components/input.js';
|
|
4
4
|
import type { MutableCell } from './shared-types.js';
|
|
5
5
|
import type { SettingsCapabilities } from './tui-host-capabilities.js';
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Terminal geometry for pointer→key mapping. `viewportRows` is the managed
|
|
8
|
+
* history band height; every selectable overlay renders BELOW it (see
|
|
9
|
+
* hit-test.ts's layout contract), so a left press only maps to Enter when it
|
|
10
|
+
* lands in that bottom region. Without this gate a stray click anywhere on
|
|
11
|
+
* screen — including deep in the chat history — confirmed the focused item
|
|
12
|
+
* of whatever picker happened to be open (worst case: the project picker,
|
|
13
|
+
* where confirm triggers an exit-42 respawn).
|
|
14
|
+
*/
|
|
15
|
+
export interface PointerOverlayGeometry {
|
|
16
|
+
termRows: number;
|
|
17
|
+
viewportRows: number;
|
|
18
|
+
}
|
|
19
|
+
export declare function overlayPointerKey(state: State, input: string, key: KeyEvent, geometry: PointerOverlayGeometry): {
|
|
7
20
|
isEnter: boolean;
|
|
8
21
|
cancelAction: Action | null;
|
|
9
22
|
};
|
|
@@ -17,7 +30,12 @@ export interface BusyInterruptKeyHost {
|
|
|
17
30
|
clearPendingConfirms(): void;
|
|
18
31
|
liveDirector(): Director | null;
|
|
19
32
|
}
|
|
20
|
-
/**
|
|
33
|
+
/**
|
|
34
|
+
* Handle Esc-to-steer, including optional confirmation and fleet teardown.
|
|
35
|
+
* Open panels never reach this: `handleKey` routes Esc through
|
|
36
|
+
* `escCloseAction` / `escSelfOwnedPanelOpen` first, so by the time this
|
|
37
|
+
* runs an Esc press really means "interrupt the run".
|
|
38
|
+
*/
|
|
21
39
|
export declare function routeBusyInterruptKey(host: BusyInterruptKeyHost, key: KeyEvent): boolean;
|
|
22
40
|
export interface ModalOverlayKeyHost {
|
|
23
41
|
readonly state: State;
|
|
@@ -36,8 +54,11 @@ export interface SettingsOverlayKeyHost {
|
|
|
36
54
|
}
|
|
37
55
|
/** Route the settings editor and its Ctrl+S open/close chord. */
|
|
38
56
|
export declare function routeSettingsOverlayKey(host: SettingsOverlayKeyHost, input: string, key: KeyEvent, isEnter: boolean): boolean;
|
|
39
|
-
/**
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
57
|
+
/**
|
|
58
|
+
* Close the highest-priority panel on Esc and keep ProcessList modal.
|
|
59
|
+
* `processListOnBottom` carries the panel-position routing: when the process
|
|
60
|
+
* list is routed to the sidebar its modal `useInput` never mounts, so
|
|
61
|
+
* swallowing every key here froze the composer with no visible panel.
|
|
62
|
+
*/
|
|
63
|
+
export declare function routePanelEscapeKey(state: State, key: KeyEvent, dispatch: (action: Action) => void, processListOnBottom: boolean): boolean;
|
|
43
64
|
//# sourceMappingURL=overlay-key-router.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Action } from '../app-action-type.js';
|
|
2
2
|
import type { State } from '../app-state.js';
|
|
3
|
-
declare const dialogActionTypes: readonly ["authOpen", "authClose", "authProviders", "authCatalog", "authView", "authMove", "authBusy", "authHint", "authFilter", "authFlowStart", "authFlowLog", "authFlowDone", "authPromptStart", "authPromptChange", "authPromptEnd", "authConfirmStart", "authConfirmEnd", "projectPickerOpen", "projectPickerClose", "projectPickerMove", "projectPickerFilter", "projectPickerHint", "fKeyPickerOpen", "fKeyPickerClose", "fKeyPickerMove", "confirmOpen", "confirmClose", "confirmClearAll", "shellCommandWarningOpen", "shellCommandWarningClose", "enhanceOpen", "enhanceClose", "enhanceSet", "enhanceBusy", "refineCountdownOpen", "refineCountdownClose", "refineFailureOpen", "refineFailureClose", "continueConfirmOpen", "continueConfirmClose", "clearConfirmOpen", "clearConfirmSetValue", "clearConfirmClose", "exitConfirmOpen", "exitConfirmClose", "slashConfirmOpen", "slashConfirmClose", "escConfirmOpen", "escConfirmClose", "fallbackOverlayOpen", "fallbackOverlayMove", "fallbackOverlayClose", "sendModePickerOpen", "sendModePickerMove", "sendModePickerClose", "resetContextChip"];
|
|
3
|
+
declare const dialogActionTypes: readonly ["authOpen", "authClose", "authProviders", "authCatalog", "authView", "authMove", "authBusy", "authHint", "authFilter", "authFlowStart", "authFlowLog", "authFlowDone", "authPromptStart", "authPromptChange", "authPromptEnd", "authConfirmStart", "authConfirmEnd", "projectPickerOpen", "projectPickerClose", "projectPickerMove", "projectPickerFilter", "projectPickerHint", "fKeyPickerOpen", "fKeyPickerClose", "fKeyPickerMove", "confirmOpen", "confirmClose", "confirmClearAll", "shellCommandWarningOpen", "shellCommandWarningClose", "enhanceOpen", "enhanceClose", "enhanceSet", "enhanceBusy", "topicCheckBusy", "refineCountdownOpen", "refineCountdownClose", "refineFailureOpen", "refineFailureClose", "continueConfirmOpen", "continueConfirmClose", "clearConfirmOpen", "clearConfirmSetValue", "clearConfirmClose", "exitConfirmOpen", "exitConfirmClose", "slashConfirmOpen", "slashConfirmClose", "escConfirmOpen", "escConfirmClose", "fallbackOverlayOpen", "fallbackOverlayMove", "fallbackOverlayClose", "sendModePickerOpen", "sendModePickerMove", "sendModePickerClose", "resetContextChip"];
|
|
4
4
|
type DialogAction = Extract<Action, {
|
|
5
5
|
type: (typeof dialogActionTypes)[number];
|
|
6
6
|
}>;
|
|
@@ -75,5 +75,12 @@ export type SettingsPickerPatch = Partial<{
|
|
|
75
75
|
showSageMemoryInject: boolean;
|
|
76
76
|
/** Minimum relation strength for SAGE memory injection. Default: 0.85. */
|
|
77
77
|
sageMemoryInjectThreshold: number;
|
|
78
|
+
/**
|
|
79
|
+
* Register the agent-callable `nextsteps` tool for the leader, alongside the
|
|
80
|
+
* `<nextsteps>` block it can already write. Persisted to
|
|
81
|
+
* `tools.nextsteps.enabled`; the registry is built at boot, so a change takes
|
|
82
|
+
* effect in the next session. Default: false.
|
|
83
|
+
*/
|
|
84
|
+
nextStepsTool: boolean;
|
|
78
85
|
}>;
|
|
79
86
|
//# sourceMappingURL=settings-contracts.d.ts.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sidebar sizing — shared scroll-clamp budgets for routed sidebar panels.
|
|
3
|
+
*
|
|
4
|
+
* The right sidebar in `RightSidebar` (`packages/tui/src/components/sidebar.tsx`)
|
|
5
|
+
* owns viewport clipping; individual routed panels still size naturally and
|
|
6
|
+
* `RightSidebar` discards rows beyond its `maxHeight`. To keep the focused
|
|
7
|
+
* `sidebarScroll` ↑↓ clamp from under-reserving scroll budget for tall
|
|
8
|
+
* worklist panels, this module publishes a single source-of-truth table that
|
|
9
|
+
* every routed panel can be added to once and reused in:
|
|
10
|
+
*
|
|
11
|
+
* - `app-ui-state.ts#resolveAppSidebarLayout` — accumulates `sidebarTwinRowCount`.
|
|
12
|
+
* - `reducers/workspace-panels.ts#computeMaxSidebarScroll` — subtracts the
|
|
13
|
+
* total from the scroll viewport.
|
|
14
|
+
*
|
|
15
|
+
* Values are computed at the minimum 16-column content width and over-estimate
|
|
16
|
+
* intentionally: miscounting under is the failure mode we want to defend
|
|
17
|
+
* against (lower persistent content becoming unreachable), while miscounting
|
|
18
|
+
* over is harmless (a small amount of blank space at the end of the scroll).
|
|
19
|
+
*/
|
|
20
|
+
import type { PanelId } from './ui-contracts.js';
|
|
21
|
+
/**
|
|
22
|
+
* Natural-height budget for each routed sidebar panel at the minimum
|
|
23
|
+
* 16-column content width. Worklist panels reserve their maximum item count
|
|
24
|
+
* × the bounded wrap ceiling; connections reserve two rows per service.
|
|
25
|
+
*/
|
|
26
|
+
export declare const SIDEBAR_TWIN_HEIGHT_BY_PANEL: Readonly<Record<PanelId, number>>;
|
|
27
|
+
/**
|
|
28
|
+
* Sum the conservative budgets for a set of routed twins currently mounted
|
|
29
|
+
* above `SidebarContent`. Identical math to the inline loop previously in
|
|
30
|
+
* `app-ui-state.ts`; exported here so future routed panels only need to
|
|
31
|
+
* import the helper rather than re-implement the freeze and the lookup.
|
|
32
|
+
*/
|
|
33
|
+
export declare function sumSidebarTwinRowCount(panels: Iterable<PanelId>): number;
|
|
34
|
+
//# sourceMappingURL=sidebar-sizing.d.ts.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import { type InputBuilder } from '@wrongstack/core/agent';
|
|
1
2
|
import type { Director } from '@wrongstack/core/coordination';
|
|
2
3
|
import type { AttachmentStore, ContentBlock } from '@wrongstack/core/types';
|
|
3
|
-
import { type InputBuilder } from '@wrongstack/core/agent';
|
|
4
4
|
import type { Action, State } from './app-reducer.js';
|
|
5
5
|
import { emptyMemoryContextMonitor } from './memory-context-monitor.js';
|
|
6
|
-
import type { SubmitCapabilities } from './tui-host-capabilities.js';
|
|
7
6
|
import type { MutableCell } from './shared-types.js';
|
|
8
7
|
import { type TokenPreviewStore } from './token-previews.js';
|
|
8
|
+
import type { SubmitCapabilities } from './tui-host-capabilities.js';
|
|
9
9
|
export interface SubmitControllerHost {
|
|
10
10
|
readonly capabilities: SubmitCapabilities;
|
|
11
11
|
readonly state: State;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Action, State } from './app-reducer.js';
|
|
2
|
-
import type { PromptRefinementCapabilities } from './tui-host-capabilities.js';
|
|
3
2
|
import type { MutableCell } from './shared-types.js';
|
|
3
|
+
import type { PromptRefinementCapabilities } from './tui-host-capabilities.js';
|
|
4
4
|
export interface PromptRefinementHost {
|
|
5
5
|
readonly capabilities: PromptRefinementCapabilities;
|
|
6
6
|
readonly status: State['status'];
|
package/dist/terminal-width.d.ts
CHANGED
|
@@ -1,14 +1,26 @@
|
|
|
1
|
+
export declare function stripAnsi(value: string): string;
|
|
2
|
+
/**
|
|
3
|
+
* Prevent programming-font ligatures with a visible, measured separator.
|
|
4
|
+
* Ink's painter allocates at least one cell even for zero-width code points,
|
|
5
|
+
* so U+200B/U+200C would make Yoga and the output grid disagree.
|
|
6
|
+
*/
|
|
7
|
+
export declare function breakTerminalLigatures(value: string): string;
|
|
1
8
|
/**
|
|
2
|
-
*
|
|
9
|
+
* Convert untrusted command/tool text into terminal-safe printable content.
|
|
3
10
|
*
|
|
4
|
-
*
|
|
5
|
-
* is
|
|
6
|
-
*
|
|
7
|
-
*
|
|
11
|
+
* Ink measures control characters differently from a physical terminal: a
|
|
12
|
+
* literal tab is effectively zero-width to Yoga but expands to the next tab
|
|
13
|
+
* stop when Windows Terminal receives it. Cursor/erase escape sequences are
|
|
14
|
+
* worse because they can paint outside the component that owns the text.
|
|
15
|
+
* Normalize tabs to a small fixed separator, remove terminal escapes, and
|
|
16
|
+
* retain only printable characters plus newlines before layout is measured.
|
|
8
17
|
*/
|
|
9
|
-
export declare function
|
|
18
|
+
export declare function sanitizeTerminalText(value: string, tabWidth?: number): string;
|
|
10
19
|
export declare function displayWidth(value: string): number;
|
|
11
20
|
export declare function truncateDisplay(value: string, maxWidth: number, ellipsis?: string): string;
|
|
21
|
+
export declare function truncateDisplayStart(value: string, maxWidth: number, ellipsis?: string): string;
|
|
22
|
+
/** Split without bisecting a grapheme cluster; input is expected to be ANSI-free. */
|
|
23
|
+
export declare function splitDisplay(value: string, maxWidth: number): [head: string, tail: string];
|
|
12
24
|
export declare function padDisplayEnd(value: string, width: number): string;
|
|
13
25
|
export declare function frameRule(width: number, leftLabel: string, rightLabel?: string, edge?: 'top' | 'bottom'): string;
|
|
14
26
|
/**
|
package/dist/ui-contracts.d.ts
CHANGED
|
@@ -10,19 +10,30 @@ import type { StatuslineItem as StatuslineItemSource } from './components/status
|
|
|
10
10
|
*/
|
|
11
11
|
export declare const SIDEBAR_MISSION_ROWS = 8;
|
|
12
12
|
/**
|
|
13
|
-
* Field index where the per-panel-position rows begin. The first
|
|
14
|
-
* indices (0–
|
|
13
|
+
* Field index where the per-panel-position rows begin. The first 46
|
|
14
|
+
* indices (0–45) are the legacy auto-rebuilt Settings surface; rows 46+
|
|
15
15
|
* are the per-panel position rows (one per PanelId in PANEL_IDS order).
|
|
16
16
|
* Centralized so the reducer, label array, sections, and tests stay in
|
|
17
17
|
* lock-step when a new panel id is added.
|
|
18
18
|
*/
|
|
19
|
-
export declare const PANEL_POSITION_FIELD_START =
|
|
19
|
+
export declare const PANEL_POSITION_FIELD_START = 46;
|
|
20
20
|
/**
|
|
21
21
|
* Maximum number of sidebar panel slots. When more than this many panels
|
|
22
22
|
* are set to 'sidebar', the sidebar renders the first N in `PANEL_IDS` order
|
|
23
23
|
* and surfaces a "+N more" hint rather than overflowing the viewport.
|
|
24
24
|
*/
|
|
25
25
|
export declare const SIDEBAR_PANEL_LIMIT = 6;
|
|
26
|
+
/**
|
|
27
|
+
* Maximum rows reserved for one wrapped routed-panel worklist label at the
|
|
28
|
+
* minimum 16-column content width. The right-sidebar scroll clamp in
|
|
29
|
+
* `reducers/workspace-panels.ts#computeMaxSidebarScroll` multiplies this by
|
|
30
|
+
* the per-panel item count when sizing its `sidebarTwinRowCount` reservation,
|
|
31
|
+
* so it must move in lockstep with `SIDEBAR_TWIN_HEIGHT_BY_PANEL` in
|
|
32
|
+
* `app-ui-state.ts` (which also multiplies by `SIDEBAR_TWIN_MAX_WRAP_LINES`).
|
|
33
|
+
* Keep this value width-blind on purpose — over-estimation is safe because
|
|
34
|
+
* `RightSidebar` still owns viewport clipping.
|
|
35
|
+
*/
|
|
36
|
+
export declare const SIDEBAR_TWIN_MAX_WRAP_LINES = 10;
|
|
26
37
|
/** Where to render a given F-key panel: lower region (F-key) or right sidebar. */
|
|
27
38
|
export type PanelPosition = 'bottom' | 'sidebar';
|
|
28
39
|
/**
|
|
@@ -37,7 +48,7 @@ export type PanelPosition = 'bottom' | 'sidebar';
|
|
|
37
48
|
*/
|
|
38
49
|
export declare const PANEL_IDS: readonly ["projectPicker", "fleet", "agents", "worktree", "plan", "todos", "queue", "processList", "goal", "sessions", "coordinator", "kanban", "connections"];
|
|
39
50
|
export type PanelId = (typeof PANEL_IDS)[number];
|
|
40
|
-
/** Total field count = legacy
|
|
51
|
+
/** Total field count = legacy 46 + per-panel positions. Derived at
|
|
41
52
|
* runtime from `PANEL_IDS.length` to keep the surface in sync. */
|
|
42
53
|
export declare const TOTAL_SETTINGS_FIELD_COUNT: number;
|
|
43
54
|
/** Map of every tracked panel → its current placement. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wrongstack/tui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.302.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "WrongStack terminal UI: Ink-based interactive renderer with history, pickers, and slash menus.",
|
|
6
6
|
"repository": {
|
|
@@ -28,12 +28,13 @@
|
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"ink": "7.1.1",
|
|
30
30
|
"react": "^19.2.8",
|
|
31
|
-
"
|
|
32
|
-
"@wrongstack/
|
|
33
|
-
"@wrongstack/
|
|
34
|
-
"@wrongstack/
|
|
35
|
-
"@wrongstack/
|
|
36
|
-
"@wrongstack/
|
|
31
|
+
"string-width": "8.2.2",
|
|
32
|
+
"@wrongstack/core": "0.302.0",
|
|
33
|
+
"@wrongstack/tools": "0.302.0",
|
|
34
|
+
"@wrongstack/runtime": "0.302.0",
|
|
35
|
+
"@wrongstack/kanban": "0.302.0",
|
|
36
|
+
"@wrongstack/sage": "0.302.0",
|
|
37
|
+
"@wrongstack/sdd": "0.302.0"
|
|
37
38
|
},
|
|
38
39
|
"devDependencies": {
|
|
39
40
|
"@testing-library/dom": "^10.4.1",
|