@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,90 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Per-session verbose recorder for local-dev runs.
|
|
3
|
-
*
|
|
4
|
-
* Layout (per day, split by bucket):
|
|
5
|
-
* <repo>/log/<YYYY-MM-DD>/engine/session-<sid>.jsonl
|
|
6
|
-
* — unified timeline: LLM, tools, session events, AND UI events
|
|
7
|
-
* (UI events are dual-written so this file is the full story.)
|
|
8
|
-
* <repo>/log/<YYYY-MM-DD>/ui/session-<sid>.jsonl
|
|
9
|
-
* — UI-only events (stream events received, ctx renders, chatStore
|
|
10
|
-
* mutations). Open when chasing a display bug.
|
|
11
|
-
*
|
|
12
|
-
* Same sid → same filename in both folders. Diff/merge by sid to align
|
|
13
|
-
* "what the model said" with "what the UI did about it."
|
|
14
|
-
*
|
|
15
|
-
* Why a separate sink from logger.ts?
|
|
16
|
-
* - logger.ts is the terse process-wide log (~/.code-shell/logs/) and stays
|
|
17
|
-
* small for production observability.
|
|
18
|
-
* - This sink keeps full prompt/response bodies for post-mortem debugging
|
|
19
|
-
* and is gated to local-dev only (bun run dev / CODE_SHELL_DEV=1).
|
|
20
|
-
*
|
|
21
|
-
* Why JSONL not markdown?
|
|
22
|
-
* - `jq` can slice on any field in one command: tool histograms, slowest
|
|
23
|
-
* LLM calls, largest prompts, anything. Markdown would need ad-hoc parsing.
|
|
24
|
-
* - Field bodies are inlined; JSON.stringify handles arbitrarily long
|
|
25
|
-
* strings and jq streams, so no sidecar files are needed.
|
|
26
|
-
*
|
|
27
|
-
* Daily rotation: on first write each process, prune date folders older than
|
|
28
|
-
* RETENTION_DAYS.
|
|
29
|
-
*/
|
|
30
|
-
export declare function isVerboseRecorderEnabled(): boolean;
|
|
31
|
-
export declare function getVerboseLogDir(): string;
|
|
32
|
-
export declare function recordSessionStart(sid: string, info: {
|
|
33
|
-
task?: string;
|
|
34
|
-
cwd?: string;
|
|
35
|
-
model?: string;
|
|
36
|
-
provider?: string;
|
|
37
|
-
permissionMode?: string;
|
|
38
|
-
resumed?: boolean;
|
|
39
|
-
}): void;
|
|
40
|
-
export type RecordLLMRequest = {
|
|
41
|
-
provider: string;
|
|
42
|
-
model: string;
|
|
43
|
-
stream: boolean;
|
|
44
|
-
temperature?: number;
|
|
45
|
-
maxTokens?: number;
|
|
46
|
-
messages: unknown;
|
|
47
|
-
tools?: unknown;
|
|
48
|
-
systemPrompt?: string;
|
|
49
|
-
};
|
|
50
|
-
export declare function recordLLMRequest(sid: string, req: RecordLLMRequest, reqId: string): void;
|
|
51
|
-
export type RecordLLMResponse = {
|
|
52
|
-
text?: string;
|
|
53
|
-
toolCalls?: Array<{
|
|
54
|
-
id: string;
|
|
55
|
-
toolName: string;
|
|
56
|
-
args: unknown;
|
|
57
|
-
}>;
|
|
58
|
-
stopReason?: string;
|
|
59
|
-
usage?: import("../types.js").TokenUsage;
|
|
60
|
-
durationMs?: number;
|
|
61
|
-
ttftMs?: number;
|
|
62
|
-
};
|
|
63
|
-
export declare function recordLLMResponse(sid: string, resp: RecordLLMResponse, reqId: string): void;
|
|
64
|
-
export declare function recordLLMError(sid: string, reqId: string, err: unknown, durationMs: number): void;
|
|
65
|
-
export declare function recordToolCall(sid: string, call: {
|
|
66
|
-
id: string;
|
|
67
|
-
toolName: string;
|
|
68
|
-
args: unknown;
|
|
69
|
-
}): void;
|
|
70
|
-
export declare function recordToolResult(sid: string, result: {
|
|
71
|
-
id: string;
|
|
72
|
-
toolName: string;
|
|
73
|
-
ok: boolean;
|
|
74
|
-
durationMs: number;
|
|
75
|
-
output?: string;
|
|
76
|
-
error?: string;
|
|
77
|
-
}): void;
|
|
78
|
-
export declare function recordEvent(sid: string, name: string, data?: Record<string, unknown>): void;
|
|
79
|
-
/**
|
|
80
|
-
* Record a UI-side event. Goes into both engine.jsonl (unified timeline) and
|
|
81
|
-
* ui.jsonl (focused view). Use from the UI when chasing display bugs — pass
|
|
82
|
-
* the current sessionId.
|
|
83
|
-
*/
|
|
84
|
-
export declare function recordUIEvent(sid: string | undefined, name: string, data?: Record<string, unknown>): void;
|
|
85
|
-
export declare function recordSessionEnd(sid: string, info: {
|
|
86
|
-
reason?: string;
|
|
87
|
-
turns?: number;
|
|
88
|
-
cost?: unknown;
|
|
89
|
-
durationMs?: number;
|
|
90
|
-
}): void;
|
package/dist/lsp/client.d.ts
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* LSP client — JSON-RPC over stdio communication with language servers.
|
|
3
|
-
*/
|
|
4
|
-
import { EventEmitter } from "node:events";
|
|
5
|
-
export interface LSPRequest {
|
|
6
|
-
method: string;
|
|
7
|
-
params?: Record<string, unknown>;
|
|
8
|
-
}
|
|
9
|
-
export interface LSPResponse {
|
|
10
|
-
id: number;
|
|
11
|
-
result?: unknown;
|
|
12
|
-
error?: {
|
|
13
|
-
code: number;
|
|
14
|
-
message: string;
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
export interface LSPNotification {
|
|
18
|
-
method: string;
|
|
19
|
-
params?: Record<string, unknown>;
|
|
20
|
-
}
|
|
21
|
-
export declare class LSPClient extends EventEmitter {
|
|
22
|
-
private readonly command;
|
|
23
|
-
private readonly args;
|
|
24
|
-
private readonly cwd?;
|
|
25
|
-
private process;
|
|
26
|
-
private nextId;
|
|
27
|
-
private pending;
|
|
28
|
-
private buffer;
|
|
29
|
-
private contentLength;
|
|
30
|
-
private initialized;
|
|
31
|
-
constructor(command: string, args?: string[], cwd?: string | undefined);
|
|
32
|
-
start(): Promise<void>;
|
|
33
|
-
initialize(rootUri: string): Promise<unknown>;
|
|
34
|
-
request(method: string, params?: Record<string, unknown>): Promise<unknown>;
|
|
35
|
-
notify(method: string, params?: Record<string, unknown>): Promise<void>;
|
|
36
|
-
shutdown(): Promise<void>;
|
|
37
|
-
get isInitialized(): boolean;
|
|
38
|
-
get isAlive(): boolean;
|
|
39
|
-
private handleData;
|
|
40
|
-
private rejectAll;
|
|
41
|
-
}
|
package/dist/lsp/manager.d.ts
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* LSP Server Manager — manages lifecycle of language server instances.
|
|
3
|
-
* Lazy initialization: servers start only when needed.
|
|
4
|
-
*/
|
|
5
|
-
import { LSPClient } from "./client.js";
|
|
6
|
-
type ServerState = "stopped" | "starting" | "ready" | "error";
|
|
7
|
-
export declare class LSPServerManager {
|
|
8
|
-
private servers;
|
|
9
|
-
private rootUri;
|
|
10
|
-
constructor(cwd: string);
|
|
11
|
-
/**
|
|
12
|
-
* Get or start a language server by name.
|
|
13
|
-
*/
|
|
14
|
-
getClient(serverName: string): Promise<LSPClient | undefined>;
|
|
15
|
-
/**
|
|
16
|
-
* Start a specific language server.
|
|
17
|
-
*/
|
|
18
|
-
private startServer;
|
|
19
|
-
/**
|
|
20
|
-
* Check if any LSP server is connected.
|
|
21
|
-
*/
|
|
22
|
-
isConnected(): boolean;
|
|
23
|
-
/**
|
|
24
|
-
* List server statuses.
|
|
25
|
-
*/
|
|
26
|
-
listServers(): Array<{
|
|
27
|
-
name: string;
|
|
28
|
-
language: string;
|
|
29
|
-
state: ServerState;
|
|
30
|
-
error?: string;
|
|
31
|
-
}>;
|
|
32
|
-
/**
|
|
33
|
-
* Shutdown all servers.
|
|
34
|
-
*/
|
|
35
|
-
shutdownAll(): Promise<void>;
|
|
36
|
-
private isCommandAvailable;
|
|
37
|
-
}
|
|
38
|
-
export declare function initializeLSPManager(cwd: string): LSPServerManager;
|
|
39
|
-
export declare function getLSPManager(): LSPServerManager | undefined;
|
|
40
|
-
export {};
|
package/dist/lsp/servers.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Built-in language server configurations.
|
|
3
|
-
*/
|
|
4
|
-
export interface LSPServerConfig {
|
|
5
|
-
name: string;
|
|
6
|
-
language: string;
|
|
7
|
-
extensions: string[];
|
|
8
|
-
command: string;
|
|
9
|
-
args: string[];
|
|
10
|
-
installHint: string;
|
|
11
|
-
}
|
|
12
|
-
export declare const BUILTIN_LSP_SERVERS: LSPServerConfig[];
|
|
13
|
-
/**
|
|
14
|
-
* Detect which LSP server to use based on file extension.
|
|
15
|
-
*/
|
|
16
|
-
export declare function detectLSPServer(filePath: string): LSPServerConfig | undefined;
|
package/dist/manager-4XKLZHKE.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{c as SettingsManager}from'./chunk-FZXY554D.js';import'./chunk-3QP5BQ3L.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{a as MCPManager}from'./chunk-D3TVASD2.js';import'./chunk-DI26OUIU.js';import'./chunk-3QP5BQ3L.js';
|
package/dist/memory-BNI4WEWL.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{b as MemoryManager,a as resolveMemoryBaseDir}from'./chunk-T222K6IV.js';import'./chunk-3QP5BQ3L.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{d as defaultCacheDir,c as isStale,a as readCache,b as writeCache}from'./chunk-P6JSTIFM.js';import'./chunk-3QP5BQ3L.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{b as fetchModelList}from'./chunk-2OD6VR4N.js';import'./chunk-P6JSTIFM.js';import'./chunk-3QP5BQ3L.js';
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Yoga enums — ported from yoga-layout/src/generated/YGEnums.ts
|
|
3
|
-
* Kept as `const` objects (not TS enums) per repo convention.
|
|
4
|
-
* Values match upstream exactly so callers don't change.
|
|
5
|
-
*/
|
|
6
|
-
export declare const Align: {
|
|
7
|
-
readonly Auto: 0;
|
|
8
|
-
readonly FlexStart: 1;
|
|
9
|
-
readonly Center: 2;
|
|
10
|
-
readonly FlexEnd: 3;
|
|
11
|
-
readonly Stretch: 4;
|
|
12
|
-
readonly Baseline: 5;
|
|
13
|
-
readonly SpaceBetween: 6;
|
|
14
|
-
readonly SpaceAround: 7;
|
|
15
|
-
readonly SpaceEvenly: 8;
|
|
16
|
-
};
|
|
17
|
-
export type Align = (typeof Align)[keyof typeof Align];
|
|
18
|
-
export declare const BoxSizing: {
|
|
19
|
-
readonly BorderBox: 0;
|
|
20
|
-
readonly ContentBox: 1;
|
|
21
|
-
};
|
|
22
|
-
export type BoxSizing = (typeof BoxSizing)[keyof typeof BoxSizing];
|
|
23
|
-
export declare const Dimension: {
|
|
24
|
-
readonly Width: 0;
|
|
25
|
-
readonly Height: 1;
|
|
26
|
-
};
|
|
27
|
-
export type Dimension = (typeof Dimension)[keyof typeof Dimension];
|
|
28
|
-
export declare const Direction: {
|
|
29
|
-
readonly Inherit: 0;
|
|
30
|
-
readonly LTR: 1;
|
|
31
|
-
readonly RTL: 2;
|
|
32
|
-
};
|
|
33
|
-
export type Direction = (typeof Direction)[keyof typeof Direction];
|
|
34
|
-
export declare const Display: {
|
|
35
|
-
readonly Flex: 0;
|
|
36
|
-
readonly None: 1;
|
|
37
|
-
readonly Contents: 2;
|
|
38
|
-
};
|
|
39
|
-
export type Display = (typeof Display)[keyof typeof Display];
|
|
40
|
-
export declare const Edge: {
|
|
41
|
-
readonly Left: 0;
|
|
42
|
-
readonly Top: 1;
|
|
43
|
-
readonly Right: 2;
|
|
44
|
-
readonly Bottom: 3;
|
|
45
|
-
readonly Start: 4;
|
|
46
|
-
readonly End: 5;
|
|
47
|
-
readonly Horizontal: 6;
|
|
48
|
-
readonly Vertical: 7;
|
|
49
|
-
readonly All: 8;
|
|
50
|
-
};
|
|
51
|
-
export type Edge = (typeof Edge)[keyof typeof Edge];
|
|
52
|
-
export declare const Errata: {
|
|
53
|
-
readonly None: 0;
|
|
54
|
-
readonly StretchFlexBasis: 1;
|
|
55
|
-
readonly AbsolutePositionWithoutInsetsExcludesPadding: 2;
|
|
56
|
-
readonly AbsolutePercentAgainstInnerSize: 4;
|
|
57
|
-
readonly All: 2147483647;
|
|
58
|
-
readonly Classic: 2147483646;
|
|
59
|
-
};
|
|
60
|
-
export type Errata = (typeof Errata)[keyof typeof Errata];
|
|
61
|
-
export declare const ExperimentalFeature: {
|
|
62
|
-
readonly WebFlexBasis: 0;
|
|
63
|
-
};
|
|
64
|
-
export type ExperimentalFeature = (typeof ExperimentalFeature)[keyof typeof ExperimentalFeature];
|
|
65
|
-
export declare const FlexDirection: {
|
|
66
|
-
readonly Column: 0;
|
|
67
|
-
readonly ColumnReverse: 1;
|
|
68
|
-
readonly Row: 2;
|
|
69
|
-
readonly RowReverse: 3;
|
|
70
|
-
};
|
|
71
|
-
export type FlexDirection = (typeof FlexDirection)[keyof typeof FlexDirection];
|
|
72
|
-
export declare const Gutter: {
|
|
73
|
-
readonly Column: 0;
|
|
74
|
-
readonly Row: 1;
|
|
75
|
-
readonly All: 2;
|
|
76
|
-
};
|
|
77
|
-
export type Gutter = (typeof Gutter)[keyof typeof Gutter];
|
|
78
|
-
export declare const Justify: {
|
|
79
|
-
readonly FlexStart: 0;
|
|
80
|
-
readonly Center: 1;
|
|
81
|
-
readonly FlexEnd: 2;
|
|
82
|
-
readonly SpaceBetween: 3;
|
|
83
|
-
readonly SpaceAround: 4;
|
|
84
|
-
readonly SpaceEvenly: 5;
|
|
85
|
-
};
|
|
86
|
-
export type Justify = (typeof Justify)[keyof typeof Justify];
|
|
87
|
-
export declare const MeasureMode: {
|
|
88
|
-
readonly Undefined: 0;
|
|
89
|
-
readonly Exactly: 1;
|
|
90
|
-
readonly AtMost: 2;
|
|
91
|
-
};
|
|
92
|
-
export type MeasureMode = (typeof MeasureMode)[keyof typeof MeasureMode];
|
|
93
|
-
export declare const Overflow: {
|
|
94
|
-
readonly Visible: 0;
|
|
95
|
-
readonly Hidden: 1;
|
|
96
|
-
readonly Scroll: 2;
|
|
97
|
-
};
|
|
98
|
-
export type Overflow = (typeof Overflow)[keyof typeof Overflow];
|
|
99
|
-
export declare const PositionType: {
|
|
100
|
-
readonly Static: 0;
|
|
101
|
-
readonly Relative: 1;
|
|
102
|
-
readonly Absolute: 2;
|
|
103
|
-
};
|
|
104
|
-
export type PositionType = (typeof PositionType)[keyof typeof PositionType];
|
|
105
|
-
export declare const Unit: {
|
|
106
|
-
readonly Undefined: 0;
|
|
107
|
-
readonly Point: 1;
|
|
108
|
-
readonly Percent: 2;
|
|
109
|
-
readonly Auto: 3;
|
|
110
|
-
};
|
|
111
|
-
export type Unit = (typeof Unit)[keyof typeof Unit];
|
|
112
|
-
export declare const Wrap: {
|
|
113
|
-
readonly NoWrap: 0;
|
|
114
|
-
readonly Wrap: 1;
|
|
115
|
-
readonly WrapReverse: 2;
|
|
116
|
-
};
|
|
117
|
-
export type Wrap = (typeof Wrap)[keyof typeof Wrap];
|
|
@@ -1,270 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Pure-TypeScript port of yoga-layout (Meta's flexbox engine).
|
|
3
|
-
*
|
|
4
|
-
* This matches the `yoga-layout/load` API surface used by src/render/layout/yoga.ts.
|
|
5
|
-
* The upstream C++ source is ~2500 lines in CalculateLayout.cpp alone; this port
|
|
6
|
-
* is a simplified single-pass flexbox implementation that covers the subset of
|
|
7
|
-
* features the render engine actually uses:
|
|
8
|
-
* - flex-direction (row/column + reverse)
|
|
9
|
-
* - flex-grow / flex-shrink / flex-basis
|
|
10
|
-
* - align-items / align-self (stretch, flex-start, center, flex-end)
|
|
11
|
-
* - justify-content (all six values)
|
|
12
|
-
* - margin / padding / border / gap
|
|
13
|
-
* - width / height / min / max (point, percent, auto)
|
|
14
|
-
* - position: relative / absolute
|
|
15
|
-
* - display: flex / none
|
|
16
|
-
* - measure functions (for text nodes)
|
|
17
|
-
*
|
|
18
|
-
* Also implemented for spec parity (not used by Ink):
|
|
19
|
-
* - margin: auto (main + cross axis, overrides justify/align)
|
|
20
|
-
* - multi-pass flex clamping when children hit min/max constraints
|
|
21
|
-
* - flex-grow/shrink against container min/max when size is indefinite
|
|
22
|
-
*
|
|
23
|
-
* Also implemented for spec parity (not used by Ink):
|
|
24
|
-
* - flex-wrap: wrap / wrap-reverse (multi-line flex)
|
|
25
|
-
* - align-content (positions wrapped lines on cross axis)
|
|
26
|
-
*
|
|
27
|
-
* Also implemented for spec parity (not used by Ink):
|
|
28
|
-
* - display: contents (children lifted to grandparent, box removed)
|
|
29
|
-
*
|
|
30
|
-
* Also implemented for spec parity (not used by Ink):
|
|
31
|
-
* - baseline alignment (align-items/align-self: baseline)
|
|
32
|
-
*
|
|
33
|
-
* Not implemented (not used by Ink):
|
|
34
|
-
* - aspect-ratio
|
|
35
|
-
* - box-sizing: content-box
|
|
36
|
-
* - RTL direction (Ink always passes Direction.LTR)
|
|
37
|
-
*
|
|
38
|
-
* Upstream: https://github.com/facebook/yoga
|
|
39
|
-
*/
|
|
40
|
-
import { Align, BoxSizing, Dimension, Direction, Display, Edge, Errata, ExperimentalFeature, FlexDirection, Gutter, Justify, MeasureMode, Overflow, PositionType, Unit, Wrap } from './enums.js';
|
|
41
|
-
export { Align, BoxSizing, Dimension, Direction, Display, Edge, Errata, ExperimentalFeature, FlexDirection, Gutter, Justify, MeasureMode, Overflow, PositionType, Unit, Wrap, };
|
|
42
|
-
export type Value = {
|
|
43
|
-
unit: Unit;
|
|
44
|
-
value: number;
|
|
45
|
-
};
|
|
46
|
-
type Layout = {
|
|
47
|
-
left: number;
|
|
48
|
-
top: number;
|
|
49
|
-
width: number;
|
|
50
|
-
height: number;
|
|
51
|
-
border: [number, number, number, number];
|
|
52
|
-
padding: [number, number, number, number];
|
|
53
|
-
margin: [number, number, number, number];
|
|
54
|
-
};
|
|
55
|
-
type Style = {
|
|
56
|
-
direction: Direction;
|
|
57
|
-
flexDirection: FlexDirection;
|
|
58
|
-
justifyContent: Justify;
|
|
59
|
-
alignItems: Align;
|
|
60
|
-
alignSelf: Align;
|
|
61
|
-
alignContent: Align;
|
|
62
|
-
flexWrap: Wrap;
|
|
63
|
-
overflow: Overflow;
|
|
64
|
-
display: Display;
|
|
65
|
-
positionType: PositionType;
|
|
66
|
-
flexGrow: number;
|
|
67
|
-
flexShrink: number;
|
|
68
|
-
flexBasis: Value;
|
|
69
|
-
margin: Value[];
|
|
70
|
-
padding: Value[];
|
|
71
|
-
border: Value[];
|
|
72
|
-
position: Value[];
|
|
73
|
-
gap: Value[];
|
|
74
|
-
width: Value;
|
|
75
|
-
height: Value;
|
|
76
|
-
minWidth: Value;
|
|
77
|
-
minHeight: Value;
|
|
78
|
-
maxWidth: Value;
|
|
79
|
-
maxHeight: Value;
|
|
80
|
-
};
|
|
81
|
-
export type MeasureFunction = (width: number, widthMode: MeasureMode, height: number, heightMode: MeasureMode) => {
|
|
82
|
-
width: number;
|
|
83
|
-
height: number;
|
|
84
|
-
};
|
|
85
|
-
export type Size = {
|
|
86
|
-
width: number;
|
|
87
|
-
height: number;
|
|
88
|
-
};
|
|
89
|
-
export type Config = {
|
|
90
|
-
pointScaleFactor: number;
|
|
91
|
-
errata: Errata;
|
|
92
|
-
useWebDefaults: boolean;
|
|
93
|
-
free(): void;
|
|
94
|
-
isExperimentalFeatureEnabled(_: ExperimentalFeature): boolean;
|
|
95
|
-
setExperimentalFeatureEnabled(_: ExperimentalFeature, __: boolean): void;
|
|
96
|
-
setPointScaleFactor(factor: number): void;
|
|
97
|
-
getErrata(): Errata;
|
|
98
|
-
setErrata(errata: Errata): void;
|
|
99
|
-
setUseWebDefaults(v: boolean): void;
|
|
100
|
-
};
|
|
101
|
-
export declare class Node {
|
|
102
|
-
style: Style;
|
|
103
|
-
layout: Layout;
|
|
104
|
-
parent: Node | null;
|
|
105
|
-
children: Node[];
|
|
106
|
-
measureFunc: MeasureFunction | null;
|
|
107
|
-
config: Config;
|
|
108
|
-
isDirty_: boolean;
|
|
109
|
-
isReferenceBaseline_: boolean;
|
|
110
|
-
_flexBasis: number;
|
|
111
|
-
_mainSize: number;
|
|
112
|
-
_crossSize: number;
|
|
113
|
-
_lineIndex: number;
|
|
114
|
-
_hasAutoMargin: boolean;
|
|
115
|
-
_hasPosition: boolean;
|
|
116
|
-
_hasPadding: boolean;
|
|
117
|
-
_hasBorder: boolean;
|
|
118
|
-
_hasMargin: boolean;
|
|
119
|
-
_lW: number;
|
|
120
|
-
_lH: number;
|
|
121
|
-
_lWM: MeasureMode;
|
|
122
|
-
_lHM: MeasureMode;
|
|
123
|
-
_lOW: number;
|
|
124
|
-
_lOH: number;
|
|
125
|
-
_lFW: boolean;
|
|
126
|
-
_lFH: boolean;
|
|
127
|
-
_lOutW: number;
|
|
128
|
-
_lOutH: number;
|
|
129
|
-
_hasL: boolean;
|
|
130
|
-
_mW: number;
|
|
131
|
-
_mH: number;
|
|
132
|
-
_mWM: MeasureMode;
|
|
133
|
-
_mHM: MeasureMode;
|
|
134
|
-
_mOW: number;
|
|
135
|
-
_mOH: number;
|
|
136
|
-
_mOutW: number;
|
|
137
|
-
_mOutH: number;
|
|
138
|
-
_hasM: boolean;
|
|
139
|
-
_fbBasis: number;
|
|
140
|
-
_fbOwnerW: number;
|
|
141
|
-
_fbOwnerH: number;
|
|
142
|
-
_fbAvailMain: number;
|
|
143
|
-
_fbAvailCross: number;
|
|
144
|
-
_fbCrossMode: MeasureMode;
|
|
145
|
-
_fbGen: number;
|
|
146
|
-
_cIn: Float64Array | null;
|
|
147
|
-
_cOut: Float64Array | null;
|
|
148
|
-
_cGen: number;
|
|
149
|
-
_cN: number;
|
|
150
|
-
_cWr: number;
|
|
151
|
-
constructor(config?: Config);
|
|
152
|
-
insertChild(child: Node, index: number): void;
|
|
153
|
-
removeChild(child: Node): void;
|
|
154
|
-
getChild(index: number): Node;
|
|
155
|
-
getChildCount(): number;
|
|
156
|
-
getParent(): Node | null;
|
|
157
|
-
free(): void;
|
|
158
|
-
freeRecursive(): void;
|
|
159
|
-
reset(): void;
|
|
160
|
-
markDirty(): void;
|
|
161
|
-
isDirty(): boolean;
|
|
162
|
-
hasNewLayout(): boolean;
|
|
163
|
-
markLayoutSeen(): void;
|
|
164
|
-
setMeasureFunc(fn: MeasureFunction | null): void;
|
|
165
|
-
unsetMeasureFunc(): void;
|
|
166
|
-
getComputedLeft(): number;
|
|
167
|
-
getComputedTop(): number;
|
|
168
|
-
getComputedWidth(): number;
|
|
169
|
-
getComputedHeight(): number;
|
|
170
|
-
getComputedRight(): number;
|
|
171
|
-
getComputedBottom(): number;
|
|
172
|
-
getComputedLayout(): {
|
|
173
|
-
left: number;
|
|
174
|
-
top: number;
|
|
175
|
-
right: number;
|
|
176
|
-
bottom: number;
|
|
177
|
-
width: number;
|
|
178
|
-
height: number;
|
|
179
|
-
};
|
|
180
|
-
getComputedBorder(edge: Edge): number;
|
|
181
|
-
getComputedPadding(edge: Edge): number;
|
|
182
|
-
getComputedMargin(edge: Edge): number;
|
|
183
|
-
setWidth(v: number | 'auto' | string | undefined): void;
|
|
184
|
-
setWidthPercent(v: number): void;
|
|
185
|
-
setWidthAuto(): void;
|
|
186
|
-
setHeight(v: number | 'auto' | string | undefined): void;
|
|
187
|
-
setHeightPercent(v: number): void;
|
|
188
|
-
setHeightAuto(): void;
|
|
189
|
-
setMinWidth(v: number | string | undefined): void;
|
|
190
|
-
setMinWidthPercent(v: number): void;
|
|
191
|
-
setMinHeight(v: number | string | undefined): void;
|
|
192
|
-
setMinHeightPercent(v: number): void;
|
|
193
|
-
setMaxWidth(v: number | string | undefined): void;
|
|
194
|
-
setMaxWidthPercent(v: number): void;
|
|
195
|
-
setMaxHeight(v: number | string | undefined): void;
|
|
196
|
-
setMaxHeightPercent(v: number): void;
|
|
197
|
-
setFlexDirection(dir: FlexDirection): void;
|
|
198
|
-
setFlexGrow(v: number | undefined): void;
|
|
199
|
-
setFlexShrink(v: number | undefined): void;
|
|
200
|
-
setFlex(v: number | undefined): void;
|
|
201
|
-
setFlexBasis(v: number | 'auto' | string | undefined): void;
|
|
202
|
-
setFlexBasisPercent(v: number): void;
|
|
203
|
-
setFlexBasisAuto(): void;
|
|
204
|
-
setFlexWrap(wrap: Wrap): void;
|
|
205
|
-
setAlignItems(a: Align): void;
|
|
206
|
-
setAlignSelf(a: Align): void;
|
|
207
|
-
setAlignContent(a: Align): void;
|
|
208
|
-
setJustifyContent(j: Justify): void;
|
|
209
|
-
setDisplay(d: Display): void;
|
|
210
|
-
getDisplay(): Display;
|
|
211
|
-
setPositionType(t: PositionType): void;
|
|
212
|
-
setPosition(edge: Edge, v: number | string | undefined): void;
|
|
213
|
-
setPositionPercent(edge: Edge, v: number): void;
|
|
214
|
-
setPositionAuto(edge: Edge): void;
|
|
215
|
-
setOverflow(o: Overflow): void;
|
|
216
|
-
setDirection(d: Direction): void;
|
|
217
|
-
setBoxSizing(_: BoxSizing): void;
|
|
218
|
-
setMargin(edge: Edge, v: number | 'auto' | string | undefined): void;
|
|
219
|
-
setMarginPercent(edge: Edge, v: number): void;
|
|
220
|
-
setMarginAuto(edge: Edge): void;
|
|
221
|
-
setPadding(edge: Edge, v: number | string | undefined): void;
|
|
222
|
-
setPaddingPercent(edge: Edge, v: number): void;
|
|
223
|
-
setBorder(edge: Edge, v: number | undefined): void;
|
|
224
|
-
setGap(gutter: Gutter, v: number | string | undefined): void;
|
|
225
|
-
setGapPercent(gutter: Gutter, v: number): void;
|
|
226
|
-
getFlexDirection(): FlexDirection;
|
|
227
|
-
getJustifyContent(): Justify;
|
|
228
|
-
getAlignItems(): Align;
|
|
229
|
-
getAlignSelf(): Align;
|
|
230
|
-
getAlignContent(): Align;
|
|
231
|
-
getFlexGrow(): number;
|
|
232
|
-
getFlexShrink(): number;
|
|
233
|
-
getFlexBasis(): Value;
|
|
234
|
-
getFlexWrap(): Wrap;
|
|
235
|
-
getWidth(): Value;
|
|
236
|
-
getHeight(): Value;
|
|
237
|
-
getOverflow(): Overflow;
|
|
238
|
-
getPositionType(): PositionType;
|
|
239
|
-
getDirection(): Direction;
|
|
240
|
-
copyStyle(_: Node): void;
|
|
241
|
-
setDirtiedFunc(_: unknown): void;
|
|
242
|
-
unsetDirtiedFunc(): void;
|
|
243
|
-
setIsReferenceBaseline(v: boolean): void;
|
|
244
|
-
isReferenceBaseline(): boolean;
|
|
245
|
-
setAspectRatio(_: number | undefined): void;
|
|
246
|
-
getAspectRatio(): number;
|
|
247
|
-
setAlwaysFormsContainingBlock(_: boolean): void;
|
|
248
|
-
calculateLayout(ownerWidth: number | undefined, ownerHeight: number | undefined, _direction?: Direction): void;
|
|
249
|
-
}
|
|
250
|
-
export declare function getYogaCounters(): {
|
|
251
|
-
visited: number;
|
|
252
|
-
measured: number;
|
|
253
|
-
cacheHits: number;
|
|
254
|
-
live: number;
|
|
255
|
-
};
|
|
256
|
-
export type Yoga = {
|
|
257
|
-
Config: {
|
|
258
|
-
create(): Config;
|
|
259
|
-
destroy(config: Config): void;
|
|
260
|
-
};
|
|
261
|
-
Node: {
|
|
262
|
-
create(config?: Config): Node;
|
|
263
|
-
createDefault(): Node;
|
|
264
|
-
createWithConfig(config: Config): Node;
|
|
265
|
-
destroy(node: Node): void;
|
|
266
|
-
};
|
|
267
|
-
};
|
|
268
|
-
declare const YOGA_INSTANCE: Yoga;
|
|
269
|
-
export declare function loadYoga(): Promise<Yoga>;
|
|
270
|
-
export default YOGA_INSTANCE;
|
package/dist/off-7SDVMMXW.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{a as createOffBackend}from'./chunk-SNFAPSLA.js';import'./chunk-3QP5BQ3L.js';
|
package/dist/openai-OQ6LLN5J.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{b as OpenAIClient,a as runStreamWithWatchdog}from'./chunk-SV7H4FKT.js';import'./chunk-O5HFCH2U.js';import'./chunk-OWBYLMDD.js';import'./chunk-FU7AHZNN.js';import'./chunk-DI26OUIU.js';import'./chunk-3QP5BQ3L.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{d as findOpenRouterModel,c as getOpenRouterModels,b as getOpenRouterSnapshot,e as listOpenRouterModelsByVendor,a as setOpenRouterSnapshot}from'./chunk-GKAQH2DG.js';import'./chunk-3QP5BQ3L.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{a as syncOpenRouterCatalog}from'./chunk-AFMP73YP.js';export{b as getOpenRouterSnapshot}from'./chunk-GKAQH2DG.js';import'./chunk-3QP5BQ3L.js';
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import {g,f,e,d,i}from'./chunk-SKIX2M5Z.js';import {h,a,b}from'./chunk-3QP5BQ3L.js';import {existsSync,readFileSync,mkdirSync,writeFileSync,rmSync,readdirSync,statSync,cpSync,mkdtempSync}from'fs';import {join,dirname,isAbsolute,resolve}from'path';import {homedir,tmpdir}from'os';import {spawn}from'child_process';h();h();function H(e){let r=e.trim();if(r==="")return null;if((r.startsWith("/")||/^[a-zA-Z]:[\\/]/.test(r))&&r.endsWith(".git"))return {source:"git",url:r};if(r.match(/^[a-zA-Z0-9._-]+@[^:\s]+:[^\s]+$/))return {source:"git",url:r};if(r.startsWith("https://")||r.startsWith("http://")){let i;try{i=new URL(r);}catch{return null}return i.hostname==="github.com"||i.hostname==="www.github.com"?i.pathname.match(/^\/([^/]+\/[^/]+?)(\/|\.git|$)/)?{source:"git",url:r.endsWith(".git")?r:`${r}.git`}:null:r.endsWith(".git")?{source:"git",url:r}:null}let n=r.match(/^([A-Za-z0-9][A-Za-z0-9._-]*)\/([A-Za-z0-9._-]+?)(\.git)?$/);if(n){let i=n[1],s=n[2];return {source:"github",repo:`${i}/${s}`}}return null}a(H,"parseMarketplaceInput");function q(e){if(e.source==="github"){let i=e.repo.split("/");return i[i.length-1].toLowerCase()}let t=e.url.replace(/\.git$/,"").split(/[/:]/).filter(Boolean);return (t[t.length-1]??"marketplace").toLowerCase()}a(q,"deriveMarketplaceName");h();h();async function x(e,r,t=6e4){return new Promise(n=>{let i=spawn("git",e,{cwd:r,stdio:["ignore","pipe","pipe"]}),s="",o="";i.stdout.on("data",l=>s+=l.toString()),i.stderr.on("data",l=>o+=l.toString());let a=setTimeout(()=>{i.kill("SIGKILL"),n({ok:false,error:`git ${e.join(" ")} timed out after ${t}ms`});},t);i.on("close",l=>{clearTimeout(a),n(l===0?{ok:true,stdout:s.trim()}:{ok:false,error:`git ${e.join(" ")} exited ${l}: ${o.trim()||"unknown error"}`});}),i.on("error",l=>{clearTimeout(a),n({ok:false,error:`git ${e.join(" ")} failed: ${l.message}`});});})}a(x,"runGit");async function $(e,r,t){let n=["clone","--depth","1"];return t?.ref&&n.push("--branch",t.ref),n.push("--",e,r),x(n)}a($,"gitClone");async function C(e){return x(["rev-parse","HEAD"],e)}a(C,"gitRevParseHead");async function z(e,r){let t=["fetch","--depth","1","origin"];r&&t.push(r);let n=await x(t,e);return n.ok?x(["reset","--hard",r?`origin/${r}`:"FETCH_HEAD"],e):n}a(z,"gitFetchAndReset");function j(e){return `https://github.com/${e}.git`}a(j,"githubRepoToCloneUrl");h();function Se(){return process.env.HOME??homedir()}a(Se,"userHome");function V(){return join(Se(),".code-shell","plugins","known_marketplaces.json")}a(V,"knownMarketplacesPath");function m(){let e=V();if(!existsSync(e))return {};try{let r=JSON.parse(readFileSync(e,"utf-8"));if(r&&typeof r=="object"&&!Array.isArray(r))return r}catch{}return {}}a(m,"readKnownMarketplaces");function J(e){let r=V();mkdirSync(dirname(r),{recursive:true}),writeFileSync(r,JSON.stringify(e,null,2)+`
|
|
2
|
-
`,"utf-8");}a(J,"writeKnownMarketplaces");function B(e,r){let t=m();t[e]=r,J(t);}a(B,"upsertKnownMarketplace");function N(e){let r=m();return e in r?(delete r[e],J(r),true):false}a(N,"removeKnownMarketplace");h();function S(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}a(S,"isObject");function Me(e,r){if(typeof e=="string")return e.length===0?{ok:false,error:`${r}: source string is empty`}:{ok:true,value:e};if(!S(e))return {ok:false,error:`${r}: source must be a string or object`};let t=e.source;return t==="git"?typeof e.url!="string"||!e.url?{ok:false,error:`${r}: git source requires url`}:{ok:true,value:{source:"git",url:e.url,ref:typeof e.ref=="string"?e.ref:void 0,sha:typeof e.sha=="string"?e.sha:void 0}}:t==="github"?typeof e.repo!="string"||!e.repo.includes("/")?{ok:false,error:`${r}: github source requires repo "owner/name"`}:{ok:true,value:{source:"github",repo:e.repo,ref:typeof e.ref=="string"?e.ref:void 0,sha:typeof e.sha=="string"?e.sha:void 0}}:t==="git-subdir"?typeof e.url!="string"||!e.url?{ok:false,error:`${r}: git-subdir source requires url`}:typeof e.path!="string"||!e.path?{ok:false,error:`${r}: git-subdir source requires path`}:{ok:true,value:{source:"git-subdir",url:e.url,path:e.path,ref:typeof e.ref=="string"?e.ref:void 0,sha:typeof e.sha=="string"?e.sha:void 0}}:{ok:false,error:`${r}: unsupported source type "${String(t)}" (MVP supports git, github, git-subdir, or a string path)`}}a(Me,"validatePluginEntrySource");function be(e,r){let t=`plugins[${r}]`;if(!S(e))return {ok:false,error:`${t}: must be an object`};if(typeof e.name!="string"||!e.name)return {ok:false,error:`${t}: name is required`};if(e.source===void 0)return {ok:false,error:`${t}: source is required`};let n=Me(e.source,`${t}.source`);if(!n.ok)return n;let i;if(e.author!==void 0){if(!S(e.author)||typeof e.author.name!="string")return {ok:false,error:`${t}.author: must be an object with name`};i={name:e.author.name,email:typeof e.author.email=="string"?e.author.email:void 0};}return {ok:true,value:{name:e.name,description:typeof e.description=="string"?e.description:void 0,author:i,category:typeof e.category=="string"?e.category:void 0,source:n.value,homepage:typeof e.homepage=="string"?e.homepage:void 0}}}a(be,"validatePluginEntry");function L(e){if(!S(e))return {ok:false,error:"marketplace.json: not an object"};if(typeof e.name!="string"||!e.name)return {ok:false,error:"marketplace.json: name is required"};if(!S(e.owner)||typeof e.owner.name!="string")return {ok:false,error:"marketplace.json: owner.name is required"};if(!Array.isArray(e.plugins))return {ok:false,error:"marketplace.json: plugins must be an array"};let r=[];for(let t=0;t<e.plugins.length;t++){let n=be(e.plugins[t],t);if(!n.ok)return n;r.push(n.value);}return {ok:true,value:{name:e.name,description:typeof e.description=="string"?e.description:void 0,owner:{name:e.owner.name,email:typeof e.owner.email=="string"?e.owner.email:void 0},plugins:r}}}a(L,"validateMarketplace");function Re(){return process.env.HOME??homedir()}a(Re,"userHome");function W(){return join(Re(),".code-shell","plugins","marketplaces")}a(W,"marketplacesRoot");function D(e){return join(W(),e)}a(D,"marketplaceDir");function Z(e){return join(D(e),".claude-plugin","marketplace.json")}a(Z,"marketplaceJsonPath");function xe(e){return e.source==="github"?j(e.repo):e.url}a(xe,"sourceToCloneUrl");async function Y(e,r){let t=D(e),i=m()[e];if(i&&JSON.stringify(i.source)===JSON.stringify(r)&&existsSync(t)){let g=(r.source==="git",void 0);await z(t,g);}else {existsSync(t)&&rmSync(t,{recursive:true,force:true}),mkdirSync(W(),{recursive:true});let g=await $(xe(r),t);if(!g.ok)return {ok:false,error:g.error}}let o=Z(e);if(!existsSync(o))return rmSync(t,{recursive:true,force:true}),{ok:false,error:`Marketplace ${e}: .claude-plugin/marketplace.json not found in the cloned repository.`};let a;try{a=JSON.parse(readFileSync(o,"utf-8"));}catch(g){return rmSync(t,{recursive:true,force:true}),{ok:false,error:`Marketplace ${e}: failed to parse marketplace.json: ${g.message}`}}let l=L(a);if(!l.ok)return rmSync(t,{recursive:true,force:true}),{ok:false,error:`Marketplace ${e}: ${l.error}`};let d={source:r,installLocation:t,lastUpdated:new Date().toISOString()};return B(e,d),{ok:true,name:e,marketplace:l.value,replaced:!!i}}a(Y,"addMarketplace");function Q(e){let r=N(e),t=D(e);return existsSync(t)&&rmSync(t,{recursive:true,force:true}),r}a(Q,"removeMarketplace");function F(e){if(!m()[e])return null;let t=Z(e);if(!existsSync(t))return null;let n;try{n=JSON.parse(readFileSync(t,"utf-8"));}catch{return null}let i=L(n);return i.ok?i.value:null}a(F,"loadMarketplace");function X(){let e=m(),r=[];for(let[t,n]of Object.entries(e)){let i=F(t);r.push({name:t,source:n.source,installLocation:n.installLocation,lastUpdated:n.lastUpdated,pluginCount:i?i.plugins.length:-1});}return r.sort((t,n)=>t.name.localeCompare(n.name))}a(X,"listMarketplaces");h();h();var K="CLAUDE_PLUGIN_ROOT",te="CODESHELL_PLUGIN_ROOT",Ie=8192;function Oe(e){let r=Math.min(e.length,Ie);for(let t=0;t<r;t++)if(e[t]===0)return true;return false}a(Oe,"isLikelyBinary");function ne(e,r){let t;try{t=readdirSync(e,{withFileTypes:!0});}catch{return}for(let n of t){let i=join(e,n.name);if(n.isSymbolicLink())continue;if(n.isDirectory()){if(n.name===".git")continue;ne(i,r);continue}if(!n.isFile())continue;let s;try{s=readFileSync(i);}catch{continue}if(r.filesScanned+=1,Oe(s))continue;let o=s.toString("utf8");if(!o.includes(K))continue;let a=o.split(K).join(te);try{writeFileSync(i,a,"utf8"),r.filesRewritten+=1,r.rewrittenPaths.push(i);}catch{}}}a(ne,"walkAndRewrite");function ie(e){let r={filesScanned:0,filesRewritten:0,rewrittenPaths:[]},t=false;try{t=statSync(e).isDirectory();}catch{t=false;}if(!t)return r;ne(e,r);let n={rewrittenAt:new Date().toISOString(),from:K,to:te,filesScanned:r.filesScanned,filesRewritten:r.filesRewritten,note:"codeshell rewrote plugin files at install time so ${CLAUDE_PLUGIN_ROOT} placeholders use codeshell's native env var. Upstream plugin sources are unchanged; only this local copy was modified."};try{writeFileSync(join(e,".code-shell-installed.json"),JSON.stringify(n,null,2)+`
|
|
3
|
-
`,"utf8");}catch{}return r}a(ie,"rewritePluginVars");function Ke(){return process.env.HOME??homedir()}a(Ke,"userHome");function se(){return join(Ke(),".code-shell","plugins","cache")}a(se,"pluginCacheRoot");function E(e,r,t){return join(se(),e,r,t)}a(E,"pluginCacheDir");async function _e(e,r,t){let n=isAbsolute(r)?r:resolve(e,r);return existsSync(n)?(mkdirSync(dirname(t),{recursive:true}),existsSync(t)&&rmSync(t,{recursive:true,force:true}),cpSync(n,t,{recursive:true}),{ok:true,sha:void 0}):{ok:false,error:`plugin source path "${r}" not found in marketplace`}}a(_e,"materializePath");async function Ge(e,r,t){mkdirSync(dirname(t),{recursive:true}),existsSync(t)&&rmSync(t,{recursive:true,force:true});let n=await $(e,t,r?{ref:r}:void 0);if(!n.ok)return {ok:false,error:n.error};let i=await C(t);return i.ok?{ok:true,sha:i.stdout}:{ok:false,error:i.error}}a(Ge,"materializeGit");async function He(e,r,t,n){let i=mkdtempSync(join(tmpdir(),"plugin-clone-"));try{let s=await $(e,i+"/repo",t?{ref:t}:void 0);if(!s.ok)return {ok:!1,error:s.error};let o=await C(i+"/repo");if(!o.ok)return {ok:!1,error:o.error};let a=join(i,"repo",r);return existsSync(a)?(mkdirSync(dirname(n),{recursive:!0}),existsSync(n)&&rmSync(n,{recursive:!0,force:!0}),cpSync(a,n,{recursive:!0}),{ok:!0,sha:o.stdout}):{ok:!1,error:`git-subdir path "${r}" not found in cloned repository`}}finally{rmSync(i,{recursive:true,force:true});}}a(He,"materializeGitSubdir");function oe(e){return e?e.slice(0,12):"unknown"}a(oe,"shortSha");async function qe(e,r,t,n){let i=E(t,n,"_pending_");if(typeof e=="string"){let s=await _e(r,e,i);if(!s.ok)return s;let o=E(t,n,"local");return existsSync(o)&&rmSync(o,{recursive:true,force:true}),mkdirSync(dirname(o),{recursive:true}),cpSync(i,o,{recursive:true}),rmSync(i,{recursive:true,force:true}),{ok:true,cacheDir:o,version:"local",sha:void 0}}if(e.source==="git"||e.source==="github"){let s=e.source==="github"?j(e.repo):e.url,o=await Ge(s,e.ref,i);if(!o.ok)return existsSync(i)&&rmSync(i,{recursive:true,force:true}),o;let a=oe(o.sha),l=E(t,n,a);return existsSync(l)&&rmSync(l,{recursive:true,force:true}),mkdirSync(dirname(l),{recursive:true}),cpSync(i,l,{recursive:true}),rmSync(i,{recursive:true,force:true}),{ok:true,cacheDir:l,version:a,sha:o.sha}}if(e.source==="git-subdir"){let s=await He(e.url,e.path,e.ref,i);if(!s.ok)return existsSync(i)&&rmSync(i,{recursive:true,force:true}),s;let o=oe(s.sha),a=E(t,n,o);return existsSync(a)&&rmSync(a,{recursive:true,force:true}),mkdirSync(dirname(a),{recursive:true}),cpSync(i,a,{recursive:true}),rmSync(i,{recursive:true,force:true}),{ok:true,cacheDir:a,version:o,sha:s.sha}}return {ok:false,error:`unsupported source type "${e.source}"`}}a(qe,"materialize");async function ue(e$1,r){let n=m()[r];if(!n)return {ok:false,error:`marketplace "${r}" not found. Run /plugin marketplace add first.`};let i=F(r);if(!i)return {ok:false,error:`marketplace "${r}" is registered but its manifest could not be loaded.`};let s=i.plugins.find(fe=>fe.name===e$1);if(!s)return {ok:false,error:`plugin "${e$1}" not found in marketplace "${r}".`};let o=await qe(s.source,n.installLocation,r,e$1);if(!o.ok)return o;let a=ie(o.cacheDir),l=g(e$1,r);f(l);let d=new Date().toISOString(),g$1={scope:"user",installPath:o.cacheDir,version:o.version,installedAt:d,lastUpdated:d,...o.sha?{gitCommitSha:o.sha}:{}};return e(l,g$1),{ok:true,entry:g$1,freshlyCloned:true,varRewrite:{filesScanned:a.filesScanned,filesRewritten:a.filesRewritten}}}a(ue,"installPlugin");function ae(e,r){let t=g(e,r),i=d().plugins[t],s=false;if(i){for(let l of i)l.installPath&&existsSync(l.installPath)&&(rmSync(l.installPath,{recursive:true,force:true}),s=true);let a=join(se(),r,e);try{b("fs").rmdirSync(a);}catch{}}let o=f(t);return {ok:o||s,removedFromManifest:o,removedFromDisk:s}}a(ae,"uninstallPlugin");function le(){let e=d(),r=[];for(let[t,n]of Object.entries(e.plugins))for(let i of n)r.push({key:t,entry:i});return r.sort((t,n)=>t.key.localeCompare(n.key)),r}a(le,"listInstalled");var _=["Usage:"," /plugin marketplace add <git-url-or-owner/repo>"," /plugin marketplace remove <name>"," /plugin marketplace list"," /plugin install <plugin>@<marketplace>"," /plugin uninstall <plugin>@<marketplace>"," /plugin list"].join(`
|
|
4
|
-
`);function ce(e){let r=e.lastIndexOf("@");return r<=0||r===e.length-1?null:{plugin:e.slice(0,r),marketplace:e.slice(r+1)}}a(ce,"splitInstallKey");async function Ar(e){let r=e.trim().split(/\s+/).filter(Boolean);if(r.length===0)return _;let t=r[0];if(t==="marketplace"){let n=r[1];if(n==="add"){let i=r.slice(2).join(" ").trim();if(!i)return "Usage: /plugin marketplace add <git-url-or-owner/repo>";let s=H(i);if(!s)return `Cannot parse "${i}" as a marketplace source.
|
|
5
|
-
Supported forms: owner/repo, https://...git, git@host:owner/repo[.git], /abs/path/to/repo.git`;let o=q(s),a=await Y(o,s);if(!a.ok)return `Failed to add marketplace "${o}": ${a.error}`;let l=[a.replaced?`Refreshed marketplace "${a.name}"`:`Added marketplace "${a.name}"`,` plugins available: ${a.marketplace.plugins.length}`];for(let d of a.marketplace.plugins.slice(0,10))l.push(` - ${d.name}${d.description?`: ${d.description}`:""}`);return a.marketplace.plugins.length>10&&l.push(` ... (${a.marketplace.plugins.length-10} more)`),l.join(`
|
|
6
|
-
`)}if(n==="remove"){let i$1=r[2];if(!i$1)return "Usage: /plugin marketplace remove <name>";let s=Q(i$1);return i(),s?`Removed marketplace "${i$1}"`:`Marketplace "${i$1}" not found`}if(n==="list"||n===void 0){let i=X();if(i.length===0)return "No marketplaces. Use /plugin marketplace add <url>.";let s=[`Marketplaces (${i.length}):`];for(let o of i){let a=o.source.source==="github"?`github:${o.source.repo}`:o.source.url,l=o.pluginCount>=0?`${o.pluginCount} plugins`:"manifest unreadable";s.push(` ${o.name} (${a}) \u2014 ${l}`);}return s.join(`
|
|
7
|
-
`)}return `Unknown subcommand "marketplace ${n}".
|
|
8
|
-
${_}`}if(t==="install"){let n=r[1];if(!n)return "Usage: /plugin install <plugin>@<marketplace>";let i$1=ce(n);if(!i$1)return `Expected <plugin>@<marketplace>, got "${n}"`;let s=await ue(i$1.plugin,i$1.marketplace);if(!s.ok)return `Failed to install ${n}: ${s.error}`;i();let o=[`Installed ${n}`,` version: ${s.entry.version}`,` path: ${s.entry.installPath}`];return s.varRewrite.filesRewritten>0&&o.push(` rewrote: ${s.varRewrite.filesRewritten} file(s) \u2014 \${CLAUDE_PLUGIN_ROOT} \u2192 \${CODESHELL_PLUGIN_ROOT}`),o.join(`
|
|
9
|
-
`)}if(t==="uninstall"){let n=r[1];if(!n)return "Usage: /plugin uninstall <plugin>@<marketplace>";let i$1=ce(n);if(!i$1)return `Expected <plugin>@<marketplace>, got "${n}"`;let s=ae(i$1.plugin,i$1.marketplace);if(i(),!s.removedFromManifest&&!s.removedFromDisk)return `${n} was not installed`;let o=[];return s.removedFromManifest&&o.push("manifest entry"),s.removedFromDisk&&o.push("cache dir"),`Uninstalled ${n} (removed ${o.join(" + ")})`}if(t==="list"){let n=le();if(n.length===0)return "No plugins installed.";let i=[`Installed plugins (${n.length}):`];for(let{key:s,entry:o}of n)i.push(` ${s} v${o.version} ${o.installPath}`);return i.join(`
|
|
10
|
-
`)}return `Unknown subcommand "${t}".
|
|
11
|
-
${_}`}a(Ar,"runPluginCommand");export{Ar as runPluginCommand};
|
package/dist/plugins/gitOps.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Minimal `git` subprocess wrappers used by the plugin marketplace. Each
|
|
3
|
-
* function returns a discriminated union so callers can produce useful
|
|
4
|
-
* error messages without try/catching. Mirrors Claude Code's
|
|
5
|
-
* utils/plugins/marketplaceManager.ts:loadAndCacheMarketplace at the
|
|
6
|
-
* subset we need for the MVP.
|
|
7
|
-
*/
|
|
8
|
-
export type GitResult = {
|
|
9
|
-
ok: true;
|
|
10
|
-
stdout: string;
|
|
11
|
-
} | {
|
|
12
|
-
ok: false;
|
|
13
|
-
error: string;
|
|
14
|
-
};
|
|
15
|
-
export declare function gitClone(url: string, destDir: string, options?: {
|
|
16
|
-
ref?: string;
|
|
17
|
-
}): Promise<GitResult>;
|
|
18
|
-
export declare function gitRevParseHead(repoDir: string): Promise<GitResult>;
|
|
19
|
-
export declare function gitFetchAndReset(repoDir: string, ref?: string): Promise<GitResult>;
|
|
20
|
-
/**
|
|
21
|
-
* Github source helper: convert "owner/repo" to an https clone URL.
|
|
22
|
-
*/
|
|
23
|
-
export declare function githubRepoToCloneUrl(repo: string): string;
|