Adapt to two contract changes master introduced: - The generated Remote face now wraps every business result in RemoteResult, folding carrier failures into an ok:false branch instead of rejecting. The controller reads that envelope at its three call sites and maps a carrier failure onto the same settled shape the controls already render; three specs cover the new branch. - Client packages split their tsconfig into host and client halves, and the host aggregate now compiles any test not named *.client.spec.*. Rename this package's specs to the client convention and drop the ../connection project reference, which pointed at a solution file that no longer carries the client sources. Keep master's mount loop with its rollback-on-failure in api-remotes and add messageFeedbackRemote to it.
32 lines
1.1 KiB
TypeScript
32 lines
1.1 KiB
TypeScript
import { Context } from '@deepseek-ai/cordis'
|
|
import { afterEach, describe, expect, it } from 'vitest'
|
|
import ToolRegistry from '@deepseek-ai/dsh-tools'
|
|
import SystemPrompt from '@deepseek-ai/dsh-system-prompt'
|
|
import UserInteractionService from '@deepseek-ai/dsh-user-interaction'
|
|
import { apply } from '../src/index.ts'
|
|
|
|
let ctx: Context | undefined
|
|
|
|
afterEach(async () => {
|
|
await ctx?.fiber.dispose()
|
|
ctx = undefined
|
|
})
|
|
|
|
describe('ui-question node plugin', () => {
|
|
it('mounts no model-facing tool', async () => {
|
|
ctx = new Context()
|
|
await ctx.plugin(SystemPrompt)
|
|
await ctx.plugin(ToolRegistry)
|
|
await ctx.plugin(UserInteractionService)
|
|
|
|
await ctx.plugin({ apply }).await()
|
|
|
|
// Selecting the Web question FEATURE must not hand every agent the tool.
|
|
// `ctx.tools.register` on an unscoped host context files into the global
|
|
// layer, which merges into every agent's view regardless of the preset
|
|
// that composed it — so a two-tool benchmark preset would really present
|
|
// three. The `tool-ask-user` row belongs to the presets that want it.
|
|
expect(ctx.tools.get('ask_user_question')).toBeUndefined()
|
|
})
|
|
})
|