fix(mode): stabilize plan-mode model experience

This commit is contained in:
Tianyi Cui
2026-07-20 22:13:59 +08:00
parent 28a74d6d7e
commit 897dc82d9b
40 changed files with 620 additions and 298 deletions

View File

@@ -158,8 +158,8 @@ const SERVICE_ROLES: ServiceRole[] = [
pkg: 'mode',
title: 'Session-mode policy state',
mode: 'core',
consumers: ['stdio-agent', 'acp'],
note: 'Folds the logged per-agent mode (mode/set), flushes user flips at turn boundaries, and enforces the mode through the assemble filter and the tools/pre-execute gate.',
consumers: ['acp'],
note: 'Folds logged per-agent mode/set state, flushes user flips at turn boundaries, renders deployment-owned guidance, and keeps the plan-exit schema stable across modes.',
},
{
key: 'skills',

View File

@@ -174,10 +174,10 @@ const TOOL_PACKAGES: ToolPackage[] = [
requires: ['ctx.tools', 'ctx.systemPrompt', 'ctx.userInteraction (execution time, opportunistic)'],
writes: ['tool/call', 'mode/set back to default on an approved review', 'tool/result'],
async mount(ctx) {
await ctx.plugin(ModesService)
await ctx.plugin(ModesService, { modes: { plan: { section: 'Tool catalog schema harvest.' } } })
},
note:
'exit_plan_mode presents the plan for the user\'s review over the user-interaction seam (approve / keep planning with feedback); approval flips the logged session mode back to default at the step boundary (same-batch calls stay plan-gated). The assemble filter shows it only while the folded mode is plan.',
'exit_plan_mode stays in the model-facing schema in every session mode so transitions add no tool-catalog churn on top of the mode-section change. Its execute path rejects calls outside plan mode; in plan mode it presents the plan over the user-interaction seam (approve / keep planning with feedback), and approval flips the logged session mode back to default at the step boundary.',
},
{
pkg: '@deepseek-ai/dsh-tool-bash',