fix(web): clarify shipped preset capabilities

This commit is contained in:
Yichen Jiang
2026-08-10 19:40:19 +08:00
parent 08b85654f4
commit 5e3dd2fd34
16 changed files with 49 additions and 48 deletions

View File

@@ -1,3 +1,3 @@
name: 代码模式 name: 代码模式
description: 标准模式的工具改为 Code Mode 呈现:模型写一段 TypeScript 调用 SDK,一次执行代替多轮工具调用。 description: 具备标准模式的全部能力,并通过 Code Mode SDK 呈现工具,让模型用一个 TypeScript 程序组合多步操作。
order: 2 order: 2

View File

@@ -1,3 +1,3 @@
name: 创造模式 name: 创造模式
description: 标准模式加上自指工具集,可以读改自己运行的这套组装,并据此创作新的预设。 description: 在标准模式上增加 Cordis 运行时检查、临时插件实验和 preset 创作指导,用于创建新的 Agent preset;临时实验仅影响当前运行时,不会修改内置 preset。
order: 4 order: 4

View File

@@ -1,3 +1,3 @@
name: 极简模式 name: 极简模式
description: 只向模型呈现 bash 与 str_replace_editor,适合 benchmark 与最小复现。 description: 仅提供 bash 与 str_replace_editor 的双工具编码 Agent,用于基准测试和最小复现。
order: 3 order: 3

View File

@@ -1,3 +1,3 @@
name: 标准模式 name: 标准模式
description: 完整的编码 agent:文件读写、shell、检索、计划、委派与工作流。 description: 功能完整的编码 Agent,支持文件编辑、Shell、文件与网页检索、Skills、计划、目标、子代理和工作流。
order: 1 order: 1

View File

@@ -161,7 +161,7 @@ describe('web e2e: agent-preset authoring is a host-side copy', () => {
expect(composition).toBe(await readFile(join(SHIPPED_PRESETS, 'minimal', 'agent.cordis.yml'), 'utf8')) expect(composition).toBe(await readFile(join(SHIPPED_PRESETS, 'minimal', 'agent.cordis.yml'), 'utf8'))
const metadata = await readFile(join(userRoot, 'my-agent', 'preset.yml'), 'utf8') const metadata = await readFile(join(userRoot, 'my-agent', 'preset.yml'), 'utf8')
expect(metadata).toContain('name: 我的模式') expect(metadata).toContain('name: 我的模式')
expect(metadata).toContain('description: 只向模型呈现 bash 与 str_replace_editor,适合 benchmark 与最小复现。') expect(metadata).toContain('description: 仅提供 bash 与 str_replace_editor 的双工具编码 Agent,用于基准测试和最小复现。')
expect(metadata).not.toContain('order:') expect(metadata).not.toContain('order:')
}, 60_000) }, 60_000)

View File

