/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { sandboxCreate } from "../../funcs/sandboxCreate.js"; import * as operations from "../../models/operations/index.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { request: operations.CreateSessionRequest$inboundSchema, }; export const tool$sandboxCreate: ToolDefinition = { name: "sandbox-create", description: `Create Session Create a sandbox session and return its public session metadata, session token, and provider. Set \`session_kind\` to \`browser\` to start a browser-backed session instead of a standard command/code sandbox. Set \`queue_if_full\` to \`true\` to queue the request instead of failing when runner capacity is temporarily unavailable. It does not queue requests for session kinds the deployment does not support. Browser sessions require a Firecracker-backed deployment; standard-only deployments reject them immediately with \`browser_sessions_not_enabled\`.`, args, tool: async (client, args, ctx) => { const [result, apiCall] = await sandboxCreate( 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); }, };