@wrongstack/tui 0.296.4 → 0.298.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-props.d.ts +11 -1
- package/dist/app-settings-type.d.ts +5 -1
- package/dist/app-state.d.ts +4 -0
- package/dist/components/auth-panel.d.ts +4 -0
- package/dist/components/confirm-prompt.d.ts +14 -0
- package/dist/components/history/entry.d.ts +7 -1
- package/dist/components/history/index.d.ts +1 -1
- package/dist/components/history/tool-group.d.ts +1 -1
- package/dist/components/history/types.d.ts +6 -0
- package/dist/components/scrollable-history.d.ts +201 -2
- package/dist/components/settings-picker-model.d.ts +17 -1
- package/dist/components/settings-picker.d.ts +5 -1
- package/dist/components/status-bar-types.d.ts +31 -5
- package/dist/components/status-bar.d.ts +1 -1
- package/dist/heap-watchdog.d.ts +6 -42
- package/dist/history-entry.d.ts +9 -0
- package/dist/hooks/use-statusbar-view-model.d.ts +1 -0
- package/dist/hooks/use-tui-slash-commands.d.ts +1 -1
- package/dist/index.js +853 -360
- package/dist/markdown.d.ts +2 -0
- package/dist/run-tui-options.d.ts +10 -1
- package/dist/settings-contracts.d.ts +4 -0
- package/dist/token-previews.d.ts +3 -2
- package/dist/tui-memory-counters.d.ts +38 -0
- package/package.json +10 -8
- package/dist/app-action-type.d.ts.map +0 -1
- package/dist/app-initial-state.d.ts.map +0 -1
- package/dist/app-key-handler.d.ts.map +0 -1
- package/dist/app-props.d.ts.map +0 -1
- package/dist/app-reducer.d.ts.map +0 -1
- package/dist/app-settings-type.d.ts.map +0 -1
- package/dist/app-state-core-types.d.ts.map +0 -1
- package/dist/app-state-fleet.d.ts.map +0 -1
- package/dist/app-state.d.ts.map +0 -1
- package/dist/app-status-region.d.ts.map +0 -1
- package/dist/app-ui-state.d.ts.map +0 -1
- package/dist/app-view-contract.d.ts.map +0 -1
- package/dist/app-view-state.d.ts.map +0 -1
- package/dist/app-view.d.ts.map +0 -1
- package/dist/app.d.ts.map +0 -1
- package/dist/auth-panel-model.d.ts.map +0 -1
- package/dist/brain-contracts.d.ts.map +0 -1
- package/dist/brain-panel-model.d.ts.map +0 -1
- package/dist/checkpoint-retention.d.ts.map +0 -1
- package/dist/clipboard.d.ts.map +0 -1
- package/dist/components/agents-monitor-constants.d.ts.map +0 -1
- package/dist/components/agents-monitor.d.ts.map +0 -1
- package/dist/components/animation-style.d.ts.map +0 -1
- package/dist/components/audit-panel.d.ts.map +0 -1
- package/dist/components/auth-panel-model.d.ts.map +0 -1
- package/dist/components/auth-panel.d.ts.map +0 -1
- package/dist/components/autonomy-picker.d.ts.map +0 -1
- package/dist/components/brain-decision-prompt.d.ts.map +0 -1
- package/dist/components/brain-panel-model.d.ts.map +0 -1
- package/dist/components/brain-panel.d.ts.map +0 -1
- package/dist/components/checkpoint-timeline.d.ts.map +0 -1
- package/dist/components/clear-confirm-panel.d.ts.map +0 -1
- package/dist/components/composer-status-chip.d.ts.map +0 -1
- package/dist/components/confirm-prompt.d.ts.map +0 -1
- package/dist/components/connections-panel.d.ts.map +0 -1
- package/dist/components/context-panel.d.ts.map +0 -1
- package/dist/components/continue-confirm-panel.d.ts.map +0 -1
- package/dist/components/coordinator-panel.d.ts.map +0 -1
- package/dist/components/cron-jobs.d.ts.map +0 -1
- package/dist/components/design-picker.d.ts.map +0 -1
- package/dist/components/enhance-panel.d.ts.map +0 -1
- package/dist/components/entry-error-boundary.d.ts.map +0 -1
- package/dist/components/esc-confirm-prompt.d.ts.map +0 -1
- package/dist/components/exit-confirm-panel.d.ts.map +0 -1
- package/dist/components/f-key-picker.d.ts.map +0 -1
- package/dist/components/file-picker.d.ts.map +0 -1
- package/dist/components/fleet-monitor.d.ts.map +0 -1
- package/dist/components/fleet-panel.d.ts.map +0 -1
- package/dist/components/goal-kanban-panel.d.ts.map +0 -1
- package/dist/components/goal-panel.d.ts.map +0 -1
- package/dist/components/help-overlay.d.ts.map +0 -1
- package/dist/components/help-panel.d.ts.map +0 -1
- package/dist/components/history/assistant.d.ts.map +0 -1
- package/dist/components/history/banner.d.ts.map +0 -1
- package/dist/components/history/basic-format.d.ts.map +0 -1
- package/dist/components/history/code-block-diff-helpers.d.ts.map +0 -1
- package/dist/components/history/code-block.d.ts.map +0 -1
- package/dist/components/history/copy-icon.d.ts.map +0 -1
- package/dist/components/history/entry.d.ts.map +0 -1
- package/dist/components/history/index.d.ts.map +0 -1
- package/dist/components/history/replay.d.ts.map +0 -1
- package/dist/components/history/sage-output-format.d.ts.map +0 -1
- package/dist/components/history/stream-box.d.ts.map +0 -1
- package/dist/components/history/tool-arg-format.d.ts.map +0 -1
- package/dist/components/history/tool-card.d.ts.map +0 -1
- package/dist/components/history/tool-group.d.ts.map +0 -1
- package/dist/components/history/tool-output-summary.d.ts.map +0 -1
- package/dist/components/history/tool-visual-command.d.ts.map +0 -1
- package/dist/components/history/tool-visual-domain.d.ts.map +0 -1
- package/dist/components/history/tool-visual-format.d.ts.map +0 -1
- package/dist/components/history/tool-visual-lsp.d.ts.map +0 -1
- package/dist/components/history/tool-visual-misc.d.ts.map +0 -1
- package/dist/components/history/tool-visual-mode-workdir.d.ts.map +0 -1
- package/dist/components/history/tool-visual-types.d.ts.map +0 -1
- package/dist/components/history/types.d.ts.map +0 -1
- package/dist/components/history/utils.d.ts.map +0 -1
- package/dist/components/history/visual-lines.d.ts.map +0 -1
- package/dist/components/history/visual-memory-logs.d.ts.map +0 -1
- package/dist/components/history.d.ts.map +0 -1
- package/dist/components/input.d.ts.map +0 -1
- package/dist/components/kanban-panel.d.ts.map +0 -1
- package/dist/components/key-hint-bar.d.ts.map +0 -1
- package/dist/components/live-activity-strip.d.ts.map +0 -1
- package/dist/components/mailbox-panel.d.ts.map +0 -1
- package/dist/components/mcp-picker.d.ts.map +0 -1
- package/dist/components/memory-context-widget.d.ts.map +0 -1
- package/dist/components/mode-picker.d.ts.map +0 -1
- package/dist/components/model-picker.d.ts.map +0 -1
- package/dist/components/monitor-shell.d.ts.map +0 -1
- package/dist/components/phase-monitor.d.ts.map +0 -1
- package/dist/components/phase-panel.d.ts.map +0 -1
- package/dist/components/plan-panel.d.ts.map +0 -1
- package/dist/components/plugin-picker.d.ts.map +0 -1
- package/dist/components/powerline-rail.d.ts.map +0 -1
- package/dist/components/process-list.d.ts.map +0 -1
- package/dist/components/project-picker.d.ts.map +0 -1
- package/dist/components/prompt-picker.d.ts.map +0 -1
- package/dist/components/provider-colors.d.ts.map +0 -1
- package/dist/components/queue-panel.d.ts.map +0 -1
- package/dist/components/refine-countdown-panel.d.ts.map +0 -1
- package/dist/components/refine-failure-panel.d.ts.map +0 -1
- package/dist/components/resume-picker.d.ts.map +0 -1
- package/dist/components/scrollable-history.d.ts.map +0 -1
- package/dist/components/sdd-board-overlay.d.ts.map +0 -1
- package/dist/components/send-mode-picker.d.ts.map +0 -1
- package/dist/components/sessions-panel.d.ts.map +0 -1
- package/dist/components/settings-picker-filter.d.ts.map +0 -1
- package/dist/components/settings-picker-jumps.d.ts.map +0 -1
- package/dist/components/settings-picker-model.d.ts.map +0 -1
- package/dist/components/settings-picker-row-list.d.ts.map +0 -1
- package/dist/components/settings-picker.d.ts.map +0 -1
- package/dist/components/shadow-panel.d.ts.map +0 -1
- package/dist/components/shell-command-warning.d.ts.map +0 -1
- package/dist/components/slash-confirm-panel.d.ts.map +0 -1
- package/dist/components/slash-menu.d.ts.map +0 -1
- package/dist/components/status-bar-chips.d.ts.map +0 -1
- package/dist/components/status-bar-format.d.ts.map +0 -1
- package/dist/components/status-bar-helpers.d.ts.map +0 -1
- package/dist/components/status-bar-types.d.ts.map +0 -1
- package/dist/components/status-bar.d.ts.map +0 -1
- package/dist/components/statusline-detail-panel.d.ts.map +0 -1
- package/dist/components/statusline-picker.d.ts.map +0 -1
- package/dist/components/suggestions.d.ts.map +0 -1
- package/dist/components/todos-monitor.d.ts.map +0 -1
- package/dist/components/tools-picker.d.ts.map +0 -1
- package/dist/components/worktree-monitor.d.ts.map +0 -1
- package/dist/components/worktree-panel.d.ts.map +0 -1
- package/dist/connections-health.d.ts.map +0 -1
- package/dist/connections-slash.d.ts.map +0 -1
- package/dist/context-fill.d.ts.map +0 -1
- package/dist/context-slash.d.ts.map +0 -1
- package/dist/cron-slash.d.ts.map +0 -1
- package/dist/esc-close-panels.d.ts.map +0 -1
- package/dist/exit-slash.d.ts.map +0 -1
- package/dist/f-key-panels.d.ts.map +0 -1
- package/dist/file-search.d.ts.map +0 -1
- package/dist/fn-keys.d.ts.map +0 -1
- package/dist/git-info.d.ts.map +0 -1
- package/dist/heap-watchdog.d.ts.map +0 -1
- package/dist/height-cache.d.ts.map +0 -1
- package/dist/highlight.d.ts.map +0 -1
- package/dist/history-archive.d.ts.map +0 -1
- package/dist/history-entry.d.ts.map +0 -1
- package/dist/history-retention.d.ts.map +0 -1
- package/dist/hit-test.d.ts.map +0 -1
- package/dist/hooks/fleet-chat-coalescer.d.ts.map +0 -1
- package/dist/hooks/subagent-history-format.d.ts.map +0 -1
- package/dist/hooks/use-app-picker-keys.d.ts.map +0 -1
- package/dist/hooks/use-app-runtime-refs.d.ts.map +0 -1
- package/dist/hooks/use-app-session-state.d.ts.map +0 -1
- package/dist/hooks/use-auth-panel.d.ts.map +0 -1
- package/dist/hooks/use-autonomous-coordinator.d.ts.map +0 -1
- package/dist/hooks/use-autonomy-drivers.d.ts.map +0 -1
- package/dist/hooks/use-brain-events.d.ts.map +0 -1
- package/dist/hooks/use-brain-panel.d.ts.map +0 -1
- package/dist/hooks/use-brain-risk-sync.d.ts.map +0 -1
- package/dist/hooks/use-chip-staleness-guard.d.ts.map +0 -1
- package/dist/hooks/use-client-telemetry.d.ts.map +0 -1
- package/dist/hooks/use-core-tui-commands.d.ts.map +0 -1
- package/dist/hooks/use-director-fleet-bridge.d.ts.map +0 -1
- package/dist/hooks/use-enhance-runtime-state.d.ts.map +0 -1
- package/dist/hooks/use-exit-command.d.ts.map +0 -1
- package/dist/hooks/use-file-search.d.ts.map +0 -1
- package/dist/hooks/use-fleet-generation-gate.d.ts.map +0 -1
- package/dist/hooks/use-git-session-status.d.ts.map +0 -1
- package/dist/hooks/use-help-panel.d.ts.map +0 -1
- package/dist/hooks/use-history-copy-notice.d.ts.map +0 -1
- package/dist/hooks/use-history-viewport-sync.d.ts.map +0 -1
- package/dist/hooks/use-initial-prompt.d.ts.map +0 -1
- package/dist/hooks/use-input-history-persistence.d.ts.map +0 -1
- package/dist/hooks/use-interrupt-ladder.d.ts.map +0 -1
- package/dist/hooks/use-kanban-board-focus.d.ts.map +0 -1
- package/dist/hooks/use-live-settings-state.d.ts.map +0 -1
- package/dist/hooks/use-live-todos.d.ts.map +0 -1
- package/dist/hooks/use-mailbox-view-model.d.ts.map +0 -1
- package/dist/hooks/use-mode-picker.d.ts.map +0 -1
- package/dist/hooks/use-model-pick.d.ts.map +0 -1
- package/dist/hooks/use-mouse-tracking.d.ts.map +0 -1
- package/dist/hooks/use-next-steps-auto-submit.d.ts.map +0 -1
- package/dist/hooks/use-panel-controllers.d.ts.map +0 -1
- package/dist/hooks/use-paste-handling.d.ts.map +0 -1
- package/dist/hooks/use-picker-keys-types.d.ts.map +0 -1
- package/dist/hooks/use-picker-keys.d.ts.map +0 -1
- package/dist/hooks/use-prompt-picker.d.ts.map +0 -1
- package/dist/hooks/use-provider-event-bridge.d.ts.map +0 -1
- package/dist/hooks/use-queue-manager.d.ts.map +0 -1
- package/dist/hooks/use-session-interrupt-controller.d.ts.map +0 -1
- package/dist/hooks/use-settings-auto-save.d.ts.map +0 -1
- package/dist/hooks/use-shadow-panel.d.ts.map +0 -1
- package/dist/hooks/use-slash-picker.d.ts.map +0 -1
- package/dist/hooks/use-stable-key-handler.d.ts.map +0 -1
- package/dist/hooks/use-statusbar-view-model.d.ts.map +0 -1
- package/dist/hooks/use-statusline-hidden-sync.d.ts.map +0 -1
- package/dist/hooks/use-statusline-state.d.ts.map +0 -1
- package/dist/hooks/use-stream-chip-expiration.d.ts.map +0 -1
- package/dist/hooks/use-subagent-events.d.ts.map +0 -1
- package/dist/hooks/use-terminal-render-lifecycle.d.ts.map +0 -1
- package/dist/hooks/use-todos-auto-clear.d.ts.map +0 -1
- package/dist/hooks/use-token-counter-refresh.d.ts.map +0 -1
- package/dist/hooks/use-tui-activity.d.ts.map +0 -1
- package/dist/hooks/use-tui-controllers.d.ts.map +0 -1
- package/dist/hooks/use-tui-environment-state.d.ts.map +0 -1
- package/dist/hooks/use-tui-event-bridge.d.ts.map +0 -1
- package/dist/hooks/use-tui-slash-commands.d.ts.map +0 -1
- package/dist/hooks/use-working-dir-chip.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -7
- package/dist/ink.d.ts.map +0 -1
- package/dist/input-editing.d.ts.map +0 -1
- package/dist/input-key-router.d.ts.map +0 -1
- package/dist/input-tokens.d.ts.map +0 -1
- package/dist/input-validation/action-helpers.d.ts.map +0 -1
- package/dist/input-validation/action-types.d.ts.map +0 -1
- package/dist/input-validation/allow-lists.d.ts.map +0 -1
- package/dist/input-validation/limits.d.ts.map +0 -1
- package/dist/input-validation/result.d.ts.map +0 -1
- package/dist/input-validation/state-entries.d.ts.map +0 -1
- package/dist/input-validation/terminal.d.ts.map +0 -1
- package/dist/input-validation.d.ts.map +0 -1
- package/dist/kanban-audit.d.ts.map +0 -1
- package/dist/kanban-slash.d.ts.map +0 -1
- package/dist/kill-slash.d.ts.map +0 -1
- package/dist/layout-engine.d.ts.map +0 -1
- package/dist/layout-store.d.ts.map +0 -1
- package/dist/mailbox-view-model-types.d.ts.map +0 -1
- package/dist/markdown-table.d.ts.map +0 -1
- package/dist/markdown.d.ts.map +0 -1
- package/dist/memory-context-monitor.d.ts.map +0 -1
- package/dist/memory-lifecycle-entry.d.ts.map +0 -1
- package/dist/memory-slash-format.d.ts.map +0 -1
- package/dist/memory-slash.d.ts.map +0 -1
- package/dist/mouse.d.ts.map +0 -1
- package/dist/on-panel-open.d.ts.map +0 -1
- package/dist/overlay-key-router.d.ts.map +0 -1
- package/dist/paste-accumulator.d.ts.map +0 -1
- package/dist/prompt-refinement-start.d.ts.map +0 -1
- package/dist/ps-slash.d.ts.map +0 -1
- package/dist/queue-slash.d.ts.map +0 -1
- package/dist/reducers/activity.d.ts.map +0 -1
- package/dist/reducers/composer.d.ts.map +0 -1
- package/dist/reducers/conversation.d.ts.map +0 -1
- package/dist/reducers/dialogs.d.ts.map +0 -1
- package/dist/reducers/fleet.d.ts.map +0 -1
- package/dist/reducers/helpers.d.ts.map +0 -1
- package/dist/reducers/panel-pickers.d.ts.map +0 -1
- package/dist/reducers/settings-panel.d.ts.map +0 -1
- package/dist/reducers/settings-values.d.ts.map +0 -1
- package/dist/reducers/workspace-panels.d.ts.map +0 -1
- package/dist/rehydrate-history.d.ts.map +0 -1
- package/dist/run-blocks-controller.d.ts.map +0 -1
- package/dist/run-tui-client-registration.d.ts.map +0 -1
- package/dist/run-tui-options.d.ts.map +0 -1
- package/dist/run-tui-title-controller.d.ts.map +0 -1
- package/dist/run-tui.d.ts.map +0 -1
- package/dist/running-tools.d.ts.map +0 -1
- package/dist/scroll-anchor.d.ts.map +0 -1
- package/dist/sdd-lifecycle-entry.d.ts.map +0 -1
- package/dist/settings-contracts.d.ts.map +0 -1
- package/dist/shared-types.d.ts.map +0 -1
- package/dist/slash-command-search.d.ts.map +0 -1
- package/dist/steering-preamble.d.ts.map +0 -1
- package/dist/submit-controller.d.ts.map +0 -1
- package/dist/submit-history.d.ts.map +0 -1
- package/dist/submit-prompt-refinement.d.ts.map +0 -1
- package/dist/terminal-modes.d.ts.map +0 -1
- package/dist/terminal-silence.d.ts.map +0 -1
- package/dist/terminal-title.d.ts.map +0 -1
- package/dist/terminal-width.d.ts.map +0 -1
- package/dist/theme.d.ts.map +0 -1
- package/dist/thinking-word.d.ts.map +0 -1
- package/dist/token-previews.d.ts.map +0 -1
- package/dist/tool-glyph.d.ts.map +0 -1
- package/dist/tui-host-capabilities.d.ts.map +0 -1
- package/dist/ui-contracts.d.ts.map +0 -1
- package/dist/ui-glyphs.d.ts.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AutonomyStage, DesignKitEntry, FleetChatVerbosity, TokenSavingTier } from '@wrongstack/core/types';
|
|
1
|
+
import type { AutonomyStage, ContextSnapshot, DesignKitEntry, FleetChatVerbosity, TokenSavingTier } from '@wrongstack/core/types';
|
|
2
2
|
import type { SddBoardSnapshot } from '@wrongstack/sdd';
|
|
3
3
|
import type { State } from './app-state.js';
|
|
4
4
|
import type { DraftEntry, GoalSummary, QueueItem, ResumeSessionEntry, SlashCommandMatch } from './app-state-core-types.js';
|
|
@@ -218,6 +218,15 @@ export type Action = {
|
|
|
218
218
|
type: 'replaceHistory';
|
|
219
219
|
entries: HistoryEntry[];
|
|
220
220
|
nextId: number;
|
|
221
|
+
/**
|
|
222
|
+
* Optional context-window snapshot forwarded from the host's
|
|
223
|
+
* `onResumeSession` return. When present, the reducer writes
|
|
224
|
+
* `tokens` to `state.leader.ctxTokens` and bumps
|
|
225
|
+
* `state.contextChipVersion` so the statusline chip and `/context`
|
|
226
|
+
* panel reflect the rebuilt context immediately, instead of staying
|
|
227
|
+
* at zero until the next ctx.pct event.
|
|
228
|
+
*/
|
|
229
|
+
contextSnapshot?: ContextSnapshot | undefined;
|
|
221
230
|
} | {
|
|
222
231
|
type: 'settingsOpen';
|
|
223
232
|
mode: SettingsMode;
|
|
@@ -272,6 +281,8 @@ export type Action = {
|
|
|
272
281
|
showModelReasoning: boolean;
|
|
273
282
|
showAgentSwarmPanel: boolean;
|
|
274
283
|
readSymbols: boolean;
|
|
284
|
+
showSageMemoryInject: boolean;
|
|
285
|
+
sageMemoryInjectThreshold: number;
|
|
275
286
|
} | {
|
|
276
287
|
type: 'settingsClose';
|
|
277
288
|
} | {
|
package/dist/app-props.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { Agent } from '@wrongstack/core/agent';
|
|
|
2
2
|
import type { CoordinatorEvent, Director } from '@wrongstack/core/coordination';
|
|
3
3
|
import type { SlashCommandRegistry } from '@wrongstack/core/registry';
|
|
4
4
|
import type { QueueStore } from '@wrongstack/core/storage';
|
|
5
|
-
import type { AttachmentStore, AutonomyStage, FleetChatVerbosity, Message, TokenCounter, TokenSavingTier } from '@wrongstack/core/types';
|
|
5
|
+
import type { AttachmentStore, AutonomyStage, ContextSnapshot, FleetChatVerbosity, Message, TokenCounter, TokenSavingTier } from '@wrongstack/core/types';
|
|
6
6
|
import type { EventBus } from '@wrongstack/core/kernel';
|
|
7
7
|
import type { VisionAdapters } from '@wrongstack/runtime/vision';
|
|
8
8
|
import type { SddLifecycleResult, SddRunControl } from '@wrongstack/sdd';
|
|
@@ -410,6 +410,16 @@ export interface AppProps {
|
|
|
410
410
|
entries: HistoryEntry[];
|
|
411
411
|
nextId: number;
|
|
412
412
|
sessionId: string;
|
|
413
|
+
/**
|
|
414
|
+
* Optional context-window snapshot computed from the resumed
|
|
415
|
+
* session's tokenCounter after accounting the persisted usage.
|
|
416
|
+
* When present, the reducer writes `tokens` to `state.leader.ctxTokens`,
|
|
417
|
+
* `maxContext` to `state.leader.ctxMaxTokens`, and bumps
|
|
418
|
+
* `state.contextChipVersion` so the chip refreshes immediately. When
|
|
419
|
+
* absent, the chip stays at its previous value until the next ctx.pct
|
|
420
|
+
* event lands.
|
|
421
|
+
*/
|
|
422
|
+
contextSnapshot?: ContextSnapshot | undefined;
|
|
413
423
|
} | null>) | undefined;
|
|
414
424
|
/**
|
|
415
425
|
* List recent session summaries for the /resume picker. The host reads
|
|
@@ -45,7 +45,7 @@ export type Settings = {
|
|
|
45
45
|
debugStream: boolean;
|
|
46
46
|
/** Skip the confirmation prompt for the `!<command>` shell shortcut. */
|
|
47
47
|
shellBangWarningDontShowAgain?: boolean | undefined;
|
|
48
|
-
/** Statusline density mode. Defaults to
|
|
48
|
+
/** Statusline density mode. Defaults to minimum (DEFAULT_STATUSLINE_MODE). */
|
|
49
49
|
statuslineMode: StatuslineMode;
|
|
50
50
|
/** Reasoning mode: auto (provider default) | on | off. */
|
|
51
51
|
reasoningMode: 'auto' | 'on' | 'off';
|
|
@@ -58,6 +58,10 @@ export type Settings = {
|
|
|
58
58
|
showModelReasoning: boolean;
|
|
59
59
|
/** Show the persistent AGENT SWARM and todo mission queue panel. Default: true. */
|
|
60
60
|
showAgentSwarmPanel: boolean;
|
|
61
|
+
/** Show SAGE Memory Inject blocks in tool results. Default: false (hidden). */
|
|
62
|
+
showSageMemoryInject: boolean;
|
|
63
|
+
/** Minimum relation strength for SAGE memory injection. Default: 0.85. */
|
|
64
|
+
sageMemoryInjectThreshold: number;
|
|
61
65
|
/** Prompt cache TTL. */
|
|
62
66
|
cacheTtl: CacheTtl;
|
|
63
67
|
/** Where to persist settings: 'global' or 'project'. */
|
package/dist/app-state.d.ts
CHANGED
|
@@ -275,6 +275,10 @@ export type State = {
|
|
|
275
275
|
showModelReasoning: boolean;
|
|
276
276
|
/** Show the persistent AGENT SWARM and todo mission queue panel. Default: true. */
|
|
277
277
|
showAgentSwarmPanel: boolean;
|
|
278
|
+
/** Show SAGE Memory Inject blocks in tool results. Default: false. */
|
|
279
|
+
showSageMemoryInject: boolean;
|
|
280
|
+
/** Minimum relation strength for SAGE memory injection. Default: 0.85. */
|
|
281
|
+
sageMemoryInjectThreshold: number;
|
|
278
282
|
/** When true, read tool includes codebase-index symbols alongside file content. */
|
|
279
283
|
readSymbols: boolean;
|
|
280
284
|
/** Prompt cache TTL. */
|
|
@@ -3,6 +3,10 @@ import { type AuthPanelState } from './auth-panel-model.js';
|
|
|
3
3
|
export interface AuthPanelProps {
|
|
4
4
|
panel: AuthPanelState;
|
|
5
5
|
}
|
|
6
|
+
export declare function formatExpiry(expiresAt: string | undefined): {
|
|
7
|
+
text: string;
|
|
8
|
+
color: string;
|
|
9
|
+
} | null;
|
|
6
10
|
export declare function isAuthFlowUrlLine(line: string): boolean;
|
|
7
11
|
/** Keep the newest authorize URL pinned even as later status lines arrive. */
|
|
8
12
|
export declare function latestAuthFlowUrl(lines: readonly string[]): string | undefined;
|
|
@@ -23,5 +23,19 @@ export declare function confirmButtonSegments(suggestedPattern: string): Array<{
|
|
|
23
23
|
start: number;
|
|
24
24
|
len: number;
|
|
25
25
|
}>;
|
|
26
|
+
/**
|
|
27
|
+
* Unified-diff text for the payload a mutating tool is about to write.
|
|
28
|
+
*
|
|
29
|
+
* `stringifyInput` strips `content`/`new_string` to keep the summary line
|
|
30
|
+
* readable, and the branch meant to compensate keyed on `input.diff`. But
|
|
31
|
+
* `diff` lives on EditOutput, never on EditInput/WriteInput, and no layer
|
|
32
|
+
* enriches the input before the dialog receives it — so the branch was dead
|
|
33
|
+
* and this dialog asked the user to approve an edit, or an arbitrary
|
|
34
|
+
* whole-file overwrite, having shown them only a path (WS-080).
|
|
35
|
+
*
|
|
36
|
+
* Synthesised here from the fields the tool was actually given, so it renders
|
|
37
|
+
* through the same DiffBlock the committed history entries use.
|
|
38
|
+
*/
|
|
39
|
+
export declare function payloadDiff(input: unknown): string;
|
|
26
40
|
export declare function ConfirmPrompt({ toolName, input, suggestedPattern, onDecision, onEnableYolo, destructive, boundaryReason, }: ConfirmPromptProps): React.ReactElement;
|
|
27
41
|
//# sourceMappingURL=confirm-prompt.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { TodoItem } from '@wrongstack/core/agent';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import type { HistoryEntry } from './types.js';
|
|
4
|
-
export declare const Entry: React.MemoExoticComponent<({ entry, termWidth, termHeight, setSuggestions, autonomyMode, multiDiffSummaryThreshold, todos, showModelReasoning, }: {
|
|
4
|
+
export declare const Entry: React.MemoExoticComponent<({ entry, termWidth, termHeight, setSuggestions, autonomyMode, multiDiffSummaryThreshold, todos, showModelReasoning, showSageMemoryInject, }: {
|
|
5
5
|
entry: HistoryEntry;
|
|
6
6
|
termWidth: number;
|
|
7
7
|
/** Available managed-history rows; used by height-aware entries such as the banner. */
|
|
@@ -22,5 +22,11 @@ export declare const Entry: React.MemoExoticComponent<({ entry, termWidth, termH
|
|
|
22
22
|
* `kind: 'thinking'` entries render as an empty fragment. Default: true.
|
|
23
23
|
*/
|
|
24
24
|
showModelReasoning?: boolean | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Show SAGE Memory Inject blocks in tool results. When false,
|
|
27
|
+
* the `SageMemoryBlock` panel is hidden even when memory was injected.
|
|
28
|
+
* Default: false.
|
|
29
|
+
*/
|
|
30
|
+
showSageMemoryInject?: boolean | undefined;
|
|
25
31
|
}) => React.ReactElement | null>;
|
|
26
32
|
//# sourceMappingURL=entry.d.ts.map
|
|
@@ -16,5 +16,5 @@ export { countLines, firstNonEmpty, fmtBytes, fmtDuration, fmtTok, formatMatchHi
|
|
|
16
16
|
* primitives or stable reducer references, so default shallow
|
|
17
17
|
* comparison is sufficient.
|
|
18
18
|
*/
|
|
19
|
-
export declare const History: React.MemoExoticComponent<({ entries, generation, toolStream, setSuggestions, autonomyMode, multiDiffSummaryThreshold, todos, showModelReasoning, }: HistoryProps) => React.ReactElement>;
|
|
19
|
+
export declare const History: React.MemoExoticComponent<({ entries, generation, toolStream, setSuggestions, autonomyMode, multiDiffSummaryThreshold, todos, showModelReasoning, showSageMemoryInject, }: HistoryProps) => React.ReactElement>;
|
|
20
20
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -45,7 +45,7 @@ export declare const MAX_TOOL_GROUP_ENTRIES = 12;
|
|
|
45
45
|
/** Stable id used by the height cache and React keys for a render group. */
|
|
46
46
|
export declare function renderGroupId(group: RenderGroup): number;
|
|
47
47
|
/** Conservative, bounded row estimate used before a group is measured. */
|
|
48
|
-
export declare function estimateRenderGroupRows(group: RenderGroup, contentWidth: number): number;
|
|
48
|
+
export declare function estimateRenderGroupRows(group: RenderGroup, contentWidth: number, showSageMemoryInject?: boolean): number;
|
|
49
49
|
/**
|
|
50
50
|
* Walk entries and merge consecutive same-tool entries into bounded groups.
|
|
51
51
|
* Non-tool entries and isolated tool entries (no consecutive sibling)
|
|
@@ -53,6 +53,12 @@ export interface HistoryProps {
|
|
|
53
53
|
* `kind: 'thinking'` entries are hidden. Default: true.
|
|
54
54
|
*/
|
|
55
55
|
showModelReasoning?: boolean | undefined;
|
|
56
|
+
/**
|
|
57
|
+
* Show SAGE Memory Inject blocks in tool results. When false,
|
|
58
|
+
* the `SageMemoryBlock` panel is hidden even when memory was injected.
|
|
59
|
+
* Default: false.
|
|
60
|
+
*/
|
|
61
|
+
showSageMemoryInject?: boolean | undefined;
|
|
56
62
|
}
|
|
57
63
|
export interface BodySegment {
|
|
58
64
|
type: 'prose' | 'code';
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import { type MutableRefObject } from 'react';
|
|
3
|
+
import { EntryHeightCache } from '../height-cache.js';
|
|
4
|
+
import { type RenderGroup } from './history/tool-group.js';
|
|
3
5
|
import { type HistoryEntry, type HistoryProps } from './history.js';
|
|
4
6
|
/**
|
|
5
7
|
* Imperative scroll surface owned by the ScrollableHistory component. The app
|
|
@@ -39,6 +41,41 @@ export interface HistoryScrollController {
|
|
|
39
41
|
* entry id is returned; otherwise returns null.
|
|
40
42
|
*/
|
|
41
43
|
copyAtViewportCell(row: number, col: number): Promise<number | null>;
|
|
44
|
+
/**
|
|
45
|
+
* Begin a drag-to-select gesture at `row`,`col` (history-band viewport cell).
|
|
46
|
+
* The cell must be inside a card's row range and inside the rendered band
|
|
47
|
+
* (`0 <= col < termWidth`); the mouse handler has already excluded the rail.
|
|
48
|
+
* Calls that don't satisfy that contract are silently ignored. Existing
|
|
49
|
+
* scrollbar/copy-icon/wheel paths remain intact because they call their own
|
|
50
|
+
* handlers; this only kicks in when the mouse layer explicitly routes a
|
|
51
|
+
* left-press into the card band.
|
|
52
|
+
*/
|
|
53
|
+
beginSelection(row: number, col: number): void;
|
|
54
|
+
/**
|
|
55
|
+
* Extend an active selection to `row`,`col`. If no selection is in progress,
|
|
56
|
+
* the call is a no-op. Crossing into the gutter or below the viewport cancels
|
|
57
|
+
* the drag internally — leaving stale viewport-relative coords around after
|
|
58
|
+
* a mid-drag escape would let the next right-click paste from the wrong
|
|
59
|
+
* card, which is the worse failure mode than the selection disappearing.
|
|
60
|
+
*/
|
|
61
|
+
extendSelection(row: number, col: number): void;
|
|
62
|
+
/**
|
|
63
|
+
* End an active drag (left-release). Does NOT write to the clipboard — the
|
|
64
|
+
* copy is performed by {@link commitSelection}, which is triggered by a
|
|
65
|
+
* separate right-click in the history band (per the drag-select-then-commit
|
|
66
|
+
* contract). If no selection is in progress, the call is a no-op.
|
|
67
|
+
*/
|
|
68
|
+
endSelection(): void;
|
|
69
|
+
/** Drop any in-progress or committed selection without copying. */
|
|
70
|
+
clearSelection(): void;
|
|
71
|
+
/**
|
|
72
|
+
* Commit the active selection to the system clipboard. Returns true if a
|
|
73
|
+
* non-empty selection was resolved and the write succeeded. Returns false
|
|
74
|
+
* silently when there is no selection, the selection is empty (e.g. the drag
|
|
75
|
+
* never moved), or the write fails — the caller can show a transient notice
|
|
76
|
+
* on the truthy branch and stay silent on the falsy branch.
|
|
77
|
+
*/
|
|
78
|
+
commitSelection(): Promise<boolean>;
|
|
42
79
|
}
|
|
43
80
|
/**
|
|
44
81
|
* A clickable copy-icon target resolved in viewport coordinates during the
|
|
@@ -57,6 +94,11 @@ export interface CopyHit {
|
|
|
57
94
|
}
|
|
58
95
|
/** Sentinel returned after copying the active, non-retained tool-stream box. */
|
|
59
96
|
export declare const LIVE_TOOL_STREAM_COPY_ID = -1;
|
|
97
|
+
/** Sentinel returned after copying a drag-select-then-right-click selection.
|
|
98
|
+
* Distinct from any retained entry id so the host can render a different
|
|
99
|
+
* status-line notice ("Selected range copied") without flashing a specific
|
|
100
|
+
* card's copy icon (which only makes sense when a single entry was copied). */
|
|
101
|
+
export declare const SELECTION_COPY_ID = -2;
|
|
60
102
|
/**
|
|
61
103
|
* Resolve the copy target under a viewport cell, or null. A cell matches when
|
|
62
104
|
* its `row` is within the card's visible rows and its `col` is within the
|
|
@@ -82,14 +124,99 @@ export declare function copyRegistryVisibleClip(opts: {
|
|
|
82
124
|
tailRows: number;
|
|
83
125
|
viewportRows: number;
|
|
84
126
|
}): number;
|
|
85
|
-
/** Build the live tool-stream header hit, accounting for ToolStreamBox's top margin.
|
|
127
|
+
/** Build the live tool-stream header hit, accounting for ToolStreamBox's top margin.
|
|
128
|
+
* The `pinnedSlack` offset must match {@link buildCopyRegistry}'s card-hit math so
|
|
129
|
+
* the live-stream icon stays visually aligned with its header row in underfilled
|
|
130
|
+
* pinned frames (flex-end parks the mounted stack at the bottom of the viewport). */
|
|
86
131
|
export declare function liveToolStreamCopyHit(opts: {
|
|
87
132
|
visible: boolean;
|
|
88
133
|
mountedRows: number;
|
|
89
134
|
visibleClip: number;
|
|
90
135
|
viewportRows: number;
|
|
91
136
|
iconCol: number;
|
|
137
|
+
pinnedSlack?: number;
|
|
92
138
|
}): CopyHit | null;
|
|
139
|
+
/**
|
|
140
|
+
* Selection rectangle in viewport cell coordinates, normalized so
|
|
141
|
+
* `topLeft.row <= bottomRight.row` and the column pairs are likewise ordered.
|
|
142
|
+
* Both endpoints are inclusive — the cell at `bottomRight` is selected.
|
|
143
|
+
*/
|
|
144
|
+
export interface SelectionRect {
|
|
145
|
+
topLeft: {
|
|
146
|
+
row: number;
|
|
147
|
+
col: number;
|
|
148
|
+
};
|
|
149
|
+
bottomRight: {
|
|
150
|
+
row: number;
|
|
151
|
+
col: number;
|
|
152
|
+
};
|
|
153
|
+
/** True while the user is still dragging; false after left-release but
|
|
154
|
+
* before either clearSelection or commitSelection runs. */
|
|
155
|
+
inProgress: boolean;
|
|
156
|
+
}
|
|
157
|
+
/** Canonicalize two viewport cells into a SelectionRect. Pure. */
|
|
158
|
+
export declare function normalizeSelection(a: {
|
|
159
|
+
row: number;
|
|
160
|
+
col: number;
|
|
161
|
+
}, b: {
|
|
162
|
+
row: number;
|
|
163
|
+
col: number;
|
|
164
|
+
}, inProgress: boolean): SelectionRect;
|
|
165
|
+
/** True when the column lies outside the rendered card band. Inside the band
|
|
166
|
+
* the layout reserves `SCROLLBAR_HIT_WIDTH` columns for the rail AFTER the
|
|
167
|
+
* band, so `0..termWidth-1` is always in-band and nothing inside needs to be
|
|
168
|
+
* excluded. The mouse handler must already have excluded the rail before
|
|
169
|
+
* calling into the controller — we only check the band bounds here. */
|
|
170
|
+
export declare function isOutOfBand(col: number, termWidth: number): boolean;
|
|
171
|
+
/**
|
|
172
|
+
* One entry's contribution to a drag-selected range. Returned in document
|
|
173
|
+
* (row-index-in-card) coordinates so the caller decides how to slice into
|
|
174
|
+
* the entry's source text. `start` is the column inside the card (0-based
|
|
175
|
+
* from the left edge of the card's visible rectangle, NOT the terminal
|
|
176
|
+
* column — the gutter is excluded by the caller before reaching here).
|
|
177
|
+
* `end` is inclusive. When `startRow === endRow`, the slice is one row; the
|
|
178
|
+
* caller is responsible for translating text columns into source offsets.
|
|
179
|
+
*/
|
|
180
|
+
export interface SelectionSlice {
|
|
181
|
+
entryId: number;
|
|
182
|
+
/** Inclusive row-in-card for the start of the slice. */
|
|
183
|
+
startRow: number;
|
|
184
|
+
/** Inclusive column, 0-based, inside the card's text area (gutter excluded). */
|
|
185
|
+
startCol: number;
|
|
186
|
+
/** Inclusive end row. */
|
|
187
|
+
endRow: number;
|
|
188
|
+
/** Inclusive end column, 0-based. */
|
|
189
|
+
endCol: number;
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Translate a viewport-cell selection into per-entry row/col slices, walking
|
|
193
|
+
* the same mounted-group geometry the copy-hit registry uses so the two
|
|
194
|
+
* systems share one row index. Entries wholly outside the selection return
|
|
195
|
+
* nothing. Entries whose vertical span is wholly inside the selection are
|
|
196
|
+
* returned as a single row-range; entries the selection clips at the top or
|
|
197
|
+
* bottom are returned with row bounds matching the clip.
|
|
198
|
+
*
|
|
199
|
+
* `cardVisibleCols` is the number of columns inside the card the user can
|
|
200
|
+
* see — the band width minus the right gutter (`viewportWidth - SCROLLBAR_HIT_WIDTH`).
|
|
201
|
+
* Slices never include the gutter or any column to its right; the caller has
|
|
202
|
+
* already validated that.
|
|
203
|
+
*
|
|
204
|
+
* Returned slices are in document (entry-local) coordinates: `startRow`/`endRow`
|
|
205
|
+
* are rows inside the entry's own geometry, NOT viewport cells. This is what
|
|
206
|
+
* the assembler needs to recover text — slicing into the raw entry text uses
|
|
207
|
+
* per-row layout, which the caller resolves via the layout store.
|
|
208
|
+
*/
|
|
209
|
+
export declare function selectionToSlices(opts: {
|
|
210
|
+
selection: SelectionRect;
|
|
211
|
+
cards: ReadonlyArray<{
|
|
212
|
+
entryId: number;
|
|
213
|
+
/** 0-based viewport row of the card's first visible row. */
|
|
214
|
+
viewportStartRow: number;
|
|
215
|
+
/** 0-based viewport row just past the card's last visible row. */
|
|
216
|
+
viewportEndRow: number;
|
|
217
|
+
}>;
|
|
218
|
+
cardVisibleCols: number;
|
|
219
|
+
}): SelectionSlice[];
|
|
93
220
|
export interface ScrollableHistoryProps extends HistoryProps {
|
|
94
221
|
/** Height of the viewport in rows, computed by App from the bottom region. */
|
|
95
222
|
viewportRows: number;
|
|
@@ -135,6 +262,78 @@ export declare function scrollbarThumb(rows: number, offset: number, total: numb
|
|
|
135
262
|
* that lands the visible window there. Cell 0 (top) → oldest content (max
|
|
136
263
|
* offset); cell rows-1 (bottom) → newest (offset 0). Exported for testing. */
|
|
137
264
|
export declare function scrollOffsetForTrackRow(rows: number, total: number, cell: number): number;
|
|
265
|
+
/**
|
|
266
|
+
* Per-card viewport span for the currently-mounted groups. Mirrors
|
|
267
|
+
* {@link buildCopyRegistry}'s visibleClip math so the drag-select gesture asks
|
|
268
|
+
* the same geometry question the copy-hit registry already answers.
|
|
269
|
+
*/
|
|
270
|
+
export interface MountedCardSpan {
|
|
271
|
+
entryId: number;
|
|
272
|
+
/** 0-based viewport row of the first VISIBLE row of the card. */
|
|
273
|
+
viewportStartRow: number;
|
|
274
|
+
/** 0-based viewport row one past the last VISIBLE row of the card. */
|
|
275
|
+
viewportEndRow: number;
|
|
276
|
+
/** Card's geometry in rows; visibleClip + scrolled-clip aware. */
|
|
277
|
+
totalRows: number;
|
|
278
|
+
entryIds?: readonly number[];
|
|
279
|
+
}
|
|
280
|
+
/**
|
|
281
|
+
* Build per-card viewport spans for every mounted render group. Pure — given
|
|
282
|
+
* the same render-group list, height cache, scroll state, and viewport size,
|
|
283
|
+
* the result is deterministic and matches the copy-hit registry. Exported so
|
|
284
|
+
* tests can verify the span map without mounting the full component.
|
|
285
|
+
*/
|
|
286
|
+
export declare function buildMountedCardSpans(opts: {
|
|
287
|
+
renderGroups: readonly RenderGroup[];
|
|
288
|
+
heightCache: EntryHeightCache;
|
|
289
|
+
scrolled: boolean;
|
|
290
|
+
clip: number;
|
|
291
|
+
tailRows: number;
|
|
292
|
+
viewportRows: number;
|
|
293
|
+
showModelReasoning?: boolean | undefined;
|
|
294
|
+
}): MountedCardSpan[];
|
|
295
|
+
/**
|
|
296
|
+
* Find the card whose viewport row range contains `row`. Pure.
|
|
297
|
+
* Returns null when the row is in a blank gap or outside the viewport.
|
|
298
|
+
*/
|
|
299
|
+
export declare function selectionHitAt(row: number, spans: readonly MountedCardSpan[]): {
|
|
300
|
+
entryId: number;
|
|
301
|
+
entryIds?: readonly number[];
|
|
302
|
+
} | null;
|
|
303
|
+
/**
|
|
304
|
+
* Build the clipboard payload for a selection by slicing into each affected
|
|
305
|
+
* entry's full renderable text. The v1 contract is line-then-column on the
|
|
306
|
+
* entry's source text: each slice exposes `startRow`/`endRow` and
|
|
307
|
+
* `startCol`/`endCol` in card-local coordinates; we split the entry's
|
|
308
|
+
* text on `\n`, keep only the rows inside the row range, and within those
|
|
309
|
+
* rows apply the column range. The matrix matches what the source line
|
|
310
|
+
* index would be when no wrapping occurs — i.e. one card row maps to one
|
|
311
|
+
* source line. Wrap-geometry translation is intentionally absent in v1
|
|
312
|
+
* because the layout store does not yet expose per-card-row wrap segments;
|
|
313
|
+
* it returns when those segments exist and a v1.1 test demands it.
|
|
314
|
+
*
|
|
315
|
+
* `toolGroupsByHeadId` lets a multi-member tool-group expand: when the
|
|
316
|
+
* head id appears with `entryIds.length > 1`, the assembler copies via
|
|
317
|
+
* `copyableTextForEntries` (raw ordered JSON of every member, matching
|
|
318
|
+
* the existing copy-icon contract). A single-entry head falls through
|
|
319
|
+
* to `copyableTextForEntry`.
|
|
320
|
+
*
|
|
321
|
+
* Multi-entry selections are joined with `\n---\n` so the user can see
|
|
322
|
+
* where one card ends and the next begins. Empty selections and
|
|
323
|
+
* selections that resolve to no text return `""` so the caller can fall
|
|
324
|
+
* through silently.
|
|
325
|
+
*/
|
|
326
|
+
export declare function assembleSelectionText(opts: {
|
|
327
|
+
slices: readonly SelectionSlice[];
|
|
328
|
+
entriesById: ReadonlyMap<number, HistoryEntry>;
|
|
329
|
+
/**
|
|
330
|
+
* For each tool-group head id present in `slices`, the ordered member list.
|
|
331
|
+
* When a head has a multi-member group, the assembler slices into the
|
|
332
|
+
* group's combined text via `copyableTextForEntries`. A single-entry
|
|
333
|
+
* head falls through to `copyableTextForEntry`.
|
|
334
|
+
*/
|
|
335
|
+
toolGroupsByHeadId?: ReadonlyMap<number, readonly number[]> | undefined;
|
|
336
|
+
}): string;
|
|
138
337
|
/**
|
|
139
338
|
* Bounded history viewport with stable-anchor virtual scrolling.
|
|
140
339
|
*
|
|
@@ -162,6 +361,6 @@ export declare function scrollOffsetForTrackRow(rows: number, total: number, cel
|
|
|
162
361
|
* Wrapped in `React.memo` so keystrokes in the input buffer don't trigger a
|
|
163
362
|
* full managed-viewport re-layout.
|
|
164
363
|
*/
|
|
165
|
-
export declare const ScrollableHistory: React.MemoExoticComponent<({ entries, toolStream, viewportRows, controllerRef, onScrollInfo, maxWidth, setSuggestions, autonomyMode, multiDiffSummaryThreshold, todos, showModelReasoning, layoutStore, copiedEntryId, onRequestOlderEntries, }: ScrollableHistoryProps) => React.ReactElement>;
|
|
364
|
+
export declare const ScrollableHistory: React.MemoExoticComponent<({ entries, toolStream, viewportRows, controllerRef, onScrollInfo, maxWidth, setSuggestions, autonomyMode, multiDiffSummaryThreshold, todos, showModelReasoning, showSageMemoryInject, layoutStore, copiedEntryId, onRequestOlderEntries, }: ScrollableHistoryProps) => React.ReactElement>;
|
|
166
365
|
export type { HistoryEntry };
|
|
167
366
|
//# sourceMappingURL=scrollable-history.d.ts.map
|
|
@@ -15,6 +15,16 @@ export type ContextMode = (typeof CONTEXT_MODES)[number];
|
|
|
15
15
|
export declare const CONTEXT_MODE_DESCS: Record<ContextMode, string>;
|
|
16
16
|
export declare const STATUSLINE_MODES: readonly ['minimum', 'detailed', 'no-color'];
|
|
17
17
|
export type StatuslineMode = (typeof STATUSLINE_MODES)[number];
|
|
18
|
+
/**
|
|
19
|
+
* Factory default statusline density. `minimum` is the default so a fresh
|
|
20
|
+
* session shows a single clean rail (state · provider/model · context meter ·
|
|
21
|
+
* version) with conditional chips only when relevant; `detailed` and
|
|
22
|
+
* `no-color` are opt-in via /settings. Every app-level default site references
|
|
23
|
+
* this constant so the default has a single source of truth. (The StatusBar
|
|
24
|
+
* component's own prop default stays 'detailed' for back-compat with callers
|
|
25
|
+
* that omit `mode` — the user-facing default is applied at the settings layer.)
|
|
26
|
+
*/
|
|
27
|
+
export declare const DEFAULT_STATUSLINE_MODE: StatuslineMode;
|
|
18
28
|
export declare const REASONING_MODES: readonly ['auto', 'on', 'off'];
|
|
19
29
|
export type ReasoningMode = (typeof REASONING_MODES)[number];
|
|
20
30
|
export declare const REASONING_EFFORTS: readonly ['none', 'minimal', 'low', 'medium', 'high', 'xhigh', 'max'];
|
|
@@ -72,7 +82,7 @@ export type AnimationStyleChoice = (typeof ANIMATION_STYLE_CHOICES)[number];
|
|
|
72
82
|
export declare function formatAnimationStyle(style: AnimationStyleChoice): string;
|
|
73
83
|
export declare const MODE_DESC: Record<SettingsMode, string>;
|
|
74
84
|
/** Total number of settings rows (used for wrap-around navigation). */
|
|
75
|
-
export declare const SETTINGS_FIELD_COUNT =
|
|
85
|
+
export declare const SETTINGS_FIELD_COUNT = 45;
|
|
76
86
|
/**
|
|
77
87
|
* Field index of the "Thinking word" row. The reducer's per-field switch and
|
|
78
88
|
* the app.tsx key handler both branch on this, so it lives next to the row
|
|
@@ -172,6 +182,8 @@ export type SettingsPickerPatch = Partial<{
|
|
|
172
182
|
showModelReasoning: boolean;
|
|
173
183
|
showAgentSwarmPanel: boolean;
|
|
174
184
|
readSymbols: boolean;
|
|
185
|
+
showSageMemoryInject: boolean;
|
|
186
|
+
sageMemoryInjectThreshold: number;
|
|
175
187
|
}>;
|
|
176
188
|
/**
|
|
177
189
|
* Human-readable labels for all settings fields (0–SETTINGS_FIELD_COUNT-1),
|
|
@@ -245,6 +257,10 @@ export declare function getSettingsFieldValue(values: SettingsPickerValues, fiel
|
|
|
245
257
|
* ```
|
|
246
258
|
*/
|
|
247
259
|
export declare function formatAllSettingsSummary(values: SettingsPickerValues): string;
|
|
260
|
+
/** Presets for the SAGE memory injection threshold. Values 0.72–0.95. */
|
|
261
|
+
export declare const SAGE_THRESHOLD_PRESETS: number[];
|
|
262
|
+
/** Format the threshold value. All valid values are in {@link SAGE_THRESHOLD_PRESETS}. */
|
|
263
|
+
export declare function formatSageThreshold(t: number): string;
|
|
248
264
|
/**
|
|
249
265
|
* Default values for all configurable settings fields, in the same
|
|
250
266
|
* shape as {@link SettingsPickerValues}. Extracted from the reducer's
|
|
@@ -69,6 +69,10 @@ export interface SettingsPickerProps {
|
|
|
69
69
|
* remain independently available through their panel shortcuts. Default: true.
|
|
70
70
|
*/
|
|
71
71
|
showAgentSwarmPanel: boolean;
|
|
72
|
+
/** Show SAGE Memory Inject blocks in tool results. Default: false. */
|
|
73
|
+
showSageMemoryInject: boolean;
|
|
74
|
+
/** Minimum relation strength for SAGE memory injection. Default: 0.85. */
|
|
75
|
+
sageMemoryInjectThreshold: number;
|
|
72
76
|
/** When true, read tool includes codebase-index symbols alongside file content. */
|
|
73
77
|
readSymbols: boolean;
|
|
74
78
|
/** Raw SSE stream debugging toggle — hex-dump every byte received from providers. */
|
|
@@ -93,5 +97,5 @@ export interface SettingsPickerProps {
|
|
|
93
97
|
filter?: string | undefined;
|
|
94
98
|
hint?: string | undefined;
|
|
95
99
|
}
|
|
96
|
-
export declare function SettingsPicker({ field, filter, mode, delayMs, titleAnimation, yolo, fleetChat, chime, confirmExit, nextPrediction, featureMcp, featurePlugins, featureMemory, featureSkills, featureModelsRegistry, tokenSavingTier, allowOutsideProjectRoot, maxIterations, autoProceedMaxIterations, enhanceDelayMs, enhanceEnabled, enhanceLanguage, preRefineSeconds, indexOnStart, multiDiffSummaryThreshold, thinkingWord, thinkingWordEditing, thinkingWordDraft, reasoningMode, reasoningEffort, reasoningPreserve, cacheTtl, contextAutoCompact, contextStrategy, contextMode, maxConcurrent, logLevel, auditLevel, debugStream, statuslineMode, configScope, profileConfigPath, animationStyle, breakerEnabled, breakerAutoKillResetMs, showModelReasoning, showAgentSwarmPanel, readSymbols, hint, }: SettingsPickerProps): React.ReactElement;
|
|
100
|
+
export declare function SettingsPicker({ field, filter, mode, delayMs, titleAnimation, yolo, fleetChat, chime, confirmExit, nextPrediction, featureMcp, featurePlugins, featureMemory, featureSkills, featureModelsRegistry, tokenSavingTier, allowOutsideProjectRoot, maxIterations, autoProceedMaxIterations, enhanceDelayMs, enhanceEnabled, enhanceLanguage, preRefineSeconds, indexOnStart, multiDiffSummaryThreshold, thinkingWord, thinkingWordEditing, thinkingWordDraft, reasoningMode, reasoningEffort, reasoningPreserve, cacheTtl, contextAutoCompact, contextStrategy, contextMode, maxConcurrent, logLevel, auditLevel, debugStream, statuslineMode, configScope, profileConfigPath, animationStyle, breakerEnabled, breakerAutoKillResetMs, showModelReasoning, showAgentSwarmPanel, showSageMemoryInject, sageMemoryInjectThreshold, readSymbols, hint, }: SettingsPickerProps): React.ReactElement;
|
|
97
101
|
//# sourceMappingURL=settings-picker.d.ts.map
|
|
@@ -103,12 +103,28 @@ export interface StatusBarProps {
|
|
|
103
103
|
*/
|
|
104
104
|
provider?: string | undefined;
|
|
105
105
|
/**
|
|
106
|
-
* App version string (e.g. "0.7.0").
|
|
107
|
-
* chip
|
|
108
|
-
*
|
|
109
|
-
*
|
|
106
|
+
* App version string (e.g. "0.7.0"). Rendered as a right-anchored version
|
|
107
|
+
* chip on the status bar (line 1, and the minimum-mode rail) so it stays
|
|
108
|
+
* visible after the startup banner scrolls off — in addition to the
|
|
109
|
+
* composer top rail (`WRONGSTACK v{version}`). When omitted, the chip is
|
|
110
|
+
* hidden — keeps tests / legacy callers quiet.
|
|
110
111
|
*/
|
|
111
112
|
version?: string | undefined;
|
|
113
|
+
/**
|
|
114
|
+
* Latest version published to the npm registry, when known. When paired
|
|
115
|
+
* with {@link updateAvailable} (and not equal to {@link version}), the
|
|
116
|
+
* version chip on the right edge of the status bar gains an orange
|
|
117
|
+
* "(update v…)" suffix so the operator notices the upgrade without
|
|
118
|
+
* scrolling back through history to find the startup banner. Sourced from
|
|
119
|
+
* the CLI's preflight update-check.
|
|
120
|
+
*/
|
|
121
|
+
latestVersion?: string | undefined;
|
|
122
|
+
/**
|
|
123
|
+
* True when the preflight update-check found a newer published version
|
|
124
|
+
* than {@link version}. Both must be present (and non-equal) to render the
|
|
125
|
+
* orange update notice on the status bar.
|
|
126
|
+
*/
|
|
127
|
+
updateAvailable?: boolean | undefined;
|
|
112
128
|
state: 'idle' | 'running' | 'streaming' | 'aborting';
|
|
113
129
|
/** Single word rendered in the rainbow working-state chip. */
|
|
114
130
|
thinkingWord?: string | undefined;
|
|
@@ -204,6 +220,12 @@ export interface StatusBarProps {
|
|
|
204
220
|
workingDir?: string | undefined;
|
|
205
221
|
/** Autonomy mode chip: 'off' | 'suggest' | 'auto' | 'eternal' | 'eternal-parallel'. */
|
|
206
222
|
autonomy?: 'off' | 'suggest' | 'auto' | 'eternal' | 'eternal-parallel' | undefined;
|
|
223
|
+
/**
|
|
224
|
+
* Number of tools dropped from the provider request due to the maxTools
|
|
225
|
+
* limit. When > 0, renders a warning chip on line 2 (e.g. "⊘ 5 tools")
|
|
226
|
+
* so the user knows some tools are unavailable to the model this session.
|
|
227
|
+
*/
|
|
228
|
+
droppedTools?: number | undefined;
|
|
207
229
|
/** Number of tracked bash/exec processes from the process registry. Currently unused on the rail. */
|
|
208
230
|
processCount?: number | undefined;
|
|
209
231
|
/** Current RSS/heap sample for this CLI process. */
|
|
@@ -212,7 +234,11 @@ export interface StatusBarProps {
|
|
|
212
234
|
cpuPercent?: number | undefined;
|
|
213
235
|
/** Items to hide from the status bar. Canonical set: {@link StatuslineItem}. */
|
|
214
236
|
hiddenItems?: StatuslineItem[] | undefined;
|
|
215
|
-
/**
|
|
237
|
+
/**
|
|
238
|
+
* Statusline density. The prop default 'detailed' is kept for back-compat
|
|
239
|
+
* with tests/callers that omit `mode`; the user-facing default is 'minimum'
|
|
240
|
+
* (DEFAULT_STATUSLINE_MODE), applied at the settings layer.
|
|
241
|
+
*/
|
|
216
242
|
mode?: StatuslineMode | undefined;
|
|
217
243
|
/** EventBus for subscribing to token.accounted events for real-time cost/token updates. */
|
|
218
244
|
events?: EventBus | undefined;
|
|
@@ -11,5 +11,5 @@ export declare const COMPACT_THRESHOLD = 50;
|
|
|
11
11
|
* to show — git branch, elapsed time, todo counts, YOLO marker — so a
|
|
12
12
|
* vanilla session keeps the original single-line footprint.
|
|
13
13
|
*/
|
|
14
|
-
export declare function StatusBar({ model, provider, state, thinkingWord, thinkingAnimationStyle, tokenCounter, hint, queueCount, yolo, autonomy, fleetWorkingTime, todos, plan, tasks, fleet, fleetAgents, git, subagentCount, brain, projectName, workingDir, processCount, processMemory, cpuPercent, context, estimatedContextTokens, Sage, memoryContextMonitor, contextStrategy, hiddenItems, mode, events, sessionId, eternalStage, goalSummary, indexState, breakerCountdown, modeLabel, debugStreamStats, enhanceCountdown, nextStepsAutoSubmitCountdown, nextStepsAutoSubmitLabel, autoProceedCountdown, sessionCount, mailbox, tokenSavingMode, toolCount, visibleChips, sideEffectCount, }: StatusBarProps): React.ReactElement;
|
|
14
|
+
export declare function StatusBar({ model, provider, version, latestVersion, updateAvailable, state, thinkingWord, thinkingAnimationStyle, tokenCounter, hint, queueCount, yolo, autonomy, fleetWorkingTime, todos, plan, tasks, fleet, fleetAgents, git, subagentCount, brain, projectName, workingDir, processCount, processMemory, cpuPercent, context, estimatedContextTokens, Sage, memoryContextMonitor, contextStrategy, hiddenItems, mode, events, sessionId, eternalStage, goalSummary, droppedTools, indexState, breakerCountdown, modeLabel, debugStreamStats, enhanceCountdown, nextStepsAutoSubmitCountdown, nextStepsAutoSubmitLabel, autoProceedCountdown, sessionCount, mailbox, tokenSavingMode, toolCount, visibleChips, sideEffectCount, }: StatusBarProps): React.ReactElement;
|
|
15
15
|
//# sourceMappingURL=status-bar.d.ts.map
|
package/dist/heap-watchdog.d.ts
CHANGED
|
@@ -1,45 +1,9 @@
|
|
|
1
|
-
export interface HeapSample {
|
|
2
|
-
ts: string;
|
|
3
|
-
/** Resident set size, bytes. */
|
|
4
|
-
rss: number;
|
|
5
|
-
heapUsed: number;
|
|
6
|
-
heapTotal: number;
|
|
7
|
-
/** Off-heap (buffers, etc.), bytes. */
|
|
8
|
-
external: number;
|
|
9
|
-
/** V8 hard heap limit, bytes — the OOM ceiling. */
|
|
10
|
-
heapLimit: number;
|
|
11
|
-
/** heapUsed / heapLimit, 0–1. */
|
|
12
|
-
load: number;
|
|
13
|
-
}
|
|
14
|
-
export interface HeapWatchdogOptions {
|
|
15
|
-
/** Sampling cadence. Default 60s. */
|
|
16
|
-
sampleEveryMs?: number | undefined;
|
|
17
|
-
/** Diagnostic-file append cadence. Default 5min. */
|
|
18
|
-
logEveryMs?: number | undefined;
|
|
19
|
-
/** Diagnostics file. Default ~/.wrongstack/logs/heap.jsonl */
|
|
20
|
-
logPath?: string | undefined;
|
|
21
|
-
/** Fraction of the heap limit that triggers a 'warn' callback. Default 0.6. */
|
|
22
|
-
warnAt?: number | undefined;
|
|
23
|
-
/** Fraction of the heap limit that triggers a 'critical' callback. Default 0.85. */
|
|
24
|
-
criticalAt?: number | undefined;
|
|
25
|
-
/**
|
|
26
|
-
* Extra structure sizes merged into every diagnostic line — supply cheap
|
|
27
|
-
* counters (array lengths, approximate char totals). Must not throw.
|
|
28
|
-
*/
|
|
29
|
-
collectStats?: (() => Record<string, number>) | undefined;
|
|
30
|
-
/** Override the JSONL writer, primarily for deterministic diagnostics tests. */
|
|
31
|
-
writeDiagnosticLine?: ((logPath: string, line: string) => Promise<void>) | undefined;
|
|
32
|
-
/** Called on threshold crossings with a human-readable message. */
|
|
33
|
-
onWarn?: ((level: 'warn' | 'critical', message: string, sample: HeapSample) => void) | undefined;
|
|
34
|
-
}
|
|
35
|
-
export declare function defaultHeapLogPath(): string;
|
|
36
|
-
export declare function takeHeapSample(): HeapSample;
|
|
37
1
|
/**
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
* the
|
|
2
|
+
* Backwards-compatible TUI import surface for heap diagnostics.
|
|
3
|
+
*
|
|
4
|
+
* The implementation lives in core so CLI, TUI and WebUI use identical
|
|
5
|
+
* sampling semantics. Production TUI wiring joins the process-wide shared
|
|
6
|
+
* watchdog; the independent starter remains re-exported for embedders/tests.
|
|
43
7
|
*/
|
|
44
|
-
export
|
|
8
|
+
export { defaultHeapLogPath, type HeapDiagnosticFields, type HeapDiagnosticValue, type HeapSample, type HeapWatchdogOptions, startHeapWatchdog, startSharedHeapWatchdog, takeHeapSample, } from '@wrongstack/core/utils';
|
|
45
9
|
//# sourceMappingURL=heap-watchdog.d.ts.map
|
package/dist/history-entry.d.ts
CHANGED
|
@@ -51,6 +51,15 @@ export type HistoryEntry = {
|
|
|
51
51
|
id: number;
|
|
52
52
|
kind: 'assistant';
|
|
53
53
|
text: string;
|
|
54
|
+
/**
|
|
55
|
+
* Whether this is the final assistant message of its turn — i.e. the
|
|
56
|
+
* provider response stopped without asking for another tool. Only final
|
|
57
|
+
* messages may surface a `<nextsteps>` panel or write the suggestion
|
|
58
|
+
* store; mid-turn prose keeps its block stripped but silent. Every
|
|
59
|
+
* construction site sets this explicitly, so an entry that arrives
|
|
60
|
+
* without it renders no suggestions rather than leaking mid-turn ones.
|
|
61
|
+
*/
|
|
62
|
+
final?: boolean | undefined;
|
|
54
63
|
} | {
|
|
55
64
|
id: number;
|
|
56
65
|
kind: 'thinking';
|
|
@@ -49,6 +49,7 @@ export declare function useStatusbarViewModel({ agent, tokenCounter, activeMaxCo
|
|
|
49
49
|
entriesWithLeader: Record<string, FleetEntry>;
|
|
50
50
|
planCounts: PlanCounts | null;
|
|
51
51
|
taskCounts: TaskCounts | null;
|
|
52
|
+
droppedTools: number;
|
|
52
53
|
};
|
|
53
54
|
export {};
|
|
54
55
|
//# sourceMappingURL=use-statusbar-view-model.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Dispatch, type MutableRefObject, type SetStateAction } from 'react';
|
|
2
|
-
import type { AppProps } from '../app-props.js';
|
|
3
2
|
import type { Action } from '../app-action-type.js';
|
|
3
|
+
import type { AppProps } from '../app-props.js';
|
|
4
4
|
import type { State } from '../app-state.js';
|
|
5
5
|
import { type StatuslineItem } from '../components/statusline-picker.js';
|
|
6
6
|
interface TuiSlashCommandOptions {
|