@cjhyy/code-shell 0.1.0-alpha.0 → 0.1.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +39 -0
- package/README.md +8 -0
- package/dist/anthropic-P5VETAFI.cjs +10 -0
- package/dist/{anthropic-NENYS535.js → anthropic-W2GU3D76.js} +3 -2
- package/dist/arena/context/context-tools.d.ts +1 -1
- package/dist/arena/index.cjs +4 -4
- package/dist/arena/index.js +3 -3
- package/dist/arena/providers/index.d.ts +19 -3
- package/dist/arena/strategies/utils.d.ts +6 -1
- package/dist/arena/types.d.ts +10 -1
- package/dist/{arena-46QQ6BZQ.js → arena-ENHBHB2W.js} +5 -7
- package/dist/{arena-HZZZ2GJH.cjs → arena-HHDYYVHJ.cjs} +19 -21
- package/dist/{chunk-BE6IPRDM.js → chunk-2EUAE7AY.js} +1 -1
- package/dist/{chunk-WFQF3RT4.cjs → chunk-3CAZIWUA.cjs} +11 -8
- package/dist/{chunk-J5XW6UYL.js → chunk-5C5HIOML.js} +63 -4
- package/dist/chunk-75E4BBFC.js +224 -0
- package/dist/{chunk-ZJV3YSY3.cjs → chunk-BUJ5KYCI.cjs} +53 -11
- package/dist/{chunk-BMH65OVB.cjs → chunk-C7C7ZZY4.cjs} +8 -8
- package/dist/{chunk-KO2FPF7G.js → chunk-F5BS3GUC.js} +20 -2
- package/dist/chunk-FA5KD34T.js +54 -0
- package/dist/chunk-FV2ARONZ.cjs +224 -0
- package/dist/chunk-G76E5FOB.cjs +54 -0
- package/dist/{chunk-DICG4AB7.cjs → chunk-GZBD6QRS.cjs} +42 -3
- package/dist/{chunk-FVP7XJGS.cjs → chunk-HOXQLX5R.cjs} +406 -196
- package/dist/{chunk-4PKZPFCD.js → chunk-I57ZD5IQ.js} +47 -14
- package/dist/{chunk-7RMAR2Y3.js → chunk-ID6EJUHP.js} +1959 -473
- package/dist/chunk-JHNCK7JP.cjs +202 -0
- package/dist/{chunk-R32DJSJE.cjs → chunk-JHXNOB5G.cjs} +8 -5
- package/dist/{chunk-UK2SU23S.cjs → chunk-KOGV6PDQ.cjs} +20 -2
- package/dist/{chunk-VKGNCYRL.js → chunk-LMEKCQX4.js} +95 -13
- package/dist/{chunk-3EAEC566.cjs → chunk-M2QI5X3X.cjs} +51 -18
- package/dist/{chunk-YZ25SSWJ.js → chunk-M2SVOKC6.js} +46 -4
- package/dist/chunk-OMRGA6TI.js +4753 -0
- package/dist/{chunk-NG73UR3L.cjs → chunk-OP57WUWQ.cjs} +23 -1
- package/dist/{chunk-ZXYDDJEJ.js → chunk-OUC2DFA7.js} +2 -2
- package/dist/{chunk-6JOOLG6F.js → chunk-REFCCVDM.js} +5 -2
- package/dist/{chunk-O6F2EF2Z.js → chunk-SCDKLTN3.js} +41 -2
- package/dist/{chunk-BHGIJ2DJ.js → chunk-SW3L7HIM.js} +6 -3
- package/dist/chunk-TATCTZSB.cjs +4753 -0
- package/dist/{chunk-QHDYFC5U.cjs → chunk-VWFET3MG.cjs} +2132 -646
- package/dist/{chunk-3EUDE77E.cjs → chunk-X2DNIMPC.cjs} +19 -19
- package/dist/{chunk-SQZHPD3S.js → chunk-Y7TSCDF6.js} +297 -87
- package/dist/{chunk-WHRTARDJ.cjs → chunk-YAFCN7ZW.cjs} +112 -30
- package/dist/{chunk-LRAY5IYC.cjs → chunk-YD7XTI7T.cjs} +65 -6
- package/dist/{chunk-S74VVJBF.js → chunk-ZLPJJZUW.js} +23 -1
- package/dist/chunk-ZRVPCXI7.js +202 -0
- package/dist/cli/commands/builtin/advanced-commands.d.ts +1 -1
- package/dist/cli/commands/builtin/extra-commands.d.ts +2 -2
- package/dist/cli/commands/builtin/more-commands.d.ts +1 -3
- package/dist/cli/commands/registry.d.ts +8 -0
- package/dist/cli/cost-tracker.d.ts +6 -0
- package/dist/cli/main.cjs +3576 -2036
- package/dist/cli/main.js +3613 -2073
- package/dist/cli/onboarding.d.ts +67 -14
- package/dist/client-base-TOVE25FA.js +9 -0
- package/dist/client-base-VDDIADAC.cjs +9 -0
- package/dist/compaction-D3KV2NWY.cjs +31 -0
- package/dist/{compaction-CCHWA4G6.js → compaction-YNWCEF7B.js} +1 -2
- package/dist/context/manager.d.ts +9 -0
- package/dist/data/openrouter-models.d.ts +35 -0
- package/dist/data/openrouter-sync.d.ts +16 -0
- package/dist/{devtools-KIY3LWQJ.js → devtools-IRQQPIRY.js} +1 -1
- package/dist/{devtools-LRP47DDV.cjs → devtools-WTC3NFNE.cjs} +1 -1
- package/dist/engine/engine.d.ts +39 -4
- package/dist/engine/turn-loop.d.ts +13 -4
- package/dist/engine/turn-state.d.ts +6 -0
- package/dist/index.cjs +19 -28
- package/dist/index.d.ts +1 -1
- package/dist/index.js +28 -37
- package/dist/llm/client-base.d.ts +7 -0
- package/dist/llm/model-pool.d.ts +4 -0
- package/dist/logging/logger.d.ts +69 -8
- package/dist/manager-FWLOVEEK.cjs +7 -0
- package/dist/manager-GEXJLOIS.js +7 -0
- package/dist/{mcp-manager-OKXHHWYR.js → mcp-manager-37GQLFGX.js} +2 -2
- package/dist/mcp-manager-U77NEXBY.cjs +8 -0
- package/dist/memory-ADGOWADP.cjs +9 -0
- package/dist/memory-EPFDBPII.js +9 -0
- package/dist/native-ts/yoga-layout/index.d.ts +2 -2
- package/dist/{openai-5HQGBL4L.js → openai-RXU5URYI.js} +3 -2
- package/dist/openai-SQW4H2K4.cjs +10 -0
- package/dist/openrouter-models-OL725CL6.js +15 -0
- package/dist/openrouter-models-UM3AOGZ4.cjs +15 -0
- package/dist/openrouter-sync-CWD5VNW2.js +11 -0
- package/dist/openrouter-sync-HYZZC6RX.cjs +11 -0
- package/dist/product/index.cjs +12 -16
- package/dist/product/index.js +11 -15
- package/dist/product/types.d.ts +2 -7
- package/dist/protocol/types.d.ts +11 -3
- package/dist/{ink → render}/hooks/use-input.d.ts +1 -1
- package/dist/run/EngineRunner.d.ts +3 -1
- package/dist/run/RunManager.d.ts +6 -0
- package/dist/run/factory.d.ts +7 -1
- package/dist/run/index.cjs +12 -16
- package/dist/run/index.js +11 -15
- package/dist/session/memory.d.ts +23 -3
- package/dist/session/session-manager.d.ts +4 -1
- package/dist/{session-manager-UQKB564H.cjs → session-manager-HRSKENKB.cjs} +2 -2
- package/dist/{session-manager-JIIBCFTC.js → session-manager-NEKFEHF3.js} +1 -1
- package/dist/settings/manager.d.ts +9 -0
- package/dist/settings/schema.d.ts +48 -39
- package/dist/{tool-summary-J2ICNMWP.js → tool-summary-2RUFL5QK.js} +1 -1
- package/dist/{tool-summary-5P2GKRA4.cjs → tool-summary-RYNR4DDB.cjs} +2 -2
- package/dist/tool-system/builtin/agent-registry.d.ts +36 -0
- package/dist/tool-system/builtin/agent.d.ts +7 -26
- package/dist/tool-system/builtin/apply-patch/applier.d.ts +26 -0
- package/dist/tool-system/builtin/apply-patch/index.d.ts +19 -0
- package/dist/tool-system/builtin/apply-patch/parser.d.ts +17 -0
- package/dist/tool-system/builtin/apply-patch/seek-sequence.d.ts +18 -0
- package/dist/tool-system/builtin/apply-patch/types.d.ts +49 -0
- package/dist/tool-system/builtin/arena.d.ts +18 -5
- package/dist/tool-system/builtin/ask-user.d.ts +6 -6
- package/dist/tool-system/builtin/index.d.ts +11 -1
- package/dist/tool-system/builtin/tool-search.d.ts +2 -3
- package/dist/tool-system/context.d.ts +74 -0
- package/dist/tool-system/executor.d.ts +16 -0
- package/dist/tool-system/permission.d.ts +40 -5
- package/dist/tool-system/registry.d.ts +8 -0
- package/dist/types.d.ts +34 -1
- package/dist/ui/App.d.ts +1 -1
- package/dist/ui/components/AgentBlock.d.ts +1 -1
- package/dist/ui/components/AskUserPrompt.d.ts +7 -0
- package/dist/ui/components/MessageContent.d.ts +7 -3
- package/dist/ui/components/ModelManager.d.ts +35 -0
- package/dist/ui/components/ModelSelector.d.ts +10 -0
- package/dist/ui/components/OnboardingPrompt.d.ts +7 -0
- package/dist/ui/components/PermissionPrompt.d.ts +5 -2
- package/dist/ui/components/SessionPicker.d.ts +14 -0
- package/dist/ui/components/StatusLine.d.ts +4 -2
- package/dist/ui/components/ThemedBox.d.ts +1 -1
- package/dist/ui/components/ToolCall.d.ts +8 -1
- package/dist/ui/components/WelcomeTips.d.ts +5 -0
- package/dist/ui/onboarding-runner.d.ts +2 -0
- package/dist/ui/store.d.ts +1 -0
- package/dist/{updater-URVNPDPW.cjs → updater-M7L42ASZ.cjs} +4 -4
- package/dist/{updater-AVD4LKTQ.js → updater-ZRTONIR4.js} +4 -4
- package/dist/utils/debug.d.ts +17 -33
- package/package.json +4 -4
- package/dist/anthropic-XMTTVNSH.cjs +0 -9
- package/dist/bridge-4ZRXVWBN.js +0 -98
- package/dist/bridge-W476QDFH.cjs +0 -98
- package/dist/chunk-4RRUP4MM.js +0 -86
- package/dist/chunk-4SFPFHMG.js +0 -132
- package/dist/chunk-5LHVI777.cjs +0 -246
- package/dist/chunk-6ZIROYXX.js +0 -207
- package/dist/chunk-C7JBCO5V.js +0 -80
- package/dist/chunk-CSO5EOEP.cjs +0 -132
- package/dist/chunk-FGZGCFJX.cjs +0 -207
- package/dist/chunk-HD7MT5XU.cjs +0 -86
- package/dist/chunk-IMMTBZ33.cjs +0 -63
- package/dist/chunk-JT2WSQSR.cjs +0 -335
- package/dist/chunk-NZ4DQ72D.cjs +0 -664
- package/dist/chunk-OG4MIQJ6.js +0 -335
- package/dist/chunk-WRZJUQ5Z.js +0 -664
- package/dist/chunk-X4HAERTQ.js +0 -63
- package/dist/chunk-XHC2JMEC.cjs +0 -80
- package/dist/chunk-ZRSSGYA5.js +0 -246
- package/dist/compaction-44I55TLI.cjs +0 -32
- package/dist/coordinator-5HY7ALO2.js +0 -7
- package/dist/coordinator-INDLPVMF.cjs +0 -7
- package/dist/cost-tracker-IWYAUPXH.js +0 -9
- package/dist/cost-tracker-JXTJQQWE.cjs +0 -9
- package/dist/loader-DXFSUB4R.cjs +0 -91
- package/dist/loader-J5UID6CV.js +0 -91
- package/dist/manager-ETWDOCHN.cjs +0 -9
- package/dist/manager-HGMQNEJB.cjs +0 -11
- package/dist/manager-HUAQOORS.js +0 -9
- package/dist/manager-VJIZ2CQC.js +0 -11
- package/dist/mcp-manager-G4G2QASE.cjs +0 -8
- package/dist/memory-AP747G5H.js +0 -7
- package/dist/memory-BH3BYUN5.cjs +0 -7
- package/dist/onboarding-6WEPV7C2.js +0 -11
- package/dist/onboarding-QM5DY2TU.cjs +0 -11
- package/dist/openai-656VWUQW.cjs +0 -9
- package/dist/skills-63RBYQRX.js +0 -13
- package/dist/skills-V3BPLW3D.cjs +0 -13
- package/dist/token-counter-CHAXW5O7.cjs +0 -13
- package/dist/token-counter-DSOZGZ5Q.js +0 -13
- package/dist/utils/log.d.ts +0 -56
- package/dist/voice-KTZ7PAGO.js +0 -80
- package/dist/voice-KZE25GKB.cjs +0 -80
- /package/dist/{ink → render}/Ansi.d.ts +0 -0
- /package/dist/{ink → render}/bidi.d.ts +0 -0
- /package/dist/{ink → render}/clearTerminal.d.ts +0 -0
- /package/dist/{ink → render}/colorize.d.ts +0 -0
- /package/dist/{ink → render}/components/AlternateScreen.d.ts +0 -0
- /package/dist/{ink → render}/components/App.d.ts +0 -0
- /package/dist/{ink → render}/components/AppContext.d.ts +0 -0
- /package/dist/{ink → render}/components/Box.d.ts +0 -0
- /package/dist/{ink → render}/components/Button.d.ts +0 -0
- /package/dist/{ink → render}/components/ClockContext.d.ts +0 -0
- /package/dist/{ink → render}/components/CursorDeclarationContext.d.ts +0 -0
- /package/dist/{ink → render}/components/ErrorOverview.d.ts +0 -0
- /package/dist/{ink → render}/components/Link.d.ts +0 -0
- /package/dist/{ink → render}/components/Newline.d.ts +0 -0
- /package/dist/{ink → render}/components/NoSelect.d.ts +0 -0
- /package/dist/{ink → render}/components/RawAnsi.d.ts +0 -0
- /package/dist/{ink → render}/components/ScrollBox.d.ts +0 -0
- /package/dist/{ink → render}/components/Spacer.d.ts +0 -0
- /package/dist/{ink → render}/components/StdinContext.d.ts +0 -0
- /package/dist/{ink → render}/components/TerminalFocusContext.d.ts +0 -0
- /package/dist/{ink → render}/components/TerminalSizeContext.d.ts +0 -0
- /package/dist/{ink → render}/components/Text.d.ts +0 -0
- /package/dist/{ink → render}/constants.d.ts +0 -0
- /package/dist/{ink → render}/cursor.d.ts +0 -0
- /package/dist/{ink → render}/devtools.d.ts +0 -0
- /package/dist/{ink → render}/dom.d.ts +0 -0
- /package/dist/{ink → render}/events/click-event.d.ts +0 -0
- /package/dist/{ink → render}/events/dispatcher.d.ts +0 -0
- /package/dist/{ink → render}/events/emitter.d.ts +0 -0
- /package/dist/{ink → render}/events/event-handlers.d.ts +0 -0
- /package/dist/{ink → render}/events/event.d.ts +0 -0
- /package/dist/{ink → render}/events/focus-event.d.ts +0 -0
- /package/dist/{ink → render}/events/input-event.d.ts +0 -0
- /package/dist/{ink → render}/events/keyboard-event.d.ts +0 -0
- /package/dist/{ink → render}/events/paste-event.d.ts +0 -0
- /package/dist/{ink → render}/events/resize-event.d.ts +0 -0
- /package/dist/{ink → render}/events/terminal-event.d.ts +0 -0
- /package/dist/{ink → render}/events/terminal-focus-event.d.ts +0 -0
- /package/dist/{ink → render}/focus.d.ts +0 -0
- /package/dist/{ink → render}/frame.d.ts +0 -0
- /package/dist/{ink → render}/get-max-width.d.ts +0 -0
- /package/dist/{ink → render}/hit-test.d.ts +0 -0
- /package/dist/{ink → render}/hooks/use-animation-frame.d.ts +0 -0
- /package/dist/{ink → render}/hooks/use-app.d.ts +0 -0
- /package/dist/{ink → render}/hooks/use-declared-cursor.d.ts +0 -0
- /package/dist/{ink → render}/hooks/use-interval.d.ts +0 -0
- /package/dist/{ink → render}/hooks/use-search-highlight.d.ts +0 -0
- /package/dist/{ink → render}/hooks/use-selection.d.ts +0 -0
- /package/dist/{ink → render}/hooks/use-stdin.d.ts +0 -0
- /package/dist/{ink → render}/hooks/use-tab-status.d.ts +0 -0
- /package/dist/{ink → render}/hooks/use-terminal-focus.d.ts +0 -0
- /package/dist/{ink → render}/hooks/use-terminal-title.d.ts +0 -0
- /package/dist/{ink → render}/hooks/use-terminal-viewport.d.ts +0 -0
- /package/dist/{ink → render}/index.d.ts +0 -0
- /package/dist/{ink → render}/ink.d.ts +0 -0
- /package/dist/{ink → render}/instances.d.ts +0 -0
- /package/dist/{ink → render}/layout/engine.d.ts +0 -0
- /package/dist/{ink → render}/layout/geometry.d.ts +0 -0
- /package/dist/{ink → render}/layout/node.d.ts +0 -0
- /package/dist/{ink → render}/layout/yoga.d.ts +0 -0
- /package/dist/{ink → render}/line-width-cache.d.ts +0 -0
- /package/dist/{ink → render}/log-update.d.ts +0 -0
- /package/dist/{ink → render}/measure-element.d.ts +0 -0
- /package/dist/{ink → render}/measure-text.d.ts +0 -0
- /package/dist/{ink → render}/node-cache.d.ts +0 -0
- /package/dist/{ink → render}/optimizer.d.ts +0 -0
- /package/dist/{ink → render}/output.d.ts +0 -0
- /package/dist/{ink → render}/parse-keypress.d.ts +0 -0
- /package/dist/{ink → render}/reconciler.d.ts +0 -0
- /package/dist/{ink → render}/render-border.d.ts +0 -0
- /package/dist/{ink → render}/render-node-to-output.d.ts +0 -0
- /package/dist/{ink → render}/render-to-screen.d.ts +0 -0
- /package/dist/{ink → render}/renderer.d.ts +0 -0
- /package/dist/{ink → render}/root.d.ts +0 -0
- /package/dist/{ink → render}/screen.d.ts +0 -0
- /package/dist/{ink → render}/searchHighlight.d.ts +0 -0
- /package/dist/{ink → render}/selection.d.ts +0 -0
- /package/dist/{ink → render}/squash-text-nodes.d.ts +0 -0
- /package/dist/{ink → render}/stringWidth.d.ts +0 -0
- /package/dist/{ink → render}/styles.d.ts +0 -0
- /package/dist/{ink → render}/supports-hyperlinks.d.ts +0 -0
- /package/dist/{ink → render}/tabstops.d.ts +0 -0
- /package/dist/{ink → render}/terminal-focus-state.d.ts +0 -0
- /package/dist/{ink → render}/terminal-querier.d.ts +0 -0
- /package/dist/{ink → render}/terminal.d.ts +0 -0
- /package/dist/{ink → render}/termio/ansi.d.ts +0 -0
- /package/dist/{ink → render}/termio/csi.d.ts +0 -0
- /package/dist/{ink → render}/termio/dec.d.ts +0 -0
- /package/dist/{ink → render}/termio/esc.d.ts +0 -0
- /package/dist/{ink → render}/termio/osc.d.ts +0 -0
- /package/dist/{ink → render}/termio/parser.d.ts +0 -0
- /package/dist/{ink → render}/termio/sgr.d.ts +0 -0
- /package/dist/{ink → render}/termio/tokenize.d.ts +0 -0
- /package/dist/{ink → render}/termio/types.d.ts +0 -0
- /package/dist/{ink → render}/termio.d.ts +0 -0
- /package/dist/{ink → render}/useTerminalNotification.d.ts +0 -0
- /package/dist/{ink → render}/warn.d.ts +0 -0
- /package/dist/{ink → render}/widest-line.d.ts +0 -0
- /package/dist/{ink → render}/wrap-text.d.ts +0 -0
- /package/dist/{ink → render}/wrapAnsi.d.ts +0 -0
package/dist/cli/onboarding.d.ts
CHANGED
|
@@ -1,26 +1,79 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* -
|
|
6
|
-
* - ESC to go back to previous step
|
|
7
|
-
* - Multi-provider configuration for Arena
|
|
8
|
-
* - API key validation before saving
|
|
2
|
+
* Onboarding data layer — provider catalog, env detection, key validation,
|
|
3
|
+
* settings persistence. The interactive flow itself is rendered by Ink
|
|
4
|
+
* (see src/ui/components/OnboardingPrompt.tsx); this module only exposes
|
|
5
|
+
* pure(-ish) helpers it consumes, so there's a single input stack.
|
|
9
6
|
*/
|
|
10
|
-
interface OnboardingResult {
|
|
7
|
+
export interface OnboardingResult {
|
|
11
8
|
provider: string;
|
|
12
9
|
model: string;
|
|
13
10
|
apiKey: string;
|
|
14
11
|
baseUrl: string;
|
|
15
12
|
}
|
|
13
|
+
export interface ProviderDef {
|
|
14
|
+
id: string;
|
|
15
|
+
name: string;
|
|
16
|
+
envKey: string;
|
|
17
|
+
provider: string;
|
|
18
|
+
baseUrl: string;
|
|
19
|
+
defaultModel: string;
|
|
20
|
+
keyUrl: string;
|
|
21
|
+
keyPrefix: string;
|
|
22
|
+
models: string[];
|
|
23
|
+
/** When true, skip API key prompt (e.g. local providers like Ollama). */
|
|
24
|
+
noKey?: boolean;
|
|
25
|
+
}
|
|
26
|
+
export declare const PROVIDERS: ProviderDef[];
|
|
27
|
+
/**
|
|
28
|
+
* Resolve the model list a provider should expose right now. For
|
|
29
|
+
* OpenRouter this comes from the snapshot; for direct providers it
|
|
30
|
+
* stays hardcoded (snapshot doesn't carry their native IDs).
|
|
31
|
+
*/
|
|
32
|
+
export declare function resolveProviderModels(provider: ProviderDef): string[];
|
|
33
|
+
export interface DetectedEnvKey {
|
|
34
|
+
provider: ProviderDef;
|
|
35
|
+
envKey: string;
|
|
36
|
+
apiKey: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Scan environment for known provider API keys.
|
|
40
|
+
* Returns one entry per provider that has its envKey set.
|
|
41
|
+
*/
|
|
42
|
+
export declare function detectEnvKeys(): DetectedEnvKey[];
|
|
43
|
+
/** Mask a key for display: "sk-517f...b594" */
|
|
44
|
+
export declare function maskKey(key: string): string;
|
|
45
|
+
export declare function validateApiKey(baseUrl: string, apiKey: string): Promise<boolean>;
|
|
16
46
|
export declare function hasApiKey(): boolean;
|
|
17
47
|
/**
|
|
18
|
-
*
|
|
48
|
+
* Resolve a model's max-output-token budget. Lookup order:
|
|
49
|
+
* 1. KNOWN_MAX_OUTPUT (covers direct providers like Anthropic/DeepSeek
|
|
50
|
+
* whose IDs aren't in the OpenRouter snapshot)
|
|
51
|
+
* 2. OpenRouter snapshot (covers `vendor/model` style IDs)
|
|
52
|
+
* 3. undefined — caller falls back to its own default
|
|
53
|
+
*
|
|
54
|
+
* Returns undefined (not 0) when nothing is known, so callers can use
|
|
55
|
+
* `?? defaultValue` semantics.
|
|
56
|
+
*/
|
|
57
|
+
export declare function resolveMaxOutput(model: string): number | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* Derive a short key from a model path.
|
|
60
|
+
* "anthropic/claude-opus-4.7" → "claude-opus"
|
|
61
|
+
* "openai/gpt-5" → "gpt"
|
|
62
|
+
* "deepseek/deepseek-chat" → "deepseek"
|
|
19
63
|
*/
|
|
20
|
-
export declare function
|
|
64
|
+
export declare function modelKey(model: string): string;
|
|
21
65
|
/**
|
|
22
|
-
*
|
|
23
|
-
* Clears existing config first.
|
|
66
|
+
* Build model pool entries from a provider's model list.
|
|
24
67
|
*/
|
|
25
|
-
export declare function
|
|
26
|
-
|
|
68
|
+
export declare function buildModelPool(provider: ProviderDef, apiKey: string): Array<{
|
|
69
|
+
key: string;
|
|
70
|
+
label: string;
|
|
71
|
+
provider: string;
|
|
72
|
+
model: string;
|
|
73
|
+
baseUrl: string;
|
|
74
|
+
apiKey: string;
|
|
75
|
+
maxOutputTokens?: number;
|
|
76
|
+
}>;
|
|
77
|
+
export declare function modelDisplayName(model: string): string;
|
|
78
|
+
export declare function saveSettings(result: OnboardingResult, providerDef?: ProviderDef, poolModels?: string[]): void;
|
|
79
|
+
export declare function saveArenaSettingsByKeys(keys: string[]): void;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkGZBD6QRScjs = require('./chunk-GZBD6QRS.cjs');
|
|
4
|
+
require('./chunk-EL2RL5DG.cjs');
|
|
5
|
+
require('./chunk-JHNCK7JP.cjs');
|
|
6
|
+
require('./chunk-IJSHQGMP.cjs');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
exports.LLMClientBase = _chunkGZBD6QRScjs.LLMClientBase;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
var _chunkYD7XTI7Tcjs = require('./chunk-YD7XTI7T.cjs');
|
|
16
|
+
require('./chunk-IJSHQGMP.cjs');
|
|
17
|
+
_chunkYD7XTI7Tcjs.init_compaction.call(void 0, );
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
exports.adjustIndexToPreserveAPIInvariants = _chunkYD7XTI7Tcjs.adjustIndexToPreserveAPIInvariants; exports.applySummaryCompaction = _chunkYD7XTI7Tcjs.applySummaryCompaction; exports.applyToolResultBudget = _chunkYD7XTI7Tcjs.applyToolResultBudget; exports.buildSummarizationPrompt = _chunkYD7XTI7Tcjs.buildSummarizationPrompt; exports.dropOldestRounds = _chunkYD7XTI7Tcjs.dropOldestRounds; exports.estimateTokens = _chunkYD7XTI7Tcjs.estimateTokens; exports.extractReferencedFilePaths = _chunkYD7XTI7Tcjs.extractReferencedFilePaths; exports.groupMessagesByApiRound = _chunkYD7XTI7Tcjs.groupMessagesByApiRound; exports.microcompact = _chunkYD7XTI7Tcjs.microcompact; exports.snipCompact = _chunkYD7XTI7Tcjs.snipCompact; exports.truncateToolResult = _chunkYD7XTI7Tcjs.truncateToolResult; exports.windowCompact = _chunkYD7XTI7Tcjs.windowCompact;
|
|
@@ -17,6 +17,12 @@ export interface ContextManagerConfig {
|
|
|
17
17
|
* Injected by the Engine so the ContextManager doesn't depend on LLM directly.
|
|
18
18
|
*/
|
|
19
19
|
export type SummarizeFn = (prompt: string) => Promise<string>;
|
|
20
|
+
export type CompactStrategy = "summary" | "window" | "snip" | "emergency";
|
|
21
|
+
export type OnCompactFn = (info: {
|
|
22
|
+
strategy: CompactStrategy;
|
|
23
|
+
before: number;
|
|
24
|
+
after: number;
|
|
25
|
+
}) => void;
|
|
20
26
|
export declare class ContextManager {
|
|
21
27
|
private config;
|
|
22
28
|
private toolCallHashes;
|
|
@@ -29,7 +35,10 @@ export declare class ContextManager {
|
|
|
29
35
|
private lastActualAtMessageCount;
|
|
30
36
|
/** Path to session transcript — passed to summary compaction for on-demand access. */
|
|
31
37
|
private transcriptPath;
|
|
38
|
+
/** Notified whenever a non-trivial compaction tier fires (skips microcompact). */
|
|
39
|
+
private onCompact;
|
|
32
40
|
constructor(config?: Partial<ContextManagerConfig>);
|
|
41
|
+
setOnCompact(fn: OnCompactFn): void;
|
|
33
42
|
/**
|
|
34
43
|
* Record actual token usage from API response.
|
|
35
44
|
* Used for hybrid estimation: actual + estimate for new messages.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runtime accessor for the OpenRouter model snapshot.
|
|
3
|
+
*
|
|
4
|
+
* The snapshot is generated at build time by `scripts/sync-models.ts`
|
|
5
|
+
* from https://openrouter.ai/api/v1/models. Reading happens lazily on
|
|
6
|
+
* first call, so the JSON is parsed at most once per process.
|
|
7
|
+
*
|
|
8
|
+
* If the snapshot is missing or empty (e.g. first checkout before a
|
|
9
|
+
* build, or sync failure with no prior file), accessors return [] and
|
|
10
|
+
* callers should fall back to hardcoded defaults.
|
|
11
|
+
*/
|
|
12
|
+
export interface OpenRouterModel {
|
|
13
|
+
id: string;
|
|
14
|
+
name: string;
|
|
15
|
+
created: number;
|
|
16
|
+
contextLength: number;
|
|
17
|
+
maxOutputTokens: number;
|
|
18
|
+
inputPricePerMillion: number;
|
|
19
|
+
outputPricePerMillion: number;
|
|
20
|
+
modalities: string[];
|
|
21
|
+
}
|
|
22
|
+
interface Snapshot {
|
|
23
|
+
fetchedAt: string;
|
|
24
|
+
source: string;
|
|
25
|
+
count: number;
|
|
26
|
+
models: OpenRouterModel[];
|
|
27
|
+
}
|
|
28
|
+
/** Replace the in-memory snapshot for the rest of this process. */
|
|
29
|
+
export declare function setOpenRouterSnapshot(next: Snapshot): void;
|
|
30
|
+
export declare function getOpenRouterSnapshot(): Snapshot;
|
|
31
|
+
export declare function getOpenRouterModels(): OpenRouterModel[];
|
|
32
|
+
export declare function findOpenRouterModel(id: string): OpenRouterModel | undefined;
|
|
33
|
+
/** Models filtered by vendor prefix, e.g. "anthropic", "openai", "deepseek". */
|
|
34
|
+
export declare function listOpenRouterModelsByVendor(vendor: string): OpenRouterModel[];
|
|
35
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runtime sync of the OpenRouter model catalog.
|
|
3
|
+
*
|
|
4
|
+
* Fetches openrouter.ai/api/v1/models and replaces the bundled snapshot
|
|
5
|
+
* in memory for the rest of the process. Used by the /sync-models slash
|
|
6
|
+
* command. To persist a sync across restarts, re-run the build (which
|
|
7
|
+
* re-runs scripts/sync-models.ts).
|
|
8
|
+
*/
|
|
9
|
+
import { getOpenRouterSnapshot } from "./openrouter-models.js";
|
|
10
|
+
export interface SyncResult {
|
|
11
|
+
ok: boolean;
|
|
12
|
+
count: number;
|
|
13
|
+
error?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare function syncOpenRouterCatalog(timeoutMs?: number): Promise<SyncResult>;
|
|
16
|
+
export { getOpenRouterSnapshot };
|
package/dist/engine/engine.d.ts
CHANGED
|
@@ -5,9 +5,11 @@ import type { LLMConfig, StreamCallback, TerminalReason, TokenUsage } from "../t
|
|
|
5
5
|
import { ToolRegistry } from "../tool-system/registry.js";
|
|
6
6
|
import { type ApprovalBackend } from "../tool-system/permission.js";
|
|
7
7
|
import { HookRegistry } from "../hooks/registry.js";
|
|
8
|
+
import type { HookEventName } from "../hooks/events.js";
|
|
9
|
+
import type { HookHandler } from "../hooks/registry.js";
|
|
8
10
|
import { SessionManager } from "../session/session-manager.js";
|
|
9
11
|
import type { CostStateStore } from "./cost-store.js";
|
|
10
|
-
import {
|
|
12
|
+
import type { AskUserFn } from "../tool-system/builtin/ask-user.js";
|
|
11
13
|
import { type AgentPresetName } from "../preset/index.js";
|
|
12
14
|
import { ModelPool, type ModelEntry } from "../llm/model-pool.js";
|
|
13
15
|
export interface EngineConfig {
|
|
@@ -24,6 +26,7 @@ export interface EngineConfig {
|
|
|
24
26
|
sessionStorageDir?: string;
|
|
25
27
|
maxContextTokens?: number;
|
|
26
28
|
approvalBackend?: ApprovalBackend;
|
|
29
|
+
hooks?: EngineHookConfig[];
|
|
27
30
|
askUser?: AskUserFn;
|
|
28
31
|
mcpServers?: Record<string, import("../types.js").MCPServerConfig>;
|
|
29
32
|
/**
|
|
@@ -34,6 +37,12 @@ export interface EngineConfig {
|
|
|
34
37
|
*/
|
|
35
38
|
costStore?: CostStateStore;
|
|
36
39
|
}
|
|
40
|
+
export interface EngineHookConfig {
|
|
41
|
+
event: HookEventName;
|
|
42
|
+
handler: HookHandler;
|
|
43
|
+
priority?: number;
|
|
44
|
+
name?: string;
|
|
45
|
+
}
|
|
37
46
|
export interface EngineResult {
|
|
38
47
|
text: string;
|
|
39
48
|
reason: TerminalReason;
|
|
@@ -49,12 +58,25 @@ export declare class Engine {
|
|
|
49
58
|
private sessionManager;
|
|
50
59
|
private mcpManager;
|
|
51
60
|
private modelPool;
|
|
61
|
+
private settingsManager;
|
|
62
|
+
private lastContextManager;
|
|
63
|
+
private lastMessages;
|
|
64
|
+
private lastSessionId;
|
|
65
|
+
private compactedMessagesBySession;
|
|
66
|
+
private activePermission;
|
|
67
|
+
private resolveMaxContextTokens;
|
|
52
68
|
constructor(config: EngineConfig);
|
|
53
69
|
/**
|
|
54
70
|
* Register a custom tool (from product adapter) into the tool registry.
|
|
55
71
|
* Must be called before run().
|
|
56
72
|
*/
|
|
57
73
|
registerCustomTool(definition: import("../types.js").RegisteredTool, executor: (args: Record<string, unknown>) => Promise<string>): void;
|
|
74
|
+
/**
|
|
75
|
+
* Inject the askUser handler after construction. Used by AgentServer
|
|
76
|
+
* to wire its protocol-backed askUser into an Engine that was created
|
|
77
|
+
* before the server existed (chicken-and-egg: server takes engine in ctor).
|
|
78
|
+
*/
|
|
79
|
+
setAskUser(fn: AskUserFn | undefined): void;
|
|
58
80
|
/**
|
|
59
81
|
* Run a task from start to finish.
|
|
60
82
|
*/
|
|
@@ -91,11 +113,24 @@ export declare class Engine {
|
|
|
91
113
|
after: number;
|
|
92
114
|
strategy: string;
|
|
93
115
|
};
|
|
116
|
+
private stripUserContextMessage;
|
|
117
|
+
private getSettingsManager;
|
|
94
118
|
/**
|
|
95
119
|
* Update a config setting at runtime.
|
|
96
120
|
*/
|
|
97
121
|
updateConfig(key: string, value: unknown): void;
|
|
98
|
-
/**
|
|
99
|
-
|
|
100
|
-
|
|
122
|
+
/**
|
|
123
|
+
* Read a settings value by dotted key (e.g. "arena.participants").
|
|
124
|
+
* Returns undefined if any segment is missing.
|
|
125
|
+
*/
|
|
126
|
+
readSetting(key: string): unknown;
|
|
127
|
+
private buildPermissionConfig;
|
|
128
|
+
/**
|
|
129
|
+
* Switch permission mode at runtime. Takes effect immediately for any
|
|
130
|
+
* in-flight ToolExecutor (which holds a reference to the same classifier),
|
|
131
|
+
* and the new mode is used for any subsequent run() calls.
|
|
132
|
+
* Session-only — does not persist to settings.
|
|
133
|
+
*/
|
|
134
|
+
setPermissionMode(mode: NonNullable<EngineConfig["permissionMode"]>): void;
|
|
135
|
+
getPermissionMode(): NonNullable<EngineConfig["permissionMode"]>;
|
|
101
136
|
}
|
|
@@ -26,20 +26,29 @@ export interface TurnLoopDeps {
|
|
|
26
26
|
systemPrompt: string;
|
|
27
27
|
tools: import("../types.js").ToolDefinition[];
|
|
28
28
|
}
|
|
29
|
+
export interface TurnLoopResult {
|
|
30
|
+
text: string;
|
|
31
|
+
reason: TerminalReason;
|
|
32
|
+
messages: Message[];
|
|
33
|
+
}
|
|
29
34
|
export declare class TurnLoop {
|
|
30
35
|
private readonly deps;
|
|
31
36
|
private readonly config;
|
|
32
37
|
private turnCount;
|
|
33
38
|
/** Tool IDs already emitted as tool_use_start during streaming (to avoid duplicates). */
|
|
34
39
|
private streamedToolIds;
|
|
40
|
+
/**
|
|
41
|
+
* Turn-scoped child logger set at the top of each loop iteration. Class
|
|
42
|
+
* methods invoked inside the iteration (callModelWithFallback,
|
|
43
|
+
* executeToolCall, ...) read it instead of using the root `logger`, so
|
|
44
|
+
* every line they write is tagged with the current turn/turnId.
|
|
45
|
+
*/
|
|
46
|
+
private currentTurnLog;
|
|
35
47
|
constructor(deps: TurnLoopDeps, config: TurnLoopConfig);
|
|
36
48
|
/**
|
|
37
49
|
* Run the multi-turn agent loop until completion.
|
|
38
50
|
*/
|
|
39
|
-
run(initialMessages: Message[]): Promise<
|
|
40
|
-
text: string;
|
|
41
|
-
reason: TerminalReason;
|
|
42
|
-
}>;
|
|
51
|
+
run(initialMessages: Message[]): Promise<TurnLoopResult>;
|
|
43
52
|
/**
|
|
44
53
|
* Call model with streaming fallback.
|
|
45
54
|
* If streaming fails, emit tombstone and retry non-streaming.
|
|
@@ -12,3 +12,9 @@ export interface TurnState {
|
|
|
12
12
|
terminalReason?: TerminalReason;
|
|
13
13
|
}
|
|
14
14
|
export declare function initialTurnState(turnNumber: number): TurnState;
|
|
15
|
+
/**
|
|
16
|
+
* Short, human-readable turn correlation ID. Stamped on every log entry
|
|
17
|
+
* written for the duration of one turn so `jq 'select(.turnId == "abc123")'`
|
|
18
|
+
* pulls a single turn's whole timeline out of the daily log file.
|
|
19
|
+
*/
|
|
20
|
+
export declare function newTurnId(): string;
|
package/dist/index.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk3CAZIWUAcjs = require('./chunk-3CAZIWUA.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkJHXNOB5Gcjs = require('./chunk-JHXNOB5G.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -44,24 +44,18 @@ var _chunkR32DJSJEcjs = require('./chunk-R32DJSJE.cjs');
|
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
|
|
47
|
-
var _chunkQHDYFC5Ucjs = require('./chunk-QHDYFC5U.cjs');
|
|
48
47
|
|
|
49
48
|
|
|
50
|
-
var _chunk3QR52LL5cjs = require('./chunk-3QR52LL5.cjs');
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
var _chunkUK2SU23Scjs = require('./chunk-UK2SU23S.cjs');
|
|
54
|
-
|
|
55
49
|
|
|
56
50
|
|
|
51
|
+
var _chunkVWFET3MGcjs = require('./chunk-VWFET3MG.cjs');
|
|
57
52
|
|
|
58
53
|
|
|
54
|
+
var _chunkKOGV6PDQcjs = require('./chunk-KOGV6PDQ.cjs');
|
|
59
55
|
|
|
60
|
-
var _chunkFGZGCFJXcjs = require('./chunk-FGZGCFJX.cjs');
|
|
61
|
-
require('./chunk-JT2WSQSR.cjs');
|
|
62
56
|
|
|
57
|
+
var _chunkC7C7ZZY4cjs = require('./chunk-C7C7ZZY4.cjs');
|
|
63
58
|
|
|
64
|
-
var _chunkBMH65OVBcjs = require('./chunk-BMH65OVB.cjs');
|
|
65
59
|
|
|
66
60
|
|
|
67
61
|
|
|
@@ -69,22 +63,22 @@ var _chunkBMH65OVBcjs = require('./chunk-BMH65OVB.cjs');
|
|
|
69
63
|
|
|
70
64
|
|
|
71
65
|
|
|
66
|
+
var _chunkYD7XTI7Tcjs = require('./chunk-YD7XTI7T.cjs');
|
|
72
67
|
|
|
73
|
-
var _chunkLRAY5IYCcjs = require('./chunk-LRAY5IYC.cjs');
|
|
74
|
-
require('./chunk-HD7MT5XU.cjs');
|
|
75
68
|
|
|
69
|
+
var _chunkM2QI5X3Xcjs = require('./chunk-M2QI5X3X.cjs');
|
|
76
70
|
|
|
77
|
-
var _chunk3EAEC566cjs = require('./chunk-3EAEC566.cjs');
|
|
78
71
|
|
|
79
72
|
|
|
73
|
+
var _chunkOP57WUWQcjs = require('./chunk-OP57WUWQ.cjs');
|
|
80
74
|
|
|
81
75
|
|
|
82
76
|
|
|
83
|
-
var _chunkCSO5EOEPcjs = require('./chunk-CSO5EOEP.cjs');
|
|
84
77
|
|
|
78
|
+
var _chunkFV2ARONZcjs = require('./chunk-FV2ARONZ.cjs');
|
|
85
79
|
|
|
86
80
|
|
|
87
|
-
var
|
|
81
|
+
var _chunk3QR52LL5cjs = require('./chunk-3QR52LL5.cjs');
|
|
88
82
|
|
|
89
83
|
|
|
90
84
|
|
|
@@ -92,7 +86,7 @@ var _chunkNG73UR3Lcjs = require('./chunk-NG73UR3L.cjs');
|
|
|
92
86
|
|
|
93
87
|
|
|
94
88
|
|
|
95
|
-
var
|
|
89
|
+
var _chunkX2DNIMPCcjs = require('./chunk-X2DNIMPC.cjs');
|
|
96
90
|
|
|
97
91
|
|
|
98
92
|
|
|
@@ -120,19 +114,18 @@ var _chunk3EUDE77Ecjs = require('./chunk-3EUDE77E.cjs');
|
|
|
120
114
|
|
|
121
115
|
|
|
122
116
|
|
|
123
|
-
var
|
|
117
|
+
var _chunkHOXQLX5Rcjs = require('./chunk-HOXQLX5R.cjs');
|
|
124
118
|
|
|
125
119
|
|
|
126
|
-
var
|
|
120
|
+
var _chunkBUJ5KYCIcjs = require('./chunk-BUJ5KYCI.cjs');
|
|
127
121
|
|
|
128
122
|
|
|
129
|
-
var
|
|
123
|
+
var _chunkYAFCN7ZWcjs = require('./chunk-YAFCN7ZW.cjs');
|
|
130
124
|
|
|
131
125
|
|
|
132
|
-
var
|
|
126
|
+
var _chunkGZBD6QRScjs = require('./chunk-GZBD6QRS.cjs');
|
|
133
127
|
|
|
134
128
|
|
|
135
|
-
var _chunkDICG4AB7cjs = require('./chunk-DICG4AB7.cjs');
|
|
136
129
|
|
|
137
130
|
|
|
138
131
|
|
|
@@ -144,17 +137,17 @@ var _chunkDICG4AB7cjs = require('./chunk-DICG4AB7.cjs');
|
|
|
144
137
|
|
|
145
138
|
|
|
146
139
|
|
|
140
|
+
var _chunkEL2RL5DGcjs = require('./chunk-EL2RL5DG.cjs');
|
|
147
141
|
|
|
148
142
|
|
|
149
|
-
var
|
|
150
|
-
require('./chunk-XHC2JMEC.cjs');
|
|
143
|
+
var _chunkJHNCK7JPcjs = require('./chunk-JHNCK7JP.cjs');
|
|
151
144
|
|
|
152
145
|
|
|
153
146
|
var _chunkIJSHQGMPcjs = require('./chunk-IJSHQGMP.cjs');
|
|
154
147
|
|
|
155
148
|
// src/index.ts
|
|
156
149
|
_chunkIJSHQGMPcjs.init_cjs_shims.call(void 0, );
|
|
157
|
-
|
|
150
|
+
_chunkYD7XTI7Tcjs.init_compaction.call(void 0, );
|
|
158
151
|
|
|
159
152
|
// src/arena/detect-mode.ts
|
|
160
153
|
_chunkIJSHQGMPcjs.init_cjs_shims.call(void 0, );
|
|
@@ -219,8 +212,6 @@ function detectArenaMode(topic) {
|
|
|
219
212
|
}
|
|
220
213
|
|
|
221
214
|
// src/index.ts
|
|
222
|
-
_chunkFGZGCFJXcjs.init_manager.call(void 0, );
|
|
223
|
-
_chunkFGZGCFJXcjs.init_schema.call(void 0, );
|
|
224
215
|
var VERSION = "0.1.0";
|
|
225
216
|
|
|
226
217
|
|
|
@@ -333,4 +324,4 @@ var VERSION = "0.1.0";
|
|
|
333
324
|
|
|
334
325
|
|
|
335
326
|
|
|
336
|
-
exports.AnthropicClient =
|
|
327
|
+
exports.AnthropicClient = _chunkBUJ5KYCIcjs.AnthropicClient; exports.Arena = _chunkHOXQLX5Rcjs.Arena; exports.ArenaLedger = _chunkHOXQLX5Rcjs.ArenaLedger; exports.ArtifactTracker = _chunkVWFET3MGcjs.ArtifactTracker; exports.AutoApprovalBackend = _chunkVWFET3MGcjs.AutoApprovalBackend; exports.BUILTIN_AGENT_PRESETS = _chunkVWFET3MGcjs.BUILTIN_AGENT_PRESETS; exports.BUILTIN_TOOLS = _chunkVWFET3MGcjs.BUILTIN_TOOLS; exports.CheckpointWriter = _chunkVWFET3MGcjs.CheckpointWriter; exports.CompositeEvaluator = _chunkVWFET3MGcjs.CompositeEvaluator; exports.ConfigError = _chunkEL2RL5DGcjs.ConfigError; exports.ContextLimitError = _chunkEL2RL5DGcjs.ContextLimitError; exports.ContextManager = _chunkVWFET3MGcjs.ContextManager; exports.DEFAULT_AGENT_PRESET = _chunkVWFET3MGcjs.DEFAULT_AGENT_PRESET; exports.DEFAULT_CLI_PRESET = _chunkVWFET3MGcjs.DEFAULT_CLI_PRESET; exports.DiscussionStrategy = _chunkHOXQLX5Rcjs.DiscussionStrategy; exports.Engine = _chunkVWFET3MGcjs.Engine; exports.EngineRunner = _chunkVWFET3MGcjs.EngineRunner; exports.FileHistory = _chunk3QR52LL5cjs.FileHistory; exports.FileRunStore = _chunkVWFET3MGcjs.FileRunStore; exports.FrameworkError = _chunkEL2RL5DGcjs.FrameworkError; exports.HeadlessApprovalBackend = _chunkVWFET3MGcjs.HeadlessApprovalBackend; exports.Heartbeat = _chunkVWFET3MGcjs.Heartbeat; exports.HookRegistry = _chunkVWFET3MGcjs.HookRegistry; exports.IterativeArena = _chunkX2DNIMPCcjs.IterativeArena; exports.LLMClientBase = _chunkGZBD6QRScjs.LLMClientBase; exports.LLMError = _chunkEL2RL5DGcjs.LLMError; exports.LLMRateLimitError = _chunkEL2RL5DGcjs.LLMRateLimitError; exports.MCPManager = _chunkC7C7ZZY4cjs.MCPManager; exports.MODEL_PRESETS = _chunkHOXQLX5Rcjs.MODEL_PRESETS; exports.MemoryManager = _chunkM2QI5X3Xcjs.MemoryManager; exports.ModelPool = _chunkKOGV6PDQcjs.ModelPool; exports.NoopEvaluator = _chunkVWFET3MGcjs.NoopEvaluator; exports.OpenAIClient = _chunkYAFCN7ZWcjs.OpenAIClient; exports.PermissionClassifier = _chunkVWFET3MGcjs.PermissionClassifier; exports.PermissionDeniedError = _chunkEL2RL5DGcjs.PermissionDeniedError; exports.PlanningStrategy = _chunkHOXQLX5Rcjs.PlanningStrategy; exports.PromptComposer = _chunkVWFET3MGcjs.PromptComposer; exports.ReviewStrategy = _chunkHOXQLX5Rcjs.ReviewStrategy; exports.RunApprovalBackend = _chunkVWFET3MGcjs.RunApprovalBackend; exports.RunLock = _chunkVWFET3MGcjs.RunLock; exports.RunManager = _chunkVWFET3MGcjs.RunManager; exports.RunQueue = _chunkVWFET3MGcjs.RunQueue; exports.SectionCache = _chunkVWFET3MGcjs.SectionCache; exports.SessionError = _chunkEL2RL5DGcjs.SessionError; exports.SessionManager = _chunkOP57WUWQcjs.SessionManager; exports.SettingsManager = _chunkFV2ARONZcjs.SettingsManager; exports.SettingsSchema = _chunkFV2ARONZcjs.SettingsSchema; exports.ToolError = _chunkEL2RL5DGcjs.ToolError; exports.ToolExecutionError = _chunkEL2RL5DGcjs.ToolExecutionError; exports.ToolExecutor = _chunkVWFET3MGcjs.ToolExecutor; exports.ToolNotFoundError = _chunkEL2RL5DGcjs.ToolNotFoundError; exports.ToolRegistry = _chunkVWFET3MGcjs.ToolRegistry; exports.ToolTimeoutError = _chunkEL2RL5DGcjs.ToolTimeoutError; exports.Transcript = _chunkOP57WUWQcjs.Transcript; exports.TranscriptError = _chunkEL2RL5DGcjs.TranscriptError; exports.VALID_TRANSITIONS = _chunkVWFET3MGcjs.VALID_TRANSITIONS; exports.VERSION = VERSION; exports.applyReviewResult = _chunkHOXQLX5Rcjs.applyReviewResult; exports.applySummaryCompaction = _chunkYD7XTI7Tcjs.applySummaryCompaction; exports.availableSections = _chunkVWFET3MGcjs.availableSections; exports.buildDigest = _chunkHOXQLX5Rcjs.buildDigest; exports.buildPresetSystemPrompt = _chunkVWFET3MGcjs.buildPresetSystemPrompt; exports.buildSkillListing = _chunkVWFET3MGcjs.buildSkillListing; exports.buildSummarizationPrompt = _chunkYD7XTI7Tcjs.buildSummarizationPrompt; exports.collectEvidence = _chunkHOXQLX5Rcjs.collectEvidence; exports.combineInstructions = _chunkVWFET3MGcjs.combineInstructions; exports.createLLMClient = _chunkHOXQLX5Rcjs.createLLMClient; exports.createRunAskUserFn = _chunkVWFET3MGcjs.createRunAskUserFn; exports.createRunManager = _chunkJHXNOB5Gcjs.createRunManager; exports.defaultIterateConvergence = _chunkX2DNIMPCcjs.defaultConvergence; exports.defineProduct = _chunk3CAZIWUAcjs.defineProduct; exports.detectArenaMode = detectArenaMode; exports.estimateTokens = _chunkYD7XTI7Tcjs.estimateTokens; exports.formatDigest = _chunkHOXQLX5Rcjs.formatDigest; exports.getIterateFormat = _chunkX2DNIMPCcjs.getFormat; exports.getMaxOutputTokens = _chunkHOXQLX5Rcjs.getMaxOutputTokens; exports.getStrategy = _chunkHOXQLX5Rcjs.getStrategy; exports.getStrategyForPlan = _chunkHOXQLX5Rcjs.getStrategyForPlan; exports.hasTools = _chunkHOXQLX5Rcjs.hasTools; exports.isTerminal = _chunkHOXQLX5Rcjs.isTerminal; exports.iterateCodeFormat = _chunkX2DNIMPCcjs.codeFormat; exports.iterateDiffRatio = _chunkX2DNIMPCcjs.diffRatio; exports.iterateDocumentFormat = _chunkX2DNIMPCcjs.documentFormat; exports.listPresetNames = _chunkVWFET3MGcjs.listPresetNames; exports.loadSection = _chunkVWFET3MGcjs.loadSection; exports.loadSections = _chunkVWFET3MGcjs.loadSections; exports.logger = _chunkJHNCK7JPcjs.logger; exports.markUnderReview = _chunkHOXQLX5Rcjs.markUnderReview; exports.markUnresolved = _chunkHOXQLX5Rcjs.markUnresolved; exports.matchSkillsByInput = _chunkVWFET3MGcjs.matchSkillsByInput; exports.matchSkillsByTool = _chunkVWFET3MGcjs.matchSkillsByTool; exports.microcompact = _chunkYD7XTI7Tcjs.microcompact; exports.planArena = _chunkHOXQLX5Rcjs.planArena; exports.registerClaims = _chunkHOXQLX5Rcjs.registerClaims; exports.registerPreset = _chunkVWFET3MGcjs.registerPreset; exports.registerProvider = _chunkHOXQLX5Rcjs.registerProvider; exports.registerSection = _chunkVWFET3MGcjs.registerSection; exports.resolveAgentPreset = _chunkVWFET3MGcjs.resolveAgentPreset; exports.resolveBuiltinToolNames = _chunkVWFET3MGcjs.resolveBuiltinToolNames; exports.resolveClaimStatus = _chunkHOXQLX5Rcjs.resolveClaimStatus; exports.scanInstructions = _chunkVWFET3MGcjs.scanInstructions; exports.scanSkills = _chunkVWFET3MGcjs.scanSkills; exports.selectClaimsForReview = _chunkHOXQLX5Rcjs.selectClaimsForReview; exports.selectTools = _chunkHOXQLX5Rcjs.selectTools; exports.taskManager = _chunkVWFET3MGcjs.taskManager; exports.transitionClaim = _chunkHOXQLX5Rcjs.transitionClaim; exports.truncateToolResult = _chunkYD7XTI7Tcjs.truncateToolResult; exports.validTransitions = _chunkHOXQLX5Rcjs.validTransitions; exports.validateSettings = _chunkFV2ARONZcjs.validateSettings; exports.windowCompact = _chunkYD7XTI7Tcjs.windowCompact;
|
package/dist/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export declare const VERSION = "0.1.0";
|
|
|
7
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
8
|
export { FrameworkError, LLMError, LLMRateLimitError, ContextLimitError, ToolError, ToolNotFoundError, ToolExecutionError, ToolTimeoutError, PermissionDeniedError, SessionError, TranscriptError, ConfigError, } from "./exceptions.js";
|
|
9
9
|
export { Engine } from "./engine/engine.js";
|
|
10
|
-
export type { EngineConfig, EngineResult } from "./engine/engine.js";
|
|
10
|
+
export type { EngineConfig, EngineHookConfig, EngineResult } from "./engine/engine.js";
|
|
11
11
|
export type { CostStateStore, CostStateSnapshot } from "./engine/cost-store.js";
|
|
12
12
|
export { LLMClientBase } from "./llm/client-base.js";
|
|
13
13
|
export { createLLMClient, registerProvider } from "./llm/client-factory.js";
|