@pentoshi/clai 3.18.3 → 4.0.2
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/README.md +44 -24
- package/bin/postinstall-policy.mjs +3 -0
- package/bin/postinstall.mjs +6 -3
- package/dist/agent/confirm-port.d.ts +5 -17
- package/dist/agent/confirm-port.js +8 -65
- package/dist/agent/confirm-port.js.map +1 -1
- package/dist/agent/evidence-governor.d.ts +1 -1
- package/dist/agent/evidence-governor.js +2 -2
- package/dist/agent/evidence-governor.js.map +1 -1
- package/dist/agent/finalize-gate.d.ts +0 -1
- package/dist/agent/finalize-gate.js +6 -24
- package/dist/agent/finalize-gate.js.map +1 -1
- package/dist/agent/loop-guard.d.ts +1 -0
- package/dist/agent/loop-guard.js +34 -1
- package/dist/agent/loop-guard.js.map +1 -1
- package/dist/agent/must-continue.d.ts +1 -4
- package/dist/agent/must-continue.js +0 -22
- package/dist/agent/must-continue.js.map +1 -1
- package/dist/agent/outcomes.js +2 -13
- package/dist/agent/outcomes.js.map +1 -1
- package/dist/agent/plan-decision.d.ts +0 -29
- package/dist/agent/plan-decision.js +0 -96
- package/dist/agent/plan-decision.js.map +1 -1
- package/dist/agent/plan-tool.js +19 -14
- package/dist/agent/plan-tool.js.map +1 -1
- package/dist/agent/progress-pause-policy.d.ts +0 -15
- package/dist/agent/progress-pause-policy.js +0 -15
- package/dist/agent/progress-pause-policy.js.map +1 -1
- package/dist/agent/runner.js +152 -393
- package/dist/agent/runner.js.map +1 -1
- package/dist/agent/task-evidence.d.ts +6 -0
- package/dist/agent/task-evidence.js +48 -3
- package/dist/agent/task-evidence.js.map +1 -1
- package/dist/agent/tool-history.js +11 -4
- package/dist/agent/tool-history.js.map +1 -1
- package/dist/app/commands/catalog.js +397 -0
- package/dist/app/commands/catalog.js.map +1 -0
- package/dist/app/commands/registry.js +1 -1
- package/dist/app/commands/registry.js.map +1 -1
- package/dist/app/confirm-prompt-text.d.ts +17 -0
- package/dist/app/confirm-prompt-text.js +34 -0
- package/dist/app/confirm-prompt-text.js.map +1 -0
- package/dist/app/controllers/session-controller.d.ts +1 -1
- package/dist/app/controllers/session-controller.js +3 -1
- package/dist/app/controllers/session-controller.js.map +1 -1
- package/dist/app/controllers/session-prompt-queue.d.ts +5 -1
- package/dist/app/controllers/session-prompt-queue.js +47 -30
- package/dist/app/controllers/session-prompt-queue.js.map +1 -1
- package/dist/app/controllers/turn-controller.js +41 -3
- package/dist/app/controllers/turn-controller.js.map +1 -1
- package/dist/app/ports/confirm-port.d.ts +0 -1
- package/dist/app/ports/persistence-port.d.ts +1 -1
- package/dist/app/ports/transcript-item.d.ts +63 -0
- package/dist/app/ports/transcript-item.js +2 -0
- package/dist/app/ports/transcript-item.js.map +1 -0
- package/dist/classic/app/ClassicApp.d.ts +12 -0
- package/dist/classic/app/ClassicApp.js +119 -0
- package/dist/classic/app/ClassicApp.js.map +1 -0
- package/dist/classic/app/action-handlers.d.ts +45 -0
- package/dist/classic/app/action-handlers.js +280 -0
- package/dist/classic/app/action-handlers.js.map +1 -0
- package/dist/classic/app/app-wiring.d.ts +133 -0
- package/dist/classic/app/app-wiring.js +383 -0
- package/dist/classic/app/app-wiring.js.map +1 -0
- package/dist/classic/app/git-branch.d.ts +1 -0
- package/dist/classic/app/git-branch.js +50 -0
- package/dist/classic/app/git-branch.js.map +1 -0
- package/dist/classic/app/use-feed.d.ts +40 -0
- package/dist/classic/app/use-feed.js +52 -0
- package/dist/classic/app/use-feed.js.map +1 -0
- package/dist/classic/app/wiring-interactions.d.ts +40 -0
- package/dist/classic/app/wiring-interactions.js +433 -0
- package/dist/classic/app/wiring-interactions.js.map +1 -0
- package/dist/classic/app/wiring-lifecycle.d.ts +10 -0
- package/dist/classic/app/wiring-lifecycle.js +242 -0
- package/dist/classic/app/wiring-lifecycle.js.map +1 -0
- package/dist/classic/app/wiring-selection.d.ts +3 -0
- package/dist/classic/app/wiring-selection.js +113 -0
- package/dist/classic/app/wiring-selection.js.map +1 -0
- package/dist/classic/app/wiring-types.d.ts +157 -0
- package/dist/classic/app/wiring-types.js +2 -0
- package/dist/classic/app/wiring-types.js.map +1 -0
- package/dist/classic/blocks/AssistantBlock.d.ts +3 -0
- package/dist/classic/blocks/AssistantBlock.js +6 -0
- package/dist/classic/blocks/AssistantBlock.js.map +1 -0
- package/dist/classic/blocks/BatchBlock.d.ts +3 -0
- package/dist/classic/blocks/BatchBlock.js +6 -0
- package/dist/classic/blocks/BatchBlock.js.map +1 -0
- package/dist/classic/blocks/CompactedBlock.d.ts +3 -0
- package/dist/classic/blocks/CompactedBlock.js +6 -0
- package/dist/classic/blocks/CompactedBlock.js.map +1 -0
- package/dist/classic/blocks/DiffBlock.d.ts +3 -0
- package/dist/classic/blocks/DiffBlock.js +6 -0
- package/dist/classic/blocks/DiffBlock.js.map +1 -0
- package/dist/classic/blocks/IntroBlock.d.ts +3 -0
- package/dist/classic/blocks/IntroBlock.js +6 -0
- package/dist/classic/blocks/IntroBlock.js.map +1 -0
- package/dist/classic/blocks/NoticeBlock.d.ts +3 -0
- package/dist/classic/blocks/NoticeBlock.js +6 -0
- package/dist/classic/blocks/NoticeBlock.js.map +1 -0
- package/dist/classic/blocks/ThinkingBlock.d.ts +3 -0
- package/dist/classic/blocks/ThinkingBlock.js +6 -0
- package/dist/classic/blocks/ThinkingBlock.js.map +1 -0
- package/dist/classic/blocks/ToolBlock.d.ts +3 -0
- package/dist/classic/blocks/ToolBlock.js +6 -0
- package/dist/classic/blocks/ToolBlock.js.map +1 -0
- package/dist/classic/blocks/UserBlock.d.ts +3 -0
- package/dist/classic/blocks/UserBlock.js +6 -0
- package/dist/classic/blocks/UserBlock.js.map +1 -0
- package/dist/classic/blocks/assistant-lines.d.ts +10 -0
- package/dist/classic/blocks/assistant-lines.js +43 -0
- package/dist/classic/blocks/assistant-lines.js.map +1 -0
- package/dist/classic/blocks/batch-lines.d.ts +7 -0
- package/dist/classic/blocks/batch-lines.js +79 -0
- package/dist/classic/blocks/batch-lines.js.map +1 -0
- package/dist/classic/blocks/block-context.d.ts +33 -0
- package/dist/classic/blocks/block-context.js +41 -0
- package/dist/classic/blocks/block-context.js.map +1 -0
- package/dist/classic/blocks/compacted-lines.d.ts +5 -0
- package/dist/classic/blocks/compacted-lines.js +54 -0
- package/dist/classic/blocks/compacted-lines.js.map +1 -0
- package/dist/classic/blocks/diff-lines.d.ts +13 -0
- package/dist/classic/blocks/diff-lines.js +116 -0
- package/dist/classic/blocks/diff-lines.js.map +1 -0
- package/dist/classic/blocks/intro-lines.d.ts +16 -0
- package/dist/classic/blocks/intro-lines.js +23 -0
- package/dist/classic/blocks/intro-lines.js.map +1 -0
- package/dist/classic/blocks/notice-lines.d.ts +7 -0
- package/dist/classic/blocks/notice-lines.js +28 -0
- package/dist/classic/blocks/notice-lines.js.map +1 -0
- package/dist/classic/blocks/thinking-lines.d.ts +5 -0
- package/dist/classic/blocks/thinking-lines.js +34 -0
- package/dist/classic/blocks/thinking-lines.js.map +1 -0
- package/dist/classic/blocks/tool-lines.d.ts +22 -0
- package/dist/classic/blocks/tool-lines.js +135 -0
- package/dist/classic/blocks/tool-lines.js.map +1 -0
- package/dist/classic/blocks/user-lines.d.ts +5 -0
- package/dist/classic/blocks/user-lines.js +26 -0
- package/dist/classic/blocks/user-lines.js.map +1 -0
- package/dist/classic/bootstrap/osc52-renderer.d.ts +10 -0
- package/dist/classic/bootstrap/osc52-renderer.js +38 -0
- package/dist/classic/bootstrap/osc52-renderer.js.map +1 -0
- package/dist/classic/bootstrap/renderer-handle.d.ts +15 -0
- package/dist/classic/bootstrap/renderer-handle.js +22 -0
- package/dist/classic/bootstrap/renderer-handle.js.map +1 -0
- package/dist/classic/bootstrap/start-classic.d.ts +8 -0
- package/dist/classic/bootstrap/start-classic.js +130 -0
- package/dist/classic/bootstrap/start-classic.js.map +1 -0
- package/dist/classic/bootstrap/suspend-port.d.ts +14 -0
- package/dist/classic/bootstrap/suspend-port.js +29 -0
- package/dist/classic/bootstrap/suspend-port.js.map +1 -0
- package/dist/classic/bootstrap/terminal-session.d.ts +58 -0
- package/dist/classic/bootstrap/terminal-session.js +136 -0
- package/dist/classic/bootstrap/terminal-session.js.map +1 -0
- package/dist/classic/chrome/Chrome.d.ts +19 -0
- package/dist/classic/chrome/Chrome.js +30 -0
- package/dist/classic/chrome/Chrome.js.map +1 -0
- package/dist/classic/chrome/Composer.d.ts +12 -0
- package/dist/classic/chrome/Composer.js +61 -0
- package/dist/classic/chrome/Composer.js.map +1 -0
- package/dist/classic/chrome/QueuePanel.d.ts +3 -0
- package/dist/classic/chrome/QueuePanel.js +10 -0
- package/dist/classic/chrome/QueuePanel.js.map +1 -0
- package/dist/classic/chrome/ResponderStrip.d.ts +3 -0
- package/dist/classic/chrome/ResponderStrip.js +9 -0
- package/dist/classic/chrome/ResponderStrip.js.map +1 -0
- package/dist/classic/chrome/StatusBar.d.ts +3 -0
- package/dist/classic/chrome/StatusBar.js +7 -0
- package/dist/classic/chrome/StatusBar.js.map +1 -0
- package/dist/classic/chrome/ToastRow.d.ts +3 -0
- package/dist/classic/chrome/ToastRow.js +10 -0
- package/dist/classic/chrome/ToastRow.js.map +1 -0
- package/dist/classic/chrome/composer-controller.d.ts +57 -0
- package/dist/classic/chrome/composer-controller.js +345 -0
- package/dist/classic/chrome/composer-controller.js.map +1 -0
- package/dist/classic/chrome/composer-frame.d.ts +35 -0
- package/dist/classic/chrome/composer-frame.js +46 -0
- package/dist/classic/chrome/composer-frame.js.map +1 -0
- package/dist/classic/chrome/composer-keys.d.ts +4 -0
- package/dist/classic/chrome/composer-keys.js +45 -0
- package/dist/classic/chrome/composer-keys.js.map +1 -0
- package/dist/classic/chrome/context-limit-editor.d.ts +7 -0
- package/dist/classic/chrome/context-limit-editor.js +13 -0
- package/dist/classic/chrome/context-limit-editor.js.map +1 -0
- package/dist/classic/chrome/directory-row.d.ts +14 -0
- package/dist/classic/chrome/directory-row.js +26 -0
- package/dist/classic/chrome/directory-row.js.map +1 -0
- package/dist/classic/chrome/editor-model.d.ts +37 -0
- package/dist/classic/chrome/editor-model.js +195 -0
- package/dist/classic/chrome/editor-model.js.map +1 -0
- package/dist/classic/chrome/editor-view.d.ts +34 -0
- package/dist/classic/chrome/editor-view.js +141 -0
- package/dist/classic/chrome/editor-view.js.map +1 -0
- package/dist/classic/chrome/queue-rows.d.ts +10 -0
- package/dist/classic/chrome/queue-rows.js +32 -0
- package/dist/classic/chrome/queue-rows.js.map +1 -0
- package/dist/classic/chrome/responder-row.d.ts +9 -0
- package/dist/classic/chrome/responder-row.js +17 -0
- package/dist/classic/chrome/responder-row.js.map +1 -0
- package/dist/classic/chrome/row-budget.d.ts +43 -0
- package/dist/classic/chrome/row-budget.js +78 -0
- package/dist/classic/chrome/row-budget.js.map +1 -0
- package/dist/classic/chrome/status-rows.d.ts +44 -0
- package/dist/classic/chrome/status-rows.js +165 -0
- package/dist/classic/chrome/status-rows.js.map +1 -0
- package/dist/classic/chrome/toast-rows.d.ts +14 -0
- package/dist/classic/chrome/toast-rows.js +82 -0
- package/dist/classic/chrome/toast-rows.js.map +1 -0
- package/dist/classic/chrome/use-terminal-size.d.ts +14 -0
- package/dist/classic/chrome/use-terminal-size.js +38 -0
- package/dist/classic/chrome/use-terminal-size.js.map +1 -0
- package/dist/classic/feed/Feed.d.ts +17 -0
- package/dist/classic/feed/Feed.js +37 -0
- package/dist/classic/feed/Feed.js.map +1 -0
- package/dist/classic/feed/FeedStatic.d.ts +13 -0
- package/dist/classic/feed/FeedStatic.js +15 -0
- package/dist/classic/feed/FeedStatic.js.map +1 -0
- package/dist/classic/feed/LiveTail.d.ts +10 -0
- package/dist/classic/feed/LiveTail.js +20 -0
- package/dist/classic/feed/LiveTail.js.map +1 -0
- package/dist/classic/feed/ScrollbarGutter.d.ts +9 -0
- package/dist/classic/feed/ScrollbarGutter.js +42 -0
- package/dist/classic/feed/ScrollbarGutter.js.map +1 -0
- package/dist/classic/feed/block-height.d.ts +12 -0
- package/dist/classic/feed/block-height.js +34 -0
- package/dist/classic/feed/block-height.js.map +1 -0
- package/dist/classic/feed/commit-ledger.d.ts +26 -0
- package/dist/classic/feed/commit-ledger.js +52 -0
- package/dist/classic/feed/commit-ledger.js.map +1 -0
- package/dist/classic/feed/feed-blocks.d.ts +39 -0
- package/dist/classic/feed/feed-blocks.js +124 -0
- package/dist/classic/feed/feed-blocks.js.map +1 -0
- package/dist/classic/feed/live-tail-policy.d.ts +35 -0
- package/dist/classic/feed/live-tail-policy.js +80 -0
- package/dist/classic/feed/live-tail-policy.js.map +1 -0
- package/dist/classic/feed/scrollbar-rows.d.ts +6 -0
- package/dist/classic/feed/scrollbar-rows.js +18 -0
- package/dist/classic/feed/scrollbar-rows.js.map +1 -0
- package/dist/classic/feed/transcript-selection.d.ts +16 -0
- package/dist/classic/feed/transcript-selection.js +92 -0
- package/dist/classic/feed/transcript-selection.js.map +1 -0
- package/dist/classic/feed/transcript-window.d.ts +33 -0
- package/dist/classic/feed/transcript-window.js +53 -0
- package/dist/classic/feed/transcript-window.js.map +1 -0
- package/dist/classic/input/cancel-ladder.d.ts +47 -0
- package/dist/classic/input/cancel-ladder.js +100 -0
- package/dist/classic/input/cancel-ladder.js.map +1 -0
- package/dist/classic/input/chord-from-key.d.ts +2 -0
- package/dist/classic/input/chord-from-key.js +25 -0
- package/dist/classic/input/chord-from-key.js.map +1 -0
- package/dist/classic/input/input-router.d.ts +33 -0
- package/dist/classic/input/input-router.js +146 -0
- package/dist/classic/input/input-router.js.map +1 -0
- package/dist/classic/input/key-event.d.ts +39 -0
- package/dist/classic/input/key-event.js +12 -0
- package/dist/classic/input/key-event.js.map +1 -0
- package/dist/classic/input/paste-decoder.d.ts +1 -0
- package/dist/classic/input/paste-decoder.js +9 -0
- package/dist/classic/input/paste-decoder.js.map +1 -0
- package/dist/classic/input/raw-decoder.d.ts +31 -0
- package/dist/classic/input/raw-decoder.js +325 -0
- package/dist/classic/input/raw-decoder.js.map +1 -0
- package/dist/classic/input/sgr-mouse.d.ts +2 -0
- package/dist/classic/input/sgr-mouse.js +37 -0
- package/dist/classic/input/sgr-mouse.js.map +1 -0
- package/dist/classic/input/terminal-sequences.d.ts +38 -0
- package/dist/classic/input/terminal-sequences.js +111 -0
- package/dist/classic/input/terminal-sequences.js.map +1 -0
- package/dist/classic/panels/CompletionPanel.d.ts +3 -0
- package/dist/classic/panels/CompletionPanel.js +10 -0
- package/dist/classic/panels/CompletionPanel.js.map +1 -0
- package/dist/classic/panels/ConfirmPanel.d.ts +3 -0
- package/dist/classic/panels/ConfirmPanel.js +7 -0
- package/dist/classic/panels/ConfirmPanel.js.map +1 -0
- package/dist/classic/panels/JobsPanel.d.ts +3 -0
- package/dist/classic/panels/JobsPanel.js +7 -0
- package/dist/classic/panels/JobsPanel.js.map +1 -0
- package/dist/classic/panels/KeysPanel.d.ts +3 -0
- package/dist/classic/panels/KeysPanel.js +7 -0
- package/dist/classic/panels/KeysPanel.js.map +1 -0
- package/dist/classic/panels/PagerPanel.d.ts +3 -0
- package/dist/classic/panels/PagerPanel.js +7 -0
- package/dist/classic/panels/PagerPanel.js.map +1 -0
- package/dist/classic/panels/PanelFrame.d.ts +3 -0
- package/dist/classic/panels/PanelFrame.js +8 -0
- package/dist/classic/panels/PanelFrame.js.map +1 -0
- package/dist/classic/panels/PickerPanel.d.ts +3 -0
- package/dist/classic/panels/PickerPanel.js +7 -0
- package/dist/classic/panels/PickerPanel.js.map +1 -0
- package/dist/classic/panels/PlanPanel.d.ts +3 -0
- package/dist/classic/panels/PlanPanel.js +7 -0
- package/dist/classic/panels/PlanPanel.js.map +1 -0
- package/dist/classic/panels/PromptActionsPanel.d.ts +3 -0
- package/dist/classic/panels/PromptActionsPanel.js +7 -0
- package/dist/classic/panels/PromptActionsPanel.js.map +1 -0
- package/dist/classic/panels/ScopePanel.d.ts +3 -0
- package/dist/classic/panels/ScopePanel.js +7 -0
- package/dist/classic/panels/ScopePanel.js.map +1 -0
- package/dist/classic/panels/SearchPanel.d.ts +3 -0
- package/dist/classic/panels/SearchPanel.js +7 -0
- package/dist/classic/panels/SearchPanel.js.map +1 -0
- package/dist/classic/panels/SecretPanel.d.ts +3 -0
- package/dist/classic/panels/SecretPanel.js +7 -0
- package/dist/classic/panels/SecretPanel.js.map +1 -0
- package/dist/classic/panels/completion-accept.d.ts +17 -0
- package/dist/classic/panels/completion-accept.js +58 -0
- package/dist/classic/panels/completion-accept.js.map +1 -0
- package/dist/classic/panels/completion-rows.d.ts +29 -0
- package/dist/classic/panels/completion-rows.js +135 -0
- package/dist/classic/panels/completion-rows.js.map +1 -0
- package/dist/classic/panels/confirm-panel.d.ts +24 -0
- package/dist/classic/panels/confirm-panel.js +115 -0
- package/dist/classic/panels/confirm-panel.js.map +1 -0
- package/dist/classic/panels/jobs-panel.d.ts +32 -0
- package/dist/classic/panels/jobs-panel.js +116 -0
- package/dist/classic/panels/jobs-panel.js.map +1 -0
- package/dist/classic/panels/keys-panel.d.ts +40 -0
- package/dist/classic/panels/keys-panel.js +174 -0
- package/dist/classic/panels/keys-panel.js.map +1 -0
- package/dist/classic/panels/list-rows.d.ts +27 -0
- package/dist/classic/panels/list-rows.js +42 -0
- package/dist/classic/panels/list-rows.js.map +1 -0
- package/dist/classic/panels/list-window.d.ts +15 -0
- package/dist/classic/panels/list-window.js +25 -0
- package/dist/classic/panels/list-window.js.map +1 -0
- package/dist/classic/panels/pager-panel.d.ts +50 -0
- package/dist/classic/panels/pager-panel.js +238 -0
- package/dist/classic/panels/pager-panel.js.map +1 -0
- package/dist/classic/panels/panel-controller.d.ts +29 -0
- package/dist/classic/panels/panel-controller.js +320 -0
- package/dist/classic/panels/panel-controller.js.map +1 -0
- package/dist/classic/panels/panel-effect.d.ts +74 -0
- package/dist/classic/panels/panel-effect.js +7 -0
- package/dist/classic/panels/panel-effect.js.map +1 -0
- package/dist/classic/panels/panel-effects.d.ts +11 -0
- package/dist/classic/panels/panel-effects.js +105 -0
- package/dist/classic/panels/panel-effects.js.map +1 -0
- package/dist/classic/panels/panel-frame.d.ts +20 -0
- package/dist/classic/panels/panel-frame.js +47 -0
- package/dist/classic/panels/panel-frame.js.map +1 -0
- package/dist/classic/panels/panel-host.d.ts +16 -0
- package/dist/classic/panels/panel-host.js +49 -0
- package/dist/classic/panels/panel-host.js.map +1 -0
- package/dist/classic/panels/panel-initial-states.d.ts +18 -0
- package/dist/classic/panels/panel-initial-states.js +33 -0
- package/dist/classic/panels/panel-initial-states.js.map +1 -0
- package/dist/classic/panels/panel-types.d.ts +47 -0
- package/dist/classic/panels/panel-types.js +2 -0
- package/dist/classic/panels/panel-types.js.map +1 -0
- package/dist/classic/panels/panel-wheel.d.ts +20 -0
- package/dist/classic/panels/panel-wheel.js +82 -0
- package/dist/classic/panels/panel-wheel.js.map +1 -0
- package/dist/classic/panels/picker-panel.d.ts +35 -0
- package/dist/classic/panels/picker-panel.js +150 -0
- package/dist/classic/panels/picker-panel.js.map +1 -0
- package/dist/classic/panels/plan-panel.d.ts +27 -0
- package/dist/classic/panels/plan-panel.js +98 -0
- package/dist/classic/panels/plan-panel.js.map +1 -0
- package/dist/classic/panels/prompt-actions-panel.d.ts +25 -0
- package/dist/classic/panels/prompt-actions-panel.js +57 -0
- package/dist/classic/panels/prompt-actions-panel.js.map +1 -0
- package/dist/classic/panels/scope-panel.d.ts +27 -0
- package/dist/classic/panels/scope-panel.js +122 -0
- package/dist/classic/panels/scope-panel.js.map +1 -0
- package/dist/classic/panels/search-panel.d.ts +32 -0
- package/dist/classic/panels/search-panel.js +126 -0
- package/dist/classic/panels/search-panel.js.map +1 -0
- package/dist/classic/panels/secret-panel.d.ts +28 -0
- package/dist/classic/panels/secret-panel.js +70 -0
- package/dist/classic/panels/secret-panel.js.map +1 -0
- package/dist/classic/render/ansi-text.d.ts +36 -0
- package/dist/classic/render/ansi-text.js +234 -0
- package/dist/classic/render/ansi-text.js.map +1 -0
- package/dist/classic/render/glyphs.d.ts +49 -0
- package/dist/classic/render/glyphs.js +111 -0
- package/dist/classic/render/glyphs.js.map +1 -0
- package/dist/classic/render/ink-theme.d.ts +49 -0
- package/dist/classic/render/ink-theme.js +73 -0
- package/dist/classic/render/ink-theme.js.map +1 -0
- package/dist/classic/render/measure.d.ts +17 -0
- package/dist/classic/render/measure.js +33 -0
- package/dist/classic/render/measure.js.map +1 -0
- package/dist/classic/render/shell-width.d.ts +12 -0
- package/dist/classic/render/shell-width.js +23 -0
- package/dist/classic/render/shell-width.js.map +1 -0
- package/dist/classic/render/wrap.d.ts +19 -0
- package/dist/classic/render/wrap.js +102 -0
- package/dist/classic/render/wrap.js.map +1 -0
- package/dist/commands/doctor.js +9 -8
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/providers.js +43 -50
- package/dist/commands/providers.js.map +1 -1
- package/dist/commands/search-providers.js +3 -5
- package/dist/commands/search-providers.js.map +1 -1
- package/dist/index.js +76 -84
- package/dist/index.js.map +1 -1
- package/dist/llm/capabilities.js +5 -2
- package/dist/llm/capabilities.js.map +1 -1
- package/dist/llm/custom-providers.js +16 -3
- package/dist/llm/custom-providers.js.map +1 -1
- package/dist/llm/http.d.ts +5 -0
- package/dist/llm/http.js +38 -8
- package/dist/llm/http.js.map +1 -1
- package/dist/llm/meta.js +56 -24
- package/dist/llm/meta.js.map +1 -1
- package/dist/llm/modal.js +3 -2
- package/dist/llm/modal.js.map +1 -1
- package/dist/llm/router.js +36 -23
- package/dist/llm/router.js.map +1 -1
- package/dist/llm/system-messages.d.ts +1 -0
- package/dist/llm/system-messages.js +6 -0
- package/dist/llm/system-messages.js.map +1 -1
- package/dist/llm/token-usage.js +11 -1
- package/dist/llm/token-usage.js.map +1 -1
- package/dist/llm/tool-protocol.js +10 -3
- package/dist/llm/tool-protocol.js.map +1 -1
- package/dist/modes/agent.d.ts +3 -0
- package/dist/modes/agent.js +10 -3
- package/dist/modes/agent.js.map +1 -1
- package/dist/modes/ask.js +2 -2
- package/dist/modes/ask.js.map +1 -1
- package/dist/noninteractive/read-stdin.d.ts +1 -0
- package/dist/noninteractive/read-stdin.js +8 -0
- package/dist/noninteractive/read-stdin.js.map +1 -0
- package/dist/noninteractive/readline-prompts.d.ts +47 -0
- package/dist/noninteractive/readline-prompts.js +201 -0
- package/dist/noninteractive/readline-prompts.js.map +1 -0
- package/dist/noninteractive/start-noninteractive.d.ts +32 -0
- package/dist/noninteractive/start-noninteractive.js +100 -0
- package/dist/noninteractive/start-noninteractive.js.map +1 -0
- package/dist/noninteractive/stdio-confirm-port.d.ts +15 -0
- package/dist/noninteractive/stdio-confirm-port.js +45 -0
- package/dist/noninteractive/stdio-confirm-port.js.map +1 -0
- package/dist/noninteractive/stream-blocks.d.ts +117 -0
- package/dist/noninteractive/stream-blocks.js +445 -0
- package/dist/noninteractive/stream-blocks.js.map +1 -0
- package/dist/noninteractive/stream-renderer.d.ts +40 -0
- package/dist/noninteractive/stream-renderer.js +164 -0
- package/dist/noninteractive/stream-renderer.js.map +1 -0
- package/dist/noninteractive/stream-spinner.d.ts +28 -0
- package/dist/noninteractive/stream-spinner.js +45 -0
- package/dist/noninteractive/stream-spinner.js.map +1 -0
- package/dist/os/bun-runtime.js +207 -0
- package/dist/os/bun-runtime.js.map +1 -0
- package/dist/store/config.d.ts +3 -1
- package/dist/store/config.js +37 -5
- package/dist/store/config.js.map +1 -1
- package/dist/store/history.d.ts +1 -1
- package/dist/store/history.js +3 -0
- package/dist/store/history.js.map +1 -1
- package/dist/store/keys.d.ts +5 -2
- package/dist/store/keys.js +97 -14
- package/dist/store/keys.js.map +1 -1
- package/dist/tools/registry.js +27 -4
- package/dist/tools/registry.js.map +1 -1
- package/dist/tools/web/providers/duckduckgo.js +1 -1
- package/dist/tools/web/providers/duckduckgo.js.map +1 -1
- package/dist/tools/web/readable.js +1 -1
- package/dist/tools/web/readable.js.map +1 -1
- package/dist/tui-v2/app/App.js +20 -28
- package/dist/tui-v2/app/App.js.map +1 -1
- package/dist/tui-v2/bootstrap/pager-export.d.ts +9 -18
- package/dist/tui-v2/bootstrap/pager-export.js +15 -72
- package/dist/tui-v2/bootstrap/pager-export.js.map +1 -1
- package/dist/tui-v2/bootstrap/start-tui-v2.js +8 -8
- package/dist/tui-v2/bootstrap/start-tui-v2.js.map +1 -1
- package/dist/tui-v2/components/completion/completion-menu.d.ts +2 -2
- package/dist/tui-v2/components/composer/composer-input-box.d.ts +1 -1
- package/dist/tui-v2/components/composer/paste-chip.d.ts +2 -2
- package/dist/tui-v2/components/composer/paste-chip.js +1 -1
- package/dist/tui-v2/components/composer/paste-chip.js.map +1 -1
- package/dist/tui-v2/components/jobs/jobs-panel.d.ts +2 -2
- package/dist/tui-v2/components/jobs/jobs-panel.js +4 -4
- package/dist/tui-v2/components/jobs/jobs-panel.js.map +1 -1
- package/dist/tui-v2/components/modal/confirm-modal.d.ts +3 -3
- package/dist/tui-v2/components/modal/confirm-modal.js +6 -6
- package/dist/tui-v2/components/modal/confirm-modal.js.map +1 -1
- package/dist/tui-v2/components/modal/keys-modal.d.ts +3 -3
- package/dist/tui-v2/components/modal/keys-modal.js +24 -9
- package/dist/tui-v2/components/modal/keys-modal.js.map +1 -1
- package/dist/tui-v2/components/modal/prompt-actions-modal.d.ts +3 -3
- package/dist/tui-v2/components/modal/prompt-actions-modal.js +2 -2
- package/dist/tui-v2/components/modal/prompt-actions-modal.js.map +1 -1
- package/dist/tui-v2/components/modal/scope-modal.d.ts +3 -3
- package/dist/tui-v2/components/modal/scope-modal.js +1 -1
- package/dist/tui-v2/components/modal/scope-modal.js.map +1 -1
- package/dist/tui-v2/components/modal/secret-modal.d.ts +3 -3
- package/dist/tui-v2/components/modal/secret-modal.js +2 -2
- package/dist/tui-v2/components/modal/secret-modal.js.map +1 -1
- package/dist/tui-v2/components/overlay/overlay-host.d.ts +2 -2
- package/dist/tui-v2/components/overlay/overlay-host.js +1 -1
- package/dist/tui-v2/components/overlay/overlay-host.js.map +1 -1
- package/dist/tui-v2/components/pager/pager-line.d.ts +3 -3
- package/dist/tui-v2/components/pager/pager-line.js +3 -3
- package/dist/tui-v2/components/pager/pager-line.js.map +1 -1
- package/dist/tui-v2/components/pager/pager.d.ts +3 -3
- package/dist/tui-v2/components/pager/pager.js +6 -5
- package/dist/tui-v2/components/pager/pager.js.map +1 -1
- package/dist/tui-v2/components/picker/picker.d.ts +3 -3
- package/dist/tui-v2/components/picker/picker.js +2 -2
- package/dist/tui-v2/components/picker/picker.js.map +1 -1
- package/dist/tui-v2/components/plan/plan-pane-anim.js +1 -1
- package/dist/tui-v2/components/plan/plan-pane-anim.js.map +1 -1
- package/dist/tui-v2/components/plan/plan-view.d.ts +2 -2
- package/dist/tui-v2/components/plan/plan-view.js +2 -2
- package/dist/tui-v2/components/plan/plan-view.js.map +1 -1
- package/dist/tui-v2/components/queue/queue-panel.d.ts +2 -2
- package/dist/tui-v2/components/queue/queue-panel.js +3 -3
- package/dist/tui-v2/components/queue/queue-panel.js.map +1 -1
- package/dist/tui-v2/components/status/context-limit-chip.d.ts +1 -5
- package/dist/tui-v2/components/status/context-limit-chip.js +1 -38
- package/dist/tui-v2/components/status/context-limit-chip.js.map +1 -1
- package/dist/tui-v2/components/status/status-line.d.ts +5 -34
- package/dist/tui-v2/components/status/status-line.js +7 -99
- package/dist/tui-v2/components/status/status-line.js.map +1 -1
- package/dist/tui-v2/components/toast/toast-anim.d.ts +0 -1
- package/dist/tui-v2/components/toast/toast-anim.js +2 -3
- package/dist/tui-v2/components/toast/toast-anim.js.map +1 -1
- package/dist/tui-v2/components/toast/toast-host.d.ts +2 -2
- package/dist/tui-v2/components/toast/toast-host.js +2 -2
- package/dist/tui-v2/components/toast/toast-host.js.map +1 -1
- package/dist/tui-v2/components/transcript/assistant-message.d.ts +2 -2
- package/dist/tui-v2/components/transcript/assistant-message.js +3 -2
- package/dist/tui-v2/components/transcript/assistant-message.js.map +1 -1
- package/dist/tui-v2/components/transcript/compacted-row.d.ts +3 -3
- package/dist/tui-v2/components/transcript/compacted-row.js +6 -5
- package/dist/tui-v2/components/transcript/compacted-row.js.map +1 -1
- package/dist/tui-v2/components/transcript/file-diff-card.d.ts +1 -1
- package/dist/tui-v2/components/transcript/file-diff-card.js +1 -1
- package/dist/tui-v2/components/transcript/file-diff-card.js.map +1 -1
- package/dist/tui-v2/components/transcript/intro-card.d.ts +2 -2
- package/dist/tui-v2/components/transcript/intro-card.js +1 -1
- package/dist/tui-v2/components/transcript/intro-card.js.map +1 -1
- package/dist/tui-v2/components/transcript/linkable-text.d.ts +1 -1
- package/dist/tui-v2/components/transcript/linkable-text.js +1 -1
- package/dist/tui-v2/components/transcript/linkable-text.js.map +1 -1
- package/dist/tui-v2/components/transcript/notice-row.d.ts +2 -2
- package/dist/tui-v2/components/transcript/search-bar.d.ts +1 -1
- package/dist/tui-v2/components/transcript/thinking-block.d.ts +2 -2
- package/dist/tui-v2/components/transcript/thinking-block.js +3 -3
- package/dist/tui-v2/components/transcript/thinking-block.js.map +1 -1
- package/dist/tui-v2/components/transcript/tool-card.d.ts +3 -3
- package/dist/tui-v2/components/transcript/tool-card.js +7 -7
- package/dist/tui-v2/components/transcript/tool-card.js.map +1 -1
- package/dist/tui-v2/components/transcript/transcript-row.d.ts +4 -4
- package/dist/tui-v2/components/transcript/transcript-scrollbar.d.ts +1 -1
- package/dist/tui-v2/components/transcript/transcript-view.d.ts +3 -3
- package/dist/tui-v2/components/transcript/transcript-view.js +6 -6
- package/dist/tui-v2/components/transcript/transcript-view.js.map +1 -1
- package/dist/tui-v2/components/transcript/use-native-selection-copy.d.ts +1 -1
- package/dist/tui-v2/components/transcript/use-transcript-selection.d.ts +2 -2
- package/dist/tui-v2/components/transcript/use-transcript-selection.js +3 -3
- package/dist/tui-v2/components/transcript/use-transcript-selection.js.map +1 -1
- package/dist/tui-v2/components/transcript/user-message.d.ts +2 -2
- package/dist/tui-v2/components/transcript/user-message.js +1 -1
- package/dist/tui-v2/components/transcript/user-message.js.map +1 -1
- package/dist/tui-v2/composer/composer-editor.d.ts +2 -2
- package/dist/tui-v2/composer/composer-editor.js +20 -22
- package/dist/tui-v2/composer/composer-editor.js.map +1 -1
- package/dist/tui-v2/composer/composer-image-paste.d.ts +1 -1
- package/dist/tui-v2/composer/composer-image-paste.js +1 -1
- package/dist/tui-v2/composer/composer-image-paste.js.map +1 -1
- package/dist/tui-v2/composer/use-draft-actions.d.ts +2 -2
- package/dist/tui-v2/composer/use-draft-actions.js +2 -2
- package/dist/tui-v2/composer/use-draft-actions.js.map +1 -1
- package/dist/tui-v2/input/chord-from-opentui-key.d.ts +20 -0
- package/dist/tui-v2/input/chord-from-opentui-key.js +51 -0
- package/dist/tui-v2/input/chord-from-opentui-key.js.map +1 -0
- package/dist/tui-v2/rendering/pager-markdown.d.ts +2 -22
- package/dist/tui-v2/rendering/pager-markdown.js +4 -103
- package/dist/tui-v2/rendering/pager-markdown.js.map +1 -1
- package/dist/tui-v2/rendering/styled-markdown.d.ts +20 -0
- package/dist/tui-v2/rendering/styled-markdown.js +35 -0
- package/dist/tui-v2/rendering/styled-markdown.js.map +1 -0
- package/dist/types.d.ts +2 -0
- package/dist/ui/mentions.d.ts +5 -8
- package/dist/ui/mentions.js +26 -8
- package/dist/ui/mentions.js.map +1 -1
- package/dist/ui/warn-once.d.ts +2 -0
- package/dist/ui/warn-once.js +13 -0
- package/dist/ui/warn-once.js.map +1 -0
- package/dist/ui-core/actions/action-id.d.ts +14 -0
- package/dist/ui-core/actions/action-id.js +123 -0
- package/dist/ui-core/actions/action-id.js.map +1 -0
- package/dist/ui-core/actions/action-router.js.map +1 -0
- package/dist/ui-core/actions/chord.d.ts +20 -0
- package/dist/ui-core/actions/chord.js +28 -0
- package/dist/ui-core/actions/chord.js.map +1 -0
- package/dist/ui-core/actions/format-shortcuts.js +267 -0
- package/dist/ui-core/actions/format-shortcuts.js.map +1 -0
- package/dist/ui-core/actions/keymap.d.ts +23 -0
- package/dist/ui-core/actions/keymap.js +145 -0
- package/dist/ui-core/actions/keymap.js.map +1 -0
- package/dist/ui-core/actions/mode-cycle.js.map +1 -0
- package/dist/ui-core/bootstrap/can-use-tui.js.map +1 -0
- package/dist/ui-core/bootstrap/capabilities.d.ts +37 -0
- package/dist/ui-core/bootstrap/capabilities.js +111 -0
- package/dist/ui-core/bootstrap/capabilities.js.map +1 -0
- package/dist/ui-core/bootstrap/composition-root.d.ts +92 -0
- package/dist/ui-core/bootstrap/composition-root.js.map +1 -0
- package/dist/ui-core/bootstrap/console-guard.js.map +1 -0
- package/dist/ui-core/bootstrap/console-suppress.js.map +1 -0
- package/dist/ui-core/bootstrap/lifecycle.js.map +1 -0
- package/dist/ui-core/bootstrap/overlay-ports.js +92 -0
- package/dist/ui-core/bootstrap/overlay-ports.js.map +1 -0
- package/dist/ui-core/bootstrap/ui-selection.d.ts +27 -0
- package/dist/ui-core/bootstrap/ui-selection.js +109 -0
- package/dist/ui-core/bootstrap/ui-selection.js.map +1 -0
- package/dist/ui-core/commands/command-handlers.js +86 -0
- package/dist/ui-core/commands/command-handlers.js.map +1 -0
- package/dist/ui-core/commands/config-commands.d.ts +14 -0
- package/dist/ui-core/commands/config-commands.js +315 -0
- package/dist/ui-core/commands/config-commands.js.map +1 -0
- package/dist/ui-core/commands/key-commands.d.ts +9 -0
- package/dist/ui-core/commands/key-commands.js +532 -0
- package/dist/ui-core/commands/key-commands.js.map +1 -0
- package/dist/ui-core/commands/picker-commands.d.ts +25 -0
- package/dist/ui-core/commands/picker-commands.js +1045 -0
- package/dist/ui-core/commands/picker-commands.js.map +1 -0
- package/dist/ui-core/commands/session-commands.d.ts +19 -0
- package/dist/ui-core/commands/session-commands.js +183 -0
- package/dist/ui-core/commands/session-commands.js.map +1 -0
- package/dist/ui-core/commands/startup-update.js.map +1 -0
- package/dist/ui-core/composer/arrow-intent.js.map +1 -0
- package/dist/ui-core/composer/completion.js.map +1 -0
- package/dist/ui-core/composer/composer-action-port.js.map +1 -0
- package/dist/ui-core/composer/composer-height.js +29 -0
- package/dist/ui-core/composer/composer-height.js.map +1 -0
- package/dist/ui-core/composer/composer-image-paste.d.ts +20 -0
- package/dist/ui-core/composer/composer-image-paste.js +77 -0
- package/dist/ui-core/composer/composer-image-paste.js.map +1 -0
- package/dist/ui-core/composer/composer-meta.js.map +1 -0
- package/dist/ui-core/composer/composer-wheel.d.ts +58 -0
- package/dist/ui-core/composer/composer-wheel.js +108 -0
- package/dist/ui-core/composer/composer-wheel.js.map +1 -0
- package/dist/ui-core/composer/draft-actions.d.ts +31 -0
- package/dist/ui-core/composer/draft-actions.js +45 -0
- package/dist/ui-core/composer/draft-actions.js.map +1 -0
- package/dist/ui-core/composer/history-nav.js.map +1 -0
- package/dist/ui-core/composer/input-history.js +9 -0
- package/dist/ui-core/composer/input-history.js.map +1 -0
- package/dist/ui-core/composer/newline-hint.d.ts +13 -0
- package/dist/ui-core/composer/newline-hint.js.map +1 -0
- package/dist/ui-core/composer/paste-placeholder.js.map +1 -0
- package/dist/ui-core/composer/prompt-history.js.map +1 -0
- package/dist/ui-core/composer/secret-buffer.js.map +1 -0
- package/dist/ui-core/composer/textarea-keybindings.d.ts +25 -0
- package/dist/ui-core/composer/textarea-keybindings.js +84 -0
- package/dist/ui-core/composer/textarea-keybindings.js.map +1 -0
- package/dist/ui-core/controllers/focus-controller.js.map +1 -0
- package/dist/ui-core/controllers/interruptible-controller.js.map +1 -0
- package/dist/ui-core/controllers/overlay-controller.d.ts +211 -0
- package/dist/ui-core/controllers/overlay-controller.js.map +1 -0
- package/dist/ui-core/controllers/selection-controller.js.map +1 -0
- package/dist/ui-core/controllers/toast-controller.js.map +1 -0
- package/dist/ui-core/layout/compute-layout.js.map +1 -0
- package/dist/ui-core/motion/ease.js.map +1 -0
- package/dist/ui-core/notify.js.map +1 -0
- package/dist/ui-core/plan/plan-lifecycle.js.map +1 -0
- package/dist/ui-core/ports/clipboard-osc52.js +44 -0
- package/dist/ui-core/ports/clipboard-osc52.js.map +1 -0
- package/dist/ui-core/ports/pager-export-port.d.ts +16 -0
- package/dist/ui-core/ports/pager-export-port.js +70 -0
- package/dist/ui-core/ports/pager-export-port.js.map +1 -0
- package/dist/ui-core/ports/renderer-port.d.ts +10 -0
- package/dist/ui-core/ports/renderer-port.js +2 -0
- package/dist/ui-core/ports/renderer-port.js.map +1 -0
- package/dist/ui-core/react/providers.d.ts +16 -0
- package/dist/ui-core/react/providers.js +31 -0
- package/dist/ui-core/react/providers.js.map +1 -0
- package/dist/ui-core/react/use-has-draft.js.map +1 -0
- package/dist/ui-core/react/use-overlay.js.map +1 -0
- package/dist/ui-core/react/use-plan.js.map +1 -0
- package/dist/ui-core/react/use-session-state.js.map +1 -0
- package/dist/ui-core/react/use-toast.js.map +1 -0
- package/dist/ui-core/react/use-transcript-store.d.ts +10 -0
- package/dist/ui-core/react/use-transcript-store.js.map +1 -0
- package/dist/ui-core/rendering/artifact-pager-source.js.map +1 -0
- package/dist/ui-core/rendering/batch-sections.js.map +1 -0
- package/dist/ui-core/rendering/code-block.d.ts +48 -0
- package/dist/ui-core/rendering/code-block.js +407 -0
- package/dist/ui-core/rendering/code-block.js.map +1 -0
- package/dist/ui-core/rendering/context-limit.d.ts +8 -0
- package/dist/ui-core/rendering/context-limit.js +49 -0
- package/dist/ui-core/rendering/context-limit.js.map +1 -0
- package/dist/ui-core/rendering/file-diff-view.js.map +1 -0
- package/dist/ui-core/rendering/format-help.js.map +1 -0
- package/dist/ui-core/rendering/format-keys.d.ts +14 -0
- package/dist/ui-core/rendering/format-keys.js +78 -0
- package/dist/ui-core/rendering/format-keys.js.map +1 -0
- package/dist/ui-core/rendering/incremental-strip.js.map +1 -0
- package/dist/ui-core/rendering/intro-header.js.map +1 -0
- package/dist/ui-core/rendering/job-tail-source.js.map +1 -0
- package/dist/ui-core/rendering/link-detector.js.map +1 -0
- package/dist/ui-core/rendering/markdown.js.map +1 -0
- package/dist/ui-core/rendering/open-tool-output.js +346 -0
- package/dist/ui-core/rendering/open-tool-output.js.map +1 -0
- package/dist/ui-core/rendering/pager-chrome.js +119 -0
- package/dist/ui-core/rendering/pager-chrome.js.map +1 -0
- package/dist/ui-core/rendering/pager-source.d.ts +20 -0
- package/dist/ui-core/rendering/pager-source.js +101 -0
- package/dist/ui-core/rendering/pager-source.js.map +1 -0
- package/dist/ui-core/rendering/pager-text.d.ts +24 -0
- package/dist/ui-core/rendering/pager-text.js +105 -0
- package/dist/ui-core/rendering/pager-text.js.map +1 -0
- package/dist/ui-core/rendering/pager-view-policy.js +98 -0
- package/dist/ui-core/rendering/pager-view-policy.js.map +1 -0
- package/dist/ui-core/rendering/picker-filter.js.map +1 -0
- package/dist/ui-core/rendering/plan-view.js.map +1 -0
- package/dist/ui-core/rendering/prompt-preview.js.map +1 -0
- package/dist/ui-core/rendering/render-markdown-lines.d.ts +7 -0
- package/dist/ui-core/rendering/render-markdown-lines.js +26 -0
- package/dist/ui-core/rendering/render-markdown-lines.js.map +1 -0
- package/dist/ui-core/rendering/sanitize-display.js.map +1 -0
- package/dist/ui-core/rendering/status-segments.d.ts +25 -0
- package/dist/ui-core/rendering/status-segments.js +88 -0
- package/dist/ui-core/rendering/status-segments.js.map +1 -0
- package/dist/ui-core/rendering/streaming-markdown.d.ts +23 -0
- package/dist/ui-core/rendering/streaming-markdown.js +118 -0
- package/dist/ui-core/rendering/streaming-markdown.js.map +1 -0
- package/dist/ui-core/rendering/strip-tool-surfaces.js.map +1 -0
- package/dist/ui-core/rendering/syntax-highlight.js.map +1 -0
- package/dist/ui-core/rendering/text-format.js.map +1 -0
- package/dist/ui-core/rendering/text-width.js.map +1 -0
- package/dist/ui-core/rendering/theme.js.map +1 -0
- package/dist/ui-core/rendering/thinking-tail.js.map +1 -0
- package/dist/ui-core/rendering/tool-presenter.d.ts +68 -0
- package/dist/ui-core/rendering/tool-presenter.js +371 -0
- package/dist/ui-core/rendering/tool-presenter.js.map +1 -0
- package/dist/ui-core/rendering/transcript-export.d.ts +11 -0
- package/dist/ui-core/rendering/transcript-export.js +18 -0
- package/dist/ui-core/rendering/transcript-export.js.map +1 -0
- package/dist/ui-core/rendering/transcript-semantic.js.map +1 -0
- package/dist/ui-core/rendering/user-message-wrap.d.ts +18 -0
- package/dist/ui-core/rendering/user-message-wrap.js +23 -0
- package/dist/ui-core/rendering/user-message-wrap.js.map +1 -0
- package/dist/ui-core/rendering/wordmark.js.map +1 -0
- package/dist/ui-core/state/pager-search.js.map +1 -0
- package/dist/ui-core/state/semantic-document.js.map +1 -0
- package/dist/ui-core/state/transcript-compaction.js.map +1 -0
- package/dist/ui-core/state/transcript-hydrate.d.ts +67 -0
- package/dist/ui-core/state/transcript-hydrate.js +665 -0
- package/dist/ui-core/state/transcript-hydrate.js.map +1 -0
- package/dist/ui-core/state/transcript-reducer.js +484 -0
- package/dist/ui-core/state/transcript-reducer.js.map +1 -0
- package/dist/ui-core/state/transcript-search.js.map +1 -0
- package/dist/ui-core/state/transcript-store.js.map +1 -0
- package/dist/ui-core/state/transcript-struct.js.map +1 -0
- package/dist/ui-core/state/transcript-types.d.ts +103 -0
- package/dist/ui-core/state/transcript-types.js.map +1 -0
- package/dist/version.generated.d.ts +2 -2
- package/dist/version.generated.js +2 -2
- package/dist/version.generated.js.map +1 -1
- package/package.json +18 -12
- package/dist/agent/classic-renderer.d.ts +0 -5
- package/dist/agent/classic-renderer.js +0 -136
- package/dist/agent/classic-renderer.js.map +0 -1
- package/dist/app/adapters/current-terminal-adapter.d.ts +0 -2
- package/dist/app/adapters/current-terminal-adapter.js +0 -24
- package/dist/app/adapters/current-terminal-adapter.js.map +0 -1
- package/dist/app/controllers/job-controller.d.ts +0 -28
- package/dist/app/controllers/job-controller.js +0 -70
- package/dist/app/controllers/job-controller.js.map +0 -1
- package/dist/repl/prompt-line.d.ts +0 -24
- package/dist/repl/prompt-line.js +0 -558
- package/dist/repl/prompt-line.js.map +0 -1
- package/dist/repl/slash-commands.js +0 -392
- package/dist/repl/slash-commands.js.map +0 -1
- package/dist/repl.d.ts +0 -18
- package/dist/repl.js +0 -1868
- package/dist/repl.js.map +0 -1
- package/dist/safety/path-permissions.d.ts +0 -14
- package/dist/safety/path-permissions.js +0 -43
- package/dist/safety/path-permissions.js.map +0 -1
- package/dist/tools/reducers/generic.d.ts +0 -14
- package/dist/tools/reducers/generic.js +0 -5
- package/dist/tools/reducers/generic.js.map +0 -1
- package/dist/tui/can-use-tui.js.map +0 -1
- package/dist/tui/format-keys.d.ts +0 -13
- package/dist/tui/format-keys.js +0 -78
- package/dist/tui/format-keys.js.map +0 -1
- package/dist/tui/input-history.js +0 -9
- package/dist/tui/input-history.js.map +0 -1
- package/dist/tui/runtime.js +0 -207
- package/dist/tui/runtime.js.map +0 -1
- package/dist/tui/state.d.ts +0 -124
- package/dist/tui/state.js +0 -496
- package/dist/tui/state.js.map +0 -1
- package/dist/tui/text-format.js.map +0 -1
- package/dist/tui-v2/actions/action-id.d.ts +0 -14
- package/dist/tui-v2/actions/action-id.js +0 -117
- package/dist/tui-v2/actions/action-id.js.map +0 -1
- package/dist/tui-v2/actions/action-router.js.map +0 -1
- package/dist/tui-v2/actions/chord-from-key.d.ts +0 -10
- package/dist/tui-v2/actions/chord-from-key.js +0 -34
- package/dist/tui-v2/actions/chord-from-key.js.map +0 -1
- package/dist/tui-v2/actions/format-shortcuts.js +0 -267
- package/dist/tui-v2/actions/format-shortcuts.js.map +0 -1
- package/dist/tui-v2/actions/keymap.d.ts +0 -24
- package/dist/tui-v2/actions/keymap.js +0 -151
- package/dist/tui-v2/actions/keymap.js.map +0 -1
- package/dist/tui-v2/app/command-handlers.js +0 -86
- package/dist/tui-v2/app/command-handlers.js.map +0 -1
- package/dist/tui-v2/app/commands/config-commands.d.ts +0 -14
- package/dist/tui-v2/app/commands/config-commands.js +0 -315
- package/dist/tui-v2/app/commands/config-commands.js.map +0 -1
- package/dist/tui-v2/app/commands/key-commands.d.ts +0 -9
- package/dist/tui-v2/app/commands/key-commands.js +0 -496
- package/dist/tui-v2/app/commands/key-commands.js.map +0 -1
- package/dist/tui-v2/app/commands/picker-commands.d.ts +0 -25
- package/dist/tui-v2/app/commands/picker-commands.js +0 -1045
- package/dist/tui-v2/app/commands/picker-commands.js.map +0 -1
- package/dist/tui-v2/app/commands/session-commands.d.ts +0 -19
- package/dist/tui-v2/app/commands/session-commands.js +0 -183
- package/dist/tui-v2/app/commands/session-commands.js.map +0 -1
- package/dist/tui-v2/app/mode-cycle.js.map +0 -1
- package/dist/tui-v2/app/plan-lifecycle.js.map +0 -1
- package/dist/tui-v2/app/providers.d.ts +0 -17
- package/dist/tui-v2/app/providers.js +0 -32
- package/dist/tui-v2/app/providers.js.map +0 -1
- package/dist/tui-v2/app/startup-update.js.map +0 -1
- package/dist/tui-v2/bootstrap/capabilities.d.ts +0 -36
- package/dist/tui-v2/bootstrap/capabilities.js +0 -93
- package/dist/tui-v2/bootstrap/capabilities.js.map +0 -1
- package/dist/tui-v2/bootstrap/composition-root.d.ts +0 -92
- package/dist/tui-v2/bootstrap/composition-root.js.map +0 -1
- package/dist/tui-v2/bootstrap/console-guard.js.map +0 -1
- package/dist/tui-v2/bootstrap/console-suppress.js.map +0 -1
- package/dist/tui-v2/bootstrap/disable-native-selection.d.ts +0 -11
- package/dist/tui-v2/bootstrap/disable-native-selection.js +0 -13
- package/dist/tui-v2/bootstrap/disable-native-selection.js.map +0 -1
- package/dist/tui-v2/bootstrap/lifecycle.js.map +0 -1
- package/dist/tui-v2/bootstrap/osc52-clipboard.js +0 -44
- package/dist/tui-v2/bootstrap/osc52-clipboard.js.map +0 -1
- package/dist/tui-v2/bootstrap/overlay-ports.js +0 -114
- package/dist/tui-v2/bootstrap/overlay-ports.js.map +0 -1
- package/dist/tui-v2/bootstrap/ui-selection.d.ts +0 -30
- package/dist/tui-v2/bootstrap/ui-selection.js +0 -59
- package/dist/tui-v2/bootstrap/ui-selection.js.map +0 -1
- package/dist/tui-v2/composer/arrow-intent.js.map +0 -1
- package/dist/tui-v2/composer/completion.js.map +0 -1
- package/dist/tui-v2/composer/composer-action-port.js.map +0 -1
- package/dist/tui-v2/composer/composer-height.js +0 -29
- package/dist/tui-v2/composer/composer-height.js.map +0 -1
- package/dist/tui-v2/composer/composer-meta.js.map +0 -1
- package/dist/tui-v2/composer/draft-actions.d.ts +0 -31
- package/dist/tui-v2/composer/draft-actions.js +0 -45
- package/dist/tui-v2/composer/draft-actions.js.map +0 -1
- package/dist/tui-v2/composer/history-nav.js.map +0 -1
- package/dist/tui-v2/composer/newline-hint.d.ts +0 -13
- package/dist/tui-v2/composer/newline-hint.js.map +0 -1
- package/dist/tui-v2/composer/paste-placeholder.js.map +0 -1
- package/dist/tui-v2/composer/prompt-history.js.map +0 -1
- package/dist/tui-v2/composer/secret-buffer.js.map +0 -1
- package/dist/tui-v2/controllers/focus-controller.js.map +0 -1
- package/dist/tui-v2/controllers/interruptible-controller.js.map +0 -1
- package/dist/tui-v2/controllers/overlay-controller.d.ts +0 -209
- package/dist/tui-v2/controllers/overlay-controller.js.map +0 -1
- package/dist/tui-v2/controllers/selection-controller.js.map +0 -1
- package/dist/tui-v2/controllers/toast-controller.js.map +0 -1
- package/dist/tui-v2/layout/compute-layout.js.map +0 -1
- package/dist/tui-v2/motion/ease.js.map +0 -1
- package/dist/tui-v2/notify.js.map +0 -1
- package/dist/tui-v2/rendering/artifact-pager-source.js.map +0 -1
- package/dist/tui-v2/rendering/batch-sections.js.map +0 -1
- package/dist/tui-v2/rendering/file-diff-view.js.map +0 -1
- package/dist/tui-v2/rendering/format-help.js.map +0 -1
- package/dist/tui-v2/rendering/incremental-strip.js.map +0 -1
- package/dist/tui-v2/rendering/job-tail-source.js.map +0 -1
- package/dist/tui-v2/rendering/link-detector.js.map +0 -1
- package/dist/tui-v2/rendering/open-tool-output.js +0 -346
- package/dist/tui-v2/rendering/open-tool-output.js.map +0 -1
- package/dist/tui-v2/rendering/pager-chrome.js +0 -119
- package/dist/tui-v2/rendering/pager-chrome.js.map +0 -1
- package/dist/tui-v2/rendering/pager-view-policy.js +0 -98
- package/dist/tui-v2/rendering/pager-view-policy.js.map +0 -1
- package/dist/tui-v2/rendering/picker-filter.js.map +0 -1
- package/dist/tui-v2/rendering/plan-view.js.map +0 -1
- package/dist/tui-v2/rendering/prompt-preview.js.map +0 -1
- package/dist/tui-v2/rendering/render-markdown-lines.d.ts +0 -29
- package/dist/tui-v2/rendering/render-markdown-lines.js +0 -46
- package/dist/tui-v2/rendering/render-markdown-lines.js.map +0 -1
- package/dist/tui-v2/rendering/sanitize-display.js.map +0 -1
- package/dist/tui-v2/rendering/streaming-markdown.d.ts +0 -25
- package/dist/tui-v2/rendering/streaming-markdown.js +0 -117
- package/dist/tui-v2/rendering/streaming-markdown.js.map +0 -1
- package/dist/tui-v2/rendering/strip-tool-surfaces.js.map +0 -1
- package/dist/tui-v2/rendering/syntax-highlight.js.map +0 -1
- package/dist/tui-v2/rendering/theme.js.map +0 -1
- package/dist/tui-v2/rendering/thinking-tail.js.map +0 -1
- package/dist/tui-v2/rendering/tool-presenter.d.ts +0 -63
- package/dist/tui-v2/rendering/tool-presenter.js +0 -376
- package/dist/tui-v2/rendering/tool-presenter.js.map +0 -1
- package/dist/tui-v2/rendering/transcript-export.d.ts +0 -11
- package/dist/tui-v2/rendering/transcript-export.js +0 -18
- package/dist/tui-v2/rendering/transcript-export.js.map +0 -1
- package/dist/tui-v2/rendering/transcript-semantic.js.map +0 -1
- package/dist/tui-v2/rendering/user-message-wrap.d.ts +0 -16
- package/dist/tui-v2/rendering/user-message-wrap.js +0 -21
- package/dist/tui-v2/rendering/user-message-wrap.js.map +0 -1
- package/dist/tui-v2/state/pager-search.js.map +0 -1
- package/dist/tui-v2/state/semantic-document.js.map +0 -1
- package/dist/tui-v2/state/transcript-compaction.js.map +0 -1
- package/dist/tui-v2/state/transcript-hydrate.d.ts +0 -67
- package/dist/tui-v2/state/transcript-hydrate.js +0 -648
- package/dist/tui-v2/state/transcript-hydrate.js.map +0 -1
- package/dist/tui-v2/state/transcript-reducer.js +0 -482
- package/dist/tui-v2/state/transcript-reducer.js.map +0 -1
- package/dist/tui-v2/state/transcript-search.js.map +0 -1
- package/dist/tui-v2/state/transcript-store.js.map +0 -1
- package/dist/tui-v2/state/transcript-struct.js.map +0 -1
- package/dist/tui-v2/state/transcript-types.d.ts +0 -101
- package/dist/tui-v2/state/transcript-types.js.map +0 -1
- package/dist/tui-v2/state/use-has-draft.js.map +0 -1
- package/dist/tui-v2/state/use-overlay.js.map +0 -1
- package/dist/tui-v2/state/use-plan.js.map +0 -1
- package/dist/tui-v2/state/use-session-state.js.map +0 -1
- package/dist/tui-v2/state/use-toast.js.map +0 -1
- package/dist/tui-v2/state/use-transcript-store.d.ts +0 -10
- package/dist/tui-v2/state/use-transcript-store.js.map +0 -1
- package/dist/ui/ansi-box.d.ts +0 -9
- package/dist/ui/ansi-box.js +0 -25
- package/dist/ui/ansi-box.js.map +0 -1
- package/dist/ui/banner.d.ts +0 -3
- package/dist/ui/banner.js +0 -13
- package/dist/ui/banner.js.map +0 -1
- package/dist/ui/code-block.d.ts +0 -48
- package/dist/ui/code-block.js +0 -407
- package/dist/ui/code-block.js.map +0 -1
- package/dist/ui/intro-card.d.ts +0 -10
- package/dist/ui/intro-card.js +0 -67
- package/dist/ui/intro-card.js.map +0 -1
- package/dist/ui/intro-header.js.map +0 -1
- package/dist/ui/keys.d.ts +0 -23
- package/dist/ui/keys.js +0 -23
- package/dist/ui/keys.js.map +0 -1
- package/dist/ui/markdown.js.map +0 -1
- package/dist/ui/output-pane.d.ts +0 -59
- package/dist/ui/output-pane.js +0 -398
- package/dist/ui/output-pane.js.map +0 -1
- package/dist/ui/spinner.d.ts +0 -8
- package/dist/ui/spinner.js +0 -185
- package/dist/ui/spinner.js.map +0 -1
- package/dist/ui/task-pane.d.ts +0 -17
- package/dist/ui/task-pane.js +0 -80
- package/dist/ui/task-pane.js.map +0 -1
- package/dist/ui/text-width.js.map +0 -1
- package/dist/ui/wordmark.js.map +0 -1
- /package/dist/{repl/slash-commands.d.ts → app/commands/catalog.d.ts} +0 -0
- /package/dist/{tui/runtime.d.ts → os/bun-runtime.d.ts} +0 -0
- /package/dist/{tui-v2 → ui-core}/actions/action-router.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/actions/action-router.js +0 -0
- /package/dist/{tui-v2 → ui-core}/actions/format-shortcuts.d.ts +0 -0
- /package/dist/{tui-v2/app → ui-core/actions}/mode-cycle.d.ts +0 -0
- /package/dist/{tui-v2/app → ui-core/actions}/mode-cycle.js +0 -0
- /package/dist/{tui → ui-core/bootstrap}/can-use-tui.d.ts +0 -0
- /package/dist/{tui → ui-core/bootstrap}/can-use-tui.js +0 -0
- /package/dist/{tui-v2 → ui-core}/bootstrap/composition-root.js +0 -0
- /package/dist/{tui-v2 → ui-core}/bootstrap/console-guard.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/bootstrap/console-guard.js +0 -0
- /package/dist/{tui-v2 → ui-core}/bootstrap/console-suppress.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/bootstrap/console-suppress.js +0 -0
- /package/dist/{tui-v2 → ui-core}/bootstrap/lifecycle.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/bootstrap/lifecycle.js +0 -0
- /package/dist/{tui-v2 → ui-core}/bootstrap/overlay-ports.d.ts +0 -0
- /package/dist/{tui-v2/app → ui-core/commands}/command-handlers.d.ts +0 -0
- /package/dist/{tui-v2/app → ui-core/commands}/startup-update.d.ts +0 -0
- /package/dist/{tui-v2/app → ui-core/commands}/startup-update.js +0 -0
- /package/dist/{tui-v2 → ui-core}/composer/arrow-intent.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/composer/arrow-intent.js +0 -0
- /package/dist/{tui-v2 → ui-core}/composer/completion.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/composer/completion.js +0 -0
- /package/dist/{tui-v2 → ui-core}/composer/composer-action-port.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/composer/composer-action-port.js +0 -0
- /package/dist/{tui-v2 → ui-core}/composer/composer-height.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/composer/composer-meta.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/composer/composer-meta.js +0 -0
- /package/dist/{tui-v2 → ui-core}/composer/history-nav.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/composer/history-nav.js +0 -0
- /package/dist/{tui → ui-core/composer}/input-history.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/composer/newline-hint.js +0 -0
- /package/dist/{tui-v2 → ui-core}/composer/paste-placeholder.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/composer/paste-placeholder.js +0 -0
- /package/dist/{tui-v2 → ui-core}/composer/prompt-history.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/composer/prompt-history.js +0 -0
- /package/dist/{tui-v2 → ui-core}/composer/secret-buffer.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/composer/secret-buffer.js +0 -0
- /package/dist/{tui-v2 → ui-core}/controllers/focus-controller.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/controllers/focus-controller.js +0 -0
- /package/dist/{tui-v2 → ui-core}/controllers/interruptible-controller.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/controllers/interruptible-controller.js +0 -0
- /package/dist/{tui-v2 → ui-core}/controllers/overlay-controller.js +0 -0
- /package/dist/{tui-v2 → ui-core}/controllers/selection-controller.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/controllers/selection-controller.js +0 -0
- /package/dist/{tui-v2 → ui-core}/controllers/toast-controller.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/controllers/toast-controller.js +0 -0
- /package/dist/{tui-v2 → ui-core}/layout/compute-layout.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/layout/compute-layout.js +0 -0
- /package/dist/{tui-v2 → ui-core}/motion/ease.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/motion/ease.js +0 -0
- /package/dist/{tui-v2 → ui-core}/notify.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/notify.js +0 -0
- /package/dist/{tui-v2/app → ui-core/plan}/plan-lifecycle.d.ts +0 -0
- /package/dist/{tui-v2/app → ui-core/plan}/plan-lifecycle.js +0 -0
- /package/dist/{tui-v2/bootstrap/osc52-clipboard.d.ts → ui-core/ports/clipboard-osc52.d.ts} +0 -0
- /package/dist/{tui-v2/state → ui-core/react}/use-has-draft.d.ts +0 -0
- /package/dist/{tui-v2/state → ui-core/react}/use-has-draft.js +0 -0
- /package/dist/{tui-v2/state → ui-core/react}/use-overlay.d.ts +0 -0
- /package/dist/{tui-v2/state → ui-core/react}/use-overlay.js +0 -0
- /package/dist/{tui-v2/state → ui-core/react}/use-plan.d.ts +0 -0
- /package/dist/{tui-v2/state → ui-core/react}/use-plan.js +0 -0
- /package/dist/{tui-v2/state → ui-core/react}/use-session-state.d.ts +0 -0
- /package/dist/{tui-v2/state → ui-core/react}/use-session-state.js +0 -0
- /package/dist/{tui-v2/state → ui-core/react}/use-toast.d.ts +0 -0
- /package/dist/{tui-v2/state → ui-core/react}/use-toast.js +0 -0
- /package/dist/{tui-v2/state → ui-core/react}/use-transcript-store.js +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/artifact-pager-source.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/artifact-pager-source.js +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/batch-sections.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/batch-sections.js +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/file-diff-view.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/file-diff-view.js +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/format-help.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/format-help.js +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/incremental-strip.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/incremental-strip.js +0 -0
- /package/dist/{ui → ui-core/rendering}/intro-header.d.ts +0 -0
- /package/dist/{ui → ui-core/rendering}/intro-header.js +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/job-tail-source.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/job-tail-source.js +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/link-detector.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/link-detector.js +0 -0
- /package/dist/{ui → ui-core/rendering}/markdown.d.ts +0 -0
- /package/dist/{ui → ui-core/rendering}/markdown.js +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/open-tool-output.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/pager-chrome.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/pager-view-policy.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/picker-filter.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/picker-filter.js +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/plan-view.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/plan-view.js +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/prompt-preview.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/prompt-preview.js +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/sanitize-display.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/sanitize-display.js +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/strip-tool-surfaces.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/strip-tool-surfaces.js +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/syntax-highlight.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/syntax-highlight.js +0 -0
- /package/dist/{tui → ui-core/rendering}/text-format.d.ts +0 -0
- /package/dist/{tui → ui-core/rendering}/text-format.js +0 -0
- /package/dist/{ui → ui-core/rendering}/text-width.d.ts +0 -0
- /package/dist/{ui → ui-core/rendering}/text-width.js +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/theme.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/theme.js +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/thinking-tail.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/thinking-tail.js +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/transcript-semantic.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/transcript-semantic.js +0 -0
- /package/dist/{ui → ui-core/rendering}/wordmark.d.ts +0 -0
- /package/dist/{ui → ui-core/rendering}/wordmark.js +0 -0
- /package/dist/{tui-v2 → ui-core}/state/pager-search.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/state/pager-search.js +0 -0
- /package/dist/{tui-v2 → ui-core}/state/semantic-document.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/state/semantic-document.js +0 -0
- /package/dist/{tui-v2 → ui-core}/state/transcript-compaction.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/state/transcript-compaction.js +0 -0
- /package/dist/{tui-v2 → ui-core}/state/transcript-reducer.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/state/transcript-search.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/state/transcript-search.js +0 -0
- /package/dist/{tui-v2 → ui-core}/state/transcript-store.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/state/transcript-store.js +0 -0
- /package/dist/{tui-v2 → ui-core}/state/transcript-struct.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/state/transcript-struct.js +0 -0
- /package/dist/{tui-v2 → ui-core}/state/transcript-types.js +0 -0
|
@@ -0,0 +1,445 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure line builders for the non-interactive surface (06-ONESHOT §2/§3).
|
|
3
|
+
*
|
|
4
|
+
* One exported function per `AgentEvent` kind, each returning `readonly
|
|
5
|
+
* string[]`. No streams, no clocks, no process reads — every row is derived
|
|
6
|
+
* from the event plus the injected `StreamContext`, and every glyph, colour and
|
|
7
|
+
* body preview comes from the same `ui-core` presenters the Ink feed uses.
|
|
8
|
+
*/
|
|
9
|
+
import { fileToolTitle, isFileMutationTool } from "../tools/file-diff.js";
|
|
10
|
+
import { alignEnds, clipToWidth, joinSeparated, padStartToWidth, sealStyle, trimTrailingSpaces, } from "../classic/render/ansi-text.js";
|
|
11
|
+
import { adaptPresenterGlyphs, glyphsFor } from "../classic/render/glyphs.js";
|
|
12
|
+
import { createInkTheme, withColorMode, } from "../classic/render/ink-theme.js";
|
|
13
|
+
import { contentWidth } from "../classic/render/measure.js";
|
|
14
|
+
import { wrapAnsiLine, wrapWithPrefixes } from "../classic/render/wrap.js";
|
|
15
|
+
import { batchSummaryLine, buildBatchCardsFromSpool, parseBatchSections, presentBatchSection, } from "../ui-core/rendering/batch-sections.js";
|
|
16
|
+
import { collapsedFileChangeLabel, presentFileChangePreview, syntaxColor, } from "../ui-core/rendering/file-diff-view.js";
|
|
17
|
+
import { cleanToolOutputLines, clampArgsDisplay, presentOutput, } from "../ui-core/rendering/tool-presenter.js";
|
|
18
|
+
import { renderMarkdownLines } from "../ui-core/rendering/render-markdown-lines.js";
|
|
19
|
+
import { sanitizeDisplayText } from "../ui-core/rendering/sanitize-display.js";
|
|
20
|
+
import { liveThinkingDisplay } from "../ui-core/rendering/thinking-tail.js";
|
|
21
|
+
import { cleanTaskTitle, progressView, taskGlyph, TASK_STATE_LABEL, } from "../ui-core/rendering/plan-view.js";
|
|
22
|
+
/** Collapsed tool-output preview rows, and the `--verbose` ceiling. */
|
|
23
|
+
export const COLLAPSED_BODY_ROWS = 3;
|
|
24
|
+
export const VERBOSE_BODY_ROWS = 40;
|
|
25
|
+
/** Plan and batch sub-rows kept before a `… +N more` trailer. */
|
|
26
|
+
const SECTION_ROWS = 8;
|
|
27
|
+
const BODY_INDENT = 4;
|
|
28
|
+
const GUTTER_WIDTH = 4;
|
|
29
|
+
const DIFF_CODE_COLUMN = GUTTER_WIDTH + 4;
|
|
30
|
+
export function createStreamContext(input) {
|
|
31
|
+
return {
|
|
32
|
+
width: Math.max(1, contentWidth(input.columns) - 2),
|
|
33
|
+
ink: createInkTheme({
|
|
34
|
+
themeHint: "dark",
|
|
35
|
+
colorMode: input.color ? "truecolor" : "none",
|
|
36
|
+
unicode: input.unicode,
|
|
37
|
+
italic: false,
|
|
38
|
+
}),
|
|
39
|
+
glyphs: glyphsFor(input.unicode),
|
|
40
|
+
verbosity: input.verbosity,
|
|
41
|
+
showThinking: input.showThinking,
|
|
42
|
+
plainPrefixes: !input.unicode,
|
|
43
|
+
bodyRows: input.verbosity === "verbose" ? VERBOSE_BODY_ROWS : COLLAPSED_BODY_ROWS,
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
function quiet(ctx) {
|
|
47
|
+
return ctx.verbosity === "quiet";
|
|
48
|
+
}
|
|
49
|
+
function verbose(ctx) {
|
|
50
|
+
return ctx.verbosity === "verbose";
|
|
51
|
+
}
|
|
52
|
+
function row(ctx, text) {
|
|
53
|
+
return trimTrailingSpaces(clipToWidth(text, ctx.width, ctx.glyphs.ellipsis));
|
|
54
|
+
}
|
|
55
|
+
function meta(ctx, parts) {
|
|
56
|
+
return joinSeparated(parts, ` ${ctx.glyphs.separator} `);
|
|
57
|
+
}
|
|
58
|
+
function styled(ctx, text, style) {
|
|
59
|
+
return ctx.ink.style(text, style);
|
|
60
|
+
}
|
|
61
|
+
/** `● name` on a glyph surface, `[tool] name` on an ASCII one. */
|
|
62
|
+
function marker(ctx, glyph, label, token) {
|
|
63
|
+
return ctx.plainPrefixes
|
|
64
|
+
? styled(ctx, `[${label}]`, { fg: token })
|
|
65
|
+
: styled(ctx, glyph, { fg: token });
|
|
66
|
+
}
|
|
67
|
+
function indented(ctx, text, style, indent = BODY_INDENT) {
|
|
68
|
+
const pad = " ".repeat(indent);
|
|
69
|
+
return wrapWithPrefixes(text, { width: Math.max(1, ctx.width - indent) }).map((line) => row(ctx, `${pad}${styled(ctx, line, style)}`));
|
|
70
|
+
}
|
|
71
|
+
function hiddenTrailer(ctx, hidden, extra) {
|
|
72
|
+
if (hidden <= 0)
|
|
73
|
+
return [];
|
|
74
|
+
const body = meta(ctx, [
|
|
75
|
+
`${ctx.glyphs.ellipsis} +${hidden} line${hidden === 1 ? "" : "s"}`,
|
|
76
|
+
extra,
|
|
77
|
+
]);
|
|
78
|
+
return [row(ctx, `${" ".repeat(BODY_INDENT)}${styled(ctx, body, { fg: "muted" })}`)];
|
|
79
|
+
}
|
|
80
|
+
export function buildTurnStartLines(ctx, event) {
|
|
81
|
+
if (!verbose(ctx))
|
|
82
|
+
return [];
|
|
83
|
+
const text = sanitizeDisplayText(event.displayPrompt ?? event.prompt).trim();
|
|
84
|
+
if (text === "")
|
|
85
|
+
return [];
|
|
86
|
+
const rail = styled(ctx, `${ctx.glyphs.userRail} `, { fg: "userBorder" });
|
|
87
|
+
return wrapWithPrefixes(text, { width: ctx.width - 2 }).map((line) => row(ctx, `${rail}${styled(ctx, line, { fg: "muted" })}`));
|
|
88
|
+
}
|
|
89
|
+
/** Status text drives the spinner at `normal`; `--verbose` also logs each one. */
|
|
90
|
+
export function buildStatusLines(ctx, event) {
|
|
91
|
+
if (!verbose(ctx))
|
|
92
|
+
return [];
|
|
93
|
+
const text = sanitizeDisplayText(event.text).trim();
|
|
94
|
+
if (text === "")
|
|
95
|
+
return [];
|
|
96
|
+
return [row(ctx, styled(ctx, meta(ctx, [ctx.glyphs.separator, text]), { fg: "muted" }))];
|
|
97
|
+
}
|
|
98
|
+
/** Streaming fragments are aggregated by their terminal event; nothing to print. */
|
|
99
|
+
export function buildThinkingDeltaLines() {
|
|
100
|
+
return [];
|
|
101
|
+
}
|
|
102
|
+
export function buildThinkingBlockLines(ctx, event) {
|
|
103
|
+
if (quiet(ctx) || !ctx.showThinking)
|
|
104
|
+
return [];
|
|
105
|
+
const content = sanitizeDisplayText(verbose(ctx) ? event.content : liveThinkingDisplay(event.content)).trim();
|
|
106
|
+
if (content === "")
|
|
107
|
+
return [];
|
|
108
|
+
const gutter = styled(ctx, `${ctx.glyphs.thinkingGutter} `, { fg: "thinking", dim: true });
|
|
109
|
+
return wrapWithPrefixes(content, { width: ctx.width - 2 }).map((line) => row(ctx, `${gutter}${styled(ctx, line, { fg: "thinking", dim: true })}`));
|
|
110
|
+
}
|
|
111
|
+
export function buildAssistantDeltaLines() {
|
|
112
|
+
return [];
|
|
113
|
+
}
|
|
114
|
+
export function buildAssistantMessageLines(ctx, event) {
|
|
115
|
+
return renderAnswerLines(ctx, event.text);
|
|
116
|
+
}
|
|
117
|
+
/** Shared by `assistant-message` and the `finish()` outcome write. */
|
|
118
|
+
export function renderAnswerLines(ctx, text) {
|
|
119
|
+
const source = sanitizeDisplayText(text);
|
|
120
|
+
if (source.trim() === "")
|
|
121
|
+
return [];
|
|
122
|
+
const bullet = styled(ctx, `${ctx.glyphs.assistantBullet} `, { fg: "magenta" });
|
|
123
|
+
const rendered = withColorMode(ctx.ink.colorMode, () => renderMarkdownLines(source, {
|
|
124
|
+
width: Math.max(20, ctx.width - 2),
|
|
125
|
+
stripOuterIndent: true,
|
|
126
|
+
}));
|
|
127
|
+
const body = rendered.length > 0 ? rendered : [source];
|
|
128
|
+
return body.map((line, index) => {
|
|
129
|
+
if (line.trim() === "")
|
|
130
|
+
return "";
|
|
131
|
+
const paint = line.includes("\x1b") ? line : styled(ctx, line, { fg: "response" });
|
|
132
|
+
return row(ctx, `${index === 0 ? bullet : " "}${paint}`);
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
export function buildNoticeLines(ctx, event) {
|
|
136
|
+
if (quiet(ctx))
|
|
137
|
+
return [];
|
|
138
|
+
const token = event.level === "warn" ? "activity" : "muted";
|
|
139
|
+
const head = marker(ctx, ctx.glyphs.warning, event.level, token);
|
|
140
|
+
const text = sanitizeDisplayText(event.text).trim();
|
|
141
|
+
if (text === "")
|
|
142
|
+
return [];
|
|
143
|
+
const rows = wrapWithPrefixes(text, { width: Math.max(1, ctx.width - 2) });
|
|
144
|
+
return rows.map((line, index) => row(ctx, `${index === 0 ? `${head} ` : " "}${styled(ctx, line, { fg: token })}`));
|
|
145
|
+
}
|
|
146
|
+
export function buildToolCallLines(ctx, event) {
|
|
147
|
+
if (quiet(ctx))
|
|
148
|
+
return [];
|
|
149
|
+
const glyph = marker(ctx, ctx.glyphs.toolRunning, "tool", "activity");
|
|
150
|
+
const name = styled(ctx, event.name, { fg: "cyan", bold: true });
|
|
151
|
+
const args = isFileMutationTool(event.name)
|
|
152
|
+
? undefined
|
|
153
|
+
: clampArgsDisplay(event.argsDisplay || undefined)?.split("\n")[0]?.trim();
|
|
154
|
+
const left = args
|
|
155
|
+
? `${glyph} ${name}${styled(ctx, `(${args})`, { fg: "muted" })}`
|
|
156
|
+
: `${glyph} ${name}`;
|
|
157
|
+
return [row(ctx, left)];
|
|
158
|
+
}
|
|
159
|
+
/** Queued → executing is a spinner label change, not a transcript row. */
|
|
160
|
+
export function buildToolStartLines() {
|
|
161
|
+
return [];
|
|
162
|
+
}
|
|
163
|
+
export function buildToolOutputLines(ctx, event, tool = {}) {
|
|
164
|
+
if (quiet(ctx))
|
|
165
|
+
return [];
|
|
166
|
+
const presented = presentOutput(event.chunk, undefined, verbose(ctx), tool.name);
|
|
167
|
+
const kept = presented.lines.slice(0, ctx.bodyRows);
|
|
168
|
+
if (kept.length === 0)
|
|
169
|
+
return [];
|
|
170
|
+
const hidden = presented.lines.length - kept.length + presented.hiddenAboveCount;
|
|
171
|
+
const branch = styled(ctx, ` ${ctx.glyphs.bodyBranch} `, { fg: "muted" });
|
|
172
|
+
const pad = " ".repeat(BODY_INDENT);
|
|
173
|
+
const budget = Math.max(1, ctx.width - BODY_INDENT);
|
|
174
|
+
const lines = [];
|
|
175
|
+
for (const [index, raw] of kept.entries()) {
|
|
176
|
+
const text = adaptPresenterGlyphs(raw, ctx.ink.unicode);
|
|
177
|
+
for (const [wrapped, chunk] of wrapAnsiLine(text, budget).entries()) {
|
|
178
|
+
const prefix = index === 0 && wrapped === 0 ? branch : pad;
|
|
179
|
+
lines.push(row(ctx, `${prefix}${styled(ctx, chunk, { fg: "toolOutput" })}`));
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
lines.push(...hiddenTrailer(ctx, hidden));
|
|
183
|
+
if (presented.truncatedNotice) {
|
|
184
|
+
lines.push(...indented(ctx, presented.truncatedNotice, { fg: "muted" }));
|
|
185
|
+
}
|
|
186
|
+
return lines;
|
|
187
|
+
}
|
|
188
|
+
const RESULT_LABEL = { ok: "done", failed: "failed" };
|
|
189
|
+
function exitSuffix(ctx, exitCode) {
|
|
190
|
+
if (exitCode === undefined || exitCode === 0)
|
|
191
|
+
return undefined;
|
|
192
|
+
if (exitCode === 127)
|
|
193
|
+
return meta(ctx, [String(exitCode), "not found"]);
|
|
194
|
+
if (exitCode === 126)
|
|
195
|
+
return meta(ctx, [String(exitCode), "not executable"]);
|
|
196
|
+
return String(exitCode);
|
|
197
|
+
}
|
|
198
|
+
export function buildToolResultLines(ctx, event, extras = {}) {
|
|
199
|
+
if (quiet(ctx))
|
|
200
|
+
return [];
|
|
201
|
+
const state = event.ok ? "ok" : "failed";
|
|
202
|
+
const token = event.ok ? "success" : "diffDel";
|
|
203
|
+
const glyph = marker(ctx, event.ok ? ctx.glyphs.toolOk : ctx.glyphs.toolFailed, state, token);
|
|
204
|
+
const body = meta(ctx, [
|
|
205
|
+
RESULT_LABEL[state],
|
|
206
|
+
exitSuffix(ctx, event.exitCode),
|
|
207
|
+
extras.elapsed,
|
|
208
|
+
]);
|
|
209
|
+
const lines = [row(ctx, `${glyph} ${styled(ctx, body, { fg: token })}`)];
|
|
210
|
+
if (!event.ok) {
|
|
211
|
+
const detail = sanitizeDisplayText(event.summary).split("\n")[0]?.trim();
|
|
212
|
+
if (detail)
|
|
213
|
+
lines.push(...indented(ctx, detail, { fg: "diffDel" }));
|
|
214
|
+
}
|
|
215
|
+
if (event.artifactPath) {
|
|
216
|
+
lines.push(...indented(ctx, `saved ${event.artifactPath}`, { fg: "muted" }));
|
|
217
|
+
}
|
|
218
|
+
return lines;
|
|
219
|
+
}
|
|
220
|
+
export function buildToolBlockedLines(ctx, event) {
|
|
221
|
+
if (quiet(ctx))
|
|
222
|
+
return [];
|
|
223
|
+
const glyph = marker(ctx, ctx.glyphs.toolBlocked, "blocked", "activity");
|
|
224
|
+
const name = styled(ctx, event.name, { fg: "cyan", bold: true });
|
|
225
|
+
const lines = [
|
|
226
|
+
row(ctx, `${glyph} ${name} ${styled(ctx, "blocked", { fg: "activity" })}`),
|
|
227
|
+
];
|
|
228
|
+
const reason = sanitizeDisplayText(event.reason).trim();
|
|
229
|
+
if (reason !== "")
|
|
230
|
+
lines.push(...indented(ctx, reason, { fg: "activity" }));
|
|
231
|
+
return lines;
|
|
232
|
+
}
|
|
233
|
+
function statsSuffix(ctx, change) {
|
|
234
|
+
const minus = ctx.ink.unicode ? "−" : "-";
|
|
235
|
+
return `${styled(ctx, `+${change.stats.added}`, { fg: "diffAdd" })} ${styled(ctx, `${minus}${change.stats.removed}`, { fg: "diffDel" })}`;
|
|
236
|
+
}
|
|
237
|
+
function diffRowLine(ctx, line) {
|
|
238
|
+
const prefix = line.prefix === "−" && !ctx.ink.unicode ? "-" : line.prefix;
|
|
239
|
+
const tone = line.tone === "add"
|
|
240
|
+
? { fg: "diffAdd" }
|
|
241
|
+
: line.tone === "del"
|
|
242
|
+
? { fg: "diffDel" }
|
|
243
|
+
: line.tone === "gap"
|
|
244
|
+
? { fg: "muted" }
|
|
245
|
+
: line.tone === "header"
|
|
246
|
+
? { fg: "muted", bold: true }
|
|
247
|
+
: {};
|
|
248
|
+
const gutter = styled(ctx, padStartToWidth(line.gutter, GUTTER_WIDTH), {
|
|
249
|
+
fg: "diffGutter",
|
|
250
|
+
});
|
|
251
|
+
const head = `${gutter} ${styled(ctx, prefix, tone)} `;
|
|
252
|
+
const budget = Math.max(1, ctx.width - DIFF_CODE_COLUMN);
|
|
253
|
+
let text = line.displayText.slice(0, budget);
|
|
254
|
+
if (line.tone === "context" && ctx.ink.colorMode !== "none") {
|
|
255
|
+
text = "";
|
|
256
|
+
for (const span of line.spans) {
|
|
257
|
+
text += ctx.ink.hex(syntaxColor(span.kind, ctx.ink.theme), span.text);
|
|
258
|
+
}
|
|
259
|
+
text = clipToWidth(text, budget);
|
|
260
|
+
}
|
|
261
|
+
else if (line.tone !== "context") {
|
|
262
|
+
text = styled(ctx, text, tone);
|
|
263
|
+
}
|
|
264
|
+
return row(ctx, sealStyle(`${head}${text}`));
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* File-diff card for a mutation tool: title row plus `+N −M`, hunks only under
|
|
268
|
+
* `--verbose` (§3 rule 6).
|
|
269
|
+
*/
|
|
270
|
+
export function buildToolDiffLines(ctx, event, name) {
|
|
271
|
+
if (quiet(ctx))
|
|
272
|
+
return [];
|
|
273
|
+
const changes = event.fileChanges ?? [];
|
|
274
|
+
const primary = changes[0];
|
|
275
|
+
const status = event.ok ? "ok" : "failed";
|
|
276
|
+
const pathOrDisplay = changes.length > 1 ? `${changes.length} file(s)` : (primary?.path ?? "");
|
|
277
|
+
const titled = fileToolTitle(name, status, pathOrDisplay, primary?.kind);
|
|
278
|
+
const glyph = marker(ctx, event.ok ? ctx.glyphs.toolOk : ctx.glyphs.toolFailed, status, event.ok ? "success" : "diffDel");
|
|
279
|
+
const left = `${glyph} ${styled(ctx, titled.title, { fg: "cyan", bold: true })}`;
|
|
280
|
+
const lines = [
|
|
281
|
+
alignEnds(left, primary ? statsSuffix(ctx, primary) : "", ctx.width, ctx.glyphs.ellipsis),
|
|
282
|
+
];
|
|
283
|
+
if (!primary)
|
|
284
|
+
return lines;
|
|
285
|
+
if (!verbose(ctx)) {
|
|
286
|
+
lines.push(row(ctx, ` ${styled(ctx, collapsedFileChangeLabel(primary), { fg: "muted" })}`));
|
|
287
|
+
return lines;
|
|
288
|
+
}
|
|
289
|
+
const maxRows = ctx.bodyRows;
|
|
290
|
+
const maxLineChars = Math.max(16, ctx.width - DIFF_CODE_COLUMN);
|
|
291
|
+
let emitted = 0;
|
|
292
|
+
for (const change of changes) {
|
|
293
|
+
if (emitted >= maxRows)
|
|
294
|
+
break;
|
|
295
|
+
if (changes.length > 1) {
|
|
296
|
+
lines.push(row(ctx, ` ${styled(ctx, change.path, { fg: "cyan" })} ${statsSuffix(ctx, change)}`));
|
|
297
|
+
}
|
|
298
|
+
for (const line of presentFileChangePreview(change, { maxLineChars, maxRows })) {
|
|
299
|
+
if (emitted >= maxRows)
|
|
300
|
+
break;
|
|
301
|
+
lines.push(diffRowLine(ctx, line));
|
|
302
|
+
emitted += 1;
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
const total = changes.reduce((sum, c) => sum + c.stats.added + c.stats.removed, 0);
|
|
306
|
+
lines.push(...hiddenTrailer(ctx, Math.max(0, total - emitted)));
|
|
307
|
+
return lines;
|
|
308
|
+
}
|
|
309
|
+
function batchSectionsFor(body) {
|
|
310
|
+
const parsed = parseBatchSections(body);
|
|
311
|
+
return parsed.length > 0 ? parsed : buildBatchCardsFromSpool(body);
|
|
312
|
+
}
|
|
313
|
+
/** `tool.batch` body: one row per nested tool, plus the shared summary line. */
|
|
314
|
+
export function buildBatchLines(ctx, body) {
|
|
315
|
+
if (quiet(ctx))
|
|
316
|
+
return [];
|
|
317
|
+
const sections = batchSectionsFor(body);
|
|
318
|
+
if (sections.length === 0)
|
|
319
|
+
return [];
|
|
320
|
+
const cap = verbose(ctx) ? sections.length : SECTION_ROWS;
|
|
321
|
+
const shown = sections.slice(0, cap);
|
|
322
|
+
const lines = [];
|
|
323
|
+
for (const section of shown) {
|
|
324
|
+
const status = section.status ?? (section.ok ? "ok" : "fail");
|
|
325
|
+
const presented = presentBatchSection(section, verbose(ctx));
|
|
326
|
+
const token = status === "ok" ? "success" : status === "running" ? "activity" : "diffDel";
|
|
327
|
+
const glyph = marker(ctx, adaptPresenterGlyphs(presented.glyph, ctx.ink.unicode), status, token);
|
|
328
|
+
lines.push(alignEnds(` ${glyph} ${styled(ctx, section.name, { fg: "cyan" })}`, styled(ctx, presented.statusLabel, { fg: token }), ctx.width, ctx.glyphs.ellipsis));
|
|
329
|
+
if (!verbose(ctx) || !presented.hasBody)
|
|
330
|
+
continue;
|
|
331
|
+
for (const line of cleanToolOutputLines(section.body).slice(0, ctx.bodyRows)) {
|
|
332
|
+
lines.push(row(ctx, `${" ".repeat(BODY_INDENT)}${styled(ctx, adaptPresenterGlyphs(line, ctx.ink.unicode), { fg: "toolOutput" })}`));
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
const hidden = sections.length - shown.length;
|
|
336
|
+
const footer = meta(ctx, [
|
|
337
|
+
batchSummaryLine(sections) || undefined,
|
|
338
|
+
hidden > 0 ? `${ctx.glyphs.ellipsis} +${hidden} more` : undefined,
|
|
339
|
+
]);
|
|
340
|
+
if (footer !== "")
|
|
341
|
+
lines.push(row(ctx, ` ${styled(ctx, footer, { fg: "muted" })}`));
|
|
342
|
+
return lines;
|
|
343
|
+
}
|
|
344
|
+
export function buildPlanUpdateLines(ctx, event) {
|
|
345
|
+
if (quiet(ctx))
|
|
346
|
+
return [];
|
|
347
|
+
const plan = event.plan;
|
|
348
|
+
const progress = progressView(plan);
|
|
349
|
+
const glyph = marker(ctx, ctx.glyphs.compacted, "plan", "magenta");
|
|
350
|
+
const head = meta(ctx, ["plan", `${progress.done}/${progress.total}`, plan.status]);
|
|
351
|
+
const lines = [row(ctx, `${glyph} ${styled(ctx, head, { fg: "magenta" })}`)];
|
|
352
|
+
const cap = verbose(ctx) ? plan.tasks.length : SECTION_ROWS;
|
|
353
|
+
for (const task of plan.tasks.slice(0, cap)) {
|
|
354
|
+
const mark = ctx.plainPrefixes
|
|
355
|
+
? `[${TASK_STATE_LABEL[task.state]}]`
|
|
356
|
+
: adaptPresenterGlyphs(taskGlyph(task), ctx.ink.unicode);
|
|
357
|
+
lines.push(row(ctx, ` ${styled(ctx, `${mark} ${cleanTaskTitle(task)}`, { fg: "muted" })}`));
|
|
358
|
+
}
|
|
359
|
+
const hidden = plan.tasks.length - Math.min(plan.tasks.length, cap);
|
|
360
|
+
if (hidden > 0) {
|
|
361
|
+
lines.push(row(ctx, ` ${styled(ctx, `${ctx.glyphs.ellipsis} +${hidden} more`, { fg: "muted" })}`));
|
|
362
|
+
}
|
|
363
|
+
return lines;
|
|
364
|
+
}
|
|
365
|
+
export function buildConfirmRequestLines(ctx, event) {
|
|
366
|
+
if (quiet(ctx))
|
|
367
|
+
return [];
|
|
368
|
+
const glyph = marker(ctx, ctx.glyphs.toolBlocked, "confirm", "activity");
|
|
369
|
+
const text = sanitizeDisplayText(event.prompt).trim();
|
|
370
|
+
return [row(ctx, `${glyph} ${styled(ctx, meta(ctx, [event.kind, text]), { fg: "activity" })}`)];
|
|
371
|
+
}
|
|
372
|
+
/** The outcome is written by `finish()`; `turn-end` itself prints nothing. */
|
|
373
|
+
export function buildTurnEndLines() {
|
|
374
|
+
return [];
|
|
375
|
+
}
|
|
376
|
+
export function buildTurnAbortedLines(ctx) {
|
|
377
|
+
if (quiet(ctx))
|
|
378
|
+
return [];
|
|
379
|
+
const glyph = marker(ctx, ctx.glyphs.toolBlocked, "aborted", "activity");
|
|
380
|
+
return [row(ctx, `${glyph} ${styled(ctx, "aborted", { fg: "activity" })}`)];
|
|
381
|
+
}
|
|
382
|
+
export function buildTurnErrorLines(ctx, event) {
|
|
383
|
+
if (quiet(ctx))
|
|
384
|
+
return [];
|
|
385
|
+
const glyph = marker(ctx, ctx.glyphs.toolFailed, "error", "diffDel");
|
|
386
|
+
const text = sanitizeDisplayText(event.message).trim();
|
|
387
|
+
return [row(ctx, `${glyph} ${styled(ctx, meta(ctx, ["error", text]), { fg: "diffDel" })}`)];
|
|
388
|
+
}
|
|
389
|
+
function tokenLabel(before, after) {
|
|
390
|
+
if (before <= 0 && after <= 0)
|
|
391
|
+
return undefined;
|
|
392
|
+
return `~${before.toLocaleString()} → ~${after.toLocaleString()} tokens`;
|
|
393
|
+
}
|
|
394
|
+
function compactionRow(ctx, head, label, token) {
|
|
395
|
+
const glyph = marker(ctx, ctx.glyphs.compacted, "compaction", token);
|
|
396
|
+
return [row(ctx, `${glyph} ${styled(ctx, meta(ctx, [head, label]), { fg: token })}`)];
|
|
397
|
+
}
|
|
398
|
+
export function buildCompactionStartLines(ctx, event) {
|
|
399
|
+
if (quiet(ctx))
|
|
400
|
+
return [];
|
|
401
|
+
const label = event.beforeTokens > 0 ? `~${event.beforeTokens.toLocaleString()} tokens before` : undefined;
|
|
402
|
+
return compactionRow(ctx, "compacting context", label, "cyan");
|
|
403
|
+
}
|
|
404
|
+
/** Compaction bodies never stream to the transcript (§3 rule 8). */
|
|
405
|
+
export function buildCompactionDeltaLines() {
|
|
406
|
+
return [];
|
|
407
|
+
}
|
|
408
|
+
export function buildCompactionCompletedLines(ctx, event) {
|
|
409
|
+
if (quiet(ctx))
|
|
410
|
+
return [];
|
|
411
|
+
return compactionRow(ctx, "compacted context", tokenLabel(event.beforeTokens, event.afterTokens), "cyan");
|
|
412
|
+
}
|
|
413
|
+
export function buildCompactionFailedLines(ctx, event) {
|
|
414
|
+
if (quiet(ctx))
|
|
415
|
+
return [];
|
|
416
|
+
const retained = event.retainedTokens > 0
|
|
417
|
+
? `~${event.retainedTokens.toLocaleString()} tokens retained`
|
|
418
|
+
: "original context retained";
|
|
419
|
+
return compactionRow(ctx, "compaction failed", meta(ctx, [sanitizeDisplayText(event.message).trim() || undefined, retained]), "activity");
|
|
420
|
+
}
|
|
421
|
+
export function buildCompactedLines(ctx, event) {
|
|
422
|
+
if (quiet(ctx))
|
|
423
|
+
return [];
|
|
424
|
+
return compactionRow(ctx, "compacted context", tokenLabel(event.beforeTokens, event.afterTokens), "cyan");
|
|
425
|
+
}
|
|
426
|
+
export function buildTokenUsageLines(ctx, event) {
|
|
427
|
+
if (!verbose(ctx))
|
|
428
|
+
return [];
|
|
429
|
+
const body = meta(ctx, [
|
|
430
|
+
event.model,
|
|
431
|
+
`${event.usage.promptTokens.toLocaleString()} in`,
|
|
432
|
+
`${event.usage.completionTokens.toLocaleString()} out`,
|
|
433
|
+
]);
|
|
434
|
+
return [row(ctx, styled(ctx, body, { fg: "muted" }))];
|
|
435
|
+
}
|
|
436
|
+
export function buildContextEstimateLines(ctx, event) {
|
|
437
|
+
if (!verbose(ctx))
|
|
438
|
+
return [];
|
|
439
|
+
const body = meta(ctx, [
|
|
440
|
+
event.model,
|
|
441
|
+
`~${event.estimatedTokens.toLocaleString()} tokens assembled`,
|
|
442
|
+
]);
|
|
443
|
+
return [row(ctx, styled(ctx, body, { fg: "muted" }))];
|
|
444
|
+
}
|
|
445
|
+
//# sourceMappingURL=stream-blocks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stream-blocks.js","sourceRoot":"","sources":["../../src/noninteractive/stream-blocks.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAuB,MAAM,uBAAuB,CAAC;AAC/F,OAAO,EACL,SAAS,EACT,WAAW,EACX,aAAa,EACb,eAAe,EACf,SAAS,EACT,kBAAkB,GACnB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,oBAAoB,EAAE,SAAS,EAAe,MAAM,6BAA6B,CAAC;AAC3F,OAAO,EACL,cAAc,EACd,aAAa,GAId,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,EACL,gBAAgB,EAChB,wBAAwB,EACxB,kBAAkB,EAClB,mBAAmB,GAEpB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,wBAAwB,EACxB,wBAAwB,EACxB,WAAW,GAEZ,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,oBAAoB,EACpB,gBAAgB,EAChB,aAAa,GACd,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,+CAA+C,CAAC;AACpF,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAC/E,OAAO,EAAE,mBA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* (06-ONESHOT §2/§3).
|
|
4
|
+
*
|
|
5
|
+
* stdout carries the assistant answer and nothing else; every status, notice,
|
|
6
|
+
* thinking row, tool card, diff, compaction row and spinner frame goes to
|
|
7
|
+
* stderr. No cursor movement or erase sequence is ever written to stdout, so a
|
|
8
|
+
* redirected run stays a correct transcript.
|
|
9
|
+
*/
|
|
10
|
+
import type { AgentEvent } from "../agent/events.js";
|
|
11
|
+
import type { TurnOutcome } from "../agent/turn-outcome.js";
|
|
12
|
+
import { type StreamVerbosity } from "./stream-blocks.js";
|
|
13
|
+
export interface StreamRendererOptions {
|
|
14
|
+
readonly out: NodeJS.WritableStream;
|
|
15
|
+
readonly err: NodeJS.WritableStream;
|
|
16
|
+
readonly columns: number;
|
|
17
|
+
readonly color: boolean;
|
|
18
|
+
readonly unicode: boolean;
|
|
19
|
+
readonly verbosity: StreamVerbosity;
|
|
20
|
+
readonly showThinking: boolean;
|
|
21
|
+
}
|
|
22
|
+
export declare class StreamRenderer {
|
|
23
|
+
private readonly options;
|
|
24
|
+
private readonly clock;
|
|
25
|
+
private readonly ctx;
|
|
26
|
+
private readonly spinner;
|
|
27
|
+
private readonly tools;
|
|
28
|
+
private readonly startedAt;
|
|
29
|
+
private label;
|
|
30
|
+
private lastAnswer;
|
|
31
|
+
private finished;
|
|
32
|
+
constructor(options: StreamRendererOptions, clock?: () => number);
|
|
33
|
+
handle(event: AgentEvent): void;
|
|
34
|
+
/** Writes the rendered outcome to stdout exactly once and stops the spinner. */
|
|
35
|
+
finish(outcome: TurnOutcome): void;
|
|
36
|
+
private toolResultLines;
|
|
37
|
+
private spin;
|
|
38
|
+
private writeOut;
|
|
39
|
+
private writeErr;
|
|
40
|
+
}
|