docs(background-task): enhance background_output tool description with full_session parameter

This commit is contained in:
justsisyphus
2026-02-01 17:00:02 +09:00
parent 64356c520b
commit 72a88068b9
3 changed files with 8 additions and 3 deletions

View File

@@ -2,6 +2,6 @@ export const BACKGROUND_TASK_DESCRIPTION = `Run agent task in background. Return
Use \`background_output\` to get results. Prompts MUST be in English.`
export const BACKGROUND_OUTPUT_DESCRIPTION = `Get output from background task. System notifies on completion, so block=true rarely needed.`
export const BACKGROUND_OUTPUT_DESCRIPTION = `Get output from background task. Use full_session=true to fetch session messages with filters. System notifies on completion, so block=true rarely needed.`
export const BACKGROUND_CANCEL_DESCRIPTION = `Cancel running background task(s). Use all=true to cancel ALL before final answer.`

View File

@@ -5,3 +5,4 @@ export {
export type * from "./types"
export * from "./constants"
export type { BackgroundOutputClient, BackgroundOutputManager, BackgroundCancelClient } from "./tools"

View File

@@ -35,6 +35,8 @@ export { createSkillMcpTool } from "./skill-mcp"
import {
createBackgroundOutput,
createBackgroundCancel,
type BackgroundOutputManager,
type BackgroundCancelClient,
} from "./background-task"
import type { PluginInput, ToolDefinition } from "@opencode-ai/plugin"
@@ -47,9 +49,11 @@ export { createLookAt } from "./look-at"
export { createDelegateTask } from "./delegate-task"
export function createBackgroundTools(manager: BackgroundManager, client: OpencodeClient): Record<string, ToolDefinition> {
const outputManager: BackgroundOutputManager = manager
const cancelClient: BackgroundCancelClient = client
return {
background_output: createBackgroundOutput(manager, client),
background_cancel: createBackgroundCancel(manager, client),
background_output: createBackgroundOutput(outputManager, client),
background_cancel: createBackgroundCancel(manager, cancelClient),
}
}