@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
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Input history — JSONL-based persistent command history.
|
|
3
|
-
*
|
|
4
|
-
* Features:
|
|
5
|
-
* - JSONL format for structured persistence (~/.code-shell/history.jsonl)
|
|
6
|
-
* - Per-project grouping with current session priority
|
|
7
|
-
* - Cross-session history with deduplication
|
|
8
|
-
* - Ctrl+R search support via getTimestampedHistory()
|
|
9
|
-
* - Undo last entry on ESC interrupt (removeLastFromHistory)
|
|
10
|
-
* - File locking for concurrent session safety
|
|
11
|
-
*
|
|
12
|
-
* Up/Down arrow navigation through past inputs is also supported.
|
|
13
|
-
*/
|
|
14
|
-
export interface TimestampedHistoryEntry {
|
|
15
|
-
display: string;
|
|
16
|
-
timestamp: number;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Configure the history system with session and project context.
|
|
20
|
-
* Call this once at startup.
|
|
21
|
-
*/
|
|
22
|
-
export declare function initHistory(sessionId: string, projectRoot: string): void;
|
|
23
|
-
/**
|
|
24
|
-
* Add an input to history. Persisted as JSONL.
|
|
25
|
-
*/
|
|
26
|
-
export declare function addToHistory(input: string): void;
|
|
27
|
-
/**
|
|
28
|
-
* Undo the most recent addToHistory call.
|
|
29
|
-
* Used when ESC rewinds the conversation before any response arrives.
|
|
30
|
-
*/
|
|
31
|
-
export declare function removeLastFromHistory(): void;
|
|
32
|
-
/**
|
|
33
|
-
* Clear pending history entries (e.g. on session reset).
|
|
34
|
-
*/
|
|
35
|
-
export declare function clearPendingHistoryEntries(): void;
|
|
36
|
-
/**
|
|
37
|
-
* Flush any pending writes synchronously (call at process exit).
|
|
38
|
-
*/
|
|
39
|
-
export declare function flushHistorySync(): void;
|
|
40
|
-
/**
|
|
41
|
-
* Get timestamped history entries for the current project.
|
|
42
|
-
* Used for Ctrl+R search picker — deduped by display text, newest first.
|
|
43
|
-
*/
|
|
44
|
-
export declare function getTimestampedHistory(): TimestampedHistoryEntry[];
|
|
45
|
-
/**
|
|
46
|
-
* Search history entries matching a query string (case-insensitive).
|
|
47
|
-
*/
|
|
48
|
-
export declare function searchHistory(query: string): TimestampedHistoryEntry[];
|
|
49
|
-
/**
|
|
50
|
-
* Create a history navigator for Up/Down arrow browsing.
|
|
51
|
-
*/
|
|
52
|
-
export declare function createHistoryNavigator(): {
|
|
53
|
-
/** Move up (older). Returns the history entry or null if at top. */
|
|
54
|
-
up(currentInput: string): string | null;
|
|
55
|
-
/** Move down (newer). Returns the history entry, or the stashed input at bottom. */
|
|
56
|
-
down(): string | null;
|
|
57
|
-
/** Reset cursor to bottom (call on submit). */
|
|
58
|
-
reset(): void;
|
|
59
|
-
/** Refresh after addToHistory mutates the array. */
|
|
60
|
-
refresh(): void;
|
|
61
|
-
};
|
package/dist/ui/perf-probes.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export declare const PERF_ENABLED: boolean;
|
|
2
|
-
export declare function startEventLoopMonitor(intervalMs?: number, warnThresholdMs?: number): void;
|
|
3
|
-
export declare function stopEventLoopMonitor(): void;
|
|
4
|
-
export declare function recordStreamEvent(type: string, agentId: string | undefined): void;
|
|
5
|
-
export declare function startStreamRateReporter(windowMs?: number): void;
|
|
6
|
-
export declare function stopStreamRateReporter(): void;
|
|
7
|
-
export declare function recordAppRender(): void;
|
|
8
|
-
export declare function startAppRenderReporter(windowMs?: number): void;
|
|
9
|
-
export declare function stopAppRenderReporter(): void;
|
|
10
|
-
export declare function recordInkFrame(event: {
|
|
11
|
-
durationMs: number;
|
|
12
|
-
phases: {
|
|
13
|
-
diff: number;
|
|
14
|
-
write: number;
|
|
15
|
-
yoga: number;
|
|
16
|
-
patches: number;
|
|
17
|
-
};
|
|
18
|
-
}): void;
|
|
19
|
-
export declare function startInkFrameReporter(windowMs?: number): void;
|
|
20
|
-
export declare function stopInkFrameReporter(): void;
|
|
21
|
-
export declare function startAllPerfProbes(): void;
|
|
22
|
-
export declare function stopAllPerfProbes(): void;
|
package/dist/ui/query-guard.d.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* QueryGuard — synchronous state machine for "is a query in flight".
|
|
3
|
-
* Replaces React useState for isRunning. Subscribers (via useSyncExternalStore)
|
|
4
|
-
* see state changes immediately, bypassing React 18 batching that otherwise
|
|
5
|
-
* opens a 1–10 ms window for double-submit / dead-click bugs.
|
|
6
|
-
*
|
|
7
|
-
* States:
|
|
8
|
-
* idle — no query active
|
|
9
|
-
* reserved — processUserInput started its sync prep but hasn't created the AbortController yet
|
|
10
|
-
* running — AbortController attached; query is in flight
|
|
11
|
-
*
|
|
12
|
-
* The only writers are reserve/tryStart/cancelReservation/end/forceEnd.
|
|
13
|
-
* No setter is exposed.
|
|
14
|
-
*/
|
|
15
|
-
export type QueryState = "idle" | "reserved" | "running";
|
|
16
|
-
export declare class QueryGuard {
|
|
17
|
-
private state;
|
|
18
|
-
private controller;
|
|
19
|
-
private listeners;
|
|
20
|
-
subscribe: (cb: () => void) => (() => void);
|
|
21
|
-
getSnapshot: () => boolean;
|
|
22
|
-
private notify;
|
|
23
|
-
/** Reserve a slot synchronously before the AbortController exists. */
|
|
24
|
-
reserve(): boolean;
|
|
25
|
-
/** Attach the AbortController. Must follow reserve(). */
|
|
26
|
-
tryStart(controller: AbortController): boolean;
|
|
27
|
-
/** Roll back reserve() when processUserInput threw before tryStart. */
|
|
28
|
-
cancelReservation(): void;
|
|
29
|
-
/** Normal completion — clean up without aborting (already finished). */
|
|
30
|
-
end(): void;
|
|
31
|
-
/** Hard abort: abort the controller AND clean up. */
|
|
32
|
-
forceEnd(reason?: string): void;
|
|
33
|
-
/** Read the current controller's signal; null when idle/reserved. */
|
|
34
|
-
getSignal(): AbortSignal | null;
|
|
35
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* SliceAnchor — UUID-anchored cap for the flow-mode chat slice.
|
|
3
|
-
*
|
|
4
|
-
* Flow mode renders all entries through Ink's normal diff path (no <Static>),
|
|
5
|
-
* relying on the terminal's native scrollback for history. To keep yoga
|
|
6
|
-
* layout and the screen buffer bounded, we slice the rendered list to a
|
|
7
|
-
* fixed cap. The naive `entries.slice(-CAP)` shifts the head by one on every
|
|
8
|
-
* append — that means row 0 of prev and row 0 of next describe different
|
|
9
|
-
* content, and log-update's diff sees changes at scrollback rows it can't
|
|
10
|
-
* reach, forcing a fullResetSequence_CAUSES_FLICKER per turn.
|
|
11
|
-
*
|
|
12
|
-
* Fix: anchor the slice start to a specific entry id and only advance when
|
|
13
|
-
* (entries.length - start) exceeds CAP + STEP. Quantizing in STEP-sized
|
|
14
|
-
* chunks turns "flicker every append" into "flicker every STEP appends".
|
|
15
|
-
*
|
|
16
|
-
* The anchor stores BOTH id and idx — if the anchored id disappears (rare
|
|
17
|
-
* for chat entries since ids are stable, but defensive), we fall back to
|
|
18
|
-
* the stored idx clamped into range, instead of resetting to 0 which would
|
|
19
|
-
* try to render the full history at once.
|
|
20
|
-
*
|
|
21
|
-
* Mirrors Claude Code's computeSliceStart in src/components/Messages.tsx.
|
|
22
|
-
*/
|
|
23
|
-
export declare const DEFAULT_CAP = 200;
|
|
24
|
-
export declare const DEFAULT_STEP = 50;
|
|
25
|
-
export type SliceAnchor = {
|
|
26
|
-
id: string;
|
|
27
|
-
idx: number;
|
|
28
|
-
} | null;
|
|
29
|
-
export interface AnchorRef {
|
|
30
|
-
current: SliceAnchor;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Returns the index at which the rendered slice should start. May mutate
|
|
34
|
-
* `anchorRef.current` to refresh the stored anchor when the window advances
|
|
35
|
-
* or the anchored id has shifted in the entries array.
|
|
36
|
-
*
|
|
37
|
-
* @param entries - The full, post-filter chat entries (must expose `.id`).
|
|
38
|
-
* @param anchorRef - Mutable container for the persistent anchor.
|
|
39
|
-
* @param cap - Soft maximum entries to render. Window advances past this.
|
|
40
|
-
* @param step - Hysteresis: only advance when length exceeds cap + step.
|
|
41
|
-
*/
|
|
42
|
-
export declare function computeSliceStart(entries: ReadonlyArray<{
|
|
43
|
-
id: string;
|
|
44
|
-
}>, anchorRef: AnchorRef, cap?: number, step?: number): number;
|
package/dist/ui/store.d.ts
DELETED
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ChatStore — external state store for chat messages.
|
|
3
|
-
*
|
|
4
|
-
* Moves chatLog out of React useState to avoid full component tree
|
|
5
|
-
* re-renders on every message update. Components subscribe to specific
|
|
6
|
-
* slices via useSyncExternalStore.
|
|
7
|
-
*/
|
|
8
|
-
type ChatEntryData = {
|
|
9
|
-
type: "user";
|
|
10
|
-
text: string;
|
|
11
|
-
} | {
|
|
12
|
-
type: "assistant_text";
|
|
13
|
-
text: string;
|
|
14
|
-
streaming: boolean;
|
|
15
|
-
agentId?: string;
|
|
16
|
-
} | {
|
|
17
|
-
type: "tool_start";
|
|
18
|
-
toolName: string;
|
|
19
|
-
args: Record<string, unknown>;
|
|
20
|
-
toolCallId?: string;
|
|
21
|
-
agentId?: string;
|
|
22
|
-
} | {
|
|
23
|
-
type: "tool_running";
|
|
24
|
-
toolName: string;
|
|
25
|
-
agentId?: string;
|
|
26
|
-
} | {
|
|
27
|
-
type: "tool_result";
|
|
28
|
-
toolName: string;
|
|
29
|
-
result?: string;
|
|
30
|
-
error?: string;
|
|
31
|
-
agentId?: string;
|
|
32
|
-
} | {
|
|
33
|
-
type: "thinking";
|
|
34
|
-
agentId?: string;
|
|
35
|
-
content?: string;
|
|
36
|
-
} | {
|
|
37
|
-
type: "error";
|
|
38
|
-
error: string;
|
|
39
|
-
errorKind?: ErrorKind;
|
|
40
|
-
agentId?: string;
|
|
41
|
-
} | {
|
|
42
|
-
type: "status";
|
|
43
|
-
reason: string;
|
|
44
|
-
} | {
|
|
45
|
-
type: "system";
|
|
46
|
-
subtype: SystemSubtype;
|
|
47
|
-
text?: string;
|
|
48
|
-
} | {
|
|
49
|
-
type: "agent_start";
|
|
50
|
-
agentId: string;
|
|
51
|
-
name?: string;
|
|
52
|
-
description: string;
|
|
53
|
-
} | {
|
|
54
|
-
type: "agent_end";
|
|
55
|
-
agentId: string;
|
|
56
|
-
name?: string;
|
|
57
|
-
description: string;
|
|
58
|
-
text?: string;
|
|
59
|
-
error?: string;
|
|
60
|
-
};
|
|
61
|
-
/** Specialized error kinds for smart rendering. */
|
|
62
|
-
export type ErrorKind = "rate_limit" | "context_limit" | "invalid_api_key" | "api_timeout" | "credit_balance" | "generic";
|
|
63
|
-
/** System message subtypes. */
|
|
64
|
-
export type SystemSubtype = "compact_boundary" | "memory_saved" | "turn_duration" | "info" | "bg_agent_notification";
|
|
65
|
-
export type ChatEntry = ChatEntryData & {
|
|
66
|
-
id: string;
|
|
67
|
-
};
|
|
68
|
-
export declare function createEntry(data: ChatEntryData): ChatEntry;
|
|
69
|
-
/**
|
|
70
|
-
* "Finalized" = entry's content is stable; further stream events will not
|
|
71
|
-
* mutate it in place. Used by VirtualMessageList flow mode to route entries
|
|
72
|
-
* into <Static> (append-only, never re-rendered) vs. the active region (kept
|
|
73
|
-
* in React tree and re-rendered on each delta).
|
|
74
|
-
*
|
|
75
|
-
* assistant_text → final once streaming flips to false
|
|
76
|
-
* tool_running → transient, always replaced by tool_result; not final
|
|
77
|
-
* thinking → transient, filtered out on next tool_use_start
|
|
78
|
-
* everything else → final on append
|
|
79
|
-
*/
|
|
80
|
-
export declare function isEntryFinalized(e: ChatEntry): boolean;
|
|
81
|
-
type Listener = () => void;
|
|
82
|
-
declare class ChatStore {
|
|
83
|
-
private entries;
|
|
84
|
-
private listeners;
|
|
85
|
-
getEntries(): ChatEntry[];
|
|
86
|
-
/** Replace all entries (used for clear, resume). */
|
|
87
|
-
setEntries(entries: ChatEntry[]): void;
|
|
88
|
-
/** Append one entry. */
|
|
89
|
-
append(data: ChatEntryData): void;
|
|
90
|
-
/** Functional update — same API as setState(fn). */
|
|
91
|
-
update(fn: (prev: ChatEntry[]) => ChatEntry[]): void;
|
|
92
|
-
/**
|
|
93
|
-
* Commit the in-flight streaming assistant entry as a final (non-streaming)
|
|
94
|
-
* message, optionally appending a suffix (e.g., "[Request interrupted by user]").
|
|
95
|
-
* Drops any thinking entries — model scratch, no user value after interruption.
|
|
96
|
-
* No-op if there is no streaming entry.
|
|
97
|
-
*
|
|
98
|
-
* Empty-text streaming entry is finalized in place (streaming=false) without
|
|
99
|
-
* suffix — keeps the store transition consistent without persisting noise.
|
|
100
|
-
*/
|
|
101
|
-
commitInterruptedStreaming(suffix: string): void;
|
|
102
|
-
clear(): void;
|
|
103
|
-
subscribe(listener: Listener): () => void;
|
|
104
|
-
private notify;
|
|
105
|
-
}
|
|
106
|
-
/** Singleton store for the chat log. */
|
|
107
|
-
export declare const chatStore: ChatStore;
|
|
108
|
-
export {};
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TerminalRenderer — line-level diff renderer inspired by Claude Code's approach.
|
|
3
|
-
*
|
|
4
|
-
* Instead of relying on Ink's full-redraw or broken incrementalRendering,
|
|
5
|
-
* we maintain two string-array buffers (front/back) and only write changed
|
|
6
|
-
* lines to stdout using absolute cursor positioning (CSI <row>;1H).
|
|
7
|
-
*
|
|
8
|
-
* Key design from CC:
|
|
9
|
-
* - Double-buffered: frontLines (what's on screen) vs backLines (previous)
|
|
10
|
-
* - Alt-screen: CSI ?1049h — no scrollback, cursor always addressable
|
|
11
|
-
* - Atomic writes: BSU/ESU (DEC 2026) wrapping when supported
|
|
12
|
-
* - Damage tracking: only diff the region that changed
|
|
13
|
-
*/
|
|
14
|
-
export declare class TerminalRenderer {
|
|
15
|
-
private frontLines;
|
|
16
|
-
private stdout;
|
|
17
|
-
private rows;
|
|
18
|
-
private cols;
|
|
19
|
-
private syncSupported;
|
|
20
|
-
constructor(stdout: NodeJS.WriteStream);
|
|
21
|
-
/** Enter alt screen, hide cursor, clear. */
|
|
22
|
-
enter(): void;
|
|
23
|
-
/** Exit alt screen, show cursor, restore bracketed paste. */
|
|
24
|
-
exit(): void;
|
|
25
|
-
/**
|
|
26
|
-
* Render a new frame. Takes an array of pre-formatted lines.
|
|
27
|
-
* Only writes lines that differ from the previous frame.
|
|
28
|
-
*/
|
|
29
|
-
render(lines: string[]): void;
|
|
30
|
-
/**
|
|
31
|
-
* Force a full repaint — clears front buffer so next render() rewrites everything.
|
|
32
|
-
*/
|
|
33
|
-
invalidate(): void;
|
|
34
|
-
/** Get terminal dimensions. */
|
|
35
|
-
getSize(): {
|
|
36
|
-
rows: number;
|
|
37
|
-
cols: number;
|
|
38
|
-
};
|
|
39
|
-
/**
|
|
40
|
-
* Detect if the terminal supports DEC 2026 (Synchronized Update).
|
|
41
|
-
* Most modern terminals do: kitty, iTerm2, WezTerm, Windows Terminal.
|
|
42
|
-
* tmux and older xterm don't.
|
|
43
|
-
*/
|
|
44
|
-
private detectSyncSupport;
|
|
45
|
-
}
|
package/dist/ui/theme.d.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Theme adapter for the lightweight UI layer.
|
|
3
|
-
*
|
|
4
|
-
* Delegates to the canonical theme system (utils/theme.ts) and the
|
|
5
|
-
* design-system ThemeProvider so that both the ui/ REPL and the
|
|
6
|
-
* restored components share a single source of truth for colors.
|
|
7
|
-
*
|
|
8
|
-
* This file re-exports the types and provides a slim ThemeProvider
|
|
9
|
-
* that doesn't pull in heavy dependencies (globalConfig, bun:bundle
|
|
10
|
-
* feature flags, useStdin) that the full ThemeProvider needs.
|
|
11
|
-
*/
|
|
12
|
-
import { type ReactNode } from "react";
|
|
13
|
-
import { type Theme, type ThemeName, type ThemeSetting } from "../utils/theme.js";
|
|
14
|
-
export { getTheme, type Theme, type ThemeName, type ThemeSetting } from "../utils/theme.js";
|
|
15
|
-
export { resolveThemeSetting } from "../utils/systemTheme.js";
|
|
16
|
-
/**
|
|
17
|
-
* Resolve a color that may be a theme key or raw color value.
|
|
18
|
-
* Matches the logic in components/design-system/ThemedText.tsx.
|
|
19
|
-
*/
|
|
20
|
-
export declare function resolveColor(color: keyof Theme | string | undefined, theme: Theme): string | undefined;
|
|
21
|
-
interface ThemeContextValue {
|
|
22
|
-
themeName: ThemeName;
|
|
23
|
-
theme: Theme;
|
|
24
|
-
themeSetting: ThemeSetting;
|
|
25
|
-
setThemeSetting: (setting: ThemeSetting) => void;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Returns [resolvedThemeName, themeObject].
|
|
29
|
-
* API-compatible with design-system/ThemeProvider's useTheme().
|
|
30
|
-
*/
|
|
31
|
-
export declare function useTheme(): [ThemeName, Theme];
|
|
32
|
-
export declare function useThemeSetting(): [ThemeSetting, (s: ThemeSetting) => void];
|
|
33
|
-
export declare function ThemeProvider({ children, initialSetting, }: {
|
|
34
|
-
children: ReactNode;
|
|
35
|
-
initialSetting?: ThemeSetting;
|
|
36
|
-
}): import("react").FunctionComponentElement<import("react").ProviderProps<ThemeContextValue>>;
|
package/dist/ui/vim-mode.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Vim mode — vim keybinding layer for the text input.
|
|
3
|
-
*
|
|
4
|
-
* Supports Normal, Insert, and Visual modes with basic vim motions.
|
|
5
|
-
*/
|
|
6
|
-
export type VimMode = "normal" | "insert" | "visual" | "command";
|
|
7
|
-
export interface VimState {
|
|
8
|
-
mode: VimMode;
|
|
9
|
-
cursor: number;
|
|
10
|
-
commandBuffer: string;
|
|
11
|
-
visualStart: number;
|
|
12
|
-
register: string;
|
|
13
|
-
}
|
|
14
|
-
export declare function createVimState(): VimState;
|
|
15
|
-
export interface VimResult {
|
|
16
|
-
state: VimState;
|
|
17
|
-
text: string;
|
|
18
|
-
consumed: boolean;
|
|
19
|
-
action?: "submit" | "command";
|
|
20
|
-
commandText?: string;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Process a key press in vim mode.
|
|
24
|
-
*/
|
|
25
|
-
export declare function processVimKey(key: string, char: string, text: string, state: VimState): VimResult;
|
package/dist/updater-OCNU2K2Z.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{f as __internal,a as checkForUpdate,c as getAutoUpdateDisabledReason,e as getCurrentVersion,b as getUpdateAvailable,d as scheduleAutoInstallOnExit}from'./chunk-TKJA6W36.js';import'./chunk-3QP5BQ3L.js';
|
package/dist/utils/debug.d.ts
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Debug logging — thin facade over the unified logger.
|
|
3
|
-
*
|
|
4
|
-
* Historically this module wrote to ~/.code-shell/debug/<session>.txt.
|
|
5
|
-
* It now delegates to logger so all output lands in ~/.code-shell/logs/.
|
|
6
|
-
*
|
|
7
|
-
* Activation knobs (still honored, parsed inside logger):
|
|
8
|
-
* CODE_SHELL_LOG_LEVEL=debug — explicit level
|
|
9
|
-
* CODE_SHELL_DEBUG=mcp,api — category filter
|
|
10
|
-
* --debug — local dev: defaults to debug level
|
|
11
|
-
* --debug=mcp,api — category filter (CLI form)
|
|
12
|
-
* --debug-to-stderr / -d2e — echo to stderr instead of file
|
|
13
|
-
*/
|
|
14
|
-
import { type LogLevel } from "../logging/logger.js";
|
|
15
|
-
export type DebugLogLevel = "verbose" | LogLevel;
|
|
16
|
-
export declare function setDebugSessionId(id: string): void;
|
|
17
|
-
export declare function isDebugMode(): boolean;
|
|
18
|
-
export declare function enableDebugLogging(): boolean;
|
|
19
|
-
export declare function isDebugToStdErr(): boolean;
|
|
20
|
-
export declare function getMinDebugLogLevel(): DebugLogLevel;
|
|
21
|
-
/**
|
|
22
|
-
* Log a debug message. Optional level via opts.level.
|
|
23
|
-
* Embedded `[category]` tags are extracted into the structured `cat` field.
|
|
24
|
-
*/
|
|
25
|
-
export declare function logForDebugging(message: string, opts?: {
|
|
26
|
-
level?: DebugLogLevel | string;
|
|
27
|
-
}): void;
|
|
28
|
-
/**
|
|
29
|
-
* Category-scoped debug logger.
|
|
30
|
-
* Usage: const log = debugCategory("mcp"); log("connecting...");
|
|
31
|
-
*/
|
|
32
|
-
export declare function debugCategory(category: string): (msg: string) => void;
|
|
33
|
-
/**
|
|
34
|
-
* Time a function and log the duration at debug level.
|
|
35
|
-
*/
|
|
36
|
-
export declare function debugTiming<T>(label: string, fn: () => T | Promise<T>): Promise<T>;
|
|
37
|
-
export declare function logAntError(msg: string, _err?: unknown): void;
|
|
38
|
-
export declare function getDebugFilePath(): string | null;
|
|
39
|
-
export declare function setHasFormattedOutput(_v: boolean): void;
|
|
40
|
-
export declare function getHasFormattedOutput(): boolean;
|
|
41
|
-
export declare function flushDebugLogs(): Promise<void>;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Early Input Capture
|
|
3
|
-
*
|
|
4
|
-
* This module captures terminal input that is typed before the REPL is fully
|
|
5
|
-
* initialized. Users often type `claude` and immediately start typing their
|
|
6
|
-
* prompt, but those early keystrokes would otherwise be lost during startup.
|
|
7
|
-
*
|
|
8
|
-
* Usage:
|
|
9
|
-
* 1. Call startCapturingEarlyInput() as early as possible in cli.tsx
|
|
10
|
-
* 2. When REPL is ready, call consumeEarlyInput() to get any buffered text
|
|
11
|
-
* 3. stopCapturingEarlyInput() is called automatically when input is consumed
|
|
12
|
-
*/
|
|
13
|
-
/**
|
|
14
|
-
* Start capturing stdin data early, before the REPL is initialized.
|
|
15
|
-
* Should be called as early as possible in the startup sequence.
|
|
16
|
-
*
|
|
17
|
-
* Only captures if stdin is a TTY (interactive terminal).
|
|
18
|
-
*/
|
|
19
|
-
export declare function startCapturingEarlyInput(): void;
|
|
20
|
-
/**
|
|
21
|
-
* Stop capturing early input.
|
|
22
|
-
* Called automatically when input is consumed, or can be called manually.
|
|
23
|
-
*/
|
|
24
|
-
export declare function stopCapturingEarlyInput(): void;
|
|
25
|
-
/**
|
|
26
|
-
* Consume any early input that was captured.
|
|
27
|
-
* Returns the captured input and clears the buffer.
|
|
28
|
-
* Automatically stops capturing when called.
|
|
29
|
-
*/
|
|
30
|
-
export declare function consumeEarlyInput(): string;
|
|
31
|
-
/**
|
|
32
|
-
* Check if there is any early input available without consuming it.
|
|
33
|
-
*/
|
|
34
|
-
export declare function hasEarlyInput(): boolean;
|
|
35
|
-
/**
|
|
36
|
-
* Seed the early input buffer with text that will appear pre-filled
|
|
37
|
-
* in the prompt input when the REPL renders. Does not auto-submit.
|
|
38
|
-
*/
|
|
39
|
-
export declare function seedEarlyInput(text: string): void;
|
|
40
|
-
/**
|
|
41
|
-
* Check if early input capture is currently active.
|
|
42
|
-
*/
|
|
43
|
-
export declare function isCapturingEarlyInput(): boolean;
|
package/dist/utils/env.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Environment detection — platform, runtime, config paths, network.
|
|
3
|
-
*/
|
|
4
|
-
export declare const env: {
|
|
5
|
-
platform: "darwin" | "linux" | "win32";
|
|
6
|
-
terminal: string;
|
|
7
|
-
shell: string;
|
|
8
|
-
isCI: boolean;
|
|
9
|
-
};
|
|
10
|
-
export declare function getHostPlatform(): "macos" | "linux" | "windows";
|
|
11
|
-
export declare function getHostPlatformForAnalytics(): string;
|
|
12
|
-
export declare function isWSL(): boolean;
|
|
13
|
-
/** ~/.claude/ directory (Claude Code compatible) */
|
|
14
|
-
export declare function getGlobalClaudeDir(): string;
|
|
15
|
-
/** ~/.code-shell/ directory */
|
|
16
|
-
export declare function getGlobalCodeShellDir(): string;
|
|
17
|
-
/** Resolve a file in ~/.claude/ or ~/.code-shell/ (claude takes precedence) */
|
|
18
|
-
export declare function getGlobalClaudeFile(filename: string): string | undefined;
|
|
19
|
-
export declare function getRuntime(): "bun" | "deno" | "node";
|
|
20
|
-
export declare function getPackageManager(cwd?: string): "bun" | "pnpm" | "yarn" | "npm";
|
|
21
|
-
export declare function hasInternetAccess(): Promise<boolean>;
|
|
22
|
-
export declare const JETBRAINS_IDES: readonly ["idea", "pycharm", "webstorm", "phpstorm", "rubymine", "clion", "goland", "rider", "datagrip", "fleet"];
|
|
23
|
-
export declare function isJetBrainsTerminal(): boolean;
|
|
24
|
-
export declare function isVSCodeTerminal(): boolean;
|
package/dist/utils/envUtils.d.ts
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Environment variable helpers — ported from CC's utils/envUtils with full implementations.
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Returns the Claude/Code Shell config home directory.
|
|
6
|
-
* Defaults to ~/.claude, overridable via CLAUDE_CONFIG_DIR env var.
|
|
7
|
-
* Memoized — keyed off CLAUDE_CONFIG_DIR so tests that change the env var get a fresh value.
|
|
8
|
-
*/
|
|
9
|
-
export declare function getClaudeConfigHomeDir(): string;
|
|
10
|
-
export declare function getTeamsDir(): string;
|
|
11
|
-
export declare function isEnvTruthy(val: string | boolean | undefined): boolean;
|
|
12
|
-
export declare function isEnvDefinedFalsy(envVar: string | boolean | undefined): boolean;
|
|
13
|
-
/**
|
|
14
|
-
* Check if NODE_OPTIONS contains a specific flag.
|
|
15
|
-
*/
|
|
16
|
-
export declare function hasNodeOption(flag: string): boolean;
|
|
17
|
-
/**
|
|
18
|
-
* --bare / CLAUDE_CODE_SIMPLE — skip hooks, LSP, plugin sync, skill dir-walk,
|
|
19
|
-
* attribution, background prefetches, and ALL keychain/credential reads.
|
|
20
|
-
*/
|
|
21
|
-
export declare function isBareMode(): boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Parses an array of environment variable strings into a key-value object.
|
|
24
|
-
* @param rawEnvArgs Array of strings in KEY=VALUE format
|
|
25
|
-
*/
|
|
26
|
-
export declare function parseEnvVars(rawEnvArgs: string[] | undefined): Record<string, string>;
|
|
27
|
-
/**
|
|
28
|
-
* Get the AWS region with fallback to default.
|
|
29
|
-
*/
|
|
30
|
-
export declare function getAWSRegion(): string;
|
|
31
|
-
/**
|
|
32
|
-
* Get the default Vertex AI region.
|
|
33
|
-
*/
|
|
34
|
-
export declare function getDefaultVertexRegion(): string;
|
|
35
|
-
/**
|
|
36
|
-
* Check if bash commands should maintain project working directory.
|
|
37
|
-
*/
|
|
38
|
-
export declare function shouldMaintainProjectWorkingDir(): boolean;
|
|
39
|
-
/**
|
|
40
|
-
* Check if running on Homespace (ant-internal cloud environment).
|
|
41
|
-
*/
|
|
42
|
-
export declare function isRunningOnHomespace(): boolean;
|
|
43
|
-
/**
|
|
44
|
-
* Get the Vertex AI region for a specific model.
|
|
45
|
-
*/
|
|
46
|
-
export declare function getVertexRegionForModel(model: string | undefined): string | undefined;
|
|
47
|
-
/**
|
|
48
|
-
* Stub: Check if running inside a protected namespace.
|
|
49
|
-
* Always returns false in Code Shell (Anthropic-internal feature).
|
|
50
|
-
*/
|
|
51
|
-
export declare function isInProtectedNamespace(): boolean;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Execute a child process without throwing on non-zero exit.
|
|
3
|
-
*
|
|
4
|
-
* Distinguishes between:
|
|
5
|
-
* - Spawn failure (file not found, permission denied) → code = null
|
|
6
|
-
* - Non-zero exit (process ran but returned error) → code = exit code
|
|
7
|
-
* - Success → code = 0
|
|
8
|
-
*/
|
|
9
|
-
export interface ExecFileNoThrowResult {
|
|
10
|
-
/** Process exit code (0 = success, null = spawn failed). */
|
|
11
|
-
code: number | null;
|
|
12
|
-
stdout: string;
|
|
13
|
-
stderr: string;
|
|
14
|
-
}
|
|
15
|
-
export interface ExecFileNoThrowOptions {
|
|
16
|
-
/** stdin input to pipe to the process. */
|
|
17
|
-
input?: string;
|
|
18
|
-
/** Working directory. */
|
|
19
|
-
cwd?: string;
|
|
20
|
-
/** Timeout in ms (default 10_000). */
|
|
21
|
-
timeout?: number;
|
|
22
|
-
/** Environment variables to merge. */
|
|
23
|
-
env?: Record<string, string | undefined>;
|
|
24
|
-
/** Shell to run in (if true, uses platform default). */
|
|
25
|
-
shell?: boolean | string;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Run a command and return exit code + stdout/stderr.
|
|
29
|
-
* Never throws — spawn failures return code=null.
|
|
30
|
-
*/
|
|
31
|
-
export declare function execFileNoThrow(file: string, args: string[], options?: ExecFileNoThrowOptions): Promise<ExecFileNoThrowResult>;
|
|
32
|
-
/**
|
|
33
|
-
* execFileNoThrow with explicit cwd (convenience wrapper).
|
|
34
|
-
*/
|
|
35
|
-
export declare function execFileNoThrowWithCwd(cwd: string, file: string, args: string[], options?: Omit<ExecFileNoThrowOptions, "cwd">): Promise<ExecFileNoThrowResult>;
|
|
36
|
-
/**
|
|
37
|
-
* @deprecated Use execFileNoThrow directly.
|
|
38
|
-
*/
|
|
39
|
-
export declare function execSyncWithDefaults_DEPRECATED(..._args: any[]): any;
|
package/dist/utils/format.d.ts
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Formats a byte count to a human-readable string (KB, MB, GB).
|
|
3
|
-
* @example formatFileSize(1536) → "1.5KB"
|
|
4
|
-
*/
|
|
5
|
-
export declare function formatFileSize(sizeInBytes: number): string;
|
|
6
|
-
/**
|
|
7
|
-
* Formats milliseconds as seconds with 1 decimal place (e.g. `1234` → `"1.2s"`).
|
|
8
|
-
* Unlike formatDuration, always keeps the decimal — use for sub-minute timings
|
|
9
|
-
* where the fractional second is meaningful (TTFT, hook durations, etc.).
|
|
10
|
-
*/
|
|
11
|
-
export declare function formatSecondsShort(ms: number): string;
|
|
12
|
-
export declare function formatDuration(ms: number, options?: {
|
|
13
|
-
hideTrailingZeros?: boolean;
|
|
14
|
-
mostSignificantOnly?: boolean;
|
|
15
|
-
}): string;
|
|
16
|
-
export declare function formatNumber(number: number): string;
|
|
17
|
-
export declare function formatTokens(count: number): string;
|
|
18
|
-
type RelativeTimeStyle = 'long' | 'short' | 'narrow';
|
|
19
|
-
type RelativeTimeOptions = {
|
|
20
|
-
style?: RelativeTimeStyle;
|
|
21
|
-
numeric?: 'always' | 'auto';
|
|
22
|
-
};
|
|
23
|
-
export declare function formatRelativeTime(date: Date, options?: RelativeTimeOptions & {
|
|
24
|
-
now?: Date;
|
|
25
|
-
}): string;
|
|
26
|
-
export declare function formatRelativeTimeAgo(date: Date, options?: RelativeTimeOptions & {
|
|
27
|
-
now?: Date;
|
|
28
|
-
}): string;
|
|
29
|
-
/**
|
|
30
|
-
* Formats log metadata for display (time, size or message count, branch, tag, PR)
|
|
31
|
-
*/
|
|
32
|
-
export declare function formatLogMetadata(log: {
|
|
33
|
-
modified: Date;
|
|
34
|
-
messageCount: number;
|
|
35
|
-
fileSize?: number;
|
|
36
|
-
gitBranch?: string;
|
|
37
|
-
tag?: string;
|
|
38
|
-
agentSetting?: string;
|
|
39
|
-
prNumber?: number;
|
|
40
|
-
prRepository?: string;
|
|
41
|
-
}): string;
|
|
42
|
-
export declare function formatResetTime(timestampInSeconds: number | undefined, showTimezone?: boolean, showTime?: boolean): string | undefined;
|
|
43
|
-
export declare function formatResetText(resetsAt: string, showTimezone?: boolean, showTime?: boolean): string;
|
|
44
|
-
export { truncate, truncatePathMiddle, truncateStartToWidth, truncateToWidth, truncateToWidthNoEllipsis, wrapText, } from './truncate.js';
|