@code-yeongyu/senpi 2026.9.12-3 → 2026.9.12
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 +0 -60
- package/README.md +1 -1
- package/dist/bun/cli.d.ts +1 -2
- package/dist/bun/cli.d.ts.map +1 -1
- package/dist/bun/cli.js +8 -5
- package/dist/bun/cli.js.map +1 -1
- package/dist/bun/register-bedrock.d.ts +2 -0
- package/dist/bun/register-bedrock.d.ts.map +1 -0
- package/dist/bun/register-bedrock.js +4 -0
- package/dist/bun/register-bedrock.js.map +1 -0
- package/dist/cli/config-selector.d.ts.map +1 -1
- package/dist/cli/config-selector.js +1 -2
- package/dist/cli/config-selector.js.map +1 -1
- package/dist/cli/experimental/auth.d.ts +16 -0
- package/dist/cli/experimental/auth.d.ts.map +1 -0
- package/dist/cli/experimental/auth.js +13 -0
- package/dist/cli/experimental/auth.js.map +1 -0
- package/dist/cli/experimental/cli.d.ts +6 -0
- package/dist/cli/experimental/cli.d.ts.map +1 -0
- package/dist/cli/experimental/cli.js +5 -0
- package/dist/cli/experimental/cli.js.map +1 -0
- package/dist/cli/experimental/command-options.d.ts +17 -0
- package/dist/cli/experimental/command-options.d.ts.map +1 -0
- package/dist/cli/experimental/command-options.js +35 -0
- package/dist/cli/experimental/command-options.js.map +1 -0
- package/dist/cli/experimental/command.d.ts +63 -0
- package/dist/cli/experimental/command.d.ts.map +1 -0
- package/dist/cli/experimental/command.js +127 -0
- package/dist/cli/experimental/command.js.map +1 -0
- package/dist/cli/experimental/commands/client.d.ts +13 -0
- package/dist/cli/experimental/commands/client.d.ts.map +1 -0
- package/dist/cli/experimental/commands/client.js +25 -0
- package/dist/cli/experimental/commands/client.js.map +1 -0
- package/dist/cli/experimental/commands/pi.d.ts +15 -0
- package/dist/cli/experimental/commands/pi.d.ts.map +1 -0
- package/dist/cli/experimental/commands/pi.js +28 -0
- package/dist/cli/experimental/commands/pi.js.map +1 -0
- package/dist/cli/experimental/commands/server.d.ts +13 -0
- package/dist/cli/experimental/commands/server.d.ts.map +1 -0
- package/dist/cli/experimental/commands/server.js +25 -0
- package/dist/cli/experimental/commands/server.js.map +1 -0
- package/dist/cli/experimental/transport-address.d.ts +10 -0
- package/dist/cli/experimental/transport-address.d.ts.map +1 -0
- package/dist/cli/experimental/transport-address.js +38 -0
- package/dist/cli/experimental/transport-address.js.map +1 -0
- package/dist/cli.js +0 -3
- package/dist/cli.js.map +1 -1
- package/dist/client/index.d.ts +2 -1
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +2 -1
- package/dist/client/index.js.map +1 -1
- package/dist/client/remote-session.d.ts +53 -0
- package/dist/client/remote-session.d.ts.map +1 -0
- package/dist/client/remote-session.js +340 -0
- package/dist/client/remote-session.js.map +1 -0
- package/dist/client/transcript.d.ts +12 -0
- package/dist/client/transcript.d.ts.map +1 -0
- package/dist/client/transcript.js +98 -0
- package/dist/client/transcript.js.map +1 -0
- package/dist/config.d.ts +0 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +0 -1
- package/dist/config.js.map +1 -1
- package/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/dist/core/agent-session-runtime.js +6 -18
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session.d.ts +17 -54
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +157 -153
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/compaction/branch-summarization.d.ts +1 -1
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
- package/dist/core/compaction/branch-summarization.js +4 -6
- package/dist/core/compaction/branch-summarization.js.map +1 -1
- package/dist/core/compaction-settings-access.d.ts +2 -18
- package/dist/core/compaction-settings-access.d.ts.map +1 -1
- package/dist/core/compaction-settings-access.js +4 -35
- package/dist/core/compaction-settings-access.js.map +1 -1
- package/dist/core/compaction-settings-resolver.d.ts +2 -2
- package/dist/core/compaction-settings-resolver.d.ts.map +1 -1
- package/dist/core/compaction-settings-resolver.js +3 -6
- package/dist/core/compaction-settings-resolver.js.map +1 -1
- package/dist/core/extensions/builtin/ask-user/extension.d.ts.map +1 -1
- package/dist/core/extensions/builtin/ask-user/extension.js +0 -11
- package/dist/core/extensions/builtin/ask-user/extension.js.map +1 -1
- package/dist/core/extensions/builtin/cursor-cli-oauth/models.d.ts.map +1 -1
- package/dist/core/extensions/builtin/cursor-cli-oauth/models.js +1 -2
- package/dist/core/extensions/builtin/cursor-cli-oauth/models.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/presets.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/presets.js +1 -7
- package/dist/core/extensions/builtin/prompt-preset/presets.js.map +1 -1
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +2 -4
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/keybindings.d.ts +0 -10
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/keybindings.js +0 -8
- package/dist/core/keybindings.js.map +1 -1
- package/dist/core/messages.d.ts +1 -1
- package/dist/core/messages.d.ts.map +1 -1
- package/dist/core/messages.js.map +1 -1
- package/dist/core/model-registry.d.ts +1 -5
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +0 -8
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +0 -2
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/model-runtime.d.ts +0 -1
- package/dist/core/model-runtime.d.ts.map +1 -1
- package/dist/core/model-runtime.js +2 -5
- package/dist/core/model-runtime.js.map +1 -1
- package/dist/core/retry-fallback/settings.d.ts +0 -2
- package/dist/core/retry-fallback/settings.d.ts.map +1 -1
- package/dist/core/retry-fallback/settings.js.map +1 -1
- package/dist/core/session-manager.d.ts +2 -5
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +19 -68
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/session-write-reservation.d.ts +0 -9
- package/dist/core/session-write-reservation.d.ts.map +1 -1
- package/dist/core/session-write-reservation.js +0 -33
- package/dist/core/session-write-reservation.js.map +1 -1
- package/dist/core/settings-manager.d.ts +5 -12
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +6 -18
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/settings-public-types.d.ts +1 -1
- package/dist/core/settings-public-types.d.ts.map +1 -1
- package/dist/core/settings-public-types.js.map +1 -1
- package/dist/core/skills.d.ts +1 -1
- package/dist/core/skills.d.ts.map +1 -1
- package/dist/core/skills.js +2 -6
- package/dist/core/skills.js.map +1 -1
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +9 -8
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +142 -3
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/edit.d.ts +12 -1
- package/dist/core/tools/edit.d.ts.map +1 -1
- package/dist/core/tools/edit.js +168 -4
- package/dist/core/tools/edit.js.map +1 -1
- package/dist/core/tools/find.d.ts.map +1 -1
- package/dist/core/tools/find.js +53 -2
- package/dist/core/tools/find.js.map +1 -1
- package/dist/core/tools/grep.d.ts.map +1 -1
- package/dist/core/tools/grep.js +58 -2
- package/dist/core/tools/grep.js.map +1 -1
- package/dist/core/tools/ls.d.ts.map +1 -1
- package/dist/core/tools/ls.js +47 -2
- package/dist/core/tools/ls.js.map +1 -1
- package/dist/core/tools/read.d.ts +4 -1
- package/dist/core/tools/read.d.ts.map +1 -1
- package/dist/core/tools/read.js +141 -4
- package/dist/core/tools/read.js.map +1 -1
- package/dist/core/tools/write.d.ts.map +1 -1
- package/dist/core/tools/write.js +153 -4
- package/dist/core/tools/write.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/migrations.d.ts.map +1 -1
- package/dist/migrations.js +2 -2
- package/dist/migrations.js.map +1 -1
- package/dist/modes/app-server/threads/turn-runtime.d.ts +1 -3
- package/dist/modes/app-server/threads/turn-runtime.d.ts.map +1 -1
- package/dist/modes/app-server/threads/turn-runtime.js.map +1 -1
- package/dist/modes/app-server/threads/turns.js +1 -1
- package/dist/modes/app-server/threads/turns.js.map +1 -1
- package/dist/modes/app-server/turn-adapter.js +2 -4
- package/dist/modes/app-server/turn-adapter.js.map +1 -1
- package/dist/modes/interactive/components/ask-user-async-widget.d.ts +12 -17
- package/dist/modes/interactive/components/ask-user-async-widget.d.ts.map +1 -1
- package/dist/modes/interactive/components/ask-user-async-widget.js +23 -47
- package/dist/modes/interactive/components/ask-user-async-widget.js.map +1 -1
- package/dist/modes/interactive/components/assistant-message.d.ts +0 -7
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/assistant-message.js +2 -26
- package/dist/modes/interactive/components/assistant-message.js.map +1 -1
- package/dist/modes/interactive/components/assistant-render-descriptors.d.ts +0 -4
- package/dist/modes/interactive/components/assistant-render-descriptors.d.ts.map +1 -1
- package/dist/modes/interactive/components/assistant-render-descriptors.js +5 -8
- package/dist/modes/interactive/components/assistant-render-descriptors.js.map +1 -1
- package/dist/modes/interactive/components/custom-editor.d.ts +1 -10
- package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-editor.js +1 -37
- package/dist/modes/interactive/components/custom-editor.js.map +1 -1
- package/dist/modes/interactive/components/index.d.ts +1 -1
- package/dist/modes/interactive/components/index.d.ts.map +1 -1
- package/dist/modes/interactive/components/index.js.map +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.js +8 -8
- package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -1
- package/dist/modes/interactive/components/status-indicator.d.ts +1 -4
- package/dist/modes/interactive/components/status-indicator.d.ts.map +1 -1
- package/dist/modes/interactive/components/status-indicator.js +2 -14
- package/dist/modes/interactive/components/status-indicator.js.map +1 -1
- package/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/thinking-selector.js +4 -4
- package/dist/modes/interactive/components/thinking-selector.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution-renderer.d.ts +1 -4
- package/dist/modes/interactive/components/tool-execution-renderer.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution-renderer.js +10 -23
- package/dist/modes/interactive/components/tool-execution-renderer.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution-types.d.ts +2 -18
- package/dist/modes/interactive/components/tool-execution-types.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution-types.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts +3 -3
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +0 -5
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +15 -10
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +138 -178
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/theme/dark.json +1 -2
- package/dist/modes/interactive/theme/grok-day.json +1 -2
- package/dist/modes/interactive/theme/grok-night.json +1 -2
- package/dist/modes/interactive/theme/light.json +1 -2
- package/dist/modes/interactive/theme/theme-controller.d.ts +0 -1
- package/dist/modes/interactive/theme/theme-controller.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme-controller.js +0 -5
- package/dist/modes/interactive/theme/theme-controller.js.map +1 -1
- package/dist/modes/interactive/theme/theme-schema.json +2 -6
- package/dist/modes/interactive/theme/theme.d.ts +5 -10
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +117 -14
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/modes/interactive/tips/catalog/input-tips.d.ts +0 -5
- package/dist/modes/interactive/tips/catalog/input-tips.d.ts.map +1 -1
- package/dist/modes/interactive/tips/catalog/input-tips.js +0 -5
- package/dist/modes/interactive/tips/catalog/input-tips.js.map +1 -1
- package/dist/modes/rpc/connection-handler.d.ts.map +1 -1
- package/dist/modes/rpc/connection-handler.js +2 -8
- package/dist/modes/rpc/connection-handler.js.map +1 -1
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client.js +1 -11
- package/dist/modes/rpc/rpc-client.js.map +1 -1
- package/dist/modes/rpc/rpc-types.d.ts +1 -2
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-types.js +0 -1
- package/dist/modes/rpc/rpc-types.js.map +1 -1
- package/dist/modes/rpc/session-registry.d.ts +1 -3
- package/dist/modes/rpc/session-registry.d.ts.map +1 -1
- package/dist/modes/rpc/session-registry.js.map +1 -1
- package/dist/modes/rpc/session-worker-client.d.ts +8 -10
- package/dist/modes/rpc/session-worker-client.d.ts.map +1 -1
- package/dist/modes/rpc/session-worker-client.js +23 -14
- package/dist/modes/rpc/session-worker-client.js.map +1 -1
- package/dist/modes/rpc/session-worker-protocol.d.ts +0 -10
- package/dist/modes/rpc/session-worker-protocol.d.ts.map +1 -1
- package/dist/modes/rpc/session-worker-protocol.js +0 -2
- package/dist/modes/rpc/session-worker-protocol.js.map +1 -1
- package/dist/modes/rpc/session-worker.js +16 -12
- package/dist/modes/rpc/session-worker.js.map +1 -1
- package/dist/modes/rpc/worker-session-registry.d.ts +0 -12
- package/dist/modes/rpc/worker-session-registry.d.ts.map +1 -1
- package/dist/modes/rpc/worker-session-registry.js +24 -51
- package/dist/modes/rpc/worker-session-registry.js.map +1 -1
- package/dist/senpi +0 -3
- package/dist/server/create-harness.d.ts +26 -0
- package/dist/server/create-harness.d.ts.map +1 -0
- package/dist/server/create-harness.js +106 -0
- package/dist/server/create-harness.js.map +1 -0
- package/dist/utils/clipboard-image.d.ts.map +1 -1
- package/dist/utils/clipboard-image.js +69 -52
- package/dist/utils/clipboard-image.js.map +1 -1
- package/dist/utils/clipboard-native.d.ts +11 -0
- package/dist/utils/clipboard-native.d.ts.map +1 -0
- package/dist/utils/clipboard-native.js +20 -0
- package/dist/utils/clipboard-native.js.map +1 -0
- package/dist/utils/clipboard.d.ts.map +1 -1
- package/dist/utils/clipboard.js +126 -49
- package/dist/utils/clipboard.js.map +1 -1
- package/dist/utils/exif-orientation.d.ts.map +1 -1
- package/dist/utils/exif-orientation.js +3 -2
- package/dist/utils/exif-orientation.js.map +1 -1
- package/dist/utils/tools-manager.d.ts +0 -1
- package/dist/utils/tools-manager.d.ts.map +1 -1
- package/dist/utils/tools-manager.js +19 -41
- package/dist/utils/tools-manager.js.map +1 -1
- package/docs/AGENTS.md +67 -0
- package/docs/compaction.md +13 -39
- package/docs/containerization.md +0 -45
- package/docs/development.md +0 -19
- package/docs/docs.json +0 -4
- package/docs/environment-variables.md +0 -2
- package/docs/extensions.md +10 -21
- package/docs/keybindings.md +2 -7
- package/docs/models.md +1 -1
- package/docs/providers.md +1 -1
- package/docs/rpc.md +8 -16
- package/docs/sdk.md +0 -7
- package/docs/session-format.md +38 -52
- package/docs/settings.md +4 -40
- package/docs/skills.md +1 -1
- package/docs/termux.md +1 -0
- package/docs/themes.md +6 -8
- package/docs/tui.md +3 -22
- package/examples/README.md +0 -3
- package/examples/extensions/dynamic-resources/dynamic.json +0 -2
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-bedrock-runtime/package.json +3 -3
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/util/index.js +0 -5
- package/node_modules/@aws-sdk/core/dist-es/submodules/util/index.js +0 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/util/index.d.ts +0 -1
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/util/index.d.ts +0 -1
- package/node_modules/@aws-sdk/core/package.json +1 -1
- package/node_modules/@aws-sdk/credential-provider-env/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-http/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +9 -9
- package/node_modules/@aws-sdk/credential-provider-login/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js +0 -2
- package/node_modules/@aws-sdk/credential-provider-node/dist-es/runtime/memoize-chain.js +0 -2
- package/node_modules/@aws-sdk/credential-provider-node/package.json +7 -7
- package/node_modules/@aws-sdk/credential-provider-process/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +3 -3
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/package.json +2 -2
- package/node_modules/@aws-sdk/token-providers/package.json +1 -1
- package/node_modules/@code-yeongyu/senpi-codemode/CHANGELOG.md +0 -24
- package/node_modules/@code-yeongyu/senpi-codemode/package.json +5 -5
- package/node_modules/@earendil-works/pi-agent-core/README.md +0 -4
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.d.ts +384 -639
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.js +250 -5
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/branch-summarization.d.ts +6 -12
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/branch-summarization.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/branch-summarization.js +27 -33
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/branch-summarization.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.d.ts +8 -30
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js +64 -53
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.d.ts +28 -25
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.js +125 -368
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/events.d.ts +38 -20
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/events.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/events.js +55 -233
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/events.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/messages.d.ts +2 -2
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/messages.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/messages.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/prompt-templates.d.ts +2 -3
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/prompt-templates.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/prompt-templates.js +17 -17
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/prompt-templates.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/reducer.d.ts +100 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/reducer.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/reducer.js +420 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/reducer.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/result.d.ts +0 -93
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/result.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/result.js +0 -39
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/result.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/context.d.ts +19 -6
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/context.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/context.js +53 -31
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/context.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/index.d.ts +5 -9
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/index.js +4 -7
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/codec.d.ts +8 -19
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/codec.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/codec.js +219 -34
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/codec.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/errors.d.ts +9 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/errors.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/errors.js +18 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/errors.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/repo.d.ts +24 -27
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/repo.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/repo.js +151 -276
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/repo.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/storage.d.ts +41 -39
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/storage.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/storage.js +196 -175
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/storage.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/types.d.ts +22 -23
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/types.js +1 -2
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl.d.ts +3 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl.js +2 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory.d.ts +40 -44
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory.js +115 -333
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.d.ts +51 -78
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.js +207 -327
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/state.d.ts +65 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/state.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/state.js +320 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/state.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance.d.ts +4 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance.js +762 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/index.d.ts +2 -9
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/index.js +1 -8
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/types.d.ts +7 -5
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/types.d.ts +265 -425
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/types.js +7 -7
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/skills.d.ts +2 -3
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/skills.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/skills.js +26 -29
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/skills.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/telemetry.d.ts +43 -64
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/telemetry.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/telemetry.js +26 -45
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/telemetry.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/bash.d.ts +4 -4
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/bash.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/bash.js +93 -66
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/bash.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/edit.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/edit.js +13 -17
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/edit.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/file-mutation-queue.d.ts +1 -2
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/file-mutation-queue.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/file-mutation-queue.js +5 -5
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/file-mutation-queue.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/path-utils.d.ts +2 -3
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/path-utils.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/path-utils.js +5 -5
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/path-utils.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/read.d.ts +1 -2
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/read.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/read.js +6 -4
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/read.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/write.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/write.js +8 -12
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/write.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.d.ts +45 -128
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/shell-output.d.ts +5 -19
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/shell-output.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/shell-output.js +192 -65
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/shell-output.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/truncate.d.ts +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/truncate.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/truncate.js +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/truncate.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/index.d.ts +1 -4
- package/node_modules/@earendil-works/pi-agent-core/dist/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/index.js +6 -3
- package/node_modules/@earendil-works/pi-agent-core/dist/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/search/index.d.ts +16 -24
- package/node_modules/@earendil-works/pi-agent-core/dist/search/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/search/index.js +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/search/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/search/scanning.d.ts +29 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/search/scanning.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/search/scanning.js +103 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/search/scanning.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts +0 -2
- package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/package.json +6 -27
- package/node_modules/@earendil-works/pi-ai/README.md +4 -39
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js +1 -8
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-gateway-binding.d.ts +69 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-gateway-binding.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-gateway-binding.js +159 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-gateway-binding.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/measure.d.ts +0 -11
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/measure.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/measure.js +0 -18
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/measure.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.d.ts +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.js +1 -5
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js +1 -4
- package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js +3 -6
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.js +1 -4
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js +3 -13
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/cursor/store-migration.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/cursor/store-migration.js +1 -2
- package/node_modules/@earendil-works/pi-ai/dist/cursor/store-migration.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/index.d.ts +1 -2
- package/node_modules/@earendil-works/pi-ai/dist/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/index.js +1 -2
- package/node_modules/@earendil-works/pi-ai/dist/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/models.d.ts +0 -1
- package/node_modules/@earendil-works/pi-ai/dist/models.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/models.js +2 -5
- package/node_modules/@earendil-works/pi-ai/dist/models.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/openai-responses-compat.d.ts +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/openai-responses-compat.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/openai-responses-compat.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.js +0 -4
- package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/cursor.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/cursor.js +1 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/cursor.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/azure-openai-responses.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/baseten.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/deepseek.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/fireworks.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/github-copilot.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/openai-codex.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan-cn.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan-individual.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/xai.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/faux.js +5 -5
- package/node_modules/@earendil-works/pi-ai/dist/providers/faux.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.js +3 -4
- package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/opencode.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/opencode.js +4 -5
- package/node_modules/@earendil-works/pi-ai/dist/providers/opencode.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/types.d.ts +6 -16
- package/node_modules/@earendil-works/pi-ai/dist/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.js +5 -25
- package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.d.ts +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.js +1 -5
- package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/retry-profile/types.d.ts +1 -10
- package/node_modules/@earendil-works/pi-ai/dist/utils/retry-profile/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/retry-profile/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/retry.d.ts +2 -13
- package/node_modules/@earendil-works/pi-ai/dist/utils/retry.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/retry.js +7 -18
- package/node_modules/@earendil-works/pi-ai/dist/utils/retry.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/uuid.d.ts +2 -2
- package/node_modules/@earendil-works/pi-ai/dist/utils/uuid.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/uuid.js +31 -36
- package/node_modules/@earendil-works/pi-ai/dist/utils/uuid.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/package.json +6 -6
- package/node_modules/@earendil-works/pi-pty/package.json +1 -1
- package/node_modules/@earendil-works/pi-telemetry/package.json +1 -1
- package/node_modules/@earendil-works/pi-tui/README.md +4 -53
- package/node_modules/@earendil-works/pi-tui/dist/alt-screen-search.d.ts +1 -21
- package/node_modules/@earendil-works/pi-tui/dist/alt-screen-search.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/alt-screen-search.js +42 -199
- package/node_modules/@earendil-works/pi-tui/dist/alt-screen-search.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/box.d.ts +1 -3
- package/node_modules/@earendil-works/pi-tui/dist/components/box.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/box.js +0 -28
- package/node_modules/@earendil-works/pi-tui/dist/components/box.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts +1 -6
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.js +18 -98
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/input.d.ts +1 -12
- package/node_modules/@earendil-works/pi-tui/dist/components/input.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/input.js +6 -40
- package/node_modules/@earendil-works/pi-tui/dist/components/input.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/latex.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/latex.js +0 -7
- package/node_modules/@earendil-works/pi-tui/dist/components/latex.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/loader.d.ts +0 -3
- package/node_modules/@earendil-works/pi-tui/dist/components/loader.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/loader.js +8 -20
- package/node_modules/@earendil-works/pi-tui/dist/components/loader.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.d.ts +3 -6
- package/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.js +1 -6
- package/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/select-list.d.ts +1 -4
- package/node_modules/@earendil-works/pi-tui/dist/components/select-list.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/select-list.js +2 -48
- package/node_modules/@earendil-works/pi-tui/dist/components/select-list.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.d.ts +1 -5
- package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.js +5 -54
- package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/index.d.ts +1 -3
- package/node_modules/@earendil-works/pi-tui/dist/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/index.js +0 -3
- package/node_modules/@earendil-works/pi-tui/dist/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/layout.d.ts +1 -3
- package/node_modules/@earendil-works/pi-tui/dist/layout.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/layout.js +9 -32
- package/node_modules/@earendil-works/pi-tui/dist/layout.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.d.ts +1 -2
- package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.js +44 -3
- package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal.js +20 -2
- package/node_modules/@earendil-works/pi-tui/dist/terminal.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.d.ts +1 -31
- package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.js +41 -335
- package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts +5 -83
- package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui.js +4 -118
- package/node_modules/@earendil-works/pi-tui/dist/tui.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts +0 -2
- package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/utils.js +0 -9
- package/node_modules/@earendil-works/pi-tui/dist/utils.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/native/darwin/README.md +6 -8
- package/node_modules/@earendil-works/pi-tui/native/darwin/build.sh +5 -12
- package/node_modules/@earendil-works/pi-tui/native/darwin/prebuilds/darwin-arm64/{darwin-platform.node → darwin-modifiers.node} +0 -0
- package/node_modules/@earendil-works/pi-tui/native/darwin/prebuilds/darwin-x64/{darwin-platform.node → darwin-modifiers.node} +0 -0
- package/node_modules/@earendil-works/pi-tui/native/darwin/src/darwin-modifiers.c +70 -0
- package/node_modules/@earendil-works/pi-tui/native/win32/README.md +7 -18
- package/node_modules/@earendil-works/pi-tui/native/win32/build.mjs +4 -7
- package/node_modules/@earendil-works/pi-tui/native/win32/prebuilds/win32-arm64/win32-console-mode.node +0 -0
- package/node_modules/@earendil-works/pi-tui/native/win32/prebuilds/win32-x64/win32-console-mode.node +0 -0
- package/node_modules/@earendil-works/pi-tui/native/win32/src/win32-console-mode.c +119 -0
- package/node_modules/@earendil-works/pi-tui/package.json +3 -10
- package/node_modules/@google/genai/dist/genai.d.ts +278 -1788
- package/node_modules/@google/genai/dist/index.cjs +299 -319
- package/node_modules/@google/genai/dist/index.mjs +299 -319
- package/node_modules/@google/genai/dist/index.mjs.map +1 -1
- package/node_modules/@google/genai/dist/node/index.cjs +300 -320
- package/node_modules/@google/genai/dist/node/index.mjs +300 -320
- package/node_modules/@google/genai/dist/node/index.mjs.map +1 -1
- package/node_modules/@google/genai/dist/node/node.d.ts +278 -1788
- package/node_modules/@google/genai/dist/tokenizer/node.cjs +2 -49
- package/node_modules/@google/genai/dist/tokenizer/node.d.ts +3 -43
- package/node_modules/@google/genai/dist/tokenizer/node.mjs +2 -49
- package/node_modules/@google/genai/dist/tokenizer/node.mjs.map +1 -1
- package/node_modules/@google/genai/dist/vertex_internal/index.cjs +3 -39
- package/node_modules/@google/genai/dist/vertex_internal/index.cjs.map +1 -1
- package/node_modules/@google/genai/dist/vertex_internal/index.d.ts +9 -51
- package/node_modules/@google/genai/dist/vertex_internal/index.js +3 -39
- package/node_modules/@google/genai/dist/vertex_internal/index.js.map +1 -1
- package/node_modules/@google/genai/dist/web/index.mjs +299 -319
- package/node_modules/@google/genai/dist/web/index.mjs.map +1 -1
- package/node_modules/@google/genai/dist/web/web.d.ts +278 -1788
- package/node_modules/@google/genai/package.json +1 -1
- package/node_modules/@mariozechner/clipboard/.yarnrc.yml +1 -0
- package/node_modules/@mariozechner/clipboard/Cargo.toml +45 -0
- package/node_modules/@mariozechner/clipboard/README.md +60 -0
- package/node_modules/@mariozechner/clipboard/build.rs +5 -0
- package/node_modules/@mariozechner/clipboard/exp.ts +12 -0
- package/node_modules/@mariozechner/clipboard/index.d.ts +37 -0
- package/node_modules/@mariozechner/clipboard/index.js +606 -0
- package/node_modules/@mariozechner/clipboard/package.json +45 -0
- package/node_modules/@mariozechner/clipboard/src/clipboard_rs/common.rs +307 -0
- package/node_modules/@mariozechner/clipboard/src/clipboard_rs/mod.rs +93 -0
- package/node_modules/@mariozechner/clipboard/src/clipboard_rs/platform/ios.rs +313 -0
- package/node_modules/@mariozechner/clipboard/src/clipboard_rs/platform/macos.rs +471 -0
- package/node_modules/@mariozechner/clipboard/src/clipboard_rs/platform/mod.rs +252 -0
- package/node_modules/@mariozechner/clipboard/src/clipboard_rs/platform/wayland.rs +431 -0
- package/node_modules/@mariozechner/clipboard/src/clipboard_rs/platform/win.rs +712 -0
- package/node_modules/@mariozechner/clipboard/src/clipboard_rs/platform/x11.rs +916 -0
- package/node_modules/@mariozechner/clipboard/src/lib.rs +194 -0
- package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +4 -11
- package/node_modules/@smithy/node-http-handler/dist-es/http2/ClientHttp2SessionRef.js +0 -1
- package/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-manager.js +3 -2
- package/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +1 -8
- package/node_modules/@smithy/node-http-handler/package.json +2 -2
- package/node_modules/ignore/README.md +0 -52
- package/node_modules/ignore/index.js +129 -785
- package/node_modules/ignore/legacy.js +98 -660
- package/node_modules/ignore/package.json +4 -10
- package/node_modules/marked/README.md +0 -1
- package/node_modules/marked/lib/marked.d.ts +0 -7
- package/node_modules/marked/lib/marked.esm.js +30 -30
- package/node_modules/marked/lib/marked.esm.js.map +3 -3
- package/node_modules/marked/lib/marked.umd.js +30 -30
- package/node_modules/marked/lib/marked.umd.js.map +3 -3
- package/node_modules/marked/man/marked.1 +1 -1
- package/node_modules/marked/package.json +2 -2
- package/node_modules/typebox/build/compile/validator.d.mts +1 -1
- package/node_modules/typebox/build/compile/validator.mjs +1 -1
- package/node_modules/typebox/build/format/idna/idn-hostname.mjs +5 -7
- package/node_modules/typebox/build/format/iri.mjs +1 -5
- package/node_modules/typebox/build/guard/emit.mjs +4 -2
- package/node_modules/typebox/build/guard/guard.mjs +18 -6
- package/node_modules/typebox/build/guard/string.mjs +24 -16
- package/node_modules/typebox/build/schema/compile.d.mts +2 -3
- package/node_modules/typebox/build/schema/compile.mjs +8 -8
- package/node_modules/typebox/build/schema/engine/_context.d.mts +6 -1
- package/node_modules/typebox/build/schema/engine/_context.mjs +14 -9
- package/node_modules/typebox/build/schema/engine/_functions.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/_stack.d.mts +2 -6
- package/node_modules/typebox/build/schema/engine/_stack.mjs +32 -135
- package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +4 -16
- package/node_modules/typebox/build/schema/engine/allOf.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/anyOf.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/if.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/oneOf.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/propertyNames.mjs +3 -1
- package/node_modules/typebox/build/schema/engine/ref.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/schema.mjs +0 -6
- package/node_modules/typebox/build/schema/engine/unevaluatedItems.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/unevaluatedProperties.mjs +2 -2
- package/node_modules/typebox/build/schema/errors.d.mts +2 -2
- package/node_modules/typebox/build/schema/errors.mjs +13 -7
- package/node_modules/typebox/build/schema/parse.d.mts +0 -1
- package/node_modules/typebox/build/schema/parse.mjs +5 -10
- package/node_modules/typebox/build/schema/resolve/resolve.d.mts +3 -34
- package/node_modules/typebox/build/schema/resolve/resolve.mjs +73 -198
- package/node_modules/typebox/build/schema/schema.d.mts +0 -1
- package/node_modules/typebox/build/schema/schema.mjs +0 -1
- package/node_modules/typebox/build/value/errors/errors.d.mts +12 -2
- package/node_modules/typebox/build/value/errors/errors.mjs +7 -2
- package/node_modules/typebox/package.json +1 -1
- package/node_modules/typebox/readme.md +5 -9
- package/node_modules/undici/docs/docs/api/Client.md +0 -4
- package/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +2 -3
- package/node_modules/undici/docs/docs/api/EventSource.md +0 -4
- package/node_modules/undici/docs/docs/api/Interceptors.md +3 -7
- package/node_modules/undici/docs/docs/api/Socks5ProxyAgent.md +1 -7
- package/node_modules/undici/lib/cache/memory-cache-store.js +2 -2
- package/node_modules/undici/lib/core/symbols.js +0 -2
- package/node_modules/undici/lib/dispatcher/agent.js +2 -7
- package/node_modules/undici/lib/dispatcher/balanced-pool.js +4 -7
- package/node_modules/undici/lib/dispatcher/client-h1.js +4 -12
- package/node_modules/undici/lib/dispatcher/client-h2.js +3 -43
- package/node_modules/undici/lib/dispatcher/client.js +2 -3
- package/node_modules/undici/lib/dispatcher/dispatcher-base.js +1 -13
- package/node_modules/undici/lib/dispatcher/dispatcher.js +1 -15
- package/node_modules/undici/lib/dispatcher/dispatcher1-wrapper.js +0 -3
- package/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +3 -10
- package/node_modules/undici/lib/dispatcher/proxy-agent.js +1 -18
- package/node_modules/undici/lib/dispatcher/retry-agent.js +0 -3
- package/node_modules/undici/lib/dispatcher/round-robin-pool.js +1 -1
- package/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +21 -91
- package/node_modules/undici/lib/handler/cache-handler.js +5 -29
- package/node_modules/undici/lib/handler/decorator-handler.js +1 -7
- package/node_modules/undici/lib/handler/deduplication-handler.js +6 -12
- package/node_modules/undici/lib/handler/redirect-handler.js +4 -21
- package/node_modules/undici/lib/handler/retry-handler.js +30 -148
- package/node_modules/undici/lib/interceptor/cache.js +12 -65
- package/node_modules/undici/lib/interceptor/decompress.js +13 -115
- package/node_modules/undici/lib/interceptor/deduplicate.js +4 -5
- package/node_modules/undici/lib/interceptor/dns.js +0 -7
- package/node_modules/undici/lib/interceptor/dump.js +23 -10
- package/node_modules/undici/lib/mock/mock-agent.js +1 -13
- package/node_modules/undici/lib/mock/mock-utils.js +10 -11
- package/node_modules/undici/lib/util/cache.js +3 -45
- package/node_modules/undici/lib/web/cookies/parse.js +147 -150
- package/node_modules/undici/lib/web/eventsource/eventsource-stream.js +1 -28
- package/node_modules/undici/lib/web/eventsource/eventsource.js +3 -13
- package/node_modules/undici/lib/web/fetch/index.js +0 -6
- package/node_modules/undici/lib/web/fetch/request.js +3 -2
- package/node_modules/undici/lib/web/fetch/util.js +1 -6
- package/node_modules/undici/lib/web/webidl/index.js +3 -3
- package/node_modules/undici/lib/web/websocket/connection.js +1 -1
- package/node_modules/undici/lib/web/websocket/permessage-deflate.js +0 -5
- package/node_modules/undici/lib/web/websocket/stream/websocketstream.js +10 -8
- package/node_modules/undici/package.json +3 -3
- package/node_modules/undici/types/client.d.ts +0 -10
- package/node_modules/undici/types/interceptors.d.ts +0 -2
- package/node_modules/undici/types/mock-agent.d.ts +10 -11
- package/node_modules/undici/types/socks5-proxy-agent.d.ts +0 -2
- package/package.json +49 -70
- package/vendor/pi-client/client.d.ts +15 -20
- package/vendor/pi-client/client.d.ts.map +1 -1
- package/vendor/pi-client/client.js +245 -248
- package/vendor/pi-client/client.js.map +1 -1
- package/vendor/pi-client/connection.d.ts +3 -4
- package/vendor/pi-client/connection.d.ts.map +1 -1
- package/vendor/pi-client/connection.js +9 -13
- package/vendor/pi-client/connection.js.map +1 -1
- package/vendor/pi-client/errors.d.ts +15 -6
- package/vendor/pi-client/errors.d.ts.map +1 -1
- package/vendor/pi-client/errors.js +25 -10
- package/vendor/pi-client/errors.js.map +1 -1
- package/vendor/pi-client/index.d.ts +4 -3
- package/vendor/pi-client/index.d.ts.map +1 -1
- package/vendor/pi-client/index.js +2 -2
- package/vendor/pi-client/index.js.map +1 -1
- package/vendor/pi-client/session-handle.d.ts +54 -0
- package/vendor/pi-client/session-handle.d.ts.map +1 -0
- package/vendor/pi-client/session-handle.js +50 -0
- package/vendor/pi-client/session-handle.js.map +1 -0
- package/vendor/pi-client/state.d.ts +22 -0
- package/vendor/pi-client/state.d.ts.map +1 -0
- package/vendor/pi-client/state.js +145 -0
- package/vendor/pi-client/state.js.map +1 -0
- package/vendor/pi-client/types.d.ts +8 -14
- package/vendor/pi-client/types.d.ts.map +1 -1
- package/vendor/pi-client/types.js.map +1 -1
- package/vendor/pi-client/unix.d.ts +1 -14
- package/vendor/pi-client/unix.d.ts.map +1 -1
- package/vendor/pi-client/unix.js +8 -138
- package/vendor/pi-client/unix.js.map +1 -1
- package/vendor/pi-protocol/codec.d.ts +4 -2
- package/vendor/pi-protocol/codec.d.ts.map +1 -1
- package/vendor/pi-protocol/codec.js +34 -7
- package/vendor/pi-protocol/codec.js.map +1 -1
- package/vendor/pi-protocol/framing.d.ts +2 -0
- package/vendor/pi-protocol/framing.d.ts.map +1 -1
- package/vendor/pi-protocol/framing.js +15 -0
- package/vendor/pi-protocol/framing.js.map +1 -1
- package/vendor/pi-protocol/index.d.ts +1 -1
- package/vendor/pi-protocol/index.d.ts.map +1 -1
- package/vendor/pi-protocol/index.js +1 -1
- package/vendor/pi-protocol/index.js.map +1 -1
- package/vendor/pi-protocol/schemas.d.ts +13739 -0
- package/vendor/pi-protocol/schemas.d.ts.map +1 -0
- package/vendor/pi-protocol/schemas.js +386 -0
- package/vendor/pi-protocol/schemas.js.map +1 -0
- package/dist/bun/runtime-setup.d.ts +0 -2
- package/dist/bun/runtime-setup.d.ts.map +0 -1
- package/dist/bun/runtime-setup.js +0 -9
- package/dist/bun/runtime-setup.js.map +0 -1
- package/dist/bun/sandbox-env-setup.d.ts +0 -2
- package/dist/bun/sandbox-env-setup.d.ts.map +0 -1
- package/dist/bun/sandbox-env-setup.js +0 -4
- package/dist/bun/sandbox-env-setup.js.map +0 -1
- package/dist/cli/setup.d.ts +0 -2
- package/dist/cli/setup.d.ts.map +0 -1
- package/dist/cli/setup.js +0 -12
- package/dist/cli/setup.js.map +0 -1
- package/dist/core/cursor-history-admission.d.ts +0 -50
- package/dist/core/cursor-history-admission.d.ts.map +0 -1
- package/dist/core/cursor-history-admission.js +0 -130
- package/dist/core/cursor-history-admission.js.map +0 -1
- package/dist/core/tools/renderers/bash.d.ts +0 -12
- package/dist/core/tools/renderers/bash.d.ts.map +0 -1
- package/dist/core/tools/renderers/bash.js +0 -156
- package/dist/core/tools/renderers/bash.js.map +0 -1
- package/dist/core/tools/renderers/edit.d.ts +0 -23
- package/dist/core/tools/renderers/edit.d.ts.map +0 -1
- package/dist/core/tools/renderers/edit.js +0 -172
- package/dist/core/tools/renderers/edit.js.map +0 -1
- package/dist/core/tools/renderers/find.d.ts +0 -10
- package/dist/core/tools/renderers/find.d.ts.map +0 -1
- package/dist/core/tools/renderers/find.js +0 -64
- package/dist/core/tools/renderers/find.js.map +0 -1
- package/dist/core/tools/renderers/grep.d.ts +0 -10
- package/dist/core/tools/renderers/grep.d.ts.map +0 -1
- package/dist/core/tools/renderers/grep.js +0 -69
- package/dist/core/tools/renderers/grep.js.map +0 -1
- package/dist/core/tools/renderers/index.d.ts +0 -28
- package/dist/core/tools/renderers/index.d.ts.map +0 -1
- package/dist/core/tools/renderers/index.js +0 -47
- package/dist/core/tools/renderers/index.js.map +0 -1
- package/dist/core/tools/renderers/ls.d.ts +0 -10
- package/dist/core/tools/renderers/ls.d.ts.map +0 -1
- package/dist/core/tools/renderers/ls.js +0 -58
- package/dist/core/tools/renderers/ls.js.map +0 -1
- package/dist/core/tools/renderers/read.d.ts +0 -19
- package/dist/core/tools/renderers/read.d.ts.map +0 -1
- package/dist/core/tools/renderers/read.js +0 -149
- package/dist/core/tools/renderers/read.js.map +0 -1
- package/dist/core/tools/renderers/write.d.ts +0 -10
- package/dist/core/tools/renderers/write.d.ts.map +0 -1
- package/dist/core/tools/renderers/write.js +0 -162
- package/dist/core/tools/renderers/write.js.map +0 -1
- package/dist/modes/interactive/chat-viewport.d.ts +0 -22
- package/dist/modes/interactive/chat-viewport.d.ts.map +0 -1
- package/dist/modes/interactive/chat-viewport.js +0 -29
- package/dist/modes/interactive/chat-viewport.js.map +0 -1
- package/dist/modes/interactive/components/ask-user-answer-key.d.ts +0 -14
- package/dist/modes/interactive/components/ask-user-answer-key.d.ts.map +0 -1
- package/dist/modes/interactive/components/ask-user-answer-key.js +0 -65
- package/dist/modes/interactive/components/ask-user-answer-key.js.map +0 -1
- package/dist/modes/interactive/theme/theme-json.d.ts +0 -84
- package/dist/modes/interactive/theme/theme-json.d.ts.map +0 -1
- package/dist/modes/interactive/theme/theme-json.js +0 -130
- package/dist/modes/interactive/theme/theme-json.js.map +0 -1
- package/dist/modes/interactive/tui-renderer.d.ts +0 -21
- package/dist/modes/interactive/tui-renderer.d.ts.map +0 -1
- package/dist/modes/interactive/tui-renderer.js +0 -67
- package/dist/modes/interactive/tui-renderer.js.map +0 -1
- package/dist/modes/rpc/session-path-reservations.d.ts +0 -30
- package/dist/modes/rpc/session-path-reservations.d.ts.map +0 -1
- package/dist/modes/rpc/session-path-reservations.js +0 -58
- package/dist/modes/rpc/session-path-reservations.js.map +0 -1
- package/dist/modes/rpc/session-worker-credit.d.ts +0 -17
- package/dist/modes/rpc/session-worker-credit.d.ts.map +0 -1
- package/dist/modes/rpc/session-worker-credit.js +0 -39
- package/dist/modes/rpc/session-worker-credit.js.map +0 -1
- package/dist/modes/rpc/session-worker-signals.d.ts +0 -7
- package/dist/modes/rpc/session-worker-signals.d.ts.map +0 -1
- package/dist/modes/rpc/session-worker-signals.js +0 -19
- package/dist/modes/rpc/session-worker-signals.js.map +0 -1
- package/dist/utils/clipboard-command.d.ts +0 -7
- package/dist/utils/clipboard-command.d.ts.map +0 -1
- package/dist/utils/clipboard-command.js +0 -45
- package/dist/utils/clipboard-command.js.map +0 -1
- package/examples/plugins/pi-example-plugin/README.md +0 -38
- package/examples/plugins/pi-example-plugin/package.json +0 -10
- package/examples/plugins/pi-example-plugin/src/contract.ts +0 -13
- package/examples/plugins/pi-example-plugin/src/session.ts +0 -23
- package/examples/plugins/pi-example-plugin/src/tui.ts +0 -31
- package/node_modules/@aws-sdk/core/dist-es/submodules/util/hasOwn.js +0 -3
- package/node_modules/@aws-sdk/core/dist-types/submodules/util/hasOwn.d.ts +0 -4
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/util/hasOwn.d.ts +0 -1
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/LICENSE +0 -201
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/README.md +0 -62
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +0 -158
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/constants.js +0 -2
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/fromEnvSigningName.js +0 -16
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/fromSso.js +0 -84
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/fromStatic.js +0 -8
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/getNewSsoOidcToken.js +0 -11
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/getSsoOidcClient.js +0 -10
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/index.js +0 -4
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/nodeProvider.js +0 -5
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/validateTokenExpiry.js +0 -7
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/validateTokenKey.js +0 -7
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/writeSSOTokenToFile.js +0 -8
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/constants.d.ts +0 -8
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/fromEnvSigningName.d.ts +0 -18
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/fromSso.d.ts +0 -12
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/fromStatic.d.ts +0 -9
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/getNewSsoOidcToken.d.ts +0 -8
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/getSsoOidcClient.d.ts +0 -7
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/index.d.ts +0 -7
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/nodeProvider.d.ts +0 -18
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/constants.d.ts +0 -3
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/fromEnvSigningName.d.ts +0 -8
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/fromSso.d.ts +0 -10
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/fromStatic.d.ts +0 -5
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/getNewSsoOidcToken.d.ts +0 -9
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/getSsoOidcClient.d.ts +0 -7
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/index.d.ts +0 -7
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/nodeProvider.d.ts +0 -3
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/validateTokenExpiry.d.ts +0 -2
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/validateTokenKey.d.ts +0 -1
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/writeSSOTokenToFile.d.ts +0 -2
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/validateTokenExpiry.d.ts +0 -5
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/validateTokenKey.d.ts +0 -4
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/writeSSOTokenToFile.d.ts +0 -5
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/package.json +0 -69
- package/node_modules/@earendil-works/chord/README.md +0 -205
- package/node_modules/@earendil-works/chord/dist/api.d.ts +0 -15
- package/node_modules/@earendil-works/chord/dist/api.d.ts.map +0 -1
- package/node_modules/@earendil-works/chord/dist/api.js +0 -72
- package/node_modules/@earendil-works/chord/dist/api.js.map +0 -1
- package/node_modules/@earendil-works/chord/dist/bundler.d.ts +0 -6
- package/node_modules/@earendil-works/chord/dist/bundler.d.ts.map +0 -1
- package/node_modules/@earendil-works/chord/dist/bundler.js +0 -3
- package/node_modules/@earendil-works/chord/dist/bundler.js.map +0 -1
- package/node_modules/@earendil-works/chord/dist/context/index.d.ts +0 -24
- package/node_modules/@earendil-works/chord/dist/context/index.d.ts.map +0 -1
- package/node_modules/@earendil-works/chord/dist/context/index.js +0 -97
- package/node_modules/@earendil-works/chord/dist/context/index.js.map +0 -1
- package/node_modules/@earendil-works/chord/dist/delta/index.d.ts +0 -119
- package/node_modules/@earendil-works/chord/dist/delta/index.d.ts.map +0 -1
- package/node_modules/@earendil-works/chord/dist/delta/index.js +0 -1209
- package/node_modules/@earendil-works/chord/dist/delta/index.js.map +0 -1
- package/node_modules/@earendil-works/chord/dist/facets/host.d.ts +0 -12
- package/node_modules/@earendil-works/chord/dist/facets/host.d.ts.map +0 -1
- package/node_modules/@earendil-works/chord/dist/facets/host.js +0 -762
- package/node_modules/@earendil-works/chord/dist/facets/host.js.map +0 -1
- package/node_modules/@earendil-works/chord/dist/facets/loader.d.ts +0 -3
- package/node_modules/@earendil-works/chord/dist/facets/loader.d.ts.map +0 -1
- package/node_modules/@earendil-works/chord/dist/facets/loader.js +0 -5
- package/node_modules/@earendil-works/chord/dist/facets/loader.js.map +0 -1
- package/node_modules/@earendil-works/chord/dist/index.d.ts +0 -11
- package/node_modules/@earendil-works/chord/dist/index.d.ts.map +0 -1
- package/node_modules/@earendil-works/chord/dist/index.js +0 -10
- package/node_modules/@earendil-works/chord/dist/index.js.map +0 -1
- package/node_modules/@earendil-works/chord/dist/json.d.ts +0 -4
- package/node_modules/@earendil-works/chord/dist/json.d.ts.map +0 -1
- package/node_modules/@earendil-works/chord/dist/json.js +0 -57
- package/node_modules/@earendil-works/chord/dist/json.js.map +0 -1
- package/node_modules/@earendil-works/chord/dist/node/bundle-loader.d.ts +0 -30
- package/node_modules/@earendil-works/chord/dist/node/bundle-loader.d.ts.map +0 -1
- package/node_modules/@earendil-works/chord/dist/node/bundle-loader.js +0 -377
- package/node_modules/@earendil-works/chord/dist/node/bundle-loader.js.map +0 -1
- package/node_modules/@earendil-works/chord/dist/node/bundle.d.ts +0 -26
- package/node_modules/@earendil-works/chord/dist/node/bundle.d.ts.map +0 -1
- package/node_modules/@earendil-works/chord/dist/node/bundle.js +0 -183
- package/node_modules/@earendil-works/chord/dist/node/bundle.js.map +0 -1
- package/node_modules/@earendil-works/chord/dist/node/manifest.d.ts +0 -36
- package/node_modules/@earendil-works/chord/dist/node/manifest.d.ts.map +0 -1
- package/node_modules/@earendil-works/chord/dist/node/manifest.js +0 -6
- package/node_modules/@earendil-works/chord/dist/node/manifest.js.map +0 -1
- package/node_modules/@earendil-works/chord/dist/node/package.d.ts +0 -15
- package/node_modules/@earendil-works/chord/dist/node/package.d.ts.map +0 -1
- package/node_modules/@earendil-works/chord/dist/node/package.js +0 -199
- package/node_modules/@earendil-works/chord/dist/node/package.js.map +0 -1
- package/node_modules/@earendil-works/chord/dist/node.d.ts +0 -5
- package/node_modules/@earendil-works/chord/dist/node.d.ts.map +0 -1
- package/node_modules/@earendil-works/chord/dist/node.js +0 -3
- package/node_modules/@earendil-works/chord/dist/node.js.map +0 -1
- package/node_modules/@earendil-works/chord/dist/services/consumer.d.ts +0 -11
- package/node_modules/@earendil-works/chord/dist/services/consumer.d.ts.map +0 -1
- package/node_modules/@earendil-works/chord/dist/services/consumer.js +0 -535
- package/node_modules/@earendil-works/chord/dist/services/consumer.js.map +0 -1
- package/node_modules/@earendil-works/chord/dist/services/errors.d.ts +0 -8
- package/node_modules/@earendil-works/chord/dist/services/errors.d.ts.map +0 -1
- package/node_modules/@earendil-works/chord/dist/services/errors.js +0 -21
- package/node_modules/@earendil-works/chord/dist/services/errors.js.map +0 -1
- package/node_modules/@earendil-works/chord/dist/services/handle.d.ts +0 -15
- package/node_modules/@earendil-works/chord/dist/services/handle.d.ts.map +0 -1
- package/node_modules/@earendil-works/chord/dist/services/handle.js +0 -99
- package/node_modules/@earendil-works/chord/dist/services/handle.js.map +0 -1
- package/node_modules/@earendil-works/chord/dist/services/instances.d.ts +0 -25
- package/node_modules/@earendil-works/chord/dist/services/instances.d.ts.map +0 -1
- package/node_modules/@earendil-works/chord/dist/services/instances.js +0 -137
- package/node_modules/@earendil-works/chord/dist/services/instances.js.map +0 -1
- package/node_modules/@earendil-works/chord/dist/services/loopback.d.ts +0 -5
- package/node_modules/@earendil-works/chord/dist/services/loopback.d.ts.map +0 -1
- package/node_modules/@earendil-works/chord/dist/services/loopback.js +0 -15
- package/node_modules/@earendil-works/chord/dist/services/loopback.js.map +0 -1
- package/node_modules/@earendil-works/chord/dist/services/provider.d.ts +0 -37
- package/node_modules/@earendil-works/chord/dist/services/provider.d.ts.map +0 -1
- package/node_modules/@earendil-works/chord/dist/services/provider.js +0 -472
- package/node_modules/@earendil-works/chord/dist/services/provider.js.map +0 -1
- package/node_modules/@earendil-works/chord/dist/services/state-codec.d.ts +0 -15
- package/node_modules/@earendil-works/chord/dist/services/state-codec.d.ts.map +0 -1
- package/node_modules/@earendil-works/chord/dist/services/state-codec.js +0 -115
- package/node_modules/@earendil-works/chord/dist/services/state-codec.js.map +0 -1
- package/node_modules/@earendil-works/chord/dist/services/state-internals.d.ts +0 -11
- package/node_modules/@earendil-works/chord/dist/services/state-internals.d.ts.map +0 -1
- package/node_modules/@earendil-works/chord/dist/services/state-internals.js +0 -10
- package/node_modules/@earendil-works/chord/dist/services/state-internals.js.map +0 -1
- package/node_modules/@earendil-works/chord/dist/services/state.d.ts +0 -23
- package/node_modules/@earendil-works/chord/dist/services/state.d.ts.map +0 -1
- package/node_modules/@earendil-works/chord/dist/services/state.js +0 -124
- package/node_modules/@earendil-works/chord/dist/services/state.js.map +0 -1
- package/node_modules/@earendil-works/chord/dist/services/wire.d.ts +0 -60
- package/node_modules/@earendil-works/chord/dist/services/wire.d.ts.map +0 -1
- package/node_modules/@earendil-works/chord/dist/services/wire.js +0 -173
- package/node_modules/@earendil-works/chord/dist/services/wire.js.map +0 -1
- package/node_modules/@earendil-works/chord/dist/types.d.ts +0 -203
- package/node_modules/@earendil-works/chord/dist/types.d.ts.map +0 -1
- package/node_modules/@earendil-works/chord/dist/types.js +0 -2
- package/node_modules/@earendil-works/chord/dist/types.js.map +0 -1
- package/node_modules/@earendil-works/chord/package.json +0 -73
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/config.d.ts +0 -9
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/config.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/config.js +0 -35
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/config.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/context.d.ts +0 -9
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/context.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/context.js +0 -13
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/context.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/assistant.d.ts +0 -42
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/assistant.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/assistant.js +0 -82
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/assistant.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/effect-gate.d.ts +0 -22
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/effect-gate.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/effect-gate.js +0 -48
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/effect-gate.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/tools.d.ts +0 -67
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/tools.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/tools.js +0 -121
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/tools.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/hooks.d.ts +0 -38
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/hooks.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/hooks.js +0 -404
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/hooks.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/boundary.d.ts +0 -28
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/boundary.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/boundary.js +0 -173
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/boundary.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/checkpoint.d.ts +0 -8
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/checkpoint.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/checkpoint.js +0 -133
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/checkpoint.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/deferred.d.ts +0 -15
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/deferred.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/deferred.js +0 -179
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/deferred.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/generation.d.ts +0 -8
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/generation.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/generation.js +0 -205
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/generation.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/reconcile.d.ts +0 -5
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/reconcile.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/reconcile.js +0 -140
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/reconcile.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/recovery.d.ts +0 -8
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/recovery.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/recovery.js +0 -85
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/recovery.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/response.d.ts +0 -23
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/response.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/response.js +0 -394
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/response.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/retry.d.ts +0 -4
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/retry.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/retry.js +0 -34
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/retry.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/structural.d.ts +0 -32
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/structural.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/structural.js +0 -929
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/structural.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/terminal.d.ts +0 -7
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/terminal.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/terminal.js +0 -49
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/terminal.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tool-placement.d.ts +0 -14
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tool-placement.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tool-placement.js +0 -244
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tool-placement.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tools.d.ts +0 -6
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tools.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tools.js +0 -449
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tools.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive.d.ts +0 -6
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive.js +0 -93
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/harness.d.ts +0 -59
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/harness.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/harness.js +0 -302
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/harness.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/index.d.ts +0 -2
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/index.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/index.js +0 -2
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/index.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/lane.d.ts +0 -118
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/lane.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/lane.js +0 -1559
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/lane.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/progress.d.ts +0 -15
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/progress.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/progress.js +0 -66
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/progress.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/reducer.d.ts +0 -5
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/reducer.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/reducer.js +0 -240
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/reducer.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/restore.d.ts +0 -24
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/restore.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/restore.js +0 -117
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/restore.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/transcript.d.ts +0 -21
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/transcript.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/transcript.js +0 -72
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/transcript.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/types.d.ts +0 -105
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/types.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/types.js +0 -50
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/types.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/commit.d.ts +0 -53
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/commit.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/commit.js +0 -57
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/commit.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork-policy.d.ts +0 -21
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork-policy.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork-policy.js +0 -55
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork-policy.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork.d.ts +0 -16
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork.js +0 -79
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/in-memory-storage-state.d.ts +0 -39
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/in-memory-storage-state.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/in-memory-storage-state.js +0 -269
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/in-memory-storage-state.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/fork.d.ts +0 -38
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/fork.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/fork.js +0 -266
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/fork.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/index.d.ts +0 -4
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/index.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/index.js +0 -4
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/index.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/io.d.ts +0 -14
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/io.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/io.js +0 -86
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/io.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/legacy-v3.d.ts +0 -44
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/legacy-v3.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/legacy-v3.js +0 -454
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/legacy-v3.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/mutation-line.d.ts +0 -8
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/mutation-line.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/mutation-line.js +0 -22
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/mutation-line.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/datasets.d.ts +0 -12
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/datasets.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/datasets.js +0 -24
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/datasets.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/session-repo.d.ts +0 -42
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/session-repo.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/session-repo.js +0 -127
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/session-repo.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/storage.d.ts +0 -25
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/storage.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/storage.js +0 -114
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/storage.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/session-repo.d.ts +0 -23
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/session-repo.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/session-repo.js +0 -809
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/session-repo.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/storage.d.ts +0 -4
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/storage.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/storage.js +0 -600
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/storage.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/gating-storage.d.ts +0 -26
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/gating-storage.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/gating-storage.js +0 -103
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/gating-storage.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/instrumented-storage.d.ts +0 -11
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/instrumented-storage.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/instrumented-storage.js +0 -19
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/instrumented-storage.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/storage-decorator.d.ts +0 -20
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/storage-decorator.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/storage-decorator.js +0 -40
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/storage-decorator.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/values.d.ts +0 -95
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/values.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/values.js +0 -81
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/values.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/adaptive-publisher.d.ts +0 -24
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/adaptive-publisher.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/adaptive-publisher.js +0 -79
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/adaptive-publisher.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/output-capture.d.ts +0 -31
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/output-capture.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/output-capture.js +0 -217
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/output-capture.js.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/usage.d.ts +0 -4
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/usage.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/usage.js +0 -33
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/usage.js.map +0 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-ai-binding.d.ts +0 -77
- package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-ai-binding.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-ai-binding.js +0 -72
- package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-ai-binding.js.map +0 -1
- package/node_modules/@earendil-works/pi-ai/dist/cursor/context-limit-store.d.ts +0 -32
- package/node_modules/@earendil-works/pi-ai/dist/cursor/context-limit-store.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-ai/dist/cursor/context-limit-store.js +0 -62
- package/node_modules/@earendil-works/pi-ai/dist/cursor/context-limit-store.js.map +0 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-headers.d.ts +0 -4
- package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-headers.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-headers.js +0 -22
- package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-headers.js.map +0 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/assistant-message-frame.d.ts +0 -77
- package/node_modules/@earendil-works/pi-ai/dist/utils/assistant-message-frame.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/assistant-message-frame.js +0 -427
- package/node_modules/@earendil-works/pi-ai/dist/utils/assistant-message-frame.js.map +0 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/cursor-context-limit.d.ts +0 -12
- package/node_modules/@earendil-works/pi-ai/dist/utils/cursor-context-limit.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/cursor-context-limit.js +0 -93
- package/node_modules/@earendil-works/pi-ai/dist/utils/cursor-context-limit.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/mouse-region.d.ts +0 -12
- package/node_modules/@earendil-works/pi-tui/dist/components/mouse-region.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/mouse-region.js +0 -19
- package/node_modules/@earendil-works/pi-tui/dist/components/mouse-region.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/native-platform.d.ts +0 -18
- package/node_modules/@earendil-works/pi-tui/dist/native-platform.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/native-platform.js +0 -42
- package/node_modules/@earendil-works/pi-tui/dist/native-platform.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/native/clipboard.h +0 -170
- package/node_modules/@earendil-works/pi-tui/native/darwin/src/darwin-platform.m +0 -93
- package/node_modules/@earendil-works/pi-tui/native/linux/README.md +0 -23
- package/node_modules/@earendil-works/pi-tui/native/linux/build.sh +0 -65
- package/node_modules/@earendil-works/pi-tui/native/linux/prebuilds/linux-arm64/linux-platform-x11.node +0 -0
- package/node_modules/@earendil-works/pi-tui/native/linux/prebuilds/linux-x64/linux-platform-x11.node +0 -0
- package/node_modules/@earendil-works/pi-tui/native/linux/src/clipboard-worker.h +0 -70
- package/node_modules/@earendil-works/pi-tui/native/linux/src/linux-platform-x11.c +0 -274
- package/node_modules/@earendil-works/pi-tui/native/napi.h +0 -89
- package/node_modules/@earendil-works/pi-tui/native/win32/prebuilds/win32-arm64/win32-platform.node +0 -0
- package/node_modules/@earendil-works/pi-tui/native/win32/prebuilds/win32-x64/win32-platform.node +0 -0
- package/node_modules/@earendil-works/pi-tui/native/win32/src/win32-platform.c +0 -241
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/LICENSE +0 -201
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/README.md +0 -115
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-cjs/index.js +0 -96
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/abort-handler.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/abort.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/auth/HttpApiKeyAuth.js +0 -5
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/auth/HttpAuthScheme.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/auth/HttpAuthSchemeProvider.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/auth/HttpSigner.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/auth/IdentityProviderConfig.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/auth/auth.js +0 -5
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/auth/index.js +0 -2
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/blob/blob-payload-input-types.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/checksum.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/client.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/command.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/connection/config.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/connection/index.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/connection/manager.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/connection/pool.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/crypto.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/downlevel-ts3.4/transform/type-transform.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/encode.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/endpoint.js +0 -5
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/endpoints/EndpointParameterInstructions.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/endpoints/EndpointRuleObject.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/endpoints/ErrorRuleObject.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/endpoints/RuleSetObject.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/endpoints/TreeRuleObject.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/endpoints/index.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/endpoints/shared.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/eventStream.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/extensions/checksum.js +0 -38
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/extensions/defaultClientConfiguration.js +0 -7
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/extensions/defaultExtensionConfiguration.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/extensions/index.js +0 -2
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/extensions/retry.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/externals-check/browser-externals-check.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/feature-ids.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/http/httpHandlerInitialization.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/http.js +0 -5
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/identity/apiKeyIdentity.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/identity/awsCredentialIdentity.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/identity/identity.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/identity/index.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/identity/tokenIdentity.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/index.js +0 -7
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/logger.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/metrics.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/middleware.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/pagination.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/profile.js +0 -6
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/response.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/retry.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/schema/schema-deprecated.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/schema/schema.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/schema/sentinels.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/schema/static-schemas.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/schema/traits.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/serde.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/shapes.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/signature.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/stream.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-common-types.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-payload-input-types.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-payload-output-types.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/transfer.js +0 -6
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/transform/client-method-transforms.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/transform/client-payload-blob-type-narrow.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/transform/exact.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/transform/mutable.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/transform/no-undefined.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/transform/type-transform.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/uri.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/util.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-es/waiter.js +0 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/abort-handler.d.ts +0 -7
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/abort.d.ts +0 -48
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/auth/HttpApiKeyAuth.d.ts +0 -7
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/auth/HttpAuthScheme.d.ts +0 -49
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/auth/HttpAuthSchemeProvider.d.ts +0 -20
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/auth/HttpSigner.d.ts +0 -41
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/auth/IdentityProviderConfig.d.ts +0 -14
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/auth/auth.d.ts +0 -59
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/auth/index.d.ts +0 -7
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/blob/blob-payload-input-types.d.ts +0 -37
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/checksum.d.ts +0 -61
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/client.d.ts +0 -57
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/command.d.ts +0 -28
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/connection/config.d.ts +0 -15
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/connection/index.d.ts +0 -3
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/connection/manager.d.ts +0 -34
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/connection/pool.d.ts +0 -32
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/crypto.d.ts +0 -58
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/downlevel-ts3.4/transform/type-transform.d.ts +0 -24
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/encode.d.ts +0 -31
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/endpoint.d.ts +0 -77
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/endpoints/EndpointParameterInstructions.d.ts +0 -41
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/endpoints/EndpointRuleObject.d.ts +0 -27
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/endpoints/ErrorRuleObject.d.ts +0 -10
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/endpoints/RuleSetObject.d.ts +0 -28
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/endpoints/TreeRuleObject.d.ts +0 -16
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/endpoints/index.d.ts +0 -5
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/endpoints/shared.d.ts +0 -55
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/eventStream.d.ts +0 -137
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/extensions/checksum.d.ts +0 -58
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/extensions/defaultClientConfiguration.d.ts +0 -32
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/extensions/defaultExtensionConfiguration.d.ts +0 -9
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/extensions/index.d.ts +0 -6
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/extensions/retry.d.ts +0 -18
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/externals-check/browser-externals-check.d.ts +0 -35
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/feature-ids.d.ts +0 -16
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/http/httpHandlerInitialization.d.ts +0 -142
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/http.d.ts +0 -110
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/identity/apiKeyIdentity.d.ts +0 -14
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/identity/awsCredentialIdentity.d.ts +0 -31
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/identity/identity.d.ts +0 -15
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/identity/index.d.ts +0 -4
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/identity/tokenIdentity.d.ts +0 -14
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/index.d.ts +0 -52
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/logger.d.ts +0 -13
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/metrics.d.ts +0 -93
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/middleware.d.ts +0 -541
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/pagination.d.ts +0 -33
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/profile.d.ts +0 -30
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/response.d.ts +0 -40
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/retry.d.ts +0 -162
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/schema/schema-deprecated.d.ts +0 -143
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/schema/schema.d.ts +0 -236
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/schema/sentinels.d.ts +0 -65
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/schema/static-schemas.d.ts +0 -99
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/schema/traits.d.ts +0 -46
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/serde.d.ts +0 -114
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/shapes.d.ts +0 -79
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/signature.d.ts +0 -172
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/stream.d.ts +0 -22
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/streaming-payload/streaming-blob-common-types.d.ts +0 -28
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/streaming-payload/streaming-blob-payload-input-types.d.ts +0 -54
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/streaming-payload/streaming-blob-payload-output-types.d.ts +0 -41
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/transfer.d.ts +0 -42
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/transform/client-method-transforms.d.ts +0 -26
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/transform/client-payload-blob-type-narrow.d.ts +0 -73
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/transform/exact.d.ts +0 -6
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/transform/mutable.d.ts +0 -6
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/transform/no-undefined.d.ts +0 -68
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/transform/type-transform.d.ts +0 -39
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/abort-handler.d.ts +0 -7
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/abort.d.ts +0 -45
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/auth/HttpApiKeyAuth.d.ts +0 -7
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/auth/HttpAuthScheme.d.ts +0 -49
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/auth/HttpAuthSchemeProvider.d.ts +0 -20
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/auth/HttpSigner.d.ts +0 -41
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/auth/IdentityProviderConfig.d.ts +0 -14
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/auth/auth.d.ts +0 -59
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/auth/index.d.ts +0 -7
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/blob/blob-payload-input-types.d.ts +0 -37
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/checksum.d.ts +0 -61
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/client.d.ts +0 -57
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/command.d.ts +0 -28
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/connection/config.d.ts +0 -15
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/connection/index.d.ts +0 -3
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/connection/manager.d.ts +0 -34
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/connection/pool.d.ts +0 -32
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/crypto.d.ts +0 -58
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/downlevel-ts3.4/transform/type-transform.d.ts +0 -40
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/encode.d.ts +0 -31
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/endpoint.d.ts +0 -77
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/endpoints/EndpointParameterInstructions.d.ts +0 -41
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/endpoints/EndpointRuleObject.d.ts +0 -27
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/endpoints/ErrorRuleObject.d.ts +0 -10
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/endpoints/RuleSetObject.d.ts +0 -28
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/endpoints/TreeRuleObject.d.ts +0 -16
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/endpoints/index.d.ts +0 -5
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/endpoints/shared.d.ts +0 -55
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/eventStream.d.ts +0 -137
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/extensions/checksum.d.ts +0 -58
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/extensions/defaultClientConfiguration.d.ts +0 -32
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/extensions/defaultExtensionConfiguration.d.ts +0 -9
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/extensions/index.d.ts +0 -6
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/extensions/retry.d.ts +0 -18
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/externals-check/browser-externals-check.d.ts +0 -35
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/feature-ids.d.ts +0 -16
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/http/httpHandlerInitialization.d.ts +0 -142
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/http.d.ts +0 -110
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/identity/apiKeyIdentity.d.ts +0 -14
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/identity/awsCredentialIdentity.d.ts +0 -31
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/identity/identity.d.ts +0 -15
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/identity/index.d.ts +0 -4
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/identity/tokenIdentity.d.ts +0 -14
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/index.d.ts +0 -52
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/logger.d.ts +0 -13
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/metrics.d.ts +0 -93
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/middleware.d.ts +0 -541
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/pagination.d.ts +0 -33
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/profile.d.ts +0 -30
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/response.d.ts +0 -40
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/retry.d.ts +0 -162
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/schema/schema-deprecated.d.ts +0 -149
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/schema/schema.d.ts +0 -251
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/schema/sentinels.d.ts +0 -65
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/schema/static-schemas.d.ts +0 -118
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/schema/traits.d.ts +0 -46
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/serde.d.ts +0 -114
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/shapes.d.ts +0 -79
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/signature.d.ts +0 -172
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/stream.d.ts +0 -22
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/streaming-payload/streaming-blob-common-types.d.ts +0 -28
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/streaming-payload/streaming-blob-payload-input-types.d.ts +0 -54
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/streaming-payload/streaming-blob-payload-output-types.d.ts +0 -41
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/transfer.d.ts +0 -42
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/transform/client-method-transforms.d.ts +0 -26
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/transform/client-payload-blob-type-narrow.d.ts +0 -77
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/transform/exact.d.ts +0 -14
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/transform/mutable.d.ts +0 -6
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/transform/no-undefined.d.ts +0 -88
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/transform/type-transform.d.ts +0 -40
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/uri.d.ts +0 -17
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/util.d.ts +0 -192
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/ts3.4/waiter.d.ts +0 -35
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/uri.d.ts +0 -17
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/util.d.ts +0 -176
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/dist-types/waiter.d.ts +0 -35
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/types/package.json +0 -50
- package/node_modules/esbuild/LICENSE.md +0 -21
- package/node_modules/esbuild/README.md +0 -3
- package/node_modules/esbuild/bin/esbuild +0 -223
- package/node_modules/esbuild/install.js +0 -300
- package/node_modules/esbuild/lib/main.d.ts +0 -720
- package/node_modules/esbuild/lib/main.js +0 -2536
- package/node_modules/esbuild/package.json +0 -47
- package/node_modules/typebox/build/schema/intern/index.d.mts +0 -1
- package/node_modules/typebox/build/schema/intern/index.mjs +0 -1
- package/node_modules/typebox/build/schema/intern/intern.d.mts +0 -14
- package/node_modules/typebox/build/schema/intern/intern.mjs +0 -259
- package/vendor/pi-protocol/protocol.d.ts +0 -167
- package/vendor/pi-protocol/protocol.d.ts.map +0 -1
- package/vendor/pi-protocol/protocol.js +0 -85
- package/vendor/pi-protocol/protocol.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tui-alt-screen.js","sourceRoot":"","sources":["../src/tui-alt-screen.ts"],"names":[],"mappings":";AAAA,OAAO,EACN,wBAAwB,EACxB,oBAAoB,EAEpB,0BAA0B,GAC1B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACl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,GAAG,GAAG,MAAM,EAAE,GAAG,EAAE,EAAE,CAAC;YACvC,IAAI,CAAC,UAAU,IAAI,CAAC,gBAAgB,IAAI,MAAM,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC;gBAAE,SAAS;YAC3F,MAAM,IAAI,QAAQ,GAAG,GAAG,CAAC,aAAa,mBAAmB,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC;QAC9E,CAAC;QAED,IAAI,SAAS,EAAE,CAAC;YACf,MAAM,IAAI,QAAQ,SAAS,CAAC,GAAG,GAAG,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC;YAC7E,MAAM,IAAI,IAAI,CAAC,qBAAqB,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC;QACpE,CAAC;aAAM,CAAC;YACP,MAAM,IAAI,WAAW,CAAC;QACvB,CAAC;QACD,MAAM,IAAI,uBAAuB,CAAC;QAClC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAE5B,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC;QAC7B,IAAI,CAAC,mBAAmB,GAAG,KAAK,CAAC;QACjC,IAAI,CAAC,oBAAoB,GAAG,MAAM,CAAC;QACnC,IAAI,CAAC,aAAa,GAAG,UAAU,CAAC;IACjC,CAAC;CACD","sourcesContent":["import {\n\tAltScreenSearchComponent,\n\tAltScreenSearchIndex,\n\ttype AltScreenSearchMatch,\n\tgetAltScreenSearchMatchKey,\n} from \"./alt-screen-search.ts\";\nimport { AltScreenFlashContainer } from \"./components/alt-screen-flash.ts\";\nimport { ScrollView } from \"./components/scroll-view.ts\";\nimport { getKeybindings } from \"./keybindings.ts\";\nimport { isKeyRelease } from \"./keys.ts\";\nimport {\n\tgetLayoutBoxesAt,\n\tgetScrollbarGeometry,\n\tgetScrollViewBox,\n\tgetScrollViewsAt,\n\ttype LayoutFrame,\n\trenderLayoutFrame,\n\ttype ScrollbarGeometry,\n} from \"./layout.ts\";\nimport { getLayoutNode } from \"./layout-node.ts\";\nimport type { Terminal } from \"./terminal.ts\";\nimport {\n\tdeleteAllKittyImages,\n\tdeleteAllKittyPlacements,\n\tdeleteKittyImage,\n\tgetCapabilities,\n\tgetKittyImagePlacement,\n\ttype ImageProtocol,\n\tisImageLine,\n\tsetCapabilities,\n\ttype TerminalCapabilities,\n} from \"./terminal-image.ts\";\nimport {\n\ttype Component,\n\tContainer,\n\tCURSOR_MARKER,\n\tcompositeTuiLine,\n\tdispatchMouseEvent,\n\ttype OverlayHandle,\n\tretargetMouseEvent,\n\tTuiBase,\n\ttype TuiMouseButton,\n\ttype TuiMouseDispatchResult,\n\ttype TuiMouseDispatchTarget,\n\ttype TuiMouseEvent,\n\ttype TuiStopOptions,\n\tVIEWPORT_TUI,\n\ttype ViewportTUI,\n} from \"./tui.ts\";\nimport {\n\textractAnsiCode,\n\tgetGraphemeCellRange,\n\tgetOsc8LinkAtColumn,\n\tgetWordSegmenter,\n\tsliceByColumn,\n\tstripTerminalSequences,\n\ttruncateToWidth,\n\tvisibleWidth,\n} from \"./utils.ts\";\n\nconst ENTER_ALT_SCREEN = \"\\x1b[?1049h\";\nconst EXIT_ALT_SCREEN = \"\\x1b[?1049l\";\nconst DISABLE_AUTOWRAP = \"\\x1b[?7l\";\nconst ENABLE_AUTOWRAP = \"\\x1b[?7h\";\nconst ENABLE_BUTTON_MOTION_MOUSE = \"\\x1b[?1000h\\x1b[?1002h\\x1b[?1004h\\x1b[?1006h\";\nconst ENABLE_ALL_MOTION_MOUSE = \"\\x1b[?1000h\\x1b[?1002h\\x1b[?1003h\\x1b[?1004h\\x1b[?1006h\";\nconst DISABLE_MOUSE = \"\\x1b[?1006l\\x1b[?1004l\\x1b[?1003l\\x1b[?1002l\\x1b[?1000l\";\nconst FOCUS_IN = \"\\x1b[I\";\nconst FOCUS_OUT = \"\\x1b[O\";\nconst BEGIN_SYNCHRONIZED_OUTPUT = \"\\x1b[?2026h\";\nconst END_SYNCHRONIZED_OUTPUT = \"\\x1b[?2026l\";\nconst OSC133_ZONE_PREFIX = /^(?:\\x1b\\]133;[ABC](?:\\x07|\\x1b\\\\))+/;\nconst OSC133_PROMPT_START = /^\\x1b\\]133;A(?:\\x07|\\x1b\\\\)/;\nconst PAGE_SCROLL_OVERLAP = 4;\nconst ALT_WHEEL_SCROLL_MULTIPLIER = 5;\nconst MAX_CACHED_OFFSCREEN_KITTY_IMAGES = 16;\nconst MAX_CACHED_OFFSCREEN_KITTY_TRANSMISSION_BYTES = 32 * 1024 * 1024;\nconst MAX_CACHED_OFFSCREEN_KITTY_DECODED_BYTES = 64 * 1024 * 1024;\nconst DOUBLE_CLICK_INTERVAL_MS = 500;\n// Regular mode delegates double-click selection to the terminal emulator. Fullscreen owns mouse selection,\n// so mirror common terminal word-selection behavior by keeping paths and kebab-case tokens whole.\nconst TERMINAL_WORD_SELECTION_JOINERS = new Set([\"/\", \"-\"]);\nconst wordSegmenter = getWordSegmenter();\n\ninterface CachedKittyImage {\n\ttransmissionGeneration: number;\n\ttransmissionBytes: number;\n\testimatedDecodedBytes: number;\n}\n\ninterface SelectionPoint {\n\trow: number;\n\tcol: number;\n\tscrollView?: ScrollView;\n\t/** Whether this point lies between terminal cells rather than on a cell. */\n\tboundary?: boolean;\n}\n\ninterface SelectionRange {\n\tstart: SelectionPoint;\n\tend: SelectionPoint;\n}\n\ntype SelectionGranularity = \"character\" | \"word\" | \"line\";\n\ninterface ClickTarget {\n\ttimestamp: number;\n\tcount: number;\n\trow: number;\n\tscrollView?: ScrollView;\n\twordStart: number;\n\twordEnd: number;\n}\n\ninterface SgrMouseEvent {\n\tbutton: number;\n\tx: number;\n\ty: number;\n\trelease: boolean;\n}\n\ninterface WheelEvent {\n\tdirection: -1 | 1;\n\tx: number;\n\ty: number;\n\tbutton: number;\n}\n\ninterface ScrollbarDrag {\n\tscrollView: ScrollView;\n\tgrabOffset: number;\n}\n\ninterface ScrollbarTarget {\n\tscrollView: ScrollView;\n\tgeometry: ScrollbarGeometry;\n}\n\ninterface ScrollToEndIndicatorRect {\n\trow: number;\n\tcolumn: number;\n\twidth: number;\n}\n\ntype SearchSelectionMode = \"query\" | \"retain\" | \"next\" | \"previous\";\n\ninterface ActiveSearch {\n\tcomponent: AltScreenSearchComponent;\n\tindex: AltScreenSearchIndex;\n\toverlay?: OverlayHandle;\n\tquery: string;\n\tmatches: AltScreenSearchMatch[];\n\tselectedIndex: number;\n\tselectedKey?: string;\n\tanchorRow: number;\n\tselectionMode: SearchSelectionMode;\n}\n\ninterface SearchHighlightRange {\n\tstartCol: number;\n\tendCol: number;\n\tcurrent: boolean;\n}\n\nexport interface TuiAltScreenOptions {\n\t/** Number of logical lines moved for each mouse-wheel event. */\n\twheelScrollLines?: number;\n\t/** Capture mouse events for viewport scrolling and application-owned text selection. */\n\tmouse?: boolean;\n\t/** Style a non-current transcript search match. */\n\tsearchMatchStyle?: (text: string) => string;\n\t/** Style the current transcript search match. */\n\tsearchCurrentMatchStyle?: (text: string) => string;\n\t/** Style a transcript search navigation button. */\n\tsearchNavigationButtonStyle?: (text: string, hovered: boolean) => string;\n\t/**\n\t * Render a clickable jump-to-end label. It is centered on the last row of a follow-end\n\t * primary scroll view while that view is scrolled away from its end.\n\t */\n\tscrollToEndIndicator?: () => string;\n\t/** Open an OSC 8 hyperlink activated with a primary-button click. */\n\topenUrl?: (url: string) => void;\n\t/** Handle an unmodified secondary-button press for clipboard paste. Currently enabled on Windows only. */\n\tonRightClickPaste?: () => void;\n\t/** Automatically copy selected text to the clipboard on mouse release (default: true). */\n\tcopyOnSelect?: boolean;\n\t/**\n\t * Copy selected text to the system clipboard. Return `true` on success; the caller flashes\n\t * an error otherwise. When omitted, the selection is copied via an OSC 52 write.\n\t */\n\tcopySelection?: (text: string) => Promise<boolean>;\n}\n\n/** Alternate-screen TUI with a scrollable, application-owned viewport. */\nexport class TuiAltScreen extends TuiBase implements ViewportTUI {\n\treadonly mode = \"fullscreen\" as const;\n\treadonly [VIEWPORT_TUI] = true as const;\n\tprivate previousScreen: string[] = [];\n\tprivate lastDocument: string[] = [];\n\tprivate previousScreenWidth = 0;\n\tprivate previousScreenHeight = 0;\n\tprivate layoutRoot: Component | undefined;\n\tprivate currentLayout: LayoutFrame | undefined;\n\tprivate readonly implicitDocument: Component;\n\tprivate readonly implicitScrollView: ScrollView;\n\tprivate readonly flashes: AltScreenFlashContainer;\n\tprivate altScreenActive = false;\n\tprivate imageProtocol: ImageProtocol = null;\n\tprivate savedCapabilities?: TerminalCapabilities;\n\tprivate readonly uploadedKittyImages = new Map<number, CachedKittyImage>();\n\tprivate selectionAnchor?: SelectionPoint;\n\tprivate selectionFocus?: SelectionPoint;\n\tprivate selectionGranularity: SelectionGranularity = \"character\";\n\tprivate selectionInitialRange?: SelectionRange;\n\tprivate lastClick?: ClickTarget;\n\tprivate selectionDragPointer?: { x: number; y: number };\n\tprivate selectionAutoScrollDirection: -1 | 0 | 1 = 0;\n\tprivate selectionAutoScrollTimer?: NodeJS.Timeout;\n\tprivate selectionPressActive = false;\n\tprivate scrollbarDrag?: ScrollbarDrag;\n\tprivate scrollbarHover?: ScrollView;\n\tprivate scrollToEndIndicatorRect?: ScrollToEndIndicatorRect;\n\tprivate activeSearch?: ActiveSearch;\n\tprivate pressedUrl?: string;\n\tprivate selectionDragged = false;\n\tprivate mouseCapture?: TuiMouseDispatchTarget;\n\tprivate mousePressTarget?: TuiMouseDispatchTarget;\n\tprivate mousePressPoint?: { x: number; y: number };\n\tprivate mousePressMoved = false;\n\tprivate lastComponentClick?: {\n\t\ttimestamp: number;\n\t\tcount: number;\n\t\tcomponent: Component;\n\t\tx: number;\n\t\ty: number;\n\t};\n\tprivate readonly wheelScrollLines: number;\n\tprivate readonly mouseEnabled: boolean;\n\tprivate readonly searchMatchStyle: (text: string) => string;\n\tprivate readonly searchCurrentMatchStyle: (text: string) => string;\n\tprivate readonly searchNavigationButtonStyle: (text: string, hovered: boolean) => string;\n\tprivate readonly scrollToEndIndicator?: () => string;\n\tprivate readonly openUrl?: (url: string) => void;\n\tprivate readonly onRightClickPaste?: () => void;\n\tprivate copyOnSelect: boolean;\n\tprivate readonly copySelection?: (text: string) => Promise<boolean>;\n\n\tconstructor(\n\t\tterminal: Terminal,\n\t\tshowHardwareCursor?: boolean,\n\t\tlogDirectory?: string,\n\t\toptions: TuiAltScreenOptions = {},\n\t) {\n\t\tsuper(terminal, showHardwareCursor, logDirectory);\n\t\tthis.implicitDocument = {\n\t\t\trender: (width) => super.render(width),\n\t\t\thandleMouse: (event) => super.handleMouse(event),\n\t\t\tinvalidate: () => {\n\t\t\t\tfor (const child of this.children) child.invalidate();\n\t\t\t},\n\t\t};\n\t\tthis.implicitScrollView = new ScrollView(this.implicitDocument, { follow: \"end\", primary: true });\n\t\tthis.flashes = new AltScreenFlashContainer(() => this.requestRender());\n\t\tthis.wheelScrollLines = Math.max(1, Math.floor(options.wheelScrollLines ?? 1));\n\t\tthis.mouseEnabled = options.mouse ?? true;\n\t\tthis.searchMatchStyle = options.searchMatchStyle ?? ((text) => `\\x1b[4m${text}\\x1b[24m`);\n\t\tthis.searchCurrentMatchStyle = options.searchCurrentMatchStyle ?? ((text) => `\\x1b[1;7m${text}\\x1b[22;27m`);\n\t\tthis.searchNavigationButtonStyle = options.searchNavigationButtonStyle ?? ((text) => text);\n\t\tthis.scrollToEndIndicator = options.scrollToEndIndicator;\n\t\tthis.openUrl = options.openUrl;\n\t\tthis.onRightClickPaste = options.onRightClickPaste;\n\t\tthis.copyOnSelect = options.copyOnSelect ?? true;\n\t\tthis.copySelection = options.copySelection;\n\t\tthis.addInputListener((data) => this.handleViewportInput(data));\n\t}\n\n\tget viewportTop(): number {\n\t\treturn this.getPrimaryScrollView().scrollTop;\n\t}\n\n\tget isFollowingOutput(): boolean {\n\t\treturn this.getPrimaryScrollView().isFollowingEnd;\n\t}\n\n\tgetCopyOnSelect(): boolean {\n\t\treturn this.copyOnSelect;\n\t}\n\n\tsetCopyOnSelect(enabled: boolean): void {\n\t\tthis.copyOnSelect = enabled;\n\t}\n\n\t/** Whether the fullscreen viewport has a non-empty active text selection. */\n\thasActiveSelection(): boolean {\n\t\treturn this.getActiveSelectionText() !== undefined;\n\t}\n\n\t/** Copy the active fullscreen text selection, if any, using the configured selection clipboard path. */\n\tasync copyActiveSelectionToClipboard(): Promise<boolean> {\n\t\tconst text = this.getActiveSelectionText();\n\t\tif (!text) return false;\n\t\treturn this.copyTextToClipboard(text);\n\t}\n\n\tsetLayoutRoot(component: Component | undefined): void {\n\t\tif (this.layoutRoot === component) return;\n\t\tthis.layoutRoot = component;\n\t\tthis.currentLayout = undefined;\n\t\tthis.requestRender();\n\t}\n\n\toverride render(width: number): string[] {\n\t\treturn this.layoutRoot?.render(width) ?? super.render(width);\n\t}\n\n\tprotected override getMountedRoots(): readonly Component[] {\n\t\treturn this.layoutRoot ? [this.layoutRoot] : this.children;\n\t}\n\n\tprivate getPrimaryScrollView(): ScrollView {\n\t\treturn this.currentLayout?.primaryScrollView ?? this.implicitScrollView;\n\t}\n\n\tprotected override beforeTerminalStart(): void {\n\t\tthis.stopSelectionAutoScroll();\n\t\tthis.selectionPressActive = false;\n\t\tthis.stopScrollbarHover();\n\t\tthis.stopScrollbarDrag();\n\t\tthis.flashes.dispose();\n\t\tthis.altScreenActive = true;\n\t\tconst capabilities = getCapabilities();\n\t\tthis.imageProtocol = capabilities.images;\n\t\tthis.uploadedKittyImages.clear();\n\t\tif (capabilities.images === \"iterm2\") {\n\t\t\tthis.savedCapabilities = capabilities;\n\t\t\tsetCapabilities({ ...capabilities, images: null });\n\t\t\tthis.invalidate();\n\t\t}\n\t\tthis.lastDocument = [];\n\t\tthis.selectionAnchor = undefined;\n\t\tthis.selectionFocus = undefined;\n\t\tthis.selectionGranularity = \"character\";\n\t\tthis.selectionInitialRange = undefined;\n\t\tthis.lastClick = undefined;\n\t\tthis.pressedUrl = undefined;\n\t\tthis.selectionDragged = false;\n\t\tthis.clearComponentMouseGesture();\n\t\tthis.lastComponentClick = undefined;\n\t\tthis.resetRenderState();\n\t\tconst term = process.env.TERM?.toLowerCase() ?? \"\";\n\t\t// Multiplexers can lag when every pointer movement is forwarded. Button-motion\n\t\t// tracking preserves clicks, wheel events, selections, and scrollbar dragging.\n\t\tconst mouseSequence =\n\t\t\tprocess.env.TMUX !== undefined ||\n\t\t\tprocess.env.ZELLIJ !== undefined ||\n\t\t\tprocess.env.STY !== undefined ||\n\t\t\tterm.startsWith(\"tmux\") ||\n\t\t\tterm.startsWith(\"screen\")\n\t\t\t\t? ENABLE_BUTTON_MOTION_MOUSE\n\t\t\t\t: ENABLE_ALL_MOTION_MOUSE;\n\t\tthis.terminal.write(\n\t\t\t`${ENTER_ALT_SCREEN}${DISABLE_AUTOWRAP}${this.mouseEnabled ? mouseSequence : \"\"}\\x1b[2J\\x1b[H\\x1b[?25l`,\n\t\t);\n\t}\n\n\tprotected override beforeTerminalStop(_options: TuiStopOptions): void {\n\t\tthis.closeSearch();\n\t\tthis.stopSelectionAutoScroll();\n\t\tthis.selectionPressActive = false;\n\t\tthis.stopScrollbarHover();\n\t\tthis.stopScrollbarDrag();\n\t\tthis.clearComponentMouseGesture();\n\t\tthis.flashes.dispose();\n\t\tif (!this.altScreenActive) return;\n\t\tthis.terminal.write(\n\t\t\t`${BEGIN_SYNCHRONIZED_OUTPUT}${this.deleteAltScreenKittyImages()}${this.mouseEnabled ? DISABLE_MOUSE : \"\"}${ENABLE_AUTOWRAP}${END_SYNCHRONIZED_OUTPUT}`,\n\t\t);\n\t\tthis.uploadedKittyImages.clear();\n\t}\n\n\tprotected override afterTerminalStop(options: TuiStopOptions): void {\n\t\tif (!this.altScreenActive) return;\n\t\tthis.altScreenActive = false;\n\t\tif (options.preserveScreen) {\n\t\t\tthis.terminal.write(`${BEGIN_SYNCHRONIZED_OUTPUT}${EXIT_ALT_SCREEN}\\x1b[?25h${END_SYNCHRONIZED_OUTPUT}`);\n\t\t} else {\n\t\t\tconst width = Math.max(1, this.terminal.columns);\n\t\t\tconst documentLines = this.render(width).map((line) => line.replace(OSC133_ZONE_PREFIX, \"\"));\n\t\t\tthis.lastDocument = this.applyLineResets(documentLines.map((line) => line.replaceAll(CURSOR_MARKER, \"\"))).map(\n\t\t\t\t(line) => (isImageLine(line) || visibleWidth(line) <= width ? line : sliceByColumn(line, 0, width, true)),\n\t\t\t);\n\t\t\tlet buffer = `${BEGIN_SYNCHRONIZED_OUTPUT}${EXIT_ALT_SCREEN}${DISABLE_AUTOWRAP}`;\n\t\t\tfor (let row = 0; row < this.lastDocument.length; row++) {\n\t\t\t\tif (row > 0) buffer += \"\\r\\n\";\n\t\t\t\tbuffer += `\\r\\x1b[2K${this.lastDocument[row] ?? \"\"}`;\n\t\t\t}\n\t\t\tbuffer += `\\x1b[0m${ENABLE_AUTOWRAP}\\r\\n\\x1b[?25h${END_SYNCHRONIZED_OUTPUT}`;\n\t\t\tthis.terminal.write(buffer);\n\t\t}\n\t\tif (this.savedCapabilities) {\n\t\t\tsetCapabilities(this.savedCapabilities);\n\t\t\tthis.savedCapabilities = undefined;\n\t\t}\n\t}\n\n\tprivate deleteAltScreenKittyImages(): string {\n\t\treturn this.imageProtocol === \"kitty\" ? deleteAllKittyImages() : \"\";\n\t}\n\n\tprivate prepareKittyScreen(screen: string[]): { lines: string[]; evictedImageDeletion: string } {\n\t\tconst visibleImageIds = new Set<number>();\n\t\tconst lines = screen.map((line) => {\n\t\t\tconst placement = getKittyImagePlacement(line);\n\t\t\tif (!placement) return line;\n\t\t\tvisibleImageIds.add(placement.imageId);\n\n\t\t\tconst cachedImage = this.uploadedKittyImages.get(placement.imageId);\n\t\t\tconst nextCachedImage = {\n\t\t\t\ttransmissionGeneration: placement.transmissionGeneration,\n\t\t\t\ttransmissionBytes: placement.transmissionBytes,\n\t\t\t\testimatedDecodedBytes: placement.estimatedDecodedBytes,\n\t\t\t};\n\t\t\tif (cachedImage) this.uploadedKittyImages.delete(placement.imageId);\n\t\t\tthis.uploadedKittyImages.set(placement.imageId, nextCachedImage);\n\n\t\t\treturn cachedImage?.transmissionGeneration === placement.transmissionGeneration\n\t\t\t\t? placement.replacementLine\n\t\t\t\t: line;\n\t\t});\n\n\t\tlet cachedOffscreenImageCount = 0;\n\t\tlet cachedOffscreenTransmissionBytes = 0;\n\t\tlet cachedOffscreenDecodedBytes = 0;\n\t\tfor (const [imageId, cachedImage] of this.uploadedKittyImages) {\n\t\t\tif (visibleImageIds.has(imageId)) continue;\n\t\t\tcachedOffscreenImageCount += 1;\n\t\t\tcachedOffscreenTransmissionBytes += cachedImage.transmissionBytes;\n\t\t\tcachedOffscreenDecodedBytes += cachedImage.estimatedDecodedBytes;\n\t\t}\n\n\t\tlet evictedImageDeletion = \"\";\n\t\tfor (const [imageId, cachedImage] of this.uploadedKittyImages) {\n\t\t\tif (\n\t\t\t\tcachedOffscreenImageCount <= MAX_CACHED_OFFSCREEN_KITTY_IMAGES &&\n\t\t\t\tcachedOffscreenTransmissionBytes <= MAX_CACHED_OFFSCREEN_KITTY_TRANSMISSION_BYTES &&\n\t\t\t\tcachedOffscreenDecodedBytes <= MAX_CACHED_OFFSCREEN_KITTY_DECODED_BYTES\n\t\t\t) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (visibleImageIds.has(imageId)) continue;\n\t\t\tevictedImageDeletion += deleteKittyImage(imageId);\n\t\t\tthis.uploadedKittyImages.delete(imageId);\n\t\t\tcachedOffscreenImageCount -= 1;\n\t\t\tcachedOffscreenTransmissionBytes -= cachedImage.transmissionBytes;\n\t\t\tcachedOffscreenDecodedBytes -= cachedImage.estimatedDecodedBytes;\n\t\t}\n\t\treturn { lines, evictedImageDeletion };\n\t}\n\n\tprotected override resetRenderState(): void {\n\t\tthis.previousScreen = [];\n\t\tthis.previousScreenWidth = 0;\n\t\tthis.previousScreenHeight = 0;\n\t\tthis.currentLayout = undefined;\n\t}\n\n\tscrollBy(lines: number): void {\n\t\tthis.getPrimaryScrollView().scrollBy(lines);\n\t\tthis.requestRender();\n\t}\n\n\tscrollToTop(): void {\n\t\tthis.getPrimaryScrollView().scrollToStart();\n\t\tthis.requestRender();\n\t}\n\n\tscrollToBottom(): void {\n\t\tthis.getPrimaryScrollView().scrollToEnd();\n\t\tthis.requestRender();\n\t}\n\n\tprivate scrollToPrompt(direction: -1 | 1): void {\n\t\tif (!this.currentLayout) return;\n\t\tconst scrollView = this.getPrimaryScrollView();\n\t\tconst lines = getScrollViewBox(this.currentLayout, scrollView)?.scrollContentLines;\n\t\tif (!lines) return;\n\n\t\tfor (let row = scrollView.scrollTop + direction; row >= 0 && row < lines.length; row += direction) {\n\t\t\tif (!OSC133_PROMPT_START.test(lines[row] ?? \"\")) continue;\n\t\t\tscrollView.scrollTo(row);\n\t\t\tthis.requestRender();\n\t\t\treturn;\n\t\t}\n\t}\n\n\tprivate toggleSearch(): void {\n\t\tif (this.activeSearch) {\n\t\t\tthis.closeSearch();\n\t\t\treturn;\n\t\t}\n\t\tconst component = new AltScreenSearchComponent(\n\t\t\t(query) => this.updateSearchQuery(query),\n\t\t\tthis.searchNavigationButtonStyle,\n\t\t);\n\t\tconst search: ActiveSearch = {\n\t\t\tcomponent,\n\t\t\tindex: new AltScreenSearchIndex(),\n\t\t\tquery: \"\",\n\t\t\tmatches: [],\n\t\t\tselectedIndex: -1,\n\t\t\tanchorRow: this.getPrimaryScrollView().scrollTop,\n\t\t\tselectionMode: \"query\",\n\t\t};\n\t\tthis.activeSearch = search;\n\t\tsearch.overlay = this.showOverlay(component, {\n\t\t\tanchor: \"top-right\",\n\t\t\twidth: \"40%\",\n\t\t\tminWidth: 32,\n\t\t\tmargin: 1,\n\t\t});\n\t}\n\n\tprivate closeSearch(): void {\n\t\tconst search = this.activeSearch;\n\t\tif (!search) return;\n\t\tthis.activeSearch = undefined;\n\t\tsearch.overlay?.hide();\n\t\tthis.requestRender();\n\t}\n\n\tprivate updateSearchQuery(query: string): void {\n\t\tconst search = this.activeSearch;\n\t\tif (!search || query === search.query) return;\n\t\tconst selected = search.matches[search.selectedIndex];\n\t\tsearch.anchorRow = selected?.segments[0]?.row ?? this.getPrimaryScrollView().scrollTop;\n\t\tsearch.query = query;\n\t\tsearch.selectionMode = \"query\";\n\t\tsearch.component.setResult(-1, 0);\n\t\tthis.requestRender();\n\t}\n\n\tprivate navigateSearch(direction: -1 | 1): void {\n\t\tconst search = this.activeSearch;\n\t\tif (!search?.query) return;\n\t\tsearch.selectionMode = direction < 0 ? \"previous\" : \"next\";\n\t\tthis.requestRender();\n\t}\n\n\tprivate getSearchNavigationDirectionAt(x: number, y: number): -1 | 1 | undefined {\n\t\tconst search = this.activeSearch;\n\t\tconst bounds = search?.overlay?.getBounds();\n\t\tif (!search || !bounds) return undefined;\n\t\tif (x < bounds.col || x >= bounds.col + bounds.width || y < bounds.row || y >= bounds.row + bounds.height) {\n\t\t\treturn undefined;\n\t\t}\n\t\treturn search.component.getNavigationDirectionAt(y - bounds.row, x - bounds.col);\n\t}\n\n\tprivate handleSearchMouseEvent(event: SgrMouseEvent): boolean {\n\t\tconst search = this.activeSearch;\n\t\tif (!search) return false;\n\t\tconst direction = this.getSearchNavigationDirectionAt(event.x, event.y);\n\t\tif (search.component.setHoveredNavigationDirection(direction)) this.requestRender();\n\t\tif (direction === undefined || event.release || (event.button & 32) !== 0 || (event.button & 3) !== 0) {\n\t\t\treturn false;\n\t\t}\n\t\tthis.navigateSearch(direction);\n\t\treturn true;\n\t}\n\n\tprivate refreshSearch(layout: LayoutFrame): boolean {\n\t\tconst search = this.activeSearch;\n\t\tif (!search) return false;\n\t\tconst scrollView = layout.primaryScrollView ?? this.implicitScrollView;\n\t\tconst box = getScrollViewBox(layout, scrollView);\n\t\tconst lines = box?.scrollContentLines;\n\t\tif (!lines || !search.query.trim()) {\n\t\t\tsearch.matches = [];\n\t\t\tsearch.selectedIndex = -1;\n\t\t\tsearch.selectedKey = undefined;\n\t\t\tsearch.selectionMode = \"retain\";\n\t\t\tsearch.component.setResult(-1, 0);\n\t\t\treturn false;\n\t\t}\n\n\t\tconst shouldRevealSelection = search.selectionMode !== \"retain\";\n\t\tconst result = search.index.search(lines, search.query);\n\t\tconst matches = result.matches;\n\t\tsearch.matches = matches;\n\t\tif (!result.changed && search.selectionMode === \"retain\") return false;\n\n\t\tconst exactIndex = result.changed\n\t\t\t? search.selectedKey\n\t\t\t\t? matches.findIndex((match) => getAltScreenSearchMatchKey(match) === search.selectedKey)\n\t\t\t\t: -1\n\t\t\t: search.selectedIndex;\n\t\tlet selectedIndex = -1;\n\t\tif (matches.length > 0) {\n\t\t\tif (search.selectionMode === \"query\") {\n\t\t\t\tlet low = 0;\n\t\t\t\tlet high = matches.length;\n\t\t\t\twhile (low < high) {\n\t\t\t\t\tconst middle = low + Math.floor((high - low) / 2);\n\t\t\t\t\tif ((matches[middle]!.segments[0]?.row ?? 0) < search.anchorRow) low = middle + 1;\n\t\t\t\t\telse high = middle;\n\t\t\t\t}\n\t\t\t\tselectedIndex = low < matches.length ? low : 0;\n\t\t\t} else if (search.selectionMode === \"next\") {\n\t\t\t\tconst baseIndex = exactIndex >= 0 ? exactIndex : Math.min(search.selectedIndex, matches.length - 1);\n\t\t\t\tselectedIndex = baseIndex < 0 ? 0 : (baseIndex + 1) % matches.length;\n\t\t\t} else if (search.selectionMode === \"previous\") {\n\t\t\t\tconst baseIndex = exactIndex >= 0 ? exactIndex : Math.min(search.selectedIndex, matches.length - 1);\n\t\t\t\tselectedIndex = baseIndex < 0 ? matches.length - 1 : (baseIndex - 1 + matches.length) % matches.length;\n\t\t\t} else {\n\t\t\t\tselectedIndex =\n\t\t\t\t\texactIndex >= 0 ? exactIndex : Math.min(Math.max(0, search.selectedIndex), matches.length - 1);\n\t\t\t}\n\t\t}\n\n\t\tsearch.selectedIndex = selectedIndex;\n\t\tsearch.selectedKey = selectedIndex >= 0 ? getAltScreenSearchMatchKey(matches[selectedIndex]!) : undefined;\n\t\tsearch.selectionMode = \"retain\";\n\t\tsearch.component.setResult(selectedIndex, matches.length);\n\t\tif (!shouldRevealSelection) return false;\n\n\t\tconst selected = matches[selectedIndex];\n\t\tconst firstSegment = selected?.segments[0];\n\t\tconst lastSegment = selected?.segments[selected.segments.length - 1];\n\t\tif (!box || !firstSegment || !lastSegment || scrollView.viewportHeight <= 0) return false;\n\t\tconst before = scrollView.scrollTop;\n\t\tconst visibleBottom = before + scrollView.viewportHeight - 1;\n\t\tlet target = before;\n\t\tif (firstSegment.row < before || lastSegment.row > visibleBottom) {\n\t\t\ttarget = firstSegment.row - Math.floor(scrollView.viewportHeight / 3);\n\t\t}\n\t\tscrollView.scrollTo(target, { disableFollow: true });\n\t\treturn scrollView.scrollTop !== before;\n\t}\n\n\t/** Show a transient message in the alternate-screen flash stack. */\n\tflash(message: string, durationMs?: number): void {\n\t\tthis.flashes.flash(message, durationMs);\n\t}\n\n\tprivate shouldDeferViewportInputToOverlay(): boolean {\n\t\treturn this.isOverlayFocused() && this.activeSearch?.overlay?.isFocused() !== true;\n\t}\n\n\tprivate clearComponentMouseGesture(): void {\n\t\tthis.mouseCapture = undefined;\n\t\tthis.mousePressTarget = undefined;\n\t\tthis.mousePressPoint = undefined;\n\t\tthis.mousePressMoved = false;\n\t}\n\n\tprivate handleViewportInput(data: string): { consume?: boolean } | undefined {\n\t\tif (data === FOCUS_OUT) {\n\t\t\tconst hadActiveSelection = this.selectionPressActive;\n\t\t\tconst hadNonEmptyActiveSelection = hadActiveSelection && this.getSelectionBounds() !== undefined;\n\t\t\tthis.selectionPressActive = false;\n\t\t\tthis.stopSelectionAutoScroll();\n\t\t\tthis.stopScrollbarHover();\n\t\t\tif (this.activeSearch?.component.setHoveredNavigationDirection(undefined)) this.requestRender();\n\t\t\tthis.stopScrollbarDrag();\n\t\t\tthis.pressedUrl = undefined;\n\t\t\tthis.selectionDragged = false;\n\t\t\tthis.clearComponentMouseGesture();\n\t\t\tthis.lastComponentClick = undefined;\n\t\t\tif (hadActiveSelection) {\n\t\t\t\tthis.selectionAnchor = undefined;\n\t\t\t\tthis.selectionFocus = undefined;\n\t\t\t\tthis.selectionGranularity = \"character\";\n\t\t\t\tthis.selectionInitialRange = undefined;\n\t\t\t\tif (hadNonEmptyActiveSelection) this.requestRender();\n\t\t\t}\n\t\t\tthis.lastClick = undefined;\n\t\t\treturn { consume: true };\n\t\t}\n\t\tif (data === FOCUS_IN) return { consume: true };\n\n\t\tconst wheelEvent = this.parseWheelEvent(data);\n\t\tif (wheelEvent) {\n\t\t\tconst event = this.createMouseEvent(\"wheel\", wheelEvent.button, wheelEvent.x, wheelEvent.y, {\n\t\t\t\twheelDelta: wheelEvent.direction * this.getWheelScrollLines(wheelEvent.button),\n\t\t\t});\n\t\t\tconst overlay = this.dispatchMouseToOverlay(event);\n\t\t\tconst result = overlay.result ?? (overlay.hit ? undefined : this.dispatchMouseToLayout(event));\n\t\t\tif (result) {\n\t\t\t\tif (this.applyMouseDispatchResult(event, result)) this.requestRender();\n\t\t\t\treturn { consume: true };\n\t\t\t}\n\t\t\tif (this.shouldDeferViewportInputToOverlay()) return undefined;\n\t\t\tthis.routeWheel(wheelEvent);\n\t\t\treturn { consume: true };\n\t\t}\n\t\tconst mouseEvent = this.parseSgrMouseEvent(data);\n\t\tif (mouseEvent) {\n\t\t\tthis.handleMouseEvent(mouseEvent);\n\t\t\treturn { consume: true };\n\t\t}\n\t\tif (this.isMouseSequence(data)) return { consume: true };\n\n\t\tconst keybindings = getKeybindings();\n\t\tconst isRelease = isKeyRelease(data);\n\t\tif (keybindings.matches(data, \"tui.altScreen.search\")) {\n\t\t\tif (!isRelease) this.toggleSearch();\n\t\t\treturn { consume: true };\n\t\t}\n\t\tif (this.activeSearch?.overlay?.isFocused()) {\n\t\t\tif (keybindings.matches(data, \"tui.altScreen.searchNext\")) {\n\t\t\t\tif (!isRelease) this.navigateSearch(1);\n\t\t\t\treturn { consume: true };\n\t\t\t}\n\t\t\tif (keybindings.matches(data, \"tui.altScreen.searchPrevious\")) {\n\t\t\t\tif (!isRelease) this.navigateSearch(-1);\n\t\t\t\treturn { consume: true };\n\t\t\t}\n\t\t\tif (keybindings.matches(data, \"tui.altScreen.searchClose\")) {\n\t\t\t\tif (!isRelease) this.closeSearch();\n\t\t\t\treturn { consume: true };\n\t\t\t}\n\t\t}\n\t\tif (this.shouldDeferViewportInputToOverlay()) return undefined;\n\t\tif (keybindings.matches(data, \"tui.altScreen.pageUp\")) {\n\t\t\tif (!isRelease) {\n\t\t\t\tthis.scrollBy(-Math.max(1, this.getPrimaryScrollView().viewportHeight - PAGE_SCROLL_OVERLAP));\n\t\t\t}\n\t\t\treturn { consume: true };\n\t\t}\n\t\tif (keybindings.matches(data, \"tui.altScreen.pageDown\")) {\n\t\t\tif (!isRelease) {\n\t\t\t\tthis.scrollBy(Math.max(1, this.getPrimaryScrollView().viewportHeight - PAGE_SCROLL_OVERLAP));\n\t\t\t}\n\t\t\treturn { consume: true };\n\t\t}\n\t\tif (keybindings.matches(data, \"tui.altScreen.halfPageUp\")) {\n\t\t\tif (!isRelease) this.scrollBy(-Math.max(1, Math.floor(this.getPrimaryScrollView().viewportHeight / 2)));\n\t\t\treturn { consume: true };\n\t\t}\n\t\tif (keybindings.matches(data, \"tui.altScreen.halfPageDown\")) {\n\t\t\tif (!isRelease) this.scrollBy(Math.max(1, Math.floor(this.getPrimaryScrollView().viewportHeight / 2)));\n\t\t\treturn { consume: true };\n\t\t}\n\t\tif (keybindings.matches(data, \"tui.altScreen.lineUp\")) {\n\t\t\tif (!isRelease) this.scrollBy(-1);\n\t\t\treturn { consume: true };\n\t\t}\n\t\tif (keybindings.matches(data, \"tui.altScreen.lineDown\")) {\n\t\t\tif (!isRelease) this.scrollBy(1);\n\t\t\treturn { consume: true };\n\t\t}\n\t\tif (keybindings.matches(data, \"tui.altScreen.previousPrompt\")) {\n\t\t\tif (!isRelease) this.scrollToPrompt(-1);\n\t\t\treturn { consume: true };\n\t\t}\n\t\tif (keybindings.matches(data, \"tui.altScreen.nextPrompt\")) {\n\t\t\tif (!isRelease) this.scrollToPrompt(1);\n\t\t\treturn { consume: true };\n\t\t}\n\t\tif (keybindings.matches(data, \"tui.altScreen.top\")) {\n\t\t\tif (!isRelease) this.scrollToTop();\n\t\t\treturn { consume: true };\n\t\t}\n\t\tif (keybindings.matches(data, \"tui.altScreen.bottom\")) {\n\t\t\tif (!isRelease) this.scrollToBottom();\n\t\t\treturn { consume: true };\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tprivate decodeMouseButton(button: number): TuiMouseButton {\n\t\tswitch (button & 3) {\n\t\t\tcase 0:\n\t\t\t\treturn \"left\";\n\t\t\tcase 1:\n\t\t\t\treturn \"middle\";\n\t\t\tcase 2:\n\t\t\t\treturn \"right\";\n\t\t\tdefault:\n\t\t\t\treturn \"none\";\n\t\t}\n\t}\n\n\tprivate createMouseEvent(\n\t\ttype: TuiMouseEvent[\"type\"],\n\t\tbutton: number,\n\t\tx: number,\n\t\ty: number,\n\t\textra: Partial<Pick<TuiMouseEvent, \"wheelDelta\" | \"clickCount\">> = {},\n\t): TuiMouseEvent {\n\t\treturn {\n\t\t\ttype,\n\t\t\tbutton: type === \"wheel\" ? \"none\" : this.decodeMouseButton(button),\n\t\t\tx,\n\t\t\ty,\n\t\t\tscreenX: x,\n\t\t\tscreenY: y,\n\t\t\twidth: Math.max(1, this.terminal.columns),\n\t\t\theight: Math.max(1, this.terminal.rows),\n\t\t\tshift: (button & 4) !== 0,\n\t\t\talt: (button & 8) !== 0,\n\t\t\tctrl: (button & 16) !== 0,\n\t\t\t...(extra.wheelDelta === undefined ? {} : { wheelDelta: extra.wheelDelta }),\n\t\t\t...(extra.clickCount === undefined ? {} : { clickCount: extra.clickCount }),\n\t\t};\n\t}\n\n\tprivate dispatchMouseToLayout(event: TuiMouseEvent): TuiMouseDispatchResult | undefined {\n\t\tif (!this.currentLayout) return undefined;\n\t\tconst visited = new Set<Component>();\n\t\tconst boxes = getLayoutBoxesAt(this.currentLayout, event.screenX, event.screenY);\n\t\tfor (const box of boxes) {\n\t\t\tif (visited.has(box.component)) continue;\n\t\t\tif (getLayoutNode(box.component) && box.component.handleMouse === Container.prototype.handleMouse) continue;\n\t\t\tvisited.add(box.component);\n\t\t\tconst result = dispatchMouseEvent(box.component, {\n\t\t\t\t...event,\n\t\t\t\tx: event.screenX - box.rect.x,\n\t\t\t\ty: event.screenY - box.rect.y,\n\t\t\t\twidth: box.rect.width,\n\t\t\t\theight: box.rect.height,\n\t\t\t});\n\t\t\tif (result) return result;\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tprivate applyMouseDispatchResult(event: TuiMouseEvent, result: TuiMouseDispatchResult): boolean {\n\t\tconst focusTarget = this.resolveMouseFocusTarget(result.focusTarget ?? result.target.component);\n\t\tconst focusChanged = result.focus === true && this.getFocusedComponent() !== focusTarget;\n\t\tif (result.focus) this.setFocus(focusTarget);\n\t\tif (result.capture) this.mouseCapture = result.target;\n\t\treturn (\n\t\t\tresult.render ??\n\t\t\t(focusChanged ||\n\t\t\t\tevent.type === \"press\" ||\n\t\t\t\tevent.type === \"click\" ||\n\t\t\t\tevent.type === \"drag\" ||\n\t\t\t\tevent.type === \"wheel\")\n\t\t);\n\t}\n\n\tprivate dispatchMouseToTarget(\n\t\tevent: TuiMouseEvent,\n\t\ttarget: TuiMouseDispatchTarget,\n\t): TuiMouseDispatchResult | undefined {\n\t\treturn dispatchMouseEvent(target.component, retargetMouseEvent(event, target));\n\t}\n\n\tprivate getComponentClickCount(target: TuiMouseDispatchTarget, x: number, y: number): number {\n\t\tconst now = Date.now();\n\t\tconst previous = this.lastComponentClick;\n\t\tconst count =\n\t\t\tprevious &&\n\t\t\tnow - previous.timestamp <= DOUBLE_CLICK_INTERVAL_MS &&\n\t\t\tprevious.component === target.component &&\n\t\t\tprevious.x === x &&\n\t\t\tprevious.y === y\n\t\t\t\t? (previous.count % 3) + 1\n\t\t\t\t: 1;\n\t\tthis.lastComponentClick = { timestamp: now, count, component: target.component, x, y };\n\t\treturn count;\n\t}\n\n\tprivate clearTextSelection(): void {\n\t\tthis.stopSelectionAutoScroll();\n\t\tthis.selectionPressActive = false;\n\t\tthis.selectionAnchor = undefined;\n\t\tthis.selectionFocus = undefined;\n\t\tthis.selectionGranularity = \"character\";\n\t\tthis.selectionInitialRange = undefined;\n\t\tthis.pressedUrl = undefined;\n\t\tthis.selectionDragged = false;\n\t}\n\n\tprivate handleMouseEvent(raw: SgrMouseEvent): void {\n\t\tconst isMotion = (raw.button & 32) !== 0;\n\t\tconst type: TuiMouseEvent[\"type\"] = raw.release\n\t\t\t? \"release\"\n\t\t\t: isMotion\n\t\t\t\t? this.decodeMouseButton(raw.button) === \"none\"\n\t\t\t\t\t? \"move\"\n\t\t\t\t\t: \"drag\"\n\t\t\t\t: \"press\";\n\t\tconst event = this.createMouseEvent(type, raw.button, raw.x, raw.y);\n\n\t\tif (this.mouseCapture || this.mousePressTarget) {\n\t\t\tconst target = this.mouseCapture ?? this.mousePressTarget!;\n\t\t\tif (this.mousePressPoint && (raw.x !== this.mousePressPoint.x || raw.y !== this.mousePressPoint.y)) {\n\t\t\t\tthis.mousePressMoved = true;\n\t\t\t\tthis.lastComponentClick = undefined;\n\t\t\t}\n\t\t\tlet render = false;\n\t\t\tconst targetResult = this.dispatchMouseToTarget(event, target);\n\t\t\tif (targetResult) render = this.applyMouseDispatchResult(event, targetResult);\n\t\t\tif (raw.release) {\n\t\t\t\tif (!this.mousePressMoved && this.mousePressPoint?.x === raw.x && this.mousePressPoint.y === raw.y) {\n\t\t\t\t\tconst clickEvent = this.createMouseEvent(\"click\", raw.button, raw.x, raw.y, {\n\t\t\t\t\t\tclickCount: this.getComponentClickCount(target, raw.x, raw.y),\n\t\t\t\t\t});\n\t\t\t\t\tconst clickResult = this.dispatchMouseToTarget(clickEvent, target);\n\t\t\t\t\tif (clickResult) render = this.applyMouseDispatchResult(clickEvent, clickResult) || render;\n\t\t\t\t}\n\t\t\t\tthis.clearComponentMouseGesture();\n\t\t\t}\n\t\t\tif (render) this.requestRender();\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.handleSearchMouseEvent(raw)) return;\n\n\t\tconst overlay = this.dispatchMouseToOverlay(event);\n\t\tif (!overlay.hit) {\n\t\t\tif (this.handleScrollToEndIndicatorMouseEvent(raw)) return;\n\t\t\tconst scrollbarHandled = this.handleScrollbarMouseEvent(raw);\n\t\t\tif (!this.scrollbarDrag) this.updateScrollbarHover(raw.x, raw.y);\n\t\t\tif (scrollbarHandled) return;\n\t\t} else {\n\t\t\tthis.stopScrollbarHover();\n\t\t}\n\n\t\tconst result = overlay.result ?? (overlay.hit ? undefined : this.dispatchMouseToLayout(event));\n\t\tif (result) {\n\t\t\tconst render = this.applyMouseDispatchResult(event, result);\n\t\t\tif (type === \"press\") {\n\t\t\t\tthis.clearTextSelection();\n\t\t\t\tthis.mousePressTarget = result.target;\n\t\t\t\tthis.mousePressPoint = { x: raw.x, y: raw.y };\n\t\t\t\tthis.mousePressMoved = false;\n\t\t\t}\n\t\t\tif (render) this.requestRender();\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.handleRightClickPaste(raw)) return;\n\t\tthis.handleSelectionMouseEvent(raw);\n\t}\n\n\tprivate parseWheelEvent(data: string): WheelEvent | undefined {\n\t\tconst sgr = /^\\x1b\\[<(\\d+);(\\d+);(\\d+)[Mm]$/.exec(data);\n\t\tif (sgr) {\n\t\t\tconst button = Number.parseInt(sgr[1], 10);\n\t\t\tif ((button & 64) === 0) return undefined;\n\t\t\tconst direction = button & 3;\n\t\t\tif (direction !== 0 && direction !== 1) return undefined;\n\t\t\treturn {\n\t\t\t\tdirection: direction === 0 ? -1 : 1,\n\t\t\t\tx: Number.parseInt(sgr[2], 10) - 1,\n\t\t\t\ty: Number.parseInt(sgr[3], 10) - 1,\n\t\t\t\tbutton,\n\t\t\t};\n\t\t}\n\t\tif (data.length === 6 && data.startsWith(\"\\x1b[M\")) {\n\t\t\tconst button = data.charCodeAt(3) - 32;\n\t\t\tif ((button & 64) === 0) return undefined;\n\t\t\tconst direction = button & 3;\n\t\t\tif (direction !== 0 && direction !== 1) return undefined;\n\t\t\treturn {\n\t\t\t\tdirection: direction === 0 ? -1 : 1,\n\t\t\t\tx: data.charCodeAt(4) - 33,\n\t\t\t\ty: data.charCodeAt(5) - 33,\n\t\t\t\tbutton,\n\t\t\t};\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tprivate getWheelScrollLines(button: number): number {\n\t\t// SGR mouse button codes use bit 3 (value 8) for the Alt modifier.\n\t\treturn (button & 8) !== 0 ? this.wheelScrollLines * ALT_WHEEL_SCROLL_MULTIPLIER : this.wheelScrollLines;\n\t}\n\n\tprivate routeWheel(event: WheelEvent): void {\n\t\tlet remaining = event.direction * this.getWheelScrollLines(event.button);\n\t\tconst seen = new Set<ScrollView>();\n\t\tfor (const scrollView of this.currentLayout ? getScrollViewsAt(this.currentLayout, event.x, event.y) : []) {\n\t\t\tseen.add(scrollView);\n\t\t\tremaining = scrollView.scrollBy(remaining);\n\t\t\tif (remaining === 0 || scrollView.overscroll === \"contain\") break;\n\t\t}\n\t\tconst primary = this.getPrimaryScrollView();\n\t\tif (remaining !== 0 && !seen.has(primary)) primary.scrollBy(remaining);\n\t\tthis.updateScrollbarHover(event.x, event.y);\n\t\tthis.requestRender();\n\t}\n\n\tprivate parseSgrMouseEvent(data: string): SgrMouseEvent | undefined {\n\t\tconst match = /^\\x1b\\[<(\\d+);(\\d+);(\\d+)([Mm])$/.exec(data);\n\t\tif (!match) return undefined;\n\t\treturn {\n\t\t\tbutton: Number.parseInt(match[1], 10),\n\t\t\tx: Number.parseInt(match[2], 10) - 1,\n\t\t\ty: Number.parseInt(match[3], 10) - 1,\n\t\t\trelease: match[4] === \"m\",\n\t\t};\n\t}\n\n\tprivate handleRightClickPaste(event: SgrMouseEvent): boolean {\n\t\tif (\n\t\t\t!this.onRightClickPaste ||\n\t\t\tprocess.platform !== \"win32\" ||\n\t\t\tprocess.env.TERM_PROGRAM?.toLowerCase() === \"vscode\" ||\n\t\t\tevent.release ||\n\t\t\tevent.button !== 2\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\t\ttry {\n\t\t\tthis.onRightClickPaste();\n\t\t} catch {\n\t\t\t// Clipboard paste is best-effort.\n\t\t}\n\t\treturn true;\n\t}\n\n\tprivate handleScrollToEndIndicatorMouseEvent(event: SgrMouseEvent): boolean {\n\t\tconst rect = this.scrollToEndIndicatorRect;\n\t\tif (!rect || event.release || (event.button & 32) !== 0 || (event.button & 3) !== 0) return false;\n\t\tif (event.y !== rect.row || event.x < rect.column || event.x >= rect.column + rect.width) return false;\n\t\tthis.scrollToBottom();\n\t\treturn true;\n\t}\n\n\tprivate getScrollbarTargetAt(x: number, y: number, includeHiddenAuto = false): ScrollbarTarget | undefined {\n\t\tif (this.hasOverlay() || !this.currentLayout) return undefined;\n\t\tfor (const scrollView of getScrollViewsAt(this.currentLayout, x, y)) {\n\t\t\tconst box = getScrollViewBox(this.currentLayout, scrollView);\n\t\t\tconst geometry = box ? getScrollbarGeometry(box, includeHiddenAuto) : undefined;\n\t\t\tif (\n\t\t\t\tgeometry &&\n\t\t\t\tx === geometry.column &&\n\t\t\t\ty >= geometry.trackTop &&\n\t\t\t\ty < geometry.trackTop + geometry.trackHeight\n\t\t\t) {\n\t\t\t\treturn { scrollView, geometry };\n\t\t\t}\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tprivate setScrollbarHover(scrollView: ScrollView | undefined): void {\n\t\tif (scrollView === this.scrollbarHover) return;\n\t\tthis.scrollbarHover?.setScrollbarActive(false);\n\t\tthis.scrollbarHover = scrollView;\n\t\tthis.scrollbarHover?.setScrollbarActive(true);\n\t}\n\n\tprivate updateScrollbarHover(x: number, y: number): void {\n\t\tthis.setScrollbarHover(this.getScrollbarTargetAt(x, y, true)?.scrollView);\n\t}\n\n\tprivate stopScrollbarHover(): void {\n\t\tthis.setScrollbarHover(undefined);\n\t}\n\n\tprivate scrollScrollbarToPointer(\n\t\tscrollView: ScrollView,\n\t\tgeometry: ScrollbarGeometry,\n\t\tpointerY: number,\n\t\tgrabOffset: number,\n\t): void {\n\t\tconst maxThumbOffset = geometry.trackHeight - geometry.thumbHeight;\n\t\tconst thumbOffset = Math.max(0, Math.min(maxThumbOffset, pointerY - geometry.trackTop - grabOffset));\n\t\tconst scrollTop = maxThumbOffset === 0 ? 0 : Math.round((thumbOffset / maxThumbOffset) * geometry.maxScrollTop);\n\t\tscrollView.scrollTo(scrollTop);\n\t}\n\n\tprivate handleScrollbarMouseEvent(event: SgrMouseEvent): boolean {\n\t\tif (this.scrollbarDrag) {\n\t\t\tif (event.release) {\n\t\t\t\tthis.stopScrollbarDrag();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tconst box = this.currentLayout\n\t\t\t\t? getScrollViewBox(this.currentLayout, this.scrollbarDrag.scrollView)\n\t\t\t\t: undefined;\n\t\t\tconst geometry = box ? getScrollbarGeometry(box) : undefined;\n\t\t\tif (geometry) {\n\t\t\t\tthis.scrollScrollbarToPointer(\n\t\t\t\t\tthis.scrollbarDrag.scrollView,\n\t\t\t\t\tgeometry,\n\t\t\t\t\tevent.y,\n\t\t\t\t\tthis.scrollbarDrag.grabOffset,\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\n\t\tif (event.release || (event.button & 32) !== 0 || (event.button & 3) !== 0) return false;\n\t\tconst target = this.getScrollbarTargetAt(event.x, event.y);\n\t\tif (!target) return false;\n\t\tthis.stopSelectionAutoScroll();\n\t\tthis.selectionPressActive = false;\n\t\tthis.selectionAnchor = undefined;\n\t\tthis.selectionFocus = undefined;\n\t\tthis.selectionGranularity = \"character\";\n\t\tthis.selectionInitialRange = undefined;\n\t\tthis.lastClick = undefined;\n\t\tthis.pressedUrl = undefined;\n\t\tthis.selectionDragged = false;\n\t\tthis.setScrollbarHover(target.scrollView);\n\t\tconst onThumb =\n\t\t\tevent.y >= target.geometry.thumbTop && event.y < target.geometry.thumbTop + target.geometry.thumbHeight;\n\t\tconst grabOffset = onThumb ? event.y - target.geometry.thumbTop : Math.floor(target.geometry.thumbHeight / 2);\n\t\tif (!onThumb) this.scrollScrollbarToPointer(target.scrollView, target.geometry, event.y, grabOffset);\n\t\tthis.scrollbarDrag = {\n\t\t\tscrollView: target.scrollView,\n\t\t\tgrabOffset,\n\t\t};\n\t\treturn true;\n\t}\n\n\tprivate stopScrollbarDrag(): void {\n\t\tthis.scrollbarDrag = undefined;\n\t}\n\n\tprivate getScrollSelectionPoint(scrollView: ScrollView, x: number, y: number): SelectionPoint | undefined {\n\t\tif (!this.currentLayout) return undefined;\n\t\tconst box = getScrollViewBox(this.currentLayout, scrollView);\n\t\tif (!box || box.rect.height <= 0 || box.clip.height <= 0) return undefined;\n\t\tconst visibleTop = Math.max(0, box.rect.y, box.clip.y);\n\t\tconst visibleBottom = Math.min(\n\t\t\tthis.terminal.rows - 1,\n\t\t\tbox.rect.y + box.rect.height - 1,\n\t\t\tbox.clip.y + box.clip.height - 1,\n\t\t);\n\t\tif (visibleBottom < visibleTop) return undefined;\n\t\tconst pointerRow = Math.max(visibleTop, Math.min(visibleBottom, y));\n\t\tconst maxContentRow = Math.max(0, (box.scrollContentLines?.length ?? 1) - 1);\n\t\treturn {\n\t\t\trow: Math.max(0, Math.min(maxContentRow, scrollView.scrollTop + pointerRow - box.rect.y)),\n\t\t\tcol: Math.max(0, Math.min(box.rect.width - 1, x - box.rect.x)),\n\t\t\tscrollView,\n\t\t};\n\t}\n\n\tprivate getSelectionPoint(event: SgrMouseEvent, scrollView?: ScrollView): SelectionPoint {\n\t\tif (scrollView) {\n\t\t\tconst point = this.getScrollSelectionPoint(scrollView, event.x, event.y);\n\t\t\tif (point) return point;\n\t\t}\n\t\treturn {\n\t\t\trow: Math.max(0, Math.min(this.terminal.rows - 1, event.y)),\n\t\t\tcol: Math.max(0, Math.min(this.terminal.columns - 1, event.x)),\n\t\t};\n\t}\n\n\tprivate getSelectionSourceLine(point: SelectionPoint): string {\n\t\tif (point.scrollView && this.currentLayout) {\n\t\t\tconst lines = getScrollViewBox(this.currentLayout, point.scrollView)?.scrollContentLines;\n\t\t\tif (lines) return lines[point.row] ?? \"\";\n\t\t}\n\t\treturn this.previousScreen[point.row] ?? \"\";\n\t}\n\n\tprivate getWordSelection(point: SelectionPoint): SelectionRange | undefined {\n\t\tconst line = stripTerminalSequences(this.getSelectionSourceLine(point));\n\t\tconst segments: Array<{ start: number; end: number; selectable: boolean; joiner: boolean }> = [];\n\t\tlet start = 0;\n\t\tfor (const segment of wordSegmenter.segment(line)) {\n\t\t\tconst end = start + visibleWidth(segment.segment);\n\t\t\tconst joiner = TERMINAL_WORD_SELECTION_JOINERS.has(segment.segment);\n\t\t\tsegments.push({ start, end, selectable: segment.isWordLike === true || joiner, joiner });\n\t\t\tstart = end;\n\t\t}\n\t\tconst clickedSegmentIndex = segments.findIndex(\n\t\t\t(segment) => point.col >= segment.start && point.col < segment.end,\n\t\t);\n\t\tif (clickedSegmentIndex < 0) return undefined;\n\n\t\tconst canJoin = (\n\t\t\tleft: { selectable: boolean; joiner: boolean },\n\t\t\tright: { selectable: boolean; joiner: boolean },\n\t\t): boolean => left.selectable && right.selectable && (left.joiner || right.joiner);\n\t\tlet selectionStart = segments[clickedSegmentIndex].start;\n\t\tlet selectionEnd = segments[clickedSegmentIndex].end;\n\t\tfor (let index = clickedSegmentIndex; index > 0 && canJoin(segments[index - 1], segments[index]); index--) {\n\t\t\tselectionStart = segments[index - 1].start;\n\t\t}\n\t\tfor (\n\t\t\tlet index = clickedSegmentIndex;\n\t\t\tindex < segments.length - 1 && canJoin(segments[index], segments[index + 1]);\n\t\t\tindex++\n\t\t) {\n\t\t\tselectionEnd = segments[index + 1].end;\n\t\t}\n\t\treturn {\n\t\t\tstart: { ...point, col: selectionStart },\n\t\t\tend: { ...point, col: selectionEnd, boundary: true },\n\t\t};\n\t}\n\n\tprivate getLineSelection(point: SelectionPoint): SelectionRange {\n\t\treturn {\n\t\t\tstart: { ...point, col: 0 },\n\t\t\tend: { ...point, col: visibleWidth(this.getSelectionSourceLine(point)), boundary: true },\n\t\t};\n\t}\n\n\tprivate updateSelectionFocus(point: SelectionPoint): void {\n\t\tif (this.selectionGranularity === \"character\" || !this.selectionInitialRange) {\n\t\t\tthis.selectionFocus = point;\n\t\t\treturn;\n\t\t}\n\t\tconst range = this.selectionGranularity === \"word\" ? this.getWordSelection(point) : this.getLineSelection(point);\n\t\tif (!range) return;\n\t\tconst initial = this.selectionInitialRange;\n\t\tconst targetBeforeInitial =\n\t\t\trange.start.row < initial.start.row ||\n\t\t\t(range.start.row === initial.start.row && range.start.col < initial.start.col);\n\t\tif (targetBeforeInitial) {\n\t\t\tthis.selectionAnchor = initial.end;\n\t\t\tthis.selectionFocus = range.start;\n\t\t} else {\n\t\t\tthis.selectionAnchor = initial.start;\n\t\t\tthis.selectionFocus = range.end;\n\t\t}\n\t}\n\n\tprivate getClickCount(point: SelectionPoint, word: SelectionRange | undefined): number {\n\t\tconst now = Date.now();\n\t\tconst previous = this.lastClick;\n\t\tconst count =\n\t\t\tword &&\n\t\t\tprevious &&\n\t\t\tnow - previous.timestamp <= DOUBLE_CLICK_INTERVAL_MS &&\n\t\t\tprevious.row === point.row &&\n\t\t\tprevious.scrollView === point.scrollView &&\n\t\t\tprevious.wordStart === word.start.col &&\n\t\t\tprevious.wordEnd === word.end.col\n\t\t\t\t? (previous.count % 3) + 1\n\t\t\t\t: 1;\n\t\tthis.lastClick = word\n\t\t\t? {\n\t\t\t\t\ttimestamp: now,\n\t\t\t\t\tcount,\n\t\t\t\t\trow: point.row,\n\t\t\t\t\tscrollView: point.scrollView,\n\t\t\t\t\twordStart: word.start.col,\n\t\t\t\t\twordEnd: word.end.col,\n\t\t\t\t}\n\t\t\t: undefined;\n\t\treturn count;\n\t}\n\n\tprivate updateSelectionAutoScroll(event: SgrMouseEvent): void {\n\t\tconst scrollView = this.selectionAnchor?.scrollView;\n\t\tif (!scrollView || !this.currentLayout) {\n\t\t\tthis.stopSelectionAutoScroll();\n\t\t\treturn;\n\t\t}\n\t\tconst box = getScrollViewBox(this.currentLayout, scrollView);\n\t\tif (!box || box.rect.height <= 0 || box.clip.height <= 0) {\n\t\t\tthis.stopSelectionAutoScroll();\n\t\t\treturn;\n\t\t}\n\t\tconst visibleTop = Math.max(0, box.rect.y, box.clip.y);\n\t\tconst visibleBottom = Math.min(\n\t\t\tthis.terminal.rows - 1,\n\t\t\tbox.rect.y + box.rect.height - 1,\n\t\t\tbox.clip.y + box.clip.height - 1,\n\t\t);\n\t\tthis.selectionDragPointer = { x: event.x, y: event.y };\n\t\tthis.selectionAutoScrollDirection = event.y <= visibleTop ? -1 : event.y >= visibleBottom ? 1 : 0;\n\t\tif (this.selectionAutoScrollDirection === 0) {\n\t\t\tthis.stopSelectionAutoScroll();\n\t\t\treturn;\n\t\t}\n\t\tif (this.selectionAutoScrollTimer) return;\n\t\tthis.selectionAutoScrollTimer = setInterval(() => this.autoScrollSelection(), 50);\n\t\tthis.selectionAutoScrollTimer.unref();\n\t}\n\n\tprivate autoScrollSelection(): void {\n\t\tconst scrollView = this.selectionAnchor?.scrollView;\n\t\tconst pointer = this.selectionDragPointer;\n\t\tconst direction = this.selectionAutoScrollDirection;\n\t\tif (!scrollView || !pointer || direction === 0) {\n\t\t\tthis.stopSelectionAutoScroll();\n\t\t\treturn;\n\t\t}\n\t\tconst remaining = scrollView.scrollBy(direction);\n\t\tif (remaining === direction) {\n\t\t\tthis.stopSelectionAutoScroll();\n\t\t\treturn;\n\t\t}\n\t\tconst point = this.getScrollSelectionPoint(scrollView, pointer.x, pointer.y);\n\t\tif (point) this.updateSelectionFocus(point);\n\t\tthis.requestRender();\n\t}\n\n\tprivate stopSelectionAutoScroll(): void {\n\t\tif (this.selectionAutoScrollTimer) {\n\t\t\tclearInterval(this.selectionAutoScrollTimer);\n\t\t\tthis.selectionAutoScrollTimer = undefined;\n\t\t}\n\t\tthis.selectionAutoScrollDirection = 0;\n\t\tthis.selectionDragPointer = undefined;\n\t}\n\n\tprivate handleSelectionMouseEvent(event: SgrMouseEvent): void {\n\t\tconst button = event.button & 3;\n\t\tif (button !== 0 && !(event.release && button === 3)) return;\n\t\tconst anchorScrollView = this.selectionAnchor?.scrollView;\n\t\tconst point = this.getSelectionPoint(event, anchorScrollView);\n\t\tif (event.release) {\n\t\t\tif (!this.selectionPressActive) return;\n\t\t\tthis.selectionPressActive = false;\n\t\t\tthis.stopSelectionAutoScroll();\n\t\t\tif (!this.selectionAnchor) return;\n\t\t\tthis.updateSelectionFocus(point);\n\t\t\tconst isClick =\n\t\t\t\t!this.selectionDragged &&\n\t\t\t\tthis.selectionAnchor.scrollView === point.scrollView &&\n\t\t\t\tthis.selectionAnchor.row === point.row &&\n\t\t\t\tthis.selectionAnchor.col === point.col;\n\t\t\tconst clickedUrl = isClick ? this.pressedUrl : undefined;\n\t\t\tthis.pressedUrl = undefined;\n\t\t\tif (clickedUrl && this.openUrl) {\n\t\t\t\tthis.selectionAnchor = undefined;\n\t\t\t\tthis.selectionFocus = undefined;\n\t\t\t\ttry {\n\t\t\t\t\tthis.openUrl(clickedUrl);\n\t\t\t\t} catch {\n\t\t\t\t\t// URL activation is best-effort.\n\t\t\t\t}\n\t\t\t\tthis.requestRender();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (isClick) {\n\t\t\t\tconst clickEvent = this.createMouseEvent(\"click\", event.button, event.x, event.y, {\n\t\t\t\t\tclickCount: this.lastClick?.count ?? 1,\n\t\t\t\t});\n\t\t\t\tconst overlay = this.dispatchMouseToOverlay(clickEvent);\n\t\t\t\tconst result = overlay.result ?? (overlay.hit ? undefined : this.dispatchMouseToLayout(clickEvent));\n\t\t\t\tif (result) {\n\t\t\t\t\tconst render = this.applyMouseDispatchResult(clickEvent, result);\n\t\t\t\t\tthis.clearTextSelection();\n\t\t\t\t\tif (render) this.requestRender();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (this.copyOnSelect) void this.copySelectionToClipboard();\n\t\t\tthis.requestRender();\n\t\t\treturn;\n\t\t}\n\t\tif ((event.button & 32) !== 0) {\n\t\t\tif (!this.selectionPressActive || !this.selectionAnchor) return;\n\t\t\tthis.selectionDragged = true;\n\t\t\tthis.lastClick = undefined;\n\t\t\tthis.pressedUrl = undefined;\n\t\t\tthis.updateSelectionFocus(point);\n\t\t\tthis.updateSelectionAutoScroll(event);\n\t\t\tthis.requestRender();\n\t\t\treturn;\n\t\t}\n\t\tthis.stopSelectionAutoScroll();\n\t\tthis.selectionPressActive = true;\n\t\tconst scrollView =\n\t\t\t!this.hasOverlay() && this.currentLayout\n\t\t\t\t? getScrollViewsAt(this.currentLayout, event.x, event.y)[0]\n\t\t\t\t: undefined;\n\t\tconst anchor = this.getSelectionPoint(event, scrollView);\n\t\tconst word = this.getWordSelection(anchor);\n\t\tconst clickCount = this.getClickCount(anchor, word);\n\t\tconst range = clickCount === 2 ? word : clickCount === 3 ? this.getLineSelection(anchor) : undefined;\n\t\tthis.selectionGranularity = range ? (clickCount === 2 ? \"word\" : \"line\") : \"character\";\n\t\tthis.selectionInitialRange = range;\n\t\tthis.selectionAnchor = range?.start ?? anchor;\n\t\tthis.selectionFocus = range?.end ?? anchor;\n\t\tthis.selectionDragged = false;\n\t\tthis.pressedUrl = range\n\t\t\t? undefined\n\t\t\t: getOsc8LinkAtColumn(\n\t\t\t\t\tthis.previousScreen[Math.max(0, Math.min(this.terminal.rows - 1, event.y))] ?? \"\",\n\t\t\t\t\tMath.max(0, Math.min(this.terminal.columns - 1, event.x)),\n\t\t\t\t);\n\t\tthis.requestRender();\n\t}\n\n\tprivate getSelectionBounds(): { start: SelectionPoint; end: SelectionPoint } | undefined {\n\t\tif (!this.selectionAnchor || !this.selectionFocus) return undefined;\n\t\tif (this.selectionAnchor.scrollView !== this.selectionFocus.scrollView) return undefined;\n\t\tconst anchorBeforeFocus =\n\t\t\tthis.selectionAnchor.row < this.selectionFocus.row ||\n\t\t\t(this.selectionAnchor.row === this.selectionFocus.row && this.selectionAnchor.col < this.selectionFocus.col);\n\t\tif (\n\t\t\tthis.selectionAnchor.row === this.selectionFocus.row &&\n\t\t\tthis.selectionAnchor.col === this.selectionFocus.col\n\t\t) {\n\t\t\treturn undefined;\n\t\t}\n\t\treturn anchorBeforeFocus\n\t\t\t? { start: this.selectionAnchor, end: this.selectionFocus }\n\t\t\t: { start: this.selectionFocus, end: this.selectionAnchor };\n\t}\n\n\tprivate getSelectionColumns(\n\t\tline: string,\n\t\trow: number,\n\t\tselection: { start: SelectionPoint; end: SelectionPoint },\n\t\tminColumn = 0,\n\t\tmaxColumn = visibleWidth(line),\n\t): { start: number; end: number } {\n\t\tconst lineWidth = visibleWidth(line);\n\t\tlet start = Math.max(0, minColumn);\n\t\tlet end = Math.min(lineWidth, maxColumn);\n\t\tif (row === selection.start.row) {\n\t\t\tstart = getGraphemeCellRange(line, selection.start.col)?.start ?? Math.min(selection.start.col, lineWidth);\n\t\t}\n\t\tif (row === selection.end.row) {\n\t\t\tend = selection.end.boundary\n\t\t\t\t? Math.min(selection.end.col, lineWidth)\n\t\t\t\t: (getGraphemeCellRange(line, selection.end.col)?.end ?? Math.min(selection.end.col + 1, lineWidth));\n\t\t}\n\t\treturn { start: Math.max(minColumn, start), end: Math.min(maxColumn, end) };\n\t}\n\n\tprivate getActiveSelectionText(): string | undefined {\n\t\tconst selection = this.getSelectionBounds();\n\t\tif (!selection) return undefined;\n\t\tlet sourceLines: readonly string[] = this.previousScreen;\n\t\tif (selection.start.scrollView) {\n\t\t\tif (!this.currentLayout) return undefined;\n\t\t\tconst box = getScrollViewBox(this.currentLayout, selection.start.scrollView);\n\t\t\tif (!box?.scrollContentLines) return undefined;\n\t\t\tsourceLines = box.scrollContentLines;\n\t\t}\n\t\tconst lines: string[] = [];\n\t\tfor (let row = selection.start.row; row <= selection.end.row; row++) {\n\t\t\tconst line = sourceLines[row] ?? \"\";\n\t\t\tconst columns = this.getSelectionColumns(line, row, selection);\n\t\t\tlines.push(\n\t\t\t\tstripTerminalSequences(\n\t\t\t\t\tsliceByColumn(line, columns.start, Math.max(0, columns.end - columns.start), true),\n\t\t\t\t).trimEnd(),\n\t\t\t);\n\t\t}\n\t\tconst text = lines.join(\"\\n\");\n\t\treturn text.length === 0 ? undefined : text;\n\t}\n\n\tprivate async copySelectionToClipboard(): Promise<boolean> {\n\t\tconst text = this.getActiveSelectionText();\n\t\tif (!text) return false;\n\t\treturn this.copyTextToClipboard(text);\n\t}\n\n\tprivate async copyTextToClipboard(text: string): Promise<boolean> {\n\t\t// Prefer an injected clipboard implementation (native clipboard + platform tools with a\n\t\t// verified success path) when the host app provides one. A bare OSC 52 write can show\n\t\t// \"Copied!\" while leaving the system clipboard untouched (e.g. macOS Terminal.app, tmux\n\t\t// without OSC 52 clipboard passthrough), so only report success when it actually copies.\n\t\tif (this.copySelection) {\n\t\t\tconst ok = await this.copySelection(text);\n\t\t\tthis.flash(ok ? \"Copied!\" : \"Copy failed\");\n\t\t\treturn ok;\n\t\t}\n\t\tthis.terminal.write(`\\x1b]52;c;${Buffer.from(text).toString(\"base64\")}\\x07`);\n\t\tthis.flash(\"Copied!\");\n\t\treturn true;\n\t}\n\n\tprivate applySearchTextHighlight(text: string, current: boolean): string {\n\t\tconst style = current ? this.searchCurrentMatchStyle : this.searchMatchStyle;\n\t\tlet result = \"\";\n\t\tlet plainStart = 0;\n\t\tlet index = 0;\n\t\twhile (index < text.length) {\n\t\t\tconst ansi = extractAnsiCode(text, index);\n\t\t\tif (!ansi) {\n\t\t\t\tindex += 1;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (index > plainStart) result += style(text.slice(plainStart, index));\n\t\t\tresult += ansi.code;\n\t\t\tindex += ansi.length;\n\t\t\tplainStart = index;\n\t\t}\n\t\tif (plainStart < text.length) result += style(text.slice(plainStart));\n\t\treturn result;\n\t}\n\n\tprivate applySearchHighlights(screen: string[], layout: LayoutFrame): string[] {\n\t\tconst search = this.activeSearch;\n\t\tif (!search || search.selectedIndex < 0 || search.matches.length === 0) return screen;\n\t\tconst scrollView = layout.primaryScrollView ?? this.implicitScrollView;\n\t\tconst box = getScrollViewBox(layout, scrollView);\n\t\tif (!box) return screen;\n\n\t\tconst rangesByRow = new Map<number, SearchHighlightRange[]>();\n\t\tconst scrollbarColumn = getScrollbarGeometry(box)?.column;\n\t\tconst minRow = Math.max(0, box.rect.y, box.clip.y);\n\t\tconst maxRow = Math.min(screen.length, box.rect.y + box.rect.height, box.clip.y + box.clip.height);\n\t\tconst minColumn = Math.max(0, box.rect.x, box.clip.x);\n\t\tconst maxColumn = Math.min(\n\t\t\tthis.terminal.columns,\n\t\t\tbox.rect.x + box.rect.width,\n\t\t\tbox.clip.x + box.clip.width,\n\t\t\tscrollbarColumn ?? Number.POSITIVE_INFINITY,\n\t\t);\n\t\tconst minContentRow = scrollView.scrollTop + minRow - box.rect.y;\n\t\tconst maxContentRow = scrollView.scrollTop + maxRow - box.rect.y - 1;\n\t\tlet low = 0;\n\t\tlet high = search.matches.length;\n\t\twhile (low < high) {\n\t\t\tconst middle = low + Math.floor((high - low) / 2);\n\t\t\tconst match = search.matches[middle]!;\n\t\t\tconst lastRow = match.segments[match.segments.length - 1]?.row ?? -1;\n\t\t\tif (lastRow < minContentRow) low = middle + 1;\n\t\t\telse high = middle;\n\t\t}\n\t\tfor (let matchIndex = low; matchIndex < search.matches.length; matchIndex++) {\n\t\t\tconst match = search.matches[matchIndex]!;\n\t\t\tif ((match.segments[0]?.row ?? 0) > maxContentRow) break;\n\t\t\tfor (const segment of match.segments) {\n\t\t\t\tconst row = box.rect.y + segment.row - scrollView.scrollTop;\n\t\t\t\tif (row < minRow || row >= maxRow) continue;\n\t\t\t\tconst startCol = Math.max(minColumn, box.rect.x + segment.startCol);\n\t\t\t\tconst endCol = Math.min(maxColumn, box.rect.x + segment.endCol);\n\t\t\t\tif (endCol <= startCol) continue;\n\t\t\t\tconst ranges = rangesByRow.get(row) ?? [];\n\t\t\t\tranges.push({ startCol, endCol, current: matchIndex === search.selectedIndex });\n\t\t\t\trangesByRow.set(row, ranges);\n\t\t\t}\n\t\t}\n\n\t\tconst result = [...screen];\n\t\tfor (const [row, ranges] of rangesByRow) {\n\t\t\tlet line = result[row] ?? \"\";\n\t\t\tif (isImageLine(line)) continue;\n\t\t\tconst lineWidth = visibleWidth(line);\n\t\t\tfor (const range of ranges.sort((a, b) => b.startCol - a.startCol)) {\n\t\t\t\tconst startCol = Math.min(range.startCol, lineWidth);\n\t\t\t\tconst endCol = Math.min(range.endCol, lineWidth);\n\t\t\t\tif (endCol <= startCol) continue;\n\t\t\t\tconst before = sliceByColumn(line, 0, startCol, true);\n\t\t\t\tconst highlighted = sliceByColumn(line, startCol, endCol - startCol, true);\n\t\t\t\tconst after = sliceByColumn(line, endCol, Math.max(0, lineWidth - endCol), true);\n\t\t\t\tline = `${before}${this.applySearchTextHighlight(highlighted, range.current)}${after}`;\n\t\t\t}\n\t\t\tresult[row] = line;\n\t\t}\n\t\treturn result;\n\t}\n\n\tprivate applySelectionHighlight(text: string): string {\n\t\tlet result = \"\\x1b[7m\";\n\t\tlet index = 0;\n\t\twhile (index < text.length) {\n\t\t\tconst ansi = extractAnsiCode(text, index);\n\t\t\tif (!ansi) {\n\t\t\t\tresult += text[index];\n\t\t\t\tindex += 1;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tresult += ansi.code;\n\t\t\tif (ansi.code.endsWith(\"m\")) result += \"\\x1b[7m\";\n\t\t\tindex += ansi.length;\n\t\t}\n\t\treturn `${result}\\x1b[27m`;\n\t}\n\n\tprivate applySelection(screen: string[], layout = this.currentLayout): string[] {\n\t\tconst selection = this.getSelectionBounds();\n\t\tif (!selection) return screen;\n\t\tlet screenSelection = selection;\n\t\tlet minRow = 0;\n\t\tlet maxRow = screen.length - 1;\n\t\tlet minColumn = 0;\n\t\tlet maxColumn = this.terminal.columns;\n\t\tif (selection.start.scrollView) {\n\t\t\tif (!layout) return screen;\n\t\t\tconst box = getScrollViewBox(layout, selection.start.scrollView);\n\t\t\tif (!box) return screen;\n\t\t\tminRow = Math.max(0, box.rect.y, box.clip.y);\n\t\t\tmaxRow = Math.min(screen.length - 1, box.rect.y + box.rect.height - 1, box.clip.y + box.clip.height - 1);\n\t\t\tminColumn = Math.max(0, box.rect.x, box.clip.x);\n\t\t\tmaxColumn = Math.min(this.terminal.columns, box.rect.x + box.rect.width, box.clip.x + box.clip.width);\n\t\t\tscreenSelection = {\n\t\t\t\tstart: {\n\t\t\t\t\t...selection.start,\n\t\t\t\t\trow: box.rect.y + selection.start.row - selection.start.scrollView.scrollTop,\n\t\t\t\t\tcol: box.rect.x + selection.start.col,\n\t\t\t\t},\n\t\t\t\tend: {\n\t\t\t\t\t...selection.end,\n\t\t\t\t\trow: box.rect.y + selection.end.row - selection.start.scrollView.scrollTop,\n\t\t\t\t\tcol: box.rect.x + selection.end.col,\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t\treturn screen.map((line, row) => {\n\t\t\tif (\n\t\t\t\trow < minRow ||\n\t\t\t\trow > maxRow ||\n\t\t\t\trow < screenSelection.start.row ||\n\t\t\t\trow > screenSelection.end.row ||\n\t\t\t\tisImageLine(line)\n\t\t\t) {\n\t\t\t\treturn line;\n\t\t\t}\n\t\t\tconst lineWidth = visibleWidth(line);\n\t\t\tconst columns = this.getSelectionColumns(line, row, screenSelection, minColumn, maxColumn);\n\t\t\tif (columns.end <= columns.start) return line;\n\t\t\tconst before = sliceByColumn(line, 0, columns.start, true);\n\t\t\tconst selected = sliceByColumn(line, columns.start, columns.end - columns.start, true);\n\t\t\tconst after = sliceByColumn(line, columns.end, Math.max(0, lineWidth - columns.end), true);\n\t\t\treturn `${before}${this.applySelectionHighlight(selected)}${after}`;\n\t\t});\n\t}\n\n\tprivate isMouseSequence(data: string): boolean {\n\t\treturn /^\\x1b\\[<\\d+;\\d+;\\d+[Mm]$/.test(data) || (data.length === 6 && data.startsWith(\"\\x1b[M\"));\n\t}\n\n\tprivate compositeScrollToEndIndicator(screen: string[], layout: LayoutFrame, width: number): string[] {\n\t\tthis.scrollToEndIndicatorRect = undefined;\n\t\tconst scrollView = layout.primaryScrollView ?? this.implicitScrollView;\n\t\tif (!this.scrollToEndIndicator || !scrollView.followEnd || scrollView.isFollowingEnd) return screen;\n\t\tconst box = getScrollViewBox(layout, scrollView);\n\t\tconst clip = box?.clip;\n\t\tif (!clip || clip.width <= 0 || clip.height <= 0) return screen;\n\t\tconst row = clip.y + clip.height - 1;\n\t\tif (row >= screen.length || isImageLine(screen[row] ?? \"\")) return screen;\n\t\tconst scrollbarColumn = box ? getScrollbarGeometry(box)?.column : undefined;\n\t\tconst availableWidth = Math.max(0, (scrollbarColumn ?? clip.x + clip.width) - clip.x);\n\t\tconst text = truncateToWidth(this.scrollToEndIndicator(), availableWidth, \"\");\n\t\tconst textWidth = visibleWidth(text);\n\t\tif (textWidth === 0) return screen;\n\t\tconst column = clip.x + Math.floor((availableWidth - textWidth) / 2);\n\t\tconst result = [...screen];\n\t\tresult[row] = compositeTuiLine(result[row] ?? \"\", text, column, textWidth, width);\n\t\tthis.scrollToEndIndicatorRect = { row, column, width: textWidth };\n\t\treturn result;\n\t}\n\n\tprivate compositeFlashes(screen: string[], width: number, height: number): string[] {\n\t\tconst flashLines = this.flashes.render(width).slice(-height);\n\t\tif (flashLines.length === 0) return screen;\n\t\tconst result = [...screen];\n\t\twhile (result.length < height) result.push(\"\");\n\t\tfor (let row = 0; row < flashLines.length; row++) {\n\t\t\tconst line = flashLines[row]!;\n\t\t\tconst flashWidth = visibleWidth(line);\n\t\t\tif (flashWidth === 0) continue;\n\t\t\tresult[row] = compositeTuiLine(result[row] ?? \"\", line, width - flashWidth, flashWidth, width);\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected override doRender(): void {\n\t\tif (this.stopped || !this.altScreenActive) return;\n\t\tconst width = Math.max(1, this.terminal.columns);\n\t\tconst height = Math.max(1, this.terminal.rows);\n\t\tconst root = this.layoutRoot ?? this.implicitScrollView;\n\t\tlet nextLayout = renderLayoutFrame(root, width, height, () => this.requestRender());\n\t\tif (this.refreshSearch(nextLayout)) {\n\t\t\tnextLayout = renderLayoutFrame(root, width, height, () => this.requestRender());\n\t\t}\n\t\tlet screen = nextLayout.lines.map((line) => line.replace(OSC133_ZONE_PREFIX, \"\"));\n\t\tscreen = this.applySearchHighlights(screen, nextLayout);\n\t\tscreen = this.compositeScrollToEndIndicator(screen, nextLayout, width);\n\t\tscreen = this.compositeOverlays(screen, width, height);\n\t\tif (screen.length > height) screen = screen.slice(screen.length - height);\n\t\tscreen = this.applySelection(screen, nextLayout);\n\t\tscreen = this.compositeFlashes(screen, width, height);\n\n\t\tconst cursorPos = this.extractCursorPosition(screen, height);\n\t\tscreen = this.applyLineResets(screen).map((line) => {\n\t\t\tif (isImageLine(line) || visibleWidth(line) <= width) return line;\n\t\t\treturn sliceByColumn(line, 0, width, true);\n\t\t});\n\n\t\tconst fullRedraw =\n\t\t\tthis.previousScreen.length === 0 || this.previousScreenWidth !== width || this.previousScreenHeight !== height;\n\t\tconst imagesNeedRedraw = screen.some(\n\t\t\t(line, row) =>\n\t\t\t\tline !== this.previousScreen[row] && (isImageLine(line) || isImageLine(this.previousScreen[row] ?? \"\")),\n\t\t);\n\t\tconst redrawImages = fullRedraw || imagesNeedRedraw;\n\t\tconst hadUploadedKittyImages = this.uploadedKittyImages.size > 0;\n\t\tconst preparedKittyScreen =\n\t\t\tredrawImages && this.imageProtocol === \"kitty\"\n\t\t\t\t? this.prepareKittyScreen(screen)\n\t\t\t\t: { lines: screen, evictedImageDeletion: \"\" };\n\n\t\tlet buffer = BEGIN_SYNCHRONIZED_OUTPUT;\n\t\tif (fullRedraw) {\n\t\t\tthis.fullRedrawCount += 1;\n\t\t\tconst clearImages =\n\t\t\t\tthis.imageProtocol === \"kitty\" && hadUploadedKittyImages\n\t\t\t\t\t? deleteAllKittyPlacements()\n\t\t\t\t\t: this.deleteAltScreenKittyImages();\n\t\t\tbuffer += `${clearImages}\\x1b[2J`;\n\t\t} else if (imagesNeedRedraw) {\n\t\t\tif (this.imageProtocol === \"iterm2\") buffer += \"\\x1b[2J\";\n\t\t\telse if (this.imageProtocol === \"kitty\") buffer += deleteAllKittyPlacements();\n\t\t}\n\t\tbuffer += preparedKittyScreen.evictedImageDeletion;\n\n\t\tfor (let row = 0; row < height; row++) {\n\t\t\tif (!fullRedraw && !imagesNeedRedraw && screen[row] === this.previousScreen[row]) continue;\n\t\t\tbuffer += `\\x1b[${row + 1};1H\\x1b[2K${preparedKittyScreen.lines[row] ?? \"\"}`;\n\t\t}\n\n\t\tif (cursorPos) {\n\t\t\tbuffer += `\\x1b[${cursorPos.row + 1};${Math.min(width, cursorPos.col) + 1}H`;\n\t\t\tbuffer += this.getShowHardwareCursor() ? \"\\x1b[?25h\" : \"\\x1b[?25l\";\n\t\t} else {\n\t\t\tbuffer += \"\\x1b[?25l\";\n\t\t}\n\t\tbuffer += END_SYNCHRONIZED_OUTPUT;\n\t\tthis.terminal.write(buffer);\n\n\t\tthis.previousScreen = screen;\n\t\tthis.previousScreenWidth = width;\n\t\tthis.previousScreenHeight = height;\n\t\tthis.currentLayout = nextLayout;\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"tui-alt-screen.js","sourceRoot":"","sources":["../src/tui-alt-screen.ts"],"names":[],"mappings":";AAAA,OAAO,EACN,wBAAwB,EAExB,0BAA0B,EAC1B,0BAA0B,GAC1B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EACN,oBAAoB,EACpB,gBAAgB,EAChB,gBAAgB,EAEhB,iBAAiB,GAEjB,MAAM,aAAa,CAAC;AAErB,OAAO,EACN,oBAAoB,EACpB,wBAAwB,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,oBAAoB,GAAG,MAAM,CAAC;QACnC,IAAI,CAAC,aAAa,GAAG,UAAU,CAAC;IACjC,CAAC;CACD","sourcesContent":["import {\n\tAltScreenSearchComponent,\n\ttype AltScreenSearchMatch,\n\tfindAltScreenSearchMatches,\n\tgetAltScreenSearchMatchKey,\n} from \"./alt-screen-search.ts\";\nimport { AltScreenFlashContainer } from \"./components/alt-screen-flash.ts\";\nimport { ScrollView } from \"./components/scroll-view.ts\";\nimport { getKeybindings } from \"./keybindings.ts\";\nimport { isKeyRelease } from \"./keys.ts\";\nimport {\n\tgetScrollbarGeometry,\n\tgetScrollViewBox,\n\tgetScrollViewsAt,\n\ttype LayoutFrame,\n\trenderLayoutFrame,\n\ttype ScrollbarGeometry,\n} from \"./layout.ts\";\nimport type { Terminal } from \"./terminal.ts\";\nimport {\n\tdeleteAllKittyImages,\n\tdeleteAllKittyPlacements,\n\tdeleteKittyImage,\n\tgetCapabilities,\n\tgetKittyImagePlacement,\n\ttype ImageProtocol,\n\tisImageLine,\n\tsetCapabilities,\n\ttype TerminalCapabilities,\n} from \"./terminal-image.ts\";\nimport {\n\ttype Component,\n\tCURSOR_MARKER,\n\tcompositeTuiLine,\n\ttype OverlayHandle,\n\tTuiBase,\n\ttype TuiStopOptions,\n\tVIEWPORT_TUI,\n\ttype ViewportTUI,\n} from \"./tui.ts\";\nimport {\n\textractAnsiCode,\n\tgetGraphemeCellRange,\n\tgetOsc8LinkAtColumn,\n\tgetWordSegmenter,\n\tsliceByColumn,\n\tstripTerminalSequences,\n\tvisibleWidth,\n} from \"./utils.ts\";\n\nconst ENTER_ALT_SCREEN = \"\\x1b[?1049h\";\nconst EXIT_ALT_SCREEN = \"\\x1b[?1049l\";\nconst DISABLE_AUTOWRAP = \"\\x1b[?7l\";\nconst ENABLE_AUTOWRAP = \"\\x1b[?7h\";\nconst ENABLE_BUTTON_MOTION_MOUSE = \"\\x1b[?1000h\\x1b[?1002h\\x1b[?1004h\\x1b[?1006h\";\nconst ENABLE_ALL_MOTION_MOUSE = \"\\x1b[?1000h\\x1b[?1002h\\x1b[?1003h\\x1b[?1004h\\x1b[?1006h\";\nconst DISABLE_MOUSE = \"\\x1b[?1006l\\x1b[?1004l\\x1b[?1003l\\x1b[?1002l\\x1b[?1000l\";\nconst FOCUS_IN = \"\\x1b[I\";\nconst FOCUS_OUT = \"\\x1b[O\";\nconst BEGIN_SYNCHRONIZED_OUTPUT = \"\\x1b[?2026h\";\nconst END_SYNCHRONIZED_OUTPUT = \"\\x1b[?2026l\";\nconst OSC133_ZONE_PREFIX = /^(?:\\x1b\\]133;[ABC](?:\\x07|\\x1b\\\\))+/;\nconst OSC133_PROMPT_START = /^\\x1b\\]133;A(?:\\x07|\\x1b\\\\)/;\nconst PAGE_SCROLL_OVERLAP = 4;\nconst MAX_CACHED_OFFSCREEN_KITTY_IMAGES = 16;\nconst MAX_CACHED_OFFSCREEN_KITTY_TRANSMISSION_BYTES = 32 * 1024 * 1024;\nconst MAX_CACHED_OFFSCREEN_KITTY_DECODED_BYTES = 64 * 1024 * 1024;\nconst DOUBLE_CLICK_INTERVAL_MS = 500;\n// Regular mode delegates double-click selection to the terminal emulator. Fullscreen owns mouse selection,\n// so mirror common terminal word-selection behavior by keeping paths and kebab-case tokens whole.\nconst TERMINAL_WORD_SELECTION_JOINERS = new Set([\"/\", \"-\"]);\nconst wordSegmenter = getWordSegmenter();\n\ninterface CachedKittyImage {\n\ttransmissionGeneration: number;\n\ttransmissionBytes: number;\n\testimatedDecodedBytes: number;\n}\n\ninterface SelectionPoint {\n\trow: number;\n\tcol: number;\n\tscrollView?: ScrollView;\n\t/** Whether this point lies between terminal cells rather than on a cell. */\n\tboundary?: boolean;\n}\n\ninterface SelectionRange {\n\tstart: SelectionPoint;\n\tend: SelectionPoint;\n}\n\ntype SelectionGranularity = \"character\" | \"word\" | \"line\";\n\ninterface ClickTarget {\n\ttimestamp: number;\n\tcount: number;\n\trow: number;\n\tscrollView?: ScrollView;\n\twordStart: number;\n\twordEnd: number;\n}\n\ninterface SgrMouseEvent {\n\tbutton: number;\n\tx: number;\n\ty: number;\n\trelease: boolean;\n}\n\ninterface WheelEvent {\n\tdirection: -1 | 1;\n\tx: number;\n\ty: number;\n}\n\ninterface ScrollbarDrag {\n\tscrollView: ScrollView;\n\tgrabOffset: number;\n}\n\ninterface ScrollbarTarget {\n\tscrollView: ScrollView;\n\tgeometry: ScrollbarGeometry;\n}\n\ntype SearchSelectionMode = \"query\" | \"retain\" | \"next\" | \"previous\";\n\ninterface ActiveSearch {\n\tcomponent: AltScreenSearchComponent;\n\toverlay?: OverlayHandle;\n\tquery: string;\n\tmatches: AltScreenSearchMatch[];\n\tselectedIndex: number;\n\tselectedKey?: string;\n\tanchorRow: number;\n\tselectionMode: SearchSelectionMode;\n}\n\ninterface SearchHighlightRange {\n\tstartCol: number;\n\tendCol: number;\n\tcurrent: boolean;\n}\n\nexport interface TuiAltScreenOptions {\n\t/** Number of logical lines moved for each mouse-wheel event. */\n\twheelScrollLines?: number;\n\t/** Capture mouse events for viewport scrolling and application-owned text selection. */\n\tmouse?: boolean;\n\t/** Style a non-current transcript search match. */\n\tsearchMatchStyle?: (text: string) => string;\n\t/** Style the current transcript search match. */\n\tsearchCurrentMatchStyle?: (text: string) => string;\n\t/** Open an OSC 8 hyperlink activated with a primary-button click. */\n\topenUrl?: (url: string) => void;\n\t/** Handle an unmodified secondary-button press for clipboard paste. Currently enabled on Windows only. */\n\tonRightClickPaste?: () => void;\n\t/** Automatically copy selected text to the clipboard on mouse release (default: true). */\n\tcopyOnSelect?: boolean;\n\t/**\n\t * Copy selected text to the system clipboard. Return `true` on success; the caller flashes\n\t * an error otherwise. When omitted, the selection is copied via an OSC 52 write.\n\t */\n\tcopySelection?: (text: string) => Promise<boolean>;\n}\n\n/** Alternate-screen TUI with a scrollable, application-owned viewport. */\nexport class TuiAltScreen extends TuiBase implements ViewportTUI {\n\treadonly mode = \"fullscreen\" as const;\n\treadonly [VIEWPORT_TUI] = true as const;\n\tprivate previousScreen: string[] = [];\n\tprivate lastDocument: string[] = [];\n\tprivate previousScreenWidth = 0;\n\tprivate previousScreenHeight = 0;\n\tprivate layoutRoot: Component | undefined;\n\tprivate currentLayout: LayoutFrame | undefined;\n\tprivate readonly implicitDocument: Component;\n\tprivate readonly implicitScrollView: ScrollView;\n\tprivate readonly flashes: AltScreenFlashContainer;\n\tprivate altScreenActive = false;\n\tprivate imageProtocol: ImageProtocol = null;\n\tprivate savedCapabilities?: TerminalCapabilities;\n\tprivate readonly uploadedKittyImages = new Map<number, CachedKittyImage>();\n\tprivate selectionAnchor?: SelectionPoint;\n\tprivate selectionFocus?: SelectionPoint;\n\tprivate selectionGranularity: SelectionGranularity = \"character\";\n\tprivate selectionInitialRange?: SelectionRange;\n\tprivate lastClick?: ClickTarget;\n\tprivate selectionDragPointer?: { x: number; y: number };\n\tprivate selectionAutoScrollDirection: -1 | 0 | 1 = 0;\n\tprivate selectionAutoScrollTimer?: NodeJS.Timeout;\n\tprivate selectionPressActive = false;\n\tprivate scrollbarDrag?: ScrollbarDrag;\n\tprivate scrollbarHover?: ScrollView;\n\tprivate activeSearch?: ActiveSearch;\n\tprivate pressedUrl?: string;\n\tprivate selectionDragged = false;\n\tprivate readonly wheelScrollLines: number;\n\tprivate readonly mouseEnabled: boolean;\n\tprivate readonly searchMatchStyle: (text: string) => string;\n\tprivate readonly searchCurrentMatchStyle: (text: string) => string;\n\tprivate readonly openUrl?: (url: string) => void;\n\tprivate readonly onRightClickPaste?: () => void;\n\tprivate copyOnSelect: boolean;\n\tprivate readonly copySelection?: (text: string) => Promise<boolean>;\n\n\tconstructor(\n\t\tterminal: Terminal,\n\t\tshowHardwareCursor?: boolean,\n\t\tlogDirectory?: string,\n\t\toptions: TuiAltScreenOptions = {},\n\t) {\n\t\tsuper(terminal, showHardwareCursor, logDirectory);\n\t\tthis.implicitDocument = {\n\t\t\trender: (width) => super.render(width),\n\t\t\tinvalidate: () => {\n\t\t\t\tfor (const child of this.children) child.invalidate();\n\t\t\t},\n\t\t};\n\t\tthis.implicitScrollView = new ScrollView(this.implicitDocument, { follow: \"end\", primary: true });\n\t\tthis.flashes = new AltScreenFlashContainer(() => this.requestRender());\n\t\tthis.wheelScrollLines = Math.max(1, Math.floor(options.wheelScrollLines ?? 1));\n\t\tthis.mouseEnabled = options.mouse ?? true;\n\t\tthis.searchMatchStyle = options.searchMatchStyle ?? ((text) => `\\x1b[4m${text}\\x1b[24m`);\n\t\tthis.searchCurrentMatchStyle = options.searchCurrentMatchStyle ?? ((text) => `\\x1b[1;7m${text}\\x1b[22;27m`);\n\t\tthis.openUrl = options.openUrl;\n\t\tthis.onRightClickPaste = options.onRightClickPaste;\n\t\tthis.copyOnSelect = options.copyOnSelect ?? true;\n\t\tthis.copySelection = options.copySelection;\n\t\tthis.addInputListener((data) => this.handleViewportInput(data));\n\t}\n\n\tget viewportTop(): number {\n\t\treturn this.getPrimaryScrollView().scrollTop;\n\t}\n\n\tget isFollowingOutput(): boolean {\n\t\treturn this.getPrimaryScrollView().isFollowingEnd;\n\t}\n\n\tgetCopyOnSelect(): boolean {\n\t\treturn this.copyOnSelect;\n\t}\n\n\tsetCopyOnSelect(enabled: boolean): void {\n\t\tthis.copyOnSelect = enabled;\n\t}\n\n\t/** Whether the fullscreen viewport has a non-empty active text selection. */\n\thasActiveSelection(): boolean {\n\t\treturn this.getActiveSelectionText() !== undefined;\n\t}\n\n\t/** Copy the active fullscreen text selection, if any, using the configured selection clipboard path. */\n\tasync copyActiveSelectionToClipboard(): Promise<boolean> {\n\t\tconst text = this.getActiveSelectionText();\n\t\tif (!text) return false;\n\t\treturn this.copyTextToClipboard(text);\n\t}\n\n\tsetLayoutRoot(component: Component | undefined): void {\n\t\tif (this.layoutRoot === component) return;\n\t\tthis.layoutRoot = component;\n\t\tthis.currentLayout = undefined;\n\t\tthis.requestRender();\n\t}\n\n\toverride render(width: number): string[] {\n\t\treturn this.layoutRoot?.render(width) ?? super.render(width);\n\t}\n\n\tprotected override getMountedRoots(): readonly Component[] {\n\t\treturn this.layoutRoot ? [this.layoutRoot] : this.children;\n\t}\n\n\tprivate getPrimaryScrollView(): ScrollView {\n\t\treturn this.currentLayout?.primaryScrollView ?? this.implicitScrollView;\n\t}\n\n\tprotected override beforeTerminalStart(): void {\n\t\tthis.stopSelectionAutoScroll();\n\t\tthis.selectionPressActive = false;\n\t\tthis.stopScrollbarHover();\n\t\tthis.stopScrollbarDrag();\n\t\tthis.flashes.dispose();\n\t\tthis.altScreenActive = true;\n\t\tconst capabilities = getCapabilities();\n\t\tthis.imageProtocol = capabilities.images;\n\t\tthis.uploadedKittyImages.clear();\n\t\tif (capabilities.images === \"iterm2\") {\n\t\t\tthis.savedCapabilities = capabilities;\n\t\t\tsetCapabilities({ ...capabilities, images: null });\n\t\t\tthis.invalidate();\n\t\t}\n\t\tthis.lastDocument = [];\n\t\tthis.selectionAnchor = undefined;\n\t\tthis.selectionFocus = undefined;\n\t\tthis.selectionGranularity = \"character\";\n\t\tthis.selectionInitialRange = undefined;\n\t\tthis.lastClick = undefined;\n\t\tthis.pressedUrl = undefined;\n\t\tthis.selectionDragged = false;\n\t\tthis.resetRenderState();\n\t\tconst term = process.env.TERM?.toLowerCase() ?? \"\";\n\t\t// Multiplexers can lag when every pointer movement is forwarded. Button-motion\n\t\t// tracking preserves clicks, wheel events, selections, and scrollbar dragging.\n\t\tconst mouseSequence =\n\t\t\tprocess.env.TMUX !== undefined ||\n\t\t\tprocess.env.ZELLIJ !== undefined ||\n\t\t\tprocess.env.STY !== undefined ||\n\t\t\tterm.startsWith(\"tmux\") ||\n\t\t\tterm.startsWith(\"screen\")\n\t\t\t\t? ENABLE_BUTTON_MOTION_MOUSE\n\t\t\t\t: ENABLE_ALL_MOTION_MOUSE;\n\t\tthis.terminal.write(\n\t\t\t`${ENTER_ALT_SCREEN}${DISABLE_AUTOWRAP}${this.mouseEnabled ? mouseSequence : \"\"}\\x1b[2J\\x1b[H\\x1b[?25l`,\n\t\t);\n\t}\n\n\tprotected override beforeTerminalStop(_options: TuiStopOptions): void {\n\t\tthis.closeSearch();\n\t\tthis.stopSelectionAutoScroll();\n\t\tthis.selectionPressActive = false;\n\t\tthis.stopScrollbarHover();\n\t\tthis.stopScrollbarDrag();\n\t\tthis.flashes.dispose();\n\t\tif (!this.altScreenActive) return;\n\t\tthis.terminal.write(\n\t\t\t`${BEGIN_SYNCHRONIZED_OUTPUT}${this.deleteAltScreenKittyImages()}${this.mouseEnabled ? DISABLE_MOUSE : \"\"}${ENABLE_AUTOWRAP}${END_SYNCHRONIZED_OUTPUT}`,\n\t\t);\n\t\tthis.uploadedKittyImages.clear();\n\t}\n\n\tprotected override afterTerminalStop(options: TuiStopOptions): void {\n\t\tif (!this.altScreenActive) return;\n\t\tthis.altScreenActive = false;\n\t\tif (options.preserveScreen) {\n\t\t\tthis.terminal.write(`${BEGIN_SYNCHRONIZED_OUTPUT}${EXIT_ALT_SCREEN}\\x1b[?25h${END_SYNCHRONIZED_OUTPUT}`);\n\t\t} else {\n\t\t\tconst width = Math.max(1, this.terminal.columns);\n\t\t\tconst documentLines = this.render(width).map((line) => line.replace(OSC133_ZONE_PREFIX, \"\"));\n\t\t\tthis.lastDocument = this.applyLineResets(documentLines.map((line) => line.replaceAll(CURSOR_MARKER, \"\"))).map(\n\t\t\t\t(line) => (isImageLine(line) || visibleWidth(line) <= width ? line : sliceByColumn(line, 0, width, true)),\n\t\t\t);\n\t\t\tlet buffer = `${BEGIN_SYNCHRONIZED_OUTPUT}${EXIT_ALT_SCREEN}${DISABLE_AUTOWRAP}`;\n\t\t\tfor (let row = 0; row < this.lastDocument.length; row++) {\n\t\t\t\tif (row > 0) buffer += \"\\r\\n\";\n\t\t\t\tbuffer += `\\r\\x1b[2K${this.lastDocument[row] ?? \"\"}`;\n\t\t\t}\n\t\t\tbuffer += `\\x1b[0m${ENABLE_AUTOWRAP}\\r\\n\\x1b[?25h${END_SYNCHRONIZED_OUTPUT}`;\n\t\t\tthis.terminal.write(buffer);\n\t\t}\n\t\tif (this.savedCapabilities) {\n\t\t\tsetCapabilities(this.savedCapabilities);\n\t\t\tthis.savedCapabilities = undefined;\n\t\t}\n\t}\n\n\tprivate deleteAltScreenKittyImages(): string {\n\t\treturn this.imageProtocol === \"kitty\" ? deleteAllKittyImages() : \"\";\n\t}\n\n\tprivate prepareKittyScreen(screen: string[]): { lines: string[]; evictedImageDeletion: string } {\n\t\tconst visibleImageIds = new Set<number>();\n\t\tconst lines = screen.map((line) => {\n\t\t\tconst placement = getKittyImagePlacement(line);\n\t\t\tif (!placement) return line;\n\t\t\tvisibleImageIds.add(placement.imageId);\n\n\t\t\tconst cachedImage = this.uploadedKittyImages.get(placement.imageId);\n\t\t\tconst nextCachedImage = {\n\t\t\t\ttransmissionGeneration: placement.transmissionGeneration,\n\t\t\t\ttransmissionBytes: placement.transmissionBytes,\n\t\t\t\testimatedDecodedBytes: placement.estimatedDecodedBytes,\n\t\t\t};\n\t\t\tif (cachedImage) this.uploadedKittyImages.delete(placement.imageId);\n\t\t\tthis.uploadedKittyImages.set(placement.imageId, nextCachedImage);\n\n\t\t\treturn cachedImage?.transmissionGeneration === placement.transmissionGeneration\n\t\t\t\t? placement.replacementLine\n\t\t\t\t: line;\n\t\t});\n\n\t\tlet cachedOffscreenImageCount = 0;\n\t\tlet cachedOffscreenTransmissionBytes = 0;\n\t\tlet cachedOffscreenDecodedBytes = 0;\n\t\tfor (const [imageId, cachedImage] of this.uploadedKittyImages) {\n\t\t\tif (visibleImageIds.has(imageId)) continue;\n\t\t\tcachedOffscreenImageCount += 1;\n\t\t\tcachedOffscreenTransmissionBytes += cachedImage.transmissionBytes;\n\t\t\tcachedOffscreenDecodedBytes += cachedImage.estimatedDecodedBytes;\n\t\t}\n\n\t\tlet evictedImageDeletion = \"\";\n\t\tfor (const [imageId, cachedImage] of this.uploadedKittyImages) {\n\t\t\tif (\n\t\t\t\tcachedOffscreenImageCount <= MAX_CACHED_OFFSCREEN_KITTY_IMAGES &&\n\t\t\t\tcachedOffscreenTransmissionBytes <= MAX_CACHED_OFFSCREEN_KITTY_TRANSMISSION_BYTES &&\n\t\t\t\tcachedOffscreenDecodedBytes <= MAX_CACHED_OFFSCREEN_KITTY_DECODED_BYTES\n\t\t\t) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (visibleImageIds.has(imageId)) continue;\n\t\t\tevictedImageDeletion += deleteKittyImage(imageId);\n\t\t\tthis.uploadedKittyImages.delete(imageId);\n\t\t\tcachedOffscreenImageCount -= 1;\n\t\t\tcachedOffscreenTransmissionBytes -= cachedImage.transmissionBytes;\n\t\t\tcachedOffscreenDecodedBytes -= cachedImage.estimatedDecodedBytes;\n\t\t}\n\t\treturn { lines, evictedImageDeletion };\n\t}\n\n\tprotected override resetRenderState(): void {\n\t\tthis.previousScreen = [];\n\t\tthis.previousScreenWidth = 0;\n\t\tthis.previousScreenHeight = 0;\n\t\tthis.currentLayout = undefined;\n\t}\n\n\tscrollBy(lines: number): void {\n\t\tthis.getPrimaryScrollView().scrollBy(lines);\n\t\tthis.requestRender();\n\t}\n\n\tscrollToTop(): void {\n\t\tthis.getPrimaryScrollView().scrollToStart();\n\t\tthis.requestRender();\n\t}\n\n\tscrollToBottom(): void {\n\t\tthis.getPrimaryScrollView().scrollToEnd();\n\t\tthis.requestRender();\n\t}\n\n\tprivate scrollToPrompt(direction: -1 | 1): void {\n\t\tif (!this.currentLayout) return;\n\t\tconst scrollView = this.getPrimaryScrollView();\n\t\tconst lines = getScrollViewBox(this.currentLayout, scrollView)?.scrollContentLines;\n\t\tif (!lines) return;\n\n\t\tfor (let row = scrollView.scrollTop + direction; row >= 0 && row < lines.length; row += direction) {\n\t\t\tif (!OSC133_PROMPT_START.test(lines[row] ?? \"\")) continue;\n\t\t\tscrollView.scrollTo(row);\n\t\t\tthis.requestRender();\n\t\t\treturn;\n\t\t}\n\t}\n\n\tprivate openSearch(): void {\n\t\tif (this.activeSearch) {\n\t\t\tthis.activeSearch.overlay?.focus();\n\t\t\treturn;\n\t\t}\n\t\tconst component = new AltScreenSearchComponent((query) => this.updateSearchQuery(query));\n\t\tconst search: ActiveSearch = {\n\t\t\tcomponent,\n\t\t\tquery: \"\",\n\t\t\tmatches: [],\n\t\t\tselectedIndex: -1,\n\t\t\tanchorRow: this.getPrimaryScrollView().scrollTop,\n\t\t\tselectionMode: \"query\",\n\t\t};\n\t\tthis.activeSearch = search;\n\t\tsearch.overlay = this.showOverlay(component, {\n\t\t\tanchor: \"top-right\",\n\t\t\twidth: \"40%\",\n\t\t\tminWidth: 24,\n\t\t\tmargin: 1,\n\t\t});\n\t}\n\n\tprivate closeSearch(): void {\n\t\tconst search = this.activeSearch;\n\t\tif (!search) return;\n\t\tthis.activeSearch = undefined;\n\t\tsearch.overlay?.hide();\n\t\tthis.requestRender();\n\t}\n\n\tprivate updateSearchQuery(query: string): void {\n\t\tconst search = this.activeSearch;\n\t\tif (!search || query === search.query) return;\n\t\tconst selected = search.matches[search.selectedIndex];\n\t\tsearch.anchorRow = selected?.segments[0]?.row ?? this.getPrimaryScrollView().scrollTop;\n\t\tsearch.query = query;\n\t\tsearch.selectionMode = \"query\";\n\t\tsearch.component.setResult(-1, 0);\n\t\tthis.requestRender();\n\t}\n\n\tprivate navigateSearch(direction: -1 | 1): void {\n\t\tconst search = this.activeSearch;\n\t\tif (!search?.query) return;\n\t\tsearch.selectionMode = direction < 0 ? \"previous\" : \"next\";\n\t\tthis.requestRender();\n\t}\n\n\tprivate refreshSearch(layout: LayoutFrame): boolean {\n\t\tconst search = this.activeSearch;\n\t\tif (!search) return false;\n\t\tconst scrollView = layout.primaryScrollView ?? this.implicitScrollView;\n\t\tconst box = getScrollViewBox(layout, scrollView);\n\t\tconst lines = box?.scrollContentLines;\n\t\tif (!lines || !search.query.trim()) {\n\t\t\tsearch.matches = [];\n\t\t\tsearch.selectedIndex = -1;\n\t\t\tsearch.selectedKey = undefined;\n\t\t\tsearch.selectionMode = \"retain\";\n\t\t\tsearch.component.setResult(-1, 0);\n\t\t\treturn false;\n\t\t}\n\n\t\tconst shouldRevealSelection = search.selectionMode !== \"retain\";\n\t\tconst matches = findAltScreenSearchMatches(lines, search.query);\n\t\tconst exactIndex = search.selectedKey\n\t\t\t? matches.findIndex((match) => getAltScreenSearchMatchKey(match) === search.selectedKey)\n\t\t\t: -1;\n\t\tlet selectedIndex = -1;\n\t\tif (matches.length > 0) {\n\t\t\tif (search.selectionMode === \"query\") {\n\t\t\t\tselectedIndex = matches.findIndex((match) => (match.segments[0]?.row ?? 0) >= search.anchorRow);\n\t\t\t\tif (selectedIndex < 0) selectedIndex = 0;\n\t\t\t} else if (search.selectionMode === \"next\") {\n\t\t\t\tconst baseIndex = exactIndex >= 0 ? exactIndex : Math.min(search.selectedIndex, matches.length - 1);\n\t\t\t\tselectedIndex = baseIndex < 0 ? 0 : (baseIndex + 1) % matches.length;\n\t\t\t} else if (search.selectionMode === \"previous\") {\n\t\t\t\tconst baseIndex = exactIndex >= 0 ? exactIndex : Math.min(search.selectedIndex, matches.length - 1);\n\t\t\t\tselectedIndex = baseIndex < 0 ? matches.length - 1 : (baseIndex - 1 + matches.length) % matches.length;\n\t\t\t} else {\n\t\t\t\tselectedIndex =\n\t\t\t\t\texactIndex >= 0 ? exactIndex : Math.min(Math.max(0, search.selectedIndex), matches.length - 1);\n\t\t\t}\n\t\t}\n\n\t\tsearch.matches = matches;\n\t\tsearch.selectedIndex = selectedIndex;\n\t\tsearch.selectedKey = selectedIndex >= 0 ? getAltScreenSearchMatchKey(matches[selectedIndex]!) : undefined;\n\t\tsearch.selectionMode = \"retain\";\n\t\tsearch.component.setResult(selectedIndex, matches.length);\n\t\tif (!shouldRevealSelection) return false;\n\n\t\tconst selected = matches[selectedIndex];\n\t\tconst firstSegment = selected?.segments[0];\n\t\tconst lastSegment = selected?.segments[selected.segments.length - 1];\n\t\tif (!box || !firstSegment || !lastSegment || scrollView.viewportHeight <= 0) return false;\n\t\tconst before = scrollView.scrollTop;\n\t\tconst visibleBottom = before + scrollView.viewportHeight - 1;\n\t\tlet target = before;\n\t\tif (firstSegment.row < before || lastSegment.row > visibleBottom) {\n\t\t\ttarget = firstSegment.row - Math.floor(scrollView.viewportHeight / 3);\n\t\t}\n\t\tscrollView.scrollTo(target, { disableFollow: true });\n\t\treturn scrollView.scrollTop !== before;\n\t}\n\n\t/** Show a transient message in the alternate-screen flash stack. */\n\tflash(message: string, durationMs?: number): void {\n\t\tthis.flashes.flash(message, durationMs);\n\t}\n\n\tprivate shouldDeferViewportInputToOverlay(): boolean {\n\t\treturn this.isOverlayFocused() && this.activeSearch?.overlay?.isFocused() !== true;\n\t}\n\n\tprivate handleViewportInput(data: string): { consume?: boolean } | undefined {\n\t\tif (data === FOCUS_OUT) {\n\t\t\tconst hadActiveSelection = this.selectionPressActive;\n\t\t\tconst hadNonEmptyActiveSelection = hadActiveSelection && this.getSelectionBounds() !== undefined;\n\t\t\tthis.selectionPressActive = false;\n\t\t\tthis.stopSelectionAutoScroll();\n\t\t\tthis.stopScrollbarHover();\n\t\t\tthis.stopScrollbarDrag();\n\t\t\tthis.pressedUrl = undefined;\n\t\t\tthis.selectionDragged = false;\n\t\t\tif (hadActiveSelection) {\n\t\t\t\tthis.selectionAnchor = undefined;\n\t\t\t\tthis.selectionFocus = undefined;\n\t\t\t\tthis.selectionGranularity = \"character\";\n\t\t\t\tthis.selectionInitialRange = undefined;\n\t\t\t\tif (hadNonEmptyActiveSelection) this.requestRender();\n\t\t\t}\n\t\t\tthis.lastClick = undefined;\n\t\t\treturn { consume: true };\n\t\t}\n\t\tif (data === FOCUS_IN) return { consume: true };\n\n\t\tconst wheelEvent = this.parseWheelEvent(data);\n\t\tif (wheelEvent) {\n\t\t\tif (this.shouldDeferViewportInputToOverlay()) return undefined;\n\t\t\tthis.routeWheel(wheelEvent);\n\t\t\treturn { consume: true };\n\t\t}\n\t\tconst mouseEvent = this.parseSgrMouseEvent(data);\n\t\tif (mouseEvent) {\n\t\t\tif (this.handleRightClickPaste(mouseEvent)) return { consume: true };\n\t\t\tconst handled = this.handleScrollbarMouseEvent(mouseEvent);\n\t\t\tif (!this.scrollbarDrag) this.updateScrollbarHover(mouseEvent.x, mouseEvent.y);\n\t\t\tif (!handled) this.handleSelectionMouseEvent(mouseEvent);\n\t\t\treturn { consume: true };\n\t\t}\n\t\tif (this.isMouseSequence(data)) return { consume: true };\n\n\t\tconst keybindings = getKeybindings();\n\t\tconst isRelease = isKeyRelease(data);\n\t\tif (keybindings.matches(data, \"tui.altScreen.search\")) {\n\t\t\tif (!isRelease) this.openSearch();\n\t\t\treturn { consume: true };\n\t\t}\n\t\tif (this.activeSearch?.overlay?.isFocused()) {\n\t\t\tif (keybindings.matches(data, \"tui.altScreen.searchNext\")) {\n\t\t\t\tif (!isRelease) this.navigateSearch(1);\n\t\t\t\treturn { consume: true };\n\t\t\t}\n\t\t\tif (keybindings.matches(data, \"tui.altScreen.searchPrevious\")) {\n\t\t\t\tif (!isRelease) this.navigateSearch(-1);\n\t\t\t\treturn { consume: true };\n\t\t\t}\n\t\t\tif (keybindings.matches(data, \"tui.altScreen.searchClose\")) {\n\t\t\t\tif (!isRelease) this.closeSearch();\n\t\t\t\treturn { consume: true };\n\t\t\t}\n\t\t}\n\t\tif (this.shouldDeferViewportInputToOverlay()) return undefined;\n\t\tif (keybindings.matches(data, \"tui.altScreen.pageUp\")) {\n\t\t\tif (!isRelease) {\n\t\t\t\tthis.scrollBy(-Math.max(1, this.getPrimaryScrollView().viewportHeight - PAGE_SCROLL_OVERLAP));\n\t\t\t}\n\t\t\treturn { consume: true };\n\t\t}\n\t\tif (keybindings.matches(data, \"tui.altScreen.pageDown\")) {\n\t\t\tif (!isRelease) {\n\t\t\t\tthis.scrollBy(Math.max(1, this.getPrimaryScrollView().viewportHeight - PAGE_SCROLL_OVERLAP));\n\t\t\t}\n\t\t\treturn { consume: true };\n\t\t}\n\t\tif (keybindings.matches(data, \"tui.altScreen.halfPageUp\")) {\n\t\t\tif (!isRelease) this.scrollBy(-Math.max(1, Math.floor(this.getPrimaryScrollView().viewportHeight / 2)));\n\t\t\treturn { consume: true };\n\t\t}\n\t\tif (keybindings.matches(data, \"tui.altScreen.halfPageDown\")) {\n\t\t\tif (!isRelease) this.scrollBy(Math.max(1, Math.floor(this.getPrimaryScrollView().viewportHeight / 2)));\n\t\t\treturn { consume: true };\n\t\t}\n\t\tif (keybindings.matches(data, \"tui.altScreen.lineUp\")) {\n\t\t\tif (!isRelease) this.scrollBy(-1);\n\t\t\treturn { consume: true };\n\t\t}\n\t\tif (keybindings.matches(data, \"tui.altScreen.lineDown\")) {\n\t\t\tif (!isRelease) this.scrollBy(1);\n\t\t\treturn { consume: true };\n\t\t}\n\t\tif (keybindings.matches(data, \"tui.altScreen.previousPrompt\")) {\n\t\t\tif (!isRelease) this.scrollToPrompt(-1);\n\t\t\treturn { consume: true };\n\t\t}\n\t\tif (keybindings.matches(data, \"tui.altScreen.nextPrompt\")) {\n\t\t\tif (!isRelease) this.scrollToPrompt(1);\n\t\t\treturn { consume: true };\n\t\t}\n\t\tif (keybindings.matches(data, \"tui.altScreen.top\")) {\n\t\t\tif (!isRelease) this.scrollToTop();\n\t\t\treturn { consume: true };\n\t\t}\n\t\tif (keybindings.matches(data, \"tui.altScreen.bottom\")) {\n\t\t\tif (!isRelease) this.scrollToBottom();\n\t\t\treturn { consume: true };\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tprivate parseWheelEvent(data: string): WheelEvent | undefined {\n\t\tconst sgr = /^\\x1b\\[<(\\d+);(\\d+);(\\d+)[Mm]$/.exec(data);\n\t\tif (sgr) {\n\t\t\tconst button = Number.parseInt(sgr[1], 10);\n\t\t\tif ((button & 64) === 0) return undefined;\n\t\t\tconst direction = button & 3;\n\t\t\tif (direction !== 0 && direction !== 1) return undefined;\n\t\t\treturn {\n\t\t\t\tdirection: direction === 0 ? -1 : 1,\n\t\t\t\tx: Number.parseInt(sgr[2], 10) - 1,\n\t\t\t\ty: Number.parseInt(sgr[3], 10) - 1,\n\t\t\t};\n\t\t}\n\t\tif (data.length === 6 && data.startsWith(\"\\x1b[M\")) {\n\t\t\tconst button = data.charCodeAt(3) - 32;\n\t\t\tif ((button & 64) === 0) return undefined;\n\t\t\tconst direction = button & 3;\n\t\t\tif (direction !== 0 && direction !== 1) return undefined;\n\t\t\treturn {\n\t\t\t\tdirection: direction === 0 ? -1 : 1,\n\t\t\t\tx: data.charCodeAt(4) - 33,\n\t\t\t\ty: data.charCodeAt(5) - 33,\n\t\t\t};\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tprivate routeWheel(event: WheelEvent): void {\n\t\tlet remaining = event.direction * this.wheelScrollLines;\n\t\tconst seen = new Set<ScrollView>();\n\t\tfor (const scrollView of this.currentLayout ? getScrollViewsAt(this.currentLayout, event.x, event.y) : []) {\n\t\t\tseen.add(scrollView);\n\t\t\tremaining = scrollView.scrollBy(remaining);\n\t\t\tif (remaining === 0 || scrollView.overscroll === \"contain\") break;\n\t\t}\n\t\tconst primary = this.getPrimaryScrollView();\n\t\tif (remaining !== 0 && !seen.has(primary)) primary.scrollBy(remaining);\n\t\tthis.updateScrollbarHover(event.x, event.y);\n\t\tthis.requestRender();\n\t}\n\n\tprivate parseSgrMouseEvent(data: string): SgrMouseEvent | undefined {\n\t\tconst match = /^\\x1b\\[<(\\d+);(\\d+);(\\d+)([Mm])$/.exec(data);\n\t\tif (!match) return undefined;\n\t\treturn {\n\t\t\tbutton: Number.parseInt(match[1], 10),\n\t\t\tx: Number.parseInt(match[2], 10) - 1,\n\t\t\ty: Number.parseInt(match[3], 10) - 1,\n\t\t\trelease: match[4] === \"m\",\n\t\t};\n\t}\n\n\tprivate handleRightClickPaste(event: SgrMouseEvent): boolean {\n\t\tif (\n\t\t\t!this.onRightClickPaste ||\n\t\t\tprocess.platform !== \"win32\" ||\n\t\t\tprocess.env.TERM_PROGRAM?.toLowerCase() === \"vscode\" ||\n\t\t\tevent.release ||\n\t\t\tevent.button !== 2\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\t\ttry {\n\t\t\tthis.onRightClickPaste();\n\t\t} catch {\n\t\t\t// Clipboard paste is best-effort.\n\t\t}\n\t\treturn true;\n\t}\n\n\tprivate getScrollbarTargetAt(x: number, y: number): ScrollbarTarget | undefined {\n\t\tif (this.hasOverlay() || !this.currentLayout) return undefined;\n\t\tfor (const scrollView of getScrollViewsAt(this.currentLayout, x, y)) {\n\t\t\tconst box = getScrollViewBox(this.currentLayout, scrollView);\n\t\t\tconst geometry = box ? getScrollbarGeometry(box) : undefined;\n\t\t\tif (\n\t\t\t\tgeometry &&\n\t\t\t\tx === geometry.column &&\n\t\t\t\ty >= geometry.thumbTop &&\n\t\t\t\ty < geometry.thumbTop + geometry.thumbHeight\n\t\t\t) {\n\t\t\t\treturn { scrollView, geometry };\n\t\t\t}\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tprivate setScrollbarHover(scrollView: ScrollView | undefined): void {\n\t\tif (scrollView === this.scrollbarHover) return;\n\t\tthis.scrollbarHover?.setScrollbarActive(false);\n\t\tthis.scrollbarHover = scrollView;\n\t\tthis.scrollbarHover?.setScrollbarActive(true);\n\t}\n\n\tprivate updateScrollbarHover(x: number, y: number): void {\n\t\tthis.setScrollbarHover(this.getScrollbarTargetAt(x, y)?.scrollView);\n\t}\n\n\tprivate stopScrollbarHover(): void {\n\t\tthis.setScrollbarHover(undefined);\n\t}\n\n\tprivate handleScrollbarMouseEvent(event: SgrMouseEvent): boolean {\n\t\tif (this.scrollbarDrag) {\n\t\t\tif (event.release) {\n\t\t\t\tthis.stopScrollbarDrag();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tconst box = this.currentLayout\n\t\t\t\t? getScrollViewBox(this.currentLayout, this.scrollbarDrag.scrollView)\n\t\t\t\t: undefined;\n\t\t\tconst geometry = box ? getScrollbarGeometry(box) : undefined;\n\t\t\tif (geometry) {\n\t\t\t\tconst maxThumbOffset = geometry.trackHeight - geometry.thumbHeight;\n\t\t\t\tconst thumbOffset = Math.max(\n\t\t\t\t\t0,\n\t\t\t\t\tMath.min(maxThumbOffset, event.y - geometry.trackTop - this.scrollbarDrag.grabOffset),\n\t\t\t\t);\n\t\t\t\tconst scrollTop =\n\t\t\t\t\tmaxThumbOffset === 0 ? 0 : Math.round((thumbOffset / maxThumbOffset) * geometry.maxScrollTop);\n\t\t\t\tthis.scrollbarDrag.scrollView.scrollTo(scrollTop);\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\n\t\tif (event.release || (event.button & 32) !== 0 || (event.button & 3) !== 0) return false;\n\t\tconst target = this.getScrollbarTargetAt(event.x, event.y);\n\t\tif (!target) return false;\n\t\tthis.stopSelectionAutoScroll();\n\t\tthis.selectionPressActive = false;\n\t\tthis.selectionAnchor = undefined;\n\t\tthis.selectionFocus = undefined;\n\t\tthis.selectionGranularity = \"character\";\n\t\tthis.selectionInitialRange = undefined;\n\t\tthis.lastClick = undefined;\n\t\tthis.pressedUrl = undefined;\n\t\tthis.selectionDragged = false;\n\t\tthis.setScrollbarHover(target.scrollView);\n\t\tthis.scrollbarDrag = {\n\t\t\tscrollView: target.scrollView,\n\t\t\tgrabOffset: event.y - target.geometry.thumbTop,\n\t\t};\n\t\treturn true;\n\t}\n\n\tprivate stopScrollbarDrag(): void {\n\t\tthis.scrollbarDrag = undefined;\n\t}\n\n\tprivate getScrollSelectionPoint(scrollView: ScrollView, x: number, y: number): SelectionPoint | undefined {\n\t\tif (!this.currentLayout) return undefined;\n\t\tconst box = getScrollViewBox(this.currentLayout, scrollView);\n\t\tif (!box || box.rect.height <= 0 || box.clip.height <= 0) return undefined;\n\t\tconst visibleTop = Math.max(0, box.rect.y, box.clip.y);\n\t\tconst visibleBottom = Math.min(\n\t\t\tthis.terminal.rows - 1,\n\t\t\tbox.rect.y + box.rect.height - 1,\n\t\t\tbox.clip.y + box.clip.height - 1,\n\t\t);\n\t\tif (visibleBottom < visibleTop) return undefined;\n\t\tconst pointerRow = Math.max(visibleTop, Math.min(visibleBottom, y));\n\t\tconst maxContentRow = Math.max(0, (box.scrollContentLines?.length ?? 1) - 1);\n\t\treturn {\n\t\t\trow: Math.max(0, Math.min(maxContentRow, scrollView.scrollTop + pointerRow - box.rect.y)),\n\t\t\tcol: Math.max(0, Math.min(box.rect.width - 1, x - box.rect.x)),\n\t\t\tscrollView,\n\t\t};\n\t}\n\n\tprivate getSelectionPoint(event: SgrMouseEvent, scrollView?: ScrollView): SelectionPoint {\n\t\tif (scrollView) {\n\t\t\tconst point = this.getScrollSelectionPoint(scrollView, event.x, event.y);\n\t\t\tif (point) return point;\n\t\t}\n\t\treturn {\n\t\t\trow: Math.max(0, Math.min(this.terminal.rows - 1, event.y)),\n\t\t\tcol: Math.max(0, Math.min(this.terminal.columns - 1, event.x)),\n\t\t};\n\t}\n\n\tprivate getSelectionSourceLine(point: SelectionPoint): string {\n\t\tif (point.scrollView && this.currentLayout) {\n\t\t\tconst lines = getScrollViewBox(this.currentLayout, point.scrollView)?.scrollContentLines;\n\t\t\tif (lines) return lines[point.row] ?? \"\";\n\t\t}\n\t\treturn this.previousScreen[point.row] ?? \"\";\n\t}\n\n\tprivate getWordSelection(point: SelectionPoint): SelectionRange | undefined {\n\t\tconst line = stripTerminalSequences(this.getSelectionSourceLine(point));\n\t\tconst segments: Array<{ start: number; end: number; selectable: boolean; joiner: boolean }> = [];\n\t\tlet start = 0;\n\t\tfor (const segment of wordSegmenter.segment(line)) {\n\t\t\tconst end = start + visibleWidth(segment.segment);\n\t\t\tconst joiner = TERMINAL_WORD_SELECTION_JOINERS.has(segment.segment);\n\t\t\tsegments.push({ start, end, selectable: segment.isWordLike === true || joiner, joiner });\n\t\t\tstart = end;\n\t\t}\n\t\tconst clickedSegmentIndex = segments.findIndex(\n\t\t\t(segment) => point.col >= segment.start && point.col < segment.end,\n\t\t);\n\t\tif (clickedSegmentIndex < 0) return undefined;\n\n\t\tconst canJoin = (\n\t\t\tleft: { selectable: boolean; joiner: boolean },\n\t\t\tright: { selectable: boolean; joiner: boolean },\n\t\t): boolean => left.selectable && right.selectable && (left.joiner || right.joiner);\n\t\tlet selectionStart = segments[clickedSegmentIndex].start;\n\t\tlet selectionEnd = segments[clickedSegmentIndex].end;\n\t\tfor (let index = clickedSegmentIndex; index > 0 && canJoin(segments[index - 1], segments[index]); index--) {\n\t\t\tselectionStart = segments[index - 1].start;\n\t\t}\n\t\tfor (\n\t\t\tlet index = clickedSegmentIndex;\n\t\t\tindex < segments.length - 1 && canJoin(segments[index], segments[index + 1]);\n\t\t\tindex++\n\t\t) {\n\t\t\tselectionEnd = segments[index + 1].end;\n\t\t}\n\t\treturn {\n\t\t\tstart: { ...point, col: selectionStart },\n\t\t\tend: { ...point, col: selectionEnd, boundary: true },\n\t\t};\n\t}\n\n\tprivate getLineSelection(point: SelectionPoint): SelectionRange {\n\t\treturn {\n\t\t\tstart: { ...point, col: 0 },\n\t\t\tend: { ...point, col: visibleWidth(this.getSelectionSourceLine(point)), boundary: true },\n\t\t};\n\t}\n\n\tprivate updateSelectionFocus(point: SelectionPoint): void {\n\t\tif (this.selectionGranularity === \"character\" || !this.selectionInitialRange) {\n\t\t\tthis.selectionFocus = point;\n\t\t\treturn;\n\t\t}\n\t\tconst range = this.selectionGranularity === \"word\" ? this.getWordSelection(point) : this.getLineSelection(point);\n\t\tif (!range) return;\n\t\tconst initial = this.selectionInitialRange;\n\t\tconst targetBeforeInitial =\n\t\t\trange.start.row < initial.start.row ||\n\t\t\t(range.start.row === initial.start.row && range.start.col < initial.start.col);\n\t\tif (targetBeforeInitial) {\n\t\t\tthis.selectionAnchor = initial.end;\n\t\t\tthis.selectionFocus = range.start;\n\t\t} else {\n\t\t\tthis.selectionAnchor = initial.start;\n\t\t\tthis.selectionFocus = range.end;\n\t\t}\n\t}\n\n\tprivate getClickCount(point: SelectionPoint, word: SelectionRange | undefined): number {\n\t\tconst now = Date.now();\n\t\tconst previous = this.lastClick;\n\t\tconst count =\n\t\t\tword &&\n\t\t\tprevious &&\n\t\t\tnow - previous.timestamp <= DOUBLE_CLICK_INTERVAL_MS &&\n\t\t\tprevious.row === point.row &&\n\t\t\tprevious.scrollView === point.scrollView &&\n\t\t\tprevious.wordStart === word.start.col &&\n\t\t\tprevious.wordEnd === word.end.col\n\t\t\t\t? (previous.count % 3) + 1\n\t\t\t\t: 1;\n\t\tthis.lastClick = word\n\t\t\t? {\n\t\t\t\t\ttimestamp: now,\n\t\t\t\t\tcount,\n\t\t\t\t\trow: point.row,\n\t\t\t\t\tscrollView: point.scrollView,\n\t\t\t\t\twordStart: word.start.col,\n\t\t\t\t\twordEnd: word.end.col,\n\t\t\t\t}\n\t\t\t: undefined;\n\t\treturn count;\n\t}\n\n\tprivate updateSelectionAutoScroll(event: SgrMouseEvent): void {\n\t\tconst scrollView = this.selectionAnchor?.scrollView;\n\t\tif (!scrollView || !this.currentLayout) {\n\t\t\tthis.stopSelectionAutoScroll();\n\t\t\treturn;\n\t\t}\n\t\tconst box = getScrollViewBox(this.currentLayout, scrollView);\n\t\tif (!box || box.rect.height <= 0 || box.clip.height <= 0) {\n\t\t\tthis.stopSelectionAutoScroll();\n\t\t\treturn;\n\t\t}\n\t\tconst visibleTop = Math.max(0, box.rect.y, box.clip.y);\n\t\tconst visibleBottom = Math.min(\n\t\t\tthis.terminal.rows - 1,\n\t\t\tbox.rect.y + box.rect.height - 1,\n\t\t\tbox.clip.y + box.clip.height - 1,\n\t\t);\n\t\tthis.selectionDragPointer = { x: event.x, y: event.y };\n\t\tthis.selectionAutoScrollDirection = event.y <= visibleTop ? -1 : event.y >= visibleBottom ? 1 : 0;\n\t\tif (this.selectionAutoScrollDirection === 0) {\n\t\t\tthis.stopSelectionAutoScroll();\n\t\t\treturn;\n\t\t}\n\t\tif (this.selectionAutoScrollTimer) return;\n\t\tthis.selectionAutoScrollTimer = setInterval(() => this.autoScrollSelection(), 50);\n\t\tthis.selectionAutoScrollTimer.unref();\n\t}\n\n\tprivate autoScrollSelection(): void {\n\t\tconst scrollView = this.selectionAnchor?.scrollView;\n\t\tconst pointer = this.selectionDragPointer;\n\t\tconst direction = this.selectionAutoScrollDirection;\n\t\tif (!scrollView || !pointer || direction === 0) {\n\t\t\tthis.stopSelectionAutoScroll();\n\t\t\treturn;\n\t\t}\n\t\tconst remaining = scrollView.scrollBy(direction);\n\t\tif (remaining === direction) {\n\t\t\tthis.stopSelectionAutoScroll();\n\t\t\treturn;\n\t\t}\n\t\tconst point = this.getScrollSelectionPoint(scrollView, pointer.x, pointer.y);\n\t\tif (point) this.updateSelectionFocus(point);\n\t\tthis.requestRender();\n\t}\n\n\tprivate stopSelectionAutoScroll(): void {\n\t\tif (this.selectionAutoScrollTimer) {\n\t\t\tclearInterval(this.selectionAutoScrollTimer);\n\t\t\tthis.selectionAutoScrollTimer = undefined;\n\t\t}\n\t\tthis.selectionAutoScrollDirection = 0;\n\t\tthis.selectionDragPointer = undefined;\n\t}\n\n\tprivate handleSelectionMouseEvent(event: SgrMouseEvent): void {\n\t\tconst button = event.button & 3;\n\t\tif (button !== 0 && !(event.release && button === 3)) return;\n\t\tconst anchorScrollView = this.selectionAnchor?.scrollView;\n\t\tconst point = this.getSelectionPoint(event, anchorScrollView);\n\t\tif (event.release) {\n\t\t\tif (!this.selectionPressActive) return;\n\t\t\tthis.selectionPressActive = false;\n\t\t\tthis.stopSelectionAutoScroll();\n\t\t\tif (!this.selectionAnchor) return;\n\t\t\tthis.updateSelectionFocus(point);\n\t\t\tconst clickedUrl =\n\t\t\t\t!this.selectionDragged &&\n\t\t\t\tthis.selectionAnchor.scrollView === point.scrollView &&\n\t\t\t\tthis.selectionAnchor.row === point.row &&\n\t\t\t\tthis.selectionAnchor.col === point.col\n\t\t\t\t\t? this.pressedUrl\n\t\t\t\t\t: undefined;\n\t\t\tthis.pressedUrl = undefined;\n\t\t\tif (clickedUrl && this.openUrl) {\n\t\t\t\tthis.selectionAnchor = undefined;\n\t\t\t\tthis.selectionFocus = undefined;\n\t\t\t\ttry {\n\t\t\t\t\tthis.openUrl(clickedUrl);\n\t\t\t\t} catch {\n\t\t\t\t\t// URL activation is best-effort.\n\t\t\t\t}\n\t\t\t\tthis.requestRender();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (this.copyOnSelect) void this.copySelectionToClipboard();\n\t\t\tthis.requestRender();\n\t\t\treturn;\n\t\t}\n\t\tif ((event.button & 32) !== 0) {\n\t\t\tif (!this.selectionPressActive || !this.selectionAnchor) return;\n\t\t\tthis.selectionDragged = true;\n\t\t\tthis.lastClick = undefined;\n\t\t\tthis.pressedUrl = undefined;\n\t\t\tthis.updateSelectionFocus(point);\n\t\t\tthis.updateSelectionAutoScroll(event);\n\t\t\tthis.requestRender();\n\t\t\treturn;\n\t\t}\n\t\tthis.stopSelectionAutoScroll();\n\t\tthis.selectionPressActive = true;\n\t\tconst scrollView =\n\t\t\t!this.hasOverlay() && this.currentLayout\n\t\t\t\t? getScrollViewsAt(this.currentLayout, event.x, event.y)[0]\n\t\t\t\t: undefined;\n\t\tconst anchor = this.getSelectionPoint(event, scrollView);\n\t\tconst word = this.getWordSelection(anchor);\n\t\tconst clickCount = this.getClickCount(anchor, word);\n\t\tconst range = clickCount === 2 ? word : clickCount === 3 ? this.getLineSelection(anchor) : undefined;\n\t\tthis.selectionGranularity = range ? (clickCount === 2 ? \"word\" : \"line\") : \"character\";\n\t\tthis.selectionInitialRange = range;\n\t\tthis.selectionAnchor = range?.start ?? anchor;\n\t\tthis.selectionFocus = range?.end ?? anchor;\n\t\tthis.selectionDragged = false;\n\t\tthis.pressedUrl = range\n\t\t\t? undefined\n\t\t\t: getOsc8LinkAtColumn(\n\t\t\t\t\tthis.previousScreen[Math.max(0, Math.min(this.terminal.rows - 1, event.y))] ?? \"\",\n\t\t\t\t\tMath.max(0, Math.min(this.terminal.columns - 1, event.x)),\n\t\t\t\t);\n\t\tthis.requestRender();\n\t}\n\n\tprivate getSelectionBounds(): { start: SelectionPoint; end: SelectionPoint } | undefined {\n\t\tif (!this.selectionAnchor || !this.selectionFocus) return undefined;\n\t\tif (this.selectionAnchor.scrollView !== this.selectionFocus.scrollView) return undefined;\n\t\tconst anchorBeforeFocus =\n\t\t\tthis.selectionAnchor.row < this.selectionFocus.row ||\n\t\t\t(this.selectionAnchor.row === this.selectionFocus.row && this.selectionAnchor.col < this.selectionFocus.col);\n\t\tif (\n\t\t\tthis.selectionAnchor.row === this.selectionFocus.row &&\n\t\t\tthis.selectionAnchor.col === this.selectionFocus.col\n\t\t) {\n\t\t\treturn undefined;\n\t\t}\n\t\treturn anchorBeforeFocus\n\t\t\t? { start: this.selectionAnchor, end: this.selectionFocus }\n\t\t\t: { start: this.selectionFocus, end: this.selectionAnchor };\n\t}\n\n\tprivate getSelectionColumns(\n\t\tline: string,\n\t\trow: number,\n\t\tselection: { start: SelectionPoint; end: SelectionPoint },\n\t\tminColumn = 0,\n\t\tmaxColumn = visibleWidth(line),\n\t): { start: number; end: number } {\n\t\tconst lineWidth = visibleWidth(line);\n\t\tlet start = Math.max(0, minColumn);\n\t\tlet end = Math.min(lineWidth, maxColumn);\n\t\tif (row === selection.start.row) {\n\t\t\tstart = getGraphemeCellRange(line, selection.start.col)?.start ?? Math.min(selection.start.col, lineWidth);\n\t\t}\n\t\tif (row === selection.end.row) {\n\t\t\tend = selection.end.boundary\n\t\t\t\t? Math.min(selection.end.col, lineWidth)\n\t\t\t\t: (getGraphemeCellRange(line, selection.end.col)?.end ?? Math.min(selection.end.col + 1, lineWidth));\n\t\t}\n\t\treturn { start: Math.max(minColumn, start), end: Math.min(maxColumn, end) };\n\t}\n\n\tprivate getActiveSelectionText(): string | undefined {\n\t\tconst selection = this.getSelectionBounds();\n\t\tif (!selection) return undefined;\n\t\tlet sourceLines: readonly string[] = this.previousScreen;\n\t\tif (selection.start.scrollView) {\n\t\t\tif (!this.currentLayout) return undefined;\n\t\t\tconst box = getScrollViewBox(this.currentLayout, selection.start.scrollView);\n\t\t\tif (!box?.scrollContentLines) return undefined;\n\t\t\tsourceLines = box.scrollContentLines;\n\t\t}\n\t\tconst lines: string[] = [];\n\t\tfor (let row = selection.start.row; row <= selection.end.row; row++) {\n\t\t\tconst line = sourceLines[row] ?? \"\";\n\t\t\tconst columns = this.getSelectionColumns(line, row, selection);\n\t\t\tlines.push(\n\t\t\t\tstripTerminalSequences(\n\t\t\t\t\tsliceByColumn(line, columns.start, Math.max(0, columns.end - columns.start), true),\n\t\t\t\t).trimEnd(),\n\t\t\t);\n\t\t}\n\t\tconst text = lines.join(\"\\n\");\n\t\treturn text.length === 0 ? undefined : text;\n\t}\n\n\tprivate async copySelectionToClipboard(): Promise<boolean> {\n\t\tconst text = this.getActiveSelectionText();\n\t\tif (!text) return false;\n\t\treturn this.copyTextToClipboard(text);\n\t}\n\n\tprivate async copyTextToClipboard(text: string): Promise<boolean> {\n\t\t// Prefer an injected clipboard implementation (native clipboard + platform tools with a\n\t\t// verified success path) when the host app provides one. A bare OSC 52 write can show\n\t\t// \"Copied!\" while leaving the system clipboard untouched (e.g. macOS Terminal.app, tmux\n\t\t// without OSC 52 clipboard passthrough), so only report success when it actually copies.\n\t\tif (this.copySelection) {\n\t\t\tconst ok = await this.copySelection(text);\n\t\t\tthis.flash(ok ? \"Copied!\" : \"Copy failed\");\n\t\t\treturn ok;\n\t\t}\n\t\tthis.terminal.write(`\\x1b]52;c;${Buffer.from(text).toString(\"base64\")}\\x07`);\n\t\tthis.flash(\"Copied!\");\n\t\treturn true;\n\t}\n\n\tprivate applySearchTextHighlight(text: string, current: boolean): string {\n\t\tconst style = current ? this.searchCurrentMatchStyle : this.searchMatchStyle;\n\t\tlet result = \"\";\n\t\tlet plainStart = 0;\n\t\tlet index = 0;\n\t\twhile (index < text.length) {\n\t\t\tconst ansi = extractAnsiCode(text, index);\n\t\t\tif (!ansi) {\n\t\t\t\tindex += 1;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (index > plainStart) result += style(text.slice(plainStart, index));\n\t\t\tresult += ansi.code;\n\t\t\tindex += ansi.length;\n\t\t\tplainStart = index;\n\t\t}\n\t\tif (plainStart < text.length) result += style(text.slice(plainStart));\n\t\treturn result;\n\t}\n\n\tprivate applySearchHighlights(screen: string[], layout: LayoutFrame): string[] {\n\t\tconst search = this.activeSearch;\n\t\tif (!search || search.selectedIndex < 0 || search.matches.length === 0) return screen;\n\t\tconst scrollView = layout.primaryScrollView ?? this.implicitScrollView;\n\t\tconst box = getScrollViewBox(layout, scrollView);\n\t\tif (!box) return screen;\n\n\t\tconst rangesByRow = new Map<number, SearchHighlightRange[]>();\n\t\tconst scrollbarColumn = getScrollbarGeometry(box)?.column;\n\t\tconst minRow = Math.max(0, box.rect.y, box.clip.y);\n\t\tconst maxRow = Math.min(screen.length, box.rect.y + box.rect.height, box.clip.y + box.clip.height);\n\t\tconst minColumn = Math.max(0, box.rect.x, box.clip.x);\n\t\tconst maxColumn = Math.min(\n\t\t\tthis.terminal.columns,\n\t\t\tbox.rect.x + box.rect.width,\n\t\t\tbox.clip.x + box.clip.width,\n\t\t\tscrollbarColumn ?? Number.POSITIVE_INFINITY,\n\t\t);\n\t\tfor (let matchIndex = 0; matchIndex < search.matches.length; matchIndex++) {\n\t\t\tfor (const segment of search.matches[matchIndex]!.segments) {\n\t\t\t\tconst row = box.rect.y + segment.row - scrollView.scrollTop;\n\t\t\t\tif (row < minRow || row >= maxRow) continue;\n\t\t\t\tconst startCol = Math.max(minColumn, box.rect.x + segment.startCol);\n\t\t\t\tconst endCol = Math.min(maxColumn, box.rect.x + segment.endCol);\n\t\t\t\tif (endCol <= startCol) continue;\n\t\t\t\tconst ranges = rangesByRow.get(row) ?? [];\n\t\t\t\tranges.push({ startCol, endCol, current: matchIndex === search.selectedIndex });\n\t\t\t\trangesByRow.set(row, ranges);\n\t\t\t}\n\t\t}\n\n\t\tconst result = [...screen];\n\t\tfor (const [row, ranges] of rangesByRow) {\n\t\t\tlet line = result[row] ?? \"\";\n\t\t\tif (isImageLine(line)) continue;\n\t\t\tconst lineWidth = visibleWidth(line);\n\t\t\tfor (const range of ranges.sort((a, b) => b.startCol - a.startCol)) {\n\t\t\t\tconst startCol = Math.min(range.startCol, lineWidth);\n\t\t\t\tconst endCol = Math.min(range.endCol, lineWidth);\n\t\t\t\tif (endCol <= startCol) continue;\n\t\t\t\tconst before = sliceByColumn(line, 0, startCol, true);\n\t\t\t\tconst highlighted = sliceByColumn(line, startCol, endCol - startCol, true);\n\t\t\t\tconst after = sliceByColumn(line, endCol, Math.max(0, lineWidth - endCol), true);\n\t\t\t\tline = `${before}${this.applySearchTextHighlight(highlighted, range.current)}${after}`;\n\t\t\t}\n\t\t\tresult[row] = line;\n\t\t}\n\t\treturn result;\n\t}\n\n\tprivate applySelectionHighlight(text: string): string {\n\t\tlet result = \"\\x1b[7m\";\n\t\tlet index = 0;\n\t\twhile (index < text.length) {\n\t\t\tconst ansi = extractAnsiCode(text, index);\n\t\t\tif (!ansi) {\n\t\t\t\tresult += text[index];\n\t\t\t\tindex += 1;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tresult += ansi.code;\n\t\t\tif (ansi.code.endsWith(\"m\")) result += \"\\x1b[7m\";\n\t\t\tindex += ansi.length;\n\t\t}\n\t\treturn `${result}\\x1b[27m`;\n\t}\n\n\tprivate applySelection(screen: string[], layout = this.currentLayout): string[] {\n\t\tconst selection = this.getSelectionBounds();\n\t\tif (!selection) return screen;\n\t\tlet screenSelection = selection;\n\t\tlet minRow = 0;\n\t\tlet maxRow = screen.length - 1;\n\t\tlet minColumn = 0;\n\t\tlet maxColumn = this.terminal.columns;\n\t\tif (selection.start.scrollView) {\n\t\t\tif (!layout) return screen;\n\t\t\tconst box = getScrollViewBox(layout, selection.start.scrollView);\n\t\t\tif (!box) return screen;\n\t\t\tminRow = Math.max(0, box.rect.y, box.clip.y);\n\t\t\tmaxRow = Math.min(screen.length - 1, box.rect.y + box.rect.height - 1, box.clip.y + box.clip.height - 1);\n\t\t\tminColumn = Math.max(0, box.rect.x, box.clip.x);\n\t\t\tmaxColumn = Math.min(this.terminal.columns, box.rect.x + box.rect.width, box.clip.x + box.clip.width);\n\t\t\tscreenSelection = {\n\t\t\t\tstart: {\n\t\t\t\t\t...selection.start,\n\t\t\t\t\trow: box.rect.y + selection.start.row - selection.start.scrollView.scrollTop,\n\t\t\t\t\tcol: box.rect.x + selection.start.col,\n\t\t\t\t},\n\t\t\t\tend: {\n\t\t\t\t\t...selection.end,\n\t\t\t\t\trow: box.rect.y + selection.end.row - selection.start.scrollView.scrollTop,\n\t\t\t\t\tcol: box.rect.x + selection.end.col,\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t\treturn screen.map((line, row) => {\n\t\t\tif (\n\t\t\t\trow < minRow ||\n\t\t\t\trow > maxRow ||\n\t\t\t\trow < screenSelection.start.row ||\n\t\t\t\trow > screenSelection.end.row ||\n\t\t\t\tisImageLine(line)\n\t\t\t) {\n\t\t\t\treturn line;\n\t\t\t}\n\t\t\tconst lineWidth = visibleWidth(line);\n\t\t\tconst columns = this.getSelectionColumns(line, row, screenSelection, minColumn, maxColumn);\n\t\t\tif (columns.end <= columns.start) return line;\n\t\t\tconst before = sliceByColumn(line, 0, columns.start, true);\n\t\t\tconst selected = sliceByColumn(line, columns.start, columns.end - columns.start, true);\n\t\t\tconst after = sliceByColumn(line, columns.end, Math.max(0, lineWidth - columns.end), true);\n\t\t\treturn `${before}${this.applySelectionHighlight(selected)}${after}`;\n\t\t});\n\t}\n\n\tprivate isMouseSequence(data: string): boolean {\n\t\treturn /^\\x1b\\[<\\d+;\\d+;\\d+[Mm]$/.test(data) || (data.length === 6 && data.startsWith(\"\\x1b[M\"));\n\t}\n\n\tprivate compositeFlashes(screen: string[], width: number, height: number): string[] {\n\t\tconst flashLines = this.flashes.render(width).slice(-height);\n\t\tif (flashLines.length === 0) return screen;\n\t\tconst result = [...screen];\n\t\twhile (result.length < height) result.push(\"\");\n\t\tfor (let row = 0; row < flashLines.length; row++) {\n\t\t\tconst line = flashLines[row]!;\n\t\t\tconst flashWidth = visibleWidth(line);\n\t\t\tif (flashWidth === 0) continue;\n\t\t\tresult[row] = compositeTuiLine(result[row] ?? \"\", line, width - flashWidth, flashWidth, width);\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected override doRender(): void {\n\t\tif (this.stopped || !this.altScreenActive) return;\n\t\tconst width = Math.max(1, this.terminal.columns);\n\t\tconst height = Math.max(1, this.terminal.rows);\n\t\tconst root = this.layoutRoot ?? this.implicitScrollView;\n\t\tlet nextLayout = renderLayoutFrame(root, width, height, () => this.requestRender());\n\t\tif (this.refreshSearch(nextLayout)) {\n\t\t\tnextLayout = renderLayoutFrame(root, width, height, () => this.requestRender());\n\t\t}\n\t\tlet screen = nextLayout.lines.map((line) => line.replace(OSC133_ZONE_PREFIX, \"\"));\n\t\tscreen = this.applySearchHighlights(screen, nextLayout);\n\t\tscreen = this.compositeOverlays(screen, width, height);\n\t\tif (screen.length > height) screen = screen.slice(screen.length - height);\n\t\tscreen = this.applySelection(screen, nextLayout);\n\t\tscreen = this.compositeFlashes(screen, width, height);\n\n\t\tconst cursorPos = this.extractCursorPosition(screen, height);\n\t\tscreen = this.applyLineResets(screen).map((line) => {\n\t\t\tif (isImageLine(line) || visibleWidth(line) <= width) return line;\n\t\t\treturn sliceByColumn(line, 0, width, true);\n\t\t});\n\n\t\tconst fullRedraw =\n\t\t\tthis.previousScreen.length === 0 || this.previousScreenWidth !== width || this.previousScreenHeight !== height;\n\t\tconst imagesNeedRedraw = screen.some(\n\t\t\t(line, row) =>\n\t\t\t\tline !== this.previousScreen[row] && (isImageLine(line) || isImageLine(this.previousScreen[row] ?? \"\")),\n\t\t);\n\t\tconst redrawImages = fullRedraw || imagesNeedRedraw;\n\t\tconst hadUploadedKittyImages = this.uploadedKittyImages.size > 0;\n\t\tconst preparedKittyScreen =\n\t\t\tredrawImages && this.imageProtocol === \"kitty\"\n\t\t\t\t? this.prepareKittyScreen(screen)\n\t\t\t\t: { lines: screen, evictedImageDeletion: \"\" };\n\n\t\tlet buffer = BEGIN_SYNCHRONIZED_OUTPUT;\n\t\tif (fullRedraw) {\n\t\t\tthis.fullRedrawCount += 1;\n\t\t\tconst clearImages =\n\t\t\t\tthis.imageProtocol === \"kitty\" && hadUploadedKittyImages\n\t\t\t\t\t? deleteAllKittyPlacements()\n\t\t\t\t\t: this.deleteAltScreenKittyImages();\n\t\t\tbuffer += `${clearImages}\\x1b[2J`;\n\t\t} else if (imagesNeedRedraw) {\n\t\t\tif (this.imageProtocol === \"iterm2\") buffer += \"\\x1b[2J\";\n\t\t\telse if (this.imageProtocol === \"kitty\") buffer += deleteAllKittyPlacements();\n\t\t}\n\t\tbuffer += preparedKittyScreen.evictedImageDeletion;\n\n\t\tfor (let row = 0; row < height; row++) {\n\t\t\tif (!fullRedraw && !imagesNeedRedraw && screen[row] === this.previousScreen[row]) continue;\n\t\t\tbuffer += `\\x1b[${row + 1};1H\\x1b[2K${preparedKittyScreen.lines[row] ?? \"\"}`;\n\t\t}\n\n\t\tif (cursorPos) {\n\t\t\tbuffer += `\\x1b[${cursorPos.row + 1};${Math.min(width, cursorPos.col) + 1}H`;\n\t\t\tbuffer += this.getShowHardwareCursor() ? \"\\x1b[?25h\" : \"\\x1b[?25l\";\n\t\t} else {\n\t\t\tbuffer += \"\\x1b[?25l\";\n\t\t}\n\t\tbuffer += END_SYNCHRONIZED_OUTPUT;\n\t\tthis.terminal.write(buffer);\n\n\t\tthis.previousScreen = screen;\n\t\tthis.previousScreenWidth = width;\n\t\tthis.previousScreenHeight = height;\n\t\tthis.currentLayout = nextLayout;\n\t}\n}\n"]}
|