feat(tools): support per-tool timeout override for council runs

This commit is contained in:
William Valentin
2026-02-23 00:01:27 -08:00
parent 80ce8d9aaf
commit 056b8ce515
6 changed files with 56 additions and 3 deletions
+9
View File
@@ -55,6 +55,15 @@ const config = {
} as const;
describe('council.run tool', () => {
it('sets extended tool timeout for council orchestration', () => {
const tool = createCouncilRunTool({
registry: createRegistry(),
orchestrator: { delegate: vi.fn() as any },
config: config as any,
});
expect(tool.timeoutMs).toBe(180000);
});
it('runs council pipeline and returns output summary', async () => {
const previousDataDir = process.env.FLYNN_DATA_DIR;
const testDataDir = mkdtempSync(join(tmpdir(), 'flynn-council-run-'));
+3
View File
@@ -8,6 +8,8 @@ import { CouncilsOrchestrator, type CouncilsConfig } from '../../councils/orches
import type { CouncilScaffold } from '../../councils/scaffold.js';
import { councilRunInputSchema } from '../../councils/types.js';
const COUNCIL_TOOL_TIMEOUT_MS = 180_000;
interface DelegateRunner {
delegate(request: {
tier: 'fast' | 'default' | 'complex' | 'local';
@@ -152,6 +154,7 @@ export function createCouncilRunTool(deps: CouncilRunDeps): Tool {
name: 'council.run',
description:
'Run the deterministic dual-council pipeline (D/P groups with bridge-only exchange and meta merge).',
timeoutMs: COUNCIL_TOOL_TIMEOUT_MS,
inputSchema: {
type: 'object',
properties: {