@cjhyy/code-shell 0.1.0-alpha.0
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 +109 -0
- package/LICENSE +21 -0
- package/README.md +177 -0
- package/dist/agent/coordinator.d.ts +49 -0
- package/dist/anthropic-NENYS535.js +9 -0
- package/dist/anthropic-XMTTVNSH.cjs +9 -0
- package/dist/arena/arena.d.ts +43 -0
- package/dist/arena/context/context-tools.d.ts +16 -0
- package/dist/arena/detect-mode.d.ts +20 -0
- package/dist/arena/digest-builder.d.ts +25 -0
- package/dist/arena/index.cjs +103 -0
- package/dist/arena/index.d.ts +29 -0
- package/dist/arena/index.js +103 -0
- package/dist/arena/iterate/convergence.d.ts +25 -0
- package/dist/arena/iterate/formats/index.d.ts +22 -0
- package/dist/arena/iterate/index.d.ts +11 -0
- package/dist/arena/iterate/iterative-arena.d.ts +23 -0
- package/dist/arena/iterate/parse.d.ts +42 -0
- package/dist/arena/iterate/phases/argue.d.ts +22 -0
- package/dist/arena/iterate/phases/revise.d.ts +16 -0
- package/dist/arena/iterate/phases/tournament.d.ts +34 -0
- package/dist/arena/iterate/tools/web-tools.d.ts +13 -0
- package/dist/arena/iterate/types.d.ts +152 -0
- package/dist/arena/ledger.d.ts +47 -0
- package/dist/arena/lenses/architecture.d.ts +5 -0
- package/dist/arena/lenses/engineering.d.ts +5 -0
- package/dist/arena/lenses/general.d.ts +5 -0
- package/dist/arena/lenses/index.d.ts +16 -0
- package/dist/arena/lenses/product.d.ts +5 -0
- package/dist/arena/model-presets.d.ts +14 -0
- package/dist/arena/phases/adjudication.d.ts +24 -0
- package/dist/arena/phases/build-consensus.d.ts +29 -0
- package/dist/arena/phases/claim-registry.d.ts +26 -0
- package/dist/arena/phases/cross-review.d.ts +45 -0
- package/dist/arena/phases/debate-rounds.d.ts +27 -0
- package/dist/arena/phases/participant-research.d.ts +38 -0
- package/dist/arena/phases/planning-detail-expansion.d.ts +38 -0
- package/dist/arena/planner.d.ts +27 -0
- package/dist/arena/providers/docs.d.ts +6 -0
- package/dist/arena/providers/git.d.ts +8 -0
- package/dist/arena/providers/index.d.ts +16 -0
- package/dist/arena/providers/none.d.ts +7 -0
- package/dist/arena/providers/repo.d.ts +6 -0
- package/dist/arena/render/session.d.ts +17 -0
- package/dist/arena/render/terminal.d.ts +33 -0
- package/dist/arena/strategies/discussion.d.ts +25 -0
- package/dist/arena/strategies/index.d.ts +15 -0
- package/dist/arena/strategies/language-wrapper.d.ts +17 -0
- package/dist/arena/strategies/lens-wrapper.d.ts +16 -0
- package/dist/arena/strategies/planning.d.ts +30 -0
- package/dist/arena/strategies/review.d.ts +26 -0
- package/dist/arena/strategies/utils.d.ts +34 -0
- package/dist/arena/tools/selector.d.ts +17 -0
- package/dist/arena/transitions.d.ts +48 -0
- package/dist/arena/types.d.ts +499 -0
- package/dist/arena-46QQ6BZQ.js +261 -0
- package/dist/arena-HZZZ2GJH.cjs +261 -0
- package/dist/bootstrap/setup.d.ts +14 -0
- package/dist/bootstrap/state.d.ts +160 -0
- package/dist/bridge-4ZRXVWBN.js +98 -0
- package/dist/bridge-W476QDFH.cjs +98 -0
- package/dist/chunk-3EAEC566.cjs +136 -0
- package/dist/chunk-3EUDE77E.cjs +1252 -0
- package/dist/chunk-3QR52LL5.cjs +105 -0
- package/dist/chunk-4PKZPFCD.js +136 -0
- package/dist/chunk-4RRUP4MM.js +86 -0
- package/dist/chunk-4SFPFHMG.js +132 -0
- package/dist/chunk-5LHVI777.cjs +246 -0
- package/dist/chunk-6JOOLG6F.js +104 -0
- package/dist/chunk-6ZIROYXX.js +207 -0
- package/dist/chunk-7RMAR2Y3.js +6511 -0
- package/dist/chunk-BE6IPRDM.js +224 -0
- package/dist/chunk-BHGIJ2DJ.js +41 -0
- package/dist/chunk-BMH65OVB.cjs +224 -0
- package/dist/chunk-C7JBCO5V.js +80 -0
- package/dist/chunk-CSO5EOEP.cjs +132 -0
- package/dist/chunk-DI7RDLOS.js +47 -0
- package/dist/chunk-DICG4AB7.cjs +73 -0
- package/dist/chunk-EL2RL5DG.cjs +101 -0
- package/dist/chunk-FGZGCFJX.cjs +207 -0
- package/dist/chunk-FUOKLKR2.js +101 -0
- package/dist/chunk-FVP7XJGS.cjs +4577 -0
- package/dist/chunk-HD7MT5XU.cjs +86 -0
- package/dist/chunk-IJSHQGMP.cjs +45 -0
- package/dist/chunk-IMMTBZ33.cjs +63 -0
- package/dist/chunk-J5XW6UYL.js +291 -0
- package/dist/chunk-JT2WSQSR.cjs +335 -0
- package/dist/chunk-KO2FPF7G.js +93 -0
- package/dist/chunk-LRAY5IYC.cjs +291 -0
- package/dist/chunk-NG73UR3L.cjs +285 -0
- package/dist/chunk-NZ4DQ72D.cjs +664 -0
- package/dist/chunk-O6F2EF2Z.js +73 -0
- package/dist/chunk-OG4MIQJ6.js +335 -0
- package/dist/chunk-QHDYFC5U.cjs +6511 -0
- package/dist/chunk-R32DJSJE.cjs +41 -0
- package/dist/chunk-S74VVJBF.js +285 -0
- package/dist/chunk-SK62UVS6.js +105 -0
- package/dist/chunk-SQZHPD3S.js +4577 -0
- package/dist/chunk-UK2SU23S.cjs +93 -0
- package/dist/chunk-VKGNCYRL.js +258 -0
- package/dist/chunk-WFQF3RT4.cjs +104 -0
- package/dist/chunk-WHRTARDJ.cjs +258 -0
- package/dist/chunk-WRZJUQ5Z.js +664 -0
- package/dist/chunk-X4HAERTQ.js +63 -0
- package/dist/chunk-XHC2JMEC.cjs +80 -0
- package/dist/chunk-YZ25SSWJ.js +222 -0
- package/dist/chunk-ZJV3YSY3.cjs +222 -0
- package/dist/chunk-ZRSSGYA5.js +246 -0
- package/dist/chunk-ZXYDDJEJ.js +1252 -0
- package/dist/cli/commands/arena.d.ts +29 -0
- package/dist/cli/commands/builtin/advanced-commands.d.ts +5 -0
- package/dist/cli/commands/builtin/core-commands.d.ts +5 -0
- package/dist/cli/commands/builtin/extra-commands.d.ts +6 -0
- package/dist/cli/commands/builtin/git-commands.d.ts +5 -0
- package/dist/cli/commands/builtin/more-commands.d.ts +7 -0
- package/dist/cli/commands/builtin/permissions-command.d.ts +5 -0
- package/dist/cli/commands/builtin/utility-commands.d.ts +5 -0
- package/dist/cli/commands/registry.d.ts +64 -0
- package/dist/cli/commands/repl.d.ts +21 -0
- package/dist/cli/commands/run.d.ts +21 -0
- package/dist/cli/commands/runs.d.ts +14 -0
- package/dist/cli/cost-tracker.d.ts +57 -0
- package/dist/cli/exit.d.ts +12 -0
- package/dist/cli/input/ndjson-reader.d.ts +31 -0
- package/dist/cli/input-compiler.d.ts +5 -0
- package/dist/cli/main.cjs +19674 -0
- package/dist/cli/main.d.ts +5 -0
- package/dist/cli/main.js +19674 -0
- package/dist/cli/onboarding.d.ts +26 -0
- package/dist/cli/output/renderer.d.ts +28 -0
- package/dist/cli/output/terminal-ui.d.ts +50 -0
- package/dist/cli/updater.d.ts +10 -0
- package/dist/compaction-44I55TLI.cjs +32 -0
- package/dist/compaction-CCHWA4G6.js +32 -0
- package/dist/context/compaction.d.ts +83 -0
- package/dist/context/manager.d.ts +99 -0
- package/dist/context/token-counter.d.ts +27 -0
- package/dist/coordinator-5HY7ALO2.js +7 -0
- package/dist/coordinator-INDLPVMF.cjs +7 -0
- package/dist/cost-tracker-IWYAUPXH.js +9 -0
- package/dist/cost-tracker-JXTJQQWE.cjs +9 -0
- package/dist/cron/scheduler.d.ts +34 -0
- package/dist/devtools-KIY3LWQJ.js +6 -0
- package/dist/devtools-LRP47DDV.cjs +6 -0
- package/dist/engine/cost-store.d.ts +22 -0
- package/dist/engine/engine.d.ts +101 -0
- package/dist/engine/model-facade.d.ts +24 -0
- package/dist/engine/query.d.ts +50 -0
- package/dist/engine/streaming-tool-queue.d.ts +34 -0
- package/dist/engine/token-budget.d.ts +22 -0
- package/dist/engine/tool-summary.d.ts +13 -0
- package/dist/engine/turn-loop.d.ts +62 -0
- package/dist/engine/turn-state.d.ts +14 -0
- package/dist/exceptions.d.ts +44 -0
- package/dist/file-history-HZWO2WQ5.js +7 -0
- package/dist/file-history-UQQILIY7.cjs +7 -0
- package/dist/git/utils.d.ts +35 -0
- package/dist/git/worktree.d.ts +36 -0
- package/dist/hooks/events.d.ts +35 -0
- package/dist/hooks/registry.d.ts +15 -0
- package/dist/index.cjs +336 -0
- package/dist/index.d.ts +64 -0
- package/dist/index.js +336 -0
- package/dist/ink/Ansi.d.ts +10 -0
- package/dist/ink/bidi.d.ts +15 -0
- package/dist/ink/clearTerminal.d.ts +13 -0
- package/dist/ink/colorize.d.ts +16 -0
- package/dist/ink/components/AlternateScreen.d.ts +21 -0
- package/dist/ink/components/App.d.ts +70 -0
- package/dist/ink/components/AppContext.d.ts +11 -0
- package/dist/ink/components/Box.d.ts +49 -0
- package/dist/ink/components/Button.d.ts +36 -0
- package/dist/ink/components/ClockContext.d.ts +9 -0
- package/dist/ink/components/CursorDeclarationContext.d.ts +22 -0
- package/dist/ink/components/ErrorOverview.d.ts +5 -0
- package/dist/ink/components/Link.d.ts +7 -0
- package/dist/ink/components/Newline.d.ts +12 -0
- package/dist/ink/components/NoSelect.d.ts +19 -0
- package/dist/ink/components/RawAnsi.d.ts +16 -0
- package/dist/ink/components/ScrollBox.d.ts +78 -0
- package/dist/ink/components/Spacer.d.ts +5 -0
- package/dist/ink/components/StdinContext.d.ts +27 -0
- package/dist/ink/components/TerminalFocusContext.d.ts +10 -0
- package/dist/ink/components/TerminalSizeContext.d.ts +5 -0
- package/dist/ink/components/Text.d.ts +55 -0
- package/dist/ink/constants.d.ts +1 -0
- package/dist/ink/cursor.d.ts +8 -0
- package/dist/ink/devtools.d.ts +5 -0
- package/dist/ink/dom.d.ts +76 -0
- package/dist/ink/events/click-event.d.ts +31 -0
- package/dist/ink/events/dispatcher.d.ts +40 -0
- package/dist/ink/events/emitter.d.ts +5 -0
- package/dist/ink/events/event-handlers.d.ts +46 -0
- package/dist/ink/events/event.d.ts +5 -0
- package/dist/ink/events/focus-event.d.ts +13 -0
- package/dist/ink/events/input-event.d.ts +30 -0
- package/dist/ink/events/keyboard-event.d.ts +19 -0
- package/dist/ink/events/paste-event.d.ts +8 -0
- package/dist/ink/events/resize-event.d.ts +9 -0
- package/dist/ink/events/terminal-event.d.ts +54 -0
- package/dist/ink/events/terminal-focus-event.d.ts +13 -0
- package/dist/ink/focus.d.ts +43 -0
- package/dist/ink/frame.d.ts +94 -0
- package/dist/ink/get-max-width.d.ts +17 -0
- package/dist/ink/hit-test.d.ts +33 -0
- package/dist/ink/hooks/use-animation-frame.d.ts +26 -0
- package/dist/ink/hooks/use-app.d.ts +5 -0
- package/dist/ink/hooks/use-declared-cursor.d.ts +26 -0
- package/dist/ink/hooks/use-input.d.ts +37 -0
- package/dist/ink/hooks/use-interval.d.ts +18 -0
- package/dist/ink/hooks/use-search-highlight.d.ts +30 -0
- package/dist/ink/hooks/use-selection.d.ts +39 -0
- package/dist/ink/hooks/use-stdin.d.ts +5 -0
- package/dist/ink/hooks/use-tab-status.d.ts +13 -0
- package/dist/ink/hooks/use-terminal-focus.d.ts +10 -0
- package/dist/ink/hooks/use-terminal-title.d.ts +12 -0
- package/dist/ink/hooks/use-terminal-viewport.d.ts +29 -0
- package/dist/ink/index.d.ts +20 -0
- package/dist/ink/ink.d.ts +369 -0
- package/dist/ink/instances.d.ts +3 -0
- package/dist/ink/layout/engine.d.ts +2 -0
- package/dist/ink/layout/geometry.d.ts +30 -0
- package/dist/ink/layout/node.d.ts +125 -0
- package/dist/ink/layout/yoga.d.ts +56 -0
- package/dist/ink/line-width-cache.d.ts +1 -0
- package/dist/ink/log-update.d.ts +17 -0
- package/dist/ink/measure-element.d.ts +16 -0
- package/dist/ink/measure-text.d.ts +6 -0
- package/dist/ink/node-cache.d.ts +20 -0
- package/dist/ink/optimizer.d.ts +15 -0
- package/dist/ink/output.d.ts +119 -0
- package/dist/ink/parse-keypress.d.ts +111 -0
- package/dist/ink/reconciler.d.ts +11 -0
- package/dist/ink/render-border.d.ts +24 -0
- package/dist/ink/render-node-to-output.d.ts +45 -0
- package/dist/ink/render-to-screen.d.ts +46 -0
- package/dist/ink/renderer.d.ts +14 -0
- package/dist/ink/root.d.ts +74 -0
- package/dist/ink/screen.d.ts +269 -0
- package/dist/ink/searchHighlight.d.ts +20 -0
- package/dist/ink/selection.d.ts +229 -0
- package/dist/ink/squash-text-nodes.d.ts +22 -0
- package/dist/ink/stringWidth.d.ts +1 -0
- package/dist/ink/styles.d.ts +306 -0
- package/dist/ink/supports-hyperlinks.d.ts +13 -0
- package/dist/ink/tabstops.d.ts +1 -0
- package/dist/ink/terminal-focus-state.d.ts +6 -0
- package/dist/ink/terminal-querier.d.ts +129 -0
- package/dist/ink/terminal.d.ts +46 -0
- package/dist/ink/termio/ansi.d.ts +65 -0
- package/dist/ink/termio/csi.d.ts +165 -0
- package/dist/ink/termio/dec.d.ts +37 -0
- package/dist/ink/termio/esc.d.ts +12 -0
- package/dist/ink/termio/osc.d.ts +173 -0
- package/dist/ink/termio/parser.d.ts +35 -0
- package/dist/ink/termio/sgr.d.ts +8 -0
- package/dist/ink/termio/tokenize.d.ts +45 -0
- package/dist/ink/termio/types.d.ts +190 -0
- package/dist/ink/termio.d.ts +24 -0
- package/dist/ink/useTerminalNotification.d.ts +28 -0
- package/dist/ink/warn.d.ts +1 -0
- package/dist/ink/widest-line.d.ts +1 -0
- package/dist/ink/wrap-text.d.ts +2 -0
- package/dist/ink/wrapAnsi.d.ts +7 -0
- package/dist/llm/client-base.d.ts +22 -0
- package/dist/llm/client-factory.d.ts +10 -0
- package/dist/llm/model-pool.d.ts +60 -0
- package/dist/llm/providers/anthropic.d.ts +19 -0
- package/dist/llm/providers/openai.d.ts +19 -0
- package/dist/llm/types.d.ts +21 -0
- package/dist/loader-DXFSUB4R.cjs +91 -0
- package/dist/loader-J5UID6CV.js +91 -0
- package/dist/logging/logger.d.ts +19 -0
- package/dist/lsp/client.d.ts +41 -0
- package/dist/lsp/manager.d.ts +40 -0
- package/dist/lsp/servers.d.ts +16 -0
- package/dist/manager-ETWDOCHN.cjs +9 -0
- package/dist/manager-HGMQNEJB.cjs +11 -0
- package/dist/manager-HUAQOORS.js +9 -0
- package/dist/manager-VJIZ2CQC.js +11 -0
- package/dist/mcp-manager-G4G2QASE.cjs +8 -0
- package/dist/mcp-manager-OKXHHWYR.js +8 -0
- package/dist/memory-AP747G5H.js +7 -0
- package/dist/memory-BH3BYUN5.cjs +7 -0
- package/dist/native-ts/yoga-layout/enums.d.ts +117 -0
- package/dist/native-ts/yoga-layout/index.d.ts +270 -0
- package/dist/onboarding-6WEPV7C2.js +11 -0
- package/dist/onboarding-QM5DY2TU.cjs +11 -0
- package/dist/openai-5HQGBL4L.js +9 -0
- package/dist/openai-656VWUQW.cjs +9 -0
- package/dist/plugins/loader.d.ts +72 -0
- package/dist/plugins/types.d.ts +4 -0
- package/dist/preset/index.d.ts +60 -0
- package/dist/product/define.d.ts +60 -0
- package/dist/product/index.cjs +23 -0
- package/dist/product/index.d.ts +5 -0
- package/dist/product/index.js +23 -0
- package/dist/product/types.d.ts +116 -0
- package/dist/prompt/composer.d.ts +42 -0
- package/dist/prompt/instruction-scanner.d.ts +54 -0
- package/dist/prompt/section-cache.d.ts +15 -0
- package/dist/prompt/section-loader.d.ts +26 -0
- package/dist/protocol/client.d.ts +64 -0
- package/dist/protocol/index.d.ts +4 -0
- package/dist/protocol/server.d.ts +49 -0
- package/dist/protocol/transport.d.ts +36 -0
- package/dist/protocol/types.d.ts +150 -0
- package/dist/react-compiler-runtime-shim.d.ts +1 -0
- package/dist/remote/bridge.d.ts +37 -0
- package/dist/run/ArtifactTracker.d.ts +38 -0
- package/dist/run/CheckpointWriter.d.ts +53 -0
- package/dist/run/EngineRunner.d.ts +70 -0
- package/dist/run/Evaluator.d.ts +56 -0
- package/dist/run/FileRunStore.d.ts +39 -0
- package/dist/run/Heartbeat.d.ts +54 -0
- package/dist/run/RunApprovalBackend.d.ts +53 -0
- package/dist/run/RunLock.d.ts +40 -0
- package/dist/run/RunManager.d.ts +76 -0
- package/dist/run/RunQueue.d.ts +27 -0
- package/dist/run/RunStore.d.ts +25 -0
- package/dist/run/factory.d.ts +57 -0
- package/dist/run/index.cjs +50 -0
- package/dist/run/index.d.ts +17 -0
- package/dist/run/index.js +50 -0
- package/dist/run/types.d.ts +136 -0
- package/dist/services/analytics.d.ts +29 -0
- package/dist/services/auto-dream.d.ts +35 -0
- package/dist/services/compact.d.ts +56 -0
- package/dist/services/diagnostics.d.ts +41 -0
- package/dist/services/extract-memories.d.ts +27 -0
- package/dist/services/index.d.ts +11 -0
- package/dist/services/notifier.d.ts +25 -0
- package/dist/services/oauth.d.ts +27 -0
- package/dist/services/session-memory.d.ts +37 -0
- package/dist/session/file-history.d.ts +41 -0
- package/dist/session/memory.d.ts +45 -0
- package/dist/session/session-manager.d.ts +23 -0
- package/dist/session/transcript.d.ts +39 -0
- package/dist/session-manager-JIIBCFTC.js +8 -0
- package/dist/session-manager-UQKB564H.cjs +8 -0
- package/dist/settings/manager.d.ts +27 -0
- package/dist/settings/schema.d.ts +676 -0
- package/dist/skills/index.d.ts +7 -0
- package/dist/skills/matcher.d.ts +21 -0
- package/dist/skills/scanner.d.ts +30 -0
- package/dist/skills-63RBYQRX.js +13 -0
- package/dist/skills-V3BPLW3D.cjs +13 -0
- package/dist/token-counter-CHAXW5O7.cjs +13 -0
- package/dist/token-counter-DSOZGZ5Q.js +13 -0
- package/dist/tool-summary-5P2GKRA4.cjs +31 -0
- package/dist/tool-summary-J2ICNMWP.js +31 -0
- package/dist/tool-system/builtin/agent.d.ts +35 -0
- package/dist/tool-system/builtin/arena.d.ts +18 -0
- package/dist/tool-system/builtin/ask-user.d.ts +12 -0
- package/dist/tool-system/builtin/bash.d.ts +6 -0
- package/dist/tool-system/builtin/brief.d.ts +6 -0
- package/dist/tool-system/builtin/config.d.ts +6 -0
- package/dist/tool-system/builtin/cron.d.ts +10 -0
- package/dist/tool-system/builtin/edit.d.ts +6 -0
- package/dist/tool-system/builtin/file-cache.d.ts +11 -0
- package/dist/tool-system/builtin/glob.d.ts +6 -0
- package/dist/tool-system/builtin/grep.d.ts +6 -0
- package/dist/tool-system/builtin/index.d.ts +10 -0
- package/dist/tool-system/builtin/lsp.d.ts +6 -0
- package/dist/tool-system/builtin/mcp-tools.d.ts +10 -0
- package/dist/tool-system/builtin/notebook-edit.d.ts +6 -0
- package/dist/tool-system/builtin/plan.d.ts +18 -0
- package/dist/tool-system/builtin/powershell.d.ts +6 -0
- package/dist/tool-system/builtin/read.d.ts +6 -0
- package/dist/tool-system/builtin/remote-trigger.d.ts +6 -0
- package/dist/tool-system/builtin/repl.d.ts +6 -0
- package/dist/tool-system/builtin/send-message.d.ts +6 -0
- package/dist/tool-system/builtin/skill.d.ts +6 -0
- package/dist/tool-system/builtin/sleep.d.ts +6 -0
- package/dist/tool-system/builtin/task.d.ts +51 -0
- package/dist/tool-system/builtin/tool-search.d.ts +12 -0
- package/dist/tool-system/builtin/web-fetch.d.ts +6 -0
- package/dist/tool-system/builtin/web-search.d.ts +6 -0
- package/dist/tool-system/builtin/worktree.d.ts +10 -0
- package/dist/tool-system/builtin/write.d.ts +6 -0
- package/dist/tool-system/executor.d.ts +25 -0
- package/dist/tool-system/mcp-manager.d.ts +50 -0
- package/dist/tool-system/permission.d.ts +69 -0
- package/dist/tool-system/registry.d.ts +24 -0
- package/dist/tool-system/validation.d.ts +5 -0
- package/dist/types.d.ts +260 -0
- package/dist/ui/App.d.ts +14 -0
- package/dist/ui/components/AgentBlock.d.ts +32 -0
- package/dist/ui/components/BabyHand.d.ts +1 -0
- package/dist/ui/components/Banner.d.ts +8 -0
- package/dist/ui/components/CodeBlock.d.ts +7 -0
- package/dist/ui/components/CommandInput.d.ts +13 -0
- package/dist/ui/components/ContextUsageBar.d.ts +7 -0
- package/dist/ui/components/DiffView.d.ts +6 -0
- package/dist/ui/components/DogLogo.d.ts +1 -0
- package/dist/ui/components/FullscreenLayout.d.ts +51 -0
- package/dist/ui/components/KunHead.d.ts +1 -0
- package/dist/ui/components/KunLogo.d.ts +1 -0
- package/dist/ui/components/MessageContent.d.ts +22 -0
- package/dist/ui/components/PermissionDialog.d.ts +8 -0
- package/dist/ui/components/PermissionPrompt.d.ts +8 -0
- package/dist/ui/components/ScrollView.d.ts +34 -0
- package/dist/ui/components/Spinner.d.ts +8 -0
- package/dist/ui/components/SpinnerWithVerb.d.ts +13 -0
- package/dist/ui/components/StatusLine.d.ts +22 -0
- package/dist/ui/components/StructuredDiff.d.ts +8 -0
- package/dist/ui/components/TaskList.d.ts +6 -0
- package/dist/ui/components/TextInput.d.ts +9 -0
- package/dist/ui/components/ThemedBox.d.ts +19 -0
- package/dist/ui/components/ThemedText.d.ts +26 -0
- package/dist/ui/components/ToolCall.d.ts +21 -0
- package/dist/ui/components/VirtualMessageList.d.ts +24 -0
- package/dist/ui/hooks/useCostSummary.d.ts +1 -0
- package/dist/ui/index.d.ts +12 -0
- package/dist/ui/input-history.d.ts +61 -0
- package/dist/ui/store.d.ts +82 -0
- package/dist/ui/terminal-renderer.d.ts +45 -0
- package/dist/ui/theme.d.ts +36 -0
- package/dist/ui/vim-mode.d.ts +25 -0
- package/dist/updater-AVD4LKTQ.js +183 -0
- package/dist/updater-URVNPDPW.cjs +183 -0
- package/dist/utils/debug.d.ts +57 -0
- package/dist/utils/earlyInput.d.ts +43 -0
- package/dist/utils/env.d.ts +24 -0
- package/dist/utils/envUtils.d.ts +51 -0
- package/dist/utils/execFileNoThrow.d.ts +39 -0
- package/dist/utils/format.d.ts +44 -0
- package/dist/utils/fullscreen.d.ts +47 -0
- package/dist/utils/intl.d.ts +22 -0
- package/dist/utils/lockfile.d.ts +15 -0
- package/dist/utils/log.d.ts +56 -0
- package/dist/utils/semver.d.ts +5 -0
- package/dist/utils/sliceAnsi.d.ts +12 -0
- package/dist/utils/systemTheme.d.ts +40 -0
- package/dist/utils/theme.d.ts +91 -0
- package/dist/utils/toolDisplay.d.ts +31 -0
- package/dist/utils/truncate.d.ts +40 -0
- package/dist/voice/index.d.ts +35 -0
- package/dist/voice-KTZ7PAGO.js +80 -0
- package/dist/voice-KZE25GKB.cjs +80 -0
- package/package.json +130 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ThemedBox — Box that accepts theme keys for color props.
|
|
3
|
+
*
|
|
4
|
+
* Uses the canonical Theme type from utils/theme.ts (shared with
|
|
5
|
+
* components/design-system/ThemedBox). Kept as a separate file because
|
|
6
|
+
* the design-system version depends on the heavy ThemeProvider; this
|
|
7
|
+
* version uses the lightweight ui/theme.ts context.
|
|
8
|
+
*/
|
|
9
|
+
import React from "react";
|
|
10
|
+
import { type BoxProps } from "../../ink/index.js";
|
|
11
|
+
import type { Theme } from "../../utils/theme.js";
|
|
12
|
+
type ColorProp = keyof Theme | string;
|
|
13
|
+
export interface ThemedBoxProps extends Omit<BoxProps, "borderColor" | "backgroundColor"> {
|
|
14
|
+
borderColor?: ColorProp;
|
|
15
|
+
backgroundColor?: ColorProp;
|
|
16
|
+
children?: React.ReactNode;
|
|
17
|
+
}
|
|
18
|
+
export declare function ThemedBox({ borderColor, backgroundColor, ...rest }: ThemedBoxProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ThemedText — Text that accepts theme keys for color props.
|
|
3
|
+
*
|
|
4
|
+
* Uses the canonical Theme type from utils/theme.ts (shared with
|
|
5
|
+
* components/design-system/ThemedText). Kept separate because the
|
|
6
|
+
* design-system version depends on the heavy ThemeProvider; this
|
|
7
|
+
* version uses the lightweight ui/theme.ts context.
|
|
8
|
+
*/
|
|
9
|
+
import React from "react";
|
|
10
|
+
import type { Theme } from "../../utils/theme.js";
|
|
11
|
+
type ColorProp = keyof Theme | string;
|
|
12
|
+
export interface ThemedTextProps {
|
|
13
|
+
color?: ColorProp;
|
|
14
|
+
backgroundColor?: ColorProp;
|
|
15
|
+
bold?: boolean;
|
|
16
|
+
italic?: boolean;
|
|
17
|
+
underline?: boolean;
|
|
18
|
+
strikethrough?: boolean;
|
|
19
|
+
inverse?: boolean;
|
|
20
|
+
dimColor?: boolean;
|
|
21
|
+
dim?: boolean;
|
|
22
|
+
wrap?: "wrap" | "truncate" | "truncate-start" | "truncate-middle" | "truncate-end";
|
|
23
|
+
children?: React.ReactNode;
|
|
24
|
+
}
|
|
25
|
+
export declare function ThemedText({ color, backgroundColor, dimColor, dim, ...rest }: ThemedTextProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
interface ToolCallStartProps {
|
|
2
|
+
toolName: string;
|
|
3
|
+
args: Record<string, unknown>;
|
|
4
|
+
nested?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare function ToolCallStart({ toolName, args, nested }: ToolCallStartProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
interface ToolCallRunningProps {
|
|
8
|
+
toolName: string;
|
|
9
|
+
nested?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare function ToolCallRunning({ toolName, nested }: ToolCallRunningProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
interface ToolCallResultProps {
|
|
13
|
+
toolName: string;
|
|
14
|
+
result?: string;
|
|
15
|
+
error?: string;
|
|
16
|
+
nested?: boolean;
|
|
17
|
+
/** When true, show full output instead of collapsed preview. */
|
|
18
|
+
expanded?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export declare function ToolCallResult({ toolName, result, error, nested, expanded: forceExpand }: ToolCallResultProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* VirtualMessageList — renders only visible messages for performance.
|
|
3
|
+
*
|
|
4
|
+
* When message count exceeds VIRTUALIZE_THRESHOLD, only renders messages
|
|
5
|
+
* within the visible viewport (plus overscan buffer). Uses height estimation
|
|
6
|
+
* for off-screen items via spacer elements.
|
|
7
|
+
*
|
|
8
|
+
* For smaller conversations, renders all messages directly (no virtualization).
|
|
9
|
+
*
|
|
10
|
+
* Also provides an unseen message divider ("── N new ──") when the user
|
|
11
|
+
* scrolls away and new messages arrive.
|
|
12
|
+
*/
|
|
13
|
+
import { type ReactNode } from "react";
|
|
14
|
+
import type { ChatEntry } from "../store.js";
|
|
15
|
+
interface VirtualMessageListProps {
|
|
16
|
+
entries: ChatEntry[];
|
|
17
|
+
renderEntry: (entry: ChatEntry, key: string) => ReactNode;
|
|
18
|
+
/** Index where "N new" divider should render (null = no divider). */
|
|
19
|
+
dividerIndex?: number | null;
|
|
20
|
+
/** Count of unseen messages to show in divider. */
|
|
21
|
+
unseenCount?: number;
|
|
22
|
+
}
|
|
23
|
+
export declare function VirtualMessageList({ entries, renderEntry, dividerIndex, unseenCount, }: VirtualMessageListProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useCostSummary(): void;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { AgentClient } from "../protocol/client.js";
|
|
2
|
+
export interface InkReplOptions {
|
|
3
|
+
client: AgentClient;
|
|
4
|
+
model: string;
|
|
5
|
+
effort: string;
|
|
6
|
+
maxTurns: number;
|
|
7
|
+
cwd: string;
|
|
8
|
+
maxContextTokens: number;
|
|
9
|
+
sessionId?: string;
|
|
10
|
+
prefill?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function startInkRepl(options: InkReplOptions): Promise<void>;
|
|
@@ -0,0 +1,61 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,82 @@
|
|
|
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
|
+
agentId?: string;
|
|
21
|
+
} | {
|
|
22
|
+
type: "tool_running";
|
|
23
|
+
toolName: string;
|
|
24
|
+
agentId?: string;
|
|
25
|
+
} | {
|
|
26
|
+
type: "tool_result";
|
|
27
|
+
toolName: string;
|
|
28
|
+
result?: string;
|
|
29
|
+
error?: string;
|
|
30
|
+
agentId?: string;
|
|
31
|
+
} | {
|
|
32
|
+
type: "thinking";
|
|
33
|
+
agentId?: string;
|
|
34
|
+
content?: string;
|
|
35
|
+
} | {
|
|
36
|
+
type: "error";
|
|
37
|
+
error: string;
|
|
38
|
+
errorKind?: ErrorKind;
|
|
39
|
+
agentId?: string;
|
|
40
|
+
} | {
|
|
41
|
+
type: "status";
|
|
42
|
+
reason: string;
|
|
43
|
+
} | {
|
|
44
|
+
type: "system";
|
|
45
|
+
subtype: SystemSubtype;
|
|
46
|
+
text?: string;
|
|
47
|
+
} | {
|
|
48
|
+
type: "agent_start";
|
|
49
|
+
agentId: string;
|
|
50
|
+
description: string;
|
|
51
|
+
} | {
|
|
52
|
+
type: "agent_end";
|
|
53
|
+
agentId: string;
|
|
54
|
+
description: string;
|
|
55
|
+
error?: string;
|
|
56
|
+
};
|
|
57
|
+
/** Specialized error kinds for smart rendering. */
|
|
58
|
+
export type ErrorKind = "rate_limit" | "context_limit" | "invalid_api_key" | "api_timeout" | "credit_balance" | "generic";
|
|
59
|
+
/** System message subtypes. */
|
|
60
|
+
export type SystemSubtype = "compact_boundary" | "memory_saved" | "turn_duration" | "info";
|
|
61
|
+
export type ChatEntry = ChatEntryData & {
|
|
62
|
+
id: string;
|
|
63
|
+
};
|
|
64
|
+
export declare function createEntry(data: ChatEntryData): ChatEntry;
|
|
65
|
+
type Listener = () => void;
|
|
66
|
+
declare class ChatStore {
|
|
67
|
+
private entries;
|
|
68
|
+
private listeners;
|
|
69
|
+
getEntries(): ChatEntry[];
|
|
70
|
+
/** Replace all entries (used for clear, resume). */
|
|
71
|
+
setEntries(entries: ChatEntry[]): void;
|
|
72
|
+
/** Append one entry. */
|
|
73
|
+
append(data: ChatEntryData): void;
|
|
74
|
+
/** Functional update — same API as setState(fn). */
|
|
75
|
+
update(fn: (prev: ChatEntry[]) => ChatEntry[]): void;
|
|
76
|
+
clear(): void;
|
|
77
|
+
subscribe(listener: Listener): () => void;
|
|
78
|
+
private notify;
|
|
79
|
+
}
|
|
80
|
+
/** Singleton store for the chat log. */
|
|
81
|
+
export declare const chatStore: ChatStore;
|
|
82
|
+
export {};
|
|
@@ -0,0 +1,45 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
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>>;
|
|
@@ -0,0 +1,25 @@
|
|
|
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;
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__commonJS,
|
|
3
|
+
init_esm_shims
|
|
4
|
+
} from "./chunk-DI7RDLOS.js";
|
|
5
|
+
|
|
6
|
+
// package.json
|
|
7
|
+
var require_package = __commonJS({
|
|
8
|
+
"package.json"(exports, module) {
|
|
9
|
+
module.exports = {
|
|
10
|
+
name: "@cjhyy/code-shell",
|
|
11
|
+
version: "0.1.0-alpha.0",
|
|
12
|
+
description: "Code Shell \u2014 general-purpose agent orchestration framework with a terminal coding preset",
|
|
13
|
+
type: "module",
|
|
14
|
+
main: "./dist/index.cjs",
|
|
15
|
+
module: "./dist/index.js",
|
|
16
|
+
types: "./dist/index.d.ts",
|
|
17
|
+
exports: {
|
|
18
|
+
".": {
|
|
19
|
+
types: "./dist/index.d.ts",
|
|
20
|
+
import: "./dist/index.js",
|
|
21
|
+
require: "./dist/index.cjs"
|
|
22
|
+
},
|
|
23
|
+
"./run": {
|
|
24
|
+
types: "./dist/run/index.d.ts",
|
|
25
|
+
import: "./dist/run/index.js",
|
|
26
|
+
require: "./dist/run/index.cjs"
|
|
27
|
+
},
|
|
28
|
+
"./arena": {
|
|
29
|
+
types: "./dist/arena/index.d.ts",
|
|
30
|
+
import: "./dist/arena/index.js",
|
|
31
|
+
require: "./dist/arena/index.cjs"
|
|
32
|
+
},
|
|
33
|
+
"./product": {
|
|
34
|
+
types: "./dist/product/index.d.ts",
|
|
35
|
+
import: "./dist/product/index.js",
|
|
36
|
+
require: "./dist/product/index.cjs"
|
|
37
|
+
},
|
|
38
|
+
"./package.json": "./package.json"
|
|
39
|
+
},
|
|
40
|
+
bin: {
|
|
41
|
+
"code-shell": "dist/cli/main.js"
|
|
42
|
+
},
|
|
43
|
+
repository: {
|
|
44
|
+
type: "git",
|
|
45
|
+
url: "git+https://github.com/cjhyy/codeshell.git"
|
|
46
|
+
},
|
|
47
|
+
homepage: "https://github.com/cjhyy/codeshell#readme",
|
|
48
|
+
bugs: {
|
|
49
|
+
url: "https://github.com/cjhyy/codeshell/issues"
|
|
50
|
+
},
|
|
51
|
+
publishConfig: {
|
|
52
|
+
access: "public"
|
|
53
|
+
},
|
|
54
|
+
scripts: {
|
|
55
|
+
build: "bun run tsup && bun run build:dts",
|
|
56
|
+
"build:dts": "tsc --emitDeclarationOnly --declaration --outDir dist || true",
|
|
57
|
+
dev: "bun run src/cli/main.ts",
|
|
58
|
+
test: "bun test",
|
|
59
|
+
"test:watch": "bun test --watch",
|
|
60
|
+
lint: "eslint src/",
|
|
61
|
+
format: "prettier --write 'src/**/*.ts'",
|
|
62
|
+
typecheck: "bun run tsc --noEmit",
|
|
63
|
+
prepublishOnly: "bun run build"
|
|
64
|
+
},
|
|
65
|
+
engines: {
|
|
66
|
+
node: ">=20"
|
|
67
|
+
},
|
|
68
|
+
files: [
|
|
69
|
+
"dist",
|
|
70
|
+
"README.md",
|
|
71
|
+
"LICENSE",
|
|
72
|
+
"CHANGELOG.md"
|
|
73
|
+
],
|
|
74
|
+
keywords: [
|
|
75
|
+
"ai",
|
|
76
|
+
"agent",
|
|
77
|
+
"orchestration",
|
|
78
|
+
"coding-assistant",
|
|
79
|
+
"cli",
|
|
80
|
+
"claude-code",
|
|
81
|
+
"mcp",
|
|
82
|
+
"llm"
|
|
83
|
+
],
|
|
84
|
+
author: "maki maki",
|
|
85
|
+
license: "MIT",
|
|
86
|
+
dependencies: {
|
|
87
|
+
"@alcalzone/ansi-tokenize": "^0.3.0",
|
|
88
|
+
"@anthropic-ai/sdk": "^0.39.0",
|
|
89
|
+
"@modelcontextprotocol/sdk": "^1.12.1",
|
|
90
|
+
asciichart: "^1.5.25",
|
|
91
|
+
"auto-bind": "^5.0.1",
|
|
92
|
+
"bidi-js": "^1.0.3",
|
|
93
|
+
chalk: "^5.4.1",
|
|
94
|
+
"cli-boxes": "^4.0.1",
|
|
95
|
+
"cli-highlight": "^2.1.11",
|
|
96
|
+
"code-excerpt": "^4.0.0",
|
|
97
|
+
commander: "^13.1.0",
|
|
98
|
+
diff: "^8.0.4",
|
|
99
|
+
"emoji-regex": "^10.6.0",
|
|
100
|
+
"get-east-asian-width": "^1.5.0",
|
|
101
|
+
glob: "^11.0.0",
|
|
102
|
+
"indent-string": "^5.0.0",
|
|
103
|
+
ink: "^6.8.0",
|
|
104
|
+
"lodash-es": "^4.17.23",
|
|
105
|
+
marked: "^17.0.5",
|
|
106
|
+
"marked-terminal": "^7.3.0",
|
|
107
|
+
nanoid: "^5.1.2",
|
|
108
|
+
openai: "^4.82.0",
|
|
109
|
+
ora: "^9.3.0",
|
|
110
|
+
"proper-lockfile": "^4.1.2",
|
|
111
|
+
react: "^19.2.4",
|
|
112
|
+
"react-reconciler": "^0.33.0",
|
|
113
|
+
semver: "^7.7.4",
|
|
114
|
+
"signal-exit": "^4.1.0",
|
|
115
|
+
"stack-utils": "^2.0.6",
|
|
116
|
+
"strip-ansi": "^7.2.0",
|
|
117
|
+
"supports-hyperlinks": "^4.4.0",
|
|
118
|
+
"type-fest": "^5.5.0",
|
|
119
|
+
"usehooks-ts": "^3.1.1",
|
|
120
|
+
"wrap-ansi": "^10.0.0",
|
|
121
|
+
yaml: "^2.7.0",
|
|
122
|
+
"yoga-layout": "^3.2.1",
|
|
123
|
+
zod: "^3.24.2"
|
|
124
|
+
},
|
|
125
|
+
devDependencies: {
|
|
126
|
+
"@eslint/js": "^10.0.1",
|
|
127
|
+
"@types/lodash": "^4.17.24",
|
|
128
|
+
"@types/lodash-es": "^4.17.12",
|
|
129
|
+
"@types/node": "^22.12.0",
|
|
130
|
+
"@types/react": "^19.2.14",
|
|
131
|
+
"@types/semver": "^7.7.1",
|
|
132
|
+
eslint: "^9.19.0",
|
|
133
|
+
prettier: "^3.4.2",
|
|
134
|
+
tsup: "^8.3.6",
|
|
135
|
+
typescript: "^5.7.3",
|
|
136
|
+
"typescript-eslint": "^8.59.0"
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
// src/cli/updater.ts
|
|
143
|
+
init_esm_shims();
|
|
144
|
+
import { execSync } from "child_process";
|
|
145
|
+
var _updateAvailable;
|
|
146
|
+
function checkForUpdate(packageName = "code-shell") {
|
|
147
|
+
try {
|
|
148
|
+
const currentVersion = getCurrentVersion();
|
|
149
|
+
const latestVersion = execSync(`npm view ${packageName} version 2>/dev/null`, {
|
|
150
|
+
encoding: "utf-8",
|
|
151
|
+
timeout: 5e3
|
|
152
|
+
}).trim();
|
|
153
|
+
if (latestVersion && latestVersion !== currentVersion && compareVersions(latestVersion, currentVersion) > 0) {
|
|
154
|
+
_updateAvailable = latestVersion;
|
|
155
|
+
}
|
|
156
|
+
} catch {
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
function getUpdateAvailable() {
|
|
160
|
+
return _updateAvailable;
|
|
161
|
+
}
|
|
162
|
+
function getCurrentVersion() {
|
|
163
|
+
try {
|
|
164
|
+
const pkg = require_package();
|
|
165
|
+
return pkg.version ?? "0.1.0";
|
|
166
|
+
} catch {
|
|
167
|
+
return "0.1.0";
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
function compareVersions(a, b) {
|
|
171
|
+
const pa = a.split(".").map(Number);
|
|
172
|
+
const pb = b.split(".").map(Number);
|
|
173
|
+
for (let i = 0; i < 3; i++) {
|
|
174
|
+
const diff = (pa[i] ?? 0) - (pb[i] ?? 0);
|
|
175
|
+
if (diff !== 0) return diff;
|
|
176
|
+
}
|
|
177
|
+
return 0;
|
|
178
|
+
}
|
|
179
|
+
export {
|
|
180
|
+
checkForUpdate,
|
|
181
|
+
getCurrentVersion,
|
|
182
|
+
getUpdateAvailable
|
|
183
|
+
};
|