@cjhyy/code-shell 0.2.0 → 0.5.0-rc.1
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 +183 -0
- package/README.md +35 -2
- package/dist/cli.js +2 -0
- package/dist/index.d.ts +1 -67
- package/dist/index.js +1 -1
- package/package.json +25 -71
- package/dist/agent/coordinator.d.ts +0 -49
- package/dist/anthropic-OVRWAZRD.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-64T2EQD4.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-2EUIMKJA.js +0 -1
- package/dist/chunk-2GJ7H5NC.js +0 -641
- package/dist/chunk-2OD6VR4N.js +0 -2
- package/dist/chunk-3QP5BQ3L.js +0 -1
- package/dist/chunk-A4M2Y42L.js +0 -2
- package/dist/chunk-DEYFK6FP.js +0 -1
- package/dist/chunk-DTPABBSV.js +0 -2
- package/dist/chunk-EU3J7TBP.js +0 -1
- package/dist/chunk-FU7AHZNN.js +0 -1
- package/dist/chunk-L7B2ORID.js +0 -4
- package/dist/chunk-M7VU4YVY.js +0 -49
- package/dist/chunk-MGP35GKD.js +0 -254
- package/dist/chunk-MLCTC53I.js +0 -1
- package/dist/chunk-O5HFCH2U.js +0 -1
- package/dist/chunk-P6JSTIFM.js +0 -1
- package/dist/chunk-Q3RSX66I.js +0 -1
- package/dist/chunk-QTWU7UNA.js +0 -5
- package/dist/chunk-RERBX75D.js +0 -251
- package/dist/chunk-SNFAPSLA.js +0 -1
- package/dist/chunk-T222K6IV.js +0 -18
- package/dist/chunk-TKJA6W36.js +0 -3
- package/dist/chunk-VKKU4LOM.js +0 -3
- package/dist/chunk-WI6FSWGU.js +0 -1
- package/dist/chunk-XXCZE2U2.js +0 -2
- package/dist/chunk-ZSAONDT6.js +0 -2
- 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/utility-commands.d.ts +0 -5
- package/dist/cli/commands/registry.d.ts +0 -72
- 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 -399
- 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-F5FCRSB3.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-SGDUOOM4.js +0 -1
- package/dist/engine/cost-store.d.ts +0 -22
- package/dist/engine/engine.d.ts +0 -207
- 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 -97
- 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 -35
- package/dist/hooks/registry.d.ts +0 -15
- 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 -41
- package/dist/llm/token-counter.d.ts +0 -17
- package/dist/llm/types.d.ts +0 -37
- package/dist/logging/logger.d.ts +0 -88
- 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-J6FXEUEK.js +0 -1
- package/dist/mcp-manager-27EVBKRT.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-3QEADSYL.js +0 -1
- package/dist/openrouter-models-GZVCRWD2.js +0 -1
- package/dist/openrouter-sync-WG4AG5NC.js +0 -1
- package/dist/plugins/loader.d.ts +0 -72
- package/dist/plugins/types.d.ts +0 -4
- 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/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 -13
- 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 -70
- 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/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 -5
- package/dist/render/dom.d.ts +0 -76
- 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 -94
- 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 -20
- package/dist/render/ink.d.ts +0 -369
- 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 -17
- 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 -10
- 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 -1036
- package/dist/skills/index.d.ts +0 -7
- package/dist/skills/matcher.d.ts +0 -21
- package/dist/skills/scanner.d.ts +0 -30
- package/dist/tool-summary-V2B3MD5N.js +0 -2
- package/dist/tool-system/builtin/agent-registry.d.ts +0 -36
- 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.d.ts +0 -6
- 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 -110
- 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 -321
- package/dist/ui/App.d.ts +0 -14
- package/dist/ui/components/AgentBlock.d.ts +0 -32
- 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 -13
- 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/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 -18
- 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 -9
- 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 -24
- package/dist/ui/components/WelcomeTips.d.ts +0 -5
- package/dist/ui/hooks/useCostSummary.d.ts +0 -1
- 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/store.d.ts +0 -83
- 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/skills-builtin/codeshell-help.md +0 -135
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { ParsedKey } from '../parse-keypress.js';
|
|
2
|
-
import { TerminalEvent } from './terminal-event.js';
|
|
3
|
-
/**
|
|
4
|
-
* Keyboard event dispatched through the DOM tree via capture/bubble.
|
|
5
|
-
*
|
|
6
|
-
* Follows browser KeyboardEvent semantics: `key` is the literal character
|
|
7
|
-
* for printable keys ('a', '3', ' ', '/') and a multi-char name for
|
|
8
|
-
* special keys ('down', 'return', 'escape', 'f1'). The idiomatic
|
|
9
|
-
* printable-char check is `e.key.length === 1`.
|
|
10
|
-
*/
|
|
11
|
-
export declare class KeyboardEvent extends TerminalEvent {
|
|
12
|
-
readonly key: string;
|
|
13
|
-
readonly ctrl: boolean;
|
|
14
|
-
readonly shift: boolean;
|
|
15
|
-
readonly meta: boolean;
|
|
16
|
-
readonly superKey: boolean;
|
|
17
|
-
readonly fn: boolean;
|
|
18
|
-
constructor(parsedKey: ParsedKey);
|
|
19
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ResizeEvent — fired when the terminal is resized.
|
|
3
|
-
*/
|
|
4
|
-
import { TerminalEvent } from './terminal-event.js';
|
|
5
|
-
export declare class ResizeEvent extends TerminalEvent {
|
|
6
|
-
readonly columns: number;
|
|
7
|
-
readonly rows: number;
|
|
8
|
-
constructor(columns: number, rows: number);
|
|
9
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { Event } from './event.js';
|
|
2
|
-
type EventPhase = 'none' | 'capturing' | 'at_target' | 'bubbling';
|
|
3
|
-
type TerminalEventInit = {
|
|
4
|
-
bubbles?: boolean;
|
|
5
|
-
cancelable?: boolean;
|
|
6
|
-
};
|
|
7
|
-
/**
|
|
8
|
-
* Base class for all terminal events with DOM-style propagation.
|
|
9
|
-
*
|
|
10
|
-
* Extends Event so existing event types (ClickEvent, InputEvent,
|
|
11
|
-
* TerminalFocusEvent) share a common ancestor and can migrate later.
|
|
12
|
-
*
|
|
13
|
-
* Mirrors the browser's Event API: target, currentTarget, eventPhase,
|
|
14
|
-
* stopPropagation(), preventDefault(), timeStamp.
|
|
15
|
-
*/
|
|
16
|
-
export declare class TerminalEvent extends Event {
|
|
17
|
-
readonly type: string;
|
|
18
|
-
readonly timeStamp: number;
|
|
19
|
-
readonly bubbles: boolean;
|
|
20
|
-
readonly cancelable: boolean;
|
|
21
|
-
private _target;
|
|
22
|
-
private _currentTarget;
|
|
23
|
-
private _eventPhase;
|
|
24
|
-
private _propagationStopped;
|
|
25
|
-
private _defaultPrevented;
|
|
26
|
-
constructor(type: string, init?: TerminalEventInit);
|
|
27
|
-
get target(): EventTarget | null;
|
|
28
|
-
get currentTarget(): EventTarget | null;
|
|
29
|
-
get eventPhase(): EventPhase;
|
|
30
|
-
get defaultPrevented(): boolean;
|
|
31
|
-
stopPropagation(): void;
|
|
32
|
-
stopImmediatePropagation(): void;
|
|
33
|
-
preventDefault(): void;
|
|
34
|
-
/** @internal */
|
|
35
|
-
_setTarget(target: EventTarget): void;
|
|
36
|
-
/** @internal */
|
|
37
|
-
_setCurrentTarget(target: EventTarget | null): void;
|
|
38
|
-
/** @internal */
|
|
39
|
-
_setEventPhase(phase: EventPhase): void;
|
|
40
|
-
/** @internal */
|
|
41
|
-
_isPropagationStopped(): boolean;
|
|
42
|
-
/** @internal */
|
|
43
|
-
_isImmediatePropagationStopped(): boolean;
|
|
44
|
-
/**
|
|
45
|
-
* Hook for subclasses to do per-node setup before each handler fires.
|
|
46
|
-
* Default is a no-op.
|
|
47
|
-
*/
|
|
48
|
-
_prepareForTarget(_target: EventTarget): void;
|
|
49
|
-
}
|
|
50
|
-
export type EventTarget = {
|
|
51
|
-
parentNode: EventTarget | undefined;
|
|
52
|
-
_eventHandlers?: Record<string, unknown>;
|
|
53
|
-
};
|
|
54
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Event } from './event.js';
|
|
2
|
-
export type TerminalFocusEventType = 'terminalfocus' | 'terminalblur';
|
|
3
|
-
/**
|
|
4
|
-
* Event fired when the terminal window gains or loses focus.
|
|
5
|
-
*
|
|
6
|
-
* Uses DECSET 1004 focus reporting - the terminal sends:
|
|
7
|
-
* - CSI I (\x1b[I) when the terminal gains focus
|
|
8
|
-
* - CSI O (\x1b[O) when the terminal loses focus
|
|
9
|
-
*/
|
|
10
|
-
export declare class TerminalFocusEvent extends Event {
|
|
11
|
-
readonly type: TerminalFocusEventType;
|
|
12
|
-
constructor(type: TerminalFocusEventType);
|
|
13
|
-
}
|
package/dist/render/focus.d.ts
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import type { DOMElement } from './dom.js';
|
|
2
|
-
import { FocusEvent } from './events/focus-event.js';
|
|
3
|
-
/**
|
|
4
|
-
* DOM-like focus manager for the Ink terminal UI.
|
|
5
|
-
*
|
|
6
|
-
* Pure state — tracks activeElement and a focus stack. Has no reference
|
|
7
|
-
* to the tree; callers pass the root when tree walks are needed.
|
|
8
|
-
*
|
|
9
|
-
* Stored on the root DOMElement so any node can reach it by walking
|
|
10
|
-
* parentNode (like browser's `node.ownerDocument`).
|
|
11
|
-
*/
|
|
12
|
-
export declare class FocusManager {
|
|
13
|
-
activeElement: DOMElement | null;
|
|
14
|
-
private dispatchFocusEvent;
|
|
15
|
-
private enabled;
|
|
16
|
-
private focusStack;
|
|
17
|
-
constructor(dispatchFocusEvent: (target: DOMElement, event: FocusEvent) => boolean);
|
|
18
|
-
focus(node: DOMElement): void;
|
|
19
|
-
blur(): void;
|
|
20
|
-
/**
|
|
21
|
-
* Called by the reconciler when a node is removed from the tree.
|
|
22
|
-
* Handles both the exact node and any focused descendant within
|
|
23
|
-
* the removed subtree. Dispatches blur and restores focus from stack.
|
|
24
|
-
*/
|
|
25
|
-
handleNodeRemoved(node: DOMElement, root: DOMElement): void;
|
|
26
|
-
handleAutoFocus(node: DOMElement): void;
|
|
27
|
-
handleClickFocus(node: DOMElement): void;
|
|
28
|
-
enable(): void;
|
|
29
|
-
disable(): void;
|
|
30
|
-
focusNext(root: DOMElement): void;
|
|
31
|
-
focusPrevious(root: DOMElement): void;
|
|
32
|
-
private moveFocus;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Walk up to root and return it. The root is the node that holds
|
|
36
|
-
* the FocusManager — like browser's `node.getRootNode()`.
|
|
37
|
-
*/
|
|
38
|
-
export declare function getRootNode(node: DOMElement): DOMElement;
|
|
39
|
-
/**
|
|
40
|
-
* Walk up to root and return its FocusManager.
|
|
41
|
-
* Like browser's `node.ownerDocument` — focus belongs to the root.
|
|
42
|
-
*/
|
|
43
|
-
export declare function getFocusManager(node: DOMElement): FocusManager;
|
package/dist/render/frame.d.ts
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import type { Cursor } from './cursor.js';
|
|
2
|
-
import type { Size } from './layout/geometry.js';
|
|
3
|
-
import type { ScrollHint } from './render-node-to-output.js';
|
|
4
|
-
import { type CharPool, type HyperlinkPool, type Screen, type StylePool } from './screen.js';
|
|
5
|
-
export type Frame = {
|
|
6
|
-
readonly screen: Screen;
|
|
7
|
-
readonly viewport: Size;
|
|
8
|
-
readonly cursor: Cursor;
|
|
9
|
-
/** DECSTBM scroll optimization hint (alt-screen only, null otherwise). */
|
|
10
|
-
readonly scrollHint?: ScrollHint | null;
|
|
11
|
-
/** A ScrollBox has remaining pendingScrollDelta — schedule another frame. */
|
|
12
|
-
readonly scrollDrainPending?: boolean;
|
|
13
|
-
};
|
|
14
|
-
export declare function emptyFrame(rows: number, columns: number, stylePool: StylePool, charPool: CharPool, hyperlinkPool: HyperlinkPool): Frame;
|
|
15
|
-
export type FlickerReason = 'resize' | 'offscreen' | 'clear';
|
|
16
|
-
export type FrameEvent = {
|
|
17
|
-
durationMs: number;
|
|
18
|
-
/** Phase breakdown in ms + patch count. Populated when the ink instance
|
|
19
|
-
* has frame-timing instrumentation enabled (via onFrame wiring). */
|
|
20
|
-
phases?: {
|
|
21
|
-
/** createRenderer output: DOM → yoga layout → screen buffer */
|
|
22
|
-
renderer: number;
|
|
23
|
-
/** LogUpdate.render(): screen diff → Patch[] (the hot path this PR optimizes) */
|
|
24
|
-
diff: number;
|
|
25
|
-
/** optimize(): patch merge/dedupe */
|
|
26
|
-
optimize: number;
|
|
27
|
-
/** writeDiffToTerminal(): serialize patches → ANSI → stdout */
|
|
28
|
-
write: number;
|
|
29
|
-
/** Pre-optimize patch count (proxy for how much changed this frame) */
|
|
30
|
-
patches: number;
|
|
31
|
-
/** yoga calculateLayout() time (runs in resetAfterCommit, before onRender) */
|
|
32
|
-
yoga: number;
|
|
33
|
-
/** React reconcile time: scrollMutated → resetAfterCommit. 0 if no commit. */
|
|
34
|
-
commit: number;
|
|
35
|
-
/** layoutNode() calls this frame (recursive, includes cache-hit returns) */
|
|
36
|
-
yogaVisited: number;
|
|
37
|
-
/** measureFunc (text wrap/width) calls — the expensive part */
|
|
38
|
-
yogaMeasured: number;
|
|
39
|
-
/** early returns via _hasL single-slot cache */
|
|
40
|
-
yogaCacheHits: number;
|
|
41
|
-
/** total yoga Node instances alive (create - free). Growth = leak. */
|
|
42
|
-
yogaLive: number;
|
|
43
|
-
};
|
|
44
|
-
flickers: Array<{
|
|
45
|
-
desiredHeight: number;
|
|
46
|
-
availableHeight: number;
|
|
47
|
-
reason: FlickerReason;
|
|
48
|
-
}>;
|
|
49
|
-
};
|
|
50
|
-
export type Patch = {
|
|
51
|
-
type: 'stdout';
|
|
52
|
-
content: string;
|
|
53
|
-
} | {
|
|
54
|
-
type: 'clear';
|
|
55
|
-
count: number;
|
|
56
|
-
} | {
|
|
57
|
-
type: 'clearTerminal';
|
|
58
|
-
reason: FlickerReason;
|
|
59
|
-
debug?: {
|
|
60
|
-
triggerY: number;
|
|
61
|
-
prevLine: string;
|
|
62
|
-
nextLine: string;
|
|
63
|
-
};
|
|
64
|
-
} | {
|
|
65
|
-
type: 'cursorHide';
|
|
66
|
-
} | {
|
|
67
|
-
type: 'cursorShow';
|
|
68
|
-
} | {
|
|
69
|
-
type: 'cursorMove';
|
|
70
|
-
x: number;
|
|
71
|
-
y: number;
|
|
72
|
-
} | {
|
|
73
|
-
type: 'cursorTo';
|
|
74
|
-
col: number;
|
|
75
|
-
} | {
|
|
76
|
-
type: 'carriageReturn';
|
|
77
|
-
} | {
|
|
78
|
-
type: 'hyperlink';
|
|
79
|
-
uri: string;
|
|
80
|
-
} | {
|
|
81
|
-
type: 'styleStr';
|
|
82
|
-
str: string;
|
|
83
|
-
};
|
|
84
|
-
export type Diff = Patch[];
|
|
85
|
-
/**
|
|
86
|
-
* Determines whether the screen should be cleared based on the current and previous frame.
|
|
87
|
-
* Returns the reason for clearing, or undefined if no clear is needed.
|
|
88
|
-
*
|
|
89
|
-
* Screen clearing is triggered when:
|
|
90
|
-
* 1. Terminal has been resized (viewport dimensions changed) → 'resize'
|
|
91
|
-
* 2. Current frame screen height exceeds available terminal rows → 'offscreen'
|
|
92
|
-
* 3. Previous frame screen height exceeded available terminal rows → 'offscreen'
|
|
93
|
-
*/
|
|
94
|
-
export declare function shouldClearScreen(prevFrame: Frame, frame: Frame): FlickerReason | undefined;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { type LayoutNode } from './layout/node.js';
|
|
2
|
-
/**
|
|
3
|
-
* Returns the yoga node's content width (computed width minus padding and
|
|
4
|
-
* border).
|
|
5
|
-
*
|
|
6
|
-
* Warning: can return a value WIDER than the parent container. In a
|
|
7
|
-
* column-direction flex parent, width is the cross axis — align-items:
|
|
8
|
-
* stretch never shrinks children below their intrinsic size, so the text
|
|
9
|
-
* node overflows (standard CSS behavior). Yoga measures leaf nodes in two
|
|
10
|
-
* passes: the AtMost pass determines width, the Exactly pass determines
|
|
11
|
-
* height. getComputedWidth() reflects the wider AtMost result while
|
|
12
|
-
* getComputedHeight() reflects the narrower Exactly result. Callers that
|
|
13
|
-
* use this for wrapping should clamp to actual available screen space so
|
|
14
|
-
* the rendered line count stays consistent with the layout height.
|
|
15
|
-
*/
|
|
16
|
-
declare const getMaxWidth: (yogaNode: LayoutNode) => number;
|
|
17
|
-
export default getMaxWidth;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import type { DOMElement } from './dom.js';
|
|
2
|
-
/**
|
|
3
|
-
* Find the deepest DOM element whose rendered rect contains (col, row).
|
|
4
|
-
*
|
|
5
|
-
* Uses the nodeCache populated by renderNodeToOutput — rects are in screen
|
|
6
|
-
* coordinates with all offsets (including scrollTop translation) already
|
|
7
|
-
* applied. Children are traversed in reverse so later siblings (painted on
|
|
8
|
-
* top) win. Nodes not in nodeCache (not rendered this frame, or lacking a
|
|
9
|
-
* yogaNode) are skipped along with their subtrees.
|
|
10
|
-
*
|
|
11
|
-
* Returns the hit node even if it has no onClick — dispatchClick walks up
|
|
12
|
-
* via parentNode to find handlers.
|
|
13
|
-
*/
|
|
14
|
-
export declare function hitTest(node: DOMElement, col: number, row: number): DOMElement | null;
|
|
15
|
-
/**
|
|
16
|
-
* Hit-test the root at (col, row) and bubble a ClickEvent from the deepest
|
|
17
|
-
* containing node up through parentNode. Only nodes with an onClick handler
|
|
18
|
-
* fire. Stops when a handler calls stopImmediatePropagation(). Returns
|
|
19
|
-
* true if at least one onClick handler fired.
|
|
20
|
-
*/
|
|
21
|
-
export declare function dispatchClick(root: DOMElement, col: number, row: number, cellIsBlank?: boolean): boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Fire onMouseEnter/onMouseLeave as the pointer moves. Like DOM
|
|
24
|
-
* mouseenter/mouseleave: does NOT bubble — moving between children does
|
|
25
|
-
* not re-fire on the parent. Walks up from the hit node collecting every
|
|
26
|
-
* ancestor with a hover handler; diffs against the previous hovered set;
|
|
27
|
-
* fires leave on the nodes exited, enter on the nodes entered.
|
|
28
|
-
*
|
|
29
|
-
* Mutates `hovered` in place so the caller (App instance) can hold it
|
|
30
|
-
* across calls. Clears the set when the hit is null (cursor moved into a
|
|
31
|
-
* non-rendered gap or off the root rect).
|
|
32
|
-
*/
|
|
33
|
-
export declare function dispatchHover(root: DOMElement, col: number, row: number, hovered: Set<DOMElement>): void;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { DOMElement } from '../dom.js';
|
|
2
|
-
/**
|
|
3
|
-
* Hook for synchronized animations that pause when offscreen.
|
|
4
|
-
*
|
|
5
|
-
* Returns a ref to attach to the animated element and the current animation time.
|
|
6
|
-
* All instances share the same clock, so animations stay in sync.
|
|
7
|
-
* The clock only runs when at least one keepAlive subscriber exists.
|
|
8
|
-
*
|
|
9
|
-
* Pass `null` to pause — unsubscribes from the clock so no ticks fire.
|
|
10
|
-
* Time freezes at the last value and resumes from the current clock time
|
|
11
|
-
* when a number is passed again.
|
|
12
|
-
*
|
|
13
|
-
* @param intervalMs - How often to update, or null to pause
|
|
14
|
-
* @returns [ref, time] - Ref to attach to element, elapsed time in ms
|
|
15
|
-
*
|
|
16
|
-
* @example
|
|
17
|
-
* function Spinner() {
|
|
18
|
-
* const [ref, time] = useAnimationFrame(120)
|
|
19
|
-
* const frame = Math.floor(time / 120) % FRAMES.length
|
|
20
|
-
* return <Box ref={ref}>{FRAMES[frame]}</Box>
|
|
21
|
-
* }
|
|
22
|
-
*
|
|
23
|
-
* The clock automatically slows when the terminal is blurred,
|
|
24
|
-
* so consumers don't need to handle focus state.
|
|
25
|
-
*/
|
|
26
|
-
export declare function useAnimationFrame(intervalMs?: number | null): [ref: (element: DOMElement | null) => void, time: number];
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { DOMElement } from '../dom.js';
|
|
2
|
-
/**
|
|
3
|
-
* Declares where the terminal cursor should be parked after each frame.
|
|
4
|
-
*
|
|
5
|
-
* Terminal emulators render IME preedit text at the physical cursor
|
|
6
|
-
* position, and screen readers / screen magnifiers track the native
|
|
7
|
-
* cursor — so parking it at the text input's caret makes CJK input
|
|
8
|
-
* appear inline and lets accessibility tools follow the input.
|
|
9
|
-
*
|
|
10
|
-
* Returns a ref callback to attach to the Box that contains the input.
|
|
11
|
-
* The declared (line, column) is interpreted relative to that Box's
|
|
12
|
-
* nodeCache rect (populated by renderNodeToOutput).
|
|
13
|
-
*
|
|
14
|
-
* Timing: Both ref attach and useLayoutEffect fire in React's layout
|
|
15
|
-
* phase — after resetAfterCommit calls scheduleRender. scheduleRender
|
|
16
|
-
* defers onRender via queueMicrotask, so onRender runs AFTER layout
|
|
17
|
-
* effects commit and reads the fresh declaration on the first frame
|
|
18
|
-
* (no one-keystroke lag). Test env uses onImmediateRender (synchronous,
|
|
19
|
-
* no microtask), so tests compensate by calling ink.onRender()
|
|
20
|
-
* explicitly after render.
|
|
21
|
-
*/
|
|
22
|
-
export declare function useDeclaredCursor({ line, column, active, }: {
|
|
23
|
-
line: number;
|
|
24
|
-
column: number;
|
|
25
|
-
active: boolean;
|
|
26
|
-
}): (element: DOMElement | null) => void;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import type { InputEvent, Key } from '../events/input-event.js';
|
|
2
|
-
type Handler = (input: string, key: Key, event: InputEvent) => void;
|
|
3
|
-
type Options = {
|
|
4
|
-
/**
|
|
5
|
-
* Enable or disable capturing of user input.
|
|
6
|
-
* Useful when there are multiple useInput hooks used at once to avoid handling the same input several times.
|
|
7
|
-
*
|
|
8
|
-
* @default true
|
|
9
|
-
*/
|
|
10
|
-
isActive?: boolean;
|
|
11
|
-
};
|
|
12
|
-
/**
|
|
13
|
-
* This hook is used for handling user input.
|
|
14
|
-
* It's a more convenient alternative to using `StdinContext` and listening to `data` events.
|
|
15
|
-
* The callback you pass to `useInput` is called for each character when user enters any input.
|
|
16
|
-
* However, if user pastes text and it's more than one character, the callback will be called only once and the whole string will be passed as `input`.
|
|
17
|
-
*
|
|
18
|
-
* ```
|
|
19
|
-
* import {useInput} from '@/render';
|
|
20
|
-
*
|
|
21
|
-
* const UserInput = () => {
|
|
22
|
-
* useInput((input, key) => {
|
|
23
|
-
* if (input === 'q') {
|
|
24
|
-
* // Exit program
|
|
25
|
-
* }
|
|
26
|
-
*
|
|
27
|
-
* if (key.leftArrow) {
|
|
28
|
-
* // Left arrow key pressed
|
|
29
|
-
* }
|
|
30
|
-
* });
|
|
31
|
-
*
|
|
32
|
-
* return …
|
|
33
|
-
* };
|
|
34
|
-
* ```
|
|
35
|
-
*/
|
|
36
|
-
declare const useInput: (inputHandler: Handler, options?: Options) => void;
|
|
37
|
-
export default useInput;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Returns the clock time, updating at the given interval.
|
|
3
|
-
* Subscribes as non-keepAlive — won't keep the clock alive on its own,
|
|
4
|
-
* but updates whenever a keepAlive subscriber (e.g. the spinner)
|
|
5
|
-
* is driving the clock.
|
|
6
|
-
*
|
|
7
|
-
* Use this to drive pure time-based computations (shimmer position,
|
|
8
|
-
* frame index) from the shared clock.
|
|
9
|
-
*/
|
|
10
|
-
export declare function useAnimationTimer(intervalMs: number): number;
|
|
11
|
-
/**
|
|
12
|
-
* Interval hook backed by the shared Clock.
|
|
13
|
-
*
|
|
14
|
-
* Unlike `useInterval` from `usehooks-ts` (which creates its own setInterval),
|
|
15
|
-
* this piggybacks on the single shared clock so all timers consolidate into
|
|
16
|
-
* one wake-up. Pass `null` for intervalMs to pause.
|
|
17
|
-
*/
|
|
18
|
-
export declare function useInterval(callback: () => void, intervalMs: number | null): void;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { DOMElement } from '../dom.js';
|
|
2
|
-
import type { MatchPosition } from '../render-to-screen.js';
|
|
3
|
-
/**
|
|
4
|
-
* Set the search highlight query on the Ink instance. Non-empty → all
|
|
5
|
-
* visible occurrences are inverted on the next frame (SGR 7, screen-buffer
|
|
6
|
-
* overlay, same damage machinery as selection). Empty → clears.
|
|
7
|
-
*
|
|
8
|
-
* This is a screen-space highlight — it matches the RENDERED text, not the
|
|
9
|
-
* source message text. Works for anything visible (bash output, file paths,
|
|
10
|
-
* error messages) regardless of where it came from in the message tree. A
|
|
11
|
-
* query that matched in source but got truncated/ellipsized in rendering
|
|
12
|
-
* won't highlight; that's acceptable — we highlight what you see.
|
|
13
|
-
*/
|
|
14
|
-
export declare function useSearchHighlight(): {
|
|
15
|
-
setQuery: (query: string) => void;
|
|
16
|
-
/** Paint an existing DOM subtree (from the MAIN tree) to a fresh
|
|
17
|
-
* Screen at its natural height, scan. Element-relative positions
|
|
18
|
-
* (row 0 = element top). Zero context duplication — the element
|
|
19
|
-
* IS the one built with all real providers. */
|
|
20
|
-
scanElement: (el: DOMElement) => MatchPosition[];
|
|
21
|
-
/** Position-based CURRENT highlight. Every frame writes yellow at
|
|
22
|
-
* positions[currentIdx] + rowOffset. The scan-highlight (inverse on
|
|
23
|
-
* all matches) still runs — this overlays on top. rowOffset tracks
|
|
24
|
-
* scroll; positions stay stable (message-relative). null clears. */
|
|
25
|
-
setPositions: (state: {
|
|
26
|
-
positions: MatchPosition[];
|
|
27
|
-
rowOffset: number;
|
|
28
|
-
currentIdx: number;
|
|
29
|
-
} | null) => void;
|
|
30
|
-
};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { type FocusMove, type SelectionState } from '../selection.js';
|
|
2
|
-
/**
|
|
3
|
-
* Access to text selection operations on the Ink instance (fullscreen only).
|
|
4
|
-
* Returns no-op functions when fullscreen mode is disabled.
|
|
5
|
-
*/
|
|
6
|
-
export declare function useSelection(): {
|
|
7
|
-
copySelection: () => string;
|
|
8
|
-
/** Copy without clearing the highlight (for copy-on-select). */
|
|
9
|
-
copySelectionNoClear: () => string;
|
|
10
|
-
clearSelection: () => void;
|
|
11
|
-
hasSelection: () => boolean;
|
|
12
|
-
/** Read the raw mutable selection state (for drag-to-scroll). */
|
|
13
|
-
getState: () => SelectionState | null;
|
|
14
|
-
/** Subscribe to selection mutations (start/update/finish/clear). */
|
|
15
|
-
subscribe: (cb: () => void) => () => void;
|
|
16
|
-
/** Shift the anchor row by dRow, clamped to [minRow, maxRow]. */
|
|
17
|
-
shiftAnchor: (dRow: number, minRow: number, maxRow: number) => void;
|
|
18
|
-
/** Shift anchor AND focus by dRow (keyboard scroll: whole selection
|
|
19
|
-
* tracks content). Clamped points get col reset to the full-width edge
|
|
20
|
-
* since their content was captured by captureScrolledRows. Reads
|
|
21
|
-
* screen.width from the ink instance for the col-reset boundary. */
|
|
22
|
-
shiftSelection: (dRow: number, minRow: number, maxRow: number) => void;
|
|
23
|
-
/** Keyboard selection extension (shift+arrow): move focus, anchor fixed.
|
|
24
|
-
* Left/right wrap across rows; up/down clamp at viewport edges. */
|
|
25
|
-
moveFocus: (move: FocusMove) => void;
|
|
26
|
-
/** Capture text from rows about to scroll out of the viewport (call
|
|
27
|
-
* BEFORE scrollBy so the screen buffer still has the outgoing rows). */
|
|
28
|
-
captureScrolledRows: (firstRow: number, lastRow: number, side: 'above' | 'below') => void;
|
|
29
|
-
/** Set the selection highlight bg color (theme-piping; solid bg
|
|
30
|
-
* replaces the old SGR-7 inverse so syntax highlighting stays readable
|
|
31
|
-
* under selection). Call once on mount + whenever theme changes. */
|
|
32
|
-
setSelectionBgColor: (color: string) => void;
|
|
33
|
-
};
|
|
34
|
-
/**
|
|
35
|
-
* Reactive selection-exists state. Re-renders the caller when a text
|
|
36
|
-
* selection is created or cleared. Always returns false outside
|
|
37
|
-
* fullscreen mode (selection is only available in alt-screen).
|
|
38
|
-
*/
|
|
39
|
-
export declare function useHasSelection(): boolean;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export type TabStatusKind = 'idle' | 'busy' | 'waiting';
|
|
2
|
-
/**
|
|
3
|
-
* Declaratively set the tab-status indicator (OSC 21337).
|
|
4
|
-
*
|
|
5
|
-
* Emits a colored dot + short status text to the tab sidebar. Terminals
|
|
6
|
-
* that don't support OSC 21337 discard the sequence silently, so this is
|
|
7
|
-
* safe to call unconditionally. Wrapped for tmux/screen passthrough.
|
|
8
|
-
*
|
|
9
|
-
* Pass `null` to opt out. If a status was previously set, transitioning to
|
|
10
|
-
* `null` emits CLEAR_TAB_STATUS so toggling off mid-session doesn't leave
|
|
11
|
-
* a stale dot. Process-exit cleanup is handled by ink.tsx's unmount path.
|
|
12
|
-
*/
|
|
13
|
-
export declare function useTabStatus(kind: TabStatusKind | null): void;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Hook to check if the terminal has focus.
|
|
3
|
-
*
|
|
4
|
-
* Uses DECSET 1004 focus reporting - the terminal sends escape sequences
|
|
5
|
-
* when it gains or loses focus. These are handled automatically
|
|
6
|
-
* by Ink and filtered from useInput.
|
|
7
|
-
*
|
|
8
|
-
* @returns true if the terminal is focused (or focus state is unknown)
|
|
9
|
-
*/
|
|
10
|
-
export declare function useTerminalFocus(): boolean;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Declaratively set the terminal tab/window title.
|
|
3
|
-
*
|
|
4
|
-
* Pass a string to set the title. ANSI escape sequences are stripped
|
|
5
|
-
* automatically so callers don't need to know about terminal encoding.
|
|
6
|
-
* Pass `null` to opt out — the hook becomes a no-op and leaves the
|
|
7
|
-
* terminal title untouched.
|
|
8
|
-
*
|
|
9
|
-
* On Windows, uses `process.title` (classic conhost doesn't support OSC).
|
|
10
|
-
* Elsewhere, writes OSC 0 (set title+icon) via Ink's stdout.
|
|
11
|
-
*/
|
|
12
|
-
export declare function useTerminalTitle(title: string | null): void;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { DOMElement } from '../dom.js';
|
|
2
|
-
type ViewportEntry = {
|
|
3
|
-
/**
|
|
4
|
-
* Whether the element is currently within the terminal viewport
|
|
5
|
-
*/
|
|
6
|
-
isVisible: boolean;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Hook to detect if a component is within the terminal viewport.
|
|
10
|
-
*
|
|
11
|
-
* Returns a callback ref and a viewport entry object.
|
|
12
|
-
* Attach the ref to the component you want to track.
|
|
13
|
-
*
|
|
14
|
-
* The entry is updated during the layout phase (useLayoutEffect) so callers
|
|
15
|
-
* always read fresh values during render. Visibility changes do NOT trigger
|
|
16
|
-
* re-renders on their own — callers that re-render for other reasons (e.g.
|
|
17
|
-
* animation ticks, state changes) will pick up the latest value naturally.
|
|
18
|
-
* This avoids infinite update loops when combined with other layout effects
|
|
19
|
-
* that also call setState.
|
|
20
|
-
*
|
|
21
|
-
* @example
|
|
22
|
-
* const [ref, entry] = useTerminalViewport()
|
|
23
|
-
* return <Box ref={ref}><Animation enabled={entry.isVisible}>...</Animation></Box>
|
|
24
|
-
*/
|
|
25
|
-
export declare function useTerminalViewport(): [
|
|
26
|
-
ref: (element: DOMElement | null) => void,
|
|
27
|
-
entry: ViewportEntry
|
|
28
|
-
];
|
|
29
|
-
export {};
|
package/dist/render/index.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Public API — re-exports from the custom ink engine matching the npm `ink` API shape.
|
|
3
|
-
* UI components import from here instead of npm `ink`.
|
|
4
|
-
*/
|
|
5
|
-
export { default as Box, type Props as BoxProps } from "./components/Box.js";
|
|
6
|
-
export { default as Text, type Props as TextProps } from "./components/Text.js";
|
|
7
|
-
export { default as Spacer } from "./components/Spacer.js";
|
|
8
|
-
export { default as Newline } from "./components/Newline.js";
|
|
9
|
-
export { default as useApp } from "./hooks/use-app.js";
|
|
10
|
-
export { default as useInput } from "./hooks/use-input.js";
|
|
11
|
-
export { default as useStdin } from "./hooks/use-stdin.js";
|
|
12
|
-
export declare function useStdout(): {
|
|
13
|
-
stdout: NodeJS.WriteStream & {
|
|
14
|
-
fd: 1;
|
|
15
|
-
};
|
|
16
|
-
write: (data: string) => boolean;
|
|
17
|
-
};
|
|
18
|
-
export { default as ScrollBox, type ScrollBoxHandle, type ScrollBoxProps } from "./components/ScrollBox.js";
|
|
19
|
-
export { AlternateScreen } from "./components/AlternateScreen.js";
|
|
20
|
-
export { default as render, renderSync, createRoot, type RenderOptions, type Instance } from "./root.js";
|