@cjhyy/code-shell 0.1.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +109 -0
- package/LICENSE +21 -0
- package/README.md +177 -0
- package/dist/agent/coordinator.d.ts +49 -0
- package/dist/anthropic-NENYS535.js +9 -0
- package/dist/anthropic-XMTTVNSH.cjs +9 -0
- package/dist/arena/arena.d.ts +43 -0
- package/dist/arena/context/context-tools.d.ts +16 -0
- package/dist/arena/detect-mode.d.ts +20 -0
- package/dist/arena/digest-builder.d.ts +25 -0
- package/dist/arena/index.cjs +103 -0
- package/dist/arena/index.d.ts +29 -0
- package/dist/arena/index.js +103 -0
- package/dist/arena/iterate/convergence.d.ts +25 -0
- package/dist/arena/iterate/formats/index.d.ts +22 -0
- package/dist/arena/iterate/index.d.ts +11 -0
- package/dist/arena/iterate/iterative-arena.d.ts +23 -0
- package/dist/arena/iterate/parse.d.ts +42 -0
- package/dist/arena/iterate/phases/argue.d.ts +22 -0
- package/dist/arena/iterate/phases/revise.d.ts +16 -0
- package/dist/arena/iterate/phases/tournament.d.ts +34 -0
- package/dist/arena/iterate/tools/web-tools.d.ts +13 -0
- package/dist/arena/iterate/types.d.ts +152 -0
- package/dist/arena/ledger.d.ts +47 -0
- package/dist/arena/lenses/architecture.d.ts +5 -0
- package/dist/arena/lenses/engineering.d.ts +5 -0
- package/dist/arena/lenses/general.d.ts +5 -0
- package/dist/arena/lenses/index.d.ts +16 -0
- package/dist/arena/lenses/product.d.ts +5 -0
- package/dist/arena/model-presets.d.ts +14 -0
- package/dist/arena/phases/adjudication.d.ts +24 -0
- package/dist/arena/phases/build-consensus.d.ts +29 -0
- package/dist/arena/phases/claim-registry.d.ts +26 -0
- package/dist/arena/phases/cross-review.d.ts +45 -0
- package/dist/arena/phases/debate-rounds.d.ts +27 -0
- package/dist/arena/phases/participant-research.d.ts +38 -0
- package/dist/arena/phases/planning-detail-expansion.d.ts +38 -0
- package/dist/arena/planner.d.ts +27 -0
- package/dist/arena/providers/docs.d.ts +6 -0
- package/dist/arena/providers/git.d.ts +8 -0
- package/dist/arena/providers/index.d.ts +16 -0
- package/dist/arena/providers/none.d.ts +7 -0
- package/dist/arena/providers/repo.d.ts +6 -0
- package/dist/arena/render/session.d.ts +17 -0
- package/dist/arena/render/terminal.d.ts +33 -0
- package/dist/arena/strategies/discussion.d.ts +25 -0
- package/dist/arena/strategies/index.d.ts +15 -0
- package/dist/arena/strategies/language-wrapper.d.ts +17 -0
- package/dist/arena/strategies/lens-wrapper.d.ts +16 -0
- package/dist/arena/strategies/planning.d.ts +30 -0
- package/dist/arena/strategies/review.d.ts +26 -0
- package/dist/arena/strategies/utils.d.ts +34 -0
- package/dist/arena/tools/selector.d.ts +17 -0
- package/dist/arena/transitions.d.ts +48 -0
- package/dist/arena/types.d.ts +499 -0
- package/dist/arena-46QQ6BZQ.js +261 -0
- package/dist/arena-HZZZ2GJH.cjs +261 -0
- package/dist/bootstrap/setup.d.ts +14 -0
- package/dist/bootstrap/state.d.ts +160 -0
- package/dist/bridge-4ZRXVWBN.js +98 -0
- package/dist/bridge-W476QDFH.cjs +98 -0
- package/dist/chunk-3EAEC566.cjs +136 -0
- package/dist/chunk-3EUDE77E.cjs +1252 -0
- package/dist/chunk-3QR52LL5.cjs +105 -0
- package/dist/chunk-4PKZPFCD.js +136 -0
- package/dist/chunk-4RRUP4MM.js +86 -0
- package/dist/chunk-4SFPFHMG.js +132 -0
- package/dist/chunk-5LHVI777.cjs +246 -0
- package/dist/chunk-6JOOLG6F.js +104 -0
- package/dist/chunk-6ZIROYXX.js +207 -0
- package/dist/chunk-7RMAR2Y3.js +6511 -0
- package/dist/chunk-BE6IPRDM.js +224 -0
- package/dist/chunk-BHGIJ2DJ.js +41 -0
- package/dist/chunk-BMH65OVB.cjs +224 -0
- package/dist/chunk-C7JBCO5V.js +80 -0
- package/dist/chunk-CSO5EOEP.cjs +132 -0
- package/dist/chunk-DI7RDLOS.js +47 -0
- package/dist/chunk-DICG4AB7.cjs +73 -0
- package/dist/chunk-EL2RL5DG.cjs +101 -0
- package/dist/chunk-FGZGCFJX.cjs +207 -0
- package/dist/chunk-FUOKLKR2.js +101 -0
- package/dist/chunk-FVP7XJGS.cjs +4577 -0
- package/dist/chunk-HD7MT5XU.cjs +86 -0
- package/dist/chunk-IJSHQGMP.cjs +45 -0
- package/dist/chunk-IMMTBZ33.cjs +63 -0
- package/dist/chunk-J5XW6UYL.js +291 -0
- package/dist/chunk-JT2WSQSR.cjs +335 -0
- package/dist/chunk-KO2FPF7G.js +93 -0
- package/dist/chunk-LRAY5IYC.cjs +291 -0
- package/dist/chunk-NG73UR3L.cjs +285 -0
- package/dist/chunk-NZ4DQ72D.cjs +664 -0
- package/dist/chunk-O6F2EF2Z.js +73 -0
- package/dist/chunk-OG4MIQJ6.js +335 -0
- package/dist/chunk-QHDYFC5U.cjs +6511 -0
- package/dist/chunk-R32DJSJE.cjs +41 -0
- package/dist/chunk-S74VVJBF.js +285 -0
- package/dist/chunk-SK62UVS6.js +105 -0
- package/dist/chunk-SQZHPD3S.js +4577 -0
- package/dist/chunk-UK2SU23S.cjs +93 -0
- package/dist/chunk-VKGNCYRL.js +258 -0
- package/dist/chunk-WFQF3RT4.cjs +104 -0
- package/dist/chunk-WHRTARDJ.cjs +258 -0
- package/dist/chunk-WRZJUQ5Z.js +664 -0
- package/dist/chunk-X4HAERTQ.js +63 -0
- package/dist/chunk-XHC2JMEC.cjs +80 -0
- package/dist/chunk-YZ25SSWJ.js +222 -0
- package/dist/chunk-ZJV3YSY3.cjs +222 -0
- package/dist/chunk-ZRSSGYA5.js +246 -0
- package/dist/chunk-ZXYDDJEJ.js +1252 -0
- package/dist/cli/commands/arena.d.ts +29 -0
- package/dist/cli/commands/builtin/advanced-commands.d.ts +5 -0
- package/dist/cli/commands/builtin/core-commands.d.ts +5 -0
- package/dist/cli/commands/builtin/extra-commands.d.ts +6 -0
- package/dist/cli/commands/builtin/git-commands.d.ts +5 -0
- package/dist/cli/commands/builtin/more-commands.d.ts +7 -0
- package/dist/cli/commands/builtin/permissions-command.d.ts +5 -0
- package/dist/cli/commands/builtin/utility-commands.d.ts +5 -0
- package/dist/cli/commands/registry.d.ts +64 -0
- package/dist/cli/commands/repl.d.ts +21 -0
- package/dist/cli/commands/run.d.ts +21 -0
- package/dist/cli/commands/runs.d.ts +14 -0
- package/dist/cli/cost-tracker.d.ts +57 -0
- package/dist/cli/exit.d.ts +12 -0
- package/dist/cli/input/ndjson-reader.d.ts +31 -0
- package/dist/cli/input-compiler.d.ts +5 -0
- package/dist/cli/main.cjs +19674 -0
- package/dist/cli/main.d.ts +5 -0
- package/dist/cli/main.js +19674 -0
- package/dist/cli/onboarding.d.ts +26 -0
- package/dist/cli/output/renderer.d.ts +28 -0
- package/dist/cli/output/terminal-ui.d.ts +50 -0
- package/dist/cli/updater.d.ts +10 -0
- package/dist/compaction-44I55TLI.cjs +32 -0
- package/dist/compaction-CCHWA4G6.js +32 -0
- package/dist/context/compaction.d.ts +83 -0
- package/dist/context/manager.d.ts +99 -0
- package/dist/context/token-counter.d.ts +27 -0
- package/dist/coordinator-5HY7ALO2.js +7 -0
- package/dist/coordinator-INDLPVMF.cjs +7 -0
- package/dist/cost-tracker-IWYAUPXH.js +9 -0
- package/dist/cost-tracker-JXTJQQWE.cjs +9 -0
- package/dist/cron/scheduler.d.ts +34 -0
- package/dist/devtools-KIY3LWQJ.js +6 -0
- package/dist/devtools-LRP47DDV.cjs +6 -0
- package/dist/engine/cost-store.d.ts +22 -0
- package/dist/engine/engine.d.ts +101 -0
- package/dist/engine/model-facade.d.ts +24 -0
- package/dist/engine/query.d.ts +50 -0
- package/dist/engine/streaming-tool-queue.d.ts +34 -0
- package/dist/engine/token-budget.d.ts +22 -0
- package/dist/engine/tool-summary.d.ts +13 -0
- package/dist/engine/turn-loop.d.ts +62 -0
- package/dist/engine/turn-state.d.ts +14 -0
- package/dist/exceptions.d.ts +44 -0
- package/dist/file-history-HZWO2WQ5.js +7 -0
- package/dist/file-history-UQQILIY7.cjs +7 -0
- package/dist/git/utils.d.ts +35 -0
- package/dist/git/worktree.d.ts +36 -0
- package/dist/hooks/events.d.ts +35 -0
- package/dist/hooks/registry.d.ts +15 -0
- package/dist/index.cjs +336 -0
- package/dist/index.d.ts +64 -0
- package/dist/index.js +336 -0
- package/dist/ink/Ansi.d.ts +10 -0
- package/dist/ink/bidi.d.ts +15 -0
- package/dist/ink/clearTerminal.d.ts +13 -0
- package/dist/ink/colorize.d.ts +16 -0
- package/dist/ink/components/AlternateScreen.d.ts +21 -0
- package/dist/ink/components/App.d.ts +70 -0
- package/dist/ink/components/AppContext.d.ts +11 -0
- package/dist/ink/components/Box.d.ts +49 -0
- package/dist/ink/components/Button.d.ts +36 -0
- package/dist/ink/components/ClockContext.d.ts +9 -0
- package/dist/ink/components/CursorDeclarationContext.d.ts +22 -0
- package/dist/ink/components/ErrorOverview.d.ts +5 -0
- package/dist/ink/components/Link.d.ts +7 -0
- package/dist/ink/components/Newline.d.ts +12 -0
- package/dist/ink/components/NoSelect.d.ts +19 -0
- package/dist/ink/components/RawAnsi.d.ts +16 -0
- package/dist/ink/components/ScrollBox.d.ts +78 -0
- package/dist/ink/components/Spacer.d.ts +5 -0
- package/dist/ink/components/StdinContext.d.ts +27 -0
- package/dist/ink/components/TerminalFocusContext.d.ts +10 -0
- package/dist/ink/components/TerminalSizeContext.d.ts +5 -0
- package/dist/ink/components/Text.d.ts +55 -0
- package/dist/ink/constants.d.ts +1 -0
- package/dist/ink/cursor.d.ts +8 -0
- package/dist/ink/devtools.d.ts +5 -0
- package/dist/ink/dom.d.ts +76 -0
- package/dist/ink/events/click-event.d.ts +31 -0
- package/dist/ink/events/dispatcher.d.ts +40 -0
- package/dist/ink/events/emitter.d.ts +5 -0
- package/dist/ink/events/event-handlers.d.ts +46 -0
- package/dist/ink/events/event.d.ts +5 -0
- package/dist/ink/events/focus-event.d.ts +13 -0
- package/dist/ink/events/input-event.d.ts +30 -0
- package/dist/ink/events/keyboard-event.d.ts +19 -0
- package/dist/ink/events/paste-event.d.ts +8 -0
- package/dist/ink/events/resize-event.d.ts +9 -0
- package/dist/ink/events/terminal-event.d.ts +54 -0
- package/dist/ink/events/terminal-focus-event.d.ts +13 -0
- package/dist/ink/focus.d.ts +43 -0
- package/dist/ink/frame.d.ts +94 -0
- package/dist/ink/get-max-width.d.ts +17 -0
- package/dist/ink/hit-test.d.ts +33 -0
- package/dist/ink/hooks/use-animation-frame.d.ts +26 -0
- package/dist/ink/hooks/use-app.d.ts +5 -0
- package/dist/ink/hooks/use-declared-cursor.d.ts +26 -0
- package/dist/ink/hooks/use-input.d.ts +37 -0
- package/dist/ink/hooks/use-interval.d.ts +18 -0
- package/dist/ink/hooks/use-search-highlight.d.ts +30 -0
- package/dist/ink/hooks/use-selection.d.ts +39 -0
- package/dist/ink/hooks/use-stdin.d.ts +5 -0
- package/dist/ink/hooks/use-tab-status.d.ts +13 -0
- package/dist/ink/hooks/use-terminal-focus.d.ts +10 -0
- package/dist/ink/hooks/use-terminal-title.d.ts +12 -0
- package/dist/ink/hooks/use-terminal-viewport.d.ts +29 -0
- package/dist/ink/index.d.ts +20 -0
- package/dist/ink/ink.d.ts +369 -0
- package/dist/ink/instances.d.ts +3 -0
- package/dist/ink/layout/engine.d.ts +2 -0
- package/dist/ink/layout/geometry.d.ts +30 -0
- package/dist/ink/layout/node.d.ts +125 -0
- package/dist/ink/layout/yoga.d.ts +56 -0
- package/dist/ink/line-width-cache.d.ts +1 -0
- package/dist/ink/log-update.d.ts +17 -0
- package/dist/ink/measure-element.d.ts +16 -0
- package/dist/ink/measure-text.d.ts +6 -0
- package/dist/ink/node-cache.d.ts +20 -0
- package/dist/ink/optimizer.d.ts +15 -0
- package/dist/ink/output.d.ts +119 -0
- package/dist/ink/parse-keypress.d.ts +111 -0
- package/dist/ink/reconciler.d.ts +11 -0
- package/dist/ink/render-border.d.ts +24 -0
- package/dist/ink/render-node-to-output.d.ts +45 -0
- package/dist/ink/render-to-screen.d.ts +46 -0
- package/dist/ink/renderer.d.ts +14 -0
- package/dist/ink/root.d.ts +74 -0
- package/dist/ink/screen.d.ts +269 -0
- package/dist/ink/searchHighlight.d.ts +20 -0
- package/dist/ink/selection.d.ts +229 -0
- package/dist/ink/squash-text-nodes.d.ts +22 -0
- package/dist/ink/stringWidth.d.ts +1 -0
- package/dist/ink/styles.d.ts +306 -0
- package/dist/ink/supports-hyperlinks.d.ts +13 -0
- package/dist/ink/tabstops.d.ts +1 -0
- package/dist/ink/terminal-focus-state.d.ts +6 -0
- package/dist/ink/terminal-querier.d.ts +129 -0
- package/dist/ink/terminal.d.ts +46 -0
- package/dist/ink/termio/ansi.d.ts +65 -0
- package/dist/ink/termio/csi.d.ts +165 -0
- package/dist/ink/termio/dec.d.ts +37 -0
- package/dist/ink/termio/esc.d.ts +12 -0
- package/dist/ink/termio/osc.d.ts +173 -0
- package/dist/ink/termio/parser.d.ts +35 -0
- package/dist/ink/termio/sgr.d.ts +8 -0
- package/dist/ink/termio/tokenize.d.ts +45 -0
- package/dist/ink/termio/types.d.ts +190 -0
- package/dist/ink/termio.d.ts +24 -0
- package/dist/ink/useTerminalNotification.d.ts +28 -0
- package/dist/ink/warn.d.ts +1 -0
- package/dist/ink/widest-line.d.ts +1 -0
- package/dist/ink/wrap-text.d.ts +2 -0
- package/dist/ink/wrapAnsi.d.ts +7 -0
- package/dist/llm/client-base.d.ts +22 -0
- package/dist/llm/client-factory.d.ts +10 -0
- package/dist/llm/model-pool.d.ts +60 -0
- package/dist/llm/providers/anthropic.d.ts +19 -0
- package/dist/llm/providers/openai.d.ts +19 -0
- package/dist/llm/types.d.ts +21 -0
- package/dist/loader-DXFSUB4R.cjs +91 -0
- package/dist/loader-J5UID6CV.js +91 -0
- package/dist/logging/logger.d.ts +19 -0
- package/dist/lsp/client.d.ts +41 -0
- package/dist/lsp/manager.d.ts +40 -0
- package/dist/lsp/servers.d.ts +16 -0
- package/dist/manager-ETWDOCHN.cjs +9 -0
- package/dist/manager-HGMQNEJB.cjs +11 -0
- package/dist/manager-HUAQOORS.js +9 -0
- package/dist/manager-VJIZ2CQC.js +11 -0
- package/dist/mcp-manager-G4G2QASE.cjs +8 -0
- package/dist/mcp-manager-OKXHHWYR.js +8 -0
- package/dist/memory-AP747G5H.js +7 -0
- package/dist/memory-BH3BYUN5.cjs +7 -0
- package/dist/native-ts/yoga-layout/enums.d.ts +117 -0
- package/dist/native-ts/yoga-layout/index.d.ts +270 -0
- package/dist/onboarding-6WEPV7C2.js +11 -0
- package/dist/onboarding-QM5DY2TU.cjs +11 -0
- package/dist/openai-5HQGBL4L.js +9 -0
- package/dist/openai-656VWUQW.cjs +9 -0
- package/dist/plugins/loader.d.ts +72 -0
- package/dist/plugins/types.d.ts +4 -0
- package/dist/preset/index.d.ts +60 -0
- package/dist/product/define.d.ts +60 -0
- package/dist/product/index.cjs +23 -0
- package/dist/product/index.d.ts +5 -0
- package/dist/product/index.js +23 -0
- package/dist/product/types.d.ts +116 -0
- package/dist/prompt/composer.d.ts +42 -0
- package/dist/prompt/instruction-scanner.d.ts +54 -0
- package/dist/prompt/section-cache.d.ts +15 -0
- package/dist/prompt/section-loader.d.ts +26 -0
- package/dist/protocol/client.d.ts +64 -0
- package/dist/protocol/index.d.ts +4 -0
- package/dist/protocol/server.d.ts +49 -0
- package/dist/protocol/transport.d.ts +36 -0
- package/dist/protocol/types.d.ts +150 -0
- package/dist/react-compiler-runtime-shim.d.ts +1 -0
- package/dist/remote/bridge.d.ts +37 -0
- package/dist/run/ArtifactTracker.d.ts +38 -0
- package/dist/run/CheckpointWriter.d.ts +53 -0
- package/dist/run/EngineRunner.d.ts +70 -0
- package/dist/run/Evaluator.d.ts +56 -0
- package/dist/run/FileRunStore.d.ts +39 -0
- package/dist/run/Heartbeat.d.ts +54 -0
- package/dist/run/RunApprovalBackend.d.ts +53 -0
- package/dist/run/RunLock.d.ts +40 -0
- package/dist/run/RunManager.d.ts +76 -0
- package/dist/run/RunQueue.d.ts +27 -0
- package/dist/run/RunStore.d.ts +25 -0
- package/dist/run/factory.d.ts +57 -0
- package/dist/run/index.cjs +50 -0
- package/dist/run/index.d.ts +17 -0
- package/dist/run/index.js +50 -0
- package/dist/run/types.d.ts +136 -0
- package/dist/services/analytics.d.ts +29 -0
- package/dist/services/auto-dream.d.ts +35 -0
- package/dist/services/compact.d.ts +56 -0
- package/dist/services/diagnostics.d.ts +41 -0
- package/dist/services/extract-memories.d.ts +27 -0
- package/dist/services/index.d.ts +11 -0
- package/dist/services/notifier.d.ts +25 -0
- package/dist/services/oauth.d.ts +27 -0
- package/dist/services/session-memory.d.ts +37 -0
- package/dist/session/file-history.d.ts +41 -0
- package/dist/session/memory.d.ts +45 -0
- package/dist/session/session-manager.d.ts +23 -0
- package/dist/session/transcript.d.ts +39 -0
- package/dist/session-manager-JIIBCFTC.js +8 -0
- package/dist/session-manager-UQKB564H.cjs +8 -0
- package/dist/settings/manager.d.ts +27 -0
- package/dist/settings/schema.d.ts +676 -0
- package/dist/skills/index.d.ts +7 -0
- package/dist/skills/matcher.d.ts +21 -0
- package/dist/skills/scanner.d.ts +30 -0
- package/dist/skills-63RBYQRX.js +13 -0
- package/dist/skills-V3BPLW3D.cjs +13 -0
- package/dist/token-counter-CHAXW5O7.cjs +13 -0
- package/dist/token-counter-DSOZGZ5Q.js +13 -0
- package/dist/tool-summary-5P2GKRA4.cjs +31 -0
- package/dist/tool-summary-J2ICNMWP.js +31 -0
- package/dist/tool-system/builtin/agent.d.ts +35 -0
- package/dist/tool-system/builtin/arena.d.ts +18 -0
- package/dist/tool-system/builtin/ask-user.d.ts +12 -0
- package/dist/tool-system/builtin/bash.d.ts +6 -0
- package/dist/tool-system/builtin/brief.d.ts +6 -0
- package/dist/tool-system/builtin/config.d.ts +6 -0
- package/dist/tool-system/builtin/cron.d.ts +10 -0
- package/dist/tool-system/builtin/edit.d.ts +6 -0
- package/dist/tool-system/builtin/file-cache.d.ts +11 -0
- package/dist/tool-system/builtin/glob.d.ts +6 -0
- package/dist/tool-system/builtin/grep.d.ts +6 -0
- package/dist/tool-system/builtin/index.d.ts +10 -0
- package/dist/tool-system/builtin/lsp.d.ts +6 -0
- package/dist/tool-system/builtin/mcp-tools.d.ts +10 -0
- package/dist/tool-system/builtin/notebook-edit.d.ts +6 -0
- package/dist/tool-system/builtin/plan.d.ts +18 -0
- package/dist/tool-system/builtin/powershell.d.ts +6 -0
- package/dist/tool-system/builtin/read.d.ts +6 -0
- package/dist/tool-system/builtin/remote-trigger.d.ts +6 -0
- package/dist/tool-system/builtin/repl.d.ts +6 -0
- package/dist/tool-system/builtin/send-message.d.ts +6 -0
- package/dist/tool-system/builtin/skill.d.ts +6 -0
- package/dist/tool-system/builtin/sleep.d.ts +6 -0
- package/dist/tool-system/builtin/task.d.ts +51 -0
- package/dist/tool-system/builtin/tool-search.d.ts +12 -0
- package/dist/tool-system/builtin/web-fetch.d.ts +6 -0
- package/dist/tool-system/builtin/web-search.d.ts +6 -0
- package/dist/tool-system/builtin/worktree.d.ts +10 -0
- package/dist/tool-system/builtin/write.d.ts +6 -0
- package/dist/tool-system/executor.d.ts +25 -0
- package/dist/tool-system/mcp-manager.d.ts +50 -0
- package/dist/tool-system/permission.d.ts +69 -0
- package/dist/tool-system/registry.d.ts +24 -0
- package/dist/tool-system/validation.d.ts +5 -0
- package/dist/types.d.ts +260 -0
- package/dist/ui/App.d.ts +14 -0
- package/dist/ui/components/AgentBlock.d.ts +32 -0
- package/dist/ui/components/BabyHand.d.ts +1 -0
- package/dist/ui/components/Banner.d.ts +8 -0
- package/dist/ui/components/CodeBlock.d.ts +7 -0
- package/dist/ui/components/CommandInput.d.ts +13 -0
- package/dist/ui/components/ContextUsageBar.d.ts +7 -0
- package/dist/ui/components/DiffView.d.ts +6 -0
- package/dist/ui/components/DogLogo.d.ts +1 -0
- package/dist/ui/components/FullscreenLayout.d.ts +51 -0
- package/dist/ui/components/KunHead.d.ts +1 -0
- package/dist/ui/components/KunLogo.d.ts +1 -0
- package/dist/ui/components/MessageContent.d.ts +22 -0
- package/dist/ui/components/PermissionDialog.d.ts +8 -0
- package/dist/ui/components/PermissionPrompt.d.ts +8 -0
- package/dist/ui/components/ScrollView.d.ts +34 -0
- package/dist/ui/components/Spinner.d.ts +8 -0
- package/dist/ui/components/SpinnerWithVerb.d.ts +13 -0
- package/dist/ui/components/StatusLine.d.ts +22 -0
- package/dist/ui/components/StructuredDiff.d.ts +8 -0
- package/dist/ui/components/TaskList.d.ts +6 -0
- package/dist/ui/components/TextInput.d.ts +9 -0
- package/dist/ui/components/ThemedBox.d.ts +19 -0
- package/dist/ui/components/ThemedText.d.ts +26 -0
- package/dist/ui/components/ToolCall.d.ts +21 -0
- package/dist/ui/components/VirtualMessageList.d.ts +24 -0
- package/dist/ui/hooks/useCostSummary.d.ts +1 -0
- package/dist/ui/index.d.ts +12 -0
- package/dist/ui/input-history.d.ts +61 -0
- package/dist/ui/store.d.ts +82 -0
- package/dist/ui/terminal-renderer.d.ts +45 -0
- package/dist/ui/theme.d.ts +36 -0
- package/dist/ui/vim-mode.d.ts +25 -0
- package/dist/updater-AVD4LKTQ.js +183 -0
- package/dist/updater-URVNPDPW.cjs +183 -0
- package/dist/utils/debug.d.ts +57 -0
- package/dist/utils/earlyInput.d.ts +43 -0
- package/dist/utils/env.d.ts +24 -0
- package/dist/utils/envUtils.d.ts +51 -0
- package/dist/utils/execFileNoThrow.d.ts +39 -0
- package/dist/utils/format.d.ts +44 -0
- package/dist/utils/fullscreen.d.ts +47 -0
- package/dist/utils/intl.d.ts +22 -0
- package/dist/utils/lockfile.d.ts +15 -0
- package/dist/utils/log.d.ts +56 -0
- package/dist/utils/semver.d.ts +5 -0
- package/dist/utils/sliceAnsi.d.ts +12 -0
- package/dist/utils/systemTheme.d.ts +40 -0
- package/dist/utils/theme.d.ts +91 -0
- package/dist/utils/toolDisplay.d.ts +31 -0
- package/dist/utils/truncate.d.ts +40 -0
- package/dist/voice/index.d.ts +35 -0
- package/dist/voice-KTZ7PAGO.js +80 -0
- package/dist/voice-KZE25GKB.cjs +80 -0
- package/package.json +130 -0
|
@@ -0,0 +1,499 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Arena types — multi-model review, discussion, and planning.
|
|
3
|
+
*
|
|
4
|
+
* V2 architecture: shared facts → independent research → findings → cross-review → consensus.
|
|
5
|
+
*/
|
|
6
|
+
import type { LLMConfig } from "../types.js";
|
|
7
|
+
/** Arena operating mode — determines prompts, output format, and default rounds */
|
|
8
|
+
export type ArenaMode = "review" | "discussion" | "planning";
|
|
9
|
+
/** Analysis lens — the perspective from which participants analyze */
|
|
10
|
+
export type ArenaLensName = "engineering" | "product" | "architecture" | "general";
|
|
11
|
+
/** Lens reference with optional weight for multi-lens scenarios */
|
|
12
|
+
export interface ArenaLensRef {
|
|
13
|
+
name: ArenaLensName;
|
|
14
|
+
weight?: number;
|
|
15
|
+
}
|
|
16
|
+
/** A lens defines roles, criteria, and emphasis for a given perspective */
|
|
17
|
+
export interface ArenaLens {
|
|
18
|
+
name: ArenaLensName;
|
|
19
|
+
label: string;
|
|
20
|
+
participantRole: string;
|
|
21
|
+
reviewerRole: string;
|
|
22
|
+
moderatorRole: string;
|
|
23
|
+
summaryLabel: string;
|
|
24
|
+
criteria: string[];
|
|
25
|
+
preferredFindingKinds: FindingKind[];
|
|
26
|
+
}
|
|
27
|
+
/** Evidence source kind — where to collect facts */
|
|
28
|
+
export type ArenaSourceKind = "git" | "repo" | "docs" | "web" | "none";
|
|
29
|
+
/** Source specification with optional targets and tool pack */
|
|
30
|
+
export interface ArenaSourceSpec {
|
|
31
|
+
kind: ArenaSourceKind;
|
|
32
|
+
targets?: string[];
|
|
33
|
+
toolPack?: string;
|
|
34
|
+
}
|
|
35
|
+
/** Subject of the arena session */
|
|
36
|
+
export interface ArenaSubject {
|
|
37
|
+
kind: "changes" | "files" | "docs" | "topic" | "mixed";
|
|
38
|
+
label: string;
|
|
39
|
+
targets?: string[];
|
|
40
|
+
}
|
|
41
|
+
/** Output shape hints for rendering */
|
|
42
|
+
export interface ArenaOutputShape {
|
|
43
|
+
overviewLabel: string;
|
|
44
|
+
emphasize: Array<"strength" | "improvement" | "risk" | "question">;
|
|
45
|
+
}
|
|
46
|
+
/** The full plan produced by the Planner — drives the entire pipeline */
|
|
47
|
+
export interface ArenaPlan {
|
|
48
|
+
mode: ArenaMode;
|
|
49
|
+
lenses: ArenaLensRef[];
|
|
50
|
+
sources: ArenaSourceSpec[];
|
|
51
|
+
subject: ArenaSubject;
|
|
52
|
+
outputShape: ArenaOutputShape;
|
|
53
|
+
confidence: "high" | "medium" | "low";
|
|
54
|
+
followUpQuestion?: string;
|
|
55
|
+
}
|
|
56
|
+
/** Unified artifact — all providers output this, replacing codeFacts/gitFacts split */
|
|
57
|
+
export interface ArenaArtifact {
|
|
58
|
+
id: string;
|
|
59
|
+
kind: "diff" | "file" | "tree" | "grep" | "doc" | "web";
|
|
60
|
+
source: ArenaSourceKind;
|
|
61
|
+
title: string;
|
|
62
|
+
ref?: string;
|
|
63
|
+
preview: string;
|
|
64
|
+
metadata?: Record<string, unknown>;
|
|
65
|
+
}
|
|
66
|
+
/** Tool pack — a named set of tools available during research */
|
|
67
|
+
export interface ArenaToolPack {
|
|
68
|
+
name: string;
|
|
69
|
+
toolNames: string[];
|
|
70
|
+
}
|
|
71
|
+
/** Context provider interface — collects evidence from a source */
|
|
72
|
+
export interface ArenaContextProvider {
|
|
73
|
+
kind: ArenaSourceKind;
|
|
74
|
+
collect(plan: ArenaPlan, topic: string): ArenaArtifact[];
|
|
75
|
+
}
|
|
76
|
+
/** Quick fact — high-signal summary entry */
|
|
77
|
+
export interface ArenaQuickFact {
|
|
78
|
+
label: string;
|
|
79
|
+
value: string;
|
|
80
|
+
}
|
|
81
|
+
/** Default max discussion rounds per mode */
|
|
82
|
+
export declare const ARENA_MODE_DEFAULTS: Record<ArenaMode, {
|
|
83
|
+
maxDiscussionRounds: number;
|
|
84
|
+
convergenceThreshold: number;
|
|
85
|
+
}>;
|
|
86
|
+
/** A participant in the arena (a model instance) */
|
|
87
|
+
export interface ArenaParticipant {
|
|
88
|
+
/** Display name, e.g. "Claude Sonnet", "GPT-4o" */
|
|
89
|
+
name: string;
|
|
90
|
+
/** LLM config for this participant */
|
|
91
|
+
llm: LLMConfig;
|
|
92
|
+
}
|
|
93
|
+
export interface ArenaBaseContext {
|
|
94
|
+
/** Evidence-driven plan that drives the session */
|
|
95
|
+
plan: ArenaPlan;
|
|
96
|
+
/** Unified artifacts from all providers */
|
|
97
|
+
artifacts: ArenaArtifact[];
|
|
98
|
+
/** High-signal summary facts */
|
|
99
|
+
quickFacts: ArenaQuickFact[];
|
|
100
|
+
}
|
|
101
|
+
export type FindingKind = "strength" | "improvement" | "risk" | "question";
|
|
102
|
+
export interface ArenaFinding {
|
|
103
|
+
id: string;
|
|
104
|
+
kind: FindingKind;
|
|
105
|
+
title: string;
|
|
106
|
+
summary: string;
|
|
107
|
+
severity?: "high" | "medium" | "low";
|
|
108
|
+
confidence: number;
|
|
109
|
+
evidence: Array<{
|
|
110
|
+
type: "file" | "diff" | "grep" | "git" | "doc";
|
|
111
|
+
ref: string;
|
|
112
|
+
note: string;
|
|
113
|
+
}>;
|
|
114
|
+
affectedFiles: string[];
|
|
115
|
+
suggestedChange?: string;
|
|
116
|
+
}
|
|
117
|
+
export interface ParticipantContextRequest {
|
|
118
|
+
participant: string;
|
|
119
|
+
requests: Array<{
|
|
120
|
+
tool: string;
|
|
121
|
+
reason: string;
|
|
122
|
+
args: Record<string, unknown>;
|
|
123
|
+
}>;
|
|
124
|
+
}
|
|
125
|
+
export interface ParticipantReport {
|
|
126
|
+
participant: string;
|
|
127
|
+
contextSummary: string;
|
|
128
|
+
findings: ArenaFinding[];
|
|
129
|
+
}
|
|
130
|
+
/** Record of a single tool invocation during research or review */
|
|
131
|
+
export interface ToolTrace {
|
|
132
|
+
round: number;
|
|
133
|
+
toolName: string;
|
|
134
|
+
args: Record<string, unknown>;
|
|
135
|
+
resultRef?: string;
|
|
136
|
+
keptAsEvidence?: boolean;
|
|
137
|
+
}
|
|
138
|
+
/** A discrete packet of evidence collected during research or review */
|
|
139
|
+
export interface EvidencePacket {
|
|
140
|
+
packetId: string;
|
|
141
|
+
participant: string;
|
|
142
|
+
source: ArenaSourceKind;
|
|
143
|
+
title: string;
|
|
144
|
+
refs: string[];
|
|
145
|
+
summary: string;
|
|
146
|
+
excerpts: Array<{
|
|
147
|
+
ref: string;
|
|
148
|
+
snippet: string;
|
|
149
|
+
note: string;
|
|
150
|
+
}>;
|
|
151
|
+
}
|
|
152
|
+
/** Explicit link between a finding and its supporting evidence packets */
|
|
153
|
+
export interface FindingEvidenceLink {
|
|
154
|
+
findingId: string;
|
|
155
|
+
evidencePacketIds: string[];
|
|
156
|
+
}
|
|
157
|
+
/** Full research output — preserves evidence trail alongside findings */
|
|
158
|
+
export interface ResearchDossier {
|
|
159
|
+
participant: string;
|
|
160
|
+
contextSummary: string;
|
|
161
|
+
findings: ArenaFinding[];
|
|
162
|
+
toolTrace: ToolTrace[];
|
|
163
|
+
evidencePackets: EvidencePacket[];
|
|
164
|
+
findingEvidenceLinks: FindingEvidenceLink[];
|
|
165
|
+
}
|
|
166
|
+
export type PeerVerdict = "agree" | "refine" | "disagree" | "needs_evidence";
|
|
167
|
+
export type ClaimStatus = "proposed" | "under_review" | "contested" | "verified" | "rejected" | "unresolved";
|
|
168
|
+
export interface RequestedCheck {
|
|
169
|
+
requestId: string;
|
|
170
|
+
claimId: string;
|
|
171
|
+
requester: string;
|
|
172
|
+
description: string;
|
|
173
|
+
refs?: string[];
|
|
174
|
+
priority?: "high" | "medium" | "low";
|
|
175
|
+
}
|
|
176
|
+
export interface ClaimChallenge {
|
|
177
|
+
reviewer: string;
|
|
178
|
+
claimId: string;
|
|
179
|
+
verdict: PeerVerdict;
|
|
180
|
+
reason: string;
|
|
181
|
+
supportingEvidenceRefs?: string[];
|
|
182
|
+
requestedChecks?: RequestedCheck[];
|
|
183
|
+
}
|
|
184
|
+
export interface DebateTurn {
|
|
185
|
+
participant: string;
|
|
186
|
+
stance: "support" | "oppose" | "narrow" | "uncertain";
|
|
187
|
+
summary: string;
|
|
188
|
+
newEvidenceRefs?: string[];
|
|
189
|
+
}
|
|
190
|
+
export interface DebateRound {
|
|
191
|
+
round: number;
|
|
192
|
+
claimId: string;
|
|
193
|
+
participants: DebateTurn[];
|
|
194
|
+
resolved: boolean;
|
|
195
|
+
resolutionNote?: string;
|
|
196
|
+
}
|
|
197
|
+
export interface ClaimAdjudication {
|
|
198
|
+
claimId: string;
|
|
199
|
+
outcome: "accepted" | "accepted_with_revision" | "rejected" | "unresolved";
|
|
200
|
+
rationale: string;
|
|
201
|
+
finalSummary: string;
|
|
202
|
+
supportingEvidenceRefs: string[];
|
|
203
|
+
}
|
|
204
|
+
/** The minimum unit of debate — a finding elevated to a trackable claim */
|
|
205
|
+
export interface ClaimRecord {
|
|
206
|
+
claimId: string;
|
|
207
|
+
owner: string;
|
|
208
|
+
finding: ArenaFinding;
|
|
209
|
+
evidenceRefs: string[];
|
|
210
|
+
evidencePacketIds: string[];
|
|
211
|
+
status: ClaimStatus;
|
|
212
|
+
challenges: ClaimChallenge[];
|
|
213
|
+
debateRounds: DebateRound[];
|
|
214
|
+
adjudication?: ClaimAdjudication;
|
|
215
|
+
}
|
|
216
|
+
/** Append-only shared state across all rounds of research, review, debate */
|
|
217
|
+
export interface SharedResearchLedger {
|
|
218
|
+
dossiers: ResearchDossier[];
|
|
219
|
+
evidencePackets: EvidencePacket[];
|
|
220
|
+
toolTraces: ToolTrace[];
|
|
221
|
+
claims: ClaimRecord[];
|
|
222
|
+
challenges: ClaimChallenge[];
|
|
223
|
+
requestedChecks: RequestedCheck[];
|
|
224
|
+
adjudications: ClaimAdjudication[];
|
|
225
|
+
}
|
|
226
|
+
/** Per-round digest — a filtered view of the ledger for prompt injection */
|
|
227
|
+
export interface RoundResearchDigest {
|
|
228
|
+
round: number;
|
|
229
|
+
relevantClaimIds: string[];
|
|
230
|
+
evidencePackets: EvidencePacket[];
|
|
231
|
+
toolTraceSummary: Array<{
|
|
232
|
+
participant: string;
|
|
233
|
+
toolName: string;
|
|
234
|
+
ref?: string;
|
|
235
|
+
}>;
|
|
236
|
+
recentChallenges: ClaimChallenge[];
|
|
237
|
+
requestedChecks: RequestedCheck[];
|
|
238
|
+
priorAdjudications: ClaimAdjudication[];
|
|
239
|
+
}
|
|
240
|
+
/** Task for executing a targeted re-research check */
|
|
241
|
+
export interface TargetedCheckTask {
|
|
242
|
+
request: RequestedCheck;
|
|
243
|
+
assignee: string;
|
|
244
|
+
status: "pending" | "running" | "done" | "skipped";
|
|
245
|
+
producedPacketIds: string[];
|
|
246
|
+
}
|
|
247
|
+
/** Global caps to prevent cost explosion in review/debate phases */
|
|
248
|
+
export interface ArenaExecutionLimits {
|
|
249
|
+
maxClaimsForReview: number;
|
|
250
|
+
maxContestedClaimsForDebate: number;
|
|
251
|
+
maxRequestedChecksPerClaimPerRound: number;
|
|
252
|
+
maxReviewersPerClaim: number;
|
|
253
|
+
/** Max roadmap phases in planning mode */
|
|
254
|
+
maxRoadmapPhases: number;
|
|
255
|
+
/** Max phases to expand with detail in planning mode */
|
|
256
|
+
maxExpandedPhasesPerRun: number;
|
|
257
|
+
}
|
|
258
|
+
export declare const DEFAULT_EXECUTION_LIMITS: ArenaExecutionLimits;
|
|
259
|
+
export interface FindingReview {
|
|
260
|
+
reviewer: string;
|
|
261
|
+
findingId: string;
|
|
262
|
+
verdict: PeerVerdict;
|
|
263
|
+
reason: string;
|
|
264
|
+
extraEvidence?: string[];
|
|
265
|
+
}
|
|
266
|
+
export interface ArenaConsensusItem {
|
|
267
|
+
title: string;
|
|
268
|
+
summary: string;
|
|
269
|
+
support: string[];
|
|
270
|
+
challenge: string[];
|
|
271
|
+
confidence: number;
|
|
272
|
+
evidenceRefs: string[];
|
|
273
|
+
}
|
|
274
|
+
export interface ArenaRoadmapPhase {
|
|
275
|
+
title: string;
|
|
276
|
+
priority: "high" | "medium" | "low";
|
|
277
|
+
goal: string;
|
|
278
|
+
scope: string[];
|
|
279
|
+
deliverables: string[];
|
|
280
|
+
dependencies: string[];
|
|
281
|
+
risks: string[];
|
|
282
|
+
successCriteria: string[];
|
|
283
|
+
relatedFindings: string[];
|
|
284
|
+
}
|
|
285
|
+
/** Repo-level implementation detail for a roadmap phase (planning mode) */
|
|
286
|
+
export interface ArenaRoadmapPhaseDetail {
|
|
287
|
+
phaseTitle: string;
|
|
288
|
+
objective: string;
|
|
289
|
+
targetFiles: string[];
|
|
290
|
+
codeChanges: string[];
|
|
291
|
+
interfaces: string[];
|
|
292
|
+
migrationSteps: string[];
|
|
293
|
+
validation: string[];
|
|
294
|
+
effort: "small" | "medium" | "large";
|
|
295
|
+
blockers: string[];
|
|
296
|
+
evidenceRefs: string[];
|
|
297
|
+
}
|
|
298
|
+
export interface ArenaConsensus {
|
|
299
|
+
/** Overall assessment */
|
|
300
|
+
summary: string;
|
|
301
|
+
/** Subject summary — rendered as "What Changed" / "Current Scope" / "Problem Framing" per mode */
|
|
302
|
+
subjectSummary?: string;
|
|
303
|
+
strengths: ArenaConsensusItem[];
|
|
304
|
+
improvements: ArenaConsensusItem[];
|
|
305
|
+
risks: ArenaConsensusItem[];
|
|
306
|
+
openQuestions: ArenaConsensusItem[];
|
|
307
|
+
roadmap: ArenaRoadmapPhase[];
|
|
308
|
+
/** Repo-level implementation details per roadmap phase (planning mode) */
|
|
309
|
+
roadmapDetails?: ArenaRoadmapPhaseDetail[];
|
|
310
|
+
nextActions: Array<{
|
|
311
|
+
title: string;
|
|
312
|
+
priority: "high" | "medium" | "low";
|
|
313
|
+
rationale: string;
|
|
314
|
+
relatedFindings: string[];
|
|
315
|
+
}>;
|
|
316
|
+
}
|
|
317
|
+
export interface ArenaResultV2 {
|
|
318
|
+
topic: string;
|
|
319
|
+
mode: ArenaMode;
|
|
320
|
+
participants: string[];
|
|
321
|
+
plan: ArenaPlan;
|
|
322
|
+
baseContext: ArenaBaseContext;
|
|
323
|
+
reports: ParticipantReport[];
|
|
324
|
+
/** Research dossiers with evidence trails (Phase 3+) */
|
|
325
|
+
dossiers?: ResearchDossier[];
|
|
326
|
+
/** Registered claims derived from findings (Phase 3+) */
|
|
327
|
+
claims?: ClaimRecord[];
|
|
328
|
+
reviews: FindingReview[];
|
|
329
|
+
/** Debate rounds for contested claims (Phase 3+) */
|
|
330
|
+
debateRounds?: DebateRound[];
|
|
331
|
+
/** Claim adjudications (Phase 3+) */
|
|
332
|
+
adjudications?: ClaimAdjudication[];
|
|
333
|
+
consensus: ArenaConsensus;
|
|
334
|
+
}
|
|
335
|
+
/**
|
|
336
|
+
* ArenaStrategy — encapsulates mode-specific behavior for prompts and parsing.
|
|
337
|
+
*
|
|
338
|
+
* V2 strategies produce structured findings instead of free-text opinions.
|
|
339
|
+
*/
|
|
340
|
+
export interface ArenaStrategy {
|
|
341
|
+
/** Build the system prompt for participant research phase */
|
|
342
|
+
researchSystemPrompt(participantName: string): string;
|
|
343
|
+
/** Build the user prompt for participant research, given base context */
|
|
344
|
+
researchUserPrompt(topic: string, baseContext: ArenaBaseContext): string;
|
|
345
|
+
/** Parse participant research response into structured report */
|
|
346
|
+
parseResearchResponse(participant: string, text: string): ParticipantReport;
|
|
347
|
+
/** Build the system prompt for cross-review phase */
|
|
348
|
+
crossReviewSystemPrompt(reviewerName: string): string;
|
|
349
|
+
/** Build the user prompt for cross-reviewing other participants' findings */
|
|
350
|
+
crossReviewUserPrompt(topic: string, myReport: ParticipantReport, otherReports: ParticipantReport[]): string;
|
|
351
|
+
/** Parse cross-review response into finding reviews */
|
|
352
|
+
parseCrossReviewResponse(reviewer: string, text: string): FindingReview[];
|
|
353
|
+
/** Build the system prompt for consensus building */
|
|
354
|
+
consensusSystemPrompt(): string;
|
|
355
|
+
/** Build the user prompt for consensus building */
|
|
356
|
+
consensusUserPrompt(topic: string, reports: ParticipantReport[], reviews: FindingReview[]): string;
|
|
357
|
+
/** Parse consensus response */
|
|
358
|
+
parseConsensusResponse(text: string): ArenaConsensus;
|
|
359
|
+
/** Finding kinds this mode emphasizes */
|
|
360
|
+
preferredFindingKinds(): FindingKind[];
|
|
361
|
+
}
|
|
362
|
+
/**
|
|
363
|
+
* ArenaStrategyV2 — extends ArenaStrategy with claim-aware prompt methods.
|
|
364
|
+
*
|
|
365
|
+
* Strategies implementing V2 participate in the full evidence-driven loop:
|
|
366
|
+
* verification review, debate, adjudication, and claim-aware consensus.
|
|
367
|
+
*
|
|
368
|
+
* Strategies that only implement ArenaStrategy continue to work via
|
|
369
|
+
* automatic fallback paths in each phase.
|
|
370
|
+
*/
|
|
371
|
+
export interface ArenaStrategyV2 extends ArenaStrategy {
|
|
372
|
+
/** Build verification-review user prompt with claim data and digest */
|
|
373
|
+
verificationReviewUserPrompt(topic: string, myReport: ParticipantReport, claimsToReview: ClaimRecord[], digest: RoundResearchDigest): string;
|
|
374
|
+
/** Parse verification review into ClaimChallenge records */
|
|
375
|
+
parseVerificationReviewResponse(reviewer: string, text: string): ClaimChallenge[];
|
|
376
|
+
/** Build debate turn prompt for a participant on a specific claim */
|
|
377
|
+
debateTurnUserPrompt(topic: string, claim: ClaimRecord, priorTurns: DebateTurn[], digest: RoundResearchDigest): string;
|
|
378
|
+
/** Parse a debate turn response */
|
|
379
|
+
parseDebateTurnResponse(participant: string, text: string): DebateTurn;
|
|
380
|
+
/** Build adjudication prompt for the moderator */
|
|
381
|
+
adjudicationUserPrompt(topic: string, claim: ClaimRecord, debateRounds: DebateRound[], digest: RoundResearchDigest): string;
|
|
382
|
+
/** Parse adjudication response */
|
|
383
|
+
parseAdjudicationResponse(text: string): ClaimAdjudication;
|
|
384
|
+
/** Build claim-aware consensus prompt */
|
|
385
|
+
claimAwareConsensusUserPrompt(topic: string, reports: ParticipantReport[], reviews: FindingReview[], claimSummary: ClaimStatusSummary): string;
|
|
386
|
+
}
|
|
387
|
+
/**
|
|
388
|
+
* ArenaStrategyPlanning — extends ArenaStrategyV2 with planning-specific methods.
|
|
389
|
+
*
|
|
390
|
+
* Strategies implementing this participate in the planning-specific flow:
|
|
391
|
+
* merge-oriented review and detail expansion.
|
|
392
|
+
*/
|
|
393
|
+
export interface ArenaStrategyPlanning extends ArenaStrategyV2 {
|
|
394
|
+
/** Build merge-oriented review prompt for planning mode */
|
|
395
|
+
mergeReviewUserPrompt(topic: string, myReport: ParticipantReport, claimsToReview: ClaimRecord[], digest: RoundResearchDigest): string;
|
|
396
|
+
/** Parse merge-review response into challenges with planning semantics */
|
|
397
|
+
parseMergeReviewResponse(reviewer: string, text: string): ClaimChallenge[];
|
|
398
|
+
/** Build detail expansion system prompt */
|
|
399
|
+
detailExpansionSystemPrompt(): string;
|
|
400
|
+
/** Build detail expansion user prompt for a single roadmap phase */
|
|
401
|
+
detailExpansionUserPrompt(topic: string, phase: ArenaRoadmapPhase, digest: RoundResearchDigest): string;
|
|
402
|
+
/** Parse detail expansion response */
|
|
403
|
+
parseDetailExpansionResponse(text: string): ArenaRoadmapPhaseDetail;
|
|
404
|
+
}
|
|
405
|
+
/** Type guard: does a strategy implement ArenaStrategyPlanning? */
|
|
406
|
+
export declare function isStrategyPlanning(s: ArenaStrategy): s is ArenaStrategyPlanning;
|
|
407
|
+
/** Grouped claims by terminal status — used in claim-aware consensus */
|
|
408
|
+
export interface ClaimStatusSummary {
|
|
409
|
+
verified: ClaimRecord[];
|
|
410
|
+
contested: ClaimRecord[];
|
|
411
|
+
unresolved: ClaimRecord[];
|
|
412
|
+
rejected: ClaimRecord[];
|
|
413
|
+
}
|
|
414
|
+
/** Type guard: does a strategy implement ArenaStrategyV2? */
|
|
415
|
+
export declare function isStrategyV2(s: ArenaStrategy): s is ArenaStrategyV2;
|
|
416
|
+
/** Arena configuration */
|
|
417
|
+
export interface ArenaConfig {
|
|
418
|
+
/** Participants (models) in the arena */
|
|
419
|
+
participants: ArenaParticipant[];
|
|
420
|
+
/** Arena mode (default: "review") */
|
|
421
|
+
mode?: ArenaMode;
|
|
422
|
+
/** Maximum discussion rounds after initial opinions (overrides mode default if set) */
|
|
423
|
+
maxDiscussionRounds?: number;
|
|
424
|
+
/** Which participant generates the final conclusion (default: first) */
|
|
425
|
+
concluder?: string;
|
|
426
|
+
/** Optional custom strategy — overrides mode-based strategy selection */
|
|
427
|
+
strategy?: ArenaStrategy;
|
|
428
|
+
/**
|
|
429
|
+
* Enable read-only context tools (read_file, grep_code, list_files) during
|
|
430
|
+
* participant research. Participants can request additional source context.
|
|
431
|
+
*/
|
|
432
|
+
enableContextTools?: boolean;
|
|
433
|
+
/** Execution limits for review/debate/adjudication phases */
|
|
434
|
+
executionLimits?: ArenaExecutionLimits;
|
|
435
|
+
/** Callback for streaming arena progress */
|
|
436
|
+
onProgress?: (event: ArenaProgressEvent) => void;
|
|
437
|
+
/** AbortSignal for cancelling a running arena session */
|
|
438
|
+
signal?: AbortSignal;
|
|
439
|
+
}
|
|
440
|
+
export type ArenaProgressEvent = {
|
|
441
|
+
type: "plan_resolved";
|
|
442
|
+
plan: ArenaPlan;
|
|
443
|
+
} | {
|
|
444
|
+
type: "evidence_collected";
|
|
445
|
+
artifacts: ArenaArtifact[];
|
|
446
|
+
} | {
|
|
447
|
+
type: "research_start";
|
|
448
|
+
participant: string;
|
|
449
|
+
} | {
|
|
450
|
+
type: "research_done";
|
|
451
|
+
participant: string;
|
|
452
|
+
report: ParticipantReport;
|
|
453
|
+
} | {
|
|
454
|
+
type: "context_lookup";
|
|
455
|
+
participant: string;
|
|
456
|
+
tools: string[];
|
|
457
|
+
} | {
|
|
458
|
+
type: "claims_registered";
|
|
459
|
+
claimCount: number;
|
|
460
|
+
} | {
|
|
461
|
+
type: "cross_review_start";
|
|
462
|
+
round: number;
|
|
463
|
+
} | {
|
|
464
|
+
type: "cross_review_done";
|
|
465
|
+
reviews: FindingReview[];
|
|
466
|
+
} | {
|
|
467
|
+
type: "verification_start";
|
|
468
|
+
} | {
|
|
469
|
+
type: "verification_done";
|
|
470
|
+
challengeCount: number;
|
|
471
|
+
} | {
|
|
472
|
+
type: "debate_round_start";
|
|
473
|
+
round: number;
|
|
474
|
+
claims: string[];
|
|
475
|
+
} | {
|
|
476
|
+
type: "debate_round_done";
|
|
477
|
+
round: number;
|
|
478
|
+
resolved: number;
|
|
479
|
+
} | {
|
|
480
|
+
type: "adjudication_done";
|
|
481
|
+
accepted: number;
|
|
482
|
+
unresolved: number;
|
|
483
|
+
} | {
|
|
484
|
+
type: "planning_merge_review_start";
|
|
485
|
+
} | {
|
|
486
|
+
type: "planning_merge_review_done";
|
|
487
|
+
mergeCount: number;
|
|
488
|
+
} | {
|
|
489
|
+
type: "roadmap_expansion_start";
|
|
490
|
+
phaseCount: number;
|
|
491
|
+
} | {
|
|
492
|
+
type: "roadmap_expansion_done";
|
|
493
|
+
detailCount: number;
|
|
494
|
+
} | {
|
|
495
|
+
type: "consensus_start";
|
|
496
|
+
} | {
|
|
497
|
+
type: "consensus_done";
|
|
498
|
+
consensus: ArenaConsensus;
|
|
499
|
+
};
|