/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { llmResponsesWake } from "../../funcs/llmResponsesWake.js"; import * as operations from "../../models/operations/index.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { request: operations.WakeResponseRequest$inboundSchema, }; export const tool$llmResponsesWake: ToolDefinition = { name: "llm-responses-wake", description: `Wake a sleeping background response Interrupts a short sleep tool call on an in-progress background response by providing follow-up input. Wake delivery is polled by the sleeping agent and may take up to one second.`, args, tool: async (client, args, ctx) => { const [result, apiCall] = await llmResponsesWake( client, args.request, { fetchOptions: { signal: ctx.signal } }, ).$inspect(); if (!result.ok) { return { content: [{ type: "text", text: result.error.message }], isError: true, }; } const value = result.value; return formatResult(value, apiCall); }, };