feat(agent-presets): rename the two-tool preset to minimal
`core-web` said neither of the things that matter about it. The `-web` suffix is a leftover from the whole-process `core-web.cordis.yml` overlay, and presets are per-session and not web-specific. `core` reads as "the foundational one" when it is in fact the one with the fewest capabilities. `minimal` says what it is and orders the shipped set legibly by capability: minimal, standard, cordis. Breaking: a session created under `core-web` records that id in its header and will fail to resolve it on resume. Nothing outside this repository has shipped, so no migration path is offered. The identically named `config/core-web.cordis.yml` — the legacy whole-process overlay behind the web snapshot test — is a different thing and keeps its name.
This commit is contained in:
@@ -1346,7 +1346,7 @@ export function createFixtureApi(options: FixtureOptions = {}): ApiProxy {
|
||||
*/
|
||||
const fixturePresets = new Map<string, { trust: 'system' | 'user'; content: string }>([
|
||||
['standard', { trust: 'system', content: "- id: tool-bash\n name: '@deepseek-ai/dsh-tool-bash'\n" }],
|
||||
['core-web', { trust: 'system', content: "- id: tool-web-search\n name: '@deepseek-ai/dsh-tool-web-search'\n" }],
|
||||
['minimal', { trust: 'system', content: "- id: tool-web-search\n name: '@deepseek-ai/dsh-tool-web-search'\n" }],
|
||||
['my-agent', { trust: 'user', content: "- id: tool-read\n name: '@deepseek-ai/dsh-tool-read'\n" }],
|
||||
])
|
||||
let fixtureDefaultPreset = 'standard'
|
||||
|
||||
@@ -75,24 +75,24 @@ describe('the agent-preset settings controller', () => {
|
||||
const writes: Recorded[] = []
|
||||
const controller = new AgentPresetSettingsController(fakeApi([
|
||||
{ id: 'standard', trust: 'system', isDefault: true },
|
||||
{ id: 'core-web', trust: 'system', isDefault: false },
|
||||
{ id: 'minimal', trust: 'system', isDefault: false },
|
||||
], { writes }))
|
||||
await controller.load()
|
||||
|
||||
await controller.select('core-web')
|
||||
await controller.select('minimal')
|
||||
|
||||
expect(writes).toEqual([{ ns: AGENT_PRESET_SETTINGS_NS, patch: { default: 'core-web' } }])
|
||||
expect(controller.store.getSnapshot().currentValue).toBe('core-web')
|
||||
expect(writes).toEqual([{ ns: AGENT_PRESET_SETTINGS_NS, patch: { default: 'minimal' } }])
|
||||
expect(controller.store.getSnapshot().currentValue).toBe('minimal')
|
||||
})
|
||||
|
||||
it('restores the previous value and surfaces the message when the write fails', async () => {
|
||||
const controller = new AgentPresetSettingsController(fakeApi([
|
||||
{ id: 'standard', trust: 'system', isDefault: true },
|
||||
{ id: 'core-web', trust: 'system', isDefault: false },
|
||||
{ id: 'minimal', trust: 'system', isDefault: false },
|
||||
], { failWrite: 'read-only settings' }))
|
||||
await controller.load()
|
||||
|
||||
await controller.select('core-web')
|
||||
await controller.select('minimal')
|
||||
|
||||
const state = controller.store.getSnapshot()
|
||||
expect(state.currentValue).toBe('standard')
|
||||
@@ -152,17 +152,17 @@ describe('the composer seat controller', () => {
|
||||
|
||||
const ROSTER: { id: string; trust: 'system' | 'user'; isDefault: boolean }[] = [
|
||||
{ id: 'standard', trust: 'system', isDefault: true },
|
||||
{ id: 'core-web', trust: 'system', isDefault: false },
|
||||
{ id: 'minimal', trust: 'system', isDefault: false },
|
||||
]
|
||||
|
||||
it('shows what the session runs, not the deployment default', async () => {
|
||||
const controller = seat(ROSTER, { blank: true, agentPreset: 'core-web' })
|
||||
const controller = seat(ROSTER, { blank: true, agentPreset: 'minimal' })
|
||||
|
||||
await controller.load()
|
||||
|
||||
// A resumed session runs what it was created with; showing `standard`
|
||||
// because it is the current default would be a lie about this session.
|
||||
expect(controller.store.getSnapshot().current).toBe('core-web')
|
||||
expect(controller.store.getSnapshot().current).toBe('minimal')
|
||||
expect(controller.store.getSnapshot().switchable).toBe(true)
|
||||
})
|
||||
|
||||
@@ -187,7 +187,7 @@ describe('the composer seat controller', () => {
|
||||
const controller = seat(ROSTER, { blank: false, agentPreset: 'standard' }, { writes })
|
||||
await controller.load()
|
||||
|
||||
await controller.select('core-web')
|
||||
await controller.select('minimal')
|
||||
|
||||
// The host enforces the same rule; the seat simply never asks.
|
||||
expect(writes).toEqual([])
|
||||
@@ -199,17 +199,17 @@ describe('the composer seat controller', () => {
|
||||
const controller = seat(ROSTER, { blank: true, agentPreset: 'standard' }, { writes })
|
||||
await controller.load()
|
||||
|
||||
await controller.select('core-web')
|
||||
await controller.select('minimal')
|
||||
|
||||
expect(writes).toEqual([{ ns: 'select', patch: 'core-web' }])
|
||||
expect(controller.store.getSnapshot().current).toBe('core-web')
|
||||
expect(writes).toEqual([{ ns: 'select', patch: 'minimal' }])
|
||||
expect(controller.store.getSnapshot().current).toBe('minimal')
|
||||
})
|
||||
|
||||
it('restores the previous value when the host rejects the switch', async () => {
|
||||
const controller = seat(ROSTER, { blank: true, agentPreset: 'standard' }, { failSelect: 'already started' })
|
||||
await controller.load()
|
||||
|
||||
await controller.select('core-web')
|
||||
await controller.select('minimal')
|
||||
|
||||
const state = controller.store.getSnapshot()
|
||||
expect(state.current).toBe('standard')
|
||||
@@ -292,9 +292,9 @@ describe('the composer seat controller', () => {
|
||||
const controller = seat(ROSTER, { blank: true, agentPreset: 'standard' }, { throwOn: 'select' })
|
||||
await controller.load()
|
||||
|
||||
await controller.select('core-web')
|
||||
await controller.select('minimal')
|
||||
|
||||
// Showing `core-web` after a failed switch would claim a composition the
|
||||
// Showing `minimal` after a failed switch would claim a composition the
|
||||
// session never got.
|
||||
expect(controller.store.getSnapshot()).toMatchObject({ current: 'standard', busy: false, error: 'socket closed' })
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user