@@ -143,12 +143,12 @@ describe('web e2e: agent-preset selection', () => {
await compareOrRefreshGolden(HERO_EXPECTED, snapshot, MODE) await compareOrRefreshGolden(HERO_EXPECTED, snapshot, MODE)
// The chip opens on the deployment default, by the name that preset // The chip opens on the deployment default, by the name that preset
// publishes rather than its directory name. // publishes rather than its directory name.
expect(snapshot).toContain('标准模式') expect(snapshot).toContain('Standard mode')
}) })
it('names every preset and what it is for', async () => { it('names every preset and what it is for', async () => {
onTestFailed(() => saveFailureShot(page, 'web-e2e-agent-preset-menu')) onTestFailed(() => saveFailureShot(page, 'web-e2e-agent-preset-menu'))
await page.getByRole('button', { name: '标准模式' }).click() await page.getByRole('button', { name: 'Standard mode' }).click()
const menu = page.getByRole('menu') const menu = page.getByRole('menu')
await menu.waitFor({ timeout: 10_000 }) await menu.waitFor({ timeout: 10_000 })
@@ -157,15 +157,15 @@ describe('web e2e: agent-preset selection', () => {
await compareOrRefreshGolden(MENU_EXPECTED, snapshot, MODE) await compareOrRefreshGolden(MENU_EXPECTED, snapshot, MODE)
// Every shipped preset, each with the sentence saying what it composes — // Every shipped preset, each with the sentence saying what it composes —
// the id alone never said what a preset does. // the id alone never said what a preset does.
expect(snapshot).toContain('极简模式') expect(snapshot).toContain('Minimal mode')
expect(snapshot).toContain('创造模式') expect(snapshot).toContain('Creator mode')
await page.keyboard.press('Escape') await page.keyboard.press('Escape')
}) })
it('applies the staged pick to the blank session, and the host honors it', async () => { it('applies the staged pick to the blank session, and the host honors it', async () => {
onTestFailed(() => saveFailureShot(page, 'web-e2e-agent-preset-stage')) onTestFailed(() => saveFailureShot(page, 'web-e2e-agent-preset-stage'))
await page.getByRole('button', { name: '标准模式' }).click() await page.getByRole('button', { name: 'Standard mode' }).click()
await page.getByRole('menuitem', { name: /极简模式/ }).click() await page.getByRole('menuitem', { name: /Minimal mode/ }).click()
// The chip stages; the blank session the workspace connect produced is // The chip stages; the blank session the workspace connect produced is
// what the stage lands on. The host's own answer is what comes back. // what the stage lands on. The host's own answer is what comes back.
@@ -197,8 +197,8 @@ describe('web e2e: agent-preset selection', () => {
// against its list row, so a row that never reprojected the first switch // against its list row, so a row that never reprojected the first switch
// answers "already standard" and sends nothing — and restores the catalog // answers "already standard" and sends nothing — and restores the catalog
// instead of leaving the session reading the narrower composition. // instead of leaving the session reading the narrower composition.
await page.getByRole('button', { name: '极简模式' }).click() await page.getByRole('button', { name: 'Minimal mode' }).click()
await page.getByRole('menuitem', { name: /^标准模式/ }).first().click() await page.getByRole('menuitem', { name: /^Standard mode/ }).first().click()
await expect.poll(() => livePreset(scaffold.baseUrl), { timeout: 15_000 }).toBe('standard') await expect.poll(() => livePreset(scaffold.baseUrl), { timeout: 15_000 }).toBe('standard')
await composer.fill('/') await composer.fill('/')
@@ -221,10 +221,10 @@ describe('web e2e: agent-preset selection', () => {
const snapshot = await captureStableAria(page, '[class*="titleRow"]', scaffold.workspaceCwd) const snapshot = await captureStableAria(page, '[class*="titleRow"]', scaffold.workspaceCwd)
await compareOrRefreshGolden(HEADER_EXPECTED, snapshot, MODE) await compareOrRefreshGolden(HEADER_EXPECTED, snapshot, MODE)
expect(snapshot).toContain('极简模式') expect(snapshot).toContain('Minimal mode')
// Static chrome, not a control: the header can only report a composition // Static chrome, not a control: the header can only report a composition
// the host would refuse to change. // the host would refuse to change.
expect(snapshot).not.toContain('button "极简模式"') expect(snapshot).not.toContain('button "Minimal mode"')
}) })
it('drove every surface without a page error or a stream warning', () => { it('drove every surface without a page error or a stream warning', () => {

View File

@@ -20,7 +20,7 @@
- list: - list:
- listitem: - listitem:
- 'button "当前使用: 标准模式" [disabled] [pressed]': - 'button "当前使用: 标准模式" [disabled] [pressed]':
- text: 标准模式 内置 当前使用 完整的编码 agent:文件读写、shell、检索、计划、委派与工作流。 - text: 标准模式 内置 当前使用 功能完整的编码 Agent,支持文件编辑、Shell、文件与网页检索、Skills、计划、目标、子代理和工作流。
- code: standard - code: standard
- 'button "查看: 标准模式"': - 'button "查看: 标准模式"':
- img - img
@@ -30,7 +30,7 @@
- text: 复制 - text: 复制
- listitem: - listitem:
- 'button "设为默认: 代码模式"': - 'button "设为默认: 代码模式"':
- text: 代码模式 内置 标准模式的工具改为 Code Mode 呈现:模型写一段 TypeScript 调用 SDK,一次执行代替多轮工具调用。 - text: 代码模式 内置 具备标准模式的全部能力,并通过 Code Mode SDK 呈现工具,让模型用一个 TypeScript 程序组合多步操作。
- code: code - code: code
- 'button "查看: 代码模式"': - 'button "查看: 代码模式"':
- img - img
@@ -40,7 +40,7 @@
- text: 复制 - text: 复制
- listitem: - listitem:
- 'button "设为默认: 极简模式"': - 'button "设为默认: 极简模式"':
- text: 极简模式 内置 只向模型呈现 bash 与 str_replace_editor,适合 benchmark 与最小复现。 - text: 极简模式 内置 仅提供 bash 与 str_replace_editor 的双工具编码 Agent,用于基准测试和最小复现。
- code: minimal - code: minimal
- 'button "查看: 极简模式"': - 'button "查看: 极简模式"':
- img - img
@@ -50,7 +50,7 @@
- text: 复制 - text: 复制
- listitem: - listitem:
- 'button "设为默认: 创造模式"': - 'button "设为默认: 创造模式"':
- text: 创造模式 内置 标准模式加上自指工具集,可以读改自己运行的这套组装,并据此创作新的预设。 - text: 创造模式 内置 在标准模式上增加 Cordis 运行时检查、临时插件实验和 preset 创作指导,用于创建新的 Agent preset;实验不会写回当前内置 preset。
- code: cordis - code: cordis
- 'button "查看: 创造模式"': - 'button "查看: 创造模式"':
- img - img
@@ -62,7 +62,7 @@
- list: - list:
- listitem: - listitem:
- 'button "设为默认: 我的模式"': - 'button "设为默认: 我的模式"':
- text: 我的模式 自定义 只向模型呈现 bash 与 str_replace_editor,适合 benchmark 与最小复现。 - text: 我的模式 自定义 仅提供 bash 与 str_replace_editor 的双工具编码 Agent,用于基准测试和最小复现。
- code: my-agent - code: my-agent
- 'button "查看路径: 我的模式"': - 'button "查看路径: 我的模式"':
- img - img

View File

@@ -20,7 +20,7 @@
- list: - list:
- listitem: - listitem:
- 'button "当前使用: 标准模式" [disabled] [pressed]': - 'button "当前使用: 标准模式" [disabled] [pressed]':
- text: 标准模式 内置 当前使用 完整的编码 agent:文件读写、shell、检索、计划、委派与工作流。 - text: 标准模式 内置 当前使用 功能完整的编码 Agent,支持文件编辑、Shell、文件与网页检索、Skills、计划、目标、子代理和工作流。
- code: standard - code: standard
- 'button "查看: 标准模式"': - 'button "查看: 标准模式"':
- img - img
@@ -30,7 +30,7 @@
- text: 复制 - text: 复制
- listitem: - listitem:
- 'button "设为默认: 代码模式"': - 'button "设为默认: 代码模式"':
- text: 代码模式 内置 标准模式的工具改为 Code Mode 呈现:模型写一段 TypeScript 调用 SDK,一次执行代替多轮工具调用。 - text: 代码模式 内置 具备标准模式的全部能力,并通过 Code Mode SDK 呈现工具,让模型用一个 TypeScript 程序组合多步操作。
- code: code - code: code
- 'button "查看: 代码模式"': - 'button "查看: 代码模式"':
- img - img
@@ -40,7 +40,7 @@
- text: 复制 - text: 复制
- listitem: - listitem:
- 'button "设为默认: 极简模式"': - 'button "设为默认: 极简模式"':
- text: 极简模式 内置 只向模型呈现 bash 与 str_replace_editor,适合 benchmark 与最小复现。 - text: 极简模式 内置 仅提供 bash 与 str_replace_editor 的双工具编码 Agent,用于基准测试和最小复现。
- code: minimal - code: minimal
- 'button "查看: 极简模式"': - 'button "查看: 极简模式"':
- img - img
@@ -50,7 +50,7 @@
- text: 复制 - text: 复制
- listitem: - listitem:
- 'button "设为默认: 创造模式"': - 'button "设为默认: 创造模式"':
- text: 创造模式 内置 标准模式加上自指工具集,可以读改自己运行的这套组装,并据此创作新的预设。 - text: 创造模式 内置 在标准模式上增加 Cordis 运行时检查、临时插件实验和 preset 创作指导,用于创建新的 Agent preset;实验不会写回当前内置 preset。
- code: cordis - code: cordis
- 'button "查看: 创造模式"': - 'button "查看: 创造模式"':
- img - img

View File

@@ -20,7 +20,7 @@
- list: - list:
- listitem: - listitem:
- 'button "当前使用: 标准模式" [disabled] [pressed]': - 'button "当前使用: 标准模式" [disabled] [pressed]':
- text: 标准模式 内置 当前使用 完整的编码 agent:文件读写、shell、检索、计划、委派与工作流。 - text: 标准模式 内置 当前使用 功能完整的编码 Agent,支持文件编辑、Shell、文件与网页检索、Skills、计划、目标、子代理和工作流。
- code: standard - code: standard
- 'button "查看: 标准模式"': - 'button "查看: 标准模式"':
- img - img
@@ -30,7 +30,7 @@
- text: 复制 - text: 复制
- listitem: - listitem:
- 'button "设为默认: 代码模式"': - 'button "设为默认: 代码模式"':
- text: 代码模式 内置 标准模式的工具改为 Code Mode 呈现:模型写一段 TypeScript 调用 SDK,一次执行代替多轮工具调用。 - text: 代码模式 内置 具备标准模式的全部能力,并通过 Code Mode SDK 呈现工具,让模型用一个 TypeScript 程序组合多步操作。
- code: code - code: code
- 'button "查看: 代码模式"': - 'button "查看: 代码模式"':
- img - img
@@ -40,7 +40,7 @@
- text: 复制 - text: 复制
- listitem: - listitem:
- 'button "设为默认: 极简模式"': - 'button "设为默认: 极简模式"':
- text: 极简模式 内置 只向模型呈现 bash 与 str_replace_editor,适合 benchmark 与最小复现。 - text: 极简模式 内置 仅提供 bash 与 str_replace_editor 的双工具编码 Agent,用于基准测试和最小复现。
- code: minimal - code: minimal
- 'button "查看: 极简模式"': - 'button "查看: 极简模式"':
- img - img
@@ -50,7 +50,7 @@
- text: 复制 - text: 复制
- listitem: - listitem:
- 'button "设为默认: 创造模式"': - 'button "设为默认: 创造模式"':
- text: 创造模式 内置 标准模式加上自指工具集,可以读改自己运行的这套组装,并据此创作新的预设。 - text: 创造模式 内置 在标准模式上增加 Cordis 运行时检查、临时插件实验和 preset 创作指导,用于创建新的 Agent preset;实验不会写回当前内置 preset。
- code: cordis - code: cordis
- 'button "查看: 创造模式"': - 'button "查看: 创造模式"':
- img - img

View File

@@ -1,4 +1,4 @@
- navigation "Session hierarchy": - navigation "Session hierarchy":
- button "Seeded turn" [disabled] - button "Seeded turn" [disabled]
- img - img
- text: 极简模式 - text: Minimal mode

View File

@@ -2,7 +2,7 @@
- img - img
- text: workspace - text: workspace
- img - img
- button "标准模式": - button "Standard mode":
- img - img
- text: 标准模式 - text: Standard mode
- img - img

View File

@@ -1,7 +1,7 @@
- menu: - menu:
- menuitem "标准模式 完整的编码 agent:文件读写、shell、检索、计划、委派与工作流。": - menuitem "Standard mode Full coding agent with file editing, shell, file and web search, skills, planning, goals, subagents, and workflows.":
- text: 标准模式 完整的编码 agent:文件读写、shell、检索、计划、委派与工作流。 - text: Standard mode Full coding agent with file editing, shell, file and web search, skills, planning, goals, subagents, and workflows.
- img - img
- menuitem "代码模式 标准模式的工具改为 Code Mode 呈现:模型写一段 TypeScript 调用 SDK,一次执行代替多轮工具调用。" - menuitem "Code mode All Standard mode capabilities, with tools exposed through the Code Mode SDK so the model can combine multi-step operations in one TypeScript program."
- menuitem "极简模式 只向模型呈现 bash 与 str_replace_editor,适合 benchmark 与最小复现。" - menuitem "Minimal mode Two-tool coding agent with only bash and str_replace_editor, for benchmarks and minimal reproductions."
- menuitem "创造模式 标准模式加上自指工具集,可以读改自己运行的这套组装,并据此创作新的预设。" - menuitem "Creator mode Adds Cordis runtime inspection, temporary-plugin experiments, and preset-authoring guidance to Standard mode for creating new agent presets; experiments are not written back to the active built-in preset."

View File

@@ -35,16 +35,17 @@ export const en: Record<AgentPresetSettingsKey, string> = {
setDefault: 'Set as default', setDefault: 'Set as default',
view: 'View', view: 'View',
presetStandardName: 'Standard mode', presetStandardName: 'Standard mode',
presetStandardDescription: 'Full coding agent with file editing, shell, search, planning, delegation, and workflows.', presetStandardDescription:
'Full coding agent with file editing, shell, file and web search, skills, planning, goals, subagents, and workflows.',
presetCodeName: 'Code mode', presetCodeName: 'Code mode',
presetCodeDescription: presetCodeDescription:
'Presents Standard mode\'s tools through Code Mode: the model writes TypeScript against an SDK and runs it once instead of making multiple tool calls.', 'All Standard mode capabilities, with tools exposed through the Code Mode SDK so the model can combine multi-step operations in one TypeScript program.',
presetMinimalName: 'Minimal mode', presetMinimalName: 'Minimal mode',
presetMinimalDescription: presetMinimalDescription:
'Exposes only bash and str_replace_editor to the model, for benchmarks and minimal reproductions.', 'Two-tool coding agent with only bash and str_replace_editor, for benchmarks and minimal reproductions.',
presetCordisName: 'Creator mode', presetCordisName: 'Creator mode',
presetCordisDescription: presetCordisDescription:
'Adds self-inspection tools to Standard mode, so it can read and modify its own running composition and create new presets from it.', 'Adds Cordis runtime inspection, temporary-plugin experiments, and preset-authoring guidance to Standard mode for creating new agent presets; experiments affect only the current runtime and do not modify the built-in preset.',
duplicate: 'Duplicate', duplicate: 'Duplicate',
duplicateUnavailable: 'This deployment has no writable preset directory', duplicateUnavailable: 'This deployment has no writable preset directory',
delete: 'Delete', delete: 'Delete',
@@ -98,13 +99,13 @@ export const zh: Record<AgentPresetSettingsKey, string> = {
setDefault: '设为默认', setDefault: '设为默认',
view: '查看', view: '查看',
presetStandardName: '标准模式', presetStandardName: '标准模式',
presetStandardDescription: '完整的编码 agent:文件读写、shell、检索、计划、委派与工作流。', presetStandardDescription: '功能完整的编码 Agent,支持文件编辑、Shell、文件与网页检索、Skills、计划、目标、子代理和工作流。',
presetCodeName: '代码模式', presetCodeName: '代码模式',
presetCodeDescription: '标准模式的工具改为 Code Mode 呈现:模型写一段 TypeScript 调用 SDK,一次执行代替多轮工具调用。', presetCodeDescription: '具备标准模式的全部能力,并通过 Code Mode SDK 呈现工具,让模型用一个 TypeScript 程序组合多步操作。',
presetMinimalName: '极简模式', presetMinimalName: '极简模式',
presetMinimalDescription: '只向模型呈现 bash 与 str_replace_editor,适合 benchmark 与最小复现。', presetMinimalDescription: '仅提供 bash 与 str_replace_editor 的双工具编码 Agent,用于基准测试和最小复现。',
presetCordisName: '创造模式', presetCordisName: '创造模式',
presetCordisDescription: '标准模式加上自指工具集,可以读改自己运行的这套组装,并据此创作新的预设。', presetCordisDescription: '在标准模式上增加 Cordis 运行时检查、临时插件实验和 preset 创作指导,用于创建新的 Agent preset;临时实验仅影响当前运行时,不会修改内置 preset。',
duplicate: '复制', duplicate: '复制',
duplicateUnavailable: '此部署未配置可写的预设目录', duplicateUnavailable: '此部署未配置可写的预设目录',
delete: '删除', delete: '删除',

View File

@@ -2,5 +2,5 @@
# side as of the last confirmed-consistent state. Both languages carry equal authority; # side as of the last confirmed-consistent state. Both languages carry equal authority;
# after editing either side, bring the other along and re-record with: # after editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write packages/preset/agent-presets/README.md # pnpm run verify-translation-pairing --write packages/preset/agent-presets/README.md
README.md: b6d469b26a0254adc654e5cc49d3df2d10817b2d README.md: 4f41361bc2f22ea87ecbd3e5699e119d8019cc16
README.zh.md: 60c7bc695c27bf2c0169a0e405aa84aa711b9b21 README.zh.md: 148bb06cfcc1c469db7b590e5facb45c35b5fb6d

View File

@@ -63,7 +63,7 @@ A preset may publish display text in an optional `preset.yml` beside its composi
```yaml ```yaml
name: 极简模式 name: 极简模式
description: 只向模型呈现 bash 与 str_replace_editor,适合 benchmark 与最小复现。 description: 仅提供 bash 与 str_replace_editor 的双工具编码 Agent,用于基准测试和最小复现。
``` ```
It carries display text ONLY. `id` is the directory name and `trust` comes from the root the preset was discovered under, so neither is writable here — otherwise a locally authored preset could name itself into the shipped set. It is a separate file because the composition is a top-level list of plugin rows: YAML cannot carry sibling keys beside it, and a fake metadata row would hand the Loader something to load. It carries display text ONLY. `id` is the directory name and `trust` comes from the root the preset was discovered under, so neither is writable here — otherwise a locally authored preset could name itself into the shipped set. It is a separate file because the composition is a top-level list of plugin rows: YAML cannot carry sibling keys beside it, and a fake metadata row would hand the Loader something to load.

View File

@@ -63,7 +63,7 @@ preset 可以在组装文件旁的可选 `preset.yml` 里发布展示文本:
```yaml ```yaml
name: 极简模式 name: 极简模式
description: 只向模型呈现 bash 与 str_replace_editor,适合 benchmark 与最小复现。 description: 仅提供 bash 与 str_replace_editor 的双工具编码 Agent,用于基准测试和最小复现。
``` ```
它**只**承载展示文本。`id` 是目录名,`trust` 取自 preset 被发现时所在的根目录,两者都不可写在这里——否则本地创作的 preset 就能把自己命名进随附集合。之所以是独立文件:组装是插件行的顶层列表,YAML 无法在其旁携带同级键,而伪造一个元信息行等于递给 Loader 一个要加载的东西。 它**只**承载展示文本。`id` 是目录名,`trust` 取自 preset 被发现时所在的根目录,两者都不可写在这里——否则本地创作的 preset 就能把自己命名进随附集合。之所以是独立文件:组装是插件行的顶层列表,YAML 无法在其旁携带同级键,而伪造一个元信息行等于递给 Loader 一个要加载的东西。