@cjhyy/code-shell-arena 0.8.10 → 0.8.12
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/dist/capability.d.ts +3 -3
- package/dist/capability.js +21 -17
- package/dist/index.runtime.d.ts +1 -1
- package/dist/index.runtime.js +1 -1
- package/package.json +2 -2
package/dist/capability.d.ts
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* setArenaLLMConfig(), following the same pattern as setAskUserFn() and
|
|
9
9
|
* setSubAgentConfig().
|
|
10
10
|
*/
|
|
11
|
-
import { type
|
|
11
|
+
import { type AgentModule, type ToolContext, type ToolDefinition } from "@cjhyy/code-shell-core/extension";
|
|
12
12
|
import { z } from "zod";
|
|
13
13
|
export declare const arenaToolDef: ToolDefinition;
|
|
14
14
|
/**
|
|
@@ -39,5 +39,5 @@ export declare const ArenaCapabilitySettingsSchema: z.ZodObject<{
|
|
|
39
39
|
participants: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
40
40
|
}, z.ZodTypeAny, "passthrough">>;
|
|
41
41
|
export declare function arenaTool(args: Record<string, unknown>, ctx?: ToolContext): Promise<string>;
|
|
42
|
-
/**
|
|
43
|
-
export declare function
|
|
42
|
+
/** The Arena product as a unified AgentModule. Core does not import this package. */
|
|
43
|
+
export declare function createArenaModule(): AgentModule;
|
package/dist/capability.js
CHANGED
|
@@ -429,25 +429,29 @@ export async function arenaTool(args, ctx) {
|
|
|
429
429
|
return `Arena error: ${err instanceof Error ? err.message : String(err)}`;
|
|
430
430
|
}
|
|
431
431
|
}
|
|
432
|
-
|
|
433
|
-
|
|
432
|
+
const ARENA_TOOL = {
|
|
433
|
+
definition: {
|
|
434
|
+
...arenaToolDef,
|
|
435
|
+
source: "builtin",
|
|
436
|
+
permissionDefault: "ask",
|
|
437
|
+
isReadOnly: true,
|
|
438
|
+
isConcurrencySafe: false,
|
|
439
|
+
timeoutMs: 1_800_000,
|
|
440
|
+
},
|
|
441
|
+
execute: arenaTool,
|
|
442
|
+
};
|
|
443
|
+
const ARENA_QUERIES = {
|
|
444
|
+
arena_status: () => getArenaStatus(),
|
|
445
|
+
};
|
|
446
|
+
/** The Arena product as a unified AgentModule. Core does not import this package. */
|
|
447
|
+
export function createArenaModule() {
|
|
434
448
|
return {
|
|
435
449
|
id: "arena",
|
|
436
|
-
|
|
437
|
-
{
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
permissionDefault: "ask",
|
|
442
|
-
isReadOnly: true,
|
|
443
|
-
isConcurrencySafe: false,
|
|
444
|
-
timeoutMs: 1_800_000,
|
|
445
|
-
},
|
|
446
|
-
execute: arenaTool,
|
|
447
|
-
},
|
|
448
|
-
],
|
|
449
|
-
queries: {
|
|
450
|
-
arena_status: () => getArenaStatus(),
|
|
450
|
+
engine: {
|
|
451
|
+
tools: [{ kind: "always", tool: ARENA_TOOL }],
|
|
452
|
+
},
|
|
453
|
+
protocol: {
|
|
454
|
+
queries: ARENA_QUERIES,
|
|
451
455
|
},
|
|
452
456
|
};
|
|
453
457
|
}
|
package/dist/index.runtime.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This entry intentionally excludes phase/strategy internals and Iterate mode.
|
|
5
5
|
*/
|
|
6
6
|
export { Arena } from "./arena.js";
|
|
7
|
-
export { arenaTool, arenaToolDef, ArenaCapabilitySettingsSchema,
|
|
7
|
+
export { arenaTool, arenaToolDef, ArenaCapabilitySettingsSchema, createArenaModule, getArenaStatus, saveArenaSettingsByKeys, type ArenaStatus, } from "./capability.js";
|
|
8
8
|
export { MODEL_PRESETS, getMaxOutputTokens } from "./model-presets.js";
|
|
9
9
|
export type { ModelPreset } from "./model-presets.js";
|
|
10
10
|
export { formatArenaResult, printArenaResult, renderProgress, createProgressRenderer, type OutputSink, } from "./render/terminal.js";
|
package/dist/index.runtime.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This entry intentionally excludes phase/strategy internals and Iterate mode.
|
|
5
5
|
*/
|
|
6
6
|
export { Arena } from "./arena.js";
|
|
7
|
-
export { arenaTool, arenaToolDef, ArenaCapabilitySettingsSchema,
|
|
7
|
+
export { arenaTool, arenaToolDef, ArenaCapabilitySettingsSchema, createArenaModule, getArenaStatus, saveArenaSettingsByKeys, } from "./capability.js";
|
|
8
8
|
export { MODEL_PRESETS, getMaxOutputTokens } from "./model-presets.js";
|
|
9
9
|
export { formatArenaResult, printArenaResult, renderProgress, createProgressRenderer, } from "./render/terminal.js";
|
|
10
10
|
export { formatArenaResultForSession } from "./render/session.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cjhyy/code-shell-arena",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.12",
|
|
4
4
|
"description": "Optional multi-model Arena capability for CodeShell.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"clean": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\""
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@cjhyy/code-shell-core": "0.8.
|
|
27
|
+
"@cjhyy/code-shell-core": "0.8.12",
|
|
28
28
|
"zod": "^3.24.2"
|
|
29
29
|
},
|
|
30
30
|
"engines": {
|