@linxiraos/pi-tui 1.4.4 → 1.4.7
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/CHANGELOG.md +208 -207
- package/README.md +34 -34
- package/dist/types/app-keybindings.d.ts +20 -0
- package/dist/types/apps/session-picker.d.ts +5 -0
- package/dist/types/charts/chart-plan.d.ts +9 -7
- package/dist/types/chat/assistant-message.d.ts +15 -3
- package/dist/types/chat/bash-execution.d.ts +2 -0
- package/dist/types/chat/display-preferences.d.ts +2 -0
- package/dist/types/chat/extension-types.d.ts +31 -0
- package/dist/types/chat/reply-write.d.ts +48 -0
- package/dist/types/chat/table-chart.d.ts +4 -3
- package/dist/types/chat/tool-execution.d.ts +1 -2
- package/dist/types/chat/transcript-outline.d.ts +7 -0
- package/dist/types/chat/transcript-render-helpers.d.ts +2 -0
- package/dist/types/chrome/context-map.d.ts +15 -0
- package/dist/types/chrome/context-presentation.d.ts +48 -0
- package/dist/types/chrome/context-view-model.d.ts +77 -0
- package/dist/types/chrome/index.d.ts +1 -0
- package/dist/types/chrome/transcript-notice.d.ts +35 -0
- package/dist/types/chrome/transcript-status.d.ts +20 -8
- package/dist/types/components/editor.d.ts +8 -0
- package/dist/types/components/image.d.ts +20 -0
- package/dist/types/components/loader.d.ts +1 -1
- package/dist/types/components/markdown.d.ts +7 -0
- package/dist/types/native/blobs.d.ts +11 -1
- package/dist/types/native/picker.d.ts +4 -4
- package/dist/types/overlays/advisor-config.d.ts +6 -0
- package/dist/types/overlays/agent-hub-projection.d.ts +3 -1
- package/dist/types/overlays/annotation-overlay.d.ts +7 -1
- package/dist/types/overlays/annotation-types.d.ts +28 -0
- package/dist/types/overlays/ask-dialog.d.ts +12 -3
- package/dist/types/overlays/btw-history-panel.d.ts +16 -2
- package/dist/types/overlays/btw-history.d.ts +7 -0
- package/dist/types/overlays/btw-panel.d.ts +2 -0
- package/dist/types/overlays/context-viewer-format.d.ts +42 -0
- package/dist/types/overlays/context-viewer-overview.d.ts +70 -0
- package/dist/types/overlays/context-viewer.d.ts +25 -0
- package/dist/types/overlays/hook-input.d.ts +1 -0
- package/dist/types/overlays/login-dialog.d.ts +5 -1
- package/dist/types/overlays/mcp-add-wizard.d.ts +2 -0
- package/dist/types/overlays/model-browser.d.ts +10 -1
- package/dist/types/overlays/oauth-selector.d.ts +23 -0
- package/dist/types/overlays/pause-screen.d.ts +13 -3
- package/dist/types/overlays/plan-review-overlay.d.ts +2 -0
- package/dist/types/overlays/rewind-selector.d.ts +1 -1
- package/dist/types/overlays/running-subagent-badge.d.ts +7 -1
- package/dist/types/overlays/session-selector.d.ts +22 -2
- package/dist/types/prompt/composer.d.ts +43 -0
- package/dist/types/prompt/interactive-context-helpers.d.ts +10 -3
- package/dist/types/prompt/macos-spelling.d.ts +2 -2
- package/dist/types/render/extension-links.d.ts +65 -0
- package/dist/types/render/hyperlink.d.ts +38 -7
- package/dist/types/render/index.d.ts +1 -0
- package/dist/types/render/output-pane.d.ts +1 -1
- package/dist/types/render/render-utils.d.ts +7 -1
- package/dist/types/setup/scenes/glyph.d.ts +1 -1
- package/dist/types/setup/scenes/model.d.ts +1 -1
- package/dist/types/setup/scenes/outro.d.ts +5 -4
- package/dist/types/setup/scenes/sign-in.d.ts +13 -8
- package/dist/types/setup/scenes/types.d.ts +16 -1
- package/dist/types/setup/startup-splash.d.ts +1 -1
- package/dist/types/setup/wizard-overlay.d.ts +11 -7
- package/dist/types/setup/wizard.d.ts +5 -1
- package/dist/types/status-line/component.d.ts +3 -3
- package/dist/types/status-line/context-usage.d.ts +42 -35
- package/dist/types/status-line/host.d.ts +6 -2
- package/dist/types/terminal-capabilities.d.ts +7 -0
- package/dist/types/theme/symbols.d.ts +1 -1
- package/dist/types/theme/theme.d.ts +0 -23
- package/dist/types/tools/ask.d.ts +4 -0
- package/dist/types/tools/bash-interactive.d.ts +6 -0
- package/dist/types/tools/bash.d.ts +2 -0
- package/dist/types/tools/default-renderer.d.ts +6 -4
- package/dist/types/tools/edit.d.ts +3 -1
- package/dist/types/tools/fetch.d.ts +1 -0
- package/dist/types/tools/github.d.ts +3 -0
- package/dist/types/tools/grouped-file-output.d.ts +2 -0
- package/dist/types/tools/irc.d.ts +6 -0
- package/dist/types/tools/json-tree.d.ts +23 -4
- package/dist/types/tools/lsp.d.ts +2 -0
- package/dist/types/tools/mcp.d.ts +7 -6
- package/dist/types/tools/native-view.d.ts +1 -1
- package/dist/types/tools/read.d.ts +3 -0
- package/dist/types/tools/renderer.d.ts +2 -0
- package/dist/types/tools/streaming-output.d.ts +11 -0
- package/dist/types/tools/task.d.ts +9 -1
- package/dist/types/tools/url-scheme-host.d.ts +17 -0
- package/dist/types/tools/wait.d.ts +16 -2
- package/dist/types/tools/yield.d.ts +1 -1
- package/dist/types/tui.d.ts +9 -2
- package/dist/types/vim.d.ts +39 -0
- package/package.json +10 -14
- package/src/app-keybindings.d.ts +20 -0
- package/src/app-keybindings.ts +20 -0
- package/src/apps/session-picker.ts +7 -0
- package/src/charts/chart-plan.d.ts +9 -7
- package/src/charts/chart-plan.ts +20 -50
- package/src/chat/advisor-message.ts +2 -0
- package/src/chat/assistant-message.d.ts +15 -3
- package/src/chat/assistant-message.ts +137 -19
- package/src/chat/background-tan-message.ts +4 -0
- package/src/chat/bash-execution.d.ts +2 -0
- package/src/chat/bash-execution.ts +13 -1
- package/src/chat/chat-transcript-builder.ts +58 -28
- package/src/chat/compaction-summary-message.ts +2 -1
- package/src/chat/display-preferences.d.ts +2 -0
- package/src/chat/display-preferences.ts +3 -0
- package/src/chat/extension-types.d.ts +31 -0
- package/src/chat/extension-types.ts +34 -0
- package/src/chat/read-tool-group.ts +1 -2
- package/src/chat/reply-write.d.ts +48 -0
- package/src/chat/reply-write.ts +127 -0
- package/src/chat/skill-message.ts +2 -6
- package/src/chat/table-chart.d.ts +4 -3
- package/src/chat/table-chart.ts +10 -4
- package/src/chat/tool-execution.d.ts +1 -2
- package/src/chat/tool-execution.ts +20 -13
- package/src/chat/transcript-outline.d.ts +7 -0
- package/src/chat/transcript-outline.ts +27 -0
- package/src/chat/transcript-render-helpers.d.ts +2 -0
- package/src/chat/transcript-render-helpers.ts +66 -24
- package/src/chrome/context-map.ts +62 -0
- package/src/chrome/context-presentation.ts +26 -0
- package/src/chrome/context-view-model.ts +73 -0
- package/src/chrome/index.ts +1 -0
- package/src/chrome/transcript-container.ts +89 -59
- package/src/chrome/transcript-notice.d.ts +35 -0
- package/src/chrome/transcript-notice.ts +83 -0
- package/src/chrome/transcript-status.d.ts +20 -8
- package/src/chrome/transcript-status.ts +29 -29
- package/src/components/editor.d.ts +8 -0
- package/src/components/editor.ts +465 -14
- package/src/components/image.d.ts +20 -0
- package/src/components/image.ts +83 -18
- package/src/components/loader.d.ts +1 -1
- package/src/components/loader.ts +1 -1
- package/src/components/markdown.d.ts +7 -0
- package/src/components/markdown.ts +225 -13
- package/src/hotkeys-markdown.ts +2 -0
- package/src/native/backend.ts +5 -66
- package/src/native/blobs.d.ts +11 -1
- package/src/native/blobs.ts +5 -3
- package/src/native/picker.d.ts +4 -4
- package/src/native/picker.ts +4 -4
- package/src/overlays/advisor-config.ts +10 -12
- package/src/overlays/agent-hub-projection.d.ts +3 -1
- package/src/overlays/agent-hub-projection.ts +6 -5
- package/src/overlays/agent-hub.ts +51 -42
- package/src/overlays/annotation-overlay.ts +125 -37
- package/src/overlays/annotation-types.ts +24 -0
- package/src/overlays/ask-dialog.ts +125 -35
- package/src/overlays/btw-history-panel.ts +124 -12
- package/src/overlays/btw-history.ts +11 -0
- package/src/overlays/btw-panel.ts +8 -4
- package/src/overlays/context-viewer-format.ts +145 -0
- package/src/overlays/context-viewer-overview.ts +381 -0
- package/src/overlays/context-viewer.ts +728 -0
- package/src/overlays/hook-input.ts +2 -0
- package/src/overlays/hook-selector.ts +2 -2
- package/src/overlays/login-dialog.ts +31 -5
- package/src/overlays/mcp-add-wizard.ts +6 -1
- package/src/overlays/model-browser.ts +37 -0
- package/src/overlays/model-hub.ts +1 -7
- package/src/overlays/model-picker.ts +1 -10
- package/src/overlays/oauth-selector.ts +44 -6
- package/src/overlays/pause-screen.ts +166 -33
- package/src/overlays/plan-review-overlay.ts +13 -2
- package/src/overlays/rewind-selector.ts +29 -12
- package/src/overlays/running-subagent-badge.ts +12 -1
- package/src/overlays/session-selector.ts +313 -42
- package/src/overlays/settings-defs.ts +1 -0
- package/src/overlays/usage-dashboard.ts +20 -14
- package/src/prompt/composer.ts +216 -1
- package/src/prompt/custom-editor.ts +6 -1
- package/src/prompt/emoji-autocomplete.ts +0 -2
- package/src/prompt/interactive-context-helpers.ts +29 -4
- package/src/prompt/macos-spelling.ts +24 -15
- package/src/render/extension-links.d.ts +65 -0
- package/src/render/extension-links.ts +214 -0
- package/src/render/hyperlink.d.ts +38 -7
- package/src/render/hyperlink.ts +102 -23
- package/src/render/index.d.ts +1 -0
- package/src/render/index.ts +1 -0
- package/src/render/output-pane.d.ts +1 -1
- package/src/render/output-pane.ts +60 -17
- package/src/render/render-utils.d.ts +7 -1
- package/src/render/render-utils.ts +11 -2
- package/src/setup/scenes/composer.ts +2 -0
- package/src/setup/scenes/glyph.ts +3 -1
- package/src/setup/scenes/model.ts +192 -29
- package/src/setup/scenes/outro.ts +33 -15
- package/src/setup/scenes/sign-in.ts +194 -392
- package/src/setup/scenes/theme.ts +2 -0
- package/src/setup/scenes/types.ts +18 -1
- package/src/setup/startup-splash.ts +8 -7
- package/src/setup/wizard-overlay.ts +164 -35
- package/src/setup/wizard.ts +11 -2
- package/src/status-line/component.ts +10 -14
- package/src/status-line/context-usage.ts +122 -597
- package/src/status-line/host.ts +6 -2
- package/src/terminal-capabilities.d.ts +7 -0
- package/src/terminal-capabilities.ts +10 -0
- package/src/terminal.ts +24 -2
- package/src/theme/defaults.json +1 -0
- package/src/theme/loader.ts +1 -1
- package/src/theme/symbols.d.ts +1 -1
- package/src/theme/symbols.ts +16 -0
- package/src/theme/theme.d.ts +0 -23
- package/src/theme/theme.ts +2 -75
- package/src/tools/ask.d.ts +4 -0
- package/src/tools/ask.ts +4 -0
- package/src/tools/ast-grep.ts +3 -2
- package/src/tools/bash-interactive.d.ts +49 -0
- package/src/tools/bash-interactive.ts +6 -1
- package/src/tools/bash.d.ts +2 -0
- package/src/tools/bash.ts +7 -23
- package/src/tools/default-renderer.d.ts +6 -4
- package/src/tools/default-renderer.ts +9 -6
- package/src/tools/edit.d.ts +3 -1
- package/src/tools/edit.ts +8 -4
- package/src/tools/eval.ts +14 -4
- package/src/tools/fetch.d.ts +1 -0
- package/src/tools/fetch.ts +1 -0
- package/src/tools/find.ts +3 -10
- package/src/tools/github.d.ts +3 -0
- package/src/tools/github.ts +23 -3
- package/src/tools/glob.ts +4 -3
- package/src/tools/grep.ts +3 -4
- package/src/tools/grouped-file-output.d.ts +2 -0
- package/src/tools/grouped-file-output.ts +8 -2
- package/src/tools/irc.d.ts +6 -0
- package/src/tools/irc.ts +6 -0
- package/src/tools/job-widget.ts +13 -1
- package/src/tools/json-tree.d.ts +23 -4
- package/src/tools/json-tree.ts +132 -42
- package/src/tools/lsp.d.ts +2 -0
- package/src/tools/lsp.ts +36 -15
- package/src/tools/mcp.d.ts +7 -6
- package/src/tools/mcp.ts +41 -15
- package/src/tools/native-view.d.ts +1 -1
- package/src/tools/native-view.ts +3 -3
- package/src/tools/read.d.ts +3 -0
- package/src/tools/read.ts +3 -1
- package/src/tools/renderer.d.ts +2 -0
- package/src/tools/renderer.ts +2 -0
- package/src/tools/streaming-output.d.ts +11 -0
- package/src/tools/streaming-output.ts +41 -0
- package/src/tools/task.d.ts +9 -1
- package/src/tools/task.ts +59 -16
- package/src/tools/url-scheme-host.d.ts +17 -0
- package/src/tools/url-scheme-host.ts +21 -0
- package/src/tools/vibe.ts +14 -3
- package/src/tools/wait.d.ts +16 -2
- package/src/tools/wait.ts +16 -2
- package/src/tools/yield.d.ts +1 -1
- package/src/tools/yield.ts +18 -9
- package/src/tui.d.ts +9 -2
- package/src/tui.ts +102 -34
- package/src/vim.d.ts +39 -0
- package/src/vim.ts +313 -22
- package/dist/types/theme/defaults/index.d.ts +0 -10289
- package/src/theme/defaults/alabaster.json +0 -103
- package/src/theme/defaults/amethyst.json +0 -106
- package/src/theme/defaults/anthracite.json +0 -103
- package/src/theme/defaults/basalt.json +0 -101
- package/src/theme/defaults/birch.json +0 -105
- package/src/theme/defaults/dark-abyss.json +0 -101
- package/src/theme/defaults/dark-arctic.json +0 -114
- package/src/theme/defaults/dark-aurora.json +0 -105
- package/src/theme/defaults/dark-catppuccin.json +0 -117
- package/src/theme/defaults/dark-cavern.json +0 -101
- package/src/theme/defaults/dark-celestial.json +0 -116
- package/src/theme/defaults/dark-copper.json +0 -105
- package/src/theme/defaults/dark-cosmos.json +0 -100
- package/src/theme/defaults/dark-cyberpunk.json +0 -112
- package/src/theme/defaults/dark-dracula.json +0 -108
- package/src/theme/defaults/dark-eclipse.json +0 -101
- package/src/theme/defaults/dark-ember.json +0 -105
- package/src/theme/defaults/dark-equinox.json +0 -100
- package/src/theme/defaults/dark-forest.json +0 -106
- package/src/theme/defaults/dark-github.json +0 -115
- package/src/theme/defaults/dark-gruvbox.json +0 -122
- package/src/theme/defaults/dark-lavender.json +0 -105
- package/src/theme/defaults/dark-lunar.json +0 -99
- package/src/theme/defaults/dark-midnight.json +0 -105
- package/src/theme/defaults/dark-monochrome.json +0 -104
- package/src/theme/defaults/dark-monokai.json +0 -108
- package/src/theme/defaults/dark-nebula.json +0 -100
- package/src/theme/defaults/dark-neon-noir.json +0 -110
- package/src/theme/defaults/dark-nord.json +0 -108
- package/src/theme/defaults/dark-ocean.json +0 -111
- package/src/theme/defaults/dark-one.json +0 -110
- package/src/theme/defaults/dark-poimandres.json +0 -125
- package/src/theme/defaults/dark-rainforest.json +0 -101
- package/src/theme/defaults/dark-reef.json +0 -101
- package/src/theme/defaults/dark-retro.json +0 -102
- package/src/theme/defaults/dark-rose-pine.json +0 -106
- package/src/theme/defaults/dark-sakura.json +0 -105
- package/src/theme/defaults/dark-slate.json +0 -105
- package/src/theme/defaults/dark-solarized.json +0 -107
- package/src/theme/defaults/dark-solstice.json +0 -100
- package/src/theme/defaults/dark-starfall.json +0 -101
- package/src/theme/defaults/dark-sunset.json +0 -109
- package/src/theme/defaults/dark-swamp.json +0 -100
- package/src/theme/defaults/dark-synthwave.json +0 -113
- package/src/theme/defaults/dark-taiga.json +0 -101
- package/src/theme/defaults/dark-terminal.json +0 -105
- package/src/theme/defaults/dark-tokyo-night.json +0 -111
- package/src/theme/defaults/dark-tundra.json +0 -101
- package/src/theme/defaults/dark-twilight.json +0 -101
- package/src/theme/defaults/dark-volcanic.json +0 -101
- package/src/theme/defaults/graphite.json +0 -102
- package/src/theme/defaults/index.d.ts +0 -10289
- package/src/theme/defaults/index.ts +0 -203
- package/src/theme/defaults/light-arctic.json +0 -117
- package/src/theme/defaults/light-aurora-day.json +0 -101
- package/src/theme/defaults/light-canyon.json +0 -101
- package/src/theme/defaults/light-catppuccin.json +0 -116
- package/src/theme/defaults/light-cirrus.json +0 -100
- package/src/theme/defaults/light-coral.json +0 -105
- package/src/theme/defaults/light-cyberpunk.json +0 -106
- package/src/theme/defaults/light-dawn.json +0 -100
- package/src/theme/defaults/light-dunes.json +0 -101
- package/src/theme/defaults/light-eucalyptus.json +0 -105
- package/src/theme/defaults/light-forest.json +0 -110
- package/src/theme/defaults/light-frost.json +0 -105
- package/src/theme/defaults/light-github.json +0 -125
- package/src/theme/defaults/light-glacier.json +0 -101
- package/src/theme/defaults/light-gruvbox.json +0 -118
- package/src/theme/defaults/light-haze.json +0 -100
- package/src/theme/defaults/light-honeycomb.json +0 -105
- package/src/theme/defaults/light-lagoon.json +0 -101
- package/src/theme/defaults/light-lavender.json +0 -105
- package/src/theme/defaults/light-meadow.json +0 -101
- package/src/theme/defaults/light-mint.json +0 -105
- package/src/theme/defaults/light-monochrome.json +0 -111
- package/src/theme/defaults/light-ocean.json +0 -109
- package/src/theme/defaults/light-one.json +0 -109
- package/src/theme/defaults/light-opal.json +0 -101
- package/src/theme/defaults/light-orchard.json +0 -101
- package/src/theme/defaults/light-paper.json +0 -105
- package/src/theme/defaults/light-poimandres.json +0 -125
- package/src/theme/defaults/light-prism.json +0 -100
- package/src/theme/defaults/light-retro.json +0 -108
- package/src/theme/defaults/light-sand.json +0 -105
- package/src/theme/defaults/light-savanna.json +0 -101
- package/src/theme/defaults/light-solarized.json +0 -112
- package/src/theme/defaults/light-soleil.json +0 -100
- package/src/theme/defaults/light-sunset.json +0 -109
- package/src/theme/defaults/light-synthwave.json +0 -108
- package/src/theme/defaults/light-tokyo-night.json +0 -121
- package/src/theme/defaults/light-wetland.json +0 -101
- package/src/theme/defaults/light-zenith.json +0 -99
- package/src/theme/defaults/limestone.json +0 -104
- package/src/theme/defaults/mahogany.json +0 -107
- package/src/theme/defaults/marble.json +0 -103
- package/src/theme/defaults/obsidian.json +0 -101
- package/src/theme/defaults/onyx.json +0 -101
- package/src/theme/defaults/pearl.json +0 -103
- package/src/theme/defaults/porcelain.json +0 -101
- package/src/theme/defaults/quartz.json +0 -106
- package/src/theme/defaults/sandstone.json +0 -105
- package/src/theme/defaults/titanium.json +0 -100
|
@@ -32,9 +32,9 @@ export declare class StatusLineComponent<TSession extends StatusLineSession = St
|
|
|
32
32
|
updateSettings(settings: StatusLineSettings): void;
|
|
33
33
|
getEffectiveSettingsForTest(): EffectiveStatusLineSettings;
|
|
34
34
|
setAutoCompactEnabled(enabled: boolean): void;
|
|
35
|
-
setRunningSubagents(agentIds: readonly string[]):
|
|
35
|
+
setRunningSubagents(agentIds: readonly string[]): boolean;
|
|
36
36
|
/** Host-computed spend of the main session's whole subagent tree (Agent Hub projection). */
|
|
37
|
-
setSubagentTreeCost(cost: number):
|
|
37
|
+
setSubagentTreeCost(cost: number): boolean;
|
|
38
38
|
/**
|
|
39
39
|
* Compatibility shim for callers predating the simplified subagent badge.
|
|
40
40
|
* The status line now intentionally shows only the active count.
|
|
@@ -114,7 +114,7 @@ export declare class StatusLineComponent<TSession extends StatusLineSession = St
|
|
|
114
114
|
setRecording(recording: boolean): void;
|
|
115
115
|
/** Set the callback that presents detected Codex reset celebrations, or clear it with `undefined`. */
|
|
116
116
|
setCodexResetFireworksHandler(handler: ((event: CodexResetFireworksEvent) => void) | undefined): void;
|
|
117
|
-
/** Set the callback that presents
|
|
117
|
+
/** Set the callback that presents pool-wide saved-reset expiry warnings, or clear it with `undefined`. */
|
|
118
118
|
setResetExpiryNoticeHandler(handler: ((notice: string) => void) | undefined): void;
|
|
119
119
|
setHookStatus(key: string, text: string | undefined): void;
|
|
120
120
|
watchBranch(onBranchChange: () => void): void;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import type { AgentMessage, Tokenizer } from "@linxiraos/pi-agent-core";
|
|
2
2
|
import type { CompactionSettings } from "@linxiraos/pi-agent-core/compaction";
|
|
3
3
|
import type { Tool as AiTool, Model } from "@linxiraos/pi-ai";
|
|
4
|
-
import type { Theme } from "../theme/index.js";
|
|
5
|
-
import { Container } from "../tui.js";
|
|
6
|
-
import type { TspText } from "@linxiraos/pi-wire";
|
|
7
|
-
import type { DescribeContext, NativeNode } from "../native/node.js";
|
|
8
4
|
interface ContextSkill {
|
|
9
5
|
readonly name: string;
|
|
10
6
|
readonly description?: string;
|
|
@@ -63,8 +59,6 @@ interface CategoryInfo {
|
|
|
63
59
|
id: CategoryId;
|
|
64
60
|
label: string;
|
|
65
61
|
tokens: number;
|
|
66
|
-
color: "accent" | "warning" | "success" | "userMessageText" | "customMessageLabel";
|
|
67
|
-
glyph: string;
|
|
68
62
|
}
|
|
69
63
|
export interface ContextBreakdown {
|
|
70
64
|
model: Model | undefined;
|
|
@@ -104,6 +98,11 @@ export interface NonMessageTokenSource {
|
|
|
104
98
|
readonly state?: {
|
|
105
99
|
readonly tools?: readonly ContextTool[];
|
|
106
100
|
};
|
|
101
|
+
/**
|
|
102
|
+
* Whether requests to `model` ship description-stripped tool specs because
|
|
103
|
+
* the catalog rides in the system prompt (`Agent.prunesToolDescriptions`).
|
|
104
|
+
*/
|
|
105
|
+
prunesToolDescriptions?(model: Model | undefined): boolean;
|
|
107
106
|
};
|
|
108
107
|
readonly skills?: readonly ContextSkill[];
|
|
109
108
|
/** Provider-facing, session-frozen descriptions when available. */
|
|
@@ -128,18 +127,50 @@ export declare function getToolSchemaMetadataRevision(tools: ToolSchemaSource):
|
|
|
128
127
|
* discovered-agent metadata changes).
|
|
129
128
|
*/
|
|
130
129
|
export declare function invalidateToolSchemaMetadata(tools: ToolSchemaSource): void;
|
|
130
|
+
/** Provider-visible text of one tool definition, in wire order. */
|
|
131
|
+
export interface ToolSchemaFragments {
|
|
132
|
+
/** Name, description, wire schema JSON, then rendered examples; fields that cannot be serialized are omitted. */
|
|
133
|
+
readonly fragments: string[];
|
|
134
|
+
/** `fragments` with the schema JSON indented for reading; present only when a display indent was requested. */
|
|
135
|
+
readonly display?: string[];
|
|
136
|
+
/** Why serialization stopped; the schema or examples after that point are missing from `fragments`. */
|
|
137
|
+
readonly schemaError?: string;
|
|
138
|
+
}
|
|
139
|
+
/** How {@link toolSchemaFragments} renders one tool definition. */
|
|
140
|
+
export interface ToolSchemaFragmentOptions {
|
|
141
|
+
/** Also return `display`: the same fragments with the schema JSON indented by this many spaces. */
|
|
142
|
+
displayIndent?: number;
|
|
143
|
+
/**
|
|
144
|
+
* Mirror `normalizeTools({ pruneDescriptions: true })`: the wire spec is the
|
|
145
|
+
* name plus the description-stripped schema, with no description or examples.
|
|
146
|
+
*/
|
|
147
|
+
pruneDescriptions?: boolean;
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Provider-visible text of one tool definition. `displayIndent` additionally
|
|
151
|
+
* returns `display`, the same fragments with the schema JSON indented, from
|
|
152
|
+
* the same schema conversion.
|
|
153
|
+
*/
|
|
154
|
+
export declare function toolSchemaFragments(tool: ContextTool, options?: ToolSchemaFragmentOptions): ToolSchemaFragments;
|
|
155
|
+
/** Inputs that select which tool-schema estimate applies, beyond the roster and tokenizer. */
|
|
156
|
+
export interface ToolSchemaEstimateOptions {
|
|
157
|
+
/** Caller settings/source revision; a change invalidates the cached estimate. */
|
|
158
|
+
sourceRevision?: number;
|
|
159
|
+
/** Count the description-stripped specs sent when the catalog rides in the system prompt. */
|
|
160
|
+
pruneDescriptions?: boolean;
|
|
161
|
+
}
|
|
131
162
|
/**
|
|
132
163
|
* Estimate provider-visible tool-schema tokens.
|
|
133
164
|
*
|
|
134
165
|
* Results are cached by roster-array identity, tokenizer identity, the
|
|
135
|
-
* caller-supplied settings/source revision, and the roster's
|
|
136
|
-
* metadata revision. Callers whose descriptions or schemas are
|
|
137
|
-
* must either advance `sourceRevision` or call
|
|
166
|
+
* caller-supplied settings/source revision, the prune mode, and the roster's
|
|
167
|
+
* explicit dynamic metadata revision. Callers whose descriptions or schemas are
|
|
168
|
+
* live getters must either advance `sourceRevision` or call
|
|
138
169
|
* {@link invalidateToolSchemaMetadata} when those inputs change.
|
|
139
170
|
*/
|
|
140
|
-
export declare function estimateToolSchemaTokens(tools: ToolSchemaSource, tokenizer: Tokenizer,
|
|
171
|
+
export declare function estimateToolSchemaTokens(tools: ToolSchemaSource, tokenizer: Tokenizer, options?: ToolSchemaEstimateOptions): number;
|
|
141
172
|
/** Count schemas carried on every request, excluding server-side deferred catalogs. */
|
|
142
|
-
export declare function estimateContextToolSchemaTokens(tools: ToolSchemaSource, tokenizer: Tokenizer, model: Model | undefined,
|
|
173
|
+
export declare function estimateContextToolSchemaTokens(tools: ToolSchemaSource, tokenizer: Tokenizer, model: Model | undefined, options?: ToolSchemaEstimateOptions): number;
|
|
143
174
|
export declare function computeNonMessageTokens(session: NonMessageTokenSource, tokenizer: Tokenizer, sourceRevision?: number): number;
|
|
144
175
|
/**
|
|
145
176
|
* Shared helper for the four non-message token totals used by
|
|
@@ -158,28 +189,4 @@ export declare function computeNonMessageBreakdown(session: NonMessageTokenSourc
|
|
|
158
189
|
* session and model.
|
|
159
190
|
*/
|
|
160
191
|
export declare function computeContextBreakdown(session: ContextUsageSession, options: ContextUsageOptions): ContextBreakdown;
|
|
161
|
-
/** The `/context` title: the model once one is selected (the body leads with its window). */
|
|
162
|
-
export declare function contextUsageHead(breakdown: ContextBreakdown): TspText;
|
|
163
|
-
/**
|
|
164
|
-
* Native context-usage panel for terminals without `meter`: the cell grid as
|
|
165
|
-
* unwrapped styled rows beside the legend. The terminal places the legend
|
|
166
|
-
* beside the grid, or below it when narrow.
|
|
167
|
-
*/
|
|
168
|
-
export declare function describeContextUsage(breakdown: ContextBreakdown): NativeNode;
|
|
169
|
-
/**
|
|
170
|
-
* The `/context` report body, without a frame or title of its own (the panel
|
|
171
|
-
* showing it is titled {@link contextUsageHead}): ANSI renders the cell grid
|
|
172
|
-
* beside the legend; natively it is drawn with `meter`s where the terminal has
|
|
173
|
-
* them and as the glyph grid otherwise.
|
|
174
|
-
*/
|
|
175
|
-
export declare class ContextUsageView extends Container {
|
|
176
|
-
#private;
|
|
177
|
-
constructor(breakdown: ContextBreakdown, theme: Theme);
|
|
178
|
-
describe(cx: DescribeContext): NativeNode;
|
|
179
|
-
}
|
|
180
|
-
/**
|
|
181
|
-
* Render a colorful context-usage panel as ANSI text. Output is a series of
|
|
182
|
-
* lines pairing the grid (left) with the legend (right).
|
|
183
|
-
*/
|
|
184
|
-
export declare function renderContextUsage(breakdown: ContextBreakdown, theme: Theme): string;
|
|
185
192
|
export {};
|
|
@@ -132,8 +132,12 @@ export interface StatusLineHost<TSession extends StatusLineSession = StatusLineS
|
|
|
132
132
|
calculateTokensPerSecond(messages: readonly AgentMessage[], isStreaming: boolean): number | null;
|
|
133
133
|
limitMatchesActiveAccount(report: UsageReport, limit: UsageLimit, identity: StatusAccountIdentity): boolean;
|
|
134
134
|
classifyResetExpiry?(report: UsageReport, nowMs: number): StatusResetExpiry | undefined;
|
|
135
|
-
/**
|
|
136
|
-
|
|
135
|
+
/**
|
|
136
|
+
* One-line warning for saved resets anywhere in the pool that are about to expire.
|
|
137
|
+
* The host owns deduplication: a returned warning counts as shown, so each saved
|
|
138
|
+
* reset is warned about once, not once per refresh or conversation.
|
|
139
|
+
*/
|
|
140
|
+
resetExpiryNotice?(session: TSession, reports: readonly UsageReport[], nowMs: number): string | undefined;
|
|
137
141
|
computeCompactionBoundaries(session: TSession, contextWindow: number, model?: Model): CompactionBoundaries | null;
|
|
138
142
|
}
|
|
139
143
|
export interface FooterHost {
|
|
@@ -354,6 +354,13 @@ export declare function parseKittyDirectPlacementLine(line: string): ParsedKitty
|
|
|
354
354
|
* byte-identical between frames, so the diff never rewrites them.
|
|
355
355
|
*/
|
|
356
356
|
export declare function directPlacementLift(line: string): number;
|
|
357
|
+
/**
|
|
358
|
+
* Re-anchor an {@link Image} direct-placement line `lift` rows above its own
|
|
359
|
+
* row instead of its encoded `CUU(rows-1)`. The renderer lowers the lift when
|
|
360
|
+
* the block's top is clipped by the frame: the cursor-up would otherwise climb
|
|
361
|
+
* past the frame's first row into whatever the terminal shows above it.
|
|
362
|
+
*/
|
|
363
|
+
export declare function withDirectPlacementLift(line: string, lift: number): string;
|
|
357
364
|
/**
|
|
358
365
|
* Rebuild an {@link Image} direct-placement line for the viewport row it is
|
|
359
366
|
* written at. The component-rendered line encodes `CUU(rows-1)`, which clamps
|
|
@@ -2,7 +2,7 @@ export type SymbolPreset = "unicode" | "nerd" | "ascii";
|
|
|
2
2
|
/**
|
|
3
3
|
* All available symbol keys organized by category.
|
|
4
4
|
*/
|
|
5
|
-
export type SymbolKey = "status.success" | "status.error" | "status.warning" | "status.info" | "status.pending" | "status.disabled" | "status.enabled" | "status.running" | "status.shadowed" | "status.aborted" | "status.done" | "nav.cursor" | "nav.selected" | "nav.expand" | "nav.collapse" | "nav.back" | "tree.branch" | "tree.last" | "tree.vertical" | "tree.horizontal" | "tree.hook" | "progress.filled" | "progress.empty" | "context.speculation" | "context.compaction" | "boxRound.topLeft" | "boxRound.topRight" | "boxRound.bottomLeft" | "boxRound.bottomRight" | "boxRound.horizontal" | "boxRound.vertical" | "boxDotted.horizontal" | "boxDotted.vertical" | "boxSharp.topLeft" | "boxSharp.topRight" | "boxSharp.bottomLeft" | "boxSharp.bottomRight" | "boxSharp.horizontal" | "boxSharp.vertical" | "boxSharp.cross" | "boxSharp.teeDown" | "boxSharp.teeUp" | "boxSharp.teeRight" | "boxSharp.teeLeft" | "sep.powerline" | "sep.powerlineThin" | "sep.powerlineLeft" | "sep.powerlineRight" | "sep.powerlineThinLeft" | "sep.powerlineThinRight" | "sep.powerlineCapLeft" | "sep.block" | "sep.space" | "sep.asciiLeft" | "sep.asciiRight" | "sep.dot" | "sep.slash" | "sep.pipe" | "icon.model" | "icon.plan" | "icon.prewalk" | "icon.goal" | "icon.pause" | "icon.loop" | "icon.folder" | "icon.worktree" | "icon.search" | "icon.scratchFolder" | "icon.file" | "icon.git" | "icon.branch" | "icon.pr" | "icon.pin" | "icon.tokens" | "icon.context" | "icon.cost" | "icon.subscription" | "icon.advisor" | "icon.advisorClosed" | "icon.time" | "icon.omp" | "icon.ghost" | "icon.agents" | "icon.job" | "icon.cache" | "icon.cacheMiss" | "icon.input" | "icon.output" | "icon.throughput" | "icon.intelligence" | "icon.host" | "icon.session" | "icon.package" | "icon.warning" | "icon.rewind" | "icon.auto" | "icon.fast" | "icon.extensionSkill" | "icon.extensionTool" | "icon.extensionSlashCommand" | "icon.extensionMcp" | "icon.extensionRule" | "icon.extensionHook" | "icon.extensionPrompt" | "icon.extensionContextFile" | "icon.extensionInstruction" | "icon.vimNormal" | "icon.vimInsert" | "icon.vimVisual" | "icon.vimVisualLine" | "icon.vimReplace" | "cmd.action" | "cmd.prompt" | "cmd.extension" | "cmd.settings" | "cmd.gear" | "cmd.shield" | "cmd.wave" | "cmd.compass" | "cmd.inbox" | "cmd.swap" | "cmd.expand" | "cmd.computer" | "cmd.eye" | "cmd.todo" | "cmd.stats" | "cmd.news" | "cmd.keyboard" | "cmd.export" | "cmd.clipboard" | "cmd.share" | "cmd.broadcast" | "cmd.globe" | "cmd.copy" | "cmd.plus" | "cmd.restart" | "cmd.eraser" | "cmd.trash" | "cmd.compress" | "cmd.vibrate" | "cmd.handoff" | "cmd.history" | "cmd.question" | "cmd.rocket" | "cmd.stethoscope" | "cmd.redo" | "cmd.bug" | "cmd.memory" | "cmd.pencil" | "cmd.folderMove" | "cmd.folderPlus" | "cmd.folderMinus" | "cmd.hammer" | "cmd.power" | "cmd.cart" | "icon.mic" | "icon.camera" | "thinking.minimal" | "thinking.low" | "thinking.medium" | "thinking.high" | "thinking.xhigh" | "thinking.max" | "thinking.autoPending" | "checkbox.checked" | "checkbox.unchecked" | "radio.selected" | "radio.unselected" | "format.bullet" | "format.dash" | "format.bracketLeft" | "format.bracketRight" | "md.quoteBorder" | "md.hrChar" | "md.bullet" | "md.colorSwatch" | "advisor.rail" | "skill.rail" | "lang.default" | "lang.typescript" | "lang.javascript" | "lang.python" | "lang.rust" | "lang.go" | "lang.java" | "lang.c" | "lang.cpp" | "lang.csharp" | "lang.ruby" | "lang.julia" | "lang.php" | "lang.swift" | "lang.kotlin" | "lang.shell" | "lang.html" | "lang.css" | "lang.json" | "lang.yaml" | "lang.markdown" | "lang.sql" | "lang.docker" | "lang.lua" | "lang.text" | "lang.env" | "lang.toml" | "lang.xml" | "lang.ini" | "lang.conf" | "lang.log" | "lang.csv" | "lang.tsv" | "lang.image" | "lang.pdf" | "lang.archive" | "lang.binary" | "chip.image" | "chip.video" | "chip.paste" | "tab.appearance" | "tab.model" | "tab.interaction" | "tab.context" | "tab.files" | "tab.shell" | "tab.tools" | "tab.memory" | "tab.tasks" | "tab.providers" | "tool.write" | "tool.edit" | "tool.bash" | "tool.ssh" | "tool.lsp" | "tool.gh" | "tool.webSearch" | "tool.exa" | "tool.browser" | "tool.eval" | "tool.debug" | "tool.mcp" | "tool.job" | "tool.launch" | "tool.task" | "tool.todo" | "tool.memory" | "tool.ask" | "tool.resolve" | "tool.review" | "tool.goal" | "tool.irc" | "tool.delete" | "tool.move" | "key.ctrl" | "key.ctrlMac" | "key.shift" | "key.alt" | "key.altMac" | "key.super" | "key.superMac" | "key.joiner" | "key.enter" | "key.esc" | "key.tab" | "key.backspace" | "key.delete" | "key.space" | "key.up" | "key.down" | "key.left" | "key.right";
|
|
5
|
+
export type SymbolKey = "status.success" | "status.error" | "status.warning" | "status.info" | "status.pending" | "status.disabled" | "status.enabled" | "status.running" | "status.shadowed" | "status.aborted" | "status.done" | "nav.cursor" | "nav.selected" | "nav.expand" | "nav.collapse" | "nav.back" | "tree.branch" | "tree.last" | "tree.vertical" | "tree.horizontal" | "tree.hook" | "progress.filled" | "progress.empty" | "context.speculation" | "context.compaction" | "context.content" | "context.messages" | "context.buffer" | "context.free" | "boxRound.topLeft" | "boxRound.topRight" | "boxRound.bottomLeft" | "boxRound.bottomRight" | "boxRound.horizontal" | "boxRound.vertical" | "boxDotted.horizontal" | "boxDotted.vertical" | "boxSharp.topLeft" | "boxSharp.topRight" | "boxSharp.bottomLeft" | "boxSharp.bottomRight" | "boxSharp.horizontal" | "boxSharp.vertical" | "boxSharp.cross" | "boxSharp.teeDown" | "boxSharp.teeUp" | "boxSharp.teeRight" | "boxSharp.teeLeft" | "sep.powerline" | "sep.powerlineThin" | "sep.powerlineLeft" | "sep.powerlineRight" | "sep.powerlineThinLeft" | "sep.powerlineThinRight" | "sep.powerlineCapLeft" | "sep.block" | "sep.space" | "sep.asciiLeft" | "sep.asciiRight" | "sep.dot" | "sep.slash" | "sep.pipe" | "icon.model" | "icon.plan" | "icon.prewalk" | "icon.goal" | "icon.pause" | "icon.loop" | "icon.folder" | "icon.worktree" | "icon.search" | "icon.scratchFolder" | "icon.file" | "icon.git" | "icon.branch" | "icon.pr" | "icon.pin" | "icon.tokens" | "icon.context" | "icon.cost" | "icon.subscription" | "icon.advisor" | "icon.advisorClosed" | "icon.time" | "icon.omp" | "icon.ghost" | "icon.agents" | "icon.job" | "icon.cache" | "icon.cacheMiss" | "icon.input" | "icon.output" | "icon.throughput" | "icon.intelligence" | "icon.host" | "icon.session" | "icon.package" | "icon.warning" | "icon.rewind" | "icon.auto" | "icon.fast" | "icon.extensionSkill" | "icon.extensionTool" | "icon.extensionSlashCommand" | "icon.extensionMcp" | "icon.extensionRule" | "icon.extensionHook" | "icon.extensionPrompt" | "icon.extensionContextFile" | "icon.extensionInstruction" | "icon.vimNormal" | "icon.vimInsert" | "icon.vimVisual" | "icon.vimVisualLine" | "icon.vimReplace" | "cmd.action" | "cmd.prompt" | "cmd.extension" | "cmd.settings" | "cmd.gear" | "cmd.shield" | "cmd.wave" | "cmd.compass" | "cmd.inbox" | "cmd.swap" | "cmd.expand" | "cmd.computer" | "cmd.eye" | "cmd.todo" | "cmd.stats" | "cmd.news" | "cmd.keyboard" | "cmd.export" | "cmd.clipboard" | "cmd.share" | "cmd.broadcast" | "cmd.globe" | "cmd.copy" | "cmd.plus" | "cmd.restart" | "cmd.eraser" | "cmd.trash" | "cmd.compress" | "cmd.vibrate" | "cmd.handoff" | "cmd.history" | "cmd.question" | "cmd.rocket" | "cmd.stethoscope" | "cmd.redo" | "cmd.bug" | "cmd.memory" | "cmd.pencil" | "cmd.folderMove" | "cmd.folderPlus" | "cmd.folderMinus" | "cmd.hammer" | "cmd.power" | "cmd.cart" | "icon.mic" | "icon.camera" | "thinking.minimal" | "thinking.low" | "thinking.medium" | "thinking.high" | "thinking.xhigh" | "thinking.max" | "thinking.autoPending" | "checkbox.checked" | "checkbox.unchecked" | "radio.selected" | "radio.unselected" | "format.bullet" | "format.dash" | "format.bracketLeft" | "format.bracketRight" | "md.quoteBorder" | "md.hrChar" | "md.bullet" | "md.colorSwatch" | "advisor.rail" | "skill.rail" | "lang.default" | "lang.typescript" | "lang.javascript" | "lang.python" | "lang.rust" | "lang.go" | "lang.java" | "lang.c" | "lang.cpp" | "lang.csharp" | "lang.ruby" | "lang.julia" | "lang.php" | "lang.swift" | "lang.kotlin" | "lang.shell" | "lang.html" | "lang.css" | "lang.json" | "lang.yaml" | "lang.markdown" | "lang.sql" | "lang.docker" | "lang.lua" | "lang.text" | "lang.env" | "lang.toml" | "lang.xml" | "lang.ini" | "lang.conf" | "lang.log" | "lang.csv" | "lang.tsv" | "lang.image" | "lang.pdf" | "lang.archive" | "lang.binary" | "chip.image" | "chip.video" | "chip.paste" | "tab.appearance" | "tab.model" | "tab.interaction" | "tab.context" | "tab.files" | "tab.shell" | "tab.tools" | "tab.memory" | "tab.tasks" | "tab.providers" | "tool.write" | "tool.edit" | "tool.bash" | "tool.ssh" | "tool.lsp" | "tool.gh" | "tool.webSearch" | "tool.exa" | "tool.browser" | "tool.eval" | "tool.debug" | "tool.mcp" | "tool.job" | "tool.launch" | "tool.task" | "tool.todo" | "tool.memory" | "tool.ask" | "tool.resolve" | "tool.review" | "tool.goal" | "tool.irc" | "tool.delete" | "tool.move" | "key.ctrl" | "key.ctrlMac" | "key.shift" | "key.alt" | "key.altMac" | "key.super" | "key.superMac" | "key.joiner" | "key.enter" | "key.esc" | "key.tab" | "key.backspace" | "key.delete" | "key.space" | "key.up" | "key.down" | "key.left" | "key.right";
|
|
6
6
|
export type SymbolMap = Record<SymbolKey, string>;
|
|
7
7
|
/**
|
|
8
8
|
* Icon vocabulary for slash-command autocomplete type indicators. Each name
|
|
@@ -114,29 +114,6 @@ export declare function stopThemeWatcher(): void;
|
|
|
114
114
|
* Used by HTML export to generate CSS custom properties.
|
|
115
115
|
*/
|
|
116
116
|
export declare function getResolvedThemeColors(themeName?: string): Promise<Record<string, string>>;
|
|
117
|
-
/** One appearance variant of {@link NativeThemePalette}: token name → `#rrggbb`. */
|
|
118
|
-
export type NativeThemeVariant = Record<string, string>;
|
|
119
|
-
/** omp's resolved theme for a Tern Surface Protocol terminal (the `t` verb body minus `sf`). */
|
|
120
|
-
export interface NativeThemePalette {
|
|
121
|
-
dark?: NativeThemeVariant;
|
|
122
|
-
light?: NativeThemeVariant;
|
|
123
|
-
name: {
|
|
124
|
-
dark?: string;
|
|
125
|
-
light?: string;
|
|
126
|
-
};
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
* Cheap identity of everything {@link getNativeThemePalette} depends on;
|
|
130
|
-
* recompute the palette only when it changes.
|
|
131
|
-
*/
|
|
132
|
-
export declare function getNativeThemePaletteKey(): string;
|
|
133
|
-
/**
|
|
134
|
-
* omp's theme for a native surface: with auto theme, the configured dark and
|
|
135
|
-
* light themes; otherwise (or while the theme selector previews one) the
|
|
136
|
-
* active theme under its own appearance only. Themes without a loadable
|
|
137
|
-
* definition (in-memory instances) contribute nothing.
|
|
138
|
-
*/
|
|
139
|
-
export declare function getNativeThemePalette(): NativeThemePalette;
|
|
140
117
|
/**
|
|
141
118
|
* Check if a theme is a "light" theme by analyzing its status-line background
|
|
142
119
|
* luminance. Loads theme JSON synchronously (built-in or custom file on disk)
|
|
@@ -12,6 +12,8 @@ export interface QuestionResult {
|
|
|
12
12
|
customInput?: string;
|
|
13
13
|
/** Optional note attached to the selected answer in the rich ask dialog. */
|
|
14
14
|
note?: string;
|
|
15
|
+
/** Label of the option the note is on; unset when it is on the custom answer. */
|
|
16
|
+
noteOption?: string;
|
|
15
17
|
/** True when the answer was auto-selected because the dialog timed out. */
|
|
16
18
|
timedOut?: boolean;
|
|
17
19
|
}
|
|
@@ -24,6 +26,8 @@ export interface AskToolDetails {
|
|
|
24
26
|
customInput?: string;
|
|
25
27
|
/** Optional note attached to the selected answer in the rich ask dialog. */
|
|
26
28
|
note?: string;
|
|
29
|
+
/** Label of the option the note is on; unset when it is on the custom answer. */
|
|
30
|
+
noteOption?: string;
|
|
27
31
|
/** True when the answer was auto-selected because the dialog timed out. */
|
|
28
32
|
timedOut?: boolean;
|
|
29
33
|
/** Multi-part question mode */
|
|
@@ -6,6 +6,12 @@ import type { Theme } from "../theme/theme.js";
|
|
|
6
6
|
export interface BashInteractiveTerminalBackend {
|
|
7
7
|
resize(columns: number, rows: number): void;
|
|
8
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* Translates a TUI key event into the bytes a terminal would send to a PTY
|
|
11
|
+
* child; key releases encode to "". Shared by the agent `pty` console and
|
|
12
|
+
* `!` commands (`BashExecutionComponent.encodePtyInput`).
|
|
13
|
+
*/
|
|
14
|
+
export declare function normalizeInputForPty(data: string, applicationCursorKeysMode: boolean): string;
|
|
9
15
|
/** Interactive terminal overlay driven by an external PTY controller. */
|
|
10
16
|
export declare class BashInteractiveOverlayComponent implements Component {
|
|
11
17
|
#private;
|
|
@@ -24,6 +24,8 @@ export interface BashToolDetails {
|
|
|
24
24
|
exitCode?: number;
|
|
25
25
|
/** True when the command was killed by its timeout deadline (not a failure). */
|
|
26
26
|
timedOut?: boolean;
|
|
27
|
+
/** Text the command wrote to `out://`, oldest first; transcripts draw each as a reply after the call. */
|
|
28
|
+
replies?: string[];
|
|
27
29
|
/** Live ACP update only; completed results refer to released terminals. */
|
|
28
30
|
terminalId?: string;
|
|
29
31
|
service?: {
|
|
@@ -22,10 +22,12 @@ export interface DefaultToolRenderInput {
|
|
|
22
22
|
export declare function formatDefaultToolExecution(input: DefaultToolRenderInput, contentWidth: number, uiTheme: Theme): string;
|
|
23
23
|
/**
|
|
24
24
|
* TSP view of the generic fallback card: the tool label with a one-line args
|
|
25
|
-
* summary as the head target; the result as
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
25
|
+
* summary as the head target; the result as JSON (the host's `json` viewer,
|
|
26
|
+
* else a JSON tree) or raw `ansi` output. The complete output goes over the
|
|
27
|
+
* wire — the card-level disclosure clamp the terminal applies is the only
|
|
28
|
+
* bound, so an expanded card keeps every row. The `json` viewer never cuts;
|
|
29
|
+
* JSON the fallback tree's depth, node or scalar caps would cut keeps the raw
|
|
30
|
+
* path instead.
|
|
29
31
|
*/
|
|
30
32
|
export declare function describeDefaultToolExecution(input: DefaultToolRenderInput): NativeToolView;
|
|
31
33
|
/** Render the generic fallback as the state-tinted card used by direct custom tools. */
|
|
@@ -51,8 +51,10 @@ export interface EditToolPerFileResult {
|
|
|
51
51
|
}
|
|
52
52
|
/** Diff, diagnostics, and snapshots returned by an edit. */
|
|
53
53
|
export interface EditToolDetails {
|
|
54
|
-
/** Unified diff of the changes made */
|
|
54
|
+
/** Unified diff of the changes made; empty when the edit failed */
|
|
55
55
|
diff: string;
|
|
56
|
+
/** Why the edit failed, as the engine classed it (`unseen_lines`, `stale_tag`, `parse`, …) */
|
|
57
|
+
errorKind?: string;
|
|
56
58
|
/** Line number of the first change in the new file (for editor navigation) */
|
|
57
59
|
firstChangedLine?: number;
|
|
58
60
|
/** Diagnostic result (if available) */
|
|
@@ -85,6 +85,7 @@ export interface GhRunWatchFailedLogDetails {
|
|
|
85
85
|
conclusion?: string;
|
|
86
86
|
tail?: string;
|
|
87
87
|
available: boolean;
|
|
88
|
+
unavailableReason?: string;
|
|
88
89
|
}
|
|
89
90
|
/** Live workflow watcher display snapshot. */
|
|
90
91
|
export interface GhRunWatchViewDetails {
|
|
@@ -130,6 +131,8 @@ export interface GhFailedJobLog {
|
|
|
130
131
|
full?: string;
|
|
131
132
|
tail?: string;
|
|
132
133
|
available: boolean;
|
|
134
|
+
unavailableReason?: string;
|
|
135
|
+
truncated?: boolean;
|
|
133
136
|
}
|
|
134
137
|
/** Choose the terminal conclusion or current job state. */
|
|
135
138
|
export declare function formatJobState(job: GhRunJobSnapshot): string;
|
|
@@ -18,6 +18,8 @@ export interface GroupedFileSection {
|
|
|
18
18
|
export interface GroupedFilesOutput {
|
|
19
19
|
model: string[];
|
|
20
20
|
display: string[];
|
|
21
|
+
/** Per file, the `model` index just past its last line: a head cut keeping `n` lines shows it whole when this is <= n. */
|
|
22
|
+
modelEnds: Map<string, number>;
|
|
21
23
|
}
|
|
22
24
|
/**
|
|
23
25
|
* Render a list of files as a multi-level, prefix-folded directory tree shared by
|
|
@@ -25,6 +25,12 @@ export interface IrcMessage {
|
|
|
25
25
|
* the broadcaster, mostly to say the message was not for it.
|
|
26
26
|
*/
|
|
27
27
|
broadcast?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Interim acknowledgement or progress on something the recipient asked
|
|
30
|
+
* (`agent://<id>?progress`): it neither answers that request nor asks one,
|
|
31
|
+
* so the recipient's `wait` keeps waiting for the actual reply.
|
|
32
|
+
*/
|
|
33
|
+
progress?: boolean;
|
|
28
34
|
}
|
|
29
35
|
/** Delivery outcome for one peer recipient. */
|
|
30
36
|
export interface IrcDeliveryReceipt {
|
|
@@ -12,6 +12,8 @@ export declare const JSON_TREE_MAX_LINES_EXPANDED = 200;
|
|
|
12
12
|
export declare const JSON_TREE_SCALAR_LEN_COLLAPSED = 60;
|
|
13
13
|
/** Maximum expanded JSON scalar width. */
|
|
14
14
|
export declare const JSON_TREE_SCALAR_LEN_EXPANDED = 2000;
|
|
15
|
+
/** Characters a container's one-line form may take before a JSON tree lists its entries instead. */
|
|
16
|
+
export declare const JSON_TREE_INLINE_LEN = 60;
|
|
15
17
|
/** Sanitization, string summary, and budgeting policy for inline JSON. */
|
|
16
18
|
export interface InlineFormatOptions {
|
|
17
19
|
sanitizeText?: (text: string) => string;
|
|
@@ -46,7 +48,8 @@ export interface JsonTreeRenderOptions {
|
|
|
46
48
|
rootConnectors?: "hooked" | "siblings";
|
|
47
49
|
}
|
|
48
50
|
/**
|
|
49
|
-
* Render a JSON value as bounded tree lines
|
|
51
|
+
* Render a JSON value as bounded tree lines, containers that fit
|
|
52
|
+
* {@link JSON_TREE_INLINE_LEN} on one row. The positional form remains the
|
|
50
53
|
* public tool-renderer contract; the options form exposes sanitization and root
|
|
51
54
|
* connector policy for specialized adapters such as nested task output.
|
|
52
55
|
*/
|
|
@@ -74,8 +77,24 @@ export interface JsonTreeDescribeOptions {
|
|
|
74
77
|
onTruncated?: () => void;
|
|
75
78
|
}
|
|
76
79
|
/**
|
|
77
|
-
* TSP `tree` of a JSON value: containers
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
+
* TSP `tree` of a JSON value: containers that fit {@link JSON_TREE_INLINE_LEN}
|
|
81
|
+
* become `key: [1, "a"]` leaves, larger ones expandable nodes labelled with
|
|
82
|
+
* their key and size, scalars `key: value` leaves styled by type. Bounded by
|
|
83
|
+
* depth, node count and scalar length; no width math.
|
|
80
84
|
*/
|
|
81
85
|
export declare function describeJsonTree(value: unknown, options?: JsonTreeDescribeOptions): NativeNode;
|
|
86
|
+
/** Options of {@link describeJsonValue}: the `json` node's own, plus the fallback tree's. */
|
|
87
|
+
export interface JsonValueDescribeOptions extends JsonTreeDescribeOptions {
|
|
88
|
+
/** The host draws the `json` kind (`cx.supports("json")`). */
|
|
89
|
+
native?: boolean;
|
|
90
|
+
/** `json` node: container levels expanded below the top-level entries (default 0). */
|
|
91
|
+
open?: number;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* A JSON value for a TSP host: the terminal's own `json` viewer when it draws
|
|
95
|
+
* the kind, which folds and previews containers itself and never cuts (so
|
|
96
|
+
* `onTruncated` never fires), else {@link describeJsonTree} with the same
|
|
97
|
+
* options. Root keys the tree would hide are left out of the sent value too;
|
|
98
|
+
* strings are sanitized like the tree's labels.
|
|
99
|
+
*/
|
|
100
|
+
export declare function describeJsonValue(value: unknown, options?: JsonValueDescribeOptions): NativeNode;
|
|
@@ -31,6 +31,8 @@ export interface FileDiagnosticsResult {
|
|
|
31
31
|
summary: string;
|
|
32
32
|
/** Whether there are any errors (severity 1) */
|
|
33
33
|
errored: boolean;
|
|
34
|
+
/** Servers that sent no fresh report in time: the file is unverified for them, not clean. */
|
|
35
|
+
unreported?: string[];
|
|
34
36
|
/** Whether the file was formatted */
|
|
35
37
|
formatter?: FileFormatResult;
|
|
36
38
|
}
|
|
@@ -22,12 +22,13 @@ export declare function renderMCPResult(result: {
|
|
|
22
22
|
details?: MCPToolDetails;
|
|
23
23
|
isError?: boolean;
|
|
24
24
|
}, options: RenderResultOptions, theme: Theme, args?: Record<string, unknown>): Component;
|
|
25
|
-
/** Native MCP call view: the head
|
|
26
|
-
export declare function describeMCPCall(args: Record<string, unknown>, label: string): NativeToolView;
|
|
25
|
+
/** Native MCP call view: the head plus the folded args, inline while pending. */
|
|
26
|
+
export declare function describeMCPCall(args: Record<string, unknown>, label: string, options?: RenderResultOptions): NativeToolView;
|
|
27
27
|
/**
|
|
28
|
-
* Native MCP result view: JSON output as
|
|
29
|
-
*
|
|
30
|
-
*
|
|
28
|
+
* Native MCP result view: JSON output as the host's `json` viewer (when it
|
|
29
|
+
* draws one) or a JSON tree, Markdown when the preference is on, otherwise
|
|
30
|
+
* the raw text as tool output; the folded Args section follows, so the
|
|
31
|
+
* collapsed preview still leads with the output.
|
|
31
32
|
*/
|
|
32
33
|
export declare function describeMCPResult(result: {
|
|
33
34
|
content: Array<{
|
|
@@ -36,7 +37,7 @@ export declare function describeMCPResult(result: {
|
|
|
36
37
|
}>;
|
|
37
38
|
details?: MCPToolDetails;
|
|
38
39
|
isError?: boolean;
|
|
39
|
-
},
|
|
40
|
+
}, options: RenderResultOptions, args?: Record<string, unknown>): NativeToolView | undefined;
|
|
40
41
|
import type { OutputMeta } from "./output-meta.js";
|
|
41
42
|
/** Set whether plain MCP text results render as Markdown. */
|
|
42
43
|
export declare function setMcpRenderMarkdownResults(enabled: boolean): void;
|
|
@@ -6,7 +6,7 @@ import { type OutputMeta } from "./output-meta.js";
|
|
|
6
6
|
import type { NativeToolHead, NativeToolView, ToolRenderResult } from "./renderer.js";
|
|
7
7
|
/** A path for native heads: relative to the working directory when inside it, else `~`-shortened. */
|
|
8
8
|
export declare function displayPath(filePath: string): string;
|
|
9
|
-
/**
|
|
9
|
+
/** Configured file link for a head's path target, when the path is absolute. */
|
|
10
10
|
export declare function fileHref(filePath: string | undefined): string | undefined;
|
|
11
11
|
/** Diff stats as one head `meta` string, `+8 −1` (U+2212 minus), or undefined when nothing changed. */
|
|
12
12
|
export declare function diffStatsMeta(added: number, removed: number): string | undefined;
|
|
@@ -29,7 +29,10 @@ export interface ReadToolDetails {
|
|
|
29
29
|
suffixResolution?: {
|
|
30
30
|
from: string;
|
|
31
31
|
to: string;
|
|
32
|
+
raw?: boolean;
|
|
32
33
|
};
|
|
34
|
+
/** Raw source output keeps descriptive diagnostics in details, not in the body. */
|
|
35
|
+
raw?: boolean;
|
|
33
36
|
url?: string;
|
|
34
37
|
finalUrl?: string;
|
|
35
38
|
contentType?: string;
|
|
@@ -36,6 +36,8 @@ export interface RenderResultOptions {
|
|
|
36
36
|
cancelled?: boolean;
|
|
37
37
|
/** The native host shows files by path (`cx.supports("media")`). Native describe hooks only. */
|
|
38
38
|
media?: boolean;
|
|
39
|
+
/** The native host draws raw JSON values (`cx.supports("json")`). Native describe hooks only. */
|
|
40
|
+
json?: boolean;
|
|
39
41
|
}
|
|
40
42
|
/** Render options for a result, plus the tool-specific context the transcript threads through. */
|
|
41
43
|
export type RenderResultContextOptions = RenderResultOptions & {
|
|
@@ -177,6 +177,17 @@ export declare function truncateLineBytes(line: string, maxBytes?: number): {
|
|
|
177
177
|
text: string;
|
|
178
178
|
wasTruncated: boolean;
|
|
179
179
|
};
|
|
180
|
+
/**
|
|
181
|
+
* Where `text` shows in `output` written through an {@link OutputSink} with
|
|
182
|
+
* `maxColumns`, searching from `from`: each of its lines whole, or, where the
|
|
183
|
+
* cap cut the output line, a head of it and `…` ending that output line.
|
|
184
|
+
* Only the first line can be cut short of its first 16 characters (after
|
|
185
|
+
* other text on its output line); such text is not found.
|
|
186
|
+
*/
|
|
187
|
+
export declare function findColumnCapped(output: string, text: string, from?: number): {
|
|
188
|
+
start: number;
|
|
189
|
+
end: number;
|
|
190
|
+
} | undefined;
|
|
180
191
|
/** Shared helper to build a no-truncation result. */
|
|
181
192
|
export declare function noTruncResult(content: string, totalLines?: number, totalBytes?: number): TruncationResult;
|
|
182
193
|
/**
|
|
@@ -105,8 +105,9 @@ export interface TaskItem {
|
|
|
105
105
|
sourceSession?: string;
|
|
106
106
|
/** Optional model selector override for the historical source session. */
|
|
107
107
|
model?: string | string[];
|
|
108
|
-
/**
|
|
108
|
+
/** Inline instructions; exactly one of task or taskFile is required. */
|
|
109
109
|
task?: string;
|
|
110
|
+
taskFile?: string;
|
|
110
111
|
/** How open-ended the work is; required by the schema and the child's sole `auto` thinking classification input. */
|
|
111
112
|
solutionSpace?: string;
|
|
112
113
|
/** Per-spawn thinking effort: lowest/middle/highest level the resolved model supports. Overrides the agent's default selector (e.g. `auto`). */
|
|
@@ -137,6 +138,8 @@ export interface TaskParams {
|
|
|
137
138
|
model?: string | string[];
|
|
138
139
|
/** The work (flat form). */
|
|
139
140
|
task?: string;
|
|
141
|
+
/** Absolute path or local:// URL to a UTF-8 file (flat form), mutually exclusive with task. */
|
|
142
|
+
taskFile?: string;
|
|
140
143
|
/** How open-ended the work is (flat form); see {@link TaskItem.solutionSpace}. */
|
|
141
144
|
solutionSpace?: string;
|
|
142
145
|
/** Per-spawn thinking effort (flat form): lowest/middle/highest level the resolved model supports. */
|
|
@@ -212,6 +215,9 @@ export interface AgentProgress {
|
|
|
212
215
|
status: "pending" | "running" | "completed" | "failed" | "aborted";
|
|
213
216
|
task: string;
|
|
214
217
|
assignment?: string;
|
|
218
|
+
taskFile?: string;
|
|
219
|
+
/** SHA-256 of the exact task file bytes before decoding and trimming. */
|
|
220
|
+
taskFileSha256?: string;
|
|
215
221
|
description?: string;
|
|
216
222
|
lastIntent?: string;
|
|
217
223
|
currentTool?: string;
|
|
@@ -319,6 +325,8 @@ export interface SingleResult {
|
|
|
319
325
|
agentSource: AgentSource;
|
|
320
326
|
task: string;
|
|
321
327
|
assignment?: string;
|
|
328
|
+
taskFile?: string;
|
|
329
|
+
taskFileSha256?: string;
|
|
322
330
|
description?: string;
|
|
323
331
|
lastIntent?: string;
|
|
324
332
|
exitCode: number;
|
|
@@ -4,6 +4,15 @@
|
|
|
4
4
|
* selector peeling and transcript renderers consult it instead of hardcoding
|
|
5
5
|
* scheme names.
|
|
6
6
|
*/
|
|
7
|
+
/**
|
|
8
|
+
* Mutation class of a writable scheme; drives plan-mode and device-only `write` gates.
|
|
9
|
+
* - `workspace`: mutates user/external state; blocked in plan mode and device-only sessions.
|
|
10
|
+
* - `sandbox`: session scratch space (local://); allowed in plan mode and device-only sessions.
|
|
11
|
+
* - `coordination`: peer messaging (agent://); always allowed. `SchemeWritePolicy.cancels` grants the same per URL.
|
|
12
|
+
* - `device`: tool-device dispatch (xd://); always allowed, the device enforces its own policy.
|
|
13
|
+
* - `reply`: a message to the user (out://); always allowed, and transcripts draw the content as assistant prose.
|
|
14
|
+
*/
|
|
15
|
+
export type SchemeWriteScope = "workspace" | "sandbox" | "coordination" | "device" | "reply";
|
|
7
16
|
/** Renderer-relevant subset of a registered scheme's declared spec. */
|
|
8
17
|
export interface InternalUrlSchemeSpec {
|
|
9
18
|
/** `lines`: a trailing `:<selector>` chain is a read selector; `none`/`opaque`: never peel. */
|
|
@@ -12,16 +21,24 @@ export interface InternalUrlSchemeSpec {
|
|
|
12
21
|
readonly portAuthority?: boolean;
|
|
13
22
|
/** Read cards collapse into the compact read group like plain files instead of expanding. */
|
|
14
23
|
readonly compactTranscript?: boolean;
|
|
24
|
+
/** Write policy; absent on read-only schemes. Transcripts draw `reply`-scoped writes as assistant prose. */
|
|
25
|
+
readonly write?: {
|
|
26
|
+
readonly scope: SchemeWriteScope;
|
|
27
|
+
};
|
|
15
28
|
}
|
|
16
29
|
/** Scheme registry capabilities installed by the internal URL host. */
|
|
17
30
|
export interface InternalUrlSchemeHost {
|
|
18
31
|
/** Declared spec of a registered scheme (case-insensitive); undefined when unregistered. */
|
|
19
32
|
spec(scheme: string): InternalUrlSchemeSpec | undefined;
|
|
33
|
+
/** Declared specs of every registered scheme, keyed by lowercased scheme. */
|
|
34
|
+
specs(): ReadonlyMap<string, InternalUrlSchemeSpec>;
|
|
20
35
|
}
|
|
21
36
|
/** Install the scheme registry. Until one is installed, no URL counts as an internal scheme. */
|
|
22
37
|
export declare function setInternalUrlSchemeHost(host: InternalUrlSchemeHost): void;
|
|
23
38
|
/** Declared spec of `scheme`; undefined when it is unregistered or no host is installed. */
|
|
24
39
|
export declare function internalUrlSchemeSpec(scheme: string): InternalUrlSchemeSpec | undefined;
|
|
40
|
+
/** Declared specs of every registered scheme, keyed by lowercased scheme; empty when no host is installed. */
|
|
41
|
+
export declare function internalUrlSchemeSpecs(): ReadonlyMap<string, InternalUrlSchemeSpec>;
|
|
25
42
|
/** Split a hierarchical `scheme://rest` URL into its lowercased scheme and the text after `://`. */
|
|
26
43
|
export declare function splitUrlScheme(input: string): {
|
|
27
44
|
scheme: string;
|
|
@@ -10,8 +10,8 @@ import type { NativeToolView, ToolRenderResult } from "./renderer.js";
|
|
|
10
10
|
/** Whether a wait snapshot contains only running jobs and no cancellations. */
|
|
11
11
|
export declare function isWaitingPollDetails(details: unknown): boolean;
|
|
12
12
|
/** Coordination details retained by wait and background job operations. */
|
|
13
|
-
export type CoordinationOp = "send" | "wait" | "
|
|
14
|
-
/** Background-job row surfaced by `wait`/`cancel
|
|
13
|
+
export type CoordinationOp = "send" | "wait" | "cancel";
|
|
14
|
+
/** Background-job row surfaced by `wait`/`cancel` results and `proc://` listings. */
|
|
15
15
|
export interface JobSnapshot {
|
|
16
16
|
id: string;
|
|
17
17
|
type: "bash" | "task" | "eval";
|
|
@@ -32,6 +32,14 @@ export interface JobSnapshot {
|
|
|
32
32
|
completionPercent?: number;
|
|
33
33
|
/** The task agent's latest stage in its own words; see `AgentProgress.stage`. */
|
|
34
34
|
stage?: string;
|
|
35
|
+
/** Running task only: assistant requests so far; see `AgentProgress.requests`. */
|
|
36
|
+
requests?: number;
|
|
37
|
+
/** Running task only: cumulative cost in USD; see `AgentProgress.cost`. */
|
|
38
|
+
cost?: number;
|
|
39
|
+
/** Running task only: latest per-turn context size; see `AgentProgress.contextTokens`. */
|
|
40
|
+
contextTokens?: number;
|
|
41
|
+
/** Running task only: the model's context window; see `AgentProgress.contextWindow`. */
|
|
42
|
+
contextWindow?: number;
|
|
35
43
|
/** The job's live widget, while one is being drawn; frozen at its last state once the job settles. */
|
|
36
44
|
widget?: JobWidgetView;
|
|
37
45
|
resultText?: string;
|
|
@@ -47,6 +55,12 @@ export interface JobSnapshot {
|
|
|
47
55
|
* on collision, else the job id itself. See {@link AsyncJob.agentId}.
|
|
48
56
|
*/
|
|
49
57
|
agentUrlId?: string;
|
|
58
|
+
/**
|
|
59
|
+
* Whether this job's turn published `<agentUrlId>.md`. False where the job
|
|
60
|
+
* body reported that it wrote none, so `agent://` still holds an earlier
|
|
61
|
+
* turn's output; undefined where the body does not report it.
|
|
62
|
+
*/
|
|
63
|
+
agentOutputPublished?: boolean;
|
|
50
64
|
}
|
|
51
65
|
/** Outcome of cancelling one background job. */
|
|
52
66
|
export type CancelStatus = "cancelled" | "not_found" | "already_completed";
|