fix(notion): follow master's tool fixture and prompt changes

This commit is contained in:
gengruilin committed 2026-10-29 16:59:34 +08:00
1 parent 723c703d10
commit d23fd2bacc
5 files changed
+9 -20

No files matched your search

+2 -1
View File
@@ -68,6 +68,7 @@
"@deepseek-ai/dsh-system-prompt": "workspace:*",
"@deepseek-ai/dsh-client-locale": "workspace:*",
"@deepseek-ai/dsh-client-ui-mcp-account": "workspace:*",
"@deepseek-ai/dsh-client-ui-slots": "workspace:*"
"@deepseek-ai/dsh-client-ui-slots": "workspace:*",
"@deepseek-ai/dsh-tool-testkit": "workspace:*"
}
}
@@ -5,6 +5,7 @@ import type { Context } from '@deepseek-ai/cordis'
import type { Agent } from '@deepseek-ai/dsh-agent'
import { parseCredentialKey } from '@deepseek-ai/dsh-credentials'
import { ToolCallId } from '@deepseek-ai/dsh-llm'
import { executeToolFixture } from '@deepseek-ai/dsh-tool-testkit'
import type { McpManagedServerStatus } from '@deepseek-ai/dsh-mcp-manager'
import McpResources from '@deepseek-ai/dsh-mcp-resources'
import { createScope } from '@deepseek-ai/dsh-scope'
@@ -27,7 +28,7 @@ async function fixture(servers: Record<string, unknown> = {}) {
}
const mount = (config: Partial<Notion.Config> = {}) => world.ctx.plugin(Notion, { url: world.origin + '/mcp', ...config })
const prompt = async () => renderPrompt(await world.ctx.systemPrompt.assemble())
const ping = () => world.ctx.tools.execute({
const ping = () => executeToolFixture(world.ctx, {
callId: ToolCallId('notion-ping'), name: 'mcp__notion__ping', arguments: {}, signal: new AbortController().signal,
})
const grant = async () => (await world.ctx.credentials.describeRecord(parseCredentialKey('mcp-client/notion'))).configured
@@ -86,7 +87,7 @@ it('keeps Notion tools hidden from an agent until it loads them, unless loading
await b.authorize()
expect(b.ctx.tools.get('mcp__notion__ping', agent)).toBeUndefined()
expect(b.ctx.tools.get('mcp__notion__load_tools', agent)).toBeDefined()
expect(await b.ctx.tools.execute({
expect(await executeToolFixture(b.ctx, {
callId: ToolCallId('notion-load'), name: 'mcp__notion__load_tools', arguments: { tools: ['ping'] },
signal: new AbortController().signal, agent,
})).toMatchObject({ isError: false, value: 'Loaded: mcp__notion__ping.' })
+3
View File
@@ -7446,6 +7446,9 @@ importers:
'@deepseek-ai/dsh-system-prompt':
specifier: workspace:*
version: link:../../core/system-prompt
'@deepseek-ai/dsh-tool-testkit':
specifier: workspace:*
version: link:../../test-support/tool-testkit
packages/context/agent-instructions:
dependencies:
@@ -27,7 +27,7 @@ create_goal may infer goal intent from a direct human request in any language. A
Use the workflow tool ONLY when the user explicitly asks for a workflow or for large multi-agent orchestration: you write a JavaScript script (the tool description documents the exact format) that fans work out across many subagents with phases and structured results. For one or two delegations, prefer plain subagent calls.
Start independent delegations with `subagent` or `subagent_fork` together in one assistant message and continue useful work while they run.
Start independent delegations with `subagent` or `subagent_fork` together in one assistant message and continue useful work while they run. When only waiting for their results remains, end your turn instead of sleeping or polling; the next result starts a new turn.
## MCP resource servers
@@ -107,22 +107,6 @@
]
}
},
{
"name": "exit_plan_mode",
"description": "Use only in plan mode. Present your plan for the user's review and, on approval, leave plan mode. The user may approve (carry out the plan from your next step) or keep planning — their feedback comes back in the tool result; revise and present again.",
"parameters": {
"type": "object",
"properties": {
"plan": {
"type": "string",
"description": "The complete plan, as markdown, starting with a # heading that names it."
}
},
"required": [
"plan"
]
}
},
{
"name": "get_goal",
"description": "Read the current session goal, including the id and revision that update_goal requires.",