feat(councils): add preflight, schema-driven outputs, and artifact reporting
This commit is contained in:
+14
-4
@@ -29,6 +29,7 @@ import { auditLogger } from '../audit/index.js';
|
||||
import { getElevationStatusMessage, setElevationFromInput } from '../security/elevation.js';
|
||||
import { dirname, resolve } from 'path';
|
||||
import { loadCouncilScaffoldSafe } from '../councils/scaffold.js';
|
||||
import { buildCouncilPreflightReport, shouldRunCouncilPreflight } from '../councils/preflight.js';
|
||||
|
||||
function buildProviderConfigMap(config: Config): Partial<Record<ModelProvider, ModelConfig>> {
|
||||
const providerConfigs: Partial<Record<ModelProvider, ModelConfig>> = {};
|
||||
@@ -866,14 +867,23 @@ export function createMessageRouter(deps: {
|
||||
runCouncil: async (task: string) => {
|
||||
const message = task.trim();
|
||||
if (!message) {
|
||||
return 'Usage: /council <question or task>';
|
||||
return 'Usage: /council <question or task> | /council preflight';
|
||||
}
|
||||
if (!deps.config.councils?.enabled) {
|
||||
return 'Councils are disabled. Set councils.enabled: true in config.';
|
||||
}
|
||||
if (!deps.config.councils?.enabled) {
|
||||
return 'Councils are disabled. Set councils.enabled: true in config.';
|
||||
}
|
||||
if (!deps.agentConfigRegistry || deps.agentConfigRegistry.list().length === 0) {
|
||||
return 'No agent configurations are registered. Add council_* agent_configs first.';
|
||||
}
|
||||
if (shouldRunCouncilPreflight(message)) {
|
||||
return buildCouncilPreflightReport({
|
||||
config: deps.config,
|
||||
registry: deps.agentConfigRegistry,
|
||||
delegateRunner: agent,
|
||||
activeTier: agent.getModelTier(),
|
||||
includeLiveProbe: true,
|
||||
});
|
||||
}
|
||||
const tool = createCouncilRunTool({
|
||||
registry: deps.agentConfigRegistry,
|
||||
orchestrator: agent,
|
||||
|
||||
Reference in New Issue
Block a user