feat: configure supervisor model and story graph use per conversation

Add a supervisor text-model selector using existing connections and a per-conversation story graph switch above knowledge settings. Hide the switch when Supervisor is disabled and enforce conversation preferences at local and remote tool execution boundaries.

Release note: Choose a dedicated supervisor model and control whether each conversation can query existing stories and experiences. Enabling graph access does not start a review or automatically insert context.
This commit is contained in:
mesalogo
2026-10-03 19:16:35 +08:00
parent 492f1d208a
commit 48d7526b7e
47 changed files with 778 additions and 81 deletions
@@ -141,6 +141,23 @@ describe('ApplicationSettingsStore', () => {
await expect(store.update({ supervisionReview: { ...supervisionReview, ...patch } })).rejects.toThrow()
}
})
it.each([11, 12])('persists the supervisor model reference and defaults old settings to app default in version %s', async (version) => {
const { filePath, store } = await createStore()
const legacy = { ...defaultApplicationSettings, version, lastSeenReleaseNotesVersion: null }
delete legacy.supervisorModelProfileId
await writeFile(filePath, JSON.stringify(legacy))
expect((await store.get()).supervisorModelProfileId).toBeNull()
const profileId = '00000000-0000-4000-8000-000000000201'
await store.update({ supervisorModelProfileId: profileId })
await store.update({ checkUpdatesOnStartup: false })
expect((await createApplicationSettingsStore(filePath).get()).supervisorModelProfileId).toBe(profileId)
for (const value of ['', 'missing', 12, { apiKey: 'not-a-profile-reference' }]) {
await expect(store.update({ supervisorModelProfileId: value })).rejects.toThrow()
}
await store.update({ supervisorModelProfileId: null })
expect((await createApplicationSettingsStore(filePath).get()).supervisorModelProfileId).toBeNull()
})
it.each([11, 12])('persists supervision concurrency and defaults missing values in version %s', async (version) => {
const { filePath, store } = await createStore()
const legacy = { ...defaultApplicationSettings, version, lastSeenReleaseNotesVersion: null }