docs(background-task): enhance background_output tool description with full_session parameter
This commit is contained in:
parent
64356c520b
commit
72a88068b9
@ -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.`
|
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.`
|
export const BACKGROUND_CANCEL_DESCRIPTION = `Cancel running background task(s). Use all=true to cancel ALL before final answer.`
|
||||||
|
|||||||
@ -5,3 +5,4 @@ export {
|
|||||||
|
|
||||||
export type * from "./types"
|
export type * from "./types"
|
||||||
export * from "./constants"
|
export * from "./constants"
|
||||||
|
export type { BackgroundOutputClient, BackgroundOutputManager, BackgroundCancelClient } from "./tools"
|
||||||
|
|||||||
@ -35,6 +35,8 @@ export { createSkillMcpTool } from "./skill-mcp"
|
|||||||
import {
|
import {
|
||||||
createBackgroundOutput,
|
createBackgroundOutput,
|
||||||
createBackgroundCancel,
|
createBackgroundCancel,
|
||||||
|
type BackgroundOutputManager,
|
||||||
|
type BackgroundCancelClient,
|
||||||
} from "./background-task"
|
} from "./background-task"
|
||||||
|
|
||||||
import type { PluginInput, ToolDefinition } from "@opencode-ai/plugin"
|
import type { PluginInput, ToolDefinition } from "@opencode-ai/plugin"
|
||||||
@ -47,9 +49,11 @@ export { createLookAt } from "./look-at"
|
|||||||
export { createDelegateTask } from "./delegate-task"
|
export { createDelegateTask } from "./delegate-task"
|
||||||
|
|
||||||
export function createBackgroundTools(manager: BackgroundManager, client: OpencodeClient): Record<string, ToolDefinition> {
|
export function createBackgroundTools(manager: BackgroundManager, client: OpencodeClient): Record<string, ToolDefinition> {
|
||||||
|
const outputManager: BackgroundOutputManager = manager
|
||||||
|
const cancelClient: BackgroundCancelClient = client
|
||||||
return {
|
return {
|
||||||
background_output: createBackgroundOutput(manager, client),
|
background_output: createBackgroundOutput(outputManager, client),
|
||||||
background_cancel: createBackgroundCancel(manager, client),
|
background_cancel: createBackgroundCancel(manager, cancelClient),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user