feat(councils-ui): add on-demand council conversations panel and model config controls
This commit is contained in:
@@ -1234,6 +1234,52 @@ describe('config handlers', () => {
|
||||
expect(getPath(config, 'tts', 'enabled_channels')).toEqual(['telegram', 'discord']);
|
||||
});
|
||||
|
||||
it('config.patch applies councils model and routing patches', async () => {
|
||||
const config = makeConfig();
|
||||
const handlers = createConfigHandlers({ config: asConfigValue(config) });
|
||||
const req: GatewayRequest = {
|
||||
id: 22,
|
||||
method: 'config.patch',
|
||||
params: {
|
||||
patches: {
|
||||
'councils.enabled': true,
|
||||
'councils.defaults.max_rounds': 3,
|
||||
'councils.groups.D.model_tier': 'complex',
|
||||
'councils.groups.P.model_tier': 'fast',
|
||||
'councils.meta_model_tier': 'default',
|
||||
'councils.groups.D.arbiter_agent': 'd_arbiter',
|
||||
'councils.groups.D.freethinker_agent': 'd_ft',
|
||||
'councils.groups.P.arbiter_agent': 'p_arbiter',
|
||||
'councils.groups.P.freethinker_agent': 'p_ft',
|
||||
'councils.meta_arbiter_agent': 'meta_arbiter',
|
||||
'councils.scaffold_path': 'docs/councils/ai-council-production-scaffold.json',
|
||||
},
|
||||
},
|
||||
};
|
||||
const result = await handlers['config.patch'](req) as GatewayResponse;
|
||||
const r = result.result as { applied: string[]; rejected: string[]; persisted: boolean };
|
||||
|
||||
expect(r.applied).toEqual([
|
||||
'councils.enabled',
|
||||
'councils.defaults.max_rounds',
|
||||
'councils.groups.D.model_tier',
|
||||
'councils.groups.P.model_tier',
|
||||
'councils.meta_model_tier',
|
||||
'councils.groups.D.arbiter_agent',
|
||||
'councils.groups.D.freethinker_agent',
|
||||
'councils.groups.P.arbiter_agent',
|
||||
'councils.groups.P.freethinker_agent',
|
||||
'councils.meta_arbiter_agent',
|
||||
'councils.scaffold_path',
|
||||
]);
|
||||
expect(r.rejected).toEqual([]);
|
||||
expect(getPath(config, 'councils', 'enabled')).toBe(true);
|
||||
expect(getPath(config, 'councils', 'defaults', 'max_rounds')).toBe(3);
|
||||
expect(getPath(config, 'councils', 'groups', 'P', 'model_tier')).toBe('fast');
|
||||
expect(getPath(config, 'councils', 'meta_model_tier')).toBe('default');
|
||||
expect(getPath(config, 'councils', 'meta_arbiter_agent')).toBe('meta_arbiter');
|
||||
});
|
||||
|
||||
it('config.patch rejects unknown keys', async () => {
|
||||
const config = makeConfig();
|
||||
const handlers = createConfigHandlers({ config: asConfigValue(config) });
|
||||
|
||||
Reference in New Issue
Block a user