mirror of
https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-08-15 14:02:47 +02:00
fix: snapshot test
This commit is contained in:
@@ -70,8 +70,6 @@ import SessionStore, {
|
|||||||
type SessionHeader,
|
type SessionHeader,
|
||||||
} from '@deepseek-ai/dsh-session'
|
} from '@deepseek-ai/dsh-session'
|
||||||
import JsonlSessionPersistence from '@deepseek-ai/dsh-session-persistence-jsonl'
|
import JsonlSessionPersistence from '@deepseek-ai/dsh-session-persistence-jsonl'
|
||||||
import * as CordisHostRunner from '@deepseek-ai/dsh-cordis-host-runner'
|
|
||||||
import * as ToolCordis from '@deepseek-ai/dsh-tool-cordis'
|
|
||||||
// Empty type imports carry the webServer/agents/sessionPersistence Context merges.
|
// Empty type imports carry the webServer/agents/sessionPersistence Context merges.
|
||||||
import type {} from '@deepseek-ai/dsh-host-webserver'
|
import type {} from '@deepseek-ai/dsh-host-webserver'
|
||||||
import type {} from '@deepseek-ai/dsh-agent'
|
import type {} from '@deepseek-ai/dsh-agent'
|
||||||
@@ -218,7 +216,7 @@ export interface LaunchOptions {
|
|||||||
*/
|
*/
|
||||||
toolsMode?: 'native' | 'code' | 'both'
|
toolsMode?: 'native' | 'code' | 'both'
|
||||||
/**
|
/**
|
||||||
* Insert the opt-in self-referential Cordis tools into the shipped tree.
|
* Insert the opt-in model-facing Cordis tool provider into the shipped tree.
|
||||||
* Record and replay use the same tool surface, so captured request headers
|
* Record and replay use the same tool surface, so captured request headers
|
||||||
* remain reconstructable without making the tools a product default.
|
* remain reconstructable without making the tools a product default.
|
||||||
*/
|
*/
|
||||||
@@ -461,18 +459,11 @@ export async function launchWebScaffold(options: LaunchOptions = {}): Promise<We
|
|||||||
// be able to change a golden, whatever roots a scenario asks for.
|
// be able to change a golden, whatever roots a scenario asks for.
|
||||||
: [{ id: 'agent-presets', config: { ...options.agentPresets, includeUserRoot: false } }],
|
: [{ id: 'agent-presets', config: { ...options.agentPresets, includeUserRoot: false } }],
|
||||||
...options.toolsMode === undefined ? [] : [{ id: 'tools', config: { mode: options.toolsMode } }],
|
...options.toolsMode === undefined ? [] : [{ id: 'tools', config: { mode: options.toolsMode } }],
|
||||||
// The host halves ride Loader builtins (below) so the shipped CLI keeps no
|
// The shipped Web bundle already owns both runners and the Cordis UI. This
|
||||||
// dependency on this opt-in package, but the two browser rows must carry
|
// scenario adds only the model-facing tools that exercise those services.
|
||||||
// their real package names: the modules node half reads `dshClient` from a
|
|
||||||
// row's resolved package root, and a `cordis:` builtin has none — it is
|
|
||||||
// permanently not a client row, so a builtin here would silently drop the
|
|
||||||
// browser half from the roster.
|
|
||||||
...options.cordisTools === true
|
...options.cordisTools === true
|
||||||
? [{ insert: [
|
? [{ insert: [
|
||||||
{ id: 'cordis-host-runner', name: 'cordis:cordis-host-runner' },
|
{ id: 'tool-cordis', name: '@deepseek-ai/dsh-tool-cordis' },
|
||||||
{ id: 'tool-cordis', name: 'cordis:tool-cordis' },
|
|
||||||
{ id: 'cordis-client-runner', name: '@deepseek-ai/dsh-cordis-client-runner' },
|
|
||||||
{ id: 'ui-cordis', name: '@deepseek-ai/dsh-client-ui-cordis' },
|
|
||||||
] }]
|
] }]
|
||||||
: [],
|
: [],
|
||||||
...options.deepSeekSearch === undefined
|
...options.deepSeekSearch === undefined
|
||||||
@@ -525,12 +516,6 @@ export async function launchWebScaffold(options: LaunchOptions = {}): Promise<We
|
|||||||
// and a preset resolving package names from its own directory cannot reach
|
// and a preset resolving package names from its own directory cannot reach
|
||||||
// `@deepseek-ai/cordis-plugin-group` by name.
|
// `@deepseek-ai/cordis-plugin-group` by name.
|
||||||
ctx.loader.builtins.group = Group
|
ctx.loader.builtins.group = Group
|
||||||
// The shipped CLI deliberately has no dependency on this opt-in package.
|
|
||||||
// Keep the Loader row real without broadening the product installation.
|
|
||||||
if (options.cordisTools === true) {
|
|
||||||
ctx.loader.builtins['cordis-host-runner'] = CordisHostRunner
|
|
||||||
ctx.loader.builtins['tool-cordis'] = ToolCordis
|
|
||||||
}
|
|
||||||
await ctx.loader.create({
|
await ctx.loader.create({
|
||||||
name: 'cordis:include',
|
name: 'cordis:include',
|
||||||
config: { path: pathToFileURL(rootConfig).href, patches },
|
config: { path: pathToFileURL(rootConfig).href, patches },
|
||||||
|
|||||||
Reference in New Issue
Block a user