feat(council-archive): register council tools and add write_output_to_file to task tool

- Register council_finalize and council_read in tool registry
- Add write_output_to_file param to delegate-task, propagate to LaunchInput
- Create council-archive barrel exports
This commit is contained in:
ismeth
2026-02-27 15:18:18 +01:00
committed by YeonGyu-Kim
parent 2a426860f6
commit b6b956c4c3
6 changed files with 12 additions and 0 deletions
+3
View File
@@ -31,6 +31,7 @@ import {
createHashlineEditTool,
createPrepareCouncilPromptTool,
} from "../tools"
import { createCouncilFinalize, createCouncilRead } from "../tools/council-archive"
import { getMainSessionID } from "../features/claude-code-session-state"
import { filterDisabledTools } from "../shared/disabled-tools"
import { isTaskSystemEnabled, log } from "../shared"
@@ -280,6 +281,8 @@ export function createToolRegistry(args: {
...taskToolsRecord,
...hashlineToolsRecord,
prepare_council_prompt: createPrepareCouncilPromptTool(ctx.directory),
council_finalize: createCouncilFinalize(),
council_read: createCouncilRead(),
}
for (const toolDefinition of Object.values(allTools)) {
+5
View File
@@ -0,0 +1,5 @@
export { createCouncilFinalize } from "./create-council-finalize"
export { createCouncilRead } from "./create-council-read"
export { extractCouncilResponse, OPENING_TAG, CLOSING_TAG } from "./council-response-extractor"
export type { CouncilResponseExtraction } from "./council-response-extractor"
export type { CouncilFinalizeArgs, CouncilMemberResult, CouncilFinalizeResult } from "./types"
@@ -80,6 +80,7 @@ export async function executeBackgroundTask(
skillContent: systemContent,
category: args.category,
sessionPermission: QUESTION_DENIED_SESSION_PERMISSION,
writeOutputToFile: args.write_output_to_file,
})
// OpenCode TUI's `Task` tool UI calculates toolcalls by looking up
+1
View File
@@ -105,6 +105,7 @@ export function createDelegateTask(options: DelegateTaskToolOptions): ToolDefini
subagent_type: tool.schema.string().optional().describe("REQUIRED if category not provided. Do NOT provide both category and subagent_type."),
session_id: tool.schema.string().optional().describe("Existing Task session to continue"),
command: tool.schema.string().optional().describe("The command that triggered this task"),
write_output_to_file: tool.schema.boolean().optional().describe("Write raw task output to file on completion"),
},
async execute(args: DelegateTaskArgs, toolContext) {
const ctx = toolContext as ToolContextWithMetadata
+1
View File
@@ -17,6 +17,7 @@ export interface DelegateTaskArgs {
session_id?: string
command?: string
load_skills: string[]
write_output_to_file?: boolean
execute?: {
task_id: string
task_dir?: string
+1
View File
@@ -47,6 +47,7 @@ export {
} from "./task"
export { createHashlineEditTool } from "./hashline-edit"
export { createPrepareCouncilPromptTool } from "./prepare-council-prompt"
export { createCouncilFinalize, createCouncilRead } from "./council-archive"
export function createBackgroundTools(manager: BackgroundManager, client: OpencodeClient): Record<string, ToolDefinition> {
const outputManager: BackgroundOutputManager = manager