@wrongstack/tui 1.0.24 → 1.0.26
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 +54 -1
- package/dist/app-panel-state.d.ts +25 -0
- package/dist/app-props.d.ts +20 -0
- package/dist/app-reducer.d.ts +1 -1
- package/dist/app-state-core-types.d.ts +13 -0
- package/dist/app-view-contract.d.ts +1 -1
- package/dist/background-strip-model.d.ts +65 -0
- package/dist/brain-panel-model.d.ts +7 -7
- package/dist/chat-search-slash.d.ts +15 -0
- package/dist/clipboard.d.ts +14 -1
- package/dist/components/background-strip.d.ts +20 -0
- package/dist/components/chat-search-bar.d.ts +19 -0
- package/dist/components/checkpoint-timeline.d.ts +6 -2
- package/dist/components/history/code-block.d.ts +2 -136
- package/dist/components/history/diff-model.d.ts +143 -0
- package/dist/components/history/scroll-controller-types.d.ts +11 -0
- package/dist/components/history/scrollbar-rail.d.ts +14 -2
- package/dist/components/history/use-history-controller.d.ts +5 -0
- package/dist/components/monitor-shell.d.ts +5 -1
- package/dist/components/phase-monitor.d.ts +3 -1
- package/dist/components/prompt-picker-model.d.ts +16 -0
- package/dist/components/prompt-picker.d.ts +2 -16
- package/dist/components/resource-menu-model.d.ts +3 -0
- package/dist/components/resource-menu.d.ts +3 -3
- package/dist/components/scrollable-history.d.ts +1 -1
- package/dist/components/send-mode-model.d.ts +44 -0
- package/dist/components/send-mode-picker.d.ts +2 -43
- package/dist/components/sidebar-panel-agents.d.ts +10 -0
- package/dist/components/sidebar-panel-connections.d.ts +11 -0
- package/dist/components/sidebar-panel-coordinator.d.ts +11 -0
- package/dist/components/sidebar-panel-fleet.d.ts +16 -0
- package/dist/components/sidebar-panel-project.d.ts +12 -0
- package/dist/components/sidebar-panel-worktree.d.ts +10 -0
- package/dist/components/sidebar-panel-wrong-proxy.d.ts +25 -0
- package/dist/components/sidebar-panels-workspace.d.ts +10 -79
- package/dist/components/status-bar-rails-async.d.ts +2 -2
- package/dist/components/status-bar-types.d.ts +6 -0
- package/dist/components/status-bar.d.ts +1 -1
- package/dist/components/statusline-picker-model.d.ts +45 -0
- package/dist/components/statusline-picker.d.ts +2 -41
- package/dist/hooks/fork-at-checkpoint.d.ts +25 -0
- package/dist/hooks/use-app-execution-pipeline.d.ts +1 -1
- package/dist/hooks/use-app-picker-keys.d.ts +4 -2
- package/dist/hooks/use-chip-staleness-guard.d.ts +6 -0
- package/dist/hooks/use-core-tui-commands.d.ts +7 -2
- package/dist/hooks/use-file-search.d.ts +10 -0
- package/dist/hooks/use-picker-keys-brain-statusline.d.ts +4 -0
- package/dist/hooks/use-provider-warmup.d.ts +9 -0
- package/dist/hooks/use-queue-manager.d.ts +11 -1
- package/dist/hooks/use-session-rewind.d.ts +8 -1
- package/dist/hooks/use-slash-picker.d.ts +1 -1
- package/dist/hooks/use-stable-key-handler.d.ts +8 -1
- package/dist/hooks/use-status-sync-interval.d.ts +3 -2
- package/dist/hooks/use-tui-environment-state.d.ts +3 -0
- package/dist/hooks/use-tui-event-bridge.d.ts +12 -0
- package/dist/index.js +22173 -20317
- package/dist/ink.d.ts +1 -1
- package/dist/input-validation/action-types.d.ts +1 -1
- package/dist/input-validation/limits.d.ts +2 -0
- package/dist/input-validation-display.d.ts +9 -0
- package/dist/input-validation.d.ts +0 -52
- package/dist/key-routes/key-route-background-strip.d.ts +14 -0
- package/dist/key-routes/key-route-chat-search.d.ts +24 -0
- package/dist/layout-store.d.ts +2 -2
- package/dist/memory-slash-render.d.ts +1 -1
- package/dist/message-checkpoint.d.ts +19 -0
- package/dist/motion.d.ts +16 -0
- package/dist/reducers/chat-search.d.ts +11 -0
- package/dist/reducers/composer-action-types.d.ts +6 -0
- package/dist/reducers/composer-pickers.d.ts +4 -0
- package/dist/reducers/composer.d.ts +1 -5
- package/dist/reducers/message-jump.d.ts +16 -0
- package/dist/reducers/workspace-panels.d.ts +1 -1
- package/dist/resume-session-tree.d.ts +8 -0
- package/dist/rewind-prompt.d.ts +24 -0
- package/dist/run-tui-options.d.ts +23 -4
- package/dist/scroll-anchor.d.ts +6 -0
- package/dist/submit-controller.d.ts +1 -1
- package/dist/submit-slash-command.d.ts +67 -0
- package/dist/transcript-search.d.ts +38 -0
- package/dist/ui-contracts.d.ts +1 -1
- package/dist/use-app-controller.d.ts +1 -1
- package/dist/use-controller-key-pipeline.d.ts +217 -0
- package/package.json +7 -7
package/dist/ink.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ type BoxOwnProps = Omit<ComponentProps<typeof InkBox>, 'ref' | 'borderColor' | '
|
|
|
11
11
|
export type { DOMElement, Key } from 'ink';
|
|
12
12
|
export { measureElement, Static, useAnimation, useApp, useInput, useStdin, useStdout, } from 'ink';
|
|
13
13
|
/** Ink `Text` with named colors resolved against the active theme. */
|
|
14
|
-
export declare function Text({ color, backgroundColor, ...rest }: TextOwnProps): ReactElement;
|
|
14
|
+
export declare function Text({ color, backgroundColor, children, ...rest }: TextOwnProps): ReactElement;
|
|
15
15
|
/**
|
|
16
16
|
* Ink `Box` with named border/background colors resolved against the theme. Forwards
|
|
17
17
|
* `ref` so `measureElement` (used by the scrollable history) keeps working.
|
|
@@ -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", "authFormCancel", "authFormChange", "authFormStart", "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", "sidebarScrollSet", "sidebarScrollReset", "toggleSidebarFocus", "skillMentionResults", "skillPickerClose", "skillPickerHint", "skillPickerMove", "skillPickerOpen", "resourceMenuClose", "resourceMenuConfirm", "resourceMenuFilter", "resourceMenuHint", "resourceMenuMove", "resourceMenuOpen", "collabPlanEmitted", "collabSessionDone", "collabSubagentSpawned", "compactHistory", "confirmClearAll", "confirmClose", "confirmResolved", "confirmOpen", "continueConfirmClose", "continueConfirmOpen", "bugHuntContinueClose", "bugHuntContinueOpen", "bugHuntRunningClose", "bugHuntRunningOpen", "copiedNotice", "coordinatorEvent", "countdownEnded", "countdownTick", "debugStreamStats", "debugStreamStatsClear", "dequeueFirst", "designPickerClose", "designPickerMove", "designPickerOpen", "designPickerStack", "enhanceBusy", "enhanceClose", "enhanceOpen", "enhanceSet", "enqueue", "escConfirmClose", "escConfirmOpen", "fallbackOverlayClose", "fallbackOverlayMove", "fallbackOverlayOpen", "inspectOverlayClose", "inspectOverlayOpen", "inspectOverlayScroll", "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", "goalRunTaskAgent", "goalRunTaskCompleted", "goalSummary", "helpClose", "helpFilter", "helpHint", "helpMove", "helpOpen", "helpScrollDetail", "hint", "historyDown", "historyPush", "historyUp", "interrupt", "leaderCtxPct", "leaderIterEnd", "leaderIterStart", "leaderToolEnd", "leaderToolStart", "mcpPickerBusy", "mcpPickerClose", "mcpPickerHint", "mcpPickerMove", "mcpPickerOpen", "mcpPickerSetItems", "modePickerClose", "modePickerHint", "modePickerMove", "modePickerOpen", "modelPickerBack", "modelPickerClose", "modelPickerEffort", "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", "autoProceedRelease", "bashModeEnter", "bashModeExit", "resumeLoadStart", "resumeLoadTick", "resumeStreamChunk", "resumeLoadAbort", "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", "settingsWrongProxyUrlEditCancel", "settingsWrongProxyUrlEditChange", "settingsWrongProxyUrlEditCommit", "settingsWrongProxyUrlEditStart", "settingsValueChange", "settingsValueSet", "shadowClose", "shadowHint", "shadowOpen", "shadowUpdate", "shellCommandWarningClose", "shellCommandWarningOpen", "slashConfirmClose", "slashConfirmOpen", "slashPickerClose", "slashPickerMove", "slashPickerOpen", "status", "statuslineChipExpire", "statuslineChipShow", "statuslineClose", "statuslineFieldMove", "statuslineFieldSet", "statuslineFilter", "statuslineHint", "statuslineMoveLine", "statuslineMoveOrder", "statuslineOpen", "statuslineResetLayout", "statuslineSetDensity", "statuslineSetLine", "statuslineToggle", "statuslineToggleLine", "statuslineVisibleChipsSync", "subagentModelsClose", "subagentModelsHint", "subagentModelsMove", "subagentModelsOpen", "subagentModelsUpdate", "steerConsume", "steerStart", "streamDelta", "streamReset", "themePickerClose", "themePickerHint", "themePickerMove", "themePickerOpen", "toggleAgentsMonitor", "toggleAuditPanel", "toggleContextPanel", "toggleConnectionsPanel", "toggleCoordinatorMonitor", "toggleCronMonitor", "toggleGoalKanbanPanel", "toggleGoalPanel", "toggleHelp", "toggleKanbanPanel", "toggleMonitor", "togglePlanPanel", "toggleProcessList", "toggleQueuePanel", "toggleSddBoardMonitor", "toggleSessionsPanel", "toggleTodosMonitor", "toggleWorktreeMonitor", "toolEnded", "toolStarted", "toolStreamAppend", "toolStreamClear", "toolResultViewSet", "topicCheckBusy", "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", "authFormCancel", "authFormChange", "authFormStart", "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", "sidebarScrollSet", "sidebarScrollReset", "toggleSidebarFocus", "skillMentionResults", "skillPickerClose", "skillPickerHint", "skillPickerMove", "skillPickerOpen", "resourceMenuClose", "resourceMenuConfirm", "resourceMenuFilter", "resourceMenuHint", "resourceMenuMove", "resourceMenuOpen", "collabPlanEmitted", "collabSessionDone", "collabSubagentSpawned", "compactHistory", "confirmClearAll", "confirmClose", "confirmResolved", "confirmOpen", "continueConfirmClose", "continueConfirmOpen", "bugHuntContinueClose", "bugHuntContinueOpen", "bugHuntRunningClose", "bugHuntRunningOpen", "copiedNotice", "coordinatorEvent", "countdownEnded", "countdownTick", "debugStreamStats", "debugStreamStatsClear", "dequeueFirst", "designPickerClose", "designPickerMove", "designPickerOpen", "designPickerStack", "enhanceBusy", "enhanceClose", "enhanceOpen", "enhanceSet", "enqueue", "escConfirmClose", "escConfirmOpen", "fallbackOverlayClose", "fallbackOverlayMove", "fallbackOverlayOpen", "chatSearchClose", "chatSearchOpen", "chatSearchSetQuery", "chatSearchStep", "messageJump", "messageJumpClear", "inspectOverlayClose", "inspectOverlayOpen", "inspectOverlayScroll", "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", "goalRunTaskAgent", "goalRunTaskCompleted", "goalSummary", "helpClose", "helpFilter", "helpHint", "helpMove", "helpOpen", "helpScrollDetail", "hint", "historyDown", "historyPush", "historyUp", "interrupt", "leaderCtxPct", "leaderIterEnd", "leaderIterStart", "leaderToolEnd", "leaderToolStart", "mcpPickerBusy", "mcpPickerClose", "mcpPickerHint", "mcpPickerMove", "mcpPickerOpen", "mcpPickerSetItems", "modePickerClose", "modePickerHint", "modePickerMove", "modePickerOpen", "modelPickerBack", "modelPickerClose", "modelPickerEffort", "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", "autoProceedRelease", "bashModeEnter", "bashModeExit", "resumeLoadStart", "resumeLoadTick", "resumeStreamChunk", "resumeLoadAbort", "resetContextChip", "resetInterrupts", "resumePickerBusy", "resumePickerClose", "resumePickerError", "resumePickerHint", "resumePickerMove", "resumePickerOpen", "rewindOverlayClose", "rewindOverlayMove", "rewindOverlayOpen", "checkpointFork", "forkRequestDone", "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", "settingsWrongProxyUrlEditCancel", "settingsWrongProxyUrlEditChange", "settingsWrongProxyUrlEditCommit", "settingsWrongProxyUrlEditStart", "settingsValueChange", "settingsValueSet", "shadowClose", "shadowHint", "shadowOpen", "shadowUpdate", "shellCommandWarningClose", "shellCommandWarningOpen", "slashConfirmClose", "slashConfirmOpen", "slashPickerClose", "slashPickerMove", "slashPickerOpen", "status", "statuslineChipExpire", "statuslineChipShow", "statuslineClose", "statuslineFieldMove", "statuslineFieldSet", "statuslineFilter", "statuslineHint", "statuslineMoveLine", "statuslineMoveOrder", "statuslineOpen", "statuslineResetLayout", "statuslineSetDensity", "statuslineSetLine", "statuslineToggle", "statuslineToggleLine", "statuslineVisibleChipsSync", "subagentModelsClose", "subagentModelsHint", "subagentModelsMove", "subagentModelsOpen", "subagentModelsUpdate", "steerConsume", "steerStart", "streamDelta", "streamReset", "themePickerClose", "themePickerHint", "themePickerMove", "themePickerOpen", "toggleAgentsMonitor", "toggleAuditPanel", "toggleContextPanel", "toggleConnectionsPanel", "toggleCoordinatorMonitor", "toggleCronMonitor", "toggleGoalKanbanPanel", "toggleGoalPanel", "toggleHelp", "toggleKanbanPanel", "toggleMonitor", "togglePlanPanel", "toggleProcessList", "toggleQueuePanel", "toggleSddBoardMonitor", "toggleSessionsPanel", "toggleTodosMonitor", "toggleWorktreeMonitor", "toolEnded", "toolStarted", "toolStreamAppend", "toolStreamClear", "toolResultViewSet", "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
|
|
@@ -24,4 +24,6 @@ export declare const MAX_PASTE_FRAGMENT_CHARS = 100000;
|
|
|
24
24
|
export declare const MAX_HOST_STRING_FIELD = 500;
|
|
25
25
|
/** Maximum entries in a picker matches list. */
|
|
26
26
|
export declare const MAX_PICKER_MATCHES = 500;
|
|
27
|
+
/** Transcript search query cap (Alt+F / `/chat-search`). */
|
|
28
|
+
export declare const MAX_CHAT_SEARCH_QUERY_CHARS = 1000;
|
|
27
29
|
//# sourceMappingURL=limits.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ValidationResult } from './input-validation/result.js';
|
|
2
|
+
export declare function validateDisplayAction(action: {
|
|
3
|
+
type: string;
|
|
4
|
+
[key: string]: unknown;
|
|
5
|
+
}, type: string, normalized: string, payload: {
|
|
6
|
+
type: string;
|
|
7
|
+
[key: string]: unknown;
|
|
8
|
+
}): ValidationResult<Record<string, unknown>>;
|
|
9
|
+
//# sourceMappingURL=input-validation-display.d.ts.map
|
|
@@ -1,55 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Central input validation for the TUI.
|
|
3
|
-
*
|
|
4
|
-
* EVERY external data source that crosses a trust boundary passes through
|
|
5
|
-
* this module. Uses an **allow-list** approach: define the exact allowed
|
|
6
|
-
* shape, types, ranges, and formats for each input; reject everything else.
|
|
7
|
-
*
|
|
8
|
-
* ── Trust boundaries ─────────────────────────────────────────────────
|
|
9
|
-
*
|
|
10
|
-
* Boundary | Source | Validator
|
|
11
|
-
* ------------------|---------------------|--------------------------
|
|
12
|
-
* stdin | terminal emulator | validateStdinFragment()
|
|
13
|
-
* paste | bracketed-paste | validatePasteContent()
|
|
14
|
-
* AppProps | CLI host | validateAppProps()
|
|
15
|
-
* Reducer Action | handleKey dispatch | validateAction()
|
|
16
|
-
* Host callbacks | CLI/plugin return | validateCallbackReturn()
|
|
17
|
-
* Mouse events | SGR protocol | validateMouseEvent()
|
|
18
|
-
* Fleet telemetry | Director/FleetBus | validateFleetEntry()
|
|
19
|
-
* Restore data | session JSONL | validateRestoreEntry()
|
|
20
|
-
*
|
|
21
|
-
* ── Rejection over coercion ──────────────────────────────────────────
|
|
22
|
-
*
|
|
23
|
-
* This module **rejects** invalid input rather than coercing it, for
|
|
24
|
-
* three reasons:
|
|
25
|
-
*
|
|
26
|
-
* 1. **Coercion masks injection.** Trimming whitespace from a string
|
|
27
|
-
* that contains an ANSI escape sequence leaves the sequence intact.
|
|
28
|
-
* 2. **Semantic gap.** Coercing a value (e.g. clamping a PID to a valid
|
|
29
|
-
* range) creates a gap between what was validated and what the
|
|
30
|
-
* application actually uses — a future code path may use the raw
|
|
31
|
-
* value, not the clamped one.
|
|
32
|
-
* 3. **Predictable failure.** Silent data transformation makes security
|
|
33
|
-
* debugging harder — rejection produces a clear error at the point
|
|
34
|
-
* of violation; coercion produces subtly wrong behavior downstream.
|
|
35
|
-
*
|
|
36
|
-
* The single exception is **normalization before comparison**: trimming
|
|
37
|
-
* whitespace from an enum label before comparing it to the allow-list
|
|
38
|
-
* prevents trivial bypasses (e.g. `" off "` vs `"off"`). This is
|
|
39
|
-
* NOT the same as coercing the input — the normalized comparison only
|
|
40
|
-
* determines allow/deny; the caller receives the original value.
|
|
41
|
-
*
|
|
42
|
-
* ── Conventions ──────────────────────────────────────────────────────
|
|
43
|
-
*
|
|
44
|
-
* - Every `validate*` function returns `ValidationResult<T>`:
|
|
45
|
-
* `{ valid: true; value: T }` — the validated, ready-to-use value
|
|
46
|
-
* `{ valid: false; error: string }` — a specific, actionable message
|
|
47
|
-
* - Every error message follows the pattern:
|
|
48
|
-
* `"{path}": {what went wrong} ({detail}).`
|
|
49
|
-
* - Size limits are defined as module-level constants with doc comments.
|
|
50
|
-
* - Enum/union allow-lists are defined as `const` arrays and kept in
|
|
51
|
-
* ONE place so the allowed set is auditable.
|
|
52
|
-
*/
|
|
53
1
|
import type { ValidationResult } from './input-validation/result.js';
|
|
54
2
|
export { ALLOWED_ACTION_TYPES } from './input-validation/action-types.js';
|
|
55
3
|
export { ALLOWED_ENTRY_KINDS, ALLOWED_FLEET_STATUSES, ALLOWED_KEY_EVENT_FIELDS, ALLOWED_MOUSE_BUTTONS, ALLOWED_MOUSE_KINDS, TEXT_BEARING_ENTRY_KINDS, } from './input-validation/allow-lists.js';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Background strip keys (Alt+B). While the strip is focused, ←/→ pick a chip,
|
|
3
|
+
* Enter shows or hides its output, `x` asks to stop a background shell and
|
|
4
|
+
* `y` (or Enter) confirms, Esc or Alt+B leaves. Typing text leaves the strip
|
|
5
|
+
* and goes to the composer, as the sidebar focus does. Scrolling, function
|
|
6
|
+
* keys and Ctrl+C keep their normal routes.
|
|
7
|
+
*/
|
|
8
|
+
import type { KeyEvent } from '../components/input.js';
|
|
9
|
+
/**
|
|
10
|
+
* Returns true when the key was consumed. `stop` ends a background shell by
|
|
11
|
+
* PID; it is the process registry's kill in the TUI.
|
|
12
|
+
*/
|
|
13
|
+
export declare function routeBackgroundStrip(input: string, key: KeyEvent, stop: (pid: number) => void): boolean;
|
|
14
|
+
//# sourceMappingURL=key-route-background-strip.d.ts.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Transcript search bar keys (Alt+F / `/chat-search`).
|
|
3
|
+
*
|
|
4
|
+
* While the bar is open it owns text entry: typing edits the query and never
|
|
5
|
+
* reaches the composer draft. Scrolling (wheel, mouse, PgUp/PgDn), function
|
|
6
|
+
* keys and Ctrl+C keep their normal routes, so the user can still page
|
|
7
|
+
* around the transcript or open a panel with the bar visible.
|
|
8
|
+
*/
|
|
9
|
+
import type { KeyEvent } from '../components/input.js';
|
|
10
|
+
import type { KeyRouteContext } from '../key-handler-context.js';
|
|
11
|
+
/** Thinking cards are only searchable while they are shown. */
|
|
12
|
+
export declare function chatSearchIncludesReasoning(ctx: Pick<KeyRouteContext, 'getSettings'>): boolean;
|
|
13
|
+
/** Returns true when the key was consumed by the search bar (or opened it). */
|
|
14
|
+
export declare function routeChatSearch(ctx: KeyRouteContext, input: string, key: KeyEvent): boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Alt+↑ / Alt+↓: jump to the previous / next message the user sent.
|
|
17
|
+
*
|
|
18
|
+
* The marked message then takes one key: Enter on an empty composer opens
|
|
19
|
+
* the rewind timeline at that message's checkpoint (Enter rewinds, `f`
|
|
20
|
+
* forks), Esc lets go of it. Any other key lets go of it too and does its
|
|
21
|
+
* usual job, so a mark left behind never captures a later Enter.
|
|
22
|
+
*/
|
|
23
|
+
export declare function routeMessageJump(ctx: KeyRouteContext, _input: string, key: KeyEvent): boolean;
|
|
24
|
+
//# sourceMappingURL=key-route-chat-search.d.ts.map
|
package/dist/layout-store.d.ts
CHANGED
|
@@ -72,8 +72,8 @@ export declare class LayoutStore {
|
|
|
72
72
|
* Remove entries no longer in the active set (after history retention).
|
|
73
73
|
*/
|
|
74
74
|
retain(entryIds: Set<number>): void;
|
|
75
|
-
/** Reset all in-memory state (on /clear). */
|
|
76
|
-
clear(): void
|
|
75
|
+
/** Reset all in-memory state (on /clear) and persist the empty snapshot. */
|
|
76
|
+
clear(): Promise<void>;
|
|
77
77
|
/**
|
|
78
78
|
* Load layout data from disk. Returns the number of entries restored, or 0
|
|
79
79
|
* when no data exists or the version has changed (caller should regenerate).
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { HistoryEntry } from './history-entry.js';
|
|
2
|
+
interface CheckpointLike {
|
|
3
|
+
promptIndex: number;
|
|
4
|
+
promptPreview: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* The position in `checkpoints` of the checkpoint the user message
|
|
8
|
+
* `entryId` was sent under, or `undefined` when none can be told.
|
|
9
|
+
*
|
|
10
|
+
* Checkpoints carry only an 80-character preview of the prompt the agent
|
|
11
|
+
* received, so messages and checkpoints are paired in order by the start of
|
|
12
|
+
* their text. A message whose screen text differs from what was sent (a
|
|
13
|
+
* pasted block shows as a placeholder) matches nothing; then, when every
|
|
14
|
+
* message has a checkpoint, the n-th message is paired with the n-th.
|
|
15
|
+
* Steering notes (`↯ …`) are folded into a running turn and have none.
|
|
16
|
+
*/
|
|
17
|
+
export declare function checkpointForMessage(entries: readonly HistoryEntry[], checkpoints: readonly CheckpointLike[], entryId: number): number | undefined;
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=message-checkpoint.d.ts.map
|
package/dist/motion.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare function reducedMotionFromEnv(env?: NodeJS.ProcessEnv): boolean;
|
|
2
|
+
/** The style actually rendered: the environment override wins over settings. */
|
|
3
|
+
export declare function effectiveAnimationStyle<S extends string>(style: S): S | 'static';
|
|
4
|
+
/** Whether the animated terminal title may run. */
|
|
5
|
+
export declare function titleAnimationAllowed(setting: boolean | undefined): boolean;
|
|
6
|
+
/** Styles whose label colors move and therefore need the fast color clock. */
|
|
7
|
+
export declare function animatesColor(style: string): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Publish the effective style so leaves without a style prop (tool stream
|
|
10
|
+
* spinner, composer activity icon) follow it.
|
|
11
|
+
*/
|
|
12
|
+
export declare function setMotionStatic(value: boolean): void;
|
|
13
|
+
export declare function isMotionStatic(): boolean;
|
|
14
|
+
/** True while decorative motion is off. */
|
|
15
|
+
export declare function useMotionStatic(): boolean;
|
|
16
|
+
//# sourceMappingURL=motion.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Action } from '../app-action-type.js';
|
|
2
|
+
import type { State } from '../app-state.js';
|
|
3
|
+
declare const chatSearchActionTypes: readonly ["chatSearchOpen", "chatSearchSetQuery", "chatSearchStep", "chatSearchClose"];
|
|
4
|
+
type ChatSearchAction = Extract<Action, {
|
|
5
|
+
type: (typeof chatSearchActionTypes)[number];
|
|
6
|
+
}>;
|
|
7
|
+
export declare function isChatSearchAction(action: Action): action is ChatSearchAction;
|
|
8
|
+
/** Transcript search bar (Alt+F / `/chat-search`). */
|
|
9
|
+
export declare function reduceChatSearch(state: State, action: ChatSearchAction): State;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=chat-search.d.ts.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Action } from '../app-action-type.js';
|
|
2
|
+
export declare const composerActionTypes: readonly ["brainPromptSet", "brainPromptClear", "pickerOpen", "pickerClose", "pickerSetMatches", "pickerMove", "toolStarted", "toolEnded", "toolStreamAppend", "toolStreamClear", "enqueue", "dequeueFirst", "queueClear", "queueDelete", "queueToggleRefine", "bashModeEnter", "bashModeExit", "slashPickerOpen", "slashPickerClose", "slashPickerMove", "historyPush", "historyUp", "historyDown", "setInputHistory", "clearInputHistory", "modelPickerOpen", "modelPickerClose", "modelPickerMove", "modelPickerPickProvider", "modelPickerBack", "modelPickerSearch", "modelPickerEffort", "modelPickerHint", "autonomyPickerOpen", "autonomyPickerClose", "autonomyPickerMove", "autonomyPickerHint", "themePickerOpen", "themePickerClose", "themePickerMove", "themePickerHint", "modePickerOpen", "modePickerClose", "modePickerMove", "modePickerHint", "skillPickerOpen", "skillMentionResults", "skillPickerClose", "skillPickerMove", "skillPickerHint", "resourceMenuOpen", "resourceMenuClose", "resourceMenuMove", "resourceMenuHint", "resourceMenuFilter", "resourceMenuConfirm", "designPickerOpen", "designPickerClose", "designPickerMove", "designPickerStack", "promptPickerOpen", "promptPickerClose", "promptPickerMove", "promptPickerCategory", "resumePickerOpen", "resumePickerClose", "resumePickerMove", "resumePickerBusy", "resumePickerHint", "resumePickerError", "replaceHistory", "resumeLoadStart", "resumeLoadTick", "resumeStreamChunk", "resumeLoadAbort"];
|
|
3
|
+
export type ComposerAction = Extract<Action, {
|
|
4
|
+
type: (typeof composerActionTypes)[number];
|
|
5
|
+
}>;
|
|
6
|
+
//# sourceMappingURL=composer-action-types.d.ts.map
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import type { Action } from '../app-action-type.js';
|
|
2
2
|
import type { State } from '../app-state.js';
|
|
3
|
-
|
|
4
|
-
type ComposerAction = Extract<Action, {
|
|
5
|
-
type: (typeof composerActionTypes)[number];
|
|
6
|
-
}>;
|
|
3
|
+
import { type ComposerAction } from './composer-action-types.js';
|
|
7
4
|
export declare function isComposerAction(action: Action): action is ComposerAction;
|
|
8
5
|
/** Reduces composer tools, queues, history navigation, and session/model pickers. */
|
|
9
6
|
export declare function reduceComposer(state: State, action: ComposerAction): State;
|
|
10
|
-
export {};
|
|
11
7
|
//# sourceMappingURL=composer.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Action } from '../app-action-type.js';
|
|
2
|
+
import type { State } from '../app-state.js';
|
|
3
|
+
type MessageJumpAction = Extract<Action, {
|
|
4
|
+
type: 'messageJump';
|
|
5
|
+
}>;
|
|
6
|
+
/**
|
|
7
|
+
* Alt+↑ / Alt+↓: step through the user's own messages in the transcript.
|
|
8
|
+
* The first Alt+↑ lands on the newest one; further steps stop at either end.
|
|
9
|
+
* `seq` increments on every step so the view scrolls even when the target
|
|
10
|
+
* entry is the same one (the user may have scrolled away since).
|
|
11
|
+
*/
|
|
12
|
+
export declare function reduceMessageJump(state: State, action: MessageJumpAction): State;
|
|
13
|
+
/** Drop the marked message (Esc, or any key that goes on to the composer). */
|
|
14
|
+
export declare function clearMessageJump(state: State): State;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=message-jump.d.ts.map
|
|
@@ -10,7 +10,7 @@ import type { State } from '../app-state.js';
|
|
|
10
10
|
* {@link computeMaxSidebarScroll}; see its doc for the layout budget.
|
|
11
11
|
*/
|
|
12
12
|
export declare function estimateSidebarMaxScroll(state: State, viewportHeight?: number, effectiveSwarmOnSidebar?: boolean | undefined): number;
|
|
13
|
-
declare const workspacePanelActionTypes: readonly ["toggleMonitor", "toggleAgentsMonitor", "toggleHelp", "toggleTodosMonitor", "toggleQueuePanel", "toggleProcessList", "toggleCronMonitor", "togglePlanPanel", "closeAllPanels", "toggleSidebarFocus", "sidebarScroll", "sidebarScrollSet", "sidebarScrollReset", "toggleKanbanPanel", "toggleGoalPanel", "toggleGoalKanbanPanel", "toggleContextPanel", "toggleConnectionsPanel", "checkpointReceived", "rewindOverlayOpen", "rewindOverlayClose", "rewindOverlayMove", "sessionRewound", "eternalStage", "goalSummary", "goalRunInit", "goalRunPhaseUpdate", "goalRunTaskActive", "goalRunTaskAgent", "goalRunTaskCompleted", "goalRunRunningPhases", "goalRunElapsed", "goalRunMonitorToggle", "goalRunReset", "sddBoardSnapshot", "toggleSddBoardMonitor", "sddBoardFocusNext", "sddBoardFocusPrev", "worktreeUpsert", "worktreeRemove", "toggleWorktreeMonitor"];
|
|
13
|
+
declare const workspacePanelActionTypes: readonly ["toggleMonitor", "toggleAgentsMonitor", "toggleHelp", "toggleTodosMonitor", "toggleQueuePanel", "toggleProcessList", "toggleCronMonitor", "togglePlanPanel", "closeAllPanels", "toggleSidebarFocus", "sidebarScroll", "sidebarScrollSet", "sidebarScrollReset", "toggleKanbanPanel", "toggleGoalPanel", "toggleGoalKanbanPanel", "toggleContextPanel", "toggleConnectionsPanel", "checkpointReceived", "rewindOverlayOpen", "rewindOverlayClose", "rewindOverlayMove", "checkpointFork", "forkRequestDone", "sessionRewound", "eternalStage", "goalSummary", "goalRunInit", "goalRunPhaseUpdate", "goalRunTaskActive", "goalRunTaskAgent", "goalRunTaskCompleted", "goalRunRunningPhases", "goalRunElapsed", "goalRunMonitorToggle", "goalRunReset", "sddBoardSnapshot", "toggleSddBoardMonitor", "sddBoardFocusNext", "sddBoardFocusPrev", "worktreeUpsert", "worktreeRemove", "toggleWorktreeMonitor"];
|
|
14
14
|
type WorkspacePanelAction = Extract<Action, {
|
|
15
15
|
type: (typeof workspacePanelActionTypes)[number];
|
|
16
16
|
}>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ResumeSessionEntry } from './app-state-core-types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Picker order for `/resume`: this worktree's sessions first, then each other
|
|
4
|
+
* worktree of the repository in the host's order. Inside each group, forks
|
|
5
|
+
* sit under their parent (see `orderSessionTree`) with a tree connector.
|
|
6
|
+
*/
|
|
7
|
+
export declare function orderResumeEntries(entries: readonly ResumeSessionEntry[]): ResumeSessionEntry[];
|
|
8
|
+
//# sourceMappingURL=resume-session-tree.d.ts.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { RewoundConversation } from '@wrongstack/core/storage';
|
|
2
|
+
import type { Action } from './app-action-type.js';
|
|
3
|
+
/**
|
|
4
|
+
* After a rewind or a fork, hand the prompt that was taken back to the user
|
|
5
|
+
* to edit and send again.
|
|
6
|
+
*
|
|
7
|
+
* Both wipe the composer (a rewind clears the transcript view, a fork
|
|
8
|
+
* resumes another session), so the draft from before is passed in. A draft
|
|
9
|
+
* wins over the prompt: it is what the user was typing, and losing it to a
|
|
10
|
+
* rewind was a bug of its own. The prompt is then shown as a note instead.
|
|
11
|
+
*/
|
|
12
|
+
export declare function restoreRewoundPrompt(dispatch: (action: Action) => void, draftBefore: string, promptText: string | undefined): void;
|
|
13
|
+
/**
|
|
14
|
+
* Redraw the transcript from the conversation a rewind or redo left. The
|
|
15
|
+
* rewind event clears the screen; without this the turns that survived the
|
|
16
|
+
* rewind vanished from view while the model still had them.
|
|
17
|
+
*/
|
|
18
|
+
export declare function showConversation(dispatch: (action: Action) => void, conversation: RewoundConversation): void;
|
|
19
|
+
/** After a rewind: the surviving turns on screen, the prompt back in the composer. */
|
|
20
|
+
export declare function showRewind(dispatch: (action: Action) => void, draftBefore: string, outcome: {
|
|
21
|
+
promptText?: string | undefined;
|
|
22
|
+
conversation?: RewoundConversation | undefined;
|
|
23
|
+
}): void;
|
|
24
|
+
//# sourceMappingURL=rewind-prompt.d.ts.map
|
|
@@ -34,6 +34,12 @@ export interface RunTuiOptions {
|
|
|
34
34
|
banner?: boolean | undefined;
|
|
35
35
|
/** Persists the input queue across crashes; if omitted, the queue is in-memory only. */
|
|
36
36
|
queueStore?: QueueStore | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* The queue store of another session. With it, `/resume` brings that
|
|
39
|
+
* session's queue along (the WebUI keeps its queue in the same file) and
|
|
40
|
+
* leaves the previous session's on disk.
|
|
41
|
+
*/
|
|
42
|
+
queueStoreFor?: ((sessionId: string) => QueueStore | undefined) | undefined;
|
|
37
43
|
/**
|
|
38
44
|
* Called with the queue's display texts (head first) on EVERY queue change
|
|
39
45
|
* — enqueue, /queue delete, /queue clear, dequeue-for-delivery. The CLI
|
|
@@ -118,6 +124,12 @@ export interface RunTuiOptions {
|
|
|
118
124
|
* the version chip when this is true, so users notice without having
|
|
119
125
|
* to read the stderr notice. */
|
|
120
126
|
updateAvailable?: boolean | undefined;
|
|
127
|
+
/**
|
|
128
|
+
* The standalone executable's background update: called with the version
|
|
129
|
+
* once it is downloaded, verified and waiting to be swapped in when this
|
|
130
|
+
* session exits. The status bar's version chip then says so.
|
|
131
|
+
*/
|
|
132
|
+
subscribeUpdateReady?: ((listener: (version: string) => void) => () => void) | undefined;
|
|
121
133
|
/** Snapshot of keyed providers + their model lists for the `/model` picker. Async — the catalog fetch may need to hit disk/network. */
|
|
122
134
|
getPickableProviders?: (() => Promise<import('./components/model-picker.js').ProviderOption[]>) | undefined;
|
|
123
135
|
/** Apply a (provider, model) pair after the picker confirms. Returns an error string on failure. */
|
|
@@ -126,10 +138,9 @@ export interface RunTuiOptions {
|
|
|
126
138
|
switchAutonomy?: ((mode: 'off' | 'suggest' | 'auto' | 'eternal' | 'eternal-parallel') => string | null) | undefined;
|
|
127
139
|
/**
|
|
128
140
|
* Model-specific maxContext (tokens), resolved by the CLI via the
|
|
129
|
-
* ModelsRegistry. When omitted, the TUI falls back to the provider
|
|
130
|
-
*
|
|
131
|
-
*
|
|
132
|
-
* context chip uses this for its progress denominator.
|
|
141
|
+
* ModelsRegistry. When omitted, the TUI falls back to the provider's
|
|
142
|
+
* reported window, which is 0 (unknown) until the catalog resolves one.
|
|
143
|
+
* The status bar's context chip uses this for its progress denominator.
|
|
133
144
|
*/
|
|
134
145
|
effectiveMaxContext?: number | undefined;
|
|
135
146
|
/** Absolute project root for goal.json loading. */
|
|
@@ -520,6 +531,14 @@ export interface RunTuiOptions {
|
|
|
520
531
|
* from the session store and returns ResumeSessionEntry-shaped data.
|
|
521
532
|
*/
|
|
522
533
|
listSessions?: ((limit?: number) => Promise<import('./app-state.js').ResumeSessionEntry[]>) | undefined;
|
|
534
|
+
/**
|
|
535
|
+
* Branch a session at a checkpoint (the conversation before that prompt)
|
|
536
|
+
* into a new session, leaving the original as it is. Returns the new id;
|
|
537
|
+
* the TUI then resumes it. The working tree is shared, not copied.
|
|
538
|
+
*/
|
|
539
|
+
forkSession?: ((sessionId: string, checkpointPromptIndex: number) => Promise<{
|
|
540
|
+
id: string;
|
|
541
|
+
}>) | undefined;
|
|
523
542
|
/**
|
|
524
543
|
* Resume a session by id: load JSONL events, replay history entries,
|
|
525
544
|
* rebuild agent context, and return hydrated entries for the TUI to
|
package/dist/scroll-anchor.d.ts
CHANGED
|
@@ -59,6 +59,12 @@ export declare function anchorAtTopRow(geometry: ScrollGeometry, topRow: number)
|
|
|
59
59
|
* bottom returns `null` (re-pin).
|
|
60
60
|
*/
|
|
61
61
|
export declare function scrollAnchorBy(geometry: ScrollGeometry, current: ScrollAnchor | null, deltaUp: number): ScrollAnchor | null;
|
|
62
|
+
/**
|
|
63
|
+
* Anchor that puts the start of render group `index` at the viewport top.
|
|
64
|
+
* Groups too close to the bottom to reach the top re-pin (`null`), which
|
|
65
|
+
* still shows them. Out-of-range indexes return `undefined` (no move).
|
|
66
|
+
*/
|
|
67
|
+
export declare function anchorForGroupIndex(geometry: ScrollGeometry, index: number): ScrollAnchor | null | undefined;
|
|
62
68
|
/** Anchor for the very top of the transcript (or `null` when it all fits). */
|
|
63
69
|
export declare function scrollAnchorToTop(geometry: ScrollGeometry): ScrollAnchor | null;
|
|
64
70
|
/** Rows moved by one PageUp/PageDown press. */
|
|
@@ -2,7 +2,7 @@ import { type InputBuilder } from '@wrongstack/core/agent';
|
|
|
2
2
|
import type { Director } from '@wrongstack/core/coordination';
|
|
3
3
|
import type { AttachmentStore, ContentBlock } from '@wrongstack/core/types';
|
|
4
4
|
import type { Action, State } from './app-reducer.js';
|
|
5
|
-
import { emptyMemoryContextMonitor } from './memory-context-monitor.js';
|
|
5
|
+
import type { emptyMemoryContextMonitor } from './memory-context-monitor.js';
|
|
6
6
|
import type { MutableCell } from './shared-types.js';
|
|
7
7
|
import { type TokenPreviewStore } from './token-previews.js';
|
|
8
8
|
import type { SubmitCapabilities } from './tui-host-capabilities.js';
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
export declare function submitSlashCommand({ trimmed, sessionGenerationRef, attachments, tokenPreviewsRef, isAutomaticBugHuntReplay, dispatch, pushSubmittedHistory, clearDraft, slashRegistry, agent, refreshGoalSummary, onBugHuntStarted, mouseMode, nativeMouse, setNativeMouse, setMouseMode, getSettings, saveSettings, liveModel, setLiveModel, liveProvider, setLiveProvider, activeMaxContext, setActiveMaxContext, getYolo, yoloLive, setYoloLive, getAutonomy, autonomyLive, setAutonomyLive, getEternalEngine, runEternalLoopRef, getParallelEngine, runParallelLoopRef, getModeLabel, liveModeLabel, setLiveModeLabel, getToolsItems, setLiveToolCount, exit, onExit, builderRef, waitForIdleSettle, stateRef, runBlocks, liveDirector, clearTerminal, onClearHistory, setMemoryContextMonitor, tokenCounter, enhanceAbortRef, enhanceCancelledRef, enhanceOriginalRef, nextStepsAutoSubmitTimerRef, autoSubmitStreakRef, autoSubmitCapWarnedRef, autoSubmitLoopGuardRef, onAfterClear, }: {
|
|
2
|
+
trimmed: string;
|
|
3
|
+
sessionGenerationRef: import('./shared-types.js').MutableCell<number>;
|
|
4
|
+
attachments: import('@wrongstack/core/types').AttachmentStore;
|
|
5
|
+
tokenPreviewsRef: import('./shared-types.js').MutableCell<import('./token-previews.js').TokenPreviewStore>;
|
|
6
|
+
isAutomaticBugHuntReplay: boolean;
|
|
7
|
+
dispatch: (action: import('./app-action-type.js').Action) => void;
|
|
8
|
+
pushSubmittedHistory: () => void;
|
|
9
|
+
clearDraft: () => void;
|
|
10
|
+
slashRegistry: import('@wrongstack/core/registry').SlashCommandRegistry;
|
|
11
|
+
agent: import('@wrongstack/core/agent').Agent;
|
|
12
|
+
refreshGoalSummary: () => void;
|
|
13
|
+
onBugHuntStarted: (command: string, totalRounds?: number | undefined) => void;
|
|
14
|
+
mouseMode: boolean;
|
|
15
|
+
nativeMouse: boolean;
|
|
16
|
+
setNativeMouse: (value: boolean) => void;
|
|
17
|
+
setMouseMode: (value: boolean) => void;
|
|
18
|
+
getSettings: (() => import('./app-settings-type.js').Settings) | undefined;
|
|
19
|
+
saveSettings: ((settings: import('./app-settings-type.js').Settings) => string | Promise<string | null> | null) | undefined;
|
|
20
|
+
liveModel: string;
|
|
21
|
+
setLiveModel: (value: string) => void;
|
|
22
|
+
liveProvider: string;
|
|
23
|
+
setLiveProvider: (value: string) => void;
|
|
24
|
+
activeMaxContext: number | undefined;
|
|
25
|
+
setActiveMaxContext: (value: number) => void;
|
|
26
|
+
getYolo: (() => boolean) | undefined;
|
|
27
|
+
yoloLive: boolean;
|
|
28
|
+
setYoloLive: (value: boolean) => void;
|
|
29
|
+
getAutonomy: (() => 'off' | 'suggest' | 'auto' | 'eternal' | 'eternal-parallel') | undefined;
|
|
30
|
+
autonomyLive: 'off' | 'suggest' | 'auto' | 'eternal' | 'eternal-parallel';
|
|
31
|
+
setAutonomyLive: (value: 'off' | 'suggest' | 'auto' | 'eternal' | 'eternal-parallel') => void;
|
|
32
|
+
getEternalEngine: (() => unknown) | undefined;
|
|
33
|
+
runEternalLoopRef: import('./shared-types.js').MutableCell<() => Promise<void>>;
|
|
34
|
+
getParallelEngine: (() => unknown) | undefined;
|
|
35
|
+
runParallelLoopRef: import('./shared-types.js').MutableCell<() => Promise<void>>;
|
|
36
|
+
getModeLabel: (() => string) | undefined;
|
|
37
|
+
liveModeLabel: string | undefined;
|
|
38
|
+
setLiveModeLabel: (value: string) => void;
|
|
39
|
+
getToolsItems: (() => {
|
|
40
|
+
enabled: boolean;
|
|
41
|
+
}[]) | undefined;
|
|
42
|
+
setLiveToolCount: (value: number) => void;
|
|
43
|
+
exit: () => void;
|
|
44
|
+
onExit: (code: number) => void;
|
|
45
|
+
builderRef: import('./shared-types.js').MutableCell<import('@wrongstack/core/agent').InputBuilder | null>;
|
|
46
|
+
waitForIdleSettle: (isIdle: () => boolean, deadlineMs: number, opts?: {
|
|
47
|
+
maxPollMs?: number;
|
|
48
|
+
}) => Promise<boolean>;
|
|
49
|
+
stateRef: import('./shared-types.js').MutableCell<import('./app-state.js').State>;
|
|
50
|
+
runBlocks: (blocks: import('@wrongstack/core/types').ContentBlock[]) => Promise<void>;
|
|
51
|
+
liveDirector: () => import('@wrongstack/core/coordination').Director | null;
|
|
52
|
+
clearTerminal: (() => void) | undefined;
|
|
53
|
+
onClearHistory: import('./tui-host-capabilities.js').SubmitCapabilities['onClearHistory'];
|
|
54
|
+
setMemoryContextMonitor: (value: import('./memory-context-monitor.js').MemoryContextMonitorState) => void;
|
|
55
|
+
tokenCounter: import('@wrongstack/core/types').TokenCounter | undefined;
|
|
56
|
+
enhanceAbortRef: import('./shared-types.js').MutableCell<AbortController | null>;
|
|
57
|
+
enhanceCancelledRef: import('./shared-types.js').MutableCell<boolean>;
|
|
58
|
+
enhanceOriginalRef: import('./shared-types.js').MutableCell<string>;
|
|
59
|
+
nextStepsAutoSubmitTimerRef: import('./shared-types.js').MutableCell<NodeJS.Timeout | undefined>;
|
|
60
|
+
autoSubmitStreakRef: import('./shared-types.js').MutableCell<number>;
|
|
61
|
+
autoSubmitCapWarnedRef: import('./shared-types.js').MutableCell<boolean>;
|
|
62
|
+
autoSubmitLoopGuardRef: import('./shared-types.js').MutableCell<{
|
|
63
|
+
reset(): void;
|
|
64
|
+
}>;
|
|
65
|
+
onAfterClear: (() => void) | undefined;
|
|
66
|
+
}): Promise<void>;
|
|
67
|
+
//# sourceMappingURL=submit-slash-command.d.ts.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { HistoryEntry } from './history-entry.js';
|
|
2
|
+
/** One match per entry: the first hit inside that entry's text. */
|
|
3
|
+
export interface TranscriptMatch {
|
|
4
|
+
entryId: number;
|
|
5
|
+
/** The line containing the first hit, untrimmed. */
|
|
6
|
+
line: string;
|
|
7
|
+
/** Code-unit offset of the hit inside {@link line}. */
|
|
8
|
+
column: number;
|
|
9
|
+
/** Code-unit length of the hit. */
|
|
10
|
+
length: number;
|
|
11
|
+
}
|
|
12
|
+
export interface TranscriptSearchOptions {
|
|
13
|
+
/** Thinking cards are hidden unless model reasoning is shown. */
|
|
14
|
+
includeReasoning: boolean;
|
|
15
|
+
}
|
|
16
|
+
/** Per-entry text is capped so one huge tool result cannot stall a keystroke. */
|
|
17
|
+
export declare const MAX_SEARCH_CHARS_PER_ENTRY = 200000;
|
|
18
|
+
/** Matches in transcript order (oldest first), at most one per entry. */
|
|
19
|
+
export declare function findTranscriptMatches(entries: readonly HistoryEntry[], query: string, options: TranscriptSearchOptions): TranscriptMatch[];
|
|
20
|
+
/**
|
|
21
|
+
* Next selected entry after moving `delta` matches: -1 = older, +1 = newer.
|
|
22
|
+
* Wraps at both ends. A selection that is no longer a match (retention
|
|
23
|
+
* evicted it, or the query changed) restarts from the newest match.
|
|
24
|
+
*/
|
|
25
|
+
export declare function stepTranscriptMatch(matches: readonly TranscriptMatch[], selectedEntryId: number | null, delta: -1 | 1): number | null;
|
|
26
|
+
/**
|
|
27
|
+
* Fit a match line into `width` columns, keeping the hit visible. Returns the
|
|
28
|
+
* three display segments; an ellipsis marks each trimmed side. Widths are
|
|
29
|
+
* counted in code units, which is exact for the ASCII-dominant transcript
|
|
30
|
+
* text and conservative (never overflowing) for wide glyphs after the
|
|
31
|
+
* caller's own display-width truncation.
|
|
32
|
+
*/
|
|
33
|
+
export declare function transcriptMatchSnippet(match: Pick<TranscriptMatch, 'line' | 'column' | 'length'>, width: number): {
|
|
34
|
+
before: string;
|
|
35
|
+
hit: string;
|
|
36
|
+
after: string;
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=transcript-search.d.ts.map
|
package/dist/ui-contracts.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ export declare const PILL_MIN_INNER_WIDTH = 22;
|
|
|
22
22
|
* starts rendering per-row "metric" columns (latency, diff, elapsed, agent
|
|
23
23
|
* count, relative time). Below this threshold the row keeps its identity
|
|
24
24
|
* label only; the secondary metric is dropped to preserve the title.
|
|
25
|
-
* Centralized so the F twins in `sidebar-
|
|
25
|
+
* Centralized so the F twins in `sidebar-panel-*.tsx` and
|
|
26
26
|
* `sidebar-panels-task.tsx` stop hand-rolling the literal `24`.
|
|
27
27
|
*/
|
|
28
28
|
export declare const METRIC_MIN_BODY_WIDTH = 24;
|
|
@@ -131,7 +131,7 @@ export declare function useAppController(props: AppProps): {
|
|
|
131
131
|
liveStatuslineMode: import("./settings-contracts.js").StatuslineMode;
|
|
132
132
|
projectName: string | undefined;
|
|
133
133
|
workingDirChip: string | undefined;
|
|
134
|
-
handleRewindTo: (checkpointIndex: number) => Promise<
|
|
134
|
+
handleRewindTo: (checkpointIndex: number) => Promise<import("./hooks/use-session-rewind.js").RewindOutcome>;
|
|
135
135
|
activeCtrlRef: import("react").RefObject<AbortController | null>;
|
|
136
136
|
clearPendingConfirms: () => void;
|
|
137
137
|
liveDirector: () => Director | null;
|