8514906c3d
Pass parentTools from session-tools-store through the background task lifecycle (launch → task → notify) so that when notifyParentSession sends promptAsync, the original tool restrictions (e.g., question: false) are preserved. This prevents the Question tool from re-enabling after call_omo_agent background tasks complete.
20 lines
576 B
TypeScript
20 lines
576 B
TypeScript
import { randomUUID } from "crypto"
|
|
import type { BackgroundTask, LaunchInput } from "../types"
|
|
|
|
export function createTask(input: LaunchInput): BackgroundTask {
|
|
return {
|
|
id: `bg_${randomUUID().slice(0, 8)}`,
|
|
status: "pending",
|
|
queuedAt: new Date(),
|
|
description: input.description,
|
|
prompt: input.prompt,
|
|
agent: input.agent,
|
|
parentSessionID: input.parentSessionID,
|
|
parentMessageID: input.parentMessageID,
|
|
parentModel: input.parentModel,
|
|
parentAgent: input.parentAgent,
|
|
parentTools: input.parentTools,
|
|
model: input.model,
|
|
}
|
|
}
|