@cjhyy/code-shell 0.3.0 → 0.5.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +75 -0
- package/dist/cli.js +2 -0
- package/dist/index.d.ts +1 -68
- package/dist/index.js +1 -1
- package/package.json +25 -73
- package/dist/agent/coordinator.d.ts +0 -49
- package/dist/anthropic-DJXVKFMJ.js +0 -1
- package/dist/arena/arena.d.ts +0 -43
- package/dist/arena/context/context-tools.d.ts +0 -16
- package/dist/arena/detect-mode.d.ts +0 -20
- package/dist/arena/digest-builder.d.ts +0 -25
- package/dist/arena/index.d.ts +0 -29
- package/dist/arena/index.js +0 -1
- package/dist/arena/iterate/convergence.d.ts +0 -25
- package/dist/arena/iterate/formats/index.d.ts +0 -22
- package/dist/arena/iterate/index.d.ts +0 -11
- package/dist/arena/iterate/iterative-arena.d.ts +0 -23
- package/dist/arena/iterate/parse.d.ts +0 -42
- package/dist/arena/iterate/phases/argue.d.ts +0 -22
- package/dist/arena/iterate/phases/revise.d.ts +0 -16
- package/dist/arena/iterate/phases/tournament.d.ts +0 -34
- package/dist/arena/iterate/tools/web-tools.d.ts +0 -13
- package/dist/arena/iterate/types.d.ts +0 -152
- package/dist/arena/ledger.d.ts +0 -47
- package/dist/arena/lenses/architecture.d.ts +0 -5
- package/dist/arena/lenses/engineering.d.ts +0 -5
- package/dist/arena/lenses/general.d.ts +0 -5
- package/dist/arena/lenses/index.d.ts +0 -16
- package/dist/arena/lenses/product.d.ts +0 -5
- package/dist/arena/model-presets.d.ts +0 -23
- package/dist/arena/phases/adjudication.d.ts +0 -24
- package/dist/arena/phases/build-consensus.d.ts +0 -29
- package/dist/arena/phases/claim-registry.d.ts +0 -26
- package/dist/arena/phases/cross-review.d.ts +0 -45
- package/dist/arena/phases/debate-rounds.d.ts +0 -27
- package/dist/arena/phases/participant-research.d.ts +0 -38
- package/dist/arena/phases/planning-detail-expansion.d.ts +0 -38
- package/dist/arena/planner.d.ts +0 -27
- package/dist/arena/providers/docs.d.ts +0 -6
- package/dist/arena/providers/git.d.ts +0 -8
- package/dist/arena/providers/index.d.ts +0 -32
- package/dist/arena/providers/none.d.ts +0 -7
- package/dist/arena/providers/repo.d.ts +0 -6
- package/dist/arena/render/session.d.ts +0 -17
- package/dist/arena/render/terminal.d.ts +0 -33
- package/dist/arena/strategies/discussion.d.ts +0 -25
- package/dist/arena/strategies/index.d.ts +0 -15
- package/dist/arena/strategies/language-wrapper.d.ts +0 -17
- package/dist/arena/strategies/lens-wrapper.d.ts +0 -16
- package/dist/arena/strategies/planning.d.ts +0 -30
- package/dist/arena/strategies/review.d.ts +0 -26
- package/dist/arena/strategies/utils.d.ts +0 -39
- package/dist/arena/tools/selector.d.ts +0 -17
- package/dist/arena/transitions.d.ts +0 -48
- package/dist/arena/types.d.ts +0 -508
- package/dist/arena-MRBATZFD.js +0 -3
- package/dist/bootstrap/setup.d.ts +0 -14
- package/dist/bootstrap/state.d.ts +0 -160
- package/dist/bwrap-PVZMLHZR.js +0 -2
- package/dist/chunk-2OD6VR4N.js +0 -2
- package/dist/chunk-3QP5BQ3L.js +0 -1
- package/dist/chunk-5QIVXFCT.js +0 -1
- package/dist/chunk-AFMP73YP.js +0 -2
- package/dist/chunk-D3TVASD2.js +0 -4
- package/dist/chunk-DI26OUIU.js +0 -2
- package/dist/chunk-FU7AHZNN.js +0 -1
- package/dist/chunk-FZXY554D.js +0 -2
- package/dist/chunk-GGVAOPI7.js +0 -1
- package/dist/chunk-GKAQH2DG.js +0 -2
- package/dist/chunk-GYNO4R7R.js +0 -2
- package/dist/chunk-K4HILJ6G.js +0 -251
- package/dist/chunk-M7VU4YVY.js +0 -49
- package/dist/chunk-MLCTC53I.js +0 -1
- package/dist/chunk-O5HFCH2U.js +0 -1
- package/dist/chunk-OWBYLMDD.js +0 -1
- package/dist/chunk-P6JSTIFM.js +0 -1
- package/dist/chunk-QTWU7UNA.js +0 -5
- package/dist/chunk-SKIX2M5Z.js +0 -4
- package/dist/chunk-SNFAPSLA.js +0 -1
- package/dist/chunk-SV7H4FKT.js +0 -3
- package/dist/chunk-T222K6IV.js +0 -18
- package/dist/chunk-TKJA6W36.js +0 -3
- package/dist/chunk-WI6FSWGU.js +0 -1
- package/dist/chunk-WONQHE4P.js +0 -641
- package/dist/chunk-X2S7ASQ2.js +0 -1
- package/dist/chunk-Z5HKHAO7.js +0 -336
- package/dist/cli/commands/arena.d.ts +0 -29
- package/dist/cli/commands/builtin/advanced-commands.d.ts +0 -5
- package/dist/cli/commands/builtin/core-commands.d.ts +0 -5
- package/dist/cli/commands/builtin/export-md.d.ts +0 -19
- package/dist/cli/commands/builtin/extra-commands.d.ts +0 -6
- package/dist/cli/commands/builtin/git-commands.d.ts +0 -5
- package/dist/cli/commands/builtin/init/detect.d.ts +0 -25
- package/dist/cli/commands/builtin/init/index.d.ts +0 -19
- package/dist/cli/commands/builtin/more-commands.d.ts +0 -5
- package/dist/cli/commands/builtin/permissions-command.d.ts +0 -5
- package/dist/cli/commands/builtin/plugin-commands-registration.d.ts +0 -12
- package/dist/cli/commands/builtin/plugin-handler.d.ts +0 -6
- package/dist/cli/commands/builtin/utility-commands.d.ts +0 -5
- package/dist/cli/commands/registry.d.ts +0 -79
- package/dist/cli/commands/repl.d.ts +0 -21
- package/dist/cli/commands/run.d.ts +0 -21
- package/dist/cli/commands/runs.d.ts +0 -14
- package/dist/cli/cost-tracker.d.ts +0 -63
- package/dist/cli/exit.d.ts +0 -12
- package/dist/cli/input/ndjson-reader.d.ts +0 -31
- package/dist/cli/input-compiler.d.ts +0 -5
- package/dist/cli/main.d.ts +0 -5
- package/dist/cli/main.js +0 -415
- package/dist/cli/migrate-models.d.ts +0 -45
- package/dist/cli/onboarding.d.ts +0 -189
- package/dist/cli/output/renderer.d.ts +0 -28
- package/dist/cli/output/terminal-ui.d.ts +0 -50
- package/dist/cli/updater.d.ts +0 -65
- package/dist/client-base-GSFXPP2Y.js +0 -1
- package/dist/compaction-L3Y6NG4N.js +0 -1
- package/dist/context/compaction.d.ts +0 -116
- package/dist/context/manager.d.ts +0 -145
- package/dist/context/token-counter.d.ts +0 -27
- package/dist/context/tool-result-storage.d.ts +0 -96
- package/dist/cron/scheduler.d.ts +0 -34
- package/dist/data/openrouter-models.d.ts +0 -35
- package/dist/data/openrouter-sync.d.ts +0 -16
- package/dist/data/static-catalogs.d.ts +0 -25
- package/dist/devtools-FBX4HVVY.js +0 -1
- package/dist/engine/cost-store.d.ts +0 -22
- package/dist/engine/engine.d.ts +0 -236
- package/dist/engine/model-facade.d.ts +0 -24
- package/dist/engine/query.d.ts +0 -50
- package/dist/engine/streaming-tool-queue.d.ts +0 -34
- package/dist/engine/token-budget.d.ts +0 -22
- package/dist/engine/tool-summary.d.ts +0 -13
- package/dist/engine/turn-loop.d.ts +0 -122
- package/dist/engine/turn-state.d.ts +0 -20
- package/dist/exceptions.d.ts +0 -44
- package/dist/export-md-U72T7NW7.js +0 -22
- package/dist/file-history-7FQFEQOL.js +0 -1
- package/dist/git/utils.d.ts +0 -35
- package/dist/git/worktree.d.ts +0 -36
- package/dist/hooks/events.d.ts +0 -114
- package/dist/hooks/inject.d.ts +0 -19
- package/dist/hooks/registry.d.ts +0 -15
- package/dist/hooks/shell-runner.d.ts +0 -45
- package/dist/llm/api-key-sanitize.d.ts +0 -22
- package/dist/llm/capabilities/index.d.ts +0 -20
- package/dist/llm/capabilities/rules.d.ts +0 -26
- package/dist/llm/capabilities/types.d.ts +0 -108
- package/dist/llm/client-base.d.ts +0 -29
- package/dist/llm/client-factory.d.ts +0 -10
- package/dist/llm/model-cache.d.ts +0 -21
- package/dist/llm/model-fetcher.d.ts +0 -29
- package/dist/llm/model-pool.d.ts +0 -84
- package/dist/llm/provider-catalog.d.ts +0 -32
- package/dist/llm/provider-kinds.d.ts +0 -21
- package/dist/llm/providers/anthropic.d.ts +0 -19
- package/dist/llm/providers/openai.d.ts +0 -64
- package/dist/llm/retry.d.ts +0 -12
- package/dist/llm/stream-watchdog.d.ts +0 -42
- package/dist/llm/token-counter.d.ts +0 -17
- package/dist/llm/types.d.ts +0 -37
- package/dist/logging/logger.d.ts +0 -102
- package/dist/logging/session-recorder.d.ts +0 -90
- package/dist/lsp/client.d.ts +0 -41
- package/dist/lsp/manager.d.ts +0 -40
- package/dist/lsp/servers.d.ts +0 -16
- package/dist/manager-4XKLZHKE.js +0 -1
- package/dist/mcp-manager-3JGHEJO3.js +0 -1
- package/dist/memory-BNI4WEWL.js +0 -1
- package/dist/model-cache-HEDXI7UJ.js +0 -1
- package/dist/model-fetcher-X5W5EASG.js +0 -1
- package/dist/native-ts/yoga-layout/enums.d.ts +0 -117
- package/dist/native-ts/yoga-layout/index.d.ts +0 -270
- package/dist/off-7SDVMMXW.js +0 -1
- package/dist/openai-OQ6LLN5J.js +0 -1
- package/dist/openrouter-models-ZT4R2AE3.js +0 -1
- package/dist/openrouter-sync-ARMVWY7S.js +0 -1
- package/dist/plugin-handler-GJISMH5Q.js +0 -11
- package/dist/plugins/gitOps.d.ts +0 -23
- package/dist/plugins/installedPlugins.d.ts +0 -15
- package/dist/plugins/knownMarketplaces.d.ts +0 -10
- package/dist/plugins/loadPluginHooks.d.ts +0 -52
- package/dist/plugins/marketplaceManager.d.ts +0 -49
- package/dist/plugins/parseMarketplaceInput.d.ts +0 -16
- package/dist/plugins/pluginCommandHook.d.ts +0 -54
- package/dist/plugins/pluginCommandsLoader.d.ts +0 -25
- package/dist/plugins/pluginInstaller.d.ts +0 -36
- package/dist/plugins/schemas.d.ts +0 -9
- package/dist/plugins/types.d.ts +0 -75
- package/dist/plugins/varRewrite.d.ts +0 -42
- package/dist/preset/index.d.ts +0 -60
- package/dist/product/define.d.ts +0 -60
- package/dist/product/index.d.ts +0 -5
- package/dist/product/index.js +0 -1
- package/dist/product/types.d.ts +0 -111
- package/dist/prompt/composer.d.ts +0 -42
- package/dist/prompt/instruction-scanner.d.ts +0 -54
- package/dist/prompt/section-cache.d.ts +0 -15
- package/dist/prompt/section-loader.d.ts +0 -26
- package/dist/protocol/client.d.ts +0 -64
- package/dist/protocol/helpers.d.ts +0 -42
- package/dist/protocol/index.d.ts +0 -4
- package/dist/protocol/server.d.ts +0 -51
- package/dist/protocol/transport.d.ts +0 -36
- package/dist/protocol/types.d.ts +0 -192
- package/dist/react-compiler-runtime-shim.d.ts +0 -1
- package/dist/remote/bridge.d.ts +0 -37
- package/dist/render/Ansi.d.ts +0 -10
- package/dist/render/bidi.d.ts +0 -15
- package/dist/render/clearTerminal.d.ts +0 -19
- package/dist/render/colorize.d.ts +0 -16
- package/dist/render/components/AlternateScreen.d.ts +0 -21
- package/dist/render/components/App.d.ts +0 -71
- package/dist/render/components/AppContext.d.ts +0 -11
- package/dist/render/components/Box.d.ts +0 -49
- package/dist/render/components/Button.d.ts +0 -36
- package/dist/render/components/ClockContext.d.ts +0 -9
- package/dist/render/components/CursorDeclarationContext.d.ts +0 -22
- package/dist/render/components/ErrorOverview.d.ts +0 -5
- package/dist/render/components/Link.d.ts +0 -7
- package/dist/render/components/Newline.d.ts +0 -12
- package/dist/render/components/NoSelect.d.ts +0 -19
- package/dist/render/components/RawAnsi.d.ts +0 -16
- package/dist/render/components/ScrollBox.d.ts +0 -78
- package/dist/render/components/Spacer.d.ts +0 -5
- package/dist/render/components/Static.d.ts +0 -23
- package/dist/render/components/StdinContext.d.ts +0 -27
- package/dist/render/components/TerminalFocusContext.d.ts +0 -10
- package/dist/render/components/TerminalSizeContext.d.ts +0 -5
- package/dist/render/components/Text.d.ts +0 -55
- package/dist/render/constants.d.ts +0 -1
- package/dist/render/cursor.d.ts +0 -8
- package/dist/render/devtools.d.ts +0 -9
- package/dist/render/dom.d.ts +0 -77
- package/dist/render/events/click-event.d.ts +0 -31
- package/dist/render/events/dispatcher.d.ts +0 -40
- package/dist/render/events/emitter.d.ts +0 -5
- package/dist/render/events/event-handlers.d.ts +0 -46
- package/dist/render/events/event.d.ts +0 -5
- package/dist/render/events/focus-event.d.ts +0 -13
- package/dist/render/events/input-event.d.ts +0 -30
- package/dist/render/events/keyboard-event.d.ts +0 -19
- package/dist/render/events/paste-event.d.ts +0 -8
- package/dist/render/events/resize-event.d.ts +0 -9
- package/dist/render/events/terminal-event.d.ts +0 -54
- package/dist/render/events/terminal-focus-event.d.ts +0 -13
- package/dist/render/focus.d.ts +0 -43
- package/dist/render/frame.d.ts +0 -95
- package/dist/render/get-max-width.d.ts +0 -17
- package/dist/render/hit-test.d.ts +0 -33
- package/dist/render/hooks/use-animation-frame.d.ts +0 -26
- package/dist/render/hooks/use-app.d.ts +0 -5
- package/dist/render/hooks/use-declared-cursor.d.ts +0 -26
- package/dist/render/hooks/use-input.d.ts +0 -37
- package/dist/render/hooks/use-interval.d.ts +0 -18
- package/dist/render/hooks/use-search-highlight.d.ts +0 -30
- package/dist/render/hooks/use-selection.d.ts +0 -39
- package/dist/render/hooks/use-stdin.d.ts +0 -5
- package/dist/render/hooks/use-tab-status.d.ts +0 -13
- package/dist/render/hooks/use-terminal-focus.d.ts +0 -10
- package/dist/render/hooks/use-terminal-title.d.ts +0 -12
- package/dist/render/hooks/use-terminal-viewport.d.ts +0 -29
- package/dist/render/index.d.ts +0 -30
- package/dist/render/ink.d.ts +0 -391
- package/dist/render/instances.d.ts +0 -3
- package/dist/render/layout/engine.d.ts +0 -2
- package/dist/render/layout/geometry.d.ts +0 -30
- package/dist/render/layout/node.d.ts +0 -125
- package/dist/render/layout/yoga.d.ts +0 -56
- package/dist/render/line-width-cache.d.ts +0 -1
- package/dist/render/log-update.d.ts +0 -28
- package/dist/render/measure-element.d.ts +0 -16
- package/dist/render/measure-text.d.ts +0 -6
- package/dist/render/node-cache.d.ts +0 -20
- package/dist/render/optimizer.d.ts +0 -15
- package/dist/render/output.d.ts +0 -119
- package/dist/render/parse-keypress.d.ts +0 -111
- package/dist/render/reconciler.d.ts +0 -11
- package/dist/render/render-border.d.ts +0 -24
- package/dist/render/render-node-to-output.d.ts +0 -45
- package/dist/render/render-to-screen.d.ts +0 -46
- package/dist/render/renderer.d.ts +0 -14
- package/dist/render/root.d.ts +0 -74
- package/dist/render/screen.d.ts +0 -269
- package/dist/render/searchHighlight.d.ts +0 -20
- package/dist/render/selection.d.ts +0 -229
- package/dist/render/squash-text-nodes.d.ts +0 -22
- package/dist/render/stringWidth.d.ts +0 -1
- package/dist/render/styles.d.ts +0 -306
- package/dist/render/supports-hyperlinks.d.ts +0 -13
- package/dist/render/tabstops.d.ts +0 -1
- package/dist/render/terminal-focus-state.d.ts +0 -6
- package/dist/render/terminal-querier.d.ts +0 -129
- package/dist/render/terminal.d.ts +0 -46
- package/dist/render/termio/ansi.d.ts +0 -65
- package/dist/render/termio/csi.d.ts +0 -165
- package/dist/render/termio/dec.d.ts +0 -37
- package/dist/render/termio/esc.d.ts +0 -12
- package/dist/render/termio/osc.d.ts +0 -173
- package/dist/render/termio/parser.d.ts +0 -35
- package/dist/render/termio/sgr.d.ts +0 -8
- package/dist/render/termio/tokenize.d.ts +0 -45
- package/dist/render/termio/types.d.ts +0 -190
- package/dist/render/termio.d.ts +0 -24
- package/dist/render/useTerminalNotification.d.ts +0 -28
- package/dist/render/warn.d.ts +0 -1
- package/dist/render/widest-line.d.ts +0 -1
- package/dist/render/wrap-text.d.ts +0 -2
- package/dist/render/wrapAnsi.d.ts +0 -7
- package/dist/run/ArtifactTracker.d.ts +0 -38
- package/dist/run/CheckpointWriter.d.ts +0 -53
- package/dist/run/EngineRunner.d.ts +0 -72
- package/dist/run/Evaluator.d.ts +0 -56
- package/dist/run/FileRunStore.d.ts +0 -39
- package/dist/run/Heartbeat.d.ts +0 -54
- package/dist/run/RunApprovalBackend.d.ts +0 -53
- package/dist/run/RunLock.d.ts +0 -40
- package/dist/run/RunManager.d.ts +0 -82
- package/dist/run/RunQueue.d.ts +0 -27
- package/dist/run/RunStore.d.ts +0 -25
- package/dist/run/factory.d.ts +0 -63
- package/dist/run/index.d.ts +0 -17
- package/dist/run/index.js +0 -1
- package/dist/run/types.d.ts +0 -136
- package/dist/seatbelt-L54CNI2Y.js +0 -37
- package/dist/services/analytics.d.ts +0 -29
- package/dist/services/auto-dream.d.ts +0 -35
- package/dist/services/diagnostics.d.ts +0 -41
- package/dist/services/extract-memories.d.ts +0 -27
- package/dist/services/index.d.ts +0 -11
- package/dist/services/memory-orchestrator.d.ts +0 -39
- package/dist/services/notifier.d.ts +0 -25
- package/dist/services/oauth.d.ts +0 -27
- package/dist/services/session-memory.d.ts +0 -37
- package/dist/session/file-history.d.ts +0 -41
- package/dist/session/memory.d.ts +0 -65
- package/dist/session/session-manager.d.ts +0 -28
- package/dist/session/transcript.d.ts +0 -39
- package/dist/session-manager-AGWS5SMJ.js +0 -1
- package/dist/settings/manager.d.ts +0 -36
- package/dist/settings/schema.d.ts +0 -1123
- package/dist/skills/frontmatter.d.ts +0 -13
- package/dist/skills/index.d.ts +0 -7
- package/dist/skills/scanner.d.ts +0 -20
- package/dist/tool-summary-HJX6RHG4.js +0 -2
- package/dist/tool-system/builtin/agent-notifications.d.ts +0 -55
- package/dist/tool-system/builtin/agent-registry.d.ts +0 -67
- package/dist/tool-system/builtin/agent-transcript-translator.d.ts +0 -22
- package/dist/tool-system/builtin/agent.d.ts +0 -16
- package/dist/tool-system/builtin/apply-patch/applier.d.ts +0 -26
- package/dist/tool-system/builtin/apply-patch/index.d.ts +0 -19
- package/dist/tool-system/builtin/apply-patch/parser.d.ts +0 -17
- package/dist/tool-system/builtin/apply-patch/seek-sequence.d.ts +0 -18
- package/dist/tool-system/builtin/apply-patch/types.d.ts +0 -49
- package/dist/tool-system/builtin/arena.d.ts +0 -31
- package/dist/tool-system/builtin/ask-user.d.ts +0 -20
- package/dist/tool-system/builtin/bash.d.ts +0 -12
- package/dist/tool-system/builtin/brief.d.ts +0 -6
- package/dist/tool-system/builtin/config.d.ts +0 -6
- package/dist/tool-system/builtin/cron.d.ts +0 -10
- package/dist/tool-system/builtin/edit.d.ts +0 -6
- package/dist/tool-system/builtin/file-cache.d.ts +0 -11
- package/dist/tool-system/builtin/glob.d.ts +0 -6
- package/dist/tool-system/builtin/grep.d.ts +0 -6
- package/dist/tool-system/builtin/index.d.ts +0 -20
- package/dist/tool-system/builtin/lsp.d.ts +0 -6
- package/dist/tool-system/builtin/mcp-tools.d.ts +0 -10
- package/dist/tool-system/builtin/notebook-edit.d.ts +0 -6
- package/dist/tool-system/builtin/plan.d.ts +0 -18
- package/dist/tool-system/builtin/powershell.d.ts +0 -6
- package/dist/tool-system/builtin/read.d.ts +0 -6
- package/dist/tool-system/builtin/remote-trigger.d.ts +0 -6
- package/dist/tool-system/builtin/repl.d.ts +0 -6
- package/dist/tool-system/builtin/send-message.d.ts +0 -6
- package/dist/tool-system/builtin/skill-prompt.d.ts +0 -7
- package/dist/tool-system/builtin/skill.d.ts +0 -8
- package/dist/tool-system/builtin/sleep.d.ts +0 -6
- package/dist/tool-system/builtin/task.d.ts +0 -51
- package/dist/tool-system/builtin/tool-search.d.ts +0 -11
- package/dist/tool-system/builtin/web-fetch.d.ts +0 -6
- package/dist/tool-system/builtin/web-search.d.ts +0 -6
- package/dist/tool-system/builtin/worktree.d.ts +0 -10
- package/dist/tool-system/builtin/write.d.ts +0 -6
- package/dist/tool-system/context.d.ts +0 -133
- package/dist/tool-system/executor.d.ts +0 -49
- package/dist/tool-system/investigation-guard.d.ts +0 -46
- package/dist/tool-system/mcp-manager.d.ts +0 -50
- package/dist/tool-system/permission.d.ts +0 -104
- package/dist/tool-system/registry.d.ts +0 -32
- package/dist/tool-system/sandbox/bwrap.d.ts +0 -13
- package/dist/tool-system/sandbox/index.d.ts +0 -78
- package/dist/tool-system/sandbox/off.d.ts +0 -2
- package/dist/tool-system/sandbox/seatbelt.d.ts +0 -18
- package/dist/tool-system/task-guard.d.ts +0 -30
- package/dist/tool-system/validation.d.ts +0 -5
- package/dist/types.d.ts +0 -356
- package/dist/ui/App.d.ts +0 -14
- package/dist/ui/components/AgentBlock.d.ts +0 -35
- package/dist/ui/components/AgentDock.d.ts +0 -36
- package/dist/ui/components/AskUserPrompt.d.ts +0 -14
- package/dist/ui/components/BabyHand.d.ts +0 -1
- package/dist/ui/components/Banner.d.ts +0 -8
- package/dist/ui/components/CodeBlock.d.ts +0 -7
- package/dist/ui/components/CommandInput.d.ts +0 -24
- package/dist/ui/components/ContextUsageBar.d.ts +0 -7
- package/dist/ui/components/DiffLine.d.ts +0 -33
- package/dist/ui/components/DiffView.d.ts +0 -6
- package/dist/ui/components/DogLogo.d.ts +0 -1
- package/dist/ui/components/FullscreenLayout.d.ts +0 -51
- package/dist/ui/components/KunHead.d.ts +0 -1
- package/dist/ui/components/KunLogo.d.ts +0 -1
- package/dist/ui/components/MessageContent.d.ts +0 -26
- package/dist/ui/components/MessageRow.d.ts +0 -54
- package/dist/ui/components/ModelManager.d.ts +0 -68
- package/dist/ui/components/ModelSelector.d.ts +0 -10
- package/dist/ui/components/OnboardingPrompt.d.ts +0 -16
- package/dist/ui/components/PermissionDialog.d.ts +0 -8
- package/dist/ui/components/PermissionPrompt.d.ts +0 -11
- package/dist/ui/components/ProviderModelFlow.d.ts +0 -58
- package/dist/ui/components/ScrollView.d.ts +0 -34
- package/dist/ui/components/SessionPicker.d.ts +0 -16
- package/dist/ui/components/Spinner.d.ts +0 -8
- package/dist/ui/components/SpinnerWithVerb.d.ts +0 -19
- package/dist/ui/components/StatusLine.d.ts +0 -28
- package/dist/ui/components/StructuredDiff.d.ts +0 -8
- package/dist/ui/components/TaskList.d.ts +0 -6
- package/dist/ui/components/TextInput.d.ts +0 -17
- package/dist/ui/components/ThemedBox.d.ts +0 -19
- package/dist/ui/components/ThemedText.d.ts +0 -26
- package/dist/ui/components/ToolCall.d.ts +0 -28
- package/dist/ui/components/UpdateBanner.d.ts +0 -1
- package/dist/ui/components/VirtualMessageList.d.ts +0 -43
- package/dist/ui/components/WelcomeTips.d.ts +0 -5
- package/dist/ui/dev-seed.d.ts +0 -1
- package/dist/ui/fullscreen-mode.d.ts +0 -9
- package/dist/ui/hooks/useCostSummary.d.ts +0 -1
- package/dist/ui/hooks/useVirtualScroll.d.ts +0 -101
- package/dist/ui/index.d.ts +0 -12
- package/dist/ui/input-history.d.ts +0 -61
- package/dist/ui/onboarding-runner.d.ts +0 -2
- package/dist/ui/perf-probes.d.ts +0 -22
- package/dist/ui/query-guard.d.ts +0 -35
- package/dist/ui/slice-anchor.d.ts +0 -44
- package/dist/ui/store.d.ts +0 -108
- package/dist/ui/terminal-renderer.d.ts +0 -45
- package/dist/ui/theme.d.ts +0 -36
- package/dist/ui/vim-mode.d.ts +0 -25
- package/dist/updater-OCNU2K2Z.js +0 -1
- package/dist/utils/debug.d.ts +0 -41
- package/dist/utils/earlyInput.d.ts +0 -43
- package/dist/utils/env.d.ts +0 -24
- package/dist/utils/envUtils.d.ts +0 -51
- package/dist/utils/execFileNoThrow.d.ts +0 -39
- package/dist/utils/format.d.ts +0 -44
- package/dist/utils/fullscreen.d.ts +0 -47
- package/dist/utils/intl.d.ts +0 -22
- package/dist/utils/lockfile.d.ts +0 -15
- package/dist/utils/semver.d.ts +0 -6
- package/dist/utils/sliceAnsi.d.ts +0 -12
- package/dist/utils/systemTheme.d.ts +0 -40
- package/dist/utils/task-sanitizer.d.ts +0 -6
- package/dist/utils/theme.d.ts +0 -91
- package/dist/utils/toolDisplay.d.ts +0 -31
- package/dist/utils/truncate.d.ts +0 -40
- package/dist/voice/index.d.ts +0 -35
package/dist/render/styles.d.ts
DELETED
|
@@ -1,306 +0,0 @@
|
|
|
1
|
-
import { type LayoutNode } from './layout/node.js';
|
|
2
|
-
import type { BorderStyle, BorderTextOptions } from './render-border.js';
|
|
3
|
-
export type RGBColor = `rgb(${number},${number},${number})`;
|
|
4
|
-
export type HexColor = `#${string}`;
|
|
5
|
-
export type Ansi256Color = `ansi256(${number})`;
|
|
6
|
-
export type AnsiColor = 'ansi:black' | 'ansi:red' | 'ansi:green' | 'ansi:yellow' | 'ansi:blue' | 'ansi:magenta' | 'ansi:cyan' | 'ansi:white' | 'ansi:blackBright' | 'ansi:redBright' | 'ansi:greenBright' | 'ansi:yellowBright' | 'ansi:blueBright' | 'ansi:magentaBright' | 'ansi:cyanBright' | 'ansi:whiteBright';
|
|
7
|
-
/** Raw color value - not a theme key */
|
|
8
|
-
export type Color = RGBColor | HexColor | Ansi256Color | AnsiColor;
|
|
9
|
-
/**
|
|
10
|
-
* Structured text styling properties.
|
|
11
|
-
* Used to style text without relying on ANSI string transforms.
|
|
12
|
-
* Colors are raw values - theme resolution happens at the component layer.
|
|
13
|
-
*/
|
|
14
|
-
export type TextStyles = {
|
|
15
|
-
readonly color?: Color;
|
|
16
|
-
readonly backgroundColor?: Color;
|
|
17
|
-
readonly dim?: boolean;
|
|
18
|
-
readonly bold?: boolean;
|
|
19
|
-
readonly italic?: boolean;
|
|
20
|
-
readonly underline?: boolean;
|
|
21
|
-
readonly strikethrough?: boolean;
|
|
22
|
-
readonly inverse?: boolean;
|
|
23
|
-
};
|
|
24
|
-
export type Styles = {
|
|
25
|
-
readonly textWrap?: 'wrap' | 'wrap-trim' | 'end' | 'middle' | 'truncate-end' | 'truncate' | 'truncate-middle' | 'truncate-start';
|
|
26
|
-
readonly position?: 'absolute' | 'relative';
|
|
27
|
-
readonly top?: number | `${number}%`;
|
|
28
|
-
readonly bottom?: number | `${number}%`;
|
|
29
|
-
readonly left?: number | `${number}%`;
|
|
30
|
-
readonly right?: number | `${number}%`;
|
|
31
|
-
/**
|
|
32
|
-
* Size of the gap between an element's columns.
|
|
33
|
-
*/
|
|
34
|
-
readonly columnGap?: number;
|
|
35
|
-
/**
|
|
36
|
-
* Size of the gap between element's rows.
|
|
37
|
-
*/
|
|
38
|
-
readonly rowGap?: number;
|
|
39
|
-
/**
|
|
40
|
-
* Size of the gap between an element's columns and rows. Shorthand for `columnGap` and `rowGap`.
|
|
41
|
-
*/
|
|
42
|
-
readonly gap?: number;
|
|
43
|
-
/**
|
|
44
|
-
* Margin on all sides. Equivalent to setting `marginTop`, `marginBottom`, `marginLeft` and `marginRight`.
|
|
45
|
-
*/
|
|
46
|
-
readonly margin?: number;
|
|
47
|
-
/**
|
|
48
|
-
* Horizontal margin. Equivalent to setting `marginLeft` and `marginRight`.
|
|
49
|
-
*/
|
|
50
|
-
readonly marginX?: number;
|
|
51
|
-
/**
|
|
52
|
-
* Vertical margin. Equivalent to setting `marginTop` and `marginBottom`.
|
|
53
|
-
*/
|
|
54
|
-
readonly marginY?: number;
|
|
55
|
-
/**
|
|
56
|
-
* Top margin.
|
|
57
|
-
*/
|
|
58
|
-
readonly marginTop?: number;
|
|
59
|
-
/**
|
|
60
|
-
* Bottom margin.
|
|
61
|
-
*/
|
|
62
|
-
readonly marginBottom?: number;
|
|
63
|
-
/**
|
|
64
|
-
* Left margin.
|
|
65
|
-
*/
|
|
66
|
-
readonly marginLeft?: number;
|
|
67
|
-
/**
|
|
68
|
-
* Right margin.
|
|
69
|
-
*/
|
|
70
|
-
readonly marginRight?: number;
|
|
71
|
-
/**
|
|
72
|
-
* Padding on all sides. Equivalent to setting `paddingTop`, `paddingBottom`, `paddingLeft` and `paddingRight`.
|
|
73
|
-
*/
|
|
74
|
-
readonly padding?: number;
|
|
75
|
-
/**
|
|
76
|
-
* Horizontal padding. Equivalent to setting `paddingLeft` and `paddingRight`.
|
|
77
|
-
*/
|
|
78
|
-
readonly paddingX?: number;
|
|
79
|
-
/**
|
|
80
|
-
* Vertical padding. Equivalent to setting `paddingTop` and `paddingBottom`.
|
|
81
|
-
*/
|
|
82
|
-
readonly paddingY?: number;
|
|
83
|
-
/**
|
|
84
|
-
* Top padding.
|
|
85
|
-
*/
|
|
86
|
-
readonly paddingTop?: number;
|
|
87
|
-
/**
|
|
88
|
-
* Bottom padding.
|
|
89
|
-
*/
|
|
90
|
-
readonly paddingBottom?: number;
|
|
91
|
-
/**
|
|
92
|
-
* Left padding.
|
|
93
|
-
*/
|
|
94
|
-
readonly paddingLeft?: number;
|
|
95
|
-
/**
|
|
96
|
-
* Right padding.
|
|
97
|
-
*/
|
|
98
|
-
readonly paddingRight?: number;
|
|
99
|
-
/**
|
|
100
|
-
* This property defines the ability for a flex item to grow if necessary.
|
|
101
|
-
* See [flex-grow](https://css-tricks.com/almanac/properties/f/flex-grow/).
|
|
102
|
-
*/
|
|
103
|
-
readonly flexGrow?: number;
|
|
104
|
-
/**
|
|
105
|
-
* It specifies the “flex shrink factor”, which determines how much the flex item will shrink relative to the rest of the flex items in the flex container when there isn’t enough space on the row.
|
|
106
|
-
* See [flex-shrink](https://css-tricks.com/almanac/properties/f/flex-shrink/).
|
|
107
|
-
*/
|
|
108
|
-
readonly flexShrink?: number;
|
|
109
|
-
/**
|
|
110
|
-
* It establishes the main-axis, thus defining the direction flex items are placed in the flex container.
|
|
111
|
-
* See [flex-direction](https://css-tricks.com/almanac/properties/f/flex-direction/).
|
|
112
|
-
*/
|
|
113
|
-
readonly flexDirection?: 'row' | 'column' | 'row-reverse' | 'column-reverse';
|
|
114
|
-
/**
|
|
115
|
-
* It specifies the initial size of the flex item, before any available space is distributed according to the flex factors.
|
|
116
|
-
* See [flex-basis](https://css-tricks.com/almanac/properties/f/flex-basis/).
|
|
117
|
-
*/
|
|
118
|
-
readonly flexBasis?: number | string;
|
|
119
|
-
/**
|
|
120
|
-
* It defines whether the flex items are forced in a single line or can be flowed into multiple lines. If set to multiple lines, it also defines the cross-axis which determines the direction new lines are stacked in.
|
|
121
|
-
* See [flex-wrap](https://css-tricks.com/almanac/properties/f/flex-wrap/).
|
|
122
|
-
*/
|
|
123
|
-
readonly flexWrap?: 'nowrap' | 'wrap' | 'wrap-reverse';
|
|
124
|
-
/**
|
|
125
|
-
* The align-items property defines the default behavior for how items are laid out along the cross axis (perpendicular to the main axis).
|
|
126
|
-
* See [align-items](https://css-tricks.com/almanac/properties/a/align-items/).
|
|
127
|
-
*/
|
|
128
|
-
readonly alignItems?: 'flex-start' | 'center' | 'flex-end' | 'stretch';
|
|
129
|
-
/**
|
|
130
|
-
* It makes possible to override the align-items value for specific flex items.
|
|
131
|
-
* See [align-self](https://css-tricks.com/almanac/properties/a/align-self/).
|
|
132
|
-
*/
|
|
133
|
-
readonly alignSelf?: 'flex-start' | 'center' | 'flex-end' | 'auto';
|
|
134
|
-
/**
|
|
135
|
-
* It defines the alignment along the main axis.
|
|
136
|
-
* See [justify-content](https://css-tricks.com/almanac/properties/j/justify-content/).
|
|
137
|
-
*/
|
|
138
|
-
readonly justifyContent?: 'flex-start' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly' | 'center';
|
|
139
|
-
/**
|
|
140
|
-
* Width of the element in spaces.
|
|
141
|
-
* You can also set it in percent, which will calculate the width based on the width of parent element.
|
|
142
|
-
*/
|
|
143
|
-
readonly width?: number | string;
|
|
144
|
-
/**
|
|
145
|
-
* Height of the element in lines (rows).
|
|
146
|
-
* You can also set it in percent, which will calculate the height based on the height of parent element.
|
|
147
|
-
*/
|
|
148
|
-
readonly height?: number | string;
|
|
149
|
-
/**
|
|
150
|
-
* Sets a minimum width of the element.
|
|
151
|
-
*/
|
|
152
|
-
readonly minWidth?: number | string;
|
|
153
|
-
/**
|
|
154
|
-
* Sets a minimum height of the element.
|
|
155
|
-
*/
|
|
156
|
-
readonly minHeight?: number | string;
|
|
157
|
-
/**
|
|
158
|
-
* Sets a maximum width of the element.
|
|
159
|
-
*/
|
|
160
|
-
readonly maxWidth?: number | string;
|
|
161
|
-
/**
|
|
162
|
-
* Sets a maximum height of the element.
|
|
163
|
-
*/
|
|
164
|
-
readonly maxHeight?: number | string;
|
|
165
|
-
/**
|
|
166
|
-
* Set this property to `none` to hide the element.
|
|
167
|
-
*/
|
|
168
|
-
readonly display?: 'flex' | 'none';
|
|
169
|
-
/**
|
|
170
|
-
* Add a border with a specified style.
|
|
171
|
-
* If `borderStyle` is `undefined` (which it is by default), no border will be added.
|
|
172
|
-
*/
|
|
173
|
-
readonly borderStyle?: BorderStyle;
|
|
174
|
-
/**
|
|
175
|
-
* Determines whether top border is visible.
|
|
176
|
-
*
|
|
177
|
-
* @default true
|
|
178
|
-
*/
|
|
179
|
-
readonly borderTop?: boolean;
|
|
180
|
-
/**
|
|
181
|
-
* Determines whether bottom border is visible.
|
|
182
|
-
*
|
|
183
|
-
* @default true
|
|
184
|
-
*/
|
|
185
|
-
readonly borderBottom?: boolean;
|
|
186
|
-
/**
|
|
187
|
-
* Determines whether left border is visible.
|
|
188
|
-
*
|
|
189
|
-
* @default true
|
|
190
|
-
*/
|
|
191
|
-
readonly borderLeft?: boolean;
|
|
192
|
-
/**
|
|
193
|
-
* Determines whether right border is visible.
|
|
194
|
-
*
|
|
195
|
-
* @default true
|
|
196
|
-
*/
|
|
197
|
-
readonly borderRight?: boolean;
|
|
198
|
-
/**
|
|
199
|
-
* Change border color.
|
|
200
|
-
* Shorthand for setting `borderTopColor`, `borderRightColor`, `borderBottomColor` and `borderLeftColor`.
|
|
201
|
-
*/
|
|
202
|
-
readonly borderColor?: Color;
|
|
203
|
-
/**
|
|
204
|
-
* Change top border color.
|
|
205
|
-
* Accepts raw color values (rgb, hex, ansi).
|
|
206
|
-
*/
|
|
207
|
-
readonly borderTopColor?: Color;
|
|
208
|
-
/**
|
|
209
|
-
* Change bottom border color.
|
|
210
|
-
* Accepts raw color values (rgb, hex, ansi).
|
|
211
|
-
*/
|
|
212
|
-
readonly borderBottomColor?: Color;
|
|
213
|
-
/**
|
|
214
|
-
* Change left border color.
|
|
215
|
-
* Accepts raw color values (rgb, hex, ansi).
|
|
216
|
-
*/
|
|
217
|
-
readonly borderLeftColor?: Color;
|
|
218
|
-
/**
|
|
219
|
-
* Change right border color.
|
|
220
|
-
* Accepts raw color values (rgb, hex, ansi).
|
|
221
|
-
*/
|
|
222
|
-
readonly borderRightColor?: Color;
|
|
223
|
-
/**
|
|
224
|
-
* Dim the border color.
|
|
225
|
-
* Shorthand for setting `borderTopDimColor`, `borderBottomDimColor`, `borderLeftDimColor` and `borderRightDimColor`.
|
|
226
|
-
*
|
|
227
|
-
* @default false
|
|
228
|
-
*/
|
|
229
|
-
readonly borderDimColor?: boolean;
|
|
230
|
-
/**
|
|
231
|
-
* Dim the top border color.
|
|
232
|
-
*
|
|
233
|
-
* @default false
|
|
234
|
-
*/
|
|
235
|
-
readonly borderTopDimColor?: boolean;
|
|
236
|
-
/**
|
|
237
|
-
* Dim the bottom border color.
|
|
238
|
-
*
|
|
239
|
-
* @default false
|
|
240
|
-
*/
|
|
241
|
-
readonly borderBottomDimColor?: boolean;
|
|
242
|
-
/**
|
|
243
|
-
* Dim the left border color.
|
|
244
|
-
*
|
|
245
|
-
* @default false
|
|
246
|
-
*/
|
|
247
|
-
readonly borderLeftDimColor?: boolean;
|
|
248
|
-
/**
|
|
249
|
-
* Dim the right border color.
|
|
250
|
-
*
|
|
251
|
-
* @default false
|
|
252
|
-
*/
|
|
253
|
-
readonly borderRightDimColor?: boolean;
|
|
254
|
-
/**
|
|
255
|
-
* Add text within the border. Only applies to top or bottom borders.
|
|
256
|
-
*/
|
|
257
|
-
readonly borderText?: BorderTextOptions;
|
|
258
|
-
/**
|
|
259
|
-
* Background color for the box. Fills the interior with background-colored
|
|
260
|
-
* spaces and is inherited by child text nodes as their default background.
|
|
261
|
-
*/
|
|
262
|
-
readonly backgroundColor?: Color;
|
|
263
|
-
/**
|
|
264
|
-
* Fill the box's interior (padding included) with spaces before
|
|
265
|
-
* rendering children, so nothing behind it shows through. Like
|
|
266
|
-
* `backgroundColor` but without emitting any SGR — the terminal's
|
|
267
|
-
* default background is used. Useful for absolute-positioned overlays
|
|
268
|
-
* where Box padding/gaps would otherwise be transparent.
|
|
269
|
-
*/
|
|
270
|
-
readonly opaque?: boolean;
|
|
271
|
-
/**
|
|
272
|
-
* Behavior for an element's overflow in both directions.
|
|
273
|
-
* 'scroll' constrains the container's size (children do not expand it)
|
|
274
|
-
* and enables scrollTop-based virtualized scrolling at render time.
|
|
275
|
-
*
|
|
276
|
-
* @default 'visible'
|
|
277
|
-
*/
|
|
278
|
-
readonly overflow?: 'visible' | 'hidden' | 'scroll';
|
|
279
|
-
/**
|
|
280
|
-
* Behavior for an element's overflow in horizontal direction.
|
|
281
|
-
*
|
|
282
|
-
* @default 'visible'
|
|
283
|
-
*/
|
|
284
|
-
readonly overflowX?: 'visible' | 'hidden' | 'scroll';
|
|
285
|
-
/**
|
|
286
|
-
* Behavior for an element's overflow in vertical direction.
|
|
287
|
-
*
|
|
288
|
-
* @default 'visible'
|
|
289
|
-
*/
|
|
290
|
-
readonly overflowY?: 'visible' | 'hidden' | 'scroll';
|
|
291
|
-
/**
|
|
292
|
-
* Exclude this box's cells from text selection in fullscreen mode.
|
|
293
|
-
* Cells inside this region are skipped by both the selection highlight
|
|
294
|
-
* and the copied text — useful for fencing off gutters (line numbers,
|
|
295
|
-
* diff sigils) so click-drag over a diff yields clean copyable code.
|
|
296
|
-
* Only affects alt-screen text selection; no-op otherwise.
|
|
297
|
-
*
|
|
298
|
-
* `'from-left-edge'` extends the exclusion from column 0 to the box's
|
|
299
|
-
* right edge for every row it occupies — this covers any upstream
|
|
300
|
-
* indentation (tool message prefix, tree lines) so a multi-row drag
|
|
301
|
-
* doesn't pick up leading whitespace from middle rows.
|
|
302
|
-
*/
|
|
303
|
-
readonly noSelect?: boolean | 'from-left-edge';
|
|
304
|
-
};
|
|
305
|
-
declare const styles: (node: LayoutNode, style?: Styles, resolvedStyle?: Styles) => void;
|
|
306
|
-
export default styles;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export declare const ADDITIONAL_HYPERLINK_TERMINALS: string[];
|
|
2
|
-
type EnvLike = Record<string, string | undefined>;
|
|
3
|
-
type SupportsHyperlinksOptions = {
|
|
4
|
-
env?: EnvLike;
|
|
5
|
-
stdoutSupported?: boolean;
|
|
6
|
-
};
|
|
7
|
-
/**
|
|
8
|
-
* Returns whether stdout supports OSC 8 hyperlinks.
|
|
9
|
-
* Extends the supports-hyperlinks library with additional terminal detection.
|
|
10
|
-
* @param options Optional overrides for testing (env, stdoutSupported)
|
|
11
|
-
*/
|
|
12
|
-
export declare function supportsHyperlinks(options?: SupportsHyperlinksOptions): boolean;
|
|
13
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function expandTabs(text: string, interval?: number): string;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export type TerminalFocusState = 'focused' | 'blurred' | 'unknown';
|
|
2
|
-
export declare function setTerminalFocused(v: boolean): void;
|
|
3
|
-
export declare function getTerminalFocused(): boolean;
|
|
4
|
-
export declare function getTerminalFocusState(): TerminalFocusState;
|
|
5
|
-
export declare function subscribeTerminalFocus(cb: () => void): () => void;
|
|
6
|
-
export declare function resetTerminalFocusState(): void;
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Query the terminal and await responses without timeouts.
|
|
3
|
-
*
|
|
4
|
-
* Terminal queries (DECRQM, DA1, OSC 11, etc.) share the stdin stream
|
|
5
|
-
* with keyboard input. Response sequences are syntactically
|
|
6
|
-
* distinguishable from key events, so the input parser recognizes them
|
|
7
|
-
* and dispatches them here.
|
|
8
|
-
*
|
|
9
|
-
* To avoid timeouts, each query batch is terminated by a DA1 sentinel
|
|
10
|
-
* (CSI c) — every terminal since VT100 responds to DA1, and terminals
|
|
11
|
-
* answer queries in order. So: if your query's response arrives before
|
|
12
|
-
* DA1's, the terminal supports it; if DA1 arrives first, it doesn't.
|
|
13
|
-
*
|
|
14
|
-
* Usage:
|
|
15
|
-
* const [sync, grapheme] = await Promise.all([
|
|
16
|
-
* querier.send(decrqm(2026)),
|
|
17
|
-
* querier.send(decrqm(2027)),
|
|
18
|
-
* querier.flush(),
|
|
19
|
-
* ])
|
|
20
|
-
* // sync and grapheme are DECRPM responses or undefined if unsupported
|
|
21
|
-
*/
|
|
22
|
-
import type { TerminalResponse } from './parse-keypress.js';
|
|
23
|
-
/** A terminal query: an outbound request sequence paired with a matcher
|
|
24
|
-
* that recognizes the expected inbound response. Built by `decrqm()`,
|
|
25
|
-
* `oscColor()`, `kittyKeyboard()`, etc. */
|
|
26
|
-
export type TerminalQuery<T extends TerminalResponse = TerminalResponse> = {
|
|
27
|
-
/** Escape sequence to write to stdout */
|
|
28
|
-
request: string;
|
|
29
|
-
/** Recognizes the expected response in the inbound stream */
|
|
30
|
-
match: (r: TerminalResponse) => r is T;
|
|
31
|
-
};
|
|
32
|
-
type DecrpmResponse = Extract<TerminalResponse, {
|
|
33
|
-
type: 'decrpm';
|
|
34
|
-
}>;
|
|
35
|
-
type Da1Response = Extract<TerminalResponse, {
|
|
36
|
-
type: 'da1';
|
|
37
|
-
}>;
|
|
38
|
-
type Da2Response = Extract<TerminalResponse, {
|
|
39
|
-
type: 'da2';
|
|
40
|
-
}>;
|
|
41
|
-
type KittyResponse = Extract<TerminalResponse, {
|
|
42
|
-
type: 'kittyKeyboard';
|
|
43
|
-
}>;
|
|
44
|
-
type CursorPosResponse = Extract<TerminalResponse, {
|
|
45
|
-
type: 'cursorPosition';
|
|
46
|
-
}>;
|
|
47
|
-
type OscResponse = Extract<TerminalResponse, {
|
|
48
|
-
type: 'osc';
|
|
49
|
-
}>;
|
|
50
|
-
type XtversionResponse = Extract<TerminalResponse, {
|
|
51
|
-
type: 'xtversion';
|
|
52
|
-
}>;
|
|
53
|
-
/** DECRQM: request DEC private mode status (CSI ? mode $ p).
|
|
54
|
-
* Terminal replies with DECRPM (CSI ? mode ; status $ y) or ignores. */
|
|
55
|
-
export declare function decrqm(mode: number): TerminalQuery<DecrpmResponse>;
|
|
56
|
-
/** Primary Device Attributes query (CSI c). Every terminal answers this —
|
|
57
|
-
* used internally by flush() as a universal sentinel. Call directly if
|
|
58
|
-
* you want the DA1 params. */
|
|
59
|
-
export declare function da1(): TerminalQuery<Da1Response>;
|
|
60
|
-
/** Secondary Device Attributes query (CSI > c). Returns terminal version. */
|
|
61
|
-
export declare function da2(): TerminalQuery<Da2Response>;
|
|
62
|
-
/** Query current Kitty keyboard protocol flags (CSI ? u).
|
|
63
|
-
* Terminal replies with CSI ? flags u or ignores. */
|
|
64
|
-
export declare function kittyKeyboard(): TerminalQuery<KittyResponse>;
|
|
65
|
-
/** DECXCPR: request cursor position with DEC-private marker (CSI ? 6 n).
|
|
66
|
-
* Terminal replies with CSI ? row ; col R. The `?` marker is critical —
|
|
67
|
-
* the plain DSR form (CSI 6 n → CSI row;col R) is ambiguous with
|
|
68
|
-
* modified F3 keys (Shift+F3 = CSI 1;2 R, etc.). */
|
|
69
|
-
export declare function cursorPosition(): TerminalQuery<CursorPosResponse>;
|
|
70
|
-
/** OSC dynamic color query (e.g. OSC 11 for bg color, OSC 10 for fg).
|
|
71
|
-
* The `?` data slot asks the terminal to reply with the current value. */
|
|
72
|
-
export declare function oscColor(code: number): TerminalQuery<OscResponse>;
|
|
73
|
-
/** XTVERSION: request terminal name/version (CSI > 0 q).
|
|
74
|
-
* Terminal replies with DCS > | name ST (e.g. "xterm.js(5.5.0)") or ignores.
|
|
75
|
-
* This survives SSH — the query goes through the pty, not the environment,
|
|
76
|
-
* so it identifies the *client* terminal even when TERM_PROGRAM isn't
|
|
77
|
-
* forwarded. Used to detect xterm.js for wheel-scroll compensation. */
|
|
78
|
-
export declare function xtversion(): TerminalQuery<XtversionResponse>;
|
|
79
|
-
export declare class TerminalQuerier {
|
|
80
|
-
private stdout;
|
|
81
|
-
/**
|
|
82
|
-
* Interleaved queue of queries and sentinels in send order. Terminals
|
|
83
|
-
* respond in order, so each flush() barrier only drains queries queued
|
|
84
|
-
* before it — concurrent batches from independent callers stay isolated.
|
|
85
|
-
*/
|
|
86
|
-
private queue;
|
|
87
|
-
constructor(stdout: NodeJS.WriteStream);
|
|
88
|
-
/**
|
|
89
|
-
* Send a query and wait for its response.
|
|
90
|
-
*
|
|
91
|
-
* Resolves with the response when `query.match` matches an incoming
|
|
92
|
-
* TerminalResponse, or with `undefined` when a flush() sentinel arrives
|
|
93
|
-
* before any matching response (meaning the terminal ignored the query).
|
|
94
|
-
*
|
|
95
|
-
* Never rejects; never times out on its own. If you never call flush()
|
|
96
|
-
* and the terminal doesn't respond, the promise remains pending.
|
|
97
|
-
*/
|
|
98
|
-
send<T extends TerminalResponse>(query: TerminalQuery<T>): Promise<T | undefined>;
|
|
99
|
-
/**
|
|
100
|
-
* Send the DA1 sentinel. Resolves when DA1's response arrives.
|
|
101
|
-
*
|
|
102
|
-
* As a side effect, all queries still pending when DA1 arrives are
|
|
103
|
-
* resolved with `undefined` (terminal didn't respond → doesn't support
|
|
104
|
-
* the query). This is the barrier that makes send() timeout-free.
|
|
105
|
-
*
|
|
106
|
-
* Safe to call with no pending queries — still waits for a round-trip.
|
|
107
|
-
*/
|
|
108
|
-
flush(): Promise<void>;
|
|
109
|
-
/**
|
|
110
|
-
* Dispatch a response parsed from stdin. Called by App.tsx's
|
|
111
|
-
* processKeysInBatch for every `kind: 'response'` item.
|
|
112
|
-
*
|
|
113
|
-
* Matching strategy:
|
|
114
|
-
* - First, try to match a pending query (FIFO, first match wins).
|
|
115
|
-
* This lets callers send(da1()) explicitly if they want the DA1
|
|
116
|
-
* params — a separate DA1 write means the terminal sends TWO DA1
|
|
117
|
-
* responses. The first matches the explicit query; the second
|
|
118
|
-
* (unmatched) fires the sentinel.
|
|
119
|
-
* - Otherwise, if this is a DA1, fire the FIRST pending sentinel:
|
|
120
|
-
* resolve any queries queued before that sentinel with undefined
|
|
121
|
-
* (the terminal answered DA1 without answering them → unsupported)
|
|
122
|
-
* and signal its flush() completion. Only draining up to the first
|
|
123
|
-
* sentinel keeps later batches intact when multiple callers have
|
|
124
|
-
* concurrent queries in flight.
|
|
125
|
-
* - Unsolicited responses (no match, no sentinel) are silently dropped.
|
|
126
|
-
*/
|
|
127
|
-
onResponse(r: TerminalResponse): void;
|
|
128
|
-
}
|
|
129
|
-
export {};
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import type { Writable } from 'stream';
|
|
2
|
-
import type { Diff } from './frame.js';
|
|
3
|
-
export type Progress = {
|
|
4
|
-
state: 'running' | 'completed' | 'error' | 'indeterminate';
|
|
5
|
-
percentage?: number;
|
|
6
|
-
};
|
|
7
|
-
/**
|
|
8
|
-
* Checks if the terminal supports OSC 9;4 progress reporting.
|
|
9
|
-
* Supported terminals:
|
|
10
|
-
* - ConEmu (Windows) - all versions
|
|
11
|
-
* - Ghostty 1.2.0+
|
|
12
|
-
* - iTerm2 3.6.6+
|
|
13
|
-
*
|
|
14
|
-
* Note: Windows Terminal interprets OSC 9;4 as notifications, not progress.
|
|
15
|
-
*/
|
|
16
|
-
export declare function isProgressReportingAvailable(): boolean;
|
|
17
|
-
/**
|
|
18
|
-
* Checks if the terminal supports DEC mode 2026 (synchronized output).
|
|
19
|
-
* When supported, BSU/ESU sequences prevent visible flicker during redraws.
|
|
20
|
-
*/
|
|
21
|
-
export declare function isSynchronizedOutputSupported(): boolean;
|
|
22
|
-
/** Record the XTVERSION response. Called once from App.tsx when the reply
|
|
23
|
-
* arrives on stdin. No-op if already set (defend against re-probe). */
|
|
24
|
-
export declare function setXtversionName(name: string): void;
|
|
25
|
-
/** True if running in an xterm.js-based terminal (VS Code, Cursor, Windsurf
|
|
26
|
-
* integrated terminals). Combines TERM_PROGRAM env check (fast, sync, but
|
|
27
|
-
* not forwarded over SSH) with the XTVERSION probe result (async, survives
|
|
28
|
-
* SSH — query/reply goes through the pty). Early calls may miss the probe
|
|
29
|
-
* reply — call lazily (e.g. in an event handler) if SSH detection matters. */
|
|
30
|
-
export declare function isXtermJs(): boolean;
|
|
31
|
-
/** True if this terminal correctly handles extended key reporting
|
|
32
|
-
* (Kitty keyboard protocol + xterm modifyOtherKeys). */
|
|
33
|
-
export declare function supportsExtendedKeys(): boolean;
|
|
34
|
-
/** True if the terminal scrolls the viewport when it receives cursor-up
|
|
35
|
-
* sequences that reach above the visible area. On Windows, conhost's
|
|
36
|
-
* SetConsoleCursorPosition follows the cursor into scrollback
|
|
37
|
-
* (microsoft/terminal#14774), yanking users to the top of their buffer
|
|
38
|
-
* mid-stream. WT_SESSION catches WSL-in-Windows-Terminal where platform
|
|
39
|
-
* is linux but output still routes through conhost. */
|
|
40
|
-
export declare function hasCursorUpViewportYankBug(): boolean;
|
|
41
|
-
export declare const SYNC_OUTPUT_SUPPORTED: boolean;
|
|
42
|
-
export type Terminal = {
|
|
43
|
-
stdout: Writable;
|
|
44
|
-
stderr: Writable;
|
|
45
|
-
};
|
|
46
|
-
export declare function writeDiffToTerminal(terminal: Terminal, diff: Diff, skipSyncMarkers?: boolean): void;
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ANSI Control Characters and Escape Sequence Introducers
|
|
3
|
-
*
|
|
4
|
-
* Based on ECMA-48 / ANSI X3.64 standards.
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* C0 (7-bit) control characters
|
|
8
|
-
*/
|
|
9
|
-
export declare const C0: {
|
|
10
|
-
readonly NUL: 0;
|
|
11
|
-
readonly SOH: 1;
|
|
12
|
-
readonly STX: 2;
|
|
13
|
-
readonly ETX: 3;
|
|
14
|
-
readonly EOT: 4;
|
|
15
|
-
readonly ENQ: 5;
|
|
16
|
-
readonly ACK: 6;
|
|
17
|
-
readonly BEL: 7;
|
|
18
|
-
readonly BS: 8;
|
|
19
|
-
readonly HT: 9;
|
|
20
|
-
readonly LF: 10;
|
|
21
|
-
readonly VT: 11;
|
|
22
|
-
readonly FF: 12;
|
|
23
|
-
readonly CR: 13;
|
|
24
|
-
readonly SO: 14;
|
|
25
|
-
readonly SI: 15;
|
|
26
|
-
readonly DLE: 16;
|
|
27
|
-
readonly DC1: 17;
|
|
28
|
-
readonly DC2: 18;
|
|
29
|
-
readonly DC3: 19;
|
|
30
|
-
readonly DC4: 20;
|
|
31
|
-
readonly NAK: 21;
|
|
32
|
-
readonly SYN: 22;
|
|
33
|
-
readonly ETB: 23;
|
|
34
|
-
readonly CAN: 24;
|
|
35
|
-
readonly EM: 25;
|
|
36
|
-
readonly SUB: 26;
|
|
37
|
-
readonly ESC: 27;
|
|
38
|
-
readonly FS: 28;
|
|
39
|
-
readonly GS: 29;
|
|
40
|
-
readonly RS: 30;
|
|
41
|
-
readonly US: 31;
|
|
42
|
-
readonly DEL: 127;
|
|
43
|
-
};
|
|
44
|
-
export declare const ESC = "\u001B";
|
|
45
|
-
export declare const BEL = "\u0007";
|
|
46
|
-
export declare const SEP = ";";
|
|
47
|
-
/**
|
|
48
|
-
* Escape sequence type introducers (byte after ESC)
|
|
49
|
-
*/
|
|
50
|
-
export declare const ESC_TYPE: {
|
|
51
|
-
readonly CSI: 91;
|
|
52
|
-
readonly OSC: 93;
|
|
53
|
-
readonly DCS: 80;
|
|
54
|
-
readonly APC: 95;
|
|
55
|
-
readonly PM: 94;
|
|
56
|
-
readonly SOS: 88;
|
|
57
|
-
readonly ST: 92;
|
|
58
|
-
};
|
|
59
|
-
/** Check if a byte is a C0 control character */
|
|
60
|
-
export declare function isC0(byte: number): boolean;
|
|
61
|
-
/**
|
|
62
|
-
* Check if a byte is an ESC sequence final byte (0-9, :, ;, <, =, >, ?, @ through ~)
|
|
63
|
-
* ESC sequences have a wider final byte range than CSI
|
|
64
|
-
*/
|
|
65
|
-
export declare function isEscFinal(byte: number): boolean;
|