@cjhyy/code-shell 0.3.0 → 0.5.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +75 -0
- package/dist/cli.js +2 -0
- package/dist/index.d.ts +1 -68
- package/dist/index.js +1 -1
- package/package.json +25 -73
- package/dist/agent/coordinator.d.ts +0 -49
- package/dist/anthropic-DJXVKFMJ.js +0 -1
- package/dist/arena/arena.d.ts +0 -43
- package/dist/arena/context/context-tools.d.ts +0 -16
- package/dist/arena/detect-mode.d.ts +0 -20
- package/dist/arena/digest-builder.d.ts +0 -25
- package/dist/arena/index.d.ts +0 -29
- package/dist/arena/index.js +0 -1
- package/dist/arena/iterate/convergence.d.ts +0 -25
- package/dist/arena/iterate/formats/index.d.ts +0 -22
- package/dist/arena/iterate/index.d.ts +0 -11
- package/dist/arena/iterate/iterative-arena.d.ts +0 -23
- package/dist/arena/iterate/parse.d.ts +0 -42
- package/dist/arena/iterate/phases/argue.d.ts +0 -22
- package/dist/arena/iterate/phases/revise.d.ts +0 -16
- package/dist/arena/iterate/phases/tournament.d.ts +0 -34
- package/dist/arena/iterate/tools/web-tools.d.ts +0 -13
- package/dist/arena/iterate/types.d.ts +0 -152
- package/dist/arena/ledger.d.ts +0 -47
- package/dist/arena/lenses/architecture.d.ts +0 -5
- package/dist/arena/lenses/engineering.d.ts +0 -5
- package/dist/arena/lenses/general.d.ts +0 -5
- package/dist/arena/lenses/index.d.ts +0 -16
- package/dist/arena/lenses/product.d.ts +0 -5
- package/dist/arena/model-presets.d.ts +0 -23
- package/dist/arena/phases/adjudication.d.ts +0 -24
- package/dist/arena/phases/build-consensus.d.ts +0 -29
- package/dist/arena/phases/claim-registry.d.ts +0 -26
- package/dist/arena/phases/cross-review.d.ts +0 -45
- package/dist/arena/phases/debate-rounds.d.ts +0 -27
- package/dist/arena/phases/participant-research.d.ts +0 -38
- package/dist/arena/phases/planning-detail-expansion.d.ts +0 -38
- package/dist/arena/planner.d.ts +0 -27
- package/dist/arena/providers/docs.d.ts +0 -6
- package/dist/arena/providers/git.d.ts +0 -8
- package/dist/arena/providers/index.d.ts +0 -32
- package/dist/arena/providers/none.d.ts +0 -7
- package/dist/arena/providers/repo.d.ts +0 -6
- package/dist/arena/render/session.d.ts +0 -17
- package/dist/arena/render/terminal.d.ts +0 -33
- package/dist/arena/strategies/discussion.d.ts +0 -25
- package/dist/arena/strategies/index.d.ts +0 -15
- package/dist/arena/strategies/language-wrapper.d.ts +0 -17
- package/dist/arena/strategies/lens-wrapper.d.ts +0 -16
- package/dist/arena/strategies/planning.d.ts +0 -30
- package/dist/arena/strategies/review.d.ts +0 -26
- package/dist/arena/strategies/utils.d.ts +0 -39
- package/dist/arena/tools/selector.d.ts +0 -17
- package/dist/arena/transitions.d.ts +0 -48
- package/dist/arena/types.d.ts +0 -508
- package/dist/arena-MRBATZFD.js +0 -3
- package/dist/bootstrap/setup.d.ts +0 -14
- package/dist/bootstrap/state.d.ts +0 -160
- package/dist/bwrap-PVZMLHZR.js +0 -2
- package/dist/chunk-2OD6VR4N.js +0 -2
- package/dist/chunk-3QP5BQ3L.js +0 -1
- package/dist/chunk-5QIVXFCT.js +0 -1
- package/dist/chunk-AFMP73YP.js +0 -2
- package/dist/chunk-D3TVASD2.js +0 -4
- package/dist/chunk-DI26OUIU.js +0 -2
- package/dist/chunk-FU7AHZNN.js +0 -1
- package/dist/chunk-FZXY554D.js +0 -2
- package/dist/chunk-GGVAOPI7.js +0 -1
- package/dist/chunk-GKAQH2DG.js +0 -2
- package/dist/chunk-GYNO4R7R.js +0 -2
- package/dist/chunk-K4HILJ6G.js +0 -251
- package/dist/chunk-M7VU4YVY.js +0 -49
- package/dist/chunk-MLCTC53I.js +0 -1
- package/dist/chunk-O5HFCH2U.js +0 -1
- package/dist/chunk-OWBYLMDD.js +0 -1
- package/dist/chunk-P6JSTIFM.js +0 -1
- package/dist/chunk-QTWU7UNA.js +0 -5
- package/dist/chunk-SKIX2M5Z.js +0 -4
- package/dist/chunk-SNFAPSLA.js +0 -1
- package/dist/chunk-SV7H4FKT.js +0 -3
- package/dist/chunk-T222K6IV.js +0 -18
- package/dist/chunk-TKJA6W36.js +0 -3
- package/dist/chunk-WI6FSWGU.js +0 -1
- package/dist/chunk-WONQHE4P.js +0 -641
- package/dist/chunk-X2S7ASQ2.js +0 -1
- package/dist/chunk-Z5HKHAO7.js +0 -336
- package/dist/cli/commands/arena.d.ts +0 -29
- package/dist/cli/commands/builtin/advanced-commands.d.ts +0 -5
- package/dist/cli/commands/builtin/core-commands.d.ts +0 -5
- package/dist/cli/commands/builtin/export-md.d.ts +0 -19
- package/dist/cli/commands/builtin/extra-commands.d.ts +0 -6
- package/dist/cli/commands/builtin/git-commands.d.ts +0 -5
- package/dist/cli/commands/builtin/init/detect.d.ts +0 -25
- package/dist/cli/commands/builtin/init/index.d.ts +0 -19
- package/dist/cli/commands/builtin/more-commands.d.ts +0 -5
- package/dist/cli/commands/builtin/permissions-command.d.ts +0 -5
- package/dist/cli/commands/builtin/plugin-commands-registration.d.ts +0 -12
- package/dist/cli/commands/builtin/plugin-handler.d.ts +0 -6
- package/dist/cli/commands/builtin/utility-commands.d.ts +0 -5
- package/dist/cli/commands/registry.d.ts +0 -79
- package/dist/cli/commands/repl.d.ts +0 -21
- package/dist/cli/commands/run.d.ts +0 -21
- package/dist/cli/commands/runs.d.ts +0 -14
- package/dist/cli/cost-tracker.d.ts +0 -63
- package/dist/cli/exit.d.ts +0 -12
- package/dist/cli/input/ndjson-reader.d.ts +0 -31
- package/dist/cli/input-compiler.d.ts +0 -5
- package/dist/cli/main.d.ts +0 -5
- package/dist/cli/main.js +0 -415
- package/dist/cli/migrate-models.d.ts +0 -45
- package/dist/cli/onboarding.d.ts +0 -189
- package/dist/cli/output/renderer.d.ts +0 -28
- package/dist/cli/output/terminal-ui.d.ts +0 -50
- package/dist/cli/updater.d.ts +0 -65
- package/dist/client-base-GSFXPP2Y.js +0 -1
- package/dist/compaction-L3Y6NG4N.js +0 -1
- package/dist/context/compaction.d.ts +0 -116
- package/dist/context/manager.d.ts +0 -145
- package/dist/context/token-counter.d.ts +0 -27
- package/dist/context/tool-result-storage.d.ts +0 -96
- package/dist/cron/scheduler.d.ts +0 -34
- package/dist/data/openrouter-models.d.ts +0 -35
- package/dist/data/openrouter-sync.d.ts +0 -16
- package/dist/data/static-catalogs.d.ts +0 -25
- package/dist/devtools-FBX4HVVY.js +0 -1
- package/dist/engine/cost-store.d.ts +0 -22
- package/dist/engine/engine.d.ts +0 -236
- package/dist/engine/model-facade.d.ts +0 -24
- package/dist/engine/query.d.ts +0 -50
- package/dist/engine/streaming-tool-queue.d.ts +0 -34
- package/dist/engine/token-budget.d.ts +0 -22
- package/dist/engine/tool-summary.d.ts +0 -13
- package/dist/engine/turn-loop.d.ts +0 -122
- package/dist/engine/turn-state.d.ts +0 -20
- package/dist/exceptions.d.ts +0 -44
- package/dist/export-md-U72T7NW7.js +0 -22
- package/dist/file-history-7FQFEQOL.js +0 -1
- package/dist/git/utils.d.ts +0 -35
- package/dist/git/worktree.d.ts +0 -36
- package/dist/hooks/events.d.ts +0 -114
- package/dist/hooks/inject.d.ts +0 -19
- package/dist/hooks/registry.d.ts +0 -15
- package/dist/hooks/shell-runner.d.ts +0 -45
- package/dist/llm/api-key-sanitize.d.ts +0 -22
- package/dist/llm/capabilities/index.d.ts +0 -20
- package/dist/llm/capabilities/rules.d.ts +0 -26
- package/dist/llm/capabilities/types.d.ts +0 -108
- package/dist/llm/client-base.d.ts +0 -29
- package/dist/llm/client-factory.d.ts +0 -10
- package/dist/llm/model-cache.d.ts +0 -21
- package/dist/llm/model-fetcher.d.ts +0 -29
- package/dist/llm/model-pool.d.ts +0 -84
- package/dist/llm/provider-catalog.d.ts +0 -32
- package/dist/llm/provider-kinds.d.ts +0 -21
- package/dist/llm/providers/anthropic.d.ts +0 -19
- package/dist/llm/providers/openai.d.ts +0 -64
- package/dist/llm/retry.d.ts +0 -12
- package/dist/llm/stream-watchdog.d.ts +0 -42
- package/dist/llm/token-counter.d.ts +0 -17
- package/dist/llm/types.d.ts +0 -37
- package/dist/logging/logger.d.ts +0 -102
- package/dist/logging/session-recorder.d.ts +0 -90
- package/dist/lsp/client.d.ts +0 -41
- package/dist/lsp/manager.d.ts +0 -40
- package/dist/lsp/servers.d.ts +0 -16
- package/dist/manager-4XKLZHKE.js +0 -1
- package/dist/mcp-manager-3JGHEJO3.js +0 -1
- package/dist/memory-BNI4WEWL.js +0 -1
- package/dist/model-cache-HEDXI7UJ.js +0 -1
- package/dist/model-fetcher-X5W5EASG.js +0 -1
- package/dist/native-ts/yoga-layout/enums.d.ts +0 -117
- package/dist/native-ts/yoga-layout/index.d.ts +0 -270
- package/dist/off-7SDVMMXW.js +0 -1
- package/dist/openai-OQ6LLN5J.js +0 -1
- package/dist/openrouter-models-ZT4R2AE3.js +0 -1
- package/dist/openrouter-sync-ARMVWY7S.js +0 -1
- package/dist/plugin-handler-GJISMH5Q.js +0 -11
- package/dist/plugins/gitOps.d.ts +0 -23
- package/dist/plugins/installedPlugins.d.ts +0 -15
- package/dist/plugins/knownMarketplaces.d.ts +0 -10
- package/dist/plugins/loadPluginHooks.d.ts +0 -52
- package/dist/plugins/marketplaceManager.d.ts +0 -49
- package/dist/plugins/parseMarketplaceInput.d.ts +0 -16
- package/dist/plugins/pluginCommandHook.d.ts +0 -54
- package/dist/plugins/pluginCommandsLoader.d.ts +0 -25
- package/dist/plugins/pluginInstaller.d.ts +0 -36
- package/dist/plugins/schemas.d.ts +0 -9
- package/dist/plugins/types.d.ts +0 -75
- package/dist/plugins/varRewrite.d.ts +0 -42
- package/dist/preset/index.d.ts +0 -60
- package/dist/product/define.d.ts +0 -60
- package/dist/product/index.d.ts +0 -5
- package/dist/product/index.js +0 -1
- package/dist/product/types.d.ts +0 -111
- package/dist/prompt/composer.d.ts +0 -42
- package/dist/prompt/instruction-scanner.d.ts +0 -54
- package/dist/prompt/section-cache.d.ts +0 -15
- package/dist/prompt/section-loader.d.ts +0 -26
- package/dist/protocol/client.d.ts +0 -64
- package/dist/protocol/helpers.d.ts +0 -42
- package/dist/protocol/index.d.ts +0 -4
- package/dist/protocol/server.d.ts +0 -51
- package/dist/protocol/transport.d.ts +0 -36
- package/dist/protocol/types.d.ts +0 -192
- package/dist/react-compiler-runtime-shim.d.ts +0 -1
- package/dist/remote/bridge.d.ts +0 -37
- package/dist/render/Ansi.d.ts +0 -10
- package/dist/render/bidi.d.ts +0 -15
- package/dist/render/clearTerminal.d.ts +0 -19
- package/dist/render/colorize.d.ts +0 -16
- package/dist/render/components/AlternateScreen.d.ts +0 -21
- package/dist/render/components/App.d.ts +0 -71
- package/dist/render/components/AppContext.d.ts +0 -11
- package/dist/render/components/Box.d.ts +0 -49
- package/dist/render/components/Button.d.ts +0 -36
- package/dist/render/components/ClockContext.d.ts +0 -9
- package/dist/render/components/CursorDeclarationContext.d.ts +0 -22
- package/dist/render/components/ErrorOverview.d.ts +0 -5
- package/dist/render/components/Link.d.ts +0 -7
- package/dist/render/components/Newline.d.ts +0 -12
- package/dist/render/components/NoSelect.d.ts +0 -19
- package/dist/render/components/RawAnsi.d.ts +0 -16
- package/dist/render/components/ScrollBox.d.ts +0 -78
- package/dist/render/components/Spacer.d.ts +0 -5
- package/dist/render/components/Static.d.ts +0 -23
- package/dist/render/components/StdinContext.d.ts +0 -27
- package/dist/render/components/TerminalFocusContext.d.ts +0 -10
- package/dist/render/components/TerminalSizeContext.d.ts +0 -5
- package/dist/render/components/Text.d.ts +0 -55
- package/dist/render/constants.d.ts +0 -1
- package/dist/render/cursor.d.ts +0 -8
- package/dist/render/devtools.d.ts +0 -9
- package/dist/render/dom.d.ts +0 -77
- package/dist/render/events/click-event.d.ts +0 -31
- package/dist/render/events/dispatcher.d.ts +0 -40
- package/dist/render/events/emitter.d.ts +0 -5
- package/dist/render/events/event-handlers.d.ts +0 -46
- package/dist/render/events/event.d.ts +0 -5
- package/dist/render/events/focus-event.d.ts +0 -13
- package/dist/render/events/input-event.d.ts +0 -30
- package/dist/render/events/keyboard-event.d.ts +0 -19
- package/dist/render/events/paste-event.d.ts +0 -8
- package/dist/render/events/resize-event.d.ts +0 -9
- package/dist/render/events/terminal-event.d.ts +0 -54
- package/dist/render/events/terminal-focus-event.d.ts +0 -13
- package/dist/render/focus.d.ts +0 -43
- package/dist/render/frame.d.ts +0 -95
- package/dist/render/get-max-width.d.ts +0 -17
- package/dist/render/hit-test.d.ts +0 -33
- package/dist/render/hooks/use-animation-frame.d.ts +0 -26
- package/dist/render/hooks/use-app.d.ts +0 -5
- package/dist/render/hooks/use-declared-cursor.d.ts +0 -26
- package/dist/render/hooks/use-input.d.ts +0 -37
- package/dist/render/hooks/use-interval.d.ts +0 -18
- package/dist/render/hooks/use-search-highlight.d.ts +0 -30
- package/dist/render/hooks/use-selection.d.ts +0 -39
- package/dist/render/hooks/use-stdin.d.ts +0 -5
- package/dist/render/hooks/use-tab-status.d.ts +0 -13
- package/dist/render/hooks/use-terminal-focus.d.ts +0 -10
- package/dist/render/hooks/use-terminal-title.d.ts +0 -12
- package/dist/render/hooks/use-terminal-viewport.d.ts +0 -29
- package/dist/render/index.d.ts +0 -30
- package/dist/render/ink.d.ts +0 -391
- package/dist/render/instances.d.ts +0 -3
- package/dist/render/layout/engine.d.ts +0 -2
- package/dist/render/layout/geometry.d.ts +0 -30
- package/dist/render/layout/node.d.ts +0 -125
- package/dist/render/layout/yoga.d.ts +0 -56
- package/dist/render/line-width-cache.d.ts +0 -1
- package/dist/render/log-update.d.ts +0 -28
- package/dist/render/measure-element.d.ts +0 -16
- package/dist/render/measure-text.d.ts +0 -6
- package/dist/render/node-cache.d.ts +0 -20
- package/dist/render/optimizer.d.ts +0 -15
- package/dist/render/output.d.ts +0 -119
- package/dist/render/parse-keypress.d.ts +0 -111
- package/dist/render/reconciler.d.ts +0 -11
- package/dist/render/render-border.d.ts +0 -24
- package/dist/render/render-node-to-output.d.ts +0 -45
- package/dist/render/render-to-screen.d.ts +0 -46
- package/dist/render/renderer.d.ts +0 -14
- package/dist/render/root.d.ts +0 -74
- package/dist/render/screen.d.ts +0 -269
- package/dist/render/searchHighlight.d.ts +0 -20
- package/dist/render/selection.d.ts +0 -229
- package/dist/render/squash-text-nodes.d.ts +0 -22
- package/dist/render/stringWidth.d.ts +0 -1
- package/dist/render/styles.d.ts +0 -306
- package/dist/render/supports-hyperlinks.d.ts +0 -13
- package/dist/render/tabstops.d.ts +0 -1
- package/dist/render/terminal-focus-state.d.ts +0 -6
- package/dist/render/terminal-querier.d.ts +0 -129
- package/dist/render/terminal.d.ts +0 -46
- package/dist/render/termio/ansi.d.ts +0 -65
- package/dist/render/termio/csi.d.ts +0 -165
- package/dist/render/termio/dec.d.ts +0 -37
- package/dist/render/termio/esc.d.ts +0 -12
- package/dist/render/termio/osc.d.ts +0 -173
- package/dist/render/termio/parser.d.ts +0 -35
- package/dist/render/termio/sgr.d.ts +0 -8
- package/dist/render/termio/tokenize.d.ts +0 -45
- package/dist/render/termio/types.d.ts +0 -190
- package/dist/render/termio.d.ts +0 -24
- package/dist/render/useTerminalNotification.d.ts +0 -28
- package/dist/render/warn.d.ts +0 -1
- package/dist/render/widest-line.d.ts +0 -1
- package/dist/render/wrap-text.d.ts +0 -2
- package/dist/render/wrapAnsi.d.ts +0 -7
- package/dist/run/ArtifactTracker.d.ts +0 -38
- package/dist/run/CheckpointWriter.d.ts +0 -53
- package/dist/run/EngineRunner.d.ts +0 -72
- package/dist/run/Evaluator.d.ts +0 -56
- package/dist/run/FileRunStore.d.ts +0 -39
- package/dist/run/Heartbeat.d.ts +0 -54
- package/dist/run/RunApprovalBackend.d.ts +0 -53
- package/dist/run/RunLock.d.ts +0 -40
- package/dist/run/RunManager.d.ts +0 -82
- package/dist/run/RunQueue.d.ts +0 -27
- package/dist/run/RunStore.d.ts +0 -25
- package/dist/run/factory.d.ts +0 -63
- package/dist/run/index.d.ts +0 -17
- package/dist/run/index.js +0 -1
- package/dist/run/types.d.ts +0 -136
- package/dist/seatbelt-L54CNI2Y.js +0 -37
- package/dist/services/analytics.d.ts +0 -29
- package/dist/services/auto-dream.d.ts +0 -35
- package/dist/services/diagnostics.d.ts +0 -41
- package/dist/services/extract-memories.d.ts +0 -27
- package/dist/services/index.d.ts +0 -11
- package/dist/services/memory-orchestrator.d.ts +0 -39
- package/dist/services/notifier.d.ts +0 -25
- package/dist/services/oauth.d.ts +0 -27
- package/dist/services/session-memory.d.ts +0 -37
- package/dist/session/file-history.d.ts +0 -41
- package/dist/session/memory.d.ts +0 -65
- package/dist/session/session-manager.d.ts +0 -28
- package/dist/session/transcript.d.ts +0 -39
- package/dist/session-manager-AGWS5SMJ.js +0 -1
- package/dist/settings/manager.d.ts +0 -36
- package/dist/settings/schema.d.ts +0 -1123
- package/dist/skills/frontmatter.d.ts +0 -13
- package/dist/skills/index.d.ts +0 -7
- package/dist/skills/scanner.d.ts +0 -20
- package/dist/tool-summary-HJX6RHG4.js +0 -2
- package/dist/tool-system/builtin/agent-notifications.d.ts +0 -55
- package/dist/tool-system/builtin/agent-registry.d.ts +0 -67
- package/dist/tool-system/builtin/agent-transcript-translator.d.ts +0 -22
- package/dist/tool-system/builtin/agent.d.ts +0 -16
- package/dist/tool-system/builtin/apply-patch/applier.d.ts +0 -26
- package/dist/tool-system/builtin/apply-patch/index.d.ts +0 -19
- package/dist/tool-system/builtin/apply-patch/parser.d.ts +0 -17
- package/dist/tool-system/builtin/apply-patch/seek-sequence.d.ts +0 -18
- package/dist/tool-system/builtin/apply-patch/types.d.ts +0 -49
- package/dist/tool-system/builtin/arena.d.ts +0 -31
- package/dist/tool-system/builtin/ask-user.d.ts +0 -20
- package/dist/tool-system/builtin/bash.d.ts +0 -12
- package/dist/tool-system/builtin/brief.d.ts +0 -6
- package/dist/tool-system/builtin/config.d.ts +0 -6
- package/dist/tool-system/builtin/cron.d.ts +0 -10
- package/dist/tool-system/builtin/edit.d.ts +0 -6
- package/dist/tool-system/builtin/file-cache.d.ts +0 -11
- package/dist/tool-system/builtin/glob.d.ts +0 -6
- package/dist/tool-system/builtin/grep.d.ts +0 -6
- package/dist/tool-system/builtin/index.d.ts +0 -20
- package/dist/tool-system/builtin/lsp.d.ts +0 -6
- package/dist/tool-system/builtin/mcp-tools.d.ts +0 -10
- package/dist/tool-system/builtin/notebook-edit.d.ts +0 -6
- package/dist/tool-system/builtin/plan.d.ts +0 -18
- package/dist/tool-system/builtin/powershell.d.ts +0 -6
- package/dist/tool-system/builtin/read.d.ts +0 -6
- package/dist/tool-system/builtin/remote-trigger.d.ts +0 -6
- package/dist/tool-system/builtin/repl.d.ts +0 -6
- package/dist/tool-system/builtin/send-message.d.ts +0 -6
- package/dist/tool-system/builtin/skill-prompt.d.ts +0 -7
- package/dist/tool-system/builtin/skill.d.ts +0 -8
- package/dist/tool-system/builtin/sleep.d.ts +0 -6
- package/dist/tool-system/builtin/task.d.ts +0 -51
- package/dist/tool-system/builtin/tool-search.d.ts +0 -11
- package/dist/tool-system/builtin/web-fetch.d.ts +0 -6
- package/dist/tool-system/builtin/web-search.d.ts +0 -6
- package/dist/tool-system/builtin/worktree.d.ts +0 -10
- package/dist/tool-system/builtin/write.d.ts +0 -6
- package/dist/tool-system/context.d.ts +0 -133
- package/dist/tool-system/executor.d.ts +0 -49
- package/dist/tool-system/investigation-guard.d.ts +0 -46
- package/dist/tool-system/mcp-manager.d.ts +0 -50
- package/dist/tool-system/permission.d.ts +0 -104
- package/dist/tool-system/registry.d.ts +0 -32
- package/dist/tool-system/sandbox/bwrap.d.ts +0 -13
- package/dist/tool-system/sandbox/index.d.ts +0 -78
- package/dist/tool-system/sandbox/off.d.ts +0 -2
- package/dist/tool-system/sandbox/seatbelt.d.ts +0 -18
- package/dist/tool-system/task-guard.d.ts +0 -30
- package/dist/tool-system/validation.d.ts +0 -5
- package/dist/types.d.ts +0 -356
- package/dist/ui/App.d.ts +0 -14
- package/dist/ui/components/AgentBlock.d.ts +0 -35
- package/dist/ui/components/AgentDock.d.ts +0 -36
- package/dist/ui/components/AskUserPrompt.d.ts +0 -14
- package/dist/ui/components/BabyHand.d.ts +0 -1
- package/dist/ui/components/Banner.d.ts +0 -8
- package/dist/ui/components/CodeBlock.d.ts +0 -7
- package/dist/ui/components/CommandInput.d.ts +0 -24
- package/dist/ui/components/ContextUsageBar.d.ts +0 -7
- package/dist/ui/components/DiffLine.d.ts +0 -33
- package/dist/ui/components/DiffView.d.ts +0 -6
- package/dist/ui/components/DogLogo.d.ts +0 -1
- package/dist/ui/components/FullscreenLayout.d.ts +0 -51
- package/dist/ui/components/KunHead.d.ts +0 -1
- package/dist/ui/components/KunLogo.d.ts +0 -1
- package/dist/ui/components/MessageContent.d.ts +0 -26
- package/dist/ui/components/MessageRow.d.ts +0 -54
- package/dist/ui/components/ModelManager.d.ts +0 -68
- package/dist/ui/components/ModelSelector.d.ts +0 -10
- package/dist/ui/components/OnboardingPrompt.d.ts +0 -16
- package/dist/ui/components/PermissionDialog.d.ts +0 -8
- package/dist/ui/components/PermissionPrompt.d.ts +0 -11
- package/dist/ui/components/ProviderModelFlow.d.ts +0 -58
- package/dist/ui/components/ScrollView.d.ts +0 -34
- package/dist/ui/components/SessionPicker.d.ts +0 -16
- package/dist/ui/components/Spinner.d.ts +0 -8
- package/dist/ui/components/SpinnerWithVerb.d.ts +0 -19
- package/dist/ui/components/StatusLine.d.ts +0 -28
- package/dist/ui/components/StructuredDiff.d.ts +0 -8
- package/dist/ui/components/TaskList.d.ts +0 -6
- package/dist/ui/components/TextInput.d.ts +0 -17
- package/dist/ui/components/ThemedBox.d.ts +0 -19
- package/dist/ui/components/ThemedText.d.ts +0 -26
- package/dist/ui/components/ToolCall.d.ts +0 -28
- package/dist/ui/components/UpdateBanner.d.ts +0 -1
- package/dist/ui/components/VirtualMessageList.d.ts +0 -43
- package/dist/ui/components/WelcomeTips.d.ts +0 -5
- package/dist/ui/dev-seed.d.ts +0 -1
- package/dist/ui/fullscreen-mode.d.ts +0 -9
- package/dist/ui/hooks/useCostSummary.d.ts +0 -1
- package/dist/ui/hooks/useVirtualScroll.d.ts +0 -101
- package/dist/ui/index.d.ts +0 -12
- package/dist/ui/input-history.d.ts +0 -61
- package/dist/ui/onboarding-runner.d.ts +0 -2
- package/dist/ui/perf-probes.d.ts +0 -22
- package/dist/ui/query-guard.d.ts +0 -35
- package/dist/ui/slice-anchor.d.ts +0 -44
- package/dist/ui/store.d.ts +0 -108
- package/dist/ui/terminal-renderer.d.ts +0 -45
- package/dist/ui/theme.d.ts +0 -36
- package/dist/ui/vim-mode.d.ts +0 -25
- package/dist/updater-OCNU2K2Z.js +0 -1
- package/dist/utils/debug.d.ts +0 -41
- package/dist/utils/earlyInput.d.ts +0 -43
- package/dist/utils/env.d.ts +0 -24
- package/dist/utils/envUtils.d.ts +0 -51
- package/dist/utils/execFileNoThrow.d.ts +0 -39
- package/dist/utils/format.d.ts +0 -44
- package/dist/utils/fullscreen.d.ts +0 -47
- package/dist/utils/intl.d.ts +0 -22
- package/dist/utils/lockfile.d.ts +0 -15
- package/dist/utils/semver.d.ts +0 -6
- package/dist/utils/sliceAnsi.d.ts +0 -12
- package/dist/utils/systemTheme.d.ts +0 -40
- package/dist/utils/task-sanitizer.d.ts +0 -6
- package/dist/utils/theme.d.ts +0 -91
- package/dist/utils/toolDisplay.d.ts +0 -31
- package/dist/utils/truncate.d.ts +0 -40
- package/dist/voice/index.d.ts +0 -35
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,81 @@ breaking.
|
|
|
8
8
|
|
|
9
9
|
## [Unreleased]
|
|
10
10
|
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
#### Reusable sub-agent roles (`.code-shell/agents`)
|
|
14
|
+
|
|
15
|
+
- The `Agent` tool now accepts an optional `agent_type` parameter. When set, it
|
|
16
|
+
loads a reusable role definition from `<cwd>/.code-shell/agents/<name>.md`
|
|
17
|
+
(YAML frontmatter + body), supplying the sub-agent's model, tool allowlist,
|
|
18
|
+
turn cap, and system prompt. Omitting `agent_type` preserves the existing
|
|
19
|
+
ephemeral behavior — fully backward compatible.
|
|
20
|
+
- Per-role **model routing** via `ModelPool` keys (unknown key → soft fallback
|
|
21
|
+
to the parent model), per-role **tool allowlists**, and per-role **turn caps**.
|
|
22
|
+
- Background sub-agents are now capped at `MAX_BACKGROUND_AGENTS` (default 6);
|
|
23
|
+
synchronous sub-agents have a wall-clock timeout (default 5 minutes).
|
|
24
|
+
- Sub-agent spawns emit `subagent_start` / `subagent_finish` / `subagent_error`
|
|
25
|
+
lifecycle events through the existing `notification` hook.
|
|
26
|
+
- Ships sample roles under `examples/agents/`: `researcher` and `explorer`
|
|
27
|
+
(read-only), `planner` (read-only planning), and `general-purpose` (full
|
|
28
|
+
tools). Their `model` is left unset so they reuse the parent model — set
|
|
29
|
+
`model:` in the frontmatter to route a role to a specific pool key.
|
|
30
|
+
|
|
31
|
+
## [0.5.0-rc.0] - 2026-05-23
|
|
32
|
+
|
|
33
|
+
> ⚠️ Breaking. The repo is now a monorepo with three published packages.
|
|
34
|
+
> The single-package install path still works (`@cjhyy/code-shell` re-exports
|
|
35
|
+
> everything from core), but direct deep imports into `src/...` are gone.
|
|
36
|
+
> Migrate to the public package APIs before upgrading.
|
|
37
|
+
|
|
38
|
+
### Changed
|
|
39
|
+
|
|
40
|
+
#### Monorepo split — three packages
|
|
41
|
+
|
|
42
|
+
The codebase was split into a Bun workspace with three publishable packages
|
|
43
|
+
plus one private Electron POC:
|
|
44
|
+
|
|
45
|
+
- **`@cjhyy/code-shell-core`** — the engine. Engine, AgentServer, hooks,
|
|
46
|
+
tool system, LLM clients, session, protocol types, presets. Zero UI
|
|
47
|
+
dependencies. Headless and embeddable in any host (TUI, Electron main,
|
|
48
|
+
server). No React, no Ink, no chalk.
|
|
49
|
+
- **`@cjhyy/code-shell-tui`** — the terminal client. Owns the React/Ink
|
|
50
|
+
render layer, the `code-shell` CLI bin, themes, key bindings, all
|
|
51
|
+
terminal-only utilities. Imports core; nothing else imports it.
|
|
52
|
+
- **`@cjhyy/code-shell`** (meta) — thin re-export shim. `import { Engine }
|
|
53
|
+
from "@cjhyy/code-shell"` still works for SDK users; the `code-shell`
|
|
54
|
+
bin loads the TUI CLI. Ships three files total: `index.js`, `index.d.ts`,
|
|
55
|
+
`cli.js`.
|
|
56
|
+
- **`@cjhyy/code-shell-desktop`** (private) — Electron POC. Currently a
|
|
57
|
+
build-pipeline skeleton (main + preload + renderer + esbuild/vite
|
|
58
|
+
orchestration). Not published.
|
|
59
|
+
|
|
60
|
+
Existing users on `@cjhyy/code-shell` see no API change; deep-import users
|
|
61
|
+
(`@cjhyy/code-shell/src/...`) must migrate to the public surface.
|
|
62
|
+
|
|
63
|
+
#### Core decoupled from chalk
|
|
64
|
+
|
|
65
|
+
`@cjhyy/code-shell-core` no longer depends on `chalk`. ~70 chalk call sites
|
|
66
|
+
across cost-tracker, arena render, theme, and CLI-shared modules were
|
|
67
|
+
replaced with an injected `Colorizer` interface. Hosts pass a colorizer
|
|
68
|
+
implementation (TUI uses chalk; Electron / headless use `NOOP_COLORIZER`).
|
|
69
|
+
This removes core's last terminal-formatting dependency and lets non-TTY
|
|
70
|
+
hosts render the same data structures with their own styling.
|
|
71
|
+
|
|
72
|
+
### Added
|
|
73
|
+
|
|
74
|
+
- ESLint architectural guards: renderer cannot import core directly;
|
|
75
|
+
no-engine-bypass check enforced.
|
|
76
|
+
- `scripts/build-meta.ts` — produces the meta package's three-file dist.
|
|
77
|
+
- `packages/desktop/scripts/{dev,build}.ts` — three-process orchestrator
|
|
78
|
+
(vite renderer + esbuild main + esbuild preload).
|
|
79
|
+
|
|
80
|
+
### Removed
|
|
81
|
+
|
|
82
|
+
- `chalk` dependency from `@cjhyy/code-shell-core`.
|
|
83
|
+
- All deep-import paths under `src/...`. Use `@cjhyy/code-shell-core`'s
|
|
84
|
+
public surface (`@cjhyy/code-shell` for SDK users).
|
|
85
|
+
|
|
11
86
|
## [0.3.0] - 2026-05-20
|
|
12
87
|
|
|
13
88
|
### Added
|
package/dist/cli.js
ADDED
package/dist/index.d.ts
CHANGED
|
@@ -1,68 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* code-shell — general-purpose agent orchestration framework
|
|
3
|
-
*
|
|
4
|
-
* Public API exports.
|
|
5
|
-
*/
|
|
6
|
-
export declare const VERSION = "0.2.0";
|
|
7
|
-
export type { Message, ContentBlock, ToolDefinition, ToolCall, ToolResult, RegisteredTool, TranscriptEvent, TranscriptEventType, SessionState, TokenUsage, CompiledInput, PermissionDecision, PermissionMode, PermissionRule, TurnPhase, TurnResult, TerminalReason, StreamEvent, StreamCallback, LLMConfig, LLMResponse, Settings, MCPServerConfig, } from "./types.js";
|
|
8
|
-
export { FrameworkError, LLMError, LLMRateLimitError, ContextLimitError, ToolError, ToolNotFoundError, ToolExecutionError, ToolTimeoutError, PermissionDeniedError, SessionError, TranscriptError, ConfigError, } from "./exceptions.js";
|
|
9
|
-
export { Engine } from "./engine/engine.js";
|
|
10
|
-
export type { EngineConfig, EngineHookConfig, EngineResult } from "./engine/engine.js";
|
|
11
|
-
export type { CostStateStore, CostStateSnapshot } from "./engine/cost-store.js";
|
|
12
|
-
export { LLMClientBase } from "./llm/client-base.js";
|
|
13
|
-
export { createLLMClient, registerProvider } from "./llm/client-factory.js";
|
|
14
|
-
export { AnthropicClient } from "./llm/providers/anthropic.js";
|
|
15
|
-
export { OpenAIClient } from "./llm/providers/openai.js";
|
|
16
|
-
export { ModelPool, type ModelEntry } from "./llm/model-pool.js";
|
|
17
|
-
export { ToolRegistry } from "./tool-system/registry.js";
|
|
18
|
-
export { ToolExecutor } from "./tool-system/executor.js";
|
|
19
|
-
export { PermissionClassifier, HeadlessApprovalBackend, AutoApprovalBackend } from "./tool-system/permission.js";
|
|
20
|
-
export type { ApprovalBackend } from "./tool-system/permission.js";
|
|
21
|
-
export { BUILTIN_TOOLS } from "./tool-system/builtin/index.js";
|
|
22
|
-
export { MCPManager } from "./tool-system/mcp-manager.js";
|
|
23
|
-
export type { AskUserFn } from "./tool-system/builtin/ask-user.js";
|
|
24
|
-
export { taskManager } from "./tool-system/builtin/task.js";
|
|
25
|
-
export type { Task, TaskStatus } from "./tool-system/builtin/task.js";
|
|
26
|
-
export { HookRegistry } from "./hooks/registry.js";
|
|
27
|
-
export type { HookEventName, HookContext, HookResult } from "./hooks/events.js";
|
|
28
|
-
export { wrapHookMessages } from "./hooks/inject.js";
|
|
29
|
-
export { Transcript } from "./session/transcript.js";
|
|
30
|
-
export { SessionManager } from "./session/session-manager.js";
|
|
31
|
-
export { FileHistory } from "./session/file-history.js";
|
|
32
|
-
export { MemoryManager } from "./session/memory.js";
|
|
33
|
-
export type { MemoryEntry } from "./session/memory.js";
|
|
34
|
-
export type { FileSnapshot } from "./session/file-history.js";
|
|
35
|
-
export { PromptComposer } from "./prompt/composer.js";
|
|
36
|
-
export { SectionCache } from "./prompt/section-cache.js";
|
|
37
|
-
export { scanInstructions, combineInstructions } from "./prompt/instruction-scanner.js";
|
|
38
|
-
export { BUILTIN_AGENT_PRESETS, DEFAULT_AGENT_PRESET, DEFAULT_CLI_PRESET, resolveAgentPreset, resolveBuiltinToolNames, buildPresetSystemPrompt, registerPreset, listPresetNames, } from "./preset/index.js";
|
|
39
|
-
export type { AgentPreset, AgentPresetName } from "./preset/index.js";
|
|
40
|
-
export { loadSection, loadSections, availableSections, registerSection } from "./prompt/section-loader.js";
|
|
41
|
-
export { ContextManager } from "./context/manager.js";
|
|
42
|
-
export { estimateTokens, microcompact, windowCompact, truncateToolResult, buildSummarizationPrompt, applySummaryCompaction, COMPACTABLE_TOOL_NAMES, } from "./context/compaction.js";
|
|
43
|
-
export type { MicrocompactOptions } from "./context/compaction.js";
|
|
44
|
-
export type { SummarizeFn, CompactStrategy, OnCompactFn, ContextManagerConfig, } from "./context/manager.js";
|
|
45
|
-
export { applyToolResultPersistence, createContentReplacementState, reconstructContentReplacementState, resolveToolResultsDir, isPersistedReplacement, DEFAULT_PERSIST_THRESHOLD, PER_MESSAGE_AGGREGATE_CAP, PREVIEW_SIZE, } from "./context/tool-result-storage.js";
|
|
46
|
-
export type { ContentReplacementState } from "./context/tool-result-storage.js";
|
|
47
|
-
export { scanSkills, invalidateSkillCache } from "./skills/index.js";
|
|
48
|
-
export type { SkillDefinition } from "./skills/index.js";
|
|
49
|
-
export { Arena } from "./arena/arena.js";
|
|
50
|
-
export { MODEL_PRESETS, getMaxOutputTokens } from "./arena/model-presets.js";
|
|
51
|
-
export type { ModelPreset } from "./arena/model-presets.js";
|
|
52
|
-
export { detectArenaMode } from "./arena/detect-mode.js";
|
|
53
|
-
export { getStrategy, getStrategyForPlan, ReviewStrategy, DiscussionStrategy, PlanningStrategy } from "./arena/strategies/index.js";
|
|
54
|
-
export { planArena } from "./arena/planner.js";
|
|
55
|
-
export { collectEvidence } from "./arena/providers/index.js";
|
|
56
|
-
export { selectTools, hasTools } from "./arena/tools/selector.js";
|
|
57
|
-
export { ArenaLedger } from "./arena/ledger.js";
|
|
58
|
-
export { registerClaims, selectClaimsForReview } from "./arena/phases/claim-registry.js";
|
|
59
|
-
export { buildDigest, formatDigest } from "./arena/digest-builder.js";
|
|
60
|
-
export { transitionClaim, resolveClaimStatus, markUnderReview, applyReviewResult, markUnresolved, isTerminal, validTransitions } from "./arena/transitions.js";
|
|
61
|
-
export type { ArenaConfig, ArenaMode, ArenaResultV2, ArenaStrategy, ArenaParticipant, ArenaBaseContext, ArenaFinding, FindingReview, ParticipantReport, ArenaConsensus, ArenaConsensusItem, ArenaRoadmapPhase, ArenaProgressEvent, ArenaPlan, ArenaLens, ArenaLensName, ArenaSourceKind, ArenaArtifact, ArenaQuickFact, FindingKind, PeerVerdict, ToolTrace, EvidencePacket, FindingEvidenceLink, ResearchDossier, ClaimStatus, ClaimRecord, ClaimChallenge, ClaimAdjudication, RequestedCheck, DebateRound, DebateTurn, TargetedCheckTask, SharedResearchLedger, RoundResearchDigest, ArenaExecutionLimits, } from "./arena/types.js";
|
|
62
|
-
export { IterativeArena, defaultIterateConvergence, iterateDiffRatio, iterateCodeFormat, iterateDocumentFormat, getIterateFormat, } from "./arena/index.js";
|
|
63
|
-
export type { IterateConfig, IterateResult, IterateSubject, IterateFormat, IterateProgressEvent, IterateFormatPack, Draft, DraftCandidate, Critique, CritiqueCategory, CritiqueEvidence, CritiqueSeverity, ConvergenceSignal, Round, AuthorRotation, StoppedReason, CheckpointFn, CheckpointContext, CheckpointAction, } from "./arena/index.js";
|
|
64
|
-
export { RunManager, type RunManagerConfig, type RunStore, FileRunStore, RunQueue, EngineRunner, type EngineRunnerConfig, type RunExecutionHandle, type RunExecutor, type CustomToolEntry, RunApprovalBackend, createRunAskUserFn, type RunLifecycleHooks, CheckpointWriter, ArtifactTracker, RunLock, Heartbeat, NoopEvaluator, CompositeEvaluator, type Evaluator, type EvaluatorResult, type EvaluatorContext, type RunStatus, type RunSnapshot, type RunEvent, type RunCheckpoint, type RunApproval, type RunArtifactRef, type SubmitRunInput, type ResumeRunInput, type ListRunsQuery, type RunStreamEvent, type RunStreamCallback, type DetachFn, VALID_TRANSITIONS, createRunManager, type CreateRunManagerOptions, } from "./run/index.js";
|
|
65
|
-
export { defineProduct, type ProductDefinition, type ProductPreset, type ProductAdapter, type ProductContract, type CustomTool, type ProductRuntimeOptions, type ProductInstance, } from "./product/index.js";
|
|
66
|
-
export { logger } from "./logging/logger.js";
|
|
67
|
-
export { SettingsManager } from "./settings/manager.js";
|
|
68
|
-
export { SettingsSchema, validateSettings } from "./settings/schema.js";
|
|
1
|
+
export * from "@cjhyy/code-shell-core";
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from "@cjhyy/code-shell-core";
|
package/package.json
CHANGED
|
@@ -1,33 +1,39 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cjhyy/code-shell",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Code Shell —
|
|
3
|
+
"version": "0.5.0-rc.1",
|
|
4
|
+
"description": "Code Shell — meta package. Installs @cjhyy/code-shell-core and @cjhyy/code-shell-tui.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
|
-
"module": "./dist/index.js",
|
|
8
7
|
"types": "./dist/index.d.ts",
|
|
9
8
|
"exports": {
|
|
10
9
|
".": {
|
|
11
10
|
"types": "./dist/index.d.ts",
|
|
12
11
|
"import": "./dist/index.js"
|
|
13
|
-
}
|
|
14
|
-
"./run": {
|
|
15
|
-
"types": "./dist/run/index.d.ts",
|
|
16
|
-
"import": "./dist/run/index.js"
|
|
17
|
-
},
|
|
18
|
-
"./arena": {
|
|
19
|
-
"types": "./dist/arena/index.d.ts",
|
|
20
|
-
"import": "./dist/arena/index.js"
|
|
21
|
-
},
|
|
22
|
-
"./product": {
|
|
23
|
-
"types": "./dist/product/index.d.ts",
|
|
24
|
-
"import": "./dist/product/index.js"
|
|
25
|
-
},
|
|
26
|
-
"./package.json": "./package.json"
|
|
12
|
+
}
|
|
27
13
|
},
|
|
28
14
|
"bin": {
|
|
29
|
-
"code-shell": "dist/cli
|
|
15
|
+
"code-shell": "./dist/cli.js"
|
|
30
16
|
},
|
|
17
|
+
"scripts": {
|
|
18
|
+
"preinstall": "node scripts/check-node.cjs",
|
|
19
|
+
"build": "bun run --filter '@cjhyy/code-shell-core' build && bun run --filter '@cjhyy/code-shell-tui' build && bun run scripts/build-meta.ts",
|
|
20
|
+
"dev": "CODE_SHELL_DEV=1 CODESHELL_UI_PERF=1 bun run packages/tui/src/cli/main.ts",
|
|
21
|
+
"dev:bigtranscript": "bun run scripts/render-bigtranscript-dev.ts",
|
|
22
|
+
"test": "bun test",
|
|
23
|
+
"test:watch": "bun test --watch",
|
|
24
|
+
"bench:render": "bun run bench/render-tail.bench.ts && bun run bench/render-streaming.bench.ts && bun run bench/render-spinner.bench.ts && bun run bench/render-wheel.bench.ts",
|
|
25
|
+
"typecheck": "tsc --noEmit",
|
|
26
|
+
"lint": "eslint packages/",
|
|
27
|
+
"lint:engine-bypass": "bash scripts/check-no-engine-bypass.sh",
|
|
28
|
+
"format": "prettier --write 'packages/**/*.ts'"
|
|
29
|
+
},
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"@cjhyy/code-shell-core": "0.5.0-rc.1",
|
|
32
|
+
"@cjhyy/code-shell-tui": "0.5.0-rc.1"
|
|
33
|
+
},
|
|
34
|
+
"workspaces": [
|
|
35
|
+
"packages/*"
|
|
36
|
+
],
|
|
31
37
|
"repository": {
|
|
32
38
|
"type": "git",
|
|
33
39
|
"url": "git+https://github.com/cjhyy/codeshell.git"
|
|
@@ -39,22 +45,6 @@
|
|
|
39
45
|
"publishConfig": {
|
|
40
46
|
"access": "public"
|
|
41
47
|
},
|
|
42
|
-
"scripts": {
|
|
43
|
-
"preinstall": "node scripts/check-node.cjs",
|
|
44
|
-
"build": "bun run sync-models && bun run tsup && bun run build:dts",
|
|
45
|
-
"build:dts": "tsc --emitDeclarationOnly --declaration --outDir dist || true",
|
|
46
|
-
"sync-models": "bun run scripts/sync-models.ts",
|
|
47
|
-
"dev": "CODE_SHELL_DEV=1 CODESHELL_UI_PERF=1 bun run src/cli/main.ts",
|
|
48
|
-
"dev:bigtranscript": "bun run scripts/render-bigtranscript-dev.ts",
|
|
49
|
-
"test": "bun test",
|
|
50
|
-
"bench:render": "bun run bench/render-tail.bench.ts && bun run bench/render-streaming.bench.ts && bun run bench/render-spinner.bench.ts && bun run bench/render-wheel.bench.ts",
|
|
51
|
-
"test:watch": "bun test --watch",
|
|
52
|
-
"lint": "eslint src/",
|
|
53
|
-
"lint:engine-bypass": "bash scripts/check-no-engine-bypass.sh",
|
|
54
|
-
"format": "prettier --write 'src/**/*.ts'",
|
|
55
|
-
"typecheck": "bun run tsc --noEmit",
|
|
56
|
-
"prepublishOnly": "bun run build"
|
|
57
|
-
},
|
|
58
48
|
"engines": {
|
|
59
49
|
"node": ">=20.10"
|
|
60
50
|
},
|
|
@@ -77,45 +67,6 @@
|
|
|
77
67
|
],
|
|
78
68
|
"author": "maki maki",
|
|
79
69
|
"license": "MIT",
|
|
80
|
-
"dependencies": {
|
|
81
|
-
"@alcalzone/ansi-tokenize": "^0.3.0",
|
|
82
|
-
"@anthropic-ai/sdk": "^0.39.0",
|
|
83
|
-
"@modelcontextprotocol/sdk": "^1.12.1",
|
|
84
|
-
"asciichart": "^1.5.25",
|
|
85
|
-
"auto-bind": "^5.0.1",
|
|
86
|
-
"bidi-js": "^1.0.3",
|
|
87
|
-
"chalk": "^5.4.1",
|
|
88
|
-
"cli-boxes": "^4.0.1",
|
|
89
|
-
"cli-highlight": "^2.1.11",
|
|
90
|
-
"code-excerpt": "^4.0.0",
|
|
91
|
-
"commander": "^13.1.0",
|
|
92
|
-
"diff": "^8.0.4",
|
|
93
|
-
"emoji-regex": "^10.6.0",
|
|
94
|
-
"get-east-asian-width": "^1.5.0",
|
|
95
|
-
"glob": "^11.0.0",
|
|
96
|
-
"gpt-tokenizer": "^3.4.0",
|
|
97
|
-
"indent-string": "^5.0.0",
|
|
98
|
-
"lodash-es": "^4.17.23",
|
|
99
|
-
"marked": "^17.0.5",
|
|
100
|
-
"marked-terminal": "^7.3.0",
|
|
101
|
-
"nanoid": "^5.1.2",
|
|
102
|
-
"openai": "^4.82.0",
|
|
103
|
-
"ora": "^9.3.0",
|
|
104
|
-
"proper-lockfile": "^4.1.2",
|
|
105
|
-
"react": "^19.2.4",
|
|
106
|
-
"react-reconciler": "^0.33.0",
|
|
107
|
-
"semver": "^7.7.4",
|
|
108
|
-
"signal-exit": "^4.1.0",
|
|
109
|
-
"stack-utils": "^2.0.6",
|
|
110
|
-
"strip-ansi": "^7.2.0",
|
|
111
|
-
"supports-hyperlinks": "^4.4.0",
|
|
112
|
-
"type-fest": "^5.5.0",
|
|
113
|
-
"usehooks-ts": "^3.1.1",
|
|
114
|
-
"wrap-ansi": "^10.0.0",
|
|
115
|
-
"yaml": "^2.7.0",
|
|
116
|
-
"yoga-layout": "^3.2.1",
|
|
117
|
-
"zod": "^3.24.2"
|
|
118
|
-
},
|
|
119
70
|
"devDependencies": {
|
|
120
71
|
"@eslint/js": "^10.0.1",
|
|
121
72
|
"@types/lodash": "^4.17.24",
|
|
@@ -123,6 +74,7 @@
|
|
|
123
74
|
"@types/node": "^22.12.0",
|
|
124
75
|
"@types/react": "^19.2.14",
|
|
125
76
|
"@types/semver": "^7.7.1",
|
|
77
|
+
"bun-types": "^1.3.14",
|
|
126
78
|
"eslint": "^9.19.0",
|
|
127
79
|
"prettier": "^3.4.2",
|
|
128
80
|
"tsup": "^8.3.6",
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Agent coordinator — agent registry + message bus for multi-agent communication.
|
|
3
|
-
*/
|
|
4
|
-
/** A registered named agent. */
|
|
5
|
-
export interface AgentInfo {
|
|
6
|
-
id: string;
|
|
7
|
-
name: string;
|
|
8
|
-
status: "running" | "completed" | "failed";
|
|
9
|
-
description: string;
|
|
10
|
-
startedAt: number;
|
|
11
|
-
completedAt?: number;
|
|
12
|
-
result?: string;
|
|
13
|
-
}
|
|
14
|
-
/** A message between agents. */
|
|
15
|
-
export interface AgentMessage {
|
|
16
|
-
from: string;
|
|
17
|
-
to: string;
|
|
18
|
-
content: string;
|
|
19
|
-
timestamp: number;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Singleton agent registry and message bus.
|
|
23
|
-
*/
|
|
24
|
-
declare class AgentCoordinator {
|
|
25
|
-
private agents;
|
|
26
|
-
private inbox;
|
|
27
|
-
/** Register a named agent. */
|
|
28
|
-
register(id: string, name: string, description: string): void;
|
|
29
|
-
/** Mark an agent as completed. */
|
|
30
|
-
complete(name: string, result?: string): void;
|
|
31
|
-
/** Mark an agent as failed. */
|
|
32
|
-
fail(name: string): void;
|
|
33
|
-
/** Get agent info by name. */
|
|
34
|
-
get(name: string): AgentInfo | undefined;
|
|
35
|
-
/** List all agents. */
|
|
36
|
-
list(): AgentInfo[];
|
|
37
|
-
/** List active (running) agents. */
|
|
38
|
-
listActive(): AgentInfo[];
|
|
39
|
-
/** Send a message to a named agent. */
|
|
40
|
-
send(from: string, to: string, content: string): boolean;
|
|
41
|
-
/** Read messages for a named agent (drains the inbox). */
|
|
42
|
-
receive(name: string): AgentMessage[];
|
|
43
|
-
/** Peek at messages without draining. */
|
|
44
|
-
peek(name: string): AgentMessage[];
|
|
45
|
-
/** Reset all state. */
|
|
46
|
-
reset(): void;
|
|
47
|
-
}
|
|
48
|
-
export declare const agentCoordinator: AgentCoordinator;
|
|
49
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{a as AnthropicClient}from'./chunk-X2S7ASQ2.js';import'./chunk-O5HFCH2U.js';import'./chunk-OWBYLMDD.js';import'./chunk-FU7AHZNN.js';import'./chunk-DI26OUIU.js';import'./chunk-3QP5BQ3L.js';
|
package/dist/arena/arena.d.ts
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Arena — multi-model collaborative analysis engine.
|
|
3
|
-
*
|
|
4
|
-
* Evidence-Driven Pipeline:
|
|
5
|
-
* 0. Planner → understand what the user wants (mode, lenses, sources)
|
|
6
|
-
* 1. EvidenceProviders → collect artifacts from selected sources
|
|
7
|
-
* 2. Strategy + Lens → compose prompts (mode flow + perspective)
|
|
8
|
-
* 3. ToolSelector → determine which tools participants can use
|
|
9
|
-
* 4. ParticipantResearch → each model investigates independently (parallel)
|
|
10
|
-
* 4b. ClaimRegistry → register findings as claims, populate ledger
|
|
11
|
-
* 5. VerificationReview → claim-aware cross-review with evidence digests
|
|
12
|
-
* 7. DebateRounds → contested claims enter structured debate
|
|
13
|
-
* 8. Adjudication → moderator rules on contested claims
|
|
14
|
-
* 6. ConsensusBuilder → claim-aware structured consensus
|
|
15
|
-
*/
|
|
16
|
-
import type { ArenaConfig, ArenaResultV2 } from "./types.js";
|
|
17
|
-
import type { PlannerFlags } from "./planner.js";
|
|
18
|
-
export declare class Arena {
|
|
19
|
-
private config;
|
|
20
|
-
private strategy;
|
|
21
|
-
private limits;
|
|
22
|
-
constructor(config: ArenaConfig);
|
|
23
|
-
/**
|
|
24
|
-
* Run a full arena session.
|
|
25
|
-
*
|
|
26
|
-
* @param topic - User's topic/request (natural language)
|
|
27
|
-
* @param flags - Optional explicit overrides (mode, base, head)
|
|
28
|
-
*/
|
|
29
|
-
run(topic: string, flags?: PlannerFlags): Promise<ArenaResultV2>;
|
|
30
|
-
/**
|
|
31
|
-
* Planning path: merge-oriented review → roadmap consensus → detail expansion.
|
|
32
|
-
*
|
|
33
|
-
* Planning mode does NOT enter heavy debate/adjudication. Contested findings
|
|
34
|
-
* are converted to open questions or dependency risks in the roadmap.
|
|
35
|
-
*/
|
|
36
|
-
private runPlanningPath;
|
|
37
|
-
/**
|
|
38
|
-
* Review/Discussion path: verification review → debate → adjudication → consensus.
|
|
39
|
-
*
|
|
40
|
-
* This is the heavy trust loop for claim verification.
|
|
41
|
-
*/
|
|
42
|
-
private runReviewDiscussionPath;
|
|
43
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Context tools — read-only tools that arena participants can use
|
|
3
|
-
* to fetch additional source context during research.
|
|
4
|
-
*
|
|
5
|
-
* Security: All shell commands use execFileSync with argument arrays
|
|
6
|
-
* to prevent command injection. File paths are validated against the
|
|
7
|
-
* repository boundary to prevent path traversal.
|
|
8
|
-
*/
|
|
9
|
-
import type { ToolDefinition, ToolCall } from "../../types.js";
|
|
10
|
-
export declare const MAX_TOOL_RESULT = 15000;
|
|
11
|
-
export declare const MAX_TOOL_ROUNDS = 3;
|
|
12
|
-
export declare const CONTEXT_TOOLS: ToolDefinition[];
|
|
13
|
-
/**
|
|
14
|
-
* Execute a context tool call and return the result string.
|
|
15
|
-
*/
|
|
16
|
-
export declare function executeContextTool(tc: ToolCall): string;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Arena mode auto-detection — infer review/discussion/planning from topic text.
|
|
3
|
-
*
|
|
4
|
-
* Heuristic-based: uses keyword matching with weighted scoring.
|
|
5
|
-
* Falls back to "review" (safest default) when confidence is low.
|
|
6
|
-
*/
|
|
7
|
-
import type { ArenaMode } from "./types.js";
|
|
8
|
-
/** Result of heuristic mode detection */
|
|
9
|
-
export interface ArenaModeDetection {
|
|
10
|
-
mode: ArenaMode;
|
|
11
|
-
confidence: "high" | "low";
|
|
12
|
-
reason: string;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Auto-detect arena mode from the topic string.
|
|
16
|
-
*
|
|
17
|
-
* Returns the detected mode, confidence level, and a human-readable reason.
|
|
18
|
-
* When confidence is low, falls back to "review" (the safest default).
|
|
19
|
-
*/
|
|
20
|
-
export declare function detectArenaMode(topic: string): ArenaModeDetection;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* DigestBuilder — constructs RoundResearchDigest from the shared ledger.
|
|
3
|
-
*
|
|
4
|
-
* The digest is a filtered view injected into prompts to avoid
|
|
5
|
-
* token explosion from the full ledger. Program-built, not model-built.
|
|
6
|
-
*/
|
|
7
|
-
import type { ArenaLedger } from "./ledger.js";
|
|
8
|
-
import type { RoundResearchDigest } from "./types.js";
|
|
9
|
-
interface DigestOptions {
|
|
10
|
-
/** Current round number */
|
|
11
|
-
round: number;
|
|
12
|
-
/** Claim IDs relevant to this round (e.g. contested claims in debate) */
|
|
13
|
-
relevantClaimIds: string[];
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Build a digest from the shared ledger for a specific round.
|
|
17
|
-
* Only includes data relevant to the specified claims.
|
|
18
|
-
*/
|
|
19
|
-
export declare function buildDigest(ledger: ArenaLedger, options: DigestOptions): RoundResearchDigest;
|
|
20
|
-
/**
|
|
21
|
-
* Format a digest into a text block suitable for prompt injection.
|
|
22
|
-
* All LLM-originated text is sanitized before inclusion.
|
|
23
|
-
*/
|
|
24
|
-
export declare function formatDigest(digest: RoundResearchDigest): string;
|
|
25
|
-
export {};
|
package/dist/arena/index.d.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Arena — multi-model collaborative analysis (Evidence-Driven).
|
|
3
|
-
*/
|
|
4
|
-
export { Arena } from "./arena.js";
|
|
5
|
-
export { MODEL_PRESETS, getMaxOutputTokens } from "./model-presets.js";
|
|
6
|
-
export type { ModelPreset } from "./model-presets.js";
|
|
7
|
-
export { getStrategy, getStrategyForPlan, ReviewStrategy, DiscussionStrategy, PlanningStrategy } from "./strategies/index.js";
|
|
8
|
-
export { planArena } from "./planner.js";
|
|
9
|
-
export { collectEvidence } from "./providers/index.js";
|
|
10
|
-
export { selectTools, hasTools } from "./tools/selector.js";
|
|
11
|
-
export { getLens, resolveLenses, buildLensPrompt, LENS_NAMES } from "./lenses/index.js";
|
|
12
|
-
export { runParticipantResearch, runParticipantResearchWithDossiers } from "./phases/participant-research.js";
|
|
13
|
-
export type { ResearchResult } from "./phases/participant-research.js";
|
|
14
|
-
export { runCrossReview, runVerificationReview } from "./phases/cross-review.js";
|
|
15
|
-
export { runDebateRounds } from "./phases/debate-rounds.js";
|
|
16
|
-
export { runAdjudication } from "./phases/adjudication.js";
|
|
17
|
-
export { buildConsensus } from "./phases/build-consensus.js";
|
|
18
|
-
export { registerClaims, selectClaimsForReview } from "./phases/claim-registry.js";
|
|
19
|
-
export { ArenaLedger } from "./ledger.js";
|
|
20
|
-
export { buildDigest, formatDigest } from "./digest-builder.js";
|
|
21
|
-
export { transitionClaim, resolveClaimStatus, markUnderReview, applyReviewResult, markUnresolved, isTerminal, validTransitions, } from "./transitions.js";
|
|
22
|
-
export { formatArenaResult, printArenaResult, renderProgress, createProgressRenderer } from "./render/terminal.js";
|
|
23
|
-
export type { OutputSink } from "./render/terminal.js";
|
|
24
|
-
export { formatArenaResultForSession } from "./render/session.js";
|
|
25
|
-
export type { ArenaConfig, ArenaResultV2, ArenaStrategy, ArenaStrategyV2, ClaimStatusSummary, ArenaParticipant, ArenaBaseContext, ArenaFinding, FindingReview, ParticipantReport, ArenaConsensus, ArenaConsensusItem, ArenaRoadmapPhase, ArenaProgressEvent, ArenaMode, FindingKind, PeerVerdict, ArenaPlan, ArenaLens, ArenaLensName, ArenaLensRef, ArenaSourceKind, ArenaSourceSpec, ArenaSubject, ArenaOutputShape, ArenaArtifact, ArenaToolPack, ArenaContextProvider, ArenaQuickFact, ToolTrace, EvidencePacket, FindingEvidenceLink, ResearchDossier, ClaimStatus, ClaimRecord, ClaimChallenge, ClaimAdjudication, RequestedCheck, DebateRound, DebateTurn, TargetedCheckTask, SharedResearchLedger, RoundResearchDigest, ArenaExecutionLimits, } from "./types.js";
|
|
26
|
-
export { isStrategyV2 } from "./types.js";
|
|
27
|
-
export { IterativeArena } from "./iterate/index.js";
|
|
28
|
-
export { defaultConvergence as defaultIterateConvergence, diffRatio as iterateDiffRatio, codeFormat as iterateCodeFormat, documentFormat as iterateDocumentFormat, getFormat as getIterateFormat, } from "./iterate/index.js";
|
|
29
|
-
export type { AuthorRotation, CheckpointAction, CheckpointContext, CheckpointFn, ConvergenceSignal, Critique, CritiqueCategory, CritiqueEvidence, CritiqueSeverity, Draft, DraftCandidate, IterateConfig, IterateFormat, IterateProgressEvent, IterateResult, IterateSubject, Round, StoppedReason, FormatPack as IterateFormatPack, } from "./iterate/index.js";
|
package/dist/arena/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{j as IterativeArena,f as defaultIterateConvergence,i as getIterateFormat,g as iterateCodeFormat,e as iterateDiffRatio,h as iterateDocumentFormat}from'../chunk-K4HILJ6G.js';export{J as Arena,I as ArenaLedger,e as DiscussionStrategy,j as LENS_NAMES,S as MODEL_PRESETS,f as PlanningStrategy,d as ReviewStrategy,z as applyReviewResult,H as buildConsensus,u as buildDigest,i as buildLensPrompt,n as collectEvidence,W as createProgressRenderer,U as formatArenaResult,Y as formatArenaResultForSession,v as formatDigest,g as getLens,T as getMaxOutputTokens,k as getStrategy,l as getStrategyForPlan,p as hasTools,c as isStrategyV2,B as isTerminal,y as markUnderReview,A as markUnresolved,m as planArena,V as printArenaResult,s as registerClaims,X as renderProgress,x as resolveClaimStatus,h as resolveLenses,G as runAdjudication,D as runCrossReview,F as runDebateRounds,q as runParticipantResearch,r as runParticipantResearchWithDossiers,E as runVerificationReview,t as selectClaimsForReview,o as selectTools,w as transitionClaim,C as validTransitions}from'../chunk-WONQHE4P.js';import'../chunk-GKAQH2DG.js';import'../chunk-FU7AHZNN.js';import'../chunk-DI26OUIU.js';import'../chunk-3QP5BQ3L.js';
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Convergence detection — when has the draft stabilized enough to stop?
|
|
3
|
-
*/
|
|
4
|
-
import type { ConvergenceSignal, Critique, Draft } from "./types.js";
|
|
5
|
-
/**
|
|
6
|
-
* Cheap O(n) approximation of "how different is new vs old".
|
|
7
|
-
* Returns 0..1 where 0 = identical, 1 = completely different.
|
|
8
|
-
*
|
|
9
|
-
* Uses character-trigram Jaccard distance — fast, good enough for "is the
|
|
10
|
-
* author actually changing anything substantial?".
|
|
11
|
-
*/
|
|
12
|
-
export declare function diffRatio(a: string, b: string): number;
|
|
13
|
-
/**
|
|
14
|
-
* Default convergence rule:
|
|
15
|
-
* stop if blockers == 0 AND
|
|
16
|
-
* (all critiques are minor/nit/praise OR diff < 5% from last version)
|
|
17
|
-
*
|
|
18
|
-
* Round 1 never converges (need at least one revision pass).
|
|
19
|
-
*/
|
|
20
|
-
export declare function defaultConvergence(args: {
|
|
21
|
-
round: number;
|
|
22
|
-
critiques: Critique[];
|
|
23
|
-
draft: Draft;
|
|
24
|
-
previousDraft?: Draft;
|
|
25
|
-
}): ConvergenceSignal;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Format packs — prompt templates for code vs document iteration.
|
|
3
|
-
*
|
|
4
|
-
* Each format provides four prompt builders:
|
|
5
|
-
* - draftPrompt: used in tournament v1 (every participant writes a candidate)
|
|
6
|
-
* - mergePrompt: used in v1 merge (author reads anonymized candidates → v1)
|
|
7
|
-
* - argueSystem: system prompt for critics
|
|
8
|
-
* - argueUser: user prompt that wraps the current draft for critique
|
|
9
|
-
* - revisePrompt: used to produce v(N+1) given v(N) + critiques
|
|
10
|
-
*/
|
|
11
|
-
import type { Critique, Draft, DraftCandidate, IterateFormat, IterateSubject } from "../types.js";
|
|
12
|
-
export interface FormatPack {
|
|
13
|
-
format: IterateFormat;
|
|
14
|
-
draftPrompt(subject: IterateSubject, minLength: number): string;
|
|
15
|
-
mergePrompt(subject: IterateSubject, candidates: DraftCandidate[], minLength: number): string;
|
|
16
|
-
argueSystem(format: IterateFormat): string;
|
|
17
|
-
argueUser(subject: IterateSubject, draft: Draft, lens?: string): string;
|
|
18
|
-
revisePrompt(subject: IterateSubject, previous: Draft, critiques: Critique[], minLength: number): string;
|
|
19
|
-
}
|
|
20
|
-
export declare const codeFormat: FormatPack;
|
|
21
|
-
export declare const documentFormat: FormatPack;
|
|
22
|
-
export declare function getFormat(format: IterateFormat): FormatPack;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Arena Iterate — multi-model authoring loop.
|
|
3
|
-
*
|
|
4
|
-
* Public API for the iterate mode.
|
|
5
|
-
*/
|
|
6
|
-
export { IterativeArena } from "./iterative-arena.js";
|
|
7
|
-
export { defaultConvergence, diffRatio } from "./convergence.js";
|
|
8
|
-
export { codeFormat, documentFormat, getFormat } from "./formats/index.js";
|
|
9
|
-
export type { FormatPack } from "./formats/index.js";
|
|
10
|
-
export type { AuthorRotation, CheckpointAction, CheckpointContext, CheckpointFn, ConvergenceSignal, Critique, CritiqueCategory, CritiqueEvidence, CritiqueSeverity, Draft, DraftCandidate, IterateConfig, IterateFormat, IterateProgressEvent, IterateResult, IterateSubject, Round, StoppedReason, } from "./types.js";
|
|
11
|
-
export { ITERATE_WEB_TOOLS, hasWebSearchProvider } from "./tools/web-tools.js";
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* IterativeArena — multi-model authoring loop.
|
|
3
|
-
*
|
|
4
|
-
* Pipeline:
|
|
5
|
-
* 1. v1: tournament (default) or single-author
|
|
6
|
-
* 2. for each round 2..maxRounds:
|
|
7
|
-
* a. argue (parallel critics)
|
|
8
|
-
* b. checkpoint (optional human pause)
|
|
9
|
-
* c. convergence check
|
|
10
|
-
* d. if not converged: revise → next round
|
|
11
|
-
* 3. final draft = last round's draft
|
|
12
|
-
*/
|
|
13
|
-
import type { IterateConfig, IterateResult } from "./types.js";
|
|
14
|
-
export declare class IterativeArena {
|
|
15
|
-
private readonly config;
|
|
16
|
-
constructor(config: IterateConfig);
|
|
17
|
-
run(): Promise<IterateResult>;
|
|
18
|
-
/** Critics for a given round = pool minus current author (so author isn't critiquing self). */
|
|
19
|
-
private criticsForRound;
|
|
20
|
-
private checkConvergence;
|
|
21
|
-
private pickNextAuthor;
|
|
22
|
-
private finalize;
|
|
23
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Parsing helpers for LLM responses in iterate mode.
|
|
3
|
-
*
|
|
4
|
-
* We use literal XML-ish markers (<v1_content>…</v1_content>) instead of
|
|
5
|
-
* pure JSON because LLMs are far more reliable at "write 5000 chars of
|
|
6
|
-
* markdown then a small JSON block at the end" than at producing one
|
|
7
|
-
* giant well-formed JSON document with a 5000-char string field.
|
|
8
|
-
*/
|
|
9
|
-
import type { Critique } from "./types.js";
|
|
10
|
-
/**
|
|
11
|
-
* Extract content between `<tag>` and `</tag>`.
|
|
12
|
-
*
|
|
13
|
-
* Forgiving in two ways:
|
|
14
|
-
* - Case-insensitive on the tag name.
|
|
15
|
-
* - If the closing tag is missing (LLM hit max_tokens mid-output), we still
|
|
16
|
-
* return everything after the opening tag, stopping at the next sibling
|
|
17
|
-
* tag (e.g. the `<merge_rationale>` block) if present, otherwise EOF.
|
|
18
|
-
*/
|
|
19
|
-
export declare function extractTag(text: string, tag: string): string | null;
|
|
20
|
-
/** Parse merge response: extract v1 content + rationale. Falls back to whole text if markers are missing. */
|
|
21
|
-
export declare function parseMergeResponse(text: string): {
|
|
22
|
-
content: string;
|
|
23
|
-
rationale?: string;
|
|
24
|
-
};
|
|
25
|
-
export interface ReviseMeta {
|
|
26
|
-
acceptedCritiques?: string[];
|
|
27
|
-
rejectedCritiques?: Array<{
|
|
28
|
-
id: string;
|
|
29
|
-
reason: string;
|
|
30
|
-
}>;
|
|
31
|
-
changelog?: string;
|
|
32
|
-
}
|
|
33
|
-
/** Parse revise response: extract content + meta JSON. */
|
|
34
|
-
export declare function parseReviseResponse(text: string): {
|
|
35
|
-
content: string;
|
|
36
|
-
meta: ReviseMeta;
|
|
37
|
-
};
|
|
38
|
-
/**
|
|
39
|
-
* Parse critique JSON from an argue-phase response.
|
|
40
|
-
* Tolerant: handles bare objects, fenced JSON, leading prose, trailing prose.
|
|
41
|
-
*/
|
|
42
|
-
export declare function parseCritiquesResponse(text: string, criticName: string, idPrefix: string): Critique[];
|