@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/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
defineProduct
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-REFCCVDM.js";
|
|
4
4
|
import {
|
|
5
5
|
createRunManager
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-SW3L7HIM.js";
|
|
7
7
|
import {
|
|
8
8
|
ArtifactTracker,
|
|
9
9
|
AutoApprovalBackend,
|
|
@@ -33,35 +33,28 @@ import {
|
|
|
33
33
|
VALID_TRANSITIONS,
|
|
34
34
|
availableSections,
|
|
35
35
|
buildPresetSystemPrompt,
|
|
36
|
+
buildSkillListing,
|
|
36
37
|
combineInstructions,
|
|
37
38
|
createRunAskUserFn,
|
|
38
39
|
listPresetNames,
|
|
39
40
|
loadSection,
|
|
40
41
|
loadSections,
|
|
42
|
+
matchSkillsByInput,
|
|
43
|
+
matchSkillsByTool,
|
|
41
44
|
registerPreset,
|
|
42
45
|
registerSection,
|
|
43
46
|
resolveAgentPreset,
|
|
44
47
|
resolveBuiltinToolNames,
|
|
45
48
|
scanInstructions,
|
|
49
|
+
scanSkills,
|
|
46
50
|
taskManager
|
|
47
|
-
} from "./chunk-
|
|
48
|
-
import {
|
|
49
|
-
FileHistory
|
|
50
|
-
} from "./chunk-SK62UVS6.js";
|
|
51
|
+
} from "./chunk-ID6EJUHP.js";
|
|
51
52
|
import {
|
|
52
53
|
ModelPool
|
|
53
|
-
} from "./chunk-
|
|
54
|
-
import {
|
|
55
|
-
SettingsManager,
|
|
56
|
-
SettingsSchema,
|
|
57
|
-
init_manager,
|
|
58
|
-
init_schema,
|
|
59
|
-
validateSettings
|
|
60
|
-
} from "./chunk-6ZIROYXX.js";
|
|
61
|
-
import "./chunk-OG4MIQJ6.js";
|
|
54
|
+
} from "./chunk-F5BS3GUC.js";
|
|
62
55
|
import {
|
|
63
56
|
MCPManager
|
|
64
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-2EUAE7AY.js";
|
|
65
58
|
import {
|
|
66
59
|
applySummaryCompaction,
|
|
67
60
|
buildSummarizationPrompt,
|
|
@@ -70,21 +63,22 @@ import {
|
|
|
70
63
|
microcompact,
|
|
71
64
|
truncateToolResult,
|
|
72
65
|
windowCompact
|
|
73
|
-
} from "./chunk-
|
|
74
|
-
import "./chunk-4RRUP4MM.js";
|
|
66
|
+
} from "./chunk-5C5HIOML.js";
|
|
75
67
|
import {
|
|
76
68
|
MemoryManager
|
|
77
|
-
} from "./chunk-
|
|
78
|
-
import {
|
|
79
|
-
buildSkillListing,
|
|
80
|
-
matchSkillsByInput,
|
|
81
|
-
matchSkillsByTool,
|
|
82
|
-
scanSkills
|
|
83
|
-
} from "./chunk-4SFPFHMG.js";
|
|
69
|
+
} from "./chunk-I57ZD5IQ.js";
|
|
84
70
|
import {
|
|
85
71
|
SessionManager,
|
|
86
72
|
Transcript
|
|
87
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-ZLPJJZUW.js";
|
|
74
|
+
import {
|
|
75
|
+
SettingsManager,
|
|
76
|
+
SettingsSchema,
|
|
77
|
+
validateSettings
|
|
78
|
+
} from "./chunk-75E4BBFC.js";
|
|
79
|
+
import {
|
|
80
|
+
FileHistory
|
|
81
|
+
} from "./chunk-SK62UVS6.js";
|
|
88
82
|
import {
|
|
89
83
|
IterativeArena,
|
|
90
84
|
codeFormat,
|
|
@@ -92,7 +86,7 @@ import {
|
|
|
92
86
|
diffRatio,
|
|
93
87
|
documentFormat,
|
|
94
88
|
getFormat
|
|
95
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-OUC2DFA7.js";
|
|
96
90
|
import {
|
|
97
91
|
Arena,
|
|
98
92
|
ArenaLedger,
|
|
@@ -120,19 +114,16 @@ import {
|
|
|
120
114
|
selectTools,
|
|
121
115
|
transitionClaim,
|
|
122
116
|
validTransitions
|
|
123
|
-
} from "./chunk-
|
|
124
|
-
import {
|
|
125
|
-
logger
|
|
126
|
-
} from "./chunk-X4HAERTQ.js";
|
|
117
|
+
} from "./chunk-Y7TSCDF6.js";
|
|
127
118
|
import {
|
|
128
119
|
AnthropicClient
|
|
129
|
-
} from "./chunk-
|
|
120
|
+
} from "./chunk-M2SVOKC6.js";
|
|
130
121
|
import {
|
|
131
122
|
OpenAIClient
|
|
132
|
-
} from "./chunk-
|
|
123
|
+
} from "./chunk-LMEKCQX4.js";
|
|
133
124
|
import {
|
|
134
125
|
LLMClientBase
|
|
135
|
-
} from "./chunk-
|
|
126
|
+
} from "./chunk-SCDKLTN3.js";
|
|
136
127
|
import {
|
|
137
128
|
ConfigError,
|
|
138
129
|
ContextLimitError,
|
|
@@ -147,7 +138,9 @@ import {
|
|
|
147
138
|
ToolTimeoutError,
|
|
148
139
|
TranscriptError
|
|
149
140
|
} from "./chunk-FUOKLKR2.js";
|
|
150
|
-
import
|
|
141
|
+
import {
|
|
142
|
+
logger
|
|
143
|
+
} from "./chunk-ZRVPCXI7.js";
|
|
151
144
|
import {
|
|
152
145
|
init_esm_shims
|
|
153
146
|
} from "./chunk-DI7RDLOS.js";
|
|
@@ -219,8 +212,6 @@ function detectArenaMode(topic) {
|
|
|
219
212
|
}
|
|
220
213
|
|
|
221
214
|
// src/index.ts
|
|
222
|
-
init_manager();
|
|
223
|
-
init_schema();
|
|
224
215
|
var VERSION = "0.1.0";
|
|
225
216
|
export {
|
|
226
217
|
AnthropicClient,
|
|
@@ -12,6 +12,13 @@ export declare abstract class LLMClientBase {
|
|
|
12
12
|
readonly timeout: number;
|
|
13
13
|
readonly retryMaxAttempts: number;
|
|
14
14
|
readonly enableStreaming: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Process-wide hook fired on every LLM response. The CLI installs this in
|
|
17
|
+
* main.ts to feed the cost tracker; lives on the base class so every code
|
|
18
|
+
* path (REPL, run, arena, sub-agents) reports through one funnel without
|
|
19
|
+
* each call site needing to remember.
|
|
20
|
+
*/
|
|
21
|
+
static onUsage?: (model: string, usage: TokenUsage) => void;
|
|
15
22
|
protected usage: LLMUsageTracker;
|
|
16
23
|
constructor(config: LLMConfig);
|
|
17
24
|
protected abstract initClient(): void;
|
package/dist/llm/model-pool.d.ts
CHANGED
|
@@ -24,6 +24,8 @@ export interface ModelEntry {
|
|
|
24
24
|
baseUrl?: string;
|
|
25
25
|
apiKey?: string;
|
|
26
26
|
maxOutputTokens?: number;
|
|
27
|
+
/** Per-model context window size. Falls back to config.maxContextTokens → 200_000. */
|
|
28
|
+
maxContextTokens?: number;
|
|
27
29
|
}
|
|
28
30
|
export declare class ModelPool {
|
|
29
31
|
private models;
|
|
@@ -35,6 +37,8 @@ export declare class ModelPool {
|
|
|
35
37
|
constructor(entries?: ModelEntry[], defaultKey?: string);
|
|
36
38
|
/** Register a model at runtime. */
|
|
37
39
|
register(entry: ModelEntry): void;
|
|
40
|
+
/** Fill in known defaults (e.g. context window for DeepSeek V4) when the entry doesn't specify them. */
|
|
41
|
+
private withBuiltinDefaults;
|
|
38
42
|
/** Switch the active model. Throws if key not found. */
|
|
39
43
|
switch(key: string): ModelEntry;
|
|
40
44
|
/** Get a model by key. No key = active model. Returns undefined if not found. */
|
package/dist/logging/logger.d.ts
CHANGED
|
@@ -1,19 +1,80 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Unified file logger for code-shell.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* Single sink: ~/.code-shell/logs/YYYY-MM-DD.log (JSON Lines).
|
|
5
|
+
*
|
|
6
|
+
* Level defaults:
|
|
7
|
+
* - Local dev (CODE_SHELL_DEV=1, or running from src/, or --debug) → "debug"
|
|
8
|
+
* - Otherwise → "info"
|
|
9
|
+
* - CODE_SHELL_LOG_LEVEL overrides everything.
|
|
10
|
+
*
|
|
11
|
+
* Category filter (--debug=mcp,api or CODE_SHELL_DEBUG=mcp,api):
|
|
12
|
+
* When set, only logs whose `cat` matches are written.
|
|
13
|
+
*
|
|
14
|
+
* Disable entirely: CODE_SHELL_LOG=0
|
|
5
15
|
*/
|
|
6
16
|
export type LogLevel = "debug" | "info" | "warn" | "error";
|
|
17
|
+
export declare function setCurrentSid(sid: string): void;
|
|
18
|
+
export declare function getCurrentSid(): string;
|
|
19
|
+
export declare function getInMemoryErrors(): ReadonlyArray<{
|
|
20
|
+
msg: string;
|
|
21
|
+
t: string;
|
|
22
|
+
data?: unknown;
|
|
23
|
+
}>;
|
|
24
|
+
export type ErrorLogSink = {
|
|
25
|
+
logError: (error: Error) => void;
|
|
26
|
+
logMCPError: (serverName: string, error: unknown) => void;
|
|
27
|
+
logMCPDebug: (serverName: string, message: string) => void;
|
|
28
|
+
getErrorsPath: () => string;
|
|
29
|
+
getMCPLogsPath: (serverName: string) => string;
|
|
30
|
+
};
|
|
31
|
+
export declare function attachErrorLogSink(sink: ErrorLogSink): void;
|
|
32
|
+
export interface LogContext {
|
|
33
|
+
cat?: string;
|
|
34
|
+
sid?: string;
|
|
35
|
+
[key: string]: unknown;
|
|
36
|
+
}
|
|
7
37
|
declare class Logger {
|
|
8
|
-
private
|
|
9
|
-
private
|
|
10
|
-
private
|
|
11
|
-
|
|
38
|
+
private readonly context;
|
|
39
|
+
private readonly enabled;
|
|
40
|
+
private readonly minLevel;
|
|
41
|
+
private readonly categoryFilter;
|
|
42
|
+
private readonly stderrEcho;
|
|
43
|
+
private dirReady;
|
|
44
|
+
constructor(context?: LogContext);
|
|
45
|
+
child(extra: LogContext): Logger;
|
|
46
|
+
/**
|
|
47
|
+
* Set the session id stamped on every subsequent log entry written by
|
|
48
|
+
* any logger in the process. Called by Engine once a run's
|
|
49
|
+
* authoritative session id is known.
|
|
50
|
+
*/
|
|
51
|
+
setSid(sid: string): void;
|
|
52
|
+
getSid(): string;
|
|
12
53
|
debug(msg: string, data?: Record<string, unknown>): void;
|
|
13
54
|
info(msg: string, data?: Record<string, unknown>): void;
|
|
14
55
|
warn(msg: string, data?: Record<string, unknown>): void;
|
|
15
|
-
error(
|
|
16
|
-
private
|
|
56
|
+
error(msgOrErr: string | Error | unknown, data?: Record<string, unknown> | Error): void;
|
|
57
|
+
private recordError;
|
|
58
|
+
private write;
|
|
59
|
+
getMinLevel(): LogLevel;
|
|
60
|
+
isCategoryActive(cat: string): boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Open a span: writes a `<name>.begin` debug entry now and returns a handle
|
|
63
|
+
* whose `end()` writes `<name>.end` with `duration_ms` populated. Use for
|
|
64
|
+
* any "I want begin → end + how long" pattern (tool exec, LLM request,
|
|
65
|
+
* permission ask, etc.) so the begin/end pair is grouped under one cat
|
|
66
|
+
* and the duration is computed once instead of by hand from timestamps.
|
|
67
|
+
*/
|
|
68
|
+
span(name: string, data?: Record<string, unknown>): LogSpan;
|
|
69
|
+
}
|
|
70
|
+
export interface LogSpan {
|
|
71
|
+
end(extra?: Record<string, unknown>): void;
|
|
72
|
+
fail(err: unknown, extra?: Record<string, unknown>): void;
|
|
17
73
|
}
|
|
18
74
|
export declare const logger: Logger;
|
|
75
|
+
export declare function getLogsDir(): string;
|
|
76
|
+
export declare function getRecentLogs(n?: number): string[];
|
|
77
|
+
export declare function rotateLogs(): void;
|
|
78
|
+
/** @internal — for tests */
|
|
79
|
+
export declare function _resetLoggerStateForTesting(): void;
|
|
19
80
|
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _chunkM2QI5X3Xcjs = require('./chunk-M2QI5X3X.cjs');
|
|
5
|
+
require('./chunk-IJSHQGMP.cjs');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
exports.MemoryManager = _chunkM2QI5X3Xcjs.MemoryManager; exports.resolveMemoryBaseDir = _chunkM2QI5X3Xcjs.resolveMemoryBaseDir;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Pure-TypeScript port of yoga-layout (Meta's flexbox engine).
|
|
3
3
|
*
|
|
4
|
-
* This matches the `yoga-layout/load` API surface used by src/
|
|
4
|
+
* This matches the `yoga-layout/load` API surface used by src/render/layout/yoga.ts.
|
|
5
5
|
* The upstream C++ source is ~2500 lines in CalculateLayout.cpp alone; this port
|
|
6
6
|
* is a simplified single-pass flexbox implementation that covers the subset of
|
|
7
|
-
* features
|
|
7
|
+
* features the render engine actually uses:
|
|
8
8
|
* - flex-direction (row/column + reverse)
|
|
9
9
|
* - flex-grow / flex-shrink / flex-basis
|
|
10
10
|
* - align-items / align-self (stretch, flex-start, center, flex-end)
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OpenAIClient
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-LMEKCQX4.js";
|
|
4
|
+
import "./chunk-SCDKLTN3.js";
|
|
5
5
|
import "./chunk-FUOKLKR2.js";
|
|
6
|
+
import "./chunk-ZRVPCXI7.js";
|
|
6
7
|
import "./chunk-DI7RDLOS.js";
|
|
7
8
|
export {
|
|
8
9
|
OpenAIClient
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkYAFCN7ZWcjs = require('./chunk-YAFCN7ZW.cjs');
|
|
4
|
+
require('./chunk-GZBD6QRS.cjs');
|
|
5
|
+
require('./chunk-EL2RL5DG.cjs');
|
|
6
|
+
require('./chunk-JHNCK7JP.cjs');
|
|
7
|
+
require('./chunk-IJSHQGMP.cjs');
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
exports.OpenAIClient = _chunkYAFCN7ZWcjs.OpenAIClient;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
findOpenRouterModel,
|
|
3
|
+
getOpenRouterModels,
|
|
4
|
+
getOpenRouterSnapshot,
|
|
5
|
+
listOpenRouterModelsByVendor,
|
|
6
|
+
setOpenRouterSnapshot
|
|
7
|
+
} from "./chunk-OMRGA6TI.js";
|
|
8
|
+
import "./chunk-DI7RDLOS.js";
|
|
9
|
+
export {
|
|
10
|
+
findOpenRouterModel,
|
|
11
|
+
getOpenRouterModels,
|
|
12
|
+
getOpenRouterSnapshot,
|
|
13
|
+
listOpenRouterModelsByVendor,
|
|
14
|
+
setOpenRouterSnapshot
|
|
15
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
var _chunkTATCTZSBcjs = require('./chunk-TATCTZSB.cjs');
|
|
8
|
+
require('./chunk-IJSHQGMP.cjs');
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
exports.findOpenRouterModel = _chunkTATCTZSBcjs.findOpenRouterModel; exports.getOpenRouterModels = _chunkTATCTZSBcjs.getOpenRouterModels; exports.getOpenRouterSnapshot = _chunkTATCTZSBcjs.getOpenRouterSnapshot; exports.listOpenRouterModelsByVendor = _chunkTATCTZSBcjs.listOpenRouterModelsByVendor; exports.setOpenRouterSnapshot = _chunkTATCTZSBcjs.setOpenRouterSnapshot;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkG76E5FOBcjs = require('./chunk-G76E5FOB.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunkTATCTZSBcjs = require('./chunk-TATCTZSB.cjs');
|
|
7
|
+
require('./chunk-IJSHQGMP.cjs');
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
exports.getOpenRouterSnapshot = _chunkTATCTZSBcjs.getOpenRouterSnapshot; exports.syncOpenRouterCatalog = _chunkG76E5FOBcjs.syncOpenRouterCatalog;
|
package/dist/product/index.cjs
CHANGED
|
@@ -1,23 +1,19 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
3
|
+
var _chunk3CAZIWUAcjs = require('../chunk-3CAZIWUA.cjs');
|
|
4
|
+
require('../chunk-VWFET3MG.cjs');
|
|
5
|
+
require('../chunk-KOGV6PDQ.cjs');
|
|
6
|
+
require('../chunk-C7C7ZZY4.cjs');
|
|
7
|
+
require('../chunk-YD7XTI7T.cjs');
|
|
8
|
+
require('../chunk-M2QI5X3X.cjs');
|
|
9
|
+
require('../chunk-OP57WUWQ.cjs');
|
|
10
|
+
require('../chunk-FV2ARONZ.cjs');
|
|
5
11
|
require('../chunk-3QR52LL5.cjs');
|
|
6
|
-
require('../chunk-
|
|
7
|
-
require('../chunk-
|
|
8
|
-
require('../chunk-JT2WSQSR.cjs');
|
|
9
|
-
require('../chunk-BMH65OVB.cjs');
|
|
10
|
-
require('../chunk-LRAY5IYC.cjs');
|
|
11
|
-
require('../chunk-HD7MT5XU.cjs');
|
|
12
|
-
require('../chunk-3EAEC566.cjs');
|
|
13
|
-
require('../chunk-CSO5EOEP.cjs');
|
|
14
|
-
require('../chunk-NG73UR3L.cjs');
|
|
15
|
-
require('../chunk-3EUDE77E.cjs');
|
|
16
|
-
require('../chunk-FVP7XJGS.cjs');
|
|
17
|
-
require('../chunk-IMMTBZ33.cjs');
|
|
12
|
+
require('../chunk-X2DNIMPC.cjs');
|
|
13
|
+
require('../chunk-HOXQLX5R.cjs');
|
|
18
14
|
require('../chunk-EL2RL5DG.cjs');
|
|
19
|
-
require('../chunk-
|
|
15
|
+
require('../chunk-JHNCK7JP.cjs');
|
|
20
16
|
require('../chunk-IJSHQGMP.cjs');
|
|
21
17
|
|
|
22
18
|
|
|
23
|
-
exports.defineProduct =
|
|
19
|
+
exports.defineProduct = _chunk3CAZIWUAcjs.defineProduct;
|
package/dist/product/index.js
CHANGED
|
@@ -1,22 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
defineProduct
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-REFCCVDM.js";
|
|
4
|
+
import "../chunk-ID6EJUHP.js";
|
|
5
|
+
import "../chunk-F5BS3GUC.js";
|
|
6
|
+
import "../chunk-2EUAE7AY.js";
|
|
7
|
+
import "../chunk-5C5HIOML.js";
|
|
8
|
+
import "../chunk-I57ZD5IQ.js";
|
|
9
|
+
import "../chunk-ZLPJJZUW.js";
|
|
10
|
+
import "../chunk-75E4BBFC.js";
|
|
5
11
|
import "../chunk-SK62UVS6.js";
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-OG4MIQJ6.js";
|
|
9
|
-
import "../chunk-BE6IPRDM.js";
|
|
10
|
-
import "../chunk-J5XW6UYL.js";
|
|
11
|
-
import "../chunk-4RRUP4MM.js";
|
|
12
|
-
import "../chunk-4PKZPFCD.js";
|
|
13
|
-
import "../chunk-4SFPFHMG.js";
|
|
14
|
-
import "../chunk-S74VVJBF.js";
|
|
15
|
-
import "../chunk-ZXYDDJEJ.js";
|
|
16
|
-
import "../chunk-SQZHPD3S.js";
|
|
17
|
-
import "../chunk-X4HAERTQ.js";
|
|
12
|
+
import "../chunk-OUC2DFA7.js";
|
|
13
|
+
import "../chunk-Y7TSCDF6.js";
|
|
18
14
|
import "../chunk-FUOKLKR2.js";
|
|
19
|
-
import "../chunk-
|
|
15
|
+
import "../chunk-ZRVPCXI7.js";
|
|
20
16
|
import "../chunk-DI7RDLOS.js";
|
|
21
17
|
export {
|
|
22
18
|
defineProduct
|
package/dist/product/types.d.ts
CHANGED
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
*/
|
|
21
21
|
import type { PermissionRule, MCPServerConfig } from "../types.js";
|
|
22
22
|
import type { Evaluator } from "../run/Evaluator.js";
|
|
23
|
-
import type { HookEventName } from "../hooks/events.js";
|
|
24
23
|
import type { RegisteredTool } from "../types.js";
|
|
24
|
+
import type { EngineHookConfig } from "../engine/engine.js";
|
|
25
25
|
export interface ProductPreset {
|
|
26
26
|
/** Unique name for this product's preset. */
|
|
27
27
|
name: string;
|
|
@@ -75,12 +75,7 @@ export interface ProductAdapter {
|
|
|
75
75
|
* Hooks to register for this product.
|
|
76
76
|
* Key: hook event name, Value: handler function.
|
|
77
77
|
*/
|
|
78
|
-
hooks?:
|
|
79
|
-
event: HookEventName;
|
|
80
|
-
handler: (context: Record<string, unknown>) => Promise<Record<string, unknown>>;
|
|
81
|
-
priority?: number;
|
|
82
|
-
name?: string;
|
|
83
|
-
}>;
|
|
78
|
+
hooks?: EngineHookConfig[];
|
|
84
79
|
}
|
|
85
80
|
export interface ProductContract {
|
|
86
81
|
/**
|
package/dist/protocol/types.d.ts
CHANGED
|
@@ -79,11 +79,11 @@ export interface ConfigureParams {
|
|
|
79
79
|
}
|
|
80
80
|
/** Query server state. */
|
|
81
81
|
export interface QueryParams {
|
|
82
|
-
type: "sessions" | "tools" | "config" | "session_detail" | "compact" | "config_set" | "models";
|
|
82
|
+
type: "sessions" | "tools" | "config" | "session_detail" | "compact" | "config_set" | "config_get" | "permission_set" | "models" | "arena_status";
|
|
83
83
|
sessionId?: string;
|
|
84
|
-
/** Used by config_set: dotted key path */
|
|
84
|
+
/** Used by config_set / permission_set: dotted key path or mode field */
|
|
85
85
|
key?: string;
|
|
86
|
-
/** Used by config_set: new value */
|
|
86
|
+
/** Used by config_set / permission_set: new value */
|
|
87
87
|
value?: unknown;
|
|
88
88
|
}
|
|
89
89
|
export interface QueryResult {
|
|
@@ -107,6 +107,14 @@ export interface ToolListResult {
|
|
|
107
107
|
description: string;
|
|
108
108
|
}>;
|
|
109
109
|
}
|
|
110
|
+
/** Shape of a model-pool entry returned by query("models"). */
|
|
111
|
+
export interface ProtocolModelEntry {
|
|
112
|
+
key: string;
|
|
113
|
+
label: string;
|
|
114
|
+
model: string;
|
|
115
|
+
provider: string;
|
|
116
|
+
active: boolean;
|
|
117
|
+
}
|
|
110
118
|
export interface ConfigResult {
|
|
111
119
|
permissionMode: PermissionMode;
|
|
112
120
|
planMode: boolean;
|
|
@@ -16,7 +16,7 @@ type Options = {
|
|
|
16
16
|
* However, if user pastes text and it's more than one character, the callback will be called only once and the whole string will be passed as `input`.
|
|
17
17
|
*
|
|
18
18
|
* ```
|
|
19
|
-
* import {useInput} from '
|
|
19
|
+
* import {useInput} from '@/render';
|
|
20
20
|
*
|
|
21
21
|
* const UserInput = () => {
|
|
22
22
|
* useInput((input, key) => {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* - Forward stream events to RunManager
|
|
9
9
|
* - Return execution result (does NOT manage run state transitions)
|
|
10
10
|
*/
|
|
11
|
-
import { type EngineConfig } from "../engine/engine.js";
|
|
11
|
+
import { type EngineConfig, type EngineHookConfig } from "../engine/engine.js";
|
|
12
12
|
import type { LLMConfig, RegisteredTool } from "../types.js";
|
|
13
13
|
import type { RunSnapshot, RunExecutionContext, RunExecutionResult } from "./types.js";
|
|
14
14
|
import { type RunLifecycleHooks } from "./RunApprovalBackend.js";
|
|
@@ -59,6 +59,8 @@ export interface EngineRunnerConfig {
|
|
|
59
59
|
mcpServers?: EngineConfig["mcpServers"];
|
|
60
60
|
/** Custom tools registered by the product adapter. */
|
|
61
61
|
customTools?: CustomToolEntry[];
|
|
62
|
+
/** Hooks registered into each Engine instance before run execution. */
|
|
63
|
+
hooks?: EngineHookConfig[];
|
|
62
64
|
}
|
|
63
65
|
export declare class EngineRunner implements RunExecutor {
|
|
64
66
|
private readonly config;
|
package/dist/run/RunManager.d.ts
CHANGED
|
@@ -31,6 +31,10 @@ export interface RunManagerConfig {
|
|
|
31
31
|
staleLockMs?: number;
|
|
32
32
|
/** Optional evaluator to run on completion. Default: NoopEvaluator */
|
|
33
33
|
evaluator?: Evaluator;
|
|
34
|
+
/** Tags applied to every submitted run unless already present. */
|
|
35
|
+
defaultTags?: string[];
|
|
36
|
+
/** Metadata merged into every submitted run. Submit input wins on conflicts. */
|
|
37
|
+
defaultMetadata?: Record<string, unknown>;
|
|
34
38
|
}
|
|
35
39
|
export declare class RunManager {
|
|
36
40
|
private readonly store;
|
|
@@ -39,6 +43,8 @@ export declare class RunManager {
|
|
|
39
43
|
private readonly lock;
|
|
40
44
|
private readonly heartbeat;
|
|
41
45
|
private readonly evaluator;
|
|
46
|
+
private readonly defaultTags;
|
|
47
|
+
private readonly defaultMetadata;
|
|
42
48
|
private readonly subscribers;
|
|
43
49
|
private readonly abortControllers;
|
|
44
50
|
/** Active execution handles — used to resolve pending approvals/input while Engine is suspended */
|
package/dist/run/factory.d.ts
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* ```
|
|
19
19
|
*/
|
|
20
20
|
import type { LLMConfig, PermissionMode } from "../types.js";
|
|
21
|
-
import type { EngineConfig } from "../engine/engine.js";
|
|
21
|
+
import type { EngineConfig, EngineHookConfig } from "../engine/engine.js";
|
|
22
22
|
import type { Evaluator } from "./Evaluator.js";
|
|
23
23
|
import { RunManager } from "./RunManager.js";
|
|
24
24
|
export interface CreateRunManagerOptions {
|
|
@@ -50,6 +50,12 @@ export interface CreateRunManagerOptions {
|
|
|
50
50
|
appendSystemPrompt?: string;
|
|
51
51
|
/** Optional evaluator for run completion. */
|
|
52
52
|
evaluator?: Evaluator;
|
|
53
|
+
/** Hooks registered into each Engine instance before run execution. */
|
|
54
|
+
hooks?: EngineHookConfig[];
|
|
55
|
+
/** Tags applied to every submitted run unless already present. */
|
|
56
|
+
defaultTags?: string[];
|
|
57
|
+
/** Metadata merged into every submitted run. Submit input wins on conflicts. */
|
|
58
|
+
defaultMetadata?: Record<string, unknown>;
|
|
53
59
|
}
|
|
54
60
|
/**
|
|
55
61
|
* Create a fully configured RunManager with one call.
|
package/dist/run/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkJHXNOB5Gcjs = require('../chunk-JHXNOB5G.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -15,22 +15,18 @@ var _chunkR32DJSJEcjs = require('../chunk-R32DJSJE.cjs');
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunkVWFET3MGcjs = require('../chunk-VWFET3MG.cjs');
|
|
19
|
+
require('../chunk-KOGV6PDQ.cjs');
|
|
20
|
+
require('../chunk-C7C7ZZY4.cjs');
|
|
21
|
+
require('../chunk-YD7XTI7T.cjs');
|
|
22
|
+
require('../chunk-M2QI5X3X.cjs');
|
|
23
|
+
require('../chunk-OP57WUWQ.cjs');
|
|
24
|
+
require('../chunk-FV2ARONZ.cjs');
|
|
19
25
|
require('../chunk-3QR52LL5.cjs');
|
|
20
|
-
require('../chunk-
|
|
21
|
-
require('../chunk-
|
|
22
|
-
require('../chunk-JT2WSQSR.cjs');
|
|
23
|
-
require('../chunk-BMH65OVB.cjs');
|
|
24
|
-
require('../chunk-LRAY5IYC.cjs');
|
|
25
|
-
require('../chunk-HD7MT5XU.cjs');
|
|
26
|
-
require('../chunk-3EAEC566.cjs');
|
|
27
|
-
require('../chunk-CSO5EOEP.cjs');
|
|
28
|
-
require('../chunk-NG73UR3L.cjs');
|
|
29
|
-
require('../chunk-3EUDE77E.cjs');
|
|
30
|
-
require('../chunk-FVP7XJGS.cjs');
|
|
31
|
-
require('../chunk-IMMTBZ33.cjs');
|
|
26
|
+
require('../chunk-X2DNIMPC.cjs');
|
|
27
|
+
require('../chunk-HOXQLX5R.cjs');
|
|
32
28
|
require('../chunk-EL2RL5DG.cjs');
|
|
33
|
-
require('../chunk-
|
|
29
|
+
require('../chunk-JHNCK7JP.cjs');
|
|
34
30
|
require('../chunk-IJSHQGMP.cjs');
|
|
35
31
|
|
|
36
32
|
|
|
@@ -47,4 +43,4 @@ require('../chunk-IJSHQGMP.cjs');
|
|
|
47
43
|
|
|
48
44
|
|
|
49
45
|
|
|
50
|
-
exports.ArtifactTracker =
|
|
46
|
+
exports.ArtifactTracker = _chunkVWFET3MGcjs.ArtifactTracker; exports.CheckpointWriter = _chunkVWFET3MGcjs.CheckpointWriter; exports.CompositeEvaluator = _chunkVWFET3MGcjs.CompositeEvaluator; exports.EngineRunner = _chunkVWFET3MGcjs.EngineRunner; exports.FileRunStore = _chunkVWFET3MGcjs.FileRunStore; exports.Heartbeat = _chunkVWFET3MGcjs.Heartbeat; exports.NoopEvaluator = _chunkVWFET3MGcjs.NoopEvaluator; exports.RunApprovalBackend = _chunkVWFET3MGcjs.RunApprovalBackend; exports.RunLock = _chunkVWFET3MGcjs.RunLock; exports.RunManager = _chunkVWFET3MGcjs.RunManager; exports.RunQueue = _chunkVWFET3MGcjs.RunQueue; exports.VALID_TRANSITIONS = _chunkVWFET3MGcjs.VALID_TRANSITIONS; exports.createRunAskUserFn = _chunkVWFET3MGcjs.createRunAskUserFn; exports.createRunManager = _chunkJHXNOB5Gcjs.createRunManager;
|