refactor(host)!: retire the skill.invoke RPC for the gesture boundary

Invocation is an ordinary session.prompt again: the pre-step gesture
boundary makes it deterministic host-side for every front end, so the
dedicated RPC (handler, wire schema, error codes, client face, fixtures)
and ui-skill's claim machinery are net deletions. The menu keeps decision
21 exactly — a pick lands literal /name text — plus the user-only marker
from skill.list's modelInvocable flag.
This commit is contained in:
Yichen Jiang
2026-08-08 13:15:52 +08:00
parent c08fa27e5c
commit 0d53752c49
43 changed files with 143 additions and 663 deletions

View File

@@ -3,7 +3,6 @@
* nodes. Client-only and model-free: the vocabulary is the mutation tools'
* own follow-along `locations`, never the closing prose.
*/
import { opensUserTurn } from '@deepseek-ai/dsh-client-runtime/client'
import type { ConversationNode, ToolResultNode } from '@deepseek-ai/dsh-client-runtime/client'
import type { TurnTailOwnerProps } from '@deepseek-ai/dsh-client-ui-conversation/client'
@@ -63,7 +62,7 @@ export function producedForClosing(nodes: readonly ConversationNode[], seq: numb
}
continue
}
if (opensUserTurn(node)) {
if (node.kind === 'user') {
turn = undefined
pending = []
seen = new Set()

View File

@@ -73,26 +73,6 @@ describe('producedForClosing derivation', () => {
expect(producedForClosing(nodes, 999)).toEqual([])
})
it('treats a user-explicit skill invocation as a turn boundary', () => {
// The injection opens a user turn exactly like a typed prompt: files
// written before it must not spill into the turn its answer closes.
const skillInvocation = {
kind: 'skill-invocation' as const, seq: 4, time: 4_000,
name: 'hidden-demo',
content: [{ type: 'text', text: '<skill_content name="hidden-demo">x</skill_content>' }] as never,
source: null,
}
const nodes: ConversationNode[] = [
user(1, 'write things'),
assistant(2, 'wrote', 1),
wrote(3, 'a', 'stale.txt'),
skillInvocation,
wrote(5, 'b', 'fresh.txt'),
assistant(6, 'followed the skill', 2),
]
expect(producedForClosing(nodes, 6)).toEqual(['fresh.txt'])
expect(producedForClosing(nodes, 6)).not.toContain('stale.txt')
})
it('counts a generic edit and never spills across the turn boundary', () => {
const inserted = (seq: number, callId: string, path: string): ToolResultNode => ({